@opengeoweb/sigmet-airmet 14.3.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 +1431 -1148
  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 +2 -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';
@@ -79,7 +78,7 @@ var en = {
79
78
  "geometry-maximum-points-message": "The start position drawing allows a maximum of {{maxPoints}} individual points",
80
79
  "geometry-more-than-6-points-message": "The start/end position drawing has exceeded 6 individual points. The TAC has a total of {{totalDrawnPoints}} points. If possible, reduce the number of points.",
81
80
  "geometry-intersection-above-6-points-message": "The start/end position of the intersected polygon has {{intersectingPolygonPointsTotal}} points, and the intersection of the drawn polygon with the FIR-boundary has exceeded 6 individual points. Check if the TAC in the preview corresponds to the intended area.",
82
- "geometry-only-one-start-position-drawing": "Only one start position drawing is allowed",
81
+ "geometry-only-one-start-position-drawing": "The drawn polygon results in several polygons, and no TAC can be produced",
83
82
  "progress-get-movement-step-valktmessage": "Speed should be rounded to the nearest {{value}}kt",
84
83
  "progress-get-movement-step-valkmhmessage": "Speed should be rounded to the nearest {{value}}kmh",
85
84
  "progress-coordinate-empty-message": "An end position drawing is required when selecting End position",
@@ -144,7 +143,8 @@ var en = {
144
143
  "surface-visibility-maximum-visibility": "The maximum visibility in meters is {{maximumVisibility}}",
145
144
  "surface-visibility-helper-text": "Value in meters",
146
145
  "surface-visibility-between-time": "Forecast time should lie between the valid start and valid end time",
147
- phenomenon: "Phenomenon"
146
+ phenomenon: "Phenomenon",
147
+ "geometry-drawing-disabled": "Link a map to enable draw tools"
148
148
  };
149
149
  var fi = {
150
150
  "sigmet-airmet": "sigmet",
@@ -269,7 +269,8 @@ var fi = {
269
269
  "surface-visibility-maximum-visibility": "Maksiminäkyvyys metreinä: {{maximumVisibility}}",
270
270
  "surface-visibility-helper-text": "Arvo metreinä",
271
271
  "surface-visibility-between-time": "Ennusteajan tulee olla voimassa olevan alkamis- ja päättymisajan välissä",
272
- phenomenon: "sääilmiö"
272
+ phenomenon: "sääilmiö",
273
+ "geometry-drawing-disabled": "Link a map to enable draw tools"
273
274
  };
274
275
  var no = {
275
276
  "sigmet-airmet": "sigmet",
@@ -396,7 +397,8 @@ var no = {
396
397
  "surface-visibility-maximum-visibility": "The maximum visibility in meters is {{maximumVisibility}}",
397
398
  "surface-visibility-helper-text": "Value in meters",
398
399
  "surface-visibility-between-time": "Forecast time should lie between the valid start and valid end time",
399
- phenomenon: "Phenomenon"
400
+ phenomenon: "Phenomenon",
401
+ "geometry-drawing-disabled": "Link a map to enable draw tools"
400
402
  };
401
403
  var nl = {
402
404
  "sigmet-airmet": "sigmet",
@@ -521,7 +523,8 @@ var nl = {
521
523
  "surface-visibility-maximum-visibility": "De maximale zichtbaarheid in meters is {{maximumVisibility}}",
522
524
  "surface-visibility-helper-text": "Waarde in meters",
523
525
  "surface-visibility-between-time": "De prognosetijd moet tussen de geldige start- en eindtijd liggen",
524
- phenomenon: "Fenomeen"
526
+ phenomenon: "Fenomeen",
527
+ "geometry-drawing-disabled": "Link a map to enable draw tools"
525
528
  };
526
529
  var sigmetAirmetTranslations = {
527
530
  en: en,
@@ -530,133 +533,6 @@ var sigmetAirmetTranslations = {
530
533
  nl: nl
531
534
  };
532
535
 
533
- /**
534
- * The possible type for the airmet
535
- */
536
- var AirmetType;
537
- (function (AirmetType) {
538
- AirmetType["NORMAL"] = "Normal";
539
- AirmetType["TEST"] = "Test";
540
- AirmetType["EXERCISE"] = "Exercise";
541
- })(AirmetType || (AirmetType = {}));
542
- /**
543
- * The possible type for the sigmet
544
- */
545
- var SigmetType;
546
- (function (SigmetType) {
547
- SigmetType["NORMAL"] = "Normal";
548
- SigmetType["TEST"] = "Test";
549
- SigmetType["EXERCISE"] = "Exercise";
550
- SigmetType["SHORT_TEST"] = "Short test";
551
- SigmetType["SHORT_VA_TEST"] = "Short VA test";
552
- })(SigmetType || (SigmetType = {}));
553
- var VisibilityCause;
554
- (function (VisibilityCause) {
555
- VisibilityCause["DZ"] = "Drizzle";
556
- VisibilityCause["DU"] = "Dust";
557
- VisibilityCause["PO"] = "Dust or sand devil";
558
- VisibilityCause["DS"] = "Dust storm";
559
- VisibilityCause["FG"] = "Fog";
560
- VisibilityCause["FC"] = "Funnel clouds";
561
- VisibilityCause["GR"] = "Hail";
562
- VisibilityCause["HZ"] = "Haze";
563
- VisibilityCause["PL"] = "Ice pellets";
564
- VisibilityCause["BR"] = "Mist";
565
- VisibilityCause["RA"] = "Rain";
566
- VisibilityCause["SA"] = "Sand";
567
- VisibilityCause["SS"] = "Sand storm";
568
- VisibilityCause["FU"] = "Smoke";
569
- VisibilityCause["SN"] = "Snow";
570
- VisibilityCause["SG"] = "Snow grains";
571
- VisibilityCause["GS"] = "Soft hail";
572
- VisibilityCause["SQ"] = "Squalls";
573
- VisibilityCause["VA"] = "Volcanic Ash";
574
- })(VisibilityCause || (VisibilityCause = {}));
575
- /* Speed unit, e.g. 'KT', 'KMH' */
576
- var MovementUnit;
577
- (function (MovementUnit) {
578
- MovementUnit["KT"] = "kt";
579
- MovementUnit["KMH"] = "kmh";
580
- })(MovementUnit || (MovementUnit = {}));
581
- var WindUnit;
582
- (function (WindUnit) {
583
- WindUnit["KT"] = "kt";
584
- WindUnit["MPS"] = "mps";
585
- })(WindUnit || (WindUnit = {}));
586
- var ProductAction;
587
- (function (ProductAction) {
588
- ProductAction["PUBLISH"] = "PUBLISH";
589
- ProductAction["CANCEL"] = "CANCEL";
590
- ProductAction["RENEW"] = "RENEW";
591
- ProductAction["AMEND"] = "AMEND";
592
- ProductAction["SAVE"] = "SAVE";
593
- ProductAction["DISCARD"] = "DISCARD";
594
- ProductAction["DUPLICATE"] = "DUPLICATE";
595
- ProductAction["CLOSE"] = "CLOSE";
596
- })(ProductAction || (ProductAction = {}));
597
- var ProductStatusDescription;
598
- (function (ProductStatusDescription) {
599
- ProductStatusDescription["DRAFT"] = "Draft";
600
- ProductStatusDescription["PUBLISHED"] = "Published";
601
- ProductStatusDescription["CANCELLED"] = "Cancelled";
602
- ProductStatusDescription["EXPIRED"] = "Expired";
603
- ProductStatusDescription["RENEWED"] = "Renewed";
604
- ProductStatusDescription["DISCARDED"] = "Discarded";
605
- })(ProductStatusDescription || (ProductStatusDescription = {}));
606
- var CloudLevelUnits;
607
- (function (CloudLevelUnits) {
608
- CloudLevelUnits["FT"] = "ft";
609
- CloudLevelUnits["M"] = "m";
610
- })(CloudLevelUnits || (CloudLevelUnits = {}));
611
- var LevelUnits;
612
- (function (LevelUnits) {
613
- LevelUnits["FT"] = "ft";
614
- LevelUnits["M"] = "m";
615
- LevelUnits["FL"] = "FL";
616
- })(LevelUnits || (LevelUnits = {}));
617
- var Direction;
618
- (function (Direction) {
619
- Direction["N"] = "N";
620
- Direction["NNE"] = "NNE";
621
- Direction["NE"] = "NE";
622
- Direction["ENE"] = "ENE";
623
- Direction["E"] = "E";
624
- Direction["ESE"] = "ESE";
625
- Direction["SE"] = "SE";
626
- Direction["SSE"] = "SSE";
627
- Direction["S"] = "S";
628
- Direction["SSW"] = "SSW";
629
- Direction["SW"] = "SW";
630
- Direction["WSW"] = "WSW";
631
- Direction["W"] = "W";
632
- Direction["WNW"] = "WNW";
633
- Direction["NW"] = "NW";
634
- Direction["NNW"] = "NNW";
635
- })(Direction || (Direction = {}));
636
- var isInstanceOfSigmet = function isInstanceOfSigmet(obj) {
637
- return 'phenomenon' in obj;
638
- };
639
- var isInstanceOfCancelSigmet = function isInstanceOfCancelSigmet(obj) {
640
- return 'cancelsSigmetSequenceId' in obj;
641
- };
642
- var isInstanceOfAirmet = function isInstanceOfAirmet(obj) {
643
- return 'phenomenon' in obj;
644
- };
645
- var isInstanceOfCancelAirmet = function isInstanceOfCancelAirmet(obj) {
646
- return 'cancelsAirmetSequenceId' in obj;
647
- };
648
- var isInstanceOfSigmetOrAirmet = function isInstanceOfSigmetOrAirmet(obj) {
649
- return 'phenomenon' in obj;
650
- };
651
- var isInstanceOfCancelSigmetOrAirmet = function isInstanceOfCancelSigmetOrAirmet(obj) {
652
- return 'cancelsSigmetSequenceId' in obj || 'cancelsAirmetSequenceId' in obj;
653
- };
654
- var StartOrEndDrawing;
655
- (function (StartOrEndDrawing) {
656
- StartOrEndDrawing["start"] = "start";
657
- StartOrEndDrawing["end"] = "end";
658
- })(StartOrEndDrawing || (StartOrEndDrawing = {}));
659
-
660
536
  function _OverloadYield(e, d) {
661
537
  this.v = e, this.k = d;
662
538
  }
@@ -1013,87 +889,217 @@ var safeFetch = /*#__PURE__*/function () {
1013
889
  };
1014
890
  }();
1015
891
  // API
1016
- var getAirmetList = function getAirmetList(auth) {
1017
- return safeFetch(airmetBaseUrl + "/airmetlist", {
1018
- headers: getHeaders(auth)
1019
- });
1020
- };
1021
- var getSigmetList = function getSigmetList(auth) {
1022
- return safeFetch(sigmetBaseUrl + "/sigmetlist", {
1023
- headers: getHeaders(auth)
1024
- });
1025
- };
1026
- var getAirmetConfig = function getAirmetConfig(auth) {
1027
- return fetch(airmetBaseUrl + "/airmet-config", {
1028
- headers: getHeaders(auth)
1029
- }).then(function (result) {
1030
- return result.json();
1031
- });
1032
- };
1033
- var getSigmetConfig = function getSigmetConfig(auth) {
1034
- return fetch(sigmetBaseUrl + "/sigmet-config", {
1035
- headers: getHeaders(auth)
1036
- }).then(function (result) {
1037
- return result.json();
1038
- });
1039
- };
1040
- var postTAC = /*#__PURE__*/function () {
1041
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(url, auth, product) {
1042
- var result, textData;
892
+ var getAirmetList = /*#__PURE__*/function () {
893
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(auth) {
1043
894
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1044
895
  while (1) switch (_context2.prev = _context2.next) {
1045
896
  case 0:
1046
- _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;
1047
1001
  return fetch(url, {
1048
1002
  method: 'POST',
1049
1003
  body: JSON.stringify(product),
1050
1004
  headers: getHeaders(auth)
1051
1005
  });
1052
1006
  case 2:
1053
- result = _context2.sent;
1007
+ result = _context8.sent;
1054
1008
  if (result.ok) {
1055
- _context2.next = 5;
1009
+ _context8.next = 5;
1056
1010
  break;
1057
1011
  }
1058
1012
  throw new Error("Failed to fetch TAC data: " + result.statusText);
1059
1013
  case 5:
1060
- _context2.next = 7;
1014
+ _context8.next = 7;
1061
1015
  return result.text();
1062
1016
  case 7:
1063
- textData = _context2.sent;
1064
- return _context2.abrupt("return", {
1017
+ textData = _context8.sent;
1018
+ return _context8.abrupt("return", {
1065
1019
  data: textData
1066
1020
  });
1067
1021
  case 9:
1068
1022
  case "end":
1069
- return _context2.stop();
1023
+ return _context8.stop();
1070
1024
  }
1071
- }, _callee2);
1025
+ }, _callee8);
1072
1026
  }));
1073
- return function postTAC(_x4, _x5, _x6) {
1074
- 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);
1075
1101
  };
1076
1102
  }();
1077
- var getSigmetTAC = function getSigmetTAC(auth, product) {
1078
- return postTAC(sigmetBaseUrl + "/sigmet2tac", auth, product);
1079
- };
1080
- var getAirmetTAC = function getAirmetTAC(auth, product) {
1081
- return postTAC(airmetBaseUrl + "/airmet2tac", auth, product);
1082
- };
1083
- var postSigmet = function postSigmet(auth, data) {
1084
- return fetch(sigmetBaseUrl + "/sigmet", {
1085
- headers: getHeaders(auth),
1086
- method: 'POST',
1087
- body: JSON.stringify(data)
1088
- }).then(handleResponse);
1089
- };
1090
- var postAirmet = function postAirmet(auth, data) {
1091
- return fetch(airmetBaseUrl + "/airmet", {
1092
- headers: getHeaders(auth),
1093
- method: 'POST',
1094
- body: JSON.stringify(data)
1095
- }).then(handleResponse);
1096
- };
1097
1103
 
1098
1104
  var useAirmetList = function useAirmetList(disabled) {
1099
1105
  if (disabled === void 0) {
@@ -1116,24 +1122,78 @@ var useTACApi = function useTACApi() {
1116
1122
  var _useAuthenticationCon = useAuthenticationContext(),
1117
1123
  auth = _useAuthenticationCon.auth;
1118
1124
  var queryClient = useQueryClient();
1119
- var fetchSigmetTAC = function fetchSigmetTAC(product) {
1120
- return queryClient.fetchQuery({
1121
- queryKey: ['sigmet-tac', product],
1122
- queryFn: function queryFn() {
1123
- return getSigmetTAC(auth, product);
1124
- },
1125
- staleTime: 1000 * 15
1126
- });
1127
- };
1128
- var fetchAirmetTAC = function fetchAirmetTAC(product) {
1129
- return queryClient.fetchQuery({
1130
- queryKey: ['airmet-tac', product],
1131
- queryFn: function queryFn() {
1132
- return getAirmetTAC(auth, product);
1133
- },
1134
- staleTime: 1000 * 15
1135
- });
1136
- };
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
+ }();
1137
1197
  return {
1138
1198
  fetchSigmetTAC: fetchSigmetTAC,
1139
1199
  fetchAirmetTAC: fetchAirmetTAC
@@ -1144,31 +1204,48 @@ var usePostSigmet = function usePostSigmet() {
1144
1204
  auth = _useAuthenticationCon2.auth;
1145
1205
  var queryClient = useQueryClient();
1146
1206
  return useMutation({
1147
- mutationFn: function mutationFn(formData) {
1148
- if (!auth) {
1149
- 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);
1150
1227
  }
1151
- return postSigmet(auth, formData);
1152
- },
1228
+ return mutationFn;
1229
+ }(),
1153
1230
  onError: function onError() {
1154
1231
  void queryClient.invalidateQueries({
1155
1232
  queryKey: ['sigmet']
1156
1233
  });
1157
1234
  },
1158
1235
  onSuccess: function () {
1159
- var _onSuccess = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1160
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1161
- 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) {
1162
1239
  case 0:
1163
- _context.next = 2;
1240
+ _context6.next = 2;
1164
1241
  return queryClient.invalidateQueries({
1165
1242
  queryKey: ['sigmet-list']
1166
1243
  });
1167
1244
  case 2:
1168
1245
  case "end":
1169
- return _context.stop();
1246
+ return _context6.stop();
1170
1247
  }
1171
- }, _callee);
1248
+ }, _callee6);
1172
1249
  }));
1173
1250
  function onSuccess() {
1174
1251
  return _onSuccess.apply(this, arguments);
@@ -1182,31 +1259,48 @@ var usePostAirmet = function usePostAirmet() {
1182
1259
  auth = _useAuthenticationCon3.auth;
1183
1260
  var queryClient = useQueryClient();
1184
1261
  return useMutation({
1185
- mutationFn: function mutationFn(formData) {
1186
- if (!auth) {
1187
- 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);
1188
1282
  }
1189
- return postAirmet(auth, formData);
1190
- },
1283
+ return mutationFn;
1284
+ }(),
1191
1285
  onError: function onError() {
1192
1286
  void queryClient.invalidateQueries({
1193
1287
  queryKey: ['airmet']
1194
1288
  });
1195
1289
  },
1196
1290
  onSuccess: function () {
1197
- var _onSuccess2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1198
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1199
- 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) {
1200
1294
  case 0:
1201
- _context2.next = 2;
1295
+ _context8.next = 2;
1202
1296
  return queryClient.invalidateQueries({
1203
1297
  queryKey: ['airmet-list']
1204
1298
  });
1205
1299
  case 2:
1206
1300
  case "end":
1207
- return _context2.stop();
1301
+ return _context8.stop();
1208
1302
  }
1209
- }, _callee2);
1303
+ }, _callee8);
1210
1304
  }));
1211
1305
  function onSuccess() {
1212
1306
  return _onSuccess2.apply(this, arguments);
@@ -1262,6 +1356,133 @@ var useShortTestHelpers = function useShortTestHelpers() {
1262
1356
  };
1263
1357
  };
1264
1358
 
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
+
1265
1486
  var location_indicator_mwo$1 = "EHDB";
1266
1487
  var fir_areas$1 = {
1267
1488
  EHAA: {
@@ -1409,28 +1630,43 @@ var fir_areas$1 = {
1409
1630
  },
1410
1631
  location_indicator_atsr: "EHAA",
1411
1632
  location_indicator_atsu: "EHAA",
1412
- area_preset: "NL_FIR",
1413
1633
  max_hours_of_validity: 4,
1414
1634
  hours_before_validity: 4,
1415
- tc_max_hours_of_validity: 6,
1416
- tc_hours_before_validity: 12,
1417
- va_max_hours_of_validity: 6,
1418
- va_hours_before_validity: 12,
1419
- adjacent_firs: [
1420
- "EKDK",
1421
- "EDWW",
1422
- "EDGG",
1423
- "EBBU",
1424
- "EGTT",
1425
- "EGPX"
1426
- ],
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,
1427
1663
  level_min: {
1428
1664
  FT: 500,
1429
1665
  FL: 50
1430
1666
  },
1431
1667
  level_max: {
1432
1668
  FT: 4500,
1433
- FL: 650
1669
+ FL: 100
1434
1670
  },
1435
1671
  level_rounding_FL: 5,
1436
1672
  level_rounding_FT: 500,
@@ -1448,68 +1684,76 @@ var fir_areas$1 = {
1448
1684
  max_polygon_points: 7,
1449
1685
  phenomenon: [
1450
1686
  {
1451
- code: "EMBD_TS",
1452
- description: "Embedded thunderstorm(s)"
1687
+ code: "SFC_VIS",
1688
+ description: "Surface visibility"
1453
1689
  },
1454
1690
  {
1455
- code: "EMBD_TSGR",
1456
- description: "Embedded thunderstorm(s) with hail"
1691
+ code: "SFC_WIND",
1692
+ description: "Surface wind"
1457
1693
  },
1458
1694
  {
1459
- code: "FRQ_TS",
1460
- description: "Frequent thunderstorm(s)"
1695
+ code: "OVC_CLD",
1696
+ description: "Overcast cloud"
1461
1697
  },
1462
1698
  {
1463
- code: "FRQ_TSGR",
1464
- description: "Frequent thunderstorm(s) with hail"
1699
+ code: "BKN_CLD",
1700
+ description: "Broken cloud"
1465
1701
  },
1466
1702
  {
1467
- code: "HVY_DS",
1468
- description: "Heavy duststorm"
1703
+ code: "ISOL_CB",
1704
+ description: "Isolated cumulonimbus cloud"
1469
1705
  },
1470
1706
  {
1471
- code: "HVY_SS",
1472
- description: "Heavy sandstorm"
1707
+ code: "OCNL_CB",
1708
+ description: "Occasional cumulonimbus cloud"
1473
1709
  },
1474
1710
  {
1475
- code: "OBSC_TS",
1476
- description: "Obscured thunderstorm(s)"
1711
+ code: "FRQ_CB",
1712
+ description: "Frequent cumulonimbus cloud"
1477
1713
  },
1478
1714
  {
1479
- code: "OBSC_TSGR",
1480
- description: "Obscured thunderstorm(s) with hail"
1715
+ code: "ISOL_TS",
1716
+ description: "Isolated thunderstorm(s)"
1481
1717
  },
1482
1718
  {
1483
- code: "RDOACT_CLD",
1484
- description: "Radioactive cloud"
1719
+ code: "OCNL_TS",
1720
+ description: "Occasional thunderstorm(s)"
1485
1721
  },
1486
1722
  {
1487
- code: "SEV_ICE",
1488
- description: "Severe icing"
1723
+ code: "ISOL_TSGR",
1724
+ description: "Isolated thunderstorm(s) with hail"
1489
1725
  },
1490
1726
  {
1491
- code: "SEV_ICE_FRZ_RN",
1492
- description: "Severe icing due to freezing rain"
1727
+ code: "OCNL_TSGR",
1728
+ description: "Occasional thunderstorm(s) with hail"
1493
1729
  },
1494
1730
  {
1495
- code: "SEV_MTW",
1496
- description: "Severe mountain wave"
1731
+ code: "ISOL_TCU",
1732
+ description: "Isolated towering cumulus cloud"
1497
1733
  },
1498
1734
  {
1499
- code: "SEV_TURB",
1500
- description: "Severe turbulence"
1735
+ code: "OCNL_TCU",
1736
+ description: "Occasional towering cumulus cloud"
1501
1737
  },
1502
1738
  {
1503
- code: "SQL_TS",
1504
- description: "Squall line thunderstorm(s)"
1739
+ code: "FRQ_TCU",
1740
+ description: "Frequent towering cumulus cloud"
1505
1741
  },
1506
1742
  {
1507
- code: "SQL_TSGR",
1508
- description: "Squall line thunderstorm(s) with hail"
1743
+ code: "MOD_ICE",
1744
+ description: "Moderate icing"
1509
1745
  },
1510
1746
  {
1511
- code: "VA_CLD",
1512
- 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"
1513
1757
  }
1514
1758
  ],
1515
1759
  units: [
@@ -1525,6 +1769,18 @@ var fir_areas$1 = {
1525
1769
  allowed_units: [
1526
1770
  "KT"
1527
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
+ ]
1528
1784
  }
1529
1785
  ]
1530
1786
  },
@@ -2749,88 +3005,83 @@ var fir_areas$1 = {
2749
3005
  },
2750
3006
  location_indicator_atsr: "EZZZ",
2751
3007
  location_indicator_atsu: "EZZZ",
2752
- area_preset: "NL_FIR",
2753
3008
  max_hours_of_validity: 4,
2754
3009
  hours_before_validity: 4,
2755
- tc_max_hours_of_validity: 6,
2756
- tc_hours_before_validity: 12,
2757
- va_max_hours_of_validity: 6,
2758
- va_hours_before_validity: 12,
2759
- movement_rounding_kt: 20,
2760
- movement_rounding_kmh: 30,
3010
+ movement_rounding_kt: 5,
3011
+ movement_rounding_kmh: 10,
2761
3012
  max_polygon_points: 20,
2762
- adjacent_firs: [
2763
- "EKDK",
2764
- "EDWW",
2765
- "EDGG",
2766
- "EBBU",
2767
- "EGTT",
2768
- "EGPX"
2769
- ],
2770
3013
  phenomenon: [
2771
3014
  {
2772
- code: "EMBD_TS",
2773
- description: "Embedded thunderstorm(s)"
3015
+ code: "SFC_VIS",
3016
+ description: "Surface visibility"
2774
3017
  },
2775
3018
  {
2776
- code: "EMBD_TSGR",
2777
- description: "Embedded thunderstorm(s) with hail"
3019
+ code: "SFC_WIND",
3020
+ description: "Surface wind"
2778
3021
  },
2779
3022
  {
2780
- code: "FRQ_TS",
2781
- description: "Frequent thunderstorm(s)"
3023
+ code: "OVC_CLD",
3024
+ description: "Overcast cloud"
2782
3025
  },
2783
3026
  {
2784
- code: "FRQ_TSGR",
2785
- description: "Frequent thunderstorm(s) with hail"
3027
+ code: "BKN_CLD",
3028
+ description: "Broken cloud"
2786
3029
  },
2787
3030
  {
2788
- code: "HVY_DS",
2789
- description: "Heavy duststorm"
3031
+ code: "ISOL_CB",
3032
+ description: "Isolated cumulonimbus cloud"
2790
3033
  },
2791
3034
  {
2792
- code: "HVY_SS",
2793
- description: "Heavy sandstorm"
3035
+ code: "OCNL_CB",
3036
+ description: "Occasional cumulonimbus cloud"
2794
3037
  },
2795
3038
  {
2796
- code: "OBSC_TS",
2797
- description: "Obscured thunderstorm(s)"
3039
+ code: "FRQ_CB",
3040
+ description: "Frequent cumulonimbus cloud"
2798
3041
  },
2799
3042
  {
2800
- code: "OBSC_TSGR",
2801
- description: "Obscured thunderstorm(s) with hail"
3043
+ code: "ISOL_TS",
3044
+ description: "Isolated thunderstorm(s)"
2802
3045
  },
2803
3046
  {
2804
- code: "RDOACT_CLD",
2805
- description: "Radioactive cloud"
3047
+ code: "OCNL_TS",
3048
+ description: "Occasional thunderstorm(s)"
2806
3049
  },
2807
3050
  {
2808
- code: "SEV_ICE",
2809
- description: "Severe icing"
3051
+ code: "ISOL_TSGR",
3052
+ description: "Isolated thunderstorm(s) with hail"
2810
3053
  },
2811
3054
  {
2812
- code: "SEV_ICE_FRZ_RN",
2813
- description: "Severe icing due to freezing rain"
3055
+ code: "OCNL_TSGR",
3056
+ description: "Occasional thunderstorm(s) with hail"
2814
3057
  },
2815
3058
  {
2816
- code: "SEV_MTW",
2817
- description: "Severe mountain wave"
3059
+ code: "ISOL_TCU",
3060
+ description: "Isolated towering cumulus cloud"
2818
3061
  },
2819
3062
  {
2820
- code: "SEV_TURB",
2821
- description: "Severe turbulence"
3063
+ code: "OCNL_TCU",
3064
+ description: "Occasional towering cumulus cloud"
2822
3065
  },
2823
3066
  {
2824
- code: "SQL_TS",
2825
- description: "Squall line thunderstorm(s)"
3067
+ code: "FRQ_TCU",
3068
+ description: "Frequent towering cumulus cloud"
2826
3069
  },
2827
3070
  {
2828
- code: "SQL_TSGR",
2829
- description: "Squall line thunderstorm(s) with hail"
3071
+ code: "MOD_ICE",
3072
+ description: "Moderate icing"
2830
3073
  },
2831
3074
  {
2832
- code: "VA_CLD",
2833
- 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"
2834
3085
  }
2835
3086
  ],
2836
3087
  units: [
@@ -2847,12 +3098,24 @@ var fir_areas$1 = {
2847
3098
  "KT",
2848
3099
  "KMH"
2849
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
+ ]
2850
3113
  }
2851
3114
  ]
2852
3115
  }
2853
3116
  };
2854
3117
  var valid_from_delay_minutes$1 = 30;
2855
- var default_validity_minutes$1 = 180;
3118
+ var default_validity_minutes$1 = 60;
2856
3119
  var active_firs$1 = [
2857
3120
  "EHAA",
2858
3121
  "EZZZ"
@@ -2860,13 +3123,13 @@ var active_firs$1 = [
2860
3123
  var mapPreset$1 = {
2861
3124
  layers: [
2862
3125
  {
2863
- id: "baseLayer-sigmet",
3126
+ id: "baseLayer-airmet",
2864
3127
  name: "WorldMap_Light_Grey_Canvas",
2865
3128
  type: "twms",
2866
3129
  layerType: "baseLayer"
2867
3130
  },
2868
3131
  {
2869
- id: "countryborder-sigmet",
3132
+ id: "countryborder-airmet",
2870
3133
  name: "countryborders",
2871
3134
  layerType: "overLayer",
2872
3135
  format: "image/png",
@@ -2874,7 +3137,7 @@ var mapPreset$1 = {
2874
3137
  service: "https://geoservices.knmi.nl/wms?DATASET=baselayers&"
2875
3138
  },
2876
3139
  {
2877
- id: "northseastations-sigmet",
3140
+ id: "northseastations-airmet",
2878
3141
  name: "northseastations",
2879
3142
  layerType: "overLayer",
2880
3143
  service: "https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver?dataset=OVL",
@@ -2882,7 +3145,7 @@ var mapPreset$1 = {
2882
3145
  enabled: true
2883
3146
  },
2884
3147
  {
2885
- id: "airports-sigmet",
3148
+ id: "airports-airmet",
2886
3149
  name: "airports",
2887
3150
  layerType: "overLayer",
2888
3151
  service: "https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver?dataset=OVL",
@@ -2900,7 +3163,7 @@ var mapPreset$1 = {
2900
3163
  srs: "EPSG:3857"
2901
3164
  }
2902
3165
  };
2903
- var sigmetDefaultConfig = {
3166
+ var airmetDefaultConfig = {
2904
3167
  location_indicator_mwo: location_indicator_mwo$1,
2905
3168
  fir_areas: fir_areas$1,
2906
3169
  valid_from_delay_minutes: valid_from_delay_minutes$1,
@@ -3056,43 +3319,28 @@ var fir_areas = {
3056
3319
  },
3057
3320
  location_indicator_atsr: "EHAA",
3058
3321
  location_indicator_atsu: "EHAA",
3322
+ area_preset: "NL_FIR",
3059
3323
  max_hours_of_validity: 4,
3060
3324
  hours_before_validity: 4,
3061
- cloud_lower_level_min: {
3062
- FT: 100
3063
- },
3064
- cloud_lower_level_max: {
3065
- FT: 900
3066
- },
3067
- cloud_level_min: {
3068
- FT: 100
3069
- },
3070
- cloud_level_max: {
3071
- FT: 9900
3072
- },
3073
- cloud_level_rounding_ft: 100,
3074
- cloud_level_rounding_m_below: 30,
3075
- cloud_level_rounding_m_above: 300,
3076
- wind_direction_rounding: 10,
3077
- wind_speed_min: {
3078
- KT: 31,
3079
- MPS: 0
3080
- },
3081
- wind_speed_max: {
3082
- KT: 199,
3083
- MPS: 99
3084
- },
3085
- visibility_max: 4900,
3086
- visibility_min: 0,
3087
- visibility_rounding_below: 50,
3088
- 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
+ ],
3089
3337
  level_min: {
3090
3338
  FT: 500,
3091
3339
  FL: 50
3092
3340
  },
3093
3341
  level_max: {
3094
3342
  FT: 4500,
3095
- FL: 100
3343
+ FL: 650
3096
3344
  },
3097
3345
  level_rounding_FL: 5,
3098
3346
  level_rounding_FT: 500,
@@ -3110,76 +3358,68 @@ var fir_areas = {
3110
3358
  max_polygon_points: 7,
3111
3359
  phenomenon: [
3112
3360
  {
3113
- code: "SFC_VIS",
3114
- description: "Surface visibility"
3115
- },
3116
- {
3117
- code: "SFC_WIND",
3118
- description: "Surface wind"
3119
- },
3120
- {
3121
- code: "OVC_CLD",
3122
- description: "Overcast cloud"
3361
+ code: "EMBD_TS",
3362
+ description: "Embedded thunderstorm(s)"
3123
3363
  },
3124
3364
  {
3125
- code: "BKN_CLD",
3126
- description: "Broken cloud"
3365
+ code: "EMBD_TSGR",
3366
+ description: "Embedded thunderstorm(s) with hail"
3127
3367
  },
3128
3368
  {
3129
- code: "ISOL_CB",
3130
- description: "Isolated cumulonimbus cloud"
3369
+ code: "FRQ_TS",
3370
+ description: "Frequent thunderstorm(s)"
3131
3371
  },
3132
3372
  {
3133
- code: "OCNL_CB",
3134
- description: "Occasional cumulonimbus cloud"
3373
+ code: "FRQ_TSGR",
3374
+ description: "Frequent thunderstorm(s) with hail"
3135
3375
  },
3136
3376
  {
3137
- code: "FRQ_CB",
3138
- description: "Frequent cumulonimbus cloud"
3377
+ code: "HVY_DS",
3378
+ description: "Heavy duststorm"
3139
3379
  },
3140
3380
  {
3141
- code: "ISOL_TS",
3142
- description: "Isolated thunderstorm(s)"
3381
+ code: "HVY_SS",
3382
+ description: "Heavy sandstorm"
3143
3383
  },
3144
3384
  {
3145
- code: "OCNL_TS",
3146
- description: "Occasional thunderstorm(s)"
3385
+ code: "OBSC_TS",
3386
+ description: "Obscured thunderstorm(s)"
3147
3387
  },
3148
3388
  {
3149
- code: "ISOL_TSGR",
3150
- description: "Isolated thunderstorm(s) with hail"
3389
+ code: "OBSC_TSGR",
3390
+ description: "Obscured thunderstorm(s) with hail"
3151
3391
  },
3152
3392
  {
3153
- code: "OCNL_TSGR",
3154
- description: "Occasional thunderstorm(s) with hail"
3393
+ code: "RDOACT_CLD",
3394
+ description: "Radioactive cloud"
3155
3395
  },
3156
3396
  {
3157
- code: "ISOL_TCU",
3158
- description: "Isolated towering cumulus cloud"
3397
+ code: "SEV_ICE",
3398
+ description: "Severe icing"
3159
3399
  },
3160
3400
  {
3161
- code: "OCNL_TCU",
3162
- description: "Occasional towering cumulus cloud"
3401
+ code: "SEV_ICE_FRZ_RN",
3402
+ description: "Severe icing due to freezing rain"
3163
3403
  },
3164
3404
  {
3165
- code: "FRQ_TCU",
3166
- description: "Frequent towering cumulus cloud"
3405
+ code: "SEV_MTW",
3406
+ description: "Severe mountain wave"
3167
3407
  },
3168
3408
  {
3169
- code: "MOD_ICE",
3170
- description: "Moderate icing"
3409
+ code: "SEV_TURB",
3410
+ description: "Severe turbulence"
3171
3411
  },
3172
3412
  {
3173
- code: "MOD_MTW",
3174
- description: "Moderate mountain wave"
3413
+ code: "SQL_TS",
3414
+ description: "Squall line thunderstorm(s)"
3175
3415
  },
3176
3416
  {
3177
- code: "MOD_TURB",
3178
- description: "Moderate turbulence"
3417
+ code: "SQL_TSGR",
3418
+ description: "Squall line thunderstorm(s) with hail"
3179
3419
  },
3180
3420
  {
3181
- code: "MT_OBSC",
3182
- description: "Mountains obscured"
3421
+ code: "VA_CLD",
3422
+ description: "Volcanic ash cloud"
3183
3423
  }
3184
3424
  ],
3185
3425
  units: [
@@ -3195,18 +3435,6 @@ var fir_areas = {
3195
3435
  allowed_units: [
3196
3436
  "KT"
3197
3437
  ]
3198
- },
3199
- {
3200
- unit_type: "surfacewind_unit",
3201
- allowed_units: [
3202
- "KT"
3203
- ]
3204
- },
3205
- {
3206
- unit_type: "cloud_level_unit",
3207
- allowed_units: [
3208
- "FT"
3209
- ]
3210
3438
  }
3211
3439
  ]
3212
3440
  },
@@ -4431,83 +4659,88 @@ var fir_areas = {
4431
4659
  },
4432
4660
  location_indicator_atsr: "EZZZ",
4433
4661
  location_indicator_atsu: "EZZZ",
4662
+ area_preset: "NL_FIR",
4434
4663
  max_hours_of_validity: 4,
4435
4664
  hours_before_validity: 4,
4436
- movement_rounding_kt: 5,
4437
- 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,
4438
4671
  max_polygon_points: 20,
4672
+ adjacent_firs: [
4673
+ "EKDK",
4674
+ "EDWW",
4675
+ "EDGG",
4676
+ "EBBU",
4677
+ "EGTT",
4678
+ "EGPX"
4679
+ ],
4439
4680
  phenomenon: [
4440
4681
  {
4441
- code: "SFC_VIS",
4442
- description: "Surface visibility"
4443
- },
4444
- {
4445
- code: "SFC_WIND",
4446
- description: "Surface wind"
4447
- },
4448
- {
4449
- code: "OVC_CLD",
4450
- description: "Overcast cloud"
4682
+ code: "EMBD_TS",
4683
+ description: "Embedded thunderstorm(s)"
4451
4684
  },
4452
4685
  {
4453
- code: "BKN_CLD",
4454
- description: "Broken cloud"
4686
+ code: "EMBD_TSGR",
4687
+ description: "Embedded thunderstorm(s) with hail"
4455
4688
  },
4456
4689
  {
4457
- code: "ISOL_CB",
4458
- description: "Isolated cumulonimbus cloud"
4690
+ code: "FRQ_TS",
4691
+ description: "Frequent thunderstorm(s)"
4459
4692
  },
4460
4693
  {
4461
- code: "OCNL_CB",
4462
- description: "Occasional cumulonimbus cloud"
4694
+ code: "FRQ_TSGR",
4695
+ description: "Frequent thunderstorm(s) with hail"
4463
4696
  },
4464
4697
  {
4465
- code: "FRQ_CB",
4466
- description: "Frequent cumulonimbus cloud"
4698
+ code: "HVY_DS",
4699
+ description: "Heavy duststorm"
4467
4700
  },
4468
4701
  {
4469
- code: "ISOL_TS",
4470
- description: "Isolated thunderstorm(s)"
4702
+ code: "HVY_SS",
4703
+ description: "Heavy sandstorm"
4471
4704
  },
4472
4705
  {
4473
- code: "OCNL_TS",
4474
- description: "Occasional thunderstorm(s)"
4706
+ code: "OBSC_TS",
4707
+ description: "Obscured thunderstorm(s)"
4475
4708
  },
4476
4709
  {
4477
- code: "ISOL_TSGR",
4478
- description: "Isolated thunderstorm(s) with hail"
4710
+ code: "OBSC_TSGR",
4711
+ description: "Obscured thunderstorm(s) with hail"
4479
4712
  },
4480
4713
  {
4481
- code: "OCNL_TSGR",
4482
- description: "Occasional thunderstorm(s) with hail"
4714
+ code: "RDOACT_CLD",
4715
+ description: "Radioactive cloud"
4483
4716
  },
4484
4717
  {
4485
- code: "ISOL_TCU",
4486
- description: "Isolated towering cumulus cloud"
4718
+ code: "SEV_ICE",
4719
+ description: "Severe icing"
4487
4720
  },
4488
4721
  {
4489
- code: "OCNL_TCU",
4490
- description: "Occasional towering cumulus cloud"
4722
+ code: "SEV_ICE_FRZ_RN",
4723
+ description: "Severe icing due to freezing rain"
4491
4724
  },
4492
4725
  {
4493
- code: "FRQ_TCU",
4494
- description: "Frequent towering cumulus cloud"
4726
+ code: "SEV_MTW",
4727
+ description: "Severe mountain wave"
4495
4728
  },
4496
4729
  {
4497
- code: "MOD_ICE",
4498
- description: "Moderate icing"
4730
+ code: "SEV_TURB",
4731
+ description: "Severe turbulence"
4499
4732
  },
4500
4733
  {
4501
- code: "MOD_MTW",
4502
- description: "Moderate mountain wave"
4734
+ code: "SQL_TS",
4735
+ description: "Squall line thunderstorm(s)"
4503
4736
  },
4504
4737
  {
4505
- code: "MOD_TURB",
4506
- description: "Moderate turbulence"
4738
+ code: "SQL_TSGR",
4739
+ description: "Squall line thunderstorm(s) with hail"
4507
4740
  },
4508
4741
  {
4509
- code: "MT_OBSC",
4510
- description: "Mountains obscured"
4742
+ code: "VA_CLD",
4743
+ description: "Volcanic ash cloud"
4511
4744
  }
4512
4745
  ],
4513
4746
  units: [
@@ -4524,24 +4757,12 @@ var fir_areas = {
4524
4757
  "KT",
4525
4758
  "KMH"
4526
4759
  ]
4527
- },
4528
- {
4529
- unit_type: "surfacewind_unit",
4530
- allowed_units: [
4531
- "KT"
4532
- ]
4533
- },
4534
- {
4535
- unit_type: "cloud_level_unit",
4536
- allowed_units: [
4537
- "FT"
4538
- ]
4539
4760
  }
4540
4761
  ]
4541
4762
  }
4542
4763
  };
4543
4764
  var valid_from_delay_minutes = 30;
4544
- var default_validity_minutes = 60;
4765
+ var default_validity_minutes = 180;
4545
4766
  var active_firs = [
4546
4767
  "EHAA",
4547
4768
  "EZZZ"
@@ -4549,13 +4770,13 @@ var active_firs = [
4549
4770
  var mapPreset = {
4550
4771
  layers: [
4551
4772
  {
4552
- id: "baseLayer-airmet",
4773
+ id: "baseLayer-sigmet",
4553
4774
  name: "WorldMap_Light_Grey_Canvas",
4554
4775
  type: "twms",
4555
4776
  layerType: "baseLayer"
4556
4777
  },
4557
4778
  {
4558
- id: "countryborder-airmet",
4779
+ id: "countryborder-sigmet",
4559
4780
  name: "countryborders",
4560
4781
  layerType: "overLayer",
4561
4782
  format: "image/png",
@@ -4563,7 +4784,7 @@ var mapPreset = {
4563
4784
  service: "https://geoservices.knmi.nl/wms?DATASET=baselayers&"
4564
4785
  },
4565
4786
  {
4566
- id: "northseastations-airmet",
4787
+ id: "northseastations-sigmet",
4567
4788
  name: "northseastations",
4568
4789
  layerType: "overLayer",
4569
4790
  service: "https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver?dataset=OVL",
@@ -4571,7 +4792,7 @@ var mapPreset = {
4571
4792
  enabled: true
4572
4793
  },
4573
4794
  {
4574
- id: "airports-airmet",
4795
+ id: "airports-sigmet",
4575
4796
  name: "airports",
4576
4797
  layerType: "overLayer",
4577
4798
  service: "https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver?dataset=OVL",
@@ -4589,7 +4810,7 @@ var mapPreset = {
4589
4810
  srs: "EPSG:3857"
4590
4811
  }
4591
4812
  };
4592
- var airmetDefaultConfig = {
4813
+ var sigmetDefaultConfig = {
4593
4814
  location_indicator_mwo: location_indicator_mwo,
4594
4815
  fir_areas: fir_areas,
4595
4816
  valid_from_delay_minutes: valid_from_delay_minutes,
@@ -4807,34 +5028,11 @@ var styles$2 = {
4807
5028
  }
4808
5029
  };
4809
5030
 
4810
- var _excluded$1 = ["value", "label", "disabled"];
4811
- // A version of a radio button with label where the label and surrounding white space is not clickable
4812
- var RadioButtonAndLabel = function RadioButtonAndLabel(props) {
4813
- var value = props.value,
4814
- label = props.label,
4815
- _props$disabled = props.disabled,
4816
- disabled = _props$disabled === void 0 ? true : _props$disabled,
4817
- restProps = _objectWithoutPropertiesLoose(props, _excluded$1);
4818
- return jsx(FormControlLabel, Object.assign({
4819
- style: {
4820
- pointerEvents: 'none'
4821
- },
4822
- value: value,
4823
- control: jsx(Radio, {
4824
- style: {
4825
- pointerEvents: 'auto'
4826
- }
4827
- }),
4828
- label: label,
4829
- disabled: disabled
4830
- }, restProps));
4831
- };
4832
-
4833
- var _excluded = ["title", "children"];
5031
+ var _excluded$1 = ["title", "children"];
4834
5032
  var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
4835
5033
  var title = _ref.title,
4836
5034
  children = _ref.children,
4837
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
5035
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
4838
5036
  return jsxs(Grid, Object.assign({
4839
5037
  container: true,
4840
5038
  spacing: 3
@@ -4843,9 +5041,9 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
4843
5041
  container: true,
4844
5042
  justifyContent: "flex-end",
4845
5043
  size: 4,
4846
- children: title && jsx(Typography, {
4847
- variant: "subtitle1",
5044
+ children: !!title && jsx(Typography, {
4848
5045
  sx: styles$2.label,
5046
+ variant: "subtitle1",
4849
5047
  children: title
4850
5048
  })
4851
5049
  }), jsx(Grid, {
@@ -4857,6 +5055,29 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
4857
5055
  }));
4858
5056
  };
4859
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
+
4860
5081
  var Change = function Change(_ref) {
4861
5082
  var isDisabled = _ref.isDisabled,
4862
5083
  isReadOnly = _ref.isReadOnly;
@@ -4871,7 +5092,6 @@ var Change = function Change(_ref) {
4871
5092
  };
4872
5093
  var fieldsDisabled = isDisabled || isShortTest();
4873
5094
  return jsx(ProductFormFieldLayout, {
4874
- title: t('change'),
4875
5095
  sx: {
4876
5096
  '.MuiButtonBase-root.MuiRadio-root': {
4877
5097
  padding: '6px',
@@ -4882,30 +5102,31 @@ var Change = function Change(_ref) {
4882
5102
  },
4883
5103
  marginTop: -1
4884
5104
  },
5105
+ title: t('change'),
4885
5106
  children: jsxs(ReactHookFormRadioGroup, {
5107
+ disabled: fieldsDisabled,
5108
+ isReadOnly: isReadOnly,
4886
5109
  name: "change",
4887
5110
  rules: {
4888
5111
  validate: {
4889
5112
  isRequired: isRequired
4890
5113
  }
4891
5114
  },
4892
- disabled: fieldsDisabled,
4893
- isReadOnly: isReadOnly,
4894
5115
  children: [jsx(RadioButtonAndLabel, {
4895
- value: "WKN",
4896
- label: t('weakening'),
5116
+ "data-testid": "change-WKN",
4897
5117
  disabled: fieldsDisabled,
4898
- "data-testid": "change-WKN"
5118
+ label: t('weakening'),
5119
+ value: "WKN"
4899
5120
  }), jsx(RadioButtonAndLabel, {
4900
- value: "NC",
4901
- label: t('no-change'),
5121
+ "data-testid": "change-NC",
4902
5122
  disabled: fieldsDisabled,
4903
- "data-testid": "change-NC"
5123
+ label: t('no-change'),
5124
+ value: "NC"
4904
5125
  }), jsx(RadioButtonAndLabel, {
4905
- value: "INTSF",
4906
- label: t('intensifying'),
5126
+ "data-testid": "change-INTSF",
4907
5127
  disabled: fieldsDisabled,
4908
- "data-testid": "change-INTSF"
5128
+ label: t('intensifying'),
5129
+ value: "INTSF"
4909
5130
  })]
4910
5131
  })
4911
5132
  });
@@ -5001,28 +5222,28 @@ var getMinCloudLevelValue = function getMinCloudLevelValue(unit, selectedFIR, pr
5001
5222
  var _getActiveFIRArea2 = getActiveFIRArea(selectedFIR, productConfig),
5002
5223
  cloud_level_min = _getActiveFIRArea2.cloud_level_min;
5003
5224
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5004
- 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;
5005
5226
  };
5006
5227
  var getMinCloudLowerLevelValue = function getMinCloudLowerLevelValue(unit, selectedFIR, productConfig) {
5007
5228
  // Use first FIR in list if no FIR selected
5008
5229
  var _getActiveFIRArea3 = getActiveFIRArea(selectedFIR, productConfig),
5009
5230
  cloud_lower_level_min = _getActiveFIRArea3.cloud_lower_level_min;
5010
5231
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5011
- 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;
5012
5233
  };
5013
5234
  var getMaxCloudLevelValue = function getMaxCloudLevelValue(unit, selectedFIR, productConfig) {
5014
5235
  // Use first FIR in list if no FIR selected
5015
5236
  var _getActiveFIRArea4 = getActiveFIRArea(selectedFIR, productConfig),
5016
5237
  cloud_level_max = _getActiveFIRArea4.cloud_level_max;
5017
5238
  // Return max value for selected unit - if not present in list, return null
5018
- 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;
5019
5240
  };
5020
5241
  var getMaxCloudLowerLevelValue = function getMaxCloudLowerLevelValue(unit, selectedFIR, productConfig) {
5021
5242
  // Use first FIR in list if no FIR selected
5022
5243
  var _getActiveFIRArea5 = getActiveFIRArea(selectedFIR, productConfig),
5023
5244
  cloud_lower_level_max = _getActiveFIRArea5.cloud_lower_level_max;
5024
5245
  // Return max value for selected unit - if not present in list, return null
5025
- 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;
5026
5247
  };
5027
5248
  // Retrieve max value from config - if not set, there is no max value for this unit so we return null
5028
5249
  var getMaxLevelValue = function getMaxLevelValue(unit, selectedFIR, productConfig) {
@@ -5030,7 +5251,7 @@ var getMaxLevelValue = function getMaxLevelValue(unit, selectedFIR, productConfi
5030
5251
  var _getActiveFIRArea6 = getActiveFIRArea(selectedFIR, productConfig),
5031
5252
  level_max = _getActiveFIRArea6.level_max;
5032
5253
  // Return max value for selected unit - if not present in list, return null
5033
- return level_max !== undefined && level_max[unit] ? level_max[unit] : null;
5254
+ return level_max != null && level_max[unit] ? level_max[unit] : null;
5034
5255
  };
5035
5256
  // Retrieve min value from config - if not set, return zero
5036
5257
  var getMinLevelValue = function getMinLevelValue(unit, selectedFIR, productConfig) {
@@ -5038,14 +5259,14 @@ var getMinLevelValue = function getMinLevelValue(unit, selectedFIR, productConfi
5038
5259
  var _getActiveFIRArea7 = getActiveFIRArea(selectedFIR, productConfig),
5039
5260
  level_min = _getActiveFIRArea7.level_min;
5040
5261
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5041
- 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;
5042
5263
  };
5043
5264
  var getMaxWindSpeedValue = function getMaxWindSpeedValue(unit, selectedFIR, productConfig) {
5044
5265
  // Use first FIR in list if no FIR selected
5045
5266
  var _getActiveFIRArea8 = getActiveFIRArea(selectedFIR, productConfig),
5046
5267
  wind_speed_max = _getActiveFIRArea8.wind_speed_max;
5047
5268
  // Return min value for selected unit - if not present in list, return null
5048
- 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;
5049
5270
  };
5050
5271
  var DEFAULT_MIN_WIND_SPEED = 0;
5051
5272
  var getMinWindSpeedValue = function getMinWindSpeedValue(unit, selectedFIR, productConfig) {
@@ -5053,7 +5274,7 @@ var getMinWindSpeedValue = function getMinWindSpeedValue(unit, selectedFIR, prod
5053
5274
  var _getActiveFIRArea9 = getActiveFIRArea(selectedFIR, productConfig),
5054
5275
  wind_speed_min = _getActiveFIRArea9.wind_speed_min;
5055
5276
  // Return min value for selected unit - if not present in list, return 0 as we have negative wind speed
5056
- 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;
5057
5278
  };
5058
5279
  var getMaxVisibilityValue = function getMaxVisibilityValue(selectedFIR, productConfig) {
5059
5280
  // Use first FIR in list if no FIR selected
@@ -5351,7 +5572,7 @@ var getProductIssueDate = function getProductIssueDate(t, initialProduct, initia
5351
5572
  if (initialProduct !== null && (initialProduct.status === 'PUBLISHED' || initialProduct.status === 'EXPIRED') && initialProduct.issueDate) {
5352
5573
  return dateUtils.dateToString(dateUtils.utc(initialProduct.issueDate), dateUtils.DATE_FORMAT_DATEPICKER) + " UTC";
5353
5574
  }
5354
- if (initialCancelProduct !== null && initialCancelProduct.issueDate) {
5575
+ if (initialCancelProduct != null && initialCancelProduct.issueDate) {
5355
5576
  return dateUtils.dateToString(dateUtils.utc(initialCancelProduct.issueDate), dateUtils.DATE_FORMAT_DATEPICKER) + " UTC";
5356
5577
  }
5357
5578
  return t('not-published');
@@ -5395,11 +5616,11 @@ var getFir = function getFir(productConfig, firName) {
5395
5616
  */
5396
5617
  var isFir = function isFir(geojson) {
5397
5618
  var _geojson$features$;
5398
- if (!geojson || !geojson.features || geojson.features.length === 0) {
5619
+ if (!(geojson != null && geojson.features) || geojson.features.length === 0) {
5399
5620
  return false;
5400
5621
  }
5401
5622
  var selectionType = (_geojson$features$ = geojson.features[0]) == null || (_geojson$features$ = _geojson$features$.properties) == null ? void 0 : _geojson$features$['selectionType'];
5402
- return geojson && geojson.features && geojson.features.length > 0 && selectionType === firSelectionType;
5623
+ return (geojson == null ? void 0 : geojson.features) && geojson.features.length > 0 && selectionType === firSelectionType;
5403
5624
  };
5404
5625
  var getFieldLabel = function getFieldLabel(t, title, isDisabled, action) {
5405
5626
  if (action === void 0) {
@@ -5417,14 +5638,14 @@ var getMaxMovementSpeedValue = function getMaxMovementSpeedValue(unit, selectedF
5417
5638
  var _getActiveFIRArea10 = getActiveFIRArea(selectedFIR, productConfig),
5418
5639
  movement_max = _getActiveFIRArea10.movement_max;
5419
5640
  // Return max value for selected unit - if not present in list, return null
5420
- return movement_max !== undefined && movement_max[unit] ? movement_max[unit] : null;
5641
+ return movement_max != null && movement_max[unit] ? movement_max[unit] : null;
5421
5642
  };
5422
5643
  var DEFAULT_MIN_MOVEMENT_SPEED = 0;
5423
5644
  var getMinMovementSpeedValue = function getMinMovementSpeedValue(unit, selectedFIR, productConfig) {
5424
5645
  var _getActiveFIRArea11 = getActiveFIRArea(selectedFIR, productConfig),
5425
5646
  movement_min = _getActiveFIRArea11.movement_min;
5426
5647
  // Return min value for selected unit - if not present in list, return DEFAULT_MIN_MOVEMENT_SPEED (zero, no negative speeds)
5427
- 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;
5428
5649
  };
5429
5650
  /** Trigger form validations for given list of field names if field has a value */
5430
5651
  var triggerValidations = function triggerValidations(fieldNames, getValues, trigger) {
@@ -5507,7 +5728,7 @@ var useFormLayers = function useFormLayers(layers) {
5507
5728
  geoJSON: layer.geojson
5508
5729
  };
5509
5730
  }).filter(function (layer) {
5510
- return layer.geoJSON !== undefined;
5731
+ return layer.geoJSON !== undefined && layer.geoJSON !== null;
5511
5732
  });
5512
5733
  var sourcePanelId = useSelector(function (store) {
5513
5734
  return uiSelectors.getSourcePanelId(store, 'publicWarnings');
@@ -5555,7 +5776,8 @@ var DrawTools = function DrawTools(_ref) {
5555
5776
  tools = _ref.tools,
5556
5777
  onChangeTool = _ref.onChangeTool,
5557
5778
  _ref$isDisabled = _ref.isDisabled,
5558
- isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
5779
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
5780
+ disabledTooltip = _ref.disabledTooltip;
5559
5781
  usePreventBrowserClose(activeTool !== '');
5560
5782
  return jsx(Box, {
5561
5783
  "data-testid": "drawtools",
@@ -5565,19 +5787,23 @@ var DrawTools = function DrawTools(_ref) {
5565
5787
  justifyContent: 'space-between'
5566
5788
  },
5567
5789
  children: tools.map(function (tool) {
5790
+ var radio = jsx(Radio, {
5791
+ checked: activeTool === tool.drawModeId,
5792
+ checkedIcon: getToolIcon(tool.selectionType),
5793
+ "data-testid": tool.drawModeId,
5794
+ disabled: isDisabled,
5795
+ icon: getToolIcon(tool.selectionType),
5796
+ onChange: function onChange() {
5797
+ onChangeTool(tool);
5798
+ },
5799
+ sx: styles$1.radioInput,
5800
+ value: true
5801
+ });
5802
+ var title = isDisabled && disabledTooltip ? disabledTooltip : tool.title;
5568
5803
  return jsx(CustomTooltip, {
5569
- title: tool.title,
5570
- children: jsx(Radio, {
5571
- icon: getToolIcon(tool.selectionType),
5572
- value: true,
5573
- checkedIcon: getToolIcon(tool.selectionType),
5574
- checked: activeTool === tool.drawModeId,
5575
- disabled: isDisabled,
5576
- onChange: function onChange() {
5577
- onChangeTool(tool);
5578
- },
5579
- "data-testid": tool.drawModeId,
5580
- sx: styles$1.radioInput
5804
+ title: title,
5805
+ children: jsx("span", {
5806
+ children: radio
5581
5807
  })
5582
5808
  }, tool.drawModeId);
5583
5809
  })
@@ -5680,7 +5906,7 @@ var Levels = function Levels(_ref) {
5680
5906
  var isTS = isTSPhenomenon(phenomenon);
5681
5907
  var isSigmetTS = productType === 'sigmet' && isTS;
5682
5908
  var prevPhenomenon = usePrevious(phenomenon);
5683
- React__default.useEffect(function () {
5909
+ React.useEffect(function () {
5684
5910
  if (productType !== 'sigmet') {
5685
5911
  return;
5686
5912
  }
@@ -5713,7 +5939,7 @@ var Levels = function Levels(_ref) {
5713
5939
  // Get allowed level units based on selected FIR - if no FIR selected, allow all default units
5714
5940
  var allowedLevelUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'level_unit', LevelUnits);
5715
5941
  var radioactiveCloudLevel = getMaxLevelValue(LevelUnits.FL, getFIRValue(), productConfig);
5716
- React__default.useEffect(function () {
5942
+ React.useEffect(function () {
5717
5943
  if (levelInfoMode !== 'BETW') {
5718
5944
  unregister('lowerLevel');
5719
5945
  }
@@ -5724,21 +5950,16 @@ var Levels = function Levels(_ref) {
5724
5950
  }
5725
5951
  }, [getValues, isRadioactiveCloud, levelInfoMode, radioactiveCloudLevel, setValue, trigger, unregister]);
5726
5952
  return jsx(ProductFormFieldLayout, {
5727
- title: t('levels'),
5728
5953
  sx: Object.assign({}, styles$2.containerItem, {
5729
5954
  '.MuiFormHelperText-root.Mui-error': {
5730
5955
  marginBottom: '-16px'
5731
5956
  }
5732
5957
  }),
5958
+ title: t('levels'),
5733
5959
  children: jsxs(ReactHookFormRadioGroup, {
5734
- name: "levelInfoMode",
5735
- rules: {
5736
- validate: {
5737
- isRequired: isRequired
5738
- }
5739
- },
5740
5960
  disabled: fieldsDisabled,
5741
5961
  isReadOnly: isReadOnly,
5962
+ name: "levelInfoMode",
5742
5963
  onChange: function onChange() {
5743
5964
  // Reset default value for the level value to '' so when it rerenders it uses this empty default value
5744
5965
  setValue('level.unit', 'FL');
@@ -5746,17 +5967,22 @@ var Levels = function Levels(_ref) {
5746
5967
  // Clear out errors for the levels
5747
5968
  clearErrors(['level', 'lowerLevel']);
5748
5969
  },
5970
+ rules: {
5971
+ validate: {
5972
+ isRequired: isRequired
5973
+ }
5974
+ },
5749
5975
  children: [jsx(RadioButtonAndLabel, {
5750
- value: "AT",
5751
- label: t('at'),
5752
5976
  checked: levelInfoMode === 'AT' || levelInfoMode === 'TOPS',
5753
5977
  "data-testid": "levels-AT",
5754
- disabled: fieldsDisabled
5978
+ disabled: fieldsDisabled,
5979
+ label: t('at'),
5980
+ value: "AT"
5755
5981
  }), (levelInfoMode === 'AT' || levelInfoMode === 'TOPS') && !isRadioactiveCloud ? jsxs(Grid, {
5982
+ alignItems: "flex-start",
5756
5983
  container: true,
5757
- spacing: 2,
5758
5984
  justifyItems: "flex-end",
5759
- alignItems: "flex-start",
5985
+ spacing: 2,
5760
5986
  children: [jsx(Grid, {
5761
5987
  size: {
5762
5988
  xs: 12,
@@ -5765,6 +5991,8 @@ var Levels = function Levels(_ref) {
5765
5991
  children: jsx(FormControlLabel, {
5766
5992
  control: jsx(Checkbox, {
5767
5993
  checked: levelInfoMode === 'TOPS',
5994
+ color: "secondary",
5995
+ disabled: isDisabled || isSigmetTS,
5768
5996
  onChange: function onChange() {
5769
5997
  if (isSigmetTS) {
5770
5998
  return;
@@ -5772,9 +6000,7 @@ var Levels = function Levels(_ref) {
5772
6000
  setValue('levelInfoMode', levelInfoMode === 'AT' ? 'TOPS' : 'AT', {
5773
6001
  shouldDirty: true
5774
6002
  });
5775
- },
5776
- color: "secondary",
5777
- disabled: isDisabled || isSigmetTS
6003
+ }
5778
6004
  }),
5779
6005
  "data-testid": "levels-TOPS",
5780
6006
  label: t('levels-tops-label')
@@ -5785,22 +6011,22 @@ var Levels = function Levels(_ref) {
5785
6011
  md: 3
5786
6012
  },
5787
6013
  children: jsx(ReactHookFormSelect, {
5788
- name: "level.unit",
6014
+ defaultValue: 'FL',
6015
+ disabled: isDisabled,
6016
+ isReadOnly: isReadOnly,
5789
6017
  label: t('unit-label'),
6018
+ name: "level.unit",
6019
+ onChange: function onChange() {
6020
+ triggerValidations(['level.value'], getValues, trigger);
6021
+ _onChange();
6022
+ },
5790
6023
  rules: {
5791
6024
  validate: {
5792
6025
  isRequired: isRequired
5793
6026
  }
5794
6027
  },
5795
- sx: styles$2.unit,
5796
6028
  size: "small",
5797
- disabled: isDisabled,
5798
- isReadOnly: isReadOnly,
5799
- defaultValue: 'FL',
5800
- onChange: function onChange() {
5801
- triggerValidations(['level.value'], getValues, trigger);
5802
- _onChange();
5803
- },
6029
+ sx: styles$2.unit,
5804
6030
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
5805
6031
  return jsx(MenuItem, {
5806
6032
  value: key,
@@ -5814,9 +6040,12 @@ var Levels = function Levels(_ref) {
5814
6040
  md: 6
5815
6041
  },
5816
6042
  children: jsx(ReactHookFormNumberField, {
5817
- name: "level.value",
6043
+ autoFocus: true,
5818
6044
  "data-testid": "level.value",
6045
+ disabled: isDisabled,
6046
+ isReadOnly: isReadOnly,
5819
6047
  label: t('level'),
6048
+ name: "level.value",
5820
6049
  rules: {
5821
6050
  validate: {
5822
6051
  isRequired: isRequired,
@@ -5847,18 +6076,15 @@ var Levels = function Levels(_ref) {
5847
6076
  }
5848
6077
  }
5849
6078
  },
5850
- size: "small",
5851
- disabled: isDisabled,
5852
- isReadOnly: isReadOnly,
5853
- autoFocus: true
6079
+ size: "small"
5854
6080
  })
5855
6081
  })]
5856
6082
  }) : null, jsx(RadioButtonAndLabel, {
5857
- value: "BETW",
5858
- label: t('between'),
5859
6083
  checked: levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC',
5860
6084
  "data-testid": "levels-BETW",
5861
- disabled: fieldsDisabled
6085
+ disabled: fieldsDisabled,
6086
+ label: t('between'),
6087
+ value: "BETW"
5862
6088
  }), levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC' ? jsxs(Fragment, {
5863
6089
  children: [jsxs(Grid, {
5864
6090
  container: true,
@@ -5874,8 +6100,15 @@ var Levels = function Levels(_ref) {
5874
6100
  md: 3
5875
6101
  },
5876
6102
  children: jsx(ReactHookFormSelect, {
5877
- name: "level.unit",
6103
+ defaultValue: 'FL',
6104
+ disabled: fieldsDisabled,
6105
+ isReadOnly: isReadOnly,
5878
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
+ },
5879
6112
  rules: {
5880
6113
  validate: {
5881
6114
  isRequired: isRequired,
@@ -5889,13 +6122,6 @@ var Levels = function Levels(_ref) {
5889
6122
  },
5890
6123
  size: "small",
5891
6124
  sx: styles$2.unit,
5892
- disabled: fieldsDisabled,
5893
- isReadOnly: isReadOnly,
5894
- defaultValue: 'FL',
5895
- onChange: function onChange() {
5896
- triggerValidations(['level.value', 'lowerLevel.value', 'lowerLevel.unit'], getValues, trigger);
5897
- _onChange();
5898
- },
5899
6125
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
5900
6126
  return jsx(MenuItem, {
5901
6127
  value: key,
@@ -5909,11 +6135,14 @@ var Levels = function Levels(_ref) {
5909
6135
  md: 6
5910
6136
  },
5911
6137
  children: jsx(ReactHookFormNumberField, {
5912
- value: level || '',
5913
- name: "level.value",
6138
+ autoFocus: true,
6139
+ disabled: fieldsDisabled,
6140
+ isReadOnly: isReadOnly,
5914
6141
  label: t('levels-upper-level-label'),
5915
- sx: styles$2.levelField,
5916
- size: "small",
6142
+ name: "level.value",
6143
+ onChange: function onChange() {
6144
+ triggerValidations(['lowerLevel.value'], getValues, trigger);
6145
+ },
5917
6146
  rules: {
5918
6147
  validate: {
5919
6148
  isRequired: isRequired,
@@ -5944,19 +6173,16 @@ var Levels = function Levels(_ref) {
5944
6173
  }
5945
6174
  }
5946
6175
  },
5947
- disabled: fieldsDisabled,
5948
- isReadOnly: isReadOnly,
5949
- onChange: function onChange() {
5950
- triggerValidations(['lowerLevel.value'], getValues, trigger);
5951
- },
5952
- autoFocus: true
6176
+ size: "small",
6177
+ sx: styles$2.levelField,
6178
+ value: level || ''
5953
6179
  })
5954
6180
  })]
5955
6181
  }), jsxs(Grid, {
6182
+ alignItems: "flex-start",
5956
6183
  container: true,
5957
- spacing: 2,
5958
6184
  justifyItems: "flex-end",
5959
- alignItems: "flex-start",
6185
+ spacing: 2,
5960
6186
  children: [jsx(Grid, {
5961
6187
  size: {
5962
6188
  xs: 12,
@@ -5965,15 +6191,15 @@ var Levels = function Levels(_ref) {
5965
6191
  children: jsx(FormControlLabel, {
5966
6192
  control: jsx(Checkbox, {
5967
6193
  checked: levelInfoMode === 'BETW_SFC',
6194
+ color: "secondary",
6195
+ disabled: fieldsDisabled,
6196
+ name: "checkedF",
5968
6197
  onChange: function onChange() {
5969
6198
  getValues('level.unit') && trigger('level.unit');
5970
6199
  setValue('levelInfoMode', getValues('levelInfoMode') === 'BETW' ? 'BETW_SFC' : 'BETW', {
5971
6200
  shouldDirty: true
5972
6201
  });
5973
- },
5974
- name: "checkedF",
5975
- color: "secondary",
5976
- disabled: fieldsDisabled
6202
+ }
5977
6203
  }),
5978
6204
  "data-testid": "levels-SFC",
5979
6205
  label: "SFC"
@@ -5985,8 +6211,15 @@ var Levels = function Levels(_ref) {
5985
6211
  md: 3
5986
6212
  },
5987
6213
  children: jsx(ReactHookFormSelect, {
5988
- name: "lowerLevel.unit",
6214
+ defaultValue: getValues('level.unit') || 'FL',
6215
+ disabled: isDisabled,
6216
+ isReadOnly: isReadOnly,
5989
6217
  label: t('unit-label'),
6218
+ name: "lowerLevel.unit",
6219
+ onChange: function onChange() {
6220
+ triggerValidations(['lowerLevel.value', 'level.unit'], getValues, trigger);
6221
+ _onChange();
6222
+ },
5990
6223
  rules: {
5991
6224
  validate: {
5992
6225
  isRequired: isRequired,
@@ -6000,13 +6233,6 @@ var Levels = function Levels(_ref) {
6000
6233
  },
6001
6234
  size: "small",
6002
6235
  sx: styles$2.unit,
6003
- disabled: isDisabled,
6004
- isReadOnly: isReadOnly,
6005
- defaultValue: getValues('level.unit') || 'FL',
6006
- onChange: function onChange() {
6007
- triggerValidations(['lowerLevel.value', 'level.unit'], getValues, trigger);
6008
- _onChange();
6009
- },
6010
6236
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
6011
6237
  return jsx(MenuItem, {
6012
6238
  value: key,
@@ -6020,8 +6246,10 @@ var Levels = function Levels(_ref) {
6020
6246
  md: 6
6021
6247
  },
6022
6248
  children: jsx(ReactHookFormNumberField, {
6023
- name: "lowerLevel.value",
6249
+ disabled: isDisabled,
6250
+ isReadOnly: isReadOnly,
6024
6251
  label: t('levels-lower-level-label'),
6252
+ name: "lowerLevel.value",
6025
6253
  rules: {
6026
6254
  validate: {
6027
6255
  isRequired: isRequired,
@@ -6058,24 +6286,22 @@ var Levels = function Levels(_ref) {
6058
6286
  }
6059
6287
  }
6060
6288
  },
6061
- size: "small",
6062
- disabled: isDisabled,
6063
- isReadOnly: isReadOnly
6289
+ size: "small"
6064
6290
  })
6065
6291
  })]
6066
6292
  })]
6067
6293
  })]
6068
6294
  }) : null, jsx(RadioButtonAndLabel, {
6069
- value: "ABV",
6070
- label: t('above'),
6071
- disabled: fieldsDisabled,
6072
6295
  checked: levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV',
6073
- "data-testid": "levels-ABV"
6296
+ "data-testid": "levels-ABV",
6297
+ disabled: fieldsDisabled,
6298
+ label: t('above'),
6299
+ value: "ABV"
6074
6300
  }), levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV' ? jsxs(Grid, {
6301
+ alignItems: "flex-start",
6075
6302
  container: true,
6076
- spacing: 2,
6077
6303
  justifyItems: "flex-end",
6078
- alignItems: "flex-start",
6304
+ spacing: 2,
6079
6305
  children: [jsx(Grid, {
6080
6306
  size: {
6081
6307
  xs: 12,
@@ -6084,6 +6310,7 @@ var Levels = function Levels(_ref) {
6084
6310
  children: jsx(FormControlLabel, {
6085
6311
  control: jsx(Checkbox, {
6086
6312
  checked: levelInfoMode === 'TOPS_ABV',
6313
+ disabled: isDisabled || isSigmetTS,
6087
6314
  onChange: function onChange() {
6088
6315
  if (isSigmetTS) {
6089
6316
  return;
@@ -6091,11 +6318,10 @@ var Levels = function Levels(_ref) {
6091
6318
  setValue('levelInfoMode', levelInfoMode === 'ABV' ? 'TOPS_ABV' : 'ABV', {
6092
6319
  shouldDirty: true
6093
6320
  });
6094
- },
6095
- disabled: isDisabled || isSigmetTS
6321
+ }
6096
6322
  }),
6097
- label: t('levels-tops-label'),
6098
- "data-testid": "levels-TOPS_ABV"
6323
+ "data-testid": "levels-TOPS_ABV",
6324
+ label: t('levels-tops-label')
6099
6325
  })
6100
6326
  }), jsx(Grid, {
6101
6327
  size: {
@@ -6103,8 +6329,15 @@ var Levels = function Levels(_ref) {
6103
6329
  md: 3
6104
6330
  },
6105
6331
  children: jsx(ReactHookFormSelect, {
6106
- name: "level.unit",
6332
+ defaultValue: 'FL',
6333
+ disabled: isDisabled,
6334
+ isReadOnly: isReadOnly,
6107
6335
  label: t('unit-label'),
6336
+ name: "level.unit",
6337
+ onChange: function onChange() {
6338
+ triggerValidations(['level.value'], getValues, trigger);
6339
+ _onChange();
6340
+ },
6108
6341
  rules: {
6109
6342
  validate: {
6110
6343
  isRequired: isRequired
@@ -6112,13 +6345,6 @@ var Levels = function Levels(_ref) {
6112
6345
  },
6113
6346
  size: "small",
6114
6347
  sx: styles$2.unit,
6115
- disabled: isDisabled,
6116
- isReadOnly: isReadOnly,
6117
- defaultValue: 'FL',
6118
- onChange: function onChange() {
6119
- triggerValidations(['level.value'], getValues, trigger);
6120
- _onChange();
6121
- },
6122
6348
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
6123
6349
  return jsx(MenuItem, {
6124
6350
  value: key,
@@ -6132,8 +6358,11 @@ var Levels = function Levels(_ref) {
6132
6358
  md: 6
6133
6359
  },
6134
6360
  children: jsx(ReactHookFormNumberField, {
6135
- name: "level.value",
6361
+ autoFocus: true,
6362
+ disabled: isDisabled,
6363
+ isReadOnly: isReadOnly,
6136
6364
  label: t('level'),
6365
+ name: "level.value",
6137
6366
  rules: {
6138
6367
  validate: {
6139
6368
  isRequired: isRequired,
@@ -6164,10 +6393,7 @@ var Levels = function Levels(_ref) {
6164
6393
  }
6165
6394
  }
6166
6395
  },
6167
- size: "small",
6168
- disabled: isDisabled,
6169
- isReadOnly: isReadOnly,
6170
- autoFocus: true
6396
+ size: "small"
6171
6397
  })
6172
6398
  })]
6173
6399
  }) : null]
@@ -6205,27 +6431,27 @@ var ObservationForecast = function ObservationForecast(_ref) {
6205
6431
  }
6206
6432
  },
6207
6433
  children: jsxs(ReactHookFormRadioGroup, {
6208
- name: "isObservationOrForecast",
6209
6434
  disabled: fieldsDisabled,
6435
+ isReadOnly: isReadOnly,
6436
+ name: "isObservationOrForecast",
6437
+ onChange: function onChange() {
6438
+ triggerValidations(['observationOrForecastTime'], getValues, trigger);
6439
+ },
6210
6440
  rules: {
6211
6441
  validate: {
6212
6442
  isRequired: isRequired
6213
6443
  }
6214
6444
  },
6215
- onChange: function onChange() {
6216
- triggerValidations(['observationOrForecastTime'], getValues, trigger);
6217
- },
6218
- isReadOnly: isReadOnly,
6219
6445
  children: [(!isReadOnly || watch('isObservationOrForecast') === 'OBS') && jsx(RadioButtonAndLabel, {
6220
- value: "OBS",
6221
- label: t('observation-label'),
6446
+ "data-testid": "isObservationOrForecast-OBS",
6222
6447
  disabled: fieldsDisabled,
6223
- "data-testid": "isObservationOrForecast-OBS"
6448
+ label: t('observation-label'),
6449
+ value: "OBS"
6224
6450
  }), (!isReadOnly || watch('isObservationOrForecast') === 'FCST') && jsx(RadioButtonAndLabel, {
6225
- value: "FCST",
6226
- label: t('forecast-label'),
6451
+ "data-testid": "isObservationOrForecast-FCST",
6227
6452
  disabled: fieldsDisabled,
6228
- "data-testid": "isObservationOrForecast-FCST"
6453
+ label: t('forecast-label'),
6454
+ value: "FCST"
6229
6455
  })]
6230
6456
  })
6231
6457
  });
@@ -6255,10 +6481,17 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
6255
6481
  return !isReadOnly || watch('observationOrForecastTime') !== null ? jsx(ProductFormFieldLayout, {
6256
6482
  title: t('at'),
6257
6483
  children: jsx(ReactHookFormDateTime, {
6258
- disablePast: watch('isObservationOrForecast') === 'FCST',
6484
+ "data-testid": "obs-fcst-time",
6259
6485
  disableFuture: watch('isObservationOrForecast') === 'OBS',
6260
- name: "observationOrForecastTime",
6486
+ disablePast: watch('isObservationOrForecast') === 'FCST',
6487
+ disabled: fieldsDisabled,
6488
+ helperText: helperText,
6489
+ isReadOnly: isReadOnly,
6261
6490
  label: label,
6491
+ name: "observationOrForecastTime",
6492
+ onChange: function onChange() {
6493
+ return _onChange();
6494
+ },
6262
6495
  rules: {
6263
6496
  validate: {
6264
6497
  isValidDate: dateUtils.isValidIsoDateString,
@@ -6270,14 +6503,7 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
6270
6503
  }
6271
6504
  }
6272
6505
  },
6273
- disabled: fieldsDisabled,
6274
- isReadOnly: isReadOnly,
6275
- helperText: helperText,
6276
- onChange: function onChange() {
6277
- return _onChange();
6278
- },
6279
- sx: styles$2.helperText,
6280
- "data-testid": "obs-fcst-time"
6506
+ sx: styles$2.helperText
6281
6507
  })
6282
6508
  }) : null;
6283
6509
  };
@@ -6313,23 +6539,19 @@ var Phenomenon = function Phenomenon(_ref) {
6313
6539
  handleSinglePhenomenaSelection();
6314
6540
  }
6315
6541
  return jsx(ProductFormFieldLayout, {
6316
- title: t('phenomenon-title'),
6317
6542
  sx: {
6318
6543
  '.MuiFormHelperText-root.Mui-error': {
6319
6544
  marginBottom: '-22px',
6320
6545
  marginTop: '2px'
6321
6546
  }
6322
6547
  },
6548
+ title: t('phenomenon-title'),
6323
6549
  children: jsx(ReactHookFormSelect, {
6324
- name: "phenomenon",
6325
- label: label,
6326
- rules: {
6327
- required: true
6328
- },
6550
+ "data-testid": "phenomenon",
6329
6551
  disabled: fieldsDisabled,
6330
6552
  isReadOnly: isReadOnly,
6331
- size: "small",
6332
- "data-testid": "phenomenon",
6553
+ label: label,
6554
+ name: "phenomenon",
6333
6555
  onChange: function onChange() {
6334
6556
  if (getValues('movementType') === 'NO_VA_EXP') {
6335
6557
  setValue('movementType', null);
@@ -6343,6 +6565,10 @@ var Phenomenon = function Phenomenon(_ref) {
6343
6565
  triggerValidations(['validDateStart', 'validDateEnd'], getValues, trigger);
6344
6566
  _onChange();
6345
6567
  },
6568
+ rules: {
6569
+ required: true
6570
+ },
6571
+ size: "small",
6346
6572
  children: phenomenaList.map(function (phenomenon) {
6347
6573
  return jsx(MenuItem, {
6348
6574
  value: phenomenon.code,
@@ -6425,13 +6651,16 @@ var Progress = function Progress(_ref) {
6425
6651
  var isRequired = function isRequired(value) {
6426
6652
  return isShortTest() || isRequiredField(value);
6427
6653
  };
6654
+ var shortTest = isShortTest();
6655
+ var combinedDisabled = shortTest || drawToolsDisabled;
6656
+ var disabledTooltip = !shortTest && drawToolsDisabled ? t('geometry-drawing-disabled') : undefined;
6428
6657
  var movementType = watch('movementType');
6429
6658
  var getFIRValue = function getFIRValue() {
6430
6659
  return getValues('locationIndicatorATSR');
6431
6660
  };
6432
6661
  // Get allowed movement units based on selected FIR - if no FIR selected, allow all units
6433
6662
  var allowedMovementUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'movement_unit', MovementUnit);
6434
- React__default.useEffect(function () {
6663
+ React.useEffect(function () {
6435
6664
  if (movementType !== 'MOVEMENT') {
6436
6665
  unregister('movementDirection');
6437
6666
  unregister('movementSpeed');
@@ -6454,24 +6683,19 @@ var Progress = function Progress(_ref) {
6454
6683
  var drawnGeometry = geoJSON == null || (_geoJSON$features$ = geoJSON.features[0]) == null ? void 0 : _geoJSON$features$.geometry;
6455
6684
  var interceptionGeometry = geoJSONIntersection == null || (_geoJSONIntersection$ = geoJSONIntersection.features[0]) == null ? void 0 : _geoJSONIntersection$.geometry;
6456
6685
  // Total points in the user drawn polygon
6457
- var totalDrawnPoints = drawnGeometry && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
6686
+ var totalDrawnPoints = drawnGeometry != null && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
6458
6687
  // Total points in the intersection polygon
6459
- var intersectingPolygonPointsTotal = interceptionGeometry && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
6688
+ var intersectingPolygonPointsTotal = interceptionGeometry != null && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
6460
6689
  var showMaxFeaturePointsWarning = intersectionPointCount > 7 && hasMaxFeaturePoints(geoJSONIntersection, maxPoints) && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6461
6690
  var showMoreThan6PointsWarning = totalDrawnPoints > 7 && intersectionPointCount < 1 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6462
6691
  var showIntersectionAbove6PointsWarning = intersectingPolygonPointsTotal > 7 && intersectionPointCount > 1 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6463
6692
  return jsxs(ProductFormFieldLayout, {
6464
- title: t('progress'),
6465
6693
  sx: styles$2.containerItem,
6694
+ title: t('progress'),
6466
6695
  children: [jsxs(ReactHookFormRadioGroup, {
6467
- name: "movementType",
6468
6696
  "data-testid": "movementType-group",
6469
- rules: {
6470
- validate: {
6471
- isRequired: isRequired
6472
- }
6473
- },
6474
6697
  isReadOnly: isReadOnly,
6698
+ name: "movementType",
6475
6699
  onChange: function onChange() {
6476
6700
  var deleteTool = tools == null ? void 0 : tools.find(function (tool) {
6477
6701
  return tool.value === 'DELETE';
@@ -6480,33 +6704,46 @@ var Progress = function Progress(_ref) {
6480
6704
  onChangeTool(deleteTool);
6481
6705
  }
6482
6706
  },
6483
- children: [isVolcanicCloud && jsx(RadioButtonAndLabel, {
6484
- value: "NO_VA_EXP",
6485
- 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",
6486
6714
  disabled: fieldsDisabled,
6487
- "data-testid": "movementType-NO_VA_EXP"
6715
+ label: t('progress-radio-button-label-no-va-exp'),
6716
+ value: "NO_VA_EXP"
6488
6717
  }), jsxs(Fragment, {
6489
6718
  children: [jsx(RadioButtonAndLabel, {
6490
- value: "STATIONARY",
6491
- label: t('progress-radio-button-label-stationary'),
6719
+ "data-testid": "movementType-STATIONARY",
6492
6720
  disabled: fieldsDisabled,
6493
- "data-testid": "movementType-STATIONARY"
6721
+ label: t('progress-radio-button-label-stationary'),
6722
+ value: "STATIONARY"
6494
6723
  }), jsx(RadioButtonAndLabel, {
6495
- value: "MOVEMENT",
6724
+ "data-testid": "movementType-MOVEMENT",
6725
+ disabled: fieldsDisabled,
6496
6726
  label: t('progress-radio-button-label-movement'),
6727
+ value: "MOVEMENT"
6728
+ }), !!isSigmet && !!isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
6729
+ "data-testid": "movementType-FORECAST_POSITION",
6497
6730
  disabled: fieldsDisabled,
6498
- "data-testid": "movementType-MOVEMENT"
6499
- }), isSigmet && isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
6500
- value: "FORECAST_POSITION",
6501
6731
  label: t('progress-radio-button-label-end-potision'),
6502
- disabled: fieldsDisabled,
6503
- "data-testid": "movementType-FORECAST_POSITION"
6732
+ value: "FORECAST_POSITION"
6504
6733
  })]
6505
6734
  }), movementType === 'MOVEMENT' && !isShortTestOrRdoact && jsxs(Fragment, {
6506
6735
  children: [jsx(Grid, {
6507
6736
  children: jsx(ReactHookFormSelect, {
6508
- name: "movementDirection",
6737
+ autoFocus: true,
6738
+ "data-testid": "movement-movementDirection",
6739
+ disabled: isDisabled,
6740
+ isReadOnly: isReadOnly,
6509
6741
  label: t('progress-movement-direction-label'),
6742
+ name: "movementDirection",
6743
+ onChange: function onChange(event) {
6744
+ event.stopPropagation();
6745
+ _onChange();
6746
+ },
6510
6747
  rules: {
6511
6748
  validate: {
6512
6749
  isRequired: isRequired
@@ -6514,14 +6751,6 @@ var Progress = function Progress(_ref) {
6514
6751
  },
6515
6752
  size: "small",
6516
6753
  sx: styles$2.movement,
6517
- disabled: isDisabled,
6518
- isReadOnly: isReadOnly,
6519
- "data-testid": "movement-movementDirection",
6520
- onChange: function onChange(event) {
6521
- event.stopPropagation();
6522
- _onChange();
6523
- },
6524
- autoFocus: true,
6525
6754
  children: Object.keys(Direction).map(function (key) {
6526
6755
  return jsx(MenuItem, {
6527
6756
  value: key,
@@ -6534,8 +6763,17 @@ var Progress = function Progress(_ref) {
6534
6763
  children: [jsx(Grid, {
6535
6764
  size: 5,
6536
6765
  children: jsx(ReactHookFormSelect, {
6537
- name: "movementUnit",
6766
+ "data-testid": "movement-movementUnit",
6767
+ defaultValue: 'KT',
6768
+ disabled: isDisabled,
6769
+ isReadOnly: isReadOnly,
6538
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
+ },
6539
6777
  rules: {
6540
6778
  validate: {
6541
6779
  isRequired: isRequired
@@ -6543,15 +6781,6 @@ var Progress = function Progress(_ref) {
6543
6781
  },
6544
6782
  size: "small",
6545
6783
  sx: styles$2.unit,
6546
- disabled: isDisabled,
6547
- isReadOnly: isReadOnly,
6548
- defaultValue: 'KT',
6549
- "data-testid": "movement-movementUnit",
6550
- onChange: function onChange(event) {
6551
- event.stopPropagation();
6552
- triggerValidations(['movementSpeed'], getValues, trigger);
6553
- _onChange();
6554
- },
6555
6784
  children: Object.keys(allowedMovementUnitsForFir).map(function (key) {
6556
6785
  return jsx(MenuItem, {
6557
6786
  value: key,
@@ -6562,8 +6791,14 @@ var Progress = function Progress(_ref) {
6562
6791
  }), jsx(Grid, {
6563
6792
  size: 7,
6564
6793
  children: jsx(ReactHookFormNumberField, {
6565
- name: "movementSpeed",
6794
+ "data-testid": "movement-movementSpeed",
6795
+ disabled: isDisabled,
6796
+ isReadOnly: isReadOnly,
6566
6797
  label: t('progress-movement-speed-label'),
6798
+ name: "movementSpeed",
6799
+ onChange: function onChange(event) {
6800
+ return event == null ? void 0 : event.stopPropagation();
6801
+ },
6567
6802
  rules: {
6568
6803
  validate: {
6569
6804
  isRequired: isRequired,
@@ -6594,53 +6829,48 @@ var Progress = function Progress(_ref) {
6594
6829
  }
6595
6830
  }
6596
6831
  },
6597
- size: "small",
6598
- disabled: isDisabled,
6599
- isReadOnly: isReadOnly,
6600
- "data-testid": "movement-movementSpeed",
6601
- onChange: function onChange(event) {
6602
- return event && event.stopPropagation();
6603
- }
6832
+ size: "small"
6604
6833
  })
6605
6834
  })]
6606
6835
  })]
6607
- }), isSigmet && !isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
6608
- value: "FORECAST_POSITION",
6609
- label: t('progress-radio-button-label-end-potision'),
6836
+ }), !!isSigmet && !isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
6837
+ "data-testid": "movementType-FORECAST_POSITION",
6610
6838
  disabled: isDisabled,
6611
- "data-testid": "movementType-FORECAST_POSITION"
6839
+ label: t('progress-radio-button-label-end-potision'),
6840
+ value: "FORECAST_POSITION"
6612
6841
  })]
6613
- }), isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(Grid, {
6842
+ }), !!isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(Grid, {
6614
6843
  "data-testid": "endGeometry",
6615
- sx: styles$2.drawSectionProgress,
6616
6844
  size: 12,
6845
+ sx: styles$2.drawSectionProgress,
6617
6846
  children: [!isReadOnly && jsxs(Fragment, {
6618
6847
  children: [jsx(DrawTools, {
6619
- "data-testid": "endGeometry-drawTools",
6620
- tools: tools,
6621
6848
  activeTool: activeTool,
6849
+ "data-testid": "endGeometry-drawTools",
6850
+ disabledTooltip: disabledTooltip,
6851
+ isDisabled: combinedDisabled,
6622
6852
  onChangeTool: onChangeTool,
6623
- isDisabled: drawToolsDisabled
6624
- }), activeTool && jsx(FormHelperText, {
6625
- variant: "filled",
6853
+ tools: tools
6854
+ }), !!activeTool && jsx(FormHelperText, {
6626
6855
  sx: styles$2.quitDrawModeMessage,
6856
+ variant: "filled",
6627
6857
  children: t('geometry-exit-draw-mode-message')
6628
6858
  }), !!errors.endGeometry && jsx(FormHelperText, {
6629
6859
  error: true,
6630
6860
  variant: "filled",
6631
6861
  children: errors.endGeometry.message
6632
6862
  }), /* non-blocking warnings */
6633
- showMaxFeaturePointsWarning && jsx(FormHelperText, {
6863
+ !!showMaxFeaturePointsWarning && jsx(FormHelperText, {
6634
6864
  variant: "filled",
6635
6865
  children: t('geometry-max-feature-points-message')
6636
6866
  }), /* non-blocking warnings */
6637
- showMoreThan6PointsWarning && jsx(FormHelperText, {
6867
+ !!showMoreThan6PointsWarning && jsx(FormHelperText, {
6638
6868
  variant: "filled",
6639
6869
  children: t('progress-more-than-6-points-message', {
6640
6870
  totalDrawnPoints: totalDrawnPoints
6641
6871
  })
6642
6872
  }), /* non-blocking warnings */
6643
- showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
6873
+ !!showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
6644
6874
  variant: "filled",
6645
6875
  children: t('progress-intersection-above-6-points-message', {
6646
6876
  intersectingPolygonPointsTotal: intersectingPolygonPointsTotal
@@ -6743,17 +6973,17 @@ var SelectFIR = function SelectFIR(_ref) {
6743
6973
  return jsxs(ProductFormFieldLayout, {
6744
6974
  title: t('select-fir-title'),
6745
6975
  children: [jsx(ReactHookFormSelect, {
6746
- name: "locationIndicatorATSR",
6976
+ defaultValue: locationIndicatorATSR,
6977
+ disabled: isDisabled,
6978
+ isReadOnly: isReadOnly,
6747
6979
  label: isReadOnly ? 'FIR' : t('select-fir-label'),
6980
+ name: "locationIndicatorATSR",
6981
+ onChange: onChangeLocationATSR,
6748
6982
  rules: {
6749
6983
  validate: {
6750
6984
  isRequired: isRequired
6751
6985
  }
6752
6986
  },
6753
- disabled: isDisabled,
6754
- isReadOnly: isReadOnly,
6755
- defaultValue: locationIndicatorATSR,
6756
- onChange: onChangeLocationATSR,
6757
6987
  size: "small",
6758
6988
  children: optionsFIR.map(function (fir) {
6759
6989
  return jsx(MenuItem, {
@@ -6762,21 +6992,21 @@ var SelectFIR = function SelectFIR(_ref) {
6762
6992
  }, fir.ATSR + "-" + fir.FIR);
6763
6993
  })
6764
6994
  }), jsx(ReactHookFormHiddenInput, {
6765
- name: "locationIndicatorATSU",
6995
+ "data-testid": "locationIndicatorATSU",
6766
6996
  defaultValue: locationIndicatorATSU,
6767
- "data-testid": "locationIndicatorATSU"
6997
+ name: "locationIndicatorATSU"
6768
6998
  }), jsx(ReactHookFormHiddenInput, {
6769
- name: "locationIndicatorMWO",
6999
+ "data-testid": "locationIndicatorMWO",
6770
7000
  defaultValue: locationIndicatorMWO,
6771
- "data-testid": "locationIndicatorMWO"
7001
+ name: "locationIndicatorMWO"
6772
7002
  }), jsx(ReactHookFormHiddenInput, {
6773
- name: "firName",
7003
+ "data-testid": "firName",
6774
7004
  defaultValue: firName,
6775
- "data-testid": "firName"
7005
+ name: "firName"
6776
7006
  }), jsx(ReactHookFormHiddenInput, {
6777
- name: "firGeometry",
7007
+ "data-testid": "firGeometry",
6778
7008
  defaultValue: firGeometry,
6779
- "data-testid": "firGeometry"
7009
+ name: "firGeometry"
6780
7010
  })]
6781
7011
  });
6782
7012
  };
@@ -6806,6 +7036,9 @@ var StartGeometry = function StartGeometry(_ref) {
6806
7036
  var getFIRValue = function getFIRValue() {
6807
7037
  return getValues('locationIndicatorATSR');
6808
7038
  };
7039
+ var shortTest = isShortTest();
7040
+ var combinedDisabled = shortTest || isDisabled;
7041
+ var disabledTooltip = !shortTest && isDisabled ? t('geometry-drawing-disabled') : undefined;
6809
7042
  // Max points the FIR allows for a polygon
6810
7043
  var maxPoints = getMaxPolygonPoints(getFIRValue(), productConfig);
6811
7044
  // Intersections with FIR
@@ -6813,54 +7046,54 @@ var StartGeometry = function StartGeometry(_ref) {
6813
7046
  var drawnGeometry = geoJSON == null || (_geoJSON$features$ = geoJSON.features[0]) == null ? void 0 : _geoJSON$features$.geometry;
6814
7047
  var interceptionGeometry = geoJSONIntersection == null || (_geoJSONIntersection$ = geoJSONIntersection.features[0]) == null ? void 0 : _geoJSONIntersection$.geometry;
6815
7048
  // Total points in the user drawn polygon
6816
- var totalDrawnPoints = drawnGeometry && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
7049
+ var totalDrawnPoints = drawnGeometry != null && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
6817
7050
  // Total points in the intersection polygon
6818
- var intersectingPolygonPointsTotal = interceptionGeometry && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
7051
+ var intersectingPolygonPointsTotal = interceptionGeometry != null && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
6819
7052
  var showMaxFeaturePointsWarning = intersectionPointCount > 7 && hasMaxFeaturePoints(geoJSONIntersection, maxPoints) && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6820
7053
  var showMoreThan6PointsWarning = totalDrawnPoints > 7 && intersectionPointCount < 1 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6821
7054
  var showIntersectionAbove6PointsWarning = intersectingPolygonPointsTotal > 7 && intersectionPointCount > 1 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6822
7055
  return !isReadOnly ? jsxs(ProductFormFieldLayout, {
6823
- title: t('start-position'),
6824
- sx: styles$2.drawSection,
6825
7056
  "data-testid": "startGeometry",
7057
+ sx: styles$2.drawSection,
7058
+ title: t('start-position'),
6826
7059
  children: [jsx(DrawTools, {
6827
7060
  activeTool: activeTool,
6828
- tools: tools,
7061
+ disabledTooltip: disabledTooltip,
7062
+ isDisabled: combinedDisabled,
6829
7063
  onChangeTool: onChangeTool,
6830
- isDisabled: isShortTest() || isDisabled
6831
- }), activeTool && jsx(FormHelperText, {
6832
- variant: "filled",
7064
+ tools: tools
7065
+ }), !!activeTool && jsx(FormHelperText, {
6833
7066
  sx: styles$2.quitDrawModeMessage,
7067
+ variant: "filled",
6834
7068
  children: t('geometry-exit-draw-mode-message')
6835
7069
  }), !!errors.startGeometry && jsx(FormHelperText, {
6836
7070
  error: true,
6837
7071
  variant: "filled",
6838
7072
  children: errors.startGeometry.message
6839
7073
  }), /* non-blocking warnings */
6840
- showMaxFeaturePointsWarning && jsx(FormHelperText, {
7074
+ !!showMaxFeaturePointsWarning && jsx(FormHelperText, {
6841
7075
  variant: "filled",
6842
7076
  children: t('geometry-max-feature-points-message')
6843
7077
  }), /* non-blocking warnings */
6844
- showMoreThan6PointsWarning && jsx(FormHelperText, {
7078
+ !!showMoreThan6PointsWarning && jsx(FormHelperText, {
6845
7079
  variant: "filled",
6846
7080
  children: t('geometry-more-than-6-points-message', {
6847
7081
  totalDrawnPoints: totalDrawnPoints
6848
7082
  })
6849
7083
  }), /* non-blocking warnings */
6850
- showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
7084
+ !!showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
6851
7085
  variant: "filled",
6852
7086
  children: t('geometry-intersection-above-6-points-message', {
6853
7087
  intersectingPolygonPointsTotal: intersectingPolygonPointsTotal
6854
7088
  })
6855
- }), hasMulitpleIntersections(geoJSONIntersection) && !activeTool && !errors.startGeometry && !isFir(geoJSON) && jsx(FormHelperText, {
6856
- variant: "filled",
6857
- children: t('geometry-multi-intersections-message')
6858
7089
  }), jsx(ReactHookFormHiddenInput, {
6859
7090
  name: "startGeometry",
6860
7091
  rules: {
6861
7092
  validate: {
6862
- maximumOneDrawing: function maximumOneDrawing(value) {
6863
- return isMaximumOneDrawing(value) || t('geometry-only-one-start-position-drawing');
7093
+ maximumOneDrawing: function maximumOneDrawing() {
7094
+ var intersection = watch('startGeometryIntersect');
7095
+ var result = isMaximumOneDrawing(intersection);
7096
+ return result || t('geometry-only-one-start-position-drawing');
6864
7097
  },
6865
7098
  intersectWithFIR: function intersectWithFIR(value) {
6866
7099
  return hasIntersectionWithFIR(value, watch('startGeometryIntersect')) || t('geometry-no-intersection-message');
@@ -6899,19 +7132,19 @@ var Type = function Type(_ref) {
6899
7132
  return jsx(ProductFormFieldLayout, {
6900
7133
  title: t('type-title'),
6901
7134
  children: jsx(ReactHookFormSelect, {
6902
- name: "type",
6903
- label: label,
6904
- disabled: isDisabled,
6905
- isReadOnly: isReadOnly,
6906
- size: "small",
7135
+ autoFocus: true,
6907
7136
  "data-testid": "type",
6908
7137
  defaultValue: "NORMAL",
7138
+ disabled: isDisabled,
7139
+ isReadOnly: isReadOnly,
7140
+ label: label,
7141
+ name: "type",
6909
7142
  onChange: function onChange() {
6910
7143
  onTypeChange();
6911
7144
  triggerValidations(['validDateStart', 'validDateEnd'], getValues, trigger);
6912
7145
  _onChange();
6913
7146
  },
6914
- autoFocus: true,
7147
+ size: "small",
6915
7148
  children: Object.keys(messageType).map(function (key) {
6916
7149
  return jsx(MenuItem, {
6917
7150
  value: key,
@@ -6960,7 +7193,7 @@ var ValidFrom = function ValidFrom(_ref) {
6960
7193
  isRequired = _useDraftFormHelpers.isRequired;
6961
7194
  var label = getFieldLabel(t, t('date-and-time'), isReadOnly);
6962
7195
  // Only auto-sync to now when amending an already-active SIGMET
6963
- React__default.useEffect(function () {
7196
+ React.useEffect(function () {
6964
7197
  if (!lockBecauseActive) {
6965
7198
  return;
6966
7199
  }
@@ -7001,19 +7234,19 @@ var ValidFrom = function ValidFrom(_ref) {
7001
7234
  return jsx(ProductFormFieldLayout, {
7002
7235
  title: t('valid-from'),
7003
7236
  children: jsx(ReactHookFormDateTime, {
7237
+ "data-testid": "valid-from",
7238
+ defaultNullValue: getDefaultValidFromValue(productConfig),
7004
7239
  disablePast: true,
7005
- name: "validDateStart",
7240
+ disabled: isDisabled || lockBecauseActive,
7241
+ isReadOnly: isReadOnly,
7006
7242
  label: label,
7007
- defaultNullValue: getDefaultValidFromValue(productConfig),
7008
- rules: rules,
7243
+ name: "validDateStart",
7009
7244
  onChange: function onChange() {
7010
7245
  onUserChange == null || onUserChange();
7011
7246
  triggerValidations(['validDateEnd', 'observationOrForecastTime'], getValues, trigger);
7012
7247
  _onChange();
7013
7248
  },
7014
- disabled: isDisabled || lockBecauseActive,
7015
- isReadOnly: isReadOnly,
7016
- "data-testid": "valid-from",
7249
+ rules: rules,
7017
7250
  sx: Object.assign({}, styles$2.helperText, {
7018
7251
  '.MuiFormHelperText-root.Mui-error': {
7019
7252
  marginBottom: '-16px'
@@ -7054,13 +7287,13 @@ var ValidUntil = function ValidUntil(_ref) {
7054
7287
  isRequired = _useDraftFormHelpers.isRequired;
7055
7288
  var dateAndTime = t('date-and-time');
7056
7289
  var label = getFieldLabel(t, dateAndTime, isReadOnly);
7057
- 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'))),
7058
7291
  defaultValidUntilValue = _React$useState[0],
7059
7292
  setDefaultValidUntilValue = _React$useState[1];
7060
7293
  var phenomenon = watch('phenomenon');
7061
7294
  var locationIndicatorATSR = watch('locationIndicatorATSR');
7062
7295
  var validFrom = watch('validDateStart');
7063
- React__default.useEffect(function () {
7296
+ React.useEffect(function () {
7064
7297
  if (hasUserChangedTime) {
7065
7298
  return;
7066
7299
  }
@@ -7076,10 +7309,18 @@ var ValidUntil = function ValidUntil(_ref) {
7076
7309
  return jsx(ProductFormFieldLayout, {
7077
7310
  title: t('valid-until'),
7078
7311
  children: jsx(ReactHookFormDateTime, {
7312
+ "data-testid": "valid-until",
7313
+ defaultNullValue: defaultValidUntilValue,
7079
7314
  disablePast: true,
7080
- name: "validDateEnd",
7315
+ disabled: isDisabled,
7316
+ isReadOnly: isReadOnly,
7081
7317
  label: label,
7082
- 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
+ },
7083
7324
  rules: {
7084
7325
  validate: {
7085
7326
  isRequired: isRequired,
@@ -7094,14 +7335,6 @@ var ValidUntil = function ValidUntil(_ref) {
7094
7335
  }
7095
7336
  }
7096
7337
  },
7097
- disabled: isDisabled,
7098
- isReadOnly: isReadOnly,
7099
- onChange: function onChange() {
7100
- onUserChange == null || onUserChange(); // Track manual change
7101
- triggerValidations(['validDateStart', 'observationOrForecastTime'], getValues, trigger);
7102
- _onChange();
7103
- },
7104
- "data-testid": "valid-until",
7105
7338
  sx: Object.assign({}, styles$2.helperText, {
7106
7339
  '.MuiFormHelperText-root.Mui-error': {
7107
7340
  marginBottom: '-16px'
@@ -7137,39 +7370,51 @@ var VolcanicFields = function VolcanicFields(_ref) {
7137
7370
  }
7138
7371
  },
7139
7372
  children: [(!isReadOnly || !!watch('vaSigmetVolcanoName')) && jsx(Grid, {
7140
- sx: styles$2.volcanicField,
7141
7373
  size: 12,
7374
+ sx: styles$2.volcanicField,
7142
7375
  children: jsx(ReactHookFormTextField, {
7143
- name: "vaSigmetVolcanoName",
7376
+ disabled: isDisabled,
7377
+ helperText: helperText,
7378
+ isReadOnly: isReadOnly,
7144
7379
  label: t('volcano-name'),
7380
+ name: "vaSigmetVolcanoName",
7145
7381
  rules: {
7146
7382
  required: false
7147
7383
  },
7148
- disabled: isDisabled,
7149
- helperText: helperText,
7150
- upperCase: true,
7151
- isReadOnly: isReadOnly,
7152
- size: "small"
7384
+ size: "small",
7385
+ upperCase: true
7153
7386
  })
7154
7387
  }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && jsx(Grid, {
7155
7388
  size: 6,
7156
7389
  children: degreesAndMinutes ? jsx(DegreesMinutesField, {
7157
- name: "vaSigmetVolcanoCoordinates.latitude",
7158
- label: t('latitude-degrees-and-minutes'),
7159
7390
  disabled: isDisabled,
7160
7391
  isReadOnly: isReadOnly,
7392
+ label: t('latitude-degrees-and-minutes'),
7393
+ name: "vaSigmetVolcanoCoordinates.latitude",
7161
7394
  t: t
7162
7395
  }) : jsx(ReactHookFormNumberField, {
7163
- name: "vaSigmetVolcanoCoordinates.latitude",
7164
- label: t('latitude'),
7165
- inputMode: "decimal",
7166
- size: "small",
7167
- sx: styles$2.latitude,
7168
7396
  disabled: isDisabled,
7397
+ inputMode: "decimal",
7169
7398
  isReadOnly: isReadOnly,
7170
- onChange: function onChange() {
7171
- return trigger('vaSigmetVolcanoCoordinates.longitude');
7172
- },
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
+ }(),
7173
7418
  rules: {
7174
7419
  required: true,
7175
7420
  validate: {
@@ -7178,28 +7423,42 @@ var VolcanicFields = function VolcanicFields(_ref) {
7178
7423
  return isNonOrBothCoordinates(value, getValues('vaSigmetVolcanoCoordinates.longitude'));
7179
7424
  }
7180
7425
  }
7181
- }
7426
+ },
7427
+ size: "small",
7428
+ sx: styles$2.latitude
7182
7429
  })
7183
7430
  }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && jsx(Grid, {
7184
7431
  size: 6,
7185
7432
  children: degreesAndMinutes ? jsx(DegreesMinutesField, {
7186
- name: "vaSigmetVolcanoCoordinates.longitude",
7187
- label: t('longitude-degrees-and-minutes'),
7188
7433
  disabled: isDisabled,
7189
- isReadOnly: isReadOnly,
7190
7434
  isLongitude: true,
7435
+ isReadOnly: isReadOnly,
7436
+ label: t('longitude-degrees-and-minutes'),
7437
+ name: "vaSigmetVolcanoCoordinates.longitude",
7191
7438
  t: t
7192
7439
  }) : jsx(ReactHookFormNumberField, {
7193
- name: "vaSigmetVolcanoCoordinates.longitude",
7194
- label: t('longitude'),
7195
- inputMode: "decimal",
7196
- size: "small",
7197
- sx: styles$2.latitude,
7198
7440
  disabled: isDisabled,
7441
+ inputMode: "decimal",
7199
7442
  isReadOnly: isReadOnly,
7200
- onChange: function onChange() {
7201
- return trigger('vaSigmetVolcanoCoordinates.latitude');
7202
- },
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
+ }(),
7203
7462
  rules: {
7204
7463
  required: true,
7205
7464
  validate: {
@@ -7208,7 +7467,9 @@ var VolcanicFields = function VolcanicFields(_ref) {
7208
7467
  return isNonOrBothCoordinates(value, getValues('vaSigmetVolcanoCoordinates.latitude'));
7209
7468
  }
7210
7469
  }
7211
- }
7470
+ },
7471
+ size: "small",
7472
+ sx: styles$2.latitude
7212
7473
  })
7213
7474
  })]
7214
7475
  })
@@ -7278,13 +7539,15 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7278
7539
  justifyContent: "flex-start",
7279
7540
  size: 8,
7280
7541
  children: [jsx(Grid, {
7281
- sx: styles$2.surfaceVisibility,
7282
7542
  size: 12,
7543
+ sx: styles$2.surfaceVisibility,
7283
7544
  children: jsx(ReactHookFormNumberField, {
7284
- name: "visibilityValue",
7285
7545
  "data-testid": "surfaceVisibility-visibilityValue",
7286
- label: visibilityLabel,
7546
+ disabled: isDisabled,
7287
7547
  helperText: t('surface-visibility-helper-text'),
7548
+ isReadOnly: isReadOnly,
7549
+ label: visibilityLabel,
7550
+ name: "visibilityValue",
7288
7551
  rules: {
7289
7552
  validate: {
7290
7553
  isRequired: isRequired,
@@ -7310,8 +7573,6 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7310
7573
  }
7311
7574
  },
7312
7575
  size: "small",
7313
- disabled: isDisabled,
7314
- isReadOnly: isReadOnly,
7315
7576
  sx: {
7316
7577
  ' .MuiFormHelperText-root': {
7317
7578
  lineHeight: '1.33em'
@@ -7324,20 +7585,20 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7324
7585
  marginTop: -2
7325
7586
  },
7326
7587
  children: jsx(ReactHookFormSelect, {
7327
- name: "visibilityCause",
7328
- label: visibilityCauseLabel,
7329
- rules: {
7330
- validate: {
7331
- isRequired: isRequired
7332
- }
7333
- },
7588
+ "data-testid": "surfaceVisibility-visibilityCause",
7334
7589
  disabled: isDisabled,
7335
7590
  isReadOnly: isReadOnly,
7336
- "data-testid": "surfaceVisibility-visibilityCause",
7591
+ label: visibilityCauseLabel,
7592
+ name: "visibilityCause",
7337
7593
  onChange: function onChange(event) {
7338
7594
  event.stopPropagation();
7339
7595
  _onChange();
7340
7596
  },
7597
+ rules: {
7598
+ validate: {
7599
+ isRequired: isRequired
7600
+ }
7601
+ },
7341
7602
  size: "small",
7342
7603
  children: Object.keys(VisibilityCause).map(function (key) {
7343
7604
  return jsx(MenuItem, {
@@ -7405,12 +7666,15 @@ var SurfaceWind = function SurfaceWind(_ref) {
7405
7666
  justifyContent: "flex-start",
7406
7667
  size: 8,
7407
7668
  children: [jsx(Grid, {
7408
- sx: styles$2.surfaceWind,
7409
7669
  size: 12,
7670
+ sx: styles$2.surfaceWind,
7410
7671
  children: jsx(ReactHookFormNumberField, {
7411
- name: "windDirection",
7412
- label: windLabel,
7672
+ "data-testid": "surfaceWind-windDirection",
7673
+ disabled: isDisabled,
7413
7674
  helperText: t('surface-wind-helper-text'),
7675
+ isReadOnly: isReadOnly,
7676
+ label: windLabel,
7677
+ name: "windDirection",
7414
7678
  rules: {
7415
7679
  min: {
7416
7680
  value: 10,
@@ -7427,23 +7691,28 @@ var SurfaceWind = function SurfaceWind(_ref) {
7427
7691
  }
7428
7692
  }
7429
7693
  },
7430
- size: "small",
7431
- disabled: isDisabled,
7432
- isReadOnly: isReadOnly,
7433
- "data-testid": "surfaceWind-windDirection"
7694
+ size: "small"
7434
7695
  })
7435
7696
  }), jsxs(Grid, {
7436
7697
  container: true,
7437
7698
  size: 12,
7699
+ spacing: 0,
7438
7700
  sx: {
7439
7701
  marginTop: -2
7440
7702
  },
7441
- spacing: 0,
7442
7703
  children: [jsx(Grid, {
7443
7704
  size: 5,
7444
7705
  children: jsx(ReactHookFormSelect, {
7445
- name: "windUnit",
7706
+ "data-testid": "surfaceWind-windUnit",
7707
+ defaultValue: 'KT',
7708
+ disabled: isDisabled,
7709
+ isReadOnly: isReadOnly,
7446
7710
  label: t('unit-label'),
7711
+ name: "windUnit",
7712
+ onChange: function onChange() {
7713
+ triggerValidations(['windSpeed'], getValues, trigger);
7714
+ _onChange();
7715
+ },
7447
7716
  rules: {
7448
7717
  validate: {
7449
7718
  isRequired: isRequired
@@ -7451,14 +7720,6 @@ var SurfaceWind = function SurfaceWind(_ref) {
7451
7720
  },
7452
7721
  size: "small",
7453
7722
  sx: styles$2.unit,
7454
- disabled: isDisabled,
7455
- isReadOnly: isReadOnly,
7456
- defaultValue: 'KT',
7457
- "data-testid": "surfaceWind-windUnit",
7458
- onChange: function onChange() {
7459
- triggerValidations(['windSpeed'], getValues, trigger);
7460
- _onChange();
7461
- },
7462
7723
  children: Object.keys(allowedWindUnitsForFir).map(function (key) {
7463
7724
  return jsx(MenuItem, {
7464
7725
  value: key,
@@ -7469,8 +7730,11 @@ var SurfaceWind = function SurfaceWind(_ref) {
7469
7730
  }), jsx(Grid, {
7470
7731
  size: 7,
7471
7732
  children: jsx(ReactHookFormNumberField, {
7472
- name: "windSpeed",
7733
+ "data-testid": "surfaceWind-windSpeed",
7734
+ disabled: isDisabled,
7735
+ isReadOnly: isReadOnly,
7473
7736
  label: speedLabel,
7737
+ name: "windSpeed",
7474
7738
  rules: {
7475
7739
  validate: {
7476
7740
  isRequired: isRequired,
@@ -7495,10 +7759,7 @@ var SurfaceWind = function SurfaceWind(_ref) {
7495
7759
  }
7496
7760
  }
7497
7761
  },
7498
- size: "small",
7499
- disabled: isDisabled,
7500
- isReadOnly: isReadOnly,
7501
- "data-testid": "surfaceWind-windSpeed"
7762
+ size: "small"
7502
7763
  })
7503
7764
  })]
7504
7765
  })]
@@ -7572,7 +7833,7 @@ var CloudLevels = function CloudLevels(_ref) {
7572
7833
  var cloudLevelInfoMode = watch('cloudLevelInfoMode');
7573
7834
  // Get allowed cloud level units based on selected FIR - if no FIR selected, allow all default units
7574
7835
  var allowedCloudLevelUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'cloud_level_unit', CloudLevelUnits);
7575
- React__default.useEffect(function () {
7836
+ React.useEffect(function () {
7576
7837
  if (cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV') {
7577
7838
  unregister('cloudLowerLevel');
7578
7839
  }
@@ -7586,8 +7847,8 @@ var CloudLevels = function CloudLevels(_ref) {
7586
7847
  justifyContent: "flex-end",
7587
7848
  size: 4,
7588
7849
  children: jsx(Typography, {
7589
- variant: "subtitle1",
7590
7850
  sx: styles$2.label,
7851
+ variant: "subtitle1",
7591
7852
  children: t('levels')
7592
7853
  })
7593
7854
  }), jsx(Grid, {
@@ -7597,8 +7858,8 @@ var CloudLevels = function CloudLevels(_ref) {
7597
7858
  children: jsxs(Grid, {
7598
7859
  size: 12,
7599
7860
  children: [jsx(ReactHookFormHiddenInput, {
7600
- name: "cloudLevelInfoMode",
7601
- defaultValue: "BETW"
7861
+ defaultValue: "BETW",
7862
+ name: "cloudLevelInfoMode"
7602
7863
  }), jsxs(Grid, {
7603
7864
  container: true,
7604
7865
  size: 12,
@@ -7610,6 +7871,9 @@ var CloudLevels = function CloudLevels(_ref) {
7610
7871
  children: jsx(FormControlLabel, {
7611
7872
  control: jsx(Checkbox, {
7612
7873
  checked: cloudLevelInfoMode === 'BETW_ABV' || cloudLevelInfoMode === 'BETW_SFC_ABV',
7874
+ color: "secondary",
7875
+ disabled: isDisabled,
7876
+ name: "checkedAbove",
7613
7877
  onChange: function onChange() {
7614
7878
  switch (getValues('cloudLevelInfoMode')) {
7615
7879
  case 'BETW':
@@ -7633,10 +7897,7 @@ var CloudLevels = function CloudLevels(_ref) {
7633
7897
  });
7634
7898
  break;
7635
7899
  }
7636
- },
7637
- name: "checkedAbove",
7638
- color: "secondary",
7639
- disabled: isDisabled
7900
+ }
7640
7901
  }),
7641
7902
  "data-testid": "cloudLevels-Above",
7642
7903
  label: "Above"
@@ -7645,25 +7906,25 @@ var CloudLevels = function CloudLevels(_ref) {
7645
7906
  }), jsx(Grid, {
7646
7907
  size: 3,
7647
7908
  children: jsx(ReactHookFormSelect, {
7648
- name: "cloudLevel.unit",
7649
- label: "Unit",
7650
7909
  "data-testid": "cloudLevel-unit",
7651
- rules: {
7652
- validate: {
7653
- isRequired: isRequired
7654
- }
7655
- },
7656
- size: "small",
7657
- sx: styles$2.unit,
7910
+ defaultValue: 'FT',
7658
7911
  disabled: isDisabled,
7659
7912
  isReadOnly: isReadOnly,
7660
- defaultValue: 'FT',
7913
+ label: "Unit",
7914
+ name: "cloudLevel.unit",
7661
7915
  onChange: function onChange() {
7662
7916
  // Unit change is reflected in the Lower Cloud Level
7663
7917
  setValue('cloudLowerLevel.unit', getValues('cloudLevel.unit'));
7664
7918
  triggerValidations(['cloudLevel.value', 'cloudLowerLevel.value'], getValues, trigger);
7665
7919
  _onChange();
7666
7920
  },
7921
+ rules: {
7922
+ validate: {
7923
+ isRequired: isRequired
7924
+ }
7925
+ },
7926
+ size: "small",
7927
+ sx: styles$2.unit,
7667
7928
  children: Object.keys(allowedCloudLevelUnitsForFir).map(function (key) {
7668
7929
  return jsx(MenuItem, {
7669
7930
  value: key,
@@ -7674,11 +7935,14 @@ var CloudLevels = function CloudLevels(_ref) {
7674
7935
  }), jsx(Grid, {
7675
7936
  size: 5,
7676
7937
  children: jsx(ReactHookFormNumberField, {
7677
- name: "cloudLevel.value",
7678
- label: "Upper level",
7679
7938
  "data-testid": "cloudLevel-value",
7680
- size: "small",
7681
- 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
+ },
7682
7946
  rules: {
7683
7947
  validate: {
7684
7948
  isRequired: isRequired,
@@ -7700,11 +7964,8 @@ var CloudLevels = function CloudLevels(_ref) {
7700
7964
  }
7701
7965
  }
7702
7966
  },
7703
- disabled: isDisabled,
7704
- isReadOnly: isReadOnly,
7705
- onChange: function onChange() {
7706
- triggerValidations(['cloudLowerLevel.value'], getValues, trigger);
7707
- }
7967
+ size: "small",
7968
+ sx: styles$2.levelField
7708
7969
  })
7709
7970
  })]
7710
7971
  }), jsxs(Grid, {
@@ -7718,6 +7979,9 @@ var CloudLevels = function CloudLevels(_ref) {
7718
7979
  children: jsx(FormControlLabel, {
7719
7980
  control: jsx(Checkbox, {
7720
7981
  checked: cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV',
7982
+ color: "secondary",
7983
+ disabled: isDisabled,
7984
+ name: "checkedSFC",
7721
7985
  onChange: function onChange() {
7722
7986
  switch (getValues('cloudLevelInfoMode')) {
7723
7987
  case 'BETW':
@@ -7741,10 +8005,7 @@ var CloudLevels = function CloudLevels(_ref) {
7741
8005
  });
7742
8006
  break;
7743
8007
  }
7744
- },
7745
- name: "checkedSFC",
7746
- color: "secondary",
7747
- disabled: isDisabled
8008
+ }
7748
8009
  }),
7749
8010
  "data-testid": "cloudLevels-SFC",
7750
8011
  label: "SFC"
@@ -7754,25 +8015,25 @@ var CloudLevels = function CloudLevels(_ref) {
7754
8015
  children: [jsx(Grid, {
7755
8016
  size: 3,
7756
8017
  children: jsx(ReactHookFormSelect, {
7757
- name: "cloudLowerLevel.unit",
7758
- label: "Unit",
7759
8018
  "data-testid": "cloudLowerLevel-unit",
7760
- rules: {
7761
- validate: {
7762
- isRequired: isRequired
7763
- }
7764
- },
7765
- size: "small",
7766
- sx: styles$2.unit,
8019
+ defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
7767
8020
  disabled: isDisabled,
7768
8021
  isReadOnly: isReadOnly,
7769
- defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
8022
+ label: "Unit",
8023
+ name: "cloudLowerLevel.unit",
7770
8024
  onChange: function onChange() {
7771
8025
  // Unit change is reflected in the Upper Cloud Level
7772
8026
  setValue('cloudLevel.unit', getValues('cloudLowerLevel.unit'));
7773
8027
  triggerValidations(['cloudLowerLevel.value', 'cloudLevel.value'], getValues, trigger);
7774
8028
  _onChange();
7775
8029
  },
8030
+ rules: {
8031
+ validate: {
8032
+ isRequired: isRequired
8033
+ }
8034
+ },
8035
+ size: "small",
8036
+ sx: styles$2.unit,
7776
8037
  children: Object.keys(allowedCloudLevelUnitsForFir).map(function (key) {
7777
8038
  return jsx(MenuItem, {
7778
8039
  value: key,
@@ -7783,9 +8044,11 @@ var CloudLevels = function CloudLevels(_ref) {
7783
8044
  }), jsx(Grid, {
7784
8045
  size: 5,
7785
8046
  children: jsx(ReactHookFormNumberField, {
7786
- name: "cloudLowerLevel.value",
7787
- label: "Lower level",
7788
8047
  "data-testid": "cloudLowerLevel-value",
8048
+ disabled: isDisabled,
8049
+ isReadOnly: isReadOnly,
8050
+ label: "Lower level",
8051
+ name: "cloudLowerLevel.value",
7789
8052
  rules: {
7790
8053
  validate: {
7791
8054
  isRequired: isRequired,
@@ -7813,9 +8076,7 @@ var CloudLevels = function CloudLevels(_ref) {
7813
8076
  }
7814
8077
  }
7815
8078
  },
7816
- size: "small",
7817
- disabled: isDisabled,
7818
- isReadOnly: isReadOnly
8079
+ size: "small"
7819
8080
  })
7820
8081
  })]
7821
8082
  })]
@@ -7831,16 +8092,16 @@ var IssuedAt = function IssuedAt(_ref) {
7831
8092
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
7832
8093
  t = _useSigmetAirmetTrans.t;
7833
8094
  return jsx(ProductFormFieldLayout, {
7834
- title: t('issued-at'),
7835
8095
  sx: {
7836
8096
  marginTop: -2
7837
8097
  },
8098
+ title: t('issued-at'),
7838
8099
  children: jsx(Typography, {
7839
- variant: "body2",
7840
8100
  sx: Object.assign({}, styles$2.body, {
7841
8101
  fontSize: '1rem',
7842
8102
  color: isReadOnly ? 'geowebColors.typographyAndIcons.text' : 'geowebColors.buttons.primary.disabled.color'
7843
8103
  }),
8104
+ variant: "body2",
7844
8105
  children: date
7845
8106
  })
7846
8107
  });
@@ -7934,7 +8195,8 @@ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
7934
8195
  return false;
7935
8196
  };
7936
8197
  }
7937
- 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)),
7938
8200
  TAC = _React$useState[0],
7939
8201
  setTAC = _React$useState[1];
7940
8202
  var _useIsMounted = useIsMounted(),
@@ -7971,7 +8233,7 @@ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
7971
8233
  return _ref.apply(this, arguments);
7972
8234
  };
7973
8235
  }();
7974
- React__default.useEffect(function () {
8236
+ React.useEffect(function () {
7975
8237
  if (shouldRetrieveTAC(initialProduct, omitChange) && !hasErrors()) {
7976
8238
  void retrieveTAC(initialProduct);
7977
8239
  }
@@ -7984,7 +8246,7 @@ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
7984
8246
  setTAC(noTAC(t));
7985
8247
  }
7986
8248
  };
7987
- var debouncedSearch = React__default.useRef(debounce(/*#__PURE__*/function () {
8249
+ var debouncedSearch = React.useRef(debounce(/*#__PURE__*/function () {
7988
8250
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(formFn, hasFormErrors) {
7989
8251
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7990
8252
  while (1) switch (_context2.prev = _context2.next) {
@@ -8015,14 +8277,15 @@ var ProductFormTAC = function ProductFormTAC(_ref3) {
8015
8277
  var sequenceNumberInTac = findSequenceNumber(tac, noTAC(t));
8016
8278
  var sequenceStyle = getSequenceStyling(product, hasTac);
8017
8279
  return jsx(Typography, {
8018
- variant: "body2",
8019
8280
  component: "div",
8281
+ "data-testid": "productform-tac-message",
8020
8282
  sx: {
8021
8283
  whiteSpace: 'break-spaces'
8022
8284
  },
8023
- "data-testid": "productform-tac-message",
8285
+ variant: "body2",
8024
8286
  children: jsx(Box, {
8025
8287
  component: "p",
8288
+ "data-testid": "productform-tac-message-line",
8026
8289
  sx: {
8027
8290
  margin: 0,
8028
8291
  fontSize: '1.125rem',
@@ -8031,7 +8294,6 @@ var ProductFormTAC = function ProductFormTAC(_ref3) {
8031
8294
  letterSpacing: '0.5px',
8032
8295
  marginTop: '2px'
8033
8296
  },
8034
- "data-testid": "productform-tac-message-line",
8035
8297
  children: tac.split(' ').map(function (word, index) {
8036
8298
  return jsx(Box, {
8037
8299
  component: "span",
@@ -8048,16 +8310,16 @@ var Tac = function Tac(_ref) {
8048
8310
  children = _ref.children,
8049
8311
  product = _ref.product;
8050
8312
  return jsxs(ProductFormFieldLayout, {
8051
- title: "TAC",
8052
8313
  sx: {
8053
8314
  marginTop: -3,
8054
8315
  '.MuiTypography-root.MuiTypography-subtitle1': {
8055
8316
  marginTop: '2px'
8056
8317
  }
8057
8318
  },
8319
+ title: "TAC",
8058
8320
  children: [jsx(ProductFormTAC, {
8059
- tac: tac,
8060
- product: product
8321
+ product: product,
8322
+ tac: tac
8061
8323
  }), children]
8062
8324
  });
8063
8325
  };
@@ -8074,7 +8336,7 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8074
8336
  var firstMap = useSelector(function (store) {
8075
8337
  return mapSelectors.getFirstMap(store);
8076
8338
  }, shallowEqual);
8077
- var firstMapId = firstMap && firstMap.id ? firstMap.id : '';
8339
+ var firstMapId = firstMap != null && firstMap.id ? firstMap.id : '';
8078
8340
  var mapLayers = useSelector(function (store) {
8079
8341
  return mapSelectors.getMapLayers(store, firstMapId);
8080
8342
  }, shallowEqual);
@@ -8090,7 +8352,7 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8090
8352
  dispatch(syncGroupsActions.syncGroupAddTarget(payload));
8091
8353
  }, [dispatch]);
8092
8354
  React.useEffect(function () {
8093
- if (mapLayers && mapLayers.length) {
8355
+ if (mapLayers != null && mapLayers.length) {
8094
8356
  // use maplayers, but change layerId and current mapId
8095
8357
  var layers = mapLayers.map(function (layer) {
8096
8358
  return Object.assign({}, layer, {
@@ -8103,7 +8365,7 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8103
8365
  layers: layers
8104
8366
  }));
8105
8367
  }
8106
- if (mapDimensions && mapDimensions.length) {
8368
+ if (mapDimensions != null && mapDimensions.length) {
8107
8369
  dispatch(mapActions.mapChangeDimension({
8108
8370
  mapId: mapId,
8109
8371
  dimension: mapDimensions[0],
@@ -8150,23 +8412,23 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8150
8412
  // eslint-disable-next-line react-hooks/exhaustive-deps
8151
8413
  }, []);
8152
8414
  return jsxs("div", {
8415
+ "data-testid": "MapView",
8416
+ ref: mapWindowRef,
8153
8417
  style: {
8154
8418
  position: 'relative',
8155
8419
  height: '100%'
8156
8420
  },
8157
- "data-testid": "MapView",
8158
- ref: mapWindowRef,
8159
8421
  children: [jsx(LegendConnect, {
8160
- showMapId: true,
8161
- mapId: mapId
8162
- }), jsxs(OlMapViewConnect, {
8163
8422
  mapId: mapId,
8423
+ showMapId: true
8424
+ }), jsxs(OlMapViewConnect, {
8164
8425
  controls: {
8165
8426
  mapControlsPositionTop: 0,
8166
8427
  layerManagerAndLegend: true,
8167
8428
  zoomControls: true,
8168
8429
  dimensionSelect: true
8169
8430
  },
8431
+ mapId: mapId,
8170
8432
  source: "module",
8171
8433
  children: [children, geoJSONLayers.map(function (layer) {
8172
8434
  return jsxs("div", {
@@ -8176,19 +8438,19 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8176
8438
  style: genericOpenLayersFeatureStyle,
8177
8439
  zIndex: 2000
8178
8440
  }), jsx(OpenLayersMapDraw, {
8179
- viewOnlyStyle: genericOpenLayersFeatureStyle,
8180
- selectedFeatureIndex: layer.selectedFeatureIndex || 0,
8181
- geojson: layer.geojson,
8182
8441
  drawMode: layer.drawMode,
8183
- isInEditMode: layer.isInEditMode || false,
8184
- updateGeojson: layer.updateGeojson,
8185
8442
  exitDrawModeCallback: function exitDrawModeCallback(reason) {
8186
8443
  try {
8187
- (layer == null ? void 0 : layer.exitDrawModeCallback) && (layer == null ? void 0 : layer.exitDrawModeCallback(reason));
8444
+ layer == null || layer.exitDrawModeCallback == null || layer.exitDrawModeCallback(reason);
8188
8445
  } catch (e) {
8189
8446
  window.console.trace(e);
8190
8447
  }
8191
- }
8448
+ },
8449
+ geojson: layer.geojson,
8450
+ isInEditMode: layer.isInEditMode || false,
8451
+ selectedFeatureIndex: layer.selectedFeatureIndex || 0,
8452
+ updateGeojson: layer.updateGeojson,
8453
+ viewOnlyStyle: genericOpenLayersFeatureStyle
8192
8454
  })]
8193
8455
  }, layer.id);
8194
8456
  })]
@@ -8201,9 +8463,9 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8201
8463
  width: '100%'
8202
8464
  },
8203
8465
  children: jsx(TimeSliderConnect, {
8204
- sourceId: timesliderId,
8205
8466
  mapId: mapId,
8206
- mapWindowRef: mapWindowRef
8467
+ mapWindowRef: mapWindowRef,
8468
+ sourceId: timesliderId
8207
8469
  })
8208
8470
  })]
8209
8471
  });
@@ -8228,6 +8490,11 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
8228
8490
  overflowY: 'hidden'
8229
8491
  }, _sx),
8230
8492
  children: [jsx(Grid, {
8493
+ size: {
8494
+ xs: 12,
8495
+ sm: 6,
8496
+ lg: 8
8497
+ },
8231
8498
  sx: (_sx2 = {
8232
8499
  height: 400,
8233
8500
  padding: 2
@@ -8235,18 +8502,18 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
8235
8502
  height: '100%',
8236
8503
  padding: 0
8237
8504
  }, _sx2),
8238
- size: {
8239
- xs: 12,
8240
- sm: 6,
8241
- lg: 8
8242
- },
8243
8505
  children: jsx(MapViewGeoJson, {
8244
8506
  baseLayers: baseLayers,
8245
- projection: projection,
8246
8507
  geoJSONLayers: geoJSONLayers,
8508
+ projection: projection,
8247
8509
  children: mapChildren
8248
8510
  })
8249
8511
  }), jsx(Grid, {
8512
+ size: {
8513
+ xs: 12,
8514
+ sm: 6,
8515
+ lg: 4
8516
+ },
8250
8517
  sx: (_sx3 = {
8251
8518
  paddingTop: 5,
8252
8519
  paddingBottom: 5,
@@ -8255,11 +8522,6 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
8255
8522
  overflowY: 'auto',
8256
8523
  height: '100%'
8257
8524
  }, _sx3),
8258
- size: {
8259
- xs: 12,
8260
- sm: 6,
8261
- lg: 4
8262
- },
8263
8525
  children: children
8264
8526
  })]
8265
8527
  });
@@ -8432,7 +8694,7 @@ var useConditionalFields$1 = function useConditionalFields(productConfig) {
8432
8694
  var hasRadioactiveCloud = watch('phenomenon') === 'RDOACT_CLD';
8433
8695
  var changeFromConfig = getOmitChangeFromConfig(productConfig);
8434
8696
  var omitChange = changeFromConfig && (hasVolcanicAshes || hasRadioactiveCloud);
8435
- React__default.useEffect(function () {
8697
+ React.useEffect(function () {
8436
8698
  if (!hasVolcanicAshes) {
8437
8699
  unregister(['vaSigmetVolcanoName', 'vaSigmetVolcanoCoordinates.latitude', 'vaSigmetVolcanoCoordinates.longitude']);
8438
8700
  }
@@ -8471,12 +8733,13 @@ var SigmetForm = function SigmetForm(_ref) {
8471
8733
  watch = _useFormContext2.watch,
8472
8734
  setValue = _useFormContext2.setValue,
8473
8735
  handleSubmit = _useFormContext2.handleSubmit,
8736
+ trigger = _useFormContext2.trigger,
8474
8737
  errors = _useFormContext2.formState.errors;
8475
- var _React$useState = React__default.useState(false),
8738
+ var _React$useState = React.useState(false),
8476
8739
  hasUserChangedTime = _React$useState[0],
8477
8740
  setHasUserChangedTime = _React$useState[1];
8478
8741
  var firBorderAtStart = initialSigmet ? initialSigmet.locationIndicatorATSR : productConfig.active_firs[0];
8479
- var _React$useState2 = React__default.useState(getDefaultPhenomena(productConfig).phenomena),
8742
+ var _React$useState2 = React.useState(getDefaultPhenomena(productConfig).phenomena),
8480
8743
  phenomenaList = _React$useState2[0],
8481
8744
  setPhenomenaList = _React$useState2[1];
8482
8745
  var sourcePanelId = useSelector(function (store) {
@@ -8557,7 +8820,7 @@ var SigmetForm = function SigmetForm(_ref) {
8557
8820
  var _useTAC = useTAC(t, initialSigmet != null ? initialSigmet : initialCancelSigmet, getTAC != null ? getTAC : fetchSigmetTAC, getHasFormErrors, getOmitChangeFromConfig(productConfig)),
8558
8821
  tac = _useTAC[0],
8559
8822
  updateTac = _useTAC[1];
8560
- React__default.useEffect(function () {
8823
+ React.useEffect(function () {
8561
8824
  updateTac(watch);
8562
8825
  }, [initialSigmet, updateTac, watch]);
8563
8826
  var onChangeForm = useCallback(function () {
@@ -8565,15 +8828,18 @@ var SigmetForm = function SigmetForm(_ref) {
8565
8828
  }, [updateTac, watch]);
8566
8829
  var onUpdateStartgeoJSON = useCallback(function (updatedStartGeoJSON, updateStartGeoJSONIntersection) {
8567
8830
  setValue('startGeometry', updatedStartGeoJSON, {
8568
- shouldValidate: true,
8831
+ shouldValidate: false,
8569
8832
  shouldDirty: isGeometryDirty(watch('startGeometry'), updatedStartGeoJSON)
8570
8833
  });
8571
8834
  setValue('startGeometryIntersect', updateStartGeoJSONIntersection, {
8572
- shouldValidate: true,
8835
+ shouldValidate: false,
8573
8836
  shouldDirty: isGeometryDirty(watch('startGeometryIntersect'), updateStartGeoJSONIntersection)
8574
8837
  });
8838
+ queueMicrotask(function () {
8839
+ return void trigger('startGeometry');
8840
+ });
8575
8841
  onChangeForm();
8576
- }, [setValue, watch, onChangeForm]);
8842
+ }, [setValue, watch, trigger, onChangeForm]);
8577
8843
  var onUpdateEndGeoJson = useCallback(function (updatedEndGeoJSON, updateEndGeoJSONIntersection) {
8578
8844
  setValue('endGeometry', updatedEndGeoJSON, {
8579
8845
  shouldValidate: true,
@@ -8628,12 +8894,12 @@ var SigmetForm = function SigmetForm(_ref) {
8628
8894
  updateGeojson: updateStartGeoJson
8629
8895
  }), getEndLayer('geoJSONIntersection', 'geojsonlayer-intersection-end'), getStartLayer('geoJSONIntersection', 'geojsonlayer-intersection-start')];
8630
8896
  useFormLayers(layers);
8631
- var _React$useState3 = React__default.useState(mode === 'view'),
8897
+ var _React$useState3 = React.useState(mode === 'view'),
8632
8898
  isDisabled = _React$useState3[0],
8633
8899
  setIsDisabled = _React$useState3[1];
8634
8900
  var isReadOnly = mode === 'view';
8635
8901
  var helperText = isReadOnly ? '' : 'Optional';
8636
- React__default.useEffect(function () {
8902
+ React.useEffect(function () {
8637
8903
  var isInDrawMode = activeStartTool !== '' || activeEndTool !== '';
8638
8904
  setDialogActionsDisabled == null || setDialogActionsDisabled(isInDrawMode);
8639
8905
  if (mode === 'view') {
@@ -8678,92 +8944,92 @@ var SigmetForm = function SigmetForm(_ref) {
8678
8944
  spacing: 2,
8679
8945
  sx: formStyles,
8680
8946
  children: [jsx(Type, {
8681
- productType: "sigmet",
8682
8947
  isDisabled: isDisabled,
8683
8948
  isReadOnly: isReadOnly,
8684
- onChange: onChangeForm
8949
+ onChange: onChangeForm,
8950
+ productType: "sigmet"
8685
8951
  }), !isCancelSigmet && jsx(Phenomenon, {
8686
- productType: "sigmet",
8687
- productConfig: productConfig,
8688
- phenomenaList: phenomenaList,
8689
8952
  isDisabled: isDisabled,
8690
8953
  isReadOnly: isReadOnly,
8691
- onChange: onChangeForm
8954
+ onChange: onChangeForm,
8955
+ phenomenaList: phenomenaList,
8956
+ productConfig: productConfig,
8957
+ productType: "sigmet"
8692
8958
  }), !isCancelSigmet && jsx(ObservationForecast, {
8693
8959
  isDisabled: isDisabled,
8694
8960
  isReadOnly: isReadOnly
8695
8961
  }), !isCancelSigmet && jsx(ObservationForecastTime, {
8962
+ helperText: helperText,
8696
8963
  isDisabled: isDisabled,
8697
8964
  isReadOnly: isReadOnly,
8698
- helperText: helperText,
8699
8965
  onChange: onChangeForm
8700
8966
  }), !isCancelSigmet && hasVolcanicAshes && !isShortTest() ? jsx(VolcanicFields, {
8701
- isDisabled: isDisabled,
8702
- isReadOnly: isReadOnly,
8967
+ degreesAndMinutes: degreesAndMinutes,
8703
8968
  helperText: helperText,
8704
- degreesAndMinutes: degreesAndMinutes
8969
+ isDisabled: isDisabled,
8970
+ isReadOnly: isReadOnly
8705
8971
  }) : null, jsx(ValidFrom, {
8706
- productConfig: productConfig,
8707
8972
  isDisabled: isDisabled,
8708
8973
  isReadOnly: isReadOnly,
8974
+ lockBecauseActive: lockValidFrom,
8709
8975
  onChange: onChangeForm,
8710
8976
  onUserChange: function onUserChange() {
8711
8977
  return setHasUserChangedTime(true);
8712
8978
  },
8713
- lockBecauseActive: lockValidFrom
8979
+ productConfig: productConfig
8714
8980
  }), jsx(ValidUntil, {
8715
- productConfig: productConfig,
8981
+ hasUserChangedTime: hasUserChangedTime,
8716
8982
  isDisabled: isDisabled,
8717
8983
  isReadOnly: isReadOnly,
8718
8984
  onChange: onChangeForm,
8719
- hasUserChangedTime: hasUserChangedTime,
8720
8985
  onUserChange: function onUserChange() {
8721
8986
  return setHasUserChangedTime(true);
8722
- }
8987
+ },
8988
+ productConfig: productConfig
8723
8989
  }), jsx(SelectFIR, {
8724
- productConfig: productConfig,
8725
8990
  isDisabled: isDisabled,
8726
8991
  isReadOnly: isReadOnly,
8727
8992
  onChange: function onChange(event, newPhenomenaList) {
8728
8993
  onChangeFir(newPhenomenaList != null ? newPhenomenaList : [], event);
8729
- }
8994
+ },
8995
+ productConfig: productConfig
8730
8996
  }), jsx(StartGeometry, {
8731
- isReadOnly: isReadOnly,
8997
+ activeTool: activeStartTool,
8732
8998
  geoJSON: startGeoJSON,
8733
8999
  geoJSONIntersection: startGeoJSONIntersection,
8734
- tools: startEditModes,
9000
+ isDisabled: drawToolsDisabled,
9001
+ isReadOnly: isReadOnly,
8735
9002
  onChangeTool: onChangeStartTool,
8736
- activeTool: activeStartTool,
8737
9003
  productConfig: productConfig,
8738
- isDisabled: drawToolsDisabled
9004
+ tools: startEditModes
8739
9005
  }), !isCancelSigmet && jsx(Levels, {
8740
9006
  isDisabled: isDisabled,
8741
9007
  isReadOnly: isReadOnly,
8742
9008
  onChange: onChangeForm,
8743
- productType: "sigmet",
8744
- productConfig: productConfig
8745
- }), !isCancelSigmet && jsx(Progress, {
8746
- productType: "sigmet",
8747
9009
  productConfig: productConfig,
9010
+ productType: "sigmet"
9011
+ }), !isCancelSigmet && jsx(Progress, {
9012
+ activeTool: activeEndTool,
9013
+ drawToolsDisabled: drawToolsDisabled,
9014
+ geoJSON: endGeoJSON,
9015
+ geoJSONIntersection: endGeoJSONIntersection,
8748
9016
  isDisabled: isDisabled,
8749
9017
  isReadOnly: isReadOnly,
8750
9018
  onChange: onChangeForm,
8751
- geoJSON: endGeoJSON,
8752
- geoJSONIntersection: endGeoJSONIntersection,
8753
- tools: endEditModes,
8754
9019
  onChangeTool: onChangeEndTool,
8755
- activeTool: activeEndTool,
8756
- drawToolsDisabled: drawToolsDisabled
9020
+ productConfig: productConfig,
9021
+ productType: "sigmet",
9022
+ tools: endEditModes
8757
9023
  }), !isCancelSigmet && !omitChange && jsx(Change, {
8758
9024
  isDisabled: isDisabled,
8759
9025
  isReadOnly: isReadOnly
8760
9026
  }), isCancelSigmet && watch('vaSigmetMoveToFIR') ? jsx(ProductFormFieldLayout, {
8761
9027
  children: jsxs(Typography, {
8762
- variant: "body2",
9028
+ "data-testid": "vaSigmetMoveToFIR",
8763
9029
  sx: Object.assign({}, styles$2.body, {
8764
9030
  marginBottom: '-4px'
8765
9031
  }),
8766
- "data-testid": "vaSigmetMoveToFIR",
9032
+ variant: "body2",
8767
9033
  children: [t('vulcanic-cloud-moving-text'), ":", ' ', jsxs("b", {
8768
9034
  children: [" ", watch('vaSigmetMoveToFIR')]
8769
9035
  })]
@@ -8772,11 +9038,11 @@ var SigmetForm = function SigmetForm(_ref) {
8772
9038
  date: getProductIssueDate(t, initialSigmet, initialCancelSigmet),
8773
9039
  isReadOnly: isReadOnly
8774
9040
  }), jsxs(Tac, {
8775
- tac: tac,
8776
9041
  product: product,
9042
+ tac: tac,
8777
9043
  children: [jsx(ReactHookFormHiddenInput, {
8778
- name: "sequence",
8779
- defaultValue: "-1"
9044
+ defaultValue: "-1",
9045
+ name: "sequence"
8780
9046
  }), /* Add hidden fields for TAC generation in case of cancel sigmet */
8781
9047
  isCancelSigmet ? jsxs(Fragment, {
8782
9048
  children: [jsx(ReactHookFormHiddenInput, {
@@ -8802,8 +9068,8 @@ var SigmetForm = function SigmetForm(_ref) {
8802
9068
  width: '100%'
8803
9069
  },
8804
9070
  children: jsx(ProductFormLayout, {
8805
- productConfig: productConfig,
8806
9071
  geoJSONLayers: layers,
9072
+ productConfig: productConfig,
8807
9073
  children: renderForm()
8808
9074
  })
8809
9075
  });
@@ -8816,28 +9082,28 @@ var useConditionalFields = function useConditionalFields() {
8816
9082
  // phenomenon: SFC_VIS
8817
9083
  var phenomenon = watch('phenomenon');
8818
9084
  var hasSurfaceVisiblity = phenomenon === 'SFC_VIS';
8819
- React__default.useEffect(function () {
9085
+ React.useEffect(function () {
8820
9086
  if (!hasSurfaceVisiblity) {
8821
9087
  unregister(['visibilityValue', 'visibilityCause']);
8822
9088
  }
8823
9089
  }, [hasSurfaceVisiblity, unregister]);
8824
9090
  // phenomenon: SFC_WIND
8825
9091
  var hasSurfaceWind = watch('phenomenon') === 'SFC_WIND';
8826
- React__default.useEffect(function () {
9092
+ React.useEffect(function () {
8827
9093
  if (!hasSurfaceWind) {
8828
9094
  unregister(['windDirection', 'windUnit', 'windSpeed']);
8829
9095
  }
8830
9096
  }, [hasSurfaceWind, unregister]);
8831
9097
  // phenomenon: SFC_WIND, SFC_VIS, BKN_CLD, OVC_CLD
8832
9098
  var hasLevels = phenomenon !== 'SFC_WIND' && phenomenon !== 'SFC_VIS' && phenomenon !== 'BKN_CLD' && phenomenon !== 'OVC_CLD';
8833
- React__default.useEffect(function () {
9099
+ React.useEffect(function () {
8834
9100
  if (!hasLevels) {
8835
9101
  unregister(['levelInfoMode', 'level', 'lowerLevel']);
8836
9102
  }
8837
9103
  }, [hasLevels, unregister]);
8838
9104
  // phenomenon: BKN_CLD
8839
9105
  var hasCloudLevels = phenomenon === 'BKN_CLD' || phenomenon === 'OVC_CLD';
8840
- React__default.useEffect(function () {
9106
+ React.useEffect(function () {
8841
9107
  if (!hasCloudLevels) {
8842
9108
  unregister(['cloudLevelInfoMode', 'cloudLevel', 'cloudLowerLevel']);
8843
9109
  }
@@ -8872,10 +9138,10 @@ var AirmetForm = function AirmetForm(_ref) {
8872
9138
  getValues = _useFormContext2.getValues,
8873
9139
  trigger = _useFormContext2.trigger,
8874
9140
  errors = _useFormContext2.formState.errors;
8875
- var _React$useState = React__default.useState(getDefaultPhenomena(productConfig).phenomena),
9141
+ var _React$useState = React.useState(getDefaultPhenomena(productConfig).phenomena),
8876
9142
  phenomenaList = _React$useState[0],
8877
9143
  setPhenomenaList = _React$useState[1];
8878
- var _React$useState2 = React__default.useState(false),
9144
+ var _React$useState2 = React.useState(false),
8879
9145
  hasUserChangedTime = _React$useState2[0],
8880
9146
  setHasUserChangedTime = _React$useState2[1];
8881
9147
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
@@ -8931,7 +9197,7 @@ var AirmetForm = function AirmetForm(_ref) {
8931
9197
  var _useTAC = useTAC(t, initialAirmet != null ? initialAirmet : initialCancelAirmet, getTAC != null ? getTAC : fetchAirmetTAC, getHasFormErrors),
8932
9198
  tac = _useTAC[0],
8933
9199
  updateTac = _useTAC[1];
8934
- React__default.useEffect(function () {
9200
+ React.useEffect(function () {
8935
9201
  updateTac(watch);
8936
9202
  }, [initialAirmet, updateTac, watch]);
8937
9203
  var onChangeForm = useCallback(function () {
@@ -8939,15 +9205,18 @@ var AirmetForm = function AirmetForm(_ref) {
8939
9205
  }, [updateTac, watch]);
8940
9206
  var onUpdateStartgeoJSON = useCallback(function (updatedStartGeoJSON, updateStartGeoJSONIntersection) {
8941
9207
  setValue('startGeometry', updatedStartGeoJSON, {
8942
- shouldValidate: true,
9208
+ shouldValidate: false,
8943
9209
  shouldDirty: isGeometryDirty(watch('startGeometry'), updatedStartGeoJSON)
8944
9210
  });
8945
9211
  setValue('startGeometryIntersect', updateStartGeoJSONIntersection, {
8946
- shouldValidate: true,
9212
+ shouldValidate: false,
8947
9213
  shouldDirty: isGeometryDirty(watch('startGeometryIntersect'), updateStartGeoJSONIntersection)
8948
9214
  });
9215
+ queueMicrotask(function () {
9216
+ return void trigger('startGeometry');
9217
+ });
8949
9218
  onChangeForm();
8950
- }, [setValue, watch, onChangeForm]);
9219
+ }, [setValue, watch, onChangeForm, trigger]);
8951
9220
  var updateStartGeoJson = useCallback(function (newGeoJSON) {
8952
9221
  var _setGeoJSON = setGeoJSON(newGeoJSON),
8953
9222
  newStartGeoJson = _setGeoJSON[0],
@@ -8972,12 +9241,12 @@ var AirmetForm = function AirmetForm(_ref) {
8972
9241
  updateGeojson: updateStartGeoJson
8973
9242
  }), getStartLayer('geoJSONIntersection', 'geojsonlayer-intersection-start')];
8974
9243
  useFormLayers(layers);
8975
- var _React$useState3 = React__default.useState(mode === 'view'),
9244
+ var _React$useState3 = React.useState(mode === 'view'),
8976
9245
  isDisabled = _React$useState3[0],
8977
9246
  setIsDisabled = _React$useState3[1];
8978
9247
  var isReadOnly = mode === 'view';
8979
9248
  var helperText = isReadOnly ? '' : 'Optional';
8980
- React__default.useEffect(function () {
9249
+ React.useEffect(function () {
8981
9250
  var isInDrawMode = activeStartTool !== '';
8982
9251
  if (mode === 'view') {
8983
9252
  setIsDisabled(true);
@@ -9014,98 +9283,98 @@ var AirmetForm = function AirmetForm(_ref) {
9014
9283
  spacing: 2,
9015
9284
  sx: formStyles,
9016
9285
  children: [jsx(Type, {
9017
- productType: "airmet",
9018
9286
  isDisabled: isDisabled,
9019
9287
  isReadOnly: isReadOnly,
9020
- onChange: onChangeForm
9288
+ onChange: onChangeForm,
9289
+ productType: "airmet"
9021
9290
  }), !isCancelAirmet && jsx(Phenomenon, {
9022
- productType: "airmet",
9023
- productConfig: productConfig,
9024
- phenomenaList: phenomenaList,
9025
9291
  isDisabled: isDisabled,
9026
9292
  isReadOnly: isReadOnly,
9027
- onChange: onChangeForm
9293
+ onChange: onChangeForm,
9294
+ phenomenaList: phenomenaList,
9295
+ productConfig: productConfig,
9296
+ productType: "airmet"
9028
9297
  }), !isCancelAirmet && hasSurfaceVisiblity ? jsx(SurfaceVisibility, {
9029
- isReadOnly: isReadOnly,
9030
9298
  isDisabled: isDisabled,
9299
+ isReadOnly: isReadOnly,
9031
9300
  onChange: onChangeForm,
9032
9301
  productConfig: productConfig
9033
9302
  }) : null, !isCancelAirmet && hasSurfaceWind ? jsx(SurfaceWind, {
9034
- isReadOnly: isReadOnly,
9035
9303
  isDisabled: isDisabled,
9304
+ isReadOnly: isReadOnly,
9036
9305
  onChange: onChangeForm,
9037
9306
  productConfig: productConfig
9038
9307
  }) : null, !isCancelAirmet && jsx(ObservationForecast, {
9039
9308
  isDisabled: isDisabled,
9040
9309
  isReadOnly: isReadOnly
9041
9310
  }), !isCancelAirmet && jsx(ObservationForecastTime, {
9311
+ helperText: helperText,
9042
9312
  isDisabled: isDisabled,
9043
9313
  isReadOnly: isReadOnly,
9044
- helperText: helperText,
9045
9314
  onChange: onChangeForm
9046
9315
  }), jsx(ValidFrom, {
9047
- productConfig: productConfig,
9048
9316
  isDisabled: isDisabled,
9049
9317
  isReadOnly: isReadOnly,
9318
+ lockBecauseActive: lockValidFrom,
9050
9319
  onChange: onChangeForm,
9051
9320
  onUserChange: function onUserChange() {
9052
9321
  return setHasUserChangedTime(true);
9053
9322
  },
9054
- lockBecauseActive: lockValidFrom
9323
+ productConfig: productConfig
9055
9324
  }), jsx(ValidUntil, {
9056
- productConfig: productConfig,
9325
+ hasUserChangedTime: hasUserChangedTime,
9057
9326
  isDisabled: isDisabled,
9058
9327
  isReadOnly: isReadOnly,
9059
9328
  onChange: onChangeForm,
9060
- hasUserChangedTime: hasUserChangedTime,
9061
9329
  onUserChange: function onUserChange() {
9062
9330
  return setHasUserChangedTime(true);
9063
- }
9331
+ },
9332
+ productConfig: productConfig
9064
9333
  }), jsx(SelectFIR, {
9065
- isReadOnly: isReadOnly,
9066
9334
  isDisabled: isDisabled,
9067
- productConfig: productConfig,
9335
+ isReadOnly: isReadOnly,
9068
9336
  onChange: function onChange(event, newPhenomenaList) {
9069
9337
  onChangeFir(newPhenomenaList != null ? newPhenomenaList : [], event);
9070
- }
9338
+ },
9339
+ productConfig: productConfig
9071
9340
  }), jsx(StartGeometry, {
9072
- isReadOnly: isReadOnly,
9341
+ activeTool: activeStartTool,
9073
9342
  geoJSON: startGeoJSON,
9074
9343
  geoJSONIntersection: startGeoJSONIntersection,
9075
- tools: startEditModes,
9344
+ isDisabled: drawToolsDisabled,
9345
+ isReadOnly: isReadOnly,
9076
9346
  onChangeTool: onChangeStartTool,
9077
- activeTool: activeStartTool,
9078
9347
  productConfig: productConfig,
9079
- isDisabled: drawToolsDisabled
9348
+ tools: startEditModes
9080
9349
  }), !isCancelAirmet && hasLevels ? jsx(Levels, {
9081
9350
  isDisabled: isDisabled,
9082
9351
  isReadOnly: isReadOnly,
9083
9352
  onChange: onChangeForm,
9084
- productType: "airmet",
9085
- productConfig: productConfig
9353
+ productConfig: productConfig,
9354
+ productType: "airmet"
9086
9355
  }) : null, !isCancelAirmet && hasCloudLevels ? jsx(CloudLevels, {
9087
9356
  isDisabled: isDisabled,
9088
9357
  isReadOnly: isReadOnly,
9089
9358
  onChange: onChangeForm,
9090
9359
  productConfig: productConfig
9091
9360
  }) : null, !isCancelAirmet && jsx(Progress, {
9092
- productType: "airmet",
9093
9361
  isDisabled: isDisabled,
9094
9362
  isReadOnly: isReadOnly,
9095
9363
  onChange: onChangeForm,
9096
- productConfig: productConfig
9364
+ productConfig: productConfig,
9365
+ productType: "airmet"
9097
9366
  }), !isCancelAirmet && jsx(Change, {
9098
9367
  isDisabled: isDisabled,
9099
9368
  isReadOnly: isReadOnly
9100
9369
  }), jsx(IssuedAt, {
9101
- isReadOnly: isReadOnly,
9102
- date: getProductIssueDate(t, initialAirmet, initialCancelAirmet)
9370
+ date: getProductIssueDate(t, initialAirmet, initialCancelAirmet),
9371
+ isReadOnly: isReadOnly
9103
9372
  }), jsxs(Tac, {
9104
- tac: tac,
9105
9373
  product: product,
9374
+ tac: tac,
9106
9375
  children: [jsx(ReactHookFormHiddenInput, {
9107
- name: "sequence",
9108
- defaultValue: "-1"
9376
+ defaultValue: "-1",
9377
+ name: "sequence"
9109
9378
  }), /* Add hidden fields for TAC generation in case of cancel airmet */
9110
9379
  isCancelAirmet ? jsxs(Fragment, {
9111
9380
  children: [jsx(ReactHookFormHiddenInput, {
@@ -9131,8 +9400,8 @@ var AirmetForm = function AirmetForm(_ref) {
9131
9400
  width: '100%'
9132
9401
  },
9133
9402
  children: jsx(ProductFormLayout, {
9134
- productConfig: productConfig,
9135
9403
  geoJSONLayers: layers,
9404
+ productConfig: productConfig,
9136
9405
  children: renderForm()
9137
9406
  })
9138
9407
  });
@@ -9151,24 +9420,24 @@ var CancelSigmetVolcanicMovements = function CancelSigmetVolcanicMovements(_ref)
9151
9420
  variant: "body1",
9152
9421
  children: [t('vulcanic-ash-description'), ":"]
9153
9422
  }), jsxs(ReactHookFormRadioGroup, {
9423
+ defaultValue: t('unknown').toUpperCase(),
9154
9424
  name: "vaSigmetMoveToFIR",
9425
+ row: true,
9155
9426
  rules: {
9156
9427
  validate: {
9157
9428
  isRequired: isRequired
9158
9429
  }
9159
9430
  },
9160
- row: true,
9161
- defaultValue: t('unknown').toUpperCase(),
9162
9431
  children: [allFIRS[sigmet.locationIndicatorATSR].adjacent_firs.map(function (adjacentFIR) {
9163
9432
  return jsx(FormControlLabel, {
9164
- value: adjacentFIR,
9165
9433
  control: jsx(Radio, {}),
9166
- label: adjacentFIR
9434
+ label: adjacentFIR,
9435
+ value: adjacentFIR
9167
9436
  }, adjacentFIR);
9168
9437
  }), jsx(FormControlLabel, {
9169
- value: "UNKNOWN",
9170
9438
  control: jsx(Radio, {}),
9171
- label: t('vulcanic-VA-SIGMET-text')
9439
+ label: t('vulcanic-VA-SIGMET-text'),
9440
+ value: "UNKNOWN"
9172
9441
  }, "UNKNOWN")]
9173
9442
  })]
9174
9443
  });
@@ -9226,7 +9495,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9226
9495
  dialogActionsDisabled = _React$useState3[0],
9227
9496
  setDialogActionsDisabled = _React$useState3[1];
9228
9497
  var postProduct = function postProduct(productToPost, newStatus) {
9229
- var uuid = product !== null && product.uuid ? product.uuid : null;
9498
+ var uuid = product != null && product.uuid ? product.uuid : null;
9230
9499
  var postProductParam = productType === 'sigmet' ? createSigmetPostParameter(productToPost, newStatus, uuid) : createAirmetPostParameter(productToPost, newStatus, uuid);
9231
9500
  apiCall(postProductParam).then(function () {
9232
9501
  onToggleDialog();
@@ -9241,27 +9510,40 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9241
9510
  }
9242
9511
  toggleDialogStatus(shouldRefreshList);
9243
9512
  };
9244
- var showConfirmDialog = function showConfirmDialog(action) {
9245
- return confirmationDialog({
9246
- title: getConfirmationDialogTitle(t, action, productType),
9247
- description: getConfirmationDialogContent(t, action, productType),
9248
- confirmLabel: getConfirmationDialogButtonLabel(t, action, productType),
9249
- cancelLabel: getConfirmationDialogCancelLabel(t, action),
9250
- catchOnCancel: action === ProductAction.CLOSE,
9251
- content: isVAPhenomenon(product, action) && !isShortTest() ? jsx(CancelSigmetVolcanicMovements, {
9252
- sigmet: product,
9253
- productConfig: productConfig
9254
- }) : null
9255
- });
9256
- };
9257
- var onProductButtonPress = /*#__PURE__*/function () {
9513
+ var showConfirmDialog = /*#__PURE__*/function () {
9258
9514
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(action) {
9259
- var isDraft, formValues;
9260
9515
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9261
9516
  while (1) switch (_context.prev = _context.next) {
9262
9517
  case 0:
9263
- _context.t0 = action;
9264
- _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;
9265
9547
  break;
9266
9548
  case 3:
9267
9549
  if (mode === 'view' || !isDirty) {
@@ -9279,7 +9561,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9279
9561
  }
9280
9562
  });
9281
9563
  }
9282
- return _context.abrupt("break", 22);
9564
+ return _context2.abrupt("break", 22);
9283
9565
  case 5:
9284
9566
  void showConfirmDialog(action).then(function () {
9285
9567
  // if volcanic sigmet - add to which FIR it's moving
@@ -9289,7 +9571,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9289
9571
  postProduct(product, 'CANCELLED');
9290
9572
  }
9291
9573
  });
9292
- return _context.abrupt("break", 22);
9574
+ return _context2.abrupt("break", 22);
9293
9575
  case 7:
9294
9576
  void showConfirmDialog(action).then(function () {
9295
9577
  // If we're discarding a new SIGMET/AIRMET - just close the dialog
@@ -9300,23 +9582,23 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9300
9582
  postProduct(product, 'DISCARDED');
9301
9583
  }
9302
9584
  });
9303
- return _context.abrupt("break", 22);
9585
+ return _context2.abrupt("break", 22);
9304
9586
  case 9:
9305
9587
  onRenewClick();
9306
- return _context.abrupt("break", 22);
9588
+ return _context2.abrupt("break", 22);
9307
9589
  case 11:
9308
9590
  isDraft = action === ProductAction.SAVE;
9309
9591
  toggleIsDraft(isDraft);
9310
9592
  if (!isDraft) {
9311
- _context.next = 20;
9593
+ _context2.next = 20;
9312
9594
  break;
9313
9595
  }
9314
- _context.next = 16;
9596
+ _context2.next = 16;
9315
9597
  return trigger();
9316
9598
  case 16:
9317
9599
  formValues = getValues(); // Save draft without blocking on validation
9318
9600
  postProduct(formValues, 'DRAFT');
9319
- _context.next = 21;
9601
+ _context2.next = 21;
9320
9602
  break;
9321
9603
  case 20:
9322
9604
  // Validate and submit normally (will block if invalid)
@@ -9326,29 +9608,23 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9326
9608
  });
9327
9609
  })();
9328
9610
  case 21:
9329
- return _context.abrupt("break", 22);
9611
+ return _context2.abrupt("break", 22);
9330
9612
  case 22:
9331
9613
  case "end":
9332
- return _context.stop();
9614
+ return _context2.stop();
9333
9615
  }
9334
- }, _callee);
9616
+ }, _callee2);
9335
9617
  }));
9336
- return function onProductButtonPress(_x) {
9337
- return _ref2.apply(this, arguments);
9618
+ return function onProductButtonPress(_x2) {
9619
+ return _ref3.apply(this, arguments);
9338
9620
  };
9339
9621
  }();
9340
9622
  var title = getDialogtitle(t, product, productType, productConfig);
9341
9623
  return jsxs(CustomDialog, {
9342
- open: isOpen,
9343
9624
  "data-testid": "productform-dialog",
9344
- title: title,
9345
- fullWidth: true,
9346
- maxWidth: "xl",
9347
9625
  disableEnforceFocus: true,
9348
9626
  disableEscapeKeyDown: true,
9349
- onClose: function onClose() {
9350
- void onProductButtonPress(ProductAction.CLOSE);
9351
- },
9627
+ fullWidth: true,
9352
9628
  headerActions: getLifecycleActions({
9353
9629
  canBe: productCanBe,
9354
9630
  onButtonPress: onProductButtonPress,
@@ -9356,19 +9632,25 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9356
9632
  areActionsDisabled: dialogActionsDisabled,
9357
9633
  t: t
9358
9634
  }),
9635
+ maxWidth: "xl",
9636
+ onClose: function onClose() {
9637
+ void onProductButtonPress(ProductAction.CLOSE);
9638
+ },
9639
+ open: isOpen,
9640
+ style: {
9641
+ zIndex: 1000
9642
+ },
9359
9643
  sx: {
9360
9644
  height: '100%',
9361
9645
  '.MuiDialogContent-root': {
9362
9646
  padding: 0
9363
9647
  }
9364
9648
  },
9365
- style: {
9366
- zIndex: 1000
9367
- },
9649
+ title: title,
9368
9650
  children: [errorStoreMessage ? jsx(AlertBanner, {
9651
+ info: errorStoreMessageText,
9369
9652
  severity: "error",
9370
- title: "An error has occurred while saving, please try again",
9371
- info: errorStoreMessageText
9653
+ title: "An error has occurred while saving, please try again"
9372
9654
  }) : null, jsx(Box, {
9373
9655
  sx: {
9374
9656
  display: 'flex',
@@ -9376,20 +9658,20 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9376
9658
  height: '100%'
9377
9659
  },
9378
9660
  children: productType === 'sigmet' ? jsx(SigmetForm, {
9379
- mode: mode,
9380
- isCancelSigmet: product !== null && isInstanceOfCancelSigmet(product),
9381
- initialSigmet: product !== null && !isInstanceOfCancelSigmet(product) ? product : null,
9382
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,
9383
9666
  productConfig: productConfig,
9384
- setDialogActionsDisabled: setDialogActionsDisabled,
9385
- product: product
9667
+ setDialogActionsDisabled: setDialogActionsDisabled
9386
9668
  }) : jsx(AirmetForm, {
9387
- mode: mode,
9388
- isCancelAirmet: product !== null && isInstanceOfCancelAirmet(product),
9389
9669
  initialAirmet: product !== null && !isInstanceOfCancelAirmet(product) ? product : null,
9390
9670
  initialCancelAirmet: product !== null && isInstanceOfCancelAirmet(product) ? product : null,
9391
- productConfig: productConfig,
9392
- product: product
9671
+ isCancelAirmet: product !== null && isInstanceOfCancelAirmet(product),
9672
+ mode: mode,
9673
+ product: product,
9674
+ productConfig: productConfig
9393
9675
  })
9394
9676
  }), jsx(DraftFieldHelper, {}), jsx(Backdrop, {
9395
9677
  "data-testid": "loader",
@@ -9404,8 +9686,8 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9404
9686
  })]
9405
9687
  });
9406
9688
  };
9407
- var Wrapper = function Wrapper(_ref3) {
9408
- var props = Object.assign({}, (_objectDestructuringEmpty(_ref3), _ref3));
9689
+ var Wrapper = function Wrapper(_ref4) {
9690
+ var props = Object.assign({}, (_objectDestructuringEmpty(_ref4), _ref4));
9409
9691
  return jsx(ReactHookFormProvider, {
9410
9692
  options: Object.assign({}, defaultFormOptions, {
9411
9693
  defaultValues: props.product,
@@ -9445,15 +9727,15 @@ var ProductFormDialog = function ProductFormDialog(_ref) {
9445
9727
  var product = productListItem !== null ? prepareProductValues(productType === 'sigmet' ? productListItem[productType] : productListItem[productType], productType, productConfig) : null;
9446
9728
  return jsx(Wrapper, {
9447
9729
  isOpen: isOpen,
9448
- toggleDialogStatus: toggleDialogStatus,
9730
+ mode: mode,
9449
9731
  onRenewClick: function onRenewClick() {
9450
9732
  return handleRenewProductClick(productListItem);
9451
9733
  },
9452
- mode: mode,
9453
- productCanBe: productCanBe,
9454
9734
  product: product,
9735
+ productCanBe: productCanBe,
9736
+ productConfig: productConfig,
9455
9737
  productType: productType,
9456
- productConfig: productConfig
9738
+ toggleDialogStatus: toggleDialogStatus
9457
9739
  });
9458
9740
  };
9459
9741
 
@@ -9483,8 +9765,8 @@ var getActiveStatus = function getActiveStatus(product) {
9483
9765
  var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9484
9766
  if (cancelsSeqId !== null) {
9485
9767
  return jsx(StatusTag, {
9486
- content: "cancels " + cancelsSeqId,
9487
9768
  color: "red",
9769
+ content: "cancels " + cancelsSeqId,
9488
9770
  sx: {
9489
9771
  width: '80px'
9490
9772
  }
@@ -9492,8 +9774,8 @@ var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9492
9774
  }
9493
9775
  if (product.status === 'CANCELLED') {
9494
9776
  return jsx(StatusTag, {
9495
- content: "cancelled " + product.sequence,
9496
9777
  color: "red",
9778
+ content: "cancelled " + product.sequence,
9497
9779
  sx: {
9498
9780
  width: '80px'
9499
9781
  }
@@ -9501,16 +9783,16 @@ var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9501
9783
  }
9502
9784
  if (dateUtils.utc(product.validDateEnd) < dateUtils.utc()) {
9503
9785
  return jsx(StatusTag, {
9504
- content: "expired",
9505
9786
  color: "grey",
9787
+ content: "expired",
9506
9788
  sx: {
9507
9789
  width: '80px'
9508
9790
  }
9509
9791
  });
9510
9792
  }
9511
9793
  return jsx(StatusTag, {
9512
- content: product.status.toLowerCase(),
9513
9794
  color: product.status === 'PUBLISHED' ? 'green' : 'grey',
9795
+ content: product.status.toLowerCase(),
9514
9796
  sx: {
9515
9797
  marginRight: '0!important',
9516
9798
  width: '80px'
@@ -9616,14 +9898,15 @@ var ProductListRow = function ProductListRow(_ref2) {
9616
9898
  t = _useSigmetAirmetTrans.t;
9617
9899
  var _useIsMounted = useIsMounted(),
9618
9900
  isMounted = _useIsMounted.isMounted;
9619
- var _React$useState = React__default.useState(''),
9901
+ // eslint-disable-next-line react/hook-use-state
9902
+ var _React$useState = React.useState(''),
9620
9903
  TAC = _React$useState[0],
9621
9904
  setTAC = _React$useState[1];
9622
9905
  var _useTACApi = useTACApi(),
9623
9906
  fetchSigmetTAC = _useTACApi.fetchSigmetTAC,
9624
9907
  fetchAirmetTAC = _useTACApi.fetchAirmetTAC;
9625
9908
  var apiCall = productType === 'sigmet' ? fetchSigmetTAC : fetchAirmetTAC;
9626
- React__default.useEffect(function () {
9909
+ React.useEffect(function () {
9627
9910
  var retrieveTAC = /*#__PURE__*/function () {
9628
9911
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(productToPost) {
9629
9912
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -9682,26 +9965,26 @@ var ProductListRow = function ProductListRow(_ref2) {
9682
9965
  };
9683
9966
  return jsx(Card, {
9684
9967
  elevation: 0,
9685
- variant: "outlined",
9686
9968
  sx: listRowStyles,
9969
+ variant: "outlined",
9687
9970
  children: jsx(Box, {
9688
9971
  className: "productListContainer",
9689
9972
  children: jsxs(Grid, {
9690
- container: true,
9691
9973
  alignItems: "center",
9692
- spacing: 0,
9693
9974
  className: "rowContainer",
9975
+ container: true,
9976
+ spacing: 0,
9694
9977
  children: [jsxs(Grid, {
9695
9978
  className: "col-1",
9696
9979
  children: [phenomenon !== null && jsx(ProductListRowHeader, {
9697
9980
  title: productType.toUpperCase()
9698
9981
  }), jsx(CustomTooltip, {
9699
- title: phenomenon !== null ? String(getPhenomenon(fir, phenomenon, productConfig)) : '',
9700
9982
  placement: "bottom-start",
9983
+ title: phenomenon !== null ? String(getPhenomenon(fir, phenomenon, productConfig)) : '',
9701
9984
  children: jsx(Typography, {
9702
- variant: "subtitle2",
9703
9985
  noWrap: true,
9704
9986
  sx: styles.font,
9987
+ variant: "subtitle2",
9705
9988
  children: phenomenon !== null ? getLabel(product) : 'Cancel'
9706
9989
  })
9707
9990
  })]
@@ -9710,6 +9993,19 @@ var ProductListRow = function ProductListRow(_ref2) {
9710
9993
  children: [jsx(ProductListRowHeader, {
9711
9994
  title: t('issue-time')
9712
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
+ },
9713
10009
  title: jsxs(Fragment, {
9714
10010
  children: [jsx(ProductListRowHeader, {
9715
10011
  title: "TAC"
@@ -9717,7 +10013,6 @@ var ProductListRow = function ProductListRow(_ref2) {
9717
10013
  style: {
9718
10014
  whiteSpace: 'pre-line'
9719
10015
  },
9720
- variant: "subtitle2",
9721
10016
  sx: Object.assign({}, styles.font, {
9722
10017
  color: 'geowebColors.typographyAndIcons.text',
9723
10018
  fontSize: '1.125rem',
@@ -9726,26 +10021,14 @@ var ProductListRow = function ProductListRow(_ref2) {
9726
10021
  lineHeight: '28px',
9727
10022
  letterSpacing: '0.5px'
9728
10023
  }),
10024
+ variant: "subtitle2",
9729
10025
  children: TAC
9730
10026
  })]
9731
10027
  }),
9732
- placement: "bottom-start",
9733
- slotProps: {
9734
- tooltip: {
9735
- sx: {
9736
- bgcolor: 'geowebColors.background.surface',
9737
- boxShadow: 8,
9738
- '& .MuiTooltip-arrow': {
9739
- color: 'common.black'
9740
- },
9741
- maxWidth: 472
9742
- }
9743
- }
9744
- },
9745
10028
  children: jsx(Typography, {
9746
- variant: "subtitle2",
9747
- sx: styles.font,
9748
10029
  "data-testid": "issueTime",
10030
+ sx: styles.font,
10031
+ variant: "subtitle2",
9749
10032
  children: product.issueDate ? dateUtils.dateToString(dateUtils.utc(product.issueDate), dateUtils.DATE_FORMAT_NAME_OF_MONTH) + " UTC" : t('not-published')
9750
10033
  })
9751
10034
  })]
@@ -9754,20 +10037,20 @@ var ProductListRow = function ProductListRow(_ref2) {
9754
10037
  children: [jsx(ProductListRowHeader, {
9755
10038
  title: t('valid-time')
9756
10039
  }), jsx(Typography, {
9757
- variant: "subtitle2",
9758
- sx: styles.font,
9759
10040
  "data-testid": "validTime",
10041
+ sx: styles.font,
10042
+ variant: "subtitle2",
9760
10043
  children: validTime
9761
10044
  })]
9762
10045
  }), jsxs(Grid, {
9763
10046
  className: "col-4",
9764
10047
  container: true,
9765
10048
  children: [product.status === 'DRAFT' ? jsx(Button, {
10049
+ startIcon: jsx(Edit, {}),
9766
10050
  sx: {
9767
10051
  marginTop: '6px'
9768
10052
  },
9769
10053
  variant: "flat",
9770
- startIcon: jsx(Edit, {}),
9771
10054
  children: t('draft')
9772
10055
  }) : getStatusTagList(product, cancelsSeqId), product.status === 'PUBLISHED' && cancelsSeqId === null && getActiveStatus(product)]
9773
10056
  })]
@@ -9787,9 +10070,9 @@ var ProductList = function ProductList(_ref) {
9787
10070
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
9788
10071
  t = _useSigmetAirmetTrans.t;
9789
10072
  return jsxs(Fragment, {
9790
- children: [isLoading && jsx(LinearProgress, {
9791
- "data-testid": "productlist-loadingbar",
10073
+ children: [!!isLoading && jsx(LinearProgress, {
9792
10074
  color: "secondary",
10075
+ "data-testid": "productlist-loadingbar",
9793
10076
  sx: {
9794
10077
  position: 'absolute',
9795
10078
  width: '100%',
@@ -9797,7 +10080,7 @@ var ProductList = function ProductList(_ref) {
9797
10080
  left: 0,
9798
10081
  top: 0
9799
10082
  }
9800
- }), error && jsx(Box, {
10083
+ }), !!error && jsx(Box, {
9801
10084
  sx: {
9802
10085
  marginBottom: 2,
9803
10086
  ' .MuiAlert-message': {
@@ -9805,25 +10088,25 @@ var ProductList = function ProductList(_ref) {
9805
10088
  }
9806
10089
  },
9807
10090
  children: jsx(AlertBanner, {
9808
- severity: "error",
9809
- title: error.name,
10091
+ dataTestId: "productList-alert",
9810
10092
  info: error.message ? error.message : '',
9811
- dataTestId: "productList-alert"
10093
+ severity: "error",
10094
+ title: error.name
9812
10095
  })
9813
10096
  }), jsxs(Grid, {
10097
+ alignItems: "stretch",
9814
10098
  container: true,
9815
10099
  direction: "column",
9816
- alignItems: "stretch",
9817
10100
  children: [jsx(Grid, {
9818
10101
  container: true,
9819
10102
  justifyContent: "flex-end",
9820
10103
  children: jsx(Button, {
9821
- variant: "primary",
9822
10104
  "data-testid": "productListCreateButton",
9823
10105
  onClick: onClickNewProduct,
9824
10106
  sx: {
9825
10107
  textTransform: 'initial'
9826
10108
  },
10109
+ variant: "primary",
9827
10110
  children: t('create-new-product', {
9828
10111
  product: productType.toUpperCase()
9829
10112
  })
@@ -9833,7 +10116,7 @@ var ProductList = function ProductList(_ref) {
9833
10116
  width: '100%',
9834
10117
  minHeight: '600px'
9835
10118
  },
9836
- children: productList && jsx(List, {
10119
+ children: !!productList && jsx(List, {
9837
10120
  sx: {
9838
10121
  paddingTop: 4,
9839
10122
  containerType: 'inline-size'
@@ -9850,8 +10133,8 @@ var ProductList = function ProductList(_ref) {
9850
10133
  },
9851
10134
  children: jsx(ProductListRow, {
9852
10135
  product: product,
9853
- productType: productType,
9854
- productConfig: productConfig
10136
+ productConfig: productConfig,
10137
+ productType: productType
9855
10138
  })
9856
10139
  }, product.uuid);
9857
10140
  })
@@ -9934,14 +10217,14 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
9934
10217
  errorList = _useProductApi.error,
9935
10218
  productList = _useProductApi.result,
9936
10219
  fetchNewProductList = _useProductApi.fetchNewData;
9937
- var _React$useState = React__default.useState(false),
10220
+ var _React$useState = React.useState(false),
9938
10221
  isFormDialogOpen = _React$useState[0],
9939
10222
  setIsFormDialogOpen = _React$useState[1];
9940
- var _React$useState2 = React__default.useState(),
10223
+ var _React$useState2 = React.useState(),
9941
10224
  selectedProduct = _React$useState2[0],
9942
10225
  setSelectedProduct = _React$useState2[1];
9943
10226
  usePoller([productList, errorList], fetchNewProductList, 60000);
9944
- React__default.useEffect(function () {
10227
+ React.useEffect(function () {
9945
10228
  if (selectedProduct && !isFormDialogOpen) {
9946
10229
  toggleDialogOpen();
9947
10230
  }
@@ -9952,7 +10235,7 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
9952
10235
  shouldRefreshList = true;
9953
10236
  }
9954
10237
  // Refresh list on closing dialog
9955
- if (isFormDialogOpen === true && shouldRefreshList) {
10238
+ if (isFormDialogOpen && shouldRefreshList) {
9956
10239
  void fetchNewProductList();
9957
10240
  }
9958
10241
  setIsFormDialogOpen(!isFormDialogOpen);
@@ -9984,20 +10267,20 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
9984
10267
  },
9985
10268
  children: [jsx(ProductList, {
9986
10269
  "data-testid": "sigmetAirmetList",
9987
- productList: productList,
9988
- productType: productType,
9989
- productConfig: productConfig,
9990
- isLoading: isLoadingList,
9991
10270
  error: errorList,
10271
+ isLoading: isLoadingList,
10272
+ onClickNewProduct: handleNewProductClick,
9992
10273
  onClickProductRow: handleProductRowClick,
9993
- onClickNewProduct: handleNewProductClick
9994
- }), jsx(ProductFormDialog, {
9995
- productType: productType,
9996
10274
  productConfig: productConfig,
9997
- isOpen: isFormDialogOpen,
9998
- toggleDialogStatus: toggleDialogOpen,
10275
+ productList: productList,
10276
+ productType: productType
10277
+ }), jsx(ProductFormDialog, {
9999
10278
  handleRenewProductClick: handleRenewProductClick,
10000
- productListItem: selectedProduct
10279
+ isOpen: isFormDialogOpen,
10280
+ productConfig: productConfig,
10281
+ productListItem: selectedProduct,
10282
+ productType: productType,
10283
+ toggleDialogStatus: toggleDialogOpen
10001
10284
  })]
10002
10285
  });
10003
10286
  };
@@ -10019,19 +10302,19 @@ var DownloadSigmetAirmetConfigWrapper = function DownloadSigmetAirmetConfigWrapp
10019
10302
  }
10020
10303
  if (error) {
10021
10304
  return jsx(AlertBanner, {
10022
- title: t('error-title'),
10023
- info: !isLoggedIn ? t('error-auth-login') : error.message
10305
+ info: !isLoggedIn ? t('error-auth-login') : error.message,
10306
+ title: t('error-title')
10024
10307
  });
10025
10308
  }
10026
10309
  if (!productConfig) {
10027
10310
  return jsx(AlertBanner, {
10028
- title: t('error-title'),
10029
- info: t('error-no-config-found')
10311
+ info: t('error-no-config-found'),
10312
+ title: t('error-title')
10030
10313
  });
10031
10314
  }
10032
10315
  return jsx(MetInfoWrapper, {
10033
- productType: productType,
10034
- productConfig: productConfig
10316
+ productConfig: productConfig,
10317
+ productType: productType
10035
10318
  });
10036
10319
  };
10037
10320
 
@@ -10059,17 +10342,17 @@ ConnectedModuleWrapper) {
10059
10342
  case 'SigmetModule':
10060
10343
  if (ConnectedModuleWrapper) {
10061
10344
  return jsx(ConnectedModuleWrapper, {
10345
+ auth: auth,
10062
10346
  component: AviationProductApiWrapper,
10063
- payload: payload,
10064
10347
  config: config,
10065
- auth: auth,
10066
10348
  onSetAuth: onSetAuth,
10349
+ payload: payload,
10067
10350
  productType: "sigmet"
10068
10351
  });
10069
10352
  }
10070
10353
  return jsx(AviationProductApiWrapper, {
10071
- config: config,
10072
10354
  auth: auth,
10355
+ config: config,
10073
10356
  onSetAuth: onSetAuth,
10074
10357
  productType: "sigmet"
10075
10358
  });
@@ -10092,17 +10375,17 @@ ConnectedModuleWrapper) {
10092
10375
  case 'AirmetModule':
10093
10376
  if (ConnectedModuleWrapper) {
10094
10377
  return jsx(ConnectedModuleWrapper, {
10378
+ auth: auth,
10095
10379
  component: AviationProductApiWrapper,
10096
- payload: payload,
10097
10380
  config: config,
10098
- auth: auth,
10099
10381
  onSetAuth: onSetAuth,
10382
+ payload: payload,
10100
10383
  productType: "airmet"
10101
10384
  });
10102
10385
  }
10103
10386
  return jsx(AviationProductApiWrapper, {
10104
- config: config,
10105
10387
  auth: auth,
10388
+ config: config,
10106
10389
  onSetAuth: onSetAuth,
10107
10390
  productType: "airmet"
10108
10391
  });