@opengeoweb/sigmet-airmet 4.2.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.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('react-hook-form'), require('@opengeoweb/form-fields'), require('@opengeoweb/api'), require('immer'), require('react-redux'), require('@opengeoweb/core'), require('@turf/turf'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('moment'), require('lodash')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', 'react-hook-form', '@opengeoweb/form-fields', '@opengeoweb/api', 'immer', 'react-redux', '@opengeoweb/core', '@turf/turf', '@opengeoweb/shared', '@opengeoweb/theme', 'moment', 'lodash'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SigmetAirmet = {}, global.React, global.material, global.reactHookForm, global.formFields, global.api, global.produce, global.reactRedux, global.core, global.turf, global.shared, global.theme, global.moment, global.lodash));
5
- })(this, (function (exports, React, material, reactHookForm, formFields, api, produce, reactRedux, core, turf, shared, theme, moment, lodash) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@mui/material'), require('react-hook-form'), require('@opengeoweb/form-fields'), require('@opengeoweb/api'), require('immer'), require('@turf/turf'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('moment'), require('lodash'), require('react-redux'), require('@opengeoweb/core')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', 'react-hook-form', '@opengeoweb/form-fields', '@opengeoweb/api', 'immer', '@turf/turf', '@opengeoweb/shared', '@opengeoweb/theme', 'moment', 'lodash', 'react-redux', '@opengeoweb/core'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SigmetAirmet = {}, global.React, global.material, global.reactHookForm, global.formFields, global.api, global.produce, global.turf, global.shared, global.theme, global.moment, global.lodash, global.reactRedux, global.core));
5
+ })(this, (function (exports, React, material, reactHookForm, formFields, api, produce, turf, shared, theme, moment, lodash, reactRedux, core) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -133,548 +133,6 @@
133
133
  return to.concat(ar || Array.prototype.slice.call(from));
134
134
  }
135
135
 
136
- var srsAndBboxDefault = {
137
- bbox: {
138
- left: -1205884.85699446,
139
- bottom: 5808323.764379622,
140
- right: 2219822.701688853,
141
- top: 8298305.647311475
142
- },
143
- srs: 'EPSG:3857'
144
- };
145
- var featurePropsStart = {
146
- stroke: '#f24a00',
147
- 'stroke-width': 1.5,
148
- 'stroke-opacity': 1,
149
- fill: '#f24a00',
150
- 'fill-opacity': 0.25
151
- };
152
- var featurePropsEnd = {
153
- stroke: '#6e1e91',
154
- 'stroke-width': 1.5,
155
- 'stroke-opacity': 1,
156
- fill: '#6e1e91',
157
- 'fill-opacity': 0.25
158
- };
159
- var featurePropsIntersectionStart = {
160
- stroke: '#f24a00',
161
- 'stroke-width': 1.5,
162
- 'stroke-opacity': 1,
163
- fill: '#f24a00',
164
- 'fill-opacity': 0.5
165
- };
166
- var featurePropsIntersectionEnd = {
167
- stroke: '#6e1e91',
168
- 'stroke-width': 1.5,
169
- 'stroke-opacity': 1,
170
- fill: '#6e1e91',
171
- 'fill-opacity': 0.5
172
- };
173
- var featurePropsFIR = {
174
- stroke: '#0075a9',
175
- 'stroke-width': 1.5,
176
- 'stroke-opacity': 1,
177
- fill: '#0075a9',
178
- 'fill-opacity': 0.0
179
- };
180
- var featurePropsUnStyled = {
181
- stroke: '#FF0000',
182
- 'stroke-width': 10.0,
183
- 'stroke-opacity': 1,
184
- fill: '#0000FF',
185
- 'fill-opacity': 1.0
186
- };
187
- var emptyPolygonGeoJSONStart = {
188
- type: 'FeatureCollection',
189
- features: [{
190
- type: 'Feature',
191
- properties: __assign(__assign({}, featurePropsUnStyled), {
192
- selectionType: 'poly'
193
- }),
194
- geometry: {
195
- type: 'Polygon',
196
- coordinates: [[]]
197
- }
198
- }]
199
- };
200
- var emptyPolygonGeoJSONEnd = {
201
- type: 'FeatureCollection',
202
- features: [{
203
- type: 'Feature',
204
- properties: __assign(__assign({}, featurePropsUnStyled), {
205
- selectionType: 'poly'
206
- }),
207
- geometry: {
208
- type: 'Polygon',
209
- coordinates: [[]]
210
- }
211
- }]
212
- };
213
- var emptyBoxGeoJSONStart = {
214
- type: 'FeatureCollection',
215
- features: [{
216
- type: 'Feature',
217
- properties: __assign({
218
- _adaguctype: 'box',
219
- selectionType: 'box'
220
- }, featurePropsUnStyled),
221
- geometry: {
222
- type: 'Polygon',
223
- coordinates: [[]]
224
- }
225
- }]
226
- };
227
- var emptyBoxGeoJSONEnd = {
228
- type: 'FeatureCollection',
229
- features: [{
230
- type: 'Feature',
231
- properties: __assign({
232
- _adaguctype: 'box',
233
- selectionType: 'box'
234
- }, featurePropsUnStyled),
235
- geometry: {
236
- type: 'Polygon',
237
- coordinates: [[]]
238
- }
239
- }]
240
- };
241
- var emptyPointsGeojsonStart = {
242
- type: 'FeatureCollection',
243
- features: [{
244
- type: 'Feature',
245
- properties: __assign(__assign({}, featurePropsUnStyled), {
246
- selectionType: 'point'
247
- }),
248
- geometry: {
249
- type: 'Point',
250
- coordinates: []
251
- }
252
- }]
253
- };
254
- var emptyPointsGeojsonEnd = {
255
- type: 'FeatureCollection',
256
- features: [{
257
- type: 'Feature',
258
- properties: __assign(__assign({}, featurePropsUnStyled), {
259
- selectionType: 'point'
260
- }),
261
- geometry: {
262
- type: 'Point',
263
- coordinates: []
264
- }
265
- }]
266
- };
267
- var geoJSONTemplate = {
268
- POINT: {
269
- start: emptyPointsGeojsonStart,
270
- end: emptyPointsGeojsonEnd
271
- },
272
- BOX: {
273
- start: emptyBoxGeoJSONStart,
274
- end: emptyBoxGeoJSONEnd
275
- },
276
- POLYGON: {
277
- start: emptyPolygonGeoJSONStart,
278
- end: emptyPolygonGeoJSONEnd
279
- },
280
- FIR: {
281
- start: null,
282
- end: null
283
- }
284
- };
285
-
286
- /**
287
- * The possible phenomena for the sigmet
288
- */
289
- var SigmetPhenomena;
290
-
291
- (function (SigmetPhenomena) {
292
- SigmetPhenomena["EMBD_TS"] = "Embedded thunderstorm(s)";
293
- SigmetPhenomena["EMBD_TSGR"] = "Embedded thunderstorm(s) with hail";
294
- SigmetPhenomena["FRQ_TS"] = "Frequent thunderstorm(s)";
295
- SigmetPhenomena["FRQ_TSGR"] = "Frequent thunderstorm(s) with hail";
296
- SigmetPhenomena["HVY_DS"] = "Heavy duststorm";
297
- SigmetPhenomena["HVY_SS"] = "Heavy sandstorm";
298
- SigmetPhenomena["OBSC_TS"] = "Obscured thunderstorm(s)";
299
- SigmetPhenomena["OBSC_TSGR"] = "Obscured thunderstorm(s) with hail";
300
- SigmetPhenomena["RDOACT_CLD"] = "Radioactive cloud";
301
- SigmetPhenomena["SEV_ICE"] = "Severe icing";
302
- SigmetPhenomena["SEV_ICE_FRZ_RN"] = "Severe icing due to freezing rain";
303
- SigmetPhenomena["SEV_MTW"] = "Severe mountain wave";
304
- SigmetPhenomena["SEV_TURB"] = "Severe turbulence";
305
- SigmetPhenomena["SQL_TS"] = "Squall line";
306
- 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.
307
-
308
- SigmetPhenomena["VA_CLD"] = "Volcanic ash cloud";
309
- })(SigmetPhenomena || (SigmetPhenomena = {}));
310
- /**
311
- * The possible phenomena for the airmet
312
- */
313
-
314
-
315
- var AirmetPhenomena;
316
-
317
- (function (AirmetPhenomena) {
318
- AirmetPhenomena["SFC_VIS"] = "Surface visibility";
319
- AirmetPhenomena["SFC_WIND"] = "Surface wind";
320
- AirmetPhenomena["OVC_CLD"] = "Overcast cloud";
321
- AirmetPhenomena["BKN_CLD"] = "Broken cloud";
322
- AirmetPhenomena["ISOL_CB"] = "Isolated cumulonimbus cloud";
323
- AirmetPhenomena["OCNL_CB"] = "Occasional cumulonimbus cloud";
324
- AirmetPhenomena["FRQ_CB"] = "Frequent cumulonimbus cloud";
325
- AirmetPhenomena["ISOL_TS"] = "Isolated thunderstorm(s)";
326
- AirmetPhenomena["OCNL_TS"] = "Occasional thunderstorm(s)";
327
- AirmetPhenomena["ISOL_TSGR"] = "Isolated thunderstorm(s) with hail";
328
- AirmetPhenomena["OCNL_TSGR"] = "Occasional thunderstorm(s) with hail";
329
- AirmetPhenomena["ISOL_TCU"] = "Isolated towering cumulus cloud";
330
- AirmetPhenomena["OCNL_TCU"] = "Occasional towering cumulus cloud";
331
- AirmetPhenomena["FRQ_TCU"] = "Frequent towering cumulus cloud";
332
- AirmetPhenomena["MOD_ICE"] = "Moderate icing";
333
- AirmetPhenomena["MOD_MTW"] = "Moderate mountain wave";
334
- AirmetPhenomena["MOD_TURB"] = "Moderate turbulence";
335
- AirmetPhenomena["MT_OBSC"] = "Mountains obscured";
336
- })(AirmetPhenomena || (AirmetPhenomena = {}));
337
-
338
- var VisibilityCause;
339
-
340
- (function (VisibilityCause) {
341
- VisibilityCause["DZ"] = "Drizzle";
342
- VisibilityCause["DU"] = "Dust";
343
- VisibilityCause["PO"] = "Dust or sand devil";
344
- VisibilityCause["DS"] = "Dust storm";
345
- VisibilityCause["FG"] = "Fog";
346
- VisibilityCause["FC"] = "Funnel clouds";
347
- VisibilityCause["GR"] = "Hail";
348
- VisibilityCause["HZ"] = "Haze";
349
- VisibilityCause["PL"] = "Ice pellets";
350
- VisibilityCause["BR"] = "Mist";
351
- VisibilityCause["RA"] = "Rain";
352
- VisibilityCause["SA"] = "Sand";
353
- VisibilityCause["SS"] = "Sand storm";
354
- VisibilityCause["FU"] = "Smoke";
355
- VisibilityCause["SN"] = "Snow";
356
- VisibilityCause["SG"] = "Snow grains";
357
- VisibilityCause["GS"] = "Soft hail";
358
- VisibilityCause["SQ"] = "Squalls";
359
- VisibilityCause["VA"] = "Volcanic Ash";
360
- })(VisibilityCause || (VisibilityCause = {}));
361
- /* Speed unit, e.g. 'KT', 'KMH' */
362
-
363
-
364
- var MovementUnit;
365
-
366
- (function (MovementUnit) {
367
- MovementUnit["KT"] = "kt";
368
- MovementUnit["KMH"] = "kmh";
369
- })(MovementUnit || (MovementUnit = {}));
370
-
371
- var WindUnit;
372
-
373
- (function (WindUnit) {
374
- WindUnit["KT"] = "kt";
375
- WindUnit["MPS"] = "mps";
376
- })(WindUnit || (WindUnit = {}));
377
-
378
- var ProductStatusDescription;
379
-
380
- (function (ProductStatusDescription) {
381
- ProductStatusDescription["DRAFT"] = "Draft";
382
- ProductStatusDescription["PUBLISHED"] = "Published";
383
- ProductStatusDescription["CANCELLED"] = "Cancelled";
384
- ProductStatusDescription["EXPIRED"] = "Expired";
385
- })(ProductStatusDescription || (ProductStatusDescription = {}));
386
-
387
- var CloudLevelUnits;
388
-
389
- (function (CloudLevelUnits) {
390
- CloudLevelUnits["FT"] = "ft";
391
- CloudLevelUnits["M"] = "m";
392
- })(CloudLevelUnits || (CloudLevelUnits = {}));
393
-
394
- var LevelUnits;
395
-
396
- (function (LevelUnits) {
397
- LevelUnits["FT"] = "ft";
398
- LevelUnits["M"] = "m";
399
- LevelUnits["FL"] = "FL";
400
- })(LevelUnits || (LevelUnits = {}));
401
-
402
- var Direction;
403
-
404
- (function (Direction) {
405
- Direction["N"] = "N";
406
- Direction["NNE"] = "NNE";
407
- Direction["NE"] = "NE";
408
- Direction["ENE"] = "ENE";
409
- Direction["E"] = "E";
410
- Direction["ESE"] = "ESE";
411
- Direction["SE"] = "SE";
412
- Direction["SSE"] = "SSE";
413
- Direction["S"] = "S";
414
- Direction["SSW"] = "SSW";
415
- Direction["SW"] = "SW";
416
- Direction["WSW"] = "WSW";
417
- Direction["W"] = "W";
418
- Direction["WNW"] = "WNW";
419
- Direction["NW"] = "NW";
420
- Direction["NNW"] = "NNW";
421
- })(Direction || (Direction = {}));
422
- var isInstanceOfCancelSigmet = function isInstanceOfCancelSigmet(obj) {
423
- return 'cancelsSigmetSequenceId' in obj;
424
- };
425
- var isInstanceOfCancelAirmet = function isInstanceOfCancelAirmet(obj) {
426
- return 'cancelsAirmetSequenceId' in obj;
427
- };
428
- var isInstanceOfSigmetOrAirmet = function isInstanceOfSigmetOrAirmet(obj) {
429
- return 'phenomenon' in obj;
430
- };
431
- var isInstanceOfCancelSigmetOrAirmet = function isInstanceOfCancelSigmetOrAirmet(obj) {
432
- return 'cancelsSigmetSequenceId' in obj || 'cancelsAirmetSequenceId' in obj;
433
- };
434
- var MapDrawMode;
435
-
436
- (function (MapDrawMode) {
437
- MapDrawMode["POINT"] = "POINT";
438
- MapDrawMode["BOX"] = "BOX";
439
- MapDrawMode["POLYGON"] = "POLYGON";
440
- MapDrawMode["FIR"] = "FIR";
441
- MapDrawMode["DELETE"] = "DELETE";
442
- })(MapDrawMode || (MapDrawMode = {}));
443
-
444
- var StartOrEndDrawing;
445
-
446
- (function (StartOrEndDrawing) {
447
- StartOrEndDrawing["start"] = "start";
448
- StartOrEndDrawing["end"] = "end";
449
- })(StartOrEndDrawing || (StartOrEndDrawing = {}));
450
-
451
- /* *
452
- * Licensed under the Apache License, Version 2.0 (the "License");
453
- * you may not use this file except in compliance with the License.
454
- * You may obtain a copy of the License at
455
- *
456
- * http://www.apache.org/licenses/LICENSE-2.0
457
- *
458
- * Unless required by applicable law or agreed to in writing, software
459
- * distributed under the License is distributed on an "AS IS" BASIS,
460
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
461
- * See the License for the specific language governing permissions and
462
- * limitations under the License.
463
- *
464
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
465
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
466
- * */
467
- var adagucBaseUrl = 'https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver';
468
- var KNMIGeoWebOverlays = {
469
- name: 'KNMIGeoWebOverlays',
470
- url: adagucBaseUrl + "?dataset=OVL",
471
- id: 'knmigeoweboverlays'
472
- };
473
- var northSeaPlatforms = {
474
- service: KNMIGeoWebOverlays.url,
475
- name: 'northseastations',
476
- format: 'image/png',
477
- layerType: core.mapTypes.LayerType.overLayer,
478
- enabled: true
479
- };
480
- var majorAirportsEHAA = {
481
- service: KNMIGeoWebOverlays.url,
482
- name: 'airports',
483
- format: 'image/png',
484
- layerType: core.mapTypes.LayerType.overLayer,
485
- enabled: true
486
- };
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__default["default"](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(_a) {
502
- var geoJSONs = _a.geoJSONs,
503
- _b = _a.setLayerGeoJSONs,
504
- setLayerGeoJSONs = _b === void 0 ? function () {} : _b,
505
- _c = _a.layerDrawModes,
506
- layerDrawModes = _c === void 0 ? {
507
- start: null,
508
- end: null
509
- } : _c,
510
- _d = _a.drawMode,
511
- drawMode = _d === void 0 ? {
512
- start: null,
513
- end: null
514
- } : _d,
515
- _e = _a.setDrawMode,
516
- setDrawMode = _e === void 0 ? function () {} : _e,
517
- _f = _a.exitDrawModeCallbackStart,
518
- exitDrawModeCallbackStart = _f === void 0 ? function () {} : _f,
519
- _g = _a.exitDrawModeCallbackEnd,
520
- exitDrawModeCallbackEnd = _g === void 0 ? function () {} : _g;
521
- var dispatch = reactRedux.useDispatch();
522
- var firstMap = reactRedux.useSelector(function (store) {
523
- return core.mapSelectors.getFirstMap(store);
524
- }, reactRedux.shallowEqual);
525
- var firstMapId = firstMap && firstMap.id ? firstMap.id : null;
526
- var mapLayers = reactRedux.useSelector(function (store) {
527
- return core.mapSelectors.getMapLayers(store, firstMapId);
528
- }, reactRedux.shallowEqual);
529
- var mapDimensions = reactRedux.useSelector(function (store) {
530
- return core.mapSelectors.getMapDimensions(store, firstMapId);
531
- }, reactRedux.shallowEqual);
532
- var mapId = React__namespace.useRef("sigmet-" + core.generateMapId()).current;
533
- var timesliderId = React__namespace.useRef("sigmet-" + core.generateTimesliderId()).current;
534
- var syncGroupAddGroup = React__namespace.useCallback(function (payload) {
535
- dispatch(core.SyncGroups.actions.syncGroupAddGroup(payload));
536
- }, [dispatch]);
537
- var syncGroupAddTarget = React__namespace.useCallback(function (payload) {
538
- dispatch(core.SyncGroups.actions.syncGroupAddTarget(payload));
539
- }, [dispatch]);
540
- React__namespace.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 __assign(__assign({}, layer), {
545
- id: core.generateLayerId(),
546
- mapId: mapId
547
- });
548
- });
549
- dispatch(core.mapActions.setLayers({
550
- mapId: mapId,
551
- layers: layers
552
- }));
553
- }
554
-
555
- if (mapDimensions && mapDimensions.length) {
556
- dispatch(core.mapActions.mapChangeDimension({
557
- mapId: mapId,
558
- dimension: mapDimensions[0],
559
- origin: 'MapViewGeoJson'
560
- }));
561
- }
562
-
563
- dispatch(core.mapActions.setBaseLayers({
564
- mapId: mapId,
565
- layers: [__assign(__assign({}, core.publicLayers.baseLayerGrey), {
566
- id: "baselayer-" + mapId
567
- }), __assign(__assign({}, core.publicLayers.overLayer), {
568
- id: "countryborders-" + mapId
569
- }), __assign(__assign({}, northSeaPlatforms), {
570
- id: "northseaplatforms-" + mapId
571
- }), __assign(__assign({}, majorAirportsEHAA), {
572
- id: "majorairportsehaa-" + mapId
573
- })]
574
- }));
575
- dispatch(core.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: core.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__namespace.createElement("div", {
595
- style: {
596
- position: 'relative',
597
- height: '99%'
598
- },
599
- "data-testid": "MapView"
600
- }, /*#__PURE__*/React__namespace.createElement(core.MapControls, null, /*#__PURE__*/React__namespace.createElement(core.LayerManagerMapButtonConnect, {
601
- source: "module",
602
- mapId: mapId
603
- }), /*#__PURE__*/React__namespace.createElement(core.LegendMapButtonConnect, {
604
- source: "module",
605
- mapId: mapId
606
- }), /*#__PURE__*/React__namespace.createElement(core.MultiDimensionSelectMapButtonsConnect, {
607
- source: "module",
608
- mapId: mapId
609
- })), /*#__PURE__*/React__namespace.createElement(core.MapViewConnect, {
610
- mapId: mapId
611
- }, /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
612
- id: "geojsonlayer-fir-" + mapId,
613
- isInEditMode: false,
614
- geojson: geoJSONs.fir
615
- }), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
616
- id: "geojsonlayer-end-" + 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(__assign(__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__namespace.createElement(core.MapViewLayer, {
635
- id: "geojsonlayer-start-" + 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(__assign(__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__namespace.createElement(core.MapViewLayer, {
654
- id: "geojsonlayer-intersection-end-" + mapId,
655
- isInEditMode: false,
656
- geojson: geoJSONs.intersectionEnd
657
- }), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
658
- id: "geojsonlayer-intersection-start-" + mapId,
659
- isInEditMode: false,
660
- geojson: geoJSONs.intersectionStart
661
- })), /*#__PURE__*/React__namespace.createElement("div", {
662
- style: {
663
- position: 'absolute',
664
- left: '0',
665
- bottom: '0',
666
- zIndex: 1000,
667
- width: '100%'
668
- }
669
- }, /*#__PURE__*/React__namespace.createElement(core.TimeSliderConnect, {
670
- sourceId: timesliderId,
671
- mapId: mapId
672
- })), /*#__PURE__*/React__namespace.createElement(core.LegendConnect, {
673
- showMapId: true,
674
- mapId: mapId
675
- }));
676
- };
677
-
678
136
  var type = "FeatureCollection";
679
137
  var features = [
680
138
  {
@@ -826,36 +284,351 @@
826
284
  features: features
827
285
  };
828
286
 
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
- * */
287
+ /* *
288
+ * Licensed under the Apache License, Version 2.0 (the "License");
289
+ * you may not use this file except in compliance with the License.
290
+ * You may obtain a copy of the License at
291
+ *
292
+ * http://www.apache.org/licenses/LICENSE-2.0
293
+ *
294
+ * Unless required by applicable law or agreed to in writing, software
295
+ * distributed under the License is distributed on an "AS IS" BASIS,
296
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
297
+ * See the License for the specific language governing permissions and
298
+ * limitations under the License.
299
+ *
300
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
301
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
302
+ * */
303
+ /**
304
+ * Function to translate the geojson data to a GeoJSON.FeatureCollection
305
+ */
306
+
307
+ var getFir = function getFir() {
308
+ return firArea;
309
+ };
310
+ /**
311
+ * Function to check if the given geojson object has 'fir' selectionType property
312
+ */
313
+
314
+ var isFir = function isFir(geojson) {
315
+ return geojson && geojson.features && geojson.features[0].properties['selectionType'] === 'fir';
316
+ };
317
+
318
+ var srsAndBboxDefault = {
319
+ bbox: {
320
+ left: -1205884.85699446,
321
+ bottom: 5808323.764379622,
322
+ right: 2219822.701688853,
323
+ top: 8298305.647311475
324
+ },
325
+ srs: 'EPSG:3857'
326
+ };
327
+ var featurePropsStart = {
328
+ stroke: '#f24a00',
329
+ 'stroke-width': 1.5,
330
+ 'stroke-opacity': 1,
331
+ fill: '#f24a00',
332
+ 'fill-opacity': 0.25
333
+ };
334
+ var featurePropsEnd = {
335
+ stroke: '#6e1e91',
336
+ 'stroke-width': 1.5,
337
+ 'stroke-opacity': 1,
338
+ fill: '#6e1e91',
339
+ 'fill-opacity': 0.25
340
+ };
341
+ var featurePropsIntersectionStart = {
342
+ stroke: '#f24a00',
343
+ 'stroke-width': 1.5,
344
+ 'stroke-opacity': 1,
345
+ fill: '#f24a00',
346
+ 'fill-opacity': 0.5
347
+ };
348
+ var featurePropsIntersectionEnd = {
349
+ stroke: '#6e1e91',
350
+ 'stroke-width': 1.5,
351
+ 'stroke-opacity': 1,
352
+ fill: '#6e1e91',
353
+ 'fill-opacity': 0.5
354
+ };
355
+ var featurePropsFIR = {
356
+ stroke: '#0075a9',
357
+ 'stroke-width': 1.5,
358
+ 'stroke-opacity': 1,
359
+ fill: '#0075a9',
360
+ 'fill-opacity': 0.0
361
+ };
362
+ var featurePropsUnStyled = {
363
+ stroke: '#FF0000',
364
+ 'stroke-width': 10.0,
365
+ 'stroke-opacity': 1,
366
+ fill: '#0000FF',
367
+ 'fill-opacity': 1.0
368
+ };
369
+ var emptyPolygonGeoJSONStart = {
370
+ type: 'FeatureCollection',
371
+ features: [{
372
+ type: 'Feature',
373
+ properties: __assign(__assign({}, featurePropsUnStyled), {
374
+ selectionType: 'poly'
375
+ }),
376
+ geometry: {
377
+ type: 'Polygon',
378
+ coordinates: [[]]
379
+ }
380
+ }]
381
+ };
382
+ var emptyPolygonGeoJSONEnd = {
383
+ type: 'FeatureCollection',
384
+ features: [{
385
+ type: 'Feature',
386
+ properties: __assign(__assign({}, featurePropsUnStyled), {
387
+ selectionType: 'poly'
388
+ }),
389
+ geometry: {
390
+ type: 'Polygon',
391
+ coordinates: [[]]
392
+ }
393
+ }]
394
+ };
395
+ var emptyBoxGeoJSONStart = {
396
+ type: 'FeatureCollection',
397
+ features: [{
398
+ type: 'Feature',
399
+ properties: __assign({
400
+ _adaguctype: 'box',
401
+ selectionType: 'box'
402
+ }, featurePropsUnStyled),
403
+ geometry: {
404
+ type: 'Polygon',
405
+ coordinates: [[]]
406
+ }
407
+ }]
408
+ };
409
+ var emptyBoxGeoJSONEnd = {
410
+ type: 'FeatureCollection',
411
+ features: [{
412
+ type: 'Feature',
413
+ properties: __assign({
414
+ _adaguctype: 'box',
415
+ selectionType: 'box'
416
+ }, featurePropsUnStyled),
417
+ geometry: {
418
+ type: 'Polygon',
419
+ coordinates: [[]]
420
+ }
421
+ }]
422
+ };
423
+ var emptyPointsGeojsonStart = {
424
+ type: 'FeatureCollection',
425
+ features: [{
426
+ type: 'Feature',
427
+ properties: __assign(__assign({}, featurePropsUnStyled), {
428
+ selectionType: 'point'
429
+ }),
430
+ geometry: {
431
+ type: 'Point',
432
+ coordinates: []
433
+ }
434
+ }]
435
+ };
436
+ var emptyPointsGeojsonEnd = {
437
+ type: 'FeatureCollection',
438
+ features: [{
439
+ type: 'Feature',
440
+ properties: __assign(__assign({}, featurePropsUnStyled), {
441
+ selectionType: 'point'
442
+ }),
443
+ geometry: {
444
+ type: 'Point',
445
+ coordinates: []
446
+ }
447
+ }]
448
+ };
449
+ var geoJSONTemplate = {
450
+ POINT: {
451
+ start: emptyPointsGeojsonStart,
452
+ end: emptyPointsGeojsonEnd
453
+ },
454
+ BOX: {
455
+ start: emptyBoxGeoJSONStart,
456
+ end: emptyBoxGeoJSONEnd
457
+ },
458
+ POLYGON: {
459
+ start: emptyPolygonGeoJSONStart,
460
+ end: emptyPolygonGeoJSONEnd
461
+ },
462
+ FIR: {
463
+ start: null,
464
+ end: null
465
+ }
466
+ };
467
+
845
468
  /**
846
- * Function to translate the geojson data to a GeoJSON.FeatureCollection
469
+ * The possible phenomena for the sigmet
847
470
  */
471
+ var SigmetPhenomena;
848
472
 
849
- var getFir = function getFir() {
850
- return firArea;
851
- };
473
+ (function (SigmetPhenomena) {
474
+ SigmetPhenomena["EMBD_TS"] = "Embedded thunderstorm(s)";
475
+ SigmetPhenomena["EMBD_TSGR"] = "Embedded thunderstorm(s) with hail";
476
+ SigmetPhenomena["FRQ_TS"] = "Frequent thunderstorm(s)";
477
+ SigmetPhenomena["FRQ_TSGR"] = "Frequent thunderstorm(s) with hail";
478
+ SigmetPhenomena["HVY_DS"] = "Heavy duststorm";
479
+ SigmetPhenomena["HVY_SS"] = "Heavy sandstorm";
480
+ SigmetPhenomena["OBSC_TS"] = "Obscured thunderstorm(s)";
481
+ SigmetPhenomena["OBSC_TSGR"] = "Obscured thunderstorm(s) with hail";
482
+ SigmetPhenomena["RDOACT_CLD"] = "Radioactive cloud";
483
+ SigmetPhenomena["SEV_ICE"] = "Severe icing";
484
+ SigmetPhenomena["SEV_ICE_FRZ_RN"] = "Severe icing due to freezing rain";
485
+ SigmetPhenomena["SEV_MTW"] = "Severe mountain wave";
486
+ SigmetPhenomena["SEV_TURB"] = "Severe turbulence";
487
+ SigmetPhenomena["SQL_TS"] = "Squall line";
488
+ 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.
489
+
490
+ SigmetPhenomena["VA_CLD"] = "Volcanic ash cloud";
491
+ })(SigmetPhenomena || (SigmetPhenomena = {}));
852
492
  /**
853
- * Function to check if the given geojson object has 'fir' selectionType property
493
+ * The possible phenomena for the airmet
854
494
  */
855
495
 
856
- var isFir = function isFir(geojson) {
857
- return geojson && geojson.features && geojson.features[0].properties['selectionType'] === 'fir';
496
+
497
+ var AirmetPhenomena;
498
+
499
+ (function (AirmetPhenomena) {
500
+ AirmetPhenomena["SFC_VIS"] = "Surface visibility";
501
+ AirmetPhenomena["SFC_WIND"] = "Surface wind";
502
+ AirmetPhenomena["OVC_CLD"] = "Overcast cloud";
503
+ AirmetPhenomena["BKN_CLD"] = "Broken cloud";
504
+ AirmetPhenomena["ISOL_CB"] = "Isolated cumulonimbus cloud";
505
+ AirmetPhenomena["OCNL_CB"] = "Occasional cumulonimbus cloud";
506
+ AirmetPhenomena["FRQ_CB"] = "Frequent cumulonimbus cloud";
507
+ AirmetPhenomena["ISOL_TS"] = "Isolated thunderstorm(s)";
508
+ AirmetPhenomena["OCNL_TS"] = "Occasional thunderstorm(s)";
509
+ AirmetPhenomena["ISOL_TSGR"] = "Isolated thunderstorm(s) with hail";
510
+ AirmetPhenomena["OCNL_TSGR"] = "Occasional thunderstorm(s) with hail";
511
+ AirmetPhenomena["ISOL_TCU"] = "Isolated towering cumulus cloud";
512
+ AirmetPhenomena["OCNL_TCU"] = "Occasional towering cumulus cloud";
513
+ AirmetPhenomena["FRQ_TCU"] = "Frequent towering cumulus cloud";
514
+ AirmetPhenomena["MOD_ICE"] = "Moderate icing";
515
+ AirmetPhenomena["MOD_MTW"] = "Moderate mountain wave";
516
+ AirmetPhenomena["MOD_TURB"] = "Moderate turbulence";
517
+ AirmetPhenomena["MT_OBSC"] = "Mountains obscured";
518
+ })(AirmetPhenomena || (AirmetPhenomena = {}));
519
+
520
+ var VisibilityCause;
521
+
522
+ (function (VisibilityCause) {
523
+ VisibilityCause["DZ"] = "Drizzle";
524
+ VisibilityCause["DU"] = "Dust";
525
+ VisibilityCause["PO"] = "Dust or sand devil";
526
+ VisibilityCause["DS"] = "Dust storm";
527
+ VisibilityCause["FG"] = "Fog";
528
+ VisibilityCause["FC"] = "Funnel clouds";
529
+ VisibilityCause["GR"] = "Hail";
530
+ VisibilityCause["HZ"] = "Haze";
531
+ VisibilityCause["PL"] = "Ice pellets";
532
+ VisibilityCause["BR"] = "Mist";
533
+ VisibilityCause["RA"] = "Rain";
534
+ VisibilityCause["SA"] = "Sand";
535
+ VisibilityCause["SS"] = "Sand storm";
536
+ VisibilityCause["FU"] = "Smoke";
537
+ VisibilityCause["SN"] = "Snow";
538
+ VisibilityCause["SG"] = "Snow grains";
539
+ VisibilityCause["GS"] = "Soft hail";
540
+ VisibilityCause["SQ"] = "Squalls";
541
+ VisibilityCause["VA"] = "Volcanic Ash";
542
+ })(VisibilityCause || (VisibilityCause = {}));
543
+ /* Speed unit, e.g. 'KT', 'KMH' */
544
+
545
+
546
+ var MovementUnit;
547
+
548
+ (function (MovementUnit) {
549
+ MovementUnit["KT"] = "kt";
550
+ MovementUnit["KMH"] = "kmh";
551
+ })(MovementUnit || (MovementUnit = {}));
552
+
553
+ var WindUnit;
554
+
555
+ (function (WindUnit) {
556
+ WindUnit["KT"] = "kt";
557
+ WindUnit["MPS"] = "mps";
558
+ })(WindUnit || (WindUnit = {}));
559
+
560
+ var ProductStatusDescription;
561
+
562
+ (function (ProductStatusDescription) {
563
+ ProductStatusDescription["DRAFT"] = "Draft";
564
+ ProductStatusDescription["PUBLISHED"] = "Published";
565
+ ProductStatusDescription["CANCELLED"] = "Cancelled";
566
+ ProductStatusDescription["EXPIRED"] = "Expired";
567
+ })(ProductStatusDescription || (ProductStatusDescription = {}));
568
+
569
+ var CloudLevelUnits;
570
+
571
+ (function (CloudLevelUnits) {
572
+ CloudLevelUnits["FT"] = "ft";
573
+ CloudLevelUnits["M"] = "m";
574
+ })(CloudLevelUnits || (CloudLevelUnits = {}));
575
+
576
+ var LevelUnits;
577
+
578
+ (function (LevelUnits) {
579
+ LevelUnits["FT"] = "ft";
580
+ LevelUnits["M"] = "m";
581
+ LevelUnits["FL"] = "FL";
582
+ })(LevelUnits || (LevelUnits = {}));
583
+
584
+ var Direction;
585
+
586
+ (function (Direction) {
587
+ Direction["N"] = "N";
588
+ Direction["NNE"] = "NNE";
589
+ Direction["NE"] = "NE";
590
+ Direction["ENE"] = "ENE";
591
+ Direction["E"] = "E";
592
+ Direction["ESE"] = "ESE";
593
+ Direction["SE"] = "SE";
594
+ Direction["SSE"] = "SSE";
595
+ Direction["S"] = "S";
596
+ Direction["SSW"] = "SSW";
597
+ Direction["SW"] = "SW";
598
+ Direction["WSW"] = "WSW";
599
+ Direction["W"] = "W";
600
+ Direction["WNW"] = "WNW";
601
+ Direction["NW"] = "NW";
602
+ Direction["NNW"] = "NNW";
603
+ })(Direction || (Direction = {}));
604
+ var isInstanceOfCancelSigmet = function isInstanceOfCancelSigmet(obj) {
605
+ return 'cancelsSigmetSequenceId' in obj;
606
+ };
607
+ var isInstanceOfCancelAirmet = function isInstanceOfCancelAirmet(obj) {
608
+ return 'cancelsAirmetSequenceId' in obj;
609
+ };
610
+ var isInstanceOfSigmetOrAirmet = function isInstanceOfSigmetOrAirmet(obj) {
611
+ return 'phenomenon' in obj;
858
612
  };
613
+ var isInstanceOfCancelSigmetOrAirmet = function isInstanceOfCancelSigmetOrAirmet(obj) {
614
+ return 'cancelsSigmetSequenceId' in obj || 'cancelsAirmetSequenceId' in obj;
615
+ };
616
+ var MapDrawMode;
617
+
618
+ (function (MapDrawMode) {
619
+ MapDrawMode["POINT"] = "POINT";
620
+ MapDrawMode["BOX"] = "BOX";
621
+ MapDrawMode["POLYGON"] = "POLYGON";
622
+ MapDrawMode["FIR"] = "FIR";
623
+ MapDrawMode["DELETE"] = "DELETE";
624
+ })(MapDrawMode || (MapDrawMode = {}));
625
+
626
+ var StartOrEndDrawing;
627
+
628
+ (function (StartOrEndDrawing) {
629
+ StartOrEndDrawing["start"] = "start";
630
+ StartOrEndDrawing["end"] = "end";
631
+ })(StartOrEndDrawing || (StartOrEndDrawing = {}));
859
632
 
860
633
  var getDrawModeFromSelectionType = function getDrawModeFromSelectionType(selectionType) {
861
634
  switch (selectionType) {
@@ -1112,21 +885,19 @@
1112
885
  * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1113
886
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
1114
887
  * */
1115
- var styles$4 = {
1116
- productForm: {
1117
- overflowY: 'scroll',
1118
- overflowX: 'hidden',
1119
- height: '100%',
1120
- width: '100%'
1121
- },
888
+ var styles$2 = {
1122
889
  label: {
1123
- paddingTop: '15px'
890
+ fontSize: '0.875rem',
891
+ marginTop: 2,
892
+ textAlign: 'right'
1124
893
  },
1125
894
  body: {
1126
895
  paddingTop: '17px'
1127
896
  },
1128
897
  containerItem: {
1129
- paddingTop: '8px'
898
+ ' .MuiTypography-subtitle1': {
899
+ marginTop: 1
900
+ }
1130
901
  },
1131
902
  volcanicField: {
1132
903
  marginBottom: 2
@@ -1154,7 +925,22 @@
1154
925
  opacity: '1'
1155
926
  },
1156
927
  drawSection: {
1157
- padding: '10px 0px'
928
+ '+ .MuiGrid-item': {
929
+ paddingTop: 5
930
+ },
931
+ ' .MuiTypography-subtitle1': {
932
+ marginTop: 1
933
+ }
934
+ },
935
+ helperText: {
936
+ ' .MuiFormHelperText-root': {
937
+ position: 'absolute',
938
+ top: 56,
939
+ '&.Mui-error': {
940
+ top: 'auto',
941
+ position: 'relative'
942
+ }
943
+ }
1158
944
  }
1159
945
  };
1160
946
 
@@ -1180,6 +966,31 @@
1180
966
  }, restProps));
1181
967
  };
1182
968
 
969
+ var ProductFormFieldLayout = function ProductFormFieldLayout(_a) {
970
+ var title = _a.title,
971
+ children = _a.children,
972
+ props = __rest(_a, ["title", "children"]);
973
+
974
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, __assign({
975
+ item: true,
976
+ container: true,
977
+ spacing: 3
978
+ }, props), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
979
+ item: true,
980
+ xs: 4,
981
+ container: true,
982
+ justifyContent: "flex-end"
983
+ }, title && /*#__PURE__*/React__default["default"].createElement(material.Typography, {
984
+ variant: "subtitle1",
985
+ sx: styles$2.label
986
+ }, title)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
987
+ item: true,
988
+ xs: 8,
989
+ container: true,
990
+ justifyContent: "flex-start"
991
+ }, children));
992
+ };
993
+
1183
994
  /* *
1184
995
  * Licensed under the Apache License, Version 2.0 (the "License");
1185
996
  * you may not use this file except in compliance with the License.
@@ -1193,8 +1004,8 @@
1193
1004
  * See the License for the specific language governing permissions and
1194
1005
  * limitations under the License.
1195
1006
  *
1196
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1197
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
1007
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1008
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
1198
1009
  * */
1199
1010
 
1200
1011
  var Change = function Change(_a) {
@@ -1202,24 +1013,9 @@
1202
1013
  isReadOnly = _a.isReadOnly;
1203
1014
  var watch = reactHookForm.useFormContext().watch;
1204
1015
  var isRequired = shared.useDraftFormHelpers().isRequired;
1205
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1206
- item: true,
1207
- container: true,
1208
- spacing: 2,
1209
- sx: styles$4.containerItem
1210
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1211
- item: true,
1212
- xs: 4,
1213
- container: true,
1214
- justifyContent: "flex-end"
1215
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
1216
- variant: "subtitle1",
1217
- sx: styles$4.label
1218
- }, "Change")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1219
- item: true,
1220
- xs: 8,
1221
- container: true,
1222
- justifyContent: "flex-start"
1016
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
1017
+ title: "Change",
1018
+ sx: styles$2.containerItem
1223
1019
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1224
1020
  item: true,
1225
1021
  xs: 12
@@ -1246,7 +1042,7 @@
1246
1042
  label: "Intensifying",
1247
1043
  disabled: isDisabled,
1248
1044
  "data-testid": "change-INTSF"
1249
- })))));
1045
+ }))));
1250
1046
  };
1251
1047
 
1252
1048
  /* *
@@ -1262,22 +1058,19 @@
1262
1058
  * See the License for the specific language governing permissions and
1263
1059
  * limitations under the License.
1264
1060
  *
1265
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1266
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
1061
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1062
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
1267
1063
  * */
1268
- var styles$3 = {
1269
- drawButtons: {
1270
- color: '#0075a9',
1271
- borderRadius: '5px',
1272
- border: 'solid 1px #0075a9',
1273
- padding: '2px'
1274
- },
1275
- drawButtonsSelected: {
1276
- color: 'white',
1277
- backgroundColor: '#0075a9',
1064
+ var styles$1 = {
1065
+ radioInput: {
1066
+ padding: 1,
1278
1067
  borderRadius: '5px',
1279
- border: 'solid 1px #0075a9',
1280
- padding: '2px'
1068
+ backgroundColor: 'geowebColors.buttons.tool.default.fill',
1069
+ color: 'geowebColors.buttons.tool.default.color',
1070
+ '&.Mui-checked': {
1071
+ backgroundColor: 'geowebColors.buttons.primary.default.fill',
1072
+ color: 'geowebColors.buttons.primary.default.color'
1073
+ }
1281
1074
  }
1282
1075
  };
1283
1076
 
@@ -1291,88 +1084,74 @@
1291
1084
  xs: 12,
1292
1085
  container: true,
1293
1086
  justifyContent: "space-between",
1294
- "data-testid": "drawtools"
1087
+ "data-testid": "drawtools",
1088
+ spacing: 1
1295
1089
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1296
1090
  item: true
1297
1091
  }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
1298
1092
  title: "Drop a point as " + type + " position"
1299
1093
  }, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
1300
- icon: /*#__PURE__*/React__default["default"].createElement(theme.Location, {
1301
- sx: styles$3.drawButtons
1302
- }),
1094
+ icon: /*#__PURE__*/React__default["default"].createElement(theme.Location, null),
1303
1095
  value: true,
1304
- checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.Location, {
1305
- sx: styles$3.drawButtonsSelected
1306
- }),
1096
+ checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.Location, null),
1307
1097
  checked: drawMode === MapDrawMode.POINT,
1308
1098
  onChange: function onChange() {
1309
1099
  setDrawMode(MapDrawMode.POINT);
1310
1100
  },
1311
- "data-testid": "drawtools-point"
1101
+ "data-testid": "drawtools-point",
1102
+ sx: styles$1.radioInput
1312
1103
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1313
1104
  item: true
1314
1105
  }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
1315
1106
  title: "Draw a box as " + type + " position"
1316
1107
  }, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
1317
- icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawRegion, {
1318
- sx: styles$3.drawButtons
1319
- }),
1320
- checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.DrawRegion, {
1321
- sx: styles$3.drawButtonsSelected
1322
- }),
1108
+ icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawRegion, null),
1109
+ checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.DrawRegion, null),
1323
1110
  checked: drawMode === MapDrawMode.BOX,
1324
1111
  onChange: function onChange() {
1325
1112
  setDrawMode(MapDrawMode.BOX);
1326
1113
  },
1327
- "data-testid": "drawtools-box"
1114
+ "data-testid": "drawtools-box",
1115
+ sx: styles$1.radioInput
1328
1116
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1329
1117
  item: true
1330
1118
  }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
1331
1119
  title: "Draw a shape as " + type + " position"
1332
1120
  }, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
1333
- icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawPolygon, {
1334
- sx: styles$3.drawButtons
1335
- }),
1336
- checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.DrawPolygon, {
1337
- sx: styles$3.drawButtonsSelected
1338
- }),
1121
+ icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawPolygon, null),
1122
+ checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.DrawPolygon, null),
1339
1123
  checked: drawMode === MapDrawMode.POLYGON,
1340
1124
  onChange: function onChange() {
1341
1125
  setDrawMode(MapDrawMode.POLYGON);
1342
1126
  },
1343
- "data-testid": "drawtools-polygon"
1127
+ "data-testid": "drawtools-polygon",
1128
+ sx: styles$1.radioInput
1344
1129
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1345
1130
  item: true
1346
1131
  }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
1347
1132
  title: "Set FIR as " + type + " position"
1348
1133
  }, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
1349
- icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawFIRLand, {
1350
- sx: styles$3.drawButtons
1351
- }),
1352
- checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.DrawFIRLand, {
1353
- sx: styles$3.drawButtonsSelected
1354
- }),
1134
+ icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawFIRLand, null),
1135
+ checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.DrawFIRLand, null),
1355
1136
  checked: drawMode === MapDrawMode.FIR,
1356
1137
  onChange: function onChange() {
1357
1138
  setDrawMode(MapDrawMode.FIR);
1358
1139
  },
1359
- "data-testid": "drawtools-fir"
1140
+ "data-testid": "drawtools-fir",
1141
+ sx: styles$1.radioInput
1360
1142
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1361
1143
  item: true
1362
1144
  }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
1363
1145
  title: "Remove geometry"
1364
1146
  }, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
1365
- icon: /*#__PURE__*/React__default["default"].createElement(theme.Delete, {
1366
- sx: styles$3.drawButtons
1367
- }),
1368
- checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.Delete, {
1369
- sx: styles$3.drawButtonsSelected
1370
- }),
1147
+ icon: /*#__PURE__*/React__default["default"].createElement(theme.Delete, null),
1148
+ checkedIcon: /*#__PURE__*/React__default["default"].createElement(theme.Delete, null),
1371
1149
  checked: drawMode === MapDrawMode.DELETE,
1372
1150
  onChange: function onChange() {
1373
1151
  setDrawMode(MapDrawMode.DELETE);
1374
1152
  },
1375
- "data-testid": "drawtools-delete"
1153
+ "data-testid": "drawtools-delete",
1154
+ sx: styles$1.radioInput
1376
1155
  }))));
1377
1156
  };
1378
1157
 
@@ -1603,47 +1382,86 @@
1603
1382
  if (productListItem === null) return 'new';
1604
1383
  return canBeOptions.includes('PUBLISHED') ? 'edit' : 'view';
1605
1384
  };
1385
+ var buttonStyle = {
1386
+ minWidth: 96
1387
+ };
1606
1388
  var getProductFormLifecycleButtons = function getProductFormLifecycleButtons(canBe, onButtonPress) {
1607
- return /*#__PURE__*/React__namespace.createElement(material.Grid, {
1608
- container: true,
1609
- spacing: 1,
1610
- justifyContent: "flex-end"
1611
- }, canBe.includes('DISCARDED') && /*#__PURE__*/React__namespace.createElement(material.Grid, {
1612
- item: true
1613
- }, /*#__PURE__*/React__namespace.createElement(material.Button, {
1614
- color: "secondary",
1615
- onClick: function onClick() {
1616
- onButtonPress('DISCARDED');
1617
- },
1389
+ var hasDiscardButton = canBe.includes('DISCARDED');
1390
+
1391
+ var onDiscard = function onDiscard() {
1392
+ return onButtonPress('DISCARDED');
1393
+ };
1394
+
1395
+ var hasSaveButton = canBe.includes('DRAFTED');
1396
+
1397
+ var onSave = function onSave() {
1398
+ return onButtonPress('DRAFT');
1399
+ };
1400
+
1401
+ var hasCancelButton = canBe.includes('CANCELLED');
1402
+
1403
+ var onCancel = function onCancel() {
1404
+ return onButtonPress('CANCELLED');
1405
+ };
1406
+
1407
+ var hasPublishButton = canBe.includes('PUBLISHED');
1408
+
1409
+ var onPublish = function onPublish() {
1410
+ return onButtonPress('PUBLISHED');
1411
+ };
1412
+
1413
+ return /*#__PURE__*/React__namespace.createElement(material.Box, {
1414
+ sx: {
1415
+ display: 'flex',
1416
+ justifyContent: 'flex-end',
1417
+ 'button:not(:first-of-type)': {
1418
+ marginLeft: 1
1419
+ }
1420
+ }
1421
+ }, /*#__PURE__*/React__namespace.createElement(material.Box, {
1422
+ display: {
1423
+ xs: 'none',
1424
+ lg: 'block'
1425
+ }
1426
+ }, hasDiscardButton && /*#__PURE__*/React__namespace.createElement(material.Button, {
1427
+ variant: "flat",
1428
+ onClick: onDiscard,
1429
+ sx: buttonStyle,
1618
1430
  "data-testid": "productform-dialog-discard"
1619
- }, "Discard")), canBe.includes('DRAFTED') && /*#__PURE__*/React__namespace.createElement(material.Grid, {
1620
- item: true
1621
- }, /*#__PURE__*/React__namespace.createElement(material.Button, {
1622
- color: "secondary",
1623
- variant: "outlined",
1624
- onClick: function onClick() {
1625
- onButtonPress('DRAFT');
1626
- },
1431
+ }, "DISCARD"), hasSaveButton && /*#__PURE__*/React__namespace.createElement(material.Button, {
1432
+ variant: "tertiary",
1433
+ onClick: onSave,
1434
+ sx: buttonStyle,
1627
1435
  "data-testid": "productform-dialog-draft"
1628
- }, "Save")), canBe.includes('CANCELLED') && /*#__PURE__*/React__namespace.createElement(material.Grid, {
1629
- item: true
1630
- }, /*#__PURE__*/React__namespace.createElement(material.Button, {
1631
- color: "secondary",
1632
- variant: "contained",
1633
- onClick: function onClick() {
1634
- onButtonPress('CANCELLED');
1635
- },
1436
+ }, "Save"), hasCancelButton && /*#__PURE__*/React__namespace.createElement(material.Button, {
1437
+ variant: "tertiary",
1438
+ onClick: onCancel,
1439
+ sx: buttonStyle,
1636
1440
  "data-testid": "productform-dialog-cancel"
1637
- }, "Cancel")), canBe.includes('PUBLISHED') && /*#__PURE__*/React__namespace.createElement(material.Grid, {
1638
- item: true
1639
- }, /*#__PURE__*/React__namespace.createElement(material.Button, {
1640
- color: "secondary",
1641
- variant: "contained",
1642
- onClick: function onClick() {
1643
- onButtonPress('PUBLISHED');
1644
- },
1441
+ }, "Cancel"), hasPublishButton && /*#__PURE__*/React__namespace.createElement(material.Button, {
1442
+ variant: "primary",
1443
+ onClick: onPublish,
1444
+ sx: buttonStyle,
1645
1445
  "data-testid": "productform-dialog-publish"
1646
- }, "Publish")));
1446
+ }, "Publish")), /*#__PURE__*/React__namespace.createElement(material.Box, {
1447
+ display: {
1448
+ lg: 'none'
1449
+ }
1450
+ }, /*#__PURE__*/React__namespace.createElement(shared.ToggleMenu, {
1451
+ menuItems: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(hasDiscardButton ? [{
1452
+ text: 'Discard',
1453
+ action: onDiscard
1454
+ }] : [])), __read(hasSaveButton ? [{
1455
+ text: 'Save',
1456
+ action: onSave
1457
+ }] : [])), __read(hasCancelButton ? [{
1458
+ text: 'Cancel',
1459
+ action: onCancel
1460
+ }] : [])), __read(hasPublishButton ? [{
1461
+ text: 'Publish',
1462
+ action: onPublish
1463
+ }] : []))
1464
+ })));
1647
1465
  };
1648
1466
  var hasValue = function hasValue(value) {
1649
1467
  return value !== null && value.toString() !== 'NaN';
@@ -1927,24 +1745,9 @@
1927
1745
  var selectedFIR = watch('locationIndicatorATSR'); // Get allowed level units based on selected FIR - if no FIR selected, allow all default units
1928
1746
 
1929
1747
  var allowedLevelUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'level_unit', LevelUnits);
1930
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1931
- item: true,
1932
- container: true,
1933
- spacing: 2,
1934
- sx: styles$4.containerItem
1935
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1936
- item: true,
1937
- xs: 4,
1938
- container: true,
1939
- justifyContent: "flex-end"
1940
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
1941
- variant: "subtitle1",
1942
- sx: styles$4.label
1943
- }, "Levels")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1944
- item: true,
1945
- xs: 8,
1946
- container: true,
1947
- justifyContent: "flex-start"
1748
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
1749
+ title: "Levels",
1750
+ sx: styles$2.containerItem
1948
1751
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1949
1752
  item: true,
1950
1753
  xs: 12
@@ -1984,10 +1787,14 @@
1984
1787
  }), watch('levelInfoMode') === 'AT' || watch('levelInfoMode') === 'TOPS' ? /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1985
1788
  item: true,
1986
1789
  xs: 12,
1987
- container: true
1790
+ container: true,
1791
+ spacing: 2,
1792
+ justifyItems: "flex-end",
1793
+ alignItems: "flex-end"
1988
1794
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
1989
1795
  item: true,
1990
- xs: 3
1796
+ xs: 12,
1797
+ md: 3
1991
1798
  }, (!isReadOnly || watch('levelInfoMode') === 'TOPS') && /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
1992
1799
  control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
1993
1800
  checked: watch('levelInfoMode') === 'TOPS',
@@ -2003,7 +1810,8 @@
2003
1810
  label: "Tops"
2004
1811
  })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2005
1812
  item: true,
2006
- xs: 3
1813
+ xs: 4,
1814
+ md: 3
2007
1815
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
2008
1816
  name: "level.unit",
2009
1817
  label: "Unit",
@@ -2012,7 +1820,7 @@
2012
1820
  isRequired: isRequired
2013
1821
  }
2014
1822
  },
2015
- sx: styles$4.unit,
1823
+ sx: styles$2.unit,
2016
1824
  disabled: isDisabled,
2017
1825
  defaultValue: 'FL',
2018
1826
  onChange: function onChange() {
@@ -2029,7 +1837,8 @@
2029
1837
  }, allowedLevelUnitsForFir[key]);
2030
1838
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2031
1839
  item: true,
2032
- xs: 6
1840
+ xs: 8,
1841
+ md: 6
2033
1842
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
2034
1843
  name: "level.value",
2035
1844
  "data-testid": "level.value",
@@ -2063,13 +1872,16 @@
2063
1872
  }), watch('levelInfoMode') === 'BETW' || watch('levelInfoMode') === 'BETW_SFC' ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2064
1873
  item: true,
2065
1874
  xs: 12,
2066
- container: true
1875
+ container: true,
1876
+ spacing: 2
2067
1877
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2068
1878
  item: true,
2069
- xs: 3
1879
+ xs: 12,
1880
+ md: 3
2070
1881
  }), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2071
1882
  item: true,
2072
- xs: 3
1883
+ xs: 4,
1884
+ md: 3
2073
1885
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
2074
1886
  name: "level.unit",
2075
1887
  label: "Unit",
@@ -2082,7 +1894,7 @@
2082
1894
  }
2083
1895
  }
2084
1896
  },
2085
- sx: styles$4.unit,
1897
+ sx: styles$2.unit,
2086
1898
  disabled: isDisabled,
2087
1899
  defaultValue: 'FL',
2088
1900
  onChange: function onChange() {
@@ -2097,11 +1909,12 @@
2097
1909
  }, allowedLevelUnitsForFir[key]);
2098
1910
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2099
1911
  item: true,
2100
- xs: 6
1912
+ xs: 8,
1913
+ md: 6
2101
1914
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
2102
1915
  name: "level.value",
2103
1916
  label: "Upper level",
2104
- sx: styles$4.levelField,
1917
+ sx: styles$2.levelField,
2105
1918
  rules: {
2106
1919
  validate: {
2107
1920
  isRequired: isRequired,
@@ -2128,10 +1941,14 @@
2128
1941
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2129
1942
  item: true,
2130
1943
  xs: 12,
2131
- container: true
1944
+ container: true,
1945
+ spacing: 2,
1946
+ justifyItems: "flex-end",
1947
+ alignItems: "flex-end"
2132
1948
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2133
1949
  item: true,
2134
- xs: 3
1950
+ xs: 12,
1951
+ md: 3
2135
1952
  }, (!isReadOnly || watch('levelInfoMode') === 'BETW_SFC') && /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
2136
1953
  control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
2137
1954
  checked: watch('levelInfoMode') === 'BETW_SFC',
@@ -2149,7 +1966,8 @@
2149
1966
  label: "SFC"
2150
1967
  })), watch('levelInfoMode') !== 'BETW_SFC' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2151
1968
  item: true,
2152
- xs: 3
1969
+ xs: 4,
1970
+ md: 3
2153
1971
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
2154
1972
  name: "lowerLevel.unit",
2155
1973
  label: "Unit",
@@ -2162,7 +1980,7 @@
2162
1980
  }
2163
1981
  }
2164
1982
  },
2165
- sx: styles$4.unit,
1983
+ sx: styles$2.unit,
2166
1984
  disabled: isDisabled,
2167
1985
  defaultValue: getValues('level.unit') || 'FL',
2168
1986
  onChange: function onChange() {
@@ -2181,7 +1999,8 @@
2181
1999
  }, allowedLevelUnitsForFir[key]);
2182
2000
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2183
2001
  item: true,
2184
- xs: 6
2002
+ xs: 8,
2003
+ md: 6
2185
2004
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
2186
2005
  name: "lowerLevel.value",
2187
2006
  label: "Lower level",
@@ -2217,10 +2036,14 @@
2217
2036
  }), watch('levelInfoMode') === 'ABV' || watch('levelInfoMode') === 'TOPS_ABV' ? /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2218
2037
  item: true,
2219
2038
  xs: 12,
2220
- container: true
2039
+ container: true,
2040
+ spacing: 2,
2041
+ justifyItems: "flex-end",
2042
+ alignItems: "flex-end"
2221
2043
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2222
2044
  item: true,
2223
- xs: 3
2045
+ xs: 12,
2046
+ md: 3
2224
2047
  }, (!isReadOnly || watch('levelInfoMode') === 'TOPS_ABV') && /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
2225
2048
  control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
2226
2049
  checked: watch('levelInfoMode') === 'TOPS_ABV',
@@ -2235,7 +2058,8 @@
2235
2058
  "data-testid": "levels-TOPS_ABV"
2236
2059
  })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2237
2060
  item: true,
2238
- xs: 3
2061
+ xs: 4,
2062
+ md: 3
2239
2063
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
2240
2064
  name: "level.unit",
2241
2065
  label: "Unit",
@@ -2244,7 +2068,7 @@
2244
2068
  isRequired: isRequired
2245
2069
  }
2246
2070
  },
2247
- sx: styles$4.unit,
2071
+ sx: styles$2.unit,
2248
2072
  disabled: isDisabled,
2249
2073
  defaultValue: 'FL',
2250
2074
  onChange: function onChange() {
@@ -2261,7 +2085,8 @@
2261
2085
  }, allowedLevelUnitsForFir[key]);
2262
2086
  }))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2263
2087
  item: true,
2264
- xs: 6
2088
+ xs: 8,
2089
+ md: 6
2265
2090
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
2266
2091
  name: "level.value",
2267
2092
  label: "Level",
@@ -2285,7 +2110,7 @@
2285
2110
  },
2286
2111
  disabled: isDisabled,
2287
2112
  autoFocus: true
2288
- }))) : null))));
2113
+ }))) : null)));
2289
2114
  };
2290
2115
 
2291
2116
  /* *
@@ -2301,8 +2126,8 @@
2301
2126
  * See the License for the specific language governing permissions and
2302
2127
  * limitations under the License.
2303
2128
  *
2304
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2305
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2129
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2130
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
2306
2131
  * */
2307
2132
 
2308
2133
  var ObservationForecast = function ObservationForecast(_a) {
@@ -2315,20 +2140,13 @@
2315
2140
  getValues = _b.getValues;
2316
2141
 
2317
2142
  var isRequired = shared.useDraftFormHelpers().isRequired;
2318
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2319
- item: true,
2320
- container: true,
2321
- spacing: 2
2322
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2323
- item: true,
2324
- xs: 4,
2325
- container: true,
2326
- justifyContent: "flex-end"
2327
- }), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2328
- item: true,
2329
- xs: 8,
2330
- container: true,
2331
- justifyContent: "flex-start"
2143
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2144
+ sx: {
2145
+ paddingTop: '8px!important',
2146
+ '+ .MuiGrid-item': {
2147
+ paddingTop: 5
2148
+ }
2149
+ }
2332
2150
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormRadioGroup, {
2333
2151
  name: "isObservationOrForecast",
2334
2152
  disabled: isDisabled,
@@ -2352,7 +2170,7 @@
2352
2170
  label: "Forecast",
2353
2171
  disabled: isDisabled,
2354
2172
  "data-testid": "isObservationOrForecast-FCST"
2355
- }))));
2173
+ })));
2356
2174
  };
2357
2175
 
2358
2176
  /* *
@@ -2368,8 +2186,8 @@
2368
2186
  * See the License for the specific language governing permissions and
2369
2187
  * limitations under the License.
2370
2188
  *
2371
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2372
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2189
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2190
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
2373
2191
  * */
2374
2192
  var ForecastTimeValidation = 'Forecast time should lie between the valid start and valid end time';
2375
2193
 
@@ -2382,23 +2200,8 @@
2382
2200
  return null;
2383
2201
  } : _b;
2384
2202
  var watch = reactHookForm.useFormContext().watch;
2385
- return (!isReadOnly || watch('observationOrForecastTime') !== null) && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2386
- item: true,
2387
- container: true,
2388
- spacing: 2
2389
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2390
- item: true,
2391
- xs: 4,
2392
- container: true,
2393
- justifyContent: "flex-end"
2394
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
2395
- variant: "subtitle1",
2396
- sx: styles$4.label
2397
- }, "At")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2398
- item: true,
2399
- xs: 8,
2400
- container: true,
2401
- justifyContent: "flex-start"
2203
+ return (!isReadOnly || watch('observationOrForecastTime') !== null) && /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2204
+ title: "At"
2402
2205
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
2403
2206
  disablePast: watch('isObservationOrForecast') === 'FCST',
2404
2207
  disableFuture: watch('isObservationOrForecast') === 'OBS',
@@ -2416,8 +2219,9 @@
2416
2219
  },
2417
2220
  disabled: isDisabled,
2418
2221
  helperText: helperText,
2419
- onChange: onChange
2420
- })));
2222
+ onChange: onChange,
2223
+ sx: styles$2.helperText
2224
+ }));
2421
2225
  };
2422
2226
 
2423
2227
  var Phenomenon = function Phenomenon(_a) {
@@ -2434,23 +2238,8 @@
2434
2238
  trigger = _c.trigger;
2435
2239
 
2436
2240
  var phenomenaList = productType === 'sigmet' ? SigmetPhenomena : AirmetPhenomena;
2437
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2438
- item: true,
2439
- container: true,
2440
- spacing: 2
2441
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2442
- item: true,
2443
- xs: 4,
2444
- container: true,
2445
- justifyContent: "flex-end"
2446
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
2447
- variant: "subtitle1",
2448
- sx: styles$4.label
2449
- }, "What")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2450
- item: true,
2451
- xs: 8,
2452
- container: true,
2453
- justifyContent: "flex-start"
2241
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2242
+ title: "What"
2454
2243
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
2455
2244
  name: "phenomenon",
2456
2245
  label: "Select phenomenon",
@@ -2485,7 +2274,7 @@
2485
2274
  value: key,
2486
2275
  key: key
2487
2276
  }, phenomenaList[key]);
2488
- }))));
2277
+ })));
2489
2278
  };
2490
2279
 
2491
2280
  /* *
@@ -2501,8 +2290,8 @@
2501
2290
  * See the License for the specific language governing permissions and
2502
2291
  * limitations under the License.
2503
2292
  *
2504
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2505
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2293
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2294
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
2506
2295
  * */
2507
2296
  var noIntersectionMessage$1 = 'The start position needs to be (partly) inside the FIR';
2508
2297
  var maximum6PointsMessage$1 = 'The start position drawing allows a maximum of 6 individual points';
@@ -2522,22 +2311,9 @@
2522
2311
  watch = _c.watch;
2523
2312
 
2524
2313
  var isDraft = shared.useDraftFormHelpers().isDraft;
2525
- return !isReadOnly && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2526
- item: true,
2527
- container: true,
2528
- spacing: 2,
2529
- sx: styles$4.drawSection
2530
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2531
- item: true,
2532
- xs: 4,
2533
- container: true,
2534
- justifyContent: "flex-end"
2535
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
2536
- variant: "subtitle1",
2537
- sx: styles$4.label
2538
- }, "Start position")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2539
- item: true,
2540
- xs: 8,
2314
+ return !isReadOnly && /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2315
+ title: "Start position",
2316
+ sx: styles$2.drawSection,
2541
2317
  "data-testid": "startGeometry"
2542
2318
  }, /*#__PURE__*/React__default["default"].createElement(DrawTools, {
2543
2319
  type: StartOrEndDrawing.start,
@@ -2547,7 +2323,7 @@
2547
2323
  }
2548
2324
  }), drawMode[StartOrEndDrawing.start] && /*#__PURE__*/React__default["default"].createElement(material.FormHelperText, {
2549
2325
  variant: "filled",
2550
- sx: styles$4.quitDrawModeMessage
2326
+ sx: styles$2.quitDrawModeMessage
2551
2327
  }, exitDrawModeMessage), !!errors.startGeometry && /*#__PURE__*/React__default["default"].createElement(material.FormHelperText, {
2552
2328
  error: true,
2553
2329
  variant: "filled"
@@ -2577,7 +2353,7 @@
2577
2353
  }
2578
2354
  }), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
2579
2355
  name: "startGeometryIntersect"
2580
- })));
2356
+ }));
2581
2357
  };
2582
2358
 
2583
2359
  /* *
@@ -2593,8 +2369,8 @@
2593
2369
  * See the License for the specific language governing permissions and
2594
2370
  * limitations under the License.
2595
2371
  *
2596
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2597
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2372
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2373
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
2598
2374
  * */
2599
2375
  var movementStepValMessageKT = 'Speed should be rounded to the nearest 5kt';
2600
2376
  var movementStepValMessageKMH = 'Speed should be rounded to the nearest 10kmh';
@@ -2671,24 +2447,9 @@
2671
2447
  var selectedFIR = watch('locationIndicatorATSR'); // Get allowed movement units based on selected FIR - if no FIR selected, allow all units
2672
2448
 
2673
2449
  var allowedMovementUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'movement_unit', MovementUnit);
2674
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2675
- item: true,
2676
- container: true,
2677
- spacing: 2,
2678
- sx: styles$4.containerItem
2679
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2680
- item: true,
2681
- xs: 4,
2682
- container: true,
2683
- justifyContent: "flex-end"
2684
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
2685
- variant: "subtitle1",
2686
- sx: styles$4.label
2687
- }, "Progress")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2688
- item: true,
2689
- xs: 8,
2690
- container: true,
2691
- justifyContent: "flex-start"
2450
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2451
+ title: "Progress",
2452
+ sx: styles$2.containerItem
2692
2453
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2693
2454
  item: true,
2694
2455
  xs: 12
@@ -2727,7 +2488,7 @@
2727
2488
  rules: {
2728
2489
  validate: isRequired
2729
2490
  },
2730
- sx: styles$4.movement,
2491
+ sx: styles$2.movement,
2731
2492
  disabled: isDisabled,
2732
2493
  "data-testid": "movement-movementDirection",
2733
2494
  onChange: function onChange(event) {
@@ -2754,7 +2515,7 @@
2754
2515
  rules: {
2755
2516
  validate: isRequired
2756
2517
  },
2757
- sx: styles$4.unit,
2518
+ sx: styles$2.unit,
2758
2519
  disabled: isDisabled,
2759
2520
  defaultValue: 'KT',
2760
2521
  "data-testid": "movement-movementUnit",
@@ -2810,7 +2571,7 @@
2810
2571
  item: true,
2811
2572
  xs: 12,
2812
2573
  "data-testid": "endGeometry",
2813
- sx: styles$4.drawSection
2574
+ sx: styles$2.drawSection
2814
2575
  }, !isReadOnly && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(DrawTools, {
2815
2576
  "data-testid": "endGeometry-drawTools",
2816
2577
  type: StartOrEndDrawing.end,
@@ -2820,7 +2581,7 @@
2820
2581
  }
2821
2582
  }), drawMode[StartOrEndDrawing.end] && /*#__PURE__*/React__default["default"].createElement(material.FormHelperText, {
2822
2583
  variant: "filled",
2823
- sx: styles$4.quitDrawModeMessage
2584
+ sx: styles$2.quitDrawModeMessage
2824
2585
  }, exitDrawModeMessage), !!errors.endGeometry && /*#__PURE__*/React__default["default"].createElement(material.FormHelperText, {
2825
2586
  error: true,
2826
2587
  variant: "filled"
@@ -2850,7 +2611,7 @@
2850
2611
  }
2851
2612
  }), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
2852
2613
  name: "endGeometryIntersect"
2853
- })))));
2614
+ }))));
2854
2615
  };
2855
2616
 
2856
2617
  /* *
@@ -2866,8 +2627,8 @@
2866
2627
  * See the License for the specific language governing permissions and
2867
2628
  * limitations under the License.
2868
2629
  *
2869
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2870
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2630
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2631
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
2871
2632
  * */
2872
2633
 
2873
2634
  var SelectFIR = function SelectFIR(_a) {
@@ -2882,24 +2643,9 @@
2882
2643
  optionsFIR = _b.optionsFIR,
2883
2644
  allFIRS = _b.allFIRS;
2884
2645
 
2885
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2886
- item: true,
2887
- container: true,
2888
- spacing: 2,
2889
- sx: styles$4.containerItem
2890
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2891
- item: true,
2892
- xs: 4,
2893
- container: true,
2894
- justifyContent: "flex-end"
2895
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
2896
- variant: "subtitle1",
2897
- sx: styles$4.label
2898
- }, "Where")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2899
- item: true,
2900
- xs: 8,
2901
- container: true,
2902
- justifyContent: "flex-start"
2646
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2647
+ title: "Where",
2648
+ sx: styles$2.containerItem
2903
2649
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
2904
2650
  name: "locationIndicatorATSR",
2905
2651
  label: "Select FIR",
@@ -2931,7 +2677,7 @@
2931
2677
  }), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
2932
2678
  name: "firGeometry",
2933
2679
  defaultValue: getFir()
2934
- })));
2680
+ }));
2935
2681
  };
2936
2682
 
2937
2683
  /* *
@@ -2947,8 +2693,8 @@
2947
2693
  * See the License for the specific language governing permissions and
2948
2694
  * limitations under the License.
2949
2695
  *
2950
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2951
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2696
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2697
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
2952
2698
  * */
2953
2699
 
2954
2700
  var Type = function Type(_a) {
@@ -2956,24 +2702,9 @@
2956
2702
  isDisabled = _a.isDisabled;
2957
2703
  var watch = reactHookForm.useFormContext().watch;
2958
2704
  var isRequired = shared.useDraftFormHelpers().isRequired;
2959
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2960
- item: true,
2961
- container: true,
2962
- spacing: 2,
2963
- sx: styles$4.containerItem
2964
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2965
- item: true,
2966
- xs: 4,
2967
- container: true,
2968
- justifyContent: "flex-end"
2969
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
2970
- variant: "subtitle1",
2971
- sx: styles$4.label
2972
- }, "Type")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2973
- item: true,
2974
- xs: 8,
2975
- container: true,
2976
- justifyContent: "flex-start"
2705
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2706
+ title: "Type",
2707
+ sx: styles$2.containerItem
2977
2708
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
2978
2709
  item: true,
2979
2710
  xs: 12
@@ -3001,7 +2732,7 @@
3001
2732
  label: "Exercise",
3002
2733
  disabled: isDisabled,
3003
2734
  "data-testid": "type-EXERCISE"
3004
- })))));
2735
+ }))));
3005
2736
  };
3006
2737
 
3007
2738
  /* *
@@ -3017,10 +2748,14 @@
3017
2748
  * See the License for the specific language governing permissions and
3018
2749
  * limitations under the License.
3019
2750
  *
3020
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3021
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2751
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2752
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
3022
2753
  * */
3023
2754
  var VALID_FROM_TIME_DELAY_IN_MINUTES = 30;
2755
+ var VALID_FROM_ERROR_BEFORE_CURRENT = 'Valid from time cannot be before current time';
2756
+ var getValidFromXHoursBeforeMessage = function getValidFromXHoursBeforeMessage(hours) {
2757
+ return "Valid from time can be no more than " + hours + " hours after current time";
2758
+ };
3024
2759
 
3025
2760
  var ValidFrom = function ValidFrom(_a) {
3026
2761
  var productType = _a.productType,
@@ -3036,23 +2771,8 @@
3036
2771
 
3037
2772
  var isRequired = shared.useDraftFormHelpers().isRequired;
3038
2773
  var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
3039
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3040
- item: true,
3041
- container: true,
3042
- spacing: 2
3043
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3044
- item: true,
3045
- xs: 4,
3046
- container: true,
3047
- justifyContent: "flex-end"
3048
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
3049
- variant: "subtitle1",
3050
- sx: styles$4.label
3051
- }, "Valid from")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3052
- item: true,
3053
- xs: 8,
3054
- container: true,
3055
- justifyContent: "flex-start"
2774
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2775
+ title: "Valid from"
3056
2776
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
3057
2777
  disablePast: true,
3058
2778
  name: "validDateStart",
@@ -3063,11 +2783,11 @@
3063
2783
  isValidDate: formFields.isValidDate,
3064
2784
  // The validity start can not be before the current time
3065
2785
  isValueBeforeCurrentTime: function isValueBeforeCurrentTime(value) {
3066
- return formFields.isXHoursBefore(value, moment__default["default"].utc().format(), 0) || 'Valid from time cannot be before current time';
2786
+ return formFields.isXHoursBefore(value, moment__default["default"].utc().format(), 0) || VALID_FROM_ERROR_BEFORE_CURRENT;
3067
2787
  },
3068
2788
  // The current time can be no more than 4 hours before the validity start (12 for VA/TC SIGMET)
3069
2789
  isCurrentTimeXHoursBeforeValue: function isCurrentTimeXHoursBeforeValue(value) {
3070
- return formFields.isXHoursBefore(moment__default["default"].utc().format(), value, getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config)) || "Valid from time can be no more than " + getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config) + " hours after current time";
2790
+ return formFields.isXHoursBefore(moment__default["default"].utc().format(), value, getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config)) || getValidFromXHoursBeforeMessage(getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config));
3071
2791
  }
3072
2792
  }
3073
2793
  },
@@ -3084,9 +2804,6 @@
3084
2804
  },
3085
2805
  disabled: isDisabled,
3086
2806
  "data-testid": "valid-from"
3087
- })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3088
- item: true,
3089
- xs: 6
3090
2807
  }));
3091
2808
  };
3092
2809
 
@@ -3103,8 +2820,8 @@
3103
2820
  * See the License for the specific language governing permissions and
3104
2821
  * limitations under the License.
3105
2822
  *
3106
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3107
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
2823
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2824
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
3108
2825
  * */
3109
2826
  var DEFAULT_VALID_TIME_SIGMET = 3;
3110
2827
  var DEFAULT_VALID_TIME_AIRMET = 1;
@@ -3124,26 +2841,11 @@
3124
2841
  getValues = _c.getValues,
3125
2842
  trigger = _c.trigger;
3126
2843
 
3127
- var isRequired = shared.useDraftFormHelpers().isRequired;
3128
- var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
3129
- var defaultHoursValid = getDefaultHoursValid(productType);
3130
- return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3131
- item: true,
3132
- container: true,
3133
- spacing: 2
3134
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3135
- item: true,
3136
- xs: 4,
3137
- container: true,
3138
- justifyContent: "flex-end"
3139
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
3140
- variant: "subtitle1",
3141
- sx: styles$4.label
3142
- }, "Valid until")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3143
- item: true,
3144
- xs: 8,
3145
- container: true,
3146
- justifyContent: "flex-start"
2844
+ var isRequired = shared.useDraftFormHelpers().isRequired;
2845
+ var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
2846
+ var defaultHoursValid = getDefaultHoursValid(productType);
2847
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
2848
+ title: "Valid until"
3147
2849
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
3148
2850
  disablePast: true,
3149
2851
  name: "validDateEnd",
@@ -3174,29 +2876,9 @@
3174
2876
 
3175
2877
  _onChange();
3176
2878
  }
3177
- })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3178
- item: true,
3179
- xs: 6
3180
2879
  }));
3181
2880
  };
3182
2881
 
3183
- /* *
3184
- * Licensed under the Apache License, Version 2.0 (the "License");
3185
- * you may not use this file except in compliance with the License.
3186
- * You may obtain a copy of the License at
3187
- *
3188
- * http://www.apache.org/licenses/LICENSE-2.0
3189
- *
3190
- * Unless required by applicable law or agreed to in writing, software
3191
- * distributed under the License is distributed on an "AS IS" BASIS,
3192
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3193
- * See the License for the specific language governing permissions and
3194
- * limitations under the License.
3195
- *
3196
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3197
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
3198
- * */
3199
-
3200
2882
  var VolcanicFields = function VolcanicFields(_a) {
3201
2883
  var isDisabled = _a.isDisabled,
3202
2884
  isReadOnly = _a.isReadOnly,
@@ -3224,7 +2906,7 @@
3224
2906
  }, (!isReadOnly || !!watch('vaSigmetVolcanoName')) && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3225
2907
  item: true,
3226
2908
  xs: 12,
3227
- sx: styles$4.volcanicField
2909
+ sx: styles$2.volcanicField
3228
2910
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormTextField, {
3229
2911
  name: "vaSigmetVolcanoName",
3230
2912
  label: "Volcano name",
@@ -3252,7 +2934,7 @@
3252
2934
  }
3253
2935
  }
3254
2936
  },
3255
- sx: styles$4.latitude,
2937
+ sx: __assign(__assign({}, styles$2.latitude), styles$2.helperText),
3256
2938
  disabled: isDisabled,
3257
2939
  helperText: helperText,
3258
2940
  onChange: function onChange() {
@@ -3280,7 +2962,8 @@
3280
2962
  helperText: helperText,
3281
2963
  onChange: function onChange() {
3282
2964
  return trigger('vaSigmetVolcanoCoordinates.latitude');
3283
- }
2965
+ },
2966
+ sx: styles$2.helperText
3284
2967
  }))));
3285
2968
  };
3286
2969
 
@@ -3339,7 +3022,7 @@
3339
3022
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3340
3023
  item: true,
3341
3024
  xs: 12,
3342
- sx: styles$4.surfaceVisibility
3025
+ sx: styles$2.surfaceVisibility
3343
3026
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
3344
3027
  name: "visibilityValue",
3345
3028
  "data-testid": "surfaceVisibility-visibilityValue",
@@ -3444,7 +3127,7 @@
3444
3127
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3445
3128
  item: true,
3446
3129
  xs: 12,
3447
- sx: styles$4.surfaceWind
3130
+ sx: styles$2.surfaceWind
3448
3131
  }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
3449
3132
  name: "windDirection",
3450
3133
  label: "Set wind direction",
@@ -3480,7 +3163,7 @@
3480
3163
  isRequired: isRequired
3481
3164
  }
3482
3165
  },
3483
- sx: styles$4.unit,
3166
+ sx: styles$2.unit,
3484
3167
  disabled: isDisabled,
3485
3168
  defaultValue: 'KT',
3486
3169
  "data-testid": "surfaceWind-windUnit",
@@ -3582,7 +3265,7 @@
3582
3265
  item: true,
3583
3266
  container: true,
3584
3267
  spacing: 2,
3585
- sx: styles$4.containerItem
3268
+ sx: styles$2.containerItem
3586
3269
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3587
3270
  item: true,
3588
3271
  xs: 4,
@@ -3590,7 +3273,7 @@
3590
3273
  justifyContent: "flex-end"
3591
3274
  }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
3592
3275
  variant: "subtitle1",
3593
- sx: styles$4.label
3276
+ sx: styles$2.label
3594
3277
  }, "Levels")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3595
3278
  item: true,
3596
3279
  xs: 8,
@@ -3657,7 +3340,7 @@
3657
3340
  isRequired: isRequired
3658
3341
  }
3659
3342
  },
3660
- sx: styles$4.unit,
3343
+ sx: styles$2.unit,
3661
3344
  disabled: isDisabled,
3662
3345
  defaultValue: 'FT',
3663
3346
  onChange: function onChange() {
@@ -3686,7 +3369,7 @@
3686
3369
  name: "cloudLevel.value",
3687
3370
  label: "Upper level",
3688
3371
  "data-testid": "cloudLevel-value",
3689
- sx: styles$4.levelField,
3372
+ sx: styles$2.levelField,
3690
3373
  rules: {
3691
3374
  validate: {
3692
3375
  isRequired: isRequired,
@@ -3763,7 +3446,7 @@
3763
3446
  isRequired: isRequired
3764
3447
  }
3765
3448
  },
3766
- sx: styles$4.unit,
3449
+ sx: styles$2.unit,
3767
3450
  disabled: isDisabled,
3768
3451
  defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
3769
3452
  onChange: function onChange() {
@@ -3817,22 +3500,6 @@
3817
3500
  })))))));
3818
3501
  };
3819
3502
 
3820
- var styles$2 = {
3821
- tacOutput: {
3822
- paddingTop: '16px',
3823
- whiteSpace: 'break-spaces'
3824
- },
3825
- tacLine: {
3826
- backgroundColor: '#FFF',
3827
- margin: '0',
3828
- padding: '.1em .1em .1em 0.8em',
3829
- textIndent: '-0.7em',
3830
- borderRadius: '3px',
3831
- '&:hover': {
3832
- backgroundColor: '#F4F4F4'
3833
- }
3834
- }
3835
- };
3836
3503
  var noTAC = 'Missing data: no TAC can be generated'; // Ensure we have enough data to retrieve a TAC
3837
3504
 
3838
3505
  var shouldRetrieveTAC = function shouldRetrieveTAC(product) {
@@ -3894,45 +3561,376 @@
3894
3561
  ];
3895
3562
  }
3896
3563
  });
3897
- });
3898
- };
3899
-
3900
- React__default["default"].useEffect(function () {
3901
- if (shouldRetrieveTAC(initialProduct)) {
3902
- retrieveTAC(initialProduct);
3903
- } // eslint-disable-next-line react-hooks/exhaustive-deps
3904
-
3905
- }, []);
3906
-
3907
- var update = function update(formValues) {
3908
- if (shouldRetrieveTAC(formValues)) {
3909
- retrieveTAC(formValues);
3910
- } else if (isMounted.current) {
3911
- setTAC(noTAC);
3564
+ });
3565
+ };
3566
+
3567
+ React__default["default"].useEffect(function () {
3568
+ if (shouldRetrieveTAC(initialProduct)) {
3569
+ retrieveTAC(initialProduct);
3570
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
3571
+
3572
+ }, []);
3573
+
3574
+ var update = function update(formValues) {
3575
+ if (shouldRetrieveTAC(formValues)) {
3576
+ retrieveTAC(formValues);
3577
+ } else if (isMounted.current) {
3578
+ setTAC(noTAC);
3579
+ }
3580
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
3581
+
3582
+
3583
+ var delayedQuery = React__default["default"].useCallback(lodash.debounce(update, 1000), []);
3584
+ return [TAC, delayedQuery];
3585
+ };
3586
+
3587
+ var ProductFormTAC = function ProductFormTAC(_a) {
3588
+ var tac = _a.tac;
3589
+ var tacLines = tac.split('\n');
3590
+ var hasTac = tacLines.length && tacLines.toString() !== noTAC;
3591
+ return /*#__PURE__*/React__default["default"].createElement(material.Typography, {
3592
+ variant: "body2",
3593
+ component: "div",
3594
+ sx: {
3595
+ paddingTop: '16px',
3596
+ whiteSpace: 'break-spaces'
3597
+ },
3598
+ "data-testid": "productform-tac-message"
3599
+ }, tacLines.map(function (line) {
3600
+ return /*#__PURE__*/React__default["default"].createElement(material.Box, {
3601
+ component: "p",
3602
+ key: line,
3603
+ sx: {
3604
+ margin: 0,
3605
+ fontSize: hasTac ? '1.125rem' : '1rem',
3606
+ fontWeight: 'normal',
3607
+ fontStretch: 'normal',
3608
+ fontStyle: 'normal',
3609
+ lineHeight: 1.56,
3610
+ letterSpacing: '0.5px'
3611
+ },
3612
+ "data-testid": "productform-tac-message-line"
3613
+ }, line);
3614
+ }));
3615
+ };
3616
+
3617
+ var IssuedAt = function IssuedAt(_a) {
3618
+ var date = _a.date;
3619
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
3620
+ title: "Issued at"
3621
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3622
+ item: true,
3623
+ xs: 12
3624
+ }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
3625
+ variant: "body2",
3626
+ sx: __assign(__assign({}, styles$2.body), {
3627
+ fontSize: '1rem',
3628
+ color: 'geowebColors.buttons.primary.disabled.color'
3629
+ })
3630
+ }, date)));
3631
+ };
3632
+
3633
+ /* *
3634
+ * Licensed under the Apache License, Version 2.0 (the "License");
3635
+ * you may not use this file except in compliance with the License.
3636
+ * You may obtain a copy of the License at
3637
+ *
3638
+ * http://www.apache.org/licenses/LICENSE-2.0
3639
+ *
3640
+ * Unless required by applicable law or agreed to in writing, software
3641
+ * distributed under the License is distributed on an "AS IS" BASIS,
3642
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3643
+ * See the License for the specific language governing permissions and
3644
+ * limitations under the License.
3645
+ *
3646
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3647
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
3648
+ * */
3649
+
3650
+ var Tac = function Tac(_a) {
3651
+ var tac = _a.tac,
3652
+ children = _a.children;
3653
+ return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
3654
+ title: "TAC",
3655
+ sx: {
3656
+ paddingTop: 2
3657
+ }
3658
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3659
+ item: true,
3660
+ xs: 12
3661
+ }, /*#__PURE__*/React__default["default"].createElement(ProductFormTAC, {
3662
+ tac: tac
3663
+ }), children));
3664
+ };
3665
+
3666
+ /* *
3667
+ * Licensed under the Apache License, Version 2.0 (the "License");
3668
+ * you may not use this file except in compliance with the License.
3669
+ * You may obtain a copy of the License at
3670
+ *
3671
+ * http://www.apache.org/licenses/LICENSE-2.0
3672
+ *
3673
+ * Unless required by applicable law or agreed to in writing, software
3674
+ * distributed under the License is distributed on an "AS IS" BASIS,
3675
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3676
+ * See the License for the specific language governing permissions and
3677
+ * limitations under the License.
3678
+ *
3679
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3680
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
3681
+ * */
3682
+ var adagucBaseUrl = 'https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver';
3683
+ var KNMIGeoWebOverlays = {
3684
+ name: 'KNMIGeoWebOverlays',
3685
+ url: adagucBaseUrl + "?dataset=OVL",
3686
+ id: 'knmigeoweboverlays'
3687
+ };
3688
+ var northSeaPlatforms = {
3689
+ service: KNMIGeoWebOverlays.url,
3690
+ name: 'northseastations',
3691
+ format: 'image/png',
3692
+ layerType: core.mapTypes.LayerType.overLayer,
3693
+ enabled: true
3694
+ };
3695
+ var majorAirportsEHAA = {
3696
+ service: KNMIGeoWebOverlays.url,
3697
+ name: 'airports',
3698
+ format: 'image/png',
3699
+ layerType: core.mapTypes.LayerType.overLayer,
3700
+ enabled: true
3701
+ };
3702
+
3703
+ var allowOneGeoJSONFeature = function allowOneGeoJSONFeature(mode, geojson) {
3704
+ switch (mode) {
3705
+ case MapDrawMode.BOX:
3706
+ case MapDrawMode.POLYGON:
3707
+ return geojson.features[0].geometry.coordinates.length > 1 ? produce__default["default"](geojson, function (draft) {
3708
+ draft.features[0].geometry.coordinates = [draft.features[0].geometry.coordinates[1]];
3709
+ }) : geojson;
3710
+
3711
+ default:
3712
+ return geojson;
3713
+ }
3714
+ };
3715
+
3716
+ var MapViewGeoJson = function MapViewGeoJson(_a) {
3717
+ var geoJSONs = _a.geoJSONs,
3718
+ _b = _a.setLayerGeoJSONs,
3719
+ setLayerGeoJSONs = _b === void 0 ? function () {} : _b,
3720
+ _c = _a.layerDrawModes,
3721
+ layerDrawModes = _c === void 0 ? {
3722
+ start: null,
3723
+ end: null
3724
+ } : _c,
3725
+ _d = _a.drawMode,
3726
+ drawMode = _d === void 0 ? {
3727
+ start: null,
3728
+ end: null
3729
+ } : _d,
3730
+ _e = _a.setDrawMode,
3731
+ setDrawMode = _e === void 0 ? function () {} : _e,
3732
+ _f = _a.exitDrawModeCallbackStart,
3733
+ exitDrawModeCallbackStart = _f === void 0 ? function () {} : _f,
3734
+ _g = _a.exitDrawModeCallbackEnd,
3735
+ exitDrawModeCallbackEnd = _g === void 0 ? function () {} : _g;
3736
+ var dispatch = reactRedux.useDispatch();
3737
+ var firstMap = reactRedux.useSelector(function (store) {
3738
+ return core.mapSelectors.getFirstMap(store);
3739
+ }, reactRedux.shallowEqual);
3740
+ var firstMapId = firstMap && firstMap.id ? firstMap.id : null;
3741
+ var mapLayers = reactRedux.useSelector(function (store) {
3742
+ return core.mapSelectors.getMapLayers(store, firstMapId);
3743
+ }, reactRedux.shallowEqual);
3744
+ var mapDimensions = reactRedux.useSelector(function (store) {
3745
+ return core.mapSelectors.getMapDimensions(store, firstMapId);
3746
+ }, reactRedux.shallowEqual);
3747
+ var mapId = React__namespace.useRef("sigmet-" + core.generateMapId()).current;
3748
+ var timesliderId = React__namespace.useRef("sigmet-" + core.generateTimesliderId()).current;
3749
+ var syncGroupAddGroup = React__namespace.useCallback(function (payload) {
3750
+ dispatch(core.SyncGroups.actions.syncGroupAddGroup(payload));
3751
+ }, [dispatch]);
3752
+ var syncGroupAddTarget = React__namespace.useCallback(function (payload) {
3753
+ dispatch(core.SyncGroups.actions.syncGroupAddTarget(payload));
3754
+ }, [dispatch]);
3755
+ React__namespace.useEffect(function () {
3756
+ if (mapLayers && mapLayers.length) {
3757
+ // use maplayers, but change layerId and current mapId
3758
+ var layers = mapLayers.map(function (layer) {
3759
+ return __assign(__assign({}, layer), {
3760
+ id: core.generateLayerId(),
3761
+ mapId: mapId
3762
+ });
3763
+ });
3764
+ dispatch(core.mapActions.setLayers({
3765
+ mapId: mapId,
3766
+ layers: layers
3767
+ }));
3768
+ }
3769
+
3770
+ if (mapDimensions && mapDimensions.length) {
3771
+ dispatch(core.mapActions.mapChangeDimension({
3772
+ mapId: mapId,
3773
+ dimension: mapDimensions[0],
3774
+ origin: 'MapViewGeoJson'
3775
+ }));
3776
+ }
3777
+
3778
+ dispatch(core.mapActions.setBaseLayers({
3779
+ mapId: mapId,
3780
+ layers: [__assign(__assign({}, core.publicLayers.baseLayerGrey), {
3781
+ id: "baselayer-" + mapId
3782
+ }), __assign(__assign({}, core.publicLayers.overLayer), {
3783
+ id: "countryborders-" + mapId
3784
+ }), __assign(__assign({}, northSeaPlatforms), {
3785
+ id: "northseaplatforms-" + mapId
3786
+ }), __assign(__assign({}, majorAirportsEHAA), {
3787
+ id: "majorairportsehaa-" + mapId
3788
+ })]
3789
+ }));
3790
+ dispatch(core.mapActions.setBbox({
3791
+ mapId: mapId,
3792
+ bbox: srsAndBboxDefault.bbox,
3793
+ srs: srsAndBboxDefault.srs
3794
+ }));
3795
+ syncGroupAddGroup({
3796
+ groupId: 'Time_SigmetAirmet',
3797
+ title: 'Group 1 for sigmet/airmet map',
3798
+ type: core.SyncGroups.constants.SYNCGROUPS_TYPE_SETTIME
3799
+ });
3800
+ syncGroupAddTarget({
3801
+ groupId: 'Time_SigmetAirmet',
3802
+ targetId: mapId
3803
+ });
3804
+ syncGroupAddTarget({
3805
+ groupId: 'Time_SigmetAirmet',
3806
+ targetId: timesliderId
3807
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
3808
+ }, []);
3809
+ return /*#__PURE__*/React__namespace.createElement("div", {
3810
+ style: {
3811
+ position: 'relative',
3812
+ height: '100%'
3813
+ },
3814
+ "data-testid": "MapView"
3815
+ }, /*#__PURE__*/React__namespace.createElement(core.MapControls, null, /*#__PURE__*/React__namespace.createElement(core.LayerManagerMapButtonConnect, {
3816
+ source: "module",
3817
+ mapId: mapId
3818
+ }), /*#__PURE__*/React__namespace.createElement(core.LegendMapButtonConnect, {
3819
+ source: "module",
3820
+ mapId: mapId
3821
+ }), /*#__PURE__*/React__namespace.createElement(core.MultiDimensionSelectMapButtonsConnect, {
3822
+ source: "module",
3823
+ mapId: mapId
3824
+ })), /*#__PURE__*/React__namespace.createElement(core.MapViewConnect, {
3825
+ mapId: mapId
3826
+ }, /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
3827
+ id: "geojsonlayer-fir-" + mapId,
3828
+ isInEditMode: false,
3829
+ geojson: geoJSONs.fir
3830
+ }), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
3831
+ id: "geojsonlayer-end-" + mapId,
3832
+ isInEditMode: drawMode.end !== null && layerDrawModes.end !== null,
3833
+ geojson: geoJSONs.end,
3834
+ drawMode: layerDrawModes.end,
3835
+ updateGeojson: function updateGeojson(geojson) {
3836
+ var end = allowOneGeoJSONFeature(layerDrawModes.end, geojson);
3837
+ setLayerGeoJSONs(__assign(__assign({}, geoJSONs), {
3838
+ end: end
3839
+ }));
3840
+ },
3841
+ exitDrawModeCallback: function exitDrawModeCallback() {
3842
+ setDrawMode({
3843
+ start: null,
3844
+ end: null
3845
+ });
3846
+ exitDrawModeCallbackEnd();
3847
+ },
3848
+ featureNrToEdit: 0
3849
+ }), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
3850
+ id: "geojsonlayer-start-" + mapId,
3851
+ isInEditMode: drawMode.start !== null && layerDrawModes.start !== null,
3852
+ geojson: geoJSONs.start,
3853
+ drawMode: layerDrawModes.start,
3854
+ updateGeojson: function updateGeojson(geojson) {
3855
+ var start = allowOneGeoJSONFeature(layerDrawModes.start, geojson);
3856
+ setLayerGeoJSONs(__assign(__assign({}, geoJSONs), {
3857
+ start: start
3858
+ }));
3859
+ },
3860
+ exitDrawModeCallback: function exitDrawModeCallback() {
3861
+ setDrawMode({
3862
+ start: null,
3863
+ end: null
3864
+ });
3865
+ exitDrawModeCallbackStart();
3866
+ },
3867
+ featureNrToEdit: 0
3868
+ }), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
3869
+ id: "geojsonlayer-intersection-end-" + mapId,
3870
+ isInEditMode: false,
3871
+ geojson: geoJSONs.intersectionEnd
3872
+ }), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
3873
+ id: "geojsonlayer-intersection-start-" + mapId,
3874
+ isInEditMode: false,
3875
+ geojson: geoJSONs.intersectionStart
3876
+ })), /*#__PURE__*/React__namespace.createElement("div", {
3877
+ style: {
3878
+ position: 'absolute',
3879
+ left: '0',
3880
+ bottom: '0',
3881
+ zIndex: 1000,
3882
+ width: '100%'
3912
3883
  }
3913
- }; // eslint-disable-next-line react-hooks/exhaustive-deps
3884
+ }, /*#__PURE__*/React__namespace.createElement(core.TimeSliderConnect, {
3885
+ sourceId: timesliderId,
3886
+ mapId: mapId
3887
+ })), /*#__PURE__*/React__namespace.createElement(core.LegendConnect, {
3888
+ showMapId: true,
3889
+ mapId: mapId
3890
+ }));
3891
+ };
3914
3892
 
3893
+ var ProductFormLayout = function ProductFormLayout(_a) {
3894
+ var _b, _c, _d;
3915
3895
 
3916
- var delayedQuery = React__default["default"].useCallback(lodash.debounce(update, 1000), []);
3917
- return [TAC, delayedQuery];
3918
- };
3896
+ var children = _a.children,
3897
+ geojsonProps = __rest(_a, ["children"]);
3919
3898
 
3920
- var ProductFormTAC = function ProductFormTAC(_a) {
3921
- var tac = _a.tac;
3922
- var tacLines = tac.split('\n');
3923
- return /*#__PURE__*/React__default["default"].createElement(material.Typography, {
3924
- variant: "body2",
3925
- component: "div",
3926
- sx: styles$2.tacOutput,
3927
- "data-testid": "productform-tac-message"
3928
- }, tacLines.map(function (line) {
3929
- return /*#__PURE__*/React__default["default"].createElement(material.Box, {
3930
- component: "p",
3931
- key: line,
3932
- sx: styles$2.tacLine,
3933
- "data-testid": "productform-tac-message-line"
3934
- }, line);
3935
- }));
3899
+ var theme = material.useTheme();
3900
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3901
+ container: true,
3902
+ sx: (_b = {
3903
+ height: '100%',
3904
+ overflowY: 'auto'
3905
+ }, _b[theme.breakpoints.up('sm')] = {
3906
+ overflowY: 'hidden'
3907
+ }, _b)
3908
+ }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3909
+ item: true,
3910
+ xs: 12,
3911
+ sm: 6,
3912
+ lg: 8,
3913
+ sx: (_c = {
3914
+ height: 400,
3915
+ padding: 2
3916
+ }, _c[theme.breakpoints.up('sm')] = {
3917
+ height: '100%',
3918
+ padding: 0
3919
+ }, _c)
3920
+ }, /*#__PURE__*/React__default["default"].createElement(MapViewGeoJson, __assign({}, geojsonProps))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
3921
+ item: true,
3922
+ xs: 12,
3923
+ sm: 6,
3924
+ lg: 4,
3925
+ sx: (_d = {
3926
+ paddingTop: 5,
3927
+ paddingBottom: 5,
3928
+ paddingRight: 2
3929
+ }, _d[theme.breakpoints.up('sm')] = {
3930
+ overflowY: 'auto',
3931
+ height: '100%'
3932
+ }, _d)
3933
+ }, children));
3936
3934
  };
3937
3935
 
3938
3936
  var SigmetForm = function SigmetForm(_a) {
@@ -4031,10 +4029,10 @@
4031
4029
  }, [drawMode.start, drawMode.end, isReadOnly, isDisabled]);
4032
4030
 
4033
4031
  var renderForm = function renderForm() {
4034
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4032
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4035
4033
  container: true,
4036
4034
  direction: "column",
4037
- spacing: 2
4035
+ spacing: 5
4038
4036
  }, !isCancelSigmet && /*#__PURE__*/React__default["default"].createElement(Phenomenon, {
4039
4037
  productType: "sigmet",
4040
4038
  isDisabled: isDisabled,
@@ -4059,7 +4057,7 @@
4059
4057
  productType: "sigmet",
4060
4058
  isDisabled: isDisabled,
4061
4059
  onChange: onChangeForm
4062
- })), /*#__PURE__*/React__default["default"].createElement(SelectFIR, {
4060
+ }), /*#__PURE__*/React__default["default"].createElement(SelectFIR, {
4063
4061
  productType: "sigmet",
4064
4062
  isDisabled: isDisabled
4065
4063
  }), /*#__PURE__*/React__default["default"].createElement(StartGeometry, {
@@ -4087,74 +4085,18 @@
4087
4085
  }), !isCancelSigmet && /*#__PURE__*/React__default["default"].createElement(Change, {
4088
4086
  isDisabled: isDisabled,
4089
4087
  isReadOnly: isReadOnly
4090
- }), isCancelSigmet && watch('vaSigmetMoveToFIR') && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4091
- item: true,
4092
- container: true,
4093
- spacing: 2
4094
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4095
- item: true,
4096
- xs: 4,
4097
- container: true,
4098
- justifyContent: "flex-end"
4099
- }), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4100
- item: true,
4101
- xs: 8,
4102
- container: true,
4103
- justifyContent: "flex-start"
4104
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4088
+ }), isCancelSigmet && watch('vaSigmetMoveToFIR') && /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4105
4089
  item: true,
4106
4090
  xs: 12
4107
4091
  }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4108
4092
  variant: "body2",
4109
- sx: styles$4.body,
4093
+ sx: styles$2.body,
4110
4094
  "data-testid": "vaSigmetMoveToFIR"
4111
- }, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default["default"].createElement("b", null, " ", watch('vaSigmetMoveToFIR')))))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4112
- item: true,
4113
- container: true,
4114
- spacing: 2,
4115
- sx: styles$4.containerItem
4116
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4117
- item: true,
4118
- xs: 4,
4119
- container: true,
4120
- justifyContent: "flex-end"
4121
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4122
- variant: "subtitle1",
4123
- sx: styles$4.label
4124
- }, "Issued at")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4125
- item: true,
4126
- xs: 8,
4127
- container: true,
4128
- justifyContent: "flex-start"
4129
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4130
- item: true,
4131
- xs: 12
4132
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4133
- variant: "body2",
4134
- sx: styles$4.body
4135
- }, getProductIssueDate(initialSigmet, initialCancelSigmet)))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4136
- item: true,
4137
- container: true,
4138
- spacing: 2
4139
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4140
- item: true,
4141
- xs: 4,
4142
- container: true,
4143
- justifyContent: "flex-end"
4144
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4145
- variant: "subtitle1",
4146
- sx: styles$4.label
4147
- }, "TAC")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4148
- item: true,
4149
- xs: 8,
4150
- container: true,
4151
- justifyContent: "flex-start"
4152
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4153
- item: true,
4154
- xs: 12
4155
- }, /*#__PURE__*/React__default["default"].createElement(ProductFormTAC, {
4095
+ }, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default["default"].createElement("b", null, " ", watch('vaSigmetMoveToFIR'))))), /*#__PURE__*/React__default["default"].createElement(IssuedAt, {
4096
+ date: getProductIssueDate(initialSigmet, initialCancelSigmet)
4097
+ }), /*#__PURE__*/React__default["default"].createElement(Tac, {
4156
4098
  tac: tac
4157
- })))), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
4099
+ }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
4158
4100
  name: "sequence",
4159
4101
  defaultValue: "-1"
4160
4102
  }),
@@ -4183,15 +4125,7 @@
4183
4125
  style: {
4184
4126
  width: '100%'
4185
4127
  }
4186
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4187
- container: true,
4188
- style: {
4189
- height: '100%'
4190
- }
4191
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4192
- item: true,
4193
- xs: 8
4194
- }, /*#__PURE__*/React__default["default"].createElement(MapViewGeoJson, {
4128
+ }, /*#__PURE__*/React__default["default"].createElement(ProductFormLayout, {
4195
4129
  geoJSONs: geoJSONs,
4196
4130
  setLayerGeoJSONs: function setLayerGeoJSONs(geoJSONs) {
4197
4131
  return _setLayerGeoJSONs(createInterSections(geoJSONs));
@@ -4201,11 +4135,7 @@
4201
4135
  setDrawMode: setDrawMode,
4202
4136
  exitDrawModeCallbackStart: updateStartDrawing,
4203
4137
  exitDrawModeCallbackEnd: updateEndDrawing
4204
- })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4205
- item: true,
4206
- xs: 4,
4207
- sx: styles$4.productForm
4208
- }, renderForm())));
4138
+ }, renderForm()));
4209
4139
  };
4210
4140
 
4211
4141
  var AirmetForm = function AirmetForm(_a) {
@@ -4284,10 +4214,10 @@
4284
4214
  }, [drawMode.start, isReadOnly, isDisabled]);
4285
4215
 
4286
4216
  var renderForm = function renderForm() {
4287
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4217
+ return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4288
4218
  container: true,
4289
4219
  direction: "column",
4290
- spacing: 2
4220
+ spacing: 6
4291
4221
  }, !isCancelAirmet && /*#__PURE__*/React__default["default"].createElement(Phenomenon, {
4292
4222
  productType: "airmet",
4293
4223
  isDisabled: isDisabled,
@@ -4314,7 +4244,7 @@
4314
4244
  productType: "airmet",
4315
4245
  isDisabled: isDisabled,
4316
4246
  onChange: onChangeForm
4317
- })), /*#__PURE__*/React__default["default"].createElement(SelectFIR, {
4247
+ }), /*#__PURE__*/React__default["default"].createElement(SelectFIR, {
4318
4248
  productType: "airmet",
4319
4249
  isDisabled: isDisabled
4320
4250
  }), /*#__PURE__*/React__default["default"].createElement(StartGeometry, {
@@ -4341,53 +4271,11 @@
4341
4271
  }), !isCancelAirmet && /*#__PURE__*/React__default["default"].createElement(Change, {
4342
4272
  isDisabled: isDisabled,
4343
4273
  isReadOnly: isReadOnly
4344
- }), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4345
- item: true,
4346
- container: true,
4347
- spacing: 2,
4348
- sx: styles$4.containerItem
4349
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4350
- item: true,
4351
- xs: 4,
4352
- container: true,
4353
- justifyContent: "flex-end"
4354
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4355
- variant: "subtitle1",
4356
- sx: styles$4.label
4357
- }, "Issued at")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4358
- item: true,
4359
- xs: 8,
4360
- container: true,
4361
- justifyContent: "flex-start"
4362
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4363
- item: true,
4364
- xs: 12
4365
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4366
- variant: "body2",
4367
- sx: styles$4.body
4368
- }, getProductIssueDate(initialAirmet, initialCancelAirmet)))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4369
- item: true,
4370
- container: true,
4371
- spacing: 2
4372
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4373
- item: true,
4374
- xs: 4,
4375
- container: true,
4376
- justifyContent: "flex-end"
4377
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4378
- variant: "subtitle1",
4379
- sx: styles$4.label
4380
- }, "TAC")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4381
- item: true,
4382
- xs: 8,
4383
- container: true,
4384
- justifyContent: "flex-start"
4385
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4386
- item: true,
4387
- xs: 12
4388
- }, /*#__PURE__*/React__default["default"].createElement(ProductFormTAC, {
4274
+ }), /*#__PURE__*/React__default["default"].createElement(IssuedAt, {
4275
+ date: getProductIssueDate(initialAirmet, initialCancelAirmet)
4276
+ }), /*#__PURE__*/React__default["default"].createElement(Tac, {
4389
4277
  tac: tac
4390
- })))), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
4278
+ }, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
4391
4279
  name: "sequence",
4392
4280
  defaultValue: "-1"
4393
4281
  }),
@@ -4416,15 +4304,7 @@
4416
4304
  style: {
4417
4305
  width: '100%'
4418
4306
  }
4419
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4420
- container: true,
4421
- style: {
4422
- height: '100%'
4423
- }
4424
- }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4425
- item: true,
4426
- xs: 8
4427
- }, /*#__PURE__*/React__default["default"].createElement(MapViewGeoJson, {
4307
+ }, /*#__PURE__*/React__default["default"].createElement(ProductFormLayout, {
4428
4308
  geoJSONs: geoJSONs,
4429
4309
  setLayerGeoJSONs: function setLayerGeoJSONs(geoJSONs) {
4430
4310
  return _setLayerGeoJSONs(createInterSections(geoJSONs));
@@ -4433,45 +4313,24 @@
4433
4313
  drawMode: drawMode,
4434
4314
  setDrawMode: setDrawMode,
4435
4315
  exitDrawModeCallbackStart: updateStartDrawing
4436
- })), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4437
- item: true,
4438
- xs: 4,
4439
- sx: styles$4.productForm
4440
- }, renderForm())));
4441
- };
4442
-
4443
- var styles$1 = {
4444
- dialogHeader: {
4445
- boxShadow: '0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)',
4446
- zIndex: 1,
4447
- padding: '4px 20px'
4448
- },
4449
- dialogTitle: {
4450
- display: 'flex',
4451
- justifyContent: 'center',
4452
- textAlign: 'center'
4453
- },
4454
- dialogChildren: {
4455
- display: 'flex',
4456
- padding: '20px',
4457
- minHeight: 200,
4458
- minWidth: 400,
4459
- height: '100%',
4460
- paddingTop: '20px!important'
4461
- }
4316
+ }, renderForm()));
4462
4317
  };
4463
4318
 
4464
4319
  var ContentDialog = function ContentDialog(_a) {
4320
+ var _b, _c;
4321
+
4465
4322
  var open = _a.open,
4466
4323
  toggleDialogStatus = _a.toggleDialogStatus,
4467
4324
  title = _a.title,
4468
4325
  children = _a.children,
4469
4326
  options = _a.options,
4470
4327
  onClose = _a.onClose,
4471
- _b = _a.alertBanner,
4472
- alertBanner = _b === void 0 ? null : _b,
4328
+ _d = _a.alertBanner,
4329
+ alertBanner = _d === void 0 ? null : _d,
4473
4330
  other = __rest(_a, ["open", "toggleDialogStatus", "title", "children", "options", "onClose", "alertBanner"]);
4474
4331
 
4332
+ var theme$1 = material.useTheme();
4333
+
4475
4334
  var handleClose = function handleClose() {
4476
4335
  if (onClose) {
4477
4336
  onClose();
@@ -4485,53 +4344,77 @@
4485
4344
  open: open,
4486
4345
  onClose: handleClose,
4487
4346
  maxWidth: other.maxWidth ? other.maxWidth : 'lg'
4488
- }, other), /*#__PURE__*/React__namespace.createElement(material.DialogTitle, {
4489
- sx: styles$1.dialogHeader
4347
+ }, other, {
4348
+ sx: {
4349
+ ' .MuiPaper-root': {
4350
+ minWidth: 300
4351
+ }
4352
+ }
4353
+ }), /*#__PURE__*/React__namespace.createElement(material.DialogTitle, {
4354
+ sx: (_b = {
4355
+ boxShadow: 1,
4356
+ zIndex: 1,
4357
+ padding: 0,
4358
+ height: 48,
4359
+ display: 'flex',
4360
+ paddingLeft: 2,
4361
+ paddingRight: 2
4362
+ }, _b[theme$1.breakpoints.up('sm')] = {
4363
+ paddingLeft: 3,
4364
+ paddingRight: 3
4365
+ }, _b),
4366
+ component: "div"
4490
4367
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
4491
4368
  container: true,
4492
4369
  alignItems: "center"
4493
4370
  }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
4494
4371
  item: true,
4495
- xs: true
4372
+ xs: 4
4496
4373
  }, /*#__PURE__*/React__namespace.createElement(material.Button, {
4497
4374
  onClick: handleClose,
4498
- color: "secondary",
4499
- size: "medium",
4500
- startIcon: /*#__PURE__*/React__namespace.createElement(theme.ChevronLeft, {
4501
- color: "secondary"
4502
- }),
4503
- "data-testid": "contentdialog-close"
4504
- }, /*#__PURE__*/React__namespace.createElement(material.Typography, {
4505
- variant: "subtitle1",
4506
- color: "secondary"
4507
- }, "BACK"))), /*#__PURE__*/React__namespace.createElement(material.Grid, {
4375
+ variant: "flat",
4376
+ startIcon: /*#__PURE__*/React__namespace.createElement(theme.ChevronLeft, null),
4377
+ "data-testid": "contentdialog-close",
4378
+ sx: (_c = {}, _c[theme$1.breakpoints.down('md')] = {
4379
+ textIndent: -999999,
4380
+ width: 24,
4381
+ minWidth: 24,
4382
+ height: 24,
4383
+ ' .MuiSvgIcon-root': {
4384
+ marginRight: 0
4385
+ }
4386
+ }, _c)
4387
+ }, "BACK")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
4508
4388
  item: true,
4509
- xs: true,
4510
- sx: styles$1.dialogTitle
4389
+ xs: 4,
4390
+ sx: {
4391
+ display: 'flex',
4392
+ justifyContent: 'center',
4393
+ textAlign: 'center'
4394
+ }
4511
4395
  }, /*#__PURE__*/React__namespace.createElement(material.Typography, {
4512
4396
  "data-testid": "dialogTitle",
4513
- variant: "h6"
4397
+ variant: "h6",
4398
+ sx: {
4399
+ fontSize: '1.0rem',
4400
+ textOverflow: 'ellipsis',
4401
+ overflow: 'hidden',
4402
+ whiteSpace: 'nowrap'
4403
+ }
4514
4404
  }, title)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
4515
4405
  item: true,
4516
- xs: true
4517
- }, /*#__PURE__*/React__namespace.createElement(material.Grid, {
4518
- container: true
4519
- }, options)))), alertBanner !== null && alertBanner, /*#__PURE__*/React__namespace.createElement(material.DialogContent, {
4520
- sx: styles$1.dialogChildren
4406
+ xs: 4
4407
+ }, options))), alertBanner !== null && alertBanner, /*#__PURE__*/React__namespace.createElement(material.DialogContent, {
4408
+ sx: {
4409
+ display: 'flex',
4410
+ padding: 0,
4411
+ minHeight: 200,
4412
+ height: '100%'
4413
+ }
4521
4414
  }, children));
4522
4415
  };
4523
4416
 
4524
4417
  var styles = {
4525
- cardWrapper: {
4526
- width: '100%'
4527
- },
4528
- cardContent: {
4529
- width: '100%',
4530
- padding: '14px',
4531
- '&:last-child': {
4532
- paddingBottom: '14px'
4533
- }
4534
- },
4535
4418
  activeStatus: {
4536
4419
  color: '#72bb23',
4537
4420
  paddingLeft: '6px',
@@ -4585,7 +4468,10 @@
4585
4468
 
4586
4469
  return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
4587
4470
  content: product.status.toLowerCase(),
4588
- color: product.status === 'PUBLISHED' ? 'green' : 'grey'
4471
+ color: product.status === 'PUBLISHED' ? 'green' : 'grey',
4472
+ sx: {
4473
+ marginRight: '0!important'
4474
+ }
4589
4475
  });
4590
4476
  };
4591
4477
 
@@ -4613,6 +4499,16 @@
4613
4499
  return moment__default["default"].utc(startDate).format('DD MMM YYYY, HH:mm') + " - " + moment__default["default"].utc(endDate).format(format) + " UTC";
4614
4500
  };
4615
4501
 
4502
+ var ProductListRowHeader = function ProductListRowHeader(_a) {
4503
+ var title = _a.title;
4504
+ return /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4505
+ sx: {
4506
+ color: 'geowebColors.textInputField.label.rgba',
4507
+ fontSize: '0.75rem'
4508
+ }
4509
+ }, title);
4510
+ };
4511
+
4616
4512
  var ProductListRow = function ProductListRow(_a) {
4617
4513
  var product = _a.product,
4618
4514
  productType = _a.productType;
@@ -4647,80 +4543,123 @@
4647
4543
  return /*#__PURE__*/React__default["default"].createElement(material.Card, {
4648
4544
  elevation: 0,
4649
4545
  variant: "outlined",
4650
- sx: styles.cardWrapper
4651
- }, /*#__PURE__*/React__default["default"].createElement(material.CardContent, {
4652
- sx: styles.cardContent
4546
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
4547
+ sx: function sx(theme) {
4548
+ var _a;
4549
+
4550
+ return _a = {
4551
+ width: '100%',
4552
+ paddingLeft: 1,
4553
+ paddingRight: 1,
4554
+ paddingTop: 1.5,
4555
+ paddingBottom: 1.5,
4556
+ '&:last-child': {
4557
+ paddingBottom: 1.5
4558
+ }
4559
+ }, _a[theme.breakpoints.up('sm')] = {
4560
+ paddingLeft: 4,
4561
+ paddingRight: 4,
4562
+ paddingTop: 2,
4563
+ paddingBottom: 2,
4564
+ '&:last-child': {
4565
+ paddingBottom: 2
4566
+ }
4567
+ }, _a;
4568
+ }
4653
4569
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4654
4570
  container: true,
4655
4571
  alignItems: "center",
4656
- spacing: 1
4657
- }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
4658
- title: phenomenon !== null ? getPhenomenon(productType, phenomenon) : '',
4659
- placement: "bottom-start"
4572
+ spacing: 2
4660
4573
  }, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4661
4574
  item: true,
4662
4575
  xs: 3,
4663
- sm: 3,
4664
- md: 1
4665
- }, phenomenon !== null && /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4666
- variant: "overline"
4667
- }, productType.toUpperCase()), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4576
+ sm: 1
4577
+ }, phenomenon !== null && /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
4578
+ title: productType.toUpperCase()
4579
+ }), /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
4580
+ title: phenomenon !== null ? getPhenomenon(productType, phenomenon) : '',
4581
+ placement: "bottom-start"
4582
+ }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4668
4583
  variant: "subtitle2",
4669
4584
  noWrap: true,
4670
4585
  sx: styles.font
4671
4586
  }, phenomenon !== null ? phenomenon : 'Cancel'))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4672
4587
  item: true,
4673
- xs: 3,
4674
- sm: 2,
4675
- md: 1
4676
- }, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
4677
- "data-testid": "productlistrow-tactooltip",
4678
- title: /*#__PURE__*/React__default["default"].createElement("div", {
4588
+ xs: 9,
4589
+ sm: 3
4590
+ }, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
4591
+ title: "Issue time"
4592
+ }), /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
4593
+ title: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
4594
+ title: "TAC"
4595
+ }), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4679
4596
  style: {
4680
4597
  whiteSpace: 'pre-line'
4598
+ },
4599
+ variant: "subtitle2",
4600
+ sx: __assign(__assign({}, styles.font), {
4601
+ color: 'geowebColors.typographyAndIcons.text',
4602
+ fontSize: '1.125rem',
4603
+ fontWeight: 'normal',
4604
+ fontStyle: 'normal',
4605
+ lineHeight: '28px',
4606
+ letterSpacing: '0.5px'
4607
+ })
4608
+ }, TAC)),
4609
+ placement: "bottom-start",
4610
+ componentsProps: {
4611
+ tooltip: {
4612
+ sx: {
4613
+ bgcolor: 'geowebColors.background.surface',
4614
+ boxShadow: 8,
4615
+ '& .MuiTooltip-arrow': {
4616
+ color: 'common.black'
4617
+ },
4618
+ maxWidth: 472
4619
+ }
4681
4620
  }
4682
- }, TAC),
4683
- placement: "bottom-start"
4684
- }, /*#__PURE__*/React__default["default"].createElement("span", null, /*#__PURE__*/React__default["default"].createElement(theme.Info, {
4685
- "data-testid": "productlistrow-tacicon",
4686
- color: "secondary"
4687
- })))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4688
- item: true,
4689
- xs: 9,
4690
- sm: 10,
4691
- md: 3,
4692
- lg: 2
4621
+ }
4693
4622
  }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4694
- variant: "overline"
4695
- }, "Issue time"), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4696
4623
  variant: "subtitle2",
4697
4624
  sx: styles.font,
4698
4625
  "data-testid": "issueTime"
4699
- }, product.issueDate ? moment__default["default"].utc(product.issueDate).format('DD MMM YYYY, HH:mm') + " UTC" : '(Not published)')), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4626
+ }, product.issueDate ? moment__default["default"].utc(product.issueDate).format('DD MMM YYYY, HH:mm') + " UTC" : '(Not published)'))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4700
4627
  item: true,
4701
4628
  xs: 12,
4702
- sm: 8,
4703
- md: 5,
4704
- lg: 6
4705
- }, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4706
- variant: "overline"
4707
- }, "Valid time"), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4629
+ sm: 6
4630
+ }, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
4631
+ title: "Valid time"
4632
+ }), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
4708
4633
  variant: "subtitle2",
4709
4634
  sx: styles.font,
4710
4635
  "data-testid": "validTime"
4711
4636
  }, validTime)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4712
4637
  item: true,
4713
- xs: 6,
4714
- sm: 4,
4715
- md: 2,
4716
- container: true
4638
+ xs: 12,
4639
+ sm: 2,
4640
+ container: true,
4641
+ justifyContent: "center",
4642
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
4643
+ sx: function sx(theme) {
4644
+ var _a;
4645
+
4646
+ return _a = {}, _a[theme.breakpoints.up('sm')] = {
4647
+ justifyContent: 'right',
4648
+ button: {
4649
+ marginRight: 3
4650
+ },
4651
+ ' .statusTag': {
4652
+ marginRight: 3
4653
+ }
4654
+ }, _a;
4655
+ }
4717
4656
  }, product.status === 'DRAFT' ? /*#__PURE__*/React__default["default"].createElement(material.Button, {
4718
- color: "secondary",
4719
- size: "small",
4720
- startIcon: /*#__PURE__*/React__default["default"].createElement(theme.Edit, {
4721
- color: "secondary"
4722
- })
4723
- }, "Draft") : getStatusTagList(product, cancelsSeqId), product.status === 'PUBLISHED' && cancelsSeqId === null && getActiveStatus(product)))));
4657
+ sx: {
4658
+ marginTop: '6px'
4659
+ },
4660
+ variant: "flat",
4661
+ startIcon: /*#__PURE__*/React__default["default"].createElement(theme.Edit, null)
4662
+ }, "DRAFT") : getStatusTagList(product, cancelsSeqId), product.status === 'PUBLISHED' && cancelsSeqId === null && getActiveStatus(product))));
4724
4663
  };
4725
4664
 
4726
4665
  /* *
@@ -4756,10 +4695,12 @@
4756
4695
  item: true,
4757
4696
  justifyContent: "flex-end"
4758
4697
  }, /*#__PURE__*/React__default["default"].createElement(material.Button, {
4759
- variant: "contained",
4760
- color: "secondary",
4698
+ variant: "primary",
4761
4699
  "data-testid": "productListCreateButton",
4762
- onClick: onClickNewProduct
4700
+ onClick: onClickNewProduct,
4701
+ sx: {
4702
+ textTransform: 'initial'
4703
+ }
4763
4704
  }, "Create a new ", productType.toUpperCase())), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
4764
4705
  item: true,
4765
4706
  sx: {
@@ -4771,7 +4712,11 @@
4771
4712
  title: "An error has occurred while retrieving the list, please try again",
4772
4713
  info: error.message ? error.message : '',
4773
4714
  dataTestId: "productList-alert"
4774
- }), productList && /*#__PURE__*/React__default["default"].createElement(material.List, null, productList.map(function (productListItem, index) {
4715
+ }), productList && /*#__PURE__*/React__default["default"].createElement(material.List, {
4716
+ sx: {
4717
+ paddingTop: 4
4718
+ }
4719
+ }, productList.map(function (productListItem, index) {
4775
4720
  var product = productListItem[productType];
4776
4721
  return /*#__PURE__*/React__default["default"].createElement(material.ListItem, {
4777
4722
  "data-testid": "productListItem",
@@ -5026,6 +4971,11 @@
5026
4971
  options: getProductFormLifecycleButtons(productCanBe, onProductButtonPress),
5027
4972
  style: {
5028
4973
  zIndex: 1000
4974
+ },
4975
+ sx: {
4976
+ ' .MuiDialogContent-root': {
4977
+ overflowY: 'hidden'
4978
+ }
5029
4979
  }
5030
4980
  }, productType === 'sigmet' ? /*#__PURE__*/React__namespace.createElement(SigmetForm, {
5031
4981
  mode: mode,