@opengeoweb/sigmet-airmet 4.2.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +1244 -1191
- package/index.umd.js +1186 -1152
- package/lib/AirmetDemo.stories.d.ts +1 -0
- package/lib/SigmetDemo.stories.d.ts +1 -0
- package/lib/components/ContentDialog/ContentDialog.stories.d.ts +80 -1
- package/lib/components/ProductForms/AirmetForm/AirmetForm.stories.d.ts +79 -4
- package/lib/components/ProductForms/ProductForm.styles.d.ts +22 -9
- package/lib/components/ProductForms/ProductFormDialog.Sigmet.stories.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/Change.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/CloudLevels.d.ts +2 -6
- package/lib/components/ProductForms/ProductFormFields/IssuedAt.d.ts +7 -0
- package/lib/components/ProductForms/ProductFormFields/IssuedAt.spec.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/Levels.d.ts +2 -8
- package/lib/components/ProductForms/ProductFormFields/ObservationForecast.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/ObservationForecastTime.d.ts +2 -4
- package/lib/components/ProductForms/ProductFormFields/Phenomenon.d.ts +2 -7
- package/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.d.ts +8 -0
- package/lib/components/ProductForms/ProductFormFields/ProductFormFieldLayout.spec.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/Progress.d.ts +2 -6
- package/lib/components/ProductForms/ProductFormFields/SelectFIR.d.ts +2 -6
- package/lib/components/ProductForms/ProductFormFields/SurfaceVisibility.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/SurfaceWind.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/Tac.d.ts +7 -0
- package/lib/components/ProductForms/ProductFormFields/Tac.spec.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/Type.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/ValidFrom.d.ts +4 -7
- package/lib/components/ProductForms/ProductFormFields/ValidUntil.d.ts +2 -7
- package/lib/components/ProductForms/ProductFormFields/VolcanicFields.d.ts +2 -3
- package/lib/components/ProductForms/ProductFormLayout.d.ts +7 -0
- package/lib/components/ProductForms/SigmetForm/SigmetForm.stories.d.ts +88 -4
- package/lib/components/ProductForms/utils.d.ts +1 -0
- package/lib/components/ProductList/ProductList.stories.d.ts +32 -0
- package/lib/types.d.ts +6 -0
- package/lib/utils/store.d.ts +1 -1
- package/lib/utils/testUtils.d.ts +2 -1
- package/package.json +19 -16
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('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', '@mui/material', 'react-hook-form', '@opengeoweb/form-fields', '@opengeoweb/api', 'immer', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SigmetAirmet = {}, global.React, global.material, global.reactHookForm, global.formFields, global.api, global.produce, global.
|
|
5
|
-
})(this, (function (exports, React, material, reactHookForm, formFields, api, produce,
|
|
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,6 +133,188 @@
|
|
|
133
133
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
var type = "FeatureCollection";
|
|
137
|
+
var features = [
|
|
138
|
+
{
|
|
139
|
+
type: "Feature",
|
|
140
|
+
geometry: {
|
|
141
|
+
type: "Polygon",
|
|
142
|
+
coordinates: [
|
|
143
|
+
[
|
|
144
|
+
[
|
|
145
|
+
5,
|
|
146
|
+
55
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
4.331914,
|
|
150
|
+
55.332644
|
|
151
|
+
],
|
|
152
|
+
[
|
|
153
|
+
3.368817,
|
|
154
|
+
55.764314
|
|
155
|
+
],
|
|
156
|
+
[
|
|
157
|
+
2.761908,
|
|
158
|
+
54.379261
|
|
159
|
+
],
|
|
160
|
+
[
|
|
161
|
+
3.15576,
|
|
162
|
+
52.913554
|
|
163
|
+
],
|
|
164
|
+
[
|
|
165
|
+
2.000002,
|
|
166
|
+
51.500002
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
3.370001,
|
|
170
|
+
51.369722
|
|
171
|
+
],
|
|
172
|
+
[
|
|
173
|
+
3.370527,
|
|
174
|
+
51.36867
|
|
175
|
+
],
|
|
176
|
+
[
|
|
177
|
+
3.362223,
|
|
178
|
+
51.320002
|
|
179
|
+
],
|
|
180
|
+
[
|
|
181
|
+
3.36389,
|
|
182
|
+
51.313608
|
|
183
|
+
],
|
|
184
|
+
[
|
|
185
|
+
3.373613,
|
|
186
|
+
51.309999
|
|
187
|
+
],
|
|
188
|
+
[
|
|
189
|
+
3.952501,
|
|
190
|
+
51.214441
|
|
191
|
+
],
|
|
192
|
+
[
|
|
193
|
+
4.397501,
|
|
194
|
+
51.452776
|
|
195
|
+
],
|
|
196
|
+
[
|
|
197
|
+
5.078611,
|
|
198
|
+
51.391665
|
|
199
|
+
],
|
|
200
|
+
[
|
|
201
|
+
5.848333,
|
|
202
|
+
51.139444
|
|
203
|
+
],
|
|
204
|
+
[
|
|
205
|
+
5.651667,
|
|
206
|
+
50.824717
|
|
207
|
+
],
|
|
208
|
+
[
|
|
209
|
+
6.011797,
|
|
210
|
+
50.757273
|
|
211
|
+
],
|
|
212
|
+
[
|
|
213
|
+
5.934168,
|
|
214
|
+
51.036386
|
|
215
|
+
],
|
|
216
|
+
[
|
|
217
|
+
6.222223,
|
|
218
|
+
51.361666
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
5.94639,
|
|
222
|
+
51.811663
|
|
223
|
+
],
|
|
224
|
+
[
|
|
225
|
+
6.405001,
|
|
226
|
+
51.830828
|
|
227
|
+
],
|
|
228
|
+
[
|
|
229
|
+
7.053095,
|
|
230
|
+
52.237764
|
|
231
|
+
],
|
|
232
|
+
[
|
|
233
|
+
7.031389,
|
|
234
|
+
52.268885
|
|
235
|
+
],
|
|
236
|
+
[
|
|
237
|
+
7.063612,
|
|
238
|
+
52.346109
|
|
239
|
+
],
|
|
240
|
+
[
|
|
241
|
+
7.065557,
|
|
242
|
+
52.385828
|
|
243
|
+
],
|
|
244
|
+
[
|
|
245
|
+
7.133055,
|
|
246
|
+
52.888887
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
7.14218,
|
|
250
|
+
52.898244
|
|
251
|
+
],
|
|
252
|
+
[
|
|
253
|
+
7.191667,
|
|
254
|
+
53.3
|
|
255
|
+
],
|
|
256
|
+
[
|
|
257
|
+
6.5,
|
|
258
|
+
53.666667
|
|
259
|
+
],
|
|
260
|
+
[
|
|
261
|
+
6.500002,
|
|
262
|
+
55.000002
|
|
263
|
+
],
|
|
264
|
+
[
|
|
265
|
+
5,
|
|
266
|
+
55
|
|
267
|
+
]
|
|
268
|
+
]
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
properties: {
|
|
272
|
+
centlong: 4.98042633,
|
|
273
|
+
REGION: "EUR",
|
|
274
|
+
StateName: "Netherlands",
|
|
275
|
+
FIRname: "AMSTERDAM FIR",
|
|
276
|
+
StateCode: "NLD",
|
|
277
|
+
centlat: 52.8618788,
|
|
278
|
+
ICAOCODE: "EHAA"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
];
|
|
282
|
+
var firArea = {
|
|
283
|
+
type: type,
|
|
284
|
+
features: features
|
|
285
|
+
};
|
|
286
|
+
|
|
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
|
+
|
|
136
318
|
var srsAndBboxDefault = {
|
|
137
319
|
bbox: {
|
|
138
320
|
left: -1205884.85699446,
|
|
@@ -448,438 +630,29 @@
|
|
|
448
630
|
StartOrEndDrawing["end"] = "end";
|
|
449
631
|
})(StartOrEndDrawing || (StartOrEndDrawing = {}));
|
|
450
632
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
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
|
-
};
|
|
633
|
+
var getDrawModeFromSelectionType = function getDrawModeFromSelectionType(selectionType) {
|
|
634
|
+
switch (selectionType) {
|
|
635
|
+
case 'point':
|
|
636
|
+
return MapDrawMode.POINT;
|
|
487
637
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
case
|
|
492
|
-
return
|
|
493
|
-
draft.features[0].geometry.coordinates = [draft.features[0].geometry.coordinates[1]];
|
|
494
|
-
}) : geojson;
|
|
638
|
+
case 'box':
|
|
639
|
+
return MapDrawMode.BOX;
|
|
640
|
+
|
|
641
|
+
case 'fir':
|
|
642
|
+
return MapDrawMode.FIR;
|
|
495
643
|
|
|
644
|
+
case 'poly':
|
|
496
645
|
default:
|
|
497
|
-
return
|
|
646
|
+
return MapDrawMode.POLYGON;
|
|
498
647
|
}
|
|
499
648
|
};
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
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
|
-
var type = "FeatureCollection";
|
|
679
|
-
var features = [
|
|
680
|
-
{
|
|
681
|
-
type: "Feature",
|
|
682
|
-
geometry: {
|
|
683
|
-
type: "Polygon",
|
|
684
|
-
coordinates: [
|
|
685
|
-
[
|
|
686
|
-
[
|
|
687
|
-
5,
|
|
688
|
-
55
|
|
689
|
-
],
|
|
690
|
-
[
|
|
691
|
-
4.331914,
|
|
692
|
-
55.332644
|
|
693
|
-
],
|
|
694
|
-
[
|
|
695
|
-
3.368817,
|
|
696
|
-
55.764314
|
|
697
|
-
],
|
|
698
|
-
[
|
|
699
|
-
2.761908,
|
|
700
|
-
54.379261
|
|
701
|
-
],
|
|
702
|
-
[
|
|
703
|
-
3.15576,
|
|
704
|
-
52.913554
|
|
705
|
-
],
|
|
706
|
-
[
|
|
707
|
-
2.000002,
|
|
708
|
-
51.500002
|
|
709
|
-
],
|
|
710
|
-
[
|
|
711
|
-
3.370001,
|
|
712
|
-
51.369722
|
|
713
|
-
],
|
|
714
|
-
[
|
|
715
|
-
3.370527,
|
|
716
|
-
51.36867
|
|
717
|
-
],
|
|
718
|
-
[
|
|
719
|
-
3.362223,
|
|
720
|
-
51.320002
|
|
721
|
-
],
|
|
722
|
-
[
|
|
723
|
-
3.36389,
|
|
724
|
-
51.313608
|
|
725
|
-
],
|
|
726
|
-
[
|
|
727
|
-
3.373613,
|
|
728
|
-
51.309999
|
|
729
|
-
],
|
|
730
|
-
[
|
|
731
|
-
3.952501,
|
|
732
|
-
51.214441
|
|
733
|
-
],
|
|
734
|
-
[
|
|
735
|
-
4.397501,
|
|
736
|
-
51.452776
|
|
737
|
-
],
|
|
738
|
-
[
|
|
739
|
-
5.078611,
|
|
740
|
-
51.391665
|
|
741
|
-
],
|
|
742
|
-
[
|
|
743
|
-
5.848333,
|
|
744
|
-
51.139444
|
|
745
|
-
],
|
|
746
|
-
[
|
|
747
|
-
5.651667,
|
|
748
|
-
50.824717
|
|
749
|
-
],
|
|
750
|
-
[
|
|
751
|
-
6.011797,
|
|
752
|
-
50.757273
|
|
753
|
-
],
|
|
754
|
-
[
|
|
755
|
-
5.934168,
|
|
756
|
-
51.036386
|
|
757
|
-
],
|
|
758
|
-
[
|
|
759
|
-
6.222223,
|
|
760
|
-
51.361666
|
|
761
|
-
],
|
|
762
|
-
[
|
|
763
|
-
5.94639,
|
|
764
|
-
51.811663
|
|
765
|
-
],
|
|
766
|
-
[
|
|
767
|
-
6.405001,
|
|
768
|
-
51.830828
|
|
769
|
-
],
|
|
770
|
-
[
|
|
771
|
-
7.053095,
|
|
772
|
-
52.237764
|
|
773
|
-
],
|
|
774
|
-
[
|
|
775
|
-
7.031389,
|
|
776
|
-
52.268885
|
|
777
|
-
],
|
|
778
|
-
[
|
|
779
|
-
7.063612,
|
|
780
|
-
52.346109
|
|
781
|
-
],
|
|
782
|
-
[
|
|
783
|
-
7.065557,
|
|
784
|
-
52.385828
|
|
785
|
-
],
|
|
786
|
-
[
|
|
787
|
-
7.133055,
|
|
788
|
-
52.888887
|
|
789
|
-
],
|
|
790
|
-
[
|
|
791
|
-
7.14218,
|
|
792
|
-
52.898244
|
|
793
|
-
],
|
|
794
|
-
[
|
|
795
|
-
7.191667,
|
|
796
|
-
53.3
|
|
797
|
-
],
|
|
798
|
-
[
|
|
799
|
-
6.5,
|
|
800
|
-
53.666667
|
|
801
|
-
],
|
|
802
|
-
[
|
|
803
|
-
6.500002,
|
|
804
|
-
55.000002
|
|
805
|
-
],
|
|
806
|
-
[
|
|
807
|
-
5,
|
|
808
|
-
55
|
|
809
|
-
]
|
|
810
|
-
]
|
|
811
|
-
]
|
|
812
|
-
},
|
|
813
|
-
properties: {
|
|
814
|
-
centlong: 4.98042633,
|
|
815
|
-
REGION: "EUR",
|
|
816
|
-
StateName: "Netherlands",
|
|
817
|
-
FIRname: "AMSTERDAM FIR",
|
|
818
|
-
StateCode: "NLD",
|
|
819
|
-
centlat: 52.8618788,
|
|
820
|
-
ICAOCODE: "EHAA"
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
];
|
|
824
|
-
var firArea = {
|
|
825
|
-
type: type,
|
|
826
|
-
features: features
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
/* *
|
|
830
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
831
|
-
* you may not use this file except in compliance with the License.
|
|
832
|
-
* You may obtain a copy of the License at
|
|
833
|
-
*
|
|
834
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
835
|
-
*
|
|
836
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
837
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
838
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
839
|
-
* See the License for the specific language governing permissions and
|
|
840
|
-
* limitations under the License.
|
|
841
|
-
*
|
|
842
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
843
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
844
|
-
* */
|
|
845
|
-
/**
|
|
846
|
-
* Function to translate the geojson data to a GeoJSON.FeatureCollection
|
|
847
|
-
*/
|
|
848
|
-
|
|
849
|
-
var getFir = function getFir() {
|
|
850
|
-
return firArea;
|
|
851
|
-
};
|
|
852
|
-
/**
|
|
853
|
-
* Function to check if the given geojson object has 'fir' selectionType property
|
|
854
|
-
*/
|
|
855
|
-
|
|
856
|
-
var isFir = function isFir(geojson) {
|
|
857
|
-
return geojson && geojson.features && geojson.features[0].properties['selectionType'] === 'fir';
|
|
858
|
-
};
|
|
859
|
-
|
|
860
|
-
var getDrawModeFromSelectionType = function getDrawModeFromSelectionType(selectionType) {
|
|
861
|
-
switch (selectionType) {
|
|
862
|
-
case 'point':
|
|
863
|
-
return MapDrawMode.POINT;
|
|
864
|
-
|
|
865
|
-
case 'box':
|
|
866
|
-
return MapDrawMode.BOX;
|
|
867
|
-
|
|
868
|
-
case 'fir':
|
|
869
|
-
return MapDrawMode.FIR;
|
|
870
|
-
|
|
871
|
-
case 'poly':
|
|
872
|
-
default:
|
|
873
|
-
return MapDrawMode.POLYGON;
|
|
874
|
-
}
|
|
875
|
-
};
|
|
876
|
-
/**
|
|
877
|
-
* Adds properties to the first geojson feature based on the given property object.
|
|
878
|
-
* It only extends or changes the properties which are defined in styleConfig,
|
|
879
|
-
* all other properties in the geojson are left unchanged.
|
|
880
|
-
* @param geojson
|
|
881
|
-
* @param featureProperties
|
|
882
|
-
*/
|
|
649
|
+
/**
|
|
650
|
+
* Adds properties to the first geojson feature based on the given property object.
|
|
651
|
+
* It only extends or changes the properties which are defined in styleConfig,
|
|
652
|
+
* all other properties in the geojson are left unchanged.
|
|
653
|
+
* @param geojson
|
|
654
|
+
* @param featureProperties
|
|
655
|
+
*/
|
|
883
656
|
|
|
884
657
|
|
|
885
658
|
var addFeatureProperties = function addFeatureProperties(geojson, featureProperties) {
|
|
@@ -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$
|
|
1116
|
-
productForm: {
|
|
1117
|
-
overflowY: 'scroll',
|
|
1118
|
-
overflowX: 'hidden',
|
|
1119
|
-
height: '100%',
|
|
1120
|
-
width: '100%'
|
|
1121
|
-
},
|
|
888
|
+
var styles$2 = {
|
|
1122
889
|
label: {
|
|
1123
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,33 +1004,17 @@
|
|
|
1193
1004
|
* See the License for the specific language governing permissions and
|
|
1194
1005
|
* limitations under the License.
|
|
1195
1006
|
*
|
|
1196
|
-
* Copyright
|
|
1197
|
-
* Copyright
|
|
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) {
|
|
1201
1012
|
var isDisabled = _a.isDisabled,
|
|
1202
1013
|
isReadOnly = _a.isReadOnly;
|
|
1203
|
-
var watch = reactHookForm.useFormContext().watch;
|
|
1204
1014
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
1205
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
1206
|
-
|
|
1207
|
-
|
|
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"
|
|
1015
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
1016
|
+
title: "Change",
|
|
1017
|
+
sx: styles$2.containerItem
|
|
1223
1018
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1224
1019
|
item: true,
|
|
1225
1020
|
xs: 12
|
|
@@ -1230,23 +1025,24 @@
|
|
|
1230
1025
|
isRequired: isRequired
|
|
1231
1026
|
}
|
|
1232
1027
|
},
|
|
1233
|
-
disabled: isDisabled
|
|
1234
|
-
|
|
1028
|
+
disabled: isDisabled,
|
|
1029
|
+
isReadOnly: isReadOnly
|
|
1030
|
+
}, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1235
1031
|
value: "WKN",
|
|
1236
1032
|
label: "Weakening",
|
|
1237
1033
|
disabled: isDisabled,
|
|
1238
1034
|
"data-testid": "change-WKN"
|
|
1239
|
-
}),
|
|
1035
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1240
1036
|
value: "NC",
|
|
1241
1037
|
label: "No change",
|
|
1242
1038
|
disabled: isDisabled,
|
|
1243
1039
|
"data-testid": "change-NC"
|
|
1244
|
-
}),
|
|
1040
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1245
1041
|
value: "INTSF",
|
|
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
|
|
1266
|
-
* Copyright
|
|
1061
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1062
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1267
1063
|
* */
|
|
1268
|
-
var styles$
|
|
1269
|
-
|
|
1270
|
-
|
|
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
|
-
|
|
1280
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
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
|
-
}, "
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
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")
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
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")
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
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';
|
|
@@ -1777,6 +1595,13 @@
|
|
|
1777
1595
|
}
|
|
1778
1596
|
});
|
|
1779
1597
|
};
|
|
1598
|
+
var getFieldLabel = function getFieldLabel(title, isDisabled, action) {
|
|
1599
|
+
if (action === void 0) {
|
|
1600
|
+
action = 'Select';
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
return isDisabled ? title : action + " " + title.toLowerCase();
|
|
1604
|
+
};
|
|
1780
1605
|
|
|
1781
1606
|
var location_indicator_mwo$1 = "EHDB";
|
|
1782
1607
|
var firareas$1 = {
|
|
@@ -1921,30 +1746,15 @@
|
|
|
1921
1746
|
reset = _c.reset,
|
|
1922
1747
|
clearErrors = _c.clearErrors;
|
|
1923
1748
|
|
|
1924
|
-
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
1925
|
-
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
1926
|
-
var allowedUnits = useProductSettings(config).allowedUnits;
|
|
1927
|
-
var selectedFIR = watch('locationIndicatorATSR'); // Get allowed level units based on selected FIR - if no FIR selected, allow all default units
|
|
1928
|
-
|
|
1929
|
-
var allowedLevelUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'level_unit', LevelUnits);
|
|
1930
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
1931
|
-
|
|
1932
|
-
|
|
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"
|
|
1749
|
+
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
1750
|
+
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
1751
|
+
var allowedUnits = useProductSettings(config).allowedUnits;
|
|
1752
|
+
var selectedFIR = watch('locationIndicatorATSR'); // Get allowed level units based on selected FIR - if no FIR selected, allow all default units
|
|
1753
|
+
|
|
1754
|
+
var allowedLevelUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'level_unit', LevelUnits);
|
|
1755
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
1756
|
+
title: "Levels",
|
|
1757
|
+
sx: styles$2.containerItem
|
|
1948
1758
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1949
1759
|
item: true,
|
|
1950
1760
|
xs: 12
|
|
@@ -1956,6 +1766,7 @@
|
|
|
1956
1766
|
}
|
|
1957
1767
|
},
|
|
1958
1768
|
disabled: isDisabled,
|
|
1769
|
+
isReadOnly: isReadOnly,
|
|
1959
1770
|
onChange: function onChange() {
|
|
1960
1771
|
// Reset default value for the level value to '' so when it rerenders it uses this empty default value
|
|
1961
1772
|
var currentValues = getValues();
|
|
@@ -1975,7 +1786,7 @@
|
|
|
1975
1786
|
|
|
1976
1787
|
clearErrors(['level', 'lowerLevel']);
|
|
1977
1788
|
}
|
|
1978
|
-
},
|
|
1789
|
+
}, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1979
1790
|
value: "AT",
|
|
1980
1791
|
label: "At",
|
|
1981
1792
|
checked: watch('levelInfoMode') === 'AT' || watch('levelInfoMode') === 'TOPS',
|
|
@@ -1984,11 +1795,15 @@
|
|
|
1984
1795
|
}), watch('levelInfoMode') === 'AT' || watch('levelInfoMode') === 'TOPS' ? /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1985
1796
|
item: true,
|
|
1986
1797
|
xs: 12,
|
|
1987
|
-
container: true
|
|
1798
|
+
container: true,
|
|
1799
|
+
spacing: 2,
|
|
1800
|
+
justifyItems: "flex-end",
|
|
1801
|
+
alignItems: "flex-end"
|
|
1988
1802
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1989
1803
|
item: true,
|
|
1990
|
-
xs:
|
|
1991
|
-
|
|
1804
|
+
xs: 12,
|
|
1805
|
+
md: 3
|
|
1806
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
1992
1807
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
1993
1808
|
checked: watch('levelInfoMode') === 'TOPS',
|
|
1994
1809
|
onChange: function onChange() {
|
|
@@ -2003,7 +1818,8 @@
|
|
|
2003
1818
|
label: "Tops"
|
|
2004
1819
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2005
1820
|
item: true,
|
|
2006
|
-
xs:
|
|
1821
|
+
xs: 4,
|
|
1822
|
+
md: 3
|
|
2007
1823
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
2008
1824
|
name: "level.unit",
|
|
2009
1825
|
label: "Unit",
|
|
@@ -2012,8 +1828,9 @@
|
|
|
2012
1828
|
isRequired: isRequired
|
|
2013
1829
|
}
|
|
2014
1830
|
},
|
|
2015
|
-
sx: styles$
|
|
1831
|
+
sx: styles$2.unit,
|
|
2016
1832
|
disabled: isDisabled,
|
|
1833
|
+
isReadOnly: isReadOnly,
|
|
2017
1834
|
defaultValue: 'FL',
|
|
2018
1835
|
onChange: function onChange() {
|
|
2019
1836
|
if (getValues('level.value') || getValues('level.value') === 0) {
|
|
@@ -2029,7 +1846,8 @@
|
|
|
2029
1846
|
}, allowedLevelUnitsForFir[key]);
|
|
2030
1847
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2031
1848
|
item: true,
|
|
2032
|
-
xs:
|
|
1849
|
+
xs: 8,
|
|
1850
|
+
md: 6
|
|
2033
1851
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
2034
1852
|
name: "level.value",
|
|
2035
1853
|
"data-testid": "level.value",
|
|
@@ -2053,8 +1871,9 @@
|
|
|
2053
1871
|
}
|
|
2054
1872
|
},
|
|
2055
1873
|
disabled: isDisabled,
|
|
1874
|
+
isReadOnly: isReadOnly,
|
|
2056
1875
|
autoFocus: true
|
|
2057
|
-
}))) : null,
|
|
1876
|
+
}))) : null, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2058
1877
|
value: "BETW",
|
|
2059
1878
|
label: "Between",
|
|
2060
1879
|
checked: watch('levelInfoMode') === 'BETW' || watch('levelInfoMode') === 'BETW_SFC',
|
|
@@ -2063,13 +1882,16 @@
|
|
|
2063
1882
|
}), 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
1883
|
item: true,
|
|
2065
1884
|
xs: 12,
|
|
2066
|
-
container: true
|
|
1885
|
+
container: true,
|
|
1886
|
+
spacing: 2
|
|
2067
1887
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2068
1888
|
item: true,
|
|
2069
|
-
xs:
|
|
1889
|
+
xs: 12,
|
|
1890
|
+
md: 3
|
|
2070
1891
|
}), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2071
1892
|
item: true,
|
|
2072
|
-
xs:
|
|
1893
|
+
xs: 4,
|
|
1894
|
+
md: 3
|
|
2073
1895
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
2074
1896
|
name: "level.unit",
|
|
2075
1897
|
label: "Unit",
|
|
@@ -2082,8 +1904,9 @@
|
|
|
2082
1904
|
}
|
|
2083
1905
|
}
|
|
2084
1906
|
},
|
|
2085
|
-
sx: styles$
|
|
1907
|
+
sx: styles$2.unit,
|
|
2086
1908
|
disabled: isDisabled,
|
|
1909
|
+
isReadOnly: isReadOnly,
|
|
2087
1910
|
defaultValue: 'FL',
|
|
2088
1911
|
onChange: function onChange() {
|
|
2089
1912
|
trigger(__spreadArray(__spreadArray(__spreadArray([], __read(getValues('level.value') || getValues('level.value') === 0 ? ['level.value'] : [])), __read(getValues('lowerLevel.value') || getValues('lowerLevel.value') === 0 ? ['lowerLevel.value'] : [])), ['lowerLevel.unit']));
|
|
@@ -2097,11 +1920,12 @@
|
|
|
2097
1920
|
}, allowedLevelUnitsForFir[key]);
|
|
2098
1921
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2099
1922
|
item: true,
|
|
2100
|
-
xs:
|
|
1923
|
+
xs: 8,
|
|
1924
|
+
md: 6
|
|
2101
1925
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
2102
1926
|
name: "level.value",
|
|
2103
1927
|
label: "Upper level",
|
|
2104
|
-
sx: styles$
|
|
1928
|
+
sx: styles$2.levelField,
|
|
2105
1929
|
rules: {
|
|
2106
1930
|
validate: {
|
|
2107
1931
|
isRequired: isRequired,
|
|
@@ -2121,6 +1945,7 @@
|
|
|
2121
1945
|
}
|
|
2122
1946
|
},
|
|
2123
1947
|
disabled: isDisabled,
|
|
1948
|
+
isReadOnly: isReadOnly,
|
|
2124
1949
|
onChange: function onChange() {
|
|
2125
1950
|
return (getValues('lowerLevel.value') || getValues('lowerLevel.value') === 0) && trigger('lowerLevel.value');
|
|
2126
1951
|
},
|
|
@@ -2128,11 +1953,15 @@
|
|
|
2128
1953
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2129
1954
|
item: true,
|
|
2130
1955
|
xs: 12,
|
|
2131
|
-
container: true
|
|
1956
|
+
container: true,
|
|
1957
|
+
spacing: 2,
|
|
1958
|
+
justifyItems: "flex-end",
|
|
1959
|
+
alignItems: "flex-end"
|
|
2132
1960
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2133
1961
|
item: true,
|
|
2134
|
-
xs:
|
|
2135
|
-
|
|
1962
|
+
xs: 12,
|
|
1963
|
+
md: 3
|
|
1964
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
2136
1965
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
2137
1966
|
checked: watch('levelInfoMode') === 'BETW_SFC',
|
|
2138
1967
|
onChange: function onChange() {
|
|
@@ -2149,7 +1978,8 @@
|
|
|
2149
1978
|
label: "SFC"
|
|
2150
1979
|
})), watch('levelInfoMode') !== 'BETW_SFC' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2151
1980
|
item: true,
|
|
2152
|
-
xs:
|
|
1981
|
+
xs: 4,
|
|
1982
|
+
md: 3
|
|
2153
1983
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
2154
1984
|
name: "lowerLevel.unit",
|
|
2155
1985
|
label: "Unit",
|
|
@@ -2162,8 +1992,9 @@
|
|
|
2162
1992
|
}
|
|
2163
1993
|
}
|
|
2164
1994
|
},
|
|
2165
|
-
sx: styles$
|
|
1995
|
+
sx: styles$2.unit,
|
|
2166
1996
|
disabled: isDisabled,
|
|
1997
|
+
isReadOnly: isReadOnly,
|
|
2167
1998
|
defaultValue: getValues('level.unit') || 'FL',
|
|
2168
1999
|
onChange: function onChange() {
|
|
2169
2000
|
if (getValues('lowerLevel.value') || getValues('lowerLevel.value') === 0) {
|
|
@@ -2181,7 +2012,8 @@
|
|
|
2181
2012
|
}, allowedLevelUnitsForFir[key]);
|
|
2182
2013
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2183
2014
|
item: true,
|
|
2184
|
-
xs:
|
|
2015
|
+
xs: 8,
|
|
2016
|
+
md: 6
|
|
2185
2017
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
2186
2018
|
name: "lowerLevel.value",
|
|
2187
2019
|
label: "Lower level",
|
|
@@ -2207,8 +2039,9 @@
|
|
|
2207
2039
|
}
|
|
2208
2040
|
}
|
|
2209
2041
|
},
|
|
2210
|
-
disabled: isDisabled
|
|
2211
|
-
|
|
2042
|
+
disabled: isDisabled,
|
|
2043
|
+
isReadOnly: isReadOnly
|
|
2044
|
+
}))))) : null, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2212
2045
|
value: "ABV",
|
|
2213
2046
|
label: "Above",
|
|
2214
2047
|
disabled: isDisabled,
|
|
@@ -2217,11 +2050,15 @@
|
|
|
2217
2050
|
}), watch('levelInfoMode') === 'ABV' || watch('levelInfoMode') === 'TOPS_ABV' ? /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2218
2051
|
item: true,
|
|
2219
2052
|
xs: 12,
|
|
2220
|
-
container: true
|
|
2053
|
+
container: true,
|
|
2054
|
+
spacing: 2,
|
|
2055
|
+
justifyItems: "flex-end",
|
|
2056
|
+
alignItems: "flex-end"
|
|
2221
2057
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2222
2058
|
item: true,
|
|
2223
|
-
xs:
|
|
2224
|
-
|
|
2059
|
+
xs: 12,
|
|
2060
|
+
md: 3
|
|
2061
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
2225
2062
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
2226
2063
|
checked: watch('levelInfoMode') === 'TOPS_ABV',
|
|
2227
2064
|
onChange: function onChange() {
|
|
@@ -2235,7 +2072,8 @@
|
|
|
2235
2072
|
"data-testid": "levels-TOPS_ABV"
|
|
2236
2073
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2237
2074
|
item: true,
|
|
2238
|
-
xs:
|
|
2075
|
+
xs: 4,
|
|
2076
|
+
md: 3
|
|
2239
2077
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
2240
2078
|
name: "level.unit",
|
|
2241
2079
|
label: "Unit",
|
|
@@ -2244,8 +2082,9 @@
|
|
|
2244
2082
|
isRequired: isRequired
|
|
2245
2083
|
}
|
|
2246
2084
|
},
|
|
2247
|
-
sx: styles$
|
|
2085
|
+
sx: styles$2.unit,
|
|
2248
2086
|
disabled: isDisabled,
|
|
2087
|
+
isReadOnly: isReadOnly,
|
|
2249
2088
|
defaultValue: 'FL',
|
|
2250
2089
|
onChange: function onChange() {
|
|
2251
2090
|
if (getValues('level.value') || getValues('level.value') === 0) {
|
|
@@ -2261,7 +2100,8 @@
|
|
|
2261
2100
|
}, allowedLevelUnitsForFir[key]);
|
|
2262
2101
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2263
2102
|
item: true,
|
|
2264
|
-
xs:
|
|
2103
|
+
xs: 8,
|
|
2104
|
+
md: 6
|
|
2265
2105
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
2266
2106
|
name: "level.value",
|
|
2267
2107
|
label: "Level",
|
|
@@ -2284,8 +2124,9 @@
|
|
|
2284
2124
|
}
|
|
2285
2125
|
},
|
|
2286
2126
|
disabled: isDisabled,
|
|
2127
|
+
isReadOnly: isReadOnly,
|
|
2287
2128
|
autoFocus: true
|
|
2288
|
-
}))) : null)))
|
|
2129
|
+
}))) : null)));
|
|
2289
2130
|
};
|
|
2290
2131
|
|
|
2291
2132
|
/* *
|
|
@@ -2301,8 +2142,8 @@
|
|
|
2301
2142
|
* See the License for the specific language governing permissions and
|
|
2302
2143
|
* limitations under the License.
|
|
2303
2144
|
*
|
|
2304
|
-
* Copyright
|
|
2305
|
-
* Copyright
|
|
2145
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2146
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2306
2147
|
* */
|
|
2307
2148
|
|
|
2308
2149
|
var ObservationForecast = function ObservationForecast(_a) {
|
|
@@ -2315,20 +2156,13 @@
|
|
|
2315
2156
|
getValues = _b.getValues;
|
|
2316
2157
|
|
|
2317
2158
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
2318
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
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"
|
|
2159
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2160
|
+
sx: {
|
|
2161
|
+
paddingTop: '8px!important',
|
|
2162
|
+
'+ .MuiGrid-item': {
|
|
2163
|
+
paddingTop: 5
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2332
2166
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormRadioGroup, {
|
|
2333
2167
|
name: "isObservationOrForecast",
|
|
2334
2168
|
disabled: isDisabled,
|
|
@@ -2341,7 +2175,8 @@
|
|
|
2341
2175
|
if (getValues('observationOrForecastTime')) {
|
|
2342
2176
|
trigger('observationOrForecastTime');
|
|
2343
2177
|
}
|
|
2344
|
-
}
|
|
2178
|
+
},
|
|
2179
|
+
isReadOnly: isReadOnly
|
|
2345
2180
|
}, (!isReadOnly || watch('isObservationOrForecast') === 'OBS') && /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2346
2181
|
value: "OBS",
|
|
2347
2182
|
label: "Observed",
|
|
@@ -2352,7 +2187,7 @@
|
|
|
2352
2187
|
label: "Forecast",
|
|
2353
2188
|
disabled: isDisabled,
|
|
2354
2189
|
"data-testid": "isObservationOrForecast-FCST"
|
|
2355
|
-
})))
|
|
2190
|
+
})));
|
|
2356
2191
|
};
|
|
2357
2192
|
|
|
2358
2193
|
/* *
|
|
@@ -2368,8 +2203,8 @@
|
|
|
2368
2203
|
* See the License for the specific language governing permissions and
|
|
2369
2204
|
* limitations under the License.
|
|
2370
2205
|
*
|
|
2371
|
-
* Copyright
|
|
2372
|
-
* Copyright
|
|
2206
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2207
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2373
2208
|
* */
|
|
2374
2209
|
var ForecastTimeValidation = 'Forecast time should lie between the valid start and valid end time';
|
|
2375
2210
|
|
|
@@ -2382,27 +2217,14 @@
|
|
|
2382
2217
|
return null;
|
|
2383
2218
|
} : _b;
|
|
2384
2219
|
var watch = reactHookForm.useFormContext().watch;
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
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"
|
|
2220
|
+
var label = getFieldLabel('Date and time', isReadOnly);
|
|
2221
|
+
return (!isReadOnly || watch('observationOrForecastTime') !== null) && /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2222
|
+
title: "At"
|
|
2402
2223
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
|
|
2403
2224
|
disablePast: watch('isObservationOrForecast') === 'FCST',
|
|
2404
2225
|
disableFuture: watch('isObservationOrForecast') === 'OBS',
|
|
2405
2226
|
name: "observationOrForecastTime",
|
|
2227
|
+
label: label,
|
|
2406
2228
|
rules: {
|
|
2407
2229
|
validate: {
|
|
2408
2230
|
isValidDate: formFields.isValidDate,
|
|
@@ -2415,14 +2237,17 @@
|
|
|
2415
2237
|
}
|
|
2416
2238
|
},
|
|
2417
2239
|
disabled: isDisabled,
|
|
2240
|
+
isReadOnly: isReadOnly,
|
|
2418
2241
|
helperText: helperText,
|
|
2419
|
-
onChange: onChange
|
|
2420
|
-
|
|
2242
|
+
onChange: onChange,
|
|
2243
|
+
sx: styles$2.helperText
|
|
2244
|
+
}));
|
|
2421
2245
|
};
|
|
2422
2246
|
|
|
2423
2247
|
var Phenomenon = function Phenomenon(_a) {
|
|
2424
2248
|
var productType = _a.productType,
|
|
2425
2249
|
isDisabled = _a.isDisabled,
|
|
2250
|
+
isReadOnly = _a.isReadOnly,
|
|
2426
2251
|
_b = _a.onChange,
|
|
2427
2252
|
_onChange = _b === void 0 ? function () {
|
|
2428
2253
|
return null;
|
|
@@ -2434,30 +2259,17 @@
|
|
|
2434
2259
|
trigger = _c.trigger;
|
|
2435
2260
|
|
|
2436
2261
|
var phenomenaList = productType === 'sigmet' ? SigmetPhenomena : AirmetPhenomena;
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
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"
|
|
2262
|
+
var label = getFieldLabel('Phenomenon', isReadOnly);
|
|
2263
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2264
|
+
title: "What"
|
|
2454
2265
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
2455
2266
|
name: "phenomenon",
|
|
2456
|
-
label:
|
|
2267
|
+
label: label,
|
|
2457
2268
|
rules: {
|
|
2458
2269
|
required: true
|
|
2459
2270
|
},
|
|
2460
2271
|
disabled: isDisabled,
|
|
2272
|
+
isReadOnly: isReadOnly,
|
|
2461
2273
|
"data-testid": "phenomenon",
|
|
2462
2274
|
onChange: function onChange() {
|
|
2463
2275
|
if (getValues('movementType') === 'NO_VA_EXP') {
|
|
@@ -2485,7 +2297,7 @@
|
|
|
2485
2297
|
value: key,
|
|
2486
2298
|
key: key
|
|
2487
2299
|
}, phenomenaList[key]);
|
|
2488
|
-
})))
|
|
2300
|
+
})));
|
|
2489
2301
|
};
|
|
2490
2302
|
|
|
2491
2303
|
/* *
|
|
@@ -2501,8 +2313,8 @@
|
|
|
2501
2313
|
* See the License for the specific language governing permissions and
|
|
2502
2314
|
* limitations under the License.
|
|
2503
2315
|
*
|
|
2504
|
-
* Copyright
|
|
2505
|
-
* Copyright
|
|
2316
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2317
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2506
2318
|
* */
|
|
2507
2319
|
var noIntersectionMessage$1 = 'The start position needs to be (partly) inside the FIR';
|
|
2508
2320
|
var maximum6PointsMessage$1 = 'The start position drawing allows a maximum of 6 individual points';
|
|
@@ -2522,22 +2334,9 @@
|
|
|
2522
2334
|
watch = _c.watch;
|
|
2523
2335
|
|
|
2524
2336
|
var isDraft = shared.useDraftFormHelpers().isDraft;
|
|
2525
|
-
return !isReadOnly && /*#__PURE__*/React__default["default"].createElement(
|
|
2526
|
-
|
|
2527
|
-
|
|
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,
|
|
2337
|
+
return !isReadOnly && /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2338
|
+
title: "Start position",
|
|
2339
|
+
sx: styles$2.drawSection,
|
|
2541
2340
|
"data-testid": "startGeometry"
|
|
2542
2341
|
}, /*#__PURE__*/React__default["default"].createElement(DrawTools, {
|
|
2543
2342
|
type: StartOrEndDrawing.start,
|
|
@@ -2547,7 +2346,7 @@
|
|
|
2547
2346
|
}
|
|
2548
2347
|
}), drawMode[StartOrEndDrawing.start] && /*#__PURE__*/React__default["default"].createElement(material.FormHelperText, {
|
|
2549
2348
|
variant: "filled",
|
|
2550
|
-
sx: styles$
|
|
2349
|
+
sx: styles$2.quitDrawModeMessage
|
|
2551
2350
|
}, exitDrawModeMessage), !!errors.startGeometry && /*#__PURE__*/React__default["default"].createElement(material.FormHelperText, {
|
|
2552
2351
|
error: true,
|
|
2553
2352
|
variant: "filled"
|
|
@@ -2577,7 +2376,7 @@
|
|
|
2577
2376
|
}
|
|
2578
2377
|
}), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
|
|
2579
2378
|
name: "startGeometryIntersect"
|
|
2580
|
-
}))
|
|
2379
|
+
}));
|
|
2581
2380
|
};
|
|
2582
2381
|
|
|
2583
2382
|
/* *
|
|
@@ -2593,8 +2392,8 @@
|
|
|
2593
2392
|
* See the License for the specific language governing permissions and
|
|
2594
2393
|
* limitations under the License.
|
|
2595
2394
|
*
|
|
2596
|
-
* Copyright
|
|
2597
|
-
* Copyright
|
|
2395
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2396
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2598
2397
|
* */
|
|
2599
2398
|
var movementStepValMessageKT = 'Speed should be rounded to the nearest 5kt';
|
|
2600
2399
|
var movementStepValMessageKMH = 'Speed should be rounded to the nearest 10kmh';
|
|
@@ -2671,24 +2470,9 @@
|
|
|
2671
2470
|
var selectedFIR = watch('locationIndicatorATSR'); // Get allowed movement units based on selected FIR - if no FIR selected, allow all units
|
|
2672
2471
|
|
|
2673
2472
|
var allowedMovementUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'movement_unit', MovementUnit);
|
|
2674
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
2675
|
-
|
|
2676
|
-
|
|
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"
|
|
2473
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2474
|
+
title: "Progress",
|
|
2475
|
+
sx: styles$2.containerItem
|
|
2692
2476
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2693
2477
|
item: true,
|
|
2694
2478
|
xs: 12
|
|
@@ -2702,18 +2486,19 @@
|
|
|
2702
2486
|
},
|
|
2703
2487
|
onChange: function onChange() {
|
|
2704
2488
|
return setDrawModeType ? setDrawModeType(MapDrawMode.DELETE, StartOrEndDrawing.end) : null;
|
|
2705
|
-
}
|
|
2706
|
-
|
|
2489
|
+
},
|
|
2490
|
+
isReadOnly: isReadOnly
|
|
2491
|
+
}, watch('phenomenon') === 'VA_CLD' && /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2707
2492
|
value: "NO_VA_EXP",
|
|
2708
2493
|
label: "No volcanic ash expected",
|
|
2709
2494
|
disabled: isDisabled,
|
|
2710
2495
|
"data-testid": "movementType-NO_VA_EXP"
|
|
2711
|
-
}),
|
|
2496
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2712
2497
|
value: "STATIONARY",
|
|
2713
2498
|
label: "Stationary",
|
|
2714
2499
|
disabled: isDisabled,
|
|
2715
2500
|
"data-testid": "movementType-STATIONARY"
|
|
2716
|
-
}),
|
|
2501
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2717
2502
|
value: "MOVEMENT",
|
|
2718
2503
|
label: "Movement",
|
|
2719
2504
|
disabled: isDisabled,
|
|
@@ -2727,8 +2512,9 @@
|
|
|
2727
2512
|
rules: {
|
|
2728
2513
|
validate: isRequired
|
|
2729
2514
|
},
|
|
2730
|
-
sx: styles$
|
|
2515
|
+
sx: styles$2.movement,
|
|
2731
2516
|
disabled: isDisabled,
|
|
2517
|
+
isReadOnly: isReadOnly,
|
|
2732
2518
|
"data-testid": "movement-movementDirection",
|
|
2733
2519
|
onChange: function onChange(event) {
|
|
2734
2520
|
event.stopPropagation();
|
|
@@ -2754,8 +2540,9 @@
|
|
|
2754
2540
|
rules: {
|
|
2755
2541
|
validate: isRequired
|
|
2756
2542
|
},
|
|
2757
|
-
sx: styles$
|
|
2543
|
+
sx: styles$2.unit,
|
|
2758
2544
|
disabled: isDisabled,
|
|
2545
|
+
isReadOnly: isReadOnly,
|
|
2759
2546
|
defaultValue: 'KT',
|
|
2760
2547
|
"data-testid": "movement-movementUnit",
|
|
2761
2548
|
onChange: function onChange(event) {
|
|
@@ -2797,11 +2584,12 @@
|
|
|
2797
2584
|
}
|
|
2798
2585
|
},
|
|
2799
2586
|
disabled: isDisabled,
|
|
2587
|
+
isReadOnly: isReadOnly,
|
|
2800
2588
|
"data-testid": "movement-movementSpeed",
|
|
2801
2589
|
onChange: function onChange(event) {
|
|
2802
2590
|
return event && event.stopPropagation();
|
|
2803
2591
|
}
|
|
2804
|
-
})))), productType === 'sigmet' &&
|
|
2592
|
+
})))), productType === 'sigmet' && /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2805
2593
|
value: "FORECAST_POSITION",
|
|
2806
2594
|
label: "End position",
|
|
2807
2595
|
disabled: isDisabled,
|
|
@@ -2810,7 +2598,7 @@
|
|
|
2810
2598
|
item: true,
|
|
2811
2599
|
xs: 12,
|
|
2812
2600
|
"data-testid": "endGeometry",
|
|
2813
|
-
sx: styles$
|
|
2601
|
+
sx: styles$2.drawSection
|
|
2814
2602
|
}, !isReadOnly && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(DrawTools, {
|
|
2815
2603
|
"data-testid": "endGeometry-drawTools",
|
|
2816
2604
|
type: StartOrEndDrawing.end,
|
|
@@ -2820,7 +2608,7 @@
|
|
|
2820
2608
|
}
|
|
2821
2609
|
}), drawMode[StartOrEndDrawing.end] && /*#__PURE__*/React__default["default"].createElement(material.FormHelperText, {
|
|
2822
2610
|
variant: "filled",
|
|
2823
|
-
sx: styles$
|
|
2611
|
+
sx: styles$2.quitDrawModeMessage
|
|
2824
2612
|
}, exitDrawModeMessage), !!errors.endGeometry && /*#__PURE__*/React__default["default"].createElement(material.FormHelperText, {
|
|
2825
2613
|
error: true,
|
|
2826
2614
|
variant: "filled"
|
|
@@ -2850,7 +2638,7 @@
|
|
|
2850
2638
|
}
|
|
2851
2639
|
}), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
|
|
2852
2640
|
name: "endGeometryIntersect"
|
|
2853
|
-
}))))
|
|
2641
|
+
}))));
|
|
2854
2642
|
};
|
|
2855
2643
|
|
|
2856
2644
|
/* *
|
|
@@ -2866,13 +2654,14 @@
|
|
|
2866
2654
|
* See the License for the specific language governing permissions and
|
|
2867
2655
|
* limitations under the License.
|
|
2868
2656
|
*
|
|
2869
|
-
* Copyright
|
|
2870
|
-
* Copyright
|
|
2657
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2658
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2871
2659
|
* */
|
|
2872
2660
|
|
|
2873
2661
|
var SelectFIR = function SelectFIR(_a) {
|
|
2874
2662
|
var productType = _a.productType,
|
|
2875
|
-
isDisabled = _a.isDisabled
|
|
2663
|
+
isDisabled = _a.isDisabled,
|
|
2664
|
+
isReadOnly = _a.isReadOnly;
|
|
2876
2665
|
var setValue = reactHookForm.useFormContext().setValue;
|
|
2877
2666
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
2878
2667
|
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
@@ -2882,33 +2671,19 @@
|
|
|
2882
2671
|
optionsFIR = _b.optionsFIR,
|
|
2883
2672
|
allFIRS = _b.allFIRS;
|
|
2884
2673
|
|
|
2885
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
2886
|
-
|
|
2887
|
-
|
|
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"
|
|
2674
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2675
|
+
title: "Where",
|
|
2676
|
+
sx: styles$2.containerItem
|
|
2903
2677
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
2904
2678
|
name: "locationIndicatorATSR",
|
|
2905
|
-
label:
|
|
2679
|
+
label: isReadOnly ? 'FIR' : 'Select FIR',
|
|
2906
2680
|
rules: {
|
|
2907
2681
|
validate: {
|
|
2908
2682
|
isRequired: isRequired
|
|
2909
2683
|
}
|
|
2910
2684
|
},
|
|
2911
2685
|
disabled: isDisabled,
|
|
2686
|
+
isReadOnly: isReadOnly,
|
|
2912
2687
|
defaultValue: defaultATSR,
|
|
2913
2688
|
onChange: function onChange(changeEvent) {
|
|
2914
2689
|
setValue('locationIndicatorATSU', allFIRS[changeEvent.target.value].location_indicator_atsu);
|
|
@@ -2931,7 +2706,7 @@
|
|
|
2931
2706
|
}), /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
|
|
2932
2707
|
name: "firGeometry",
|
|
2933
2708
|
defaultValue: getFir()
|
|
2934
|
-
}))
|
|
2709
|
+
}));
|
|
2935
2710
|
};
|
|
2936
2711
|
|
|
2937
2712
|
/* *
|
|
@@ -2947,33 +2722,17 @@
|
|
|
2947
2722
|
* See the License for the specific language governing permissions and
|
|
2948
2723
|
* limitations under the License.
|
|
2949
2724
|
*
|
|
2950
|
-
* Copyright
|
|
2951
|
-
* Copyright
|
|
2725
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2726
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2952
2727
|
* */
|
|
2953
2728
|
|
|
2954
2729
|
var Type = function Type(_a) {
|
|
2955
2730
|
var isReadOnly = _a.isReadOnly,
|
|
2956
2731
|
isDisabled = _a.isDisabled;
|
|
2957
|
-
var watch = reactHookForm.useFormContext().watch;
|
|
2958
2732
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
2959
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
2960
|
-
|
|
2961
|
-
|
|
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"
|
|
2733
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2734
|
+
title: "Type",
|
|
2735
|
+
sx: styles$2.containerItem
|
|
2977
2736
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2978
2737
|
item: true,
|
|
2979
2738
|
xs: 12
|
|
@@ -2985,23 +2744,24 @@
|
|
|
2985
2744
|
}
|
|
2986
2745
|
},
|
|
2987
2746
|
disabled: isDisabled,
|
|
2747
|
+
isReadOnly: isReadOnly,
|
|
2988
2748
|
defaultValue: "NORMAL"
|
|
2989
|
-
},
|
|
2749
|
+
}, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2990
2750
|
value: "NORMAL",
|
|
2991
2751
|
label: "Normal",
|
|
2992
2752
|
disabled: isDisabled,
|
|
2993
2753
|
"data-testid": "type-NORMAL"
|
|
2994
|
-
}),
|
|
2754
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2995
2755
|
value: "TEST",
|
|
2996
2756
|
label: "Test",
|
|
2997
2757
|
disabled: isDisabled,
|
|
2998
2758
|
"data-testid": "type-TEST"
|
|
2999
|
-
}),
|
|
2759
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
3000
2760
|
value: "EXERCISE",
|
|
3001
2761
|
label: "Exercise",
|
|
3002
2762
|
disabled: isDisabled,
|
|
3003
2763
|
"data-testid": "type-EXERCISE"
|
|
3004
|
-
}))))
|
|
2764
|
+
}))));
|
|
3005
2765
|
};
|
|
3006
2766
|
|
|
3007
2767
|
/* *
|
|
@@ -3017,14 +2777,19 @@
|
|
|
3017
2777
|
* See the License for the specific language governing permissions and
|
|
3018
2778
|
* limitations under the License.
|
|
3019
2779
|
*
|
|
3020
|
-
* Copyright
|
|
3021
|
-
* Copyright
|
|
2780
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2781
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3022
2782
|
* */
|
|
3023
2783
|
var VALID_FROM_TIME_DELAY_IN_MINUTES = 30;
|
|
2784
|
+
var VALID_FROM_ERROR_BEFORE_CURRENT = 'Valid from time cannot be before current time';
|
|
2785
|
+
var getValidFromXHoursBeforeMessage = function getValidFromXHoursBeforeMessage(hours) {
|
|
2786
|
+
return "Valid from time can be no more than " + hours + " hours after current time";
|
|
2787
|
+
};
|
|
3024
2788
|
|
|
3025
2789
|
var ValidFrom = function ValidFrom(_a) {
|
|
3026
2790
|
var productType = _a.productType,
|
|
3027
2791
|
isDisabled = _a.isDisabled,
|
|
2792
|
+
isReadOnly = _a.isReadOnly,
|
|
3028
2793
|
_b = _a.onChange,
|
|
3029
2794
|
_onChange = _b === void 0 ? function () {
|
|
3030
2795
|
return null;
|
|
@@ -3036,26 +2801,13 @@
|
|
|
3036
2801
|
|
|
3037
2802
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
3038
2803
|
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
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"
|
|
2804
|
+
var label = getFieldLabel('Date and time', isReadOnly);
|
|
2805
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2806
|
+
title: "Valid from"
|
|
3056
2807
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
|
|
3057
2808
|
disablePast: true,
|
|
3058
2809
|
name: "validDateStart",
|
|
2810
|
+
label: label,
|
|
3059
2811
|
defaultNullValue: moment__default["default"].utc().add(VALID_FROM_TIME_DELAY_IN_MINUTES, 'minutes').format('YYYY-MM-DDTHH:mm:ss[Z]'),
|
|
3060
2812
|
rules: {
|
|
3061
2813
|
validate: {
|
|
@@ -3063,11 +2815,11 @@
|
|
|
3063
2815
|
isValidDate: formFields.isValidDate,
|
|
3064
2816
|
// The validity start can not be before the current time
|
|
3065
2817
|
isValueBeforeCurrentTime: function isValueBeforeCurrentTime(value) {
|
|
3066
|
-
return formFields.isXHoursBefore(value, moment__default["default"].utc().format(), 0) ||
|
|
2818
|
+
return formFields.isXHoursBefore(value, moment__default["default"].utc().format(), 0) || VALID_FROM_ERROR_BEFORE_CURRENT;
|
|
3067
2819
|
},
|
|
3068
2820
|
// The current time can be no more than 4 hours before the validity start (12 for VA/TC SIGMET)
|
|
3069
2821
|
isCurrentTimeXHoursBeforeValue: function isCurrentTimeXHoursBeforeValue(value) {
|
|
3070
|
-
return formFields.isXHoursBefore(moment__default["default"].utc().format(), value, getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config)) ||
|
|
2822
|
+
return formFields.isXHoursBefore(moment__default["default"].utc().format(), value, getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config)) || getValidFromXHoursBeforeMessage(getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config));
|
|
3071
2823
|
}
|
|
3072
2824
|
}
|
|
3073
2825
|
},
|
|
@@ -3083,10 +2835,8 @@
|
|
|
3083
2835
|
_onChange();
|
|
3084
2836
|
},
|
|
3085
2837
|
disabled: isDisabled,
|
|
2838
|
+
isReadOnly: isReadOnly,
|
|
3086
2839
|
"data-testid": "valid-from"
|
|
3087
|
-
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3088
|
-
item: true,
|
|
3089
|
-
xs: 6
|
|
3090
2840
|
}));
|
|
3091
2841
|
};
|
|
3092
2842
|
|
|
@@ -3103,8 +2853,8 @@
|
|
|
3103
2853
|
* See the License for the specific language governing permissions and
|
|
3104
2854
|
* limitations under the License.
|
|
3105
2855
|
*
|
|
3106
|
-
* Copyright
|
|
3107
|
-
* Copyright
|
|
2856
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2857
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3108
2858
|
* */
|
|
3109
2859
|
var DEFAULT_VALID_TIME_SIGMET = 3;
|
|
3110
2860
|
var DEFAULT_VALID_TIME_AIRMET = 1;
|
|
@@ -3115,6 +2865,7 @@
|
|
|
3115
2865
|
var ValidUntil = function ValidUntil(_a) {
|
|
3116
2866
|
var productType = _a.productType,
|
|
3117
2867
|
isDisabled = _a.isDisabled,
|
|
2868
|
+
isReadOnly = _a.isReadOnly,
|
|
3118
2869
|
_b = _a.onChange,
|
|
3119
2870
|
_onChange = _b === void 0 ? function () {
|
|
3120
2871
|
return null;
|
|
@@ -3125,28 +2876,15 @@
|
|
|
3125
2876
|
trigger = _c.trigger;
|
|
3126
2877
|
|
|
3127
2878
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
2879
|
+
var label = getFieldLabel('Date and time', isReadOnly);
|
|
3128
2880
|
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
3129
2881
|
var defaultHoursValid = getDefaultHoursValid(productType);
|
|
3130
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
3131
|
-
|
|
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"
|
|
2882
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2883
|
+
title: "Valid until"
|
|
3147
2884
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
|
|
3148
2885
|
disablePast: true,
|
|
3149
2886
|
name: "validDateEnd",
|
|
2887
|
+
label: label,
|
|
3150
2888
|
defaultNullValue: moment__default["default"].utc().add(defaultHoursValid, 'hour').add(VALID_FROM_TIME_DELAY_IN_MINUTES, 'minutes').format('YYYY-MM-DDTHH:mm:ss[Z]'),
|
|
3151
2889
|
rules: {
|
|
3152
2890
|
validate: {
|
|
@@ -3163,6 +2901,7 @@
|
|
|
3163
2901
|
}
|
|
3164
2902
|
},
|
|
3165
2903
|
disabled: isDisabled,
|
|
2904
|
+
isReadOnly: isReadOnly,
|
|
3166
2905
|
onChange: function onChange() {
|
|
3167
2906
|
if (getValues('validDateStart')) {
|
|
3168
2907
|
trigger('validDateStart');
|
|
@@ -3174,29 +2913,9 @@
|
|
|
3174
2913
|
|
|
3175
2914
|
_onChange();
|
|
3176
2915
|
}
|
|
3177
|
-
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3178
|
-
item: true,
|
|
3179
|
-
xs: 6
|
|
3180
2916
|
}));
|
|
3181
2917
|
};
|
|
3182
2918
|
|
|
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
2919
|
var VolcanicFields = function VolcanicFields(_a) {
|
|
3201
2920
|
var isDisabled = _a.isDisabled,
|
|
3202
2921
|
isReadOnly = _a.isReadOnly,
|
|
@@ -3224,7 +2943,7 @@
|
|
|
3224
2943
|
}, (!isReadOnly || !!watch('vaSigmetVolcanoName')) && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3225
2944
|
item: true,
|
|
3226
2945
|
xs: 12,
|
|
3227
|
-
sx: styles$
|
|
2946
|
+
sx: styles$2.volcanicField
|
|
3228
2947
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormTextField, {
|
|
3229
2948
|
name: "vaSigmetVolcanoName",
|
|
3230
2949
|
label: "Volcano name",
|
|
@@ -3233,7 +2952,8 @@
|
|
|
3233
2952
|
},
|
|
3234
2953
|
disabled: isDisabled,
|
|
3235
2954
|
helperText: helperText,
|
|
3236
|
-
upperCase: true
|
|
2955
|
+
upperCase: true,
|
|
2956
|
+
isReadOnly: isReadOnly
|
|
3237
2957
|
})), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3238
2958
|
item: true,
|
|
3239
2959
|
xs: 6
|
|
@@ -3252,12 +2972,13 @@
|
|
|
3252
2972
|
}
|
|
3253
2973
|
}
|
|
3254
2974
|
},
|
|
3255
|
-
sx: styles$
|
|
2975
|
+
sx: __assign(__assign({}, styles$2.latitude), styles$2.helperText),
|
|
3256
2976
|
disabled: isDisabled,
|
|
3257
2977
|
helperText: helperText,
|
|
3258
2978
|
onChange: function onChange() {
|
|
3259
2979
|
return trigger('vaSigmetVolcanoCoordinates.longitude');
|
|
3260
|
-
}
|
|
2980
|
+
},
|
|
2981
|
+
isReadOnly: isReadOnly
|
|
3261
2982
|
})), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3262
2983
|
item: true,
|
|
3263
2984
|
xs: 6
|
|
@@ -3280,7 +3001,9 @@
|
|
|
3280
3001
|
helperText: helperText,
|
|
3281
3002
|
onChange: function onChange() {
|
|
3282
3003
|
return trigger('vaSigmetVolcanoCoordinates.latitude');
|
|
3283
|
-
}
|
|
3004
|
+
},
|
|
3005
|
+
sx: styles$2.helperText,
|
|
3006
|
+
isReadOnly: isReadOnly
|
|
3284
3007
|
}))));
|
|
3285
3008
|
};
|
|
3286
3009
|
|
|
@@ -3316,12 +3039,15 @@
|
|
|
3316
3039
|
|
|
3317
3040
|
var SurfaceVisibility = function SurfaceVisibility(_a) {
|
|
3318
3041
|
var isDisabled = _a.isDisabled,
|
|
3042
|
+
isReadOnly = _a.isReadOnly,
|
|
3319
3043
|
_b = _a.onChange,
|
|
3320
3044
|
_onChange = _b === void 0 ? function () {
|
|
3321
3045
|
return null;
|
|
3322
3046
|
} : _b;
|
|
3323
3047
|
|
|
3324
3048
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
3049
|
+
var visibilityLabel = getFieldLabel('Visibility', isReadOnly);
|
|
3050
|
+
var visibilityCauseLabel = getFieldLabel('Cause', isReadOnly);
|
|
3325
3051
|
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3326
3052
|
item: true,
|
|
3327
3053
|
container: true,
|
|
@@ -3339,11 +3065,11 @@
|
|
|
3339
3065
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3340
3066
|
item: true,
|
|
3341
3067
|
xs: 12,
|
|
3342
|
-
sx: styles$
|
|
3068
|
+
sx: styles$2.surfaceVisibility
|
|
3343
3069
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
3344
3070
|
name: "visibilityValue",
|
|
3345
3071
|
"data-testid": "surfaceVisibility-visibilityValue",
|
|
3346
|
-
label:
|
|
3072
|
+
label: visibilityLabel,
|
|
3347
3073
|
helperText: "Value in meters",
|
|
3348
3074
|
rules: {
|
|
3349
3075
|
min: {
|
|
@@ -3359,19 +3085,21 @@
|
|
|
3359
3085
|
validateSurfaceVisibility: validateSurfaceVisibility
|
|
3360
3086
|
}
|
|
3361
3087
|
},
|
|
3362
|
-
disabled: isDisabled
|
|
3088
|
+
disabled: isDisabled,
|
|
3089
|
+
isReadOnly: isReadOnly
|
|
3363
3090
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3364
3091
|
item: true,
|
|
3365
3092
|
xs: 12
|
|
3366
3093
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
3367
3094
|
name: "visibilityCause",
|
|
3368
|
-
label:
|
|
3095
|
+
label: visibilityCauseLabel,
|
|
3369
3096
|
rules: {
|
|
3370
3097
|
validate: {
|
|
3371
3098
|
isRequired: isRequired
|
|
3372
3099
|
}
|
|
3373
3100
|
},
|
|
3374
3101
|
disabled: isDisabled,
|
|
3102
|
+
isReadOnly: isReadOnly,
|
|
3375
3103
|
"data-testid": "surfaceVisibility-visibilityCause",
|
|
3376
3104
|
onChange: function onChange(event) {
|
|
3377
3105
|
event.stopPropagation();
|
|
@@ -3412,6 +3140,7 @@
|
|
|
3412
3140
|
|
|
3413
3141
|
var SurfaceWind = function SurfaceWind(_a) {
|
|
3414
3142
|
var isDisabled = _a.isDisabled,
|
|
3143
|
+
isReadOnly = _a.isReadOnly,
|
|
3415
3144
|
_b = _a.onChange,
|
|
3416
3145
|
_onChange = _b === void 0 ? function () {
|
|
3417
3146
|
return null;
|
|
@@ -3427,6 +3156,8 @@
|
|
|
3427
3156
|
var selectedFIR = watch('locationIndicatorATSR'); // Get allowed speed units based on selected FIR - if no FIR selected, allow all units
|
|
3428
3157
|
|
|
3429
3158
|
var allowedWindUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'surfacewind_unit', WindUnit);
|
|
3159
|
+
var windLabel = getFieldLabel('Wind direction', isReadOnly, 'Set');
|
|
3160
|
+
var speedLabel = getFieldLabel('Speed', isReadOnly, 'Set');
|
|
3430
3161
|
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3431
3162
|
item: true,
|
|
3432
3163
|
container: true,
|
|
@@ -3444,10 +3175,10 @@
|
|
|
3444
3175
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3445
3176
|
item: true,
|
|
3446
3177
|
xs: 12,
|
|
3447
|
-
sx: styles$
|
|
3178
|
+
sx: styles$2.surfaceWind
|
|
3448
3179
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
3449
3180
|
name: "windDirection",
|
|
3450
|
-
label:
|
|
3181
|
+
label: windLabel,
|
|
3451
3182
|
helperText: "Value in degrees",
|
|
3452
3183
|
rules: {
|
|
3453
3184
|
min: {
|
|
@@ -3464,6 +3195,7 @@
|
|
|
3464
3195
|
}
|
|
3465
3196
|
},
|
|
3466
3197
|
disabled: isDisabled,
|
|
3198
|
+
isReadOnly: isReadOnly,
|
|
3467
3199
|
"data-testid": "surfaceWind-windDirection"
|
|
3468
3200
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3469
3201
|
item: true,
|
|
@@ -3480,8 +3212,9 @@
|
|
|
3480
3212
|
isRequired: isRequired
|
|
3481
3213
|
}
|
|
3482
3214
|
},
|
|
3483
|
-
sx: styles$
|
|
3215
|
+
sx: styles$2.unit,
|
|
3484
3216
|
disabled: isDisabled,
|
|
3217
|
+
isReadOnly: isReadOnly,
|
|
3485
3218
|
defaultValue: 'KT',
|
|
3486
3219
|
"data-testid": "surfaceWind-windUnit",
|
|
3487
3220
|
onChange: function onChange() {
|
|
@@ -3501,7 +3234,7 @@
|
|
|
3501
3234
|
xs: 7
|
|
3502
3235
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
3503
3236
|
name: "windSpeed",
|
|
3504
|
-
label:
|
|
3237
|
+
label: speedLabel,
|
|
3505
3238
|
rules: {
|
|
3506
3239
|
validate: {
|
|
3507
3240
|
isRequired: isRequired,
|
|
@@ -3517,6 +3250,7 @@
|
|
|
3517
3250
|
}
|
|
3518
3251
|
},
|
|
3519
3252
|
disabled: isDisabled,
|
|
3253
|
+
isReadOnly: isReadOnly,
|
|
3520
3254
|
"data-testid": "surfaceWind-windSpeed"
|
|
3521
3255
|
})))));
|
|
3522
3256
|
};
|
|
@@ -3582,7 +3316,7 @@
|
|
|
3582
3316
|
item: true,
|
|
3583
3317
|
container: true,
|
|
3584
3318
|
spacing: 2,
|
|
3585
|
-
sx: styles$
|
|
3319
|
+
sx: styles$2.containerItem
|
|
3586
3320
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3587
3321
|
item: true,
|
|
3588
3322
|
xs: 4,
|
|
@@ -3590,7 +3324,7 @@
|
|
|
3590
3324
|
justifyContent: "flex-end"
|
|
3591
3325
|
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
3592
3326
|
variant: "subtitle1",
|
|
3593
|
-
sx: styles$
|
|
3327
|
+
sx: styles$2.label
|
|
3594
3328
|
}, "Levels")), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3595
3329
|
item: true,
|
|
3596
3330
|
xs: 8,
|
|
@@ -3609,7 +3343,10 @@
|
|
|
3609
3343
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3610
3344
|
item: true,
|
|
3611
3345
|
xs: 4
|
|
3612
|
-
}, (!isReadOnly || watch('cloudLevelInfoMode') === 'BETW_ABV' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV') && /*#__PURE__*/React__default["default"].createElement(
|
|
3346
|
+
}, (!isReadOnly || watch('cloudLevelInfoMode') === 'BETW_ABV' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV') && /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormFormControl, {
|
|
3347
|
+
disabled: isDisabled,
|
|
3348
|
+
isReadOnly: isReadOnly
|
|
3349
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
3613
3350
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
3614
3351
|
checked: watch('cloudLevelInfoMode') === 'BETW_ABV' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV',
|
|
3615
3352
|
onChange: function onChange() {
|
|
@@ -3645,7 +3382,7 @@
|
|
|
3645
3382
|
}),
|
|
3646
3383
|
"data-testid": "cloudLevels-Above",
|
|
3647
3384
|
label: "Above"
|
|
3648
|
-
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3385
|
+
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3649
3386
|
item: true,
|
|
3650
3387
|
xs: 3
|
|
3651
3388
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
@@ -3657,8 +3394,9 @@
|
|
|
3657
3394
|
isRequired: isRequired
|
|
3658
3395
|
}
|
|
3659
3396
|
},
|
|
3660
|
-
sx: styles$
|
|
3397
|
+
sx: styles$2.unit,
|
|
3661
3398
|
disabled: isDisabled,
|
|
3399
|
+
isReadOnly: isReadOnly,
|
|
3662
3400
|
defaultValue: 'FT',
|
|
3663
3401
|
onChange: function onChange() {
|
|
3664
3402
|
if (getValues('cloudLevel.value') || getValues('cloudLevel.value') === 0) {
|
|
@@ -3686,7 +3424,7 @@
|
|
|
3686
3424
|
name: "cloudLevel.value",
|
|
3687
3425
|
label: "Upper level",
|
|
3688
3426
|
"data-testid": "cloudLevel-value",
|
|
3689
|
-
sx: styles$
|
|
3427
|
+
sx: styles$2.levelField,
|
|
3690
3428
|
rules: {
|
|
3691
3429
|
validate: {
|
|
3692
3430
|
isRequired: isRequired,
|
|
@@ -3705,6 +3443,7 @@
|
|
|
3705
3443
|
}
|
|
3706
3444
|
},
|
|
3707
3445
|
disabled: isDisabled,
|
|
3446
|
+
isReadOnly: isReadOnly,
|
|
3708
3447
|
onChange: function onChange() {
|
|
3709
3448
|
return (getValues('cloudLowerLevel.value') || getValues('cloudLowerLevel.value') === 0) && trigger('cloudLowerLevel.value');
|
|
3710
3449
|
}
|
|
@@ -3715,7 +3454,10 @@
|
|
|
3715
3454
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3716
3455
|
item: true,
|
|
3717
3456
|
xs: 4
|
|
3718
|
-
}, (!isReadOnly || watch('cloudLevelInfoMode') === 'BETW_SFC' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV') && /*#__PURE__*/React__default["default"].createElement(
|
|
3457
|
+
}, (!isReadOnly || watch('cloudLevelInfoMode') === 'BETW_SFC' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV') && /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormFormControl, {
|
|
3458
|
+
disabled: isDisabled,
|
|
3459
|
+
isReadOnly: isReadOnly
|
|
3460
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
3719
3461
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
3720
3462
|
checked: watch('cloudLevelInfoMode') === 'BETW_SFC' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV',
|
|
3721
3463
|
onChange: function onChange() {
|
|
@@ -3751,7 +3493,7 @@
|
|
|
3751
3493
|
}),
|
|
3752
3494
|
"data-testid": "cloudLevels-SFC",
|
|
3753
3495
|
label: "SFC"
|
|
3754
|
-
})), watch('cloudLevelInfoMode') !== 'BETW_SFC' && watch('cloudLevelInfoMode') !== 'BETW_SFC_ABV' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3496
|
+
}))), watch('cloudLevelInfoMode') !== 'BETW_SFC' && watch('cloudLevelInfoMode') !== 'BETW_SFC_ABV' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3755
3497
|
item: true,
|
|
3756
3498
|
xs: 3
|
|
3757
3499
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
@@ -3763,8 +3505,9 @@
|
|
|
3763
3505
|
isRequired: isRequired
|
|
3764
3506
|
}
|
|
3765
3507
|
},
|
|
3766
|
-
sx: styles$
|
|
3508
|
+
sx: styles$2.unit,
|
|
3767
3509
|
disabled: isDisabled,
|
|
3510
|
+
isReadOnly: isReadOnly,
|
|
3768
3511
|
defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
|
|
3769
3512
|
onChange: function onChange() {
|
|
3770
3513
|
if (getValues('cloudLowerLevel.value') || getValues('cloudLowerLevel.value') === 0) {
|
|
@@ -3813,26 +3556,11 @@
|
|
|
3813
3556
|
}
|
|
3814
3557
|
}
|
|
3815
3558
|
},
|
|
3816
|
-
disabled: isDisabled
|
|
3559
|
+
disabled: isDisabled,
|
|
3560
|
+
isReadOnly: isReadOnly
|
|
3817
3561
|
})))))));
|
|
3818
3562
|
};
|
|
3819
3563
|
|
|
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
3564
|
var noTAC = 'Missing data: no TAC can be generated'; // Ensure we have enough data to retrieve a TAC
|
|
3837
3565
|
|
|
3838
3566
|
var shouldRetrieveTAC = function shouldRetrieveTAC(product) {
|
|
@@ -3894,45 +3622,377 @@
|
|
|
3894
3622
|
];
|
|
3895
3623
|
}
|
|
3896
3624
|
});
|
|
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);
|
|
3625
|
+
});
|
|
3626
|
+
};
|
|
3627
|
+
|
|
3628
|
+
React__default["default"].useEffect(function () {
|
|
3629
|
+
if (shouldRetrieveTAC(initialProduct)) {
|
|
3630
|
+
retrieveTAC(initialProduct);
|
|
3631
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3632
|
+
|
|
3633
|
+
}, []);
|
|
3634
|
+
|
|
3635
|
+
var update = function update(formValues) {
|
|
3636
|
+
if (shouldRetrieveTAC(formValues)) {
|
|
3637
|
+
retrieveTAC(formValues);
|
|
3638
|
+
} else if (isMounted.current) {
|
|
3639
|
+
setTAC(noTAC);
|
|
3640
|
+
}
|
|
3641
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3642
|
+
|
|
3643
|
+
|
|
3644
|
+
var delayedQuery = React__default["default"].useCallback(lodash.debounce(update, 1000), []);
|
|
3645
|
+
return [TAC, delayedQuery];
|
|
3646
|
+
};
|
|
3647
|
+
|
|
3648
|
+
var ProductFormTAC = function ProductFormTAC(_a) {
|
|
3649
|
+
var tac = _a.tac;
|
|
3650
|
+
var tacLines = tac.split('\n');
|
|
3651
|
+
var hasTac = tacLines.length && tacLines.toString() !== noTAC;
|
|
3652
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
3653
|
+
variant: "body2",
|
|
3654
|
+
component: "div",
|
|
3655
|
+
sx: {
|
|
3656
|
+
paddingTop: '16px',
|
|
3657
|
+
whiteSpace: 'break-spaces'
|
|
3658
|
+
},
|
|
3659
|
+
"data-testid": "productform-tac-message"
|
|
3660
|
+
}, tacLines.map(function (line) {
|
|
3661
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
3662
|
+
component: "p",
|
|
3663
|
+
key: line,
|
|
3664
|
+
sx: {
|
|
3665
|
+
margin: 0,
|
|
3666
|
+
fontSize: hasTac ? '1.125rem' : '1rem',
|
|
3667
|
+
fontWeight: 'normal',
|
|
3668
|
+
fontStretch: 'normal',
|
|
3669
|
+
fontStyle: 'normal',
|
|
3670
|
+
lineHeight: 1.56,
|
|
3671
|
+
letterSpacing: '0.5px'
|
|
3672
|
+
},
|
|
3673
|
+
"data-testid": "productform-tac-message-line"
|
|
3674
|
+
}, line);
|
|
3675
|
+
}));
|
|
3676
|
+
};
|
|
3677
|
+
|
|
3678
|
+
var IssuedAt = function IssuedAt(_a) {
|
|
3679
|
+
var date = _a.date,
|
|
3680
|
+
isReadOnly = _a.isReadOnly;
|
|
3681
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
3682
|
+
title: "Issued at"
|
|
3683
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3684
|
+
item: true,
|
|
3685
|
+
xs: 12
|
|
3686
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
3687
|
+
variant: "body2",
|
|
3688
|
+
sx: __assign(__assign({}, styles$2.body), {
|
|
3689
|
+
fontSize: '1rem',
|
|
3690
|
+
color: isReadOnly ? 'geowebColors.typographyAndIcons.text' : 'geowebColors.buttons.primary.disabled.color'
|
|
3691
|
+
})
|
|
3692
|
+
}, date)));
|
|
3693
|
+
};
|
|
3694
|
+
|
|
3695
|
+
/* *
|
|
3696
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3697
|
+
* you may not use this file except in compliance with the License.
|
|
3698
|
+
* You may obtain a copy of the License at
|
|
3699
|
+
*
|
|
3700
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3701
|
+
*
|
|
3702
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3703
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3704
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3705
|
+
* See the License for the specific language governing permissions and
|
|
3706
|
+
* limitations under the License.
|
|
3707
|
+
*
|
|
3708
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3709
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
3710
|
+
* */
|
|
3711
|
+
|
|
3712
|
+
var Tac = function Tac(_a) {
|
|
3713
|
+
var tac = _a.tac,
|
|
3714
|
+
children = _a.children;
|
|
3715
|
+
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
3716
|
+
title: "TAC",
|
|
3717
|
+
sx: {
|
|
3718
|
+
paddingTop: 2
|
|
3719
|
+
}
|
|
3720
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3721
|
+
item: true,
|
|
3722
|
+
xs: 12
|
|
3723
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductFormTAC, {
|
|
3724
|
+
tac: tac
|
|
3725
|
+
}), children));
|
|
3726
|
+
};
|
|
3727
|
+
|
|
3728
|
+
/* *
|
|
3729
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3730
|
+
* you may not use this file except in compliance with the License.
|
|
3731
|
+
* You may obtain a copy of the License at
|
|
3732
|
+
*
|
|
3733
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3734
|
+
*
|
|
3735
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3736
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3737
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3738
|
+
* See the License for the specific language governing permissions and
|
|
3739
|
+
* limitations under the License.
|
|
3740
|
+
*
|
|
3741
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3742
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
3743
|
+
* */
|
|
3744
|
+
var adagucBaseUrl = 'https://adaguc-server-geoweb.geoweb.knmi.cloud/adagucserver';
|
|
3745
|
+
var KNMIGeoWebOverlays = {
|
|
3746
|
+
name: 'KNMIGeoWebOverlays',
|
|
3747
|
+
url: adagucBaseUrl + "?dataset=OVL",
|
|
3748
|
+
id: 'knmigeoweboverlays'
|
|
3749
|
+
};
|
|
3750
|
+
var northSeaPlatforms = {
|
|
3751
|
+
service: KNMIGeoWebOverlays.url,
|
|
3752
|
+
name: 'northseastations',
|
|
3753
|
+
format: 'image/png',
|
|
3754
|
+
layerType: core.mapTypes.LayerType.overLayer,
|
|
3755
|
+
enabled: true
|
|
3756
|
+
};
|
|
3757
|
+
var majorAirportsEHAA = {
|
|
3758
|
+
service: KNMIGeoWebOverlays.url,
|
|
3759
|
+
name: 'airports',
|
|
3760
|
+
format: 'image/png',
|
|
3761
|
+
layerType: core.mapTypes.LayerType.overLayer,
|
|
3762
|
+
enabled: true
|
|
3763
|
+
};
|
|
3764
|
+
|
|
3765
|
+
var allowOneGeoJSONFeature = function allowOneGeoJSONFeature(mode, geojson) {
|
|
3766
|
+
switch (mode) {
|
|
3767
|
+
case MapDrawMode.BOX:
|
|
3768
|
+
case MapDrawMode.POLYGON:
|
|
3769
|
+
return geojson.features[0].geometry.coordinates.length > 1 ? produce__default["default"](geojson, function (draft) {
|
|
3770
|
+
draft.features[0].geometry.coordinates = [draft.features[0].geometry.coordinates[1]];
|
|
3771
|
+
}) : geojson;
|
|
3772
|
+
|
|
3773
|
+
default:
|
|
3774
|
+
return geojson;
|
|
3775
|
+
}
|
|
3776
|
+
};
|
|
3777
|
+
|
|
3778
|
+
var MapViewGeoJson = function MapViewGeoJson(_a) {
|
|
3779
|
+
var geoJSONs = _a.geoJSONs,
|
|
3780
|
+
_b = _a.setLayerGeoJSONs,
|
|
3781
|
+
setLayerGeoJSONs = _b === void 0 ? function () {} : _b,
|
|
3782
|
+
_c = _a.layerDrawModes,
|
|
3783
|
+
layerDrawModes = _c === void 0 ? {
|
|
3784
|
+
start: null,
|
|
3785
|
+
end: null
|
|
3786
|
+
} : _c,
|
|
3787
|
+
_d = _a.drawMode,
|
|
3788
|
+
drawMode = _d === void 0 ? {
|
|
3789
|
+
start: null,
|
|
3790
|
+
end: null
|
|
3791
|
+
} : _d,
|
|
3792
|
+
_e = _a.setDrawMode,
|
|
3793
|
+
setDrawMode = _e === void 0 ? function () {} : _e,
|
|
3794
|
+
_f = _a.exitDrawModeCallbackStart,
|
|
3795
|
+
exitDrawModeCallbackStart = _f === void 0 ? function () {} : _f,
|
|
3796
|
+
_g = _a.exitDrawModeCallbackEnd,
|
|
3797
|
+
exitDrawModeCallbackEnd = _g === void 0 ? function () {} : _g;
|
|
3798
|
+
var dispatch = reactRedux.useDispatch();
|
|
3799
|
+
var firstMap = reactRedux.useSelector(function (store) {
|
|
3800
|
+
return core.mapSelectors.getFirstMap(store);
|
|
3801
|
+
}, reactRedux.shallowEqual);
|
|
3802
|
+
var firstMapId = firstMap && firstMap.id ? firstMap.id : null;
|
|
3803
|
+
var mapLayers = reactRedux.useSelector(function (store) {
|
|
3804
|
+
return core.mapSelectors.getMapLayers(store, firstMapId);
|
|
3805
|
+
}, reactRedux.shallowEqual);
|
|
3806
|
+
var mapDimensions = reactRedux.useSelector(function (store) {
|
|
3807
|
+
return core.mapSelectors.getMapDimensions(store, firstMapId);
|
|
3808
|
+
}, reactRedux.shallowEqual);
|
|
3809
|
+
var mapId = React__namespace.useRef("sigmet-" + core.generateMapId()).current;
|
|
3810
|
+
var timesliderId = React__namespace.useRef("sigmet-" + core.generateTimesliderId()).current;
|
|
3811
|
+
var syncGroupAddGroup = React__namespace.useCallback(function (payload) {
|
|
3812
|
+
dispatch(core.SyncGroups.actions.syncGroupAddGroup(payload));
|
|
3813
|
+
}, [dispatch]);
|
|
3814
|
+
var syncGroupAddTarget = React__namespace.useCallback(function (payload) {
|
|
3815
|
+
dispatch(core.SyncGroups.actions.syncGroupAddTarget(payload));
|
|
3816
|
+
}, [dispatch]);
|
|
3817
|
+
React__namespace.useEffect(function () {
|
|
3818
|
+
if (mapLayers && mapLayers.length) {
|
|
3819
|
+
// use maplayers, but change layerId and current mapId
|
|
3820
|
+
var layers = mapLayers.map(function (layer) {
|
|
3821
|
+
return __assign(__assign({}, layer), {
|
|
3822
|
+
id: core.generateLayerId(),
|
|
3823
|
+
mapId: mapId
|
|
3824
|
+
});
|
|
3825
|
+
});
|
|
3826
|
+
dispatch(core.mapActions.setLayers({
|
|
3827
|
+
mapId: mapId,
|
|
3828
|
+
layers: layers
|
|
3829
|
+
}));
|
|
3830
|
+
}
|
|
3831
|
+
|
|
3832
|
+
if (mapDimensions && mapDimensions.length) {
|
|
3833
|
+
dispatch(core.mapActions.mapChangeDimension({
|
|
3834
|
+
mapId: mapId,
|
|
3835
|
+
dimension: mapDimensions[0],
|
|
3836
|
+
origin: 'MapViewGeoJson'
|
|
3837
|
+
}));
|
|
3838
|
+
}
|
|
3839
|
+
|
|
3840
|
+
dispatch(core.mapActions.setBaseLayers({
|
|
3841
|
+
mapId: mapId,
|
|
3842
|
+
layers: [__assign(__assign({}, core.publicLayers.baseLayerGrey), {
|
|
3843
|
+
id: "baselayer-" + mapId
|
|
3844
|
+
}), __assign(__assign({}, core.publicLayers.overLayer), {
|
|
3845
|
+
id: "countryborders-" + mapId
|
|
3846
|
+
}), __assign(__assign({}, northSeaPlatforms), {
|
|
3847
|
+
id: "northseaplatforms-" + mapId
|
|
3848
|
+
}), __assign(__assign({}, majorAirportsEHAA), {
|
|
3849
|
+
id: "majorairportsehaa-" + mapId
|
|
3850
|
+
})]
|
|
3851
|
+
}));
|
|
3852
|
+
dispatch(core.mapActions.setBbox({
|
|
3853
|
+
mapId: mapId,
|
|
3854
|
+
bbox: srsAndBboxDefault.bbox,
|
|
3855
|
+
srs: srsAndBboxDefault.srs
|
|
3856
|
+
}));
|
|
3857
|
+
syncGroupAddGroup({
|
|
3858
|
+
groupId: 'Time_SigmetAirmet',
|
|
3859
|
+
title: 'Group 1 for sigmet/airmet map',
|
|
3860
|
+
type: core.SyncGroups.constants.SYNCGROUPS_TYPE_SETTIME
|
|
3861
|
+
});
|
|
3862
|
+
syncGroupAddTarget({
|
|
3863
|
+
groupId: 'Time_SigmetAirmet',
|
|
3864
|
+
targetId: mapId
|
|
3865
|
+
});
|
|
3866
|
+
syncGroupAddTarget({
|
|
3867
|
+
groupId: 'Time_SigmetAirmet',
|
|
3868
|
+
targetId: timesliderId
|
|
3869
|
+
}); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3870
|
+
}, []);
|
|
3871
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
3872
|
+
style: {
|
|
3873
|
+
position: 'relative',
|
|
3874
|
+
height: '100%'
|
|
3875
|
+
},
|
|
3876
|
+
"data-testid": "MapView"
|
|
3877
|
+
}, /*#__PURE__*/React__namespace.createElement(core.MapControls, null, /*#__PURE__*/React__namespace.createElement(core.LayerManagerMapButtonConnect, {
|
|
3878
|
+
source: "module",
|
|
3879
|
+
mapId: mapId
|
|
3880
|
+
}), /*#__PURE__*/React__namespace.createElement(core.LegendMapButtonConnect, {
|
|
3881
|
+
source: "module",
|
|
3882
|
+
mapId: mapId
|
|
3883
|
+
}), /*#__PURE__*/React__namespace.createElement(core.MultiDimensionSelectMapButtonsConnect, {
|
|
3884
|
+
source: "module",
|
|
3885
|
+
mapId: mapId
|
|
3886
|
+
})), /*#__PURE__*/React__namespace.createElement(core.MapViewConnect, {
|
|
3887
|
+
mapId: mapId
|
|
3888
|
+
}, /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
|
|
3889
|
+
id: "geojsonlayer-fir-" + mapId,
|
|
3890
|
+
isInEditMode: false,
|
|
3891
|
+
geojson: geoJSONs.fir
|
|
3892
|
+
}), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
|
|
3893
|
+
id: "geojsonlayer-end-" + mapId,
|
|
3894
|
+
isInEditMode: drawMode.end !== null && layerDrawModes.end !== null,
|
|
3895
|
+
geojson: geoJSONs.end,
|
|
3896
|
+
drawMode: layerDrawModes.end,
|
|
3897
|
+
updateGeojson: function updateGeojson(geojson) {
|
|
3898
|
+
var end = allowOneGeoJSONFeature(layerDrawModes.end, geojson);
|
|
3899
|
+
setLayerGeoJSONs(__assign(__assign({}, geoJSONs), {
|
|
3900
|
+
end: end
|
|
3901
|
+
}));
|
|
3902
|
+
},
|
|
3903
|
+
exitDrawModeCallback: function exitDrawModeCallback() {
|
|
3904
|
+
setDrawMode({
|
|
3905
|
+
start: null,
|
|
3906
|
+
end: null
|
|
3907
|
+
});
|
|
3908
|
+
exitDrawModeCallbackEnd();
|
|
3909
|
+
},
|
|
3910
|
+
featureNrToEdit: 0
|
|
3911
|
+
}), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
|
|
3912
|
+
id: "geojsonlayer-start-" + mapId,
|
|
3913
|
+
isInEditMode: drawMode.start !== null && layerDrawModes.start !== null,
|
|
3914
|
+
geojson: geoJSONs.start,
|
|
3915
|
+
drawMode: layerDrawModes.start,
|
|
3916
|
+
updateGeojson: function updateGeojson(geojson) {
|
|
3917
|
+
var start = allowOneGeoJSONFeature(layerDrawModes.start, geojson);
|
|
3918
|
+
setLayerGeoJSONs(__assign(__assign({}, geoJSONs), {
|
|
3919
|
+
start: start
|
|
3920
|
+
}));
|
|
3921
|
+
},
|
|
3922
|
+
exitDrawModeCallback: function exitDrawModeCallback() {
|
|
3923
|
+
setDrawMode({
|
|
3924
|
+
start: null,
|
|
3925
|
+
end: null
|
|
3926
|
+
});
|
|
3927
|
+
exitDrawModeCallbackStart();
|
|
3928
|
+
},
|
|
3929
|
+
featureNrToEdit: 0
|
|
3930
|
+
}), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
|
|
3931
|
+
id: "geojsonlayer-intersection-end-" + mapId,
|
|
3932
|
+
isInEditMode: false,
|
|
3933
|
+
geojson: geoJSONs.intersectionEnd
|
|
3934
|
+
}), /*#__PURE__*/React__namespace.createElement(core.MapViewLayer, {
|
|
3935
|
+
id: "geojsonlayer-intersection-start-" + mapId,
|
|
3936
|
+
isInEditMode: false,
|
|
3937
|
+
geojson: geoJSONs.intersectionStart
|
|
3938
|
+
})), /*#__PURE__*/React__namespace.createElement("div", {
|
|
3939
|
+
style: {
|
|
3940
|
+
position: 'absolute',
|
|
3941
|
+
left: '0',
|
|
3942
|
+
bottom: '0',
|
|
3943
|
+
zIndex: 1000,
|
|
3944
|
+
width: '100%'
|
|
3912
3945
|
}
|
|
3913
|
-
}
|
|
3946
|
+
}, /*#__PURE__*/React__namespace.createElement(core.TimeSliderConnect, {
|
|
3947
|
+
sourceId: timesliderId,
|
|
3948
|
+
mapId: mapId
|
|
3949
|
+
})), /*#__PURE__*/React__namespace.createElement(core.LegendConnect, {
|
|
3950
|
+
showMapId: true,
|
|
3951
|
+
mapId: mapId
|
|
3952
|
+
}));
|
|
3953
|
+
};
|
|
3914
3954
|
|
|
3955
|
+
var ProductFormLayout = function ProductFormLayout(_a) {
|
|
3956
|
+
var _b, _c, _d;
|
|
3915
3957
|
|
|
3916
|
-
var
|
|
3917
|
-
|
|
3918
|
-
};
|
|
3958
|
+
var children = _a.children,
|
|
3959
|
+
geojsonProps = __rest(_a, ["children"]);
|
|
3919
3960
|
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3961
|
+
var theme = material.useTheme();
|
|
3962
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3963
|
+
container: true,
|
|
3964
|
+
sx: (_b = {
|
|
3965
|
+
height: '100%',
|
|
3966
|
+
overflowY: 'auto'
|
|
3967
|
+
}, _b[theme.breakpoints.up('sm')] = {
|
|
3968
|
+
overflowY: 'hidden'
|
|
3969
|
+
}, _b)
|
|
3970
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3971
|
+
item: true,
|
|
3972
|
+
xs: 12,
|
|
3973
|
+
sm: 6,
|
|
3974
|
+
lg: 8,
|
|
3975
|
+
sx: (_c = {
|
|
3976
|
+
height: 400,
|
|
3977
|
+
padding: 2
|
|
3978
|
+
}, _c[theme.breakpoints.up('sm')] = {
|
|
3979
|
+
height: '100%',
|
|
3980
|
+
padding: 0
|
|
3981
|
+
}, _c)
|
|
3982
|
+
}, /*#__PURE__*/React__default["default"].createElement(MapViewGeoJson, __assign({}, geojsonProps))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3983
|
+
item: true,
|
|
3984
|
+
xs: 12,
|
|
3985
|
+
sm: 6,
|
|
3986
|
+
lg: 4,
|
|
3987
|
+
sx: (_d = {
|
|
3988
|
+
paddingTop: 5,
|
|
3989
|
+
paddingBottom: 5,
|
|
3990
|
+
paddingRight: 2
|
|
3991
|
+
}, _d[theme.breakpoints.up('sm')] = {
|
|
3992
|
+
overflowY: 'auto',
|
|
3993
|
+
height: '100%'
|
|
3994
|
+
}, _d)
|
|
3995
|
+
}, children));
|
|
3936
3996
|
};
|
|
3937
3997
|
|
|
3938
3998
|
var SigmetForm = function SigmetForm(_a) {
|
|
@@ -4031,13 +4091,14 @@
|
|
|
4031
4091
|
}, [drawMode.start, drawMode.end, isReadOnly, isDisabled]);
|
|
4032
4092
|
|
|
4033
4093
|
var renderForm = function renderForm() {
|
|
4034
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
4094
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4035
4095
|
container: true,
|
|
4036
4096
|
direction: "column",
|
|
4037
|
-
spacing:
|
|
4097
|
+
spacing: 5
|
|
4038
4098
|
}, !isCancelSigmet && /*#__PURE__*/React__default["default"].createElement(Phenomenon, {
|
|
4039
4099
|
productType: "sigmet",
|
|
4040
4100
|
isDisabled: isDisabled,
|
|
4101
|
+
isReadOnly: isReadOnly,
|
|
4041
4102
|
onChange: onChangeForm
|
|
4042
4103
|
}), !isCancelSigmet && /*#__PURE__*/React__default["default"].createElement(ObservationForecast, {
|
|
4043
4104
|
isDisabled: isDisabled,
|
|
@@ -4054,14 +4115,17 @@
|
|
|
4054
4115
|
}), /*#__PURE__*/React__default["default"].createElement(ValidFrom, {
|
|
4055
4116
|
productType: "sigmet",
|
|
4056
4117
|
isDisabled: isDisabled,
|
|
4118
|
+
isReadOnly: isReadOnly,
|
|
4057
4119
|
onChange: onChangeForm
|
|
4058
4120
|
}), /*#__PURE__*/React__default["default"].createElement(ValidUntil, {
|
|
4059
4121
|
productType: "sigmet",
|
|
4060
4122
|
isDisabled: isDisabled,
|
|
4123
|
+
isReadOnly: isReadOnly,
|
|
4061
4124
|
onChange: onChangeForm
|
|
4062
|
-
})
|
|
4125
|
+
}), /*#__PURE__*/React__default["default"].createElement(SelectFIR, {
|
|
4063
4126
|
productType: "sigmet",
|
|
4064
|
-
isDisabled: isDisabled
|
|
4127
|
+
isDisabled: isDisabled,
|
|
4128
|
+
isReadOnly: isReadOnly
|
|
4065
4129
|
}), /*#__PURE__*/React__default["default"].createElement(StartGeometry, {
|
|
4066
4130
|
isReadOnly: isReadOnly,
|
|
4067
4131
|
drawMode: drawMode,
|
|
@@ -4087,74 +4151,19 @@
|
|
|
4087
4151
|
}), !isCancelSigmet && /*#__PURE__*/React__default["default"].createElement(Change, {
|
|
4088
4152
|
isDisabled: isDisabled,
|
|
4089
4153
|
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, {
|
|
4154
|
+
}), isCancelSigmet && watch('vaSigmetMoveToFIR') && /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4105
4155
|
item: true,
|
|
4106
4156
|
xs: 12
|
|
4107
4157
|
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4108
4158
|
variant: "body2",
|
|
4109
|
-
sx: styles$
|
|
4159
|
+
sx: styles$2.body,
|
|
4110
4160
|
"data-testid": "vaSigmetMoveToFIR"
|
|
4111
|
-
}, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default["default"].createElement("b", null, " ", watch('vaSigmetMoveToFIR')))))
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
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, {
|
|
4161
|
+
}, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default["default"].createElement("b", null, " ", watch('vaSigmetMoveToFIR'))))), /*#__PURE__*/React__default["default"].createElement(IssuedAt, {
|
|
4162
|
+
date: getProductIssueDate(initialSigmet, initialCancelSigmet),
|
|
4163
|
+
isReadOnly: isReadOnly
|
|
4164
|
+
}), /*#__PURE__*/React__default["default"].createElement(Tac, {
|
|
4156
4165
|
tac: tac
|
|
4157
|
-
}
|
|
4166
|
+
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
|
|
4158
4167
|
name: "sequence",
|
|
4159
4168
|
defaultValue: "-1"
|
|
4160
4169
|
}),
|
|
@@ -4183,15 +4192,7 @@
|
|
|
4183
4192
|
style: {
|
|
4184
4193
|
width: '100%'
|
|
4185
4194
|
}
|
|
4186
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
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, {
|
|
4195
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductFormLayout, {
|
|
4195
4196
|
geoJSONs: geoJSONs,
|
|
4196
4197
|
setLayerGeoJSONs: function setLayerGeoJSONs(geoJSONs) {
|
|
4197
4198
|
return _setLayerGeoJSONs(createInterSections(geoJSONs));
|
|
@@ -4201,11 +4202,7 @@
|
|
|
4201
4202
|
setDrawMode: setDrawMode,
|
|
4202
4203
|
exitDrawModeCallbackStart: updateStartDrawing,
|
|
4203
4204
|
exitDrawModeCallbackEnd: updateEndDrawing
|
|
4204
|
-
}
|
|
4205
|
-
item: true,
|
|
4206
|
-
xs: 4,
|
|
4207
|
-
sx: styles$4.productForm
|
|
4208
|
-
}, renderForm())));
|
|
4205
|
+
}, renderForm()));
|
|
4209
4206
|
};
|
|
4210
4207
|
|
|
4211
4208
|
var AirmetForm = function AirmetForm(_a) {
|
|
@@ -4284,18 +4281,21 @@
|
|
|
4284
4281
|
}, [drawMode.start, isReadOnly, isDisabled]);
|
|
4285
4282
|
|
|
4286
4283
|
var renderForm = function renderForm() {
|
|
4287
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
4284
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4288
4285
|
container: true,
|
|
4289
4286
|
direction: "column",
|
|
4290
|
-
spacing:
|
|
4287
|
+
spacing: 6
|
|
4291
4288
|
}, !isCancelAirmet && /*#__PURE__*/React__default["default"].createElement(Phenomenon, {
|
|
4292
4289
|
productType: "airmet",
|
|
4293
4290
|
isDisabled: isDisabled,
|
|
4291
|
+
isReadOnly: isReadOnly,
|
|
4294
4292
|
onChange: onChangeForm
|
|
4295
4293
|
}), !isCancelAirmet && phenomenon === 'SFC_VIS' && /*#__PURE__*/React__default["default"].createElement(SurfaceVisibility, {
|
|
4294
|
+
isReadOnly: isReadOnly,
|
|
4296
4295
|
isDisabled: isDisabled,
|
|
4297
4296
|
onChange: onChangeForm
|
|
4298
4297
|
}), !isCancelAirmet && phenomenon === 'SFC_WIND' && /*#__PURE__*/React__default["default"].createElement(SurfaceWind, {
|
|
4298
|
+
isReadOnly: isReadOnly,
|
|
4299
4299
|
isDisabled: isDisabled,
|
|
4300
4300
|
onChange: onChangeForm
|
|
4301
4301
|
}), !isCancelAirmet && /*#__PURE__*/React__default["default"].createElement(ObservationForecast, {
|
|
@@ -4308,14 +4308,17 @@
|
|
|
4308
4308
|
onChange: onChangeForm
|
|
4309
4309
|
}), /*#__PURE__*/React__default["default"].createElement(ValidFrom, {
|
|
4310
4310
|
productType: "airmet",
|
|
4311
|
+
isReadOnly: isReadOnly,
|
|
4311
4312
|
isDisabled: isDisabled,
|
|
4312
4313
|
onChange: onChangeForm
|
|
4313
4314
|
}), /*#__PURE__*/React__default["default"].createElement(ValidUntil, {
|
|
4314
4315
|
productType: "airmet",
|
|
4316
|
+
isReadOnly: isReadOnly,
|
|
4315
4317
|
isDisabled: isDisabled,
|
|
4316
4318
|
onChange: onChangeForm
|
|
4317
|
-
})
|
|
4319
|
+
}), /*#__PURE__*/React__default["default"].createElement(SelectFIR, {
|
|
4318
4320
|
productType: "airmet",
|
|
4321
|
+
isReadOnly: isReadOnly,
|
|
4319
4322
|
isDisabled: isDisabled
|
|
4320
4323
|
}), /*#__PURE__*/React__default["default"].createElement(StartGeometry, {
|
|
4321
4324
|
isReadOnly: isReadOnly,
|
|
@@ -4341,53 +4344,12 @@
|
|
|
4341
4344
|
}), !isCancelAirmet && /*#__PURE__*/React__default["default"].createElement(Change, {
|
|
4342
4345
|
isDisabled: isDisabled,
|
|
4343
4346
|
isReadOnly: isReadOnly
|
|
4344
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
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, {
|
|
4347
|
+
}), /*#__PURE__*/React__default["default"].createElement(IssuedAt, {
|
|
4348
|
+
isReadOnly: isReadOnly,
|
|
4349
|
+
date: getProductIssueDate(initialAirmet, initialCancelAirmet)
|
|
4350
|
+
}), /*#__PURE__*/React__default["default"].createElement(Tac, {
|
|
4389
4351
|
tac: tac
|
|
4390
|
-
}
|
|
4352
|
+
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
|
|
4391
4353
|
name: "sequence",
|
|
4392
4354
|
defaultValue: "-1"
|
|
4393
4355
|
}),
|
|
@@ -4416,15 +4378,7 @@
|
|
|
4416
4378
|
style: {
|
|
4417
4379
|
width: '100%'
|
|
4418
4380
|
}
|
|
4419
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
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, {
|
|
4381
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductFormLayout, {
|
|
4428
4382
|
geoJSONs: geoJSONs,
|
|
4429
4383
|
setLayerGeoJSONs: function setLayerGeoJSONs(geoJSONs) {
|
|
4430
4384
|
return _setLayerGeoJSONs(createInterSections(geoJSONs));
|
|
@@ -4433,45 +4387,24 @@
|
|
|
4433
4387
|
drawMode: drawMode,
|
|
4434
4388
|
setDrawMode: setDrawMode,
|
|
4435
4389
|
exitDrawModeCallbackStart: updateStartDrawing
|
|
4436
|
-
}
|
|
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
|
-
}
|
|
4390
|
+
}, renderForm()));
|
|
4462
4391
|
};
|
|
4463
4392
|
|
|
4464
4393
|
var ContentDialog = function ContentDialog(_a) {
|
|
4394
|
+
var _b, _c;
|
|
4395
|
+
|
|
4465
4396
|
var open = _a.open,
|
|
4466
4397
|
toggleDialogStatus = _a.toggleDialogStatus,
|
|
4467
4398
|
title = _a.title,
|
|
4468
4399
|
children = _a.children,
|
|
4469
4400
|
options = _a.options,
|
|
4470
4401
|
onClose = _a.onClose,
|
|
4471
|
-
|
|
4472
|
-
alertBanner =
|
|
4402
|
+
_d = _a.alertBanner,
|
|
4403
|
+
alertBanner = _d === void 0 ? null : _d,
|
|
4473
4404
|
other = __rest(_a, ["open", "toggleDialogStatus", "title", "children", "options", "onClose", "alertBanner"]);
|
|
4474
4405
|
|
|
4406
|
+
var theme$1 = material.useTheme();
|
|
4407
|
+
|
|
4475
4408
|
var handleClose = function handleClose() {
|
|
4476
4409
|
if (onClose) {
|
|
4477
4410
|
onClose();
|
|
@@ -4485,53 +4418,77 @@
|
|
|
4485
4418
|
open: open,
|
|
4486
4419
|
onClose: handleClose,
|
|
4487
4420
|
maxWidth: other.maxWidth ? other.maxWidth : 'lg'
|
|
4488
|
-
}, other
|
|
4489
|
-
sx:
|
|
4421
|
+
}, other, {
|
|
4422
|
+
sx: {
|
|
4423
|
+
' .MuiPaper-root': {
|
|
4424
|
+
minWidth: 300
|
|
4425
|
+
}
|
|
4426
|
+
}
|
|
4427
|
+
}), /*#__PURE__*/React__namespace.createElement(material.DialogTitle, {
|
|
4428
|
+
sx: (_b = {
|
|
4429
|
+
boxShadow: 1,
|
|
4430
|
+
zIndex: 1,
|
|
4431
|
+
padding: 0,
|
|
4432
|
+
height: 48,
|
|
4433
|
+
display: 'flex',
|
|
4434
|
+
paddingLeft: 2,
|
|
4435
|
+
paddingRight: 2
|
|
4436
|
+
}, _b[theme$1.breakpoints.up('sm')] = {
|
|
4437
|
+
paddingLeft: 3,
|
|
4438
|
+
paddingRight: 3
|
|
4439
|
+
}, _b),
|
|
4440
|
+
component: "div"
|
|
4490
4441
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
4491
4442
|
container: true,
|
|
4492
4443
|
alignItems: "center"
|
|
4493
4444
|
}, /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
4494
4445
|
item: true,
|
|
4495
|
-
xs:
|
|
4446
|
+
xs: 4
|
|
4496
4447
|
}, /*#__PURE__*/React__namespace.createElement(material.Button, {
|
|
4497
4448
|
onClick: handleClose,
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4449
|
+
variant: "flat",
|
|
4450
|
+
startIcon: /*#__PURE__*/React__namespace.createElement(theme.ChevronLeft, null),
|
|
4451
|
+
"data-testid": "contentdialog-close",
|
|
4452
|
+
sx: (_c = {}, _c[theme$1.breakpoints.down('md')] = {
|
|
4453
|
+
textIndent: -999999,
|
|
4454
|
+
width: 24,
|
|
4455
|
+
minWidth: 24,
|
|
4456
|
+
height: 24,
|
|
4457
|
+
' .MuiSvgIcon-root': {
|
|
4458
|
+
marginRight: 0
|
|
4459
|
+
}
|
|
4460
|
+
}, _c)
|
|
4461
|
+
}, "BACK")), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
4508
4462
|
item: true,
|
|
4509
|
-
xs:
|
|
4510
|
-
sx:
|
|
4463
|
+
xs: 4,
|
|
4464
|
+
sx: {
|
|
4465
|
+
display: 'flex',
|
|
4466
|
+
justifyContent: 'center',
|
|
4467
|
+
textAlign: 'center'
|
|
4468
|
+
}
|
|
4511
4469
|
}, /*#__PURE__*/React__namespace.createElement(material.Typography, {
|
|
4512
4470
|
"data-testid": "dialogTitle",
|
|
4513
|
-
variant: "h6"
|
|
4471
|
+
variant: "h6",
|
|
4472
|
+
sx: {
|
|
4473
|
+
fontSize: '1.0rem',
|
|
4474
|
+
textOverflow: 'ellipsis',
|
|
4475
|
+
overflow: 'hidden',
|
|
4476
|
+
whiteSpace: 'nowrap'
|
|
4477
|
+
}
|
|
4514
4478
|
}, title)), /*#__PURE__*/React__namespace.createElement(material.Grid, {
|
|
4515
4479
|
item: true,
|
|
4516
|
-
xs:
|
|
4517
|
-
}, /*#__PURE__*/React__namespace.createElement(material.
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4480
|
+
xs: 4
|
|
4481
|
+
}, options))), alertBanner !== null && alertBanner, /*#__PURE__*/React__namespace.createElement(material.DialogContent, {
|
|
4482
|
+
sx: {
|
|
4483
|
+
display: 'flex',
|
|
4484
|
+
padding: 0,
|
|
4485
|
+
minHeight: 200,
|
|
4486
|
+
height: '100%'
|
|
4487
|
+
}
|
|
4521
4488
|
}, children));
|
|
4522
4489
|
};
|
|
4523
4490
|
|
|
4524
4491
|
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
4492
|
activeStatus: {
|
|
4536
4493
|
color: '#72bb23',
|
|
4537
4494
|
paddingLeft: '6px',
|
|
@@ -4565,27 +4522,40 @@
|
|
|
4565
4522
|
if (cancelsSeqId !== null) {
|
|
4566
4523
|
return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
|
|
4567
4524
|
content: "cancels " + cancelsSeqId,
|
|
4568
|
-
color: "red"
|
|
4525
|
+
color: "red",
|
|
4526
|
+
sx: {
|
|
4527
|
+
width: '80px'
|
|
4528
|
+
}
|
|
4569
4529
|
});
|
|
4570
4530
|
}
|
|
4571
4531
|
|
|
4572
4532
|
if (product.status === 'CANCELLED') {
|
|
4573
4533
|
return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
|
|
4574
4534
|
content: "cancelled " + product.sequence,
|
|
4575
|
-
color: "red"
|
|
4535
|
+
color: "red",
|
|
4536
|
+
sx: {
|
|
4537
|
+
width: '80px'
|
|
4538
|
+
}
|
|
4576
4539
|
});
|
|
4577
4540
|
}
|
|
4578
4541
|
|
|
4579
4542
|
if (moment__default["default"](product.validDateEnd) < moment__default["default"].utc(new Date())) {
|
|
4580
4543
|
return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
|
|
4581
4544
|
content: "expired",
|
|
4582
|
-
color: "grey"
|
|
4545
|
+
color: "grey",
|
|
4546
|
+
sx: {
|
|
4547
|
+
width: '80px'
|
|
4548
|
+
}
|
|
4583
4549
|
});
|
|
4584
4550
|
}
|
|
4585
4551
|
|
|
4586
4552
|
return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
|
|
4587
4553
|
content: product.status.toLowerCase(),
|
|
4588
|
-
color: product.status === 'PUBLISHED' ? 'green' : 'grey'
|
|
4554
|
+
color: product.status === 'PUBLISHED' ? 'green' : 'grey',
|
|
4555
|
+
sx: {
|
|
4556
|
+
marginRight: '0!important',
|
|
4557
|
+
width: '80px'
|
|
4558
|
+
}
|
|
4589
4559
|
});
|
|
4590
4560
|
};
|
|
4591
4561
|
|
|
@@ -4613,6 +4583,16 @@
|
|
|
4613
4583
|
return moment__default["default"].utc(startDate).format('DD MMM YYYY, HH:mm') + " - " + moment__default["default"].utc(endDate).format(format) + " UTC";
|
|
4614
4584
|
};
|
|
4615
4585
|
|
|
4586
|
+
var ProductListRowHeader = function ProductListRowHeader(_a) {
|
|
4587
|
+
var title = _a.title;
|
|
4588
|
+
return /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4589
|
+
sx: {
|
|
4590
|
+
color: 'geowebColors.textInputField.label.rgba',
|
|
4591
|
+
fontSize: '0.75rem'
|
|
4592
|
+
}
|
|
4593
|
+
}, title);
|
|
4594
|
+
};
|
|
4595
|
+
|
|
4616
4596
|
var ProductListRow = function ProductListRow(_a) {
|
|
4617
4597
|
var product = _a.product,
|
|
4618
4598
|
productType = _a.productType;
|
|
@@ -4647,80 +4627,123 @@
|
|
|
4647
4627
|
return /*#__PURE__*/React__default["default"].createElement(material.Card, {
|
|
4648
4628
|
elevation: 0,
|
|
4649
4629
|
variant: "outlined",
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4630
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4631
|
+
sx: function sx(theme) {
|
|
4632
|
+
var _a;
|
|
4633
|
+
|
|
4634
|
+
return _a = {
|
|
4635
|
+
width: '100%',
|
|
4636
|
+
paddingLeft: 1,
|
|
4637
|
+
paddingRight: 1,
|
|
4638
|
+
paddingTop: 1.5,
|
|
4639
|
+
paddingBottom: 1.5,
|
|
4640
|
+
'&:last-child': {
|
|
4641
|
+
paddingBottom: 1.5
|
|
4642
|
+
}
|
|
4643
|
+
}, _a[theme.breakpoints.up('sm')] = {
|
|
4644
|
+
paddingLeft: 4,
|
|
4645
|
+
paddingRight: 4,
|
|
4646
|
+
paddingTop: 2,
|
|
4647
|
+
paddingBottom: 2,
|
|
4648
|
+
'&:last-child': {
|
|
4649
|
+
paddingBottom: 2
|
|
4650
|
+
}
|
|
4651
|
+
}, _a;
|
|
4652
|
+
}
|
|
4653
4653
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4654
4654
|
container: true,
|
|
4655
4655
|
alignItems: "center",
|
|
4656
|
-
spacing:
|
|
4657
|
-
}, /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
4658
|
-
title: phenomenon !== null ? getPhenomenon(productType, phenomenon) : '',
|
|
4659
|
-
placement: "bottom-start"
|
|
4656
|
+
spacing: 2
|
|
4660
4657
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4661
4658
|
item: true,
|
|
4662
4659
|
xs: 3,
|
|
4663
|
-
sm:
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4660
|
+
sm: 1
|
|
4661
|
+
}, phenomenon !== null && /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
|
|
4662
|
+
title: productType.toUpperCase()
|
|
4663
|
+
}), /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
4664
|
+
title: phenomenon !== null ? getPhenomenon(productType, phenomenon) : '',
|
|
4665
|
+
placement: "bottom-start"
|
|
4666
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4668
4667
|
variant: "subtitle2",
|
|
4669
4668
|
noWrap: true,
|
|
4670
4669
|
sx: styles.font
|
|
4671
4670
|
}, phenomenon !== null ? phenomenon : 'Cancel'))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4672
4671
|
item: true,
|
|
4673
|
-
xs:
|
|
4674
|
-
sm:
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
title: /*#__PURE__*/React__default["default"].createElement("
|
|
4672
|
+
xs: 9,
|
|
4673
|
+
sm: 3
|
|
4674
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
|
|
4675
|
+
title: "Issue time"
|
|
4676
|
+
}), /*#__PURE__*/React__default["default"].createElement(material.Tooltip, {
|
|
4677
|
+
title: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
|
|
4678
|
+
title: "TAC"
|
|
4679
|
+
}), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4679
4680
|
style: {
|
|
4680
4681
|
whiteSpace: 'pre-line'
|
|
4682
|
+
},
|
|
4683
|
+
variant: "subtitle2",
|
|
4684
|
+
sx: __assign(__assign({}, styles.font), {
|
|
4685
|
+
color: 'geowebColors.typographyAndIcons.text',
|
|
4686
|
+
fontSize: '1.125rem',
|
|
4687
|
+
fontWeight: 'normal',
|
|
4688
|
+
fontStyle: 'normal',
|
|
4689
|
+
lineHeight: '28px',
|
|
4690
|
+
letterSpacing: '0.5px'
|
|
4691
|
+
})
|
|
4692
|
+
}, TAC)),
|
|
4693
|
+
placement: "bottom-start",
|
|
4694
|
+
componentsProps: {
|
|
4695
|
+
tooltip: {
|
|
4696
|
+
sx: {
|
|
4697
|
+
bgcolor: 'geowebColors.background.surface',
|
|
4698
|
+
boxShadow: 8,
|
|
4699
|
+
'& .MuiTooltip-arrow': {
|
|
4700
|
+
color: 'common.black'
|
|
4701
|
+
},
|
|
4702
|
+
maxWidth: 472
|
|
4703
|
+
}
|
|
4681
4704
|
}
|
|
4682
|
-
}
|
|
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
|
|
4705
|
+
}
|
|
4693
4706
|
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4694
|
-
variant: "overline"
|
|
4695
|
-
}, "Issue time"), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4696
4707
|
variant: "subtitle2",
|
|
4697
4708
|
sx: styles.font,
|
|
4698
4709
|
"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, {
|
|
4710
|
+
}, 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
4711
|
item: true,
|
|
4701
4712
|
xs: 12,
|
|
4702
|
-
sm:
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4706
|
-
variant: "overline"
|
|
4707
|
-
}, "Valid time"), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4713
|
+
sm: 6
|
|
4714
|
+
}, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
|
|
4715
|
+
title: "Valid time"
|
|
4716
|
+
}), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
4708
4717
|
variant: "subtitle2",
|
|
4709
4718
|
sx: styles.font,
|
|
4710
4719
|
"data-testid": "validTime"
|
|
4711
4720
|
}, validTime)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4712
4721
|
item: true,
|
|
4713
|
-
xs:
|
|
4714
|
-
sm:
|
|
4715
|
-
|
|
4716
|
-
|
|
4722
|
+
xs: 12,
|
|
4723
|
+
sm: 2,
|
|
4724
|
+
container: true,
|
|
4725
|
+
justifyContent: "center",
|
|
4726
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4727
|
+
sx: function sx(theme) {
|
|
4728
|
+
var _a;
|
|
4729
|
+
|
|
4730
|
+
return _a = {}, _a[theme.breakpoints.up('sm')] = {
|
|
4731
|
+
justifyContent: 'right',
|
|
4732
|
+
button: {
|
|
4733
|
+
marginRight: 3
|
|
4734
|
+
},
|
|
4735
|
+
' .statusTag': {
|
|
4736
|
+
marginRight: 3
|
|
4737
|
+
}
|
|
4738
|
+
}, _a;
|
|
4739
|
+
}
|
|
4717
4740
|
}, product.status === 'DRAFT' ? /*#__PURE__*/React__default["default"].createElement(material.Button, {
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
}, "
|
|
4741
|
+
sx: {
|
|
4742
|
+
marginTop: '6px'
|
|
4743
|
+
},
|
|
4744
|
+
variant: "flat",
|
|
4745
|
+
startIcon: /*#__PURE__*/React__default["default"].createElement(theme.Edit, null)
|
|
4746
|
+
}, "DRAFT") : getStatusTagList(product, cancelsSeqId), product.status === 'PUBLISHED' && cancelsSeqId === null && getActiveStatus(product))));
|
|
4724
4747
|
};
|
|
4725
4748
|
|
|
4726
4749
|
/* *
|
|
@@ -4756,10 +4779,12 @@
|
|
|
4756
4779
|
item: true,
|
|
4757
4780
|
justifyContent: "flex-end"
|
|
4758
4781
|
}, /*#__PURE__*/React__default["default"].createElement(material.Button, {
|
|
4759
|
-
variant: "
|
|
4760
|
-
color: "secondary",
|
|
4782
|
+
variant: "primary",
|
|
4761
4783
|
"data-testid": "productListCreateButton",
|
|
4762
|
-
onClick: onClickNewProduct
|
|
4784
|
+
onClick: onClickNewProduct,
|
|
4785
|
+
sx: {
|
|
4786
|
+
textTransform: 'initial'
|
|
4787
|
+
}
|
|
4763
4788
|
}, "Create a new ", productType.toUpperCase())), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4764
4789
|
item: true,
|
|
4765
4790
|
sx: {
|
|
@@ -4771,7 +4796,11 @@
|
|
|
4771
4796
|
title: "An error has occurred while retrieving the list, please try again",
|
|
4772
4797
|
info: error.message ? error.message : '',
|
|
4773
4798
|
dataTestId: "productList-alert"
|
|
4774
|
-
}), productList && /*#__PURE__*/React__default["default"].createElement(material.List,
|
|
4799
|
+
}), productList && /*#__PURE__*/React__default["default"].createElement(material.List, {
|
|
4800
|
+
sx: {
|
|
4801
|
+
paddingTop: 4
|
|
4802
|
+
}
|
|
4803
|
+
}, productList.map(function (productListItem, index) {
|
|
4775
4804
|
var product = productListItem[productType];
|
|
4776
4805
|
return /*#__PURE__*/React__default["default"].createElement(material.ListItem, {
|
|
4777
4806
|
"data-testid": "productListItem",
|
|
@@ -5026,6 +5055,11 @@
|
|
|
5026
5055
|
options: getProductFormLifecycleButtons(productCanBe, onProductButtonPress),
|
|
5027
5056
|
style: {
|
|
5028
5057
|
zIndex: 1000
|
|
5058
|
+
},
|
|
5059
|
+
sx: {
|
|
5060
|
+
' .MuiDialogContent-root': {
|
|
5061
|
+
overflowY: 'hidden'
|
|
5062
|
+
}
|
|
5029
5063
|
}
|
|
5030
5064
|
}, productType === 'sigmet' ? /*#__PURE__*/React__namespace.createElement(SigmetForm, {
|
|
5031
5065
|
mode: mode,
|