@opengeoweb/warnings 21.0.0 → 21.1.0-nightly-20261105
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/dist/index.esm.js +46 -40
- package/package.json +12 -12
package/dist/index.esm.js
CHANGED
|
@@ -13610,6 +13610,9 @@ var Form = function Form(_ref6) {
|
|
|
13610
13610
|
var _React$useState2 = React.useState(false),
|
|
13611
13611
|
isSaving = _React$useState2[0],
|
|
13612
13612
|
setIsSaving = _React$useState2[1];
|
|
13613
|
+
var _React$useState3 = React.useState(false),
|
|
13614
|
+
isAviationInDrawingMode = _React$useState3[0],
|
|
13615
|
+
setIsAviationInDrawingMode = _React$useState3[1];
|
|
13613
13616
|
var isSavingAviationDraftRef = React.useRef(false);
|
|
13614
13617
|
var _useTACApi = useTACApi(),
|
|
13615
13618
|
fetchSigmetTAC = _useTACApi.fetchSigmetTAC,
|
|
@@ -13639,12 +13642,12 @@ var Form = function Form(_ref6) {
|
|
|
13639
13642
|
};
|
|
13640
13643
|
}, [endOfWarningValidity, formState, onCloseForm]);
|
|
13641
13644
|
var initialPublicWarningArea = publicWarningDetails != null && (_publicWarningDetails = publicWarningDetails.areas) != null && _publicWarningDetails.length ? publicWarningDetails == null || (_publicWarningDetails2 = publicWarningDetails.areas[0]) == null ? void 0 : _publicWarningDetails2.geoJSON : undefined;
|
|
13642
|
-
var _React$
|
|
13643
|
-
warningGeoJSONFeature = _React$
|
|
13644
|
-
setWarningGeoJSONFeature = _React$
|
|
13645
|
-
var _React$
|
|
13646
|
-
originalWarningAreas = _React$
|
|
13647
|
-
setOriginalWarningAreas = _React$
|
|
13645
|
+
var _React$useState4 = React.useState(initialPublicWarningArea),
|
|
13646
|
+
warningGeoJSONFeature = _React$useState4[0],
|
|
13647
|
+
setWarningGeoJSONFeature = _React$useState4[1];
|
|
13648
|
+
var _React$useState5 = React.useState(publicWarningDetails == null ? void 0 : publicWarningDetails.areas),
|
|
13649
|
+
originalWarningAreas = _React$useState5[0],
|
|
13650
|
+
setOriginalWarningAreas = _React$useState5[1];
|
|
13648
13651
|
var _useWarningsTranslati = useWarningsTranslation(),
|
|
13649
13652
|
t = _useWarningsTranslati.t;
|
|
13650
13653
|
var _useFormContext = useFormContext(),
|
|
@@ -13661,6 +13664,7 @@ var Form = function Form(_ref6) {
|
|
|
13661
13664
|
DraftFieldHelper = _useDraftFormHelpers.DraftFieldHelper;
|
|
13662
13665
|
var areFieldsDisabled = isPublishing || isSaving;
|
|
13663
13666
|
var isPublicWarningInDrawingMode = warningType === 'public' && isDrawingModeActive;
|
|
13667
|
+
var isFormInDrawingMode = isPublicWarningInDrawingMode || isAviationInDrawingMode;
|
|
13664
13668
|
var isFormDirty = Object.keys(dirtyFields).length > 0;
|
|
13665
13669
|
useFormDirty({
|
|
13666
13670
|
isDirty: isFormDirty,
|
|
@@ -13696,30 +13700,30 @@ var Form = function Form(_ref6) {
|
|
|
13696
13700
|
}())();
|
|
13697
13701
|
}
|
|
13698
13702
|
};
|
|
13699
|
-
var onPressSave = function
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
-
|
|
13707
|
-
setIsSaving(true);
|
|
13708
|
-
_context5.n = 1;
|
|
13709
|
-
return onSaveForm(prepareFormValues(data))["catch"](function () {});
|
|
13710
|
-
case 1:
|
|
13711
|
-
setIsSaving(false);
|
|
13712
|
-
case 2:
|
|
13713
|
-
return _context5.a(2);
|
|
13703
|
+
var onPressSave = /*#__PURE__*/function () {
|
|
13704
|
+
var _ref1 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
|
|
13705
|
+
return _regenerator().w(function (_context5) {
|
|
13706
|
+
while (1) switch (_context5.n) {
|
|
13707
|
+
case 0:
|
|
13708
|
+
if (isSaving) {
|
|
13709
|
+
_context5.n = 2;
|
|
13710
|
+
break;
|
|
13714
13711
|
}
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13712
|
+
setIsSaving(true);
|
|
13713
|
+
// Drafts store the current values without running publication validation.
|
|
13714
|
+
_context5.n = 1;
|
|
13715
|
+
return onSaveForm(prepareFormValues(getValues()))["catch"](function () {});
|
|
13716
|
+
case 1:
|
|
13717
|
+
setIsSaving(false);
|
|
13718
|
+
case 2:
|
|
13719
|
+
return _context5.a(2);
|
|
13720
|
+
}
|
|
13721
|
+
}, _callee5);
|
|
13722
|
+
}));
|
|
13723
|
+
return function onPressSave() {
|
|
13724
|
+
return _ref1.apply(this, arguments);
|
|
13725
|
+
};
|
|
13726
|
+
}();
|
|
13723
13727
|
var showConfirmDialog = /*#__PURE__*/function () {
|
|
13724
13728
|
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(action) {
|
|
13725
13729
|
return _regenerator().w(function (_context6) {
|
|
@@ -13741,7 +13745,7 @@ var Form = function Form(_ref6) {
|
|
|
13741
13745
|
}
|
|
13742
13746
|
}, _callee6);
|
|
13743
13747
|
}));
|
|
13744
|
-
return function showConfirmDialog(
|
|
13748
|
+
return function showConfirmDialog(_x2) {
|
|
13745
13749
|
return _ref10.apply(this, arguments);
|
|
13746
13750
|
};
|
|
13747
13751
|
}();
|
|
@@ -13759,7 +13763,7 @@ var Form = function Form(_ref6) {
|
|
|
13759
13763
|
}
|
|
13760
13764
|
}, _callee7);
|
|
13761
13765
|
}));
|
|
13762
|
-
return function cancelAviationProduct(
|
|
13766
|
+
return function cancelAviationProduct(_x3) {
|
|
13763
13767
|
return _ref11.apply(this, arguments);
|
|
13764
13768
|
};
|
|
13765
13769
|
}();
|
|
@@ -13796,7 +13800,7 @@ var Form = function Form(_ref6) {
|
|
|
13796
13800
|
}
|
|
13797
13801
|
}, _callee8);
|
|
13798
13802
|
}));
|
|
13799
|
-
return function saveAviationDraft(
|
|
13803
|
+
return function saveAviationDraft(_x4, _x5) {
|
|
13800
13804
|
return _ref12.apply(this, arguments);
|
|
13801
13805
|
};
|
|
13802
13806
|
}();
|
|
@@ -13871,7 +13875,7 @@ var Form = function Form(_ref6) {
|
|
|
13871
13875
|
}
|
|
13872
13876
|
}, _callee9, null, [[4, 6, 7, 8], [0, 2]]);
|
|
13873
13877
|
}));
|
|
13874
|
-
return function (
|
|
13878
|
+
return function (_x8) {
|
|
13875
13879
|
return _ref14.apply(this, arguments);
|
|
13876
13880
|
};
|
|
13877
13881
|
}())();
|
|
@@ -13933,7 +13937,7 @@ var Form = function Form(_ref6) {
|
|
|
13933
13937
|
}
|
|
13934
13938
|
}, _callee0, null, [[0,, 4, 5]]);
|
|
13935
13939
|
}));
|
|
13936
|
-
return function (
|
|
13940
|
+
return function (_x9) {
|
|
13937
13941
|
return _ref15.apply(this, arguments);
|
|
13938
13942
|
};
|
|
13939
13943
|
}())();
|
|
@@ -13947,7 +13951,7 @@ var Form = function Form(_ref6) {
|
|
|
13947
13951
|
}
|
|
13948
13952
|
}, _callee1, null, [[11, 13, 14, 15], [7, 9]]);
|
|
13949
13953
|
}));
|
|
13950
|
-
return function handleSubmitAviationProduct(
|
|
13954
|
+
return function handleSubmitAviationProduct(_x6, _x7) {
|
|
13951
13955
|
return _ref13.apply(this, arguments);
|
|
13952
13956
|
};
|
|
13953
13957
|
}();
|
|
@@ -14099,7 +14103,7 @@ var Form = function Form(_ref6) {
|
|
|
14099
14103
|
}
|
|
14100
14104
|
}, _callee11);
|
|
14101
14105
|
}));
|
|
14102
|
-
function getTAC(
|
|
14106
|
+
function getTAC(_x0) {
|
|
14103
14107
|
return _getTAC.apply(this, arguments);
|
|
14104
14108
|
}
|
|
14105
14109
|
return getTAC;
|
|
@@ -14111,6 +14115,7 @@ var Form = function Form(_ref6) {
|
|
|
14111
14115
|
mode: mode,
|
|
14112
14116
|
product: selectedAviationProduct,
|
|
14113
14117
|
productConfig: aviationConfig,
|
|
14118
|
+
setDialogActionsDisabled: setIsAviationInDrawingMode,
|
|
14114
14119
|
showMap: false,
|
|
14115
14120
|
storedEndGeoJSON: storedEndGeoJSON,
|
|
14116
14121
|
storedGeoJSON: storedStartGeoJSON
|
|
@@ -14135,7 +14140,7 @@ var Form = function Form(_ref6) {
|
|
|
14135
14140
|
}
|
|
14136
14141
|
}, _callee12);
|
|
14137
14142
|
}));
|
|
14138
|
-
function getTAC(
|
|
14143
|
+
function getTAC(_x1) {
|
|
14139
14144
|
return _getTAC2.apply(this, arguments);
|
|
14140
14145
|
}
|
|
14141
14146
|
return getTAC;
|
|
@@ -14147,6 +14152,7 @@ var Form = function Form(_ref6) {
|
|
|
14147
14152
|
mode: mode,
|
|
14148
14153
|
product: selectedAviationProduct,
|
|
14149
14154
|
productConfig: aviationConfig,
|
|
14155
|
+
setDialogActionsDisabled: setIsAviationInDrawingMode,
|
|
14150
14156
|
showMap: false,
|
|
14151
14157
|
storedGeoJSON: storedStartGeoJSON
|
|
14152
14158
|
})
|
|
@@ -14353,7 +14359,7 @@ var Form = function Form(_ref6) {
|
|
|
14353
14359
|
sm: 4
|
|
14354
14360
|
},
|
|
14355
14361
|
children: jsx(Button, {
|
|
14356
|
-
disabled: areFieldsDisabled ||
|
|
14362
|
+
disabled: areFieldsDisabled || isFormInDrawingMode,
|
|
14357
14363
|
onClick: onPressDiscard,
|
|
14358
14364
|
sx: {
|
|
14359
14365
|
width: '100%',
|
|
@@ -14368,7 +14374,7 @@ var Form = function Form(_ref6) {
|
|
|
14368
14374
|
sm: 4
|
|
14369
14375
|
},
|
|
14370
14376
|
children: jsx(Button, {
|
|
14371
|
-
disabled: isPublishing || formState === 'amending' ||
|
|
14377
|
+
disabled: isPublishing || formState === 'amending' || isFormInDrawingMode,
|
|
14372
14378
|
onClick: function () {
|
|
14373
14379
|
var _onClick = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13() {
|
|
14374
14380
|
return _regenerator().w(function (_context13) {
|
|
@@ -14405,7 +14411,7 @@ var Form = function Form(_ref6) {
|
|
|
14405
14411
|
sm: 4
|
|
14406
14412
|
},
|
|
14407
14413
|
children: jsx(Button, {
|
|
14408
|
-
disabled: isSaving ||
|
|
14414
|
+
disabled: isSaving || isFormInDrawingMode,
|
|
14409
14415
|
onClick: function onClick() {
|
|
14410
14416
|
void (selectedAviationProduct ? handleSubmitAviationProduct(formState === 'amending' ? ProductAction.AMEND : ProductAction.PUBLISH, warningType) : onPressPublish());
|
|
14411
14417
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/warnings",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.1.0-nightly-20261105",
|
|
4
4
|
"description": "GeoWeb warinings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,24 +20,24 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/api": "21.
|
|
24
|
-
"@opengeoweb/shared": "21.
|
|
25
|
-
"@opengeoweb/store": "21.
|
|
26
|
-
"@opengeoweb/webmap-react": "21.
|
|
23
|
+
"@opengeoweb/api": "21.1.0-nightly-20261105",
|
|
24
|
+
"@opengeoweb/shared": "21.1.0-nightly-20261105",
|
|
25
|
+
"@opengeoweb/store": "21.1.0-nightly-20261105",
|
|
26
|
+
"@opengeoweb/webmap-react": "21.1.0-nightly-20261105",
|
|
27
27
|
"@tanstack/react-query": "^5.85.5",
|
|
28
28
|
"react-redux": "^9.2.0",
|
|
29
|
-
"@opengeoweb/theme": "21.
|
|
30
|
-
"@opengeoweb/form-fields": "21.
|
|
29
|
+
"@opengeoweb/theme": "21.1.0-nightly-20261105",
|
|
30
|
+
"@opengeoweb/form-fields": "21.1.0-nightly-20261105",
|
|
31
31
|
"react-hook-form": "^7.50.1",
|
|
32
32
|
"lodash": "^4.18.1",
|
|
33
33
|
"@reduxjs/toolkit": "^2.6.1",
|
|
34
|
-
"@opengeoweb/snackbar": "21.
|
|
34
|
+
"@opengeoweb/snackbar": "21.1.0-nightly-20261105",
|
|
35
35
|
"react-window": "^2.2.6",
|
|
36
36
|
"axios": "^1.20.0",
|
|
37
|
-
"@opengeoweb/core": "21.
|
|
38
|
-
"@opengeoweb/webmap": "21.
|
|
39
|
-
"@opengeoweb/authentication": "21.
|
|
40
|
-
"@opengeoweb/sigmet-airmet": "21.
|
|
37
|
+
"@opengeoweb/core": "21.1.0-nightly-20261105",
|
|
38
|
+
"@opengeoweb/webmap": "21.1.0-nightly-20261105",
|
|
39
|
+
"@opengeoweb/authentication": "21.1.0-nightly-20261105",
|
|
40
|
+
"@opengeoweb/sigmet-airmet": "21.1.0-nightly-20261105",
|
|
41
41
|
"react-i18next": "^15.1.1",
|
|
42
42
|
"i18next": "^25.0.1",
|
|
43
43
|
"@mui/material": "^9.0.1",
|