@opengeoweb/sigmet-airmet 2.1.0 → 2.1.4
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/assets/icons.d.ts +1 -1
- package/{sigmet-airmet.esm.js → index.esm.js} +345 -308
- package/{sigmet-airmet.umd.js → index.umd.js} +616 -573
- package/lib/components/ContentDialog/ContentDialog.d.ts +1 -1
- package/lib/components/ProductForms/AirmetForm/AirmetForm.d.ts +1 -0
- package/lib/components/ProductForms/AirmetForm/AirmetForm.stories.d.ts +16 -9
- package/lib/components/ProductForms/ProductForm.styles.d.ts +1 -1
- package/lib/components/ProductForms/ProductFormDialog.Airmet.stories.d.ts +14 -0
- package/lib/components/ProductForms/{SigmetForm/SigmetFormDraw.stories.d.ts → ProductFormDialog.Draw.stories.d.ts} +0 -0
- package/lib/components/ProductForms/ProductFormDialog.Sigmet.stories.d.ts +14 -0
- package/lib/components/ProductForms/SigmetForm/SigmetForm.d.ts +3 -2
- package/lib/components/ProductForms/SigmetForm/SigmetForm.stories.d.ts +16 -9
- package/lib/components/ProductList/ProductList.stories.d.ts +10 -2
- package/lib/storyshots/Storyshots.spec.d.ts +1 -0
- package/lib/utils/mockdata/fakeAirmetList.d.ts +1 -0
- package/lib/utils/mockdata/fakeSigmetList.d.ts +1 -0
- package/lib/utils/testUtils.d.ts +4 -0
- package/package.json +20 -21
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
5
|
-
import MomentUtils from '@date-io/moment';
|
|
3
|
+
import { FormControlLabel, Radio, Grid, Typography, SvgIcon, Tooltip, Button, Checkbox, MenuItem, FormHelperText, Dialog, DialogTitle, DialogContent, Card, CardContent, List, ListItem, Skeleton, Backdrop, CircularProgress } from '@mui/material';
|
|
6
4
|
import { useFormContext } from 'react-hook-form';
|
|
7
5
|
import { ReactHookFormRadioGroup, ReactHookFormSelect, ReactHookFormNumberField, isInteger, isValidMax, isValidMin, isEmpty, ReactHookFormDateTime, isValidDate, isBefore, isBetween, hasMaxFeaturePoints, hasMulitpleIntersections, ReactHookFormHiddenInput, isMaximumOneDrawing, hasIntersectionWithFIR, isValidGeoJsonCoordinates, isXHoursBefore, isAfter, isXHoursAfter, ReactHookFormTextField, containsNoCommas, isLatitude, isNonOrBothCoordinates, isLongitude, errorMessages, isGeometryDirty, ReactHookFormProvider, defaultFormOptions } from '@opengeoweb/form-fields';
|
|
8
6
|
import { useApiContext, useApi, createApiInstance } from '@opengeoweb/api';
|
|
9
7
|
import produce, { produce as produce$1 } from 'immer';
|
|
10
8
|
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
11
|
-
import { mapTypes, mapSelectors, generateMapId, generateTimesliderId, SyncGroups, generateLayerId, mapActions, publicLayers, MapControls, LayerManagerMapButtonConnect, MapViewConnect, MapViewLayer, TimeSliderConnect } from '@opengeoweb/core';
|
|
9
|
+
import { mapTypes, mapSelectors, generateMapId, generateTimesliderId, SyncGroups, generateLayerId, mapActions, publicLayers, MapControls, LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, MapViewLayer, TimeSliderConnect } from '@opengeoweb/core';
|
|
12
10
|
import * as turf from '@turf/turf';
|
|
13
11
|
import { polygonToLineString, booleanClockwise, rewind } from '@turf/turf';
|
|
12
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
14
13
|
import { useDraftFormHelpers, useIsMounted, StatusTag, AlertBanner, usePreventBrowserClose, useConfirmationDialog, isAxiosError, getAxiosErrorMessage, ConfirmationServiceProvider, usePoller } from '@opengeoweb/shared';
|
|
15
|
-
import { LocationOn, Delete, ArrowBackIos, InfoOutlined, Create, CheckCircle, Schedule } from '@
|
|
14
|
+
import { LocationOn, Delete, ArrowBackIos, InfoOutlined, Create, CheckCircle, Schedule } from '@mui/icons-material';
|
|
16
15
|
import moment from 'moment';
|
|
17
16
|
import { debounce } from 'lodash';
|
|
18
|
-
import { Skeleton } from '@material-ui/lab';
|
|
19
17
|
|
|
20
18
|
function _typeof(obj) {
|
|
21
19
|
"@babel/helpers - typeof";
|
|
@@ -603,6 +601,12 @@ var MapViewGeoJson = function MapViewGeoJson(_ref) {
|
|
|
603
601
|
}, /*#__PURE__*/React.createElement(MapControls, null, /*#__PURE__*/React.createElement(LayerManagerMapButtonConnect, {
|
|
604
602
|
source: "module",
|
|
605
603
|
mapId: mapId
|
|
604
|
+
}), /*#__PURE__*/React.createElement(LegendMapButtonConnect, {
|
|
605
|
+
source: "module",
|
|
606
|
+
mapId: mapId
|
|
607
|
+
}), /*#__PURE__*/React.createElement(MultiDimensionSelectMapButtonsConnect, {
|
|
608
|
+
source: "module",
|
|
609
|
+
mapId: mapId
|
|
606
610
|
})), /*#__PURE__*/React.createElement(MapViewConnect, {
|
|
607
611
|
mapId: mapId
|
|
608
612
|
}, /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
@@ -1124,6 +1128,9 @@ var useStyles$6 = makeStyles({
|
|
|
1124
1128
|
body: {
|
|
1125
1129
|
paddingTop: '17px'
|
|
1126
1130
|
},
|
|
1131
|
+
containerItem: {
|
|
1132
|
+
paddingTop: '8px'
|
|
1133
|
+
},
|
|
1127
1134
|
volcanicField: {
|
|
1128
1135
|
marginBottom: 16
|
|
1129
1136
|
},
|
|
@@ -1150,7 +1157,7 @@ var useStyles$6 = makeStyles({
|
|
|
1150
1157
|
opacity: '1'
|
|
1151
1158
|
},
|
|
1152
1159
|
drawSection: {
|
|
1153
|
-
|
|
1160
|
+
padding: '10px 0px'
|
|
1154
1161
|
}
|
|
1155
1162
|
});
|
|
1156
1163
|
|
|
@@ -1244,12 +1251,13 @@ var Change = function Change(_ref) {
|
|
|
1244
1251
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
1245
1252
|
item: true,
|
|
1246
1253
|
container: true,
|
|
1247
|
-
spacing: 2
|
|
1254
|
+
spacing: 2,
|
|
1255
|
+
className: classes.containerItem
|
|
1248
1256
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
1249
1257
|
item: true,
|
|
1250
1258
|
xs: 4,
|
|
1251
1259
|
container: true,
|
|
1252
|
-
|
|
1260
|
+
justifyContent: "flex-end"
|
|
1253
1261
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
1254
1262
|
variant: "subtitle1",
|
|
1255
1263
|
className: classes.label
|
|
@@ -1257,7 +1265,7 @@ var Change = function Change(_ref) {
|
|
|
1257
1265
|
item: true,
|
|
1258
1266
|
xs: 8,
|
|
1259
1267
|
container: true,
|
|
1260
|
-
|
|
1268
|
+
justifyContent: "flex-start"
|
|
1261
1269
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
1262
1270
|
item: true,
|
|
1263
1271
|
xs: 12
|
|
@@ -1375,7 +1383,7 @@ var DrawTools = function DrawTools(_ref) {
|
|
|
1375
1383
|
item: true,
|
|
1376
1384
|
xs: 12,
|
|
1377
1385
|
container: true,
|
|
1378
|
-
|
|
1386
|
+
justifyContent: "space-between",
|
|
1379
1387
|
"data-testid": "drawtools"
|
|
1380
1388
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
1381
1389
|
item: true
|
|
@@ -1670,7 +1678,7 @@ var getProductFormLifecycleButtons = function getProductFormLifecycleButtons(can
|
|
|
1670
1678
|
return /*#__PURE__*/React.createElement(Grid, {
|
|
1671
1679
|
container: true,
|
|
1672
1680
|
spacing: 1,
|
|
1673
|
-
|
|
1681
|
+
justifyContent: "flex-end"
|
|
1674
1682
|
}, canBe.includes('DISCARDED') && /*#__PURE__*/React.createElement(Grid, {
|
|
1675
1683
|
item: true
|
|
1676
1684
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1995,12 +2003,13 @@ var Levels = function Levels(_ref) {
|
|
|
1995
2003
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
1996
2004
|
item: true,
|
|
1997
2005
|
container: true,
|
|
1998
|
-
spacing: 2
|
|
2006
|
+
spacing: 2,
|
|
2007
|
+
className: classes.containerItem
|
|
1999
2008
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2000
2009
|
item: true,
|
|
2001
2010
|
xs: 4,
|
|
2002
2011
|
container: true,
|
|
2003
|
-
|
|
2012
|
+
justifyContent: "flex-end"
|
|
2004
2013
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2005
2014
|
variant: "subtitle1",
|
|
2006
2015
|
className: classes.label
|
|
@@ -2008,7 +2017,7 @@ var Levels = function Levels(_ref) {
|
|
|
2008
2017
|
item: true,
|
|
2009
2018
|
xs: 8,
|
|
2010
2019
|
container: true,
|
|
2011
|
-
|
|
2020
|
+
justifyContent: "flex-start"
|
|
2012
2021
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2013
2022
|
item: true,
|
|
2014
2023
|
xs: 12
|
|
@@ -2404,12 +2413,12 @@ var ObservationForecast = function ObservationForecast(_ref) {
|
|
|
2404
2413
|
item: true,
|
|
2405
2414
|
xs: 4,
|
|
2406
2415
|
container: true,
|
|
2407
|
-
|
|
2416
|
+
justifyContent: "flex-end"
|
|
2408
2417
|
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2409
2418
|
item: true,
|
|
2410
2419
|
xs: 8,
|
|
2411
2420
|
container: true,
|
|
2412
|
-
|
|
2421
|
+
justifyContent: "flex-start"
|
|
2413
2422
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormRadioGroup, {
|
|
2414
2423
|
name: "isObservationOrForecast",
|
|
2415
2424
|
disabled: isDisabled,
|
|
@@ -2475,7 +2484,7 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
|
|
|
2475
2484
|
item: true,
|
|
2476
2485
|
xs: 4,
|
|
2477
2486
|
container: true,
|
|
2478
|
-
|
|
2487
|
+
justifyContent: "flex-end"
|
|
2479
2488
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2480
2489
|
variant: "subtitle1",
|
|
2481
2490
|
className: classes.label
|
|
@@ -2483,7 +2492,7 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
|
|
|
2483
2492
|
item: true,
|
|
2484
2493
|
xs: 8,
|
|
2485
2494
|
container: true,
|
|
2486
|
-
|
|
2495
|
+
justifyContent: "flex-start"
|
|
2487
2496
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormDateTime, {
|
|
2488
2497
|
disablePast: watch('isObservationOrForecast') === 'FCST',
|
|
2489
2498
|
disableFuture: watch('isObservationOrForecast') === 'OBS',
|
|
@@ -2528,7 +2537,7 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2528
2537
|
item: true,
|
|
2529
2538
|
xs: 4,
|
|
2530
2539
|
container: true,
|
|
2531
|
-
|
|
2540
|
+
justifyContent: "flex-end"
|
|
2532
2541
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2533
2542
|
variant: "subtitle1",
|
|
2534
2543
|
className: classes.label
|
|
@@ -2536,7 +2545,7 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2536
2545
|
item: true,
|
|
2537
2546
|
xs: 8,
|
|
2538
2547
|
container: true,
|
|
2539
|
-
|
|
2548
|
+
justifyContent: "flex-start"
|
|
2540
2549
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
|
|
2541
2550
|
name: "phenomenon",
|
|
2542
2551
|
label: "Select phenomenon",
|
|
@@ -2620,7 +2629,7 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2620
2629
|
item: true,
|
|
2621
2630
|
xs: 4,
|
|
2622
2631
|
container: true,
|
|
2623
|
-
|
|
2632
|
+
justifyContent: "flex-end"
|
|
2624
2633
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2625
2634
|
variant: "subtitle1",
|
|
2626
2635
|
className: classes.label
|
|
@@ -2768,12 +2777,13 @@ var Progress = function Progress(_ref) {
|
|
|
2768
2777
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
2769
2778
|
item: true,
|
|
2770
2779
|
container: true,
|
|
2771
|
-
spacing: 2
|
|
2780
|
+
spacing: 2,
|
|
2781
|
+
className: classes.containerItem
|
|
2772
2782
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2773
2783
|
item: true,
|
|
2774
2784
|
xs: 4,
|
|
2775
2785
|
container: true,
|
|
2776
|
-
|
|
2786
|
+
justifyContent: "flex-end"
|
|
2777
2787
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2778
2788
|
variant: "subtitle1",
|
|
2779
2789
|
className: classes.label
|
|
@@ -2781,7 +2791,7 @@ var Progress = function Progress(_ref) {
|
|
|
2781
2791
|
item: true,
|
|
2782
2792
|
xs: 8,
|
|
2783
2793
|
container: true,
|
|
2784
|
-
|
|
2794
|
+
justifyContent: "flex-start"
|
|
2785
2795
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2786
2796
|
item: true,
|
|
2787
2797
|
xs: 12
|
|
@@ -2987,12 +2997,13 @@ var SelectFIR = function SelectFIR(_ref) {
|
|
|
2987
2997
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
2988
2998
|
item: true,
|
|
2989
2999
|
container: true,
|
|
2990
|
-
spacing: 2
|
|
3000
|
+
spacing: 2,
|
|
3001
|
+
className: classes.containerItem
|
|
2991
3002
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2992
3003
|
item: true,
|
|
2993
3004
|
xs: 4,
|
|
2994
3005
|
container: true,
|
|
2995
|
-
|
|
3006
|
+
justifyContent: "flex-end"
|
|
2996
3007
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2997
3008
|
variant: "subtitle1",
|
|
2998
3009
|
className: classes.label
|
|
@@ -3000,7 +3011,7 @@ var SelectFIR = function SelectFIR(_ref) {
|
|
|
3000
3011
|
item: true,
|
|
3001
3012
|
xs: 8,
|
|
3002
3013
|
container: true,
|
|
3003
|
-
|
|
3014
|
+
justifyContent: "flex-start"
|
|
3004
3015
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
|
|
3005
3016
|
name: "locationIndicatorATSR",
|
|
3006
3017
|
label: "Select FIR",
|
|
@@ -3066,12 +3077,13 @@ var Type = function Type(_ref) {
|
|
|
3066
3077
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
3067
3078
|
item: true,
|
|
3068
3079
|
container: true,
|
|
3069
|
-
spacing: 2
|
|
3080
|
+
spacing: 2,
|
|
3081
|
+
className: classes.containerItem
|
|
3070
3082
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3071
3083
|
item: true,
|
|
3072
3084
|
xs: 4,
|
|
3073
3085
|
container: true,
|
|
3074
|
-
|
|
3086
|
+
justifyContent: "flex-end"
|
|
3075
3087
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3076
3088
|
variant: "subtitle1",
|
|
3077
3089
|
className: classes.label
|
|
@@ -3079,7 +3091,7 @@ var Type = function Type(_ref) {
|
|
|
3079
3091
|
item: true,
|
|
3080
3092
|
xs: 8,
|
|
3081
3093
|
container: true,
|
|
3082
|
-
|
|
3094
|
+
justifyContent: "flex-start"
|
|
3083
3095
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3084
3096
|
item: true,
|
|
3085
3097
|
xs: 12
|
|
@@ -3154,7 +3166,7 @@ var ValidFrom = function ValidFrom(_ref) {
|
|
|
3154
3166
|
item: true,
|
|
3155
3167
|
xs: 4,
|
|
3156
3168
|
container: true,
|
|
3157
|
-
|
|
3169
|
+
justifyContent: "flex-end"
|
|
3158
3170
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3159
3171
|
variant: "subtitle1",
|
|
3160
3172
|
className: classes.label
|
|
@@ -3162,7 +3174,7 @@ var ValidFrom = function ValidFrom(_ref) {
|
|
|
3162
3174
|
item: true,
|
|
3163
3175
|
xs: 8,
|
|
3164
3176
|
container: true,
|
|
3165
|
-
|
|
3177
|
+
justifyContent: "flex-start"
|
|
3166
3178
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormDateTime, {
|
|
3167
3179
|
disablePast: true,
|
|
3168
3180
|
name: "validDateStart",
|
|
@@ -3248,7 +3260,7 @@ var ValidUntil = function ValidUntil(_ref) {
|
|
|
3248
3260
|
item: true,
|
|
3249
3261
|
xs: 4,
|
|
3250
3262
|
container: true,
|
|
3251
|
-
|
|
3263
|
+
justifyContent: "flex-end"
|
|
3252
3264
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3253
3265
|
variant: "subtitle1",
|
|
3254
3266
|
className: classes.label
|
|
@@ -3256,7 +3268,7 @@ var ValidUntil = function ValidUntil(_ref) {
|
|
|
3256
3268
|
item: true,
|
|
3257
3269
|
xs: 8,
|
|
3258
3270
|
container: true,
|
|
3259
|
-
|
|
3271
|
+
justifyContent: "flex-start"
|
|
3260
3272
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormDateTime, {
|
|
3261
3273
|
disablePast: true,
|
|
3262
3274
|
name: "validDateEnd",
|
|
@@ -3329,12 +3341,12 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
3329
3341
|
item: true,
|
|
3330
3342
|
xs: 4,
|
|
3331
3343
|
container: true,
|
|
3332
|
-
|
|
3344
|
+
justifyContent: "flex-end"
|
|
3333
3345
|
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3334
3346
|
item: true,
|
|
3335
3347
|
xs: 8,
|
|
3336
3348
|
container: true,
|
|
3337
|
-
|
|
3349
|
+
justifyContent: "flex-start"
|
|
3338
3350
|
}, (!isReadOnly || !!watch('vaSigmetVolcanoName')) && /*#__PURE__*/React__default.createElement(Grid, {
|
|
3339
3351
|
item: true,
|
|
3340
3352
|
xs: 12,
|
|
@@ -3448,12 +3460,12 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
|
|
|
3448
3460
|
item: true,
|
|
3449
3461
|
xs: 4,
|
|
3450
3462
|
container: true,
|
|
3451
|
-
|
|
3463
|
+
justifyContent: "flex-end"
|
|
3452
3464
|
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3453
3465
|
item: true,
|
|
3454
3466
|
xs: 8,
|
|
3455
3467
|
container: true,
|
|
3456
|
-
|
|
3468
|
+
justifyContent: "flex-start"
|
|
3457
3469
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3458
3470
|
item: true,
|
|
3459
3471
|
xs: 12,
|
|
@@ -3559,12 +3571,12 @@ var SurfaceWind = function SurfaceWind(_ref) {
|
|
|
3559
3571
|
item: true,
|
|
3560
3572
|
xs: 4,
|
|
3561
3573
|
container: true,
|
|
3562
|
-
|
|
3574
|
+
justifyContent: "flex-end"
|
|
3563
3575
|
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3564
3576
|
item: true,
|
|
3565
3577
|
xs: 8,
|
|
3566
3578
|
container: true,
|
|
3567
|
-
|
|
3579
|
+
justifyContent: "flex-start"
|
|
3568
3580
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3569
3581
|
item: true,
|
|
3570
3582
|
xs: 12,
|
|
@@ -3713,12 +3725,13 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3713
3725
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
3714
3726
|
item: true,
|
|
3715
3727
|
container: true,
|
|
3716
|
-
spacing: 2
|
|
3728
|
+
spacing: 2,
|
|
3729
|
+
className: classes.containerItem
|
|
3717
3730
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3718
3731
|
item: true,
|
|
3719
3732
|
xs: 4,
|
|
3720
3733
|
container: true,
|
|
3721
|
-
|
|
3734
|
+
justifyContent: "flex-end"
|
|
3722
3735
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3723
3736
|
variant: "subtitle1",
|
|
3724
3737
|
className: classes.label
|
|
@@ -3726,7 +3739,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3726
3739
|
item: true,
|
|
3727
3740
|
xs: 8,
|
|
3728
3741
|
container: true,
|
|
3729
|
-
|
|
3742
|
+
justifyContent: "flex-start"
|
|
3730
3743
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3731
3744
|
item: true,
|
|
3732
3745
|
xs: 12
|
|
@@ -4075,7 +4088,9 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4075
4088
|
_ref$initialSigmet = _ref.initialSigmet,
|
|
4076
4089
|
initialSigmet = _ref$initialSigmet === void 0 ? null : _ref$initialSigmet,
|
|
4077
4090
|
_ref$initialCancelSig = _ref.initialCancelSigmet,
|
|
4078
|
-
initialCancelSigmet = _ref$initialCancelSig === void 0 ? null : _ref$initialCancelSig
|
|
4091
|
+
initialCancelSigmet = _ref$initialCancelSig === void 0 ? null : _ref$initialCancelSig,
|
|
4092
|
+
_ref$showMap = _ref.showMap,
|
|
4093
|
+
showMap = _ref$showMap === void 0 ? true : _ref$showMap;
|
|
4079
4094
|
var classes = useStyles$6();
|
|
4080
4095
|
|
|
4081
4096
|
var _useApiContext = useApiContext(),
|
|
@@ -4165,6 +4180,152 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4165
4180
|
setIsDisabled(isInDrawMode);
|
|
4166
4181
|
}
|
|
4167
4182
|
}, [drawMode.start, drawMode.end, isReadOnly, isDisabled]);
|
|
4183
|
+
|
|
4184
|
+
var renderForm = function renderForm() {
|
|
4185
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4186
|
+
container: true,
|
|
4187
|
+
direction: "column",
|
|
4188
|
+
spacing: 2
|
|
4189
|
+
}, !isCancelSigmet && /*#__PURE__*/React__default.createElement(Phenomenon, {
|
|
4190
|
+
productType: "sigmet",
|
|
4191
|
+
isDisabled: isDisabled,
|
|
4192
|
+
onChange: onChangeForm
|
|
4193
|
+
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(ObservationForecast, {
|
|
4194
|
+
isDisabled: isDisabled,
|
|
4195
|
+
isReadOnly: isReadOnly
|
|
4196
|
+
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(ObservationForecastTime, {
|
|
4197
|
+
isDisabled: isDisabled,
|
|
4198
|
+
isReadOnly: isReadOnly,
|
|
4199
|
+
helperText: helperText,
|
|
4200
|
+
onChange: onChangeForm
|
|
4201
|
+
}), !isCancelSigmet && watch('phenomenon') === 'VA_CLD' && /*#__PURE__*/React__default.createElement(VolcanicFields, {
|
|
4202
|
+
isDisabled: isDisabled,
|
|
4203
|
+
isReadOnly: isReadOnly,
|
|
4204
|
+
helperText: helperText
|
|
4205
|
+
}), /*#__PURE__*/React__default.createElement(ValidFrom, {
|
|
4206
|
+
productType: "sigmet",
|
|
4207
|
+
isDisabled: isDisabled,
|
|
4208
|
+
onChange: onChangeForm
|
|
4209
|
+
}), /*#__PURE__*/React__default.createElement(ValidUntil, {
|
|
4210
|
+
productType: "sigmet",
|
|
4211
|
+
isDisabled: isDisabled,
|
|
4212
|
+
onChange: onChangeForm
|
|
4213
|
+
})), /*#__PURE__*/React__default.createElement(SelectFIR, {
|
|
4214
|
+
productType: "sigmet",
|
|
4215
|
+
isDisabled: isDisabled
|
|
4216
|
+
}), /*#__PURE__*/React__default.createElement(StartGeometry, {
|
|
4217
|
+
isReadOnly: isReadOnly,
|
|
4218
|
+
drawMode: drawMode,
|
|
4219
|
+
geoJSONs: geoJSONs,
|
|
4220
|
+
setDrawModeType: function setDrawModeType(mapDrawMode, StartOrEndDrawing) {
|
|
4221
|
+
_setDrawModeType(mapDrawMode, StartOrEndDrawing, updateStartDrawing);
|
|
4222
|
+
}
|
|
4223
|
+
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(Levels, {
|
|
4224
|
+
isDisabled: isDisabled,
|
|
4225
|
+
isReadOnly: isReadOnly,
|
|
4226
|
+
onChange: onChangeForm,
|
|
4227
|
+
productType: "sigmet"
|
|
4228
|
+
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(Progress, {
|
|
4229
|
+
productType: "sigmet",
|
|
4230
|
+
isDisabled: isDisabled,
|
|
4231
|
+
isReadOnly: isReadOnly,
|
|
4232
|
+
drawMode: drawMode,
|
|
4233
|
+
geoJSONs: geoJSONs,
|
|
4234
|
+
setDrawModeType: function setDrawModeType(mapDrawMode, StartOrEndDrawing) {
|
|
4235
|
+
_setDrawModeType(mapDrawMode, StartOrEndDrawing, updateEndDrawing);
|
|
4236
|
+
},
|
|
4237
|
+
onChange: onChangeForm
|
|
4238
|
+
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(Change, {
|
|
4239
|
+
isDisabled: isDisabled,
|
|
4240
|
+
isReadOnly: isReadOnly
|
|
4241
|
+
}), isCancelSigmet && watch('vaSigmetMoveToFIR') && /*#__PURE__*/React__default.createElement(Grid, {
|
|
4242
|
+
item: true,
|
|
4243
|
+
container: true,
|
|
4244
|
+
spacing: 2
|
|
4245
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4246
|
+
item: true,
|
|
4247
|
+
xs: 4,
|
|
4248
|
+
container: true,
|
|
4249
|
+
justifyContent: "flex-end"
|
|
4250
|
+
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4251
|
+
item: true,
|
|
4252
|
+
xs: 8,
|
|
4253
|
+
container: true,
|
|
4254
|
+
justifyContent: "flex-start"
|
|
4255
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4256
|
+
item: true,
|
|
4257
|
+
xs: 12
|
|
4258
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4259
|
+
variant: "body2",
|
|
4260
|
+
className: classes.body,
|
|
4261
|
+
"data-testid": "vaSigmetMoveToFIR"
|
|
4262
|
+
}, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default.createElement("b", null, " ", watch('vaSigmetMoveToFIR')))))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4263
|
+
item: true,
|
|
4264
|
+
container: true,
|
|
4265
|
+
spacing: 2,
|
|
4266
|
+
className: classes.containerItem
|
|
4267
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4268
|
+
item: true,
|
|
4269
|
+
xs: 4,
|
|
4270
|
+
container: true,
|
|
4271
|
+
justifyContent: "flex-end"
|
|
4272
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4273
|
+
variant: "subtitle1",
|
|
4274
|
+
className: classes.label
|
|
4275
|
+
}, "Issued at")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4276
|
+
item: true,
|
|
4277
|
+
xs: 8,
|
|
4278
|
+
container: true,
|
|
4279
|
+
justifyContent: "flex-start"
|
|
4280
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4281
|
+
item: true,
|
|
4282
|
+
xs: 12
|
|
4283
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4284
|
+
variant: "body2",
|
|
4285
|
+
className: classes.body
|
|
4286
|
+
}, getProductIssueDate(initialSigmet, initialCancelSigmet)))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4287
|
+
item: true,
|
|
4288
|
+
container: true,
|
|
4289
|
+
spacing: 2
|
|
4290
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4291
|
+
item: true,
|
|
4292
|
+
xs: 4,
|
|
4293
|
+
container: true,
|
|
4294
|
+
justifyContent: "flex-end"
|
|
4295
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4296
|
+
variant: "subtitle1",
|
|
4297
|
+
className: classes.label
|
|
4298
|
+
}, "TAC")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4299
|
+
item: true,
|
|
4300
|
+
xs: 8,
|
|
4301
|
+
container: true,
|
|
4302
|
+
justifyContent: "flex-start"
|
|
4303
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4304
|
+
item: true,
|
|
4305
|
+
xs: 12
|
|
4306
|
+
}, /*#__PURE__*/React__default.createElement(ProductFormTAC, {
|
|
4307
|
+
tac: tac
|
|
4308
|
+
})))), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4309
|
+
name: "sequence",
|
|
4310
|
+
defaultValue: "-1"
|
|
4311
|
+
}),
|
|
4312
|
+
/* Add hidden fields for TAC generation in case of cancel sigmet */
|
|
4313
|
+
isCancelSigmet && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4314
|
+
name: "cancelsSigmetSequenceId"
|
|
4315
|
+
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4316
|
+
name: "validDateEndOfSigmetToCancel"
|
|
4317
|
+
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4318
|
+
name: "validDateStartOfSigmetToCancel"
|
|
4319
|
+
}))), /*#__PURE__*/React__default.createElement(Type, {
|
|
4320
|
+
isDisabled: isDisabled,
|
|
4321
|
+
isReadOnly: isReadOnly
|
|
4322
|
+
}));
|
|
4323
|
+
};
|
|
4324
|
+
|
|
4325
|
+
if (!showMap) {
|
|
4326
|
+
return renderForm();
|
|
4327
|
+
}
|
|
4328
|
+
|
|
4168
4329
|
return /*#__PURE__*/React__default.createElement("form", {
|
|
4169
4330
|
onChange: onChangeForm,
|
|
4170
4331
|
onSubmit: handleSubmit(function () {
|
|
@@ -4195,145 +4356,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4195
4356
|
item: true,
|
|
4196
4357
|
xs: 4,
|
|
4197
4358
|
className: classes.productForm
|
|
4198
|
-
},
|
|
4199
|
-
utils: MomentUtils
|
|
4200
|
-
}, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4201
|
-
container: true,
|
|
4202
|
-
direction: "column",
|
|
4203
|
-
spacing: 2
|
|
4204
|
-
}, !isCancelSigmet && /*#__PURE__*/React__default.createElement(Phenomenon, {
|
|
4205
|
-
productType: "sigmet",
|
|
4206
|
-
isDisabled: isDisabled,
|
|
4207
|
-
onChange: onChangeForm
|
|
4208
|
-
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(ObservationForecast, {
|
|
4209
|
-
isDisabled: isDisabled,
|
|
4210
|
-
isReadOnly: isReadOnly
|
|
4211
|
-
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(ObservationForecastTime, {
|
|
4212
|
-
isDisabled: isDisabled,
|
|
4213
|
-
isReadOnly: isReadOnly,
|
|
4214
|
-
helperText: helperText,
|
|
4215
|
-
onChange: onChangeForm
|
|
4216
|
-
}), !isCancelSigmet && watch('phenomenon') === 'VA_CLD' && /*#__PURE__*/React__default.createElement(VolcanicFields, {
|
|
4217
|
-
isDisabled: isDisabled,
|
|
4218
|
-
isReadOnly: isReadOnly,
|
|
4219
|
-
helperText: helperText
|
|
4220
|
-
}), /*#__PURE__*/React__default.createElement(ValidFrom, {
|
|
4221
|
-
productType: "sigmet",
|
|
4222
|
-
isDisabled: isDisabled,
|
|
4223
|
-
onChange: onChangeForm
|
|
4224
|
-
}), /*#__PURE__*/React__default.createElement(ValidUntil, {
|
|
4225
|
-
productType: "sigmet",
|
|
4226
|
-
isDisabled: isDisabled,
|
|
4227
|
-
onChange: onChangeForm
|
|
4228
|
-
})), /*#__PURE__*/React__default.createElement(SelectFIR, {
|
|
4229
|
-
productType: "sigmet",
|
|
4230
|
-
isDisabled: isDisabled
|
|
4231
|
-
}), /*#__PURE__*/React__default.createElement(StartGeometry, {
|
|
4232
|
-
isReadOnly: isReadOnly,
|
|
4233
|
-
drawMode: drawMode,
|
|
4234
|
-
geoJSONs: geoJSONs,
|
|
4235
|
-
setDrawModeType: function setDrawModeType(mapDrawMode, StartOrEndDrawing) {
|
|
4236
|
-
_setDrawModeType(mapDrawMode, StartOrEndDrawing, updateStartDrawing);
|
|
4237
|
-
}
|
|
4238
|
-
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(Levels, {
|
|
4239
|
-
isDisabled: isDisabled,
|
|
4240
|
-
isReadOnly: isReadOnly,
|
|
4241
|
-
onChange: onChangeForm,
|
|
4242
|
-
productType: "sigmet"
|
|
4243
|
-
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(Progress, {
|
|
4244
|
-
productType: "sigmet",
|
|
4245
|
-
isDisabled: isDisabled,
|
|
4246
|
-
isReadOnly: isReadOnly,
|
|
4247
|
-
drawMode: drawMode,
|
|
4248
|
-
geoJSONs: geoJSONs,
|
|
4249
|
-
setDrawModeType: function setDrawModeType(mapDrawMode, StartOrEndDrawing) {
|
|
4250
|
-
_setDrawModeType(mapDrawMode, StartOrEndDrawing, updateEndDrawing);
|
|
4251
|
-
},
|
|
4252
|
-
onChange: onChangeForm
|
|
4253
|
-
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(Change, {
|
|
4254
|
-
isDisabled: isDisabled,
|
|
4255
|
-
isReadOnly: isReadOnly
|
|
4256
|
-
}), isCancelSigmet && watch('vaSigmetMoveToFIR') && /*#__PURE__*/React__default.createElement(Grid, {
|
|
4257
|
-
item: true,
|
|
4258
|
-
container: true,
|
|
4259
|
-
spacing: 2
|
|
4260
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4261
|
-
item: true,
|
|
4262
|
-
xs: 4,
|
|
4263
|
-
container: true,
|
|
4264
|
-
justify: "flex-end"
|
|
4265
|
-
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4266
|
-
item: true,
|
|
4267
|
-
xs: 8,
|
|
4268
|
-
container: true,
|
|
4269
|
-
justify: "flex-start"
|
|
4270
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4271
|
-
item: true,
|
|
4272
|
-
xs: 12
|
|
4273
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4274
|
-
variant: "body2",
|
|
4275
|
-
className: classes.body,
|
|
4276
|
-
"data-testid": "vaSigmetMoveToFIR"
|
|
4277
|
-
}, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default.createElement("b", null, " ", watch('vaSigmetMoveToFIR')))))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4278
|
-
item: true,
|
|
4279
|
-
container: true,
|
|
4280
|
-
spacing: 2
|
|
4281
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4282
|
-
item: true,
|
|
4283
|
-
xs: 4,
|
|
4284
|
-
container: true,
|
|
4285
|
-
justify: "flex-end"
|
|
4286
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4287
|
-
variant: "subtitle1",
|
|
4288
|
-
className: classes.label
|
|
4289
|
-
}, "Issued at")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4290
|
-
item: true,
|
|
4291
|
-
xs: 8,
|
|
4292
|
-
container: true,
|
|
4293
|
-
justify: "flex-start"
|
|
4294
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4295
|
-
item: true,
|
|
4296
|
-
xs: 12
|
|
4297
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4298
|
-
variant: "body2",
|
|
4299
|
-
className: classes.body
|
|
4300
|
-
}, getProductIssueDate(initialSigmet, initialCancelSigmet)))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4301
|
-
item: true,
|
|
4302
|
-
container: true,
|
|
4303
|
-
spacing: 2
|
|
4304
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4305
|
-
item: true,
|
|
4306
|
-
xs: 4,
|
|
4307
|
-
container: true,
|
|
4308
|
-
justify: "flex-end"
|
|
4309
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4310
|
-
variant: "subtitle1",
|
|
4311
|
-
className: classes.label
|
|
4312
|
-
}, "TAC")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4313
|
-
item: true,
|
|
4314
|
-
xs: 8,
|
|
4315
|
-
container: true,
|
|
4316
|
-
justify: "flex-start"
|
|
4317
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4318
|
-
item: true,
|
|
4319
|
-
xs: 12
|
|
4320
|
-
}, /*#__PURE__*/React__default.createElement(ProductFormTAC, {
|
|
4321
|
-
tac: tac
|
|
4322
|
-
})))), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4323
|
-
name: "sequence",
|
|
4324
|
-
defaultValue: "-1"
|
|
4325
|
-
}),
|
|
4326
|
-
/* Add hidden fields for TAC generation in case of cancel sigmet */
|
|
4327
|
-
isCancelSigmet && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4328
|
-
name: "cancelsSigmetSequenceId"
|
|
4329
|
-
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4330
|
-
name: "validDateEndOfSigmetToCancel"
|
|
4331
|
-
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4332
|
-
name: "validDateStartOfSigmetToCancel"
|
|
4333
|
-
}))), /*#__PURE__*/React__default.createElement(Type, {
|
|
4334
|
-
isDisabled: isDisabled,
|
|
4335
|
-
isReadOnly: isReadOnly
|
|
4336
|
-
}))))));
|
|
4359
|
+
}, renderForm())));
|
|
4337
4360
|
};
|
|
4338
4361
|
|
|
4339
4362
|
var AirmetForm = function AirmetForm(_ref) {
|
|
@@ -4343,7 +4366,9 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4343
4366
|
_ref$initialAirmet = _ref.initialAirmet,
|
|
4344
4367
|
initialAirmet = _ref$initialAirmet === void 0 ? null : _ref$initialAirmet,
|
|
4345
4368
|
_ref$initialCancelAir = _ref.initialCancelAirmet,
|
|
4346
|
-
initialCancelAirmet = _ref$initialCancelAir === void 0 ? null : _ref$initialCancelAir
|
|
4369
|
+
initialCancelAirmet = _ref$initialCancelAir === void 0 ? null : _ref$initialCancelAir,
|
|
4370
|
+
_ref$showMap = _ref.showMap,
|
|
4371
|
+
showMap = _ref$showMap === void 0 ? true : _ref$showMap;
|
|
4347
4372
|
var classes = useStyles$6();
|
|
4348
4373
|
|
|
4349
4374
|
var _useApiContext = useApiContext(),
|
|
@@ -4413,6 +4438,132 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4413
4438
|
setIsDisabled(isInDrawMode);
|
|
4414
4439
|
}
|
|
4415
4440
|
}, [drawMode.start, isReadOnly, isDisabled]);
|
|
4441
|
+
|
|
4442
|
+
var renderForm = function renderForm() {
|
|
4443
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4444
|
+
container: true,
|
|
4445
|
+
direction: "column",
|
|
4446
|
+
spacing: 2
|
|
4447
|
+
}, !isCancelAirmet && /*#__PURE__*/React__default.createElement(Phenomenon, {
|
|
4448
|
+
productType: "airmet",
|
|
4449
|
+
isDisabled: isDisabled,
|
|
4450
|
+
onChange: onChangeForm
|
|
4451
|
+
}), !isCancelAirmet && phenomenon === 'SFC_VIS' && /*#__PURE__*/React__default.createElement(SurfaceVisibility, {
|
|
4452
|
+
isDisabled: isDisabled,
|
|
4453
|
+
onChange: onChangeForm
|
|
4454
|
+
}), !isCancelAirmet && phenomenon === 'SFC_WIND' && /*#__PURE__*/React__default.createElement(SurfaceWind, {
|
|
4455
|
+
isDisabled: isDisabled,
|
|
4456
|
+
onChange: onChangeForm
|
|
4457
|
+
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(ObservationForecast, {
|
|
4458
|
+
isDisabled: isDisabled,
|
|
4459
|
+
isReadOnly: isReadOnly
|
|
4460
|
+
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(ObservationForecastTime, {
|
|
4461
|
+
isDisabled: isDisabled,
|
|
4462
|
+
isReadOnly: isReadOnly,
|
|
4463
|
+
helperText: helperText,
|
|
4464
|
+
onChange: onChangeForm
|
|
4465
|
+
}), /*#__PURE__*/React__default.createElement(ValidFrom, {
|
|
4466
|
+
productType: "airmet",
|
|
4467
|
+
isDisabled: isDisabled,
|
|
4468
|
+
onChange: onChangeForm
|
|
4469
|
+
}), /*#__PURE__*/React__default.createElement(ValidUntil, {
|
|
4470
|
+
productType: "airmet",
|
|
4471
|
+
isDisabled: isDisabled,
|
|
4472
|
+
onChange: onChangeForm
|
|
4473
|
+
})), /*#__PURE__*/React__default.createElement(SelectFIR, {
|
|
4474
|
+
productType: "airmet",
|
|
4475
|
+
isDisabled: isDisabled
|
|
4476
|
+
}), /*#__PURE__*/React__default.createElement(StartGeometry, {
|
|
4477
|
+
isReadOnly: isReadOnly,
|
|
4478
|
+
drawMode: drawMode,
|
|
4479
|
+
geoJSONs: geoJSONs,
|
|
4480
|
+
setDrawModeType: function setDrawModeType(mapDrawMode, StartOrEndDrawing) {
|
|
4481
|
+
_setDrawModeType(mapDrawMode, StartOrEndDrawing, updateStartDrawing);
|
|
4482
|
+
}
|
|
4483
|
+
}), !isCancelAirmet && phenomenon !== 'SFC_WIND' && phenomenon !== 'SFC_VIS' && phenomenon !== 'BKN_CLD' && phenomenon !== 'OVC_CLD' && /*#__PURE__*/React__default.createElement(Levels, {
|
|
4484
|
+
isDisabled: isDisabled,
|
|
4485
|
+
isReadOnly: isReadOnly,
|
|
4486
|
+
onChange: onChangeForm,
|
|
4487
|
+
productType: "airmet"
|
|
4488
|
+
}), !isCancelAirmet && (phenomenon === 'BKN_CLD' || phenomenon === 'OVC_CLD') && /*#__PURE__*/React__default.createElement(CloudLevels, {
|
|
4489
|
+
isDisabled: isDisabled,
|
|
4490
|
+
isReadOnly: isReadOnly,
|
|
4491
|
+
onChange: onChangeForm
|
|
4492
|
+
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(Progress, {
|
|
4493
|
+
productType: "airmet",
|
|
4494
|
+
isDisabled: isDisabled,
|
|
4495
|
+
isReadOnly: isReadOnly,
|
|
4496
|
+
onChange: onChangeForm
|
|
4497
|
+
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(Change, {
|
|
4498
|
+
isDisabled: isDisabled,
|
|
4499
|
+
isReadOnly: isReadOnly
|
|
4500
|
+
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4501
|
+
item: true,
|
|
4502
|
+
container: true,
|
|
4503
|
+
spacing: 2,
|
|
4504
|
+
className: classes.containerItem
|
|
4505
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4506
|
+
item: true,
|
|
4507
|
+
xs: 4,
|
|
4508
|
+
container: true,
|
|
4509
|
+
justifyContent: "flex-end"
|
|
4510
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4511
|
+
variant: "subtitle1",
|
|
4512
|
+
className: classes.label
|
|
4513
|
+
}, "Issued at")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4514
|
+
item: true,
|
|
4515
|
+
xs: 8,
|
|
4516
|
+
container: true,
|
|
4517
|
+
justifyContent: "flex-start"
|
|
4518
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4519
|
+
item: true,
|
|
4520
|
+
xs: 12
|
|
4521
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4522
|
+
variant: "body2",
|
|
4523
|
+
className: classes.body
|
|
4524
|
+
}, getProductIssueDate(initialAirmet, initialCancelAirmet)))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4525
|
+
item: true,
|
|
4526
|
+
container: true,
|
|
4527
|
+
spacing: 2
|
|
4528
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4529
|
+
item: true,
|
|
4530
|
+
xs: 4,
|
|
4531
|
+
container: true,
|
|
4532
|
+
justifyContent: "flex-end"
|
|
4533
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4534
|
+
variant: "subtitle1",
|
|
4535
|
+
className: classes.label
|
|
4536
|
+
}, "TAC")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4537
|
+
item: true,
|
|
4538
|
+
xs: 8,
|
|
4539
|
+
container: true,
|
|
4540
|
+
justifyContent: "flex-start"
|
|
4541
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4542
|
+
item: true,
|
|
4543
|
+
xs: 12
|
|
4544
|
+
}, /*#__PURE__*/React__default.createElement(ProductFormTAC, {
|
|
4545
|
+
tac: tac
|
|
4546
|
+
})))), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4547
|
+
name: "sequence",
|
|
4548
|
+
defaultValue: "-1"
|
|
4549
|
+
}),
|
|
4550
|
+
/* Add hidden fields for TAC generation in case of cancel airmet */
|
|
4551
|
+
isCancelAirmet && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4552
|
+
name: "cancelsAirmetSequenceId"
|
|
4553
|
+
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4554
|
+
name: "validDateEndOfAirmetToCancel"
|
|
4555
|
+
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4556
|
+
name: "validDateStartOfAirmetToCancel"
|
|
4557
|
+
}))), /*#__PURE__*/React__default.createElement(Type, {
|
|
4558
|
+
isDisabled: isDisabled,
|
|
4559
|
+
isReadOnly: isReadOnly
|
|
4560
|
+
}));
|
|
4561
|
+
};
|
|
4562
|
+
|
|
4563
|
+
if (!showMap) {
|
|
4564
|
+
return renderForm();
|
|
4565
|
+
}
|
|
4566
|
+
|
|
4416
4567
|
return /*#__PURE__*/React__default.createElement("form", {
|
|
4417
4568
|
onChange: onChangeForm,
|
|
4418
4569
|
onSubmit: handleSubmit(function () {
|
|
@@ -4442,125 +4593,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4442
4593
|
item: true,
|
|
4443
4594
|
xs: 4,
|
|
4444
4595
|
className: classes.productForm
|
|
4445
|
-
},
|
|
4446
|
-
utils: MomentUtils
|
|
4447
|
-
}, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4448
|
-
container: true,
|
|
4449
|
-
direction: "column",
|
|
4450
|
-
spacing: 2
|
|
4451
|
-
}, !isCancelAirmet && /*#__PURE__*/React__default.createElement(Phenomenon, {
|
|
4452
|
-
productType: "airmet",
|
|
4453
|
-
isDisabled: isDisabled,
|
|
4454
|
-
onChange: onChangeForm
|
|
4455
|
-
}), !isCancelAirmet && phenomenon === 'SFC_VIS' && /*#__PURE__*/React__default.createElement(SurfaceVisibility, {
|
|
4456
|
-
isDisabled: isDisabled,
|
|
4457
|
-
onChange: onChangeForm
|
|
4458
|
-
}), !isCancelAirmet && phenomenon === 'SFC_WIND' && /*#__PURE__*/React__default.createElement(SurfaceWind, {
|
|
4459
|
-
isDisabled: isDisabled,
|
|
4460
|
-
onChange: onChangeForm
|
|
4461
|
-
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(ObservationForecast, {
|
|
4462
|
-
isDisabled: isDisabled,
|
|
4463
|
-
isReadOnly: isReadOnly
|
|
4464
|
-
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(ObservationForecastTime, {
|
|
4465
|
-
isDisabled: isDisabled,
|
|
4466
|
-
isReadOnly: isReadOnly,
|
|
4467
|
-
helperText: helperText,
|
|
4468
|
-
onChange: onChangeForm
|
|
4469
|
-
}), /*#__PURE__*/React__default.createElement(ValidFrom, {
|
|
4470
|
-
productType: "airmet",
|
|
4471
|
-
isDisabled: isDisabled,
|
|
4472
|
-
onChange: onChangeForm
|
|
4473
|
-
}), /*#__PURE__*/React__default.createElement(ValidUntil, {
|
|
4474
|
-
productType: "airmet",
|
|
4475
|
-
isDisabled: isDisabled,
|
|
4476
|
-
onChange: onChangeForm
|
|
4477
|
-
})), /*#__PURE__*/React__default.createElement(SelectFIR, {
|
|
4478
|
-
productType: "airmet",
|
|
4479
|
-
isDisabled: isDisabled
|
|
4480
|
-
}), /*#__PURE__*/React__default.createElement(StartGeometry, {
|
|
4481
|
-
isReadOnly: isReadOnly,
|
|
4482
|
-
drawMode: drawMode,
|
|
4483
|
-
geoJSONs: geoJSONs,
|
|
4484
|
-
setDrawModeType: function setDrawModeType(mapDrawMode, StartOrEndDrawing) {
|
|
4485
|
-
_setDrawModeType(mapDrawMode, StartOrEndDrawing, updateStartDrawing);
|
|
4486
|
-
}
|
|
4487
|
-
}), !isCancelAirmet && phenomenon !== 'SFC_WIND' && phenomenon !== 'SFC_VIS' && phenomenon !== 'BKN_CLD' && phenomenon !== 'OVC_CLD' && /*#__PURE__*/React__default.createElement(Levels, {
|
|
4488
|
-
isDisabled: isDisabled,
|
|
4489
|
-
isReadOnly: isReadOnly,
|
|
4490
|
-
onChange: onChangeForm,
|
|
4491
|
-
productType: "airmet"
|
|
4492
|
-
}), !isCancelAirmet && (phenomenon === 'BKN_CLD' || phenomenon === 'OVC_CLD') && /*#__PURE__*/React__default.createElement(CloudLevels, {
|
|
4493
|
-
isDisabled: isDisabled,
|
|
4494
|
-
isReadOnly: isReadOnly,
|
|
4495
|
-
onChange: onChangeForm
|
|
4496
|
-
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(Progress, {
|
|
4497
|
-
productType: "airmet",
|
|
4498
|
-
isDisabled: isDisabled,
|
|
4499
|
-
isReadOnly: isReadOnly,
|
|
4500
|
-
onChange: onChangeForm
|
|
4501
|
-
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(Change, {
|
|
4502
|
-
isDisabled: isDisabled,
|
|
4503
|
-
isReadOnly: isReadOnly
|
|
4504
|
-
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4505
|
-
item: true,
|
|
4506
|
-
container: true,
|
|
4507
|
-
spacing: 2
|
|
4508
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4509
|
-
item: true,
|
|
4510
|
-
xs: 4,
|
|
4511
|
-
container: true,
|
|
4512
|
-
justify: "flex-end"
|
|
4513
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4514
|
-
variant: "subtitle1",
|
|
4515
|
-
className: classes.label
|
|
4516
|
-
}, "Issued at")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4517
|
-
item: true,
|
|
4518
|
-
xs: 8,
|
|
4519
|
-
container: true,
|
|
4520
|
-
justify: "flex-start"
|
|
4521
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4522
|
-
item: true,
|
|
4523
|
-
xs: 12
|
|
4524
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4525
|
-
variant: "body2",
|
|
4526
|
-
className: classes.body
|
|
4527
|
-
}, getProductIssueDate(initialAirmet, initialCancelAirmet)))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4528
|
-
item: true,
|
|
4529
|
-
container: true,
|
|
4530
|
-
spacing: 2
|
|
4531
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4532
|
-
item: true,
|
|
4533
|
-
xs: 4,
|
|
4534
|
-
container: true,
|
|
4535
|
-
justify: "flex-end"
|
|
4536
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4537
|
-
variant: "subtitle1",
|
|
4538
|
-
className: classes.label
|
|
4539
|
-
}, "TAC")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4540
|
-
item: true,
|
|
4541
|
-
xs: 8,
|
|
4542
|
-
container: true,
|
|
4543
|
-
justify: "flex-start"
|
|
4544
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4545
|
-
item: true,
|
|
4546
|
-
xs: 12
|
|
4547
|
-
}, /*#__PURE__*/React__default.createElement(ProductFormTAC, {
|
|
4548
|
-
tac: tac
|
|
4549
|
-
})))), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4550
|
-
name: "sequence",
|
|
4551
|
-
defaultValue: "-1"
|
|
4552
|
-
}),
|
|
4553
|
-
/* Add hidden fields for TAC generation in case of cancel airmet */
|
|
4554
|
-
isCancelAirmet && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4555
|
-
name: "cancelsAirmetSequenceId"
|
|
4556
|
-
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4557
|
-
name: "validDateEndOfAirmetToCancel"
|
|
4558
|
-
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4559
|
-
name: "validDateStartOfAirmetToCancel"
|
|
4560
|
-
}))), /*#__PURE__*/React__default.createElement(Type, {
|
|
4561
|
-
isDisabled: isDisabled,
|
|
4562
|
-
isReadOnly: isReadOnly
|
|
4563
|
-
}))))));
|
|
4596
|
+
}, renderForm())));
|
|
4564
4597
|
};
|
|
4565
4598
|
|
|
4566
4599
|
var useStyles$3 = makeStyles({
|
|
@@ -4580,6 +4613,11 @@ var useStyles$3 = makeStyles({
|
|
|
4580
4613
|
minHeight: 200,
|
|
4581
4614
|
minWidth: 400,
|
|
4582
4615
|
height: '100%'
|
|
4616
|
+
},
|
|
4617
|
+
dialog: {
|
|
4618
|
+
'& .MuiDialogContent-root': {
|
|
4619
|
+
paddingTop: 20
|
|
4620
|
+
}
|
|
4583
4621
|
}
|
|
4584
4622
|
});
|
|
4585
4623
|
|
|
@@ -4609,9 +4647,8 @@ var ContentDialog = function ContentDialog(_a) {
|
|
|
4609
4647
|
open: open,
|
|
4610
4648
|
onClose: handleClose,
|
|
4611
4649
|
maxWidth: other.maxWidth ? other.maxWidth : 'lg',
|
|
4612
|
-
|
|
4650
|
+
className: classes.dialog
|
|
4613
4651
|
}, other), /*#__PURE__*/React.createElement(DialogTitle, {
|
|
4614
|
-
disableTypography: true,
|
|
4615
4652
|
className: classes.dialogHeader
|
|
4616
4653
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
4617
4654
|
container: true,
|
|
@@ -4903,7 +4940,7 @@ var ProductList = function ProductList(_ref) {
|
|
|
4903
4940
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4904
4941
|
container: true,
|
|
4905
4942
|
item: true,
|
|
4906
|
-
|
|
4943
|
+
justifyContent: "flex-end"
|
|
4907
4944
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
4908
4945
|
variant: "contained",
|
|
4909
4946
|
color: "secondary",
|
|
@@ -4933,7 +4970,7 @@ var ProductList = function ProductList(_ref) {
|
|
|
4933
4970
|
}));
|
|
4934
4971
|
})), isLoading && /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
4935
4972
|
"data-testid": "productList-skeleton",
|
|
4936
|
-
variant: "
|
|
4973
|
+
variant: "rectangular",
|
|
4937
4974
|
height: "660px"
|
|
4938
4975
|
})));
|
|
4939
4976
|
};
|