@opengeoweb/sigmet-airmet 12.2.0 → 12.4.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 +162 -109
- package/package.json +15 -15
- package/src/lib/components/ProductForms/ProductForm.styles.d.ts +4 -0
- package/src/lib/components/ProductForms/ProductFormDialogContent.d.ts +2 -1
- package/src/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.d.ts +2 -2
- package/src/lib/components/ProductForms/ProductFormFields/Progress.d.ts +1 -0
- package/src/lib/components/ProductForms/ProductFormFields/StartGeometry.d.ts +1 -0
- package/src/lib/components/ProductForms/useStoredGeoJSONHandling.d.ts +1 -0
- package/src/lib/components/ProductForms/utils.d.ts +4 -4
- package/src/lib/types.d.ts +1 -0
- package/src/lib/utils/testUtils.d.ts +0 -2
package/index.esm.js
CHANGED
|
@@ -4,17 +4,17 @@ import { PROJECTION, useIsMounted, dateUtils, CustomTooltip, ConfirmationService
|
|
|
4
4
|
import { Box as Box$1 } from '@mui/system';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import React__default, { useRef, useEffect, useCallback } from 'react';
|
|
7
|
-
import { FormControlLabel, Radio,
|
|
7
|
+
import { FormControlLabel, Radio, Grid, Typography, Box, Checkbox, MenuItem, FormHelperText, useTheme, Backdrop, CircularProgress, Card, Button, LinearProgress, List, ListItemButton } from '@mui/material';
|
|
8
8
|
import { useFormContext } from 'react-hook-form';
|
|
9
9
|
import { FORM_FIELDS_NAMESPACE, useDraftFormHelpers, ReactHookFormRadioGroup, hasValidGeometry, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMin, isValidMax, isEmpty, ReactHookFormDateTime, countIntersectionPoints, hasMulitpleIntersections, ReactHookFormHiddenInput, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isMaximumOneDrawing, isXHoursBefore, isXHoursAfter, ReactHookFormTextField, isLatitude, isNonOrBothCoordinates, isLongitude, ReactHookFormFormControl, isGeometryDirty, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
|
|
10
10
|
import { defaultIntersectionStyleProperties, defaultGeoJSONStyleProperties, addSelectionTypeToGeoJSON, DRAWMODE, defaultPoint, addGeoJSONProperties, defaultBox, defaultPolygon, defaultDelete, getIcon, OpenLayersFeatureLayer, genericOpenLayersFeatureStyle, OpenLayersMapDraw, useMapDrawTool, addFeatureProperties, rewindGeometry } from '@opengeoweb/webmap-react';
|
|
11
11
|
import i18n from 'i18next';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
13
|
import { LegendConnect, OlMapViewConnect, TimeSliderConnect } from '@opengeoweb/core';
|
|
14
|
-
import {
|
|
15
|
-
import { uiSelectors, useUpdateSharedData, mapSelectors, syncGroupsActions, layerActions, mapActions, defaultLayers, syncConstants, genericSelectors, drawingToolActions } from '@opengeoweb/store';
|
|
14
|
+
import { uiSelectors, useUpdateSharedData, mapSelectors, syncGroupsActions, layerActions, mapActions, defaultLayers, syncConstants, uiActions, uiTypes, genericSelectors, drawingToolActions } from '@opengeoweb/store';
|
|
16
15
|
import { DrawFIRLand, Edit, Success, Clock } from '@opengeoweb/theme';
|
|
17
16
|
import { LayerType, webmapUtils } from '@opengeoweb/webmap';
|
|
17
|
+
import { useSelector, useDispatch, shallowEqual } from 'react-redux';
|
|
18
18
|
import { debounce } from 'lodash';
|
|
19
19
|
import { useAuthenticationContext } from '@opengeoweb/authentication';
|
|
20
20
|
|
|
@@ -43,6 +43,7 @@ var en = {
|
|
|
43
43
|
close: "Close",
|
|
44
44
|
"discard-non-capitalized": "Discard",
|
|
45
45
|
"are-you-sure-you-want-to-discard": "Are you sure you would like to discard this {{product}}? Its properties will be lost",
|
|
46
|
+
"are-you-sure-amend": "Are you sure you want to amend this {{product}}?",
|
|
46
47
|
"save-changes-made": "Do you want to save any changes made?",
|
|
47
48
|
"publish-this-product": "Are you sure you want to publish this {{product}}?",
|
|
48
49
|
"cancel-this-product": "Are you sure you want to cancel this {{product}}?",
|
|
@@ -55,6 +56,7 @@ var en = {
|
|
|
55
56
|
"remove-geometry": "Remove geometry",
|
|
56
57
|
"valid-until-time": "Valid until time has to be after Valid from time",
|
|
57
58
|
"discard-product": "Discard {{product}}",
|
|
59
|
+
"amend-product": "Amend {{product}}",
|
|
58
60
|
"issue-time": "Issue time",
|
|
59
61
|
"type-title": "Type",
|
|
60
62
|
"phenomenon-title": "What",
|
|
@@ -166,6 +168,7 @@ var fi = {
|
|
|
166
168
|
close: "Sulje",
|
|
167
169
|
"discard-non-capitalized": "Hylkää",
|
|
168
170
|
"are-you-sure-you-want-to-discard": "Oletko varma, että haluat hylätä kyseisen {{product}}? Kaikki ilmoitetut tiedot menetetään",
|
|
171
|
+
"are-you-sure-amend": "Are you sure you want to amend this {{product}}?",
|
|
169
172
|
"save-changes-made": "Haluatko tallentaa kaikki tehdyt muutokset?",
|
|
170
173
|
"publish-this-product": "Oletko varma, että haluat julkaista tämän {{product}}:n?",
|
|
171
174
|
"cancel-this-product": "Oletko varma, että haluat peruuttaa tämän {{product}}:n?",
|
|
@@ -178,6 +181,7 @@ var fi = {
|
|
|
178
181
|
"remove-geometry": "Poista geometria",
|
|
179
182
|
"valid-until-time": "Voimassaoloajan päättymishetken on oltava voimassaoloajan alkuhetken jälkeen",
|
|
180
183
|
"discard-product": "Hylkää {{product}}",
|
|
184
|
+
"amend-product": "Amend {{product}}",
|
|
181
185
|
"issue-time": "Julkaisuaika",
|
|
182
186
|
"type-title": "Tyyppi",
|
|
183
187
|
"phenomenon-title": "Mikä",
|
|
@@ -289,6 +293,7 @@ var no = {
|
|
|
289
293
|
close: "Lukk",
|
|
290
294
|
"discard-non-capitalized": "Forkast",
|
|
291
295
|
"are-you-sure-you-want-to-discard": "Er du sikker på at du vil forkaste dette {{product}}?",
|
|
296
|
+
"are-you-sure-amend": "Are you sure you want to amend this {{product}}?",
|
|
292
297
|
"save-changes-made": "Vil du lagre endringene dine?",
|
|
293
298
|
"publish-this-product": "Er du sikker på at du vil endre dette {{product}}?",
|
|
294
299
|
"cancel-this-product": "Er du sikker på at du vil avbryte dette {{product}}?",
|
|
@@ -301,6 +306,7 @@ var no = {
|
|
|
301
306
|
"remove-geometry": "Fjern geometry",
|
|
302
307
|
"valid-until-time": "Gyldig til tid må være etter Gyldig fra tid",
|
|
303
308
|
"discard-product": "Forkast {{product}}",
|
|
309
|
+
"amend-product": "Amend {{product}}",
|
|
304
310
|
"issue-time": "Utstedt tid",
|
|
305
311
|
"type-title": "Type",
|
|
306
312
|
"phenomenon-title": "Hva",
|
|
@@ -411,6 +417,7 @@ var nl = {
|
|
|
411
417
|
close: "Sluit",
|
|
412
418
|
"discard-non-capitalized": "Weggooien",
|
|
413
419
|
"are-you-sure-you-want-to-discard": "Weet je zeker dat je dit {{product}} wilt weggooien? De eigenschappen ervan zullen verloren gaan",
|
|
420
|
+
"are-you-sure-amend": "Weet je zeker dat je deze {{product}} wil aanpassen?",
|
|
414
421
|
"save-changes-made": "Wil je de aangebrachte wijzigingen opslaan?",
|
|
415
422
|
"publish-this-product": "Weet je zeker dat je dit {{product}} wilt publiceren?",
|
|
416
423
|
"cancel-this-product": "Weet je zeker dat je dit {{product}} wilt annuleren?",
|
|
@@ -423,6 +430,7 @@ var nl = {
|
|
|
423
430
|
"remove-geometry": "Verwijder geometrie",
|
|
424
431
|
"valid-until-time": "Eind tijd moet na tijd vanaf zijn",
|
|
425
432
|
"discard-product": "Gooi {{product}} weg",
|
|
433
|
+
"amend-product": "Pas {{product}} aan",
|
|
426
434
|
"issue-time": "Uitgiftetijd",
|
|
427
435
|
"type-title": "Type",
|
|
428
436
|
"phenomenon-title": "Wat",
|
|
@@ -624,6 +632,7 @@ var ProductAction;
|
|
|
624
632
|
ProductAction["PUBLISH"] = "PUBLISH";
|
|
625
633
|
ProductAction["CANCEL"] = "CANCEL";
|
|
626
634
|
ProductAction["RENEW"] = "RENEW";
|
|
635
|
+
ProductAction["AMEND"] = "AMEND";
|
|
627
636
|
ProductAction["SAVE"] = "SAVE";
|
|
628
637
|
ProductAction["DISCARD"] = "DISCARD";
|
|
629
638
|
ProductAction["DUPLICATE"] = "DUPLICATE";
|
|
@@ -4645,6 +4654,10 @@ var styles$2 = {
|
|
|
4645
4654
|
'.MuiButtonBase-root.MuiIconButton-root': {
|
|
4646
4655
|
padding: '2px',
|
|
4647
4656
|
marginLeft: '-4px'
|
|
4657
|
+
},
|
|
4658
|
+
'.MuiPickersSectionList-root': {
|
|
4659
|
+
paddingTop: '15px',
|
|
4660
|
+
paddingBottom: '2px'
|
|
4648
4661
|
}
|
|
4649
4662
|
}
|
|
4650
4663
|
};
|
|
@@ -4677,11 +4690,11 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
|
|
|
4677
4690
|
var title = _ref.title,
|
|
4678
4691
|
children = _ref.children,
|
|
4679
4692
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
4680
|
-
return jsxs(
|
|
4693
|
+
return jsxs(Grid, Object.assign({
|
|
4681
4694
|
container: true,
|
|
4682
4695
|
spacing: 3
|
|
4683
4696
|
}, props, {
|
|
4684
|
-
children: [jsx(
|
|
4697
|
+
children: [jsx(Grid, {
|
|
4685
4698
|
container: true,
|
|
4686
4699
|
justifyContent: "flex-end",
|
|
4687
4700
|
size: 4,
|
|
@@ -4690,7 +4703,7 @@ var ProductFormFieldLayout = function ProductFormFieldLayout(_ref) {
|
|
|
4690
4703
|
sx: styles$2.label,
|
|
4691
4704
|
children: title
|
|
4692
4705
|
})
|
|
4693
|
-
}), jsx(
|
|
4706
|
+
}), jsx(Grid, {
|
|
4694
4707
|
container: true,
|
|
4695
4708
|
justifyContent: "flex-start",
|
|
4696
4709
|
size: 8,
|
|
@@ -5125,35 +5138,40 @@ var useDelayedFormValues = function useDelayedFormValues(getValues, register, de
|
|
|
5125
5138
|
};
|
|
5126
5139
|
var getConfirmationDialogTitle = function getConfirmationDialogTitle(t, action, productType) {
|
|
5127
5140
|
var product = productType.toUpperCase();
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5141
|
+
switch (action) {
|
|
5142
|
+
case ProductAction.CLOSE:
|
|
5143
|
+
return t('close') + " " + product;
|
|
5144
|
+
case ProductAction.DISCARD:
|
|
5145
|
+
return t('discard-non-capitalized') + " " + product;
|
|
5146
|
+
case ProductAction.PUBLISH:
|
|
5147
|
+
case ProductAction.AMEND:
|
|
5148
|
+
return t('publish');
|
|
5149
|
+
default:
|
|
5150
|
+
return t('cancel') + " " + product;
|
|
5136
5151
|
}
|
|
5137
|
-
return t('cancel') + " " + product;
|
|
5138
5152
|
};
|
|
5139
5153
|
var getConfirmationDialogContent = function getConfirmationDialogContent(t, action, productType) {
|
|
5140
5154
|
var product = productType.toUpperCase();
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5155
|
+
switch (action) {
|
|
5156
|
+
case ProductAction.DISCARD:
|
|
5157
|
+
return t('are-you-sure-you-want-to-discard', {
|
|
5158
|
+
product: product
|
|
5159
|
+
});
|
|
5160
|
+
case ProductAction.AMEND:
|
|
5161
|
+
return t('are-you-sure-amend', {
|
|
5162
|
+
product: product
|
|
5163
|
+
});
|
|
5164
|
+
case ProductAction.CLOSE:
|
|
5165
|
+
return t('save-changes-made');
|
|
5166
|
+
case ProductAction.PUBLISH:
|
|
5167
|
+
return t('publish-this-product', {
|
|
5168
|
+
product: product
|
|
5169
|
+
});
|
|
5170
|
+
default:
|
|
5171
|
+
return t('cancel-this-product', {
|
|
5172
|
+
product: product
|
|
5173
|
+
});
|
|
5153
5174
|
}
|
|
5154
|
-
return t('cancel-this-product', {
|
|
5155
|
-
product: product
|
|
5156
|
-
});
|
|
5157
5175
|
};
|
|
5158
5176
|
var getConfirmationDialogButtonLabel = function getConfirmationDialogButtonLabel(t, action, productType) {
|
|
5159
5177
|
var product = productType.toUpperCase();
|
|
@@ -5162,6 +5180,10 @@ var getConfirmationDialogButtonLabel = function getConfirmationDialogButtonLabel
|
|
|
5162
5180
|
return "" + t('discard-product', {
|
|
5163
5181
|
product: product
|
|
5164
5182
|
});
|
|
5183
|
+
case ProductAction.AMEND:
|
|
5184
|
+
return "" + t('amend-product', {
|
|
5185
|
+
product: product
|
|
5186
|
+
});
|
|
5165
5187
|
case ProductAction.PUBLISH:
|
|
5166
5188
|
return t('publish');
|
|
5167
5189
|
case ProductAction.CANCEL:
|
|
@@ -5518,12 +5540,12 @@ var Levels = function Levels(_ref) {
|
|
|
5518
5540
|
checked: levelInfoMode === 'AT' || levelInfoMode === 'TOPS',
|
|
5519
5541
|
"data-testid": "levels-AT",
|
|
5520
5542
|
disabled: fieldsDisabled
|
|
5521
|
-
}), (levelInfoMode === 'AT' || levelInfoMode === 'TOPS') && !isRadioactiveCloud ? jsxs(
|
|
5543
|
+
}), (levelInfoMode === 'AT' || levelInfoMode === 'TOPS') && !isRadioactiveCloud ? jsxs(Grid, {
|
|
5522
5544
|
container: true,
|
|
5523
5545
|
spacing: 2,
|
|
5524
5546
|
justifyItems: "flex-end",
|
|
5525
5547
|
alignItems: "flex-start",
|
|
5526
|
-
children: [jsx(
|
|
5548
|
+
children: [jsx(Grid, {
|
|
5527
5549
|
size: {
|
|
5528
5550
|
xs: 12,
|
|
5529
5551
|
md: 3
|
|
@@ -5542,7 +5564,7 @@ var Levels = function Levels(_ref) {
|
|
|
5542
5564
|
"data-testid": "levels-TOPS",
|
|
5543
5565
|
label: t('levels-tops-label')
|
|
5544
5566
|
})
|
|
5545
|
-
}), jsx(
|
|
5567
|
+
}), jsx(Grid, {
|
|
5546
5568
|
size: {
|
|
5547
5569
|
xs: 4,
|
|
5548
5570
|
md: 3
|
|
@@ -5571,7 +5593,7 @@ var Levels = function Levels(_ref) {
|
|
|
5571
5593
|
}, key);
|
|
5572
5594
|
})
|
|
5573
5595
|
})
|
|
5574
|
-
}), jsx(
|
|
5596
|
+
}), jsx(Grid, {
|
|
5575
5597
|
size: {
|
|
5576
5598
|
xs: 8,
|
|
5577
5599
|
md: 6
|
|
@@ -5623,15 +5645,15 @@ var Levels = function Levels(_ref) {
|
|
|
5623
5645
|
"data-testid": "levels-BETW",
|
|
5624
5646
|
disabled: fieldsDisabled
|
|
5625
5647
|
}), levelInfoMode === 'BETW' || levelInfoMode === 'BETW_SFC' ? jsxs(Fragment, {
|
|
5626
|
-
children: [jsxs(
|
|
5648
|
+
children: [jsxs(Grid, {
|
|
5627
5649
|
container: true,
|
|
5628
5650
|
spacing: 2,
|
|
5629
|
-
children: [jsx(
|
|
5651
|
+
children: [jsx(Grid, {
|
|
5630
5652
|
size: {
|
|
5631
5653
|
xs: 12,
|
|
5632
5654
|
md: 3
|
|
5633
5655
|
}
|
|
5634
|
-
}), jsx(
|
|
5656
|
+
}), jsx(Grid, {
|
|
5635
5657
|
size: {
|
|
5636
5658
|
xs: 4,
|
|
5637
5659
|
md: 3
|
|
@@ -5666,7 +5688,7 @@ var Levels = function Levels(_ref) {
|
|
|
5666
5688
|
}, key);
|
|
5667
5689
|
})
|
|
5668
5690
|
})
|
|
5669
|
-
}), jsx(
|
|
5691
|
+
}), jsx(Grid, {
|
|
5670
5692
|
size: {
|
|
5671
5693
|
xs: 8,
|
|
5672
5694
|
md: 6
|
|
@@ -5715,12 +5737,12 @@ var Levels = function Levels(_ref) {
|
|
|
5715
5737
|
autoFocus: true
|
|
5716
5738
|
})
|
|
5717
5739
|
})]
|
|
5718
|
-
}), jsxs(
|
|
5740
|
+
}), jsxs(Grid, {
|
|
5719
5741
|
container: true,
|
|
5720
5742
|
spacing: 2,
|
|
5721
5743
|
justifyItems: "flex-end",
|
|
5722
5744
|
alignItems: "flex-start",
|
|
5723
|
-
children: [jsx(
|
|
5745
|
+
children: [jsx(Grid, {
|
|
5724
5746
|
size: {
|
|
5725
5747
|
xs: 12,
|
|
5726
5748
|
md: 3
|
|
@@ -5742,7 +5764,7 @@ var Levels = function Levels(_ref) {
|
|
|
5742
5764
|
label: "SFC"
|
|
5743
5765
|
})
|
|
5744
5766
|
}), levelInfoMode !== 'BETW_SFC' && jsxs(Fragment, {
|
|
5745
|
-
children: [jsx(
|
|
5767
|
+
children: [jsx(Grid, {
|
|
5746
5768
|
size: {
|
|
5747
5769
|
xs: 4,
|
|
5748
5770
|
md: 3
|
|
@@ -5777,7 +5799,7 @@ var Levels = function Levels(_ref) {
|
|
|
5777
5799
|
}, key);
|
|
5778
5800
|
})
|
|
5779
5801
|
})
|
|
5780
|
-
}), jsx(
|
|
5802
|
+
}), jsx(Grid, {
|
|
5781
5803
|
size: {
|
|
5782
5804
|
xs: 8,
|
|
5783
5805
|
md: 6
|
|
@@ -5834,12 +5856,12 @@ var Levels = function Levels(_ref) {
|
|
|
5834
5856
|
disabled: fieldsDisabled,
|
|
5835
5857
|
checked: levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV',
|
|
5836
5858
|
"data-testid": "levels-ABV"
|
|
5837
|
-
}), levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV' ? jsxs(
|
|
5859
|
+
}), levelInfoMode === 'ABV' || levelInfoMode === 'TOPS_ABV' ? jsxs(Grid, {
|
|
5838
5860
|
container: true,
|
|
5839
5861
|
spacing: 2,
|
|
5840
5862
|
justifyItems: "flex-end",
|
|
5841
5863
|
alignItems: "flex-start",
|
|
5842
|
-
children: [jsx(
|
|
5864
|
+
children: [jsx(Grid, {
|
|
5843
5865
|
size: {
|
|
5844
5866
|
xs: 12,
|
|
5845
5867
|
md: 3
|
|
@@ -5857,7 +5879,7 @@ var Levels = function Levels(_ref) {
|
|
|
5857
5879
|
label: t('levels-tops-label'),
|
|
5858
5880
|
"data-testid": "levels-TOPS_ABV"
|
|
5859
5881
|
})
|
|
5860
|
-
}), jsx(
|
|
5882
|
+
}), jsx(Grid, {
|
|
5861
5883
|
size: {
|
|
5862
5884
|
xs: 4,
|
|
5863
5885
|
md: 3
|
|
@@ -5886,7 +5908,7 @@ var Levels = function Levels(_ref) {
|
|
|
5886
5908
|
}, key);
|
|
5887
5909
|
})
|
|
5888
5910
|
})
|
|
5889
|
-
}), jsx(
|
|
5911
|
+
}), jsx(Grid, {
|
|
5890
5912
|
size: {
|
|
5891
5913
|
xs: 8,
|
|
5892
5914
|
md: 6
|
|
@@ -6166,7 +6188,9 @@ var Progress = function Progress(_ref) {
|
|
|
6166
6188
|
_ref$onChangeTool = _ref.onChangeTool,
|
|
6167
6189
|
onChangeTool = _ref$onChangeTool === void 0 ? function () {} : _ref$onChangeTool,
|
|
6168
6190
|
geoJSON = _ref.geoJSON,
|
|
6169
|
-
geoJSONIntersection = _ref.geoJSONIntersection
|
|
6191
|
+
geoJSONIntersection = _ref.geoJSONIntersection,
|
|
6192
|
+
_ref$drawToolsDisable = _ref.drawToolsDisabled,
|
|
6193
|
+
drawToolsDisabled = _ref$drawToolsDisable === void 0 ? false : _ref$drawToolsDisable;
|
|
6170
6194
|
var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
|
|
6171
6195
|
t = _useSigmetAirmetTrans.t;
|
|
6172
6196
|
var _useFormContext = useFormContext(),
|
|
@@ -6261,7 +6285,7 @@ var Progress = function Progress(_ref) {
|
|
|
6261
6285
|
"data-testid": "movementType-FORECAST_POSITION"
|
|
6262
6286
|
})]
|
|
6263
6287
|
}), movementType === 'MOVEMENT' && !isShortTestOrRdoact && jsxs(Fragment, {
|
|
6264
|
-
children: [jsx(
|
|
6288
|
+
children: [jsx(Grid, {
|
|
6265
6289
|
children: jsx(ReactHookFormSelect, {
|
|
6266
6290
|
name: "movementDirection",
|
|
6267
6291
|
label: t('progress-movement-direction-label'),
|
|
@@ -6287,9 +6311,9 @@ var Progress = function Progress(_ref) {
|
|
|
6287
6311
|
}, key);
|
|
6288
6312
|
})
|
|
6289
6313
|
})
|
|
6290
|
-
}), jsxs(
|
|
6314
|
+
}), jsxs(Grid, {
|
|
6291
6315
|
container: true,
|
|
6292
|
-
children: [jsx(
|
|
6316
|
+
children: [jsx(Grid, {
|
|
6293
6317
|
size: 5,
|
|
6294
6318
|
children: jsx(ReactHookFormSelect, {
|
|
6295
6319
|
name: "movementUnit",
|
|
@@ -6317,7 +6341,7 @@ var Progress = function Progress(_ref) {
|
|
|
6317
6341
|
}, key);
|
|
6318
6342
|
})
|
|
6319
6343
|
})
|
|
6320
|
-
}), jsx(
|
|
6344
|
+
}), jsx(Grid, {
|
|
6321
6345
|
size: 7,
|
|
6322
6346
|
children: jsx(ReactHookFormNumberField, {
|
|
6323
6347
|
name: "movementSpeed",
|
|
@@ -6368,7 +6392,7 @@ var Progress = function Progress(_ref) {
|
|
|
6368
6392
|
disabled: isDisabled,
|
|
6369
6393
|
"data-testid": "movementType-FORECAST_POSITION"
|
|
6370
6394
|
})]
|
|
6371
|
-
}), isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(
|
|
6395
|
+
}), isSigmet && !isShortTestOrRdoact && movementType === 'FORECAST_POSITION' && jsxs(Grid, {
|
|
6372
6396
|
"data-testid": "endGeometry",
|
|
6373
6397
|
sx: styles$2.drawSectionProgress,
|
|
6374
6398
|
size: 12,
|
|
@@ -6377,7 +6401,8 @@ var Progress = function Progress(_ref) {
|
|
|
6377
6401
|
"data-testid": "endGeometry-drawTools",
|
|
6378
6402
|
tools: tools,
|
|
6379
6403
|
activeTool: activeTool,
|
|
6380
|
-
onChangeTool: onChangeTool
|
|
6404
|
+
onChangeTool: onChangeTool,
|
|
6405
|
+
isDisabled: drawToolsDisabled
|
|
6381
6406
|
}), activeTool && jsx(FormHelperText, {
|
|
6382
6407
|
variant: "filled",
|
|
6383
6408
|
sx: styles$2.quitDrawModeMessage,
|
|
@@ -6547,7 +6572,9 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
6547
6572
|
onChangeTool = _ref.onChangeTool,
|
|
6548
6573
|
geoJSON = _ref.geoJSON,
|
|
6549
6574
|
geoJSONIntersection = _ref.geoJSONIntersection,
|
|
6550
|
-
productConfig = _ref.productConfig
|
|
6575
|
+
productConfig = _ref.productConfig,
|
|
6576
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
6577
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
|
|
6551
6578
|
var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
|
|
6552
6579
|
t = _useSigmetAirmetTrans.t;
|
|
6553
6580
|
var _useFormContext = useFormContext(),
|
|
@@ -6582,7 +6609,7 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
6582
6609
|
activeTool: activeTool,
|
|
6583
6610
|
tools: tools,
|
|
6584
6611
|
onChangeTool: onChangeTool,
|
|
6585
|
-
isDisabled: isShortTest()
|
|
6612
|
+
isDisabled: isShortTest() || isDisabled
|
|
6586
6613
|
}), activeTool && jsx(FormHelperText, {
|
|
6587
6614
|
variant: "filled",
|
|
6588
6615
|
sx: styles$2.quitDrawModeMessage,
|
|
@@ -6842,10 +6869,10 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
6842
6869
|
watch = _useFormContext.watch,
|
|
6843
6870
|
trigger = _useFormContext.trigger,
|
|
6844
6871
|
getValues = _useFormContext.getValues;
|
|
6845
|
-
return jsx(
|
|
6872
|
+
return jsx(Grid, {
|
|
6846
6873
|
container: true,
|
|
6847
6874
|
spacing: 2,
|
|
6848
|
-
children: jsxs(
|
|
6875
|
+
children: jsxs(Grid, {
|
|
6849
6876
|
container: true,
|
|
6850
6877
|
justifyContent: "flex-start",
|
|
6851
6878
|
offset: 4,
|
|
@@ -6856,7 +6883,7 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
6856
6883
|
marginTop: '2px'
|
|
6857
6884
|
}
|
|
6858
6885
|
},
|
|
6859
|
-
children: [(!isReadOnly || !!watch('vaSigmetVolcanoName')) && jsx(
|
|
6886
|
+
children: [(!isReadOnly || !!watch('vaSigmetVolcanoName')) && jsx(Grid, {
|
|
6860
6887
|
sx: styles$2.volcanicField,
|
|
6861
6888
|
size: 12,
|
|
6862
6889
|
children: jsx(ReactHookFormTextField, {
|
|
@@ -6871,7 +6898,7 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
6871
6898
|
isReadOnly: isReadOnly,
|
|
6872
6899
|
size: "small"
|
|
6873
6900
|
})
|
|
6874
|
-
}), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && jsx(
|
|
6901
|
+
}), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && jsx(Grid, {
|
|
6875
6902
|
size: 6,
|
|
6876
6903
|
children: jsx(ReactHookFormNumberField, {
|
|
6877
6904
|
name: "vaSigmetVolcanoCoordinates.latitude",
|
|
@@ -6895,7 +6922,7 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
6895
6922
|
},
|
|
6896
6923
|
isReadOnly: isReadOnly
|
|
6897
6924
|
})
|
|
6898
|
-
}), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && jsx(
|
|
6925
|
+
}), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && jsx(Grid, {
|
|
6899
6926
|
size: 6,
|
|
6900
6927
|
children: jsx(ReactHookFormNumberField, {
|
|
6901
6928
|
name: "vaSigmetVolcanoCoordinates.longitude",
|
|
@@ -6975,18 +7002,18 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
|
|
|
6975
7002
|
};
|
|
6976
7003
|
var visibilityLabel = getFieldLabel(t, t('surface-visibility'), isReadOnly);
|
|
6977
7004
|
var visibilityCauseLabel = getFieldLabel(t, t('surface-visibility-cause'), isReadOnly);
|
|
6978
|
-
return jsxs(
|
|
7005
|
+
return jsxs(Grid, {
|
|
6979
7006
|
container: true,
|
|
6980
7007
|
spacing: 2,
|
|
6981
|
-
children: [jsx(
|
|
7008
|
+
children: [jsx(Grid, {
|
|
6982
7009
|
container: true,
|
|
6983
7010
|
justifyContent: "flex-end",
|
|
6984
7011
|
size: 4
|
|
6985
|
-
}), jsxs(
|
|
7012
|
+
}), jsxs(Grid, {
|
|
6986
7013
|
container: true,
|
|
6987
7014
|
justifyContent: "flex-start",
|
|
6988
7015
|
size: 8,
|
|
6989
|
-
children: [jsx(
|
|
7016
|
+
children: [jsx(Grid, {
|
|
6990
7017
|
sx: styles$2.surfaceVisibility,
|
|
6991
7018
|
size: 12,
|
|
6992
7019
|
children: jsx(ReactHookFormNumberField, {
|
|
@@ -7027,7 +7054,7 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
|
|
|
7027
7054
|
}
|
|
7028
7055
|
}
|
|
7029
7056
|
})
|
|
7030
|
-
}), jsx(
|
|
7057
|
+
}), jsx(Grid, {
|
|
7031
7058
|
size: 12,
|
|
7032
7059
|
sx: {
|
|
7033
7060
|
marginTop: -2
|
|
@@ -7102,18 +7129,18 @@ var SurfaceWind = function SurfaceWind(_ref) {
|
|
|
7102
7129
|
var allowedWindUnitsForFir = getAllowedUnits(getFIRValue(), productConfig, 'surfacewind_unit', WindUnit);
|
|
7103
7130
|
var windLabel = getFieldLabel(t, t('surface-wind-label'), isReadOnly, t('set'));
|
|
7104
7131
|
var speedLabel = getFieldLabel(t, t('surface-wind-speed-label'), isReadOnly, t('set'));
|
|
7105
|
-
return jsxs(
|
|
7132
|
+
return jsxs(Grid, {
|
|
7106
7133
|
container: true,
|
|
7107
7134
|
spacing: 2,
|
|
7108
|
-
children: [jsx(
|
|
7135
|
+
children: [jsx(Grid, {
|
|
7109
7136
|
container: true,
|
|
7110
7137
|
justifyContent: "flex-end",
|
|
7111
7138
|
size: 4
|
|
7112
|
-
}), jsxs(
|
|
7139
|
+
}), jsxs(Grid, {
|
|
7113
7140
|
container: true,
|
|
7114
7141
|
justifyContent: "flex-start",
|
|
7115
7142
|
size: 8,
|
|
7116
|
-
children: [jsx(
|
|
7143
|
+
children: [jsx(Grid, {
|
|
7117
7144
|
sx: styles$2.surfaceWind,
|
|
7118
7145
|
size: 12,
|
|
7119
7146
|
children: jsx(ReactHookFormNumberField, {
|
|
@@ -7141,14 +7168,14 @@ var SurfaceWind = function SurfaceWind(_ref) {
|
|
|
7141
7168
|
isReadOnly: isReadOnly,
|
|
7142
7169
|
"data-testid": "surfaceWind-windDirection"
|
|
7143
7170
|
})
|
|
7144
|
-
}), jsxs(
|
|
7171
|
+
}), jsxs(Grid, {
|
|
7145
7172
|
container: true,
|
|
7146
7173
|
size: 12,
|
|
7147
7174
|
sx: {
|
|
7148
7175
|
marginTop: -2
|
|
7149
7176
|
},
|
|
7150
7177
|
spacing: 0,
|
|
7151
|
-
children: [jsx(
|
|
7178
|
+
children: [jsx(Grid, {
|
|
7152
7179
|
size: 5,
|
|
7153
7180
|
children: jsx(ReactHookFormSelect, {
|
|
7154
7181
|
name: "windUnit",
|
|
@@ -7175,7 +7202,7 @@ var SurfaceWind = function SurfaceWind(_ref) {
|
|
|
7175
7202
|
}, key);
|
|
7176
7203
|
})
|
|
7177
7204
|
})
|
|
7178
|
-
}), jsx(
|
|
7205
|
+
}), jsx(Grid, {
|
|
7179
7206
|
size: 7,
|
|
7180
7207
|
children: jsx(ReactHookFormNumberField, {
|
|
7181
7208
|
name: "windSpeed",
|
|
@@ -7286,11 +7313,11 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
7286
7313
|
unregister('cloudLowerLevel');
|
|
7287
7314
|
}
|
|
7288
7315
|
}, [cloudLevelInfoMode, unregister]);
|
|
7289
|
-
return jsxs(
|
|
7316
|
+
return jsxs(Grid, {
|
|
7290
7317
|
container: true,
|
|
7291
7318
|
spacing: 2,
|
|
7292
7319
|
sx: styles$2.containerItem,
|
|
7293
|
-
children: [jsx(
|
|
7320
|
+
children: [jsx(Grid, {
|
|
7294
7321
|
container: true,
|
|
7295
7322
|
justifyContent: "flex-end",
|
|
7296
7323
|
size: 4,
|
|
@@ -7299,19 +7326,19 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
7299
7326
|
sx: styles$2.label,
|
|
7300
7327
|
children: t('levels')
|
|
7301
7328
|
})
|
|
7302
|
-
}), jsx(
|
|
7329
|
+
}), jsx(Grid, {
|
|
7303
7330
|
container: true,
|
|
7304
7331
|
justifyContent: "flex-start",
|
|
7305
7332
|
size: 8,
|
|
7306
|
-
children: jsxs(
|
|
7333
|
+
children: jsxs(Grid, {
|
|
7307
7334
|
size: 12,
|
|
7308
7335
|
children: [jsx(ReactHookFormHiddenInput, {
|
|
7309
7336
|
name: "cloudLevelInfoMode",
|
|
7310
7337
|
defaultValue: "BETW"
|
|
7311
|
-
}), jsxs(
|
|
7338
|
+
}), jsxs(Grid, {
|
|
7312
7339
|
container: true,
|
|
7313
7340
|
size: 12,
|
|
7314
|
-
children: [jsx(
|
|
7341
|
+
children: [jsx(Grid, {
|
|
7315
7342
|
size: 4,
|
|
7316
7343
|
children: (!isReadOnly || cloudLevelInfoMode === 'BETW_ABV' || cloudLevelInfoMode === 'BETW_SFC_ABV') && jsx(ReactHookFormFormControl, {
|
|
7317
7344
|
disabled: isDisabled,
|
|
@@ -7351,7 +7378,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
7351
7378
|
label: "Above"
|
|
7352
7379
|
})
|
|
7353
7380
|
})
|
|
7354
|
-
}), jsx(
|
|
7381
|
+
}), jsx(Grid, {
|
|
7355
7382
|
size: 3,
|
|
7356
7383
|
children: jsx(ReactHookFormSelect, {
|
|
7357
7384
|
name: "cloudLevel.unit",
|
|
@@ -7380,7 +7407,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
7380
7407
|
}, key);
|
|
7381
7408
|
})
|
|
7382
7409
|
})
|
|
7383
|
-
}), jsx(
|
|
7410
|
+
}), jsx(Grid, {
|
|
7384
7411
|
size: 5,
|
|
7385
7412
|
children: jsx(ReactHookFormNumberField, {
|
|
7386
7413
|
name: "cloudLevel.value",
|
|
@@ -7416,10 +7443,10 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
7416
7443
|
}
|
|
7417
7444
|
})
|
|
7418
7445
|
})]
|
|
7419
|
-
}), jsxs(
|
|
7446
|
+
}), jsxs(Grid, {
|
|
7420
7447
|
container: true,
|
|
7421
7448
|
size: 12,
|
|
7422
|
-
children: [jsx(
|
|
7449
|
+
children: [jsx(Grid, {
|
|
7423
7450
|
size: 4,
|
|
7424
7451
|
children: (!isReadOnly || cloudLevelInfoMode === 'BETW_SFC' || cloudLevelInfoMode === 'BETW_SFC_ABV') && jsx(ReactHookFormFormControl, {
|
|
7425
7452
|
disabled: isDisabled,
|
|
@@ -7460,7 +7487,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
7460
7487
|
})
|
|
7461
7488
|
})
|
|
7462
7489
|
}), cloudLevelInfoMode !== 'BETW_SFC' && cloudLevelInfoMode !== 'BETW_SFC_ABV' && jsxs(Fragment, {
|
|
7463
|
-
children: [jsx(
|
|
7490
|
+
children: [jsx(Grid, {
|
|
7464
7491
|
size: 3,
|
|
7465
7492
|
children: jsx(ReactHookFormSelect, {
|
|
7466
7493
|
name: "cloudLowerLevel.unit",
|
|
@@ -7489,7 +7516,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
7489
7516
|
}, key);
|
|
7490
7517
|
})
|
|
7491
7518
|
})
|
|
7492
|
-
}), jsx(
|
|
7519
|
+
}), jsx(Grid, {
|
|
7493
7520
|
size: 5,
|
|
7494
7521
|
children: jsx(ReactHookFormNumberField, {
|
|
7495
7522
|
name: "cloudLowerLevel.value",
|
|
@@ -7787,7 +7814,8 @@ var Tac = function Tac(_ref) {
|
|
|
7787
7814
|
|
|
7788
7815
|
var MapViewGeoJson = function MapViewGeoJson(_ref) {
|
|
7789
7816
|
var initialBaseLayers = _ref.baseLayers,
|
|
7790
|
-
|
|
7817
|
+
_ref$projection = _ref.projection,
|
|
7818
|
+
initialProjection = _ref$projection === void 0 ? srsAndBboxDefault : _ref$projection,
|
|
7791
7819
|
_ref$geoJSONLayers = _ref.geoJSONLayers,
|
|
7792
7820
|
geoJSONLayers = _ref$geoJSONLayers === void 0 ? [] : _ref$geoJSONLayers,
|
|
7793
7821
|
children = _ref.children;
|
|
@@ -7839,11 +7867,10 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
|
|
|
7839
7867
|
mapId: mapId,
|
|
7840
7868
|
layers: baseLayers
|
|
7841
7869
|
}));
|
|
7842
|
-
var projection = initialProjection || srsAndBboxDefault;
|
|
7843
7870
|
dispatch(mapActions.setBbox({
|
|
7844
7871
|
mapId: mapId,
|
|
7845
|
-
bbox:
|
|
7846
|
-
srs:
|
|
7872
|
+
bbox: initialProjection.bbox,
|
|
7873
|
+
srs: initialProjection.srs
|
|
7847
7874
|
}));
|
|
7848
7875
|
syncGroupAddGroup({
|
|
7849
7876
|
groupId: 'Time_SigmetAirmet',
|
|
@@ -7858,6 +7885,18 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
|
|
|
7858
7885
|
groupId: 'Time_SigmetAirmet',
|
|
7859
7886
|
targetId: timesliderId
|
|
7860
7887
|
});
|
|
7888
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
7889
|
+
type: uiTypes.DialogTypes.LayerManager,
|
|
7890
|
+
mapId: mapId,
|
|
7891
|
+
source: 'module'
|
|
7892
|
+
}));
|
|
7893
|
+
return function () {
|
|
7894
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
7895
|
+
type: uiTypes.DialogTypes.LayerManager,
|
|
7896
|
+
mapId: mapId,
|
|
7897
|
+
source: 'app'
|
|
7898
|
+
}));
|
|
7899
|
+
};
|
|
7861
7900
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7862
7901
|
}, []);
|
|
7863
7902
|
return jsxs("div", {
|
|
@@ -7878,13 +7917,14 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
|
|
|
7878
7917
|
zoomControls: true,
|
|
7879
7918
|
dimensionSelect: true
|
|
7880
7919
|
},
|
|
7920
|
+
source: "module",
|
|
7881
7921
|
children: [children, geoJSONLayers.map(function (layer) {
|
|
7882
7922
|
return jsxs("div", {
|
|
7883
7923
|
"data-testid": "" + layer.id,
|
|
7884
7924
|
children: [jsx(OpenLayersFeatureLayer, {
|
|
7885
7925
|
featureCollection: !layer.isInEditMode ? layer.geojson : undefined,
|
|
7886
7926
|
style: genericOpenLayersFeatureStyle,
|
|
7887
|
-
zIndex:
|
|
7927
|
+
zIndex: 2000
|
|
7888
7928
|
}), jsx(OpenLayersMapDraw, {
|
|
7889
7929
|
viewOnlyStyle: genericOpenLayersFeatureStyle,
|
|
7890
7930
|
selectedFeatureIndex: layer.selectedFeatureIndex || 0,
|
|
@@ -7929,7 +7969,7 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
|
|
|
7929
7969
|
var theme = useTheme();
|
|
7930
7970
|
var baseLayers = getBaseLayers(productConfig);
|
|
7931
7971
|
var projection = getProjection(productConfig);
|
|
7932
|
-
return jsxs(
|
|
7972
|
+
return jsxs(Grid, {
|
|
7933
7973
|
container: true,
|
|
7934
7974
|
sx: (_sx = {
|
|
7935
7975
|
height: '100%',
|
|
@@ -7937,7 +7977,7 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
|
|
|
7937
7977
|
}, _sx[theme.breakpoints.up('sm')] = {
|
|
7938
7978
|
overflowY: 'hidden'
|
|
7939
7979
|
}, _sx),
|
|
7940
|
-
children: [jsx(
|
|
7980
|
+
children: [jsx(Grid, {
|
|
7941
7981
|
sx: (_sx2 = {
|
|
7942
7982
|
height: 400,
|
|
7943
7983
|
padding: 2
|
|
@@ -7956,7 +7996,7 @@ var ProductFormLayout = function ProductFormLayout(_ref) {
|
|
|
7956
7996
|
geoJSONLayers: geoJSONLayers,
|
|
7957
7997
|
children: mapChildren
|
|
7958
7998
|
})
|
|
7959
|
-
}), jsx(
|
|
7999
|
+
}), jsx(Grid, {
|
|
7960
8000
|
sx: (_sx3 = {
|
|
7961
8001
|
paddingTop: 5,
|
|
7962
8002
|
paddingBottom: 5,
|
|
@@ -8011,9 +8051,13 @@ var useGeoJSONHandling = function useGeoJSONHandling(_ref) {
|
|
|
8011
8051
|
var sourcePanelId = useSelector(function (store) {
|
|
8012
8052
|
return uiSelectors.getSourcePanelId(store, 'publicWarnings');
|
|
8013
8053
|
});
|
|
8054
|
+
var warningsDialogOpen = useSelector(function (store) {
|
|
8055
|
+
return uiSelectors.getisDialogOpen(store, 'publicWarnings');
|
|
8056
|
+
});
|
|
8014
8057
|
var linkedMaps = useSelector(function (store) {
|
|
8015
8058
|
return genericSelectors.getLinkedMaps(store, sourcePanelId);
|
|
8016
8059
|
});
|
|
8060
|
+
var drawToolsDisabled = warningsDialogOpen ? linkedMaps.length === 0 : false;
|
|
8017
8061
|
var reduxActiveStart = useSelector(function (state) {
|
|
8018
8062
|
var _state$drawingtools;
|
|
8019
8063
|
return (_state$drawingtools = state.drawingtools) == null || (_state$drawingtools = _state$drawingtools.entities['sigmetStartGeometry']) == null ? void 0 : _state$drawingtools.activeDrawModeId;
|
|
@@ -8125,7 +8169,8 @@ var useGeoJSONHandling = function useGeoJSONHandling(_ref) {
|
|
|
8125
8169
|
},
|
|
8126
8170
|
onChangeEndTool: function onChangeEndTool(newTool) {
|
|
8127
8171
|
return onChangeTool('end', newTool, deactivateStartTool, changeActiveEndTool || function () {}, endEditModes);
|
|
8128
|
-
}
|
|
8172
|
+
},
|
|
8173
|
+
drawToolsDisabled: drawToolsDisabled
|
|
8129
8174
|
};
|
|
8130
8175
|
};
|
|
8131
8176
|
|
|
@@ -8280,7 +8325,8 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
8280
8325
|
currentEndDrawTool: activeEndTool
|
|
8281
8326
|
}),
|
|
8282
8327
|
onChangeStartTool = _useGeoJSONHandling.onChangeStartTool,
|
|
8283
|
-
onChangeEndTool = _useGeoJSONHandling.onChangeEndTool
|
|
8328
|
+
onChangeEndTool = _useGeoJSONHandling.onChangeEndTool,
|
|
8329
|
+
drawToolsDisabled = _useGeoJSONHandling.drawToolsDisabled;
|
|
8284
8330
|
var layers = [getStartLayer('geoJSONIntersectionBounds', 'geojsonlayer-fir'), Object.assign({}, getEndLayer('geoJSON', 'geojsonlayer-end'), {
|
|
8285
8331
|
exitDrawModeCallback: deactivateEndTool,
|
|
8286
8332
|
updateGeojson: updateEndGeoJson
|
|
@@ -8328,7 +8374,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
8328
8374
|
setPhenomenaList(newPhenomenaList);
|
|
8329
8375
|
};
|
|
8330
8376
|
var renderForm = function renderForm() {
|
|
8331
|
-
return jsxs(
|
|
8377
|
+
return jsxs(Grid, {
|
|
8332
8378
|
container: true,
|
|
8333
8379
|
direction: "column",
|
|
8334
8380
|
spacing: 2,
|
|
@@ -8381,7 +8427,8 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
8381
8427
|
tools: startEditModes,
|
|
8382
8428
|
onChangeTool: onChangeStartTool,
|
|
8383
8429
|
activeTool: activeStartTool,
|
|
8384
|
-
productConfig: productConfig
|
|
8430
|
+
productConfig: productConfig,
|
|
8431
|
+
isDisabled: drawToolsDisabled
|
|
8385
8432
|
}), !isCancelSigmet && jsx(Levels, {
|
|
8386
8433
|
isDisabled: isDisabled,
|
|
8387
8434
|
isReadOnly: isReadOnly,
|
|
@@ -8398,7 +8445,8 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
8398
8445
|
geoJSONIntersection: endGeoJSONIntersection,
|
|
8399
8446
|
tools: endEditModes,
|
|
8400
8447
|
onChangeTool: onChangeEndTool,
|
|
8401
|
-
activeTool: activeEndTool
|
|
8448
|
+
activeTool: activeEndTool,
|
|
8449
|
+
drawToolsDisabled: drawToolsDisabled
|
|
8402
8450
|
}), !isCancelSigmet && !omitChange && jsx(Change, {
|
|
8403
8451
|
isDisabled: isDisabled,
|
|
8404
8452
|
isReadOnly: isReadOnly
|
|
@@ -8580,7 +8628,8 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
8580
8628
|
startEditModes: startEditModes,
|
|
8581
8629
|
currentStartDrawTool: activeStartTool
|
|
8582
8630
|
}),
|
|
8583
|
-
onChangeStartTool = _useGeoJSONHandling.onChangeStartTool
|
|
8631
|
+
onChangeStartTool = _useGeoJSONHandling.onChangeStartTool,
|
|
8632
|
+
drawToolsDisabled = _useGeoJSONHandling.drawToolsDisabled;
|
|
8584
8633
|
var layers = [getStartLayer('geoJSONIntersectionBounds', 'geojsonlayer-fir'), Object.assign({}, getStartLayer('geoJSON', 'geojsonlayer-start'), {
|
|
8585
8634
|
exitDrawModeCallback: deactivateStartTool,
|
|
8586
8635
|
updateGeojson: updateStartGeoJson
|
|
@@ -8622,7 +8671,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
8622
8671
|
triggerValidations(fieldnames, getValues, trigger);
|
|
8623
8672
|
};
|
|
8624
8673
|
var renderForm = function renderForm() {
|
|
8625
|
-
return jsxs(
|
|
8674
|
+
return jsxs(Grid, {
|
|
8626
8675
|
container: true,
|
|
8627
8676
|
direction: "column",
|
|
8628
8677
|
spacing: 2,
|
|
@@ -8681,7 +8730,8 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
8681
8730
|
tools: startEditModes,
|
|
8682
8731
|
onChangeTool: onChangeStartTool,
|
|
8683
8732
|
activeTool: activeStartTool,
|
|
8684
|
-
productConfig: productConfig
|
|
8733
|
+
productConfig: productConfig,
|
|
8734
|
+
isDisabled: drawToolsDisabled
|
|
8685
8735
|
}), !isCancelAirmet && hasLevels && jsx(Levels, {
|
|
8686
8736
|
isDisabled: isDisabled,
|
|
8687
8737
|
isReadOnly: isReadOnly,
|
|
@@ -8951,6 +9001,9 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
|
|
|
8951
9001
|
padding: 0
|
|
8952
9002
|
}
|
|
8953
9003
|
},
|
|
9004
|
+
style: {
|
|
9005
|
+
zIndex: 1000
|
|
9006
|
+
},
|
|
8954
9007
|
children: [errorStoreMessage ? jsx(AlertBanner, {
|
|
8955
9008
|
severity: "error",
|
|
8956
9009
|
title: "An error has occurred while saving, please try again",
|
|
@@ -9258,12 +9311,12 @@ var ProductListRow = function ProductListRow(_ref2) {
|
|
|
9258
9311
|
sx: listRowStyles,
|
|
9259
9312
|
children: jsx(Box, {
|
|
9260
9313
|
className: "productListContainer",
|
|
9261
|
-
children: jsxs(
|
|
9314
|
+
children: jsxs(Grid, {
|
|
9262
9315
|
container: true,
|
|
9263
9316
|
alignItems: "center",
|
|
9264
9317
|
spacing: 0,
|
|
9265
9318
|
className: "rowContainer",
|
|
9266
|
-
children: [jsxs(
|
|
9319
|
+
children: [jsxs(Grid, {
|
|
9267
9320
|
className: "col-1",
|
|
9268
9321
|
children: [phenomenon !== null && jsx(ProductListRowHeader, {
|
|
9269
9322
|
title: productType.toUpperCase()
|
|
@@ -9277,7 +9330,7 @@ var ProductListRow = function ProductListRow(_ref2) {
|
|
|
9277
9330
|
children: phenomenon !== null ? getLabel(product) : 'Cancel'
|
|
9278
9331
|
})
|
|
9279
9332
|
})]
|
|
9280
|
-
}), jsxs(
|
|
9333
|
+
}), jsxs(Grid, {
|
|
9281
9334
|
className: "col-2",
|
|
9282
9335
|
children: [jsx(ProductListRowHeader, {
|
|
9283
9336
|
title: t('issue-time')
|
|
@@ -9321,7 +9374,7 @@ var ProductListRow = function ProductListRow(_ref2) {
|
|
|
9321
9374
|
children: product.issueDate ? dateUtils.dateToString(dateUtils.utc(product.issueDate), dateUtils.DATE_FORMAT_NAME_OF_MONTH) + " UTC" : t('not-published')
|
|
9322
9375
|
})
|
|
9323
9376
|
})]
|
|
9324
|
-
}), jsxs(
|
|
9377
|
+
}), jsxs(Grid, {
|
|
9325
9378
|
className: "col-3",
|
|
9326
9379
|
children: [jsx(ProductListRowHeader, {
|
|
9327
9380
|
title: t('valid-time')
|
|
@@ -9331,7 +9384,7 @@ var ProductListRow = function ProductListRow(_ref2) {
|
|
|
9331
9384
|
"data-testid": "validTime",
|
|
9332
9385
|
children: validTime
|
|
9333
9386
|
})]
|
|
9334
|
-
}), jsxs(
|
|
9387
|
+
}), jsxs(Grid, {
|
|
9335
9388
|
className: "col-4",
|
|
9336
9389
|
container: true,
|
|
9337
9390
|
children: [product.status === 'DRAFT' ? jsx(Button, {
|
|
@@ -9382,11 +9435,11 @@ var ProductList = function ProductList(_ref) {
|
|
|
9382
9435
|
info: error.message ? error.message : '',
|
|
9383
9436
|
dataTestId: "productList-alert"
|
|
9384
9437
|
})
|
|
9385
|
-
}), jsxs(
|
|
9438
|
+
}), jsxs(Grid, {
|
|
9386
9439
|
container: true,
|
|
9387
9440
|
direction: "column",
|
|
9388
9441
|
alignItems: "stretch",
|
|
9389
|
-
children: [jsx(
|
|
9442
|
+
children: [jsx(Grid, {
|
|
9390
9443
|
container: true,
|
|
9391
9444
|
justifyContent: "flex-end",
|
|
9392
9445
|
children: jsx(Button, {
|
|
@@ -9400,7 +9453,7 @@ var ProductList = function ProductList(_ref) {
|
|
|
9400
9453
|
product: productType.toUpperCase()
|
|
9401
9454
|
})
|
|
9402
9455
|
})
|
|
9403
|
-
}), jsx(
|
|
9456
|
+
}), jsx(Grid, {
|
|
9404
9457
|
sx: {
|
|
9405
9458
|
width: '100%',
|
|
9406
9459
|
minHeight: '600px'
|
|
@@ -11733,4 +11786,4 @@ var createApi = function createApi() {
|
|
|
11733
11786
|
return getApiRoutes(createFakeApiInstance());
|
|
11734
11787
|
};
|
|
11735
11788
|
|
|
11736
|
-
export { AirmetComponentsLookUp, AirmetForm, AirmetType, CancelSigmetVolcanicMovements, CloudLevelUnits, DEFAULT_MINIMUM_SURFACE_LEVEL, DEFAULT_MIN_MOVEMENT_SPEED, DEFAULT_MIN_VISIBILITY, DEFAULT_MIN_WIND_SPEED, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductAction, ProductFormDialog, Wrapper as ProductFormDialogContent, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createAirmetPostParameter, createApi$1 as createApi, createApi as createFakeApi, createSigmetPostParameter, extractUnitsToShow, fakeAirmetList, fakeSigmetList, firSelectionType, getActiveFIRArea, getAllFirAreas, getAllowedUnits, getBaseLayers, getConfirmationDialogButtonLabel, getConfirmationDialogCancelLabel, getConfirmationDialogContent, getConfirmationDialogTitle, getDefaultPhenomena, getDefaultValidUntilValue, getDefaultValidityMinutesFromConfig, getDialogtitle, getDrawTools, getFieldLabel, getFir, getFirArea, getFirOptions, getHoursBeforeValidity, getLevelInFeet, getLifecycleActions, getMaxCloudLevelValue, getMaxCloudLowerLevelValue, getMaxHoursOfValidity, getMaxLevelValue, getMaxMovementSpeedValue, getMaxPolygonPoints, getMaxVisibilityValue, getMaxWindSpeedValue, getMinCloudLevelValue, getMinCloudLowerLevelValue, getMinLevelValue, getMinMovementSpeedValue, getMinVisibilityValue, getMinWindSpeedValue, getOmitChangeFromConfig, getPhenomenon, getProductFormMode, getProductIssueDate, getProjection, getToolIcon, getValidFromDelayTimeMinutesFromConfig, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, isVAPhenomenon, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues, useFormLayers, useShortTestHelpers };
|
|
11789
|
+
export { AirmetComponentsLookUp, AirmetForm, AirmetType, CancelSigmetVolcanicMovements, CloudLevelUnits, DEFAULT_MINIMUM_SURFACE_LEVEL, DEFAULT_MIN_MOVEMENT_SPEED, DEFAULT_MIN_VISIBILITY, DEFAULT_MIN_WIND_SPEED, Direction, DownloadSigmetAirmetConfigWrapper, LevelUnits, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductAction, ProductFormDialog, Wrapper as ProductFormDialogContent, ProductList, ProductListRow, ProductStatusDescription, SA_NAMESPACE, SigmetComponentsLookUp, SigmetForm, SigmetType, StartOrEndDrawing, VisibilityCause, WindUnit, airmetConfig, createAirmetPostParameter, createApi$1 as createApi, createApi as createFakeApi, createSigmetPostParameter, extractUnitsToShow, fakeAirmetList, fakeSigmetList, firSelectionType, getActiveFIRArea, getAllFirAreas, getAllowedUnits, getBaseLayers, getConfirmationDialogButtonLabel, getConfirmationDialogCancelLabel, getConfirmationDialogContent, getConfirmationDialogTitle, getDefaultPhenomena, getDefaultValidUntilValue, getDefaultValidityMinutesFromConfig, getDialogtitle, getDrawTools, getFieldLabel, getFir, getFirArea, getFirOptions, getHoursBeforeValidity, getLevelInFeet, getLifecycleActions, getMaxCloudLevelValue, getMaxCloudLowerLevelValue, getMaxHoursOfValidity, getMaxLevelValue, getMaxMovementSpeedValue, getMaxPolygonPoints, getMaxVisibilityValue, getMaxWindSpeedValue, getMinCloudLevelValue, getMinCloudLowerLevelValue, getMinLevelValue, getMinMovementSpeedValue, getMinVisibilityValue, getMinWindSpeedValue, getOmitChangeFromConfig, getPhenomenon, getProductFormMode, getProductIssueDate, getProjection, getToolIcon, getValidFromDelayTimeMinutesFromConfig, hasMaxFeaturePoints, hasValue, isFir, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet, isLevelLower, isVAPhenomenon, prepareCancelSigmet, prepareFormValues, prepareProductValues, sigmetAirmetTranslations as saTranslations, sigmetConfig, triggerValidations, updateDrawToolsWithFir, useDelayedFormValues, useFormLayers, useShortTestHelpers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/sigmet-airmet",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.4.1",
|
|
4
4
|
"description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,23 +8,23 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/api": "12.
|
|
12
|
-
"@opengeoweb/shared": "12.
|
|
13
|
-
"@opengeoweb/theme": "12.
|
|
14
|
-
"@opengeoweb/store": "12.
|
|
15
|
-
"@opengeoweb/webmap": "12.
|
|
16
|
-
"@opengeoweb/webmap-react": "12.
|
|
17
|
-
"react-redux": "^
|
|
18
|
-
"@opengeoweb/core": "12.
|
|
19
|
-
"@opengeoweb/authentication": "12.
|
|
20
|
-
"@mui/system": "^
|
|
21
|
-
"@opengeoweb/form-fields": "12.
|
|
11
|
+
"@opengeoweb/api": "12.4.1",
|
|
12
|
+
"@opengeoweb/shared": "12.4.1",
|
|
13
|
+
"@opengeoweb/theme": "12.4.1",
|
|
14
|
+
"@opengeoweb/store": "12.4.1",
|
|
15
|
+
"@opengeoweb/webmap": "12.4.1",
|
|
16
|
+
"@opengeoweb/webmap-react": "12.4.1",
|
|
17
|
+
"react-redux": "^9.2.0",
|
|
18
|
+
"@opengeoweb/core": "12.4.1",
|
|
19
|
+
"@opengeoweb/authentication": "12.4.1",
|
|
20
|
+
"@mui/system": "^7.0.1",
|
|
21
|
+
"@opengeoweb/form-fields": "12.4.1",
|
|
22
22
|
"react-hook-form": "^7.50.1",
|
|
23
23
|
"axios": "^1.7.7",
|
|
24
24
|
"lodash": "^4.17.21",
|
|
25
|
-
"@reduxjs/toolkit": "^
|
|
26
|
-
"i18next": "^
|
|
27
|
-
"@mui/material": "^
|
|
25
|
+
"@reduxjs/toolkit": "^2.6.1",
|
|
26
|
+
"i18next": "^25.0.1",
|
|
27
|
+
"@mui/material": "^7.0.1",
|
|
28
28
|
"react-i18next": "^15.1.1",
|
|
29
29
|
"@tanstack/react-query": "^5.69.2"
|
|
30
30
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AviationProduct, FormMode, ProductAction, ProductConfig, ProductType } from '../../types';
|
|
2
|
+
import { AviationProduct, FormMode, ProductAction, ProductConfig, ProductType, Sigmet } from '../../types';
|
|
3
3
|
export declare const isVAPhenomenon: (product: AviationProduct, action: ProductAction) => boolean;
|
|
4
|
+
export declare const prepareCancelSigmet: (sigmet: Sigmet, movement: string) => Sigmet;
|
|
4
5
|
export interface ProductFormDialogContentProps {
|
|
5
6
|
isOpen: boolean;
|
|
6
7
|
toggleDialogStatus: (shouldRefreshList?: boolean) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface ProductFormFieldLayoutProps extends
|
|
2
|
+
import { GridProps } from '@mui/material';
|
|
3
|
+
interface ProductFormFieldLayoutProps extends GridProps {
|
|
4
4
|
title?: string;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
}
|
|
@@ -13,6 +13,7 @@ interface ProgressProps extends ConfigurableFormFieldProps {
|
|
|
13
13
|
activeTool?: string;
|
|
14
14
|
tools?: DrawMode[];
|
|
15
15
|
onChangeTool?: (newToolMode: DrawMode) => void;
|
|
16
|
+
drawToolsDisabled?: boolean;
|
|
16
17
|
}
|
|
17
18
|
declare const Progress: React.FC<ProgressProps>;
|
|
18
19
|
export default Progress;
|
|
@@ -21,5 +21,6 @@ interface UseGeoJSONHandlingProps {
|
|
|
21
21
|
export declare const useGeoJSONHandling: ({ storedGeoJSON, storedEndGeoJSON, startGeoJSON, endGeoJSON, updateStartGeoJson, updateEndGeoJson, deactivateStartTool, deactivateEndTool, changeActiveStartTool, changeActiveEndTool, startEditModes, endEditModes, currentStartDrawTool, currentEndDrawTool, }: UseGeoJSONHandlingProps) => {
|
|
22
22
|
onChangeStartTool: (newTool: DrawMode) => void;
|
|
23
23
|
onChangeEndTool: (newTool: DrawMode) => void;
|
|
24
|
+
drawToolsDisabled: boolean;
|
|
24
25
|
};
|
|
25
26
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { TFunction } from 'i18next';
|
|
3
|
-
import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
|
|
4
1
|
import { HeaderAction } from '@opengeoweb/shared';
|
|
5
2
|
import { layerTypes, mapTypes } from '@opengeoweb/store';
|
|
6
3
|
import { DrawMode, OpenLayersLayerProps } from '@opengeoweb/webmap-react';
|
|
7
|
-
import {
|
|
4
|
+
import { TFunction } from 'i18next';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { FieldValues, UseFormGetValues, UseFormTrigger } from 'react-hook-form';
|
|
7
|
+
import { ATSRLocation, Airmet, AirmetConfig, AirmetFromBackend, AirmetFromFrontend, AviationPhenomenon, AviationProduct, CancelAirmet, CancelSigmet, FIRConfigAirmet, FIRConfigSigmet, FIRLocationGeoJson, Firareas, ICAOLocation, LevelUnits, ProductAction, ProductCanbe, ProductConfig, ProductStatus, ProductType, Sigmet, SigmetFromBackend, SigmetFromFrontend, StartOrEndDrawing } from '../../types';
|
|
8
8
|
export declare const getDefaultPhenomena: (productConfig: ProductConfig, currentFir?: string) => {
|
|
9
9
|
phenomena: AviationPhenomenon[];
|
|
10
10
|
};
|
package/src/lib/types.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { ThemeProviderProps } from '@opengeoweb/theme';
|
|
|
3
3
|
import { CreateApiFn } from '@opengeoweb/api';
|
|
4
4
|
import { Store } from '@reduxjs/toolkit';
|
|
5
5
|
import { AxiosError } from 'axios';
|
|
6
|
-
import { uiTypes, WebMapStateModuleState } from '@opengeoweb/store';
|
|
7
6
|
import { AviationPhenomenon } from '../types';
|
|
8
7
|
export declare const ThemeWrapperWithModules: React.FC<ThemeProviderProps>;
|
|
9
8
|
interface StoryWrapperProps {
|
|
@@ -31,5 +30,4 @@ export declare const testFir: GeoJSON.FeatureCollection;
|
|
|
31
30
|
export declare const createFakeApiWithErrors: () => any;
|
|
32
31
|
export declare const fakeAirmetPhenomenaList: AviationPhenomenon[];
|
|
33
32
|
export declare const fakeSigmetPhenomenaList: AviationPhenomenon[];
|
|
34
|
-
export declare const createMockStore: (mockState: uiTypes.UIModuleState & WebMapStateModuleState) => Store;
|
|
35
33
|
export {};
|