@opengeoweb/sigmet-airmet 4.8.0 → 4.9.1
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
CHANGED
|
@@ -1472,9 +1472,27 @@ var getProductFormLifecycleButtons = function getProductFormLifecycleButtons(can
|
|
|
1472
1472
|
var hasValue = function hasValue(value) {
|
|
1473
1473
|
return value !== null && value.toString() !== 'NaN';
|
|
1474
1474
|
};
|
|
1475
|
-
var
|
|
1475
|
+
var prepareFormValues = function prepareFormValues(product) {
|
|
1476
1476
|
return Object.keys(product).reduce(function (list, key) {
|
|
1477
|
-
var value = product[key]; //
|
|
1477
|
+
var value = product[key]; // remove hidden form values
|
|
1478
|
+
|
|
1479
|
+
if (key === 'IS_DRAFT') {
|
|
1480
|
+
return list;
|
|
1481
|
+
} // remove geometry if empty coordinates
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
if (key === 'endGeometry' || key === 'endGeometryIntersect' || key === 'startGeometry' || key === 'startGeometryIntersect') {
|
|
1485
|
+
if ((value === null || value === void 0 ? void 0 : value.features[0].geometry.type) === 'Polygon' && (value === null || value === void 0 ? void 0 : value.features[0].geometry.coordinates[0].length)) {
|
|
1486
|
+
return Object.assign(Object.assign({}, list), _defineProperty({}, key, value));
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
if ((value === null || value === void 0 ? void 0 : value.features[0].geometry.type) === 'Point' && (value === null || value === void 0 ? void 0 : value.features[0].geometry.coordinates.length)) {
|
|
1490
|
+
return Object.assign(Object.assign({}, list), _defineProperty({}, key, value));
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
return list;
|
|
1494
|
+
} // check if nested object has value
|
|
1495
|
+
|
|
1478
1496
|
|
|
1479
1497
|
if (_typeof(value) === 'object' && value !== null && value !== undefined) {
|
|
1480
1498
|
var hasNaNValue = Object.keys(value).reduce(function (total, valKey) {
|
|
@@ -1491,7 +1509,7 @@ var createSigmetPostParameter = function createSigmetPostParameter(sigmetToPost,
|
|
|
1491
1509
|
uuid: previousUuid
|
|
1492
1510
|
}) : sigmetToPost; // Do not send empty numbered fields to the BE to prevent errors
|
|
1493
1511
|
|
|
1494
|
-
var sigmet =
|
|
1512
|
+
var sigmet = prepareFormValues(sigmetIncludingUuid);
|
|
1495
1513
|
return {
|
|
1496
1514
|
changeStatusTo: newStatus,
|
|
1497
1515
|
sigmet: sigmet
|
|
@@ -1502,7 +1520,7 @@ var createAirmetPostParameter = function createAirmetPostParameter(airmetToPost,
|
|
|
1502
1520
|
uuid: previousUuid
|
|
1503
1521
|
}) : airmetToPost; // Do not send empty numbered fields to the BE to prevent errors
|
|
1504
1522
|
|
|
1505
|
-
var airmet =
|
|
1523
|
+
var airmet = prepareFormValues(airmetIncludingUuid);
|
|
1506
1524
|
return {
|
|
1507
1525
|
changeStatusTo: newStatus,
|
|
1508
1526
|
airmet: airmet
|
|
@@ -2275,7 +2293,8 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2275
2293
|
setValue = _useFormContext.setValue,
|
|
2276
2294
|
trigger = _useFormContext.trigger;
|
|
2277
2295
|
|
|
2278
|
-
var
|
|
2296
|
+
var isSigmet = productType === 'sigmet';
|
|
2297
|
+
var phenomenaList = isSigmet ? SigmetPhenomena : AirmetPhenomena;
|
|
2279
2298
|
var label = getFieldLabel('Phenomenon', isReadOnly);
|
|
2280
2299
|
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2281
2300
|
title: "What"
|
|
@@ -2293,15 +2312,17 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2293
2312
|
setValue('movementType', null);
|
|
2294
2313
|
}
|
|
2295
2314
|
|
|
2296
|
-
if (
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2315
|
+
if (!isSigmet) {
|
|
2316
|
+
if (getValues('phenomenon') !== 'SFC_VIS') {
|
|
2317
|
+
setValue('visibilityValue', null);
|
|
2318
|
+
setValue('visibilityCause', null);
|
|
2319
|
+
}
|
|
2300
2320
|
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2321
|
+
if (getValues('phenomenon') !== 'SFC_WIND') {
|
|
2322
|
+
setValue('windDirection', null);
|
|
2323
|
+
setValue('windUnit', null);
|
|
2324
|
+
setValue('windSpeed', null);
|
|
2325
|
+
}
|
|
2305
2326
|
}
|
|
2306
2327
|
|
|
2307
2328
|
_onChange();
|
|
@@ -3652,7 +3673,7 @@ var useTAC = function useTAC(initialProduct, getTAC) {
|
|
|
3652
3673
|
case 0:
|
|
3653
3674
|
_context.prev = 0;
|
|
3654
3675
|
_context.next = 3;
|
|
3655
|
-
return getTAC(product);
|
|
3676
|
+
return getTAC(prepareFormValues(product));
|
|
3656
3677
|
|
|
3657
3678
|
case 3:
|
|
3658
3679
|
result = _context.sent;
|
|
@@ -3694,10 +3715,14 @@ var useTAC = function useTAC(initialProduct, getTAC) {
|
|
|
3694
3715
|
} else if (isMounted.current) {
|
|
3695
3716
|
setTAC(noTAC);
|
|
3696
3717
|
}
|
|
3697
|
-
};
|
|
3698
|
-
|
|
3718
|
+
};
|
|
3699
3719
|
|
|
3700
|
-
var delayedQuery = React__default.
|
|
3720
|
+
var delayedQuery = React__default.useMemo(function () {
|
|
3721
|
+
return debounce(function (formFn) {
|
|
3722
|
+
return update(formFn());
|
|
3723
|
+
}, 1000);
|
|
3724
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3725
|
+
[]);
|
|
3701
3726
|
return [TAC, delayedQuery];
|
|
3702
3727
|
};
|
|
3703
3728
|
|
|
@@ -4103,8 +4128,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4103
4128
|
var _useFormContext = useFormContext(),
|
|
4104
4129
|
watch = _useFormContext.watch,
|
|
4105
4130
|
setValue = _useFormContext.setValue,
|
|
4106
|
-
handleSubmit = _useFormContext.handleSubmit
|
|
4107
|
-
getValues = _useFormContext.getValues;
|
|
4131
|
+
handleSubmit = _useFormContext.handleSubmit;
|
|
4108
4132
|
|
|
4109
4133
|
var _React$useState = React__default.useState(mode === 'view'),
|
|
4110
4134
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -4120,7 +4144,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4120
4144
|
updateTac = _useTAC2[1];
|
|
4121
4145
|
|
|
4122
4146
|
var onChangeForm = function onChangeForm() {
|
|
4123
|
-
updateTac(
|
|
4147
|
+
updateTac(watch);
|
|
4124
4148
|
}; // TODO: [Loes Cornelis]: fix this whole mess of if statements for isCancelSigmet and hidden fields if disabled throughout the form
|
|
4125
4149
|
|
|
4126
4150
|
|
|
@@ -4317,8 +4341,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4317
4341
|
var _useFormContext = useFormContext(),
|
|
4318
4342
|
watch = _useFormContext.watch,
|
|
4319
4343
|
setValue = _useFormContext.setValue,
|
|
4320
|
-
handleSubmit = _useFormContext.handleSubmit
|
|
4321
|
-
getValues = _useFormContext.getValues;
|
|
4344
|
+
handleSubmit = _useFormContext.handleSubmit;
|
|
4322
4345
|
|
|
4323
4346
|
var phenomenon = watch('phenomenon');
|
|
4324
4347
|
|
|
@@ -4336,7 +4359,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4336
4359
|
updateTac = _useTAC2[1];
|
|
4337
4360
|
|
|
4338
4361
|
var onChangeForm = function onChangeForm() {
|
|
4339
|
-
updateTac(
|
|
4362
|
+
updateTac(watch);
|
|
4340
4363
|
};
|
|
4341
4364
|
|
|
4342
4365
|
var initialGeometry = initialAirmet && !isCancelAirmet ? {
|
|
@@ -5067,18 +5090,16 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
|
|
|
5067
5090
|
|
|
5068
5091
|
React.useEffect(function () {
|
|
5069
5092
|
// set the values of the newly selected product
|
|
5070
|
-
reset(product !== null ? Object.assign({}, product) : {}
|
|
5093
|
+
reset(product !== null ? Object.assign({}, product) : {}, {
|
|
5094
|
+
keepDefaultValues: true
|
|
5095
|
+
});
|
|
5071
5096
|
return function () {
|
|
5072
5097
|
// reset form on unmount
|
|
5073
5098
|
reset({});
|
|
5074
5099
|
};
|
|
5075
5100
|
}, [reset, product]);
|
|
5076
5101
|
|
|
5077
|
-
var postProduct = function postProduct(
|
|
5078
|
-
// remove hidden helper fields
|
|
5079
|
-
_productToPost.IS_DRAFT;
|
|
5080
|
-
var productToPost = __rest(_productToPost, ["IS_DRAFT"]);
|
|
5081
|
-
|
|
5102
|
+
var postProduct = function postProduct(productToPost, newStatus) {
|
|
5082
5103
|
var uuid = product !== null && product.uuid ? product.uuid : null;
|
|
5083
5104
|
var postProductParam = productType === 'sigmet' ? createSigmetPostParameter(productToPost, newStatus, uuid) : createAirmetPostParameter(productToPost, newStatus, uuid);
|
|
5084
5105
|
setLoader(true);
|
|
@@ -5270,14 +5291,18 @@ var ProductFormDialog = function ProductFormDialog(_ref) {
|
|
|
5270
5291
|
return null;
|
|
5271
5292
|
}
|
|
5272
5293
|
|
|
5294
|
+
var product = productListItem !== null ? prepareProductValues(productListItem[productType], productType) : null;
|
|
5273
5295
|
return /*#__PURE__*/React.createElement(ReactHookFormProvider, {
|
|
5274
|
-
options: defaultFormOptions
|
|
5296
|
+
options: Object.assign(Object.assign({}, defaultFormOptions), {
|
|
5297
|
+
defaultValues: product,
|
|
5298
|
+
shouldUnregister: true
|
|
5299
|
+
})
|
|
5275
5300
|
}, /*#__PURE__*/React.createElement(ConfirmationServiceProvider, null, /*#__PURE__*/React.createElement(ProductFormDialogContent, {
|
|
5276
5301
|
isOpen: isOpen,
|
|
5277
5302
|
toggleDialogStatus: toggleDialogStatus,
|
|
5278
5303
|
mode: mode,
|
|
5279
5304
|
productCanBe: productCanBe,
|
|
5280
|
-
product:
|
|
5305
|
+
product: product,
|
|
5281
5306
|
productType: productType
|
|
5282
5307
|
})));
|
|
5283
5308
|
};
|
package/index.umd.js
CHANGED
|
@@ -1463,20 +1463,38 @@
|
|
|
1463
1463
|
var hasValue = function hasValue(value) {
|
|
1464
1464
|
return value !== null && value.toString() !== 'NaN';
|
|
1465
1465
|
};
|
|
1466
|
-
var
|
|
1466
|
+
var prepareFormValues = function prepareFormValues(product) {
|
|
1467
1467
|
return Object.keys(product).reduce(function (list, key) {
|
|
1468
|
-
var _a, _b;
|
|
1468
|
+
var _a, _b, _c, _d;
|
|
1469
|
+
|
|
1470
|
+
var value = product[key]; // remove hidden form values
|
|
1471
|
+
|
|
1472
|
+
if (key === 'IS_DRAFT') {
|
|
1473
|
+
return list;
|
|
1474
|
+
} // remove geometry if empty coordinates
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
if (key === 'endGeometry' || key === 'endGeometryIntersect' || key === 'startGeometry' || key === 'startGeometryIntersect') {
|
|
1478
|
+
if ((value === null || value === void 0 ? void 0 : value.features[0].geometry.type) === 'Polygon' && (value === null || value === void 0 ? void 0 : value.features[0].geometry.coordinates[0].length)) {
|
|
1479
|
+
return __assign(__assign({}, list), (_a = {}, _a[key] = value, _a));
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
if ((value === null || value === void 0 ? void 0 : value.features[0].geometry.type) === 'Point' && (value === null || value === void 0 ? void 0 : value.features[0].geometry.coordinates.length)) {
|
|
1483
|
+
return __assign(__assign({}, list), (_b = {}, _b[key] = value, _b));
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
return list;
|
|
1487
|
+
} // check if nested object has value
|
|
1469
1488
|
|
|
1470
|
-
var value = product[key]; // check if nested object has value
|
|
1471
1489
|
|
|
1472
1490
|
if (_typeof(value) === 'object' && value !== null && value !== undefined) {
|
|
1473
1491
|
var hasNaNValue = Object.keys(value).reduce(function (total, valKey) {
|
|
1474
1492
|
return !hasValue(value[valKey]) || total;
|
|
1475
1493
|
}, false);
|
|
1476
|
-
return __assign(__assign({}, list), !hasNaNValue && (
|
|
1494
|
+
return __assign(__assign({}, list), !hasNaNValue && (_c = {}, _c[key] = value, _c));
|
|
1477
1495
|
}
|
|
1478
1496
|
|
|
1479
|
-
return __assign(__assign({}, list), hasValue(value) && (
|
|
1497
|
+
return __assign(__assign({}, list), hasValue(value) && (_d = {}, _d[key] = value, _d));
|
|
1480
1498
|
}, {});
|
|
1481
1499
|
};
|
|
1482
1500
|
var createSigmetPostParameter = function createSigmetPostParameter(sigmetToPost, newStatus, previousUuid) {
|
|
@@ -1484,7 +1502,7 @@
|
|
|
1484
1502
|
uuid: previousUuid
|
|
1485
1503
|
}) : sigmetToPost; // Do not send empty numbered fields to the BE to prevent errors
|
|
1486
1504
|
|
|
1487
|
-
var sigmet =
|
|
1505
|
+
var sigmet = prepareFormValues(sigmetIncludingUuid);
|
|
1488
1506
|
return {
|
|
1489
1507
|
changeStatusTo: newStatus,
|
|
1490
1508
|
sigmet: sigmet
|
|
@@ -1495,7 +1513,7 @@
|
|
|
1495
1513
|
uuid: previousUuid
|
|
1496
1514
|
}) : airmetToPost; // Do not send empty numbered fields to the BE to prevent errors
|
|
1497
1515
|
|
|
1498
|
-
var airmet =
|
|
1516
|
+
var airmet = prepareFormValues(airmetIncludingUuid);
|
|
1499
1517
|
return {
|
|
1500
1518
|
changeStatusTo: newStatus,
|
|
1501
1519
|
airmet: airmet
|
|
@@ -2248,7 +2266,8 @@
|
|
|
2248
2266
|
setValue = _c.setValue,
|
|
2249
2267
|
trigger = _c.trigger;
|
|
2250
2268
|
|
|
2251
|
-
var
|
|
2269
|
+
var isSigmet = productType === 'sigmet';
|
|
2270
|
+
var phenomenaList = isSigmet ? SigmetPhenomena : AirmetPhenomena;
|
|
2252
2271
|
var label = getFieldLabel('Phenomenon', isReadOnly);
|
|
2253
2272
|
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2254
2273
|
title: "What"
|
|
@@ -2266,15 +2285,17 @@
|
|
|
2266
2285
|
setValue('movementType', null);
|
|
2267
2286
|
}
|
|
2268
2287
|
|
|
2269
|
-
if (
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2288
|
+
if (!isSigmet) {
|
|
2289
|
+
if (getValues('phenomenon') !== 'SFC_VIS') {
|
|
2290
|
+
setValue('visibilityValue', null);
|
|
2291
|
+
setValue('visibilityCause', null);
|
|
2292
|
+
}
|
|
2273
2293
|
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2294
|
+
if (getValues('phenomenon') !== 'SFC_WIND') {
|
|
2295
|
+
setValue('windDirection', null);
|
|
2296
|
+
setValue('windUnit', null);
|
|
2297
|
+
setValue('windSpeed', null);
|
|
2298
|
+
}
|
|
2278
2299
|
}
|
|
2279
2300
|
|
|
2280
2301
|
_onChange();
|
|
@@ -3570,7 +3591,7 @@
|
|
|
3570
3591
|
|
|
3571
3592
|
return [4
|
|
3572
3593
|
/*yield*/
|
|
3573
|
-
, getTAC(product)];
|
|
3594
|
+
, getTAC(prepareFormValues(product))];
|
|
3574
3595
|
|
|
3575
3596
|
case 1:
|
|
3576
3597
|
result = _a.sent();
|
|
@@ -3616,10 +3637,14 @@
|
|
|
3616
3637
|
} else if (isMounted.current) {
|
|
3617
3638
|
setTAC(noTAC);
|
|
3618
3639
|
}
|
|
3619
|
-
};
|
|
3620
|
-
|
|
3640
|
+
};
|
|
3621
3641
|
|
|
3622
|
-
var delayedQuery = React__default["default"].
|
|
3642
|
+
var delayedQuery = React__default["default"].useMemo(function () {
|
|
3643
|
+
return lodash.debounce(function (formFn) {
|
|
3644
|
+
return update(formFn());
|
|
3645
|
+
}, 1000);
|
|
3646
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3647
|
+
[]);
|
|
3623
3648
|
return [TAC, delayedQuery];
|
|
3624
3649
|
};
|
|
3625
3650
|
|
|
@@ -3992,8 +4017,7 @@
|
|
|
3992
4017
|
var _f = reactHookForm.useFormContext(),
|
|
3993
4018
|
watch = _f.watch,
|
|
3994
4019
|
setValue = _f.setValue,
|
|
3995
|
-
handleSubmit = _f.handleSubmit
|
|
3996
|
-
getValues = _f.getValues;
|
|
4020
|
+
handleSubmit = _f.handleSubmit;
|
|
3997
4021
|
|
|
3998
4022
|
var _g = __read(React__default["default"].useState(mode === 'view'), 2),
|
|
3999
4023
|
isDisabled = _g[0],
|
|
@@ -4007,7 +4031,7 @@
|
|
|
4007
4031
|
updateTac = _h[1];
|
|
4008
4032
|
|
|
4009
4033
|
var onChangeForm = function onChangeForm() {
|
|
4010
|
-
updateTac(
|
|
4034
|
+
updateTac(watch);
|
|
4011
4035
|
}; // TODO: [Loes Cornelis]: fix this whole mess of if statements for isCancelSigmet and hidden fields if disabled throughout the form
|
|
4012
4036
|
|
|
4013
4037
|
|
|
@@ -4202,8 +4226,7 @@
|
|
|
4202
4226
|
var _f = reactHookForm.useFormContext(),
|
|
4203
4227
|
watch = _f.watch,
|
|
4204
4228
|
setValue = _f.setValue,
|
|
4205
|
-
handleSubmit = _f.handleSubmit
|
|
4206
|
-
getValues = _f.getValues;
|
|
4229
|
+
handleSubmit = _f.handleSubmit;
|
|
4207
4230
|
|
|
4208
4231
|
var phenomenon = watch('phenomenon');
|
|
4209
4232
|
|
|
@@ -4219,7 +4242,7 @@
|
|
|
4219
4242
|
updateTac = _h[1];
|
|
4220
4243
|
|
|
4221
4244
|
var onChangeForm = function onChangeForm() {
|
|
4222
|
-
updateTac(
|
|
4245
|
+
updateTac(watch);
|
|
4223
4246
|
};
|
|
4224
4247
|
|
|
4225
4248
|
var initialGeometry = initialAirmet && !isCancelAirmet ? {
|
|
@@ -4956,18 +4979,16 @@
|
|
|
4956
4979
|
|
|
4957
4980
|
React__namespace.useEffect(function () {
|
|
4958
4981
|
// set the values of the newly selected product
|
|
4959
|
-
reset(product !== null ? __assign({}, product) : {}
|
|
4982
|
+
reset(product !== null ? __assign({}, product) : {}, {
|
|
4983
|
+
keepDefaultValues: true
|
|
4984
|
+
});
|
|
4960
4985
|
return function () {
|
|
4961
4986
|
// reset form on unmount
|
|
4962
4987
|
reset({});
|
|
4963
4988
|
};
|
|
4964
4989
|
}, [reset, product]);
|
|
4965
4990
|
|
|
4966
|
-
var postProduct = function postProduct(
|
|
4967
|
-
// remove hidden helper fields
|
|
4968
|
-
_productToPost.IS_DRAFT;
|
|
4969
|
-
var productToPost = __rest(_productToPost, ["IS_DRAFT"]);
|
|
4970
|
-
|
|
4991
|
+
var postProduct = function postProduct(productToPost, newStatus) {
|
|
4971
4992
|
var uuid = product !== null && product.uuid ? product.uuid : null;
|
|
4972
4993
|
var postProductParam = productType === 'sigmet' ? createSigmetPostParameter(productToPost, newStatus, uuid) : createAirmetPostParameter(productToPost, newStatus, uuid);
|
|
4973
4994
|
setLoader(true);
|
|
@@ -5143,14 +5164,18 @@
|
|
|
5143
5164
|
return null;
|
|
5144
5165
|
}
|
|
5145
5166
|
|
|
5167
|
+
var product = productListItem !== null ? prepareProductValues(productListItem[productType], productType) : null;
|
|
5146
5168
|
return /*#__PURE__*/React__namespace.createElement(formFields.ReactHookFormProvider, {
|
|
5147
|
-
options: formFields.defaultFormOptions
|
|
5169
|
+
options: __assign(__assign({}, formFields.defaultFormOptions), {
|
|
5170
|
+
defaultValues: product,
|
|
5171
|
+
shouldUnregister: true
|
|
5172
|
+
})
|
|
5148
5173
|
}, /*#__PURE__*/React__namespace.createElement(shared.ConfirmationServiceProvider, null, /*#__PURE__*/React__namespace.createElement(ProductFormDialogContent, {
|
|
5149
5174
|
isOpen: isOpen,
|
|
5150
5175
|
toggleDialogStatus: toggleDialogStatus,
|
|
5151
5176
|
mode: mode,
|
|
5152
5177
|
productCanBe: productCanBe,
|
|
5153
|
-
product:
|
|
5178
|
+
product: product,
|
|
5154
5179
|
productType: productType
|
|
5155
5180
|
})));
|
|
5156
5181
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CancelSigmet, Sigmet, Airmet, CancelAirmet } from '../../types';
|
|
3
|
+
declare type AviationProduct = Sigmet | CancelSigmet | Airmet | CancelAirmet;
|
|
3
4
|
export declare const noTAC = "Missing data: no TAC can be generated";
|
|
4
|
-
export declare const shouldRetrieveTAC: (product:
|
|
5
|
-
export declare const useTAC: (initialProduct:
|
|
5
|
+
export declare const shouldRetrieveTAC: (product: AviationProduct) => boolean;
|
|
6
|
+
export declare const useTAC: (initialProduct: AviationProduct, getTAC: (product: AviationProduct) => Promise<{
|
|
6
7
|
data: string;
|
|
7
8
|
}>) => [string, any];
|
|
8
9
|
interface ProductFormTACProps {
|
|
@@ -27,7 +27,7 @@ export declare const getProductFormMode: (canBeOptions: ProductCanbe[], productL
|
|
|
27
27
|
export declare const getProductFormLifecycleButtons: (canBe: string[], onButtonPress: (newStatus: ProductStatus | 'DISCARDED') => void) => React.ReactElement;
|
|
28
28
|
declare type Product = Sigmet | Airmet | CancelSigmet | CancelAirmet;
|
|
29
29
|
export declare const hasValue: (value: number) => boolean;
|
|
30
|
-
export declare const
|
|
30
|
+
export declare const prepareFormValues: <T extends Product>(product: T) => T;
|
|
31
31
|
export declare const createSigmetPostParameter: (sigmetToPost: Sigmet | CancelSigmet, newStatus: ProductStatus, previousUuid: string) => SigmetFromFrontend;
|
|
32
32
|
export declare const createAirmetPostParameter: (airmetToPost: Airmet | CancelAirmet, newStatus: ProductStatus, previousUuid: string) => AirmetFromFrontend;
|
|
33
33
|
export declare const useDelayedFormValues: (getValues: () => void, register: () => void, delay?: number) => [unknown, () => void];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.9.1",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"react": "^17.0.2",
|
|
15
15
|
"react-redux": "^8.0.4",
|
|
16
16
|
"@mui/material": "^5.10.8",
|
|
17
|
-
"@opengeoweb/shared": "4.
|
|
18
|
-
"@opengeoweb/theme": "4.
|
|
17
|
+
"@opengeoweb/shared": "4.9.1",
|
|
18
|
+
"@opengeoweb/theme": "4.9.1",
|
|
19
19
|
"react-draggable": "^4.4.5",
|
|
20
20
|
"re-resizable": "^6.9.0",
|
|
21
21
|
"@redux-eggs/core": "^2.2.0",
|
|
22
|
-
"@opengeoweb/form-fields": "4.
|
|
22
|
+
"@opengeoweb/form-fields": "4.9.1",
|
|
23
23
|
"react-hook-form": "^7.41.5",
|
|
24
24
|
"moment": "^2.29.0",
|
|
25
25
|
"moment-timezone": "^0.5.31",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"lodash": "^4.17.20",
|
|
28
28
|
"axios": "^0.25.0",
|
|
29
29
|
"date-fns": "^2.29.3",
|
|
30
|
-
"@opengeoweb/core": "4.
|
|
31
|
-
"@opengeoweb/webmap": "4.
|
|
30
|
+
"@opengeoweb/core": "4.9.1",
|
|
31
|
+
"@opengeoweb/webmap": "4.9.1",
|
|
32
32
|
"throttle-debounce": "^3.0.1",
|
|
33
33
|
"proj4": "^2.6.2",
|
|
34
|
-
"@opengeoweb/api": "4.
|
|
34
|
+
"@opengeoweb/api": "4.9.1",
|
|
35
35
|
"react-intl": "^5.17.5",
|
|
36
36
|
"react-sortablejs": "^6.1.4",
|
|
37
37
|
"sortablejs": "^1.15.0",
|