@opengeoweb/taf 2.1.2 → 2.2.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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@material-ui/core'), require('@material-ui/lab'), require('moment'), require('@opengeoweb/shared'), require('@material-ui/icons'), require('@opengeoweb/api'), require('@opengeoweb/form-fields'), require('react-hook-form'), require('react-sortablejs')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', '@material-ui/core', '@material-ui/lab', 'moment', '@opengeoweb/shared', '@material-ui/icons', '@opengeoweb/api', '@opengeoweb/form-fields', 'react-hook-form', 'react-sortablejs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Taf = {}, global.React, global.core, global.lab, global.moment, global.shared, global.icons, global.api, global.formFields, global.reactHookForm, global.reactSortablejs));
5
- })(this, (function (exports, React, core, lab, moment, shared, icons, api, formFields, reactHookForm, reactSortablejs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('@mui/styles/makeStyles'), require('moment'), require('@opengeoweb/shared'), require('@mui/icons-material'), require('@opengeoweb/api'), require('@opengeoweb/form-fields'), require('react-hook-form'), require('react-sortablejs')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', '@mui/styles/makeStyles', 'moment', '@opengeoweb/shared', '@mui/icons-material', '@opengeoweb/api', '@opengeoweb/form-fields', 'react-hook-form', 'react-sortablejs'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Taf = {}, global.React, global.material, global.makeStyles, global.moment, global.shared, global.iconsMaterial, global.api, global.formFields, global.reactHookForm, global.reactSortablejs));
5
+ })(this, (function (exports, React, material, makeStyles, moment, shared, iconsMaterial, api, formFields, reactHookForm, reactSortablejs) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -26,6 +26,7 @@
26
26
 
27
27
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
28
28
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
+ var makeStyles__default = /*#__PURE__*/_interopDefaultLegacy(makeStyles);
29
30
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
30
31
 
31
32
  /*! *****************************************************************************
@@ -133,10 +134,14 @@
133
134
  return ar;
134
135
  }
135
136
 
136
- function __spreadArray(to, from) {
137
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
138
- to[j] = from[i];
139
- return to;
137
+ function __spreadArray(to, from, pack) {
138
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
139
+ if (ar || !(i in from)) {
140
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
141
+ ar[i] = from[i];
142
+ }
143
+ }
144
+ return to.concat(ar || Array.prototype.slice.call(from));
140
145
  }
141
146
 
142
147
  /* *
@@ -228,20 +233,20 @@
228
233
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
229
234
  * */
230
235
  var FORMAT_DAYS_HOURS = 'DDHH';
231
- var FORMAT_DAYS_HOURS_MINUTS = 'DDHHmm'; // formatters
236
+ var FORMAT_DAYS_HOURS_MINUTES = 'DDHHmm'; // formatters
232
237
 
233
238
  var formatValidToString = function formatValidToString(valid) {
234
239
  // Ensure end of valid period if midnight is shown as 24 and not 00
235
240
  var endHours = moment__default["default"].utc(valid.end).format('kk');
236
241
  var endDate = endHours === '24' ? moment__default["default"].utc(valid.end).add(-1, 'day').format('DD') : moment__default["default"].utc(valid.end).format('DD');
237
- return valid.end ? moment__default["default"].utc(valid.start).format(FORMAT_DAYS_HOURS) + "/" + endDate + endHours : moment__default["default"].utc(valid.start).format(FORMAT_DAYS_HOURS_MINUTS);
242
+ return valid.end ? moment__default["default"].utc(valid.start).format(FORMAT_DAYS_HOURS) + "/" + endDate + endHours : moment__default["default"].utc(valid.start).format(FORMAT_DAYS_HOURS_MINUTES);
238
243
  };
239
244
 
240
245
  var getSections = function getSections(value, format) {
241
246
  return {
242
247
  day: parseInt(value.substring(0, 2), 10),
243
248
  hour: parseInt(value.substring(2, 4), 10),
244
- min: format === FORMAT_DAYS_HOURS_MINUTS ? parseInt(value.substring(4), 10) : 0
249
+ min: format === FORMAT_DAYS_HOURS_MINUTES ? parseInt(value.substring(4), 10) : 0
245
250
  };
246
251
  };
247
252
 
@@ -271,7 +276,7 @@
271
276
  var tafStartMoment = moment__default["default"].utc(tafStart);
272
277
  var tafEndMoment = moment__default["default"].utc(tafEnd);
273
278
  var startEnd = trimmedValue.split('/');
274
- var format = trimmedValue.indexOf('/') === -1 ? FORMAT_DAYS_HOURS_MINUTS : FORMAT_DAYS_HOURS;
279
+ var format = trimmedValue.indexOf('/') === -1 ? FORMAT_DAYS_HOURS_MINUTES : FORMAT_DAYS_HOURS;
275
280
  var startSections = getSections(startEnd[0], format);
276
281
  var start = getValidityTimeStamp('start', startSections, tafStartMoment, tafEndMoment).format('YYYY-MM-DDTHH:mm:ss[Z]'); // If we only have start value - return that otherwise, also get end time
277
282
 
@@ -296,7 +301,8 @@
296
301
  var invalidValidityPeriodMessage = 'Invalid validity period, validity end time has to be after validity start time';
297
302
  var invalidValidityEndTimeMessage = 'Invalid validity end time, change group validity must lie within the TAF validity period';
298
303
  var invalidChangeValidInterFieldMessage = 'Invalid validity period, expected DDHH/DDHH for BECMG and TEMPO or DDHHmm for FM';
299
- var invalidBECMGDurationValidInterFieldMessage = 'Invalid validity period, for BECMG only validity periods with a duration of 1, 2, 3 or 4 hours are allowed'; // Validations
304
+ var invalidBECMGDurationValidInterFieldMessage = 'Invalid validity period, for BECMG only validity periods with a duration of 1, 2, 3 or 4 hours are allowed';
305
+ var invalidChangeGroupOverlapsWithFM = 'The valid time of a change group cannot overlap with the valid time of a following FM group. This change group should end before or at the hour of the start of the FM group'; // Validations
300
306
  // Ensure all individual sections are correct (DD HH mm etc)
301
307
 
302
308
  var validateValidSections = function validateValidSections(sections, isStartEnd) {
@@ -320,7 +326,7 @@
320
326
  var tafStartMoment = moment__default["default"].utc(tafStart);
321
327
  var tafEndMoment = moment__default["default"].utc(tafEnd);
322
328
  var startEnd = value.split('/');
323
- var format = value.indexOf('/') === -1 ? FORMAT_DAYS_HOURS_MINUTS : FORMAT_DAYS_HOURS;
329
+ var format = value.indexOf('/') === -1 ? FORMAT_DAYS_HOURS_MINUTES : FORMAT_DAYS_HOURS;
324
330
  var validateMsg = []; // Validate start time
325
331
 
326
332
  var startSections = getSections(startEnd[0], format); // Validate individual sections for start
@@ -398,7 +404,7 @@
398
404
  var tafStartMoment = moment__default["default"].utc(tafStart);
399
405
  var tafEndMoment = moment__default["default"].utc(tafEnd);
400
406
  var startEnd = trimmedValue.split('/');
401
- var format = trimmedValue.indexOf('/') === -1 ? FORMAT_DAYS_HOURS_MINUTS : FORMAT_DAYS_HOURS; // Validate start time
407
+ var format = trimmedValue.indexOf('/') === -1 ? FORMAT_DAYS_HOURS_MINUTES : FORMAT_DAYS_HOURS; // Validate start time
402
408
 
403
409
  var startSections = getSections(startEnd[0], format);
404
410
  var startTimestamp = getValidityTimeStamp('start', startSections, tafStartMoment, tafEndMoment);
@@ -418,17 +424,17 @@
418
424
  var invalidPreviousChangeGroupIsBeforeMessage = 'Valid time should be after previous valid time';
419
425
  var invalidPreviousChangeGroupOrderMessage = "When valid times are equal, the change/probability order should be: " + validProbChangeOrder.join(', ');
420
426
  var invalidPreviousChangeGroupHasSameValue = "When valid times are equal, probability/change can't have the same value as previous row value";
421
- var validatePreviousChangeGroup = function validatePreviousChangeGroup(currentChangeGroup, nextChangeGroup, tafStart, tafEnd) {
427
+ var validatePreviousChangeGroup = function validatePreviousChangeGroup(currentChangeGroup, previousChangeGroup, tafStart, tafEnd) {
422
428
  // extract the needed values from changeGroups
423
429
  var valid = currentChangeGroup.valid,
424
430
  _a = currentChangeGroup.change,
425
431
  change = _a === void 0 ? '' : _a,
426
432
  _b = currentChangeGroup.probability,
427
433
  probability = _b === void 0 ? '' : _b;
428
- var previousValid = nextChangeGroup.valid,
429
- _c = nextChangeGroup.change,
434
+ var previousValid = previousChangeGroup.valid,
435
+ _c = previousChangeGroup.change,
430
436
  previousChange = _c === void 0 ? '' : _c,
431
- _d = nextChangeGroup.probability,
437
+ _d = previousChangeGroup.probability,
432
438
  previousProbability = _d === void 0 ? '' : _d; // get the parsed values
433
439
 
434
440
  var validValue = parseValidToObject(valid, tafStart, tafEnd);
@@ -462,6 +468,27 @@
462
468
  }
463
469
  }
464
470
 
471
+ return true;
472
+ }; // validate overlapping validity when one of the following changegroups is FM
473
+
474
+ var validateOverlapWithFM = function validateOverlapWithFM(currentChangeGroup, nextChangeGroups, tafStart, tafEnd) {
475
+ var valid = currentChangeGroup.valid;
476
+ if (!valid || !nextChangeGroups.length) return true;
477
+ var validValue = parseValidToObject(valid, tafStart, tafEnd);
478
+ var currentRowEndTime = moment__default["default"](validValue.end);
479
+ var firstFMChangeGroup = nextChangeGroups.find(function (nextChangeGroup) {
480
+ return nextChangeGroup.change.trim() === 'FM';
481
+ });
482
+
483
+ if (firstFMChangeGroup && firstFMChangeGroup.valid) {
484
+ var FMValidValue = parseValidToObject(firstFMChangeGroup.valid, tafStart, tafEnd);
485
+ var FMStartTime = moment__default["default"](FMValidValue.start);
486
+
487
+ if (currentRowEndTime.isAfter(FMStartTime)) {
488
+ return invalidChangeGroupOverlapsWithFM;
489
+ }
490
+ }
491
+
465
492
  return true;
466
493
  };
467
494
 
@@ -1399,7 +1426,8 @@
1399
1426
  var invalidWindGustSpeedBelow15Message = 'Invalid wind gusts, gusts are only allowed for a minimum wind speed of 15 knots';
1400
1427
  var invalidGustForWindP99Message = 'Invalid wind speed and gust combination, if wind is P99, gusts can only be empty or P99';
1401
1428
  var invalidWindSpeedForDirectionZeroMessage = 'Invalid wind speed, if direction is 000, speed can only be 00';
1402
- var invalidWindSpeedForDirectionNonZeroMessage = 'Invalid wind speed, if direction is not 000, speed can not be 00'; // validations
1429
+ var invalidWindSpeedForDirectionNonZeroMessage = 'Invalid wind speed, if direction is not 000, speed can not be 00';
1430
+ var invalidWindVRBWindDirectionMessage = 'Invalid wind direction, VRB can only be used in combination with windspeeds smaller than 4 or in combination with gusts and showers'; // validations
1403
1431
 
1404
1432
  var validateDirection = function validateDirection(value) {
1405
1433
  // if not a number
@@ -1447,7 +1475,7 @@
1447
1475
  return value === 'KT' || value === '' || invalidWindMessage;
1448
1476
  };
1449
1477
 
1450
- var validateWindInterSection = function validateWindInterSection(speed, gust, direction) {
1478
+ var validateWindInterSection = function validateWindInterSection(speed, gust, direction, weather1Value, weather2Value, weather3Value) {
1451
1479
  if (direction === '000' && speed !== '00') {
1452
1480
  return invalidWindSpeedForDirectionZeroMessage;
1453
1481
  }
@@ -1456,6 +1484,19 @@
1456
1484
  return invalidWindSpeedForDirectionNonZeroMessage;
1457
1485
  }
1458
1486
 
1487
+ if (direction === 'VRB' && (speed === 'P99' || parseInt(speed, 10) > 3)) {
1488
+ // Only allow VRB for speeds smaller than 4 or in combination with gusts and showers (SH, TS, SQ)
1489
+ var allowedWeatherPhenom = ['SH', 'TS', 'SQ'];
1490
+ if (gust === '' || !allowedWeatherPhenom.some(function (allowedPhenom) {
1491
+ return weather1Value.includes(allowedPhenom);
1492
+ }) && !allowedWeatherPhenom.some(function (allowedPhenom) {
1493
+ return weather2Value.includes(allowedPhenom);
1494
+ }) && !allowedWeatherPhenom.some(function (allowedPhenom) {
1495
+ return weather3Value.includes(allowedPhenom);
1496
+ })) return invalidWindVRBWindDirectionMessage;
1497
+ } // Validate gust
1498
+
1499
+
1459
1500
  if (gust === '') {
1460
1501
  return true;
1461
1502
  }
@@ -1476,20 +1517,23 @@
1476
1517
  }; // Main validation function
1477
1518
 
1478
1519
 
1479
- var validateWindField = function validateWindField(value) {
1480
- var trimmedValue = value.trim();
1520
+ var validateWindField = function validateWindField(value, weatherfield1, weatherfield2, weatherfield3) {
1521
+ var trimmedWindValue = value.trim();
1522
+ var trimmedWeather1Value = weatherfield1.trim();
1523
+ var trimmedWeather2Value = weatherfield2.trim();
1524
+ var trimmedWeather3Value = weatherfield3.trim();
1481
1525
 
1482
- if (!trimmedValue.length) {
1526
+ if (!trimmedWindValue.length) {
1483
1527
  return true;
1484
1528
  } // Validate length and ensure it doesn't contain any other characters than numbers and VRB P KT and G
1485
1529
 
1486
1530
 
1487
- if (trimmedValue.length < 5 || trimmedValue.length > 12 || !trimmedValue.match(/^[0-9VRBPGKT]+$/)) {
1531
+ if (trimmedWindValue.length < 5 || trimmedWindValue.length > 12 || !trimmedWindValue.match(/^[0-9VRBPGKT]+$/)) {
1488
1532
  return invalidWindMessage;
1489
1533
  } // First validate individual sections
1490
1534
 
1491
1535
 
1492
- var windValidationIndv = extractValidateWindSections(trimmedValue, true);
1536
+ var windValidationIndv = extractValidateWindSections(trimmedWindValue, true);
1493
1537
 
1494
1538
  if (windValidationIndv.validations.length !== 0) {
1495
1539
  return windValidationIndv.validations.find(function (error) {
@@ -1498,7 +1542,7 @@
1498
1542
  } // Then do any intersection validation
1499
1543
 
1500
1544
 
1501
- return validateWindInterSection(windValidationIndv.speed, windValidationIndv.gust, windValidationIndv.direction);
1545
+ return validateWindInterSection(windValidationIndv.speed, windValidationIndv.gust, windValidationIndv.direction, trimmedWeather1Value, trimmedWeather2Value, trimmedWeather3Value);
1502
1546
  };
1503
1547
 
1504
1548
  var formatSingleCloud = function formatSingleCloud(value) {
@@ -1547,10 +1591,10 @@
1547
1591
  var parseSingleCloud = function parseSingleCloud(value) {
1548
1592
  if (!value) return null;
1549
1593
  var trimmedCloud = value.trim();
1550
- var cloudType = trimmedCloud.substr(6, 3);
1594
+ var cloudType = trimmedCloud.substring(6, 9);
1551
1595
  return __assign({
1552
- coverage: trimmedCloud.substr(0, 3),
1553
- height: parseInt(trimmedCloud.substr(3, 3), 10)
1596
+ coverage: trimmedCloud.substring(0, 3),
1597
+ height: parseInt(trimmedCloud.substring(3, 6), 10)
1554
1598
  }, cloudType && {
1555
1599
  type: cloudType
1556
1600
  });
@@ -1568,20 +1612,22 @@
1568
1612
  switch (key) {
1569
1613
  case 'cloud1':
1570
1614
  {
1571
- if (isVerticalVisibility(clouds[key])) {
1615
+ var trimmedValue = clouds[key].trim();
1616
+
1617
+ if (isVerticalVisibility(trimmedValue)) {
1572
1618
  // Parse Vertical Visibility
1573
1619
  return __assign(__assign({}, list), (_a = {}, _a[key] = {
1574
- verticalVisibility: parseInt(clouds[key].substr(2, 3), 10)
1620
+ verticalVisibility: parseInt(trimmedValue.substring(2, 5), 10)
1575
1621
  }, _a));
1576
1622
  }
1577
1623
 
1578
- if (clouds[key] === 'NSC') {
1624
+ if (trimmedValue === 'NSC') {
1579
1625
  // Parse No Significant Clouds
1580
- return __assign(__assign({}, list), (_b = {}, _b[key] = clouds[key], _b));
1626
+ return __assign(__assign({}, list), (_b = {}, _b[key] = trimmedValue, _b));
1581
1627
  } // Parse Cloud
1582
1628
 
1583
1629
 
1584
- return __assign(__assign({}, list), (_c = {}, _c[key] = parseSingleCloud(clouds[key]), _c));
1630
+ return __assign(__assign({}, list), (_c = {}, _c[key] = parseSingleCloud(trimmedValue), _c));
1585
1631
  }
1586
1632
 
1587
1633
  default:
@@ -1609,16 +1655,19 @@
1609
1655
  var invalidCloudHeightStepsMessage = 'Invalid cloud height, a height above 050 must be rounded to the nearest 1000ft';
1610
1656
  var invalidCLoudTypeMessage = 'Invalid cloud type, expected CB or TCU';
1611
1657
  var invalidHeightTypeCombinationMessage = 'Invalid cloud input, when cloud height is 050 or higher, CB or TCU is required';
1612
- var invalidVerticalVisibilityMessage = 'Invalid vertical visibility, expected VV<value> with value consisting of 3 digits between 000 and 010';
1658
+ var invalidVerticalVisibilityMessage = 'Invalid vertical visibility, expected VV<value> with value consisting of 3 digits';
1659
+ var invalidVerticalVisibilityHeightMessage = 'Invalid vertical visibility, visibility should lie between 001 and 010';
1660
+ var invalidVerticalVisibilityHeightFGMessage = 'Invalid vertical visibility, in case of fog visibility should lie between 001 and 005';
1613
1661
  var invalidCloudHeightComparedToPreviousMessage = 'Invalid cloud height, height must be greater than previous cloud group height';
1614
- var invalidCloud2CoverageTypeCombinationMessage = 'Invalid cloud input, cloud type is required when coverage is FEW';
1662
+ var invalidCloud2CoverageTypeCombinationMessage = 'Invalid cloud input, for the second cloud group (excluding any significant convective cloud groups with CB/TCU) a coverage of FEW is not allowed';
1615
1663
  var invalidCloud2WithVerticalVisibilityMessage = 'Invalid cloud input, cloud type is required when Vertical Visibility is given';
1616
- var invalidCloud3CoverageTypeCombinationMessage = 'Invalid cloud input, cloud type is required when coverage is FEW or SCT';
1664
+ var invalidCloud3CoverageTypeCombinationMessage = 'Invalid cloud input, for the third cloud group (excluding any significant convective cloud groups with CB/TCU) a coverage of FEW or SCT is not allowed';
1617
1665
  var invalidCloudWithVerticalVisibilityMessage = 'Invalid cloud input, third or fourth cloud group is not allowed when Vertical Visibility is given';
1618
1666
  var invalidCloudWithPreviousEmptyCloud = 'Invalid cloud input, value is not allowed when previous cloud group is empty';
1619
1667
  var invalidCloudWithNSCMessage = 'Invalid cloud input, other cloud groups are not allowed when No Significant Clouds is given';
1620
- var invalidCloud4WithPreviousType = 'Invalid cloud input, value is not allowed when previous cloud group has a type';
1621
- var invalidCloudCAVOKMessage = 'Invalid cloud input, when CAVOK is used, cloud groups must be empty'; // validations
1668
+ var invalidCloudWithPreviousType = 'Invalid cloud input, only one significant convective cloud group with CB/TCU is allowed';
1669
+ var invalidCloudCAVOKMessage = 'Invalid cloud input, when CAVOK is used, cloud groups must be empty';
1670
+ var invalidCloud4TypeMissingMessage = 'Invalid cloud input for fourth group, CB or TCU required if no other significant convective cloud group present'; // validations
1622
1671
 
1623
1672
  var isLengthValid = function isLengthValid(value) {
1624
1673
  var onlyDigitsOrSpecificLetters = RegExp(/^[0-9FEWSCTBKNOVU]+$/);
@@ -1665,25 +1714,32 @@
1665
1714
  };
1666
1715
 
1667
1716
  var isVerticalVisibility = function isVerticalVisibility(value) {
1668
- return value.substr(0, 2) === 'VV';
1717
+ return value.substring(0, 2) === 'VV';
1669
1718
  };
1670
1719
 
1671
- var isVerticalVisibilityValid = function isVerticalVisibilityValid(value) {
1720
+ var isVerticalVisibilityValid = function isVerticalVisibilityValid(value, weather1, weather2, weather3) {
1672
1721
  // validate if its a number
1673
1722
  if (!value.match(/^[0-9]+$/)) {
1674
- return false;
1723
+ return invalidVerticalVisibilityMessage;
1675
1724
  } // check if its 3 digits
1676
1725
 
1677
1726
 
1678
1727
  if (value.length !== 3) {
1679
- return false;
1680
- } // value should not be above 10
1681
-
1728
+ return invalidVerticalVisibilityMessage;
1729
+ }
1682
1730
 
1683
1731
  var intValue = parseInt(value, 10);
1684
1732
 
1685
- if (intValue > 10) {
1686
- return false;
1733
+ if (weather1 !== 'FG' && weather2 !== 'FG' && weather3 !== 'FG') {
1734
+ // value should not be above 10
1735
+ if (intValue < 1 || intValue > 10) {
1736
+ return invalidVerticalVisibilityHeightMessage;
1737
+ }
1738
+ } else if (intValue < 1 || intValue > 5) {
1739
+ // Apply Dutch rule as national exception
1740
+ // In case of fog (FG) the vertical visibility can only be between VV001 up to and including VV005
1741
+ // HEIGHT_VV is: (001-(1)-005). Deze maxima zijn officiële Nederlandse afwijkingen van de WMO/ICAO regelgeving
1742
+ return invalidVerticalVisibilityHeightFGMessage;
1687
1743
  }
1688
1744
 
1689
1745
  return true;
@@ -1700,14 +1756,14 @@
1700
1756
  } // Validate coverage
1701
1757
 
1702
1758
 
1703
- var coverage = value.substr(0, 3);
1759
+ var coverage = value.substring(0, 3);
1704
1760
 
1705
1761
  if (!isCoverageValid(coverage)) {
1706
1762
  errorMessages.push(invalidCloudCoverageMessage);
1707
1763
  } // Validate height
1708
1764
 
1709
1765
 
1710
- var height = value.substr(3, 3);
1766
+ var height = value.substring(3, 6);
1711
1767
  var isValidHeight = isHeightValid(height);
1712
1768
 
1713
1769
  if (isValidHeight !== true) {
@@ -1716,7 +1772,7 @@
1716
1772
  } // Validate type
1717
1773
 
1718
1774
 
1719
- var type = value.substr(6, 3);
1775
+ var type = value.substring(6, 9);
1720
1776
 
1721
1777
  if (!isTypeValid(type)) {
1722
1778
  errorMessages.push(invalidCLoudTypeMessage);
@@ -1735,56 +1791,66 @@
1735
1791
  };
1736
1792
  };
1737
1793
 
1738
- var validateFirstCloud = function validateFirstCloud(value, visibilityValue) {
1739
- var trimmedValue = value.trim(); // Field can be left empty
1794
+ var validateFirstCloud = function validateFirstCloud(value, visibilityValue, weatherfield1, weatherfield2, weatherfield3) {
1795
+ var trimmedValueFirstCloud = value.trim();
1796
+ var trimmedValueVisibility = visibilityValue.trim();
1797
+ var trimmedWeather1Value = weatherfield1.trim();
1798
+ var trimmedWeather2Value = weatherfield2.trim();
1799
+ var trimmedWeather3Value = weatherfield3.trim(); // Field can be left empty
1740
1800
 
1741
- if (!trimmedValue.length) {
1801
+ if (!trimmedValueFirstCloud.length) {
1742
1802
  return true;
1743
1803
  }
1744
1804
 
1745
- if (trimmedValue && visibilityValue === 'CAVOK') {
1805
+ if (trimmedValueFirstCloud && trimmedValueVisibility === 'CAVOK') {
1746
1806
  return invalidCloudCAVOKMessage;
1747
1807
  } // Check for No Signicant Clouds
1748
1808
 
1749
1809
 
1750
- if (trimmedValue === 'NSC') {
1810
+ if (trimmedValueFirstCloud === 'NSC') {
1751
1811
  return true;
1752
1812
  } // Validate Vertical Visibility
1753
1813
 
1754
1814
 
1755
- if (isVerticalVisibility(trimmedValue)) {
1815
+ if (isVerticalVisibility(trimmedValueFirstCloud)) {
1756
1816
  if ( // Validate length of 5
1757
- trimmedValue.length !== 5 || // Ensure it only contains digits or VV
1758
- !trimmedValue.match(/^[0-9V]+$/)) {
1759
- return invalidVerticalVisibilityMessage;
1760
- }
1761
-
1762
- var verticalVisibilityValue = trimmedValue.substr(2, 3);
1763
-
1764
- if (!isVerticalVisibilityValid(verticalVisibilityValue)) {
1817
+ trimmedValueFirstCloud.length !== 5 || // Ensure it only contains digits or VV
1818
+ !trimmedValueFirstCloud.match(/^[0-9V]+$/)) {
1765
1819
  return invalidVerticalVisibilityMessage;
1766
1820
  }
1767
1821
 
1768
- return true;
1822
+ var verticalVisibilityValue = trimmedValueFirstCloud.substring(2, 5);
1823
+ return isVerticalVisibilityValid(verticalVisibilityValue, trimmedWeather1Value, trimmedWeather2Value, trimmedWeather3Value);
1769
1824
  }
1770
1825
 
1771
1826
  var errorMessages = sharedCloudValidations({
1772
- value: trimmedValue,
1827
+ value: trimmedValueFirstCloud,
1773
1828
  canBeNSC: true
1774
1829
  }).errorMessages; // Return first error if any
1775
1830
 
1776
1831
  return errorMessages.length ? errorMessages[0] : true;
1777
1832
  };
1778
1833
  var validateSecondCloud = function validateSecondCloud(firstCloudValue, secondCloudValue, visibilityValue) {
1779
- var trimmedValue = secondCloudValue.trim(); // Field can be left empty
1834
+ var trimmedValueFirstCloud = firstCloudValue.trim();
1835
+ var trimmedValueSecondCloud = secondCloudValue.trim(); // Field can be left empty
1780
1836
 
1781
- if (!trimmedValue.length) {
1837
+ if (!trimmedValueSecondCloud.length) {
1782
1838
  return true;
1839
+ } // If Cloud1 is NSC, Cloud2 has to be empty
1840
+
1841
+
1842
+ if (trimmedValueFirstCloud === 'NSC' && trimmedValueSecondCloud !== '') {
1843
+ return invalidCloudWithNSCMessage;
1844
+ } // If Cloud1 is empty Cloud2 should be empty
1845
+
1846
+
1847
+ if (trimmedValueFirstCloud === '') {
1848
+ return invalidCloudWithPreviousEmptyCloud;
1783
1849
  } // Generic validations
1784
1850
 
1785
1851
 
1786
1852
  var _a = sharedCloudValidations({
1787
- value: trimmedValue
1853
+ value: trimmedValueSecondCloud
1788
1854
  }),
1789
1855
  coverage = _a.coverage,
1790
1856
  height = _a.height,
@@ -1794,32 +1860,32 @@
1794
1860
 
1795
1861
  if (errorMessages.length) {
1796
1862
  return errorMessages[0];
1797
- } // Cloud2 specific validations
1798
- // Without type, coverage can not be FEW
1863
+ } // Cloud2 specific validations - only to be applied when cloud1 does not contain type CB/TCU
1799
1864
 
1800
1865
 
1801
- if (type === '' && coverage === 'FEW') {
1802
- return invalidCloud2CoverageTypeCombinationMessage;
1866
+ var typeCloud1 = trimmedValueFirstCloud.substring(6, 9);
1867
+
1868
+ if (typeCloud1 !== 'CB' && typeCloud1 !== 'TCU') {
1869
+ // Without a type specified in cloud group 1, this group counts as #2 and coverage can not be FEW
1870
+ if (type === '' && coverage === 'FEW') {
1871
+ return invalidCloud2CoverageTypeCombinationMessage;
1872
+ }
1803
1873
  } // If Cloud1 is not valid, skip further validation of Cloud2
1874
+ // No need to pass the weatherfields as their content does not influence what happens below
1804
1875
 
1805
1876
 
1806
- if (validateFirstCloud(firstCloudValue, visibilityValue) !== true) {
1877
+ if (validateFirstCloud(trimmedValueFirstCloud, visibilityValue, '', '', '') !== true) {
1807
1878
  return true;
1808
- } // If Cloud1 is NSC, Cloud2 has to be empty
1809
-
1810
-
1811
- if (firstCloudValue === 'NSC' && trimmedValue !== '') {
1812
- return invalidCloudWithNSCMessage;
1813
- } // If Cloud1 is empty Cloud2 should be empty
1879
+ } // If Cloud1 contains a type, Cloud2 cannot contain a type
1814
1880
 
1815
1881
 
1816
- if (firstCloudValue === '') {
1817
- return invalidCloudWithPreviousEmptyCloud;
1882
+ if (type !== '' && typeCloud1 !== '') {
1883
+ return invalidCloudWithPreviousType;
1818
1884
  } // Cloud2 height has to be greater than Cloud1 height
1819
1885
 
1820
1886
 
1821
- if (!isVerticalVisibility(firstCloudValue)) {
1822
- var cloud1Height = firstCloudValue.substr(3, 3);
1887
+ if (!isVerticalVisibility(trimmedValueFirstCloud)) {
1888
+ var cloud1Height = trimmedValueFirstCloud.substring(3, 6);
1823
1889
 
1824
1890
  if (height <= cloud1Height) {
1825
1891
  return invalidCloudHeightComparedToPreviousMessage;
@@ -1827,22 +1893,34 @@
1827
1893
  } // If Cloud1 contains Vertical Visibility then Cloud2 type is required
1828
1894
 
1829
1895
 
1830
- if (isVerticalVisibility(firstCloudValue) && type === '') {
1896
+ if (isVerticalVisibility(trimmedValueFirstCloud) && type === '') {
1831
1897
  return invalidCloud2WithVerticalVisibilityMessage;
1832
1898
  }
1833
1899
 
1834
1900
  return true;
1835
1901
  };
1836
1902
  var validateThirdCloud = function validateThirdCloud(firstCloudValue, secondCloudValue, thirdCloudValue, visibilityValue) {
1837
- var trimmedValue = thirdCloudValue.trim(); // Field can be left empty
1903
+ var trimmedValueFirstCloud = firstCloudValue.trim();
1904
+ var trimmedValueSecondCloud = secondCloudValue.trim();
1905
+ var trimmedValueThirdCloud = thirdCloudValue.trim(); // Field can be left empty
1838
1906
 
1839
- if (!trimmedValue.length) {
1907
+ if (!trimmedValueThirdCloud.length) {
1840
1908
  return true;
1909
+ } // If Cloud1 is NSC, Cloud3 has to be empty
1910
+
1911
+
1912
+ if (trimmedValueFirstCloud === 'NSC' && trimmedValueThirdCloud !== '') {
1913
+ return invalidCloudWithNSCMessage;
1914
+ } // If Cloud1 or Cloud2 is empty Cloud3 should be empty
1915
+
1916
+
1917
+ if (trimmedValueFirstCloud === '' || trimmedValueSecondCloud === '') {
1918
+ return invalidCloudWithPreviousEmptyCloud;
1841
1919
  } // Generic validations
1842
1920
 
1843
1921
 
1844
1922
  var _a = sharedCloudValidations({
1845
- value: trimmedValue
1923
+ value: trimmedValueThirdCloud
1846
1924
  }),
1847
1925
  coverage = _a.coverage,
1848
1926
  height = _a.height,
@@ -1853,45 +1931,45 @@
1853
1931
  if (errorMessages.length) {
1854
1932
  return errorMessages[0];
1855
1933
  } // Cloud3 specific validations
1856
- // Without type, coverage can not be FEW or SCT
1934
+ // Without a type specified in cloud group 1 or 2, this group counts as #3 and coverage can not be FEW or SCT
1857
1935
 
1858
1936
 
1859
- if (type === '' && (coverage === 'FEW' || coverage === 'SCT')) {
1860
- return invalidCloud3CoverageTypeCombinationMessage;
1937
+ var typeCloud1 = trimmedValueFirstCloud.substring(6, 9);
1938
+ var typeCloud2 = trimmedValueSecondCloud.substring(6, 9);
1939
+
1940
+ if (typeCloud1 !== 'CB' && typeCloud1 !== 'TCU' && typeCloud2 !== 'CB' && typeCloud2 !== 'TCU') {
1941
+ if (type === '' && (coverage === 'FEW' || coverage === 'SCT')) {
1942
+ return invalidCloud3CoverageTypeCombinationMessage;
1943
+ }
1944
+ } else if (type === '' && coverage === 'FEW') {
1945
+ // In case we do have a CB/TCU group in one of the previous clouf groups. This cloudgroup should be evaluated as if it was the second group
1946
+ return invalidCloud2CoverageTypeCombinationMessage;
1861
1947
  } // If Cloud1 is not valid, skip further validation of Cloud3
1948
+ // No need to pass the weatherfields as their content does not influence what happens below
1949
+ // Since in case of VV the third field should be empty anyways
1862
1950
 
1863
1951
 
1864
- if (validateFirstCloud(firstCloudValue, visibilityValue) !== true) {
1952
+ if (validateFirstCloud(trimmedValueFirstCloud, visibilityValue, '', '', '') !== true) {
1865
1953
  return true;
1866
- } // If Cloud1 is empty Cloud3 should be empty
1867
-
1868
-
1869
- if (firstCloudValue === '') {
1870
- return invalidCloudWithPreviousEmptyCloud;
1871
1954
  } // If Cloud1 contains Vertical Visibility then Cloud3 should be empty
1872
1955
 
1873
1956
 
1874
- if (isVerticalVisibility(firstCloudValue)) {
1957
+ if (isVerticalVisibility(trimmedValueFirstCloud)) {
1875
1958
  return invalidCloudWithVerticalVisibilityMessage;
1876
- } // If Cloud1 is NSC, Cloud3 has to be empty
1877
-
1878
-
1879
- if (firstCloudValue === 'NSC' && trimmedValue !== '') {
1880
- return invalidCloudWithNSCMessage;
1881
1959
  } // If Cloud2 is not valid, skip further validation of Cloud3
1882
1960
 
1883
1961
 
1884
- if (validateSecondCloud(firstCloudValue, secondCloudValue, visibilityValue) !== true) {
1962
+ if (validateSecondCloud(trimmedValueFirstCloud, trimmedValueSecondCloud, visibilityValue) !== true) {
1885
1963
  return true;
1886
- } // If Cloud2 is empty Cloud3 should be empty
1964
+ } // If one of the previous groups contains a type, Cloud3 cannot contain a type
1887
1965
 
1888
1966
 
1889
- if (secondCloudValue === '') {
1890
- return invalidCloudWithPreviousEmptyCloud;
1967
+ if (type !== '' && (typeCloud1 !== '' || typeCloud2 !== '')) {
1968
+ return invalidCloudWithPreviousType;
1891
1969
  } // Cloud3 height has to be greater than Cloud2 height
1892
1970
 
1893
1971
 
1894
- var cloud2Height = secondCloudValue.substr(3, 3);
1972
+ var cloud2Height = trimmedValueSecondCloud.substring(3, 6);
1895
1973
 
1896
1974
  if (height <= cloud2Height) {
1897
1975
  return invalidCloudHeightComparedToPreviousMessage;
@@ -1900,17 +1978,31 @@
1900
1978
  return true;
1901
1979
  };
1902
1980
  var validateFourthCloud = function validateFourthCloud(firstCloudValue, secondCloudValue, thirdCloudValue, fourthCloudValue, visibilityValue) {
1903
- var trimmedValue = fourthCloudValue.trim(); // Field can be left empty
1981
+ var trimmedValueFirstCloud = firstCloudValue.trim();
1982
+ var trimmedValueSecondCloud = secondCloudValue.trim();
1983
+ var trimmedValueThirdCloud = thirdCloudValue.trim();
1984
+ var trimmedValueFourthCloud = fourthCloudValue.trim(); // Field can be left empty
1904
1985
 
1905
- if (!trimmedValue.length) {
1986
+ if (!trimmedValueFourthCloud.length) {
1906
1987
  return true;
1988
+ } // If Cloud1 is NSC, Cloud4 has to be empty
1989
+
1990
+
1991
+ if (trimmedValueFirstCloud === 'NSC' && trimmedValueFourthCloud !== '') {
1992
+ return invalidCloudWithNSCMessage;
1993
+ } // If Cloud 1, 2 or 3 is empty Cloud4 should be empty
1994
+
1995
+
1996
+ if (trimmedValueFirstCloud === '' || trimmedValueSecondCloud === '' || trimmedValueThirdCloud === '') {
1997
+ return invalidCloudWithPreviousEmptyCloud;
1907
1998
  } // Generic validations
1908
1999
 
1909
2000
 
1910
2001
  var _a = sharedCloudValidations({
1911
- value: trimmedValue
2002
+ value: trimmedValueFourthCloud
1912
2003
  }),
1913
2004
  height = _a.height,
2005
+ coverage = _a.coverage,
1914
2006
  type = _a.type,
1915
2007
  errorMessages = _a.errorMessages; // Return generic errors if any
1916
2008
 
@@ -1918,50 +2010,48 @@
1918
2010
  if (errorMessages.length) {
1919
2011
  return errorMessages[0];
1920
2012
  } // Cloud4 specific validations
1921
- // Type is required
2013
+ // If none of the previous cloud groups contains a type, the fourth group must contain a type if not empty
2014
+
1922
2015
 
2016
+ var typeCloud1 = trimmedValueFirstCloud.substring(6, 9);
2017
+ var typeCloud2 = trimmedValueSecondCloud.substring(6, 9);
2018
+ var typeCloud3 = trimmedValueThirdCloud.substring(6, 9);
1923
2019
 
1924
- if (type === '') {
1925
- return invalidCLoudTypeMessage;
2020
+ if (typeCloud1 !== 'CB' && typeCloud1 !== 'TCU' && typeCloud2 !== 'CB' && typeCloud2 !== 'TCU' && typeCloud3 !== 'CB' && typeCloud3 !== 'TCU') {
2021
+ if (type === '') {
2022
+ return invalidCloud4TypeMissingMessage;
2023
+ }
2024
+ } else if (coverage === 'FEW' || coverage === 'SCT') {
2025
+ // We have a CB/TCU group in one of the previous cloud groups. This group should be evaluated as if it was the third group
2026
+ return invalidCloud3CoverageTypeCombinationMessage;
1926
2027
  } // If Cloud1 is not valid, skip further validation of Cloud4
2028
+ // No need to pass the weatherfields as their content does not influence what happens below
2029
+ // Since in case of VV the fourth field should be empty anyways
1927
2030
 
1928
2031
 
1929
- if (validateFirstCloud(firstCloudValue, visibilityValue) !== true) {
2032
+ if (validateFirstCloud(trimmedValueFirstCloud, visibilityValue, '', '', '') !== true) {
1930
2033
  return true;
1931
2034
  } // If Cloud1 contains Vertical Visibility then Cloud4 should be empty
1932
2035
 
1933
2036
 
1934
- if (isVerticalVisibility(firstCloudValue)) {
2037
+ if (isVerticalVisibility(trimmedValueFirstCloud)) {
1935
2038
  return invalidCloudWithVerticalVisibilityMessage;
1936
- } // If Cloud1 is NSC, Cloud4 has to be empty
1937
-
1938
-
1939
- if (firstCloudValue === 'NSC' && trimmedValue !== '') {
1940
- return invalidCloudWithNSCMessage;
1941
- } // If Cloud 1, 2 or 3 is empty Cloud4 should be empty
1942
-
1943
-
1944
- if (firstCloudValue === '' || secondCloudValue === '' || thirdCloudValue === '') {
1945
- return invalidCloudWithPreviousEmptyCloud;
1946
2039
  } // If Cloud3 is not valid, skip further validation of Cloud4
1947
2040
 
1948
2041
 
1949
- if (validateThirdCloud(firstCloudValue, secondCloudValue, thirdCloudValue, visibilityValue) !== true) {
2042
+ if (validateThirdCloud(trimmedValueFirstCloud, trimmedValueSecondCloud, trimmedValueThirdCloud, visibilityValue) !== true) {
1950
2043
  return true;
1951
- } // If Cloud3 contains a type, Cloud4 should be empty
2044
+ } // If one of the previous groups contains a type, Cloud4 cannot contain a type
1952
2045
 
1953
2046
 
1954
- var cloud3Type = thirdCloudValue.substr(6, 3);
1955
-
1956
- if (cloud3Type !== '') {
1957
- return invalidCloud4WithPreviousType;
2047
+ if (type !== '' && (typeCloud1 !== '' || typeCloud2 !== '' || typeCloud3 !== '')) {
2048
+ return invalidCloudWithPreviousType;
1958
2049
  } // Cloud4 height has to be greater than Cloud3 height
1959
2050
 
1960
2051
 
1961
- var cloud3Height = thirdCloudValue.substr(3, 3);
2052
+ var cloud3Height = trimmedValueThirdCloud.substring(3, 6);
1962
2053
 
1963
2054
  if (height <= cloud3Height) {
1964
- // Because of the type validations this is automatically enforced for Cloud4, so impossible to end up here but leaving the check in just in case
1965
2055
  return invalidCloudHeightComparedToPreviousMessage;
1966
2056
  }
1967
2057
 
@@ -2404,34 +2494,28 @@
2404
2494
  }
2405
2495
  };
2406
2496
 
2407
- /* *
2408
- * Licensed under the Apache License, Version 2.0 (the "License");
2409
- * you may not use this file except in compliance with the License.
2410
- * You may obtain a copy of the License at
2411
- *
2412
- * http://www.apache.org/licenses/LICENSE-2.0
2413
- *
2414
- * Unless required by applicable law or agreed to in writing, software
2415
- * distributed under the License is distributed on an "AS IS" BASIS,
2416
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2417
- * See the License for the specific language governing permissions and
2418
- * limitations under the License.
2419
- *
2420
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2421
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2422
- * */
2423
- var useStyles$9 = core.makeStyles(function (theme) {
2497
+ var useStyles$9 = makeStyles__default["default"](function (theme) {
2424
2498
  return {
2425
2499
  textFieldGridItem: {
2426
2500
  marginRight: 4
2427
2501
  },
2502
+ textFieldRoot: {
2503
+ '&.Mui-disabled::before': {
2504
+ borderBottom: 'none'
2505
+ },
2506
+ '&:after': {
2507
+ borderBottomColor: '#3f51b5'
2508
+ }
2509
+ },
2428
2510
  textFieldInput: {
2429
2511
  fontSize: '14px',
2430
2512
  paddingLeft: 1,
2431
2513
  paddingRight: 1,
2432
2514
  color: '#051039',
2433
- WebkitTextFillColor: '#051039' // safari text color fix
2434
-
2515
+ WebkitTextFillColor: '#051039',
2516
+ '&.Mui-disabled': {
2517
+ backgroundColor: 'white'
2518
+ }
2435
2519
  },
2436
2520
  textFieldLabel: {
2437
2521
  fontSize: '14px'
@@ -2509,12 +2593,13 @@
2509
2593
  };
2510
2594
  var BaseTextField = /*#__PURE__*/React__default["default"].memo(function (props) {
2511
2595
  var classes = useStyles$9();
2512
- return /*#__PURE__*/React__default["default"].createElement(core.TextField, __assign({
2596
+ return /*#__PURE__*/React__default["default"].createElement(material.TextField, __assign({
2513
2597
  type: "text",
2514
2598
  variant: "filled",
2515
2599
  InputProps: {
2516
2600
  classes: {
2517
- input: classes.textFieldInput
2601
+ input: classes.textFieldInput,
2602
+ root: classes.textFieldRoot
2518
2603
  }
2519
2604
  },
2520
2605
  InputLabelProps: {
@@ -2603,7 +2688,7 @@
2603
2688
  inputRef.current.disabled = false;
2604
2689
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
2605
2690
  }, []);
2606
- return /*#__PURE__*/React__default["default"].createElement(core.Grid, {
2691
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2607
2692
  item: true,
2608
2693
  xs: true,
2609
2694
  className: classes.textFieldGridItem
@@ -2806,20 +2891,44 @@
2806
2891
  return true;
2807
2892
  }, [index, isChangeGroup, getValues]);
2808
2893
 
2809
- var getFieldFromNextRow = function getFieldFromNextRow(fieldname) {
2810
- if (fieldname === void 0) {
2811
- fieldname = 'valid';
2894
+ var getFieldFromRow = function getFieldFromRow(fieldname, rowIndex) {
2895
+ var indexedFieldName = "changeGroups[" + rowIndex + "]." + fieldname;
2896
+ var rowValue = getValues(indexedFieldName);
2897
+ return rowValue ? [indexedFieldName] : [];
2898
+ };
2899
+
2900
+ var getValidFieldFromNextRow = function getValidFieldFromNextRow() {
2901
+ return getFieldFromRow('valid', index + 1);
2902
+ };
2903
+
2904
+ var validateNextRows = React__default["default"].useCallback(function () {
2905
+ if (isChangeGroup) {
2906
+ var _a = getValues(),
2907
+ validDateEnd = _a.validDateEnd,
2908
+ validDateStart = _a.validDateStart,
2909
+ changeGroups = _a.changeGroups;
2910
+
2911
+ var currentChangeGroup = changeGroups[index];
2912
+ var nextChangeGroups = changeGroups.slice(index + 1);
2913
+ return validateOverlapWithFM(currentChangeGroup, nextChangeGroups, validDateStart, validDateEnd);
2812
2914
  }
2813
2915
 
2814
- var nextValidFieldName = "changeGroups[" + (index + 1) + "]." + fieldname;
2815
- var nextRowValidValue = getValues(nextValidFieldName);
2816
- return nextRowValidValue ? [nextValidFieldName] : [];
2916
+ return true;
2917
+ }, [index, isChangeGroup, getValues]);
2918
+
2919
+ var getPreviousValidFields = function getPreviousValidFields(rowIndex) {
2920
+ var changeGroups = getValues().changeGroups;
2921
+ var previousChangeGroups = changeGroups.slice(0, rowIndex);
2922
+ var validFields = previousChangeGroups.map(function (_element, index) {
2923
+ return getFieldFromRow('valid', index)[0];
2924
+ });
2925
+ return validFields;
2817
2926
  };
2818
2927
 
2819
2928
  var addChangeGroup = React__default["default"].useCallback(function () {
2820
2929
  onAddChangeGroup(index);
2821
2930
  }, [onAddChangeGroup, index]);
2822
- return /*#__PURE__*/React__default["default"].createElement(core.Grid, __assign({
2931
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, __assign({
2823
2932
  "data-testid": "row-" + namePrefix,
2824
2933
  container: true,
2825
2934
  ref: ref
@@ -2836,7 +2945,7 @@
2836
2945
  label: "Issue time",
2837
2946
  name: "issueDate",
2838
2947
  disabled: true
2839
- })), isChangeGroup && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
2948
+ })), isChangeGroup && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2840
2949
  item: true,
2841
2950
  xs: true,
2842
2951
  style: {
@@ -2862,7 +2971,7 @@
2862
2971
  }],
2863
2972
  onBlur: function onBlur() {
2864
2973
  if (isChangeGroup) {
2865
- var nextValidFieldName = getFieldFromNextRow();
2974
+ var nextValidFieldName = getValidFieldFromNextRow();
2866
2975
  trigger(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(subFields)), __read(mainOptionalFields)), __read(mainFields)), __read(nextValidFieldName)));
2867
2976
  }
2868
2977
  }
@@ -2892,8 +3001,9 @@
2892
3001
  }],
2893
3002
  onBlur: function onBlur() {
2894
3003
  if (isChangeGroup) {
2895
- var nextValidFieldName = getFieldFromNextRow();
2896
- trigger(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(subFields)), __read(mainOptionalFields)), __read(mainFields)), __read(nextValidFieldName)));
3004
+ var nextValidFieldName = getValidFieldFromNextRow();
3005
+ var previousValidFieldNames = getPreviousValidFields(index);
3006
+ trigger(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(subFields)), __read(mainOptionalFields)), __read(mainFields)), __read(nextValidFieldName)), __read(previousValidFieldNames)));
2897
3007
  }
2898
3008
  }
2899
3009
  })), /*#__PURE__*/React__default["default"].createElement(TafFormTextField, {
@@ -2911,13 +3021,15 @@
2911
3021
  validateValidChangeGroupInterField: function validateValidChangeGroupInterField$1(value) {
2912
3022
  return isChangeGroup ? validateValidChangeGroupInterField(value, getValues(fieldNames.change), getValues('validDateStart'), getValues('validDateEnd')) : true;
2913
3023
  },
2914
- validatePreviousRow: validatePreviousRow
3024
+ validatePreviousRow: validatePreviousRow,
3025
+ validateNextRows: validateNextRows
2915
3026
  }
2916
3027
  },
2917
3028
  onBlur: function onBlur() {
2918
3029
  if (isChangeGroup) {
2919
- var nextValidFieldName = getFieldFromNextRow();
2920
- trigger(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(subFields)), __read(mainOptionalFields)), __read(mainFields)), __read(nextValidFieldName)));
3030
+ var nextValidFieldName = getValidFieldFromNextRow();
3031
+ var previousValidFieldNames = getPreviousValidFields(index);
3032
+ trigger(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(subFields)), __read(mainOptionalFields)), __read(mainFields)), __read(nextValidFieldName)), __read(previousValidFieldNames)));
2921
3033
  }
2922
3034
  }
2923
3035
  }), /*#__PURE__*/React__default["default"].createElement(TafFormTextField, {
@@ -2931,7 +3043,9 @@
2931
3043
  return _validateRequiredMainFields(value, 'Wind');
2932
3044
  },
2933
3045
  validateRequiredSub: validateRequiredSub,
2934
- validateWindField: validateWindField
3046
+ validateWindField: function validateWindField$1(value) {
3047
+ return validateWindField(value, getValues(fieldNames.weather1), getValues(fieldNames.weather2), getValues(fieldNames.weather3));
3048
+ }
2935
3049
  }
2936
3050
  },
2937
3051
  onBlur: function onBlur() {
@@ -2980,7 +3094,7 @@
2980
3094
  },
2981
3095
  onBlur: function onBlur() {
2982
3096
  var fields = isChangeGroup ? __spreadArray(__spreadArray([], __read(subFields)), __read(mainFields)) : [];
2983
- return trigger(__spreadArray(__spreadArray([], __read(fields)), [fieldNames.weather2, fieldNames.weather3]));
3097
+ return trigger(__spreadArray(__spreadArray([], __read(fields)), [fieldNames.weather2, fieldNames.weather3, fieldNames.wind, fieldNames.cloud1]));
2984
3098
  }
2985
3099
  }), /*#__PURE__*/React__default["default"].createElement(TafFormTextField, {
2986
3100
  label: "Weather",
@@ -2996,7 +3110,7 @@
2996
3110
  },
2997
3111
  onBlur: function onBlur() {
2998
3112
  var fields = isChangeGroup ? __spreadArray(__spreadArray([], __read(subFields)), __read(mainFields)) : [];
2999
- return trigger(__spreadArray(__spreadArray([], __read(fields)), [fieldNames.weather3]));
3113
+ return trigger(__spreadArray(__spreadArray([], __read(fields)), [fieldNames.weather3, fieldNames.wind, fieldNames.cloud1]));
3000
3114
  }
3001
3115
  }), /*#__PURE__*/React__default["default"].createElement(TafFormTextField, {
3002
3116
  label: "Weather",
@@ -3009,6 +3123,9 @@
3009
3123
  return validateThirdWeatherField(getValues(fieldNames.weather1), getValues(fieldNames.weather2), value, getValues(fieldNames.visibility));
3010
3124
  }
3011
3125
  }
3126
+ },
3127
+ onBlur: function onBlur() {
3128
+ return trigger([fieldNames.wind, fieldNames.cloud1]);
3012
3129
  }
3013
3130
  }), /*#__PURE__*/React__default["default"].createElement(TafFormTextField, {
3014
3131
  label: "Cloud",
@@ -3022,7 +3139,7 @@
3022
3139
  },
3023
3140
  validateRequiredSub: validateRequiredSub,
3024
3141
  validateFirstCloud: function validateFirstCloud$1(value) {
3025
- return validateFirstCloud(value, getValues(fieldNames.visibility));
3142
+ return validateFirstCloud(value, getValues(fieldNames.visibility), getValues(fieldNames.weather1), getValues(fieldNames.weather2), getValues(fieldNames.weather3));
3026
3143
  }
3027
3144
  }
3028
3145
  },
@@ -3072,29 +3189,33 @@
3072
3189
  }
3073
3190
  }
3074
3191
  }
3075
- }), (!isChangeGroup || disabled) && /*#__PURE__*/React__default["default"].createElement(core.Grid, {
3192
+ }), (!isChangeGroup || disabled) && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3076
3193
  className: classes.emptyButtonContainer,
3077
3194
  item: true,
3078
3195
  xs: true
3079
- }, !disabled && /*#__PURE__*/React__default["default"].createElement(core.IconButton, {
3196
+ }, !disabled && /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
3080
3197
  "aria-label": "add",
3081
3198
  "data-testid": "add-changeGroup",
3082
- onClick: addChangeGroup
3083
- }, /*#__PURE__*/React__default["default"].createElement(icons.Add, null))), isChangeGroup && !disabled && /*#__PURE__*/React__default["default"].createElement(core.Grid, {
3199
+ onClick: addChangeGroup,
3200
+ size: "large"
3201
+ }, /*#__PURE__*/React__default["default"].createElement(iconsMaterial.Add, null))), isChangeGroup && !disabled && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3084
3202
  item: true
3085
- }, /*#__PURE__*/React__default["default"].createElement(core.IconButton, {
3203
+ }, /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
3086
3204
  "aria-label": "add",
3087
3205
  "data-testid": "add-changeGroup",
3088
- onClick: addChangeGroup
3089
- }, /*#__PURE__*/React__default["default"].createElement(icons.Add, null)), /*#__PURE__*/React__default["default"].createElement(core.IconButton, __assign({
3206
+ onClick: addChangeGroup,
3207
+ size: "large"
3208
+ }, /*#__PURE__*/React__default["default"].createElement(iconsMaterial.Add, null)), /*#__PURE__*/React__default["default"].createElement(material.IconButton, __assign({
3090
3209
  "aria-label": "delete",
3091
3210
  "data-testid": "remove-changeGroup",
3092
3211
  onClick: function onClick() {
3093
3212
  return onRemoveChangeGroup(index);
3094
3213
  }
3095
3214
  }, lastRow ? {
3096
- tabIndex: '-1'
3097
- } : {}), /*#__PURE__*/React__default["default"].createElement(icons.Delete, null))));
3215
+ tabIndex: -1
3216
+ } : {}, {
3217
+ size: "large"
3218
+ }), /*#__PURE__*/React__default["default"].createElement(iconsMaterial.Delete, null))));
3098
3219
  });
3099
3220
 
3100
3221
  var getIssuesLabel = function getIssuesLabel(sumOfErrors) {
@@ -3134,9 +3255,9 @@
3134
3255
  var togglePane = _a.togglePane,
3135
3256
  sumOfErrors = _a.sumOfErrors;
3136
3257
  var color = sumOfErrors > 0 ? 'red' : 'green';
3137
- return /*#__PURE__*/React__namespace.createElement(core.Tooltip, {
3258
+ return /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
3138
3259
  title: "View details"
3139
- }, /*#__PURE__*/React__namespace.createElement(core.Chip, {
3260
+ }, /*#__PURE__*/React__namespace.createElement(material.Chip, {
3140
3261
  "data-testid": "issuesButton",
3141
3262
  size: "small",
3142
3263
  label: getIssuesLabel(sumOfErrors),
@@ -3146,7 +3267,7 @@
3146
3267
  };
3147
3268
 
3148
3269
  var ThumbsUp = function ThumbsUp(props) {
3149
- return /*#__PURE__*/React__default["default"].createElement(core.SvgIcon, __assign({
3270
+ return /*#__PURE__*/React__default["default"].createElement(material.SvgIcon, __assign({
3150
3271
  fontSize: "inherit",
3151
3272
  viewBox: "0 0 58 69"
3152
3273
  }, props), /*#__PURE__*/React__default["default"].createElement("title", null, "Thumbs up"), /*#__PURE__*/React__default["default"].createElement("g", {
@@ -3182,7 +3303,7 @@
3182
3303
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3183
3304
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
3184
3305
  * */
3185
- var useStyles$8 = core.makeStyles({
3306
+ var useStyles$8 = makeStyles__default["default"]({
3186
3307
  paneContent: {
3187
3308
  marginTop: '16px',
3188
3309
  marginLeft: '24px'
@@ -3285,7 +3406,7 @@
3285
3406
  className: classes.image,
3286
3407
  "data-testid": "zeroIssuesImage"
3287
3408
  }, /*#__PURE__*/React__namespace.createElement(ThumbsUp, null)), errorList.length > 0 && errorList.map(function (error, index) {
3288
- return /*#__PURE__*/React__namespace.createElement(core.Typography // eslint-disable-next-line react/no-array-index-key
3409
+ return /*#__PURE__*/React__namespace.createElement(material.Typography // eslint-disable-next-line react/no-array-index-key
3289
3410
  , {
3290
3411
  // eslint-disable-next-line react/no-array-index-key
3291
3412
  key: "message-" + index,
@@ -3371,19 +3492,19 @@
3371
3492
  return setIsIssuesPaneOpen(!isIssuesPaneOpen);
3372
3493
  };
3373
3494
 
3374
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
3495
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3375
3496
  container: true,
3376
- justify: "space-between",
3497
+ justifyContent: "space-between",
3377
3498
  alignItems: "center",
3378
3499
  className: classes.lifecycleButtons
3379
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
3500
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3380
3501
  item: true
3381
3502
  }, /*#__PURE__*/React__default["default"].createElement(IssuesButton, {
3382
3503
  sumOfErrors: errorList.length,
3383
3504
  togglePane: toggleIssuesPane
3384
- })), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
3505
+ })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3385
3506
  item: true
3386
- }, /*#__PURE__*/React__default["default"].createElement(core.Button, {
3507
+ }, /*#__PURE__*/React__default["default"].createElement(material.Button, {
3387
3508
  "data-testid": "discardtaf",
3388
3509
  variant: "outlined",
3389
3510
  color: "secondary",
@@ -3393,7 +3514,7 @@
3393
3514
  // Simply discard the changes and close the dialog.
3394
3515
  onTafFormButtonPress('DISCARD');
3395
3516
  }
3396
- }, "Discard"), /*#__PURE__*/React__default["default"].createElement(core.Button, {
3517
+ }, "Discard"), /*#__PURE__*/React__default["default"].createElement(material.Button, {
3397
3518
  "data-testid": "savedrafttaf",
3398
3519
  variant: "outlined",
3399
3520
  color: "secondary",
@@ -3423,7 +3544,7 @@
3423
3544
  break;
3424
3545
  }
3425
3546
  }
3426
- }, "Save"), /*#__PURE__*/React__default["default"].createElement(core.Button, {
3547
+ }, "Save"), /*#__PURE__*/React__default["default"].createElement(material.Button, {
3427
3548
  "data-testid": "publishtaf",
3428
3549
  variant: "outlined",
3429
3550
  color: "secondary",
@@ -3476,7 +3597,7 @@
3476
3597
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3477
3598
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
3478
3599
  * */
3479
- var useStyles$7 = core.makeStyles(function () {
3600
+ var useStyles$7 = makeStyles__default["default"](function () {
3480
3601
  return {
3481
3602
  dragHandle: {
3482
3603
  backgroundColor: 'transparent',
@@ -3497,12 +3618,13 @@
3497
3618
  isDisabled = _c === void 0 ? false : _c,
3498
3619
  index = _a.index;
3499
3620
  var classes = useStyles$7(isSorting);
3500
- return /*#__PURE__*/React__default["default"].createElement(core.IconButton, {
3621
+ return /*#__PURE__*/React__default["default"].createElement(material.IconButton, {
3501
3622
  className: classes.dragHandle + " handle",
3502
3623
  "data-testid": "dragHandle-" + index,
3503
3624
  disableRipple: true,
3504
- disabled: isDisabled
3505
- }, /*#__PURE__*/React__default["default"].createElement(icons.DragIndicator, null));
3625
+ disabled: isDisabled,
3626
+ size: "large"
3627
+ }, /*#__PURE__*/React__default["default"].createElement(iconsMaterial.DragIndicator, null));
3506
3628
  };
3507
3629
 
3508
3630
  var noop = function noop() {};
@@ -3702,9 +3824,9 @@
3702
3824
  return /*#__PURE__*/React__default["default"].createElement("form", {
3703
3825
  onSubmit: handleSubmit(onSubmit),
3704
3826
  onBlur: onFormBlur
3705
- }, /*#__PURE__*/React__default["default"].createElement(core.Typography, {
3827
+ }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
3706
3828
  className: classes.tacTitle
3707
- }, "TAC"), /*#__PURE__*/React__default["default"].createElement(core.Typography, {
3829
+ }, "TAC"), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
3708
3830
  "data-testid": "form-tac-message",
3709
3831
  className: classes.tacText
3710
3832
  }, TAC.split('\n').map(function (line) {
@@ -3840,7 +3962,7 @@
3840
3962
  }));
3841
3963
  };
3842
3964
 
3843
- var useStyles$6 = core.makeStyles({
3965
+ var useStyles$6 = makeStyles__default["default"]({
3844
3966
  dialogHeader: {
3845
3967
  borderRadius: '3px',
3846
3968
  border: 'solid 1px #f6f5f5',
@@ -3876,39 +3998,37 @@
3876
3998
  other = __rest(_a, ["open", "toggleDialogStatus", "titleComponent", "children", "onClose", "alertBanner", "onFormAction"]);
3877
3999
 
3878
4000
  var classes = useStyles$6();
3879
- return /*#__PURE__*/React__namespace.createElement(core.Dialog, __assign({
4001
+ return /*#__PURE__*/React__namespace.createElement(material.Dialog, __assign({
3880
4002
  "data-testid": "contentDialog",
3881
4003
  open: open,
3882
4004
  onClose: function onClose() {
3883
4005
  return onFormAction('CLOSE');
3884
4006
  },
3885
4007
  maxWidth: other.maxWidth ? other.maxWidth : 'lg',
3886
- disableBackdropClick: true,
3887
4008
  PaperProps: {
3888
4009
  style: {
3889
4010
  position: 'inherit'
3890
4011
  }
3891
4012
  }
3892
- }, other), /*#__PURE__*/React__namespace.createElement(core.DialogTitle, {
3893
- disableTypography: true,
4013
+ }, other), /*#__PURE__*/React__namespace.createElement(material.DialogTitle, {
3894
4014
  className: classes.dialogHeader
3895
- }, /*#__PURE__*/React__namespace.createElement(core.Grid, {
4015
+ }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
3896
4016
  container: true
3897
- }, /*#__PURE__*/React__namespace.createElement(core.Grid, {
4017
+ }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
3898
4018
  item: true,
3899
4019
  xs: 11,
3900
4020
  className: classes.dialogTitle
3901
- }, titleComponent), /*#__PURE__*/React__namespace.createElement(core.Grid, {
4021
+ }, titleComponent), /*#__PURE__*/React__namespace.createElement(material.Grid, {
3902
4022
  item: true,
3903
4023
  xs: true,
3904
4024
  className: classes.dialogCloseButton
3905
- }, /*#__PURE__*/React__namespace.createElement(core.IconButton, {
4025
+ }, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
3906
4026
  "data-testid": "closeDialog",
3907
4027
  size: "small",
3908
4028
  onClick: function onClick() {
3909
4029
  return onFormAction('CLOSE');
3910
4030
  }
3911
- }, /*#__PURE__*/React__namespace.createElement(icons.Close, null))))), alertBanner !== null && alertBanner, /*#__PURE__*/React__namespace.createElement(core.DialogContent, {
4031
+ }, /*#__PURE__*/React__namespace.createElement(iconsMaterial.Close, null))))), alertBanner !== null && alertBanner, /*#__PURE__*/React__namespace.createElement(material.DialogContent, {
3912
4032
  className: classes.dialogChildren
3913
4033
  }, children));
3914
4034
  };
@@ -3931,11 +4051,11 @@
3931
4051
  * */
3932
4052
 
3933
4053
  var getActiveStatus = function getActiveStatus(listType, className) {
3934
- return listType === 'ACTIVE' ? /*#__PURE__*/React__default["default"].createElement(icons.CheckCircle, {
4054
+ return listType === 'ACTIVE' ? /*#__PURE__*/React__default["default"].createElement(iconsMaterial.CheckCircle, {
3935
4055
  "data-testid": "status-active",
3936
4056
  className: className,
3937
4057
  fontSize: "small"
3938
- }) : /*#__PURE__*/React__default["default"].createElement(icons.Schedule, {
4058
+ }) : /*#__PURE__*/React__default["default"].createElement(iconsMaterial.Schedule, {
3939
4059
  "data-testid": "status-upcoming",
3940
4060
  className: className,
3941
4061
  fontSize: "small"
@@ -3970,7 +4090,7 @@
3970
4090
 
3971
4091
  return 'Draft';
3972
4092
  };
3973
- var useStyles$5 = core.makeStyles({
4093
+ var useStyles$5 = makeStyles__default["default"]({
3974
4094
  cardWrapper: {
3975
4095
  width: '100%'
3976
4096
  },
@@ -3999,35 +4119,35 @@
3999
4119
  var classes = useStyles$5();
4000
4120
  var validTimeDate = moment__default["default"].utc(taf.validDateStart).format('DD MMM');
4001
4121
  var baseTime = moment__default["default"].utc(taf.baseTime).format('HH:mm');
4002
- return /*#__PURE__*/React__default["default"].createElement(core.Card, {
4122
+ return /*#__PURE__*/React__default["default"].createElement(material.Card, {
4003
4123
  elevation: 0,
4004
4124
  className: classes.cardWrapper
4005
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4125
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4006
4126
  container: true,
4007
4127
  alignItems: "center",
4008
4128
  spacing: 1
4009
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4129
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4010
4130
  item: true,
4011
4131
  xs: 3,
4012
4132
  sm: 2,
4013
4133
  md: 1
4014
- }, /*#__PURE__*/React__default["default"].createElement(core.Typography, {
4134
+ }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4015
4135
  variant: "subtitle2",
4016
4136
  noWrap: true,
4017
4137
  className: classes.font
4018
- }, taf.location)), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4138
+ }, taf.location)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4019
4139
  item: true,
4020
4140
  xs: 3,
4021
4141
  sm: 3,
4022
4142
  md: 1,
4023
4143
  container: true
4024
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4144
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4025
4145
  item: true,
4026
4146
  xs: 3,
4027
4147
  sm: 3,
4028
4148
  md: 3,
4029
4149
  className: classes.alignIcon
4030
- }, showTac && /*#__PURE__*/React__default["default"].createElement(core.Tooltip, {
4150
+ }, showTac && /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
4031
4151
  "data-testid": "taflistrow-tactooltip",
4032
4152
  title: /*#__PURE__*/React__default["default"].createElement("div", {
4033
4153
  style: {
@@ -4035,63 +4155,63 @@
4035
4155
  }
4036
4156
  }, TAC),
4037
4157
  placement: "bottom-start"
4038
- }, /*#__PURE__*/React__default["default"].createElement(icons.InfoOutlined, {
4158
+ }, /*#__PURE__*/React__default["default"].createElement(iconsMaterial.InfoOutlined, {
4039
4159
  "data-testid": "taflistrow-tacicon",
4040
4160
  color: "secondary",
4041
4161
  fontSize: "small"
4042
- }))), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4162
+ }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4043
4163
  item: true,
4044
4164
  xs: 9,
4045
4165
  sm: 9,
4046
4166
  md: 9
4047
- }, /*#__PURE__*/React__default["default"].createElement(core.Typography, {
4167
+ }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4048
4168
  variant: "subtitle2",
4049
4169
  className: classes.font,
4050
4170
  "data-testid": "baseTime"
4051
- }, baseTime))), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4171
+ }, baseTime))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4052
4172
  item: true,
4053
4173
  xs: 3,
4054
4174
  sm: 2,
4055
4175
  md: 1
4056
- }, /*#__PURE__*/React__default["default"].createElement(core.Typography, {
4176
+ }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4057
4177
  variant: "subtitle2",
4058
4178
  className: classes.font,
4059
4179
  "data-testid": "validTimeDate"
4060
- }, validTimeDate)), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4180
+ }, validTimeDate)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4061
4181
  item: true,
4062
4182
  xs: 3,
4063
4183
  sm: 3,
4064
4184
  md: 6
4065
- }, /*#__PURE__*/React__default["default"].createElement(core.Typography, {
4185
+ }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4066
4186
  variant: "subtitle2",
4067
4187
  className: classes.font,
4068
4188
  "data-testid": "validTimeSlot"
4069
4189
  }, formatValidToString({
4070
4190
  start: taf.validDateStart,
4071
4191
  end: taf.validDateEnd
4072
- }))), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4192
+ }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4073
4193
  item: true,
4074
4194
  xs: 12,
4075
4195
  sm: 4,
4076
4196
  md: 3
4077
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4197
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4078
4198
  container: true,
4079
- justify: "flex-start",
4199
+ justifyContent: "flex-start",
4080
4200
  spacing: 2
4081
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4201
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4082
4202
  item: true,
4083
4203
  xs: 8,
4084
4204
  container: true,
4085
- justify: "flex-end"
4086
- }, taf.status === 'DRAFT' || taf.status === 'DRAFT_CORRECTED' || taf.status === 'DRAFT_AMENDED' ? /*#__PURE__*/React__default["default"].createElement(core.Button, {
4205
+ justifyContent: "flex-end"
4206
+ }, taf.status === 'DRAFT' || taf.status === 'DRAFT_CORRECTED' || taf.status === 'DRAFT_AMENDED' ? /*#__PURE__*/React__default["default"].createElement(material.Button, {
4087
4207
  color: "secondary",
4088
4208
  size: "small",
4089
4209
  "data-testid": "tafRow-draft",
4090
- startIcon: /*#__PURE__*/React__default["default"].createElement(icons.Create, {
4210
+ startIcon: /*#__PURE__*/React__default["default"].createElement(iconsMaterial.Create, {
4091
4211
  fontSize: "small",
4092
4212
  color: "secondary"
4093
4213
  })
4094
- }, getDraftTitle(taf.status)) : getStatusTagList(taf)), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4214
+ }, getDraftTitle(taf.status)) : getStatusTagList(taf)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4095
4215
  item: true,
4096
4216
  className: classes.alignIcon
4097
4217
  }, taf.status !== 'NEW' && taf.status !== 'DRAFT' && taf.status !== 'DRAFT_CORRECTED' && taf.status !== 'DRAFT_AMENDED' && taf.status !== 'CANCELLED' && listType !== 'EXPIRED' && getActiveStatus(listType, classes.activeStatus))))));
@@ -4186,7 +4306,7 @@
4186
4306
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4187
4307
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
4188
4308
  * */
4189
- var useStyles$4 = core.makeStyles({
4309
+ var useStyles$4 = makeStyles__default["default"]({
4190
4310
  actionButtons: {
4191
4311
  paddingRight: '98px',
4192
4312
  paddingTop: '40px',
@@ -4199,34 +4319,34 @@
4199
4319
  canBe = _a.canBe,
4200
4320
  onClickTafActionButton = _a.onClickTafActionButton;
4201
4321
  var classes = useStyles$4();
4202
- return !canBe.includes('CANCELLED') && !canBe.includes('CORRECTED') && !canBe.includes('AMENDED') ? null : /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4322
+ return !canBe.includes('CANCELLED') && !canBe.includes('CORRECTED') && !canBe.includes('AMENDED') ? null : /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4203
4323
  container: true,
4204
4324
  alignItems: "center",
4205
- justify: "flex-end",
4325
+ justifyContent: "flex-end",
4206
4326
  "data-testid": "taflist-canbebuttons",
4207
4327
  spacing: 1,
4208
4328
  className: classes.actionButtons
4209
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4329
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4210
4330
  item: true
4211
- }, canBe.includes('CANCELLED') && /*#__PURE__*/React__default["default"].createElement(core.Button, {
4331
+ }, canBe.includes('CANCELLED') && /*#__PURE__*/React__default["default"].createElement(material.Button, {
4212
4332
  "data-testid": "canceltaf",
4213
4333
  variant: "outlined",
4214
4334
  color: "secondary",
4215
4335
  onClick: function onClick() {
4216
4336
  return onClickTafActionButton(uuid, 'CANCEL');
4217
4337
  }
4218
- }, "Cancel")), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4338
+ }, "Cancel")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4219
4339
  item: true
4220
- }, canBe.includes('CORRECTED') && /*#__PURE__*/React__default["default"].createElement(core.Button, {
4340
+ }, canBe.includes('CORRECTED') && /*#__PURE__*/React__default["default"].createElement(material.Button, {
4221
4341
  "data-testid": "correctaf",
4222
4342
  variant: "outlined",
4223
4343
  color: "secondary",
4224
4344
  onClick: function onClick() {
4225
4345
  return onClickTafActionButton(uuid, 'CORRECT');
4226
4346
  }
4227
- }, "Correct")), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4347
+ }, "Correct")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4228
4348
  item: true
4229
- }, canBe.includes('AMENDED') && /*#__PURE__*/React__default["default"].createElement(core.Button, {
4349
+ }, canBe.includes('AMENDED') && /*#__PURE__*/React__default["default"].createElement(material.Button, {
4230
4350
  "data-testid": "amendtaf",
4231
4351
  variant: "outlined",
4232
4352
  color: "secondary",
@@ -4236,12 +4356,15 @@
4236
4356
  }, "Amend")));
4237
4357
  };
4238
4358
 
4239
- var useStyles$3 = core.makeStyles({
4359
+ var useStyles$3 = makeStyles__default["default"]({
4240
4360
  accordion: {
4241
4361
  marginBottom: '5px'
4242
4362
  },
4243
4363
  formPadding: {
4244
4364
  padding: '8px'
4365
+ },
4366
+ expandIcon: {
4367
+ color: '#0075a9'
4245
4368
  }
4246
4369
  });
4247
4370
 
@@ -4283,7 +4406,7 @@
4283
4406
 
4284
4407
  }, [tafListItem.taf]);
4285
4408
  var popOut = status === 'NEW' || status === 'DRAFT' || status === 'DRAFT_AMENDED' || status === 'DRAFT_CORRECTED';
4286
- return /*#__PURE__*/React__default["default"].createElement(core.Accordion, __assign({
4409
+ return /*#__PURE__*/React__default["default"].createElement(material.Accordion, __assign({
4287
4410
  "data-testid": "tafListItem",
4288
4411
  className: classes.accordion
4289
4412
  }, popOut ? {
@@ -4297,14 +4420,16 @@
4297
4420
  TransitionProps: {
4298
4421
  unmountOnExit: true
4299
4422
  }
4300
- }), /*#__PURE__*/React__default["default"].createElement(core.AccordionSummary, {
4423
+ }), /*#__PURE__*/React__default["default"].createElement(material.AccordionSummary, {
4301
4424
  "data-testid": "tafListSectionAccordionSummary",
4302
- expandIcon: popOut ? /*#__PURE__*/React__default["default"].createElement(core.Tooltip, {
4303
- title: "Popout to edit"
4304
- }, /*#__PURE__*/React__default["default"].createElement(icons.OpenInNew, {
4425
+ expandIcon: popOut ? /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
4426
+ title: "Popout to edit",
4427
+ className: classes.expandIcon
4428
+ }, /*#__PURE__*/React__default["default"].createElement(iconsMaterial.OpenInNew, {
4305
4429
  "data-testid": "popOutIcon",
4306
4430
  fontSize: "small"
4307
- })) : /*#__PURE__*/React__default["default"].createElement(icons.ExpandMore, {
4431
+ })) : /*#__PURE__*/React__default["default"].createElement(iconsMaterial.ExpandMore, {
4432
+ className: classes.expandIcon,
4308
4433
  "data-testid": "expandIcon"
4309
4434
  })
4310
4435
  }, /*#__PURE__*/React__default["default"].createElement(TafListRow, {
@@ -4312,7 +4437,7 @@
4312
4437
  listType: listType,
4313
4438
  TAC: TAC,
4314
4439
  showTac: true
4315
- })), /*#__PURE__*/React__default["default"].createElement(core.AccordionDetails, null, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4440
+ })), /*#__PURE__*/React__default["default"].createElement(material.AccordionDetails, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4316
4441
  container: true,
4317
4442
  direction: "column"
4318
4443
  }, errorCancelTaf.length > 0 && errorCancelTaf.find(function (uuid) {
@@ -4323,13 +4448,13 @@
4323
4448
  dataTestId: "tafList-cancelAlert"
4324
4449
  }), /*#__PURE__*/React__default["default"].createElement("div", {
4325
4450
  className: classes.formPadding
4326
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4451
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4327
4452
  item: true
4328
4453
  }, /*#__PURE__*/React__default["default"].createElement(TafFormWrapper, {
4329
4454
  tafFromBackend: tafListItem,
4330
4455
  mode: "view",
4331
4456
  TAC: TAC
4332
- })), /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4457
+ })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4333
4458
  item: true
4334
4459
  }, /*#__PURE__*/React__default["default"].createElement(TafListButtons, {
4335
4460
  canBe: tafListItem.canbe,
@@ -4354,7 +4479,7 @@
4354
4479
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4355
4480
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
4356
4481
  * */
4357
- var useStyles$2 = core.makeStyles({
4482
+ var useStyles$2 = makeStyles__default["default"]({
4358
4483
  listHeaders: {
4359
4484
  color: '#9d9d9d'
4360
4485
  },
@@ -4374,7 +4499,7 @@
4374
4499
  errorCancelTaf = _b === void 0 ? [] : _b,
4375
4500
  onClickTafActionButton = _a.onClickTafActionButton;
4376
4501
  var classes = useStyles$2();
4377
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(core.Typography, {
4502
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4378
4503
  variant: "subtitle2",
4379
4504
  className: classes.listHeaders
4380
4505
  }, title), /*#__PURE__*/React__default["default"].createElement("div", {
@@ -4390,7 +4515,7 @@
4390
4515
  })));
4391
4516
  };
4392
4517
 
4393
- var useStyles$1 = core.makeStyles({
4518
+ var useStyles$1 = makeStyles__default["default"]({
4394
4519
  accordion: {
4395
4520
  marginBottom: '5px'
4396
4521
  },
@@ -4448,11 +4573,11 @@
4448
4573
  }
4449
4574
  }
4450
4575
 
4451
- return /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4576
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4452
4577
  container: true,
4453
4578
  direction: "column",
4454
4579
  alignItems: "stretch"
4455
- }, /*#__PURE__*/React__default["default"].createElement(core.Grid, {
4580
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4456
4581
  item: true,
4457
4582
  className: classes.listBody
4458
4583
  }, error && /*#__PURE__*/React__default["default"].createElement(shared.AlertBanner, {
@@ -4478,9 +4603,9 @@
4478
4603
  tafList: expiredTafs,
4479
4604
  errorCancelTaf: errorCancelTaf,
4480
4605
  onClickTafActionButton: onClickTafActionButton
4481
- })), isLoading && /*#__PURE__*/React__default["default"].createElement(lab.Skeleton, {
4606
+ })), isLoading && /*#__PURE__*/React__default["default"].createElement(material.Skeleton, {
4482
4607
  "data-testid": "tafList-skeleton",
4483
- variant: "rect",
4608
+ variant: "rectangular",
4484
4609
  height: "660px"
4485
4610
  })));
4486
4611
  };
@@ -4501,7 +4626,7 @@
4501
4626
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4502
4627
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
4503
4628
  * */
4504
- var useStyles = core.makeStyles({
4629
+ var useStyles = makeStyles__default["default"]({
4505
4630
  backdrop: {
4506
4631
  zIndex: 1500,
4507
4632
  color: '#fff'
@@ -4510,10 +4635,10 @@
4510
4635
 
4511
4636
  var Spinner = function Spinner() {
4512
4637
  var classes = useStyles();
4513
- return /*#__PURE__*/React__default["default"].createElement(core.Backdrop, {
4638
+ return /*#__PURE__*/React__default["default"].createElement(material.Backdrop, {
4514
4639
  open: true,
4515
4640
  className: classes.backdrop
4516
- }, /*#__PURE__*/React__default["default"].createElement(core.CircularProgress, {
4641
+ }, /*#__PURE__*/React__default["default"].createElement(material.CircularProgress, {
4517
4642
  "data-testid": "spinner",
4518
4643
  color: "inherit"
4519
4644
  }));