@opengeoweb/warnings 19.6.1-nightly-20260912 → 19.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +393 -1151
- package/dist/src/lib/components/AreaDrawingManager/AreaDrawingManager.d.ts +1 -2
- package/dist/src/lib/components/AreaDrawingManager/Drawings.d.ts +1 -2
- package/dist/src/lib/components/PublicWarningList/warningListFeatureSyncUtils.d.ts +1 -3
- package/dist/src/lib/components/WarningEvents/WarningEventDialog/WarningEventDialogConnect.d.ts +1 -2
- package/dist/src/lib/components/WarningEvents/WarningEventDialog/WarningEventFormDialog.d.ts +0 -3
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventFormContent.d.ts +0 -3
- package/dist/src/lib/components/WarningEvents/WarningEventForm/WarningEventItem.d.ts +0 -3
- package/dist/src/lib/components/WarningEvents/WarningEventForm/utils.d.ts +0 -3
- package/dist/src/lib/components/WarningEvents/WarningEventSummaryDialog/WarningEventSummaryForm.d.ts +2 -2
- package/dist/src/lib/components/WarningsMapView/WarningsMapView.d.ts +0 -3
- package/dist/src/lib/store/warningsDrawings/utils.d.ts +0 -19
- package/dist/src/lib/store/warningsEventForm/reducer.d.ts +0 -5
- package/dist/src/lib/store/warningsEventForm/selectors.d.ts +0 -21
- package/dist/src/lib/store/warningsForm/types.d.ts +0 -3
- package/package.json +64 -63
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useDispatch, useSelector, useStore, shallowEqual } from 'react-redux';
|
|
|
3
3
|
import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawingToolSelectors, layerSelectors, uiSelectors, layerActions, drawingToolActions, layerUtils, mapListener, layersListener, drawingToolListener, syncGroupsListener, openlayersListener, syncGroupsReducer, drawingToolReducer, uiReducer, layerReducer, mapReducer, useSetupDialog, PUBLIC_WARNING_DRAW_TOOL_ID, genericSelectors, useUpdateFeatureSyncLayers, genericActions, selectorMemoizationOptions, useRegisterFeatureSyncSource, syncGroupsSelector } from '@opengeoweb/store';
|
|
4
4
|
import { Polygons, Edit, Delete, ExitDomain, ChevronDown, DrawPolygon, Remove, Options, CoastalEvent, TemperatureLow, TemperatureHigh, Rain, Snow, Lightning, Fog, Wind, Thunderstorm, SevereMountainWaves, VulcanicEruption, Haze, FreezingPrecipitation, ModerateAircraftIcing, SevereAircraftIcing, ModerateTurbulence, SevereTurbulence, SandStorm, RadioactiveMaterials, Visibility, Add, breakpoints, DragHandle, Info, ArrowUpCompact, ArrowDownCompact, CalendarToday, Expire, Cube, AlertBadge, ArrowDropDownDown, Extend24h, Copy, Update, Cancel, Success, VisibilityOff, ChevronUp, Close, Clock } from '@opengeoweb/theme';
|
|
5
5
|
import { WEBMAP_REACT_NAMESPACE, defaultPolygon, emptyGeoJSON, MapControlButton, isGeoJSONGeometryEmpty, defaultSmoothLine, defaultLineString, defaultFreehandLine, defaultOval, defaultCircle, defaultRotatableBox, defaultSquare, defaultLocation, defaultPoint, defaultSplit, defaultDelete, getDrawModeIdFromSelectionType, getIcon, rewindGeometry, getGeoJSONPropertyValue, DRAWMODE, currentlySupportedDrawModes, defaultLayers, viewUtils, OpenLayersMapView, MapControls, OpenLayersZoomControl, OpenLayersLayer, OpenLayersFeatureLayer, genericOpenLayersFeatureStyle, DEFAULT_GEOJSON_STYLE_FILL_OPACITY, FEATURE_DRAW_FILL_COLOR, FEATURE_DRAW_SECONDARY_FILL_COLOR, FEATURE_DRAW_STROKE_COLOR } from '@opengeoweb/webmap-react';
|
|
6
|
-
import { SHARED_NAMESPACE, useConfirmationDialog, dateUtils,
|
|
6
|
+
import { SHARED_NAMESPACE, useConfirmationDialog, dateUtils, ToggleMenu, calculateStartSize, ToolContainerDraggable, AlertBanner, sessionStorageProvider, ConfirmationDialog, CustomIconButton, usePrevious, usePreventBrowserClose, CustomTooltip, Avatar, getInitials, SwitchButton, Filter, CustomToggleButton, FilterChip, TooltipSelect, LastUpdateTime, StatusTag, FilterOption, getAxiosErrorMessage, CustomDialog, ConfirmationButtons, ErrorBoundary } from '@opengeoweb/shared';
|
|
7
7
|
import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
8
8
|
import { t } from 'i18next';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
@@ -13,7 +13,7 @@ import { SA_NAMESPACE, isInstanceOfCancelSigmet, getDefaultValidFromValue, isIns
|
|
|
13
13
|
import { LayerType, generateMapId, webmapUtils } from '@opengeoweb/webmap';
|
|
14
14
|
import React, { useRef, useState, useEffect, useCallback, useMemo } from 'react';
|
|
15
15
|
import { useAuthenticationContext as useAuthenticationContext$1 } from '@opengeoweb/authentication';
|
|
16
|
-
import { styled, Box, Typography, useTheme, Accordion, AccordionSummary, ListItem, ListItemButton, Stack, Grid, AccordionDetails, LinearProgress, Tabs, Tab, Button, MenuItem, FormHelperText, Paper, Card, CardContent, FormControl, CircularProgress, Menu, ListSubheader, Chip, ListItemText, ListItemIcon,
|
|
16
|
+
import { styled, Box, Typography, useTheme, Accordion, AccordionSummary, ListItem, ListItemButton, Stack, Grid, AccordionDetails, LinearProgress, Tabs, Tab, Button, MenuItem, FormHelperText, Paper, Card, CardContent, FormControl, CircularProgress, InputAdornment, Menu, ListSubheader, Chip, ListItemText, ListItemIcon, Tooltip, IconButton, Checkbox, DialogTitle, DialogContent, Switch, RadioGroup, FormControlLabel, Radio, Collapse } from '@mui/material';
|
|
17
17
|
import { List, useListRef } from 'react-window';
|
|
18
18
|
import { useQueryClient, useMutation, queryOptions, QueryClient, useQuery } from '@tanstack/react-query';
|
|
19
19
|
import { getHeaders, handleResponse, AirmetPhenomena, SigmetPhenomena, useAuthQuery, useAuthenticationContext, optimisticUpdate, ProductStatus, LevelUnits } from '@opengeoweb/api';
|
|
@@ -23,6 +23,9 @@ import { useFormContext, useFieldArray, useForm, FormProvider, useWatch } from '
|
|
|
23
23
|
import { isEmpty, createEmpty, extend } from 'ol/extent';
|
|
24
24
|
import GeoJSON from 'ol/format/GeoJSON';
|
|
25
25
|
import { ReactSortable } from 'react-sortablejs';
|
|
26
|
+
import { LocalizationProvider } from '@mui/x-date-pickers';
|
|
27
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
28
|
+
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
|
|
26
29
|
import { intersect, area } from '@turf/turf';
|
|
27
30
|
import Box$1 from '@mui/material/Box';
|
|
28
31
|
import Tooltip$1 from '@mui/material/Tooltip';
|
|
@@ -115,7 +118,6 @@ var en = {
|
|
|
115
118
|
"warning-button-delete-polygon": "Delete polygon",
|
|
116
119
|
"warning-event-map-edit-drawing-tooltip": "Edit drawing",
|
|
117
120
|
"warning-event-map-remove-drawing-tooltip": "Remove drawing",
|
|
118
|
-
"warning-event-probability": "Probability (incl. - excl.)",
|
|
119
121
|
"warning-draw-tools-disabled": "Link a map to enable draw tools",
|
|
120
122
|
"warning-description-original": "Description original",
|
|
121
123
|
"warning-description-translation": "Description translation",
|
|
@@ -401,8 +403,6 @@ var en = {
|
|
|
401
403
|
"warning-event-validation-min-duration": "Warning must have a duration of at least one hour",
|
|
402
404
|
"warning-event-validation-overlap": "Warnings of the same level cannot overlap in time and/or area, delete or adjust one of the warnings",
|
|
403
405
|
"warning-event-validation-propbability-collapsed": "A probability is required",
|
|
404
|
-
"warning-event-validation-area-missing": "An area is required",
|
|
405
|
-
"warning-event-validation-area-non-polygon": "Area must be a polygon or multi-polygon",
|
|
406
406
|
"warning-event-open-summary-dialog-tooltip": "Open the summary dialog to enter detailed texts for all summary fields",
|
|
407
407
|
"drawing-tool-form-objects": "Objects",
|
|
408
408
|
"drawing-tool-form-object-name": "Object name",
|
|
@@ -411,9 +411,7 @@ var en = {
|
|
|
411
411
|
"drawing-tool-form-object-name-max-length": "An object name can be at most {{maxLength}} characters",
|
|
412
412
|
"drawing-tool-form-object-delete": "Delete object",
|
|
413
413
|
"warning-event-button-add-drawing": "Add a drawing to this event, then choose individual objects for each warning",
|
|
414
|
-
"warning-event-button-assign-object": "Assign an object from the chosen drawing to this warning"
|
|
415
|
-
"warning-event-objects-menu-title": "Objects",
|
|
416
|
-
"warning-event-objects-menu-no-objects": "No objects available. Please first select a drawing via the 'Add drawing' button in the first warning"
|
|
414
|
+
"warning-event-button-assign-object": "Assign an object from the chosen drawing to this warning"
|
|
417
415
|
};
|
|
418
416
|
var nl = {
|
|
419
417
|
"drawing-tool-form-tools": "Gereedschap",
|
|
@@ -502,7 +500,6 @@ var nl = {
|
|
|
502
500
|
"warning-button-delete-polygon": "Polygoon verwijderen",
|
|
503
501
|
"warning-event-map-edit-drawing-tooltip": "Tekening bewerken",
|
|
504
502
|
"warning-event-map-remove-drawing-tooltip": "Tekening verwijderen",
|
|
505
|
-
"warning-event-probability": "Waarschijnlijkheid (incl. - excl.)",
|
|
506
503
|
"warning-draw-tools-disabled": "Koppel een kaart om tekentools in te schakelen",
|
|
507
504
|
"warning-description-original": "Beschrijving origineel",
|
|
508
505
|
"warning-description-translation": "Beschrijving vertaling",
|
|
@@ -743,8 +740,6 @@ var nl = {
|
|
|
743
740
|
"warning-event-validation-min-duration": "De duur van een waarschuwing is minimaal 1 uur",
|
|
744
741
|
"warning-event-validation-overlap": "Waarschuwingen van hetzelfde niveau mogen niet overlappen in tijd en/of gebied, verwijder of pas een van de waarschuwingen aan",
|
|
745
742
|
"warning-event-validation-propbability-collapsed": "Een waarschijnlijkheid is verplicht",
|
|
746
|
-
"warning-event-validation-area-missing": "Een gebied is verplicht",
|
|
747
|
-
"warning-event-validation-area-non-polygon": "Gebied moet een polygoon of multi-polygoon zijn",
|
|
748
743
|
"warning-event-open-summary-dialog-tooltip": "Open de samenvatting pop-up om de gedetailleerde samenvattingen in te vullen",
|
|
749
744
|
"drawing-tool-form-objects": "Objecten",
|
|
750
745
|
"drawing-tool-form-object-name": "Objectnaam",
|
|
@@ -753,9 +748,7 @@ var nl = {
|
|
|
753
748
|
"drawing-tool-form-object-name-max-length": "Een objectnaam mag maximaal {{maxLength}} tekens bevatten",
|
|
754
749
|
"drawing-tool-form-object-delete": "Object verwijderen",
|
|
755
750
|
"warning-event-button-add-drawing": "Voeg een tekening toe aan dit event. Wijs daarna individuele objecten toe aan elke waarschuwing",
|
|
756
|
-
"warning-event-button-assign-object": "Wijs een object uit de gekozen tekening toe aan deze waarschuwing"
|
|
757
|
-
"warning-event-objects-menu-title": "Objecten",
|
|
758
|
-
"warning-event-objects-menu-no-objects": "Geen objecten beschikbaar, selecteer eerst een tekening via de 'Selecteer tekening' knop bij de eerste waarschuwing"
|
|
751
|
+
"warning-event-button-assign-object": "Wijs een object uit de gekozen tekening toe aan deze waarschuwing"
|
|
759
752
|
};
|
|
760
753
|
var fi = {
|
|
761
754
|
"drawing-tool-form-tools": "Työkalut",
|
|
@@ -844,7 +837,6 @@ var fi = {
|
|
|
844
837
|
"warning-button-delete-polygon": "Poista monikulmio",
|
|
845
838
|
"warning-event-map-edit-drawing-tooltip": "Muokkaa piirrosta",
|
|
846
839
|
"warning-event-map-remove-drawing-tooltip": "Poista piirros",
|
|
847
|
-
"warning-event-probability": "Todennäköisyys (ml. - pl.)",
|
|
848
840
|
"warning-draw-tools-disabled": "Linkitä kartta piirtotyökalujen ottamiseksi käyttöön",
|
|
849
841
|
"warning-description-original": "Alkuperäinen kuvaus",
|
|
850
842
|
"warning-description-translation": "Kuvauksen käännös",
|
|
@@ -1037,8 +1029,6 @@ var fi = {
|
|
|
1037
1029
|
"warning-event-validation-min-duration": "ei käännetty",
|
|
1038
1030
|
"warning-event-validation-overlap": "ei käännetty",
|
|
1039
1031
|
"warning-event-validation-propbability-collapsed": "ei käännetty",
|
|
1040
|
-
"warning-event-validation-area-missing": "ei käännetty",
|
|
1041
|
-
"warning-event-validation-area-non-polygon": "ei käännetty",
|
|
1042
1032
|
"warning-event-open-summary-dialog-tooltip": "ei käännetty",
|
|
1043
1033
|
"drawing-tool-form-objects": "ei käännetty",
|
|
1044
1034
|
"drawing-tool-form-object-name": "ei käännetty",
|
|
@@ -1047,9 +1037,7 @@ var fi = {
|
|
|
1047
1037
|
"drawing-tool-form-object-name-max-length": "ei käännetty",
|
|
1048
1038
|
"drawing-tool-form-object-delete": "ei käännetty",
|
|
1049
1039
|
"warning-event-button-add-drawing": "ei käännetty",
|
|
1050
|
-
"warning-event-button-assign-object": "ei käännetty"
|
|
1051
|
-
"warning-event-objects-menu-title": "ei käännetty",
|
|
1052
|
-
"warning-event-objects-menu-no-objects": "ei käännetty"
|
|
1040
|
+
"warning-event-button-assign-object": "ei käännetty"
|
|
1053
1041
|
};
|
|
1054
1042
|
var no = {
|
|
1055
1043
|
"drawing-tool-form-tools": "Verktøy",
|
|
@@ -1138,7 +1126,6 @@ var no = {
|
|
|
1138
1126
|
"warning-button-delete-polygon": "Slett polygon",
|
|
1139
1127
|
"warning-event-map-edit-drawing-tooltip": "Rediger tegning",
|
|
1140
1128
|
"warning-event-map-remove-drawing-tooltip": "Fjern tegning",
|
|
1141
|
-
"warning-event-probability": "Sannsynlighet (inkl. - ekskl.)",
|
|
1142
1129
|
"warning-draw-tools-disabled": "Koble til et kart for å aktivere tegneverktøy",
|
|
1143
1130
|
"warning-description-original": "Original beskrivelse",
|
|
1144
1131
|
"warning-description-translation": "Oversatt beskrivelse",
|
|
@@ -1329,8 +1316,6 @@ var no = {
|
|
|
1329
1316
|
"warning-event-validation-min-duration": "ikke oversatt",
|
|
1330
1317
|
"warning-event-validation-overlap": "ikke oversatt",
|
|
1331
1318
|
"warning-event-validation-propbability-collapsed": "ikke oversatt",
|
|
1332
|
-
"warning-event-validation-area-missing": "ikke oversatt",
|
|
1333
|
-
"warning-event-validation-area-non-polygon": "ikke oversatt",
|
|
1334
1319
|
"warning-event-open-summary-dialog-tooltip": "ikke oversatt",
|
|
1335
1320
|
"drawing-tool-form-objects": "ikke oversatt",
|
|
1336
1321
|
"drawing-tool-form-object-name": "ikke oversatt",
|
|
@@ -1339,9 +1324,7 @@ var no = {
|
|
|
1339
1324
|
"drawing-tool-form-object-name-max-length": "ikke oversatt",
|
|
1340
1325
|
"drawing-tool-form-object-delete": "ikke oversatt",
|
|
1341
1326
|
"warning-event-button-add-drawing": "ikke oversatt",
|
|
1342
|
-
"warning-event-button-assign-object": "ikke oversatt"
|
|
1343
|
-
"warning-event-objects-menu-title": "Objekter",
|
|
1344
|
-
"warning-event-objects-menu-no-objects": "ikke oversatt"
|
|
1327
|
+
"warning-event-button-assign-object": "ikke oversatt"
|
|
1345
1328
|
};
|
|
1346
1329
|
var warningsTranslations = {
|
|
1347
1330
|
en: en,
|
|
@@ -1370,37 +1353,6 @@ var warningsTranslations = {
|
|
|
1370
1353
|
var areaDrawingDialogType = uiTypes.DialogTypes.AreaDrawingManager;
|
|
1371
1354
|
var drawingDialogType = uiTypes.DialogTypes.DrawingTool;
|
|
1372
1355
|
var areaDrawingLoaderType = uiTypes.DialogTypes.AreaDrawingLoader;
|
|
1373
|
-
/**
|
|
1374
|
-
* Returns the id to identify a single feature of a drawing by. Drawings saved
|
|
1375
|
-
* with the drawing tool have a stable id on every feature (see
|
|
1376
|
-
* `ensureFeatureIds` in the layer reducer), but drawings saved before that was
|
|
1377
|
-
* introduced do not, so fall back to the position within the drawing.
|
|
1378
|
-
* @param drawing The drawing the feature belongs to
|
|
1379
|
-
* @param feature The feature to get the id for
|
|
1380
|
-
* @param index The index of the feature within the drawing
|
|
1381
|
-
* @returns id of the feature
|
|
1382
|
-
*/
|
|
1383
|
-
var getDrawingFeatureId = function getDrawingFeatureId(drawingId, feature, index) {
|
|
1384
|
-
var _feature$id;
|
|
1385
|
-
return String((_feature$id = feature.id) != null ? _feature$id : drawingId + "-" + index);
|
|
1386
|
-
};
|
|
1387
|
-
/**
|
|
1388
|
-
* Makes sure every feature of a drawing has an id, so single features can be
|
|
1389
|
-
* identified, selected and assigned.
|
|
1390
|
-
* @param drawing The drawing to add feature ids to
|
|
1391
|
-
* @returns the drawing, with an id on every feature
|
|
1392
|
-
*/
|
|
1393
|
-
var withDrawingFeatureIds = function withDrawingFeatureIds(drawing) {
|
|
1394
|
-
return Object.assign({}, drawing, {
|
|
1395
|
-
geoJSON: Object.assign({}, drawing.geoJSON, {
|
|
1396
|
-
features: drawing.geoJSON.features.map(function (feature, index) {
|
|
1397
|
-
return Object.assign({}, feature, {
|
|
1398
|
-
id: getDrawingFeatureId(drawing.id, feature, index)
|
|
1399
|
-
});
|
|
1400
|
-
})
|
|
1401
|
-
})
|
|
1402
|
-
});
|
|
1403
|
-
};
|
|
1404
1356
|
|
|
1405
1357
|
function _arrayLikeToArray(r, a) {
|
|
1406
1358
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -2143,8 +2095,6 @@ var RowComponent$3 = function RowComponent(_ref) {
|
|
|
2143
2095
|
activeDrawing = _ref.activeDrawing,
|
|
2144
2096
|
t = _ref.t;
|
|
2145
2097
|
var theme = useTheme();
|
|
2146
|
-
var config = sessionStorageProvider.getConfig();
|
|
2147
|
-
var showWarningsEventsOption = !!config.GW_FEATURE_WARNINGS_EVENT;
|
|
2148
2098
|
var listItem = listInclHeaders[index];
|
|
2149
2099
|
if (!listItem.isDrawing) {
|
|
2150
2100
|
var header = headerList[listItem.index];
|
|
@@ -2249,16 +2199,10 @@ var RowComponent$3 = function RowComponent(_ref) {
|
|
|
2249
2199
|
}, {
|
|
2250
2200
|
text: t('public-warning-title').toUpperCase(),
|
|
2251
2201
|
action: function action() {
|
|
2252
|
-
onClickShare(drawing
|
|
2202
|
+
onClickShare(drawing);
|
|
2253
2203
|
},
|
|
2254
2204
|
icon: jsx(ExitDomain, {})
|
|
2255
|
-
}]
|
|
2256
|
-
text: t('public-warning-event-title').toUpperCase(),
|
|
2257
|
-
action: function action() {
|
|
2258
|
-
onClickShare(drawing, 'warningsEvent');
|
|
2259
|
-
},
|
|
2260
|
-
icon: jsx(ExitDomain, {})
|
|
2261
|
-
}] : []),
|
|
2205
|
+
}],
|
|
2262
2206
|
secondaryMenuTitle: t('area-drawing-manager-share-menu'),
|
|
2263
2207
|
tooltipTitle: t('area-drawing-manager-options-menu')
|
|
2264
2208
|
}))
|
|
@@ -3875,9 +3819,11 @@ var slice = createSlice({
|
|
|
3875
3819
|
var _action$payload = action.payload,
|
|
3876
3820
|
event = _action$payload.event,
|
|
3877
3821
|
formState = _action$payload.formState;
|
|
3822
|
+
// if (object) {
|
|
3823
|
+
// draft.object = object;
|
|
3824
|
+
// }
|
|
3878
3825
|
if (event) {
|
|
3879
3826
|
draft.event = event;
|
|
3880
|
-
draft.selectedDrawing = event.selectedDrawing && withDrawingFeatureIds(event.selectedDrawing);
|
|
3881
3827
|
}
|
|
3882
3828
|
if (formState !== undefined) {
|
|
3883
3829
|
draft.formState = formState;
|
|
@@ -3890,8 +3836,8 @@ var slice = createSlice({
|
|
|
3890
3836
|
formState = _action$payload2$form === void 0 ? '' : _action$payload2$form,
|
|
3891
3837
|
panelId = _action$payload2.panelId,
|
|
3892
3838
|
selectedEventId = _action$payload2.selectedEventId;
|
|
3839
|
+
// draft.object = object;
|
|
3893
3840
|
draft.event = event;
|
|
3894
|
-
draft.selectedDrawing = (event == null ? void 0 : event.selectedDrawing) && withDrawingFeatureIds(event.selectedDrawing);
|
|
3895
3841
|
draft.selectedEventId = selectedEventId || (event == null ? void 0 : event.eventId);
|
|
3896
3842
|
draft.formState = formState;
|
|
3897
3843
|
draft.panelId = panelId;
|
|
@@ -3922,10 +3868,6 @@ var slice = createSlice({
|
|
|
3922
3868
|
},
|
|
3923
3869
|
setSelectedEventId: function setSelectedEventId(draft, action) {
|
|
3924
3870
|
draft.selectedEventId = action.payload;
|
|
3925
|
-
},
|
|
3926
|
-
setSelectedDrawing: function setSelectedDrawing(draft, action) {
|
|
3927
|
-
var drawing = action.payload.drawing;
|
|
3928
|
-
draft.selectedDrawing = drawing && withDrawingFeatureIds(drawing);
|
|
3929
3871
|
}
|
|
3930
3872
|
},
|
|
3931
3873
|
extraReducers: function extraReducers(builder) {
|
|
@@ -3941,7 +3883,6 @@ var slice = createSlice({
|
|
|
3941
3883
|
delete draft.selectedEventId;
|
|
3942
3884
|
delete draft.isFormDirty;
|
|
3943
3885
|
delete draft.warningType;
|
|
3944
|
-
delete draft.selectedDrawing;
|
|
3945
3886
|
}
|
|
3946
3887
|
});
|
|
3947
3888
|
}
|
|
@@ -4348,7 +4289,7 @@ var Phenomenon = function Phenomenon(_ref) {
|
|
|
4348
4289
|
};
|
|
4349
4290
|
|
|
4350
4291
|
var _excluded$c = ["id", "warningDetail", "status", "editor"],
|
|
4351
|
-
_excluded2$
|
|
4292
|
+
_excluded2$1 = ["id", "linked_to_id", "proposal_id", "warning_handle_uuid"],
|
|
4352
4293
|
_excluded3 = ["published_warning_uuid"],
|
|
4353
4294
|
_excluded4 = ["id"],
|
|
4354
4295
|
_excluded5 = ["id", "warningDetail"],
|
|
@@ -4376,7 +4317,7 @@ var getWarningWithoutIdStatusEditor = function getWarningWithoutIdStatusEditor(w
|
|
|
4376
4317
|
warningDetail.linked_to_id;
|
|
4377
4318
|
warningDetail.proposal_id;
|
|
4378
4319
|
warningDetail.warning_handle_uuid;
|
|
4379
|
-
var cleanWarningDetail = _objectWithoutPropertiesLoose(warningDetail, _excluded2$
|
|
4320
|
+
var cleanWarningDetail = _objectWithoutPropertiesLoose(warningDetail, _excluded2$1);
|
|
4380
4321
|
var areas = (_warningDetail$areas = warningDetail.areas) == null ? void 0 : _warningDetail$areas.map(function (_ref) {
|
|
4381
4322
|
_ref.published_warning_uuid;
|
|
4382
4323
|
var area = _objectWithoutPropertiesLoose(_ref, _excluded3);
|
|
@@ -5124,10 +5065,6 @@ var useMutateWarningEvent = function useMutateWarningEvent(snackBarMessage) {
|
|
|
5124
5065
|
type: warningEventDialogType,
|
|
5125
5066
|
setOpen: false
|
|
5126
5067
|
}));
|
|
5127
|
-
dispatch(uiActions.setToggleOpenDialog({
|
|
5128
|
-
type: uiTypes.DialogTypes.AreaDrawingLoader,
|
|
5129
|
-
setOpen: false
|
|
5130
|
-
}));
|
|
5131
5068
|
}
|
|
5132
5069
|
case 2:
|
|
5133
5070
|
return _context15.a(2);
|
|
@@ -5332,7 +5269,7 @@ var buildAreaGeoJSON = function buildAreaGeoJSON(drawing, options) {
|
|
|
5332
5269
|
features: drawing.geoJSON.features.map(function (feature, index) {
|
|
5333
5270
|
var _feature$id, _options$idPrefix, _ref, _feature$properties$o, _feature$properties, _feature$properties2;
|
|
5334
5271
|
return Object.assign({}, feature, {
|
|
5335
|
-
id: (_feature$id = feature.id) != null ? _feature$id : "" + ((_options$idPrefix = options.idPrefix) != null ? _options$idPrefix : '') +
|
|
5272
|
+
id: (_feature$id = feature.id) != null ? _feature$id : "" + ((_options$idPrefix = options.idPrefix) != null ? _options$idPrefix : '') + drawing.id + "-" + index,
|
|
5336
5273
|
properties: Object.assign({}, feature.properties, {
|
|
5337
5274
|
areaId: drawing.id,
|
|
5338
5275
|
areaFeatureName: (_ref = (_feature$properties$o = (_feature$properties = feature.properties) == null ? void 0 : _feature$properties.objectName) != null ? _feature$properties$o : (_feature$properties2 = feature.properties) == null ? void 0 : _feature$properties2.name) != null ? _ref : feature.id,
|
|
@@ -5666,16 +5603,7 @@ var AreaDrawingManagerConnect = function AreaDrawingManagerConnect(_ref2) {
|
|
|
5666
5603
|
deleteHoverPreviewLayer();
|
|
5667
5604
|
closeAreaDrawingDialog();
|
|
5668
5605
|
};
|
|
5669
|
-
var onShareDrawing = function onShareDrawing(drawing
|
|
5670
|
-
if (type === 'warningsEvent') {
|
|
5671
|
-
dispatch(warningsEventFormActions.openWarningsEventFormDialog({
|
|
5672
|
-
event: {
|
|
5673
|
-
selectedDrawing: drawing
|
|
5674
|
-
},
|
|
5675
|
-
formState: 'edit'
|
|
5676
|
-
}));
|
|
5677
|
-
return;
|
|
5678
|
-
}
|
|
5606
|
+
var onShareDrawing = function onShareDrawing(drawing) {
|
|
5679
5607
|
dispatch(warningsFormActions.openPublicWarningFormDialog({
|
|
5680
5608
|
object: drawing,
|
|
5681
5609
|
warning: {
|
|
@@ -8845,43 +8773,6 @@ var AreaDrawingLoader = function AreaDrawingLoader(_ref) {
|
|
|
8845
8773
|
});
|
|
8846
8774
|
};
|
|
8847
8775
|
|
|
8848
|
-
/* *
|
|
8849
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8850
|
-
* you may not use this file except in compliance with the License.
|
|
8851
|
-
* You may obtain a copy of the License at
|
|
8852
|
-
*
|
|
8853
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8854
|
-
*
|
|
8855
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
8856
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8857
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8858
|
-
* See the License for the specific language governing permissions and
|
|
8859
|
-
* limitations under the License.
|
|
8860
|
-
*
|
|
8861
|
-
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8862
|
-
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
8863
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
8864
|
-
* */
|
|
8865
|
-
var EMPTY_WARNINGS_EVENT_FORM_STATE = {};
|
|
8866
|
-
var selectWarningsEventFormState = function selectWarningsEventFormState(store) {
|
|
8867
|
-
if (store != null && store.warningsEventForm) {
|
|
8868
|
-
return store.warningsEventForm;
|
|
8869
|
-
}
|
|
8870
|
-
return EMPTY_WARNINGS_EVENT_FORM_STATE;
|
|
8871
|
-
};
|
|
8872
|
-
var getWarningEvent = createSelector(selectWarningsEventFormState, function (store) {
|
|
8873
|
-
return store == null ? void 0 : store.event;
|
|
8874
|
-
});
|
|
8875
|
-
var getSelectedEventId = createSelector(selectWarningsEventFormState, function (store) {
|
|
8876
|
-
return (store == null ? void 0 : store.selectedEventId) || '';
|
|
8877
|
-
});
|
|
8878
|
-
var getWarningsEventIsFormDirty = createSelector(selectWarningsEventFormState, function (store) {
|
|
8879
|
-
return (store == null ? void 0 : store.isFormDirty) || false;
|
|
8880
|
-
});
|
|
8881
|
-
var getWarningsEventSelectedDrawing = createSelector(selectWarningsEventFormState, function (store) {
|
|
8882
|
-
return store == null ? void 0 : store.selectedDrawing;
|
|
8883
|
-
});
|
|
8884
|
-
|
|
8885
8776
|
var EXTENT_PADDING = 50;
|
|
8886
8777
|
var DEFAULT_SIZE$1 = {
|
|
8887
8778
|
height: '200px',
|
|
@@ -8930,9 +8821,7 @@ var WarningsMapView = function WarningsMapView(_ref) {
|
|
|
8930
8821
|
_ref$showMapMousePosi = _ref.showMapMousePosition,
|
|
8931
8822
|
showMapMousePosition = _ref$showMapMousePosi === void 0 ? true : _ref$showMapMousePosi,
|
|
8932
8823
|
_ref$showZoomControls = _ref.showZoomControls,
|
|
8933
|
-
showZoomControls = _ref$showZoomControls === void 0 ? true : _ref$showZoomControls
|
|
8934
|
-
clickOnFeature = _ref.clickOnFeature,
|
|
8935
|
-
hoverSelect = _ref.hoverSelect;
|
|
8824
|
+
showZoomControls = _ref$showZoomControls === void 0 ? true : _ref$showZoomControls;
|
|
8936
8825
|
var containerRef = useRef(null);
|
|
8937
8826
|
var defaultMapPresetBbox = geojsonFeature != null && geojsonFeature.features.length ? undefined : defaultBbox;
|
|
8938
8827
|
var defaultBbox$1 = (defaultMapPreset == null ? void 0 : defaultMapPreset.proj) || defaultMapPresetBbox;
|
|
@@ -9008,9 +8897,7 @@ var WarningsMapView = function WarningsMapView(_ref) {
|
|
|
9008
8897
|
}), !isSnapshot && jsx(OpenLayersLayer, Object.assign({}, defaultBaseLayer, {
|
|
9009
8898
|
id: mapId + "_baseLayer"
|
|
9010
8899
|
})), !!warningLayer.geojson && jsx(OpenLayersFeatureLayer, {
|
|
9011
|
-
clickOnFeature: clickOnFeature,
|
|
9012
8900
|
featureCollection: warningLayer.geojson,
|
|
9013
|
-
hoverSelect: hoverSelect,
|
|
9014
8901
|
style: genericOpenLayersFeatureStyle,
|
|
9015
8902
|
zIndex: 1000
|
|
9016
8903
|
}), !isSnapshot && jsx(OpenLayersLayer, Object.assign({}, defaultOverLayer, {
|
|
@@ -11522,8 +11409,7 @@ var MaritimeWarningsFormConnect = function MaritimeWarningsFormConnect(_ref) {
|
|
|
11522
11409
|
});
|
|
11523
11410
|
};
|
|
11524
11411
|
|
|
11525
|
-
var _excluded$7 = ["IS_DRAFT", "object", "translation-select"]
|
|
11526
|
-
_excluded2$1 = ["isSelected", "highlightSelectedFeature", "boxSelectPreview"];
|
|
11412
|
+
var _excluded$7 = ["IS_DRAFT", "object", "translation-select"];
|
|
11527
11413
|
var getEmptyPublicWarning = function getEmptyPublicWarning() {
|
|
11528
11414
|
var currentTime = new Date();
|
|
11529
11415
|
var validFromTime = dateUtils.add(currentTime, {
|
|
@@ -11645,7 +11531,7 @@ isAviationWarning) {
|
|
|
11645
11531
|
}
|
|
11646
11532
|
return Object.assign({}, geoJSON, {
|
|
11647
11533
|
features: geoJSON.features.map(function (feature) {
|
|
11648
|
-
var _feature$properties2;
|
|
11534
|
+
var _feature$properties2, _feature$properties3;
|
|
11649
11535
|
var colors;
|
|
11650
11536
|
if (isAviationWarning) {
|
|
11651
11537
|
var _feature$properties$i, _feature$properties;
|
|
@@ -11672,91 +11558,86 @@ isAviationWarning) {
|
|
|
11672
11558
|
'stroke-width': 2,
|
|
11673
11559
|
'stroke-opacity': 1
|
|
11674
11560
|
};
|
|
11675
|
-
var _ref5 = (_feature$properties2 = feature.properties) != null ? _feature$properties2 : {};
|
|
11676
|
-
_ref5.isSelected;
|
|
11677
|
-
_ref5.highlightSelectedFeature;
|
|
11678
|
-
_ref5.boxSelectPreview;
|
|
11679
|
-
var featureProperties = _objectWithoutPropertiesLoose(_ref5, _excluded2$1);
|
|
11680
11561
|
return Object.assign({}, feature, {
|
|
11681
|
-
properties: Object.assign({}, defaultProperties,
|
|
11682
|
-
fill: colors.color ||
|
|
11683
|
-
stroke: colors.color ||
|
|
11562
|
+
properties: Object.assign({}, defaultProperties, feature.properties, {
|
|
11563
|
+
fill: colors.color || ((_feature$properties2 = feature.properties) == null ? void 0 : _feature$properties2.fill),
|
|
11564
|
+
stroke: colors.color || ((_feature$properties3 = feature.properties) == null ? void 0 : _feature$properties3.stroke)
|
|
11684
11565
|
})
|
|
11685
11566
|
});
|
|
11686
11567
|
})
|
|
11687
11568
|
});
|
|
11688
11569
|
}
|
|
11689
|
-
var Form = function Form(
|
|
11570
|
+
var Form = function Form(_ref5) {
|
|
11690
11571
|
var _publicWarningDetails, _publicWarningDetails2;
|
|
11691
|
-
var defaultMapPreset =
|
|
11692
|
-
|
|
11693
|
-
onSaveForm =
|
|
11572
|
+
var defaultMapPreset = _ref5.defaultMapPreset,
|
|
11573
|
+
_ref5$onSaveForm = _ref5.onSaveForm,
|
|
11574
|
+
onSaveForm = _ref5$onSaveForm === void 0 ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
11694
11575
|
return _regenerator().w(function (_context) {
|
|
11695
11576
|
while (1) switch (_context.n) {
|
|
11696
11577
|
case 0:
|
|
11697
11578
|
return _context.a(2, null);
|
|
11698
11579
|
}
|
|
11699
11580
|
}, _callee);
|
|
11700
|
-
})) :
|
|
11701
|
-
|
|
11702
|
-
onPublishForm =
|
|
11581
|
+
})) : _ref5$onSaveForm,
|
|
11582
|
+
_ref5$onPublishForm = _ref5.onPublishForm,
|
|
11583
|
+
onPublishForm = _ref5$onPublishForm === void 0 ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
11703
11584
|
return _regenerator().w(function (_context2) {
|
|
11704
11585
|
while (1) switch (_context2.n) {
|
|
11705
11586
|
case 0:
|
|
11706
11587
|
return _context2.a(2, null);
|
|
11707
11588
|
}
|
|
11708
11589
|
}, _callee2);
|
|
11709
|
-
})) :
|
|
11710
|
-
|
|
11711
|
-
onClearForm =
|
|
11712
|
-
|
|
11713
|
-
onCloseForm =
|
|
11714
|
-
|
|
11715
|
-
onSaveAviationForm =
|
|
11590
|
+
})) : _ref5$onPublishForm,
|
|
11591
|
+
_ref5$onClearForm = _ref5.onClearForm,
|
|
11592
|
+
onClearForm = _ref5$onClearForm === void 0 ? function () {} : _ref5$onClearForm,
|
|
11593
|
+
_ref5$onCloseForm = _ref5.onCloseForm,
|
|
11594
|
+
onCloseForm = _ref5$onCloseForm === void 0 ? function () {} : _ref5$onCloseForm,
|
|
11595
|
+
_ref5$onSaveAviationF = _ref5.onSaveAviationForm,
|
|
11596
|
+
onSaveAviationForm = _ref5$onSaveAviationF === void 0 ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
11716
11597
|
return _regenerator().w(function (_context3) {
|
|
11717
11598
|
while (1) switch (_context3.n) {
|
|
11718
11599
|
case 0:
|
|
11719
11600
|
return _context3.a(2, null);
|
|
11720
11601
|
}
|
|
11721
11602
|
}, _callee3);
|
|
11722
|
-
})) :
|
|
11723
|
-
object =
|
|
11724
|
-
publicWarningDetails =
|
|
11725
|
-
|
|
11726
|
-
error =
|
|
11603
|
+
})) : _ref5$onSaveAviationF,
|
|
11604
|
+
object = _ref5.object,
|
|
11605
|
+
publicWarningDetails = _ref5.publicWarningDetails,
|
|
11606
|
+
_ref5$error = _ref5.error,
|
|
11607
|
+
error = _ref5$error === void 0 ? {
|
|
11727
11608
|
severity: 'error',
|
|
11728
11609
|
message: ''
|
|
11729
|
-
} :
|
|
11730
|
-
|
|
11731
|
-
isReadOnly =
|
|
11732
|
-
|
|
11733
|
-
onFormDirty =
|
|
11734
|
-
|
|
11735
|
-
isSnapshot =
|
|
11736
|
-
|
|
11737
|
-
onAddDrawing =
|
|
11738
|
-
selectedAviationProduct =
|
|
11739
|
-
|
|
11740
|
-
warningType =
|
|
11741
|
-
mode =
|
|
11742
|
-
formState =
|
|
11743
|
-
|
|
11744
|
-
onSetViewModeResetArea =
|
|
11745
|
-
storedStartGeoJSON =
|
|
11746
|
-
storedEndGeoJSON =
|
|
11747
|
-
|
|
11748
|
-
setWarningLevel =
|
|
11749
|
-
|
|
11750
|
-
linkedMapIds =
|
|
11751
|
-
|
|
11752
|
-
onDrawPolygon =
|
|
11753
|
-
|
|
11754
|
-
onDeletePolygon =
|
|
11755
|
-
|
|
11756
|
-
isDrawPolygonActive =
|
|
11757
|
-
|
|
11758
|
-
isDrawingModeActive =
|
|
11759
|
-
publicWarningStatus =
|
|
11610
|
+
} : _ref5$error,
|
|
11611
|
+
_ref5$isReadOnly = _ref5.isReadOnly,
|
|
11612
|
+
isReadOnly = _ref5$isReadOnly === void 0 ? false : _ref5$isReadOnly,
|
|
11613
|
+
_ref5$onFormDirty = _ref5.onFormDirty,
|
|
11614
|
+
onFormDirty = _ref5$onFormDirty === void 0 ? function () {} : _ref5$onFormDirty,
|
|
11615
|
+
_ref5$isSnapshot = _ref5.isSnapshot,
|
|
11616
|
+
isSnapshot = _ref5$isSnapshot === void 0 ? false : _ref5$isSnapshot,
|
|
11617
|
+
_ref5$onAddDrawing = _ref5.onAddDrawing,
|
|
11618
|
+
onAddDrawing = _ref5$onAddDrawing === void 0 ? function () {} : _ref5$onAddDrawing,
|
|
11619
|
+
selectedAviationProduct = _ref5.selectedAviationProduct,
|
|
11620
|
+
_ref5$warningType = _ref5.warningType,
|
|
11621
|
+
warningType = _ref5$warningType === void 0 ? 'public' : _ref5$warningType,
|
|
11622
|
+
mode = _ref5.mode,
|
|
11623
|
+
formState = _ref5.formState,
|
|
11624
|
+
_ref5$onSetViewModeRe = _ref5.onSetViewModeResetArea,
|
|
11625
|
+
onSetViewModeResetArea = _ref5$onSetViewModeRe === void 0 ? function () {} : _ref5$onSetViewModeRe,
|
|
11626
|
+
storedStartGeoJSON = _ref5.storedStartGeoJSON,
|
|
11627
|
+
storedEndGeoJSON = _ref5.storedEndGeoJSON,
|
|
11628
|
+
_ref5$setWarningLevel = _ref5.setWarningLevel,
|
|
11629
|
+
setWarningLevel = _ref5$setWarningLevel === void 0 ? function () {} : _ref5$setWarningLevel,
|
|
11630
|
+
_ref5$linkedMapIds = _ref5.linkedMapIds,
|
|
11631
|
+
linkedMapIds = _ref5$linkedMapIds === void 0 ? [] : _ref5$linkedMapIds,
|
|
11632
|
+
_ref5$onDrawPolygon = _ref5.onDrawPolygon,
|
|
11633
|
+
onDrawPolygon = _ref5$onDrawPolygon === void 0 ? function () {} : _ref5$onDrawPolygon,
|
|
11634
|
+
_ref5$onDeletePolygon = _ref5.onDeletePolygon,
|
|
11635
|
+
onDeletePolygon = _ref5$onDeletePolygon === void 0 ? function () {} : _ref5$onDeletePolygon,
|
|
11636
|
+
_ref5$isDrawPolygonAc = _ref5.isDrawPolygonActive,
|
|
11637
|
+
isDrawPolygonActive = _ref5$isDrawPolygonAc === void 0 ? false : _ref5$isDrawPolygonAc,
|
|
11638
|
+
_ref5$isDrawingModeAc = _ref5.isDrawingModeActive,
|
|
11639
|
+
isDrawingModeActive = _ref5$isDrawingModeAc === void 0 ? false : _ref5$isDrawingModeAc,
|
|
11640
|
+
publicWarningStatus = _ref5.publicWarningStatus;
|
|
11760
11641
|
var _React$useState = React.useState(false),
|
|
11761
11642
|
isPublishing = _React$useState[0],
|
|
11762
11643
|
setIsPublishing = _React$useState[1];
|
|
@@ -11828,7 +11709,7 @@ var Form = function Form(_ref6) {
|
|
|
11828
11709
|
if (!isPublishing) {
|
|
11829
11710
|
toggleIsDraft(false);
|
|
11830
11711
|
void handleSubmit(/*#__PURE__*/function () {
|
|
11831
|
-
var
|
|
11712
|
+
var _ref9 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(data) {
|
|
11832
11713
|
return _regenerator().w(function (_context4) {
|
|
11833
11714
|
while (1) switch (_context4.n) {
|
|
11834
11715
|
case 0:
|
|
@@ -11843,7 +11724,7 @@ var Form = function Form(_ref6) {
|
|
|
11843
11724
|
}, _callee4);
|
|
11844
11725
|
}));
|
|
11845
11726
|
return function (_x) {
|
|
11846
|
-
return
|
|
11727
|
+
return _ref9.apply(this, arguments);
|
|
11847
11728
|
};
|
|
11848
11729
|
}())();
|
|
11849
11730
|
}
|
|
@@ -11852,7 +11733,7 @@ var Form = function Form(_ref6) {
|
|
|
11852
11733
|
if (!isSaving) {
|
|
11853
11734
|
toggleIsDraft(true);
|
|
11854
11735
|
void handleSubmit(/*#__PURE__*/function () {
|
|
11855
|
-
var
|
|
11736
|
+
var _ref0 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(data) {
|
|
11856
11737
|
return _regenerator().w(function (_context5) {
|
|
11857
11738
|
while (1) switch (_context5.n) {
|
|
11858
11739
|
case 0:
|
|
@@ -11867,13 +11748,13 @@ var Form = function Form(_ref6) {
|
|
|
11867
11748
|
}, _callee5);
|
|
11868
11749
|
}));
|
|
11869
11750
|
return function (_x2) {
|
|
11870
|
-
return
|
|
11751
|
+
return _ref0.apply(this, arguments);
|
|
11871
11752
|
};
|
|
11872
11753
|
}())();
|
|
11873
11754
|
}
|
|
11874
11755
|
};
|
|
11875
11756
|
var showConfirmDialog = /*#__PURE__*/function () {
|
|
11876
|
-
var
|
|
11757
|
+
var _ref1 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(action) {
|
|
11877
11758
|
return _regenerator().w(function (_context6) {
|
|
11878
11759
|
while (1) switch (_context6.n) {
|
|
11879
11760
|
case 0:
|
|
@@ -11894,11 +11775,11 @@ var Form = function Form(_ref6) {
|
|
|
11894
11775
|
}, _callee6);
|
|
11895
11776
|
}));
|
|
11896
11777
|
return function showConfirmDialog(_x3) {
|
|
11897
|
-
return
|
|
11778
|
+
return _ref1.apply(this, arguments);
|
|
11898
11779
|
};
|
|
11899
11780
|
}();
|
|
11900
11781
|
var cancelAviationProduct = /*#__PURE__*/function () {
|
|
11901
|
-
var
|
|
11782
|
+
var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(warningType) {
|
|
11902
11783
|
var result;
|
|
11903
11784
|
return _regenerator().w(function (_context7) {
|
|
11904
11785
|
while (1) switch (_context7.n) {
|
|
@@ -11912,7 +11793,7 @@ var Form = function Form(_ref6) {
|
|
|
11912
11793
|
}, _callee7);
|
|
11913
11794
|
}));
|
|
11914
11795
|
return function cancelAviationProduct(_x4) {
|
|
11915
|
-
return
|
|
11796
|
+
return _ref10.apply(this, arguments);
|
|
11916
11797
|
};
|
|
11917
11798
|
}();
|
|
11918
11799
|
var getPublishButtonLabel = function getPublishButtonLabel() {
|
|
@@ -11927,7 +11808,7 @@ var Form = function Form(_ref6) {
|
|
|
11927
11808
|
return t('warning-button-publish');
|
|
11928
11809
|
};
|
|
11929
11810
|
var saveAviationDraft = /*#__PURE__*/function () {
|
|
11930
|
-
var
|
|
11811
|
+
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(formValues, warningType) {
|
|
11931
11812
|
return _regenerator().w(function (_context8) {
|
|
11932
11813
|
while (1) switch (_context8.n) {
|
|
11933
11814
|
case 0:
|
|
@@ -11949,11 +11830,11 @@ var Form = function Form(_ref6) {
|
|
|
11949
11830
|
}, _callee8);
|
|
11950
11831
|
}));
|
|
11951
11832
|
return function saveAviationDraft(_x5, _x6) {
|
|
11952
|
-
return
|
|
11833
|
+
return _ref11.apply(this, arguments);
|
|
11953
11834
|
};
|
|
11954
11835
|
}();
|
|
11955
11836
|
var handleSubmitAviationProduct = /*#__PURE__*/function () {
|
|
11956
|
-
var
|
|
11837
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(action, warningType) {
|
|
11957
11838
|
var _getFieldState$error, _getFieldState$error2, startGeometryErrorType, endGeometryErrorType, hasConfiguredIntersectionPointLimitError, _t3;
|
|
11958
11839
|
return _regenerator().w(function (_context1) {
|
|
11959
11840
|
while (1) switch (_context1.p = _context1.n) {
|
|
@@ -11988,7 +11869,7 @@ var Form = function Form(_ref6) {
|
|
|
11988
11869
|
case 6:
|
|
11989
11870
|
toggleIsDraft(false);
|
|
11990
11871
|
void handleSubmit(/*#__PURE__*/function () {
|
|
11991
|
-
var
|
|
11872
|
+
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(formValues) {
|
|
11992
11873
|
return _regenerator().w(function (_context9) {
|
|
11993
11874
|
while (1) switch (_context9.p = _context9.n) {
|
|
11994
11875
|
case 0:
|
|
@@ -12024,7 +11905,7 @@ var Form = function Form(_ref6) {
|
|
|
12024
11905
|
}, _callee9, null, [[4, 6, 7, 8], [0, 2]]);
|
|
12025
11906
|
}));
|
|
12026
11907
|
return function (_x9) {
|
|
12027
|
-
return
|
|
11908
|
+
return _ref13.apply(this, arguments);
|
|
12028
11909
|
};
|
|
12029
11910
|
}())();
|
|
12030
11911
|
return _context1.a(3, 19);
|
|
@@ -12059,7 +11940,7 @@ var Form = function Form(_ref6) {
|
|
|
12059
11940
|
return _context1.a(3, 19);
|
|
12060
11941
|
case 16:
|
|
12061
11942
|
void handleSubmit(/*#__PURE__*/function () {
|
|
12062
|
-
var
|
|
11943
|
+
var _ref14 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(formValues) {
|
|
12063
11944
|
return _regenerator().w(function (_context0) {
|
|
12064
11945
|
while (1) switch (_context0.p = _context0.n) {
|
|
12065
11946
|
case 0:
|
|
@@ -12086,7 +11967,7 @@ var Form = function Form(_ref6) {
|
|
|
12086
11967
|
}, _callee0, null, [[0,, 4, 5]]);
|
|
12087
11968
|
}));
|
|
12088
11969
|
return function (_x0) {
|
|
12089
|
-
return
|
|
11970
|
+
return _ref14.apply(this, arguments);
|
|
12090
11971
|
};
|
|
12091
11972
|
}())();
|
|
12092
11973
|
return _context1.a(3, 19);
|
|
@@ -12100,7 +11981,7 @@ var Form = function Form(_ref6) {
|
|
|
12100
11981
|
}, _callee1, null, [[11, 13, 14, 15], [7, 9]]);
|
|
12101
11982
|
}));
|
|
12102
11983
|
return function handleSubmitAviationProduct(_x7, _x8) {
|
|
12103
|
-
return
|
|
11984
|
+
return _ref12.apply(this, arguments);
|
|
12104
11985
|
};
|
|
12105
11986
|
}();
|
|
12106
11987
|
var onPressClear = function onPressClear() {
|
|
@@ -13140,7 +13021,7 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
|
|
|
13140
13021
|
fetchAreaError = _useAreaRequest.fetchAreaError,
|
|
13141
13022
|
setAreas = _useAreaRequest.setAreas,
|
|
13142
13023
|
isAreasLoading = _useAreaRequest.isAreasLoading;
|
|
13143
|
-
var
|
|
13024
|
+
var selectedAreas = useSelector(function (store) {
|
|
13144
13025
|
return getPublicWarningAreas(store);
|
|
13145
13026
|
});
|
|
13146
13027
|
var warningId = useSelector(function (store) {
|
|
@@ -13155,10 +13036,6 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
|
|
|
13155
13036
|
var isWarningDialogOpen = useSelector(function (store) {
|
|
13156
13037
|
return uiSelectors.getisDialogOpen(store, publicWarningDialogType);
|
|
13157
13038
|
});
|
|
13158
|
-
var isWarningEventDialogOpen = useSelector(function (store) {
|
|
13159
|
-
return uiSelectors.getisDialogOpen(store, warningEventDialogType);
|
|
13160
|
-
});
|
|
13161
|
-
var eventSelectedDrawing = useSelector(getWarningsEventSelectedDrawing);
|
|
13162
13039
|
var hasPublicWarningDrawLayer = useSelector(function (store) {
|
|
13163
13040
|
var _store$layers$allIds, _store$layers;
|
|
13164
13041
|
return ((_store$layers$allIds = (_store$layers = store.layers) == null ? void 0 : _store$layers.allIds) != null ? _store$layers$allIds : []).some(function (layerId) {
|
|
@@ -13259,15 +13136,9 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
|
|
|
13259
13136
|
var onSearch = function onSearch(queryString) {
|
|
13260
13137
|
return setSearchQuery(queryString);
|
|
13261
13138
|
};
|
|
13262
|
-
var onAddArea = function onAddArea(
|
|
13263
|
-
var geoJSON =
|
|
13264
|
-
objectName =
|
|
13265
|
-
if (isWarningEventDialogOpen) {
|
|
13266
|
-
dispatch(warningsEventFormActions.setSelectedDrawing({
|
|
13267
|
-
drawing: drawingListItem
|
|
13268
|
-
}));
|
|
13269
|
-
return;
|
|
13270
|
-
}
|
|
13139
|
+
var onAddArea = function onAddArea(_ref4) {
|
|
13140
|
+
var geoJSON = _ref4.geoJSON,
|
|
13141
|
+
objectName = _ref4.objectName;
|
|
13271
13142
|
dispatch(warningsFormActions.addArea({
|
|
13272
13143
|
area: {
|
|
13273
13144
|
geoJSON: geoJSON,
|
|
@@ -13275,15 +13146,9 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
|
|
|
13275
13146
|
}
|
|
13276
13147
|
}));
|
|
13277
13148
|
};
|
|
13278
|
-
var onRemoveArea = function onRemoveArea(
|
|
13279
|
-
var geoJSON =
|
|
13280
|
-
objectName =
|
|
13281
|
-
if (isWarningEventDialogOpen) {
|
|
13282
|
-
dispatch(warningsEventFormActions.setSelectedDrawing({
|
|
13283
|
-
drawing: undefined
|
|
13284
|
-
}));
|
|
13285
|
-
return;
|
|
13286
|
-
}
|
|
13149
|
+
var onRemoveArea = function onRemoveArea(_ref5) {
|
|
13150
|
+
var geoJSON = _ref5.geoJSON,
|
|
13151
|
+
objectName = _ref5.objectName;
|
|
13287
13152
|
dispatch(warningsFormActions.removeArea({
|
|
13288
13153
|
area: {
|
|
13289
13154
|
geoJSON: geoJSON,
|
|
@@ -13297,11 +13162,6 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
|
|
|
13297
13162
|
}
|
|
13298
13163
|
};
|
|
13299
13164
|
var isChangeAreaDisabled = warningId !== undefined && typeof warningId === 'string' && warningId.length > 0 && warningStatus !== PublicWarningStatus.DRAFT && warningStatus !== PublicWarningStatus.DRAFT_PUBLISHED;
|
|
13300
|
-
// When opened from the warning event form, show the drawing selected on the event
|
|
13301
|
-
var selectedAreas = isWarningEventDialogOpen ? eventSelectedDrawing && [{
|
|
13302
|
-
geoJSON: eventSelectedDrawing.geoJSON,
|
|
13303
|
-
objectName: eventSelectedDrawing.objectName
|
|
13304
|
-
}] : publicWarningSelectedAreas;
|
|
13305
13165
|
var drawingError = uiError ? {
|
|
13306
13166
|
type: areaDrawingLoaderType,
|
|
13307
13167
|
error: uiError
|
|
@@ -13330,7 +13190,7 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
|
|
|
13330
13190
|
source: uiSource,
|
|
13331
13191
|
startPosition: {
|
|
13332
13192
|
top: 104,
|
|
13333
|
-
left:
|
|
13193
|
+
left: 50
|
|
13334
13194
|
},
|
|
13335
13195
|
title: t('area-drawing-loader-title')
|
|
13336
13196
|
});
|
|
@@ -14393,6 +14253,16 @@ var EDIT_FIELD_SX = {
|
|
|
14393
14253
|
fontSize: 16
|
|
14394
14254
|
}
|
|
14395
14255
|
};
|
|
14256
|
+
// The picker displays UTC times in the local-time based MUI picker
|
|
14257
|
+
var toPickerDate = function toPickerDate(utcDate) {
|
|
14258
|
+
return new Date(utcDate.getTime() + utcDate.getTimezoneOffset() * 60000);
|
|
14259
|
+
};
|
|
14260
|
+
var toUtcDate = function toUtcDate(pickerDate) {
|
|
14261
|
+
return new Date(pickerDate.getTime() - pickerDate.getTimezoneOffset() * 60000);
|
|
14262
|
+
};
|
|
14263
|
+
var OpenPickerIcon = function OpenPickerIcon() {
|
|
14264
|
+
return jsx(CalendarToday, {});
|
|
14265
|
+
};
|
|
14396
14266
|
var TimeField = function TimeField(_ref) {
|
|
14397
14267
|
var field = _ref.field,
|
|
14398
14268
|
label = _ref.label,
|
|
@@ -14445,43 +14315,70 @@ var TimeField = function TimeField(_ref) {
|
|
|
14445
14315
|
width: TIME_FIELD_WIDTH,
|
|
14446
14316
|
zIndex: 4
|
|
14447
14317
|
},
|
|
14448
|
-
children: isEditing && !isActive ? jsx(
|
|
14449
|
-
|
|
14450
|
-
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14318
|
+
children: isEditing && !isActive ? jsx(LocalizationProvider, {
|
|
14319
|
+
dateAdapter: AdapterDateFns,
|
|
14320
|
+
children: jsx(DateTimePicker, {
|
|
14321
|
+
ampm: false,
|
|
14322
|
+
autoFocus: true,
|
|
14323
|
+
desktopModeMediaQuery: "@media (min-width: 720px)",
|
|
14324
|
+
format: dateUtils.DATE_FORMAT_DATEPICKER,
|
|
14325
|
+
label: label,
|
|
14326
|
+
maxDateTime: toPickerDate(maxPickerDate),
|
|
14327
|
+
minDateTime: minPickerDate ? toPickerDate(minPickerDate) : undefined,
|
|
14328
|
+
onAccept: function onAccept(value) {
|
|
14329
|
+
if (isPopupOpenRef.current && value) {
|
|
14330
|
+
onCommitSession({
|
|
14331
|
+
field: field,
|
|
14332
|
+
value: toUtcDate(value)
|
|
14333
|
+
});
|
|
14334
|
+
}
|
|
14335
|
+
},
|
|
14336
|
+
onChange: function onChange(value) {
|
|
14337
|
+
if (value) {
|
|
14338
|
+
onDraftChange(field, toUtcDate(value));
|
|
14339
|
+
}
|
|
14340
|
+
},
|
|
14341
|
+
onClose: function onClose() {
|
|
14342
|
+
isPopupOpenRef.current = false;
|
|
14343
|
+
},
|
|
14344
|
+
onError: function onError(reason) {
|
|
14345
|
+
onDraftValidityChange(field, reason != null);
|
|
14346
|
+
},
|
|
14347
|
+
onOpen: function onOpen() {
|
|
14348
|
+
isPopupOpenRef.current = true;
|
|
14349
|
+
},
|
|
14350
|
+
slotProps: {
|
|
14351
|
+
textField: {
|
|
14352
|
+
variant: 'filled',
|
|
14353
|
+
error: isDraftInvalid && draft != null,
|
|
14354
|
+
slotProps: {
|
|
14355
|
+
input: {
|
|
14356
|
+
endAdornment: jsx(InputAdornment, {
|
|
14357
|
+
position: "end",
|
|
14358
|
+
children: "UTC"
|
|
14359
|
+
})
|
|
14360
|
+
}
|
|
14361
|
+
}
|
|
14362
|
+
},
|
|
14363
|
+
field: {
|
|
14364
|
+
openPickerButtonPosition: 'start'
|
|
14365
|
+
},
|
|
14366
|
+
openPickerButton: {
|
|
14367
|
+
size: 'small',
|
|
14368
|
+
sx: {
|
|
14369
|
+
padding: 0
|
|
14370
|
+
}
|
|
14371
|
+
}
|
|
14372
|
+
},
|
|
14373
|
+
slots: {
|
|
14374
|
+
openPickerIcon: OpenPickerIcon
|
|
14375
|
+
},
|
|
14376
|
+
sx: EDIT_FIELD_SX,
|
|
14377
|
+
timeSteps: {
|
|
14378
|
+
minutes: SNAP_MINUTES
|
|
14379
|
+
},
|
|
14380
|
+
value: toPickerDate(shownTime)
|
|
14381
|
+
})
|
|
14485
14382
|
}) : jsxs(Box, {
|
|
14486
14383
|
"data-testid": "warning-event-block-" + field + "-field",
|
|
14487
14384
|
onDoubleClick: function onDoubleClick() {
|
|
@@ -15721,8 +15618,7 @@ var warningEventItemDefaultValues = {
|
|
|
15721
15618
|
authority: '',
|
|
15722
15619
|
phenomenon: '',
|
|
15723
15620
|
type: 0,
|
|
15724
|
-
warning_handle_uuid: ''
|
|
15725
|
-
areas: []
|
|
15621
|
+
warning_handle_uuid: ''
|
|
15726
15622
|
};
|
|
15727
15623
|
var buildDefaultWarningItem = function buildDefaultWarningItem(event) {
|
|
15728
15624
|
var _getDefaultWarningTim = getDefaultWarningTimes(event.warningEventType),
|
|
@@ -15763,6 +15659,30 @@ var getInheritedEventFields = function getInheritedEventFields(values) {
|
|
|
15763
15659
|
phenomenon: values.phenomenon
|
|
15764
15660
|
};
|
|
15765
15661
|
};
|
|
15662
|
+
// FAKE area that is needed for the BE PUBLISH until we implement the real area functionality
|
|
15663
|
+
var FAKE_AREAS = [{
|
|
15664
|
+
objectName: 'Drawing name',
|
|
15665
|
+
geoJSON: {
|
|
15666
|
+
type: 'FeatureCollection',
|
|
15667
|
+
features: [{
|
|
15668
|
+
type: 'Feature',
|
|
15669
|
+
geometry: {
|
|
15670
|
+
type: 'Polygon',
|
|
15671
|
+
coordinates: [[[4.62825, 53.0063], [4.82904, 53.35734], [5.78279, 53.53676], [4.8625, 52.63206], [4.47765, 52.60158], [4.62825, 53.0063]]]
|
|
15672
|
+
},
|
|
15673
|
+
properties: {
|
|
15674
|
+
fill: '#fae21e',
|
|
15675
|
+
stroke: '#fae21e',
|
|
15676
|
+
'fill-opacity': 0.2,
|
|
15677
|
+
'stroke-width': 2,
|
|
15678
|
+
selectionType: 'poly',
|
|
15679
|
+
warning_level: '1',
|
|
15680
|
+
'stroke-opacity': 1,
|
|
15681
|
+
objectName: 'Feature name'
|
|
15682
|
+
}
|
|
15683
|
+
}]
|
|
15684
|
+
}
|
|
15685
|
+
}];
|
|
15766
15686
|
var buildSubmitValues = function buildSubmitValues(values) {
|
|
15767
15687
|
values.IS_DRAFT;
|
|
15768
15688
|
var productToPost = _objectWithoutPropertiesLoose(values, _excluded$6);
|
|
@@ -15770,14 +15690,20 @@ var buildSubmitValues = function buildSubmitValues(values) {
|
|
|
15770
15690
|
var eventToPost = Object.assign({}, productToPost, getEventValidity(productToPost.warnings), {
|
|
15771
15691
|
warnings: productToPost.warnings.map(function (warning) {
|
|
15772
15692
|
var joinedWarning = Object.assign({}, warning, inherited, {
|
|
15773
|
-
domain: 'public'
|
|
15693
|
+
domain: 'public',
|
|
15694
|
+
// TODO REMOVE WHEN WE IMPLEMENT THE REAL AREAS FUNCTIONALITY
|
|
15695
|
+
areas: FAKE_AREAS
|
|
15774
15696
|
});
|
|
15775
|
-
// Remove empty fields from all warnings
|
|
15776
|
-
// when empty) so the backend can clear areas that were removed
|
|
15697
|
+
// Remove empty fields from all warnings
|
|
15777
15698
|
return Object.keys(joinedWarning).reduce(function (warningDetail, fieldName) {
|
|
15778
15699
|
var key = fieldName;
|
|
15779
15700
|
var fieldValue = joinedWarning[key];
|
|
15780
|
-
if (
|
|
15701
|
+
if (Array.isArray(fieldValue)) {
|
|
15702
|
+
if (!fieldValue.length || fieldValue[0].geoJSON === null) {
|
|
15703
|
+
return warningDetail;
|
|
15704
|
+
}
|
|
15705
|
+
}
|
|
15706
|
+
if (fieldValue) {
|
|
15781
15707
|
var _Object$assign;
|
|
15782
15708
|
return Object.assign({}, warningDetail, (_Object$assign = {}, _Object$assign[key] = fieldValue, _Object$assign));
|
|
15783
15709
|
}
|
|
@@ -15960,7 +15886,7 @@ var probablityOptions = [{
|
|
|
15960
15886
|
name: '60 - 90',
|
|
15961
15887
|
value: 60
|
|
15962
15888
|
}, {
|
|
15963
|
-
name: '
|
|
15889
|
+
name: '100',
|
|
15964
15890
|
value: 100
|
|
15965
15891
|
}];
|
|
15966
15892
|
var getWarningTitle = function getWarningTitle(status, areas, index, t) {
|
|
@@ -15998,18 +15924,12 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
15998
15924
|
isCompact = _ref.isCompact,
|
|
15999
15925
|
_ref$isDeleteButtonDi = _ref.isDeleteButtonDisabled,
|
|
16000
15926
|
isDeleteButtonDisabled = _ref$isDeleteButtonDi === void 0 ? false : _ref$isDeleteButtonDi,
|
|
16001
|
-
selectedDrawing = _ref.selectedDrawing,
|
|
16002
|
-
_ref$onAddDrawing = _ref.onAddDrawing,
|
|
16003
|
-
onAddDrawing = _ref$onAddDrawing === void 0 ? function () {} : _ref$onAddDrawing,
|
|
16004
15927
|
onExpireWithdraw = _ref.onExpireWithdraw,
|
|
16005
15928
|
onToggleCompact = _ref.onToggleCompact,
|
|
16006
15929
|
onDeleteWarning = _ref.onDeleteWarning;
|
|
16007
15930
|
var _React$useState = React.useState(null),
|
|
16008
15931
|
menuAnchorEl = _React$useState[0],
|
|
16009
15932
|
setMenuAnchorEl = _React$useState[1];
|
|
16010
|
-
var _React$useState2 = React.useState(null),
|
|
16011
|
-
menuMapAnchorEl = _React$useState2[0],
|
|
16012
|
-
setMenuMapAnchorEl = _React$useState2[1];
|
|
16013
15933
|
var _useWarningsTranslati = useWarningsTranslation(),
|
|
16014
15934
|
t = _useWarningsTranslati.t;
|
|
16015
15935
|
var _useFormContext = useFormContext(),
|
|
@@ -16049,9 +15969,6 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16049
15969
|
var _getValidationErrors2 = getValidationErrors(["warnings." + index + ".probability"], fieldErrors),
|
|
16050
15970
|
hasProbabilityError = _getValidationErrors2.hasErrors,
|
|
16051
15971
|
probabilityError = _getValidationErrors2.errors;
|
|
16052
|
-
var _getValidationErrors3 = getValidationErrors(["warnings." + index + ".areas"], fieldErrors),
|
|
16053
|
-
hasAreaError = _getValidationErrors3.hasErrors,
|
|
16054
|
-
areaError = _getValidationErrors3.errors;
|
|
16055
15972
|
var revalidateOverlaps = React.useCallback(function () {
|
|
16056
15973
|
var warnings = getValues('warnings');
|
|
16057
15974
|
warnings.forEach(function (_warning, warningIndex) {
|
|
@@ -16083,76 +16000,6 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16083
16000
|
}
|
|
16084
16001
|
};
|
|
16085
16002
|
}, [index, setValue, warningAreas, trigger, revalidateOverlaps]);
|
|
16086
|
-
var readOnlyWarning = isReadOnly || warningStatus === PublicWarningStatus.EXPIRED || warningStatus === PublicWarningStatus.WITHDRAWN || eventStatus === PublicWarningStatus.EXPIRED || eventStatus === PublicWarningStatus.WITHDRAWN;
|
|
16087
|
-
var assignedFeatureId = warningAreas == null || (_warningAreas$2 = warningAreas[0]) == null || (_warningAreas$2 = _warningAreas$2.geoJSON) == null || (_warningAreas$2 = _warningAreas$2.features) == null || (_warningAreas$2 = _warningAreas$2[0]) == null ? void 0 : _warningAreas$2.id;
|
|
16088
|
-
var features = React.useMemo(function () {
|
|
16089
|
-
var _selectedDrawing$geoJ, _selectedDrawing$geoJ2;
|
|
16090
|
-
return (_selectedDrawing$geoJ = selectedDrawing == null || (_selectedDrawing$geoJ2 = selectedDrawing.geoJSON) == null ? void 0 : _selectedDrawing$geoJ2.features) != null ? _selectedDrawing$geoJ : [];
|
|
16091
|
-
}, [selectedDrawing]);
|
|
16092
|
-
// Assign the object picked from the selected drawing as the area of this warning
|
|
16093
|
-
var onAssignFeature = React.useCallback(function (featureId) {
|
|
16094
|
-
var _feature$properties$o, _feature$properties;
|
|
16095
|
-
var feature = features.find(function (item) {
|
|
16096
|
-
return String(item.id) === featureId;
|
|
16097
|
-
});
|
|
16098
|
-
if (!feature || featureId === assignedFeatureId) {
|
|
16099
|
-
return;
|
|
16100
|
-
}
|
|
16101
|
-
var area = {
|
|
16102
|
-
objectName: (_feature$properties$o = (_feature$properties = feature.properties) == null ? void 0 : _feature$properties.objectName) != null ? _feature$properties$o : '',
|
|
16103
|
-
geoJSON: warningLevelFeatureColors(level, {
|
|
16104
|
-
type: 'FeatureCollection',
|
|
16105
|
-
features: [feature]
|
|
16106
|
-
})
|
|
16107
|
-
};
|
|
16108
|
-
setValue("warnings." + index + ".areas", [area], {
|
|
16109
|
-
shouldDirty: true
|
|
16110
|
-
});
|
|
16111
|
-
void trigger("warnings." + index + ".areas");
|
|
16112
|
-
}, [features, assignedFeatureId, level, index, setValue, trigger]);
|
|
16113
|
-
var hasAssignedArea = !!(warningAreas != null && (_warningAreas$3 = warningAreas[0]) != null && (_warningAreas$3 = _warningAreas$3.geoJSON) != null && (_warningAreas$3 = _warningAreas$3.features) != null && _warningAreas$3.length);
|
|
16114
|
-
// As long as no area has been assigned to this warning, show all features of the
|
|
16115
|
-
// selected drawing in blue. Once area is chosen, only show that one, in level color
|
|
16116
|
-
var displayedGeoJSON = React.useMemo(function () {
|
|
16117
|
-
var _selectedDrawing$geoJ3;
|
|
16118
|
-
if (hasAssignedArea) {
|
|
16119
|
-
return warningAreas[0].geoJSON;
|
|
16120
|
-
}
|
|
16121
|
-
if (!(selectedDrawing != null && (_selectedDrawing$geoJ3 = selectedDrawing.geoJSON) != null && (_selectedDrawing$geoJ3 = _selectedDrawing$geoJ3.features) != null && _selectedDrawing$geoJ3.length)) {
|
|
16122
|
-
return undefined;
|
|
16123
|
-
}
|
|
16124
|
-
var blueFeatures = warningLevelFeatureColors(undefined, selectedDrawing.geoJSON);
|
|
16125
|
-
// Outline only, no fill, as long as the feature has not been chosen
|
|
16126
|
-
return Object.assign({}, blueFeatures, {
|
|
16127
|
-
features: blueFeatures.features.map(function (feature) {
|
|
16128
|
-
return Object.assign({}, feature, {
|
|
16129
|
-
properties: Object.assign({}, feature.properties, {
|
|
16130
|
-
'fill-opacity': 0
|
|
16131
|
-
})
|
|
16132
|
-
});
|
|
16133
|
-
})
|
|
16134
|
-
});
|
|
16135
|
-
}, [hasAssignedArea, warningAreas, selectedDrawing]);
|
|
16136
|
-
// Picking a feature directly on the map, only possible on an expanded, editable map
|
|
16137
|
-
var canPickFeatureOnMap = !isCompact && !readOnlyWarning && !hasAssignedArea && features.length > 0;
|
|
16138
|
-
var clickOnFeature = React.useMemo(function () {
|
|
16139
|
-
return canPickFeatureOnMap ? {
|
|
16140
|
-
onClick: function onClick(clickedFeatures) {
|
|
16141
|
-
var _clickedFeatures$;
|
|
16142
|
-
var featureId = (_clickedFeatures$ = clickedFeatures[0]) == null ? void 0 : _clickedFeatures$.getId();
|
|
16143
|
-
if (featureId === undefined) {
|
|
16144
|
-
return;
|
|
16145
|
-
}
|
|
16146
|
-
onAssignFeature(String(featureId));
|
|
16147
|
-
},
|
|
16148
|
-
hitTolerance: 5
|
|
16149
|
-
} : undefined;
|
|
16150
|
-
}, [canPickFeatureOnMap, onAssignFeature]);
|
|
16151
|
-
var hoverSelect = React.useMemo(function () {
|
|
16152
|
-
return canPickFeatureOnMap ? {
|
|
16153
|
-
active: true
|
|
16154
|
-
} : undefined;
|
|
16155
|
-
}, [canPickFeatureOnMap]);
|
|
16156
16003
|
// Until we implement the full validation, set every field to be required when publishing
|
|
16157
16004
|
var _useDraftFormHelpers = useDraftFormHelpers(),
|
|
16158
16005
|
isRequired = _useDraftFormHelpers.isRequired,
|
|
@@ -16171,8 +16018,9 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16171
16018
|
var onWithdraw = function onWithdraw() {
|
|
16172
16019
|
onExpireWithdraw(PublicWarningStatus.WITHDRAWN, index);
|
|
16173
16020
|
};
|
|
16021
|
+
var readOnlyWarning = isReadOnly || warningStatus === PublicWarningStatus.EXPIRED || warningStatus === PublicWarningStatus.WITHDRAWN || eventStatus === PublicWarningStatus.EXPIRED || eventStatus === PublicWarningStatus.WITHDRAWN;
|
|
16174
16022
|
var warningTitle = getWarningTitle(status, warningAreas, index, t);
|
|
16175
|
-
var mapTitle = (
|
|
16023
|
+
var mapTitle = (warningAreas == null || (_warningAreas$2 = warningAreas[0]) == null ? void 0 : _warningAreas$2.objectName) || undefined;
|
|
16176
16024
|
return jsxs(Fragment, {
|
|
16177
16025
|
children: [isCompact ? jsxs(Box, {
|
|
16178
16026
|
sx: {
|
|
@@ -16201,7 +16049,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16201
16049
|
sx: {
|
|
16202
16050
|
fontSize: 14,
|
|
16203
16051
|
flexShrink: 0,
|
|
16204
|
-
width: "" + (hasValidationErrors || hasProbabilityError
|
|
16052
|
+
width: "" + (hasValidationErrors || hasProbabilityError ? '93px' : '125px'),
|
|
16205
16053
|
display: '-webkit-box',
|
|
16206
16054
|
WebkitLineClamp: 2,
|
|
16207
16055
|
WebkitBoxOrient: 'vertical',
|
|
@@ -16211,13 +16059,11 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16211
16059
|
},
|
|
16212
16060
|
children: warningTitle
|
|
16213
16061
|
})
|
|
16214
|
-
}), !!(hasValidationErrors || hasProbabilityError
|
|
16062
|
+
}), !!(hasValidationErrors || hasProbabilityError) && jsx(CustomTooltip, {
|
|
16215
16063
|
title: t('warning-event-validation-warning-incomplete') + ": " + validationErrors.map(function (validationError) {
|
|
16216
16064
|
return "" + validationError.message;
|
|
16217
16065
|
}) + " " + probabilityError.map(function (validationError) {
|
|
16218
16066
|
return "" + t('warning-event-validation-propbability-collapsed');
|
|
16219
|
-
}) + areaError.map(function (validationError) {
|
|
16220
|
-
return ", " + t('warning-event-validation-area-missing');
|
|
16221
16067
|
}),
|
|
16222
16068
|
children: jsx("span", {
|
|
16223
16069
|
children: jsx(Info, {
|
|
@@ -16234,7 +16080,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16234
16080
|
},
|
|
16235
16081
|
children: jsx(WarningsMapView, {
|
|
16236
16082
|
defaultMapPreset: defaultMapPreset,
|
|
16237
|
-
geojsonFeature:
|
|
16083
|
+
geojsonFeature: (warningAreas == null || (_warningAreas$3 = warningAreas[0]) == null ? void 0 : _warningAreas$3.geoJSON) || undefined,
|
|
16238
16084
|
isSnapshot: isSnapshot,
|
|
16239
16085
|
showMapMousePosition: false,
|
|
16240
16086
|
showZoomControls: false,
|
|
@@ -16321,7 +16167,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16321
16167
|
},
|
|
16322
16168
|
children: jsx(ReactHookFormSelect, {
|
|
16323
16169
|
disabled: readOnlyWarning,
|
|
16324
|
-
label: t('warning-
|
|
16170
|
+
label: t('warning-probability'),
|
|
16325
16171
|
name: "warnings." + index + ".probability",
|
|
16326
16172
|
rules: {
|
|
16327
16173
|
validate: {
|
|
@@ -16448,33 +16294,9 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16448
16294
|
height: 200,
|
|
16449
16295
|
position: 'relative'
|
|
16450
16296
|
},
|
|
16451
|
-
children: [
|
|
16452
|
-
sx: {
|
|
16453
|
-
position: 'absolute',
|
|
16454
|
-
top: '0px',
|
|
16455
|
-
left: '40px',
|
|
16456
|
-
width: 'calc(100% - 40px)',
|
|
16457
|
-
zIndex: 1
|
|
16458
|
-
},
|
|
16459
|
-
children: jsx(AlertBanner, {
|
|
16460
|
-
info: jsx(Fragment, {
|
|
16461
|
-
children: areaError.map(function (error, errorIndex) {
|
|
16462
|
-
return (
|
|
16463
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
16464
|
-
jsx("div", {
|
|
16465
|
-
children: error.message
|
|
16466
|
-
}, errorIndex)
|
|
16467
|
-
);
|
|
16468
|
-
})
|
|
16469
|
-
}),
|
|
16470
|
-
severity: "error",
|
|
16471
|
-
title: t('warning-event-validation-warning-incomplete')
|
|
16472
|
-
})
|
|
16473
|
-
}), jsx(WarningsMapView, {
|
|
16474
|
-
clickOnFeature: clickOnFeature,
|
|
16297
|
+
children: [jsx(WarningsMapView, {
|
|
16475
16298
|
defaultMapPreset: defaultMapPreset,
|
|
16476
|
-
geojsonFeature:
|
|
16477
|
-
hoverSelect: hoverSelect,
|
|
16299
|
+
geojsonFeature: (warningAreas == null || (_warningAreas$4 = warningAreas[0]) == null ? void 0 : _warningAreas$4.geoJSON) || undefined,
|
|
16478
16300
|
isSnapshot: isSnapshot,
|
|
16479
16301
|
showMapMousePosition: false,
|
|
16480
16302
|
size: {
|
|
@@ -16486,7 +16308,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16486
16308
|
// Only show drawing loader on first warning
|
|
16487
16309
|
index === 0 && jsx(CustomIconButton, {
|
|
16488
16310
|
isSelected: false,
|
|
16489
|
-
onClick:
|
|
16311
|
+
onClick: function onClick() {},
|
|
16490
16312
|
sx: {
|
|
16491
16313
|
position: 'absolute',
|
|
16492
16314
|
left: 8,
|
|
@@ -16498,9 +16320,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16498
16320
|
children: jsx(Polygons, {})
|
|
16499
16321
|
}), jsx(CustomIconButton, {
|
|
16500
16322
|
isSelected: false,
|
|
16501
|
-
onClick: function onClick(
|
|
16502
|
-
return setMenuMapAnchorEl(e.currentTarget);
|
|
16503
|
-
},
|
|
16323
|
+
onClick: function onClick() {},
|
|
16504
16324
|
sx: {
|
|
16505
16325
|
position: 'absolute',
|
|
16506
16326
|
left: 8,
|
|
@@ -16510,67 +16330,6 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16510
16330
|
tooltipTitle: t('warning-event-button-assign-object'),
|
|
16511
16331
|
variant: "tool",
|
|
16512
16332
|
children: jsx(Cube, {})
|
|
16513
|
-
}), jsx(Popover, {
|
|
16514
|
-
anchorEl: menuMapAnchorEl,
|
|
16515
|
-
anchorOrigin: {
|
|
16516
|
-
vertical: 'bottom',
|
|
16517
|
-
horizontal: 'left'
|
|
16518
|
-
},
|
|
16519
|
-
onClose: function onClose() {
|
|
16520
|
-
return setMenuMapAnchorEl(null);
|
|
16521
|
-
},
|
|
16522
|
-
open: Boolean(menuMapAnchorEl),
|
|
16523
|
-
transformOrigin: {
|
|
16524
|
-
vertical: 'top',
|
|
16525
|
-
horizontal: 'left'
|
|
16526
|
-
},
|
|
16527
|
-
children: jsxs(Box, {
|
|
16528
|
-
sx: {
|
|
16529
|
-
padding: 1
|
|
16530
|
-
},
|
|
16531
|
-
children: [jsx(Typography, {
|
|
16532
|
-
sx: {
|
|
16533
|
-
fontSize: 12,
|
|
16534
|
-
fontWeight: 500,
|
|
16535
|
-
padding: 1
|
|
16536
|
-
},
|
|
16537
|
-
children: t('warning-event-objects-menu-title')
|
|
16538
|
-
}), features.length > 0 ? jsx(RadioGroup, {
|
|
16539
|
-
name: "warnings." + index + ".areas",
|
|
16540
|
-
onChange: function onChange(_event, value) {
|
|
16541
|
-
onAssignFeature(value);
|
|
16542
|
-
setMenuMapAnchorEl(null);
|
|
16543
|
-
},
|
|
16544
|
-
sx: {
|
|
16545
|
-
paddingX: 1
|
|
16546
|
-
},
|
|
16547
|
-
value: assignedFeatureId != null ? assignedFeatureId : '',
|
|
16548
|
-
children: features.map(function (feature, featureIndex) {
|
|
16549
|
-
var _feature$properties2;
|
|
16550
|
-
return jsx(FormControlLabel, {
|
|
16551
|
-
control: jsx(Radio, {
|
|
16552
|
-
size: "small"
|
|
16553
|
-
}),
|
|
16554
|
-
label: (feature == null || (_feature$properties2 = feature.properties) == null ? void 0 : _feature$properties2.objectName) || t('area-drawing-manager-object-name', {
|
|
16555
|
-
number: featureIndex + 1
|
|
16556
|
-
}),
|
|
16557
|
-
slotProps: {
|
|
16558
|
-
typography: {
|
|
16559
|
-
sx: {
|
|
16560
|
-
fontSize: 14
|
|
16561
|
-
}
|
|
16562
|
-
}
|
|
16563
|
-
},
|
|
16564
|
-
value: String(feature.id)
|
|
16565
|
-
}, String(feature.id));
|
|
16566
|
-
})
|
|
16567
|
-
}) : jsx(Typography, {
|
|
16568
|
-
sx: {
|
|
16569
|
-
padding: 1
|
|
16570
|
-
},
|
|
16571
|
-
children: t('warning-event-objects-menu-no-objects')
|
|
16572
|
-
})]
|
|
16573
|
-
})
|
|
16574
16333
|
})]
|
|
16575
16334
|
})]
|
|
16576
16335
|
}), !!mapTitle && jsx(Box, {
|
|
@@ -16609,7 +16368,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16609
16368
|
height: '100%'
|
|
16610
16369
|
},
|
|
16611
16370
|
children: [jsx(CustomIconButton, {
|
|
16612
|
-
disabled:
|
|
16371
|
+
disabled: readOnlyWarning,
|
|
16613
16372
|
isSelected: false,
|
|
16614
16373
|
onClick: function onClick() {},
|
|
16615
16374
|
sx: {
|
|
@@ -16619,7 +16378,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16619
16378
|
variant: "flat",
|
|
16620
16379
|
children: jsx(DrawPolygon, {})
|
|
16621
16380
|
}), jsx(CustomIconButton, {
|
|
16622
|
-
disabled:
|
|
16381
|
+
disabled: readOnlyWarning,
|
|
16623
16382
|
isSelected: false,
|
|
16624
16383
|
onClick: function onClick() {},
|
|
16625
16384
|
sx: {
|
|
@@ -16651,19 +16410,6 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16651
16410
|
})
|
|
16652
16411
|
})]
|
|
16653
16412
|
})]
|
|
16654
|
-
}), jsx(ReactHookFormHiddenInput, {
|
|
16655
|
-
name: "warnings." + index + ".areas",
|
|
16656
|
-
rules: {
|
|
16657
|
-
validate: {
|
|
16658
|
-
isRequired: function isRequired(value) {
|
|
16659
|
-
return isDraft() || hasAreaData(value) ? true : t('warning-event-validation-area-missing');
|
|
16660
|
-
},
|
|
16661
|
-
isPolygonalFeature: function isPolygonalFeature$1(value) {
|
|
16662
|
-
var _value$;
|
|
16663
|
-
return !hasAreaData(value) || isPolygonalFeature(value == null || (_value$ = value[0]) == null || (_value$ = _value$.geoJSON) == null || (_value$ = _value$.features) == null ? void 0 : _value$[0]) ? true : t('warning-event-validation-area-non-polygon');
|
|
16664
|
-
}
|
|
16665
|
-
}
|
|
16666
|
-
}
|
|
16667
16413
|
}), jsx(ReactHookFormHiddenInput, {
|
|
16668
16414
|
name: "warnings." + index + ".validFrom",
|
|
16669
16415
|
rules: {
|
|
@@ -16714,8 +16460,8 @@ var WarningEventItem = function WarningEventItem(_ref) {
|
|
|
16714
16460
|
};
|
|
16715
16461
|
|
|
16716
16462
|
var SUMMARY_HEADLINE_LIMIT = 150;
|
|
16717
|
-
var SUMMARY_CONCISE_SUMMARY_LIMIT =
|
|
16718
|
-
var SUMMARY_DESCRIPTION_LIMIT =
|
|
16463
|
+
var SUMMARY_CONCISE_SUMMARY_LIMIT = 500;
|
|
16464
|
+
var SUMMARY_DESCRIPTION_LIMIT = 1500;
|
|
16719
16465
|
var SUMMARY_TEXT_FIELDS = ['headlineOriginal', 'headlineTranslation', 'conciseSummaryOriginal', 'conciseSummaryTranslation', 'descriptionOriginal', 'descriptionTranslation'];
|
|
16720
16466
|
var RemainingChars = function RemainingChars(_ref) {
|
|
16721
16467
|
var _useWatch;
|
|
@@ -17034,7 +16780,7 @@ var WarningEventSummaryForm = function WarningEventSummaryForm(_ref2) {
|
|
|
17034
16780
|
textTransform: 'none',
|
|
17035
16781
|
fontSize: '12px'
|
|
17036
16782
|
},
|
|
17037
|
-
title: t('warning-event-summary-dialog-clear-button
|
|
16783
|
+
title: t('warning-event-summary-dialog-clear-button'),
|
|
17038
16784
|
variant: "tertiary",
|
|
17039
16785
|
children: t('warning-event-summary-dialog-clear-button')
|
|
17040
16786
|
}), jsx(Button, {
|
|
@@ -17043,7 +16789,7 @@ var WarningEventSummaryForm = function WarningEventSummaryForm(_ref2) {
|
|
|
17043
16789
|
textTransform: 'none',
|
|
17044
16790
|
fontSize: '12px'
|
|
17045
16791
|
},
|
|
17046
|
-
title: t('warning-event-summary-dialog-OK-button
|
|
16792
|
+
title: t('warning-event-summary-dialog-OK-button'),
|
|
17047
16793
|
variant: "primary",
|
|
17048
16794
|
children: t('warning-event-summary-dialog-OK-button')
|
|
17049
16795
|
})]
|
|
@@ -17090,8 +16836,6 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
|
|
|
17090
16836
|
isDefaultCollapsed = _ref$isDefaultCollaps === void 0 ? false : _ref$isDefaultCollaps,
|
|
17091
16837
|
_ref$onCancel = _ref.onCancel,
|
|
17092
16838
|
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
|
|
17093
|
-
_ref$onAddDrawing = _ref.onAddDrawing,
|
|
17094
|
-
onAddDrawing = _ref$onAddDrawing === void 0 ? function () {} : _ref$onAddDrawing,
|
|
17095
16839
|
_ref$onChangeFormMode = _ref.onChangeFormMode,
|
|
17096
16840
|
onChangeFormMode = _ref$onChangeFormMode === void 0 ? function () {} : _ref$onChangeFormMode,
|
|
17097
16841
|
_ref$onDelete = _ref.onDelete,
|
|
@@ -17130,7 +16874,6 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
|
|
|
17130
16874
|
}()) : _ref$onPublish,
|
|
17131
16875
|
_ref$isSummaryDialogO = _ref.isSummaryDialogOpen,
|
|
17132
16876
|
isSummaryDialogOpen = _ref$isSummaryDialogO === void 0 ? false : _ref$isSummaryDialogO,
|
|
17133
|
-
selectedDrawing = _ref.selectedDrawing,
|
|
17134
16877
|
selectedEvent = _ref.selectedEvent;
|
|
17135
16878
|
var _useWarningsTranslati = useWarningsTranslation(),
|
|
17136
16879
|
t = _useWarningsTranslati.t;
|
|
@@ -17194,38 +16937,26 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
|
|
|
17194
16937
|
React.useEffect(function () {
|
|
17195
16938
|
// sync redux with react-hook-form
|
|
17196
16939
|
reset(getFormData(selectedEvent));
|
|
16940
|
+
// TODO once we implement areas
|
|
16941
|
+
// setOriginalWarningAreas(publicWarningDetails?.areas);
|
|
17197
16942
|
}, [eventId, reset, selectedEvent]);
|
|
17198
16943
|
// When the editor gets set back to viewer and the form is dirty, reset any changes made
|
|
17199
16944
|
React.useEffect(function () {
|
|
17200
|
-
if (isReadOnly && Object.keys(dirtyFields).length > 0
|
|
17201
|
-
|
|
16945
|
+
if (isReadOnly && Object.keys(dirtyFields).length > 0
|
|
16946
|
+
// TODO once we implement areas
|
|
16947
|
+
// ||selectedEvent?.areas !== originalWarningAreas)
|
|
16948
|
+
) {
|
|
16949
|
+
// // sync redux with react-hook-form
|
|
16950
|
+
var oldEvent = Object.assign({}, selectedEvent);
|
|
16951
|
+
reset(getFormData(oldEvent));
|
|
16952
|
+
// TODO once we implement areas
|
|
16953
|
+
// if (publicWarningDetails?.areas !== originalWarningAreas) {
|
|
16954
|
+
// // update the store to contain the original area again
|
|
16955
|
+
// onSetViewModeResetArea(originalWarningAreas || []);
|
|
16956
|
+
// }
|
|
17202
16957
|
}
|
|
17203
16958
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17204
16959
|
}, [isReadOnly]);
|
|
17205
|
-
// Apply a drawing picked in the Area & Drawing Loader to the form
|
|
17206
|
-
React.useEffect(function () {
|
|
17207
|
-
var _getValues, _getValues2;
|
|
17208
|
-
if (((_getValues = getValues('selectedDrawing')) == null ? void 0 : _getValues.id) === (selectedDrawing == null ? void 0 : selectedDrawing.id)) {
|
|
17209
|
-
return;
|
|
17210
|
-
}
|
|
17211
|
-
setValue('selectedDrawing', selectedDrawing, {
|
|
17212
|
-
shouldDirty: true
|
|
17213
|
-
});
|
|
17214
|
-
// the areas of all warnings belong to the previous drawing, clear them.
|
|
17215
|
-
// Finalised (expired/withdrawn) warnings are read-only, keep their areas
|
|
17216
|
-
var currentEventStatus = getValues('status');
|
|
17217
|
-
((_getValues2 = getValues('warnings')) != null ? _getValues2 : []).forEach(function (warning, warningIndex) {
|
|
17218
|
-
var _warning$status;
|
|
17219
|
-
if (isWarningFinalised({
|
|
17220
|
-
status: (_warning$status = warning.status) != null ? _warning$status : currentEventStatus
|
|
17221
|
-
})) {
|
|
17222
|
-
return;
|
|
17223
|
-
}
|
|
17224
|
-
setValue("warnings." + warningIndex + ".areas", [], {
|
|
17225
|
-
shouldDirty: true
|
|
17226
|
-
});
|
|
17227
|
-
});
|
|
17228
|
-
}, [selectedDrawing, setValue, getValues]);
|
|
17229
16960
|
var warningEventType = useWatch({
|
|
17230
16961
|
control: control,
|
|
17231
16962
|
name: 'warningEventType'
|
|
@@ -17297,9 +17028,9 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
|
|
|
17297
17028
|
deleteCount = _React$useState5[0],
|
|
17298
17029
|
setDeleteCount = _React$useState5[1];
|
|
17299
17030
|
var onAddWarning = function onAddWarning() {
|
|
17300
|
-
var
|
|
17031
|
+
var _getValues;
|
|
17301
17032
|
var newWarning = buildDefaultWarningItem(getValues());
|
|
17302
|
-
var firstFinalisedIndex = ((
|
|
17033
|
+
var firstFinalisedIndex = ((_getValues = getValues('warnings')) != null ? _getValues : []).findIndex(isWarningFinalised);
|
|
17303
17034
|
if (firstFinalisedIndex === -1) {
|
|
17304
17035
|
append(newWarning);
|
|
17305
17036
|
return;
|
|
@@ -17314,11 +17045,11 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
|
|
|
17314
17045
|
};
|
|
17315
17046
|
// re-validate after the removal commits, react-hook-form shifts errors up
|
|
17316
17047
|
React.useEffect(function () {
|
|
17317
|
-
var
|
|
17048
|
+
var _getValues2;
|
|
17318
17049
|
if (!deleteCount) {
|
|
17319
17050
|
return;
|
|
17320
17051
|
}
|
|
17321
|
-
var remainingWarnings = (
|
|
17052
|
+
var remainingWarnings = (_getValues2 = getValues('warnings')) != null ? _getValues2 : [];
|
|
17322
17053
|
remainingWarnings.forEach(function (_warning, index) {
|
|
17323
17054
|
void trigger("warnings." + index + ".validUntil");
|
|
17324
17055
|
});
|
|
@@ -17422,6 +17153,7 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
|
|
|
17422
17153
|
var onChangeMode = function onChangeMode() {
|
|
17423
17154
|
onChangeFormMode(!isReadOnly);
|
|
17424
17155
|
};
|
|
17156
|
+
// Until we implement the full validation, set every field to be required when publishing
|
|
17425
17157
|
var _useDraftFormHelpers2 = useDraftFormHelpers(),
|
|
17426
17158
|
_isRequired = _useDraftFormHelpers2.isRequired;
|
|
17427
17159
|
var disabledWarningDeleteButton = fields.length <= 1;
|
|
@@ -17755,13 +17487,11 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
|
|
|
17755
17487
|
isDeleteButtonDisabled: disabledWarningDeleteButton,
|
|
17756
17488
|
isReadOnly: isReadOnly,
|
|
17757
17489
|
isSnapshot: isSnapshot,
|
|
17758
|
-
onAddDrawing: onAddDrawing,
|
|
17759
17490
|
onDeleteWarning: onDeleteWarning,
|
|
17760
17491
|
onExpireWithdraw: onExpireWithdraw,
|
|
17761
17492
|
onToggleCompact: function onToggleCompact() {
|
|
17762
17493
|
return toggleCompact(field.id);
|
|
17763
|
-
}
|
|
17764
|
-
selectedDrawing: selectedDrawing
|
|
17494
|
+
}
|
|
17765
17495
|
})
|
|
17766
17496
|
}, field.id);
|
|
17767
17497
|
})
|
|
@@ -18068,11 +17798,8 @@ var WarningEventFormDialogContent = function WarningEventFormDialogContent(_ref)
|
|
|
18068
17798
|
size = _ref.size,
|
|
18069
17799
|
source = _ref.source,
|
|
18070
17800
|
startPosition = _ref.startPosition,
|
|
18071
|
-
selectedDrawing = _ref.selectedDrawing,
|
|
18072
17801
|
onClose = _ref.onClose,
|
|
18073
17802
|
onMouseDown = _ref.onMouseDown,
|
|
18074
|
-
_ref$onAddDrawing = _ref.onAddDrawing,
|
|
18075
|
-
onAddDrawing = _ref$onAddDrawing === void 0 ? function () {} : _ref$onAddDrawing,
|
|
18076
17803
|
_ref$onChangeFormMode = _ref.onChangeFormMode,
|
|
18077
17804
|
onChangeFormMode = _ref$onChangeFormMode === void 0 ? function () {} : _ref$onChangeFormMode,
|
|
18078
17805
|
_ref$onDelete = _ref.onDelete,
|
|
@@ -18177,7 +17904,6 @@ var WarningEventFormDialogContent = function WarningEventFormDialogContent(_ref)
|
|
|
18177
17904
|
isReadOnly: isReadOnly,
|
|
18178
17905
|
isSnapshot: isSnapshot,
|
|
18179
17906
|
isSummaryDialogOpen: isSummaryOpen,
|
|
18180
|
-
onAddDrawing: onAddDrawing,
|
|
18181
17907
|
onCancel: closeDialog,
|
|
18182
17908
|
onChangeFormMode: onChangeFormMode,
|
|
18183
17909
|
onDelete: onDelete,
|
|
@@ -18185,7 +17911,6 @@ var WarningEventFormDialogContent = function WarningEventFormDialogContent(_ref)
|
|
|
18185
17911
|
onOpenWarningSummary: onOpenSummary,
|
|
18186
17912
|
onPublish: onPublish,
|
|
18187
17913
|
onSaveDraft: onSaveDraft,
|
|
18188
|
-
selectedDrawing: selectedDrawing,
|
|
18189
17914
|
selectedEvent: selectedEvent,
|
|
18190
17915
|
shouldHideFormToggleMode: shouldHideFormToggleMode
|
|
18191
17916
|
})
|
|
@@ -18223,6 +17948,40 @@ var WarningEventFormDialog = function WarningEventFormDialog(_ref5) {
|
|
|
18223
17948
|
});
|
|
18224
17949
|
};
|
|
18225
17950
|
|
|
17951
|
+
/* *
|
|
17952
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
17953
|
+
* you may not use this file except in compliance with the License.
|
|
17954
|
+
* You may obtain a copy of the License at
|
|
17955
|
+
*
|
|
17956
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17957
|
+
*
|
|
17958
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17959
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17960
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17961
|
+
* See the License for the specific language governing permissions and
|
|
17962
|
+
* limitations under the License.
|
|
17963
|
+
*
|
|
17964
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
17965
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
17966
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
17967
|
+
* */
|
|
17968
|
+
var EMPTY_WARNINGS_EVENT_FORM_STATE = {};
|
|
17969
|
+
var selectWarningsEventFormState = function selectWarningsEventFormState(store) {
|
|
17970
|
+
if (store != null && store.warningsEventForm) {
|
|
17971
|
+
return store.warningsEventForm;
|
|
17972
|
+
}
|
|
17973
|
+
return EMPTY_WARNINGS_EVENT_FORM_STATE;
|
|
17974
|
+
};
|
|
17975
|
+
var getWarningEvent = createSelector(selectWarningsEventFormState, function (store) {
|
|
17976
|
+
return store == null ? void 0 : store.event;
|
|
17977
|
+
});
|
|
17978
|
+
var getSelectedEventId = createSelector(selectWarningsEventFormState, function (store) {
|
|
17979
|
+
return (store == null ? void 0 : store.selectedEventId) || '';
|
|
17980
|
+
});
|
|
17981
|
+
var getWarningsEventIsFormDirty = createSelector(selectWarningsEventFormState, function (store) {
|
|
17982
|
+
return (store == null ? void 0 : store.isFormDirty) || false;
|
|
17983
|
+
});
|
|
17984
|
+
|
|
18226
17985
|
var _excluded$4 = ["expandedSections", "hoveredWarningIds", "hiddenWarningIds"];
|
|
18227
17986
|
var getWarningsFilters = function getWarningsFilters(store) {
|
|
18228
17987
|
if (store != null && store.warningsFilters) {
|
|
@@ -18299,7 +18058,6 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
|
|
|
18299
18058
|
var selectedEventId = useSelector(getSelectedEventId);
|
|
18300
18059
|
var previousSelectedEventId = usePrevious(selectedEventId);
|
|
18301
18060
|
var isFormDirty = useSelector(getWarningsEventIsFormDirty);
|
|
18302
|
-
var selectedDrawing = useSelector(getWarningsEventSelectedDrawing);
|
|
18303
18061
|
var savedFilterState = useSelector(getWarningsFilterById);
|
|
18304
18062
|
var eventState = useSelector(getWarningEvent);
|
|
18305
18063
|
var _ref2 = eventState || {},
|
|
@@ -18348,12 +18106,6 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
|
|
|
18348
18106
|
}));
|
|
18349
18107
|
onCloseDialogSummary();
|
|
18350
18108
|
};
|
|
18351
|
-
var closeAreaDrawingLoader = function closeAreaDrawingLoader() {
|
|
18352
|
-
dispatch(uiActions.setToggleOpenDialog({
|
|
18353
|
-
type: uiTypes.DialogTypes.AreaDrawingLoader,
|
|
18354
|
-
setOpen: false
|
|
18355
|
-
}));
|
|
18356
|
-
};
|
|
18357
18109
|
var onFormDirty = function onFormDirty(isFormDirty) {
|
|
18358
18110
|
dispatch(warningsEventFormActions.setFormDirty({
|
|
18359
18111
|
isFormDirty: isFormDirty
|
|
@@ -18539,7 +18291,6 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
|
|
|
18539
18291
|
dispatch(warningsEventFormActions.setFormValues({
|
|
18540
18292
|
formState: isReadOnly ? 'readonly' : ''
|
|
18541
18293
|
}));
|
|
18542
|
-
closeAreaDrawingLoader();
|
|
18543
18294
|
case 1:
|
|
18544
18295
|
return _context5.a(2);
|
|
18545
18296
|
}
|
|
@@ -18597,12 +18348,6 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
|
|
|
18597
18348
|
void setIsEditor(isReadOnly);
|
|
18598
18349
|
}
|
|
18599
18350
|
};
|
|
18600
|
-
var onAddDrawing = function onAddDrawing() {
|
|
18601
|
-
dispatch(uiActions.setToggleOpenDialog({
|
|
18602
|
-
type: uiTypes.DialogTypes.AreaDrawingLoader,
|
|
18603
|
-
setOpen: true
|
|
18604
|
-
}));
|
|
18605
|
-
};
|
|
18606
18351
|
// Readonly in case you are not creating a new warning and you are not set as the editor
|
|
18607
18352
|
var isReadOnly = formState === 'readonly' || !isEditor && status !== undefined;
|
|
18608
18353
|
// Remove any errors when switching events
|
|
@@ -18621,13 +18366,11 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
|
|
|
18621
18366
|
isOpen: isDialogOpen,
|
|
18622
18367
|
isReadOnly: isReadOnly,
|
|
18623
18368
|
isSummaryOpen: isDialogOpenSummary,
|
|
18624
|
-
onAddDrawing: onAddDrawing,
|
|
18625
18369
|
onAddSummary: onAddSummary,
|
|
18626
18370
|
onChangeFormMode: onChangeFormMode,
|
|
18627
18371
|
onClose: function onClose() {
|
|
18628
|
-
onCloseDialogSummary();
|
|
18629
|
-
closeAreaDrawingLoader();
|
|
18630
18372
|
onCloseDialog();
|
|
18373
|
+
onCloseDialogSummary();
|
|
18631
18374
|
},
|
|
18632
18375
|
onCloseSummary: onCloseDialogSummary,
|
|
18633
18376
|
onDelete: onDeleteDraft,
|
|
@@ -18638,7 +18381,6 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
|
|
|
18638
18381
|
onPublish: onPublishForm,
|
|
18639
18382
|
onSaveDraft: onSaveDraft,
|
|
18640
18383
|
order: dialogOrder,
|
|
18641
|
-
selectedDrawing: selectedDrawing,
|
|
18642
18384
|
selectedEvent: event,
|
|
18643
18385
|
shouldHideFormToggleMode: shouldHideFormToggleMode,
|
|
18644
18386
|
size: size,
|
|
@@ -20208,6 +19950,7 @@ var ExpandableFilterChip = function ExpandableFilterChip(_ref) {
|
|
|
20208
19950
|
};
|
|
20209
19951
|
|
|
20210
19952
|
var TimeFilterChip = function TimeFilterChip(_ref) {
|
|
19953
|
+
var _getPickerValue;
|
|
20211
19954
|
var timeFilter = _ref.timeFilter,
|
|
20212
19955
|
onUpdateTimeFilter = _ref.onUpdateTimeFilter;
|
|
20213
19956
|
var _useWarningsTranslati = useWarningsTranslation(),
|
|
@@ -20238,6 +19981,7 @@ var TimeFilterChip = function TimeFilterChip(_ref) {
|
|
|
20238
19981
|
onUpdateTimeFilter(newFilter);
|
|
20239
19982
|
};
|
|
20240
19983
|
var handleTempTimeChange = function handleTempTimeChange(field, value) {
|
|
19984
|
+
var _dateUtils$setUTCDate;
|
|
20241
19985
|
if (!value) {
|
|
20242
19986
|
if (field === 'customStart') {
|
|
20243
19987
|
setTempCustomStart(undefined);
|
|
@@ -20246,13 +19990,20 @@ var TimeFilterChip = function TimeFilterChip(_ref) {
|
|
|
20246
19990
|
}
|
|
20247
19991
|
return;
|
|
20248
19992
|
}
|
|
20249
|
-
var isoString = value.toISOString();
|
|
19993
|
+
var isoString = (_dateUtils$setUTCDate = dateUtils.setUTCDate(value)) == null ? void 0 : _dateUtils$setUTCDate.toISOString();
|
|
20250
19994
|
if (field === 'customStart') {
|
|
20251
19995
|
setTempCustomStart(isoString);
|
|
20252
19996
|
} else {
|
|
20253
19997
|
setTempCustomEnd(isoString);
|
|
20254
19998
|
}
|
|
20255
19999
|
};
|
|
20000
|
+
var getPickerValue = function getPickerValue(isoString) {
|
|
20001
|
+
if (!isoString) {
|
|
20002
|
+
return null;
|
|
20003
|
+
}
|
|
20004
|
+
var utc = new Date(isoString);
|
|
20005
|
+
return new Date(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate(), utc.getUTCHours(), utc.getUTCMinutes());
|
|
20006
|
+
};
|
|
20256
20007
|
var handleApply = function handleApply() {
|
|
20257
20008
|
onUpdateTimeFilter({
|
|
20258
20009
|
mode: TimeFilterMode.custom,
|
|
@@ -20405,51 +20156,88 @@ var TimeFilterChip = function TimeFilterChip(_ref) {
|
|
|
20405
20156
|
flexDirection: 'column',
|
|
20406
20157
|
gap: 2
|
|
20407
20158
|
},
|
|
20408
|
-
children: [jsxs(
|
|
20409
|
-
|
|
20410
|
-
|
|
20411
|
-
justifyContent: 'space-between',
|
|
20412
|
-
alignItems: 'center'
|
|
20413
|
-
},
|
|
20414
|
-
children: [jsx(Typography, {
|
|
20159
|
+
children: [jsxs(LocalizationProvider, {
|
|
20160
|
+
dateAdapter: AdapterDateFns,
|
|
20161
|
+
children: [jsxs(Box, {
|
|
20415
20162
|
sx: {
|
|
20416
|
-
|
|
20417
|
-
|
|
20418
|
-
|
|
20419
|
-
}), jsx(DateTimePicker, {
|
|
20420
|
-
label: t('filter-choose-date-time'),
|
|
20421
|
-
onChange: function onChange(value) {
|
|
20422
|
-
return handleTempTimeChange('customStart', value);
|
|
20423
|
-
},
|
|
20424
|
-
slotProps: {
|
|
20425
|
-
field: {
|
|
20426
|
-
clearable: true
|
|
20427
|
-
}
|
|
20163
|
+
display: 'flex',
|
|
20164
|
+
justifyContent: 'space-between',
|
|
20165
|
+
alignItems: 'center'
|
|
20428
20166
|
},
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
|
|
20167
|
+
children: [jsx(Typography, {
|
|
20168
|
+
sx: {
|
|
20169
|
+
mr: 1
|
|
20170
|
+
},
|
|
20171
|
+
children: t('filter-start')
|
|
20172
|
+
}), jsx(DateTimePicker, {
|
|
20173
|
+
ampm: false,
|
|
20174
|
+
format: dateUtils.DATE_FORMAT_DATEPICKER,
|
|
20175
|
+
label: t('filter-choose-date-time'),
|
|
20176
|
+
onChange: function onChange(value) {
|
|
20177
|
+
return handleTempTimeChange('customStart', value);
|
|
20178
|
+
},
|
|
20179
|
+
slotProps: {
|
|
20180
|
+
textField: {
|
|
20181
|
+
variant: 'filled',
|
|
20182
|
+
slotProps: {
|
|
20183
|
+
input: {
|
|
20184
|
+
endAdornment: jsx(InputAdornment, {
|
|
20185
|
+
position: "end",
|
|
20186
|
+
children: "UTC"
|
|
20187
|
+
})
|
|
20188
|
+
}
|
|
20189
|
+
}
|
|
20190
|
+
},
|
|
20191
|
+
field: {
|
|
20192
|
+
clearable: true,
|
|
20193
|
+
openPickerButtonPosition: 'start'
|
|
20194
|
+
}
|
|
20195
|
+
},
|
|
20196
|
+
timeSteps: {
|
|
20197
|
+
minutes: 1
|
|
20198
|
+
},
|
|
20199
|
+
value: (_getPickerValue = getPickerValue(pickerStartValue)) != null ? _getPickerValue : new Date(Date.now())
|
|
20200
|
+
})]
|
|
20201
|
+
}), jsxs(Box, {
|
|
20438
20202
|
sx: {
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20442
|
-
}), jsx(DateTimePicker, {
|
|
20443
|
-
label: t('filter-choose-date-time'),
|
|
20444
|
-
onChange: function onChange(value) {
|
|
20445
|
-
return handleTempTimeChange('customEnd', value);
|
|
20446
|
-
},
|
|
20447
|
-
slotProps: {
|
|
20448
|
-
field: {
|
|
20449
|
-
clearable: true
|
|
20450
|
-
}
|
|
20203
|
+
display: 'flex',
|
|
20204
|
+
justifyContent: 'space-between',
|
|
20205
|
+
alignItems: 'center'
|
|
20451
20206
|
},
|
|
20452
|
-
|
|
20207
|
+
children: [jsx(Typography, {
|
|
20208
|
+
sx: {
|
|
20209
|
+
mr: 1
|
|
20210
|
+
},
|
|
20211
|
+
children: t('filter-end')
|
|
20212
|
+
}), jsx(DateTimePicker, {
|
|
20213
|
+
ampm: false,
|
|
20214
|
+
format: dateUtils.DATE_FORMAT_DATEPICKER,
|
|
20215
|
+
label: t('filter-choose-date-time'),
|
|
20216
|
+
onChange: function onChange(value) {
|
|
20217
|
+
return handleTempTimeChange('customEnd', value);
|
|
20218
|
+
},
|
|
20219
|
+
slotProps: {
|
|
20220
|
+
textField: {
|
|
20221
|
+
variant: 'filled',
|
|
20222
|
+
slotProps: {
|
|
20223
|
+
input: {
|
|
20224
|
+
endAdornment: jsx(InputAdornment, {
|
|
20225
|
+
position: "end",
|
|
20226
|
+
children: "UTC"
|
|
20227
|
+
})
|
|
20228
|
+
}
|
|
20229
|
+
}
|
|
20230
|
+
},
|
|
20231
|
+
field: {
|
|
20232
|
+
clearable: true,
|
|
20233
|
+
openPickerButtonPosition: 'start'
|
|
20234
|
+
}
|
|
20235
|
+
},
|
|
20236
|
+
timeSteps: {
|
|
20237
|
+
minutes: 1
|
|
20238
|
+
},
|
|
20239
|
+
value: getPickerValue(pickerEndValue)
|
|
20240
|
+
})]
|
|
20453
20241
|
})]
|
|
20454
20242
|
}), jsx(Box, {
|
|
20455
20243
|
sx: {
|
|
@@ -21094,19 +20882,12 @@ var getSelectedFormAreaIds = function getSelectedFormAreaIds(selectedFormWarning
|
|
|
21094
20882
|
return Boolean(areaId);
|
|
21095
20883
|
}));
|
|
21096
20884
|
};
|
|
21097
|
-
var isAviationWarning = function isAviationWarning(warning) {
|
|
21098
|
-
return (warning == null ? void 0 : warning.type) === 'airmet' || (warning == null ? void 0 : warning.type) === 'sigmet';
|
|
21099
|
-
};
|
|
21100
|
-
var isUnsavedAviationCopy = function isUnsavedAviationCopy(warning) {
|
|
21101
|
-
return isAviationWarning(warning) && Boolean(warning.id) && warning.sigmetAirmetDetails.uuid === undefined;
|
|
21102
|
-
};
|
|
21103
20885
|
var shouldExcludeWarningFromFeatureSync = function shouldExcludeWarningFromFeatureSync(_ref) {
|
|
21104
20886
|
var hiddenWarningIds = _ref.hiddenWarningIds,
|
|
21105
20887
|
hasMatchingAreaId = _ref.hasMatchingAreaId,
|
|
21106
20888
|
selectedWarningId = _ref.selectedWarningId,
|
|
21107
|
-
warningIds = _ref.warningIds
|
|
21108
|
-
|
|
21109
|
-
return !isUnsavedAviationCopy(selectedFormWarning) && (warningIds.includes(selectedWarningId != null ? selectedWarningId : '') || hasMatchingAreaId) || warningIds.some(function (warningId) {
|
|
20889
|
+
warningIds = _ref.warningIds;
|
|
20890
|
+
return warningIds.includes(selectedWarningId != null ? selectedWarningId : '') || hasMatchingAreaId || warningIds.some(function (warningId) {
|
|
21110
20891
|
return hiddenWarningIds.has(warningId);
|
|
21111
20892
|
});
|
|
21112
20893
|
};
|
|
@@ -21172,7 +20953,6 @@ var useWarningListFeatureSync = function useWarningListFeatureSync(_ref) {
|
|
|
21172
20953
|
if (shouldExcludeWarningFromFeatureSync({
|
|
21173
20954
|
hiddenWarningIds: hiddenWarningIds,
|
|
21174
20955
|
hasMatchingAreaId: hasMatchingAreaId,
|
|
21175
|
-
selectedFormWarning: selectedFormWarning,
|
|
21176
20956
|
selectedWarningId: selectedWarningId,
|
|
21177
20957
|
warningIds: warningIds
|
|
21178
20958
|
})) {
|
|
@@ -21196,7 +20976,7 @@ var useWarningListFeatureSync = function useWarningListFeatureSync(_ref) {
|
|
|
21196
20976
|
}).filter(function (feature) {
|
|
21197
20977
|
return !!feature.id;
|
|
21198
20978
|
});
|
|
21199
|
-
}, [filteredWarningsByExpandedSections, hiddenWarningIds, selectedFormAreaIds,
|
|
20979
|
+
}, [filteredWarningsByExpandedSections, hiddenWarningIds, selectedFormAreaIds, selectedWarningId]);
|
|
21200
20980
|
useRegisterFeatureSyncSource(panelId);
|
|
21201
20981
|
var warningFeatureCollection = React.useMemo(function () {
|
|
21202
20982
|
return createWarningFeatureCollection(allFeatures);
|
|
@@ -23674,10 +23454,8 @@ var drawingListJSON = [
|
|
|
23674
23454
|
stroke: "#ff7800",
|
|
23675
23455
|
"stroke-width": 2,
|
|
23676
23456
|
"stroke-opacity": 1,
|
|
23677
|
-
selectionType: "poly"
|
|
23678
|
-
objectName: "Object 1"
|
|
23457
|
+
selectionType: "poly"
|
|
23679
23458
|
},
|
|
23680
|
-
id: "object-1",
|
|
23681
23459
|
geometry: {
|
|
23682
23460
|
type: "Polygon",
|
|
23683
23461
|
coordinates: [
|
|
@@ -23701,62 +23479,6 @@ var drawingListJSON = [
|
|
|
23701
23479
|
]
|
|
23702
23480
|
]
|
|
23703
23481
|
}
|
|
23704
|
-
},
|
|
23705
|
-
{
|
|
23706
|
-
type: "Feature",
|
|
23707
|
-
properties: {
|
|
23708
|
-
fill: "#ff7800",
|
|
23709
|
-
"fill-opacity": 0,
|
|
23710
|
-
stroke: "#ff7800",
|
|
23711
|
-
"stroke-width": 2,
|
|
23712
|
-
"stroke-opacity": 1,
|
|
23713
|
-
selectionType: "poly",
|
|
23714
|
-
objectName: "Object 2"
|
|
23715
|
-
},
|
|
23716
|
-
id: "object-2",
|
|
23717
|
-
geometry: {
|
|
23718
|
-
type: "Polygon",
|
|
23719
|
-
coordinates: [
|
|
23720
|
-
[
|
|
23721
|
-
[
|
|
23722
|
-
3.31519,
|
|
23723
|
-
52.58351
|
|
23724
|
-
],
|
|
23725
|
-
[
|
|
23726
|
-
4.43387,
|
|
23727
|
-
54.33682
|
|
23728
|
-
],
|
|
23729
|
-
[
|
|
23730
|
-
6.62875,
|
|
23731
|
-
54.20452
|
|
23732
|
-
],
|
|
23733
|
-
[
|
|
23734
|
-
5.58087,
|
|
23735
|
-
54.06348
|
|
23736
|
-
],
|
|
23737
|
-
[
|
|
23738
|
-
5.01445,
|
|
23739
|
-
53.08821
|
|
23740
|
-
],
|
|
23741
|
-
[
|
|
23742
|
-
5.18438,
|
|
23743
|
-
50.69441
|
|
23744
|
-
],
|
|
23745
|
-
[
|
|
23746
|
-
4.26395,
|
|
23747
|
-
52.36789
|
|
23748
|
-
],
|
|
23749
|
-
[
|
|
23750
|
-
3.48512,
|
|
23751
|
-
52.11643
|
|
23752
|
-
],
|
|
23753
|
-
[
|
|
23754
|
-
3.31519,
|
|
23755
|
-
52.58351
|
|
23756
|
-
]
|
|
23757
|
-
]
|
|
23758
|
-
]
|
|
23759
|
-
}
|
|
23760
23482
|
}
|
|
23761
23483
|
]
|
|
23762
23484
|
}
|
|
@@ -115036,7 +114758,7 @@ var warningEventsListJSON = [
|
|
|
115036
114758
|
status: "DRAFT_PUBLISHED",
|
|
115037
114759
|
areas: [
|
|
115038
114760
|
{
|
|
115039
|
-
objectName: "
|
|
114761
|
+
objectName: "low temp 1",
|
|
115040
114762
|
geoJSON: {
|
|
115041
114763
|
type: "FeatureCollection",
|
|
115042
114764
|
features: [
|
|
@@ -115072,10 +114794,8 @@ var warningEventsListJSON = [
|
|
|
115072
114794
|
"stroke-width": 2,
|
|
115073
114795
|
selectionType: "poly",
|
|
115074
114796
|
warning_level: "1",
|
|
115075
|
-
"stroke-opacity": 1
|
|
115076
|
-
|
|
115077
|
-
},
|
|
115078
|
-
id: "drawing-storm-ciaran-object-1"
|
|
114797
|
+
"stroke-opacity": 1
|
|
114798
|
+
}
|
|
115079
114799
|
}
|
|
115080
114800
|
]
|
|
115081
114801
|
}
|
|
@@ -115089,92 +114809,7 @@ var warningEventsListJSON = [
|
|
|
115089
114809
|
authority: "KNMI",
|
|
115090
114810
|
incident: "Storm Ciaran"
|
|
115091
114811
|
}
|
|
115092
|
-
]
|
|
115093
|
-
selectedDrawing: {
|
|
115094
|
-
id: "drawing-storm-ciaran",
|
|
115095
|
-
objectName: "Storm Ciaran areas",
|
|
115096
|
-
scope: "global",
|
|
115097
|
-
lastUpdatedTime: "2026-07-21T15:00:00Z",
|
|
115098
|
-
geoJSON: {
|
|
115099
|
-
type: "FeatureCollection",
|
|
115100
|
-
features: [
|
|
115101
|
-
{
|
|
115102
|
-
type: "Feature",
|
|
115103
|
-
geometry: {
|
|
115104
|
-
type: "Polygon",
|
|
115105
|
-
coordinates: [
|
|
115106
|
-
[
|
|
115107
|
-
[
|
|
115108
|
-
5.09504,
|
|
115109
|
-
53.492
|
|
115110
|
-
],
|
|
115111
|
-
[
|
|
115112
|
-
4.28015,
|
|
115113
|
-
52.46456
|
|
115114
|
-
],
|
|
115115
|
-
[
|
|
115116
|
-
6.87823,
|
|
115117
|
-
52.98133
|
|
115118
|
-
],
|
|
115119
|
-
[
|
|
115120
|
-
5.09504,
|
|
115121
|
-
53.492
|
|
115122
|
-
]
|
|
115123
|
-
]
|
|
115124
|
-
]
|
|
115125
|
-
},
|
|
115126
|
-
properties: {
|
|
115127
|
-
fill: "#fae21e",
|
|
115128
|
-
stroke: "#fae21e",
|
|
115129
|
-
"fill-opacity": 0.2,
|
|
115130
|
-
"stroke-width": 2,
|
|
115131
|
-
selectionType: "poly",
|
|
115132
|
-
warning_level: "1",
|
|
115133
|
-
"stroke-opacity": 1,
|
|
115134
|
-
objectName: "Coastal zone north"
|
|
115135
|
-
},
|
|
115136
|
-
id: "drawing-storm-ciaran-object-1"
|
|
115137
|
-
},
|
|
115138
|
-
{
|
|
115139
|
-
type: "Feature",
|
|
115140
|
-
geometry: {
|
|
115141
|
-
type: "Polygon",
|
|
115142
|
-
coordinates: [
|
|
115143
|
-
[
|
|
115144
|
-
[
|
|
115145
|
-
5.09504,
|
|
115146
|
-
53.492
|
|
115147
|
-
],
|
|
115148
|
-
[
|
|
115149
|
-
4.28015,
|
|
115150
|
-
52.46456
|
|
115151
|
-
],
|
|
115152
|
-
[
|
|
115153
|
-
6.87823,
|
|
115154
|
-
52.98133
|
|
115155
|
-
],
|
|
115156
|
-
[
|
|
115157
|
-
5.09504,
|
|
115158
|
-
53.492
|
|
115159
|
-
]
|
|
115160
|
-
]
|
|
115161
|
-
]
|
|
115162
|
-
},
|
|
115163
|
-
properties: {
|
|
115164
|
-
fill: "#fae21e",
|
|
115165
|
-
stroke: "#fae21e",
|
|
115166
|
-
"fill-opacity": 0.2,
|
|
115167
|
-
"stroke-width": 2,
|
|
115168
|
-
selectionType: "poly",
|
|
115169
|
-
warning_level: "1",
|
|
115170
|
-
"stroke-opacity": 1,
|
|
115171
|
-
objectName: "Wadden Sea"
|
|
115172
|
-
},
|
|
115173
|
-
id: "drawing-storm-ciaran-object-2"
|
|
115174
|
-
}
|
|
115175
|
-
]
|
|
115176
|
-
}
|
|
115177
|
-
}
|
|
114812
|
+
]
|
|
115178
114813
|
},
|
|
115179
114814
|
{
|
|
115180
114815
|
status: "PUBLISHED",
|
|
@@ -115203,7 +114838,7 @@ var warningEventsListJSON = [
|
|
|
115203
114838
|
status: "PUBLISHED",
|
|
115204
114839
|
areas: [
|
|
115205
114840
|
{
|
|
115206
|
-
objectName: "
|
|
114841
|
+
objectName: "wind test name",
|
|
115207
114842
|
geoJSON: {
|
|
115208
114843
|
type: "FeatureCollection",
|
|
115209
114844
|
features: [
|
|
@@ -115279,10 +114914,8 @@ var warningEventsListJSON = [
|
|
|
115279
114914
|
"stroke-width": 2,
|
|
115280
114915
|
selectionType: "poly",
|
|
115281
114916
|
warning_level: "1",
|
|
115282
|
-
"stroke-opacity": 1
|
|
115283
|
-
|
|
115284
|
-
},
|
|
115285
|
-
id: "drawing-storm-coastal-object-1"
|
|
114917
|
+
"stroke-opacity": 1
|
|
114918
|
+
}
|
|
115286
114919
|
}
|
|
115287
114920
|
]
|
|
115288
114921
|
}
|
|
@@ -115304,7 +114937,7 @@ var warningEventsListJSON = [
|
|
|
115304
114937
|
status: "PUBLISHED",
|
|
115305
114938
|
areas: [
|
|
115306
114939
|
{
|
|
115307
|
-
objectName: "
|
|
114940
|
+
objectName: "test name",
|
|
115308
114941
|
geoJSON: {
|
|
115309
114942
|
type: "FeatureCollection",
|
|
115310
114943
|
features: [
|
|
@@ -115372,10 +115005,8 @@ var warningEventsListJSON = [
|
|
|
115372
115005
|
"stroke-width": 2,
|
|
115373
115006
|
selectionType: "poly",
|
|
115374
115007
|
warning_level: "1",
|
|
115375
|
-
"stroke-opacity": 1
|
|
115376
|
-
|
|
115377
|
-
},
|
|
115378
|
-
id: "drawing-storm-coastal-object-2"
|
|
115008
|
+
"stroke-opacity": 1
|
|
115009
|
+
}
|
|
115379
115010
|
}
|
|
115380
115011
|
]
|
|
115381
115012
|
}
|
|
@@ -115390,201 +115021,7 @@ var warningEventsListJSON = [
|
|
|
115390
115021
|
authority: "KNMI",
|
|
115391
115022
|
incident: "Storm "
|
|
115392
115023
|
}
|
|
115393
|
-
]
|
|
115394
|
-
selectedDrawing: {
|
|
115395
|
-
id: "drawing-storm-coastal",
|
|
115396
|
-
objectName: "Coastal wind areas",
|
|
115397
|
-
scope: "global",
|
|
115398
|
-
lastUpdatedTime: "2026-07-20T00:00:00Z",
|
|
115399
|
-
geoJSON: {
|
|
115400
|
-
type: "FeatureCollection",
|
|
115401
|
-
features: [
|
|
115402
|
-
{
|
|
115403
|
-
type: "Feature",
|
|
115404
|
-
geometry: {
|
|
115405
|
-
type: "Polygon",
|
|
115406
|
-
coordinates: [
|
|
115407
|
-
[
|
|
115408
|
-
[
|
|
115409
|
-
5.85,
|
|
115410
|
-
53.5
|
|
115411
|
-
],
|
|
115412
|
-
[
|
|
115413
|
-
5.88069,
|
|
115414
|
-
53.53069
|
|
115415
|
-
],
|
|
115416
|
-
[
|
|
115417
|
-
5.83071,
|
|
115418
|
-
53.5276
|
|
115419
|
-
],
|
|
115420
|
-
[
|
|
115421
|
-
5.65979,
|
|
115422
|
-
53.53259
|
|
115423
|
-
],
|
|
115424
|
-
[
|
|
115425
|
-
5.65843,
|
|
115426
|
-
53.53262
|
|
115427
|
-
],
|
|
115428
|
-
[
|
|
115429
|
-
5.58313,
|
|
115430
|
-
53.53277
|
|
115431
|
-
],
|
|
115432
|
-
[
|
|
115433
|
-
5.57114,
|
|
115434
|
-
53.53133
|
|
115435
|
-
],
|
|
115436
|
-
[
|
|
115437
|
-
5.48882,
|
|
115438
|
-
53.51118
|
|
115439
|
-
],
|
|
115440
|
-
[
|
|
115441
|
-
5.5,
|
|
115442
|
-
53.5
|
|
115443
|
-
],
|
|
115444
|
-
[
|
|
115445
|
-
5.6,
|
|
115446
|
-
53.4
|
|
115447
|
-
],
|
|
115448
|
-
[
|
|
115449
|
-
5.7,
|
|
115450
|
-
53.38333
|
|
115451
|
-
],
|
|
115452
|
-
[
|
|
115453
|
-
5.75,
|
|
115454
|
-
53.4
|
|
115455
|
-
],
|
|
115456
|
-
[
|
|
115457
|
-
5.8,
|
|
115458
|
-
53.45
|
|
115459
|
-
],
|
|
115460
|
-
[
|
|
115461
|
-
5.85,
|
|
115462
|
-
53.5
|
|
115463
|
-
]
|
|
115464
|
-
]
|
|
115465
|
-
]
|
|
115466
|
-
},
|
|
115467
|
-
properties: {
|
|
115468
|
-
fill: "#fae21e",
|
|
115469
|
-
stroke: "#fae21e",
|
|
115470
|
-
"fill-opacity": 0.2,
|
|
115471
|
-
"stroke-width": 2,
|
|
115472
|
-
selectionType: "poly",
|
|
115473
|
-
warning_level: "1",
|
|
115474
|
-
"stroke-opacity": 1,
|
|
115475
|
-
objectName: "Coastal zone west"
|
|
115476
|
-
},
|
|
115477
|
-
id: "drawing-storm-coastal-object-1"
|
|
115478
|
-
},
|
|
115479
|
-
{
|
|
115480
|
-
type: "Feature",
|
|
115481
|
-
geometry: {
|
|
115482
|
-
type: "Polygon",
|
|
115483
|
-
coordinates: [
|
|
115484
|
-
[
|
|
115485
|
-
[
|
|
115486
|
-
4.9,
|
|
115487
|
-
53.2
|
|
115488
|
-
],
|
|
115489
|
-
[
|
|
115490
|
-
5,
|
|
115491
|
-
53.3
|
|
115492
|
-
],
|
|
115493
|
-
[
|
|
115494
|
-
4.9629,
|
|
115495
|
-
53.3371
|
|
115496
|
-
],
|
|
115497
|
-
[
|
|
115498
|
-
4.91659,
|
|
115499
|
-
53.32006
|
|
115500
|
-
],
|
|
115501
|
-
[
|
|
115502
|
-
4.91232,
|
|
115503
|
-
53.31826
|
|
115504
|
-
],
|
|
115505
|
-
[
|
|
115506
|
-
4.80795,
|
|
115507
|
-
53.26843
|
|
115508
|
-
],
|
|
115509
|
-
[
|
|
115510
|
-
4.7936,
|
|
115511
|
-
53.25812
|
|
115512
|
-
],
|
|
115513
|
-
[
|
|
115514
|
-
4.78373,
|
|
115515
|
-
53.24347
|
|
115516
|
-
],
|
|
115517
|
-
[
|
|
115518
|
-
4.77554,
|
|
115519
|
-
53.22488
|
|
115520
|
-
],
|
|
115521
|
-
[
|
|
115522
|
-
4.74595,
|
|
115523
|
-
53.18851
|
|
115524
|
-
],
|
|
115525
|
-
[
|
|
115526
|
-
4.8,
|
|
115527
|
-
53.175
|
|
115528
|
-
],
|
|
115529
|
-
[
|
|
115530
|
-
4.9,
|
|
115531
|
-
53.2
|
|
115532
|
-
]
|
|
115533
|
-
]
|
|
115534
|
-
]
|
|
115535
|
-
},
|
|
115536
|
-
properties: {
|
|
115537
|
-
fill: "#fae21e",
|
|
115538
|
-
stroke: "#fae21e",
|
|
115539
|
-
"fill-opacity": 0.2,
|
|
115540
|
-
"stroke-width": 2,
|
|
115541
|
-
selectionType: "poly",
|
|
115542
|
-
warning_level: "1",
|
|
115543
|
-
"stroke-opacity": 1,
|
|
115544
|
-
objectName: "IJsselmeer"
|
|
115545
|
-
},
|
|
115546
|
-
id: "drawing-storm-coastal-object-2"
|
|
115547
|
-
},
|
|
115548
|
-
{
|
|
115549
|
-
type: "Feature",
|
|
115550
|
-
geometry: {
|
|
115551
|
-
type: "Polygon",
|
|
115552
|
-
coordinates: [
|
|
115553
|
-
[
|
|
115554
|
-
[
|
|
115555
|
-
5.09504,
|
|
115556
|
-
53.492
|
|
115557
|
-
],
|
|
115558
|
-
[
|
|
115559
|
-
4.28015,
|
|
115560
|
-
52.46456
|
|
115561
|
-
],
|
|
115562
|
-
[
|
|
115563
|
-
6.87823,
|
|
115564
|
-
52.98133
|
|
115565
|
-
],
|
|
115566
|
-
[
|
|
115567
|
-
5.09504,
|
|
115568
|
-
53.492
|
|
115569
|
-
]
|
|
115570
|
-
]
|
|
115571
|
-
]
|
|
115572
|
-
},
|
|
115573
|
-
properties: {
|
|
115574
|
-
fill: "#fae21e",
|
|
115575
|
-
stroke: "#fae21e",
|
|
115576
|
-
"fill-opacity": 0.2,
|
|
115577
|
-
"stroke-width": 2,
|
|
115578
|
-
selectionType: "poly",
|
|
115579
|
-
warning_level: "1",
|
|
115580
|
-
"stroke-opacity": 1,
|
|
115581
|
-
objectName: "Zeeland delta"
|
|
115582
|
-
},
|
|
115583
|
-
id: "drawing-storm-coastal-object-3"
|
|
115584
|
-
}
|
|
115585
|
-
]
|
|
115586
|
-
}
|
|
115587
|
-
}
|
|
115024
|
+
]
|
|
115588
115025
|
},
|
|
115589
115026
|
{
|
|
115590
115027
|
status: "EXPIRED",
|
|
@@ -115613,7 +115050,7 @@ var warningEventsListJSON = [
|
|
|
115613
115050
|
phenomenon: "thunderstorm",
|
|
115614
115051
|
areas: [
|
|
115615
115052
|
{
|
|
115616
|
-
objectName: "
|
|
115053
|
+
objectName: "test name",
|
|
115617
115054
|
geoJSON: {
|
|
115618
115055
|
type: "FeatureCollection",
|
|
115619
115056
|
features: [
|
|
@@ -115648,10 +115085,8 @@ var warningEventsListJSON = [
|
|
|
115648
115085
|
"fill-opacity": 0.2,
|
|
115649
115086
|
"stroke-width": 2,
|
|
115650
115087
|
selectionType: "poly",
|
|
115651
|
-
"stroke-opacity": 1
|
|
115652
|
-
|
|
115653
|
-
},
|
|
115654
|
-
id: "drawing-storm-marcel-object-1"
|
|
115088
|
+
"stroke-opacity": 1
|
|
115089
|
+
}
|
|
115655
115090
|
}
|
|
115656
115091
|
]
|
|
115657
115092
|
}
|
|
@@ -115672,7 +115107,7 @@ var warningEventsListJSON = [
|
|
|
115672
115107
|
phenomenon: "thunderstorm",
|
|
115673
115108
|
areas: [
|
|
115674
115109
|
{
|
|
115675
|
-
objectName: "
|
|
115110
|
+
objectName: "test name",
|
|
115676
115111
|
geoJSON: {
|
|
115677
115112
|
type: "FeatureCollection",
|
|
115678
115113
|
features: [
|
|
@@ -115740,10 +115175,8 @@ var warningEventsListJSON = [
|
|
|
115740
115175
|
"stroke-width": 2,
|
|
115741
115176
|
selectionType: "poly",
|
|
115742
115177
|
warning_level: "1",
|
|
115743
|
-
"stroke-opacity": 1
|
|
115744
|
-
|
|
115745
|
-
},
|
|
115746
|
-
id: "drawing-storm-marcel-object-2"
|
|
115178
|
+
"stroke-opacity": 1
|
|
115179
|
+
}
|
|
115747
115180
|
}
|
|
115748
115181
|
]
|
|
115749
115182
|
}
|
|
@@ -115765,7 +115198,7 @@ var warningEventsListJSON = [
|
|
|
115765
115198
|
phenomenon: "thunderstorm",
|
|
115766
115199
|
areas: [
|
|
115767
115200
|
{
|
|
115768
|
-
objectName: "
|
|
115201
|
+
objectName: "test name 3",
|
|
115769
115202
|
geoJSON: {
|
|
115770
115203
|
type: "FeatureCollection",
|
|
115771
115204
|
features: [
|
|
@@ -115800,10 +115233,8 @@ var warningEventsListJSON = [
|
|
|
115800
115233
|
"fill-opacity": 0.2,
|
|
115801
115234
|
"stroke-width": 2,
|
|
115802
115235
|
selectionType: "poly",
|
|
115803
|
-
"stroke-opacity": 1
|
|
115804
|
-
|
|
115805
|
-
},
|
|
115806
|
-
id: "drawing-storm-marcel-object-3"
|
|
115236
|
+
"stroke-opacity": 1
|
|
115237
|
+
}
|
|
115807
115238
|
}
|
|
115808
115239
|
]
|
|
115809
115240
|
}
|
|
@@ -115817,196 +115248,7 @@ var warningEventsListJSON = [
|
|
|
115817
115248
|
authority: "KNMI",
|
|
115818
115249
|
incident: "Storm Marcel"
|
|
115819
115250
|
}
|
|
115820
|
-
]
|
|
115821
|
-
selectedDrawing: {
|
|
115822
|
-
id: "drawing-storm-marcel",
|
|
115823
|
-
objectName: "Storm Marcel areas",
|
|
115824
|
-
scope: "global",
|
|
115825
|
-
lastUpdatedTime: "2026-07-10T00:00:00Z",
|
|
115826
|
-
geoJSON: {
|
|
115827
|
-
type: "FeatureCollection",
|
|
115828
|
-
features: [
|
|
115829
|
-
{
|
|
115830
|
-
type: "Feature",
|
|
115831
|
-
geometry: {
|
|
115832
|
-
type: "Polygon",
|
|
115833
|
-
coordinates: [
|
|
115834
|
-
[
|
|
115835
|
-
[
|
|
115836
|
-
5.09504,
|
|
115837
|
-
53.492
|
|
115838
|
-
],
|
|
115839
|
-
[
|
|
115840
|
-
4.28015,
|
|
115841
|
-
52.46456
|
|
115842
|
-
],
|
|
115843
|
-
[
|
|
115844
|
-
6.87823,
|
|
115845
|
-
52.98133
|
|
115846
|
-
],
|
|
115847
|
-
[
|
|
115848
|
-
5.09504,
|
|
115849
|
-
53.492
|
|
115850
|
-
]
|
|
115851
|
-
]
|
|
115852
|
-
]
|
|
115853
|
-
},
|
|
115854
|
-
properties: {
|
|
115855
|
-
fill: "#ff7800",
|
|
115856
|
-
stroke: "#ff7800",
|
|
115857
|
-
"fill-opacity": 0.2,
|
|
115858
|
-
"stroke-width": 2,
|
|
115859
|
-
selectionType: "poly",
|
|
115860
|
-
"stroke-opacity": 1,
|
|
115861
|
-
objectName: "Inland north"
|
|
115862
|
-
},
|
|
115863
|
-
id: "drawing-storm-marcel-object-1"
|
|
115864
|
-
},
|
|
115865
|
-
{
|
|
115866
|
-
type: "Feature",
|
|
115867
|
-
geometry: {
|
|
115868
|
-
type: "Polygon",
|
|
115869
|
-
coordinates: [
|
|
115870
|
-
[
|
|
115871
|
-
[
|
|
115872
|
-
4.9,
|
|
115873
|
-
53.2
|
|
115874
|
-
],
|
|
115875
|
-
[
|
|
115876
|
-
5,
|
|
115877
|
-
53.3
|
|
115878
|
-
],
|
|
115879
|
-
[
|
|
115880
|
-
4.9629,
|
|
115881
|
-
53.3371
|
|
115882
|
-
],
|
|
115883
|
-
[
|
|
115884
|
-
4.91659,
|
|
115885
|
-
53.32006
|
|
115886
|
-
],
|
|
115887
|
-
[
|
|
115888
|
-
4.91232,
|
|
115889
|
-
53.31826
|
|
115890
|
-
],
|
|
115891
|
-
[
|
|
115892
|
-
4.80795,
|
|
115893
|
-
53.26843
|
|
115894
|
-
],
|
|
115895
|
-
[
|
|
115896
|
-
4.7936,
|
|
115897
|
-
53.25812
|
|
115898
|
-
],
|
|
115899
|
-
[
|
|
115900
|
-
4.78373,
|
|
115901
|
-
53.24347
|
|
115902
|
-
],
|
|
115903
|
-
[
|
|
115904
|
-
4.77554,
|
|
115905
|
-
53.22488
|
|
115906
|
-
],
|
|
115907
|
-
[
|
|
115908
|
-
4.74595,
|
|
115909
|
-
53.18851
|
|
115910
|
-
],
|
|
115911
|
-
[
|
|
115912
|
-
4.8,
|
|
115913
|
-
53.175
|
|
115914
|
-
],
|
|
115915
|
-
[
|
|
115916
|
-
4.9,
|
|
115917
|
-
53.2
|
|
115918
|
-
]
|
|
115919
|
-
]
|
|
115920
|
-
]
|
|
115921
|
-
},
|
|
115922
|
-
properties: {
|
|
115923
|
-
fill: "#fae21e",
|
|
115924
|
-
stroke: "#fae21e",
|
|
115925
|
-
"fill-opacity": 0.2,
|
|
115926
|
-
"stroke-width": 2,
|
|
115927
|
-
selectionType: "poly",
|
|
115928
|
-
warning_level: "1",
|
|
115929
|
-
"stroke-opacity": 1,
|
|
115930
|
-
objectName: "Inland east"
|
|
115931
|
-
},
|
|
115932
|
-
id: "drawing-storm-marcel-object-2"
|
|
115933
|
-
},
|
|
115934
|
-
{
|
|
115935
|
-
type: "Feature",
|
|
115936
|
-
geometry: {
|
|
115937
|
-
type: "Polygon",
|
|
115938
|
-
coordinates: [
|
|
115939
|
-
[
|
|
115940
|
-
[
|
|
115941
|
-
5.09504,
|
|
115942
|
-
53.492
|
|
115943
|
-
],
|
|
115944
|
-
[
|
|
115945
|
-
4.28015,
|
|
115946
|
-
52.46456
|
|
115947
|
-
],
|
|
115948
|
-
[
|
|
115949
|
-
6.87823,
|
|
115950
|
-
52.98133
|
|
115951
|
-
],
|
|
115952
|
-
[
|
|
115953
|
-
5.09504,
|
|
115954
|
-
53.492
|
|
115955
|
-
]
|
|
115956
|
-
]
|
|
115957
|
-
]
|
|
115958
|
-
},
|
|
115959
|
-
properties: {
|
|
115960
|
-
fill: "#ff7800",
|
|
115961
|
-
stroke: "#ff7800",
|
|
115962
|
-
"fill-opacity": 0.2,
|
|
115963
|
-
"stroke-width": 2,
|
|
115964
|
-
selectionType: "poly",
|
|
115965
|
-
"stroke-opacity": 1,
|
|
115966
|
-
objectName: "Inland south"
|
|
115967
|
-
},
|
|
115968
|
-
id: "drawing-storm-marcel-object-3"
|
|
115969
|
-
},
|
|
115970
|
-
{
|
|
115971
|
-
type: "Feature",
|
|
115972
|
-
geometry: {
|
|
115973
|
-
type: "Polygon",
|
|
115974
|
-
coordinates: [
|
|
115975
|
-
[
|
|
115976
|
-
[
|
|
115977
|
-
5.09504,
|
|
115978
|
-
53.492
|
|
115979
|
-
],
|
|
115980
|
-
[
|
|
115981
|
-
4.28015,
|
|
115982
|
-
52.46456
|
|
115983
|
-
],
|
|
115984
|
-
[
|
|
115985
|
-
6.87823,
|
|
115986
|
-
52.98133
|
|
115987
|
-
],
|
|
115988
|
-
[
|
|
115989
|
-
5.09504,
|
|
115990
|
-
53.492
|
|
115991
|
-
]
|
|
115992
|
-
]
|
|
115993
|
-
]
|
|
115994
|
-
},
|
|
115995
|
-
properties: {
|
|
115996
|
-
fill: "#fae21e",
|
|
115997
|
-
stroke: "#fae21e",
|
|
115998
|
-
"fill-opacity": 0.2,
|
|
115999
|
-
"stroke-width": 2,
|
|
116000
|
-
selectionType: "poly",
|
|
116001
|
-
warning_level: "1",
|
|
116002
|
-
"stroke-opacity": 1,
|
|
116003
|
-
objectName: "Veluwe"
|
|
116004
|
-
},
|
|
116005
|
-
id: "drawing-storm-marcel-object-4"
|
|
116006
|
-
}
|
|
116007
|
-
]
|
|
116008
|
-
}
|
|
116009
|
-
}
|
|
115251
|
+
]
|
|
116010
115252
|
}
|
|
116011
115253
|
];
|
|
116012
115254
|
|