@opengeoweb/sigmet-airmet 15.3.0 → 17.0.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 (117) hide show
  1. package/index.esm.js +1186 -489
  2. package/package.json +11 -11
  3. package/src/index.d.ts +0 -18
  4. package/src/lib/AirmetDemo.stories.d.ts +0 -11
  5. package/src/lib/SigmetDemo.stories.d.ts +0 -11
  6. package/src/lib/api/api.d.ts +0 -17
  7. package/src/lib/api/hooks.d.ts +0 -16
  8. package/src/lib/api/hooks.spec.d.ts +0 -1
  9. package/src/lib/api/testApi.d.ts +0 -20
  10. package/src/lib/components/ComponentsLookUp/AirmetComponentsLookUp.d.ts +0 -11
  11. package/src/lib/components/ComponentsLookUp/AirmetComponentsLookUp.spec.d.ts +0 -1
  12. package/src/lib/components/ComponentsLookUp/AviationProductApiWrapper.d.ts +0 -8
  13. package/src/lib/components/ComponentsLookUp/AviationProductApiWrapper.spec.d.ts +0 -1
  14. package/src/lib/components/ComponentsLookUp/SigmetComponentsLookUp.d.ts +0 -11
  15. package/src/lib/components/ComponentsLookUp/SigmetComponentsLookUp.spec.d.ts +0 -1
  16. package/src/lib/components/ComponentsLookUp/index.d.ts +0 -2
  17. package/src/lib/components/ConfigurationDemo/ConfigrationDemo.stories.d.ts +0 -46
  18. package/src/lib/components/ConfigurationDemo/configurations.d.ts +0 -7
  19. package/src/lib/components/MapViewGeoJson/MapViewGeoJson.d.ts +0 -11
  20. package/src/lib/components/MapViewGeoJson/MapViewGeoJson.spec.d.ts +0 -1
  21. package/src/lib/components/MapViewGeoJson/MapViewGeoJson.stories.d.ts +0 -9
  22. package/src/lib/components/MapViewGeoJson/constants.d.ts +0 -41
  23. package/src/lib/components/MapViewGeoJson/index.d.ts +0 -1
  24. package/src/lib/components/MetInfoWrapper/DownloadSigmetAirmetConfigWrapper.d.ts +0 -7
  25. package/src/lib/components/MetInfoWrapper/DownloadSigmetAirmetConfigWrapper.spec.d.ts +0 -1
  26. package/src/lib/components/MetInfoWrapper/MetInfoWrapper.d.ts +0 -15
  27. package/src/lib/components/MetInfoWrapper/MetInfoWrapper.spec.d.ts +0 -1
  28. package/src/lib/components/MetInfoWrapper/MetInfoWrapper.stories.d.ts +0 -7
  29. package/src/lib/components/MetInfoWrapper/MetInfoWrapper.tac.spec.d.ts +0 -1
  30. package/src/lib/components/MetInfoWrapper/index.d.ts +0 -2
  31. package/src/lib/components/MetInfoWrapper/utils.d.ts +0 -13
  32. package/src/lib/components/MetInfoWrapper/utils.spec.d.ts +0 -1
  33. package/src/lib/components/ProductForms/AirmetForm/AirmetForm.d.ts +0 -18
  34. package/src/lib/components/ProductForms/AirmetForm/AirmetForm.spec.d.ts +0 -1
  35. package/src/lib/components/ProductForms/AirmetForm/AirmetForm.stories.d.ts +0 -121
  36. package/src/lib/components/ProductForms/AirmetForm/AirmetForm.validations.spec.d.ts +0 -1
  37. package/src/lib/components/ProductForms/ProductForm.styles.d.ts +0 -125
  38. package/src/lib/components/ProductForms/ProductFormDialog.Airmet.stories.d.ts +0 -15
  39. package/src/lib/components/ProductForms/ProductFormDialog.Draw.stories.d.ts +0 -11
  40. package/src/lib/components/ProductForms/ProductFormDialog.Sigmet.stories.d.ts +0 -16
  41. package/src/lib/components/ProductForms/ProductFormDialog.actions.spec.d.ts +0 -1
  42. package/src/lib/components/ProductForms/ProductFormDialog.d.ts +0 -12
  43. package/src/lib/components/ProductForms/ProductFormDialog.spec.d.ts +0 -1
  44. package/src/lib/components/ProductForms/ProductFormDialogContent.d.ts +0 -18
  45. package/src/lib/components/ProductForms/ProductFormDialogContent.spec.d.ts +0 -1
  46. package/src/lib/components/ProductForms/ProductFormFields/Change.d.ts +0 -4
  47. package/src/lib/components/ProductForms/ProductFormFields/Change.spec.d.ts +0 -1
  48. package/src/lib/components/ProductForms/ProductFormFields/CloudLevels.d.ts +0 -12
  49. package/src/lib/components/ProductForms/ProductFormFields/CloudLevels.spec.d.ts +0 -1
  50. package/src/lib/components/ProductForms/ProductFormFields/DrawTools.d.ts +0 -11
  51. package/src/lib/components/ProductForms/ProductFormFields/DrawTools.spec.d.ts +0 -1
  52. package/src/lib/components/ProductForms/ProductFormFields/IssuedAt.d.ts +0 -7
  53. package/src/lib/components/ProductForms/ProductFormFields/IssuedAt.spec.d.ts +0 -1
  54. package/src/lib/components/ProductForms/ProductFormFields/Levels.d.ts +0 -16
  55. package/src/lib/components/ProductForms/ProductFormFields/Levels.spec.d.ts +0 -1
  56. package/src/lib/components/ProductForms/ProductFormFields/ObservationForecast.d.ts +0 -4
  57. package/src/lib/components/ProductForms/ProductFormFields/ObservationForecast.spec.d.ts +0 -1
  58. package/src/lib/components/ProductForms/ProductFormFields/ObservationForecastTime.d.ts +0 -7
  59. package/src/lib/components/ProductForms/ProductFormFields/ObservationForecastTime.spec.d.ts +0 -1
  60. package/src/lib/components/ProductForms/ProductFormFields/Phenomenon.d.ts +0 -6
  61. package/src/lib/components/ProductForms/ProductFormFields/Phenomenon.spec.d.ts +0 -1
  62. package/src/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.d.ts +0 -8
  63. package/src/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.spec.d.ts +0 -1
  64. package/src/lib/components/ProductForms/ProductFormFields/Progress.d.ts +0 -19
  65. package/src/lib/components/ProductForms/ProductFormFields/Progress.spec.d.ts +0 -1
  66. package/src/lib/components/ProductForms/ProductFormFields/RadioButtonAndLabel.d.ts +0 -8
  67. package/src/lib/components/ProductForms/ProductFormFields/RadioButtonAndLabel.spec.d.ts +0 -1
  68. package/src/lib/components/ProductForms/ProductFormFields/SelectFIR.d.ts +0 -12
  69. package/src/lib/components/ProductForms/ProductFormFields/SelectFIR.spec.d.ts +0 -1
  70. package/src/lib/components/ProductForms/ProductFormFields/StartGeometry.d.ts +0 -15
  71. package/src/lib/components/ProductForms/ProductFormFields/StartGeometry.spec.d.ts +0 -1
  72. package/src/lib/components/ProductForms/ProductFormFields/SurfaceVisibility.d.ts +0 -10
  73. package/src/lib/components/ProductForms/ProductFormFields/SurfaceVisibility.spec.d.ts +0 -1
  74. package/src/lib/components/ProductForms/ProductFormFields/SurfaceWind.d.ts +0 -8
  75. package/src/lib/components/ProductForms/ProductFormFields/SurfaceWind.spec.d.ts +0 -1
  76. package/src/lib/components/ProductForms/ProductFormFields/Tac.d.ts +0 -9
  77. package/src/lib/components/ProductForms/ProductFormFields/Tac.spec.d.ts +0 -1
  78. package/src/lib/components/ProductForms/ProductFormFields/Type.d.ts +0 -4
  79. package/src/lib/components/ProductForms/ProductFormFields/Type.spec.d.ts +0 -1
  80. package/src/lib/components/ProductForms/ProductFormFields/ValidFrom.d.ts +0 -10
  81. package/src/lib/components/ProductForms/ProductFormFields/ValidFrom.spec.d.ts +0 -1
  82. package/src/lib/components/ProductForms/ProductFormFields/ValidUntil.d.ts +0 -5
  83. package/src/lib/components/ProductForms/ProductFormFields/ValidUntil.spec.d.ts +0 -1
  84. package/src/lib/components/ProductForms/ProductFormFields/VolcanicFields.d.ts +0 -8
  85. package/src/lib/components/ProductForms/ProductFormFields/VolcanicFields.spec.d.ts +0 -1
  86. package/src/lib/components/ProductForms/ProductFormFields/index.d.ts +0 -17
  87. package/src/lib/components/ProductForms/ProductFormLayout.d.ts +0 -11
  88. package/src/lib/components/ProductForms/ProductFormLayout.spec.d.ts +0 -1
  89. package/src/lib/components/ProductForms/ProductFormTac.d.ts +0 -18
  90. package/src/lib/components/ProductForms/ProductFormTac.spec.d.ts +0 -1
  91. package/src/lib/components/ProductForms/SigmetForm/SigmetCancelVolcanicMovements.d.ts +0 -8
  92. package/src/lib/components/ProductForms/SigmetForm/SigmetForm.d.ts +0 -20
  93. package/src/lib/components/ProductForms/SigmetForm/SigmetForm.spec.d.ts +0 -1
  94. package/src/lib/components/ProductForms/SigmetForm/SigmetForm.stories.d.ts +0 -121
  95. package/src/lib/components/ProductForms/SigmetForm/SigmetForm.validations.spec.d.ts +0 -1
  96. package/src/lib/components/ProductForms/index.d.ts +0 -2
  97. package/src/lib/components/ProductForms/useStoredGeoJSONHandling.d.ts +0 -26
  98. package/src/lib/components/ProductForms/useStoredGeoJSONHandling.spec.d.ts +0 -1
  99. package/src/lib/components/ProductForms/utils.d.ts +0 -89
  100. package/src/lib/components/ProductForms/utils.spec.d.ts +0 -1
  101. package/src/lib/components/ProductList/ProductList.d.ts +0 -13
  102. package/src/lib/components/ProductList/ProductList.spec.d.ts +0 -1
  103. package/src/lib/components/ProductList/ProductList.stories.d.ts +0 -65
  104. package/src/lib/components/ProductList/ProductListRow.d.ts +0 -11
  105. package/src/lib/components/ProductList/ProductListRow.spec.d.ts +0 -1
  106. package/src/lib/components/ProductList/index.d.ts +0 -2
  107. package/src/lib/components/Providers/Providers.d.ts +0 -11
  108. package/src/lib/components/Providers/index.d.ts +0 -1
  109. package/src/lib/hooks/useShortTestHelpers.d.ts +0 -4
  110. package/src/lib/hooks/useShortTestHelpers.spec.d.ts +0 -1
  111. package/src/lib/types.d.ts +0 -398
  112. package/src/lib/utils/config/index.d.ts +0 -4
  113. package/src/lib/utils/i18n.d.ts +0 -7
  114. package/src/lib/utils/mockdata/fakeAirmetList.d.ts +0 -9
  115. package/src/lib/utils/mockdata/fakeSigmetList.d.ts +0 -13
  116. package/src/lib/utils/mockdata/index.d.ts +0 -3
  117. package/src/lib/utils/testUtils.d.ts +0 -16
package/index.esm.js CHANGED
@@ -1,18 +1,18 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { sessionStorageProvider, PROJECTION, useIsMounted, dateUtils, usePreventBrowserClose, CustomTooltip, usePrevious, ConfirmationServiceProvider, useConfirmationDialog, CustomDialog, AlertBanner, StatusTag, usePoller, ErrorBoundary } from '@opengeoweb/shared';
3
- import { Box as Box$1 } from '@mui/system';
4
1
  import React, { useRef, useEffect, useCallback } from 'react';
2
+ import { sessionStorageProvider, PROJECTION, dateUtils, useIsMounted, usePreventBrowserClose, CustomTooltip, usePrevious, ConfirmationServiceProvider, useConfirmationDialog, CustomDialog, AlertBanner, StatusTag, usePoller, ErrorBoundary } from '@opengeoweb/shared';
3
+ import { Box as Box$1 } from '@mui/system';
5
4
  import { Grid, Typography, FormControlLabel, Radio, Box, Checkbox, MenuItem, FormHelperText, useTheme, Backdrop, CircularProgress, Card, Button, LinearProgress, List, ListItemButton } from '@mui/material';
6
5
  import { useFormContext } from 'react-hook-form';
7
6
  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';
8
7
  import { useSelector, useDispatch, shallowEqual } from 'react-redux';
9
- import { uiSelectors, useUpdateSharedData, mapSelectors, syncGroupsActions, layerActions, mapActions, defaultLayers, syncConstants, uiActions, uiTypes, genericSelectors, drawingToolActions } from '@opengeoweb/store';
8
+ import { uiSelectors, uiTypes, useUpdateSharedData, mapSelectors, syncGroupsActions, layerActions, mapActions, defaultLayers, syncConstants, uiActions, genericSelectors, drawingToolActions } from '@opengeoweb/store';
10
9
  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';
11
10
  import { useQueryClient, useMutation } from '@tanstack/react-query';
12
- import { getHeaders, handleResponse, useAuthQuery, useAuthenticationContext } from '@opengeoweb/api';
11
+ import { getHeaders, handleResponse, useAuthenticationContext, useAuthQuery } from '@opengeoweb/api';
13
12
  import i18n from 'i18next';
14
13
  import { useTranslation } from 'react-i18next';
15
14
  import { LegendConnect, OlMapViewConnect, TimeSliderConnect } from '@opengeoweb/core';
15
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
16
16
  import { DrawFIRLand, Edit, Success, Clock } from '@opengeoweb/theme';
17
17
  import { LayerType, webmapUtils } from '@opengeoweb/webmap';
18
18
  import { cloneDeep, debounce } from 'lodash';
@@ -834,6 +834,7 @@ function _regeneratorRuntime() {
834
834
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
835
835
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
836
836
  * */
837
+
837
838
  var SA_NAMESPACE = 'sigmetairmet';
838
839
  var ns = [SA_NAMESPACE, FORM_FIELDS_NAMESPACE];
839
840
  var useSigmetAirmetTranslation = function useSigmetAirmetTranslation() {
@@ -888,6 +889,7 @@ var safeFetch = /*#__PURE__*/function () {
888
889
  return _ref.apply(this, arguments);
889
890
  };
890
891
  }();
892
+
891
893
  // API
892
894
  var getAirmetList = /*#__PURE__*/function () {
893
895
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(auth) {
@@ -1356,28 +1358,46 @@ var useShortTestHelpers = function useShortTestHelpers() {
1356
1358
  };
1357
1359
  };
1358
1360
 
1361
+ /* *
1362
+ * Licensed under the Apache License, Version 2.0 (the "License");
1363
+ * you may not use this file except in compliance with the License.
1364
+ * You may obtain a copy of the License at
1365
+ *
1366
+ * http://www.apache.org/licenses/LICENSE-2.0
1367
+ *
1368
+ * Unless required by applicable law or agreed to in writing, software
1369
+ * distributed under the License is distributed on an "AS IS" BASIS,
1370
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1371
+ * See the License for the specific language governing permissions and
1372
+ * limitations under the License.
1373
+ *
1374
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1375
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
1376
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1377
+ * */
1378
+
1359
1379
  /**
1360
1380
  * The possible type for the airmet
1361
1381
  */
1362
- var AirmetType;
1363
- (function (AirmetType) {
1382
+ var AirmetType = /*#__PURE__*/function (AirmetType) {
1364
1383
  AirmetType["NORMAL"] = "Normal";
1365
1384
  AirmetType["TEST"] = "Test";
1366
1385
  AirmetType["EXERCISE"] = "Exercise";
1367
- })(AirmetType || (AirmetType = {}));
1386
+ return AirmetType;
1387
+ }({});
1388
+
1368
1389
  /**
1369
1390
  * The possible type for the sigmet
1370
1391
  */
1371
- var SigmetType;
1372
- (function (SigmetType) {
1392
+ var SigmetType = /*#__PURE__*/function (SigmetType) {
1373
1393
  SigmetType["NORMAL"] = "Normal";
1374
1394
  SigmetType["TEST"] = "Test";
1375
1395
  SigmetType["EXERCISE"] = "Exercise";
1376
1396
  SigmetType["SHORT_TEST"] = "Short test";
1377
1397
  SigmetType["SHORT_VA_TEST"] = "Short VA test";
1378
- })(SigmetType || (SigmetType = {}));
1379
- var VisibilityCause;
1380
- (function (VisibilityCause) {
1398
+ return SigmetType;
1399
+ }({});
1400
+ var VisibilityCause = /*#__PURE__*/function (VisibilityCause) {
1381
1401
  VisibilityCause["DZ"] = "Drizzle";
1382
1402
  VisibilityCause["DU"] = "Dust";
1383
1403
  VisibilityCause["PO"] = "Dust or sand devil";
@@ -1397,20 +1417,49 @@ var VisibilityCause;
1397
1417
  VisibilityCause["GS"] = "Soft hail";
1398
1418
  VisibilityCause["SQ"] = "Squalls";
1399
1419
  VisibilityCause["VA"] = "Volcanic Ash";
1400
- })(VisibilityCause || (VisibilityCause = {}));
1420
+ return VisibilityCause;
1421
+ }({});
1422
+
1423
+ /* International Civil Aviation Organization (ICAO) locations
1424
+ */
1425
+ // For example 'AMSTERDAM FIR';
1426
+
1427
+ /* Meteorological Watch Office (MWO) locations */
1428
+ // For example 'EHDB'; Use getMWO() from utils to get the current MWO
1429
+
1430
+ /* Air Traffic Services Unit locations */
1431
+ // For example 'EHAA';
1432
+
1433
+ /* Air Traffic Services Region locations */
1434
+ // For example 'EHAA';
1435
+
1436
+ /* FIR type, for getting FIR list of backend */
1437
+
1401
1438
  /* Speed unit, e.g. 'KT', 'KMH' */
1402
- var MovementUnit;
1403
- (function (MovementUnit) {
1439
+ var MovementUnit = /*#__PURE__*/function (MovementUnit) {
1404
1440
  MovementUnit["KT"] = "kt";
1405
1441
  MovementUnit["KMH"] = "kmh";
1406
- })(MovementUnit || (MovementUnit = {}));
1407
- var WindUnit;
1408
- (function (WindUnit) {
1442
+ return MovementUnit;
1443
+ }({});
1444
+ var WindUnit = /*#__PURE__*/function (WindUnit) {
1409
1445
  WindUnit["KT"] = "kt";
1410
1446
  WindUnit["MPS"] = "mps";
1411
- })(WindUnit || (WindUnit = {}));
1412
- var ProductAction;
1413
- (function (ProductAction) {
1447
+ return WindUnit;
1448
+ }({});
1449
+
1450
+ /* Point coordinate in lat/lon system */
1451
+
1452
+ /* Date object, eg ISO8601 `2020-09-18T12:00:00Z` */
1453
+
1454
+ /**
1455
+ * ProductStatus is returned by the backend. The backend fills in this property.
1456
+ * For the backend, it should only need to store 'DRAFT' | 'PUBLISHED' | 'CANCELLED' in its DB.
1457
+ * The backend should derive and return the status 'EXPIRED' from the product properties.
1458
+ *
1459
+ * Note: ProductStatus from the backend should be refreshed regularly to display status updates.
1460
+ */
1461
+
1462
+ var ProductAction = /*#__PURE__*/function (ProductAction) {
1414
1463
  ProductAction["PUBLISH"] = "PUBLISH";
1415
1464
  ProductAction["CANCEL"] = "CANCEL";
1416
1465
  ProductAction["RENEW"] = "RENEW";
@@ -1419,29 +1468,66 @@ var ProductAction;
1419
1468
  ProductAction["DISCARD"] = "DISCARD";
1420
1469
  ProductAction["DUPLICATE"] = "DUPLICATE";
1421
1470
  ProductAction["CLOSE"] = "CLOSE";
1422
- })(ProductAction || (ProductAction = {}));
1423
- var ProductStatusDescription;
1424
- (function (ProductStatusDescription) {
1471
+ return ProductAction;
1472
+ }({});
1473
+ var ProductStatusDescription = /*#__PURE__*/function (ProductStatusDescription) {
1425
1474
  ProductStatusDescription["DRAFT"] = "Draft";
1426
1475
  ProductStatusDescription["PUBLISHED"] = "Published";
1427
1476
  ProductStatusDescription["CANCELLED"] = "Cancelled";
1428
1477
  ProductStatusDescription["EXPIRED"] = "Expired";
1429
1478
  ProductStatusDescription["RENEWED"] = "Renewed";
1430
1479
  ProductStatusDescription["DISCARDED"] = "Discarded";
1431
- })(ProductStatusDescription || (ProductStatusDescription = {}));
1432
- var CloudLevelUnits;
1433
- (function (CloudLevelUnits) {
1480
+ return ProductStatusDescription;
1481
+ }({});
1482
+
1483
+ /**
1484
+ * A Cancel Sigmet/Airmet (a sigmet/airmet which cancels another sigmet/airmet) can only have the status 'PUBLISHED',
1485
+ * e.g. cannot be edited, cancelled or stored as draft.
1486
+ */
1487
+
1488
+ /**
1489
+ * ProductCanbe lifecycle is determined by the backend. E.g. the backend fills in these properties.
1490
+ *
1491
+ * 'DRAFTED': product can be saved as draft
1492
+ * 'DISCARDED': This product can be thrown away
1493
+ * 'PUBLISHED': product can be PUBLISHED
1494
+ * 'CANCELLED': product can be CANCELLED
1495
+ */
1496
+
1497
+ /**
1498
+ * ProductSequence is a sequence label with a counter of the SIGMETs/AIRMETs issued on a day (starting at with 1 01:00),
1499
+ * max 3 characters long; first character should be a capital letter,
1500
+ * others are numbers: A01-A99, 01-99 or 1-99
1501
+ */
1502
+
1503
+ /**
1504
+ * This is the base sigmet/airmet structure, used for both the Sigmet, Airmet and CancelSigmet, CancelAirmet
1505
+ */
1506
+
1507
+ /**
1508
+ * To cancel a published sigmet
1509
+ *
1510
+ * To cancel a published sigmet, we send a cancel sigmet with all the mandatory properties from the basesigmet.
1511
+ */
1512
+
1513
+ /**
1514
+ * To cancel a published airmet
1515
+ *
1516
+ * To cancel a published airmet, we send a cancel airmet with all the mandatory properties from the baseairmet.
1517
+ */
1518
+
1519
+ var CloudLevelUnits = /*#__PURE__*/function (CloudLevelUnits) {
1434
1520
  CloudLevelUnits["FT"] = "ft";
1435
1521
  CloudLevelUnits["M"] = "m";
1436
- })(CloudLevelUnits || (CloudLevelUnits = {}));
1437
- var LevelUnits;
1438
- (function (LevelUnits) {
1522
+ return CloudLevelUnits;
1523
+ }({});
1524
+ var LevelUnits = /*#__PURE__*/function (LevelUnits) {
1439
1525
  LevelUnits["FT"] = "ft";
1440
1526
  LevelUnits["M"] = "m";
1441
1527
  LevelUnits["FL"] = "FL";
1442
- })(LevelUnits || (LevelUnits = {}));
1443
- var Direction;
1444
- (function (Direction) {
1528
+ return LevelUnits;
1529
+ }({});
1530
+ var Direction = /*#__PURE__*/function (Direction) {
1445
1531
  Direction["N"] = "N";
1446
1532
  Direction["NNE"] = "NNE";
1447
1533
  Direction["NE"] = "NE";
@@ -1458,7 +1544,33 @@ var Direction;
1458
1544
  Direction["WNW"] = "WNW";
1459
1545
  Direction["NW"] = "NW";
1460
1546
  Direction["NNW"] = "NNW";
1461
- })(Direction || (Direction = {}));
1547
+ return Direction;
1548
+ }({});
1549
+
1550
+ /**
1551
+ * To store all the other sigmet information
1552
+ */
1553
+
1554
+ /**
1555
+ * To store all the other sigmet information
1556
+ */
1557
+
1558
+ /**
1559
+ * Type which can be used to post a sigmet from the frontend to the backend
1560
+ */
1561
+
1562
+ /**
1563
+ * Type with sigmet info from the backend
1564
+ */
1565
+
1566
+ /**
1567
+ * Type which can be used to post a airmet from the frontend to the backend
1568
+ */
1569
+
1570
+ /**
1571
+ * Type with airmet info from the backend
1572
+ */
1573
+
1462
1574
  var isInstanceOfSigmet = function isInstanceOfSigmet(obj) {
1463
1575
  return 'phenomenon' in obj;
1464
1576
  };
@@ -1477,11 +1589,13 @@ var isInstanceOfSigmetOrAirmet = function isInstanceOfSigmetOrAirmet(obj) {
1477
1589
  var isInstanceOfCancelSigmetOrAirmet = function isInstanceOfCancelSigmetOrAirmet(obj) {
1478
1590
  return 'cancelsSigmetSequenceId' in obj || 'cancelsAirmetSequenceId' in obj;
1479
1591
  };
1480
- var StartOrEndDrawing;
1481
- (function (StartOrEndDrawing) {
1592
+ var StartOrEndDrawing = /*#__PURE__*/function (StartOrEndDrawing) {
1482
1593
  StartOrEndDrawing["start"] = "start";
1483
1594
  StartOrEndDrawing["end"] = "end";
1484
- })(StartOrEndDrawing || (StartOrEndDrawing = {}));
1595
+ return StartOrEndDrawing;
1596
+ }({});
1597
+
1598
+ // config types
1485
1599
 
1486
1600
  var location_indicator_mwo$1 = "EHDB";
1487
1601
  var fir_areas$1 = {
@@ -4834,6 +4948,7 @@ var sigmetDefaultConfig = {
4834
4948
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4835
4949
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4836
4950
  * */
4951
+
4837
4952
  var sigmetConfig = sigmetDefaultConfig;
4838
4953
  var airmetConfig = airmetDefaultConfig;
4839
4954
 
@@ -4854,6 +4969,7 @@ var airmetConfig = airmetDefaultConfig;
4854
4969
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4855
4970
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4856
4971
  * */
4972
+
4857
4973
  var srsAndBboxDefault = {
4858
4974
  bbox: {
4859
4975
  left: -911501,
@@ -4900,6 +5016,7 @@ var featurePropsFIR = {
4900
5016
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
4901
5017
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4902
5018
  * */
5019
+
4903
5020
  var formStyles = {
4904
5021
  '.MuiSelect-select.MuiInputBase-input.MuiFilledInput-input': {
4905
5022
  paddingTop: '17px',
@@ -5031,20 +5148,20 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
5031
5148
  var title = _ref.title,
5032
5149
  children = _ref.children,
5033
5150
  props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
5034
- return jsxs(Grid, Object.assign({
5151
+ return /*#__PURE__*/jsxs(Grid, Object.assign({
5035
5152
  container: true,
5036
5153
  spacing: 3
5037
5154
  }, props, {
5038
- children: [jsx(Grid, {
5155
+ children: [/*#__PURE__*/jsx(Grid, {
5039
5156
  container: true,
5040
5157
  justifyContent: "flex-end",
5041
5158
  size: 4,
5042
- children: !!title && jsx(Typography, {
5159
+ children: !!title && /*#__PURE__*/jsx(Typography, {
5043
5160
  sx: styles$2.label,
5044
5161
  variant: "subtitle1",
5045
5162
  children: title
5046
5163
  })
5047
- }), jsx(Grid, {
5164
+ }), /*#__PURE__*/jsx(Grid, {
5048
5165
  container: true,
5049
5166
  justifyContent: "flex-start",
5050
5167
  size: 8,
@@ -5061,8 +5178,8 @@ var RadioButtonAndLabel = function RadioButtonAndLabel(props) {
5061
5178
  _props$disabled = props.disabled,
5062
5179
  disabled = _props$disabled === void 0 ? true : _props$disabled,
5063
5180
  restProps = _objectWithoutPropertiesLoose(props, _excluded);
5064
- return jsx(FormControlLabel, Object.assign({
5065
- control: jsx(Radio, {
5181
+ return /*#__PURE__*/jsx(FormControlLabel, Object.assign({
5182
+ control: /*#__PURE__*/jsx(Radio, {
5066
5183
  style: {
5067
5184
  pointerEvents: 'auto'
5068
5185
  }
@@ -5076,6 +5193,23 @@ var RadioButtonAndLabel = function RadioButtonAndLabel(props) {
5076
5193
  }, restProps));
5077
5194
  };
5078
5195
 
5196
+ /* *
5197
+ * Licensed under the Apache License, Version 2.0 (the "License");
5198
+ * you may not use this file except in compliance with the License.
5199
+ * You may obtain a copy of the License at
5200
+ *
5201
+ * http://www.apache.org/licenses/LICENSE-2.0
5202
+ *
5203
+ * Unless required by applicable law or agreed to in writing, software
5204
+ * distributed under the License is distributed on an "AS IS" BASIS,
5205
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5206
+ * See the License for the specific language governing permissions and
5207
+ * limitations under the License.
5208
+ *
5209
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5210
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
5211
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5212
+ * */
5079
5213
  var Change = function Change(_ref) {
5080
5214
  var isDisabled = _ref.isDisabled,
5081
5215
  isReadOnly = _ref.isReadOnly;
@@ -5089,7 +5223,7 @@ var Change = function Change(_ref) {
5089
5223
  return isShortTest() || isRequiredField(value);
5090
5224
  };
5091
5225
  var fieldsDisabled = isDisabled || isShortTest();
5092
- return jsx(ProductFormFieldLayout, {
5226
+ return /*#__PURE__*/jsx(ProductFormFieldLayout, {
5093
5227
  sx: {
5094
5228
  '.MuiButtonBase-root.MuiRadio-root': {
5095
5229
  padding: '6px',
@@ -5101,7 +5235,7 @@ var Change = function Change(_ref) {
5101
5235
  marginTop: -1
5102
5236
  },
5103
5237
  title: t('change'),
5104
- children: jsxs(ReactHookFormRadioGroup, {
5238
+ children: /*#__PURE__*/jsxs(ReactHookFormRadioGroup, {
5105
5239
  disabled: fieldsDisabled,
5106
5240
  isReadOnly: isReadOnly,
5107
5241
  name: "change",
@@ -5110,17 +5244,17 @@ var Change = function Change(_ref) {
5110
5244
  isRequired: isRequired
5111
5245
  }
5112
5246
  },
5113
- children: [jsx(RadioButtonAndLabel, {
5247
+ children: [/*#__PURE__*/jsx(RadioButtonAndLabel, {
5114
5248
  "data-testid": "change-WKN",
5115
5249
  disabled: fieldsDisabled,
5116
5250
  label: t('weakening'),
5117
5251
  value: "WKN"
5118
- }), jsx(RadioButtonAndLabel, {
5252
+ }), /*#__PURE__*/jsx(RadioButtonAndLabel, {
5119
5253
  "data-testid": "change-NC",
5120
5254
  disabled: fieldsDisabled,
5121
5255
  label: t('no-change'),
5122
5256
  value: "NC"
5123
- }), jsx(RadioButtonAndLabel, {
5257
+ }), /*#__PURE__*/jsx(RadioButtonAndLabel, {
5124
5258
  "data-testid": "change-INTSF",
5125
5259
  disabled: fieldsDisabled,
5126
5260
  label: t('intensifying'),
@@ -5130,6 +5264,25 @@ var Change = function Change(_ref) {
5130
5264
  });
5131
5265
  };
5132
5266
 
5267
+ /* eslint-disable @typescript-eslint/no-confusing-void-expression */
5268
+ /* *
5269
+ * Licensed under the Apache License, Version 2.0 (the "License");
5270
+ * you may not use this file except in compliance with the License.
5271
+ * You may obtain a copy of the License at
5272
+ *
5273
+ * http://www.apache.org/licenses/LICENSE-2.0
5274
+ *
5275
+ * Unless required by applicable law or agreed to in writing, software
5276
+ * distributed under the License is distributed on an "AS IS" BASIS,
5277
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5278
+ * See the License for the specific language governing permissions and
5279
+ * limitations under the License.
5280
+ *
5281
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5282
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
5283
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5284
+ * */
5285
+
5133
5286
  var getDefaultPhenomena = function getDefaultPhenomena(productConfig, currentFir) {
5134
5287
  var defaultActiveFIR = currentFir || productConfig.active_firs[0]; // first FIR in active_firs is the default
5135
5288
  var currentFirArea = productConfig.fir_areas[defaultActiveFIR];
@@ -5142,10 +5295,10 @@ var getHoursBeforeValidity = function getHoursBeforeValidity(phenomenon, fir, co
5142
5295
  if (!fir) {
5143
5296
  return 4;
5144
5297
  }
5145
- var _config$fir_areas$fir = config.fir_areas[fir],
5146
- hours_before_validity = _config$fir_areas$fir.hours_before_validity,
5147
- va_hours_before_validity = _config$fir_areas$fir.va_hours_before_validity,
5148
- tc_hours_before_validity = _config$fir_areas$fir.tc_hours_before_validity;
5298
+ var _ref = config.fir_areas[fir],
5299
+ hours_before_validity = _ref.hours_before_validity,
5300
+ va_hours_before_validity = _ref.va_hours_before_validity,
5301
+ tc_hours_before_validity = _ref.tc_hours_before_validity;
5149
5302
  switch (phenomenon) {
5150
5303
  // Tropical Cyclone
5151
5304
  case 'TC':
@@ -5162,10 +5315,10 @@ var getMaxHoursOfValidity = function getMaxHoursOfValidity(phenomenon, fir, conf
5162
5315
  return 4;
5163
5316
  }
5164
5317
  var FIR = getFirArea(fir, config);
5165
- var _config$fir_areas$FIR = config.fir_areas[FIR],
5166
- max_hours_of_validity = _config$fir_areas$FIR.max_hours_of_validity,
5167
- va_max_hours_of_validity = _config$fir_areas$FIR.va_max_hours_of_validity,
5168
- tc_max_hours_of_validity = _config$fir_areas$FIR.tc_max_hours_of_validity;
5318
+ var _ref2 = config.fir_areas[FIR],
5319
+ max_hours_of_validity = _ref2.max_hours_of_validity,
5320
+ va_max_hours_of_validity = _ref2.va_max_hours_of_validity,
5321
+ tc_max_hours_of_validity = _ref2.tc_max_hours_of_validity;
5169
5322
  switch (phenomenon) {
5170
5323
  case 'TC':
5171
5324
  // Tropical Cyclone
@@ -5195,8 +5348,8 @@ var getActiveFIRArea = function getActiveFIRArea(selectedFIR, productConfig) {
5195
5348
  return productConfig.fir_areas[FIR];
5196
5349
  };
5197
5350
  var getMaxPolygonPoints = function getMaxPolygonPoints(selectedFIR, productConfig) {
5198
- var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
5199
- max_polygon_points = _getActiveFIRArea.max_polygon_points;
5351
+ var _ref3 = getActiveFIRArea(selectedFIR, productConfig),
5352
+ max_polygon_points = _ref3.max_polygon_points;
5200
5353
  return max_polygon_points != null ? max_polygon_points : 7; // Fallback to 7 if max_polygon_points is not defined
5201
5354
  };
5202
5355
  var hasMaxFeaturePoints = function hasMaxFeaturePoints(geojson, maxPoints) {
@@ -5206,9 +5359,9 @@ var hasMaxFeaturePoints = function hasMaxFeaturePoints(geojson, maxPoints) {
5206
5359
  }
5207
5360
  var _geojson$features = geojson.features,
5208
5361
  feature = _geojson$features[0];
5209
- var _feature$geometry = feature.geometry,
5210
- coordinates = _feature$geometry.coordinates,
5211
- type = _feature$geometry.type;
5362
+ var _ref4 = feature.geometry,
5363
+ coordinates = _ref4.coordinates,
5364
+ type = _ref4.type;
5212
5365
  if (type === 'Polygon' && coordinates[0].length > maxPoints) {
5213
5366
  return true;
5214
5367
  }
@@ -5217,75 +5370,86 @@ var hasMaxFeaturePoints = function hasMaxFeaturePoints(geojson, maxPoints) {
5217
5370
  var DEFAULT_MINIMUM_SURFACE_LEVEL = 0;
5218
5371
  var getMinCloudLevelValue = function getMinCloudLevelValue(unit, selectedFIR, productConfig) {
5219
5372
  // Use first FIR in list if no FIR selected
5220
- var _getActiveFIRArea2 = getActiveFIRArea(selectedFIR, productConfig),
5221
- cloud_level_min = _getActiveFIRArea2.cloud_level_min;
5373
+ var _ref5 = getActiveFIRArea(selectedFIR, productConfig),
5374
+ cloud_level_min = _ref5.cloud_level_min;
5375
+
5222
5376
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5223
5377
  return cloud_level_min != null && cloud_level_min[unit] ? cloud_level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5224
5378
  };
5225
5379
  var getMinCloudLowerLevelValue = function getMinCloudLowerLevelValue(unit, selectedFIR, productConfig) {
5226
5380
  // Use first FIR in list if no FIR selected
5227
- var _getActiveFIRArea3 = getActiveFIRArea(selectedFIR, productConfig),
5228
- cloud_lower_level_min = _getActiveFIRArea3.cloud_lower_level_min;
5381
+ var _ref6 = getActiveFIRArea(selectedFIR, productConfig),
5382
+ cloud_lower_level_min = _ref6.cloud_lower_level_min;
5383
+
5229
5384
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5230
5385
  return cloud_lower_level_min != null && cloud_lower_level_min[unit] ? cloud_lower_level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5231
5386
  };
5232
5387
  var getMaxCloudLevelValue = function getMaxCloudLevelValue(unit, selectedFIR, productConfig) {
5233
5388
  // Use first FIR in list if no FIR selected
5234
- var _getActiveFIRArea4 = getActiveFIRArea(selectedFIR, productConfig),
5235
- cloud_level_max = _getActiveFIRArea4.cloud_level_max;
5389
+ var _ref7 = getActiveFIRArea(selectedFIR, productConfig),
5390
+ cloud_level_max = _ref7.cloud_level_max;
5391
+
5236
5392
  // Return max value for selected unit - if not present in list, return null
5237
5393
  return cloud_level_max != null && cloud_level_max[unit] ? cloud_level_max[unit] : null;
5238
5394
  };
5239
5395
  var getMaxCloudLowerLevelValue = function getMaxCloudLowerLevelValue(unit, selectedFIR, productConfig) {
5240
5396
  // Use first FIR in list if no FIR selected
5241
- var _getActiveFIRArea5 = getActiveFIRArea(selectedFIR, productConfig),
5242
- cloud_lower_level_max = _getActiveFIRArea5.cloud_lower_level_max;
5397
+ var _ref8 = getActiveFIRArea(selectedFIR, productConfig),
5398
+ cloud_lower_level_max = _ref8.cloud_lower_level_max;
5399
+
5243
5400
  // Return max value for selected unit - if not present in list, return null
5244
5401
  return cloud_lower_level_max != null && cloud_lower_level_max[unit] ? cloud_lower_level_max[unit] : null;
5245
5402
  };
5403
+
5246
5404
  // Retrieve max value from config - if not set, there is no max value for this unit so we return null
5247
5405
  var getMaxLevelValue = function getMaxLevelValue(unit, selectedFIR, productConfig) {
5248
5406
  // Use first FIR in list if no FIR selected
5249
- var _getActiveFIRArea6 = getActiveFIRArea(selectedFIR, productConfig),
5250
- level_max = _getActiveFIRArea6.level_max;
5407
+ var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
5408
+ level_max = _getActiveFIRArea.level_max;
5251
5409
  // Return max value for selected unit - if not present in list, return null
5252
5410
  return level_max != null && level_max[unit] ? level_max[unit] : null;
5253
5411
  };
5412
+
5254
5413
  // Retrieve min value from config - if not set, return zero
5255
5414
  var getMinLevelValue = function getMinLevelValue(unit, selectedFIR, productConfig) {
5256
5415
  // Use first FIR in list if no FIR selected
5257
- var _getActiveFIRArea7 = getActiveFIRArea(selectedFIR, productConfig),
5258
- level_min = _getActiveFIRArea7.level_min;
5416
+ var _getActiveFIRArea2 = getActiveFIRArea(selectedFIR, productConfig),
5417
+ level_min = _getActiveFIRArea2.level_min;
5418
+
5259
5419
  // Return min value for selected unit - if not present in list, return 0 as we cannot go below the surface
5260
5420
  return level_min != null && level_min[unit] ? level_min[unit] : DEFAULT_MINIMUM_SURFACE_LEVEL;
5261
5421
  };
5262
5422
  var getMaxWindSpeedValue = function getMaxWindSpeedValue(unit, selectedFIR, productConfig) {
5263
5423
  // Use first FIR in list if no FIR selected
5264
- var _getActiveFIRArea8 = getActiveFIRArea(selectedFIR, productConfig),
5265
- wind_speed_max = _getActiveFIRArea8.wind_speed_max;
5424
+ var _ref9 = getActiveFIRArea(selectedFIR, productConfig),
5425
+ wind_speed_max = _ref9.wind_speed_max;
5426
+
5266
5427
  // Return min value for selected unit - if not present in list, return null
5267
5428
  return wind_speed_max != null && wind_speed_max[unit] ? wind_speed_max[unit] : null;
5268
5429
  };
5269
5430
  var DEFAULT_MIN_WIND_SPEED = 0;
5270
5431
  var getMinWindSpeedValue = function getMinWindSpeedValue(unit, selectedFIR, productConfig) {
5271
5432
  // Use first FIR in list if no FIR selected
5272
- var _getActiveFIRArea9 = getActiveFIRArea(selectedFIR, productConfig),
5273
- wind_speed_min = _getActiveFIRArea9.wind_speed_min;
5433
+ var _ref0 = getActiveFIRArea(selectedFIR, productConfig),
5434
+ wind_speed_min = _ref0.wind_speed_min;
5435
+
5274
5436
  // Return min value for selected unit - if not present in list, return 0 as we have negative wind speed
5275
5437
  return wind_speed_min != null && wind_speed_min[unit] ? wind_speed_min[unit] : DEFAULT_MIN_WIND_SPEED;
5276
5438
  };
5277
5439
  var getMaxVisibilityValue = function getMaxVisibilityValue(selectedFIR, productConfig) {
5278
5440
  // Use first FIR in list if no FIR selected
5279
- var _getActiveFIRArea0 = getActiveFIRArea(selectedFIR, productConfig),
5280
- visibility_max = _getActiveFIRArea0.visibility_max;
5441
+ var _ref1 = getActiveFIRArea(selectedFIR, productConfig),
5442
+ visibility_max = _ref1.visibility_max;
5443
+
5281
5444
  // Return max value for selected unit - if not present in list, return null
5282
5445
  return visibility_max || null;
5283
5446
  };
5284
5447
  var DEFAULT_MIN_VISIBILITY = 0;
5285
5448
  var getMinVisibilityValue = function getMinVisibilityValue(selectedFIR, productConfig) {
5286
5449
  // Use first FIR in list if no FIR selected
5287
- var _getActiveFIRArea1 = getActiveFIRArea(selectedFIR, productConfig),
5288
- visibility_min = _getActiveFIRArea1.visibility_min;
5450
+ var _ref10 = getActiveFIRArea(selectedFIR, productConfig),
5451
+ visibility_min = _ref10.visibility_min;
5452
+
5289
5453
  // Return min value for selected unit - if not present in list, return 0 as we have negative wind speed
5290
5454
  return visibility_min || DEFAULT_MIN_VISIBILITY;
5291
5455
  };
@@ -5318,6 +5482,7 @@ var isLevelLower = function isLevelLower(ownValue, ownUnit, otherValue, otherUni
5318
5482
  if (ownUnit === otherUnit && typeof ownValue === 'number') {
5319
5483
  return ownValue < otherValue;
5320
5484
  }
5485
+
5321
5486
  // not same units - convert both to feet and compare
5322
5487
  var ownValueFeet = getLevelInFeet(ownValue, ownUnit);
5323
5488
  var otherValueFeet = getLevelInFeet(otherValue, otherUnit);
@@ -5361,13 +5526,13 @@ var getProductFormMode = function getProductFormMode(canBeOptions, productListIt
5361
5526
  }
5362
5527
  return canBeOptions.includes('PUBLISHED') ? 'edit' : 'view';
5363
5528
  };
5364
- var getLifecycleActions = function getLifecycleActions(_ref) {
5365
- var canBe = _ref.canBe,
5366
- onButtonPress = _ref.onButtonPress,
5367
- productType = _ref.productType,
5368
- _ref$areActionsDisabl = _ref.areActionsDisabled,
5369
- areActionsDisabled = _ref$areActionsDisabl === void 0 ? false : _ref$areActionsDisabl,
5370
- t = _ref.t;
5529
+ var getLifecycleActions = function getLifecycleActions(_ref11) {
5530
+ var canBe = _ref11.canBe,
5531
+ onButtonPress = _ref11.onButtonPress,
5532
+ productType = _ref11.productType,
5533
+ _ref11$areActionsDisa = _ref11.areActionsDisabled,
5534
+ areActionsDisabled = _ref11$areActionsDisa === void 0 ? false : _ref11$areActionsDisa,
5535
+ t = _ref11.t;
5371
5536
  var hasDiscardButton = canBe.includes('DISCARDED');
5372
5537
  var onDiscard = function onDiscard() {
5373
5538
  return onButtonPress(ProductAction.DISCARD);
@@ -5419,12 +5584,13 @@ var hasValue = function hasValue(value) {
5419
5584
  };
5420
5585
  var prepareFormValues = function prepareFormValues(product) {
5421
5586
  return Object.keys(product).reduce(function (list, key) {
5422
- var _ref3;
5587
+ var _ref13;
5423
5588
  var value = product[key];
5424
5589
  // remove hidden form values
5425
5590
  if (key === 'IS_DRAFT') {
5426
5591
  return list;
5427
5592
  }
5593
+
5428
5594
  // remove geometry if empty coordinates
5429
5595
  if (key === 'endGeometry' || key === 'endGeometryIntersect' || key === 'startGeometry' || key === 'startGeometryIntersect') {
5430
5596
  if ((value == null ? void 0 : value.features.length) > 0 && (value == null ? void 0 : value.features[0].geometry.type) === 'Polygon' && value != null && value.features[0].geometry.coordinates[0].length) {
@@ -5437,22 +5603,24 @@ var prepareFormValues = function prepareFormValues(product) {
5437
5603
  }
5438
5604
  return list;
5439
5605
  }
5606
+
5440
5607
  // check if nested object has value
5441
5608
  if (typeof value === 'object' && value !== null && value !== undefined) {
5442
- var _ref2;
5609
+ var _ref12;
5443
5610
  var hasNaNValue = Object.keys(value).reduce(function (total, valKey) {
5444
5611
  var keyValue = value[valKey];
5445
5612
  return !hasValue(String(keyValue)) || total;
5446
5613
  }, false);
5447
- return Object.assign({}, list, !hasNaNValue && (_ref2 = {}, _ref2[key] = value, _ref2));
5614
+ return Object.assign({}, list, !hasNaNValue && (_ref12 = {}, _ref12[key] = value, _ref12));
5448
5615
  }
5449
- return Object.assign({}, list, hasValue(value) && (_ref3 = {}, _ref3[key] = value, _ref3));
5616
+ return Object.assign({}, list, hasValue(value) && (_ref13 = {}, _ref13[key] = value, _ref13));
5450
5617
  }, {});
5451
5618
  };
5452
5619
  var createSigmetPostParameter = function createSigmetPostParameter(sigmetToPost, newStatus, previousUuid) {
5453
5620
  var sigmetIncludingUuid = previousUuid !== null ? Object.assign({}, sigmetToPost, {
5454
5621
  uuid: previousUuid
5455
5622
  }) : sigmetToPost;
5623
+
5456
5624
  // Do not send empty numbered fields to the BE to prevent errors
5457
5625
  var sigmet = prepareFormValues(sigmetIncludingUuid);
5458
5626
  return {
@@ -5464,6 +5632,7 @@ var createAirmetPostParameter = function createAirmetPostParameter(airmetToPost,
5464
5632
  var airmetIncludingUuid = previousUuid !== null ? Object.assign({}, airmetToPost, {
5465
5633
  uuid: previousUuid
5466
5634
  }) : airmetToPost;
5635
+
5467
5636
  // Do not send empty numbered fields to the BE to prevent errors
5468
5637
  var airmet = prepareFormValues(airmetIncludingUuid);
5469
5638
  return {
@@ -5575,6 +5744,7 @@ var getProductIssueDate = function getProductIssueDate(t, initialProduct, initia
5575
5744
  }
5576
5745
  return t('not-published');
5577
5746
  };
5747
+
5578
5748
  // Provide a cross section of the units from the config and the units as allowed by the type definition
5579
5749
  // Units from the config which are not in the type definition should be ignored
5580
5750
  var extractUnitsToShow = function extractUnitsToShow(configUnits, unitType) {
@@ -5595,9 +5765,11 @@ var getAllowedUnits = function getAllowedUnits(selectedFIR, productConfig, confi
5595
5765
  });
5596
5766
  return allowedMovementUnits ? extractUnitsToShow(allowedMovementUnits.allowed_units, unitType) : unitType;
5597
5767
  }
5768
+
5598
5769
  // If no FIR selected or FIR not in options - return all units as defined in the type
5599
5770
  return unitType;
5600
5771
  };
5772
+
5601
5773
  /**
5602
5774
  * Function to translate the geojson data to a GeoJSON.FeatureCollection
5603
5775
  */
@@ -5605,10 +5777,12 @@ var getFir = function getFir(productConfig, firName) {
5605
5777
  var _productConfig$fir_ar;
5606
5778
  var currentFIRName = firName || productConfig.active_firs[0];
5607
5779
  var firLocation = (_productConfig$fir_ar = productConfig.fir_areas[currentFIRName]) == null ? void 0 : _productConfig$fir_ar.fir_location;
5780
+
5608
5781
  // When switching FIRs, the selectionType is not set, so we need to add it here to use 'Entire FIR' button
5609
5782
  var updatedFirLocationWithSelectionType = addSelectionTypeToGeoJSON(firLocation, firSelectionType);
5610
5783
  return updatedFirLocationWithSelectionType;
5611
5784
  };
5785
+
5612
5786
  /**
5613
5787
  * Function to check if the given geojson object has 'fir' selectionType property
5614
5788
  */
@@ -5633,18 +5807,21 @@ var getBaseLayers = function getBaseLayers(productConfig) {
5633
5807
  })) || [];
5634
5808
  };
5635
5809
  var getMaxMovementSpeedValue = function getMaxMovementSpeedValue(unit, selectedFIR, productConfig) {
5636
- var _getActiveFIRArea10 = getActiveFIRArea(selectedFIR, productConfig),
5637
- movement_max = _getActiveFIRArea10.movement_max;
5810
+ var _getActiveFIRArea3 = getActiveFIRArea(selectedFIR, productConfig),
5811
+ movement_max = _getActiveFIRArea3.movement_max;
5812
+
5638
5813
  // Return max value for selected unit - if not present in list, return null
5639
5814
  return movement_max != null && movement_max[unit] ? movement_max[unit] : null;
5640
5815
  };
5641
5816
  var DEFAULT_MIN_MOVEMENT_SPEED = 0;
5642
5817
  var getMinMovementSpeedValue = function getMinMovementSpeedValue(unit, selectedFIR, productConfig) {
5643
- var _getActiveFIRArea11 = getActiveFIRArea(selectedFIR, productConfig),
5644
- movement_min = _getActiveFIRArea11.movement_min;
5818
+ var _getActiveFIRArea4 = getActiveFIRArea(selectedFIR, productConfig),
5819
+ movement_min = _getActiveFIRArea4.movement_min;
5820
+
5645
5821
  // Return min value for selected unit - if not present in list, return DEFAULT_MIN_MOVEMENT_SPEED (zero, no negative speeds)
5646
5822
  return movement_min != null && movement_min[unit] ? movement_min[unit] : DEFAULT_MIN_MOVEMENT_SPEED;
5647
5823
  };
5824
+
5648
5825
  /** Trigger form validations for given list of field names if field has a value */
5649
5826
  var triggerValidations = function triggerValidations(fieldNames, getValues, trigger) {
5650
5827
  fieldNames.forEach(function (field) {
@@ -5706,9 +5883,9 @@ var getToolIcon = function getToolIcon(selectionType) {
5706
5883
  return defaultIcon;
5707
5884
  }
5708
5885
  if (selectionType === firSelectionType) {
5709
- return jsx(DrawFIRLand, {});
5886
+ return /*#__PURE__*/jsx(DrawFIRLand, {});
5710
5887
  }
5711
- return jsx(DrawFIRLand, {});
5888
+ return /*#__PURE__*/jsx(DrawFIRLand, {});
5712
5889
  };
5713
5890
  var useFormLayers = function useFormLayers(layers) {
5714
5891
  var formLayers = layers.map(function (layer) {
@@ -5729,7 +5906,7 @@ var useFormLayers = function useFormLayers(layers) {
5729
5906
  return layer.geoJSON !== undefined && layer.geoJSON !== null;
5730
5907
  });
5731
5908
  var sourcePanelId = useSelector(function (store) {
5732
- return uiSelectors.getSourcePanelId(store, 'publicWarnings');
5909
+ return uiSelectors.getSourcePanelId(store, uiTypes.DialogTypes.PublicWarnings);
5733
5910
  });
5734
5911
  useUpdateSharedData({
5735
5912
  formFeatures: formLayers
@@ -5757,6 +5934,23 @@ var findSequenceNumber = function findSequenceNumber(tac, noTac) {
5757
5934
  })) != null ? _tac$split$find : null : null;
5758
5935
  };
5759
5936
 
5937
+ /* *
5938
+ * Licensed under the Apache License, Version 2.0 (the "License");
5939
+ * you may not use this file except in compliance with the License.
5940
+ * You may obtain a copy of the License at
5941
+ *
5942
+ * http://www.apache.org/licenses/LICENSE-2.0
5943
+ *
5944
+ * Unless required by applicable law or agreed to in writing, software
5945
+ * distributed under the License is distributed on an "AS IS" BASIS,
5946
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5947
+ * See the License for the specific language governing permissions and
5948
+ * limitations under the License.
5949
+ *
5950
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5951
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
5952
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5953
+ * */
5760
5954
  var styles$1 = {
5761
5955
  radioInput: {
5762
5956
  padding: 1,
@@ -5777,7 +5971,7 @@ var DrawTools = function DrawTools(_ref) {
5777
5971
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
5778
5972
  disabledTooltip = _ref.disabledTooltip;
5779
5973
  usePreventBrowserClose(activeTool !== '');
5780
- return jsx(Box, {
5974
+ return /*#__PURE__*/jsx(Box, {
5781
5975
  "data-testid": "drawtools",
5782
5976
  sx: {
5783
5977
  display: 'flex',
@@ -5785,7 +5979,7 @@ var DrawTools = function DrawTools(_ref) {
5785
5979
  justifyContent: 'space-between'
5786
5980
  },
5787
5981
  children: tools.map(function (tool) {
5788
- var radio = jsx(Radio, {
5982
+ var radio = /*#__PURE__*/jsx(Radio, {
5789
5983
  checked: activeTool === tool.drawModeId,
5790
5984
  checkedIcon: getToolIcon(tool.selectionType),
5791
5985
  "data-testid": tool.drawModeId,
@@ -5798,9 +5992,9 @@ var DrawTools = function DrawTools(_ref) {
5798
5992
  value: true
5799
5993
  });
5800
5994
  var title = isDisabled && disabledTooltip ? disabledTooltip : tool.title;
5801
- return jsx(CustomTooltip, {
5995
+ return /*#__PURE__*/jsx(CustomTooltip, {
5802
5996
  title: title,
5803
- children: jsx("span", {
5997
+ children: /*#__PURE__*/jsx("span", {
5804
5998
  children: radio
5805
5999
  })
5806
6000
  }, tool.drawModeId);
@@ -5808,9 +6002,27 @@ var DrawTools = function DrawTools(_ref) {
5808
6002
  });
5809
6003
  };
5810
6004
 
6005
+ /* *
6006
+ * Licensed under the Apache License, Version 2.0 (the "License");
6007
+ * you may not use this file except in compliance with the License.
6008
+ * You may obtain a copy of the License at
6009
+ *
6010
+ * http://www.apache.org/licenses/LICENSE-2.0
6011
+ *
6012
+ * Unless required by applicable law or agreed to in writing, software
6013
+ * distributed under the License is distributed on an "AS IS" BASIS,
6014
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6015
+ * See the License for the specific language governing permissions and
6016
+ * limitations under the License.
6017
+ *
6018
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6019
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6020
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6021
+ * */
5811
6022
  var DEFAULT_ROUNDING_LEVELS_FL = 5;
5812
6023
  var DEFAULT_ROUNDING_LEVELS_FT = 500;
5813
6024
  var DEFAULT_ROUNDING_LEVELS_M = 1;
6025
+
5814
6026
  // Helper to unfreeze an unintended immutable level field.
5815
6027
  var ensureLevelObjectIsEditable = function ensureLevelObjectIsEditable(parentPath, getValues, setValue) {
5816
6028
  var parentValue = getValues(parentPath);
@@ -5862,6 +6074,7 @@ var _validateLevels = function validateLevels(t, value, unit, productConfig, sel
5862
6074
  level_rounding_FT = _getActiveFIRArea$lev2 === void 0 ? DEFAULT_ROUNDING_LEVELS_FT : _getActiveFIRArea$lev2,
5863
6075
  _getActiveFIRArea$lev3 = _getActiveFIRArea.level_rounding_M,
5864
6076
  level_rounding_M = _getActiveFIRArea$lev3 === void 0 ? DEFAULT_ROUNDING_LEVELS_M : _getActiveFIRArea$lev3;
6077
+
5865
6078
  // Parse to integer to check for steps
5866
6079
  var intLevel = parseInt(value, 10);
5867
6080
  if (LevelUnits[unit] === LevelUnits.FT) {
@@ -5950,6 +6163,7 @@ var Levels = function Levels(_ref) {
5950
6163
  var getFIRValue = function getFIRValue() {
5951
6164
  return getValues('locationIndicatorATSR');
5952
6165
  };
6166
+
5953
6167
  // Get allowed level units based on selected FIR - if no FIR selected, allow all default units
5954
6168
  var allowedLevelUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'level_unit', LevelUnits);
5955
6169
  var radioactiveCloudLevel = getMaxLevelValue(LevelUnits.FL, getFIRValue(), productConfig);
@@ -5963,14 +6177,14 @@ var Levels = function Levels(_ref) {
5963
6177
  triggerValidations(['level.value'], getValues, trigger);
5964
6178
  }
5965
6179
  }, [getValues, isRadioactiveCloud, levelInfoMode, radioactiveCloudLevel, setValue, trigger, unregister]);
5966
- return jsx(ProductFormFieldLayout, {
6180
+ return /*#__PURE__*/jsx(ProductFormFieldLayout, {
5967
6181
  sx: Object.assign({}, styles$2.containerItem, {
5968
6182
  '.MuiFormHelperText-root.Mui-error': {
5969
6183
  marginBottom: '-16px'
5970
6184
  }
5971
6185
  }),
5972
6186
  title: t('levels'),
5973
- children: jsxs(ReactHookFormRadioGroup, {
6187
+ children: /*#__PURE__*/jsxs(ReactHookFormRadioGroup, {
5974
6188
  disabled: fieldsDisabled,
5975
6189
  isReadOnly: isReadOnly,
5976
6190
  name: "levelInfoMode",
@@ -5991,9 +6205,11 @@ var Levels = function Levels(_ref) {
5991
6205
  });
5992
6206
  }
5993
6207
  }
6208
+
5994
6209
  // Reset default value for the level value to '' so when it rerenders it uses this empty default value
5995
6210
  setValue('level.unit', 'FL');
5996
6211
  setValue('level.value', null);
6212
+
5997
6213
  // Clear out errors for the levels
5998
6214
  clearErrors(['level', 'lowerLevel']);
5999
6215
  },
@@ -6002,24 +6218,24 @@ var Levels = function Levels(_ref) {
6002
6218
  isRequired: isRequired
6003
6219
  }
6004
6220
  },
6005
- children: [jsx(RadioButtonAndLabel, {
6221
+ children: [/*#__PURE__*/jsx(RadioButtonAndLabel, {
6006
6222
  checked: levelInfoMode === 'AT' || levelInfoMode === 'TOPS',
6007
6223
  "data-testid": "levels-AT",
6008
6224
  disabled: fieldsDisabled,
6009
6225
  label: t('at'),
6010
6226
  value: "AT"
6011
- }), (levelInfoMode === 'AT' || levelInfoMode === 'TOPS') && !isRadioactiveCloud ? jsxs(Grid, {
6227
+ }), (levelInfoMode === 'AT' || levelInfoMode === 'TOPS') && !isRadioactiveCloud ? /*#__PURE__*/jsxs(Grid, {
6012
6228
  alignItems: "flex-start",
6013
6229
  container: true,
6014
6230
  justifyItems: "flex-end",
6015
6231
  spacing: 2,
6016
- children: [jsx(Grid, {
6232
+ children: [/*#__PURE__*/jsx(Grid, {
6017
6233
  size: {
6018
6234
  xs: 12,
6019
6235
  md: 3
6020
6236
  },
6021
- children: jsx(FormControlLabel, {
6022
- control: jsx(Checkbox, {
6237
+ children: /*#__PURE__*/jsx(FormControlLabel, {
6238
+ control: /*#__PURE__*/jsx(Checkbox, {
6023
6239
  checked: levelInfoMode === 'TOPS',
6024
6240
  color: "secondary",
6025
6241
  disabled: isDisabled || isSigmetTS,
@@ -6035,12 +6251,12 @@ var Levels = function Levels(_ref) {
6035
6251
  "data-testid": "levels-TOPS",
6036
6252
  label: t('levels-tops-label')
6037
6253
  })
6038
- }), jsx(Grid, {
6254
+ }), /*#__PURE__*/jsx(Grid, {
6039
6255
  size: {
6040
6256
  xs: 4,
6041
6257
  md: 3
6042
6258
  },
6043
- children: jsx(ReactHookFormSelect, {
6259
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
6044
6260
  defaultValue: 'FL',
6045
6261
  disabled: isDisabled,
6046
6262
  isReadOnly: isReadOnly,
@@ -6061,18 +6277,18 @@ var Levels = function Levels(_ref) {
6061
6277
  size: "small",
6062
6278
  sx: styles$2.unit,
6063
6279
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
6064
- return jsx(MenuItem, {
6280
+ return /*#__PURE__*/jsx(MenuItem, {
6065
6281
  value: key,
6066
6282
  children: allowedLevelUnitsForFir[key]
6067
6283
  }, key);
6068
6284
  })
6069
6285
  })
6070
- }), jsx(Grid, {
6286
+ }), /*#__PURE__*/jsx(Grid, {
6071
6287
  size: {
6072
6288
  xs: 8,
6073
6289
  md: 6
6074
6290
  },
6075
- children: jsx(ReactHookFormNumberField, {
6291
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
6076
6292
  autoFocus: true,
6077
6293
  "data-testid": "level.value",
6078
6294
  disabled: isDisabled,
@@ -6115,27 +6331,27 @@ var Levels = function Levels(_ref) {
6115
6331
  size: "small"
6116
6332
  })
6117
6333
  })]
6118
- }) : null, jsx(RadioButtonAndLabel, {
6334
+ }) : null, /*#__PURE__*/jsx(RadioButtonAndLabel, {
6119
6335
  checked: levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC',
6120
6336
  "data-testid": "levels-BETW",
6121
6337
  disabled: fieldsDisabled,
6122
6338
  label: t('between'),
6123
6339
  value: "BETW"
6124
- }), levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC' ? jsxs(Fragment, {
6125
- children: [jsxs(Grid, {
6340
+ }), levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC' ? /*#__PURE__*/jsxs(Fragment, {
6341
+ children: [/*#__PURE__*/jsxs(Grid, {
6126
6342
  container: true,
6127
6343
  spacing: 2,
6128
- children: [jsx(Grid, {
6344
+ children: [/*#__PURE__*/jsx(Grid, {
6129
6345
  size: {
6130
6346
  xs: 12,
6131
6347
  md: 3
6132
6348
  }
6133
- }), jsx(Grid, {
6349
+ }), /*#__PURE__*/jsx(Grid, {
6134
6350
  size: {
6135
6351
  xs: 4,
6136
6352
  md: 3
6137
6353
  },
6138
- children: jsx(ReactHookFormSelect, {
6354
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
6139
6355
  defaultValue: 'FL',
6140
6356
  disabled: fieldsDisabled,
6141
6357
  isReadOnly: isReadOnly,
@@ -6162,18 +6378,18 @@ var Levels = function Levels(_ref) {
6162
6378
  size: "small",
6163
6379
  sx: styles$2.unit,
6164
6380
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
6165
- return jsx(MenuItem, {
6381
+ return /*#__PURE__*/jsx(MenuItem, {
6166
6382
  value: key,
6167
6383
  children: allowedLevelUnitsForFir[key]
6168
6384
  }, key);
6169
6385
  })
6170
6386
  })
6171
- }), jsx(Grid, {
6387
+ }), /*#__PURE__*/jsx(Grid, {
6172
6388
  size: {
6173
6389
  xs: 8,
6174
6390
  md: 6
6175
6391
  },
6176
- children: jsx(ReactHookFormNumberField, {
6392
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
6177
6393
  autoFocus: true,
6178
6394
  disabled: fieldsDisabled,
6179
6395
  isReadOnly: isReadOnly,
@@ -6220,18 +6436,18 @@ var Levels = function Levels(_ref) {
6220
6436
  value: level || ''
6221
6437
  })
6222
6438
  })]
6223
- }), jsxs(Grid, {
6439
+ }), /*#__PURE__*/jsxs(Grid, {
6224
6440
  alignItems: "flex-start",
6225
6441
  container: true,
6226
6442
  justifyItems: "flex-end",
6227
6443
  spacing: 2,
6228
- children: [jsx(Grid, {
6444
+ children: [/*#__PURE__*/jsx(Grid, {
6229
6445
  size: {
6230
6446
  xs: 12,
6231
6447
  md: 3
6232
6448
  },
6233
- children: jsx(FormControlLabel, {
6234
- control: jsx(Checkbox, {
6449
+ children: /*#__PURE__*/jsx(FormControlLabel, {
6450
+ control: /*#__PURE__*/jsx(Checkbox, {
6235
6451
  checked: levelInfoMode === 'BETW_SFC',
6236
6452
  color: "secondary",
6237
6453
  disabled: fieldsDisabled,
@@ -6246,13 +6462,13 @@ var Levels = function Levels(_ref) {
6246
6462
  "data-testid": "levels-SFC",
6247
6463
  label: "SFC"
6248
6464
  })
6249
- }), levelInfoMode !== 'BETW_SFC' && jsxs(Fragment, {
6250
- children: [jsx(Grid, {
6465
+ }), levelInfoMode !== 'BETW_SFC' && /*#__PURE__*/jsxs(Fragment, {
6466
+ children: [/*#__PURE__*/jsx(Grid, {
6251
6467
  size: {
6252
6468
  xs: 4,
6253
6469
  md: 3
6254
6470
  },
6255
- children: jsx(ReactHookFormSelect, {
6471
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
6256
6472
  defaultValue: getValues('level.unit') || 'FL',
6257
6473
  disabled: isDisabled,
6258
6474
  isReadOnly: isReadOnly,
@@ -6279,18 +6495,18 @@ var Levels = function Levels(_ref) {
6279
6495
  size: "small",
6280
6496
  sx: styles$2.unit,
6281
6497
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
6282
- return jsx(MenuItem, {
6498
+ return /*#__PURE__*/jsx(MenuItem, {
6283
6499
  value: key,
6284
6500
  children: allowedLevelUnitsForFir[key]
6285
6501
  }, key);
6286
6502
  })
6287
6503
  })
6288
- }), jsx(Grid, {
6504
+ }), /*#__PURE__*/jsx(Grid, {
6289
6505
  size: {
6290
6506
  xs: 8,
6291
6507
  md: 6
6292
6508
  },
6293
- children: jsx(ReactHookFormNumberField, {
6509
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
6294
6510
  disabled: isDisabled,
6295
6511
  isReadOnly: isReadOnly,
6296
6512
  label: t('levels-lower-level-label'),
@@ -6339,24 +6555,24 @@ var Levels = function Levels(_ref) {
6339
6555
  })]
6340
6556
  })]
6341
6557
  })]
6342
- }) : null, jsx(RadioButtonAndLabel, {
6558
+ }) : null, /*#__PURE__*/jsx(RadioButtonAndLabel, {
6343
6559
  checked: levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV',
6344
6560
  "data-testid": "levels-ABV",
6345
6561
  disabled: fieldsDisabled,
6346
6562
  label: t('above'),
6347
6563
  value: "ABV"
6348
- }), levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV' ? jsxs(Grid, {
6564
+ }), levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV' ? /*#__PURE__*/jsxs(Grid, {
6349
6565
  alignItems: "flex-start",
6350
6566
  container: true,
6351
6567
  justifyItems: "flex-end",
6352
6568
  spacing: 2,
6353
- children: [jsx(Grid, {
6569
+ children: [/*#__PURE__*/jsx(Grid, {
6354
6570
  size: {
6355
6571
  xs: 12,
6356
6572
  md: 3
6357
6573
  },
6358
- children: jsx(FormControlLabel, {
6359
- control: jsx(Checkbox, {
6574
+ children: /*#__PURE__*/jsx(FormControlLabel, {
6575
+ control: /*#__PURE__*/jsx(Checkbox, {
6360
6576
  checked: levelInfoMode === 'TOPS_ABV',
6361
6577
  disabled: isDisabled || isSigmetTS,
6362
6578
  onChange: function onChange() {
@@ -6371,12 +6587,12 @@ var Levels = function Levels(_ref) {
6371
6587
  "data-testid": "levels-TOPS_ABV",
6372
6588
  label: t('levels-tops-label')
6373
6589
  })
6374
- }), jsx(Grid, {
6590
+ }), /*#__PURE__*/jsx(Grid, {
6375
6591
  size: {
6376
6592
  xs: 4,
6377
6593
  md: 3
6378
6594
  },
6379
- children: jsx(ReactHookFormSelect, {
6595
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
6380
6596
  defaultValue: 'FL',
6381
6597
  disabled: isDisabled,
6382
6598
  isReadOnly: isReadOnly,
@@ -6397,18 +6613,18 @@ var Levels = function Levels(_ref) {
6397
6613
  size: "small",
6398
6614
  sx: styles$2.unit,
6399
6615
  children: Object.keys(allowedLevelUnitsForFir).map(function (key) {
6400
- return jsx(MenuItem, {
6616
+ return /*#__PURE__*/jsx(MenuItem, {
6401
6617
  value: key,
6402
6618
  children: allowedLevelUnitsForFir[key]
6403
6619
  }, key);
6404
6620
  })
6405
6621
  })
6406
- }), jsx(Grid, {
6622
+ }), /*#__PURE__*/jsx(Grid, {
6407
6623
  size: {
6408
6624
  xs: 8,
6409
6625
  md: 6
6410
6626
  },
6411
- children: jsx(ReactHookFormNumberField, {
6627
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
6412
6628
  autoFocus: true,
6413
6629
  disabled: isDisabled,
6414
6630
  isReadOnly: isReadOnly,
@@ -6455,6 +6671,23 @@ var Levels = function Levels(_ref) {
6455
6671
  });
6456
6672
  };
6457
6673
 
6674
+ /* *
6675
+ * Licensed under the Apache License, Version 2.0 (the "License");
6676
+ * you may not use this file except in compliance with the License.
6677
+ * You may obtain a copy of the License at
6678
+ *
6679
+ * http://www.apache.org/licenses/LICENSE-2.0
6680
+ *
6681
+ * Unless required by applicable law or agreed to in writing, software
6682
+ * distributed under the License is distributed on an "AS IS" BASIS,
6683
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6684
+ * See the License for the specific language governing permissions and
6685
+ * limitations under the License.
6686
+ *
6687
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6688
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6689
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6690
+ * */
6458
6691
  var ObservationForecast = function ObservationForecast(_ref) {
6459
6692
  var isDisabled = _ref.isDisabled,
6460
6693
  isReadOnly = _ref.isReadOnly;
@@ -6472,7 +6705,7 @@ var ObservationForecast = function ObservationForecast(_ref) {
6472
6705
  return isShortTest() || isRequiredField(value);
6473
6706
  };
6474
6707
  var fieldsDisabled = isDisabled || isShortTest();
6475
- return jsx(ProductFormFieldLayout, {
6708
+ return /*#__PURE__*/jsx(ProductFormFieldLayout, {
6476
6709
  sx: {
6477
6710
  marginTop: -1,
6478
6711
  '.MuiButtonBase-root.MuiRadio-root': {
@@ -6484,7 +6717,7 @@ var ObservationForecast = function ObservationForecast(_ref) {
6484
6717
  marginTop: '3px'
6485
6718
  }
6486
6719
  },
6487
- children: jsxs(ReactHookFormRadioGroup, {
6720
+ children: /*#__PURE__*/jsxs(ReactHookFormRadioGroup, {
6488
6721
  disabled: fieldsDisabled,
6489
6722
  isReadOnly: isReadOnly,
6490
6723
  name: "isObservationOrForecast",
@@ -6496,12 +6729,12 @@ var ObservationForecast = function ObservationForecast(_ref) {
6496
6729
  isRequired: isRequired
6497
6730
  }
6498
6731
  },
6499
- children: [(!isReadOnly || watch('isObservationOrForecast') === 'OBS') && jsx(RadioButtonAndLabel, {
6732
+ children: [(!isReadOnly || watch('isObservationOrForecast') === 'OBS') && /*#__PURE__*/jsx(RadioButtonAndLabel, {
6500
6733
  "data-testid": "isObservationOrForecast-OBS",
6501
6734
  disabled: fieldsDisabled,
6502
6735
  label: t('observation-label'),
6503
6736
  value: "OBS"
6504
- }), (!isReadOnly || watch('isObservationOrForecast') === 'FCST') && jsx(RadioButtonAndLabel, {
6737
+ }), (!isReadOnly || watch('isObservationOrForecast') === 'FCST') && /*#__PURE__*/jsx(RadioButtonAndLabel, {
6505
6738
  "data-testid": "isObservationOrForecast-FCST",
6506
6739
  disabled: fieldsDisabled,
6507
6740
  label: t('forecast-label'),
@@ -6511,6 +6744,23 @@ var ObservationForecast = function ObservationForecast(_ref) {
6511
6744
  });
6512
6745
  };
6513
6746
 
6747
+ /* *
6748
+ * Licensed under the Apache License, Version 2.0 (the "License");
6749
+ * you may not use this file except in compliance with the License.
6750
+ * You may obtain a copy of the License at
6751
+ *
6752
+ * http://www.apache.org/licenses/LICENSE-2.0
6753
+ *
6754
+ * Unless required by applicable law or agreed to in writing, software
6755
+ * distributed under the License is distributed on an "AS IS" BASIS,
6756
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6757
+ * See the License for the specific language governing permissions and
6758
+ * limitations under the License.
6759
+ *
6760
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6761
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6762
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6763
+ * */
6514
6764
  var goZeroSeconds = function goZeroSeconds(val) {
6515
6765
  return dateUtils.dateToString(dateUtils.set(dateUtils.utc(val), {
6516
6766
  seconds: 0,
@@ -6532,9 +6782,9 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
6532
6782
  isShortTest = _useShortTestHelpers.isShortTest;
6533
6783
  var fieldsDisabled = isDisabled || isShortTest();
6534
6784
  var forecastValidationMessage = t('surface-visibility-between-time');
6535
- return !isReadOnly || watch('observationOrForecastTime') !== null ? jsx(ProductFormFieldLayout, {
6785
+ return !isReadOnly || watch('observationOrForecastTime') !== null ? /*#__PURE__*/jsx(ProductFormFieldLayout, {
6536
6786
  title: t('at'),
6537
- children: jsx(ReactHookFormDateTime, {
6787
+ children: /*#__PURE__*/jsx(ReactHookFormDateTime, {
6538
6788
  "data-testid": "obs-fcst-time",
6539
6789
  disableFuture: watch('isObservationOrForecast') === 'OBS',
6540
6790
  disablePast: watch('isObservationOrForecast') === 'FCST',
@@ -6562,6 +6812,23 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
6562
6812
  }) : null;
6563
6813
  };
6564
6814
 
6815
+ /* *
6816
+ * Licensed under the Apache License, Version 2.0 (the "License");
6817
+ * you may not use this file except in compliance with the License.
6818
+ * You may obtain a copy of the License at
6819
+ *
6820
+ * http://www.apache.org/licenses/LICENSE-2.0
6821
+ *
6822
+ * Unless required by applicable law or agreed to in writing, software
6823
+ * distributed under the License is distributed on an "AS IS" BASIS,
6824
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6825
+ * See the License for the specific language governing permissions and
6826
+ * limitations under the License.
6827
+ *
6828
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6829
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6830
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6831
+ * */
6565
6832
  var Phenomenon = function Phenomenon(_ref) {
6566
6833
  var isDisabled = _ref.isDisabled,
6567
6834
  isReadOnly = _ref.isReadOnly,
@@ -6583,6 +6850,7 @@ var Phenomenon = function Phenomenon(_ref) {
6583
6850
  var isValidPhenomenon = phenomenaList.some(function (phen) {
6584
6851
  return phen.code === defaultPhenomenon;
6585
6852
  });
6853
+
6586
6854
  // Only auto-select if there is exactly one phenomenon available
6587
6855
  if (!isValidPhenomenon && phenomenaList.length === 1) {
6588
6856
  var _phenomenaList$;
@@ -6592,7 +6860,7 @@ var Phenomenon = function Phenomenon(_ref) {
6592
6860
  if (phenomenaList.length === 1) {
6593
6861
  handleSinglePhenomenaSelection();
6594
6862
  }
6595
- return jsx(ProductFormFieldLayout, {
6863
+ return /*#__PURE__*/jsx(ProductFormFieldLayout, {
6596
6864
  sx: {
6597
6865
  '.MuiFormHelperText-root.Mui-error': {
6598
6866
  marginBottom: '-22px',
@@ -6600,7 +6868,7 @@ var Phenomenon = function Phenomenon(_ref) {
6600
6868
  }
6601
6869
  },
6602
6870
  title: t('phenomenon-title'),
6603
- children: jsx(ReactHookFormSelect, {
6871
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
6604
6872
  "data-testid": "phenomenon",
6605
6873
  disabled: fieldsDisabled,
6606
6874
  isReadOnly: isReadOnly,
@@ -6612,6 +6880,7 @@ var Phenomenon = function Phenomenon(_ref) {
6612
6880
  } else if (getValues('phenomenon') === 'RDOACT_CLD') {
6613
6881
  // By definition, phenomenon 'RDOACT_CLD'shall not ever move but stay stationary
6614
6882
  setValue('movementType', 'STATIONARY');
6883
+
6615
6884
  // Also by definition, phenomenon 'RDOACT_CLD' is strictly defined to always span from surface to upper level
6616
6885
  // with no lower explicit level values defined, hence level mode shall be set to 'BETW_SFC' instead of 'BETW'.
6617
6886
  setValue('levelInfoMode', 'BETW_SFC');
@@ -6624,7 +6893,7 @@ var Phenomenon = function Phenomenon(_ref) {
6624
6893
  },
6625
6894
  size: "small",
6626
6895
  children: phenomenaList.map(function (phenomenon) {
6627
- return jsx(MenuItem, {
6896
+ return /*#__PURE__*/jsx(MenuItem, {
6628
6897
  value: phenomenon.code,
6629
6898
  children: phenomenon.description
6630
6899
  }, phenomenon.code);
@@ -6633,6 +6902,23 @@ var Phenomenon = function Phenomenon(_ref) {
6633
6902
  });
6634
6903
  };
6635
6904
 
6905
+ /* *
6906
+ * Licensed under the Apache License, Version 2.0 (the "License");
6907
+ * you may not use this file except in compliance with the License.
6908
+ * You may obtain a copy of the License at
6909
+ *
6910
+ * http://www.apache.org/licenses/LICENSE-2.0
6911
+ *
6912
+ * Unless required by applicable law or agreed to in writing, software
6913
+ * distributed under the License is distributed on an "AS IS" BASIS,
6914
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6915
+ * See the License for the specific language governing permissions and
6916
+ * limitations under the License.
6917
+ *
6918
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6919
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6920
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6921
+ * */
6636
6922
  var DEFAULT_ROUNDING_MOVEMENT_KT = 5;
6637
6923
  var DEFAULT_ROUNDING_MOVEMENT_KMH = 10;
6638
6924
  var getMovementStepValKTMessage = function getMovementStepValKTMessage(t, value) {
@@ -6660,6 +6946,7 @@ var _validateMovementSteps = function validateMovementSteps(t, value, unit, prod
6660
6946
  movement_rounding_kt = _getActiveFIRArea$mov === void 0 ? DEFAULT_ROUNDING_MOVEMENT_KT : _getActiveFIRArea$mov,
6661
6947
  _getActiveFIRArea$mov2 = _getActiveFIRArea.movement_rounding_kmh,
6662
6948
  movement_rounding_kmh = _getActiveFIRArea$mov2 === void 0 ? DEFAULT_ROUNDING_MOVEMENT_KMH : _getActiveFIRArea$mov2;
6949
+
6663
6950
  // Parse to integer to check for steps
6664
6951
  var intLevel = parseInt(value, 10);
6665
6952
  if (MovementUnit[unit] === MovementUnit.KT) {
@@ -6712,6 +6999,7 @@ var Progress = function Progress(_ref) {
6712
6999
  var getFIRValue = function getFIRValue() {
6713
7000
  return getValues('locationIndicatorATSR');
6714
7001
  };
7002
+
6715
7003
  // Get allowed movement units based on selected FIR - if no FIR selected, allow all units
6716
7004
  var allowedMovementUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'movement_unit', MovementUnit);
6717
7005
  React.useEffect(function () {
@@ -6730,23 +7018,27 @@ var Progress = function Progress(_ref) {
6730
7018
  var isVolcanicCloud = watch('phenomenon') === 'VA_CLD';
6731
7019
  var isShortTestOrRdoact = isShortTest() || isRadioactiveCloud;
6732
7020
  var fieldsDisabled = isDisabled || isShortTestOrRdoact;
7021
+
6733
7022
  // Max points the FIR allows for a polygon
6734
7023
  var maxPoints = getMaxPolygonPoints(getFIRValue(), productConfig);
7024
+
6735
7025
  // Intersections with FIR
6736
7026
  var intersectionPointCount = countIntersectionPoints(geoJSON, geoJSONIntersection);
6737
7027
  var drawnGeometry = geoJSON == null || (_geoJSON$features$ = geoJSON.features[0]) == null ? void 0 : _geoJSON$features$.geometry;
6738
7028
  var interceptionGeometry = geoJSONIntersection == null || (_geoJSONIntersection$ = geoJSONIntersection.features[0]) == null ? void 0 : _geoJSONIntersection$.geometry;
7029
+
6739
7030
  // Total points in the user drawn polygon
6740
7031
  var totalDrawnPoints = drawnGeometry != null && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
7032
+
6741
7033
  // Total points in the intersection polygon
6742
7034
  var intersectingPolygonPointsTotal = interceptionGeometry != null && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
6743
7035
  var showMaxFeaturePointsWarning = intersectionPointCount > 7 && hasMaxFeaturePoints(geoJSONIntersection, maxPoints) && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6744
7036
  var showMoreThan6PointsWarning = totalDrawnPoints > 7 && intersectionPointCount < 1 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6745
7037
  var showIntersectionAbove6PointsWarning = intersectingPolygonPointsTotal > 7 && intersectionPointCount > 1 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
6746
- return jsxs(ProductFormFieldLayout, {
7038
+ return /*#__PURE__*/jsxs(ProductFormFieldLayout, {
6747
7039
  sx: styles$2.containerItem,
6748
7040
  title: t('progress'),
6749
- children: [jsxs(ReactHookFormRadioGroup, {
7041
+ children: [/*#__PURE__*/jsxs(ReactHookFormRadioGroup, {
6750
7042
  "data-testid": "movementType-group",
6751
7043
  isReadOnly: isReadOnly,
6752
7044
  name: "movementType",
@@ -6763,31 +7055,31 @@ var Progress = function Progress(_ref) {
6763
7055
  isRequired: isRequired
6764
7056
  }
6765
7057
  },
6766
- children: [!!isVolcanicCloud && jsx(RadioButtonAndLabel, {
7058
+ children: [!!isVolcanicCloud && /*#__PURE__*/jsx(RadioButtonAndLabel, {
6767
7059
  "data-testid": "movementType-NO_VA_EXP",
6768
7060
  disabled: fieldsDisabled,
6769
7061
  label: t('progress-radio-button-label-no-va-exp'),
6770
7062
  value: "NO_VA_EXP"
6771
- }), jsxs(Fragment, {
6772
- children: [jsx(RadioButtonAndLabel, {
7063
+ }), /*#__PURE__*/jsxs(Fragment, {
7064
+ children: [/*#__PURE__*/jsx(RadioButtonAndLabel, {
6773
7065
  "data-testid": "movementType-STATIONARY",
6774
7066
  disabled: fieldsDisabled,
6775
7067
  label: t('progress-radio-button-label-stationary'),
6776
7068
  value: "STATIONARY"
6777
- }), jsx(RadioButtonAndLabel, {
7069
+ }), /*#__PURE__*/jsx(RadioButtonAndLabel, {
6778
7070
  "data-testid": "movementType-MOVEMENT",
6779
7071
  disabled: fieldsDisabled,
6780
7072
  label: t('progress-radio-button-label-movement'),
6781
7073
  value: "MOVEMENT"
6782
- }), !!isSigmet && !!isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
7074
+ }), !!isSigmet && !!isShortTestOrRdoact && /*#__PURE__*/jsx(RadioButtonAndLabel, {
6783
7075
  "data-testid": "movementType-FORECAST_POSITION",
6784
7076
  disabled: fieldsDisabled,
6785
7077
  label: t('progress-radio-button-label-end-potision'),
6786
7078
  value: "FORECAST_POSITION"
6787
7079
  })]
6788
- }), movementType === 'MOVEMENT' && !isShortTestOrRdoact && jsxs(Fragment, {
6789
- children: [jsx(Grid, {
6790
- children: jsx(ReactHookFormSelect, {
7080
+ }), movementType === 'MOVEMENT' && !isShortTestOrRdoact && /*#__PURE__*/jsxs(Fragment, {
7081
+ children: [/*#__PURE__*/jsx(Grid, {
7082
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
6791
7083
  autoFocus: true,
6792
7084
  "data-testid": "movement-movementDirection",
6793
7085
  disabled: isDisabled,
@@ -6806,17 +7098,17 @@ var Progress = function Progress(_ref) {
6806
7098
  size: "small",
6807
7099
  sx: styles$2.movement,
6808
7100
  children: Object.keys(Direction).map(function (key) {
6809
- return jsx(MenuItem, {
7101
+ return /*#__PURE__*/jsx(MenuItem, {
6810
7102
  value: key,
6811
7103
  children: Direction[key]
6812
7104
  }, key);
6813
7105
  })
6814
7106
  })
6815
- }), jsxs(Grid, {
7107
+ }), /*#__PURE__*/jsxs(Grid, {
6816
7108
  container: true,
6817
- children: [jsx(Grid, {
7109
+ children: [/*#__PURE__*/jsx(Grid, {
6818
7110
  size: 5,
6819
- children: jsx(ReactHookFormSelect, {
7111
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
6820
7112
  "data-testid": "movement-movementUnit",
6821
7113
  defaultValue: 'KT',
6822
7114
  disabled: isDisabled,
@@ -6836,15 +7128,15 @@ var Progress = function Progress(_ref) {
6836
7128
  size: "small",
6837
7129
  sx: styles$2.unit,
6838
7130
  children: Object.keys(allowedMovementUnitsForFir).map(function (key) {
6839
- return jsx(MenuItem, {
7131
+ return /*#__PURE__*/jsx(MenuItem, {
6840
7132
  value: key,
6841
7133
  children: MovementUnit[key]
6842
7134
  }, key);
6843
7135
  })
6844
7136
  })
6845
- }), jsx(Grid, {
7137
+ }), /*#__PURE__*/jsx(Grid, {
6846
7138
  size: 7,
6847
- children: jsx(ReactHookFormNumberField, {
7139
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
6848
7140
  "data-testid": "movement-movementSpeed",
6849
7141
  disabled: isDisabled,
6850
7142
  isReadOnly: isReadOnly,
@@ -6887,53 +7179,53 @@ var Progress = function Progress(_ref) {
6887
7179
  })
6888
7180
  })]
6889
7181
  })]
6890
- }), !!isSigmet && !isShortTestOrRdoact && jsx(RadioButtonAndLabel, {
7182
+ }), !!isSigmet && !isShortTestOrRdoact && /*#__PURE__*/jsx(RadioButtonAndLabel, {
6891
7183
  "data-testid": "movementType-FORECAST_POSITION",
6892
7184
  disabled: isDisabled,
6893
7185
  label: t('progress-radio-button-label-end-potision'),
6894
7186
  value: "FORECAST_POSITION"
6895
7187
  })]
6896
- }), !!isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(Grid, {
7188
+ }), !!isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && /*#__PURE__*/jsxs(Grid, {
6897
7189
  "data-testid": "endGeometry",
6898
7190
  size: 12,
6899
7191
  sx: styles$2.drawSectionProgress,
6900
- children: [!isReadOnly && jsxs(Fragment, {
6901
- children: [jsx(DrawTools, {
7192
+ children: [!isReadOnly && /*#__PURE__*/jsxs(Fragment, {
7193
+ children: [/*#__PURE__*/jsx(DrawTools, {
6902
7194
  activeTool: activeTool,
6903
7195
  "data-testid": "endGeometry-drawTools",
6904
7196
  disabledTooltip: disabledTooltip,
6905
7197
  isDisabled: combinedDisabled,
6906
7198
  onChangeTool: onChangeTool,
6907
7199
  tools: tools
6908
- }), !!activeTool && jsx(FormHelperText, {
7200
+ }), !!activeTool && /*#__PURE__*/jsx(FormHelperText, {
6909
7201
  sx: styles$2.quitDrawModeMessage,
6910
7202
  variant: "filled",
6911
7203
  children: t('geometry-exit-draw-mode-message')
6912
- }), !!errors.endGeometry && jsx(FormHelperText, {
7204
+ }), !!errors.endGeometry && /*#__PURE__*/jsx(FormHelperText, {
6913
7205
  error: true,
6914
7206
  variant: "filled",
6915
7207
  children: errors.endGeometry.message
6916
7208
  }), /* non-blocking warnings */
6917
- !!showMaxFeaturePointsWarning && jsx(FormHelperText, {
7209
+ !!showMaxFeaturePointsWarning && /*#__PURE__*/jsx(FormHelperText, {
6918
7210
  variant: "filled",
6919
7211
  children: t('geometry-max-feature-points-message')
6920
7212
  }), /* non-blocking warnings */
6921
- !!showMoreThan6PointsWarning && jsx(FormHelperText, {
7213
+ !!showMoreThan6PointsWarning && /*#__PURE__*/jsx(FormHelperText, {
6922
7214
  variant: "filled",
6923
7215
  children: t('progress-more-than-6-points-message', {
6924
7216
  totalDrawnPoints: totalDrawnPoints
6925
7217
  })
6926
7218
  }), /* non-blocking warnings */
6927
- !!showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
7219
+ !!showIntersectionAbove6PointsWarning && /*#__PURE__*/jsx(FormHelperText, {
6928
7220
  variant: "filled",
6929
7221
  children: t('progress-intersection-above-6-points-message', {
6930
7222
  intersectingPolygonPointsTotal: intersectingPolygonPointsTotal
6931
7223
  })
6932
- }), hasMulitpleIntersections(geoJSONIntersection) && !activeTool && !errors.endGeometry && !isFir(geoJSON) && jsx(FormHelperText, {
7224
+ }), hasMulitpleIntersections(geoJSONIntersection) && !activeTool && !errors.endGeometry && !isFir(geoJSON) && /*#__PURE__*/jsx(FormHelperText, {
6933
7225
  variant: "filled",
6934
7226
  children: t('geometry-multi-intersections-message')
6935
7227
  })]
6936
- }), jsx(ReactHookFormHiddenInput, {
7228
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
6937
7229
  name: "endGeometry",
6938
7230
  rules: {
6939
7231
  validate: {
@@ -6953,14 +7245,32 @@ var Progress = function Progress(_ref) {
6953
7245
  }
6954
7246
  }
6955
7247
  }
6956
- }), jsx(ReactHookFormHiddenInput, {
7248
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
6957
7249
  name: "endGeometryIntersect"
6958
7250
  })]
6959
7251
  })]
6960
7252
  });
6961
7253
  };
6962
7254
 
6963
- var getFirLocationDefaultValues = function getFirLocationDefaultValues(productConfig, currentFir) {
7255
+ /* *
7256
+ * Licensed under the Apache License, Version 2.0 (the "License");
7257
+ * you may not use this file except in compliance with the License.
7258
+ * You may obtain a copy of the License at
7259
+ *
7260
+ * http://www.apache.org/licenses/LICENSE-2.0
7261
+ *
7262
+ * Unless required by applicable law or agreed to in writing, software
7263
+ * distributed under the License is distributed on an "AS IS" BASIS,
7264
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7265
+ * See the License for the specific language governing permissions and
7266
+ * limitations under the License.
7267
+ *
7268
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7269
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7270
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7271
+ * */
7272
+
7273
+ var getFirLocationDefaultValues = function getFirLocationDefaultValues(productConfig, currentFir) {
6964
7274
  var defaultActiveFIR = currentFir || productConfig.active_firs[0]; // first FIR in active_firs is the default
6965
7275
  var currentLocationIndicatorATSR = productConfig.fir_areas[defaultActiveFIR].location_indicator_atsr;
6966
7276
  var currentFirArea = productConfig.fir_areas[currentLocationIndicatorATSR];
@@ -6999,9 +7309,11 @@ var SelectFIR = function SelectFIR(_ref) {
6999
7309
  locationIndicatorMWO = _getFirLocationDefaul.locationIndicatorMWO,
7000
7310
  firName = _getFirLocationDefaul.firName,
7001
7311
  firGeometry = _getFirLocationDefaul.firGeometry;
7002
- var onChangeLocationATSR = function onChangeLocationATSR(event) {
7312
+ var onChangeLocationATSR = function onChangeLocationATSR(event // Update the event type here
7313
+ ) {
7003
7314
  var value = event.target.value; // MUI Select component's target has a `value` property
7004
7315
  var valuesFromConfig = getFirLocationDefaultValues(productConfig, value); // Ensure value is treated as a string
7316
+
7005
7317
  // Updates values from config
7006
7318
  setValue('locationIndicatorATSU', valuesFromConfig.locationIndicatorATSU);
7007
7319
  setValue('firName', valuesFromConfig.firName);
@@ -7019,14 +7331,15 @@ var SelectFIR = function SelectFIR(_ref) {
7019
7331
  setValue('phenomenon', '');
7020
7332
  }
7021
7333
  }
7334
+
7022
7335
  // Trigger validation for fields dependent on FIR config
7023
7336
  var fieldnames = ['phenomenon', 'validDateStart', 'validDateEnd', 'movementSpeed', 'level.value', 'lowerLevel.value'];
7024
7337
  triggerValidations(fieldnames, getValues, trigger);
7025
7338
  onChange(event, valuesFromConfig.phenomena); // Pass the event and updated phenomena as arguments
7026
7339
  };
7027
- return jsxs(ProductFormFieldLayout, {
7340
+ return /*#__PURE__*/jsxs(ProductFormFieldLayout, {
7028
7341
  title: t('select-fir-title'),
7029
- children: [jsx(ReactHookFormSelect, {
7342
+ children: [/*#__PURE__*/jsx(ReactHookFormSelect, {
7030
7343
  defaultValue: locationIndicatorATSR,
7031
7344
  disabled: isDisabled,
7032
7345
  isReadOnly: isReadOnly,
@@ -7040,24 +7353,24 @@ var SelectFIR = function SelectFIR(_ref) {
7040
7353
  },
7041
7354
  size: "small",
7042
7355
  children: optionsFIR.map(function (fir) {
7043
- return jsx(MenuItem, {
7356
+ return /*#__PURE__*/jsx(MenuItem, {
7044
7357
  value: fir.ATSR,
7045
7358
  children: fir.FIR
7046
7359
  }, fir.ATSR + "-" + fir.FIR);
7047
7360
  })
7048
- }), jsx(ReactHookFormHiddenInput, {
7361
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
7049
7362
  "data-testid": "locationIndicatorATSU",
7050
7363
  defaultValue: locationIndicatorATSU,
7051
7364
  name: "locationIndicatorATSU"
7052
- }), jsx(ReactHookFormHiddenInput, {
7365
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
7053
7366
  "data-testid": "locationIndicatorMWO",
7054
7367
  defaultValue: locationIndicatorMWO,
7055
7368
  name: "locationIndicatorMWO"
7056
- }), jsx(ReactHookFormHiddenInput, {
7369
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
7057
7370
  "data-testid": "firName",
7058
7371
  defaultValue: firName,
7059
7372
  name: "firName"
7060
- }), jsx(ReactHookFormHiddenInput, {
7373
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
7061
7374
  "data-testid": "firGeometry",
7062
7375
  defaultValue: firGeometry,
7063
7376
  name: "firGeometry"
@@ -7065,6 +7378,23 @@ var SelectFIR = function SelectFIR(_ref) {
7065
7378
  });
7066
7379
  };
7067
7380
 
7381
+ /* *
7382
+ * Licensed under the Apache License, Version 2.0 (the "License");
7383
+ * you may not use this file except in compliance with the License.
7384
+ * You may obtain a copy of the License at
7385
+ *
7386
+ * http://www.apache.org/licenses/LICENSE-2.0
7387
+ *
7388
+ * Unless required by applicable law or agreed to in writing, software
7389
+ * distributed under the License is distributed on an "AS IS" BASIS,
7390
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7391
+ * See the License for the specific language governing permissions and
7392
+ * limitations under the License.
7393
+ *
7394
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7395
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7396
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7397
+ * */
7068
7398
  var StartGeometry = function StartGeometry(_ref) {
7069
7399
  var _geoJSON$features$, _geoJSONIntersection$;
7070
7400
  var _ref$isReadOnly = _ref.isReadOnly,
@@ -7093,54 +7423,58 @@ var StartGeometry = function StartGeometry(_ref) {
7093
7423
  var shortTest = isShortTest();
7094
7424
  var combinedDisabled = shortTest || isDisabled;
7095
7425
  var disabledTooltip = !shortTest && isDisabled ? t('geometry-drawing-disabled') : undefined;
7426
+
7096
7427
  // Max points the FIR allows for a polygon
7097
7428
  var maxPoints = getMaxPolygonPoints(getFIRValue(), productConfig);
7429
+
7098
7430
  // Intersections with FIR
7099
7431
  var intersectionPointCount = countIntersectionPoints(geoJSON, geoJSONIntersection);
7100
7432
  var drawnGeometry = geoJSON == null || (_geoJSON$features$ = geoJSON.features[0]) == null ? void 0 : _geoJSON$features$.geometry;
7101
7433
  var interceptionGeometry = geoJSONIntersection == null || (_geoJSONIntersection$ = geoJSONIntersection.features[0]) == null ? void 0 : _geoJSONIntersection$.geometry;
7434
+
7102
7435
  // Total points in the user drawn polygon
7103
7436
  var totalDrawnPoints = drawnGeometry != null && drawnGeometry.coordinates[0] ? drawnGeometry.coordinates[0].length : 0;
7437
+
7104
7438
  // Total points in the intersection polygon
7105
7439
  var intersectingPolygonPointsTotal = interceptionGeometry != null && interceptionGeometry.coordinates[0] ? interceptionGeometry.coordinates[0].length : 0;
7106
7440
  var showMaxFeaturePointsWarning = intersectionPointCount > 7 && hasMaxFeaturePoints(geoJSONIntersection, maxPoints) && !activeTool && !errors.startGeometry && !isFir(geoJSON);
7107
7441
  var showMoreThan6PointsWarning = totalDrawnPoints > 7 && intersectionPointCount < 1 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
7108
7442
  var showIntersectionAbove6PointsWarning = intersectingPolygonPointsTotal > 7 && intersectionPointCount > 1 && maxPoints > 7 && !activeTool && !errors.startGeometry && !isFir(geoJSON);
7109
- return !isReadOnly ? jsxs(ProductFormFieldLayout, {
7443
+ return !isReadOnly ? /*#__PURE__*/jsxs(ProductFormFieldLayout, {
7110
7444
  "data-testid": "startGeometry",
7111
7445
  sx: styles$2.drawSection,
7112
7446
  title: t('start-position'),
7113
- children: [jsx(DrawTools, {
7447
+ children: [/*#__PURE__*/jsx(DrawTools, {
7114
7448
  activeTool: activeTool,
7115
7449
  disabledTooltip: disabledTooltip,
7116
7450
  isDisabled: combinedDisabled,
7117
7451
  onChangeTool: onChangeTool,
7118
7452
  tools: tools
7119
- }), !!activeTool && jsx(FormHelperText, {
7453
+ }), !!activeTool && /*#__PURE__*/jsx(FormHelperText, {
7120
7454
  sx: styles$2.quitDrawModeMessage,
7121
7455
  variant: "filled",
7122
7456
  children: t('geometry-exit-draw-mode-message')
7123
- }), !!errors.startGeometry && jsx(FormHelperText, {
7457
+ }), !!errors.startGeometry && /*#__PURE__*/jsx(FormHelperText, {
7124
7458
  error: true,
7125
7459
  variant: "filled",
7126
7460
  children: errors.startGeometry.message
7127
7461
  }), /* non-blocking warnings */
7128
- !!showMaxFeaturePointsWarning && jsx(FormHelperText, {
7462
+ !!showMaxFeaturePointsWarning && /*#__PURE__*/jsx(FormHelperText, {
7129
7463
  variant: "filled",
7130
7464
  children: t('geometry-max-feature-points-message')
7131
7465
  }), /* non-blocking warnings */
7132
- !!showMoreThan6PointsWarning && jsx(FormHelperText, {
7466
+ !!showMoreThan6PointsWarning && /*#__PURE__*/jsx(FormHelperText, {
7133
7467
  variant: "filled",
7134
7468
  children: t('geometry-more-than-6-points-message', {
7135
7469
  totalDrawnPoints: totalDrawnPoints
7136
7470
  })
7137
7471
  }), /* non-blocking warnings */
7138
- !!showIntersectionAbove6PointsWarning && jsx(FormHelperText, {
7472
+ !!showIntersectionAbove6PointsWarning && /*#__PURE__*/jsx(FormHelperText, {
7139
7473
  variant: "filled",
7140
7474
  children: t('geometry-intersection-above-6-points-message', {
7141
7475
  intersectingPolygonPointsTotal: intersectingPolygonPointsTotal
7142
7476
  })
7143
- }), jsx(ReactHookFormHiddenInput, {
7477
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
7144
7478
  name: "startGeometry",
7145
7479
  rules: {
7146
7480
  validate: {
@@ -7162,12 +7496,29 @@ var StartGeometry = function StartGeometry(_ref) {
7162
7496
  }
7163
7497
  }
7164
7498
  }
7165
- }), jsx(ReactHookFormHiddenInput, {
7499
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
7166
7500
  name: "startGeometryIntersect"
7167
7501
  })]
7168
7502
  }) : null;
7169
7503
  };
7170
7504
 
7505
+ /* *
7506
+ * Licensed under the Apache License, Version 2.0 (the "License");
7507
+ * you may not use this file except in compliance with the License.
7508
+ * You may obtain a copy of the License at
7509
+ *
7510
+ * http://www.apache.org/licenses/LICENSE-2.0
7511
+ *
7512
+ * Unless required by applicable law or agreed to in writing, software
7513
+ * distributed under the License is distributed on an "AS IS" BASIS,
7514
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7515
+ * See the License for the specific language governing permissions and
7516
+ * limitations under the License.
7517
+ *
7518
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7519
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7520
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7521
+ * */
7171
7522
  var Type = function Type(_ref) {
7172
7523
  var productType = _ref.productType,
7173
7524
  isReadOnly = _ref.isReadOnly,
@@ -7183,9 +7534,9 @@ var Type = function Type(_ref) {
7183
7534
  var _useShortTestHelpers = useShortTestHelpers(),
7184
7535
  onTypeChange = _useShortTestHelpers.onTypeChange;
7185
7536
  var messageType = productType === 'airmet' ? AirmetType : SigmetType;
7186
- return jsx(ProductFormFieldLayout, {
7537
+ return /*#__PURE__*/jsx(ProductFormFieldLayout, {
7187
7538
  title: t('type-title'),
7188
- children: jsx(ReactHookFormSelect, {
7539
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
7189
7540
  autoFocus: true,
7190
7541
  "data-testid": "type",
7191
7542
  defaultValue: "NORMAL",
@@ -7200,7 +7551,7 @@ var Type = function Type(_ref) {
7200
7551
  },
7201
7552
  size: "small",
7202
7553
  children: Object.keys(messageType).map(function (key) {
7203
- return jsx(MenuItem, {
7554
+ return /*#__PURE__*/jsx(MenuItem, {
7204
7555
  value: key,
7205
7556
  children: messageType[key]
7206
7557
  }, key);
@@ -7209,6 +7560,24 @@ var Type = function Type(_ref) {
7209
7560
  });
7210
7561
  };
7211
7562
 
7563
+ /* *
7564
+ * Licensed under the Apache License, Version 2.0 (the "License");
7565
+ * you may not use this file except in compliance with the License.
7566
+ * You may obtain a copy of the License at
7567
+ *
7568
+ * http://www.apache.org/licenses/LICENSE-2.0
7569
+ *
7570
+ * Unless required by applicable law or agreed to in writing, software
7571
+ * distributed under the License is distributed on an "AS IS" BASIS,
7572
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7573
+ * See the License for the specific language governing permissions and
7574
+ * limitations under the License.
7575
+ *
7576
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7577
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7578
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7579
+ * */
7580
+
7212
7581
  var getValidFromXHoursBeforeMessage = function getValidFromXHoursBeforeMessage(t, hours) {
7213
7582
  return t('valid-from-time-error', {
7214
7583
  hours: hours
@@ -7220,6 +7589,7 @@ var getDefaultValidFromValue = function getDefaultValidFromValue(productConfig)
7220
7589
  minutes: validFromDelayTimeMinutes
7221
7590
  });
7222
7591
  var minutes = dateWithDelay.getUTCMinutes();
7592
+
7223
7593
  // Calculate the minutes needed to round up to the next half hour
7224
7594
  var extraMinutes = minutes <= 30 ? 30 - minutes : 60 - minutes;
7225
7595
  var roundedDate = dateUtils.add(dateWithDelay, {
@@ -7246,6 +7616,7 @@ var ValidFrom = function ValidFrom(_ref) {
7246
7616
  var _useDraftFormHelpers = useDraftFormHelpers(),
7247
7617
  isRequired = _useDraftFormHelpers.isRequired;
7248
7618
  var label = getFieldLabel(t, t('date-and-time'), isReadOnly);
7619
+
7249
7620
  // Only auto-sync to now when amending an already-active SIGMET
7250
7621
  React.useEffect(function () {
7251
7622
  if (!lockBecauseActive) {
@@ -7263,6 +7634,7 @@ var ValidFrom = function ValidFrom(_ref) {
7263
7634
  updateNow();
7264
7635
  intervalId = setInterval(updateNow, 60000);
7265
7636
  }, msUntilNextMinute);
7637
+
7266
7638
  // eslint-disable-next-line consistent-return
7267
7639
  return function () {
7268
7640
  clearTimeout(timeoutId);
@@ -7285,9 +7657,9 @@ var ValidFrom = function ValidFrom(_ref) {
7285
7657
  }
7286
7658
  }
7287
7659
  };
7288
- return jsx(ProductFormFieldLayout, {
7660
+ return /*#__PURE__*/jsx(ProductFormFieldLayout, {
7289
7661
  title: t('valid-from'),
7290
- children: jsx(ReactHookFormDateTime, {
7662
+ children: /*#__PURE__*/jsx(ReactHookFormDateTime, {
7291
7663
  "data-testid": "valid-from",
7292
7664
  defaultNullValue: getDefaultValidFromValue(productConfig),
7293
7665
  disablePast: true,
@@ -7310,10 +7682,29 @@ var ValidFrom = function ValidFrom(_ref) {
7310
7682
  });
7311
7683
  };
7312
7684
 
7685
+ /* *
7686
+ * Licensed under the Apache License, Version 2.0 (the "License");
7687
+ * you may not use this file except in compliance with the License.
7688
+ * You may obtain a copy of the License at
7689
+ *
7690
+ * http://www.apache.org/licenses/LICENSE-2.0
7691
+ *
7692
+ * Unless required by applicable law or agreed to in writing, software
7693
+ * distributed under the License is distributed on an "AS IS" BASIS,
7694
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7695
+ * See the License for the specific language governing permissions and
7696
+ * limitations under the License.
7697
+ *
7698
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7699
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
7700
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7701
+ * */
7313
7702
  var getDefaultValidUntilValue = function getDefaultValidUntilValue(productConfig, phenomenon, fir, validFrom) {
7314
7703
  var maxHoursOfValidity = getMaxHoursOfValidity(phenomenon, fir || '', productConfig);
7704
+
7315
7705
  // Set default validity to 2 hours for thunderstorms, otherwise use maxHoursOfValidity
7316
7706
  var defaultHoursOfValidity = ['EMBD_TS', 'EMBD_TSGR', 'FRQ_TS', 'FRQ_TSGR', 'OBSC_TS', 'OBSC_TSGR', 'SQL_TS', 'SQL_TSGR', 'ISOL_TS', 'ISOL_TSGR', 'OCNL_TS', 'OCNL_TSGR'].includes(phenomenon) ? 2 : maxHoursOfValidity;
7707
+
7317
7708
  // Use validFrom if provided, otherwise use current UTC time
7318
7709
  var baseDate = validFrom ? new Date(validFrom) : dateUtils.utc();
7319
7710
  var dateWithValidity = dateUtils.add(baseDate, {
@@ -7360,9 +7751,9 @@ var ValidUntil = function ValidUntil(_ref) {
7360
7751
  void trigger('validDateEnd');
7361
7752
  }
7362
7753
  }, [phenomenon, locationIndicatorATSR, validFrom, setValue, productConfig, trigger, defaultValidUntilValue, hasUserChangedTime]);
7363
- return jsx(ProductFormFieldLayout, {
7754
+ return /*#__PURE__*/jsx(ProductFormFieldLayout, {
7364
7755
  title: t('valid-until'),
7365
- children: jsx(ReactHookFormDateTime, {
7756
+ children: /*#__PURE__*/jsx(ReactHookFormDateTime, {
7366
7757
  "data-testid": "valid-until",
7367
7758
  defaultNullValue: defaultValidUntilValue,
7368
7759
  disablePast: true,
@@ -7409,10 +7800,10 @@ var VolcanicFields = function VolcanicFields(_ref) {
7409
7800
  watch = _useFormContext.watch,
7410
7801
  trigger = _useFormContext.trigger,
7411
7802
  getValues = _useFormContext.getValues;
7412
- return jsx(Grid, {
7803
+ return /*#__PURE__*/jsx(Grid, {
7413
7804
  container: true,
7414
7805
  spacing: 2,
7415
- children: jsxs(Grid, {
7806
+ children: /*#__PURE__*/jsxs(Grid, {
7416
7807
  container: true,
7417
7808
  justifyContent: "flex-start",
7418
7809
  offset: 4,
@@ -7423,10 +7814,10 @@ var VolcanicFields = function VolcanicFields(_ref) {
7423
7814
  marginTop: '2px'
7424
7815
  }
7425
7816
  },
7426
- children: [(!isReadOnly || !!watch('vaSigmetVolcanoName')) && jsx(Grid, {
7817
+ children: [(!isReadOnly || !!watch('vaSigmetVolcanoName')) && /*#__PURE__*/jsx(Grid, {
7427
7818
  size: 12,
7428
7819
  sx: styles$2.volcanicField,
7429
- children: jsx(ReactHookFormTextField, {
7820
+ children: /*#__PURE__*/jsx(ReactHookFormTextField, {
7430
7821
  disabled: isDisabled,
7431
7822
  helperText: helperText,
7432
7823
  isReadOnly: isReadOnly,
@@ -7438,37 +7829,31 @@ var VolcanicFields = function VolcanicFields(_ref) {
7438
7829
  size: "small",
7439
7830
  upperCase: true
7440
7831
  })
7441
- }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && jsx(Grid, {
7832
+ }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && /*#__PURE__*/jsx(Grid, {
7442
7833
  size: 6,
7443
- children: degreesAndMinutes ? jsx(DegreesMinutesField, {
7834
+ children: degreesAndMinutes ? /*#__PURE__*/jsx(DegreesMinutesField, {
7444
7835
  disabled: isDisabled,
7445
7836
  isReadOnly: isReadOnly,
7446
7837
  label: t('latitude-degrees-and-minutes'),
7447
7838
  name: "vaSigmetVolcanoCoordinates.latitude",
7448
7839
  t: t
7449
- }) : jsx(ReactHookFormNumberField, {
7840
+ }) : /*#__PURE__*/jsx(ReactHookFormNumberField, {
7450
7841
  disabled: isDisabled,
7451
7842
  inputMode: "decimal",
7452
7843
  isReadOnly: isReadOnly,
7453
7844
  label: t('latitude'),
7454
7845
  name: "vaSigmetVolcanoCoordinates.latitude",
7455
- onChange: function () {
7456
- var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7457
- return _regeneratorRuntime().wrap(function _callee$(_context) {
7458
- while (1) switch (_context.prev = _context.next) {
7459
- case 0:
7460
- return _context.abrupt("return", trigger('vaSigmetVolcanoCoordinates.longitude'));
7461
- case 1:
7462
- case "end":
7463
- return _context.stop();
7464
- }
7465
- }, _callee);
7466
- }));
7467
- function onChange() {
7468
- return _onChange.apply(this, arguments);
7469
- }
7470
- return onChange;
7471
- }(),
7846
+ onChange: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7847
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
7848
+ while (1) switch (_context.prev = _context.next) {
7849
+ case 0:
7850
+ return _context.abrupt("return", trigger('vaSigmetVolcanoCoordinates.longitude'));
7851
+ case 1:
7852
+ case "end":
7853
+ return _context.stop();
7854
+ }
7855
+ }, _callee);
7856
+ })),
7472
7857
  rules: {
7473
7858
  required: true,
7474
7859
  validate: {
@@ -7481,38 +7866,32 @@ var VolcanicFields = function VolcanicFields(_ref) {
7481
7866
  size: "small",
7482
7867
  sx: styles$2.latitude
7483
7868
  })
7484
- }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && jsx(Grid, {
7869
+ }), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && /*#__PURE__*/jsx(Grid, {
7485
7870
  size: 6,
7486
- children: degreesAndMinutes ? jsx(DegreesMinutesField, {
7871
+ children: degreesAndMinutes ? /*#__PURE__*/jsx(DegreesMinutesField, {
7487
7872
  disabled: isDisabled,
7488
7873
  isLongitude: true,
7489
7874
  isReadOnly: isReadOnly,
7490
7875
  label: t('longitude-degrees-and-minutes'),
7491
7876
  name: "vaSigmetVolcanoCoordinates.longitude",
7492
7877
  t: t
7493
- }) : jsx(ReactHookFormNumberField, {
7878
+ }) : /*#__PURE__*/jsx(ReactHookFormNumberField, {
7494
7879
  disabled: isDisabled,
7495
7880
  inputMode: "decimal",
7496
7881
  isReadOnly: isReadOnly,
7497
7882
  label: t('longitude'),
7498
7883
  name: "vaSigmetVolcanoCoordinates.longitude",
7499
- onChange: function () {
7500
- var _onChange2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
7501
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7502
- while (1) switch (_context2.prev = _context2.next) {
7503
- case 0:
7504
- return _context2.abrupt("return", trigger('vaSigmetVolcanoCoordinates.latitude'));
7505
- case 1:
7506
- case "end":
7507
- return _context2.stop();
7508
- }
7509
- }, _callee2);
7510
- }));
7511
- function onChange() {
7512
- return _onChange2.apply(this, arguments);
7513
- }
7514
- return onChange;
7515
- }(),
7884
+ onChange: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
7885
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
7886
+ while (1) switch (_context2.prev = _context2.next) {
7887
+ case 0:
7888
+ return _context2.abrupt("return", trigger('vaSigmetVolcanoCoordinates.latitude'));
7889
+ case 1:
7890
+ case "end":
7891
+ return _context2.stop();
7892
+ }
7893
+ }, _callee2);
7894
+ })),
7516
7895
  rules: {
7517
7896
  required: true,
7518
7897
  validate: {
@@ -7530,6 +7909,23 @@ var VolcanicFields = function VolcanicFields(_ref) {
7530
7909
  });
7531
7910
  };
7532
7911
 
7912
+ /* *
7913
+ * Licensed under the Apache License, Version 2.0 (the "License");
7914
+ * you may not use this file except in compliance with the License.
7915
+ * You may obtain a copy of the License at
7916
+ *
7917
+ * http://www.apache.org/licenses/LICENSE-2.0
7918
+ *
7919
+ * Unless required by applicable law or agreed to in writing, software
7920
+ * distributed under the License is distributed on an "AS IS" BASIS,
7921
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7922
+ * See the License for the specific language governing permissions and
7923
+ * limitations under the License.
7924
+ *
7925
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7926
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
7927
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7928
+ * */
7533
7929
  var DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW = 50;
7534
7930
  var DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE = 100;
7535
7931
  var getInvalidSurfaceVisibilityTill750StepsMessage = function getInvalidSurfaceVisibilityTill750StepsMessage(t, value) {
@@ -7552,11 +7948,12 @@ var _validateSurfaceVisibility = function validateSurfaceVisibility(t, value, pr
7552
7948
  if (isEmpty(value)) {
7553
7949
  return true;
7554
7950
  }
7555
- var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
7556
- _getActiveFIRArea$vis = _getActiveFIRArea.visibility_rounding_below,
7557
- visibility_rounding_below = _getActiveFIRArea$vis === void 0 ? DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW : _getActiveFIRArea$vis,
7558
- _getActiveFIRArea$vis2 = _getActiveFIRArea.visibility_rounding_above,
7559
- visibility_rounding_above = _getActiveFIRArea$vis2 === void 0 ? DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE : _getActiveFIRArea$vis2;
7951
+ var _ref = getActiveFIRArea(selectedFIR, productConfig),
7952
+ _ref$visibility_round = _ref.visibility_rounding_below,
7953
+ visibility_rounding_below = _ref$visibility_round === void 0 ? DEFAULT_ROUNDING_SURFACE_VISIBLILITY_BELOW : _ref$visibility_round,
7954
+ _ref$visibility_round2 = _ref.visibility_rounding_above,
7955
+ visibility_rounding_above = _ref$visibility_round2 === void 0 ? DEFAULT_ROUNDING_SURFACE_VISIBLILITY_ABOVE : _ref$visibility_round2;
7956
+
7560
7957
  // Parse to integer to check for steps
7561
7958
  var intVisibility = parseInt(value, 10);
7562
7959
  if (intVisibility > 750) {
@@ -7564,12 +7961,12 @@ var _validateSurfaceVisibility = function validateSurfaceVisibility(t, value, pr
7564
7961
  }
7565
7962
  return intVisibility % visibility_rounding_below === 0 || getInvalidSurfaceVisibilityTill750StepsMessage(t, visibility_rounding_below);
7566
7963
  };
7567
- var SurfaceVisibility = function SurfaceVisibility(_ref) {
7568
- var isDisabled = _ref.isDisabled,
7569
- isReadOnly = _ref.isReadOnly,
7570
- productConfig = _ref.productConfig,
7571
- _ref$onChange = _ref.onChange,
7572
- _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
7964
+ var SurfaceVisibility = function SurfaceVisibility(_ref2) {
7965
+ var isDisabled = _ref2.isDisabled,
7966
+ isReadOnly = _ref2.isReadOnly,
7967
+ productConfig = _ref2.productConfig,
7968
+ _ref2$onChange = _ref2.onChange,
7969
+ _onChange = _ref2$onChange === void 0 ? function () {} : _ref2$onChange;
7573
7970
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
7574
7971
  t = _useSigmetAirmetTrans.t;
7575
7972
  var _useDraftFormHelpers = useDraftFormHelpers(),
@@ -7581,21 +7978,21 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7581
7978
  };
7582
7979
  var visibilityLabel = getFieldLabel(t, t('surface-visibility'), isReadOnly);
7583
7980
  var visibilityCauseLabel = getFieldLabel(t, t('surface-visibility-cause'), isReadOnly);
7584
- return jsxs(Grid, {
7981
+ return /*#__PURE__*/jsxs(Grid, {
7585
7982
  container: true,
7586
7983
  spacing: 2,
7587
- children: [jsx(Grid, {
7984
+ children: [/*#__PURE__*/jsx(Grid, {
7588
7985
  container: true,
7589
7986
  justifyContent: "flex-end",
7590
7987
  size: 4
7591
- }), jsxs(Grid, {
7988
+ }), /*#__PURE__*/jsxs(Grid, {
7592
7989
  container: true,
7593
7990
  justifyContent: "flex-start",
7594
7991
  size: 8,
7595
- children: [jsx(Grid, {
7992
+ children: [/*#__PURE__*/jsx(Grid, {
7596
7993
  size: 12,
7597
7994
  sx: styles$2.surfaceVisibility,
7598
- children: jsx(ReactHookFormNumberField, {
7995
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
7599
7996
  "data-testid": "surfaceVisibility-visibilityValue",
7600
7997
  disabled: isDisabled,
7601
7998
  helperText: t('surface-visibility-helper-text'),
@@ -7633,12 +8030,12 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7633
8030
  }
7634
8031
  }
7635
8032
  })
7636
- }), jsx(Grid, {
8033
+ }), /*#__PURE__*/jsx(Grid, {
7637
8034
  size: 12,
7638
8035
  sx: {
7639
8036
  marginTop: -2
7640
8037
  },
7641
- children: jsx(ReactHookFormSelect, {
8038
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
7642
8039
  "data-testid": "surfaceVisibility-visibilityCause",
7643
8040
  disabled: isDisabled,
7644
8041
  isReadOnly: isReadOnly,
@@ -7655,7 +8052,7 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7655
8052
  },
7656
8053
  size: "small",
7657
8054
  children: Object.keys(VisibilityCause).map(function (key) {
7658
- return jsx(MenuItem, {
8055
+ return /*#__PURE__*/jsx(MenuItem, {
7659
8056
  value: key,
7660
8057
  children: VisibilityCause[key]
7661
8058
  }, key);
@@ -7666,6 +8063,23 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
7666
8063
  });
7667
8064
  };
7668
8065
 
8066
+ /* *
8067
+ * Licensed under the Apache License, Version 2.0 (the "License");
8068
+ * you may not use this file except in compliance with the License.
8069
+ * You may obtain a copy of the License at
8070
+ *
8071
+ * http://www.apache.org/licenses/LICENSE-2.0
8072
+ *
8073
+ * Unless required by applicable law or agreed to in writing, software
8074
+ * distributed under the License is distributed on an "AS IS" BASIS,
8075
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8076
+ * See the License for the specific language governing permissions and
8077
+ * limitations under the License.
8078
+ *
8079
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8080
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
8081
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8082
+ * */
7669
8083
  var DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION = 10;
7670
8084
  var invalidSurfaceWindDirectionStepsMessage = function invalidSurfaceWindDirectionStepsMessage(t, value) {
7671
8085
  if (value === void 0) {
@@ -7679,21 +8093,22 @@ var _validateSurfaceWindDirection = function validateSurfaceWindDirection(t, val
7679
8093
  if (isEmpty(value)) {
7680
8094
  return true;
7681
8095
  }
7682
- var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
7683
- _getActiveFIRArea$win = _getActiveFIRArea.wind_direction_rounding,
7684
- wind_direction_rounding = _getActiveFIRArea$win === void 0 ? DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION : _getActiveFIRArea$win;
8096
+ var _ref = getActiveFIRArea(selectedFIR, productConfig),
8097
+ _ref$wind_direction_r = _ref.wind_direction_rounding,
8098
+ wind_direction_rounding = _ref$wind_direction_r === void 0 ? DEFAULT_ROUNDING_SURFACE_WIND_DIRECTION : _ref$wind_direction_r;
8099
+
7685
8100
  // Parse to integer to check for steps
7686
8101
  var intVisibility = parseInt(value, 10);
7687
8102
  return intVisibility % wind_direction_rounding === 0 || invalidSurfaceWindDirectionStepsMessage(t, wind_direction_rounding);
7688
8103
  };
7689
- var SurfaceWind = function SurfaceWind(_ref) {
7690
- var isDisabled = _ref.isDisabled,
7691
- isReadOnly = _ref.isReadOnly,
7692
- _ref$onChange = _ref.onChange,
7693
- _onChange = _ref$onChange === void 0 ? function () {
8104
+ var SurfaceWind = function SurfaceWind(_ref2) {
8105
+ var isDisabled = _ref2.isDisabled,
8106
+ isReadOnly = _ref2.isReadOnly,
8107
+ _ref2$onChange = _ref2.onChange,
8108
+ _onChange = _ref2$onChange === void 0 ? function () {
7694
8109
  return null;
7695
- } : _ref$onChange,
7696
- productConfig = _ref.productConfig;
8110
+ } : _ref2$onChange,
8111
+ productConfig = _ref2.productConfig;
7697
8112
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
7698
8113
  t = _useSigmetAirmetTrans.t;
7699
8114
  var _useFormContext = useFormContext(),
@@ -7704,25 +8119,26 @@ var SurfaceWind = function SurfaceWind(_ref) {
7704
8119
  var getFIRValue = function getFIRValue() {
7705
8120
  return getValues('locationIndicatorATSR');
7706
8121
  };
8122
+
7707
8123
  // Get allowed speed units based on selected FIR - if no FIR selected, allow all units
7708
8124
  var allowedWindUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'surfacewind_unit', WindUnit);
7709
8125
  var windLabel = getFieldLabel(t, t('surface-wind-label'), isReadOnly, t('set'));
7710
8126
  var speedLabel = getFieldLabel(t, t('surface-wind-speed-label'), isReadOnly, t('set'));
7711
- return jsxs(Grid, {
8127
+ return /*#__PURE__*/jsxs(Grid, {
7712
8128
  container: true,
7713
8129
  spacing: 2,
7714
- children: [jsx(Grid, {
8130
+ children: [/*#__PURE__*/jsx(Grid, {
7715
8131
  container: true,
7716
8132
  justifyContent: "flex-end",
7717
8133
  size: 4
7718
- }), jsxs(Grid, {
8134
+ }), /*#__PURE__*/jsxs(Grid, {
7719
8135
  container: true,
7720
8136
  justifyContent: "flex-start",
7721
8137
  size: 8,
7722
- children: [jsx(Grid, {
8138
+ children: [/*#__PURE__*/jsx(Grid, {
7723
8139
  size: 12,
7724
8140
  sx: styles$2.surfaceWind,
7725
- children: jsx(ReactHookFormNumberField, {
8141
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
7726
8142
  "data-testid": "surfaceWind-windDirection",
7727
8143
  disabled: isDisabled,
7728
8144
  helperText: t('surface-wind-helper-text'),
@@ -7747,16 +8163,16 @@ var SurfaceWind = function SurfaceWind(_ref) {
7747
8163
  },
7748
8164
  size: "small"
7749
8165
  })
7750
- }), jsxs(Grid, {
8166
+ }), /*#__PURE__*/jsxs(Grid, {
7751
8167
  container: true,
7752
8168
  size: 12,
7753
8169
  spacing: 0,
7754
8170
  sx: {
7755
8171
  marginTop: -2
7756
8172
  },
7757
- children: [jsx(Grid, {
8173
+ children: [/*#__PURE__*/jsx(Grid, {
7758
8174
  size: 5,
7759
- children: jsx(ReactHookFormSelect, {
8175
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
7760
8176
  "data-testid": "surfaceWind-windUnit",
7761
8177
  defaultValue: 'KT',
7762
8178
  disabled: isDisabled,
@@ -7775,15 +8191,15 @@ var SurfaceWind = function SurfaceWind(_ref) {
7775
8191
  size: "small",
7776
8192
  sx: styles$2.unit,
7777
8193
  children: Object.keys(allowedWindUnitsForFir).map(function (key) {
7778
- return jsx(MenuItem, {
8194
+ return /*#__PURE__*/jsx(MenuItem, {
7779
8195
  value: key,
7780
8196
  children: allowedWindUnitsForFir[key]
7781
8197
  }, key);
7782
8198
  })
7783
8199
  })
7784
- }), jsx(Grid, {
8200
+ }), /*#__PURE__*/jsx(Grid, {
7785
8201
  size: 7,
7786
- children: jsx(ReactHookFormNumberField, {
8202
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
7787
8203
  "data-testid": "surfaceWind-windSpeed",
7788
8204
  disabled: isDisabled,
7789
8205
  isReadOnly: isReadOnly,
@@ -7821,6 +8237,23 @@ var SurfaceWind = function SurfaceWind(_ref) {
7821
8237
  });
7822
8238
  };
7823
8239
 
8240
+ /* *
8241
+ * Licensed under the Apache License, Version 2.0 (the "License");
8242
+ * you may not use this file except in compliance with the License.
8243
+ * You may obtain a copy of the License at
8244
+ *
8245
+ * http://www.apache.org/licenses/LICENSE-2.0
8246
+ *
8247
+ * Unless required by applicable law or agreed to in writing, software
8248
+ * distributed under the License is distributed on an "AS IS" BASIS,
8249
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8250
+ * See the License for the specific language governing permissions and
8251
+ * limitations under the License.
8252
+ *
8253
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8254
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
8255
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8256
+ * */
7824
8257
  var DEFAULT_ROUNDING_CLOUD_LEVELS_FT = 100;
7825
8258
  var DEFAULT_ROUNDING_CLOUD_LEVELS_M_BELOW = 30;
7826
8259
  var DEFAULT_ROUNDING_CLOUD_LEVELS_M_ABOVE = 300;
@@ -7847,13 +8280,13 @@ var validateRoundedStep = function validateRoundedStep(value, unit, productConfi
7847
8280
  if (isEmpty(value)) {
7848
8281
  return true;
7849
8282
  }
7850
- var _getActiveFIRArea = getActiveFIRArea(selectedFIR, productConfig),
7851
- _getActiveFIRArea$clo = _getActiveFIRArea.cloud_level_rounding_ft,
7852
- cloud_level_rounding_ft = _getActiveFIRArea$clo === void 0 ? DEFAULT_ROUNDING_CLOUD_LEVELS_FT : _getActiveFIRArea$clo,
7853
- _getActiveFIRArea$clo2 = _getActiveFIRArea.cloud_level_rounding_m_below,
7854
- cloud_level_rounding_m_below = _getActiveFIRArea$clo2 === void 0 ? DEFAULT_ROUNDING_CLOUD_LEVELS_M_BELOW : _getActiveFIRArea$clo2,
7855
- _getActiveFIRArea$clo3 = _getActiveFIRArea.cloud_level_rounding_m_above,
7856
- cloud_level_rounding_m_above = _getActiveFIRArea$clo3 === void 0 ? DEFAULT_ROUNDING_CLOUD_LEVELS_M_ABOVE : _getActiveFIRArea$clo3;
8283
+ var _ref = getActiveFIRArea(selectedFIR, productConfig),
8284
+ _ref$cloud_level_roun = _ref.cloud_level_rounding_ft,
8285
+ cloud_level_rounding_ft = _ref$cloud_level_roun === void 0 ? DEFAULT_ROUNDING_CLOUD_LEVELS_FT : _ref$cloud_level_roun,
8286
+ _ref$cloud_level_roun2 = _ref.cloud_level_rounding_m_below,
8287
+ cloud_level_rounding_m_below = _ref$cloud_level_roun2 === void 0 ? DEFAULT_ROUNDING_CLOUD_LEVELS_M_BELOW : _ref$cloud_level_roun2,
8288
+ _ref$cloud_level_roun3 = _ref.cloud_level_rounding_m_above,
8289
+ cloud_level_rounding_m_above = _ref$cloud_level_roun3 === void 0 ? DEFAULT_ROUNDING_CLOUD_LEVELS_M_ABOVE : _ref$cloud_level_roun3;
7857
8290
  if (CloudLevelUnits[unit] === CloudLevelUnits.FT) {
7858
8291
  return parseInt(value, 10) % cloud_level_rounding_ft === 0 ? true : getInvalidStepsForFeetUnitMessage(cloud_level_rounding_ft);
7859
8292
  }
@@ -7865,12 +8298,12 @@ var validateRoundedStep = function validateRoundedStep(value, unit, productConfi
7865
8298
  }
7866
8299
  return invalidUnitMessage;
7867
8300
  };
7868
- var CloudLevels = function CloudLevels(_ref) {
7869
- var isDisabled = _ref.isDisabled,
7870
- isReadOnly = _ref.isReadOnly,
7871
- _ref$onChange = _ref.onChange,
7872
- _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
7873
- productConfig = _ref.productConfig;
8301
+ var CloudLevels = function CloudLevels(_ref2) {
8302
+ var isDisabled = _ref2.isDisabled,
8303
+ isReadOnly = _ref2.isReadOnly,
8304
+ _ref2$onChange = _ref2.onChange,
8305
+ _onChange = _ref2$onChange === void 0 ? function () {} : _ref2$onChange,
8306
+ productConfig = _ref2.productConfig;
7874
8307
  var _useFormContext = useFormContext(),
7875
8308
  watch = _useFormContext.watch,
7876
8309
  setValue = _useFormContext.setValue,
@@ -7885,6 +8318,7 @@ var CloudLevels = function CloudLevels(_ref) {
7885
8318
  return getValues('locationIndicatorATSR');
7886
8319
  };
7887
8320
  var cloudLevelInfoMode = watch('cloudLevelInfoMode');
8321
+
7888
8322
  // Get allowed cloud level units based on selected FIR - if no FIR selected, allow all default units
7889
8323
  var allowedCloudLevelUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'cloud_level_unit', CloudLevelUnits);
7890
8324
  React.useEffect(function () {
@@ -7892,38 +8326,38 @@ var CloudLevels = function CloudLevels(_ref) {
7892
8326
  unregister('cloudLowerLevel');
7893
8327
  }
7894
8328
  }, [cloudLevelInfoMode, unregister]);
7895
- return jsxs(Grid, {
8329
+ return /*#__PURE__*/jsxs(Grid, {
7896
8330
  container: true,
7897
8331
  spacing: 2,
7898
8332
  sx: styles$2.containerItem,
7899
- children: [jsx(Grid, {
8333
+ children: [/*#__PURE__*/jsx(Grid, {
7900
8334
  container: true,
7901
8335
  justifyContent: "flex-end",
7902
8336
  size: 4,
7903
- children: jsx(Typography, {
8337
+ children: /*#__PURE__*/jsx(Typography, {
7904
8338
  sx: styles$2.label,
7905
8339
  variant: "subtitle1",
7906
8340
  children: t('levels')
7907
8341
  })
7908
- }), jsx(Grid, {
8342
+ }), /*#__PURE__*/jsx(Grid, {
7909
8343
  container: true,
7910
8344
  justifyContent: "flex-start",
7911
8345
  size: 8,
7912
- children: jsxs(Grid, {
8346
+ children: /*#__PURE__*/jsxs(Grid, {
7913
8347
  size: 12,
7914
- children: [jsx(ReactHookFormHiddenInput, {
8348
+ children: [/*#__PURE__*/jsx(ReactHookFormHiddenInput, {
7915
8349
  defaultValue: "BETW",
7916
8350
  name: "cloudLevelInfoMode"
7917
- }), jsxs(Grid, {
8351
+ }), /*#__PURE__*/jsxs(Grid, {
7918
8352
  container: true,
7919
8353
  size: 12,
7920
- children: [jsx(Grid, {
8354
+ children: [/*#__PURE__*/jsx(Grid, {
7921
8355
  size: 4,
7922
- children: (!isReadOnly || cloudLevelInfoMode === 'BETW_ABV' || cloudLevelInfoMode === 'BETW_SFC_ABV') && jsx(ReactHookFormFormControl, {
8356
+ children: (!isReadOnly || cloudLevelInfoMode === 'BETW_ABV' || cloudLevelInfoMode === 'BETW_SFC_ABV') && /*#__PURE__*/jsx(ReactHookFormFormControl, {
7923
8357
  disabled: isDisabled,
7924
8358
  isReadOnly: isReadOnly,
7925
- children: jsx(FormControlLabel, {
7926
- control: jsx(Checkbox, {
8359
+ children: /*#__PURE__*/jsx(FormControlLabel, {
8360
+ control: /*#__PURE__*/jsx(Checkbox, {
7927
8361
  checked: cloudLevelInfoMode === 'BETW_ABV' || cloudLevelInfoMode === 'BETW_SFC_ABV',
7928
8362
  color: "secondary",
7929
8363
  disabled: isDisabled,
@@ -7957,9 +8391,9 @@ var CloudLevels = function CloudLevels(_ref) {
7957
8391
  label: "Above"
7958
8392
  })
7959
8393
  })
7960
- }), jsx(Grid, {
8394
+ }), /*#__PURE__*/jsx(Grid, {
7961
8395
  size: 3,
7962
- children: jsx(ReactHookFormSelect, {
8396
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
7963
8397
  "data-testid": "cloudLevel-unit",
7964
8398
  defaultValue: 'FT',
7965
8399
  disabled: isDisabled,
@@ -7980,15 +8414,15 @@ var CloudLevels = function CloudLevels(_ref) {
7980
8414
  size: "small",
7981
8415
  sx: styles$2.unit,
7982
8416
  children: Object.keys(allowedCloudLevelUnitsForFir).map(function (key) {
7983
- return jsx(MenuItem, {
8417
+ return /*#__PURE__*/jsx(MenuItem, {
7984
8418
  value: key,
7985
8419
  children: allowedCloudLevelUnitsForFir[key]
7986
8420
  }, key);
7987
8421
  })
7988
8422
  })
7989
- }), jsx(Grid, {
8423
+ }), /*#__PURE__*/jsx(Grid, {
7990
8424
  size: 5,
7991
- children: jsx(ReactHookFormNumberField, {
8425
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
7992
8426
  "data-testid": "cloudLevel-value",
7993
8427
  disabled: isDisabled,
7994
8428
  isReadOnly: isReadOnly,
@@ -8022,16 +8456,16 @@ var CloudLevels = function CloudLevels(_ref) {
8022
8456
  sx: styles$2.levelField
8023
8457
  })
8024
8458
  })]
8025
- }), jsxs(Grid, {
8459
+ }), /*#__PURE__*/jsxs(Grid, {
8026
8460
  container: true,
8027
8461
  size: 12,
8028
- children: [jsx(Grid, {
8462
+ children: [/*#__PURE__*/jsx(Grid, {
8029
8463
  size: 4,
8030
- children: (!isReadOnly || cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV') && jsx(ReactHookFormFormControl, {
8464
+ children: (!isReadOnly || cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV') && /*#__PURE__*/jsx(ReactHookFormFormControl, {
8031
8465
  disabled: isDisabled,
8032
8466
  isReadOnly: isReadOnly,
8033
- children: jsx(FormControlLabel, {
8034
- control: jsx(Checkbox, {
8467
+ children: /*#__PURE__*/jsx(FormControlLabel, {
8468
+ control: /*#__PURE__*/jsx(Checkbox, {
8035
8469
  checked: cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV',
8036
8470
  color: "secondary",
8037
8471
  disabled: isDisabled,
@@ -8065,10 +8499,10 @@ var CloudLevels = function CloudLevels(_ref) {
8065
8499
  label: "SFC"
8066
8500
  })
8067
8501
  })
8068
- }), cloudLevelInfoMode !== 'BETW_SFC' && cloudLevelInfoMode !== 'BETW_SFC_ABV' && jsxs(Fragment, {
8069
- children: [jsx(Grid, {
8502
+ }), cloudLevelInfoMode !== 'BETW_SFC' && cloudLevelInfoMode !== 'BETW_SFC_ABV' && /*#__PURE__*/jsxs(Fragment, {
8503
+ children: [/*#__PURE__*/jsx(Grid, {
8070
8504
  size: 3,
8071
- children: jsx(ReactHookFormSelect, {
8505
+ children: /*#__PURE__*/jsx(ReactHookFormSelect, {
8072
8506
  "data-testid": "cloudLowerLevel-unit",
8073
8507
  defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
8074
8508
  disabled: isDisabled,
@@ -8089,15 +8523,15 @@ var CloudLevels = function CloudLevels(_ref) {
8089
8523
  size: "small",
8090
8524
  sx: styles$2.unit,
8091
8525
  children: Object.keys(allowedCloudLevelUnitsForFir).map(function (key) {
8092
- return jsx(MenuItem, {
8526
+ return /*#__PURE__*/jsx(MenuItem, {
8093
8527
  value: key,
8094
8528
  children: allowedCloudLevelUnitsForFir[key]
8095
8529
  }, key);
8096
8530
  })
8097
8531
  })
8098
- }), jsx(Grid, {
8532
+ }), /*#__PURE__*/jsx(Grid, {
8099
8533
  size: 5,
8100
- children: jsx(ReactHookFormNumberField, {
8534
+ children: /*#__PURE__*/jsx(ReactHookFormNumberField, {
8101
8535
  "data-testid": "cloudLowerLevel-value",
8102
8536
  disabled: isDisabled,
8103
8537
  isReadOnly: isReadOnly,
@@ -8140,17 +8574,34 @@ var CloudLevels = function CloudLevels(_ref) {
8140
8574
  });
8141
8575
  };
8142
8576
 
8577
+ /* *
8578
+ * Licensed under the Apache License, Version 2.0 (the "License");
8579
+ * you may not use this file except in compliance with the License.
8580
+ * You may obtain a copy of the License at
8581
+ *
8582
+ * http://www.apache.org/licenses/LICENSE-2.0
8583
+ *
8584
+ * Unless required by applicable law or agreed to in writing, software
8585
+ * distributed under the License is distributed on an "AS IS" BASIS,
8586
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8587
+ * See the License for the specific language governing permissions and
8588
+ * limitations under the License.
8589
+ *
8590
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8591
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
8592
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8593
+ * */
8143
8594
  var IssuedAt = function IssuedAt(_ref) {
8144
8595
  var date = _ref.date,
8145
8596
  isReadOnly = _ref.isReadOnly;
8146
8597
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
8147
8598
  t = _useSigmetAirmetTrans.t;
8148
- return jsx(ProductFormFieldLayout, {
8599
+ return /*#__PURE__*/jsx(ProductFormFieldLayout, {
8149
8600
  sx: {
8150
8601
  marginTop: -2
8151
8602
  },
8152
8603
  title: t('issued-at'),
8153
- children: jsx(Typography, {
8604
+ children: /*#__PURE__*/jsx(Typography, {
8154
8605
  sx: Object.assign({}, styles$2.body, {
8155
8606
  fontSize: '1rem',
8156
8607
  color: isReadOnly ? 'geowebColors.typographyAndIcons.text' : 'geowebColors.buttons.primary.disabled.color'
@@ -8209,6 +8660,7 @@ var isLevelFieldsComplete = function isLevelFieldsComplete(product) {
8209
8660
  }
8210
8661
  }
8211
8662
  };
8663
+
8212
8664
  /* Changes in intensity should always be included in sigmet except for
8213
8665
  * volcanic ash cloud and radioactive cloud where it should be omitted
8214
8666
  * if specified in the config
@@ -8225,6 +8677,7 @@ var isSurfaceVisComplete = function isSurfaceVisComplete(product) {
8225
8677
  }
8226
8678
  return true;
8227
8679
  };
8680
+
8228
8681
  // Ensure we have enough data to retrieve a TAC
8229
8682
  var shouldRetrieveTAC = function shouldRetrieveTAC(product, omitChange) {
8230
8683
  if (!product) {
@@ -8243,7 +8696,9 @@ var shouldRetrieveTAC = function shouldRetrieveTAC(product, omitChange) {
8243
8696
  }
8244
8697
  return false;
8245
8698
  };
8246
- var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange) {
8699
+ var useTAC = function useTAC(t, initialProduct, getTAC, hasErrors, omitChange
8700
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8701
+ ) {
8247
8702
  if (hasErrors === void 0) {
8248
8703
  hasErrors = function hasErrors() {
8249
8704
  return false;
@@ -8330,14 +8785,14 @@ var ProductFormTAC = function ProductFormTAC(_ref3) {
8330
8785
  var hasTac = tac.split('\n').length > 0 && tac !== noTAC(t);
8331
8786
  var sequenceNumberInTac = findSequenceNumber(tac, noTAC(t));
8332
8787
  var sequenceStyle = getSequenceStyling(product, hasTac);
8333
- return jsx(Typography, {
8788
+ return /*#__PURE__*/jsx(Typography, {
8334
8789
  component: "div",
8335
8790
  "data-testid": "productform-tac-message",
8336
8791
  sx: {
8337
8792
  whiteSpace: 'break-spaces'
8338
8793
  },
8339
8794
  variant: "body2",
8340
- children: jsx(Box, {
8795
+ children: /*#__PURE__*/jsx(Box, {
8341
8796
  component: "p",
8342
8797
  "data-testid": "productform-tac-message-line",
8343
8798
  sx: {
@@ -8349,8 +8804,11 @@ var ProductFormTAC = function ProductFormTAC(_ref3) {
8349
8804
  marginTop: '2px'
8350
8805
  },
8351
8806
  children: tac.split(' ').map(function (word, index) {
8352
- return jsx(Box, {
8353
- component: "span",
8807
+ return /*#__PURE__*/jsx(Box, {
8808
+ component: "span"
8809
+ // eslint-disable-next-line react/no-array-index-key
8810
+ ,
8811
+
8354
8812
  sx: hasTac && word === sequenceNumberInTac ? sequenceStyle : {},
8355
8813
  children: word + (index < tac.split(' ').length - 1 ? ' ' : '')
8356
8814
  }, index);
@@ -8359,11 +8817,28 @@ var ProductFormTAC = function ProductFormTAC(_ref3) {
8359
8817
  });
8360
8818
  };
8361
8819
 
8820
+ /* *
8821
+ * Licensed under the Apache License, Version 2.0 (the "License");
8822
+ * you may not use this file except in compliance with the License.
8823
+ * You may obtain a copy of the License at
8824
+ *
8825
+ * http://www.apache.org/licenses/LICENSE-2.0
8826
+ *
8827
+ * Unless required by applicable law or agreed to in writing, software
8828
+ * distributed under the License is distributed on an "AS IS" BASIS,
8829
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8830
+ * See the License for the specific language governing permissions and
8831
+ * limitations under the License.
8832
+ *
8833
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8834
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
8835
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8836
+ * */
8362
8837
  var Tac = function Tac(_ref) {
8363
8838
  var tac = _ref.tac,
8364
8839
  children = _ref.children,
8365
8840
  product = _ref.product;
8366
- return jsxs(ProductFormFieldLayout, {
8841
+ return /*#__PURE__*/jsxs(ProductFormFieldLayout, {
8367
8842
  sx: {
8368
8843
  marginTop: -3,
8369
8844
  '.MuiTypography-root.MuiTypography-subtitle1': {
@@ -8371,13 +8846,30 @@ var Tac = function Tac(_ref) {
8371
8846
  }
8372
8847
  },
8373
8848
  title: "TAC",
8374
- children: [jsx(ProductFormTAC, {
8849
+ children: [/*#__PURE__*/jsx(ProductFormTAC, {
8375
8850
  product: product,
8376
8851
  tac: tac
8377
8852
  }), children]
8378
8853
  });
8379
8854
  };
8380
8855
 
8856
+ /* *
8857
+ * Licensed under the Apache License, Version 2.0 (the "License");
8858
+ * you may not use this file except in compliance with the License.
8859
+ * You may obtain a copy of the License at
8860
+ *
8861
+ * http://www.apache.org/licenses/LICENSE-2.0
8862
+ *
8863
+ * Unless required by applicable law or agreed to in writing, software
8864
+ * distributed under the License is distributed on an "AS IS" BASIS,
8865
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8866
+ * See the License for the specific language governing permissions and
8867
+ * limitations under the License.
8868
+ *
8869
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
8870
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
8871
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
8872
+ * */
8381
8873
  var MapViewGeoJson = function MapViewGeoJson(_ref) {
8382
8874
  var initialBaseLayers = _ref.baseLayers,
8383
8875
  _ref$projection = _ref.projection,
@@ -8465,17 +8957,17 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8465
8957
  };
8466
8958
  // eslint-disable-next-line react-hooks/exhaustive-deps
8467
8959
  }, []);
8468
- return jsxs("div", {
8960
+ return /*#__PURE__*/jsxs("div", {
8469
8961
  "data-testid": "MapView",
8470
8962
  ref: mapWindowRef,
8471
8963
  style: {
8472
8964
  position: 'relative',
8473
8965
  height: '100%'
8474
8966
  },
8475
- children: [jsx(LegendConnect, {
8967
+ children: [/*#__PURE__*/jsx(LegendConnect, {
8476
8968
  mapId: mapId,
8477
8969
  showMapId: true
8478
- }), jsxs(OlMapViewConnect, {
8970
+ }), /*#__PURE__*/jsxs(OlMapViewConnect, {
8479
8971
  controls: {
8480
8972
  mapControlsPositionTop: 0,
8481
8973
  layerManagerAndLegend: true,
@@ -8485,13 +8977,13 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8485
8977
  mapId: mapId,
8486
8978
  source: "module",
8487
8979
  children: [children, geoJSONLayers.map(function (layer) {
8488
- return jsxs("div", {
8980
+ return /*#__PURE__*/jsxs("div", {
8489
8981
  "data-testid": "" + layer.id,
8490
- children: [jsx(OpenLayersFeatureLayer, {
8982
+ children: [/*#__PURE__*/jsx(OpenLayersFeatureLayer, {
8491
8983
  featureCollection: !layer.isInEditMode ? layer.geojson : undefined,
8492
8984
  style: genericOpenLayersFeatureStyle,
8493
8985
  zIndex: 2000
8494
- }), jsx(OpenLayersMapDraw, {
8986
+ }), /*#__PURE__*/jsx(OpenLayersMapDraw, {
8495
8987
  drawMode: layer.drawMode,
8496
8988
  exitDrawModeCallback: function exitDrawModeCallback(reason) {
8497
8989
  try {
@@ -8508,7 +9000,7 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8508
9000
  })]
8509
9001
  }, layer.id);
8510
9002
  })]
8511
- }), jsx("div", {
9003
+ }), /*#__PURE__*/jsx("div", {
8512
9004
  style: {
8513
9005
  position: 'absolute',
8514
9006
  left: '0',
@@ -8516,7 +9008,7 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8516
9008
  zIndex: 1000,
8517
9009
  width: '100%'
8518
9010
  },
8519
- children: jsx(TimeSliderConnect, {
9011
+ children: /*#__PURE__*/jsx(TimeSliderConnect, {
8520
9012
  mapId: mapId,
8521
9013
  mapWindowRef: mapWindowRef,
8522
9014
  sourceId: timesliderId
@@ -8525,8 +9017,25 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
8525
9017
  });
8526
9018
  };
8527
9019
 
9020
+ /* *
9021
+ * Licensed under the Apache License, Version 2.0 (the "License");
9022
+ * you may not use this file except in compliance with the License.
9023
+ * You may obtain a copy of the License at
9024
+ *
9025
+ * http://www.apache.org/licenses/LICENSE-2.0
9026
+ *
9027
+ * Unless required by applicable law or agreed to in writing, software
9028
+ * distributed under the License is distributed on an "AS IS" BASIS,
9029
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9030
+ * See the License for the specific language governing permissions and
9031
+ * limitations under the License.
9032
+ *
9033
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9034
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
9035
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9036
+ * */
8528
9037
  var ProductFormLayout = function ProductFormLayout(_ref) {
8529
- var _sx, _sx2, _sx3;
9038
+ var _ref2, _ref3, _ref4;
8530
9039
  var children = _ref.children,
8531
9040
  mapChildren = _ref.mapChildren,
8532
9041
  productConfig = _ref.productConfig,
@@ -8535,47 +9044,47 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
8535
9044
  var theme = useTheme();
8536
9045
  var baseLayers = getBaseLayers(productConfig);
8537
9046
  var projection = getProjection(productConfig);
8538
- return jsxs(Grid, {
9047
+ return /*#__PURE__*/jsxs(Grid, {
8539
9048
  container: true,
8540
- sx: (_sx = {
9049
+ sx: (_ref2 = {
8541
9050
  height: '100%',
8542
9051
  overflowY: 'auto'
8543
- }, _sx[theme.breakpoints.up('sm')] = {
9052
+ }, _ref2[theme.breakpoints.up('sm')] = {
8544
9053
  overflowY: 'hidden'
8545
- }, _sx),
8546
- children: [jsx(Grid, {
9054
+ }, _ref2),
9055
+ children: [/*#__PURE__*/jsx(Grid, {
8547
9056
  size: {
8548
9057
  xs: 12,
8549
9058
  sm: 6,
8550
9059
  lg: 8
8551
9060
  },
8552
- sx: (_sx2 = {
9061
+ sx: (_ref3 = {
8553
9062
  height: 400,
8554
9063
  padding: 2
8555
- }, _sx2[theme.breakpoints.up('sm')] = {
9064
+ }, _ref3[theme.breakpoints.up('sm')] = {
8556
9065
  height: '100%',
8557
9066
  padding: 0
8558
- }, _sx2),
8559
- children: jsx(MapViewGeoJson, {
9067
+ }, _ref3),
9068
+ children: /*#__PURE__*/jsx(MapViewGeoJson, {
8560
9069
  baseLayers: baseLayers,
8561
9070
  geoJSONLayers: geoJSONLayers,
8562
9071
  projection: projection,
8563
9072
  children: mapChildren
8564
9073
  })
8565
- }), jsx(Grid, {
9074
+ }), /*#__PURE__*/jsx(Grid, {
8566
9075
  size: {
8567
9076
  xs: 12,
8568
9077
  sm: 6,
8569
9078
  lg: 4
8570
9079
  },
8571
- sx: (_sx3 = {
9080
+ sx: (_ref4 = {
8572
9081
  paddingTop: 5,
8573
9082
  paddingBottom: 5,
8574
9083
  paddingRight: 2
8575
- }, _sx3[theme.breakpoints.up('sm')] = {
9084
+ }, _ref4[theme.breakpoints.up('sm')] = {
8576
9085
  overflowY: 'auto',
8577
9086
  height: '100%'
8578
- }, _sx3),
9087
+ }, _ref4),
8579
9088
  children: children
8580
9089
  })]
8581
9090
  });
@@ -8598,6 +9107,7 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
8598
9107
  * Copyright 2025 - Finnish Meteorological Institute (FMI)
8599
9108
  * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
8600
9109
  * */
9110
+
8601
9111
  var useGeoJSONHandling = function useGeoJSONHandling(_ref) {
8602
9112
  var storedGeoJSON = _ref.storedGeoJSON,
8603
9113
  storedEndGeoJSON = _ref.storedEndGeoJSON,
@@ -8615,13 +9125,13 @@ var useGeoJSONHandling = function useGeoJSONHandling(_ref) {
8615
9125
  currentEndDrawTool = _ref.currentEndDrawTool;
8616
9126
  var dispatch = useDispatch();
8617
9127
  var sourcePanelId = useSelector(function (store) {
8618
- return uiSelectors.getSourcePanelId(store, 'publicWarnings');
9128
+ return uiSelectors.getSourcePanelId(store, uiTypes.DialogTypes.PublicWarnings);
8619
9129
  });
8620
9130
  var warningsDialogOpen = useSelector(function (store) {
8621
- return uiSelectors.getisDialogOpen(store, 'publicWarnings');
9131
+ return uiSelectors.getisDialogOpen(store, uiTypes.DialogTypes.PublicWarnings);
8622
9132
  });
8623
9133
  var linkedMaps = useSelector(function (store) {
8624
- return genericSelectors.getLinkedMaps(store, sourcePanelId);
9134
+ return genericSelectors.getLinkedMapIds(store, sourcePanelId);
8625
9135
  });
8626
9136
  var drawToolsDisabled = warningsDialogOpen ? linkedMaps.length === 0 : false;
8627
9137
  var reduxActiveStart = useSelector(function (state) {
@@ -8642,6 +9152,7 @@ var useGeoJSONHandling = function useGeoJSONHandling(_ref) {
8642
9152
  start: new Set(),
8643
9153
  end: new Set()
8644
9154
  });
9155
+
8645
9156
  // remove drawn layers when component unmounts
8646
9157
  useEffect(function () {
8647
9158
  return function () {
@@ -8740,6 +9251,23 @@ var useGeoJSONHandling = function useGeoJSONHandling(_ref) {
8740
9251
  };
8741
9252
  };
8742
9253
 
9254
+ /* *
9255
+ * Licensed under the Apache License, Version 2.0 (the "License");
9256
+ * you may not use this file except in compliance with the License.
9257
+ * You may obtain a copy of the License at
9258
+ *
9259
+ * http://www.apache.org/licenses/LICENSE-2.0
9260
+ *
9261
+ * Unless required by applicable law or agreed to in writing, software
9262
+ * distributed under the License is distributed on an "AS IS" BASIS,
9263
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9264
+ * See the License for the specific language governing permissions and
9265
+ * limitations under the License.
9266
+ *
9267
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9268
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
9269
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9270
+ * */
8743
9271
  var useConditionalFields$1 = function useConditionalFields(productConfig) {
8744
9272
  var _useFormContext = useFormContext(),
8745
9273
  watch = _useFormContext.watch,
@@ -8797,17 +9325,19 @@ var SigmetForm = function SigmetForm(_ref) {
8797
9325
  phenomenaList = _React$useState2[0],
8798
9326
  setPhenomenaList = _React$useState2[1];
8799
9327
  var sourcePanelId = useSelector(function (store) {
8800
- return uiSelectors.getSourcePanelId(store, 'publicWarnings');
9328
+ return uiSelectors.getSourcePanelId(store, uiTypes.DialogTypes.PublicWarnings);
8801
9329
  });
8802
9330
  var linkedMaps = useSelector(function (store) {
8803
- return genericSelectors.getLinkedMaps(store, sourcePanelId);
9331
+ return genericSelectors.getLinkedMapIds(store, sourcePanelId);
8804
9332
  });
8805
9333
  var getSrsForMapId = useSelector(function (store) {
8806
9334
  return linkedMaps ? mapSelectors.getSrs(store, linkedMaps[0]) : undefined;
8807
9335
  });
9336
+
8808
9337
  // Fallback to Mercator for '', null, or undefined
8809
9338
  var projection = getSrsForMapId != null && getSrsForMapId.trim() ? getSrsForMapId : 'EPSG:3857';
8810
9339
  var prevProjection = usePrevious(projection);
9340
+
8811
9341
  // Trigger update if projection changes
8812
9342
  useEffect(function () {
8813
9343
  if (prevProjection === undefined) {
@@ -8986,43 +9516,44 @@ var SigmetForm = function SigmetForm(_ref) {
8986
9516
  // update available phenomena for the FIR
8987
9517
  setPhenomenaList(newPhenomenaList);
8988
9518
  };
9519
+
8989
9520
  // Get coordinates format for VA_CLD eruption point
8990
9521
  var firConfig = Object.values(productConfig.fir_areas).find(function (fir) {
8991
9522
  return fir.location_indicator_atsr === watch('locationIndicatorATSR');
8992
9523
  });
8993
9524
  var degreesAndMinutes = (firConfig == null ? void 0 : firConfig.va_cld_degrees_minutes) === true;
8994
9525
  var renderForm = function renderForm() {
8995
- return jsxs(Grid, {
9526
+ return /*#__PURE__*/jsxs(Grid, {
8996
9527
  container: true,
8997
9528
  direction: "column",
8998
9529
  spacing: 2,
8999
9530
  sx: formStyles,
9000
- children: [jsx(Type, {
9531
+ children: [/*#__PURE__*/jsx(Type, {
9001
9532
  isDisabled: isDisabled,
9002
9533
  isReadOnly: isReadOnly,
9003
9534
  onChange: onChangeForm,
9004
9535
  productType: "sigmet"
9005
- }), !isCancelSigmet && jsx(Phenomenon, {
9536
+ }), !isCancelSigmet && /*#__PURE__*/jsx(Phenomenon, {
9006
9537
  isDisabled: isDisabled,
9007
9538
  isReadOnly: isReadOnly,
9008
9539
  onChange: onChangeForm,
9009
9540
  phenomenaList: phenomenaList,
9010
9541
  productConfig: productConfig,
9011
9542
  productType: "sigmet"
9012
- }), !isCancelSigmet && jsx(ObservationForecast, {
9543
+ }), !isCancelSigmet && /*#__PURE__*/jsx(ObservationForecast, {
9013
9544
  isDisabled: isDisabled,
9014
9545
  isReadOnly: isReadOnly
9015
- }), !isCancelSigmet && jsx(ObservationForecastTime, {
9546
+ }), !isCancelSigmet && /*#__PURE__*/jsx(ObservationForecastTime, {
9016
9547
  helperText: helperText,
9017
9548
  isDisabled: isDisabled,
9018
9549
  isReadOnly: isReadOnly,
9019
9550
  onChange: onChangeForm
9020
- }), !isCancelSigmet && hasVolcanicAshes && !isShortTest() ? jsx(VolcanicFields, {
9551
+ }), !isCancelSigmet && hasVolcanicAshes && !isShortTest() ? /*#__PURE__*/jsx(VolcanicFields, {
9021
9552
  degreesAndMinutes: degreesAndMinutes,
9022
9553
  helperText: helperText,
9023
9554
  isDisabled: isDisabled,
9024
9555
  isReadOnly: isReadOnly
9025
- }) : null, jsx(ValidFrom, {
9556
+ }) : null, /*#__PURE__*/jsx(ValidFrom, {
9026
9557
  isDisabled: isDisabled,
9027
9558
  isReadOnly: isReadOnly,
9028
9559
  lockBecauseActive: lockValidFrom,
@@ -9031,7 +9562,7 @@ var SigmetForm = function SigmetForm(_ref) {
9031
9562
  return setHasUserChangedTime(true);
9032
9563
  },
9033
9564
  productConfig: productConfig
9034
- }), jsx(ValidUntil, {
9565
+ }), /*#__PURE__*/jsx(ValidUntil, {
9035
9566
  hasUserChangedTime: hasUserChangedTime,
9036
9567
  isDisabled: isDisabled,
9037
9568
  isReadOnly: isReadOnly,
@@ -9040,14 +9571,14 @@ var SigmetForm = function SigmetForm(_ref) {
9040
9571
  return setHasUserChangedTime(true);
9041
9572
  },
9042
9573
  productConfig: productConfig
9043
- }), jsx(SelectFIR, {
9574
+ }), /*#__PURE__*/jsx(SelectFIR, {
9044
9575
  isDisabled: isDisabled,
9045
9576
  isReadOnly: isReadOnly,
9046
9577
  onChange: function onChange(event, newPhenomenaList) {
9047
9578
  onChangeFir(newPhenomenaList != null ? newPhenomenaList : [], event);
9048
9579
  },
9049
9580
  productConfig: productConfig
9050
- }), jsx(StartGeometry, {
9581
+ }), /*#__PURE__*/jsx(StartGeometry, {
9051
9582
  activeTool: activeStartTool,
9052
9583
  geoJSON: startGeoJSON,
9053
9584
  geoJSONIntersection: startGeoJSONIntersection,
@@ -9056,13 +9587,13 @@ var SigmetForm = function SigmetForm(_ref) {
9056
9587
  onChangeTool: onChangeStartTool,
9057
9588
  productConfig: productConfig,
9058
9589
  tools: startEditModes
9059
- }), !isCancelSigmet && jsx(Levels, {
9590
+ }), !isCancelSigmet && /*#__PURE__*/jsx(Levels, {
9060
9591
  isDisabled: isDisabled,
9061
9592
  isReadOnly: isReadOnly,
9062
9593
  onChange: onChangeForm,
9063
9594
  productConfig: productConfig,
9064
9595
  productType: "sigmet"
9065
- }), !isCancelSigmet && jsx(Progress, {
9596
+ }), !isCancelSigmet && /*#__PURE__*/jsx(Progress, {
9066
9597
  activeTool: activeEndTool,
9067
9598
  drawToolsDisabled: drawToolsDisabled,
9068
9599
  geoJSON: endGeoJSON,
@@ -9074,36 +9605,36 @@ var SigmetForm = function SigmetForm(_ref) {
9074
9605
  productConfig: productConfig,
9075
9606
  productType: "sigmet",
9076
9607
  tools: endEditModes
9077
- }), !isCancelSigmet && !omitChange && jsx(Change, {
9608
+ }), !isCancelSigmet && !omitChange && /*#__PURE__*/jsx(Change, {
9078
9609
  isDisabled: isDisabled,
9079
9610
  isReadOnly: isReadOnly
9080
- }), isCancelSigmet && watch('vaSigmetMoveToFIR') ? jsx(ProductFormFieldLayout, {
9081
- children: jsxs(Typography, {
9611
+ }), isCancelSigmet && watch('vaSigmetMoveToFIR') ? /*#__PURE__*/jsx(ProductFormFieldLayout, {
9612
+ children: /*#__PURE__*/jsxs(Typography, {
9082
9613
  "data-testid": "vaSigmetMoveToFIR",
9083
9614
  sx: Object.assign({}, styles$2.body, {
9084
9615
  marginBottom: '-4px'
9085
9616
  }),
9086
9617
  variant: "body2",
9087
- children: [t('vulcanic-cloud-moving-text'), ":", ' ', jsxs("b", {
9618
+ children: [t('vulcanic-cloud-moving-text'), ":", ' ', /*#__PURE__*/jsxs("b", {
9088
9619
  children: [" ", watch('vaSigmetMoveToFIR')]
9089
9620
  })]
9090
9621
  })
9091
- }) : null, jsx(IssuedAt, {
9622
+ }) : null, /*#__PURE__*/jsx(IssuedAt, {
9092
9623
  date: getProductIssueDate(t, initialSigmet, initialCancelSigmet),
9093
9624
  isReadOnly: isReadOnly
9094
- }), jsxs(Tac, {
9625
+ }), /*#__PURE__*/jsxs(Tac, {
9095
9626
  product: product,
9096
9627
  tac: tac,
9097
- children: [jsx(ReactHookFormHiddenInput, {
9628
+ children: [/*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9098
9629
  defaultValue: "-1",
9099
9630
  name: "sequence"
9100
9631
  }), /* Add hidden fields for TAC generation in case of cancel sigmet */
9101
- isCancelSigmet ? jsxs(Fragment, {
9102
- children: [jsx(ReactHookFormHiddenInput, {
9632
+ isCancelSigmet ? /*#__PURE__*/jsxs(Fragment, {
9633
+ children: [/*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9103
9634
  name: "cancelsSigmetSequenceId"
9104
- }), jsx(ReactHookFormHiddenInput, {
9635
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9105
9636
  name: "validDateEndOfSigmetToCancel"
9106
- }), jsx(ReactHookFormHiddenInput, {
9637
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9107
9638
  name: "validDateStartOfSigmetToCancel"
9108
9639
  })]
9109
9640
  }) : null]
@@ -9113,7 +9644,7 @@ var SigmetForm = function SigmetForm(_ref) {
9113
9644
  if (!showMap) {
9114
9645
  return renderForm();
9115
9646
  }
9116
- return jsx("form", {
9647
+ return /*#__PURE__*/jsx("form", {
9117
9648
  onChange: onChangeForm,
9118
9649
  onSubmit: handleSubmit(function () {
9119
9650
  return null;
@@ -9121,7 +9652,7 @@ var SigmetForm = function SigmetForm(_ref) {
9121
9652
  style: {
9122
9653
  width: '100%'
9123
9654
  },
9124
- children: jsx(ProductFormLayout, {
9655
+ children: /*#__PURE__*/jsx(ProductFormLayout, {
9125
9656
  geoJSONLayers: layers,
9126
9657
  productConfig: productConfig,
9127
9658
  children: renderForm()
@@ -9129,6 +9660,23 @@ var SigmetForm = function SigmetForm(_ref) {
9129
9660
  });
9130
9661
  };
9131
9662
 
9663
+ /* *
9664
+ * Licensed under the Apache License, Version 2.0 (the "License");
9665
+ * you may not use this file except in compliance with the License.
9666
+ * You may obtain a copy of the License at
9667
+ *
9668
+ * http://www.apache.org/licenses/LICENSE-2.0
9669
+ *
9670
+ * Unless required by applicable law or agreed to in writing, software
9671
+ * distributed under the License is distributed on an "AS IS" BASIS,
9672
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9673
+ * See the License for the specific language governing permissions and
9674
+ * limitations under the License.
9675
+ *
9676
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9677
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
9678
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
9679
+ * */
9132
9680
  var useConditionalFields = function useConditionalFields() {
9133
9681
  var _useFormContext = useFormContext(),
9134
9682
  watch = _useFormContext.watch,
@@ -9141,6 +9689,7 @@ var useConditionalFields = function useConditionalFields() {
9141
9689
  unregister(['visibilityValue', 'visibilityCause']);
9142
9690
  }
9143
9691
  }, [hasSurfaceVisiblity, unregister]);
9692
+
9144
9693
  // phenomenon: SFC_WIND
9145
9694
  var hasSurfaceWind = watch('phenomenon') === 'SFC_WIND';
9146
9695
  React.useEffect(function () {
@@ -9148,6 +9697,7 @@ var useConditionalFields = function useConditionalFields() {
9148
9697
  unregister(['windDirection', 'windUnit', 'windSpeed']);
9149
9698
  }
9150
9699
  }, [hasSurfaceWind, unregister]);
9700
+
9151
9701
  // phenomenon: SFC_WIND, SFC_VIS, BKN_CLD, OVC_CLD
9152
9702
  var hasLevels = phenomenon !== 'SFC_WIND' && phenomenon !== 'SFC_VIS' && phenomenon !== 'BKN_CLD' && phenomenon !== 'OVC_CLD';
9153
9703
  React.useEffect(function () {
@@ -9155,6 +9705,7 @@ var useConditionalFields = function useConditionalFields() {
9155
9705
  unregister(['levelInfoMode', 'level', 'lowerLevel']);
9156
9706
  }
9157
9707
  }, [hasLevels, unregister]);
9708
+
9158
9709
  // phenomenon: BKN_CLD
9159
9710
  var hasCloudLevels = phenomenon === 'BKN_CLD' || phenomenon === 'OVC_CLD';
9160
9711
  React.useEffect(function () {
@@ -9204,17 +9755,19 @@ var AirmetForm = function AirmetForm(_ref) {
9204
9755
  fetchAirmetTAC = _useTACApi.fetchAirmetTAC;
9205
9756
  var firBorderAtStart = initialAirmet ? initialAirmet.locationIndicatorATSR : productConfig.active_firs[0];
9206
9757
  var sourcePanelId = useSelector(function (store) {
9207
- return uiSelectors.getSourcePanelId(store, 'publicWarnings');
9758
+ return uiSelectors.getSourcePanelId(store, uiTypes.DialogTypes.PublicWarnings);
9208
9759
  });
9209
9760
  var linkedMaps = useSelector(function (store) {
9210
- return genericSelectors.getLinkedMaps(store, sourcePanelId);
9761
+ return genericSelectors.getLinkedMapIds(store, sourcePanelId);
9211
9762
  });
9212
9763
  var getSrsForMapId = useSelector(function (store) {
9213
9764
  return linkedMaps ? mapSelectors.getSrs(store, linkedMaps[0]) : undefined;
9214
9765
  });
9766
+
9215
9767
  // Fallback to Mercator for '', null, or undefined
9216
9768
  var projection = getSrsForMapId != null && getSrsForMapId.trim() ? getSrsForMapId : 'EPSG:3857';
9217
9769
  var prevProjection = usePrevious(projection);
9770
+
9218
9771
  // Trigger update if projection changes
9219
9772
  useEffect(function () {
9220
9773
  if (prevProjection === undefined) {
@@ -9326,47 +9879,48 @@ var AirmetForm = function AirmetForm(_ref) {
9326
9879
  setStartEditModes(updateDrawToolsWithFir(startEditModes, newFirGeoJSON));
9327
9880
  // update available phenomena for the FIR
9328
9881
  setPhenomenaList(newPhenomenaList);
9882
+
9329
9883
  // trigger validation for airmet specific fields that depend on FIR config
9330
9884
  var fieldnames = ['windDirection', 'windSpeed', 'visibilityValue', 'cloudLevel.value', 'cloudLowerLevel.value'];
9331
9885
  triggerValidations(fieldnames, getValues, trigger);
9332
9886
  };
9333
9887
  var renderForm = function renderForm() {
9334
- return jsxs(Grid, {
9888
+ return /*#__PURE__*/jsxs(Grid, {
9335
9889
  container: true,
9336
9890
  direction: "column",
9337
9891
  spacing: 2,
9338
9892
  sx: formStyles,
9339
- children: [jsx(Type, {
9893
+ children: [/*#__PURE__*/jsx(Type, {
9340
9894
  isDisabled: isDisabled,
9341
9895
  isReadOnly: isReadOnly,
9342
9896
  onChange: onChangeForm,
9343
9897
  productType: "airmet"
9344
- }), !isCancelAirmet && jsx(Phenomenon, {
9898
+ }), !isCancelAirmet && /*#__PURE__*/jsx(Phenomenon, {
9345
9899
  isDisabled: isDisabled,
9346
9900
  isReadOnly: isReadOnly,
9347
9901
  onChange: onChangeForm,
9348
9902
  phenomenaList: phenomenaList,
9349
9903
  productConfig: productConfig,
9350
9904
  productType: "airmet"
9351
- }), !isCancelAirmet && hasSurfaceVisiblity ? jsx(SurfaceVisibility, {
9905
+ }), !isCancelAirmet && hasSurfaceVisiblity ? /*#__PURE__*/jsx(SurfaceVisibility, {
9352
9906
  isDisabled: isDisabled,
9353
9907
  isReadOnly: isReadOnly,
9354
9908
  onChange: onChangeForm,
9355
9909
  productConfig: productConfig
9356
- }) : null, !isCancelAirmet && hasSurfaceWind ? jsx(SurfaceWind, {
9910
+ }) : null, !isCancelAirmet && hasSurfaceWind ? /*#__PURE__*/jsx(SurfaceWind, {
9357
9911
  isDisabled: isDisabled,
9358
9912
  isReadOnly: isReadOnly,
9359
9913
  onChange: onChangeForm,
9360
9914
  productConfig: productConfig
9361
- }) : null, !isCancelAirmet && jsx(ObservationForecast, {
9915
+ }) : null, !isCancelAirmet && /*#__PURE__*/jsx(ObservationForecast, {
9362
9916
  isDisabled: isDisabled,
9363
9917
  isReadOnly: isReadOnly
9364
- }), !isCancelAirmet && jsx(ObservationForecastTime, {
9918
+ }), !isCancelAirmet && /*#__PURE__*/jsx(ObservationForecastTime, {
9365
9919
  helperText: helperText,
9366
9920
  isDisabled: isDisabled,
9367
9921
  isReadOnly: isReadOnly,
9368
9922
  onChange: onChangeForm
9369
- }), jsx(ValidFrom, {
9923
+ }), /*#__PURE__*/jsx(ValidFrom, {
9370
9924
  isDisabled: isDisabled,
9371
9925
  isReadOnly: isReadOnly,
9372
9926
  lockBecauseActive: lockValidFrom,
@@ -9375,7 +9929,7 @@ var AirmetForm = function AirmetForm(_ref) {
9375
9929
  return setHasUserChangedTime(true);
9376
9930
  },
9377
9931
  productConfig: productConfig
9378
- }), jsx(ValidUntil, {
9932
+ }), /*#__PURE__*/jsx(ValidUntil, {
9379
9933
  hasUserChangedTime: hasUserChangedTime,
9380
9934
  isDisabled: isDisabled,
9381
9935
  isReadOnly: isReadOnly,
@@ -9384,14 +9938,14 @@ var AirmetForm = function AirmetForm(_ref) {
9384
9938
  return setHasUserChangedTime(true);
9385
9939
  },
9386
9940
  productConfig: productConfig
9387
- }), jsx(SelectFIR, {
9941
+ }), /*#__PURE__*/jsx(SelectFIR, {
9388
9942
  isDisabled: isDisabled,
9389
9943
  isReadOnly: isReadOnly,
9390
9944
  onChange: function onChange(event, newPhenomenaList) {
9391
9945
  onChangeFir(newPhenomenaList != null ? newPhenomenaList : [], event);
9392
9946
  },
9393
9947
  productConfig: productConfig
9394
- }), jsx(StartGeometry, {
9948
+ }), /*#__PURE__*/jsx(StartGeometry, {
9395
9949
  activeTool: activeStartTool,
9396
9950
  geoJSON: startGeoJSON,
9397
9951
  geoJSONIntersection: startGeoJSONIntersection,
@@ -9400,42 +9954,42 @@ var AirmetForm = function AirmetForm(_ref) {
9400
9954
  onChangeTool: onChangeStartTool,
9401
9955
  productConfig: productConfig,
9402
9956
  tools: startEditModes
9403
- }), !isCancelAirmet && hasLevels ? jsx(Levels, {
9957
+ }), !isCancelAirmet && hasLevels ? /*#__PURE__*/jsx(Levels, {
9404
9958
  isDisabled: isDisabled,
9405
9959
  isReadOnly: isReadOnly,
9406
9960
  onChange: onChangeForm,
9407
9961
  productConfig: productConfig,
9408
9962
  productType: "airmet"
9409
- }) : null, !isCancelAirmet && hasCloudLevels ? jsx(CloudLevels, {
9963
+ }) : null, !isCancelAirmet && hasCloudLevels ? /*#__PURE__*/jsx(CloudLevels, {
9410
9964
  isDisabled: isDisabled,
9411
9965
  isReadOnly: isReadOnly,
9412
9966
  onChange: onChangeForm,
9413
9967
  productConfig: productConfig
9414
- }) : null, !isCancelAirmet && jsx(Progress, {
9968
+ }) : null, !isCancelAirmet && /*#__PURE__*/jsx(Progress, {
9415
9969
  isDisabled: isDisabled,
9416
9970
  isReadOnly: isReadOnly,
9417
9971
  onChange: onChangeForm,
9418
9972
  productConfig: productConfig,
9419
9973
  productType: "airmet"
9420
- }), !isCancelAirmet && jsx(Change, {
9974
+ }), !isCancelAirmet && /*#__PURE__*/jsx(Change, {
9421
9975
  isDisabled: isDisabled,
9422
9976
  isReadOnly: isReadOnly
9423
- }), jsx(IssuedAt, {
9977
+ }), /*#__PURE__*/jsx(IssuedAt, {
9424
9978
  date: getProductIssueDate(t, initialAirmet, initialCancelAirmet),
9425
9979
  isReadOnly: isReadOnly
9426
- }), jsxs(Tac, {
9980
+ }), /*#__PURE__*/jsxs(Tac, {
9427
9981
  product: product,
9428
9982
  tac: tac,
9429
- children: [jsx(ReactHookFormHiddenInput, {
9983
+ children: [/*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9430
9984
  defaultValue: "-1",
9431
9985
  name: "sequence"
9432
9986
  }), /* Add hidden fields for TAC generation in case of cancel airmet */
9433
- isCancelAirmet ? jsxs(Fragment, {
9434
- children: [jsx(ReactHookFormHiddenInput, {
9987
+ isCancelAirmet ? /*#__PURE__*/jsxs(Fragment, {
9988
+ children: [/*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9435
9989
  name: "cancelsAirmetSequenceId"
9436
- }), jsx(ReactHookFormHiddenInput, {
9990
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9437
9991
  name: "validDateEndOfAirmetToCancel"
9438
- }), jsx(ReactHookFormHiddenInput, {
9992
+ }), /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
9439
9993
  name: "validDateStartOfAirmetToCancel"
9440
9994
  })]
9441
9995
  }) : null]
@@ -9445,7 +9999,7 @@ var AirmetForm = function AirmetForm(_ref) {
9445
9999
  if (!showMap) {
9446
10000
  return renderForm();
9447
10001
  }
9448
- return jsx("form", {
10002
+ return /*#__PURE__*/jsx("form", {
9449
10003
  onChange: onChangeForm,
9450
10004
  onSubmit: handleSubmit(function () {
9451
10005
  return null;
@@ -9453,7 +10007,7 @@ var AirmetForm = function AirmetForm(_ref) {
9453
10007
  style: {
9454
10008
  width: '100%'
9455
10009
  },
9456
- children: jsx(ProductFormLayout, {
10010
+ children: /*#__PURE__*/jsx(ProductFormLayout, {
9457
10011
  geoJSONLayers: layers,
9458
10012
  productConfig: productConfig,
9459
10013
  children: renderForm()
@@ -9461,6 +10015,23 @@ var AirmetForm = function AirmetForm(_ref) {
9461
10015
  });
9462
10016
  };
9463
10017
 
10018
+ /* *
10019
+ * Licensed under the Apache License, Version 2.0 (the "License");
10020
+ * you may not use this file except in compliance with the License.
10021
+ * You may obtain a copy of the License at
10022
+ *
10023
+ * http://www.apache.org/licenses/LICENSE-2.0
10024
+ *
10025
+ * Unless required by applicable law or agreed to in writing, software
10026
+ * distributed under the License is distributed on an "AS IS" BASIS,
10027
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10028
+ * See the License for the specific language governing permissions and
10029
+ * limitations under the License.
10030
+ *
10031
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10032
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
10033
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10034
+ * */
9464
10035
  var CancelSigmetVolcanicMovements = function CancelSigmetVolcanicMovements(_ref) {
9465
10036
  var sigmet = _ref.sigmet,
9466
10037
  productConfig = _ref.productConfig;
@@ -9469,11 +10040,11 @@ var CancelSigmetVolcanicMovements = function CancelSigmetVolcanicMovements(_ref)
9469
10040
  t = _useSigmetAirmetTrans.t;
9470
10041
  var _useDraftFormHelpers = useDraftFormHelpers(),
9471
10042
  isRequired = _useDraftFormHelpers.isRequired;
9472
- return jsxs(Fragment, {
9473
- children: [jsxs(Typography, {
10043
+ return /*#__PURE__*/jsxs(Fragment, {
10044
+ children: [/*#__PURE__*/jsxs(Typography, {
9474
10045
  variant: "body1",
9475
10046
  children: [t('vulcanic-ash-description'), ":"]
9476
- }), jsxs(ReactHookFormRadioGroup, {
10047
+ }), /*#__PURE__*/jsxs(ReactHookFormRadioGroup, {
9477
10048
  defaultValue: t('unknown').toUpperCase(),
9478
10049
  name: "vaSigmetMoveToFIR",
9479
10050
  row: true,
@@ -9483,13 +10054,13 @@ var CancelSigmetVolcanicMovements = function CancelSigmetVolcanicMovements(_ref)
9483
10054
  }
9484
10055
  },
9485
10056
  children: [allFIRS[sigmet.locationIndicatorATSR].adjacent_firs.map(function (adjacentFIR) {
9486
- return jsx(FormControlLabel, {
9487
- control: jsx(Radio, {}),
10057
+ return /*#__PURE__*/jsx(FormControlLabel, {
10058
+ control: /*#__PURE__*/jsx(Radio, {}),
9488
10059
  label: adjacentFIR,
9489
10060
  value: adjacentFIR
9490
10061
  }, adjacentFIR);
9491
- }), jsx(FormControlLabel, {
9492
- control: jsx(Radio, {}),
10062
+ }), /*#__PURE__*/jsx(FormControlLabel, {
10063
+ control: /*#__PURE__*/jsx(Radio, {}),
9493
10064
  label: t('vulcanic-VA-SIGMET-text'),
9494
10065
  value: "UNKNOWN"
9495
10066
  }, "UNKNOWN")]
@@ -9575,7 +10146,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9575
10146
  confirmLabel: getConfirmationDialogButtonLabel(t, action, productType),
9576
10147
  cancelLabel: getConfirmationDialogCancelLabel(t, action),
9577
10148
  catchOnCancel: action === ProductAction.CLOSE,
9578
- content: isVAPhenomenon(product, action) && !isShortTest() ? jsx(CancelSigmetVolcanicMovements, {
10149
+ content: isVAPhenomenon(product, action) && !isShortTest() ? /*#__PURE__*/jsx(CancelSigmetVolcanicMovements, {
9579
10150
  productConfig: productConfig,
9580
10151
  sigmet: product
9581
10152
  }) : null
@@ -9674,7 +10245,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9674
10245
  };
9675
10246
  }();
9676
10247
  var title = getDialogtitle(t, product, productType, productConfig);
9677
- return jsxs(CustomDialog, {
10248
+ return /*#__PURE__*/jsxs(CustomDialog, {
9678
10249
  "data-testid": "productform-dialog",
9679
10250
  disableEnforceFocus: true,
9680
10251
  disableEscapeKeyDown: true,
@@ -9701,17 +10272,17 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9701
10272
  }
9702
10273
  },
9703
10274
  title: title,
9704
- children: [errorStoreMessage ? jsx(AlertBanner, {
10275
+ children: [errorStoreMessage ? /*#__PURE__*/jsx(AlertBanner, {
9705
10276
  info: errorStoreMessageText,
9706
10277
  severity: "error",
9707
10278
  title: "An error has occurred while saving, please try again"
9708
- }) : null, jsx(Box, {
10279
+ }) : null, /*#__PURE__*/jsx(Box, {
9709
10280
  sx: {
9710
10281
  display: 'flex',
9711
10282
  minHeight: 200,
9712
10283
  height: '100%'
9713
10284
  },
9714
- children: productType === 'sigmet' ? jsx(SigmetForm, {
10285
+ children: productType === 'sigmet' ? /*#__PURE__*/jsx(SigmetForm, {
9715
10286
  initialCancelSigmet: product !== null && isInstanceOfCancelSigmet(product) ? product : null,
9716
10287
  initialSigmet: product !== null && !isInstanceOfCancelSigmet(product) ? product : null,
9717
10288
  isCancelSigmet: product !== null && isInstanceOfCancelSigmet(product),
@@ -9719,7 +10290,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9719
10290
  product: product,
9720
10291
  productConfig: productConfig,
9721
10292
  setDialogActionsDisabled: setDialogActionsDisabled
9722
- }) : jsx(AirmetForm, {
10293
+ }) : /*#__PURE__*/jsx(AirmetForm, {
9723
10294
  initialAirmet: product !== null && !isInstanceOfCancelAirmet(product) ? product : null,
9724
10295
  initialCancelAirmet: product !== null && isInstanceOfCancelAirmet(product) ? product : null,
9725
10296
  isCancelAirmet: product !== null && isInstanceOfCancelAirmet(product),
@@ -9727,14 +10298,14 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9727
10298
  product: product,
9728
10299
  productConfig: productConfig
9729
10300
  })
9730
- }), jsx(DraftFieldHelper, {}), jsx(Backdrop, {
10301
+ }), /*#__PURE__*/jsx(DraftFieldHelper, {}), /*#__PURE__*/jsx(Backdrop, {
9731
10302
  "data-testid": "loader",
9732
10303
  open: isLoading,
9733
10304
  sx: {
9734
10305
  zIndex: 1500,
9735
10306
  color: '#fff'
9736
10307
  },
9737
- children: jsx(CircularProgress, {
10308
+ children: /*#__PURE__*/jsx(CircularProgress, {
9738
10309
  color: "inherit"
9739
10310
  })
9740
10311
  })]
@@ -9742,17 +10313,34 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
9742
10313
  };
9743
10314
  var Wrapper = function Wrapper(_ref4) {
9744
10315
  var props = Object.assign({}, (_objectDestructuringEmpty(_ref4), _ref4));
9745
- return jsx(ReactHookFormProvider, {
10316
+ return /*#__PURE__*/jsx(ReactHookFormProvider, {
9746
10317
  options: Object.assign({}, defaultFormOptions, {
9747
10318
  defaultValues: props.product,
9748
10319
  values: props.product
9749
10320
  }),
9750
- children: jsx(ConfirmationServiceProvider, {
9751
- children: jsx(ProductFormDialogContent, Object.assign({}, props))
10321
+ children: /*#__PURE__*/jsx(ConfirmationServiceProvider, {
10322
+ children: /*#__PURE__*/jsx(ProductFormDialogContent, Object.assign({}, props))
9752
10323
  })
9753
10324
  });
9754
10325
  };
9755
10326
 
10327
+ /* *
10328
+ * Licensed under the Apache License, Version 2.0 (the "License");
10329
+ * you may not use this file except in compliance with the License.
10330
+ * You may obtain a copy of the License at
10331
+ *
10332
+ * http://www.apache.org/licenses/LICENSE-2.0
10333
+ *
10334
+ * Unless required by applicable law or agreed to in writing, software
10335
+ * distributed under the License is distributed on an "AS IS" BASIS,
10336
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10337
+ * See the License for the specific language governing permissions and
10338
+ * limitations under the License.
10339
+ *
10340
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10341
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
10342
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10343
+ * */
9756
10344
  var prepareProductValues = function prepareProductValues(product, productType, productConfig) {
9757
10345
  // Ensure there is a valid start/end date
9758
10346
  if (!isInstanceOfCancelSigmetOrAirmet(product) && (!product.validDateStart || !product.validDateEnd)) {
@@ -9773,13 +10361,14 @@ var ProductFormDialog = function ProductFormDialog(_ref) {
9773
10361
  productConfig = _ref.productConfig;
9774
10362
  // Show the right options for a new sigmet/airmet not coming from the BE
9775
10363
  var productCanBe = productListItem !== null ? productListItem.canbe : ['DRAFTED', 'DISCARDED', 'PUBLISHED'];
10364
+
9776
10365
  // Determine mode of form based on canbe properties
9777
10366
  var mode = getProductFormMode(productCanBe, productListItem);
9778
10367
  if (!isOpen) {
9779
10368
  return null;
9780
10369
  }
9781
10370
  var product = productListItem !== null ? prepareProductValues(productType === 'sigmet' ? productListItem[productType] : productListItem[productType], productType, productConfig) : null;
9782
- return jsx(Wrapper, {
10371
+ return /*#__PURE__*/jsx(Wrapper, {
9783
10372
  isOpen: isOpen,
9784
10373
  mode: mode,
9785
10374
  onRenewClick: function onRenewClick() {
@@ -9808,17 +10397,17 @@ var getActiveStatus = function getActiveStatus(product) {
9808
10397
  return null;
9809
10398
  }
9810
10399
  var active = dateUtils.utc(product.validDateStart) <= dateUtils.utc();
9811
- return active ? jsx(Success, {
10400
+ return active ? /*#__PURE__*/jsx(Success, {
9812
10401
  "data-testid": "status-active",
9813
10402
  sx: styles.activeStatus
9814
- }) : jsx(Clock, {
10403
+ }) : /*#__PURE__*/jsx(Clock, {
9815
10404
  "data-testid": "status-inactive",
9816
10405
  sx: styles.activeStatus
9817
10406
  });
9818
10407
  };
9819
10408
  var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9820
10409
  if (cancelsSeqId !== null) {
9821
- return jsx(StatusTag, {
10410
+ return /*#__PURE__*/jsx(StatusTag, {
9822
10411
  color: "red",
9823
10412
  content: "cancels " + cancelsSeqId,
9824
10413
  sx: {
@@ -9827,7 +10416,7 @@ var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9827
10416
  });
9828
10417
  }
9829
10418
  if (product.status === 'CANCELLED') {
9830
- return jsx(StatusTag, {
10419
+ return /*#__PURE__*/jsx(StatusTag, {
9831
10420
  color: "red",
9832
10421
  content: "cancelled " + product.sequence,
9833
10422
  sx: {
@@ -9836,7 +10425,7 @@ var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9836
10425
  });
9837
10426
  }
9838
10427
  if (dateUtils.utc(product.validDateEnd) < dateUtils.utc()) {
9839
- return jsx(StatusTag, {
10428
+ return /*#__PURE__*/jsx(StatusTag, {
9840
10429
  color: "grey",
9841
10430
  content: "expired",
9842
10431
  sx: {
@@ -9844,7 +10433,7 @@ var getStatusTagList = function getStatusTagList(product, cancelsSeqId) {
9844
10433
  }
9845
10434
  });
9846
10435
  }
9847
- return jsx(StatusTag, {
10436
+ return /*#__PURE__*/jsx(StatusTag, {
9848
10437
  color: product.status === 'PUBLISHED' ? 'green' : 'grey',
9849
10438
  content: product.status.toLowerCase(),
9850
10439
  sx: {
@@ -9867,7 +10456,7 @@ var formatValidTime = function formatValidTime(startDate, endDate, format) {
9867
10456
  };
9868
10457
  var ProductListRowHeader = function ProductListRowHeader(_ref) {
9869
10458
  var title = _ref.title;
9870
- return jsx(Typography, {
10459
+ return /*#__PURE__*/jsx(Typography, {
9871
10460
  sx: {
9872
10461
  color: 'geowebColors.textInputField.label.rgba',
9873
10462
  fontSize: '0.75rem'
@@ -10017,36 +10606,36 @@ var ProductListRow = function ProductListRow(_ref2) {
10017
10606
  }
10018
10607
  return '';
10019
10608
  };
10020
- return jsx(Card, {
10609
+ return /*#__PURE__*/jsx(Card, {
10021
10610
  elevation: 0,
10022
10611
  sx: listRowStyles,
10023
10612
  variant: "outlined",
10024
- children: jsx(Box, {
10613
+ children: /*#__PURE__*/jsx(Box, {
10025
10614
  className: "productListContainer",
10026
- children: jsxs(Grid, {
10615
+ children: /*#__PURE__*/jsxs(Grid, {
10027
10616
  alignItems: "center",
10028
10617
  className: "rowContainer",
10029
10618
  container: true,
10030
10619
  spacing: 0,
10031
- children: [jsxs(Grid, {
10620
+ children: [/*#__PURE__*/jsxs(Grid, {
10032
10621
  className: "col-1",
10033
- children: [phenomenon !== null && jsx(ProductListRowHeader, {
10622
+ children: [phenomenon !== null && /*#__PURE__*/jsx(ProductListRowHeader, {
10034
10623
  title: productType.toUpperCase()
10035
- }), jsx(CustomTooltip, {
10624
+ }), /*#__PURE__*/jsx(CustomTooltip, {
10036
10625
  placement: "bottom-start",
10037
10626
  title: phenomenon !== null ? String(getPhenomenon(fir, phenomenon, productConfig)) : '',
10038
- children: jsx(Typography, {
10627
+ children: /*#__PURE__*/jsx(Typography, {
10039
10628
  noWrap: true,
10040
10629
  sx: styles.font,
10041
10630
  variant: "subtitle2",
10042
10631
  children: phenomenon !== null ? getLabel(product) : 'Cancel'
10043
10632
  })
10044
10633
  })]
10045
- }), jsxs(Grid, {
10634
+ }), /*#__PURE__*/jsxs(Grid, {
10046
10635
  className: "col-2",
10047
- children: [jsx(ProductListRowHeader, {
10636
+ children: [/*#__PURE__*/jsx(ProductListRowHeader, {
10048
10637
  title: t('issue-time')
10049
- }), jsx(CustomTooltip, {
10638
+ }), /*#__PURE__*/jsx(CustomTooltip, {
10050
10639
  placement: "bottom-start",
10051
10640
  slotProps: {
10052
10641
  tooltip: {
@@ -10060,10 +10649,10 @@ var ProductListRow = function ProductListRow(_ref2) {
10060
10649
  }
10061
10650
  }
10062
10651
  },
10063
- title: jsxs(Fragment, {
10064
- children: [jsx(ProductListRowHeader, {
10652
+ title: /*#__PURE__*/jsxs(Fragment, {
10653
+ children: [/*#__PURE__*/jsx(ProductListRowHeader, {
10065
10654
  title: "TAC"
10066
- }), jsx(Typography, {
10655
+ }), /*#__PURE__*/jsx(Typography, {
10067
10656
  style: {
10068
10657
  whiteSpace: 'pre-line'
10069
10658
  },
@@ -10079,28 +10668,28 @@ var ProductListRow = function ProductListRow(_ref2) {
10079
10668
  children: TAC
10080
10669
  })]
10081
10670
  }),
10082
- children: jsx(Typography, {
10671
+ children: /*#__PURE__*/jsx(Typography, {
10083
10672
  "data-testid": "issueTime",
10084
10673
  sx: styles.font,
10085
10674
  variant: "subtitle2",
10086
10675
  children: product.issueDate ? dateUtils.dateToString(dateUtils.utc(product.issueDate), dateUtils.DATE_FORMAT_NAME_OF_MONTH) + " UTC" : t('not-published')
10087
10676
  })
10088
10677
  })]
10089
- }), jsxs(Grid, {
10678
+ }), /*#__PURE__*/jsxs(Grid, {
10090
10679
  className: "col-3",
10091
- children: [jsx(ProductListRowHeader, {
10680
+ children: [/*#__PURE__*/jsx(ProductListRowHeader, {
10092
10681
  title: t('valid-time')
10093
- }), jsx(Typography, {
10682
+ }), /*#__PURE__*/jsx(Typography, {
10094
10683
  "data-testid": "validTime",
10095
10684
  sx: styles.font,
10096
10685
  variant: "subtitle2",
10097
10686
  children: validTime
10098
10687
  })]
10099
- }), jsxs(Grid, {
10688
+ }), /*#__PURE__*/jsxs(Grid, {
10100
10689
  className: "col-4",
10101
10690
  container: true,
10102
- children: [product.status === 'DRAFT' ? jsx(Button, {
10103
- startIcon: jsx(Edit, {}),
10691
+ children: [product.status === 'DRAFT' ? /*#__PURE__*/jsx(Button, {
10692
+ startIcon: /*#__PURE__*/jsx(Edit, {}),
10104
10693
  sx: {
10105
10694
  marginTop: '6px'
10106
10695
  },
@@ -10113,6 +10702,23 @@ var ProductListRow = function ProductListRow(_ref2) {
10113
10702
  });
10114
10703
  };
10115
10704
 
10705
+ /* *
10706
+ * Licensed under the Apache License, Version 2.0 (the "License");
10707
+ * you may not use this file except in compliance with the License.
10708
+ * You may obtain a copy of the License at
10709
+ *
10710
+ * http://www.apache.org/licenses/LICENSE-2.0
10711
+ *
10712
+ * Unless required by applicable law or agreed to in writing, software
10713
+ * distributed under the License is distributed on an "AS IS" BASIS,
10714
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10715
+ * See the License for the specific language governing permissions and
10716
+ * limitations under the License.
10717
+ *
10718
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10719
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
10720
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10721
+ * */
10116
10722
  var ProductList = function ProductList(_ref) {
10117
10723
  var productType = _ref.productType,
10118
10724
  productList = _ref.productList,
@@ -10123,8 +10729,8 @@ var ProductList = function ProductList(_ref) {
10123
10729
  onClickNewProduct = _ref.onClickNewProduct;
10124
10730
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
10125
10731
  t = _useSigmetAirmetTrans.t;
10126
- return jsxs(Fragment, {
10127
- children: [!!isLoading && jsx(LinearProgress, {
10732
+ return /*#__PURE__*/jsxs(Fragment, {
10733
+ children: [!!isLoading && /*#__PURE__*/jsx(LinearProgress, {
10128
10734
  color: "secondary",
10129
10735
  "data-testid": "productlist-loadingbar",
10130
10736
  sx: {
@@ -10134,27 +10740,27 @@ var ProductList = function ProductList(_ref) {
10134
10740
  left: 0,
10135
10741
  top: 0
10136
10742
  }
10137
- }), !!error && jsx(Box, {
10743
+ }), !!error && /*#__PURE__*/jsx(Box, {
10138
10744
  sx: {
10139
10745
  marginBottom: 2,
10140
10746
  ' .MuiAlert-message': {
10141
10747
  whiteSpace: 'pre-wrap'
10142
10748
  }
10143
10749
  },
10144
- children: jsx(AlertBanner, {
10750
+ children: /*#__PURE__*/jsx(AlertBanner, {
10145
10751
  dataTestId: "productList-alert",
10146
10752
  info: error.message ? error.message : '',
10147
10753
  severity: "error",
10148
10754
  title: error.name
10149
10755
  })
10150
- }), jsxs(Grid, {
10756
+ }), /*#__PURE__*/jsxs(Grid, {
10151
10757
  alignItems: "stretch",
10152
10758
  container: true,
10153
10759
  direction: "column",
10154
- children: [jsx(Grid, {
10760
+ children: [/*#__PURE__*/jsx(Grid, {
10155
10761
  container: true,
10156
10762
  justifyContent: "flex-end",
10157
- children: jsx(Button, {
10763
+ children: /*#__PURE__*/jsx(Button, {
10158
10764
  "data-testid": "productListCreateButton",
10159
10765
  onClick: onClickNewProduct,
10160
10766
  sx: {
@@ -10165,19 +10771,19 @@ var ProductList = function ProductList(_ref) {
10165
10771
  product: productType.toUpperCase()
10166
10772
  })
10167
10773
  })
10168
- }), jsx(Grid, {
10774
+ }), /*#__PURE__*/jsx(Grid, {
10169
10775
  sx: {
10170
10776
  width: '100%',
10171
10777
  minHeight: '600px'
10172
10778
  },
10173
- children: !!productList && jsx(List, {
10779
+ children: !!productList && /*#__PURE__*/jsx(List, {
10174
10780
  sx: {
10175
10781
  paddingTop: 4,
10176
10782
  containerType: 'inline-size'
10177
10783
  },
10178
10784
  children: productList.map(function (productListItem) {
10179
10785
  var product = productType === 'sigmet' ? productListItem[productType] : productListItem[productType];
10180
- return jsx(ListItemButton, {
10786
+ return /*#__PURE__*/jsx(ListItemButton, {
10181
10787
  "data-testid": "productListItem",
10182
10788
  onClick: function onClick() {
10183
10789
  onClickProductRow(productListItem);
@@ -10185,7 +10791,7 @@ var ProductList = function ProductList(_ref) {
10185
10791
  sx: {
10186
10792
  padding: 0.25
10187
10793
  },
10188
- children: jsx(ProductListRow, {
10794
+ children: /*#__PURE__*/jsx(ProductListRow, {
10189
10795
  product: product,
10190
10796
  productConfig: productConfig,
10191
10797
  productType: productType
@@ -10256,6 +10862,23 @@ var renewSigmet = function renewSigmet(oldSigmet, productConfig) {
10256
10862
  });
10257
10863
  };
10258
10864
 
10865
+ /* *
10866
+ * Licensed under the Apache License, Version 2.0 (the "License");
10867
+ * you may not use this file except in compliance with the License.
10868
+ * You may obtain a copy of the License at
10869
+ *
10870
+ * http://www.apache.org/licenses/LICENSE-2.0
10871
+ *
10872
+ * Unless required by applicable law or agreed to in writing, software
10873
+ * distributed under the License is distributed on an "AS IS" BASIS,
10874
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10875
+ * See the License for the specific language governing permissions and
10876
+ * limitations under the License.
10877
+ *
10878
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10879
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
10880
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10881
+ * */
10259
10882
  /**
10260
10883
  * Shows the list of Sigmets or Airmets and allows to create, edit and view Sigmets/Airmets.
10261
10884
  * Needs to be wrapped in the ApiProvider.
@@ -10263,6 +10886,7 @@ var renewSigmet = function renewSigmet(oldSigmet, productConfig) {
10263
10886
  * @param {string} productType productType: string - either 'sigmet' or 'airmet'. Determines mode in which wrapper is loaded
10264
10887
  *
10265
10888
  */
10889
+
10266
10890
  var MetInfoWrapper = function MetInfoWrapper(_ref) {
10267
10891
  var productType = _ref.productType,
10268
10892
  productConfig = _ref.productConfig;
@@ -10312,14 +10936,14 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
10312
10936
  setSelectedProduct(renewAirmet(oldProduct, productConfig));
10313
10937
  }
10314
10938
  };
10315
- return jsxs(Box$1, {
10939
+ return /*#__PURE__*/jsxs(Box$1, {
10316
10940
  "data-testid": "sigmetAirmetComponent",
10317
10941
  sx: {
10318
10942
  padding: '24px',
10319
10943
  height: '100%',
10320
10944
  overflowY: 'auto'
10321
10945
  },
10322
- children: [jsx(ProductList, {
10946
+ children: [/*#__PURE__*/jsx(ProductList, {
10323
10947
  "data-testid": "sigmetAirmetList",
10324
10948
  error: errorList,
10325
10949
  isLoading: isLoadingList,
@@ -10328,7 +10952,7 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
10328
10952
  productConfig: productConfig,
10329
10953
  productList: productList,
10330
10954
  productType: productType
10331
- }), jsx(ProductFormDialog, {
10955
+ }), /*#__PURE__*/jsx(ProductFormDialog, {
10332
10956
  handleRenewProductClick: handleRenewProductClick,
10333
10957
  isOpen: isFormDialogOpen,
10334
10958
  productConfig: productConfig,
@@ -10339,6 +10963,24 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
10339
10963
  });
10340
10964
  };
10341
10965
 
10966
+ /* *
10967
+ * Licensed under the Apache License, Version 2.0 (the "License");
10968
+ * you may not use this file except in compliance with the License.
10969
+ * You may obtain a copy of the License at
10970
+ *
10971
+ * http://www.apache.org/licenses/LICENSE-2.0
10972
+ *
10973
+ * Unless required by applicable law or agreed to in writing, software
10974
+ * distributed under the License is distributed on an "AS IS" BASIS,
10975
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10976
+ * See the License for the specific language governing permissions and
10977
+ * limitations under the License.
10978
+ *
10979
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10980
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
10981
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
10982
+ * */
10983
+
10342
10984
  var DownloadSigmetAirmetConfigWrapper = function DownloadSigmetAirmetConfigWrapper(_ref) {
10343
10985
  var productType = _ref.productType;
10344
10986
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
@@ -10350,38 +10992,74 @@ var DownloadSigmetAirmetConfigWrapper = function DownloadSigmetAirmetConfigWrapp
10350
10992
  isLoading = _useProductConfig.isLoading,
10351
10993
  error = _useProductConfig.error;
10352
10994
  if (isLoading) {
10353
- return jsx(LinearProgress, {
10995
+ return /*#__PURE__*/jsx(LinearProgress, {
10354
10996
  "data-testid": "loadingSpinner"
10355
10997
  });
10356
10998
  }
10357
10999
  if (error) {
10358
- return jsx(AlertBanner, {
11000
+ return /*#__PURE__*/jsx(AlertBanner, {
10359
11001
  info: !isLoggedIn ? t('error-auth-login') : error.message,
10360
11002
  title: t('error-title')
10361
11003
  });
10362
11004
  }
10363
11005
  if (!productConfig) {
10364
- return jsx(AlertBanner, {
11006
+ return /*#__PURE__*/jsx(AlertBanner, {
10365
11007
  info: t('error-no-config-found'),
10366
11008
  title: t('error-title')
10367
11009
  });
10368
11010
  }
10369
- return jsx(MetInfoWrapper, {
11011
+ return /*#__PURE__*/jsx(MetInfoWrapper, {
10370
11012
  productConfig: productConfig,
10371
11013
  productType: productType
10372
11014
  });
10373
11015
  };
10374
11016
 
11017
+ /* *
11018
+ * Licensed under the Apache License, Version 2.0 (the "License");
11019
+ * you may not use this file except in compliance with the License.
11020
+ * You may obtain a copy of the License at
11021
+ *
11022
+ * http://www.apache.org/licenses/LICENSE-2.0
11023
+ *
11024
+ * Unless required by applicable law or agreed to in writing, software
11025
+ * distributed under the License is distributed on an "AS IS" BASIS,
11026
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11027
+ * See the License for the specific language governing permissions and
11028
+ * limitations under the License.
11029
+ *
11030
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11031
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
11032
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
11033
+ * */
11034
+
10375
11035
  var AviationProductApiWrapper = function AviationProductApiWrapper(_ref) {
10376
11036
  var config = _ref.config,
10377
11037
  productType = _ref.productType;
10378
- return config ? jsx(ErrorBoundary, {
10379
- children: jsx(DownloadSigmetAirmetConfigWrapper, {
11038
+ return config ? /*#__PURE__*/jsx(ErrorBoundary, {
11039
+ children: /*#__PURE__*/jsx(DownloadSigmetAirmetConfigWrapper, {
10380
11040
  productType: productType
10381
11041
  })
10382
11042
  }) : null;
10383
11043
  };
10384
11044
 
11045
+ /* *
11046
+ * Licensed under the Apache License, Version 2.0 (the "License");
11047
+ * you may not use this file except in compliance with the License.
11048
+ * You may obtain a copy of the License at
11049
+ *
11050
+ * http://www.apache.org/licenses/LICENSE-2.0
11051
+ *
11052
+ * Unless required by applicable law or agreed to in writing, software
11053
+ * distributed under the License is distributed on an "AS IS" BASIS,
11054
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11055
+ * See the License for the specific language governing permissions and
11056
+ * limitations under the License.
11057
+ *
11058
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11059
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
11060
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
11061
+ * */
11062
+
10385
11063
  var SigmetComponentsLookUp = function SigmetComponentsLookUp(payload, _ref,
10386
11064
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10387
11065
  ConnectedModuleWrapper) {
@@ -10395,7 +11073,7 @@ ConnectedModuleWrapper) {
10395
11073
  switch (componentType) {
10396
11074
  case 'SigmetModule':
10397
11075
  if (ConnectedModuleWrapper) {
10398
- return jsx(ConnectedModuleWrapper, {
11076
+ return /*#__PURE__*/jsx(ConnectedModuleWrapper, {
10399
11077
  auth: auth,
10400
11078
  component: AviationProductApiWrapper,
10401
11079
  config: config,
@@ -10404,7 +11082,7 @@ ConnectedModuleWrapper) {
10404
11082
  productType: "sigmet"
10405
11083
  });
10406
11084
  }
10407
- return jsx(AviationProductApiWrapper, {
11085
+ return /*#__PURE__*/jsx(AviationProductApiWrapper, {
10408
11086
  auth: auth,
10409
11087
  config: config,
10410
11088
  onSetAuth: onSetAuth,
@@ -10415,6 +11093,24 @@ ConnectedModuleWrapper) {
10415
11093
  }
10416
11094
  };
10417
11095
 
11096
+ /* *
11097
+ * Licensed under the Apache License, Version 2.0 (the "License");
11098
+ * you may not use this file except in compliance with the License.
11099
+ * You may obtain a copy of the License at
11100
+ *
11101
+ * http://www.apache.org/licenses/LICENSE-2.0
11102
+ *
11103
+ * Unless required by applicable law or agreed to in writing, software
11104
+ * distributed under the License is distributed on an "AS IS" BASIS,
11105
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11106
+ * See the License for the specific language governing permissions and
11107
+ * limitations under the License.
11108
+ *
11109
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
11110
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
11111
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
11112
+ * */
11113
+
10418
11114
  var AirmetComponentsLookUp = function AirmetComponentsLookUp(payload, _ref,
10419
11115
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10420
11116
  ConnectedModuleWrapper) {
@@ -10428,7 +11124,7 @@ ConnectedModuleWrapper) {
10428
11124
  switch (componentType) {
10429
11125
  case 'AirmetModule':
10430
11126
  if (ConnectedModuleWrapper) {
10431
- return jsx(ConnectedModuleWrapper, {
11127
+ return /*#__PURE__*/jsx(ConnectedModuleWrapper, {
10432
11128
  auth: auth,
10433
11129
  component: AviationProductApiWrapper,
10434
11130
  config: config,
@@ -10437,7 +11133,7 @@ ConnectedModuleWrapper) {
10437
11133
  productType: "airmet"
10438
11134
  });
10439
11135
  }
10440
- return jsx(AviationProductApiWrapper, {
11136
+ return /*#__PURE__*/jsx(AviationProductApiWrapper, {
10441
11137
  auth: auth,
10442
11138
  config: config,
10443
11139
  onSetAuth: onSetAuth,
@@ -11234,6 +11930,7 @@ var fakeAirmetList = [{
11234
11930
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
11235
11931
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
11236
11932
  * */
11933
+
11237
11934
  // TODO: [Loes Cornelis] Replace with correct strucutre and in JSON format - not js object
11238
11935
  var fakeSigmetList = [{
11239
11936
  creationDate: '2020-09-17T12:00:00Z',