@opengeoweb/sigmet-airmet 4.1.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +1221 -1245
- package/index.umd.js +1196 -1246
- package/lib/AirmetDemo.stories.d.ts +1 -0
- package/lib/SigmetDemo.stories.d.ts +1 -0
- package/lib/components/ContentDialog/ContentDialog.stories.d.ts +80 -1
- package/lib/components/ProductForms/AirmetForm/AirmetForm.stories.d.ts +79 -4
- package/lib/components/ProductForms/ProductForm.styles.d.ts +22 -9
- package/lib/components/ProductForms/ProductFormDialog.Sigmet.stories.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/IssuedAt.d.ts +6 -0
- package/lib/components/ProductForms/ProductFormFields/IssuedAt.spec.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.d.ts +8 -0
- package/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.spec.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/Tac.d.ts +7 -0
- package/lib/components/ProductForms/ProductFormFields/Tac.spec.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/ValidFrom.d.ts +2 -0
- package/lib/components/ProductForms/ProductFormLayout.d.ts +7 -0
- package/lib/components/ProductForms/SigmetForm/SigmetForm.stories.d.ts +88 -4
- package/lib/components/ProductList/ProductList.stories.d.ts +32 -0
- package/lib/utils/testUtils.d.ts +2 -1
- package/package.json +13 -12
package/index.esm.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { FormControlLabel, Radio, Grid, Typography, Tooltip, Button, Checkbox, MenuItem, FormHelperText,
|
|
3
|
+
import { FormControlLabel, Radio, Grid, Typography, Tooltip, Box, Button, Checkbox, MenuItem, FormHelperText, useTheme, Dialog, DialogTitle, DialogContent, Card, List, ListItem, Skeleton, Backdrop, CircularProgress } from '@mui/material';
|
|
4
4
|
import { useFormContext } from 'react-hook-form';
|
|
5
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';
|
|
6
6
|
import { useApiContext, useApi, createApiInstance } from '@opengeoweb/api';
|
|
7
7
|
import produce, { produce as produce$1 } from 'immer';
|
|
8
|
-
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
9
|
-
import { mapTypes, mapSelectors, generateMapId, generateTimesliderId, SyncGroups, generateLayerId, mapActions, publicLayers, MapControls, LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, MapViewLayer, TimeSliderConnect, LegendConnect } from '@opengeoweb/core';
|
|
10
8
|
import * as turf from '@turf/turf';
|
|
11
9
|
import { polygonToLineString, booleanClockwise, rewind } from '@turf/turf';
|
|
12
|
-
import { useDraftFormHelpers, useIsMounted, StatusTag, AlertBanner, usePreventBrowserClose, useConfirmationDialog, isAxiosError, getAxiosErrorMessage, ConfirmationServiceProvider, usePoller } from '@opengeoweb/shared';
|
|
13
|
-
import { Location, DrawRegion, DrawPolygon, DrawFIRLand, Delete, ChevronLeft,
|
|
10
|
+
import { useDraftFormHelpers, ToggleMenu, useIsMounted, StatusTag, AlertBanner, usePreventBrowserClose, useConfirmationDialog, isAxiosError, getAxiosErrorMessage, ConfirmationServiceProvider, usePoller } from '@opengeoweb/shared';
|
|
11
|
+
import { Location, DrawRegion, DrawPolygon, DrawFIRLand, Delete, ChevronLeft, Edit, Success, Clock } from '@opengeoweb/theme';
|
|
14
12
|
import moment from 'moment';
|
|
15
13
|
import { debounce } from 'lodash';
|
|
14
|
+
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
15
|
+
import { mapTypes, mapSelectors, generateMapId, generateTimesliderId, SyncGroups, generateLayerId, mapActions, publicLayers, MapControls, LayerManagerMapButtonConnect, LegendMapButtonConnect, MultiDimensionSelectMapButtonsConnect, MapViewConnect, MapViewLayer, TimeSliderConnect, LegendConnect } from '@opengeoweb/core';
|
|
16
16
|
|
|
17
17
|
function _typeof(obj) {
|
|
18
18
|
"@babel/helpers - typeof";
|
|
@@ -117,6 +117,188 @@ function _nonIterableRest() {
|
|
|
117
117
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
var type = "FeatureCollection";
|
|
121
|
+
var features = [
|
|
122
|
+
{
|
|
123
|
+
type: "Feature",
|
|
124
|
+
geometry: {
|
|
125
|
+
type: "Polygon",
|
|
126
|
+
coordinates: [
|
|
127
|
+
[
|
|
128
|
+
[
|
|
129
|
+
5,
|
|
130
|
+
55
|
|
131
|
+
],
|
|
132
|
+
[
|
|
133
|
+
4.331914,
|
|
134
|
+
55.332644
|
|
135
|
+
],
|
|
136
|
+
[
|
|
137
|
+
3.368817,
|
|
138
|
+
55.764314
|
|
139
|
+
],
|
|
140
|
+
[
|
|
141
|
+
2.761908,
|
|
142
|
+
54.379261
|
|
143
|
+
],
|
|
144
|
+
[
|
|
145
|
+
3.15576,
|
|
146
|
+
52.913554
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
2.000002,
|
|
150
|
+
51.500002
|
|
151
|
+
],
|
|
152
|
+
[
|
|
153
|
+
3.370001,
|
|
154
|
+
51.369722
|
|
155
|
+
],
|
|
156
|
+
[
|
|
157
|
+
3.370527,
|
|
158
|
+
51.36867
|
|
159
|
+
],
|
|
160
|
+
[
|
|
161
|
+
3.362223,
|
|
162
|
+
51.320002
|
|
163
|
+
],
|
|
164
|
+
[
|
|
165
|
+
3.36389,
|
|
166
|
+
51.313608
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
3.373613,
|
|
170
|
+
51.309999
|
|
171
|
+
],
|
|
172
|
+
[
|
|
173
|
+
3.952501,
|
|
174
|
+
51.214441
|
|
175
|
+
],
|
|
176
|
+
[
|
|
177
|
+
4.397501,
|
|
178
|
+
51.452776
|
|
179
|
+
],
|
|
180
|
+
[
|
|
181
|
+
5.078611,
|
|
182
|
+
51.391665
|
|
183
|
+
],
|
|
184
|
+
[
|
|
185
|
+
5.848333,
|
|
186
|
+
51.139444
|
|
187
|
+
],
|
|
188
|
+
[
|
|
189
|
+
5.651667,
|
|
190
|
+
50.824717
|
|
191
|
+
],
|
|
192
|
+
[
|
|
193
|
+
6.011797,
|
|
194
|
+
50.757273
|
|
195
|
+
],
|
|
196
|
+
[
|
|
197
|
+
5.934168,
|
|
198
|
+
51.036386
|
|
199
|
+
],
|
|
200
|
+
[
|
|
201
|
+
6.222223,
|
|
202
|
+
51.361666
|
|
203
|
+
],
|
|
204
|
+
[
|
|
205
|
+
5.94639,
|
|
206
|
+
51.811663
|
|
207
|
+
],
|
|
208
|
+
[
|
|
209
|
+
6.405001,
|
|
210
|
+
51.830828
|
|
211
|
+
],
|
|
212
|
+
[
|
|
213
|
+
7.053095,
|
|
214
|
+
52.237764
|
|
215
|
+
],
|
|
216
|
+
[
|
|
217
|
+
7.031389,
|
|
218
|
+
52.268885
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
7.063612,
|
|
222
|
+
52.346109
|
|
223
|
+
],
|
|
224
|
+
[
|
|
225
|
+
7.065557,
|
|
226
|
+
52.385828
|
|
227
|
+
],
|
|
228
|
+
[
|
|
229
|
+
7.133055,
|
|
230
|
+
52.888887
|
|
231
|
+
],
|
|
232
|
+
[
|
|
233
|
+
7.14218,
|
|
234
|
+
52.898244
|
|
235
|
+
],
|
|
236
|
+
[
|
|
237
|
+
7.191667,
|
|
238
|
+
53.3
|
|
239
|
+
],
|
|
240
|
+
[
|
|
241
|
+
6.5,
|
|
242
|
+
53.666667
|
|
243
|
+
],
|
|
244
|
+
[
|
|
245
|
+
6.500002,
|
|
246
|
+
55.000002
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
5,
|
|
250
|
+
55
|
|
251
|
+
]
|
|
252
|
+
]
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
properties: {
|
|
256
|
+
centlong: 4.98042633,
|
|
257
|
+
REGION: "EUR",
|
|
258
|
+
StateName: "Netherlands",
|
|
259
|
+
FIRname: "AMSTERDAM FIR",
|
|
260
|
+
StateCode: "NLD",
|
|
261
|
+
centlat: 52.8618788,
|
|
262
|
+
ICAOCODE: "EHAA"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
];
|
|
266
|
+
var firArea = {
|
|
267
|
+
type: type,
|
|
268
|
+
features: features
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
/* *
|
|
272
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
273
|
+
* you may not use this file except in compliance with the License.
|
|
274
|
+
* You may obtain a copy of the License at
|
|
275
|
+
*
|
|
276
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
277
|
+
*
|
|
278
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
279
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
280
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
281
|
+
* See the License for the specific language governing permissions and
|
|
282
|
+
* limitations under the License.
|
|
283
|
+
*
|
|
284
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
285
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
286
|
+
* */
|
|
287
|
+
/**
|
|
288
|
+
* Function to translate the geojson data to a GeoJSON.FeatureCollection
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
var getFir = function getFir() {
|
|
292
|
+
return firArea;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Function to check if the given geojson object has 'fir' selectionType property
|
|
296
|
+
*/
|
|
297
|
+
|
|
298
|
+
var isFir = function isFir(geojson) {
|
|
299
|
+
return geojson && geojson.features && geojson.features[0].properties['selectionType'] === 'fir';
|
|
300
|
+
};
|
|
301
|
+
|
|
120
302
|
var srsAndBboxDefault = {
|
|
121
303
|
bbox: {
|
|
122
304
|
left: -1205884.85699446,
|
|
@@ -260,602 +442,177 @@ var geoJSONTemplate = {
|
|
|
260
442
|
POLYGON: {
|
|
261
443
|
start: emptyPolygonGeoJSONStart,
|
|
262
444
|
end: emptyPolygonGeoJSONEnd
|
|
263
|
-
},
|
|
264
|
-
FIR: {
|
|
265
|
-
start: null,
|
|
266
|
-
end: null
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* The possible phenomena for the sigmet
|
|
272
|
-
*/
|
|
273
|
-
var SigmetPhenomena;
|
|
274
|
-
|
|
275
|
-
(function (SigmetPhenomena) {
|
|
276
|
-
SigmetPhenomena["EMBD_TS"] = "Embedded thunderstorm(s)";
|
|
277
|
-
SigmetPhenomena["EMBD_TSGR"] = "Embedded thunderstorm(s) with hail";
|
|
278
|
-
SigmetPhenomena["FRQ_TS"] = "Frequent thunderstorm(s)";
|
|
279
|
-
SigmetPhenomena["FRQ_TSGR"] = "Frequent thunderstorm(s) with hail";
|
|
280
|
-
SigmetPhenomena["HVY_DS"] = "Heavy duststorm";
|
|
281
|
-
SigmetPhenomena["HVY_SS"] = "Heavy sandstorm";
|
|
282
|
-
SigmetPhenomena["OBSC_TS"] = "Obscured thunderstorm(s)";
|
|
283
|
-
SigmetPhenomena["OBSC_TSGR"] = "Obscured thunderstorm(s) with hail";
|
|
284
|
-
SigmetPhenomena["RDOACT_CLD"] = "Radioactive cloud";
|
|
285
|
-
SigmetPhenomena["SEV_ICE"] = "Severe icing";
|
|
286
|
-
SigmetPhenomena["SEV_ICE_FRZ_RN"] = "Severe icing due to freezing rain";
|
|
287
|
-
SigmetPhenomena["SEV_MTW"] = "Severe mountain wave";
|
|
288
|
-
SigmetPhenomena["SEV_TURB"] = "Severe turbulence";
|
|
289
|
-
SigmetPhenomena["SQL_TS"] = "Squall line";
|
|
290
|
-
SigmetPhenomena["SQL_TSGR"] = "Squall line thunderstorm(s) with hail"; // 'TC' = 'Tropical cyclone', // Don't show this option in the list because it will be not used by KNMI.
|
|
291
|
-
|
|
292
|
-
SigmetPhenomena["VA_CLD"] = "Volcanic ash cloud";
|
|
293
|
-
})(SigmetPhenomena || (SigmetPhenomena = {}));
|
|
294
|
-
/**
|
|
295
|
-
* The possible phenomena for the airmet
|
|
296
|
-
*/
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
var AirmetPhenomena;
|
|
300
|
-
|
|
301
|
-
(function (AirmetPhenomena) {
|
|
302
|
-
AirmetPhenomena["SFC_VIS"] = "Surface visibility";
|
|
303
|
-
AirmetPhenomena["SFC_WIND"] = "Surface wind";
|
|
304
|
-
AirmetPhenomena["OVC_CLD"] = "Overcast cloud";
|
|
305
|
-
AirmetPhenomena["BKN_CLD"] = "Broken cloud";
|
|
306
|
-
AirmetPhenomena["ISOL_CB"] = "Isolated cumulonimbus cloud";
|
|
307
|
-
AirmetPhenomena["OCNL_CB"] = "Occasional cumulonimbus cloud";
|
|
308
|
-
AirmetPhenomena["FRQ_CB"] = "Frequent cumulonimbus cloud";
|
|
309
|
-
AirmetPhenomena["ISOL_TS"] = "Isolated thunderstorm(s)";
|
|
310
|
-
AirmetPhenomena["OCNL_TS"] = "Occasional thunderstorm(s)";
|
|
311
|
-
AirmetPhenomena["ISOL_TSGR"] = "Isolated thunderstorm(s) with hail";
|
|
312
|
-
AirmetPhenomena["OCNL_TSGR"] = "Occasional thunderstorm(s) with hail";
|
|
313
|
-
AirmetPhenomena["ISOL_TCU"] = "Isolated towering cumulus cloud";
|
|
314
|
-
AirmetPhenomena["OCNL_TCU"] = "Occasional towering cumulus cloud";
|
|
315
|
-
AirmetPhenomena["FRQ_TCU"] = "Frequent towering cumulus cloud";
|
|
316
|
-
AirmetPhenomena["MOD_ICE"] = "Moderate icing";
|
|
317
|
-
AirmetPhenomena["MOD_MTW"] = "Moderate mountain wave";
|
|
318
|
-
AirmetPhenomena["MOD_TURB"] = "Moderate turbulence";
|
|
319
|
-
AirmetPhenomena["MT_OBSC"] = "Mountains obscured";
|
|
320
|
-
})(AirmetPhenomena || (AirmetPhenomena = {}));
|
|
321
|
-
|
|
322
|
-
var VisibilityCause;
|
|
323
|
-
|
|
324
|
-
(function (VisibilityCause) {
|
|
325
|
-
VisibilityCause["DZ"] = "Drizzle";
|
|
326
|
-
VisibilityCause["DU"] = "Dust";
|
|
327
|
-
VisibilityCause["PO"] = "Dust or sand devil";
|
|
328
|
-
VisibilityCause["DS"] = "Dust storm";
|
|
329
|
-
VisibilityCause["FG"] = "Fog";
|
|
330
|
-
VisibilityCause["FC"] = "Funnel clouds";
|
|
331
|
-
VisibilityCause["GR"] = "Hail";
|
|
332
|
-
VisibilityCause["HZ"] = "Haze";
|
|
333
|
-
VisibilityCause["PL"] = "Ice pellets";
|
|
334
|
-
VisibilityCause["BR"] = "Mist";
|
|
335
|
-
VisibilityCause["RA"] = "Rain";
|
|
336
|
-
VisibilityCause["SA"] = "Sand";
|
|
337
|
-
VisibilityCause["SS"] = "Sand storm";
|
|
338
|
-
VisibilityCause["FU"] = "Smoke";
|
|
339
|
-
VisibilityCause["SN"] = "Snow";
|
|
340
|
-
VisibilityCause["SG"] = "Snow grains";
|
|
341
|
-
VisibilityCause["GS"] = "Soft hail";
|
|
342
|
-
VisibilityCause["SQ"] = "Squalls";
|
|
343
|
-
VisibilityCause["VA"] = "Volcanic Ash";
|
|
344
|
-
})(VisibilityCause || (VisibilityCause = {}));
|
|
345
|
-
/* Speed unit, e.g. 'KT', 'KMH' */
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
var MovementUnit;
|
|
349
|
-
|
|
350
|
-
(function (MovementUnit) {
|
|
351
|
-
MovementUnit["KT"] = "kt";
|
|
352
|
-
MovementUnit["KMH"] = "kmh";
|
|
353
|
-
})(MovementUnit || (MovementUnit = {}));
|
|
354
|
-
|
|
355
|
-
var WindUnit;
|
|
356
|
-
|
|
357
|
-
(function (WindUnit) {
|
|
358
|
-
WindUnit["KT"] = "kt";
|
|
359
|
-
WindUnit["MPS"] = "mps";
|
|
360
|
-
})(WindUnit || (WindUnit = {}));
|
|
361
|
-
|
|
362
|
-
var ProductStatusDescription;
|
|
363
|
-
|
|
364
|
-
(function (ProductStatusDescription) {
|
|
365
|
-
ProductStatusDescription["DRAFT"] = "Draft";
|
|
366
|
-
ProductStatusDescription["PUBLISHED"] = "Published";
|
|
367
|
-
ProductStatusDescription["CANCELLED"] = "Cancelled";
|
|
368
|
-
ProductStatusDescription["EXPIRED"] = "Expired";
|
|
369
|
-
})(ProductStatusDescription || (ProductStatusDescription = {}));
|
|
370
|
-
|
|
371
|
-
var CloudLevelUnits;
|
|
372
|
-
|
|
373
|
-
(function (CloudLevelUnits) {
|
|
374
|
-
CloudLevelUnits["FT"] = "ft";
|
|
375
|
-
CloudLevelUnits["M"] = "m";
|
|
376
|
-
})(CloudLevelUnits || (CloudLevelUnits = {}));
|
|
377
|
-
|
|
378
|
-
var LevelUnits;
|
|
379
|
-
|
|
380
|
-
(function (LevelUnits) {
|
|
381
|
-
LevelUnits["FT"] = "ft";
|
|
382
|
-
LevelUnits["M"] = "m";
|
|
383
|
-
LevelUnits["FL"] = "FL";
|
|
384
|
-
})(LevelUnits || (LevelUnits = {}));
|
|
385
|
-
|
|
386
|
-
var Direction;
|
|
387
|
-
|
|
388
|
-
(function (Direction) {
|
|
389
|
-
Direction["N"] = "N";
|
|
390
|
-
Direction["NNE"] = "NNE";
|
|
391
|
-
Direction["NE"] = "NE";
|
|
392
|
-
Direction["ENE"] = "ENE";
|
|
393
|
-
Direction["E"] = "E";
|
|
394
|
-
Direction["ESE"] = "ESE";
|
|
395
|
-
Direction["SE"] = "SE";
|
|
396
|
-
Direction["SSE"] = "SSE";
|
|
397
|
-
Direction["S"] = "S";
|
|
398
|
-
Direction["SSW"] = "SSW";
|
|
399
|
-
Direction["SW"] = "SW";
|
|
400
|
-
Direction["WSW"] = "WSW";
|
|
401
|
-
Direction["W"] = "W";
|
|
402
|
-
Direction["WNW"] = "WNW";
|
|
403
|
-
Direction["NW"] = "NW";
|
|
404
|
-
Direction["NNW"] = "NNW";
|
|
405
|
-
})(Direction || (Direction = {}));
|
|
406
|
-
var isInstanceOfCancelSigmet = function isInstanceOfCancelSigmet(obj) {
|
|
407
|
-
return 'cancelsSigmetSequenceId' in obj;
|
|
408
|
-
};
|
|
409
|
-
var isInstanceOfCancelAirmet = function isInstanceOfCancelAirmet(obj) {
|
|
410
|
-
return 'cancelsAirmetSequenceId' in obj;
|
|
411
|
-
};
|
|
412
|
-
var isInstanceOfSigmetOrAirmet = function isInstanceOfSigmetOrAirmet(obj) {
|
|
413
|
-
return 'phenomenon' in obj;
|
|
414
|
-
};
|
|
415
|
-
var isInstanceOfCancelSigmetOrAirmet = function isInstanceOfCancelSigmetOrAirmet(obj) {
|
|
416
|
-
return 'cancelsSigmetSequenceId' in obj || 'cancelsAirmetSequenceId' in obj;
|
|
417
|
-
};
|
|
418
|
-
var MapDrawMode;
|
|
419
|
-
|
|
420
|
-
(function (MapDrawMode) {
|
|
421
|
-
MapDrawMode["POINT"] = "POINT";
|
|
422
|
-
MapDrawMode["BOX"] = "BOX";
|
|
423
|
-
MapDrawMode["POLYGON"] = "POLYGON";
|
|
424
|
-
MapDrawMode["FIR"] = "FIR";
|
|
425
|
-
MapDrawMode["DELETE"] = "DELETE";
|
|
426
|
-
})(MapDrawMode || (MapDrawMode = {}));
|
|
427
|
-
|
|
428
|
-
var StartOrEndDrawing;
|
|
429
|
-
|
|
430
|
-
(function (StartOrEndDrawing) {
|
|
431
|
-
StartOrEndDrawing["start"] = "start";
|
|
432
|
-
StartOrEndDrawing["end"] = "end";
|
|
433
|
-
})(StartOrEndDrawing || (StartOrEndDrawing = {}));
|
|
434
|
-
|
|
435
|
-
/* *
|
|
436
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
437
|
-
* you may not use this file except in compliance with the License.
|
|
438
|
-
* You may obtain a copy of the License at
|
|
439
|
-
*
|
|
440
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
441
|
-
*
|
|
442
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
443
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
444
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
445
|
-
* See the License for the specific language governing permissions and
|
|
446
|
-
* limitations under the License.
|
|
447
|
-
*
|
|
448
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
449
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
450
|
-
* */
|
|
451
|
-
var adagucBaseUrl = 'https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver';
|
|
452
|
-
var KNMIGeoWebOverlays = {
|
|
453
|
-
name: 'KNMIGeoWebOverlays',
|
|
454
|
-
url: "".concat(adagucBaseUrl, "?dataset=OVL"),
|
|
455
|
-
id: 'knmigeoweboverlays'
|
|
456
|
-
};
|
|
457
|
-
var northSeaPlatforms = {
|
|
458
|
-
service: KNMIGeoWebOverlays.url,
|
|
459
|
-
name: 'northseastations',
|
|
460
|
-
format: 'image/png',
|
|
461
|
-
layerType: mapTypes.LayerType.overLayer,
|
|
462
|
-
enabled: true
|
|
463
|
-
};
|
|
464
|
-
var majorAirportsEHAA = {
|
|
465
|
-
service: KNMIGeoWebOverlays.url,
|
|
466
|
-
name: 'airports',
|
|
467
|
-
format: 'image/png',
|
|
468
|
-
layerType: mapTypes.LayerType.overLayer,
|
|
469
|
-
enabled: true
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
/* *
|
|
473
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
474
|
-
* you may not use this file except in compliance with the License.
|
|
475
|
-
* You may obtain a copy of the License at
|
|
476
|
-
*
|
|
477
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
478
|
-
*
|
|
479
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
480
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
481
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
482
|
-
* See the License for the specific language governing permissions and
|
|
483
|
-
* limitations under the License.
|
|
484
|
-
*
|
|
485
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
486
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
487
|
-
* */
|
|
488
|
-
var allowOneGeoJSONFeature = function allowOneGeoJSONFeature(mode, geojson) {
|
|
489
|
-
switch (mode) {
|
|
490
|
-
case MapDrawMode.BOX:
|
|
491
|
-
case MapDrawMode.POLYGON:
|
|
492
|
-
return geojson.features[0].geometry.coordinates.length > 1 ? produce(geojson, function (draft) {
|
|
493
|
-
draft.features[0].geometry.coordinates = [draft.features[0].geometry.coordinates[1]];
|
|
494
|
-
}) : geojson;
|
|
495
|
-
|
|
496
|
-
default:
|
|
497
|
-
return geojson;
|
|
498
|
-
}
|
|
499
|
-
};
|
|
500
|
-
|
|
501
|
-
var MapViewGeoJson = function MapViewGeoJson(_ref) {
|
|
502
|
-
var geoJSONs = _ref.geoJSONs,
|
|
503
|
-
_ref$setLayerGeoJSONs = _ref.setLayerGeoJSONs,
|
|
504
|
-
setLayerGeoJSONs = _ref$setLayerGeoJSONs === void 0 ? function () {} : _ref$setLayerGeoJSONs,
|
|
505
|
-
_ref$layerDrawModes = _ref.layerDrawModes,
|
|
506
|
-
layerDrawModes = _ref$layerDrawModes === void 0 ? {
|
|
507
|
-
start: null,
|
|
508
|
-
end: null
|
|
509
|
-
} : _ref$layerDrawModes,
|
|
510
|
-
_ref$drawMode = _ref.drawMode,
|
|
511
|
-
drawMode = _ref$drawMode === void 0 ? {
|
|
512
|
-
start: null,
|
|
513
|
-
end: null
|
|
514
|
-
} : _ref$drawMode,
|
|
515
|
-
_ref$setDrawMode = _ref.setDrawMode,
|
|
516
|
-
setDrawMode = _ref$setDrawMode === void 0 ? function () {} : _ref$setDrawMode,
|
|
517
|
-
_ref$exitDrawModeCall = _ref.exitDrawModeCallbackStart,
|
|
518
|
-
exitDrawModeCallbackStart = _ref$exitDrawModeCall === void 0 ? function () {} : _ref$exitDrawModeCall,
|
|
519
|
-
_ref$exitDrawModeCall2 = _ref.exitDrawModeCallbackEnd,
|
|
520
|
-
exitDrawModeCallbackEnd = _ref$exitDrawModeCall2 === void 0 ? function () {} : _ref$exitDrawModeCall2;
|
|
521
|
-
var dispatch = useDispatch();
|
|
522
|
-
var firstMap = useSelector(function (store) {
|
|
523
|
-
return mapSelectors.getFirstMap(store);
|
|
524
|
-
}, shallowEqual);
|
|
525
|
-
var firstMapId = firstMap && firstMap.id ? firstMap.id : null;
|
|
526
|
-
var mapLayers = useSelector(function (store) {
|
|
527
|
-
return mapSelectors.getMapLayers(store, firstMapId);
|
|
528
|
-
}, shallowEqual);
|
|
529
|
-
var mapDimensions = useSelector(function (store) {
|
|
530
|
-
return mapSelectors.getMapDimensions(store, firstMapId);
|
|
531
|
-
}, shallowEqual);
|
|
532
|
-
var mapId = React.useRef("sigmet-".concat(generateMapId())).current;
|
|
533
|
-
var timesliderId = React.useRef("sigmet-".concat(generateTimesliderId())).current;
|
|
534
|
-
var syncGroupAddGroup = React.useCallback(function (payload) {
|
|
535
|
-
dispatch(SyncGroups.actions.syncGroupAddGroup(payload));
|
|
536
|
-
}, [dispatch]);
|
|
537
|
-
var syncGroupAddTarget = React.useCallback(function (payload) {
|
|
538
|
-
dispatch(SyncGroups.actions.syncGroupAddTarget(payload));
|
|
539
|
-
}, [dispatch]);
|
|
540
|
-
React.useEffect(function () {
|
|
541
|
-
if (mapLayers && mapLayers.length) {
|
|
542
|
-
// use maplayers, but change layerId and current mapId
|
|
543
|
-
var layers = mapLayers.map(function (layer) {
|
|
544
|
-
return Object.assign(Object.assign({}, layer), {
|
|
545
|
-
id: generateLayerId(),
|
|
546
|
-
mapId: mapId
|
|
547
|
-
});
|
|
548
|
-
});
|
|
549
|
-
dispatch(mapActions.setLayers({
|
|
550
|
-
mapId: mapId,
|
|
551
|
-
layers: layers
|
|
552
|
-
}));
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
if (mapDimensions && mapDimensions.length) {
|
|
556
|
-
dispatch(mapActions.mapChangeDimension({
|
|
557
|
-
mapId: mapId,
|
|
558
|
-
dimension: mapDimensions[0],
|
|
559
|
-
origin: 'MapViewGeoJson'
|
|
560
|
-
}));
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
dispatch(mapActions.setBaseLayers({
|
|
564
|
-
mapId: mapId,
|
|
565
|
-
layers: [Object.assign(Object.assign({}, publicLayers.baseLayerGrey), {
|
|
566
|
-
id: "baselayer-".concat(mapId)
|
|
567
|
-
}), Object.assign(Object.assign({}, publicLayers.overLayer), {
|
|
568
|
-
id: "countryborders-".concat(mapId)
|
|
569
|
-
}), Object.assign(Object.assign({}, northSeaPlatforms), {
|
|
570
|
-
id: "northseaplatforms-".concat(mapId)
|
|
571
|
-
}), Object.assign(Object.assign({}, majorAirportsEHAA), {
|
|
572
|
-
id: "majorairportsehaa-".concat(mapId)
|
|
573
|
-
})]
|
|
574
|
-
}));
|
|
575
|
-
dispatch(mapActions.setBbox({
|
|
576
|
-
mapId: mapId,
|
|
577
|
-
bbox: srsAndBboxDefault.bbox,
|
|
578
|
-
srs: srsAndBboxDefault.srs
|
|
579
|
-
}));
|
|
580
|
-
syncGroupAddGroup({
|
|
581
|
-
groupId: 'Time_SigmetAirmet',
|
|
582
|
-
title: 'Group 1 for sigmet/airmet map',
|
|
583
|
-
type: SyncGroups.constants.SYNCGROUPS_TYPE_SETTIME
|
|
584
|
-
});
|
|
585
|
-
syncGroupAddTarget({
|
|
586
|
-
groupId: 'Time_SigmetAirmet',
|
|
587
|
-
targetId: mapId
|
|
588
|
-
});
|
|
589
|
-
syncGroupAddTarget({
|
|
590
|
-
groupId: 'Time_SigmetAirmet',
|
|
591
|
-
targetId: timesliderId
|
|
592
|
-
}); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
593
|
-
}, []);
|
|
594
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
595
|
-
style: {
|
|
596
|
-
position: 'relative',
|
|
597
|
-
height: '99%'
|
|
598
|
-
},
|
|
599
|
-
"data-testid": "MapView"
|
|
600
|
-
}, /*#__PURE__*/React.createElement(MapControls, null, /*#__PURE__*/React.createElement(LayerManagerMapButtonConnect, {
|
|
601
|
-
source: "module",
|
|
602
|
-
mapId: mapId
|
|
603
|
-
}), /*#__PURE__*/React.createElement(LegendMapButtonConnect, {
|
|
604
|
-
source: "module",
|
|
605
|
-
mapId: mapId
|
|
606
|
-
}), /*#__PURE__*/React.createElement(MultiDimensionSelectMapButtonsConnect, {
|
|
607
|
-
source: "module",
|
|
608
|
-
mapId: mapId
|
|
609
|
-
})), /*#__PURE__*/React.createElement(MapViewConnect, {
|
|
610
|
-
mapId: mapId
|
|
611
|
-
}, /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
612
|
-
id: "geojsonlayer-fir-".concat(mapId),
|
|
613
|
-
isInEditMode: false,
|
|
614
|
-
geojson: geoJSONs.fir
|
|
615
|
-
}), /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
616
|
-
id: "geojsonlayer-end-".concat(mapId),
|
|
617
|
-
isInEditMode: drawMode.end !== null && layerDrawModes.end !== null,
|
|
618
|
-
geojson: geoJSONs.end,
|
|
619
|
-
drawMode: layerDrawModes.end,
|
|
620
|
-
updateGeojson: function updateGeojson(geojson) {
|
|
621
|
-
var end = allowOneGeoJSONFeature(layerDrawModes.end, geojson);
|
|
622
|
-
setLayerGeoJSONs(Object.assign(Object.assign({}, geoJSONs), {
|
|
623
|
-
end: end
|
|
624
|
-
}));
|
|
625
|
-
},
|
|
626
|
-
exitDrawModeCallback: function exitDrawModeCallback() {
|
|
627
|
-
setDrawMode({
|
|
628
|
-
start: null,
|
|
629
|
-
end: null
|
|
630
|
-
});
|
|
631
|
-
exitDrawModeCallbackEnd();
|
|
632
|
-
},
|
|
633
|
-
featureNrToEdit: 0
|
|
634
|
-
}), /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
635
|
-
id: "geojsonlayer-start-".concat(mapId),
|
|
636
|
-
isInEditMode: drawMode.start !== null && layerDrawModes.start !== null,
|
|
637
|
-
geojson: geoJSONs.start,
|
|
638
|
-
drawMode: layerDrawModes.start,
|
|
639
|
-
updateGeojson: function updateGeojson(geojson) {
|
|
640
|
-
var start = allowOneGeoJSONFeature(layerDrawModes.start, geojson);
|
|
641
|
-
setLayerGeoJSONs(Object.assign(Object.assign({}, geoJSONs), {
|
|
642
|
-
start: start
|
|
643
|
-
}));
|
|
644
|
-
},
|
|
645
|
-
exitDrawModeCallback: function exitDrawModeCallback() {
|
|
646
|
-
setDrawMode({
|
|
647
|
-
start: null,
|
|
648
|
-
end: null
|
|
649
|
-
});
|
|
650
|
-
exitDrawModeCallbackStart();
|
|
651
|
-
},
|
|
652
|
-
featureNrToEdit: 0
|
|
653
|
-
}), /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
654
|
-
id: "geojsonlayer-intersection-end-".concat(mapId),
|
|
655
|
-
isInEditMode: false,
|
|
656
|
-
geojson: geoJSONs.intersectionEnd
|
|
657
|
-
}), /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
658
|
-
id: "geojsonlayer-intersection-start-".concat(mapId),
|
|
659
|
-
isInEditMode: false,
|
|
660
|
-
geojson: geoJSONs.intersectionStart
|
|
661
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
662
|
-
style: {
|
|
663
|
-
position: 'absolute',
|
|
664
|
-
left: '0',
|
|
665
|
-
bottom: '0',
|
|
666
|
-
zIndex: 1000,
|
|
667
|
-
width: '100%'
|
|
668
|
-
}
|
|
669
|
-
}, /*#__PURE__*/React.createElement(TimeSliderConnect, {
|
|
670
|
-
sourceId: timesliderId,
|
|
671
|
-
mapId: mapId
|
|
672
|
-
})), /*#__PURE__*/React.createElement(LegendConnect, {
|
|
673
|
-
showMapId: true,
|
|
674
|
-
mapId: mapId
|
|
675
|
-
}));
|
|
676
|
-
};
|
|
677
|
-
|
|
678
|
-
var type = "FeatureCollection";
|
|
679
|
-
var features = [
|
|
680
|
-
{
|
|
681
|
-
type: "Feature",
|
|
682
|
-
geometry: {
|
|
683
|
-
type: "Polygon",
|
|
684
|
-
coordinates: [
|
|
685
|
-
[
|
|
686
|
-
[
|
|
687
|
-
5,
|
|
688
|
-
55
|
|
689
|
-
],
|
|
690
|
-
[
|
|
691
|
-
4.331914,
|
|
692
|
-
55.332644
|
|
693
|
-
],
|
|
694
|
-
[
|
|
695
|
-
3.368817,
|
|
696
|
-
55.764314
|
|
697
|
-
],
|
|
698
|
-
[
|
|
699
|
-
2.761908,
|
|
700
|
-
54.379261
|
|
701
|
-
],
|
|
702
|
-
[
|
|
703
|
-
3.15576,
|
|
704
|
-
52.913554
|
|
705
|
-
],
|
|
706
|
-
[
|
|
707
|
-
2.000002,
|
|
708
|
-
51.500002
|
|
709
|
-
],
|
|
710
|
-
[
|
|
711
|
-
3.370001,
|
|
712
|
-
51.369722
|
|
713
|
-
],
|
|
714
|
-
[
|
|
715
|
-
3.370527,
|
|
716
|
-
51.36867
|
|
717
|
-
],
|
|
718
|
-
[
|
|
719
|
-
3.362223,
|
|
720
|
-
51.320002
|
|
721
|
-
],
|
|
722
|
-
[
|
|
723
|
-
3.36389,
|
|
724
|
-
51.313608
|
|
725
|
-
],
|
|
726
|
-
[
|
|
727
|
-
3.373613,
|
|
728
|
-
51.309999
|
|
729
|
-
],
|
|
730
|
-
[
|
|
731
|
-
3.952501,
|
|
732
|
-
51.214441
|
|
733
|
-
],
|
|
734
|
-
[
|
|
735
|
-
4.397501,
|
|
736
|
-
51.452776
|
|
737
|
-
],
|
|
738
|
-
[
|
|
739
|
-
5.078611,
|
|
740
|
-
51.391665
|
|
741
|
-
],
|
|
742
|
-
[
|
|
743
|
-
5.848333,
|
|
744
|
-
51.139444
|
|
745
|
-
],
|
|
746
|
-
[
|
|
747
|
-
5.651667,
|
|
748
|
-
50.824717
|
|
749
|
-
],
|
|
750
|
-
[
|
|
751
|
-
6.011797,
|
|
752
|
-
50.757273
|
|
753
|
-
],
|
|
754
|
-
[
|
|
755
|
-
5.934168,
|
|
756
|
-
51.036386
|
|
757
|
-
],
|
|
758
|
-
[
|
|
759
|
-
6.222223,
|
|
760
|
-
51.361666
|
|
761
|
-
],
|
|
762
|
-
[
|
|
763
|
-
5.94639,
|
|
764
|
-
51.811663
|
|
765
|
-
],
|
|
766
|
-
[
|
|
767
|
-
6.405001,
|
|
768
|
-
51.830828
|
|
769
|
-
],
|
|
770
|
-
[
|
|
771
|
-
7.053095,
|
|
772
|
-
52.237764
|
|
773
|
-
],
|
|
774
|
-
[
|
|
775
|
-
7.031389,
|
|
776
|
-
52.268885
|
|
777
|
-
],
|
|
778
|
-
[
|
|
779
|
-
7.063612,
|
|
780
|
-
52.346109
|
|
781
|
-
],
|
|
782
|
-
[
|
|
783
|
-
7.065557,
|
|
784
|
-
52.385828
|
|
785
|
-
],
|
|
786
|
-
[
|
|
787
|
-
7.133055,
|
|
788
|
-
52.888887
|
|
789
|
-
],
|
|
790
|
-
[
|
|
791
|
-
7.14218,
|
|
792
|
-
52.898244
|
|
793
|
-
],
|
|
794
|
-
[
|
|
795
|
-
7.191667,
|
|
796
|
-
53.3
|
|
797
|
-
],
|
|
798
|
-
[
|
|
799
|
-
6.5,
|
|
800
|
-
53.666667
|
|
801
|
-
],
|
|
802
|
-
[
|
|
803
|
-
6.500002,
|
|
804
|
-
55.000002
|
|
805
|
-
],
|
|
806
|
-
[
|
|
807
|
-
5,
|
|
808
|
-
55
|
|
809
|
-
]
|
|
810
|
-
]
|
|
811
|
-
]
|
|
812
|
-
},
|
|
813
|
-
properties: {
|
|
814
|
-
centlong: 4.98042633,
|
|
815
|
-
REGION: "EUR",
|
|
816
|
-
StateName: "Netherlands",
|
|
817
|
-
FIRname: "AMSTERDAM FIR",
|
|
818
|
-
StateCode: "NLD",
|
|
819
|
-
centlat: 52.8618788,
|
|
820
|
-
ICAOCODE: "EHAA"
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
];
|
|
824
|
-
var firArea = {
|
|
825
|
-
type: type,
|
|
826
|
-
features: features
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
/* *
|
|
830
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
831
|
-
* you may not use this file except in compliance with the License.
|
|
832
|
-
* You may obtain a copy of the License at
|
|
833
|
-
*
|
|
834
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
835
|
-
*
|
|
836
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
837
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
838
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
839
|
-
* See the License for the specific language governing permissions and
|
|
840
|
-
* limitations under the License.
|
|
841
|
-
*
|
|
842
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
843
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
844
|
-
* */
|
|
445
|
+
},
|
|
446
|
+
FIR: {
|
|
447
|
+
start: null,
|
|
448
|
+
end: null
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
|
|
845
452
|
/**
|
|
846
|
-
*
|
|
453
|
+
* The possible phenomena for the sigmet
|
|
847
454
|
*/
|
|
455
|
+
var SigmetPhenomena;
|
|
848
456
|
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
457
|
+
(function (SigmetPhenomena) {
|
|
458
|
+
SigmetPhenomena["EMBD_TS"] = "Embedded thunderstorm(s)";
|
|
459
|
+
SigmetPhenomena["EMBD_TSGR"] = "Embedded thunderstorm(s) with hail";
|
|
460
|
+
SigmetPhenomena["FRQ_TS"] = "Frequent thunderstorm(s)";
|
|
461
|
+
SigmetPhenomena["FRQ_TSGR"] = "Frequent thunderstorm(s) with hail";
|
|
462
|
+
SigmetPhenomena["HVY_DS"] = "Heavy duststorm";
|
|
463
|
+
SigmetPhenomena["HVY_SS"] = "Heavy sandstorm";
|
|
464
|
+
SigmetPhenomena["OBSC_TS"] = "Obscured thunderstorm(s)";
|
|
465
|
+
SigmetPhenomena["OBSC_TSGR"] = "Obscured thunderstorm(s) with hail";
|
|
466
|
+
SigmetPhenomena["RDOACT_CLD"] = "Radioactive cloud";
|
|
467
|
+
SigmetPhenomena["SEV_ICE"] = "Severe icing";
|
|
468
|
+
SigmetPhenomena["SEV_ICE_FRZ_RN"] = "Severe icing due to freezing rain";
|
|
469
|
+
SigmetPhenomena["SEV_MTW"] = "Severe mountain wave";
|
|
470
|
+
SigmetPhenomena["SEV_TURB"] = "Severe turbulence";
|
|
471
|
+
SigmetPhenomena["SQL_TS"] = "Squall line";
|
|
472
|
+
SigmetPhenomena["SQL_TSGR"] = "Squall line thunderstorm(s) with hail"; // 'TC' = 'Tropical cyclone', // Don't show this option in the list because it will be not used by KNMI.
|
|
473
|
+
|
|
474
|
+
SigmetPhenomena["VA_CLD"] = "Volcanic ash cloud";
|
|
475
|
+
})(SigmetPhenomena || (SigmetPhenomena = {}));
|
|
852
476
|
/**
|
|
853
|
-
*
|
|
477
|
+
* The possible phenomena for the airmet
|
|
854
478
|
*/
|
|
855
479
|
|
|
856
|
-
|
|
857
|
-
|
|
480
|
+
|
|
481
|
+
var AirmetPhenomena;
|
|
482
|
+
|
|
483
|
+
(function (AirmetPhenomena) {
|
|
484
|
+
AirmetPhenomena["SFC_VIS"] = "Surface visibility";
|
|
485
|
+
AirmetPhenomena["SFC_WIND"] = "Surface wind";
|
|
486
|
+
AirmetPhenomena["OVC_CLD"] = "Overcast cloud";
|
|
487
|
+
AirmetPhenomena["BKN_CLD"] = "Broken cloud";
|
|
488
|
+
AirmetPhenomena["ISOL_CB"] = "Isolated cumulonimbus cloud";
|
|
489
|
+
AirmetPhenomena["OCNL_CB"] = "Occasional cumulonimbus cloud";
|
|
490
|
+
AirmetPhenomena["FRQ_CB"] = "Frequent cumulonimbus cloud";
|
|
491
|
+
AirmetPhenomena["ISOL_TS"] = "Isolated thunderstorm(s)";
|
|
492
|
+
AirmetPhenomena["OCNL_TS"] = "Occasional thunderstorm(s)";
|
|
493
|
+
AirmetPhenomena["ISOL_TSGR"] = "Isolated thunderstorm(s) with hail";
|
|
494
|
+
AirmetPhenomena["OCNL_TSGR"] = "Occasional thunderstorm(s) with hail";
|
|
495
|
+
AirmetPhenomena["ISOL_TCU"] = "Isolated towering cumulus cloud";
|
|
496
|
+
AirmetPhenomena["OCNL_TCU"] = "Occasional towering cumulus cloud";
|
|
497
|
+
AirmetPhenomena["FRQ_TCU"] = "Frequent towering cumulus cloud";
|
|
498
|
+
AirmetPhenomena["MOD_ICE"] = "Moderate icing";
|
|
499
|
+
AirmetPhenomena["MOD_MTW"] = "Moderate mountain wave";
|
|
500
|
+
AirmetPhenomena["MOD_TURB"] = "Moderate turbulence";
|
|
501
|
+
AirmetPhenomena["MT_OBSC"] = "Mountains obscured";
|
|
502
|
+
})(AirmetPhenomena || (AirmetPhenomena = {}));
|
|
503
|
+
|
|
504
|
+
var VisibilityCause;
|
|
505
|
+
|
|
506
|
+
(function (VisibilityCause) {
|
|
507
|
+
VisibilityCause["DZ"] = "Drizzle";
|
|
508
|
+
VisibilityCause["DU"] = "Dust";
|
|
509
|
+
VisibilityCause["PO"] = "Dust or sand devil";
|
|
510
|
+
VisibilityCause["DS"] = "Dust storm";
|
|
511
|
+
VisibilityCause["FG"] = "Fog";
|
|
512
|
+
VisibilityCause["FC"] = "Funnel clouds";
|
|
513
|
+
VisibilityCause["GR"] = "Hail";
|
|
514
|
+
VisibilityCause["HZ"] = "Haze";
|
|
515
|
+
VisibilityCause["PL"] = "Ice pellets";
|
|
516
|
+
VisibilityCause["BR"] = "Mist";
|
|
517
|
+
VisibilityCause["RA"] = "Rain";
|
|
518
|
+
VisibilityCause["SA"] = "Sand";
|
|
519
|
+
VisibilityCause["SS"] = "Sand storm";
|
|
520
|
+
VisibilityCause["FU"] = "Smoke";
|
|
521
|
+
VisibilityCause["SN"] = "Snow";
|
|
522
|
+
VisibilityCause["SG"] = "Snow grains";
|
|
523
|
+
VisibilityCause["GS"] = "Soft hail";
|
|
524
|
+
VisibilityCause["SQ"] = "Squalls";
|
|
525
|
+
VisibilityCause["VA"] = "Volcanic Ash";
|
|
526
|
+
})(VisibilityCause || (VisibilityCause = {}));
|
|
527
|
+
/* Speed unit, e.g. 'KT', 'KMH' */
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
var MovementUnit;
|
|
531
|
+
|
|
532
|
+
(function (MovementUnit) {
|
|
533
|
+
MovementUnit["KT"] = "kt";
|
|
534
|
+
MovementUnit["KMH"] = "kmh";
|
|
535
|
+
})(MovementUnit || (MovementUnit = {}));
|
|
536
|
+
|
|
537
|
+
var WindUnit;
|
|
538
|
+
|
|
539
|
+
(function (WindUnit) {
|
|
540
|
+
WindUnit["KT"] = "kt";
|
|
541
|
+
WindUnit["MPS"] = "mps";
|
|
542
|
+
})(WindUnit || (WindUnit = {}));
|
|
543
|
+
|
|
544
|
+
var ProductStatusDescription;
|
|
545
|
+
|
|
546
|
+
(function (ProductStatusDescription) {
|
|
547
|
+
ProductStatusDescription["DRAFT"] = "Draft";
|
|
548
|
+
ProductStatusDescription["PUBLISHED"] = "Published";
|
|
549
|
+
ProductStatusDescription["CANCELLED"] = "Cancelled";
|
|
550
|
+
ProductStatusDescription["EXPIRED"] = "Expired";
|
|
551
|
+
})(ProductStatusDescription || (ProductStatusDescription = {}));
|
|
552
|
+
|
|
553
|
+
var CloudLevelUnits;
|
|
554
|
+
|
|
555
|
+
(function (CloudLevelUnits) {
|
|
556
|
+
CloudLevelUnits["FT"] = "ft";
|
|
557
|
+
CloudLevelUnits["M"] = "m";
|
|
558
|
+
})(CloudLevelUnits || (CloudLevelUnits = {}));
|
|
559
|
+
|
|
560
|
+
var LevelUnits;
|
|
561
|
+
|
|
562
|
+
(function (LevelUnits) {
|
|
563
|
+
LevelUnits["FT"] = "ft";
|
|
564
|
+
LevelUnits["M"] = "m";
|
|
565
|
+
LevelUnits["FL"] = "FL";
|
|
566
|
+
})(LevelUnits || (LevelUnits = {}));
|
|
567
|
+
|
|
568
|
+
var Direction;
|
|
569
|
+
|
|
570
|
+
(function (Direction) {
|
|
571
|
+
Direction["N"] = "N";
|
|
572
|
+
Direction["NNE"] = "NNE";
|
|
573
|
+
Direction["NE"] = "NE";
|
|
574
|
+
Direction["ENE"] = "ENE";
|
|
575
|
+
Direction["E"] = "E";
|
|
576
|
+
Direction["ESE"] = "ESE";
|
|
577
|
+
Direction["SE"] = "SE";
|
|
578
|
+
Direction["SSE"] = "SSE";
|
|
579
|
+
Direction["S"] = "S";
|
|
580
|
+
Direction["SSW"] = "SSW";
|
|
581
|
+
Direction["SW"] = "SW";
|
|
582
|
+
Direction["WSW"] = "WSW";
|
|
583
|
+
Direction["W"] = "W";
|
|
584
|
+
Direction["WNW"] = "WNW";
|
|
585
|
+
Direction["NW"] = "NW";
|
|
586
|
+
Direction["NNW"] = "NNW";
|
|
587
|
+
})(Direction || (Direction = {}));
|
|
588
|
+
var isInstanceOfCancelSigmet = function isInstanceOfCancelSigmet(obj) {
|
|
589
|
+
return 'cancelsSigmetSequenceId' in obj;
|
|
590
|
+
};
|
|
591
|
+
var isInstanceOfCancelAirmet = function isInstanceOfCancelAirmet(obj) {
|
|
592
|
+
return 'cancelsAirmetSequenceId' in obj;
|
|
593
|
+
};
|
|
594
|
+
var isInstanceOfSigmetOrAirmet = function isInstanceOfSigmetOrAirmet(obj) {
|
|
595
|
+
return 'phenomenon' in obj;
|
|
858
596
|
};
|
|
597
|
+
var isInstanceOfCancelSigmetOrAirmet = function isInstanceOfCancelSigmetOrAirmet(obj) {
|
|
598
|
+
return 'cancelsSigmetSequenceId' in obj || 'cancelsAirmetSequenceId' in obj;
|
|
599
|
+
};
|
|
600
|
+
var MapDrawMode;
|
|
601
|
+
|
|
602
|
+
(function (MapDrawMode) {
|
|
603
|
+
MapDrawMode["POINT"] = "POINT";
|
|
604
|
+
MapDrawMode["BOX"] = "BOX";
|
|
605
|
+
MapDrawMode["POLYGON"] = "POLYGON";
|
|
606
|
+
MapDrawMode["FIR"] = "FIR";
|
|
607
|
+
MapDrawMode["DELETE"] = "DELETE";
|
|
608
|
+
})(MapDrawMode || (MapDrawMode = {}));
|
|
609
|
+
|
|
610
|
+
var StartOrEndDrawing;
|
|
611
|
+
|
|
612
|
+
(function (StartOrEndDrawing) {
|
|
613
|
+
StartOrEndDrawing["start"] = "start";
|
|
614
|
+
StartOrEndDrawing["end"] = "end";
|
|
615
|
+
})(StartOrEndDrawing || (StartOrEndDrawing = {}));
|
|
859
616
|
|
|
860
617
|
var getDrawModeFromSelectionType = function getDrawModeFromSelectionType(selectionType) {
|
|
861
618
|
switch (selectionType) {
|
|
@@ -1117,21 +874,19 @@ var createInterSections = function createInterSections(geoJSONs) {
|
|
|
1117
874
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1118
875
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
1119
876
|
* */
|
|
1120
|
-
var styles$
|
|
1121
|
-
productForm: {
|
|
1122
|
-
overflowY: 'scroll',
|
|
1123
|
-
overflowX: 'hidden',
|
|
1124
|
-
height: '100%',
|
|
1125
|
-
width: '100%'
|
|
1126
|
-
},
|
|
877
|
+
var styles$2 = {
|
|
1127
878
|
label: {
|
|
1128
|
-
|
|
879
|
+
fontSize: '0.875rem',
|
|
880
|
+
marginTop: 2,
|
|
881
|
+
textAlign: 'right'
|
|
1129
882
|
},
|
|
1130
883
|
body: {
|
|
1131
884
|
paddingTop: '17px'
|
|
1132
885
|
},
|
|
1133
886
|
containerItem: {
|
|
1134
|
-
|
|
887
|
+
' .MuiTypography-subtitle1': {
|
|
888
|
+
marginTop: 1
|
|
889
|
+
}
|
|
1135
890
|
},
|
|
1136
891
|
volcanicField: {
|
|
1137
892
|
marginBottom: 2
|
|
@@ -1159,7 +914,22 @@ var styles$4 = {
|
|
|
1159
914
|
opacity: '1'
|
|
1160
915
|
},
|
|
1161
916
|
drawSection: {
|
|
1162
|
-
|
|
917
|
+
'+ .MuiGrid-item': {
|
|
918
|
+
paddingTop: 5
|
|
919
|
+
},
|
|
920
|
+
' .MuiTypography-subtitle1': {
|
|
921
|
+
marginTop: 1
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
helperText: {
|
|
925
|
+
' .MuiFormHelperText-root': {
|
|
926
|
+
position: 'absolute',
|
|
927
|
+
top: 56,
|
|
928
|
+
'&.Mui-error': {
|
|
929
|
+
top: 'auto',
|
|
930
|
+
position: 'relative'
|
|
931
|
+
}
|
|
932
|
+
}
|
|
1163
933
|
}
|
|
1164
934
|
};
|
|
1165
935
|
|
|
@@ -1222,6 +992,31 @@ var RadioButtonAndLabel = function RadioButtonAndLabel(props) {
|
|
|
1222
992
|
}, restProps));
|
|
1223
993
|
};
|
|
1224
994
|
|
|
995
|
+
var ProductFormFieldLayout = function ProductFormFieldLayout(_a) {
|
|
996
|
+
var title = _a.title,
|
|
997
|
+
children = _a.children,
|
|
998
|
+
props = __rest(_a, ["title", "children"]);
|
|
999
|
+
|
|
1000
|
+
return /*#__PURE__*/React__default.createElement(Grid, Object.assign({
|
|
1001
|
+
item: true,
|
|
1002
|
+
container: true,
|
|
1003
|
+
spacing: 3
|
|
1004
|
+
}, props), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1005
|
+
item: true,
|
|
1006
|
+
xs: 4,
|
|
1007
|
+
container: true,
|
|
1008
|
+
justifyContent: "flex-end"
|
|
1009
|
+
}, title && /*#__PURE__*/React__default.createElement(Typography, {
|
|
1010
|
+
variant: "subtitle1",
|
|
1011
|
+
sx: styles$2.label
|
|
1012
|
+
}, title)), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1013
|
+
item: true,
|
|
1014
|
+
xs: 8,
|
|
1015
|
+
container: true,
|
|
1016
|
+
justifyContent: "flex-start"
|
|
1017
|
+
}, children));
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1225
1020
|
/* *
|
|
1226
1021
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1227
1022
|
* you may not use this file except in compliance with the License.
|
|
@@ -1235,8 +1030,8 @@ var RadioButtonAndLabel = function RadioButtonAndLabel(props) {
|
|
|
1235
1030
|
* See the License for the specific language governing permissions and
|
|
1236
1031
|
* limitations under the License.
|
|
1237
1032
|
*
|
|
1238
|
-
* Copyright
|
|
1239
|
-
* Copyright
|
|
1033
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1034
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1240
1035
|
* */
|
|
1241
1036
|
|
|
1242
1037
|
var Change = function Change(_ref) {
|
|
@@ -1249,24 +1044,9 @@ var Change = function Change(_ref) {
|
|
|
1249
1044
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
1250
1045
|
isRequired = _useDraftFormHelpers.isRequired;
|
|
1251
1046
|
|
|
1252
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
spacing: 2,
|
|
1256
|
-
sx: styles$4.containerItem
|
|
1257
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
1258
|
-
item: true,
|
|
1259
|
-
xs: 4,
|
|
1260
|
-
container: true,
|
|
1261
|
-
justifyContent: "flex-end"
|
|
1262
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
1263
|
-
variant: "subtitle1",
|
|
1264
|
-
sx: styles$4.label
|
|
1265
|
-
}, "Change")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1266
|
-
item: true,
|
|
1267
|
-
xs: 8,
|
|
1268
|
-
container: true,
|
|
1269
|
-
justifyContent: "flex-start"
|
|
1047
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
1048
|
+
title: "Change",
|
|
1049
|
+
sx: styles$2.containerItem
|
|
1270
1050
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
1271
1051
|
item: true,
|
|
1272
1052
|
xs: 12
|
|
@@ -1293,7 +1073,7 @@ var Change = function Change(_ref) {
|
|
|
1293
1073
|
label: "Intensifying",
|
|
1294
1074
|
disabled: isDisabled,
|
|
1295
1075
|
"data-testid": "change-INTSF"
|
|
1296
|
-
}))))
|
|
1076
|
+
}))));
|
|
1297
1077
|
};
|
|
1298
1078
|
|
|
1299
1079
|
/* *
|
|
@@ -1309,22 +1089,19 @@ var Change = function Change(_ref) {
|
|
|
1309
1089
|
* See the License for the specific language governing permissions and
|
|
1310
1090
|
* limitations under the License.
|
|
1311
1091
|
*
|
|
1312
|
-
* Copyright
|
|
1313
|
-
* Copyright
|
|
1092
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1093
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1314
1094
|
* */
|
|
1315
|
-
var styles$
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
borderRadius: '5px',
|
|
1319
|
-
border: 'solid 1px #0075a9',
|
|
1320
|
-
padding: '2px'
|
|
1321
|
-
},
|
|
1322
|
-
drawButtonsSelected: {
|
|
1323
|
-
color: 'white',
|
|
1324
|
-
backgroundColor: '#0075a9',
|
|
1095
|
+
var styles$1 = {
|
|
1096
|
+
radioInput: {
|
|
1097
|
+
padding: 1,
|
|
1325
1098
|
borderRadius: '5px',
|
|
1326
|
-
|
|
1327
|
-
|
|
1099
|
+
backgroundColor: 'geowebColors.buttons.tool.default.fill',
|
|
1100
|
+
color: 'geowebColors.buttons.tool.default.color',
|
|
1101
|
+
'&.Mui-checked': {
|
|
1102
|
+
backgroundColor: 'geowebColors.buttons.primary.default.fill',
|
|
1103
|
+
color: 'geowebColors.buttons.primary.default.color'
|
|
1104
|
+
}
|
|
1328
1105
|
}
|
|
1329
1106
|
};
|
|
1330
1107
|
|
|
@@ -1338,88 +1115,74 @@ var DrawTools = function DrawTools(_ref) {
|
|
|
1338
1115
|
xs: 12,
|
|
1339
1116
|
container: true,
|
|
1340
1117
|
justifyContent: "space-between",
|
|
1341
|
-
"data-testid": "drawtools"
|
|
1118
|
+
"data-testid": "drawtools",
|
|
1119
|
+
spacing: 1
|
|
1342
1120
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
1343
1121
|
item: true
|
|
1344
1122
|
}, /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
1345
1123
|
title: "Drop a point as ".concat(type, " position")
|
|
1346
1124
|
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
1347
|
-
icon: /*#__PURE__*/React__default.createElement(Location,
|
|
1348
|
-
sx: styles$3.drawButtons
|
|
1349
|
-
}),
|
|
1125
|
+
icon: /*#__PURE__*/React__default.createElement(Location, null),
|
|
1350
1126
|
value: true,
|
|
1351
|
-
checkedIcon: /*#__PURE__*/React__default.createElement(Location,
|
|
1352
|
-
sx: styles$3.drawButtonsSelected
|
|
1353
|
-
}),
|
|
1127
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(Location, null),
|
|
1354
1128
|
checked: drawMode === MapDrawMode.POINT,
|
|
1355
1129
|
onChange: function onChange() {
|
|
1356
1130
|
setDrawMode(MapDrawMode.POINT);
|
|
1357
1131
|
},
|
|
1358
|
-
"data-testid": "drawtools-point"
|
|
1132
|
+
"data-testid": "drawtools-point",
|
|
1133
|
+
sx: styles$1.radioInput
|
|
1359
1134
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1360
1135
|
item: true
|
|
1361
1136
|
}, /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
1362
1137
|
title: "Draw a box as ".concat(type, " position")
|
|
1363
1138
|
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
1364
|
-
icon: /*#__PURE__*/React__default.createElement(DrawRegion,
|
|
1365
|
-
|
|
1366
|
-
}),
|
|
1367
|
-
checkedIcon: /*#__PURE__*/React__default.createElement(DrawRegion, {
|
|
1368
|
-
sx: styles$3.drawButtonsSelected
|
|
1369
|
-
}),
|
|
1139
|
+
icon: /*#__PURE__*/React__default.createElement(DrawRegion, null),
|
|
1140
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(DrawRegion, null),
|
|
1370
1141
|
checked: drawMode === MapDrawMode.BOX,
|
|
1371
1142
|
onChange: function onChange() {
|
|
1372
1143
|
setDrawMode(MapDrawMode.BOX);
|
|
1373
1144
|
},
|
|
1374
|
-
"data-testid": "drawtools-box"
|
|
1145
|
+
"data-testid": "drawtools-box",
|
|
1146
|
+
sx: styles$1.radioInput
|
|
1375
1147
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1376
1148
|
item: true
|
|
1377
1149
|
}, /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
1378
1150
|
title: "Draw a shape as ".concat(type, " position")
|
|
1379
1151
|
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
1380
|
-
icon: /*#__PURE__*/React__default.createElement(DrawPolygon,
|
|
1381
|
-
|
|
1382
|
-
}),
|
|
1383
|
-
checkedIcon: /*#__PURE__*/React__default.createElement(DrawPolygon, {
|
|
1384
|
-
sx: styles$3.drawButtonsSelected
|
|
1385
|
-
}),
|
|
1152
|
+
icon: /*#__PURE__*/React__default.createElement(DrawPolygon, null),
|
|
1153
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(DrawPolygon, null),
|
|
1386
1154
|
checked: drawMode === MapDrawMode.POLYGON,
|
|
1387
1155
|
onChange: function onChange() {
|
|
1388
1156
|
setDrawMode(MapDrawMode.POLYGON);
|
|
1389
1157
|
},
|
|
1390
|
-
"data-testid": "drawtools-polygon"
|
|
1158
|
+
"data-testid": "drawtools-polygon",
|
|
1159
|
+
sx: styles$1.radioInput
|
|
1391
1160
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1392
1161
|
item: true
|
|
1393
1162
|
}, /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
1394
1163
|
title: "Set FIR as ".concat(type, " position")
|
|
1395
1164
|
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
1396
|
-
icon: /*#__PURE__*/React__default.createElement(DrawFIRLand,
|
|
1397
|
-
|
|
1398
|
-
}),
|
|
1399
|
-
checkedIcon: /*#__PURE__*/React__default.createElement(DrawFIRLand, {
|
|
1400
|
-
sx: styles$3.drawButtonsSelected
|
|
1401
|
-
}),
|
|
1165
|
+
icon: /*#__PURE__*/React__default.createElement(DrawFIRLand, null),
|
|
1166
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(DrawFIRLand, null),
|
|
1402
1167
|
checked: drawMode === MapDrawMode.FIR,
|
|
1403
1168
|
onChange: function onChange() {
|
|
1404
1169
|
setDrawMode(MapDrawMode.FIR);
|
|
1405
1170
|
},
|
|
1406
|
-
"data-testid": "drawtools-fir"
|
|
1171
|
+
"data-testid": "drawtools-fir",
|
|
1172
|
+
sx: styles$1.radioInput
|
|
1407
1173
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1408
1174
|
item: true
|
|
1409
1175
|
}, /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
1410
1176
|
title: "Remove geometry"
|
|
1411
1177
|
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
1412
|
-
icon: /*#__PURE__*/React__default.createElement(Delete,
|
|
1413
|
-
|
|
1414
|
-
}),
|
|
1415
|
-
checkedIcon: /*#__PURE__*/React__default.createElement(Delete, {
|
|
1416
|
-
sx: styles$3.drawButtonsSelected
|
|
1417
|
-
}),
|
|
1178
|
+
icon: /*#__PURE__*/React__default.createElement(Delete, null),
|
|
1179
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(Delete, null),
|
|
1418
1180
|
checked: drawMode === MapDrawMode.DELETE,
|
|
1419
1181
|
onChange: function onChange() {
|
|
1420
1182
|
setDrawMode(MapDrawMode.DELETE);
|
|
1421
1183
|
},
|
|
1422
|
-
"data-testid": "drawtools-delete"
|
|
1184
|
+
"data-testid": "drawtools-delete",
|
|
1185
|
+
sx: styles$1.radioInput
|
|
1423
1186
|
}))));
|
|
1424
1187
|
};
|
|
1425
1188
|
|
|
@@ -1628,47 +1391,86 @@ var getProductFormMode = function getProductFormMode(canBeOptions, productListIt
|
|
|
1628
1391
|
if (productListItem === null) return 'new';
|
|
1629
1392
|
return canBeOptions.includes('PUBLISHED') ? 'edit' : 'view';
|
|
1630
1393
|
};
|
|
1394
|
+
var buttonStyle = {
|
|
1395
|
+
minWidth: 96
|
|
1396
|
+
};
|
|
1631
1397
|
var getProductFormLifecycleButtons = function getProductFormLifecycleButtons(canBe, onButtonPress) {
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1398
|
+
var hasDiscardButton = canBe.includes('DISCARDED');
|
|
1399
|
+
|
|
1400
|
+
var onDiscard = function onDiscard() {
|
|
1401
|
+
return onButtonPress('DISCARDED');
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
var hasSaveButton = canBe.includes('DRAFTED');
|
|
1405
|
+
|
|
1406
|
+
var onSave = function onSave() {
|
|
1407
|
+
return onButtonPress('DRAFT');
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1410
|
+
var hasCancelButton = canBe.includes('CANCELLED');
|
|
1411
|
+
|
|
1412
|
+
var onCancel = function onCancel() {
|
|
1413
|
+
return onButtonPress('CANCELLED');
|
|
1414
|
+
};
|
|
1415
|
+
|
|
1416
|
+
var hasPublishButton = canBe.includes('PUBLISHED');
|
|
1417
|
+
|
|
1418
|
+
var onPublish = function onPublish() {
|
|
1419
|
+
return onButtonPress('PUBLISHED');
|
|
1420
|
+
};
|
|
1421
|
+
|
|
1422
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
1423
|
+
sx: {
|
|
1424
|
+
display: 'flex',
|
|
1425
|
+
justifyContent: 'flex-end',
|
|
1426
|
+
'button:not(:first-of-type)': {
|
|
1427
|
+
marginLeft: 1
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
1431
|
+
display: {
|
|
1432
|
+
xs: 'none',
|
|
1433
|
+
lg: 'block'
|
|
1434
|
+
}
|
|
1435
|
+
}, hasDiscardButton && /*#__PURE__*/React.createElement(Button, {
|
|
1436
|
+
variant: "flat",
|
|
1437
|
+
onClick: onDiscard,
|
|
1438
|
+
sx: buttonStyle,
|
|
1643
1439
|
"data-testid": "productform-dialog-discard"
|
|
1644
|
-
}, "
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
variant: "outlined",
|
|
1649
|
-
onClick: function onClick() {
|
|
1650
|
-
onButtonPress('DRAFT');
|
|
1651
|
-
},
|
|
1440
|
+
}, "DISCARD"), hasSaveButton && /*#__PURE__*/React.createElement(Button, {
|
|
1441
|
+
variant: "tertiary",
|
|
1442
|
+
onClick: onSave,
|
|
1443
|
+
sx: buttonStyle,
|
|
1652
1444
|
"data-testid": "productform-dialog-draft"
|
|
1653
|
-
}, "Save")
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
variant: "contained",
|
|
1658
|
-
onClick: function onClick() {
|
|
1659
|
-
onButtonPress('CANCELLED');
|
|
1660
|
-
},
|
|
1445
|
+
}, "Save"), hasCancelButton && /*#__PURE__*/React.createElement(Button, {
|
|
1446
|
+
variant: "tertiary",
|
|
1447
|
+
onClick: onCancel,
|
|
1448
|
+
sx: buttonStyle,
|
|
1661
1449
|
"data-testid": "productform-dialog-cancel"
|
|
1662
|
-
}, "Cancel")
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
variant: "contained",
|
|
1667
|
-
onClick: function onClick() {
|
|
1668
|
-
onButtonPress('PUBLISHED');
|
|
1669
|
-
},
|
|
1450
|
+
}, "Cancel"), hasPublishButton && /*#__PURE__*/React.createElement(Button, {
|
|
1451
|
+
variant: "primary",
|
|
1452
|
+
onClick: onPublish,
|
|
1453
|
+
sx: buttonStyle,
|
|
1670
1454
|
"data-testid": "productform-dialog-publish"
|
|
1671
|
-
}, "Publish"))
|
|
1455
|
+
}, "Publish")), /*#__PURE__*/React.createElement(Box, {
|
|
1456
|
+
display: {
|
|
1457
|
+
lg: 'none'
|
|
1458
|
+
}
|
|
1459
|
+
}, /*#__PURE__*/React.createElement(ToggleMenu, {
|
|
1460
|
+
menuItems: [].concat(_toConsumableArray(hasDiscardButton ? [{
|
|
1461
|
+
text: 'Discard',
|
|
1462
|
+
action: onDiscard
|
|
1463
|
+
}] : []), _toConsumableArray(hasSaveButton ? [{
|
|
1464
|
+
text: 'Save',
|
|
1465
|
+
action: onSave
|
|
1466
|
+
}] : []), _toConsumableArray(hasCancelButton ? [{
|
|
1467
|
+
text: 'Cancel',
|
|
1468
|
+
action: onCancel
|
|
1469
|
+
}] : []), _toConsumableArray(hasPublishButton ? [{
|
|
1470
|
+
text: 'Publish',
|
|
1471
|
+
action: onPublish
|
|
1472
|
+
}] : []))
|
|
1473
|
+
})));
|
|
1672
1474
|
};
|
|
1673
1475
|
var hasValue = function hasValue(value) {
|
|
1674
1476
|
return value !== null && value.toString() !== 'NaN';
|
|
@@ -1953,24 +1755,9 @@ var Levels = function Levels(_ref) {
|
|
|
1953
1755
|
var selectedFIR = watch('locationIndicatorATSR'); // Get allowed level units based on selected FIR - if no FIR selected, allow all default units
|
|
1954
1756
|
|
|
1955
1757
|
var allowedLevelUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'level_unit', LevelUnits);
|
|
1956
|
-
return /*#__PURE__*/React__default.createElement(
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
spacing: 2,
|
|
1960
|
-
sx: styles$4.containerItem
|
|
1961
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
1962
|
-
item: true,
|
|
1963
|
-
xs: 4,
|
|
1964
|
-
container: true,
|
|
1965
|
-
justifyContent: "flex-end"
|
|
1966
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
1967
|
-
variant: "subtitle1",
|
|
1968
|
-
sx: styles$4.label
|
|
1969
|
-
}, "Levels")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
1970
|
-
item: true,
|
|
1971
|
-
xs: 8,
|
|
1972
|
-
container: true,
|
|
1973
|
-
justifyContent: "flex-start"
|
|
1758
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
1759
|
+
title: "Levels",
|
|
1760
|
+
sx: styles$2.containerItem
|
|
1974
1761
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
1975
1762
|
item: true,
|
|
1976
1763
|
xs: 12
|
|
@@ -2010,10 +1797,14 @@ var Levels = function Levels(_ref) {
|
|
|
2010
1797
|
}), watch('levelInfoMode') === 'AT' || watch('levelInfoMode') === 'TOPS' ? /*#__PURE__*/React__default.createElement(Grid, {
|
|
2011
1798
|
item: true,
|
|
2012
1799
|
xs: 12,
|
|
2013
|
-
container: true
|
|
1800
|
+
container: true,
|
|
1801
|
+
spacing: 2,
|
|
1802
|
+
justifyItems: "flex-end",
|
|
1803
|
+
alignItems: "flex-end"
|
|
2014
1804
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2015
1805
|
item: true,
|
|
2016
|
-
xs:
|
|
1806
|
+
xs: 12,
|
|
1807
|
+
md: 3
|
|
2017
1808
|
}, (!isReadOnly || watch('levelInfoMode') === 'TOPS') && /*#__PURE__*/React__default.createElement(FormControlLabel, {
|
|
2018
1809
|
control: /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
2019
1810
|
checked: watch('levelInfoMode') === 'TOPS',
|
|
@@ -2029,7 +1820,8 @@ var Levels = function Levels(_ref) {
|
|
|
2029
1820
|
label: "Tops"
|
|
2030
1821
|
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2031
1822
|
item: true,
|
|
2032
|
-
xs:
|
|
1823
|
+
xs: 4,
|
|
1824
|
+
md: 3
|
|
2033
1825
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
|
|
2034
1826
|
name: "level.unit",
|
|
2035
1827
|
label: "Unit",
|
|
@@ -2038,7 +1830,7 @@ var Levels = function Levels(_ref) {
|
|
|
2038
1830
|
isRequired: isRequired
|
|
2039
1831
|
}
|
|
2040
1832
|
},
|
|
2041
|
-
sx: styles$
|
|
1833
|
+
sx: styles$2.unit,
|
|
2042
1834
|
disabled: isDisabled,
|
|
2043
1835
|
defaultValue: 'FL',
|
|
2044
1836
|
onChange: function onChange() {
|
|
@@ -2055,7 +1847,8 @@ var Levels = function Levels(_ref) {
|
|
|
2055
1847
|
}, allowedLevelUnitsForFir[key]);
|
|
2056
1848
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2057
1849
|
item: true,
|
|
2058
|
-
xs:
|
|
1850
|
+
xs: 8,
|
|
1851
|
+
md: 6
|
|
2059
1852
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormNumberField, {
|
|
2060
1853
|
name: "level.value",
|
|
2061
1854
|
"data-testid": "level.value",
|
|
@@ -2092,13 +1885,16 @@ var Levels = function Levels(_ref) {
|
|
|
2092
1885
|
}), watch('levelInfoMode') === 'BETW' || watch('levelInfoMode') === 'BETW_SFC' ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2093
1886
|
item: true,
|
|
2094
1887
|
xs: 12,
|
|
2095
|
-
container: true
|
|
1888
|
+
container: true,
|
|
1889
|
+
spacing: 2
|
|
2096
1890
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2097
1891
|
item: true,
|
|
2098
|
-
xs:
|
|
1892
|
+
xs: 12,
|
|
1893
|
+
md: 3
|
|
2099
1894
|
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2100
1895
|
item: true,
|
|
2101
|
-
xs:
|
|
1896
|
+
xs: 4,
|
|
1897
|
+
md: 3
|
|
2102
1898
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
|
|
2103
1899
|
name: "level.unit",
|
|
2104
1900
|
label: "Unit",
|
|
@@ -2112,7 +1908,7 @@ var Levels = function Levels(_ref) {
|
|
|
2112
1908
|
}
|
|
2113
1909
|
}
|
|
2114
1910
|
},
|
|
2115
|
-
sx: styles$
|
|
1911
|
+
sx: styles$2.unit,
|
|
2116
1912
|
disabled: isDisabled,
|
|
2117
1913
|
defaultValue: 'FL',
|
|
2118
1914
|
onChange: function onChange() {
|
|
@@ -2127,11 +1923,12 @@ var Levels = function Levels(_ref) {
|
|
|
2127
1923
|
}, allowedLevelUnitsForFir[key]);
|
|
2128
1924
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2129
1925
|
item: true,
|
|
2130
|
-
xs:
|
|
1926
|
+
xs: 8,
|
|
1927
|
+
md: 6
|
|
2131
1928
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormNumberField, {
|
|
2132
1929
|
name: "level.value",
|
|
2133
1930
|
label: "Upper level",
|
|
2134
|
-
sx: styles$
|
|
1931
|
+
sx: styles$2.levelField,
|
|
2135
1932
|
rules: {
|
|
2136
1933
|
validate: {
|
|
2137
1934
|
isRequired: isRequired,
|
|
@@ -2161,10 +1958,14 @@ var Levels = function Levels(_ref) {
|
|
|
2161
1958
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2162
1959
|
item: true,
|
|
2163
1960
|
xs: 12,
|
|
2164
|
-
container: true
|
|
1961
|
+
container: true,
|
|
1962
|
+
spacing: 2,
|
|
1963
|
+
justifyItems: "flex-end",
|
|
1964
|
+
alignItems: "flex-end"
|
|
2165
1965
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2166
1966
|
item: true,
|
|
2167
|
-
xs:
|
|
1967
|
+
xs: 12,
|
|
1968
|
+
md: 3
|
|
2168
1969
|
}, (!isReadOnly || watch('levelInfoMode') === 'BETW_SFC') && /*#__PURE__*/React__default.createElement(FormControlLabel, {
|
|
2169
1970
|
control: /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
2170
1971
|
checked: watch('levelInfoMode') === 'BETW_SFC',
|
|
@@ -2182,7 +1983,8 @@ var Levels = function Levels(_ref) {
|
|
|
2182
1983
|
label: "SFC"
|
|
2183
1984
|
})), watch('levelInfoMode') !== 'BETW_SFC' && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2184
1985
|
item: true,
|
|
2185
|
-
xs:
|
|
1986
|
+
xs: 4,
|
|
1987
|
+
md: 3
|
|
2186
1988
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
|
|
2187
1989
|
name: "lowerLevel.unit",
|
|
2188
1990
|
label: "Unit",
|
|
@@ -2196,7 +1998,7 @@ var Levels = function Levels(_ref) {
|
|
|
2196
1998
|
}
|
|
2197
1999
|
}
|
|
2198
2000
|
},
|
|
2199
|
-
sx: styles$
|
|
2001
|
+
sx: styles$2.unit,
|
|
2200
2002
|
disabled: isDisabled,
|
|
2201
2003
|
defaultValue: getValues('level.unit') || 'FL',
|
|
2202
2004
|
onChange: function onChange() {
|
|
@@ -2215,7 +2017,8 @@ var Levels = function Levels(_ref) {
|
|
|
2215
2017
|
}, allowedLevelUnitsForFir[key]);
|
|
2216
2018
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2217
2019
|
item: true,
|
|
2218
|
-
xs:
|
|
2020
|
+
xs: 8,
|
|
2021
|
+
md: 6
|
|
2219
2022
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormNumberField, {
|
|
2220
2023
|
name: "lowerLevel.value",
|
|
2221
2024
|
label: "Lower level",
|
|
@@ -2255,10 +2058,14 @@ var Levels = function Levels(_ref) {
|
|
|
2255
2058
|
}), watch('levelInfoMode') === 'ABV' || watch('levelInfoMode') === 'TOPS_ABV' ? /*#__PURE__*/React__default.createElement(Grid, {
|
|
2256
2059
|
item: true,
|
|
2257
2060
|
xs: 12,
|
|
2258
|
-
container: true
|
|
2061
|
+
container: true,
|
|
2062
|
+
spacing: 2,
|
|
2063
|
+
justifyItems: "flex-end",
|
|
2064
|
+
alignItems: "flex-end"
|
|
2259
2065
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2260
2066
|
item: true,
|
|
2261
|
-
xs:
|
|
2067
|
+
xs: 12,
|
|
2068
|
+
md: 3
|
|
2262
2069
|
}, (!isReadOnly || watch('levelInfoMode') === 'TOPS_ABV') && /*#__PURE__*/React__default.createElement(FormControlLabel, {
|
|
2263
2070
|
control: /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
2264
2071
|
checked: watch('levelInfoMode') === 'TOPS_ABV',
|
|
@@ -2273,7 +2080,8 @@ var Levels = function Levels(_ref) {
|
|
|
2273
2080
|
"data-testid": "levels-TOPS_ABV"
|
|
2274
2081
|
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2275
2082
|
item: true,
|
|
2276
|
-
xs:
|
|
2083
|
+
xs: 4,
|
|
2084
|
+
md: 3
|
|
2277
2085
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
|
|
2278
2086
|
name: "level.unit",
|
|
2279
2087
|
label: "Unit",
|
|
@@ -2282,7 +2090,7 @@ var Levels = function Levels(_ref) {
|
|
|
2282
2090
|
isRequired: isRequired
|
|
2283
2091
|
}
|
|
2284
2092
|
},
|
|
2285
|
-
sx: styles$
|
|
2093
|
+
sx: styles$2.unit,
|
|
2286
2094
|
disabled: isDisabled,
|
|
2287
2095
|
defaultValue: 'FL',
|
|
2288
2096
|
onChange: function onChange() {
|
|
@@ -2299,7 +2107,8 @@ var Levels = function Levels(_ref) {
|
|
|
2299
2107
|
}, allowedLevelUnitsForFir[key]);
|
|
2300
2108
|
}))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2301
2109
|
item: true,
|
|
2302
|
-
xs:
|
|
2110
|
+
xs: 8,
|
|
2111
|
+
md: 6
|
|
2303
2112
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormNumberField, {
|
|
2304
2113
|
name: "level.value",
|
|
2305
2114
|
label: "Level",
|
|
@@ -2326,7 +2135,7 @@ var Levels = function Levels(_ref) {
|
|
|
2326
2135
|
},
|
|
2327
2136
|
disabled: isDisabled,
|
|
2328
2137
|
autoFocus: true
|
|
2329
|
-
}))) : null)))
|
|
2138
|
+
}))) : null)));
|
|
2330
2139
|
};
|
|
2331
2140
|
|
|
2332
2141
|
/* *
|
|
@@ -2342,8 +2151,8 @@ var Levels = function Levels(_ref) {
|
|
|
2342
2151
|
* See the License for the specific language governing permissions and
|
|
2343
2152
|
* limitations under the License.
|
|
2344
2153
|
*
|
|
2345
|
-
* Copyright
|
|
2346
|
-
* Copyright
|
|
2154
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2155
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2347
2156
|
* */
|
|
2348
2157
|
|
|
2349
2158
|
var ObservationForecast = function ObservationForecast(_ref) {
|
|
@@ -2358,20 +2167,13 @@ var ObservationForecast = function ObservationForecast(_ref) {
|
|
|
2358
2167
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
2359
2168
|
isRequired = _useDraftFormHelpers.isRequired;
|
|
2360
2169
|
|
|
2361
|
-
return /*#__PURE__*/React__default.createElement(
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
container: true,
|
|
2369
|
-
justifyContent: "flex-end"
|
|
2370
|
-
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2371
|
-
item: true,
|
|
2372
|
-
xs: 8,
|
|
2373
|
-
container: true,
|
|
2374
|
-
justifyContent: "flex-start"
|
|
2170
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2171
|
+
sx: {
|
|
2172
|
+
paddingTop: '8px!important',
|
|
2173
|
+
'+ .MuiGrid-item': {
|
|
2174
|
+
paddingTop: 5
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2375
2177
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormRadioGroup, {
|
|
2376
2178
|
name: "isObservationOrForecast",
|
|
2377
2179
|
disabled: isDisabled,
|
|
@@ -2395,7 +2197,7 @@ var ObservationForecast = function ObservationForecast(_ref) {
|
|
|
2395
2197
|
label: "Forecast",
|
|
2396
2198
|
disabled: isDisabled,
|
|
2397
2199
|
"data-testid": "isObservationOrForecast-FCST"
|
|
2398
|
-
})))
|
|
2200
|
+
})));
|
|
2399
2201
|
};
|
|
2400
2202
|
|
|
2401
2203
|
/* *
|
|
@@ -2411,8 +2213,8 @@ var ObservationForecast = function ObservationForecast(_ref) {
|
|
|
2411
2213
|
* See the License for the specific language governing permissions and
|
|
2412
2214
|
* limitations under the License.
|
|
2413
2215
|
*
|
|
2414
|
-
* Copyright
|
|
2415
|
-
* Copyright
|
|
2216
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2217
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2416
2218
|
* */
|
|
2417
2219
|
var ForecastTimeValidation = 'Forecast time should lie between the valid start and valid end time';
|
|
2418
2220
|
|
|
@@ -2428,23 +2230,8 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
|
|
|
2428
2230
|
var _useFormContext = useFormContext(),
|
|
2429
2231
|
watch = _useFormContext.watch;
|
|
2430
2232
|
|
|
2431
|
-
return (!isReadOnly || watch('observationOrForecastTime') !== null) && /*#__PURE__*/React__default.createElement(
|
|
2432
|
-
|
|
2433
|
-
container: true,
|
|
2434
|
-
spacing: 2
|
|
2435
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2436
|
-
item: true,
|
|
2437
|
-
xs: 4,
|
|
2438
|
-
container: true,
|
|
2439
|
-
justifyContent: "flex-end"
|
|
2440
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2441
|
-
variant: "subtitle1",
|
|
2442
|
-
sx: styles$4.label
|
|
2443
|
-
}, "At")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2444
|
-
item: true,
|
|
2445
|
-
xs: 8,
|
|
2446
|
-
container: true,
|
|
2447
|
-
justifyContent: "flex-start"
|
|
2233
|
+
return (!isReadOnly || watch('observationOrForecastTime') !== null) && /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2234
|
+
title: "At"
|
|
2448
2235
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormDateTime, {
|
|
2449
2236
|
disablePast: watch('isObservationOrForecast') === 'FCST',
|
|
2450
2237
|
disableFuture: watch('isObservationOrForecast') === 'OBS',
|
|
@@ -2462,8 +2249,9 @@ var ObservationForecastTime = function ObservationForecastTime(_ref) {
|
|
|
2462
2249
|
},
|
|
2463
2250
|
disabled: isDisabled,
|
|
2464
2251
|
helperText: helperText,
|
|
2465
|
-
onChange: onChange
|
|
2466
|
-
|
|
2252
|
+
onChange: onChange,
|
|
2253
|
+
sx: styles$2.helperText
|
|
2254
|
+
}));
|
|
2467
2255
|
};
|
|
2468
2256
|
|
|
2469
2257
|
var Phenomenon = function Phenomenon(_ref) {
|
|
@@ -2480,23 +2268,8 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2480
2268
|
trigger = _useFormContext.trigger;
|
|
2481
2269
|
|
|
2482
2270
|
var phenomenaList = productType === 'sigmet' ? SigmetPhenomena : AirmetPhenomena;
|
|
2483
|
-
return /*#__PURE__*/React__default.createElement(
|
|
2484
|
-
|
|
2485
|
-
container: true,
|
|
2486
|
-
spacing: 2
|
|
2487
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2488
|
-
item: true,
|
|
2489
|
-
xs: 4,
|
|
2490
|
-
container: true,
|
|
2491
|
-
justifyContent: "flex-end"
|
|
2492
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2493
|
-
variant: "subtitle1",
|
|
2494
|
-
sx: styles$4.label
|
|
2495
|
-
}, "What")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2496
|
-
item: true,
|
|
2497
|
-
xs: 8,
|
|
2498
|
-
container: true,
|
|
2499
|
-
justifyContent: "flex-start"
|
|
2271
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2272
|
+
title: "What"
|
|
2500
2273
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
|
|
2501
2274
|
name: "phenomenon",
|
|
2502
2275
|
label: "Select phenomenon",
|
|
@@ -2531,7 +2304,7 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2531
2304
|
value: key,
|
|
2532
2305
|
key: key
|
|
2533
2306
|
}, phenomenaList[key]);
|
|
2534
|
-
})))
|
|
2307
|
+
})));
|
|
2535
2308
|
};
|
|
2536
2309
|
|
|
2537
2310
|
/* *
|
|
@@ -2547,8 +2320,8 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
2547
2320
|
* See the License for the specific language governing permissions and
|
|
2548
2321
|
* limitations under the License.
|
|
2549
2322
|
*
|
|
2550
|
-
* Copyright
|
|
2551
|
-
* Copyright
|
|
2323
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2324
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2552
2325
|
* */
|
|
2553
2326
|
var noIntersectionMessage$1 = 'The start position needs to be (partly) inside the FIR';
|
|
2554
2327
|
var maximum6PointsMessage$1 = 'The start position drawing allows a maximum of 6 individual points';
|
|
@@ -2570,22 +2343,9 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2570
2343
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
2571
2344
|
isDraft = _useDraftFormHelpers.isDraft;
|
|
2572
2345
|
|
|
2573
|
-
return !isReadOnly && /*#__PURE__*/React__default.createElement(
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
spacing: 2,
|
|
2577
|
-
sx: styles$4.drawSection
|
|
2578
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2579
|
-
item: true,
|
|
2580
|
-
xs: 4,
|
|
2581
|
-
container: true,
|
|
2582
|
-
justifyContent: "flex-end"
|
|
2583
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2584
|
-
variant: "subtitle1",
|
|
2585
|
-
sx: styles$4.label
|
|
2586
|
-
}, "Start position")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2587
|
-
item: true,
|
|
2588
|
-
xs: 8,
|
|
2346
|
+
return !isReadOnly && /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2347
|
+
title: "Start position",
|
|
2348
|
+
sx: styles$2.drawSection,
|
|
2589
2349
|
"data-testid": "startGeometry"
|
|
2590
2350
|
}, /*#__PURE__*/React__default.createElement(DrawTools, {
|
|
2591
2351
|
type: StartOrEndDrawing.start,
|
|
@@ -2595,7 +2355,7 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2595
2355
|
}
|
|
2596
2356
|
}), drawMode[StartOrEndDrawing.start] && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
|
2597
2357
|
variant: "filled",
|
|
2598
|
-
sx: styles$
|
|
2358
|
+
sx: styles$2.quitDrawModeMessage
|
|
2599
2359
|
}, exitDrawModeMessage), !!errors.startGeometry && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
|
2600
2360
|
error: true,
|
|
2601
2361
|
variant: "filled"
|
|
@@ -2625,7 +2385,7 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2625
2385
|
}
|
|
2626
2386
|
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
2627
2387
|
name: "startGeometryIntersect"
|
|
2628
|
-
}))
|
|
2388
|
+
}));
|
|
2629
2389
|
};
|
|
2630
2390
|
|
|
2631
2391
|
/* *
|
|
@@ -2641,8 +2401,8 @@ var StartGeometry = function StartGeometry(_ref) {
|
|
|
2641
2401
|
* See the License for the specific language governing permissions and
|
|
2642
2402
|
* limitations under the License.
|
|
2643
2403
|
*
|
|
2644
|
-
* Copyright
|
|
2645
|
-
* Copyright
|
|
2404
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2405
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2646
2406
|
* */
|
|
2647
2407
|
var movementStepValMessageKT = 'Speed should be rounded to the nearest 5kt';
|
|
2648
2408
|
var movementStepValMessageKMH = 'Speed should be rounded to the nearest 10kmh';
|
|
@@ -2722,24 +2482,9 @@ var Progress = function Progress(_ref) {
|
|
|
2722
2482
|
var selectedFIR = watch('locationIndicatorATSR'); // Get allowed movement units based on selected FIR - if no FIR selected, allow all units
|
|
2723
2483
|
|
|
2724
2484
|
var allowedMovementUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'movement_unit', MovementUnit);
|
|
2725
|
-
return /*#__PURE__*/React__default.createElement(
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
spacing: 2,
|
|
2729
|
-
sx: styles$4.containerItem
|
|
2730
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2731
|
-
item: true,
|
|
2732
|
-
xs: 4,
|
|
2733
|
-
container: true,
|
|
2734
|
-
justifyContent: "flex-end"
|
|
2735
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2736
|
-
variant: "subtitle1",
|
|
2737
|
-
sx: styles$4.label
|
|
2738
|
-
}, "Progress")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2739
|
-
item: true,
|
|
2740
|
-
xs: 8,
|
|
2741
|
-
container: true,
|
|
2742
|
-
justifyContent: "flex-start"
|
|
2485
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2486
|
+
title: "Progress",
|
|
2487
|
+
sx: styles$2.containerItem
|
|
2743
2488
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2744
2489
|
item: true,
|
|
2745
2490
|
xs: 12
|
|
@@ -2778,7 +2523,7 @@ var Progress = function Progress(_ref) {
|
|
|
2778
2523
|
rules: {
|
|
2779
2524
|
validate: isRequired
|
|
2780
2525
|
},
|
|
2781
|
-
sx: styles$
|
|
2526
|
+
sx: styles$2.movement,
|
|
2782
2527
|
disabled: isDisabled,
|
|
2783
2528
|
"data-testid": "movement-movementDirection",
|
|
2784
2529
|
onChange: function onChange(event) {
|
|
@@ -2805,7 +2550,7 @@ var Progress = function Progress(_ref) {
|
|
|
2805
2550
|
rules: {
|
|
2806
2551
|
validate: isRequired
|
|
2807
2552
|
},
|
|
2808
|
-
sx: styles$
|
|
2553
|
+
sx: styles$2.unit,
|
|
2809
2554
|
disabled: isDisabled,
|
|
2810
2555
|
defaultValue: 'KT',
|
|
2811
2556
|
"data-testid": "movement-movementUnit",
|
|
@@ -2864,7 +2609,7 @@ var Progress = function Progress(_ref) {
|
|
|
2864
2609
|
item: true,
|
|
2865
2610
|
xs: 12,
|
|
2866
2611
|
"data-testid": "endGeometry",
|
|
2867
|
-
sx: styles$
|
|
2612
|
+
sx: styles$2.drawSection
|
|
2868
2613
|
}, !isReadOnly && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(DrawTools, {
|
|
2869
2614
|
"data-testid": "endGeometry-drawTools",
|
|
2870
2615
|
type: StartOrEndDrawing.end,
|
|
@@ -2874,7 +2619,7 @@ var Progress = function Progress(_ref) {
|
|
|
2874
2619
|
}
|
|
2875
2620
|
}), drawMode[StartOrEndDrawing.end] && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
|
2876
2621
|
variant: "filled",
|
|
2877
|
-
sx: styles$
|
|
2622
|
+
sx: styles$2.quitDrawModeMessage
|
|
2878
2623
|
}, exitDrawModeMessage), !!errors.endGeometry && /*#__PURE__*/React__default.createElement(FormHelperText, {
|
|
2879
2624
|
error: true,
|
|
2880
2625
|
variant: "filled"
|
|
@@ -2904,7 +2649,7 @@ var Progress = function Progress(_ref) {
|
|
|
2904
2649
|
}
|
|
2905
2650
|
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
2906
2651
|
name: "endGeometryIntersect"
|
|
2907
|
-
}))))
|
|
2652
|
+
}))));
|
|
2908
2653
|
};
|
|
2909
2654
|
|
|
2910
2655
|
/* *
|
|
@@ -2920,8 +2665,8 @@ var Progress = function Progress(_ref) {
|
|
|
2920
2665
|
* See the License for the specific language governing permissions and
|
|
2921
2666
|
* limitations under the License.
|
|
2922
2667
|
*
|
|
2923
|
-
* Copyright
|
|
2924
|
-
* Copyright
|
|
2668
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2669
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2925
2670
|
* */
|
|
2926
2671
|
|
|
2927
2672
|
var SelectFIR = function SelectFIR(_ref) {
|
|
@@ -2941,24 +2686,9 @@ var SelectFIR = function SelectFIR(_ref) {
|
|
|
2941
2686
|
optionsFIR = _useProductSettings.optionsFIR,
|
|
2942
2687
|
allFIRS = _useProductSettings.allFIRS;
|
|
2943
2688
|
|
|
2944
|
-
return /*#__PURE__*/React__default.createElement(
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
spacing: 2,
|
|
2948
|
-
sx: styles$4.containerItem
|
|
2949
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
2950
|
-
item: true,
|
|
2951
|
-
xs: 4,
|
|
2952
|
-
container: true,
|
|
2953
|
-
justifyContent: "flex-end"
|
|
2954
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
2955
|
-
variant: "subtitle1",
|
|
2956
|
-
sx: styles$4.label
|
|
2957
|
-
}, "Where")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2958
|
-
item: true,
|
|
2959
|
-
xs: 8,
|
|
2960
|
-
container: true,
|
|
2961
|
-
justifyContent: "flex-start"
|
|
2689
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2690
|
+
title: "Where",
|
|
2691
|
+
sx: styles$2.containerItem
|
|
2962
2692
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormSelect, {
|
|
2963
2693
|
name: "locationIndicatorATSR",
|
|
2964
2694
|
label: "Select FIR",
|
|
@@ -2990,7 +2720,7 @@ var SelectFIR = function SelectFIR(_ref) {
|
|
|
2990
2720
|
}), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
2991
2721
|
name: "firGeometry",
|
|
2992
2722
|
defaultValue: getFir()
|
|
2993
|
-
}))
|
|
2723
|
+
}));
|
|
2994
2724
|
};
|
|
2995
2725
|
|
|
2996
2726
|
/* *
|
|
@@ -3006,8 +2736,8 @@ var SelectFIR = function SelectFIR(_ref) {
|
|
|
3006
2736
|
* See the License for the specific language governing permissions and
|
|
3007
2737
|
* limitations under the License.
|
|
3008
2738
|
*
|
|
3009
|
-
* Copyright
|
|
3010
|
-
* Copyright
|
|
2739
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2740
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3011
2741
|
* */
|
|
3012
2742
|
|
|
3013
2743
|
var Type = function Type(_ref) {
|
|
@@ -3020,24 +2750,9 @@ var Type = function Type(_ref) {
|
|
|
3020
2750
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
3021
2751
|
isRequired = _useDraftFormHelpers.isRequired;
|
|
3022
2752
|
|
|
3023
|
-
return /*#__PURE__*/React__default.createElement(
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
spacing: 2,
|
|
3027
|
-
sx: styles$4.containerItem
|
|
3028
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3029
|
-
item: true,
|
|
3030
|
-
xs: 4,
|
|
3031
|
-
container: true,
|
|
3032
|
-
justifyContent: "flex-end"
|
|
3033
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3034
|
-
variant: "subtitle1",
|
|
3035
|
-
sx: styles$4.label
|
|
3036
|
-
}, "Type")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3037
|
-
item: true,
|
|
3038
|
-
xs: 8,
|
|
3039
|
-
container: true,
|
|
3040
|
-
justifyContent: "flex-start"
|
|
2753
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2754
|
+
title: "Type",
|
|
2755
|
+
sx: styles$2.containerItem
|
|
3041
2756
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3042
2757
|
item: true,
|
|
3043
2758
|
xs: 12
|
|
@@ -3065,7 +2780,7 @@ var Type = function Type(_ref) {
|
|
|
3065
2780
|
label: "Exercise",
|
|
3066
2781
|
disabled: isDisabled,
|
|
3067
2782
|
"data-testid": "type-EXERCISE"
|
|
3068
|
-
}))))
|
|
2783
|
+
}))));
|
|
3069
2784
|
};
|
|
3070
2785
|
|
|
3071
2786
|
/* *
|
|
@@ -3081,10 +2796,14 @@ var Type = function Type(_ref) {
|
|
|
3081
2796
|
* See the License for the specific language governing permissions and
|
|
3082
2797
|
* limitations under the License.
|
|
3083
2798
|
*
|
|
3084
|
-
* Copyright
|
|
3085
|
-
* Copyright
|
|
2799
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2800
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3086
2801
|
* */
|
|
3087
2802
|
var VALID_FROM_TIME_DELAY_IN_MINUTES = 30;
|
|
2803
|
+
var VALID_FROM_ERROR_BEFORE_CURRENT = 'Valid from time cannot be before current time';
|
|
2804
|
+
var getValidFromXHoursBeforeMessage = function getValidFromXHoursBeforeMessage(hours) {
|
|
2805
|
+
return "Valid from time can be no more than ".concat(hours, " hours after current time");
|
|
2806
|
+
};
|
|
3088
2807
|
|
|
3089
2808
|
var ValidFrom = function ValidFrom(_ref) {
|
|
3090
2809
|
var productType = _ref.productType,
|
|
@@ -3102,23 +2821,8 @@ var ValidFrom = function ValidFrom(_ref) {
|
|
|
3102
2821
|
isRequired = _useDraftFormHelpers.isRequired;
|
|
3103
2822
|
|
|
3104
2823
|
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
3105
|
-
return /*#__PURE__*/React__default.createElement(
|
|
3106
|
-
|
|
3107
|
-
container: true,
|
|
3108
|
-
spacing: 2
|
|
3109
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3110
|
-
item: true,
|
|
3111
|
-
xs: 4,
|
|
3112
|
-
container: true,
|
|
3113
|
-
justifyContent: "flex-end"
|
|
3114
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3115
|
-
variant: "subtitle1",
|
|
3116
|
-
sx: styles$4.label
|
|
3117
|
-
}, "Valid from")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3118
|
-
item: true,
|
|
3119
|
-
xs: 8,
|
|
3120
|
-
container: true,
|
|
3121
|
-
justifyContent: "flex-start"
|
|
2824
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2825
|
+
title: "Valid from"
|
|
3122
2826
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormDateTime, {
|
|
3123
2827
|
disablePast: true,
|
|
3124
2828
|
name: "validDateStart",
|
|
@@ -3129,11 +2833,11 @@ var ValidFrom = function ValidFrom(_ref) {
|
|
|
3129
2833
|
isValidDate: isValidDate,
|
|
3130
2834
|
// The validity start can not be before the current time
|
|
3131
2835
|
isValueBeforeCurrentTime: function isValueBeforeCurrentTime(value) {
|
|
3132
|
-
return isXHoursBefore(value, moment.utc().format(), 0) ||
|
|
2836
|
+
return isXHoursBefore(value, moment.utc().format(), 0) || VALID_FROM_ERROR_BEFORE_CURRENT;
|
|
3133
2837
|
},
|
|
3134
2838
|
// The current time can be no more than 4 hours before the validity start (12 for VA/TC SIGMET)
|
|
3135
2839
|
isCurrentTimeXHoursBeforeValue: function isCurrentTimeXHoursBeforeValue(value) {
|
|
3136
|
-
return isXHoursBefore(moment.utc().format(), value, getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config)) ||
|
|
2840
|
+
return isXHoursBefore(moment.utc().format(), value, getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config)) || getValidFromXHoursBeforeMessage(getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config));
|
|
3137
2841
|
}
|
|
3138
2842
|
}
|
|
3139
2843
|
},
|
|
@@ -3150,9 +2854,6 @@ var ValidFrom = function ValidFrom(_ref) {
|
|
|
3150
2854
|
},
|
|
3151
2855
|
disabled: isDisabled,
|
|
3152
2856
|
"data-testid": "valid-from"
|
|
3153
|
-
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3154
|
-
item: true,
|
|
3155
|
-
xs: 6
|
|
3156
2857
|
}));
|
|
3157
2858
|
};
|
|
3158
2859
|
|
|
@@ -3169,8 +2870,8 @@ var ValidFrom = function ValidFrom(_ref) {
|
|
|
3169
2870
|
* See the License for the specific language governing permissions and
|
|
3170
2871
|
* limitations under the License.
|
|
3171
2872
|
*
|
|
3172
|
-
* Copyright
|
|
3173
|
-
* Copyright
|
|
2873
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2874
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3174
2875
|
* */
|
|
3175
2876
|
var DEFAULT_VALID_TIME_SIGMET = 3;
|
|
3176
2877
|
var DEFAULT_VALID_TIME_AIRMET = 1;
|
|
@@ -3188,30 +2889,15 @@ var ValidUntil = function ValidUntil(_ref) {
|
|
|
3188
2889
|
|
|
3189
2890
|
var _useFormContext = useFormContext(),
|
|
3190
2891
|
getValues = _useFormContext.getValues,
|
|
3191
|
-
trigger = _useFormContext.trigger;
|
|
3192
|
-
|
|
3193
|
-
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
3194
|
-
isRequired = _useDraftFormHelpers.isRequired;
|
|
3195
|
-
|
|
3196
|
-
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
3197
|
-
var defaultHoursValid = getDefaultHoursValid(productType);
|
|
3198
|
-
return /*#__PURE__*/React__default.createElement(
|
|
3199
|
-
|
|
3200
|
-
container: true,
|
|
3201
|
-
spacing: 2
|
|
3202
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3203
|
-
item: true,
|
|
3204
|
-
xs: 4,
|
|
3205
|
-
container: true,
|
|
3206
|
-
justifyContent: "flex-end"
|
|
3207
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3208
|
-
variant: "subtitle1",
|
|
3209
|
-
sx: styles$4.label
|
|
3210
|
-
}, "Valid until")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3211
|
-
item: true,
|
|
3212
|
-
xs: 8,
|
|
3213
|
-
container: true,
|
|
3214
|
-
justifyContent: "flex-start"
|
|
2892
|
+
trigger = _useFormContext.trigger;
|
|
2893
|
+
|
|
2894
|
+
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
2895
|
+
isRequired = _useDraftFormHelpers.isRequired;
|
|
2896
|
+
|
|
2897
|
+
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
2898
|
+
var defaultHoursValid = getDefaultHoursValid(productType);
|
|
2899
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
2900
|
+
title: "Valid until"
|
|
3215
2901
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormDateTime, {
|
|
3216
2902
|
disablePast: true,
|
|
3217
2903
|
name: "validDateEnd",
|
|
@@ -3242,9 +2928,6 @@ var ValidUntil = function ValidUntil(_ref) {
|
|
|
3242
2928
|
|
|
3243
2929
|
_onChange();
|
|
3244
2930
|
}
|
|
3245
|
-
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3246
|
-
item: true,
|
|
3247
|
-
xs: 6
|
|
3248
2931
|
}));
|
|
3249
2932
|
};
|
|
3250
2933
|
|
|
@@ -3292,7 +2975,7 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
3292
2975
|
}, (!isReadOnly || !!watch('vaSigmetVolcanoName')) && /*#__PURE__*/React__default.createElement(Grid, {
|
|
3293
2976
|
item: true,
|
|
3294
2977
|
xs: 12,
|
|
3295
|
-
sx: styles$
|
|
2978
|
+
sx: styles$2.volcanicField
|
|
3296
2979
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormTextField, {
|
|
3297
2980
|
name: "vaSigmetVolcanoName",
|
|
3298
2981
|
label: "Volcano name",
|
|
@@ -3320,7 +3003,7 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
3320
3003
|
}
|
|
3321
3004
|
}
|
|
3322
3005
|
},
|
|
3323
|
-
sx: styles$
|
|
3006
|
+
sx: Object.assign(Object.assign({}, styles$2.latitude), styles$2.helperText),
|
|
3324
3007
|
disabled: isDisabled,
|
|
3325
3008
|
helperText: helperText,
|
|
3326
3009
|
onChange: function onChange() {
|
|
@@ -3348,7 +3031,8 @@ var VolcanicFields = function VolcanicFields(_ref) {
|
|
|
3348
3031
|
helperText: helperText,
|
|
3349
3032
|
onChange: function onChange() {
|
|
3350
3033
|
return trigger('vaSigmetVolcanoCoordinates.latitude');
|
|
3351
|
-
}
|
|
3034
|
+
},
|
|
3035
|
+
sx: styles$2.helperText
|
|
3352
3036
|
}))));
|
|
3353
3037
|
};
|
|
3354
3038
|
|
|
@@ -3409,7 +3093,7 @@ var SurfaceVisibility = function SurfaceVisibility(_ref) {
|
|
|
3409
3093
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3410
3094
|
item: true,
|
|
3411
3095
|
xs: 12,
|
|
3412
|
-
sx: styles$
|
|
3096
|
+
sx: styles$2.surfaceVisibility
|
|
3413
3097
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormNumberField, {
|
|
3414
3098
|
name: "visibilityValue",
|
|
3415
3099
|
"data-testid": "surfaceVisibility-visibilityValue",
|
|
@@ -3518,7 +3202,7 @@ var SurfaceWind = function SurfaceWind(_ref) {
|
|
|
3518
3202
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3519
3203
|
item: true,
|
|
3520
3204
|
xs: 12,
|
|
3521
|
-
sx: styles$
|
|
3205
|
+
sx: styles$2.surfaceWind
|
|
3522
3206
|
}, /*#__PURE__*/React__default.createElement(ReactHookFormNumberField, {
|
|
3523
3207
|
name: "windDirection",
|
|
3524
3208
|
label: "Set wind direction",
|
|
@@ -3554,7 +3238,7 @@ var SurfaceWind = function SurfaceWind(_ref) {
|
|
|
3554
3238
|
isRequired: isRequired
|
|
3555
3239
|
}
|
|
3556
3240
|
},
|
|
3557
|
-
sx: styles$
|
|
3241
|
+
sx: styles$2.unit,
|
|
3558
3242
|
disabled: isDisabled,
|
|
3559
3243
|
defaultValue: 'KT',
|
|
3560
3244
|
"data-testid": "surfaceWind-windUnit",
|
|
@@ -3662,7 +3346,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3662
3346
|
item: true,
|
|
3663
3347
|
container: true,
|
|
3664
3348
|
spacing: 2,
|
|
3665
|
-
sx: styles$
|
|
3349
|
+
sx: styles$2.containerItem
|
|
3666
3350
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3667
3351
|
item: true,
|
|
3668
3352
|
xs: 4,
|
|
@@ -3670,7 +3354,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3670
3354
|
justifyContent: "flex-end"
|
|
3671
3355
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3672
3356
|
variant: "subtitle1",
|
|
3673
|
-
sx: styles$
|
|
3357
|
+
sx: styles$2.label
|
|
3674
3358
|
}, "Levels")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
3675
3359
|
item: true,
|
|
3676
3360
|
xs: 8,
|
|
@@ -3737,7 +3421,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3737
3421
|
isRequired: isRequired
|
|
3738
3422
|
}
|
|
3739
3423
|
},
|
|
3740
|
-
sx: styles$
|
|
3424
|
+
sx: styles$2.unit,
|
|
3741
3425
|
disabled: isDisabled,
|
|
3742
3426
|
defaultValue: 'FT',
|
|
3743
3427
|
onChange: function onChange() {
|
|
@@ -3766,7 +3450,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3766
3450
|
name: "cloudLevel.value",
|
|
3767
3451
|
label: "Upper level",
|
|
3768
3452
|
"data-testid": "cloudLevel-value",
|
|
3769
|
-
sx: styles$
|
|
3453
|
+
sx: styles$2.levelField,
|
|
3770
3454
|
rules: {
|
|
3771
3455
|
validate: {
|
|
3772
3456
|
isRequired: isRequired,
|
|
@@ -3845,7 +3529,7 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3845
3529
|
isRequired: isRequired
|
|
3846
3530
|
}
|
|
3847
3531
|
},
|
|
3848
|
-
sx: styles$
|
|
3532
|
+
sx: styles$2.unit,
|
|
3849
3533
|
disabled: isDisabled,
|
|
3850
3534
|
defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
|
|
3851
3535
|
onChange: function onChange() {
|
|
@@ -3902,22 +3586,6 @@ var CloudLevels = function CloudLevels(_ref) {
|
|
|
3902
3586
|
})))))));
|
|
3903
3587
|
};
|
|
3904
3588
|
|
|
3905
|
-
var styles$2 = {
|
|
3906
|
-
tacOutput: {
|
|
3907
|
-
paddingTop: '16px',
|
|
3908
|
-
whiteSpace: 'break-spaces'
|
|
3909
|
-
},
|
|
3910
|
-
tacLine: {
|
|
3911
|
-
backgroundColor: '#FFF',
|
|
3912
|
-
margin: '0',
|
|
3913
|
-
padding: '.1em .1em .1em 0.8em',
|
|
3914
|
-
textIndent: '-0.7em',
|
|
3915
|
-
borderRadius: '3px',
|
|
3916
|
-
'&:hover': {
|
|
3917
|
-
backgroundColor: '#F4F4F4'
|
|
3918
|
-
}
|
|
3919
|
-
}
|
|
3920
|
-
};
|
|
3921
3589
|
var noTAC = 'Missing data: no TAC can be generated'; // Ensure we have enough data to retrieve a TAC
|
|
3922
3590
|
|
|
3923
3591
|
var shouldRetrieveTAC = function shouldRetrieveTAC(product) {
|
|
@@ -3992,29 +3660,391 @@ var useTAC = function useTAC(initialProduct, getTAC) {
|
|
|
3992
3660
|
} else if (isMounted.current) {
|
|
3993
3661
|
setTAC(noTAC);
|
|
3994
3662
|
}
|
|
3995
|
-
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
var delayedQuery = React__default.useCallback(debounce(update, 1000), []);
|
|
3999
|
-
return [TAC, delayedQuery];
|
|
3663
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3664
|
+
|
|
3665
|
+
|
|
3666
|
+
var delayedQuery = React__default.useCallback(debounce(update, 1000), []);
|
|
3667
|
+
return [TAC, delayedQuery];
|
|
3668
|
+
};
|
|
3669
|
+
|
|
3670
|
+
var ProductFormTAC = function ProductFormTAC(_ref) {
|
|
3671
|
+
var tac = _ref.tac;
|
|
3672
|
+
var tacLines = tac.split('\n');
|
|
3673
|
+
var hasTac = tacLines.length && tacLines.toString() !== noTAC;
|
|
3674
|
+
return /*#__PURE__*/React__default.createElement(Typography, {
|
|
3675
|
+
variant: "body2",
|
|
3676
|
+
component: "div",
|
|
3677
|
+
sx: {
|
|
3678
|
+
paddingTop: '16px',
|
|
3679
|
+
whiteSpace: 'break-spaces'
|
|
3680
|
+
},
|
|
3681
|
+
"data-testid": "productform-tac-message"
|
|
3682
|
+
}, tacLines.map(function (line) {
|
|
3683
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
3684
|
+
component: "p",
|
|
3685
|
+
key: line,
|
|
3686
|
+
sx: {
|
|
3687
|
+
margin: 0,
|
|
3688
|
+
fontSize: hasTac ? '1.125rem' : '1rem',
|
|
3689
|
+
fontWeight: 'normal',
|
|
3690
|
+
fontStretch: 'normal',
|
|
3691
|
+
fontStyle: 'normal',
|
|
3692
|
+
lineHeight: 1.56,
|
|
3693
|
+
letterSpacing: '0.5px'
|
|
3694
|
+
},
|
|
3695
|
+
"data-testid": "productform-tac-message-line"
|
|
3696
|
+
}, line);
|
|
3697
|
+
}));
|
|
3698
|
+
};
|
|
3699
|
+
|
|
3700
|
+
/* *
|
|
3701
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3702
|
+
* you may not use this file except in compliance with the License.
|
|
3703
|
+
* You may obtain a copy of the License at
|
|
3704
|
+
*
|
|
3705
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3706
|
+
*
|
|
3707
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3708
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3709
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3710
|
+
* See the License for the specific language governing permissions and
|
|
3711
|
+
* limitations under the License.
|
|
3712
|
+
*
|
|
3713
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3714
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3715
|
+
* */
|
|
3716
|
+
|
|
3717
|
+
var IssuedAt = function IssuedAt(_ref) {
|
|
3718
|
+
var date = _ref.date;
|
|
3719
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
3720
|
+
title: "Issued at"
|
|
3721
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3722
|
+
item: true,
|
|
3723
|
+
xs: 12
|
|
3724
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
3725
|
+
variant: "body2",
|
|
3726
|
+
sx: Object.assign(Object.assign({}, styles$2.body), {
|
|
3727
|
+
fontSize: '1rem',
|
|
3728
|
+
color: 'geowebColors.buttons.primary.disabled.color'
|
|
3729
|
+
})
|
|
3730
|
+
}, date)));
|
|
3731
|
+
};
|
|
3732
|
+
|
|
3733
|
+
/* *
|
|
3734
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3735
|
+
* you may not use this file except in compliance with the License.
|
|
3736
|
+
* You may obtain a copy of the License at
|
|
3737
|
+
*
|
|
3738
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3739
|
+
*
|
|
3740
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3741
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3742
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3743
|
+
* See the License for the specific language governing permissions and
|
|
3744
|
+
* limitations under the License.
|
|
3745
|
+
*
|
|
3746
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3747
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3748
|
+
* */
|
|
3749
|
+
|
|
3750
|
+
var Tac = function Tac(_ref) {
|
|
3751
|
+
var tac = _ref.tac,
|
|
3752
|
+
children = _ref.children;
|
|
3753
|
+
return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
|
|
3754
|
+
title: "TAC",
|
|
3755
|
+
sx: {
|
|
3756
|
+
paddingTop: 2
|
|
3757
|
+
}
|
|
3758
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3759
|
+
item: true,
|
|
3760
|
+
xs: 12
|
|
3761
|
+
}, /*#__PURE__*/React__default.createElement(ProductFormTAC, {
|
|
3762
|
+
tac: tac
|
|
3763
|
+
}), children));
|
|
3764
|
+
};
|
|
3765
|
+
|
|
3766
|
+
/* *
|
|
3767
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3768
|
+
* you may not use this file except in compliance with the License.
|
|
3769
|
+
* You may obtain a copy of the License at
|
|
3770
|
+
*
|
|
3771
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3772
|
+
*
|
|
3773
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3774
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3775
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3776
|
+
* See the License for the specific language governing permissions and
|
|
3777
|
+
* limitations under the License.
|
|
3778
|
+
*
|
|
3779
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3780
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
3781
|
+
* */
|
|
3782
|
+
var adagucBaseUrl = 'https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver';
|
|
3783
|
+
var KNMIGeoWebOverlays = {
|
|
3784
|
+
name: 'KNMIGeoWebOverlays',
|
|
3785
|
+
url: "".concat(adagucBaseUrl, "?dataset=OVL"),
|
|
3786
|
+
id: 'knmigeoweboverlays'
|
|
3787
|
+
};
|
|
3788
|
+
var northSeaPlatforms = {
|
|
3789
|
+
service: KNMIGeoWebOverlays.url,
|
|
3790
|
+
name: 'northseastations',
|
|
3791
|
+
format: 'image/png',
|
|
3792
|
+
layerType: mapTypes.LayerType.overLayer,
|
|
3793
|
+
enabled: true
|
|
3794
|
+
};
|
|
3795
|
+
var majorAirportsEHAA = {
|
|
3796
|
+
service: KNMIGeoWebOverlays.url,
|
|
3797
|
+
name: 'airports',
|
|
3798
|
+
format: 'image/png',
|
|
3799
|
+
layerType: mapTypes.LayerType.overLayer,
|
|
3800
|
+
enabled: true
|
|
3801
|
+
};
|
|
3802
|
+
|
|
3803
|
+
/* *
|
|
3804
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3805
|
+
* you may not use this file except in compliance with the License.
|
|
3806
|
+
* You may obtain a copy of the License at
|
|
3807
|
+
*
|
|
3808
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3809
|
+
*
|
|
3810
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3811
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3812
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3813
|
+
* See the License for the specific language governing permissions and
|
|
3814
|
+
* limitations under the License.
|
|
3815
|
+
*
|
|
3816
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3817
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
3818
|
+
* */
|
|
3819
|
+
var allowOneGeoJSONFeature = function allowOneGeoJSONFeature(mode, geojson) {
|
|
3820
|
+
switch (mode) {
|
|
3821
|
+
case MapDrawMode.BOX:
|
|
3822
|
+
case MapDrawMode.POLYGON:
|
|
3823
|
+
return geojson.features[0].geometry.coordinates.length > 1 ? produce(geojson, function (draft) {
|
|
3824
|
+
draft.features[0].geometry.coordinates = [draft.features[0].geometry.coordinates[1]];
|
|
3825
|
+
}) : geojson;
|
|
3826
|
+
|
|
3827
|
+
default:
|
|
3828
|
+
return geojson;
|
|
3829
|
+
}
|
|
3830
|
+
};
|
|
3831
|
+
|
|
3832
|
+
var MapViewGeoJson = function MapViewGeoJson(_ref) {
|
|
3833
|
+
var geoJSONs = _ref.geoJSONs,
|
|
3834
|
+
_ref$setLayerGeoJSONs = _ref.setLayerGeoJSONs,
|
|
3835
|
+
setLayerGeoJSONs = _ref$setLayerGeoJSONs === void 0 ? function () {} : _ref$setLayerGeoJSONs,
|
|
3836
|
+
_ref$layerDrawModes = _ref.layerDrawModes,
|
|
3837
|
+
layerDrawModes = _ref$layerDrawModes === void 0 ? {
|
|
3838
|
+
start: null,
|
|
3839
|
+
end: null
|
|
3840
|
+
} : _ref$layerDrawModes,
|
|
3841
|
+
_ref$drawMode = _ref.drawMode,
|
|
3842
|
+
drawMode = _ref$drawMode === void 0 ? {
|
|
3843
|
+
start: null,
|
|
3844
|
+
end: null
|
|
3845
|
+
} : _ref$drawMode,
|
|
3846
|
+
_ref$setDrawMode = _ref.setDrawMode,
|
|
3847
|
+
setDrawMode = _ref$setDrawMode === void 0 ? function () {} : _ref$setDrawMode,
|
|
3848
|
+
_ref$exitDrawModeCall = _ref.exitDrawModeCallbackStart,
|
|
3849
|
+
exitDrawModeCallbackStart = _ref$exitDrawModeCall === void 0 ? function () {} : _ref$exitDrawModeCall,
|
|
3850
|
+
_ref$exitDrawModeCall2 = _ref.exitDrawModeCallbackEnd,
|
|
3851
|
+
exitDrawModeCallbackEnd = _ref$exitDrawModeCall2 === void 0 ? function () {} : _ref$exitDrawModeCall2;
|
|
3852
|
+
var dispatch = useDispatch();
|
|
3853
|
+
var firstMap = useSelector(function (store) {
|
|
3854
|
+
return mapSelectors.getFirstMap(store);
|
|
3855
|
+
}, shallowEqual);
|
|
3856
|
+
var firstMapId = firstMap && firstMap.id ? firstMap.id : null;
|
|
3857
|
+
var mapLayers = useSelector(function (store) {
|
|
3858
|
+
return mapSelectors.getMapLayers(store, firstMapId);
|
|
3859
|
+
}, shallowEqual);
|
|
3860
|
+
var mapDimensions = useSelector(function (store) {
|
|
3861
|
+
return mapSelectors.getMapDimensions(store, firstMapId);
|
|
3862
|
+
}, shallowEqual);
|
|
3863
|
+
var mapId = React.useRef("sigmet-".concat(generateMapId())).current;
|
|
3864
|
+
var timesliderId = React.useRef("sigmet-".concat(generateTimesliderId())).current;
|
|
3865
|
+
var syncGroupAddGroup = React.useCallback(function (payload) {
|
|
3866
|
+
dispatch(SyncGroups.actions.syncGroupAddGroup(payload));
|
|
3867
|
+
}, [dispatch]);
|
|
3868
|
+
var syncGroupAddTarget = React.useCallback(function (payload) {
|
|
3869
|
+
dispatch(SyncGroups.actions.syncGroupAddTarget(payload));
|
|
3870
|
+
}, [dispatch]);
|
|
3871
|
+
React.useEffect(function () {
|
|
3872
|
+
if (mapLayers && mapLayers.length) {
|
|
3873
|
+
// use maplayers, but change layerId and current mapId
|
|
3874
|
+
var layers = mapLayers.map(function (layer) {
|
|
3875
|
+
return Object.assign(Object.assign({}, layer), {
|
|
3876
|
+
id: generateLayerId(),
|
|
3877
|
+
mapId: mapId
|
|
3878
|
+
});
|
|
3879
|
+
});
|
|
3880
|
+
dispatch(mapActions.setLayers({
|
|
3881
|
+
mapId: mapId,
|
|
3882
|
+
layers: layers
|
|
3883
|
+
}));
|
|
3884
|
+
}
|
|
3885
|
+
|
|
3886
|
+
if (mapDimensions && mapDimensions.length) {
|
|
3887
|
+
dispatch(mapActions.mapChangeDimension({
|
|
3888
|
+
mapId: mapId,
|
|
3889
|
+
dimension: mapDimensions[0],
|
|
3890
|
+
origin: 'MapViewGeoJson'
|
|
3891
|
+
}));
|
|
3892
|
+
}
|
|
3893
|
+
|
|
3894
|
+
dispatch(mapActions.setBaseLayers({
|
|
3895
|
+
mapId: mapId,
|
|
3896
|
+
layers: [Object.assign(Object.assign({}, publicLayers.baseLayerGrey), {
|
|
3897
|
+
id: "baselayer-".concat(mapId)
|
|
3898
|
+
}), Object.assign(Object.assign({}, publicLayers.overLayer), {
|
|
3899
|
+
id: "countryborders-".concat(mapId)
|
|
3900
|
+
}), Object.assign(Object.assign({}, northSeaPlatforms), {
|
|
3901
|
+
id: "northseaplatforms-".concat(mapId)
|
|
3902
|
+
}), Object.assign(Object.assign({}, majorAirportsEHAA), {
|
|
3903
|
+
id: "majorairportsehaa-".concat(mapId)
|
|
3904
|
+
})]
|
|
3905
|
+
}));
|
|
3906
|
+
dispatch(mapActions.setBbox({
|
|
3907
|
+
mapId: mapId,
|
|
3908
|
+
bbox: srsAndBboxDefault.bbox,
|
|
3909
|
+
srs: srsAndBboxDefault.srs
|
|
3910
|
+
}));
|
|
3911
|
+
syncGroupAddGroup({
|
|
3912
|
+
groupId: 'Time_SigmetAirmet',
|
|
3913
|
+
title: 'Group 1 for sigmet/airmet map',
|
|
3914
|
+
type: SyncGroups.constants.SYNCGROUPS_TYPE_SETTIME
|
|
3915
|
+
});
|
|
3916
|
+
syncGroupAddTarget({
|
|
3917
|
+
groupId: 'Time_SigmetAirmet',
|
|
3918
|
+
targetId: mapId
|
|
3919
|
+
});
|
|
3920
|
+
syncGroupAddTarget({
|
|
3921
|
+
groupId: 'Time_SigmetAirmet',
|
|
3922
|
+
targetId: timesliderId
|
|
3923
|
+
}); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3924
|
+
}, []);
|
|
3925
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3926
|
+
style: {
|
|
3927
|
+
position: 'relative',
|
|
3928
|
+
height: '100%'
|
|
3929
|
+
},
|
|
3930
|
+
"data-testid": "MapView"
|
|
3931
|
+
}, /*#__PURE__*/React.createElement(MapControls, null, /*#__PURE__*/React.createElement(LayerManagerMapButtonConnect, {
|
|
3932
|
+
source: "module",
|
|
3933
|
+
mapId: mapId
|
|
3934
|
+
}), /*#__PURE__*/React.createElement(LegendMapButtonConnect, {
|
|
3935
|
+
source: "module",
|
|
3936
|
+
mapId: mapId
|
|
3937
|
+
}), /*#__PURE__*/React.createElement(MultiDimensionSelectMapButtonsConnect, {
|
|
3938
|
+
source: "module",
|
|
3939
|
+
mapId: mapId
|
|
3940
|
+
})), /*#__PURE__*/React.createElement(MapViewConnect, {
|
|
3941
|
+
mapId: mapId
|
|
3942
|
+
}, /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
3943
|
+
id: "geojsonlayer-fir-".concat(mapId),
|
|
3944
|
+
isInEditMode: false,
|
|
3945
|
+
geojson: geoJSONs.fir
|
|
3946
|
+
}), /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
3947
|
+
id: "geojsonlayer-end-".concat(mapId),
|
|
3948
|
+
isInEditMode: drawMode.end !== null && layerDrawModes.end !== null,
|
|
3949
|
+
geojson: geoJSONs.end,
|
|
3950
|
+
drawMode: layerDrawModes.end,
|
|
3951
|
+
updateGeojson: function updateGeojson(geojson) {
|
|
3952
|
+
var end = allowOneGeoJSONFeature(layerDrawModes.end, geojson);
|
|
3953
|
+
setLayerGeoJSONs(Object.assign(Object.assign({}, geoJSONs), {
|
|
3954
|
+
end: end
|
|
3955
|
+
}));
|
|
3956
|
+
},
|
|
3957
|
+
exitDrawModeCallback: function exitDrawModeCallback() {
|
|
3958
|
+
setDrawMode({
|
|
3959
|
+
start: null,
|
|
3960
|
+
end: null
|
|
3961
|
+
});
|
|
3962
|
+
exitDrawModeCallbackEnd();
|
|
3963
|
+
},
|
|
3964
|
+
featureNrToEdit: 0
|
|
3965
|
+
}), /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
3966
|
+
id: "geojsonlayer-start-".concat(mapId),
|
|
3967
|
+
isInEditMode: drawMode.start !== null && layerDrawModes.start !== null,
|
|
3968
|
+
geojson: geoJSONs.start,
|
|
3969
|
+
drawMode: layerDrawModes.start,
|
|
3970
|
+
updateGeojson: function updateGeojson(geojson) {
|
|
3971
|
+
var start = allowOneGeoJSONFeature(layerDrawModes.start, geojson);
|
|
3972
|
+
setLayerGeoJSONs(Object.assign(Object.assign({}, geoJSONs), {
|
|
3973
|
+
start: start
|
|
3974
|
+
}));
|
|
3975
|
+
},
|
|
3976
|
+
exitDrawModeCallback: function exitDrawModeCallback() {
|
|
3977
|
+
setDrawMode({
|
|
3978
|
+
start: null,
|
|
3979
|
+
end: null
|
|
3980
|
+
});
|
|
3981
|
+
exitDrawModeCallbackStart();
|
|
3982
|
+
},
|
|
3983
|
+
featureNrToEdit: 0
|
|
3984
|
+
}), /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
3985
|
+
id: "geojsonlayer-intersection-end-".concat(mapId),
|
|
3986
|
+
isInEditMode: false,
|
|
3987
|
+
geojson: geoJSONs.intersectionEnd
|
|
3988
|
+
}), /*#__PURE__*/React.createElement(MapViewLayer, {
|
|
3989
|
+
id: "geojsonlayer-intersection-start-".concat(mapId),
|
|
3990
|
+
isInEditMode: false,
|
|
3991
|
+
geojson: geoJSONs.intersectionStart
|
|
3992
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
3993
|
+
style: {
|
|
3994
|
+
position: 'absolute',
|
|
3995
|
+
left: '0',
|
|
3996
|
+
bottom: '0',
|
|
3997
|
+
zIndex: 1000,
|
|
3998
|
+
width: '100%'
|
|
3999
|
+
}
|
|
4000
|
+
}, /*#__PURE__*/React.createElement(TimeSliderConnect, {
|
|
4001
|
+
sourceId: timesliderId,
|
|
4002
|
+
mapId: mapId
|
|
4003
|
+
})), /*#__PURE__*/React.createElement(LegendConnect, {
|
|
4004
|
+
showMapId: true,
|
|
4005
|
+
mapId: mapId
|
|
4006
|
+
}));
|
|
4000
4007
|
};
|
|
4001
4008
|
|
|
4002
|
-
var
|
|
4003
|
-
var
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4009
|
+
var ProductFormLayout = function ProductFormLayout(_a) {
|
|
4010
|
+
var children = _a.children,
|
|
4011
|
+
geojsonProps = __rest(_a, ["children"]);
|
|
4012
|
+
|
|
4013
|
+
var theme = useTheme();
|
|
4014
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
4015
|
+
container: true,
|
|
4016
|
+
sx: _defineProperty({
|
|
4017
|
+
height: '100%',
|
|
4018
|
+
overflowY: 'auto'
|
|
4019
|
+
}, theme.breakpoints.up('sm'), {
|
|
4020
|
+
overflowY: 'hidden'
|
|
4021
|
+
})
|
|
4022
|
+
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4023
|
+
item: true,
|
|
4024
|
+
xs: 12,
|
|
4025
|
+
sm: 6,
|
|
4026
|
+
lg: 8,
|
|
4027
|
+
sx: _defineProperty({
|
|
4028
|
+
height: 400,
|
|
4029
|
+
padding: 2
|
|
4030
|
+
}, theme.breakpoints.up('sm'), {
|
|
4031
|
+
height: '100%',
|
|
4032
|
+
padding: 0
|
|
4033
|
+
})
|
|
4034
|
+
}, /*#__PURE__*/React__default.createElement(MapViewGeoJson, Object.assign({}, geojsonProps))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4035
|
+
item: true,
|
|
4036
|
+
xs: 12,
|
|
4037
|
+
sm: 6,
|
|
4038
|
+
lg: 4,
|
|
4039
|
+
sx: _defineProperty({
|
|
4040
|
+
paddingTop: 5,
|
|
4041
|
+
paddingBottom: 5,
|
|
4042
|
+
paddingRight: 2
|
|
4043
|
+
}, theme.breakpoints.up('sm'), {
|
|
4044
|
+
overflowY: 'auto',
|
|
4045
|
+
height: '100%'
|
|
4046
|
+
})
|
|
4047
|
+
}, children));
|
|
4018
4048
|
};
|
|
4019
4049
|
|
|
4020
4050
|
var SigmetForm = function SigmetForm(_ref) {
|
|
@@ -4117,10 +4147,10 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4117
4147
|
}, [drawMode.start, drawMode.end, isReadOnly, isDisabled]);
|
|
4118
4148
|
|
|
4119
4149
|
var renderForm = function renderForm() {
|
|
4120
|
-
return /*#__PURE__*/React__default.createElement(
|
|
4150
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
4121
4151
|
container: true,
|
|
4122
4152
|
direction: "column",
|
|
4123
|
-
spacing:
|
|
4153
|
+
spacing: 5
|
|
4124
4154
|
}, !isCancelSigmet && /*#__PURE__*/React__default.createElement(Phenomenon, {
|
|
4125
4155
|
productType: "sigmet",
|
|
4126
4156
|
isDisabled: isDisabled,
|
|
@@ -4145,7 +4175,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4145
4175
|
productType: "sigmet",
|
|
4146
4176
|
isDisabled: isDisabled,
|
|
4147
4177
|
onChange: onChangeForm
|
|
4148
|
-
})
|
|
4178
|
+
}), /*#__PURE__*/React__default.createElement(SelectFIR, {
|
|
4149
4179
|
productType: "sigmet",
|
|
4150
4180
|
isDisabled: isDisabled
|
|
4151
4181
|
}), /*#__PURE__*/React__default.createElement(StartGeometry, {
|
|
@@ -4173,74 +4203,18 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4173
4203
|
}), !isCancelSigmet && /*#__PURE__*/React__default.createElement(Change, {
|
|
4174
4204
|
isDisabled: isDisabled,
|
|
4175
4205
|
isReadOnly: isReadOnly
|
|
4176
|
-
}), isCancelSigmet && watch('vaSigmetMoveToFIR') && /*#__PURE__*/React__default.createElement(Grid, {
|
|
4177
|
-
item: true,
|
|
4178
|
-
container: true,
|
|
4179
|
-
spacing: 2
|
|
4180
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4181
|
-
item: true,
|
|
4182
|
-
xs: 4,
|
|
4183
|
-
container: true,
|
|
4184
|
-
justifyContent: "flex-end"
|
|
4185
|
-
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4186
|
-
item: true,
|
|
4187
|
-
xs: 8,
|
|
4188
|
-
container: true,
|
|
4189
|
-
justifyContent: "flex-start"
|
|
4190
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4206
|
+
}), isCancelSigmet && watch('vaSigmetMoveToFIR') && /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4191
4207
|
item: true,
|
|
4192
4208
|
xs: 12
|
|
4193
4209
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4194
4210
|
variant: "body2",
|
|
4195
|
-
sx: styles$
|
|
4211
|
+
sx: styles$2.body,
|
|
4196
4212
|
"data-testid": "vaSigmetMoveToFIR"
|
|
4197
|
-
}, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default.createElement("b", null, " ", watch('vaSigmetMoveToFIR')))))
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
spacing: 2,
|
|
4201
|
-
sx: styles$4.containerItem
|
|
4202
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4203
|
-
item: true,
|
|
4204
|
-
xs: 4,
|
|
4205
|
-
container: true,
|
|
4206
|
-
justifyContent: "flex-end"
|
|
4207
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4208
|
-
variant: "subtitle1",
|
|
4209
|
-
sx: styles$4.label
|
|
4210
|
-
}, "Issued at")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4211
|
-
item: true,
|
|
4212
|
-
xs: 8,
|
|
4213
|
-
container: true,
|
|
4214
|
-
justifyContent: "flex-start"
|
|
4215
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4216
|
-
item: true,
|
|
4217
|
-
xs: 12
|
|
4218
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4219
|
-
variant: "body2",
|
|
4220
|
-
sx: styles$4.body
|
|
4221
|
-
}, getProductIssueDate(initialSigmet, initialCancelSigmet)))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4222
|
-
item: true,
|
|
4223
|
-
container: true,
|
|
4224
|
-
spacing: 2
|
|
4225
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4226
|
-
item: true,
|
|
4227
|
-
xs: 4,
|
|
4228
|
-
container: true,
|
|
4229
|
-
justifyContent: "flex-end"
|
|
4230
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4231
|
-
variant: "subtitle1",
|
|
4232
|
-
sx: styles$4.label
|
|
4233
|
-
}, "TAC")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4234
|
-
item: true,
|
|
4235
|
-
xs: 8,
|
|
4236
|
-
container: true,
|
|
4237
|
-
justifyContent: "flex-start"
|
|
4238
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4239
|
-
item: true,
|
|
4240
|
-
xs: 12
|
|
4241
|
-
}, /*#__PURE__*/React__default.createElement(ProductFormTAC, {
|
|
4213
|
+
}, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default.createElement("b", null, " ", watch('vaSigmetMoveToFIR'))))), /*#__PURE__*/React__default.createElement(IssuedAt, {
|
|
4214
|
+
date: getProductIssueDate(initialSigmet, initialCancelSigmet)
|
|
4215
|
+
}), /*#__PURE__*/React__default.createElement(Tac, {
|
|
4242
4216
|
tac: tac
|
|
4243
|
-
}
|
|
4217
|
+
}, /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4244
4218
|
name: "sequence",
|
|
4245
4219
|
defaultValue: "-1"
|
|
4246
4220
|
}),
|
|
@@ -4269,15 +4243,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4269
4243
|
style: {
|
|
4270
4244
|
width: '100%'
|
|
4271
4245
|
}
|
|
4272
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
4273
|
-
container: true,
|
|
4274
|
-
style: {
|
|
4275
|
-
height: '100%'
|
|
4276
|
-
}
|
|
4277
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4278
|
-
item: true,
|
|
4279
|
-
xs: 8
|
|
4280
|
-
}, /*#__PURE__*/React__default.createElement(MapViewGeoJson, {
|
|
4246
|
+
}, /*#__PURE__*/React__default.createElement(ProductFormLayout, {
|
|
4281
4247
|
geoJSONs: geoJSONs,
|
|
4282
4248
|
setLayerGeoJSONs: function setLayerGeoJSONs(geoJSONs) {
|
|
4283
4249
|
return _setLayerGeoJSONs(createInterSections(geoJSONs));
|
|
@@ -4287,11 +4253,7 @@ var SigmetForm = function SigmetForm(_ref) {
|
|
|
4287
4253
|
setDrawMode: setDrawMode,
|
|
4288
4254
|
exitDrawModeCallbackStart: updateStartDrawing,
|
|
4289
4255
|
exitDrawModeCallbackEnd: updateEndDrawing
|
|
4290
|
-
}
|
|
4291
|
-
item: true,
|
|
4292
|
-
xs: 4,
|
|
4293
|
-
sx: styles$4.productForm
|
|
4294
|
-
}, renderForm())));
|
|
4256
|
+
}, renderForm()));
|
|
4295
4257
|
};
|
|
4296
4258
|
|
|
4297
4259
|
var AirmetForm = function AirmetForm(_ref) {
|
|
@@ -4374,10 +4336,10 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4374
4336
|
}, [drawMode.start, isReadOnly, isDisabled]);
|
|
4375
4337
|
|
|
4376
4338
|
var renderForm = function renderForm() {
|
|
4377
|
-
return /*#__PURE__*/React__default.createElement(
|
|
4339
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
4378
4340
|
container: true,
|
|
4379
4341
|
direction: "column",
|
|
4380
|
-
spacing:
|
|
4342
|
+
spacing: 6
|
|
4381
4343
|
}, !isCancelAirmet && /*#__PURE__*/React__default.createElement(Phenomenon, {
|
|
4382
4344
|
productType: "airmet",
|
|
4383
4345
|
isDisabled: isDisabled,
|
|
@@ -4404,7 +4366,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4404
4366
|
productType: "airmet",
|
|
4405
4367
|
isDisabled: isDisabled,
|
|
4406
4368
|
onChange: onChangeForm
|
|
4407
|
-
})
|
|
4369
|
+
}), /*#__PURE__*/React__default.createElement(SelectFIR, {
|
|
4408
4370
|
productType: "airmet",
|
|
4409
4371
|
isDisabled: isDisabled
|
|
4410
4372
|
}), /*#__PURE__*/React__default.createElement(StartGeometry, {
|
|
@@ -4431,53 +4393,11 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4431
4393
|
}), !isCancelAirmet && /*#__PURE__*/React__default.createElement(Change, {
|
|
4432
4394
|
isDisabled: isDisabled,
|
|
4433
4395
|
isReadOnly: isReadOnly
|
|
4434
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
spacing: 2,
|
|
4438
|
-
sx: styles$4.containerItem
|
|
4439
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4440
|
-
item: true,
|
|
4441
|
-
xs: 4,
|
|
4442
|
-
container: true,
|
|
4443
|
-
justifyContent: "flex-end"
|
|
4444
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4445
|
-
variant: "subtitle1",
|
|
4446
|
-
sx: styles$4.label
|
|
4447
|
-
}, "Issued at")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4448
|
-
item: true,
|
|
4449
|
-
xs: 8,
|
|
4450
|
-
container: true,
|
|
4451
|
-
justifyContent: "flex-start"
|
|
4452
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4453
|
-
item: true,
|
|
4454
|
-
xs: 12
|
|
4455
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4456
|
-
variant: "body2",
|
|
4457
|
-
sx: styles$4.body
|
|
4458
|
-
}, getProductIssueDate(initialAirmet, initialCancelAirmet)))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4459
|
-
item: true,
|
|
4460
|
-
container: true,
|
|
4461
|
-
spacing: 2
|
|
4462
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4463
|
-
item: true,
|
|
4464
|
-
xs: 4,
|
|
4465
|
-
container: true,
|
|
4466
|
-
justifyContent: "flex-end"
|
|
4467
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4468
|
-
variant: "subtitle1",
|
|
4469
|
-
sx: styles$4.label
|
|
4470
|
-
}, "TAC")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4471
|
-
item: true,
|
|
4472
|
-
xs: 8,
|
|
4473
|
-
container: true,
|
|
4474
|
-
justifyContent: "flex-start"
|
|
4475
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4476
|
-
item: true,
|
|
4477
|
-
xs: 12
|
|
4478
|
-
}, /*#__PURE__*/React__default.createElement(ProductFormTAC, {
|
|
4396
|
+
}), /*#__PURE__*/React__default.createElement(IssuedAt, {
|
|
4397
|
+
date: getProductIssueDate(initialAirmet, initialCancelAirmet)
|
|
4398
|
+
}), /*#__PURE__*/React__default.createElement(Tac, {
|
|
4479
4399
|
tac: tac
|
|
4480
|
-
}
|
|
4400
|
+
}, /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
|
|
4481
4401
|
name: "sequence",
|
|
4482
4402
|
defaultValue: "-1"
|
|
4483
4403
|
}),
|
|
@@ -4506,15 +4426,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4506
4426
|
style: {
|
|
4507
4427
|
width: '100%'
|
|
4508
4428
|
}
|
|
4509
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
4510
|
-
container: true,
|
|
4511
|
-
style: {
|
|
4512
|
-
height: '100%'
|
|
4513
|
-
}
|
|
4514
|
-
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4515
|
-
item: true,
|
|
4516
|
-
xs: 8
|
|
4517
|
-
}, /*#__PURE__*/React__default.createElement(MapViewGeoJson, {
|
|
4429
|
+
}, /*#__PURE__*/React__default.createElement(ProductFormLayout, {
|
|
4518
4430
|
geoJSONs: geoJSONs,
|
|
4519
4431
|
setLayerGeoJSONs: function setLayerGeoJSONs(geoJSONs) {
|
|
4520
4432
|
return _setLayerGeoJSONs(createInterSections(geoJSONs));
|
|
@@ -4523,32 +4435,7 @@ var AirmetForm = function AirmetForm(_ref) {
|
|
|
4523
4435
|
drawMode: drawMode,
|
|
4524
4436
|
setDrawMode: setDrawMode,
|
|
4525
4437
|
exitDrawModeCallbackStart: updateStartDrawing
|
|
4526
|
-
}
|
|
4527
|
-
item: true,
|
|
4528
|
-
xs: 4,
|
|
4529
|
-
sx: styles$4.productForm
|
|
4530
|
-
}, renderForm())));
|
|
4531
|
-
};
|
|
4532
|
-
|
|
4533
|
-
var styles$1 = {
|
|
4534
|
-
dialogHeader: {
|
|
4535
|
-
boxShadow: '0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
|
|
4536
|
-
zIndex: 1,
|
|
4537
|
-
padding: '4px 20px'
|
|
4538
|
-
},
|
|
4539
|
-
dialogTitle: {
|
|
4540
|
-
display: 'flex',
|
|
4541
|
-
justifyContent: 'center',
|
|
4542
|
-
textAlign: 'center'
|
|
4543
|
-
},
|
|
4544
|
-
dialogChildren: {
|
|
4545
|
-
display: 'flex',
|
|
4546
|
-
padding: '20px',
|
|
4547
|
-
minHeight: 200,
|
|
4548
|
-
minWidth: 400,
|
|
4549
|
-
height: '100%',
|
|
4550
|
-
paddingTop: '20px!important'
|
|
4551
|
-
}
|
|
4438
|
+
}, renderForm()));
|
|
4552
4439
|
};
|
|
4553
4440
|
|
|
4554
4441
|
var ContentDialog = function ContentDialog(_a) {
|
|
@@ -4562,6 +4449,8 @@ var ContentDialog = function ContentDialog(_a) {
|
|
|
4562
4449
|
alertBanner = _a$alertBanner === void 0 ? null : _a$alertBanner,
|
|
4563
4450
|
other = __rest(_a, ["open", "toggleDialogStatus", "title", "children", "options", "onClose", "alertBanner"]);
|
|
4564
4451
|
|
|
4452
|
+
var theme = useTheme();
|
|
4453
|
+
|
|
4565
4454
|
var handleClose = function handleClose() {
|
|
4566
4455
|
if (onClose) {
|
|
4567
4456
|
onClose();
|
|
@@ -4575,53 +4464,77 @@ var ContentDialog = function ContentDialog(_a) {
|
|
|
4575
4464
|
open: open,
|
|
4576
4465
|
onClose: handleClose,
|
|
4577
4466
|
maxWidth: other.maxWidth ? other.maxWidth : 'lg'
|
|
4578
|
-
}, other
|
|
4579
|
-
sx:
|
|
4467
|
+
}, other, {
|
|
4468
|
+
sx: {
|
|
4469
|
+
' .MuiPaper-root': {
|
|
4470
|
+
minWidth: 300
|
|
4471
|
+
}
|
|
4472
|
+
}
|
|
4473
|
+
}), /*#__PURE__*/React.createElement(DialogTitle, {
|
|
4474
|
+
sx: _defineProperty({
|
|
4475
|
+
boxShadow: 1,
|
|
4476
|
+
zIndex: 1,
|
|
4477
|
+
padding: 0,
|
|
4478
|
+
height: 48,
|
|
4479
|
+
display: 'flex',
|
|
4480
|
+
paddingLeft: 2,
|
|
4481
|
+
paddingRight: 2
|
|
4482
|
+
}, theme.breakpoints.up('sm'), {
|
|
4483
|
+
paddingLeft: 3,
|
|
4484
|
+
paddingRight: 3
|
|
4485
|
+
}),
|
|
4486
|
+
component: "div"
|
|
4580
4487
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
4581
4488
|
container: true,
|
|
4582
4489
|
alignItems: "center"
|
|
4583
4490
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
4584
4491
|
item: true,
|
|
4585
|
-
xs:
|
|
4492
|
+
xs: 4
|
|
4586
4493
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
4587
4494
|
onClick: handleClose,
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4495
|
+
variant: "flat",
|
|
4496
|
+
startIcon: /*#__PURE__*/React.createElement(ChevronLeft, null),
|
|
4497
|
+
"data-testid": "contentdialog-close",
|
|
4498
|
+
sx: _defineProperty({}, theme.breakpoints.down('md'), {
|
|
4499
|
+
textIndent: -999999,
|
|
4500
|
+
width: 24,
|
|
4501
|
+
minWidth: 24,
|
|
4502
|
+
height: 24,
|
|
4503
|
+
' .MuiSvgIcon-root': {
|
|
4504
|
+
marginRight: 0
|
|
4505
|
+
}
|
|
4506
|
+
})
|
|
4507
|
+
}, "BACK")), /*#__PURE__*/React.createElement(Grid, {
|
|
4598
4508
|
item: true,
|
|
4599
|
-
xs:
|
|
4600
|
-
sx:
|
|
4509
|
+
xs: 4,
|
|
4510
|
+
sx: {
|
|
4511
|
+
display: 'flex',
|
|
4512
|
+
justifyContent: 'center',
|
|
4513
|
+
textAlign: 'center'
|
|
4514
|
+
}
|
|
4601
4515
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
4602
4516
|
"data-testid": "dialogTitle",
|
|
4603
|
-
variant: "h6"
|
|
4517
|
+
variant: "h6",
|
|
4518
|
+
sx: {
|
|
4519
|
+
fontSize: '1.0rem',
|
|
4520
|
+
textOverflow: 'ellipsis',
|
|
4521
|
+
overflow: 'hidden',
|
|
4522
|
+
whiteSpace: 'nowrap'
|
|
4523
|
+
}
|
|
4604
4524
|
}, title)), /*#__PURE__*/React.createElement(Grid, {
|
|
4605
4525
|
item: true,
|
|
4606
|
-
xs:
|
|
4607
|
-
}, /*#__PURE__*/React.createElement(
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4526
|
+
xs: 4
|
|
4527
|
+
}, options))), alertBanner !== null && alertBanner, /*#__PURE__*/React.createElement(DialogContent, {
|
|
4528
|
+
sx: {
|
|
4529
|
+
display: 'flex',
|
|
4530
|
+
padding: 0,
|
|
4531
|
+
minHeight: 200,
|
|
4532
|
+
height: '100%'
|
|
4533
|
+
}
|
|
4611
4534
|
}, children));
|
|
4612
4535
|
};
|
|
4613
4536
|
|
|
4614
4537
|
var styles = {
|
|
4615
|
-
cardWrapper: {
|
|
4616
|
-
width: '100%'
|
|
4617
|
-
},
|
|
4618
|
-
cardContent: {
|
|
4619
|
-
width: '100%',
|
|
4620
|
-
padding: '14px',
|
|
4621
|
-
'&:last-child': {
|
|
4622
|
-
paddingBottom: '14px'
|
|
4623
|
-
}
|
|
4624
|
-
},
|
|
4625
4538
|
activeStatus: {
|
|
4626
4539
|
color: '#72bb23',
|
|
4627
4540
|
paddingLeft: '6px',
|
|
@@ -4673,7 +4586,10 @@ var getStatusTagList = function getStatusTagList(product) {
|
|
|
4673
4586
|
|
|
4674
4587
|
return /*#__PURE__*/React__default.createElement(StatusTag, {
|
|
4675
4588
|
content: product.status.toLowerCase(),
|
|
4676
|
-
color: product.status === 'PUBLISHED' ? 'green' : 'grey'
|
|
4589
|
+
color: product.status === 'PUBLISHED' ? 'green' : 'grey',
|
|
4590
|
+
sx: {
|
|
4591
|
+
marginRight: '0!important'
|
|
4592
|
+
}
|
|
4677
4593
|
});
|
|
4678
4594
|
};
|
|
4679
4595
|
|
|
@@ -4701,9 +4617,19 @@ var formatValidTime = function formatValidTime(startDate, endDate, format) {
|
|
|
4701
4617
|
return "".concat(moment.utc(startDate).format('DD MMM YYYY, HH:mm'), " - ").concat(moment.utc(endDate).format(format), " UTC");
|
|
4702
4618
|
};
|
|
4703
4619
|
|
|
4704
|
-
var
|
|
4705
|
-
var
|
|
4706
|
-
|
|
4620
|
+
var ProductListRowHeader = function ProductListRowHeader(_ref) {
|
|
4621
|
+
var title = _ref.title;
|
|
4622
|
+
return /*#__PURE__*/React__default.createElement(Typography, {
|
|
4623
|
+
sx: {
|
|
4624
|
+
color: 'geowebColors.textInputField.label.rgba',
|
|
4625
|
+
fontSize: '0.75rem'
|
|
4626
|
+
}
|
|
4627
|
+
}, title);
|
|
4628
|
+
};
|
|
4629
|
+
|
|
4630
|
+
var ProductListRow = function ProductListRow(_ref2) {
|
|
4631
|
+
var product = _ref2.product,
|
|
4632
|
+
productType = _ref2.productType;
|
|
4707
4633
|
|
|
4708
4634
|
var _useApiContext = useApiContext(),
|
|
4709
4635
|
api = _useApiContext.api;
|
|
@@ -4740,80 +4666,119 @@ var ProductListRow = function ProductListRow(_ref) {
|
|
|
4740
4666
|
return /*#__PURE__*/React__default.createElement(Card, {
|
|
4741
4667
|
elevation: 0,
|
|
4742
4668
|
variant: "outlined",
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4669
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4670
|
+
sx: function sx(theme) {
|
|
4671
|
+
return _defineProperty({
|
|
4672
|
+
width: '100%',
|
|
4673
|
+
paddingLeft: 1,
|
|
4674
|
+
paddingRight: 1,
|
|
4675
|
+
paddingTop: 1.5,
|
|
4676
|
+
paddingBottom: 1.5,
|
|
4677
|
+
'&:last-child': {
|
|
4678
|
+
paddingBottom: 1.5
|
|
4679
|
+
}
|
|
4680
|
+
}, theme.breakpoints.up('sm'), {
|
|
4681
|
+
paddingLeft: 4,
|
|
4682
|
+
paddingRight: 4,
|
|
4683
|
+
paddingTop: 2,
|
|
4684
|
+
paddingBottom: 2,
|
|
4685
|
+
'&:last-child': {
|
|
4686
|
+
paddingBottom: 2
|
|
4687
|
+
}
|
|
4688
|
+
});
|
|
4689
|
+
}
|
|
4746
4690
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4747
4691
|
container: true,
|
|
4748
4692
|
alignItems: "center",
|
|
4749
|
-
spacing:
|
|
4750
|
-
}, /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
4751
|
-
title: phenomenon !== null ? getPhenomenon(productType, phenomenon) : '',
|
|
4752
|
-
placement: "bottom-start"
|
|
4693
|
+
spacing: 2
|
|
4753
4694
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
4754
4695
|
item: true,
|
|
4755
4696
|
xs: 3,
|
|
4756
|
-
sm:
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4697
|
+
sm: 1
|
|
4698
|
+
}, phenomenon !== null && /*#__PURE__*/React__default.createElement(ProductListRowHeader, {
|
|
4699
|
+
title: productType.toUpperCase()
|
|
4700
|
+
}), /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
4701
|
+
title: phenomenon !== null ? getPhenomenon(productType, phenomenon) : '',
|
|
4702
|
+
placement: "bottom-start"
|
|
4703
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4761
4704
|
variant: "subtitle2",
|
|
4762
4705
|
noWrap: true,
|
|
4763
4706
|
sx: styles.font
|
|
4764
4707
|
}, phenomenon !== null ? phenomenon : 'Cancel'))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4765
4708
|
item: true,
|
|
4766
|
-
xs:
|
|
4767
|
-
sm:
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
title: /*#__PURE__*/React__default.createElement(
|
|
4709
|
+
xs: 9,
|
|
4710
|
+
sm: 3
|
|
4711
|
+
}, /*#__PURE__*/React__default.createElement(ProductListRowHeader, {
|
|
4712
|
+
title: "Issue time"
|
|
4713
|
+
}), /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
4714
|
+
title: /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ProductListRowHeader, {
|
|
4715
|
+
title: "TAC"
|
|
4716
|
+
}), /*#__PURE__*/React__default.createElement(Typography, {
|
|
4772
4717
|
style: {
|
|
4773
4718
|
whiteSpace: 'pre-line'
|
|
4719
|
+
},
|
|
4720
|
+
variant: "subtitle2",
|
|
4721
|
+
sx: Object.assign(Object.assign({}, styles.font), {
|
|
4722
|
+
color: 'geowebColors.typographyAndIcons.text',
|
|
4723
|
+
fontSize: '1.125rem',
|
|
4724
|
+
fontWeight: 'normal',
|
|
4725
|
+
fontStyle: 'normal',
|
|
4726
|
+
lineHeight: '28px',
|
|
4727
|
+
letterSpacing: '0.5px'
|
|
4728
|
+
})
|
|
4729
|
+
}, TAC)),
|
|
4730
|
+
placement: "bottom-start",
|
|
4731
|
+
componentsProps: {
|
|
4732
|
+
tooltip: {
|
|
4733
|
+
sx: {
|
|
4734
|
+
bgcolor: 'geowebColors.background.surface',
|
|
4735
|
+
boxShadow: 8,
|
|
4736
|
+
'& .MuiTooltip-arrow': {
|
|
4737
|
+
color: 'common.black'
|
|
4738
|
+
},
|
|
4739
|
+
maxWidth: 472
|
|
4740
|
+
}
|
|
4774
4741
|
}
|
|
4775
|
-
}
|
|
4776
|
-
placement: "bottom-start"
|
|
4777
|
-
}, /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(Info, {
|
|
4778
|
-
"data-testid": "productlistrow-tacicon",
|
|
4779
|
-
color: "secondary"
|
|
4780
|
-
})))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4781
|
-
item: true,
|
|
4782
|
-
xs: 9,
|
|
4783
|
-
sm: 10,
|
|
4784
|
-
md: 3,
|
|
4785
|
-
lg: 2
|
|
4742
|
+
}
|
|
4786
4743
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4787
|
-
variant: "overline"
|
|
4788
|
-
}, "Issue time"), /*#__PURE__*/React__default.createElement(Typography, {
|
|
4789
4744
|
variant: "subtitle2",
|
|
4790
4745
|
sx: styles.font,
|
|
4791
4746
|
"data-testid": "issueTime"
|
|
4792
|
-
}, product.issueDate ? "".concat(moment.utc(product.issueDate).format('DD MMM YYYY, HH:mm'), " UTC") : '(Not published)')), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4747
|
+
}, product.issueDate ? "".concat(moment.utc(product.issueDate).format('DD MMM YYYY, HH:mm'), " UTC") : '(Not published)'))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4793
4748
|
item: true,
|
|
4794
4749
|
xs: 12,
|
|
4795
|
-
sm:
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
4799
|
-
variant: "overline"
|
|
4800
|
-
}, "Valid time"), /*#__PURE__*/React__default.createElement(Typography, {
|
|
4750
|
+
sm: 6
|
|
4751
|
+
}, /*#__PURE__*/React__default.createElement(ProductListRowHeader, {
|
|
4752
|
+
title: "Valid time"
|
|
4753
|
+
}), /*#__PURE__*/React__default.createElement(Typography, {
|
|
4801
4754
|
variant: "subtitle2",
|
|
4802
4755
|
sx: styles.font,
|
|
4803
4756
|
"data-testid": "validTime"
|
|
4804
4757
|
}, validTime)), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4805
4758
|
item: true,
|
|
4806
|
-
xs:
|
|
4807
|
-
sm:
|
|
4808
|
-
|
|
4809
|
-
|
|
4759
|
+
xs: 12,
|
|
4760
|
+
sm: 2,
|
|
4761
|
+
container: true,
|
|
4762
|
+
justifyContent: "center",
|
|
4763
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4764
|
+
sx: function sx(theme) {
|
|
4765
|
+
return _defineProperty({}, theme.breakpoints.up('sm'), {
|
|
4766
|
+
justifyContent: 'right',
|
|
4767
|
+
button: {
|
|
4768
|
+
marginRight: 3
|
|
4769
|
+
},
|
|
4770
|
+
' .statusTag': {
|
|
4771
|
+
marginRight: 3
|
|
4772
|
+
}
|
|
4773
|
+
});
|
|
4774
|
+
}
|
|
4810
4775
|
}, product.status === 'DRAFT' ? /*#__PURE__*/React__default.createElement(Button, {
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
}, "
|
|
4776
|
+
sx: {
|
|
4777
|
+
marginTop: '6px'
|
|
4778
|
+
},
|
|
4779
|
+
variant: "flat",
|
|
4780
|
+
startIcon: /*#__PURE__*/React__default.createElement(Edit, null)
|
|
4781
|
+
}, "DRAFT") : getStatusTagList(product, cancelsSeqId), product.status === 'PUBLISHED' && cancelsSeqId === null && getActiveStatus(product))));
|
|
4817
4782
|
};
|
|
4818
4783
|
|
|
4819
4784
|
/* *
|
|
@@ -4849,10 +4814,12 @@ var ProductList = function ProductList(_ref) {
|
|
|
4849
4814
|
item: true,
|
|
4850
4815
|
justifyContent: "flex-end"
|
|
4851
4816
|
}, /*#__PURE__*/React__default.createElement(Button, {
|
|
4852
|
-
variant: "
|
|
4853
|
-
color: "secondary",
|
|
4817
|
+
variant: "primary",
|
|
4854
4818
|
"data-testid": "productListCreateButton",
|
|
4855
|
-
onClick: onClickNewProduct
|
|
4819
|
+
onClick: onClickNewProduct,
|
|
4820
|
+
sx: {
|
|
4821
|
+
textTransform: 'initial'
|
|
4822
|
+
}
|
|
4856
4823
|
}, "Create a new ", productType.toUpperCase())), /*#__PURE__*/React__default.createElement(Grid, {
|
|
4857
4824
|
item: true,
|
|
4858
4825
|
sx: {
|
|
@@ -4864,7 +4831,11 @@ var ProductList = function ProductList(_ref) {
|
|
|
4864
4831
|
title: "An error has occurred while retrieving the list, please try again",
|
|
4865
4832
|
info: error.message ? error.message : '',
|
|
4866
4833
|
dataTestId: "productList-alert"
|
|
4867
|
-
}), productList && /*#__PURE__*/React__default.createElement(List,
|
|
4834
|
+
}), productList && /*#__PURE__*/React__default.createElement(List, {
|
|
4835
|
+
sx: {
|
|
4836
|
+
paddingTop: 4
|
|
4837
|
+
}
|
|
4838
|
+
}, productList.map(function (productListItem, index) {
|
|
4868
4839
|
var product = productListItem[productType];
|
|
4869
4840
|
return /*#__PURE__*/React__default.createElement(ListItem, {
|
|
4870
4841
|
"data-testid": "productListItem",
|
|
@@ -5130,6 +5101,11 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
|
|
|
5130
5101
|
options: getProductFormLifecycleButtons(productCanBe, onProductButtonPress),
|
|
5131
5102
|
style: {
|
|
5132
5103
|
zIndex: 1000
|
|
5104
|
+
},
|
|
5105
|
+
sx: {
|
|
5106
|
+
' .MuiDialogContent-root': {
|
|
5107
|
+
overflowY: 'hidden'
|
|
5108
|
+
}
|
|
5133
5109
|
}
|
|
5134
5110
|
}, productType === 'sigmet' ? /*#__PURE__*/React.createElement(SigmetForm, {
|
|
5135
5111
|
mode: mode,
|