@opengeoweb/taf 4.16.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +89 -21
- package/index.umd.js +101 -27
- package/package.json +8 -8
package/index.esm.js
CHANGED
|
@@ -390,7 +390,10 @@ var getValidityTimeStamp = function getValidityTimeStamp(sectionType, sections,
|
|
|
390
390
|
|
|
391
391
|
|
|
392
392
|
var parseValidToObject = function parseValidToObject(value, tafStart, tafEnd) {
|
|
393
|
-
if (!value)
|
|
393
|
+
if (!value) {
|
|
394
|
+
return null;
|
|
395
|
+
} // Create valid object from passed string
|
|
396
|
+
|
|
394
397
|
|
|
395
398
|
var trimmedValue = value.trim();
|
|
396
399
|
var tafStartMoment = moment.utc(tafStart);
|
|
@@ -453,7 +456,10 @@ var validateIsValidDates = function validateIsValidDates(value, tafStart, tafEnd
|
|
|
453
456
|
|
|
454
457
|
var sectionValidationStart = validateValidSections(startSections, 'start'); // If invalid start - return with errors
|
|
455
458
|
|
|
456
|
-
if (sectionValidationStart.length)
|
|
459
|
+
if (sectionValidationStart.length) {
|
|
460
|
+
return sectionValidationStart;
|
|
461
|
+
}
|
|
462
|
+
|
|
457
463
|
var startTimestamp = getValidityTimeStamp('start', startSections, tafStartMoment, tafEndMoment); // Validate start is within the taf validity bounds
|
|
458
464
|
|
|
459
465
|
if (startTimestamp < tafStartMoment || startTimestamp > tafEndMoment) {
|
|
@@ -466,7 +472,10 @@ var validateIsValidDates = function validateIsValidDates(value, tafStart, tafEnd
|
|
|
466
472
|
|
|
467
473
|
var sectionValidationEnd = validateValidSections(endSections, 'end'); // If invalid end - return with errors
|
|
468
474
|
|
|
469
|
-
if (sectionValidationEnd.length)
|
|
475
|
+
if (sectionValidationEnd.length) {
|
|
476
|
+
return sectionValidationEnd;
|
|
477
|
+
}
|
|
478
|
+
|
|
470
479
|
var endTimestamp = getValidityTimeStamp('end', endSections, tafStartMoment, tafEndMoment); // Validate end is not before start
|
|
471
480
|
|
|
472
481
|
if (endTimestamp < startTimestamp) {
|
|
@@ -604,7 +613,11 @@ var validatePreviousChangeGroup = function validatePreviousChangeGroup(currentCh
|
|
|
604
613
|
|
|
605
614
|
var validateOverlapWithFM = function validateOverlapWithFM(currentChangeGroup, nextChangeGroups, tafStart, tafEnd) {
|
|
606
615
|
var valid = getFieldValue(currentChangeGroup.valid);
|
|
607
|
-
|
|
616
|
+
|
|
617
|
+
if (!valid || !nextChangeGroups.length) {
|
|
618
|
+
return true;
|
|
619
|
+
}
|
|
620
|
+
|
|
608
621
|
var validValue = parseValidToObject(valid, tafStart, tafEnd);
|
|
609
622
|
var currentRowEndTime = moment(validValue.end);
|
|
610
623
|
var firstFMChangeGroup = nextChangeGroups.find(function (nextChangeGroup) {
|
|
@@ -1592,13 +1605,16 @@ var validateWindInterSection = function validateWindInterSection(speed, gust, di
|
|
|
1592
1605
|
if (direction === 'VRB' && (speed === 'P99' || parseInt(speed, 10) > 2)) {
|
|
1593
1606
|
// Only allow VRB for speeds smaller than 3 or in combination with gusts and showers (SH, TS, SQ)
|
|
1594
1607
|
var allowedWeatherPhenom = ['SH', 'TS', 'SQ'];
|
|
1608
|
+
|
|
1595
1609
|
if (gust === '' || !allowedWeatherPhenom.some(function (allowedPhenom) {
|
|
1596
1610
|
return weather1Value.includes(allowedPhenom);
|
|
1597
1611
|
}) && !allowedWeatherPhenom.some(function (allowedPhenom) {
|
|
1598
1612
|
return weather2Value.includes(allowedPhenom);
|
|
1599
1613
|
}) && !allowedWeatherPhenom.some(function (allowedPhenom) {
|
|
1600
1614
|
return weather3Value.includes(allowedPhenom);
|
|
1601
|
-
}))
|
|
1615
|
+
})) {
|
|
1616
|
+
return invalidWindVRBWindDirectionMessage;
|
|
1617
|
+
}
|
|
1602
1618
|
} // Validate gust
|
|
1603
1619
|
|
|
1604
1620
|
|
|
@@ -1647,14 +1663,20 @@ var validateWindField = function validateWindField(value, weatherfield1, weather
|
|
|
1647
1663
|
};
|
|
1648
1664
|
|
|
1649
1665
|
var formatSingleCloud = function formatSingleCloud(value) {
|
|
1650
|
-
if (!value)
|
|
1666
|
+
if (!value) {
|
|
1667
|
+
return null;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1651
1670
|
return value.type ? "".concat(value.coverage).concat(prependZeroes(value.height, 3)).concat(value.type) : "".concat(value.coverage).concat(prependZeroes(value.height, 3));
|
|
1652
1671
|
}; // TODO: clouds type = Clouds, but couldn't get it to work properly https://gitlab.com/opengeoweb/opengeoweb/-/issues/119
|
|
1653
1672
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
1654
1673
|
|
|
1655
1674
|
|
|
1656
1675
|
var formatCloudsToString = function formatCloudsToString(clouds) {
|
|
1657
|
-
if (!clouds)
|
|
1676
|
+
if (!clouds) {
|
|
1677
|
+
return null;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1658
1680
|
return Object.keys(clouds).reduce(function (list, key) {
|
|
1659
1681
|
// only format it if it has a value
|
|
1660
1682
|
if (clouds[key]) {
|
|
@@ -1688,7 +1710,10 @@ var formatCloudsToString = function formatCloudsToString(clouds) {
|
|
|
1688
1710
|
}; // parsers
|
|
1689
1711
|
|
|
1690
1712
|
var parseSingleCloud = function parseSingleCloud(value) {
|
|
1691
|
-
if (!value)
|
|
1713
|
+
if (!value) {
|
|
1714
|
+
return null;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1692
1717
|
var trimmedCloud = value.trim();
|
|
1693
1718
|
var cloudType = trimmedCloud.substring(6, 9);
|
|
1694
1719
|
return Object.assign({
|
|
@@ -1702,7 +1727,10 @@ var parseSingleCloud = function parseSingleCloud(value) {
|
|
|
1702
1727
|
|
|
1703
1728
|
|
|
1704
1729
|
var parseCloudsToObject = function parseCloudsToObject(clouds) {
|
|
1705
|
-
if (!clouds)
|
|
1730
|
+
if (!clouds) {
|
|
1731
|
+
return null;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1706
1734
|
return Object.keys(clouds).reduce(function (list, key) {
|
|
1707
1735
|
// only parse it if it has a value
|
|
1708
1736
|
if (clouds[key] && clouds[key].trim()) {
|
|
@@ -2551,7 +2579,11 @@ var useDragOrder = function useDragOrder(trigger, move) {
|
|
|
2551
2579
|
var onChangeOrder = function onChangeOrder(_ref) {
|
|
2552
2580
|
var oldIndex = _ref.oldIndex,
|
|
2553
2581
|
newIndex = _ref.newIndex;
|
|
2554
|
-
|
|
2582
|
+
|
|
2583
|
+
if (oldIndex === undefined || newIndex === undefined) {
|
|
2584
|
+
return;
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2555
2587
|
move(oldIndex, newIndex);
|
|
2556
2588
|
onUpdatelastDragOrder([oldIndex, newIndex]);
|
|
2557
2589
|
setActiveDraggingIndex(false);
|
|
@@ -2581,17 +2613,35 @@ var useDragOrder = function useDragOrder(trigger, move) {
|
|
|
2581
2613
|
}; // dialog utils
|
|
2582
2614
|
|
|
2583
2615
|
var getConfirmationDialogTitle = function getConfirmationDialogTitle(action) {
|
|
2584
|
-
if (action === 'CLEAR')
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
if (action === '
|
|
2616
|
+
if (action === 'CLEAR') {
|
|
2617
|
+
return 'Clear TAF';
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
if (action === 'PUBLISH') {
|
|
2621
|
+
return 'Publish';
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
if (action === 'AMEND') {
|
|
2625
|
+
return 'This TAF is an amendment';
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
if (action === 'CORRECT') {
|
|
2629
|
+
return 'This TAF is a correction';
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
if (action === 'CANCEL') {
|
|
2633
|
+
return 'Cancel TAF';
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2589
2636
|
return 'Cancel TAF';
|
|
2590
2637
|
}; // Check if the amended/corrected TAF has been changed. Only compare the fields users are able to fill in
|
|
2591
2638
|
// (i.e. exclude baseforecast valid time as that gets updated when doing an amendment automatically outside of the users influence)
|
|
2592
2639
|
|
|
2593
2640
|
var isTafAmendedCorrectedChanged = function isTafAmendedCorrectedChanged(originalTaf, currentTaf) {
|
|
2594
|
-
if (originalTaf === null || currentTaf === null)
|
|
2641
|
+
if (originalTaf === null || currentTaf === null) {
|
|
2642
|
+
return false;
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2595
2645
|
var originalBaseF = originalTaf.baseForecast,
|
|
2596
2646
|
originalChG = originalTaf.changeGroups;
|
|
2597
2647
|
var currentBaseF = currentTaf.baseForecast,
|
|
@@ -2906,7 +2956,11 @@ var getIssuesLabel = function getIssuesLabel(sumOfErrors) {
|
|
|
2906
2956
|
var getErrorValues = function getErrorValues(fieldErrors) {
|
|
2907
2957
|
var isChangeGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2908
2958
|
var rowIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
2909
|
-
|
|
2959
|
+
|
|
2960
|
+
if (!fieldErrors) {
|
|
2961
|
+
return [];
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2910
2964
|
return Object.keys(fieldErrors).reduce(function (list, key) {
|
|
2911
2965
|
var error = Object.assign({}, fieldErrors[key]);
|
|
2912
2966
|
|
|
@@ -4640,7 +4694,10 @@ var TafForm = /*#__PURE__*/React__default.memo(function (_ref) {
|
|
|
4640
4694
|
forceFallback: false,
|
|
4641
4695
|
onStart: function onStart(event) {
|
|
4642
4696
|
onStartDrag(event);
|
|
4643
|
-
|
|
4697
|
+
|
|
4698
|
+
if (Sortable.ghost) {
|
|
4699
|
+
Sortable.ghost.style.opacity = '1';
|
|
4700
|
+
}
|
|
4644
4701
|
}
|
|
4645
4702
|
}, fields.map(function (item, index) {
|
|
4646
4703
|
return /*#__PURE__*/React__default.createElement(TafFormRow, {
|
|
@@ -4829,7 +4886,11 @@ var sortTafsOnIssueDate = function sortTafsOnIssueDate() {
|
|
|
4829
4886
|
return _toConsumableArray(tafList).sort(function (_ref3, _ref4) {
|
|
4830
4887
|
var tafA = _ref3.taf;
|
|
4831
4888
|
var tafB = _ref4.taf;
|
|
4832
|
-
|
|
4889
|
+
|
|
4890
|
+
if (tafA.issueDate < tafB.issueDate || tafA.issueDate && !tafB.issueDate) {
|
|
4891
|
+
return 1;
|
|
4892
|
+
}
|
|
4893
|
+
|
|
4833
4894
|
return -1;
|
|
4834
4895
|
});
|
|
4835
4896
|
};
|
|
@@ -4926,7 +4987,11 @@ var getNewTafLocationIndex = function getNewTafLocationIndex(tafLocations, previ
|
|
|
4926
4987
|
};
|
|
4927
4988
|
var getPreviousTaf = function getPreviousTaf(tafList, currentTaf) {
|
|
4928
4989
|
var previousId = currentTaf.taf.previousId;
|
|
4929
|
-
|
|
4990
|
+
|
|
4991
|
+
if (!previousId) {
|
|
4992
|
+
return null;
|
|
4993
|
+
}
|
|
4994
|
+
|
|
4930
4995
|
var previousTaf = tafList.find(function (taf) {
|
|
4931
4996
|
return taf.taf.uuid === previousId;
|
|
4932
4997
|
});
|
|
@@ -5275,7 +5340,10 @@ var TacOverview = function TacOverview(_ref) {
|
|
|
5275
5340
|
};
|
|
5276
5341
|
|
|
5277
5342
|
var scrollToPosition = React__default.useCallback(function () {
|
|
5278
|
-
if (!scrollRef.current)
|
|
5343
|
+
if (!scrollRef.current) {
|
|
5344
|
+
return;
|
|
5345
|
+
}
|
|
5346
|
+
|
|
5279
5347
|
var containerTop = scrollRef.current.getBoundingClientRect().top;
|
|
5280
5348
|
var firstLocation = scrollRef.current.querySelector("[data-location=\"".concat(activeLocation, "\"]"));
|
|
5281
5349
|
var paddingTop = parseInt(getComputedStyle(scrollRef.current).paddingTop, 10);
|
package/index.umd.js
CHANGED
|
@@ -384,7 +384,10 @@
|
|
|
384
384
|
|
|
385
385
|
|
|
386
386
|
var parseValidToObject = function parseValidToObject(value, tafStart, tafEnd) {
|
|
387
|
-
if (!value)
|
|
387
|
+
if (!value) {
|
|
388
|
+
return null;
|
|
389
|
+
} // Create valid object from passed string
|
|
390
|
+
|
|
388
391
|
|
|
389
392
|
var trimmedValue = value.trim();
|
|
390
393
|
var tafStartMoment = moment__default["default"].utc(tafStart);
|
|
@@ -447,7 +450,10 @@
|
|
|
447
450
|
|
|
448
451
|
var sectionValidationStart = validateValidSections(startSections, 'start'); // If invalid start - return with errors
|
|
449
452
|
|
|
450
|
-
if (sectionValidationStart.length)
|
|
453
|
+
if (sectionValidationStart.length) {
|
|
454
|
+
return sectionValidationStart;
|
|
455
|
+
}
|
|
456
|
+
|
|
451
457
|
var startTimestamp = getValidityTimeStamp('start', startSections, tafStartMoment, tafEndMoment); // Validate start is within the taf validity bounds
|
|
452
458
|
|
|
453
459
|
if (startTimestamp < tafStartMoment || startTimestamp > tafEndMoment) {
|
|
@@ -460,7 +466,10 @@
|
|
|
460
466
|
|
|
461
467
|
var sectionValidationEnd = validateValidSections(endSections, 'end'); // If invalid end - return with errors
|
|
462
468
|
|
|
463
|
-
if (sectionValidationEnd.length)
|
|
469
|
+
if (sectionValidationEnd.length) {
|
|
470
|
+
return sectionValidationEnd;
|
|
471
|
+
}
|
|
472
|
+
|
|
464
473
|
var endTimestamp = getValidityTimeStamp('end', endSections, tafStartMoment, tafEndMoment); // Validate end is not before start
|
|
465
474
|
|
|
466
475
|
if (endTimestamp < startTimestamp) {
|
|
@@ -598,7 +607,11 @@
|
|
|
598
607
|
|
|
599
608
|
var validateOverlapWithFM = function validateOverlapWithFM(currentChangeGroup, nextChangeGroups, tafStart, tafEnd) {
|
|
600
609
|
var valid = getFieldValue(currentChangeGroup.valid);
|
|
601
|
-
|
|
610
|
+
|
|
611
|
+
if (!valid || !nextChangeGroups.length) {
|
|
612
|
+
return true;
|
|
613
|
+
}
|
|
614
|
+
|
|
602
615
|
var validValue = parseValidToObject(valid, tafStart, tafEnd);
|
|
603
616
|
var currentRowEndTime = moment__default["default"](validValue.end);
|
|
604
617
|
var firstFMChangeGroup = nextChangeGroups.find(function (nextChangeGroup) {
|
|
@@ -1590,13 +1603,16 @@
|
|
|
1590
1603
|
if (direction === 'VRB' && (speed === 'P99' || parseInt(speed, 10) > 2)) {
|
|
1591
1604
|
// Only allow VRB for speeds smaller than 3 or in combination with gusts and showers (SH, TS, SQ)
|
|
1592
1605
|
var allowedWeatherPhenom = ['SH', 'TS', 'SQ'];
|
|
1606
|
+
|
|
1593
1607
|
if (gust === '' || !allowedWeatherPhenom.some(function (allowedPhenom) {
|
|
1594
1608
|
return weather1Value.includes(allowedPhenom);
|
|
1595
1609
|
}) && !allowedWeatherPhenom.some(function (allowedPhenom) {
|
|
1596
1610
|
return weather2Value.includes(allowedPhenom);
|
|
1597
1611
|
}) && !allowedWeatherPhenom.some(function (allowedPhenom) {
|
|
1598
1612
|
return weather3Value.includes(allowedPhenom);
|
|
1599
|
-
}))
|
|
1613
|
+
})) {
|
|
1614
|
+
return invalidWindVRBWindDirectionMessage;
|
|
1615
|
+
}
|
|
1600
1616
|
} // Validate gust
|
|
1601
1617
|
|
|
1602
1618
|
|
|
@@ -1645,14 +1661,20 @@
|
|
|
1645
1661
|
};
|
|
1646
1662
|
|
|
1647
1663
|
var formatSingleCloud = function formatSingleCloud(value) {
|
|
1648
|
-
if (!value)
|
|
1664
|
+
if (!value) {
|
|
1665
|
+
return null;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1649
1668
|
return value.type ? "" + value.coverage + prependZeroes(value.height, 3) + value.type : "" + value.coverage + prependZeroes(value.height, 3);
|
|
1650
1669
|
}; // TODO: clouds type = Clouds, but couldn't get it to work properly https://gitlab.com/opengeoweb/opengeoweb/-/issues/119
|
|
1651
1670
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
1652
1671
|
|
|
1653
1672
|
|
|
1654
1673
|
var formatCloudsToString = function formatCloudsToString(clouds) {
|
|
1655
|
-
if (!clouds)
|
|
1674
|
+
if (!clouds) {
|
|
1675
|
+
return null;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1656
1678
|
return Object.keys(clouds).reduce(function (list, key) {
|
|
1657
1679
|
// only format it if it has a value
|
|
1658
1680
|
var _a, _b, _c, _d;
|
|
@@ -1688,7 +1710,10 @@
|
|
|
1688
1710
|
}; // parsers
|
|
1689
1711
|
|
|
1690
1712
|
var parseSingleCloud = function parseSingleCloud(value) {
|
|
1691
|
-
if (!value)
|
|
1713
|
+
if (!value) {
|
|
1714
|
+
return null;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1692
1717
|
var trimmedCloud = value.trim();
|
|
1693
1718
|
var cloudType = trimmedCloud.substring(6, 9);
|
|
1694
1719
|
return __assign({
|
|
@@ -1702,7 +1727,10 @@
|
|
|
1702
1727
|
|
|
1703
1728
|
|
|
1704
1729
|
var parseCloudsToObject = function parseCloudsToObject(clouds) {
|
|
1705
|
-
if (!clouds)
|
|
1730
|
+
if (!clouds) {
|
|
1731
|
+
return null;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1706
1734
|
return Object.keys(clouds).reduce(function (list, key) {
|
|
1707
1735
|
var _a, _b, _c, _d; // only parse it if it has a value
|
|
1708
1736
|
|
|
@@ -2552,7 +2580,11 @@
|
|
|
2552
2580
|
var onChangeOrder = function onChangeOrder(_a) {
|
|
2553
2581
|
var oldIndex = _a.oldIndex,
|
|
2554
2582
|
newIndex = _a.newIndex;
|
|
2555
|
-
|
|
2583
|
+
|
|
2584
|
+
if (oldIndex === undefined || newIndex === undefined) {
|
|
2585
|
+
return;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2556
2588
|
move(oldIndex, newIndex);
|
|
2557
2589
|
onUpdatelastDragOrder([oldIndex, newIndex]);
|
|
2558
2590
|
setActiveDraggingIndex(false);
|
|
@@ -2582,17 +2614,35 @@
|
|
|
2582
2614
|
}; // dialog utils
|
|
2583
2615
|
|
|
2584
2616
|
var getConfirmationDialogTitle = function getConfirmationDialogTitle(action) {
|
|
2585
|
-
if (action === 'CLEAR')
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
if (action === '
|
|
2617
|
+
if (action === 'CLEAR') {
|
|
2618
|
+
return 'Clear TAF';
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
if (action === 'PUBLISH') {
|
|
2622
|
+
return 'Publish';
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
if (action === 'AMEND') {
|
|
2626
|
+
return 'This TAF is an amendment';
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
if (action === 'CORRECT') {
|
|
2630
|
+
return 'This TAF is a correction';
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
if (action === 'CANCEL') {
|
|
2634
|
+
return 'Cancel TAF';
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2590
2637
|
return 'Cancel TAF';
|
|
2591
2638
|
}; // Check if the amended/corrected TAF has been changed. Only compare the fields users are able to fill in
|
|
2592
2639
|
// (i.e. exclude baseforecast valid time as that gets updated when doing an amendment automatically outside of the users influence)
|
|
2593
2640
|
|
|
2594
2641
|
var isTafAmendedCorrectedChanged = function isTafAmendedCorrectedChanged(originalTaf, currentTaf) {
|
|
2595
|
-
if (originalTaf === null || currentTaf === null)
|
|
2642
|
+
if (originalTaf === null || currentTaf === null) {
|
|
2643
|
+
return false;
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2596
2646
|
var originalBaseF = originalTaf.baseForecast,
|
|
2597
2647
|
originalChG = originalTaf.changeGroups;
|
|
2598
2648
|
var currentBaseF = currentTaf.baseForecast,
|
|
@@ -2919,7 +2969,10 @@
|
|
|
2919
2969
|
rowIndex = -1;
|
|
2920
2970
|
}
|
|
2921
2971
|
|
|
2922
|
-
if (!fieldErrors)
|
|
2972
|
+
if (!fieldErrors) {
|
|
2973
|
+
return [];
|
|
2974
|
+
}
|
|
2975
|
+
|
|
2923
2976
|
return Object.keys(fieldErrors).reduce(function (list, key) {
|
|
2924
2977
|
var error = __assign({}, fieldErrors[key]);
|
|
2925
2978
|
|
|
@@ -4659,7 +4712,10 @@
|
|
|
4659
4712
|
forceFallback: false,
|
|
4660
4713
|
onStart: function onStart(event) {
|
|
4661
4714
|
onStartDrag(event);
|
|
4662
|
-
|
|
4715
|
+
|
|
4716
|
+
if (Sortable__default["default"].ghost) {
|
|
4717
|
+
Sortable__default["default"].ghost.style.opacity = '1';
|
|
4718
|
+
}
|
|
4663
4719
|
}
|
|
4664
4720
|
}, fields.map(function (item, index) {
|
|
4665
4721
|
return /*#__PURE__*/React__default["default"].createElement(TafFormRow, {
|
|
@@ -4843,7 +4899,11 @@
|
|
|
4843
4899
|
return __spreadArray([], __read(tafList)).sort(function (_a, _b) {
|
|
4844
4900
|
var tafA = _a.taf;
|
|
4845
4901
|
var tafB = _b.taf;
|
|
4846
|
-
|
|
4902
|
+
|
|
4903
|
+
if (tafA.issueDate < tafB.issueDate || tafA.issueDate && !tafB.issueDate) {
|
|
4904
|
+
return 1;
|
|
4905
|
+
}
|
|
4906
|
+
|
|
4847
4907
|
return -1;
|
|
4848
4908
|
});
|
|
4849
4909
|
};
|
|
@@ -4940,7 +5000,11 @@
|
|
|
4940
5000
|
};
|
|
4941
5001
|
var getPreviousTaf = function getPreviousTaf(tafList, currentTaf) {
|
|
4942
5002
|
var previousId = currentTaf.taf.previousId;
|
|
4943
|
-
|
|
5003
|
+
|
|
5004
|
+
if (!previousId) {
|
|
5005
|
+
return null;
|
|
5006
|
+
}
|
|
5007
|
+
|
|
4944
5008
|
var previousTaf = tafList.find(function (taf) {
|
|
4945
5009
|
return taf.taf.uuid === previousId;
|
|
4946
5010
|
});
|
|
@@ -5300,7 +5364,10 @@
|
|
|
5300
5364
|
};
|
|
5301
5365
|
|
|
5302
5366
|
var scrollToPosition = React__default["default"].useCallback(function () {
|
|
5303
|
-
if (!scrollRef.current)
|
|
5367
|
+
if (!scrollRef.current) {
|
|
5368
|
+
return;
|
|
5369
|
+
}
|
|
5370
|
+
|
|
5304
5371
|
var containerTop = scrollRef.current.getBoundingClientRect().top;
|
|
5305
5372
|
var firstLocation = scrollRef.current.querySelector("[data-location=\"" + activeLocation + "\"]");
|
|
5306
5373
|
var paddingTop = parseInt(getComputedStyle(scrollRef.current).paddingTop, 10);
|
|
@@ -5688,9 +5755,12 @@
|
|
|
5688
5755
|
case 2:
|
|
5689
5756
|
_a.sent();
|
|
5690
5757
|
|
|
5691
|
-
if (!isMounted.current)
|
|
5692
|
-
|
|
5693
|
-
|
|
5758
|
+
if (!isMounted.current) {
|
|
5759
|
+
return [2
|
|
5760
|
+
/*return*/
|
|
5761
|
+
];
|
|
5762
|
+
}
|
|
5763
|
+
|
|
5694
5764
|
setLoading(false);
|
|
5695
5765
|
setError(null);
|
|
5696
5766
|
return [3
|
|
@@ -5699,9 +5769,13 @@
|
|
|
5699
5769
|
|
|
5700
5770
|
case 3:
|
|
5701
5771
|
error_1 = _a.sent();
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5772
|
+
|
|
5773
|
+
if (!isMounted.current) {
|
|
5774
|
+
return [2
|
|
5775
|
+
/*return*/
|
|
5776
|
+
];
|
|
5777
|
+
}
|
|
5778
|
+
|
|
5705
5779
|
newErrorr = errorParser ? errorParser(error_1, params) : error_1;
|
|
5706
5780
|
setLoading(false);
|
|
5707
5781
|
setError(newErrorr);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/taf",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.18.0",
|
|
4
4
|
"description": "GeoWeb TAF library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
"typings": "./index.d.ts",
|
|
13
13
|
"dependencies": {},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@opengeoweb/api": "4.
|
|
15
|
+
"@opengeoweb/api": "4.18.0",
|
|
16
16
|
"react": "^18.2.0",
|
|
17
17
|
"axios": "^0.25.0",
|
|
18
|
-
"@opengeoweb/shared": "4.
|
|
18
|
+
"@opengeoweb/shared": "4.18.0",
|
|
19
19
|
"@mui/material": "^5.10.8",
|
|
20
|
-
"@opengeoweb/theme": "4.
|
|
20
|
+
"@opengeoweb/theme": "4.18.0",
|
|
21
21
|
"react-draggable": "^4.4.5",
|
|
22
22
|
"re-resizable": "^6.9.0",
|
|
23
23
|
"@redux-eggs/core": "^2.2.0",
|
|
24
24
|
"react-redux": "^8.0.4",
|
|
25
25
|
"lodash": "^4.17.20",
|
|
26
26
|
"date-fns": "^2.29.3",
|
|
27
|
-
"@opengeoweb/core": "4.
|
|
27
|
+
"@opengeoweb/core": "4.18.0",
|
|
28
28
|
"moment": "^2.29.0",
|
|
29
|
-
"@opengeoweb/webmap": "4.
|
|
29
|
+
"@opengeoweb/webmap": "4.18.0",
|
|
30
30
|
"throttle-debounce": "^3.0.1",
|
|
31
31
|
"proj4": "^2.6.2",
|
|
32
32
|
"react-intl": "^5.17.5",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"sortablejs": "^1.15.0",
|
|
35
35
|
"immer": "^9.0.15",
|
|
36
36
|
"react-window": "^1.8.7",
|
|
37
|
-
"@opengeoweb/form-fields": "4.
|
|
37
|
+
"@opengeoweb/form-fields": "4.18.0",
|
|
38
38
|
"react-hook-form": "^7.41.5",
|
|
39
39
|
"moment-timezone": "^0.5.31",
|
|
40
40
|
"@mui/x-date-pickers": "^5.0.4",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@redux-eggs/redux-toolkit": "^2.2.0",
|
|
48
48
|
"@redux-eggs/saga-extension": "^2.2.0",
|
|
49
49
|
"react-dom": "^18.2.0",
|
|
50
|
-
"@opengeoweb/authentication": "4.
|
|
50
|
+
"@opengeoweb/authentication": "4.18.0",
|
|
51
51
|
"query-string": "^6.13.7",
|
|
52
52
|
"@emotion/react": "^11.10.4"
|
|
53
53
|
}
|