@opengeoweb/warnings 19.6.0 → 19.6.1-nightly-20260912

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 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, 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';
6
+ import { SHARED_NAMESPACE, useConfirmationDialog, dateUtils, sessionStorageProvider, ToggleMenu, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, CustomIconButton, usePrevious, usePreventBrowserClose, CustomTooltip, Avatar, getInitials, SwitchButton, Filter, CustomToggleButton, FilterChip, TooltipSelect, LastUpdateTime, DateTimePicker, 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, InputAdornment, Menu, ListSubheader, Chip, ListItemText, ListItemIcon, Tooltip, IconButton, Checkbox, DialogTitle, DialogContent, Switch, RadioGroup, FormControlLabel, Radio, Collapse } from '@mui/material';
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, Popover, RadioGroup, FormControlLabel, Radio, Tooltip, IconButton, Checkbox, DialogTitle, DialogContent, Switch, 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,9 +23,6 @@ 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';
29
26
  import { intersect, area } from '@turf/turf';
30
27
  import Box$1 from '@mui/material/Box';
31
28
  import Tooltip$1 from '@mui/material/Tooltip';
@@ -118,6 +115,7 @@ var en = {
118
115
  "warning-button-delete-polygon": "Delete polygon",
119
116
  "warning-event-map-edit-drawing-tooltip": "Edit drawing",
120
117
  "warning-event-map-remove-drawing-tooltip": "Remove drawing",
118
+ "warning-event-probability": "Probability (incl. - excl.)",
121
119
  "warning-draw-tools-disabled": "Link a map to enable draw tools",
122
120
  "warning-description-original": "Description original",
123
121
  "warning-description-translation": "Description translation",
@@ -403,6 +401,8 @@ var en = {
403
401
  "warning-event-validation-min-duration": "Warning must have a duration of at least one hour",
404
402
  "warning-event-validation-overlap": "Warnings of the same level cannot overlap in time and/or area, delete or adjust one of the warnings",
405
403
  "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,7 +411,9 @@ 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"
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"
415
417
  };
416
418
  var nl = {
417
419
  "drawing-tool-form-tools": "Gereedschap",
@@ -500,6 +502,7 @@ var nl = {
500
502
  "warning-button-delete-polygon": "Polygoon verwijderen",
501
503
  "warning-event-map-edit-drawing-tooltip": "Tekening bewerken",
502
504
  "warning-event-map-remove-drawing-tooltip": "Tekening verwijderen",
505
+ "warning-event-probability": "Waarschijnlijkheid (incl. - excl.)",
503
506
  "warning-draw-tools-disabled": "Koppel een kaart om tekentools in te schakelen",
504
507
  "warning-description-original": "Beschrijving origineel",
505
508
  "warning-description-translation": "Beschrijving vertaling",
@@ -740,6 +743,8 @@ var nl = {
740
743
  "warning-event-validation-min-duration": "De duur van een waarschuwing is minimaal 1 uur",
741
744
  "warning-event-validation-overlap": "Waarschuwingen van hetzelfde niveau mogen niet overlappen in tijd en/of gebied, verwijder of pas een van de waarschuwingen aan",
742
745
  "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",
743
748
  "warning-event-open-summary-dialog-tooltip": "Open de samenvatting pop-up om de gedetailleerde samenvattingen in te vullen",
744
749
  "drawing-tool-form-objects": "Objecten",
745
750
  "drawing-tool-form-object-name": "Objectnaam",
@@ -748,7 +753,9 @@ var nl = {
748
753
  "drawing-tool-form-object-name-max-length": "Een objectnaam mag maximaal {{maxLength}} tekens bevatten",
749
754
  "drawing-tool-form-object-delete": "Object verwijderen",
750
755
  "warning-event-button-add-drawing": "Voeg een tekening toe aan dit event. Wijs daarna individuele objecten toe aan elke waarschuwing",
751
- "warning-event-button-assign-object": "Wijs een object uit de gekozen tekening toe aan deze 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"
752
759
  };
753
760
  var fi = {
754
761
  "drawing-tool-form-tools": "Työkalut",
@@ -837,6 +844,7 @@ var fi = {
837
844
  "warning-button-delete-polygon": "Poista monikulmio",
838
845
  "warning-event-map-edit-drawing-tooltip": "Muokkaa piirrosta",
839
846
  "warning-event-map-remove-drawing-tooltip": "Poista piirros",
847
+ "warning-event-probability": "Todennäköisyys (ml. - pl.)",
840
848
  "warning-draw-tools-disabled": "Linkitä kartta piirtotyökalujen ottamiseksi käyttöön",
841
849
  "warning-description-original": "Alkuperäinen kuvaus",
842
850
  "warning-description-translation": "Kuvauksen käännös",
@@ -1029,6 +1037,8 @@ var fi = {
1029
1037
  "warning-event-validation-min-duration": "ei käännetty",
1030
1038
  "warning-event-validation-overlap": "ei käännetty",
1031
1039
  "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",
1032
1042
  "warning-event-open-summary-dialog-tooltip": "ei käännetty",
1033
1043
  "drawing-tool-form-objects": "ei käännetty",
1034
1044
  "drawing-tool-form-object-name": "ei käännetty",
@@ -1037,7 +1047,9 @@ var fi = {
1037
1047
  "drawing-tool-form-object-name-max-length": "ei käännetty",
1038
1048
  "drawing-tool-form-object-delete": "ei käännetty",
1039
1049
  "warning-event-button-add-drawing": "ei käännetty",
1040
- "warning-event-button-assign-object": "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"
1041
1053
  };
1042
1054
  var no = {
1043
1055
  "drawing-tool-form-tools": "Verktøy",
@@ -1126,6 +1138,7 @@ var no = {
1126
1138
  "warning-button-delete-polygon": "Slett polygon",
1127
1139
  "warning-event-map-edit-drawing-tooltip": "Rediger tegning",
1128
1140
  "warning-event-map-remove-drawing-tooltip": "Fjern tegning",
1141
+ "warning-event-probability": "Sannsynlighet (inkl. - ekskl.)",
1129
1142
  "warning-draw-tools-disabled": "Koble til et kart for å aktivere tegneverktøy",
1130
1143
  "warning-description-original": "Original beskrivelse",
1131
1144
  "warning-description-translation": "Oversatt beskrivelse",
@@ -1316,6 +1329,8 @@ var no = {
1316
1329
  "warning-event-validation-min-duration": "ikke oversatt",
1317
1330
  "warning-event-validation-overlap": "ikke oversatt",
1318
1331
  "warning-event-validation-propbability-collapsed": "ikke oversatt",
1332
+ "warning-event-validation-area-missing": "ikke oversatt",
1333
+ "warning-event-validation-area-non-polygon": "ikke oversatt",
1319
1334
  "warning-event-open-summary-dialog-tooltip": "ikke oversatt",
1320
1335
  "drawing-tool-form-objects": "ikke oversatt",
1321
1336
  "drawing-tool-form-object-name": "ikke oversatt",
@@ -1324,7 +1339,9 @@ var no = {
1324
1339
  "drawing-tool-form-object-name-max-length": "ikke oversatt",
1325
1340
  "drawing-tool-form-object-delete": "ikke oversatt",
1326
1341
  "warning-event-button-add-drawing": "ikke oversatt",
1327
- "warning-event-button-assign-object": "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"
1328
1345
  };
1329
1346
  var warningsTranslations = {
1330
1347
  en: en,
@@ -1353,6 +1370,37 @@ var warningsTranslations = {
1353
1370
  var areaDrawingDialogType = uiTypes.DialogTypes.AreaDrawingManager;
1354
1371
  var drawingDialogType = uiTypes.DialogTypes.DrawingTool;
1355
1372
  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
+ };
1356
1404
 
1357
1405
  function _arrayLikeToArray(r, a) {
1358
1406
  (null == a || a > r.length) && (a = r.length);
@@ -2095,6 +2143,8 @@ var RowComponent$3 = function RowComponent(_ref) {
2095
2143
  activeDrawing = _ref.activeDrawing,
2096
2144
  t = _ref.t;
2097
2145
  var theme = useTheme();
2146
+ var config = sessionStorageProvider.getConfig();
2147
+ var showWarningsEventsOption = !!config.GW_FEATURE_WARNINGS_EVENT;
2098
2148
  var listItem = listInclHeaders[index];
2099
2149
  if (!listItem.isDrawing) {
2100
2150
  var header = headerList[listItem.index];
@@ -2199,10 +2249,16 @@ var RowComponent$3 = function RowComponent(_ref) {
2199
2249
  }, {
2200
2250
  text: t('public-warning-title').toUpperCase(),
2201
2251
  action: function action() {
2202
- onClickShare(drawing);
2252
+ onClickShare(drawing, 'public');
2203
2253
  },
2204
2254
  icon: jsx(ExitDomain, {})
2205
- }],
2255
+ }].concat(showWarningsEventsOption ? [{
2256
+ text: t('public-warning-event-title').toUpperCase(),
2257
+ action: function action() {
2258
+ onClickShare(drawing, 'warningsEvent');
2259
+ },
2260
+ icon: jsx(ExitDomain, {})
2261
+ }] : []),
2206
2262
  secondaryMenuTitle: t('area-drawing-manager-share-menu'),
2207
2263
  tooltipTitle: t('area-drawing-manager-options-menu')
2208
2264
  }))
@@ -3819,11 +3875,9 @@ var slice = createSlice({
3819
3875
  var _action$payload = action.payload,
3820
3876
  event = _action$payload.event,
3821
3877
  formState = _action$payload.formState;
3822
- // if (object) {
3823
- // draft.object = object;
3824
- // }
3825
3878
  if (event) {
3826
3879
  draft.event = event;
3880
+ draft.selectedDrawing = event.selectedDrawing && withDrawingFeatureIds(event.selectedDrawing);
3827
3881
  }
3828
3882
  if (formState !== undefined) {
3829
3883
  draft.formState = formState;
@@ -3836,8 +3890,8 @@ var slice = createSlice({
3836
3890
  formState = _action$payload2$form === void 0 ? '' : _action$payload2$form,
3837
3891
  panelId = _action$payload2.panelId,
3838
3892
  selectedEventId = _action$payload2.selectedEventId;
3839
- // draft.object = object;
3840
3893
  draft.event = event;
3894
+ draft.selectedDrawing = (event == null ? void 0 : event.selectedDrawing) && withDrawingFeatureIds(event.selectedDrawing);
3841
3895
  draft.selectedEventId = selectedEventId || (event == null ? void 0 : event.eventId);
3842
3896
  draft.formState = formState;
3843
3897
  draft.panelId = panelId;
@@ -3868,6 +3922,10 @@ var slice = createSlice({
3868
3922
  },
3869
3923
  setSelectedEventId: function setSelectedEventId(draft, action) {
3870
3924
  draft.selectedEventId = action.payload;
3925
+ },
3926
+ setSelectedDrawing: function setSelectedDrawing(draft, action) {
3927
+ var drawing = action.payload.drawing;
3928
+ draft.selectedDrawing = drawing && withDrawingFeatureIds(drawing);
3871
3929
  }
3872
3930
  },
3873
3931
  extraReducers: function extraReducers(builder) {
@@ -3883,6 +3941,7 @@ var slice = createSlice({
3883
3941
  delete draft.selectedEventId;
3884
3942
  delete draft.isFormDirty;
3885
3943
  delete draft.warningType;
3944
+ delete draft.selectedDrawing;
3886
3945
  }
3887
3946
  });
3888
3947
  }
@@ -4289,7 +4348,7 @@ var Phenomenon = function Phenomenon(_ref) {
4289
4348
  };
4290
4349
 
4291
4350
  var _excluded$c = ["id", "warningDetail", "status", "editor"],
4292
- _excluded2$1 = ["id", "linked_to_id", "proposal_id", "warning_handle_uuid"],
4351
+ _excluded2$2 = ["id", "linked_to_id", "proposal_id", "warning_handle_uuid"],
4293
4352
  _excluded3 = ["published_warning_uuid"],
4294
4353
  _excluded4 = ["id"],
4295
4354
  _excluded5 = ["id", "warningDetail"],
@@ -4317,7 +4376,7 @@ var getWarningWithoutIdStatusEditor = function getWarningWithoutIdStatusEditor(w
4317
4376
  warningDetail.linked_to_id;
4318
4377
  warningDetail.proposal_id;
4319
4378
  warningDetail.warning_handle_uuid;
4320
- var cleanWarningDetail = _objectWithoutPropertiesLoose(warningDetail, _excluded2$1);
4379
+ var cleanWarningDetail = _objectWithoutPropertiesLoose(warningDetail, _excluded2$2);
4321
4380
  var areas = (_warningDetail$areas = warningDetail.areas) == null ? void 0 : _warningDetail$areas.map(function (_ref) {
4322
4381
  _ref.published_warning_uuid;
4323
4382
  var area = _objectWithoutPropertiesLoose(_ref, _excluded3);
@@ -5065,6 +5124,10 @@ var useMutateWarningEvent = function useMutateWarningEvent(snackBarMessage) {
5065
5124
  type: warningEventDialogType,
5066
5125
  setOpen: false
5067
5126
  }));
5127
+ dispatch(uiActions.setToggleOpenDialog({
5128
+ type: uiTypes.DialogTypes.AreaDrawingLoader,
5129
+ setOpen: false
5130
+ }));
5068
5131
  }
5069
5132
  case 2:
5070
5133
  return _context15.a(2);
@@ -5269,7 +5332,7 @@ var buildAreaGeoJSON = function buildAreaGeoJSON(drawing, options) {
5269
5332
  features: drawing.geoJSON.features.map(function (feature, index) {
5270
5333
  var _feature$id, _options$idPrefix, _ref, _feature$properties$o, _feature$properties, _feature$properties2;
5271
5334
  return Object.assign({}, feature, {
5272
- id: (_feature$id = feature.id) != null ? _feature$id : "" + ((_options$idPrefix = options.idPrefix) != null ? _options$idPrefix : '') + drawing.id + "-" + index,
5335
+ id: (_feature$id = feature.id) != null ? _feature$id : "" + ((_options$idPrefix = options.idPrefix) != null ? _options$idPrefix : '') + getDrawingFeatureId(drawing.id, feature, index),
5273
5336
  properties: Object.assign({}, feature.properties, {
5274
5337
  areaId: drawing.id,
5275
5338
  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,
@@ -5603,7 +5666,16 @@ var AreaDrawingManagerConnect = function AreaDrawingManagerConnect(_ref2) {
5603
5666
  deleteHoverPreviewLayer();
5604
5667
  closeAreaDrawingDialog();
5605
5668
  };
5606
- var onShareDrawing = function onShareDrawing(drawing) {
5669
+ var onShareDrawing = function onShareDrawing(drawing, type) {
5670
+ if (type === 'warningsEvent') {
5671
+ dispatch(warningsEventFormActions.openWarningsEventFormDialog({
5672
+ event: {
5673
+ selectedDrawing: drawing
5674
+ },
5675
+ formState: 'edit'
5676
+ }));
5677
+ return;
5678
+ }
5607
5679
  dispatch(warningsFormActions.openPublicWarningFormDialog({
5608
5680
  object: drawing,
5609
5681
  warning: {
@@ -8773,6 +8845,43 @@ var AreaDrawingLoader = function AreaDrawingLoader(_ref) {
8773
8845
  });
8774
8846
  };
8775
8847
 
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
+
8776
8885
  var EXTENT_PADDING = 50;
8777
8886
  var DEFAULT_SIZE$1 = {
8778
8887
  height: '200px',
@@ -8821,7 +8930,9 @@ var WarningsMapView = function WarningsMapView(_ref) {
8821
8930
  _ref$showMapMousePosi = _ref.showMapMousePosition,
8822
8931
  showMapMousePosition = _ref$showMapMousePosi === void 0 ? true : _ref$showMapMousePosi,
8823
8932
  _ref$showZoomControls = _ref.showZoomControls,
8824
- showZoomControls = _ref$showZoomControls === void 0 ? true : _ref$showZoomControls;
8933
+ showZoomControls = _ref$showZoomControls === void 0 ? true : _ref$showZoomControls,
8934
+ clickOnFeature = _ref.clickOnFeature,
8935
+ hoverSelect = _ref.hoverSelect;
8825
8936
  var containerRef = useRef(null);
8826
8937
  var defaultMapPresetBbox = geojsonFeature != null && geojsonFeature.features.length ? undefined : defaultBbox;
8827
8938
  var defaultBbox$1 = (defaultMapPreset == null ? void 0 : defaultMapPreset.proj) || defaultMapPresetBbox;
@@ -8897,7 +9008,9 @@ var WarningsMapView = function WarningsMapView(_ref) {
8897
9008
  }), !isSnapshot && jsx(OpenLayersLayer, Object.assign({}, defaultBaseLayer, {
8898
9009
  id: mapId + "_baseLayer"
8899
9010
  })), !!warningLayer.geojson && jsx(OpenLayersFeatureLayer, {
9011
+ clickOnFeature: clickOnFeature,
8900
9012
  featureCollection: warningLayer.geojson,
9013
+ hoverSelect: hoverSelect,
8901
9014
  style: genericOpenLayersFeatureStyle,
8902
9015
  zIndex: 1000
8903
9016
  }), !isSnapshot && jsx(OpenLayersLayer, Object.assign({}, defaultOverLayer, {
@@ -11409,7 +11522,8 @@ var MaritimeWarningsFormConnect = function MaritimeWarningsFormConnect(_ref) {
11409
11522
  });
11410
11523
  };
11411
11524
 
11412
- var _excluded$7 = ["IS_DRAFT", "object", "translation-select"];
11525
+ var _excluded$7 = ["IS_DRAFT", "object", "translation-select"],
11526
+ _excluded2$1 = ["isSelected", "highlightSelectedFeature", "boxSelectPreview"];
11413
11527
  var getEmptyPublicWarning = function getEmptyPublicWarning() {
11414
11528
  var currentTime = new Date();
11415
11529
  var validFromTime = dateUtils.add(currentTime, {
@@ -11531,7 +11645,7 @@ isAviationWarning) {
11531
11645
  }
11532
11646
  return Object.assign({}, geoJSON, {
11533
11647
  features: geoJSON.features.map(function (feature) {
11534
- var _feature$properties2, _feature$properties3;
11648
+ var _feature$properties2;
11535
11649
  var colors;
11536
11650
  if (isAviationWarning) {
11537
11651
  var _feature$properties$i, _feature$properties;
@@ -11558,86 +11672,91 @@ isAviationWarning) {
11558
11672
  'stroke-width': 2,
11559
11673
  'stroke-opacity': 1
11560
11674
  };
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);
11561
11680
  return Object.assign({}, feature, {
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)
11681
+ properties: Object.assign({}, defaultProperties, featureProperties, {
11682
+ fill: colors.color || featureProperties.fill,
11683
+ stroke: colors.color || featureProperties.stroke
11565
11684
  })
11566
11685
  });
11567
11686
  })
11568
11687
  });
11569
11688
  }
11570
- var Form = function Form(_ref5) {
11689
+ var Form = function Form(_ref6) {
11571
11690
  var _publicWarningDetails, _publicWarningDetails2;
11572
- var defaultMapPreset = _ref5.defaultMapPreset,
11573
- _ref5$onSaveForm = _ref5.onSaveForm,
11574
- onSaveForm = _ref5$onSaveForm === void 0 ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
11691
+ var defaultMapPreset = _ref6.defaultMapPreset,
11692
+ _ref6$onSaveForm = _ref6.onSaveForm,
11693
+ onSaveForm = _ref6$onSaveForm === void 0 ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
11575
11694
  return _regenerator().w(function (_context) {
11576
11695
  while (1) switch (_context.n) {
11577
11696
  case 0:
11578
11697
  return _context.a(2, null);
11579
11698
  }
11580
11699
  }, _callee);
11581
- })) : _ref5$onSaveForm,
11582
- _ref5$onPublishForm = _ref5.onPublishForm,
11583
- onPublishForm = _ref5$onPublishForm === void 0 ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
11700
+ })) : _ref6$onSaveForm,
11701
+ _ref6$onPublishForm = _ref6.onPublishForm,
11702
+ onPublishForm = _ref6$onPublishForm === void 0 ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
11584
11703
  return _regenerator().w(function (_context2) {
11585
11704
  while (1) switch (_context2.n) {
11586
11705
  case 0:
11587
11706
  return _context2.a(2, null);
11588
11707
  }
11589
11708
  }, _callee2);
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() {
11709
+ })) : _ref6$onPublishForm,
11710
+ _ref6$onClearForm = _ref6.onClearForm,
11711
+ onClearForm = _ref6$onClearForm === void 0 ? function () {} : _ref6$onClearForm,
11712
+ _ref6$onCloseForm = _ref6.onCloseForm,
11713
+ onCloseForm = _ref6$onCloseForm === void 0 ? function () {} : _ref6$onCloseForm,
11714
+ _ref6$onSaveAviationF = _ref6.onSaveAviationForm,
11715
+ onSaveAviationForm = _ref6$onSaveAviationF === void 0 ? /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
11597
11716
  return _regenerator().w(function (_context3) {
11598
11717
  while (1) switch (_context3.n) {
11599
11718
  case 0:
11600
11719
  return _context3.a(2, null);
11601
11720
  }
11602
11721
  }, _callee3);
11603
- })) : _ref5$onSaveAviationF,
11604
- object = _ref5.object,
11605
- publicWarningDetails = _ref5.publicWarningDetails,
11606
- _ref5$error = _ref5.error,
11607
- error = _ref5$error === void 0 ? {
11722
+ })) : _ref6$onSaveAviationF,
11723
+ object = _ref6.object,
11724
+ publicWarningDetails = _ref6.publicWarningDetails,
11725
+ _ref6$error = _ref6.error,
11726
+ error = _ref6$error === void 0 ? {
11608
11727
  severity: 'error',
11609
11728
  message: ''
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;
11729
+ } : _ref6$error,
11730
+ _ref6$isReadOnly = _ref6.isReadOnly,
11731
+ isReadOnly = _ref6$isReadOnly === void 0 ? false : _ref6$isReadOnly,
11732
+ _ref6$onFormDirty = _ref6.onFormDirty,
11733
+ onFormDirty = _ref6$onFormDirty === void 0 ? function () {} : _ref6$onFormDirty,
11734
+ _ref6$isSnapshot = _ref6.isSnapshot,
11735
+ isSnapshot = _ref6$isSnapshot === void 0 ? false : _ref6$isSnapshot,
11736
+ _ref6$onAddDrawing = _ref6.onAddDrawing,
11737
+ onAddDrawing = _ref6$onAddDrawing === void 0 ? function () {} : _ref6$onAddDrawing,
11738
+ selectedAviationProduct = _ref6.selectedAviationProduct,
11739
+ _ref6$warningType = _ref6.warningType,
11740
+ warningType = _ref6$warningType === void 0 ? 'public' : _ref6$warningType,
11741
+ mode = _ref6.mode,
11742
+ formState = _ref6.formState,
11743
+ _ref6$onSetViewModeRe = _ref6.onSetViewModeResetArea,
11744
+ onSetViewModeResetArea = _ref6$onSetViewModeRe === void 0 ? function () {} : _ref6$onSetViewModeRe,
11745
+ storedStartGeoJSON = _ref6.storedStartGeoJSON,
11746
+ storedEndGeoJSON = _ref6.storedEndGeoJSON,
11747
+ _ref6$setWarningLevel = _ref6.setWarningLevel,
11748
+ setWarningLevel = _ref6$setWarningLevel === void 0 ? function () {} : _ref6$setWarningLevel,
11749
+ _ref6$linkedMapIds = _ref6.linkedMapIds,
11750
+ linkedMapIds = _ref6$linkedMapIds === void 0 ? [] : _ref6$linkedMapIds,
11751
+ _ref6$onDrawPolygon = _ref6.onDrawPolygon,
11752
+ onDrawPolygon = _ref6$onDrawPolygon === void 0 ? function () {} : _ref6$onDrawPolygon,
11753
+ _ref6$onDeletePolygon = _ref6.onDeletePolygon,
11754
+ onDeletePolygon = _ref6$onDeletePolygon === void 0 ? function () {} : _ref6$onDeletePolygon,
11755
+ _ref6$isDrawPolygonAc = _ref6.isDrawPolygonActive,
11756
+ isDrawPolygonActive = _ref6$isDrawPolygonAc === void 0 ? false : _ref6$isDrawPolygonAc,
11757
+ _ref6$isDrawingModeAc = _ref6.isDrawingModeActive,
11758
+ isDrawingModeActive = _ref6$isDrawingModeAc === void 0 ? false : _ref6$isDrawingModeAc,
11759
+ publicWarningStatus = _ref6.publicWarningStatus;
11641
11760
  var _React$useState = React.useState(false),
11642
11761
  isPublishing = _React$useState[0],
11643
11762
  setIsPublishing = _React$useState[1];
@@ -11709,7 +11828,7 @@ var Form = function Form(_ref5) {
11709
11828
  if (!isPublishing) {
11710
11829
  toggleIsDraft(false);
11711
11830
  void handleSubmit(/*#__PURE__*/function () {
11712
- var _ref9 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(data) {
11831
+ var _ref0 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(data) {
11713
11832
  return _regenerator().w(function (_context4) {
11714
11833
  while (1) switch (_context4.n) {
11715
11834
  case 0:
@@ -11724,7 +11843,7 @@ var Form = function Form(_ref5) {
11724
11843
  }, _callee4);
11725
11844
  }));
11726
11845
  return function (_x) {
11727
- return _ref9.apply(this, arguments);
11846
+ return _ref0.apply(this, arguments);
11728
11847
  };
11729
11848
  }())();
11730
11849
  }
@@ -11733,7 +11852,7 @@ var Form = function Form(_ref5) {
11733
11852
  if (!isSaving) {
11734
11853
  toggleIsDraft(true);
11735
11854
  void handleSubmit(/*#__PURE__*/function () {
11736
- var _ref0 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(data) {
11855
+ var _ref1 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(data) {
11737
11856
  return _regenerator().w(function (_context5) {
11738
11857
  while (1) switch (_context5.n) {
11739
11858
  case 0:
@@ -11748,13 +11867,13 @@ var Form = function Form(_ref5) {
11748
11867
  }, _callee5);
11749
11868
  }));
11750
11869
  return function (_x2) {
11751
- return _ref0.apply(this, arguments);
11870
+ return _ref1.apply(this, arguments);
11752
11871
  };
11753
11872
  }())();
11754
11873
  }
11755
11874
  };
11756
11875
  var showConfirmDialog = /*#__PURE__*/function () {
11757
- var _ref1 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(action) {
11876
+ var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(action) {
11758
11877
  return _regenerator().w(function (_context6) {
11759
11878
  while (1) switch (_context6.n) {
11760
11879
  case 0:
@@ -11775,11 +11894,11 @@ var Form = function Form(_ref5) {
11775
11894
  }, _callee6);
11776
11895
  }));
11777
11896
  return function showConfirmDialog(_x3) {
11778
- return _ref1.apply(this, arguments);
11897
+ return _ref10.apply(this, arguments);
11779
11898
  };
11780
11899
  }();
11781
11900
  var cancelAviationProduct = /*#__PURE__*/function () {
11782
- var _ref10 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(warningType) {
11901
+ var _ref11 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(warningType) {
11783
11902
  var result;
11784
11903
  return _regenerator().w(function (_context7) {
11785
11904
  while (1) switch (_context7.n) {
@@ -11793,7 +11912,7 @@ var Form = function Form(_ref5) {
11793
11912
  }, _callee7);
11794
11913
  }));
11795
11914
  return function cancelAviationProduct(_x4) {
11796
- return _ref10.apply(this, arguments);
11915
+ return _ref11.apply(this, arguments);
11797
11916
  };
11798
11917
  }();
11799
11918
  var getPublishButtonLabel = function getPublishButtonLabel() {
@@ -11808,7 +11927,7 @@ var Form = function Form(_ref5) {
11808
11927
  return t('warning-button-publish');
11809
11928
  };
11810
11929
  var saveAviationDraft = /*#__PURE__*/function () {
11811
- var _ref11 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(formValues, warningType) {
11930
+ var _ref12 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(formValues, warningType) {
11812
11931
  return _regenerator().w(function (_context8) {
11813
11932
  while (1) switch (_context8.n) {
11814
11933
  case 0:
@@ -11830,11 +11949,11 @@ var Form = function Form(_ref5) {
11830
11949
  }, _callee8);
11831
11950
  }));
11832
11951
  return function saveAviationDraft(_x5, _x6) {
11833
- return _ref11.apply(this, arguments);
11952
+ return _ref12.apply(this, arguments);
11834
11953
  };
11835
11954
  }();
11836
11955
  var handleSubmitAviationProduct = /*#__PURE__*/function () {
11837
- var _ref12 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(action, warningType) {
11956
+ var _ref13 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(action, warningType) {
11838
11957
  var _getFieldState$error, _getFieldState$error2, startGeometryErrorType, endGeometryErrorType, hasConfiguredIntersectionPointLimitError, _t3;
11839
11958
  return _regenerator().w(function (_context1) {
11840
11959
  while (1) switch (_context1.p = _context1.n) {
@@ -11869,7 +11988,7 @@ var Form = function Form(_ref5) {
11869
11988
  case 6:
11870
11989
  toggleIsDraft(false);
11871
11990
  void handleSubmit(/*#__PURE__*/function () {
11872
- var _ref13 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(formValues) {
11991
+ var _ref14 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(formValues) {
11873
11992
  return _regenerator().w(function (_context9) {
11874
11993
  while (1) switch (_context9.p = _context9.n) {
11875
11994
  case 0:
@@ -11905,7 +12024,7 @@ var Form = function Form(_ref5) {
11905
12024
  }, _callee9, null, [[4, 6, 7, 8], [0, 2]]);
11906
12025
  }));
11907
12026
  return function (_x9) {
11908
- return _ref13.apply(this, arguments);
12027
+ return _ref14.apply(this, arguments);
11909
12028
  };
11910
12029
  }())();
11911
12030
  return _context1.a(3, 19);
@@ -11940,7 +12059,7 @@ var Form = function Form(_ref5) {
11940
12059
  return _context1.a(3, 19);
11941
12060
  case 16:
11942
12061
  void handleSubmit(/*#__PURE__*/function () {
11943
- var _ref14 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(formValues) {
12062
+ var _ref15 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(formValues) {
11944
12063
  return _regenerator().w(function (_context0) {
11945
12064
  while (1) switch (_context0.p = _context0.n) {
11946
12065
  case 0:
@@ -11967,7 +12086,7 @@ var Form = function Form(_ref5) {
11967
12086
  }, _callee0, null, [[0,, 4, 5]]);
11968
12087
  }));
11969
12088
  return function (_x0) {
11970
- return _ref14.apply(this, arguments);
12089
+ return _ref15.apply(this, arguments);
11971
12090
  };
11972
12091
  }())();
11973
12092
  return _context1.a(3, 19);
@@ -11981,7 +12100,7 @@ var Form = function Form(_ref5) {
11981
12100
  }, _callee1, null, [[11, 13, 14, 15], [7, 9]]);
11982
12101
  }));
11983
12102
  return function handleSubmitAviationProduct(_x7, _x8) {
11984
- return _ref12.apply(this, arguments);
12103
+ return _ref13.apply(this, arguments);
11985
12104
  };
11986
12105
  }();
11987
12106
  var onPressClear = function onPressClear() {
@@ -13021,7 +13140,7 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
13021
13140
  fetchAreaError = _useAreaRequest.fetchAreaError,
13022
13141
  setAreas = _useAreaRequest.setAreas,
13023
13142
  isAreasLoading = _useAreaRequest.isAreasLoading;
13024
- var selectedAreas = useSelector(function (store) {
13143
+ var publicWarningSelectedAreas = useSelector(function (store) {
13025
13144
  return getPublicWarningAreas(store);
13026
13145
  });
13027
13146
  var warningId = useSelector(function (store) {
@@ -13036,6 +13155,10 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
13036
13155
  var isWarningDialogOpen = useSelector(function (store) {
13037
13156
  return uiSelectors.getisDialogOpen(store, publicWarningDialogType);
13038
13157
  });
13158
+ var isWarningEventDialogOpen = useSelector(function (store) {
13159
+ return uiSelectors.getisDialogOpen(store, warningEventDialogType);
13160
+ });
13161
+ var eventSelectedDrawing = useSelector(getWarningsEventSelectedDrawing);
13039
13162
  var hasPublicWarningDrawLayer = useSelector(function (store) {
13040
13163
  var _store$layers$allIds, _store$layers;
13041
13164
  return ((_store$layers$allIds = (_store$layers = store.layers) == null ? void 0 : _store$layers.allIds) != null ? _store$layers$allIds : []).some(function (layerId) {
@@ -13136,9 +13259,15 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
13136
13259
  var onSearch = function onSearch(queryString) {
13137
13260
  return setSearchQuery(queryString);
13138
13261
  };
13139
- var onAddArea = function onAddArea(_ref4) {
13140
- var geoJSON = _ref4.geoJSON,
13141
- objectName = _ref4.objectName;
13262
+ var onAddArea = function onAddArea(drawingListItem) {
13263
+ var geoJSON = drawingListItem.geoJSON,
13264
+ objectName = drawingListItem.objectName;
13265
+ if (isWarningEventDialogOpen) {
13266
+ dispatch(warningsEventFormActions.setSelectedDrawing({
13267
+ drawing: drawingListItem
13268
+ }));
13269
+ return;
13270
+ }
13142
13271
  dispatch(warningsFormActions.addArea({
13143
13272
  area: {
13144
13273
  geoJSON: geoJSON,
@@ -13146,9 +13275,15 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
13146
13275
  }
13147
13276
  }));
13148
13277
  };
13149
- var onRemoveArea = function onRemoveArea(_ref5) {
13150
- var geoJSON = _ref5.geoJSON,
13151
- objectName = _ref5.objectName;
13278
+ var onRemoveArea = function onRemoveArea(_ref4) {
13279
+ var geoJSON = _ref4.geoJSON,
13280
+ objectName = _ref4.objectName;
13281
+ if (isWarningEventDialogOpen) {
13282
+ dispatch(warningsEventFormActions.setSelectedDrawing({
13283
+ drawing: undefined
13284
+ }));
13285
+ return;
13286
+ }
13152
13287
  dispatch(warningsFormActions.removeArea({
13153
13288
  area: {
13154
13289
  geoJSON: geoJSON,
@@ -13162,6 +13297,11 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
13162
13297
  }
13163
13298
  };
13164
13299
  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;
13165
13305
  var drawingError = uiError ? {
13166
13306
  type: areaDrawingLoaderType,
13167
13307
  error: uiError
@@ -13190,7 +13330,7 @@ var AreaDrawingLoaderConnect = function AreaDrawingLoaderConnect(_ref) {
13190
13330
  source: uiSource,
13191
13331
  startPosition: {
13192
13332
  top: 104,
13193
- left: 50
13333
+ left: 450
13194
13334
  },
13195
13335
  title: t('area-drawing-loader-title')
13196
13336
  });
@@ -14253,16 +14393,6 @@ var EDIT_FIELD_SX = {
14253
14393
  fontSize: 16
14254
14394
  }
14255
14395
  };
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
- };
14266
14396
  var TimeField = function TimeField(_ref) {
14267
14397
  var field = _ref.field,
14268
14398
  label = _ref.label,
@@ -14315,70 +14445,43 @@ var TimeField = function TimeField(_ref) {
14315
14445
  width: TIME_FIELD_WIDTH,
14316
14446
  zIndex: 4
14317
14447
  },
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
- })
14448
+ children: isEditing && !isActive ? jsx(DateTimePicker, {
14449
+ autoFocus: true,
14450
+ label: label,
14451
+ maxDateTime: maxPickerDate,
14452
+ minDateTime: minPickerDate,
14453
+ onAccept: function onAccept(value) {
14454
+ if (isPopupOpenRef.current && value) {
14455
+ onCommitSession({
14456
+ field: field,
14457
+ value: value
14458
+ });
14459
+ }
14460
+ },
14461
+ onChange: function onChange(value) {
14462
+ if (value) {
14463
+ onDraftChange(field, value);
14464
+ }
14465
+ },
14466
+ onClose: function onClose() {
14467
+ isPopupOpenRef.current = false;
14468
+ },
14469
+ onError: function onError(reason) {
14470
+ onDraftValidityChange(field, reason != null);
14471
+ },
14472
+ onOpen: function onOpen() {
14473
+ isPopupOpenRef.current = true;
14474
+ },
14475
+ slotProps: {
14476
+ textField: {
14477
+ error: isDraftInvalid && draft != null
14478
+ }
14479
+ },
14480
+ sx: EDIT_FIELD_SX,
14481
+ timeSteps: {
14482
+ minutes: SNAP_MINUTES
14483
+ },
14484
+ value: shownTime
14382
14485
  }) : jsxs(Box, {
14383
14486
  "data-testid": "warning-event-block-" + field + "-field",
14384
14487
  onDoubleClick: function onDoubleClick() {
@@ -15618,7 +15721,8 @@ var warningEventItemDefaultValues = {
15618
15721
  authority: '',
15619
15722
  phenomenon: '',
15620
15723
  type: 0,
15621
- warning_handle_uuid: ''
15724
+ warning_handle_uuid: '',
15725
+ areas: []
15622
15726
  };
15623
15727
  var buildDefaultWarningItem = function buildDefaultWarningItem(event) {
15624
15728
  var _getDefaultWarningTim = getDefaultWarningTimes(event.warningEventType),
@@ -15659,30 +15763,6 @@ var getInheritedEventFields = function getInheritedEventFields(values) {
15659
15763
  phenomenon: values.phenomenon
15660
15764
  };
15661
15765
  };
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
- }];
15686
15766
  var buildSubmitValues = function buildSubmitValues(values) {
15687
15767
  values.IS_DRAFT;
15688
15768
  var productToPost = _objectWithoutPropertiesLoose(values, _excluded$6);
@@ -15690,20 +15770,14 @@ var buildSubmitValues = function buildSubmitValues(values) {
15690
15770
  var eventToPost = Object.assign({}, productToPost, getEventValidity(productToPost.warnings), {
15691
15771
  warnings: productToPost.warnings.map(function (warning) {
15692
15772
  var joinedWarning = Object.assign({}, warning, inherited, {
15693
- domain: 'public',
15694
- // TODO REMOVE WHEN WE IMPLEMENT THE REAL AREAS FUNCTIONALITY
15695
- areas: FAKE_AREAS
15773
+ domain: 'public'
15696
15774
  });
15697
- // Remove empty fields from all warnings
15775
+ // Remove empty fields from all warnings, but always send `areas` (even
15776
+ // when empty) so the backend can clear areas that were removed
15698
15777
  return Object.keys(joinedWarning).reduce(function (warningDetail, fieldName) {
15699
15778
  var key = fieldName;
15700
15779
  var fieldValue = joinedWarning[key];
15701
- if (Array.isArray(fieldValue)) {
15702
- if (!fieldValue.length || fieldValue[0].geoJSON === null) {
15703
- return warningDetail;
15704
- }
15705
- }
15706
- if (fieldValue) {
15780
+ if (key === 'areas' || fieldValue) {
15707
15781
  var _Object$assign;
15708
15782
  return Object.assign({}, warningDetail, (_Object$assign = {}, _Object$assign[key] = fieldValue, _Object$assign));
15709
15783
  }
@@ -15886,7 +15960,7 @@ var probablityOptions = [{
15886
15960
  name: '60 - 90',
15887
15961
  value: 60
15888
15962
  }, {
15889
- name: '100',
15963
+ name: '90 - 100',
15890
15964
  value: 100
15891
15965
  }];
15892
15966
  var getWarningTitle = function getWarningTitle(status, areas, index, t) {
@@ -15924,12 +15998,18 @@ var WarningEventItem = function WarningEventItem(_ref) {
15924
15998
  isCompact = _ref.isCompact,
15925
15999
  _ref$isDeleteButtonDi = _ref.isDeleteButtonDisabled,
15926
16000
  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,
15927
16004
  onExpireWithdraw = _ref.onExpireWithdraw,
15928
16005
  onToggleCompact = _ref.onToggleCompact,
15929
16006
  onDeleteWarning = _ref.onDeleteWarning;
15930
16007
  var _React$useState = React.useState(null),
15931
16008
  menuAnchorEl = _React$useState[0],
15932
16009
  setMenuAnchorEl = _React$useState[1];
16010
+ var _React$useState2 = React.useState(null),
16011
+ menuMapAnchorEl = _React$useState2[0],
16012
+ setMenuMapAnchorEl = _React$useState2[1];
15933
16013
  var _useWarningsTranslati = useWarningsTranslation(),
15934
16014
  t = _useWarningsTranslati.t;
15935
16015
  var _useFormContext = useFormContext(),
@@ -15969,6 +16049,9 @@ var WarningEventItem = function WarningEventItem(_ref) {
15969
16049
  var _getValidationErrors2 = getValidationErrors(["warnings." + index + ".probability"], fieldErrors),
15970
16050
  hasProbabilityError = _getValidationErrors2.hasErrors,
15971
16051
  probabilityError = _getValidationErrors2.errors;
16052
+ var _getValidationErrors3 = getValidationErrors(["warnings." + index + ".areas"], fieldErrors),
16053
+ hasAreaError = _getValidationErrors3.hasErrors,
16054
+ areaError = _getValidationErrors3.errors;
15972
16055
  var revalidateOverlaps = React.useCallback(function () {
15973
16056
  var warnings = getValues('warnings');
15974
16057
  warnings.forEach(function (_warning, warningIndex) {
@@ -16000,6 +16083,76 @@ var WarningEventItem = function WarningEventItem(_ref) {
16000
16083
  }
16001
16084
  };
16002
16085
  }, [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]);
16003
16156
  // Until we implement the full validation, set every field to be required when publishing
16004
16157
  var _useDraftFormHelpers = useDraftFormHelpers(),
16005
16158
  isRequired = _useDraftFormHelpers.isRequired,
@@ -16018,9 +16171,8 @@ var WarningEventItem = function WarningEventItem(_ref) {
16018
16171
  var onWithdraw = function onWithdraw() {
16019
16172
  onExpireWithdraw(PublicWarningStatus.WITHDRAWN, index);
16020
16173
  };
16021
- var readOnlyWarning = isReadOnly || warningStatus === PublicWarningStatus.EXPIRED || warningStatus === PublicWarningStatus.WITHDRAWN || eventStatus === PublicWarningStatus.EXPIRED || eventStatus === PublicWarningStatus.WITHDRAWN;
16022
16174
  var warningTitle = getWarningTitle(status, warningAreas, index, t);
16023
- var mapTitle = (warningAreas == null || (_warningAreas$2 = warningAreas[0]) == null ? void 0 : _warningAreas$2.objectName) || undefined;
16175
+ var mapTitle = (selectedDrawing == null ? void 0 : selectedDrawing.objectName) || (warningAreas == null || (_warningAreas$4 = warningAreas[0]) == null ? void 0 : _warningAreas$4.objectName) || undefined;
16024
16176
  return jsxs(Fragment, {
16025
16177
  children: [isCompact ? jsxs(Box, {
16026
16178
  sx: {
@@ -16049,7 +16201,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
16049
16201
  sx: {
16050
16202
  fontSize: 14,
16051
16203
  flexShrink: 0,
16052
- width: "" + (hasValidationErrors || hasProbabilityError ? '93px' : '125px'),
16204
+ width: "" + (hasValidationErrors || hasProbabilityError || hasAreaError ? '93px' : '125px'),
16053
16205
  display: '-webkit-box',
16054
16206
  WebkitLineClamp: 2,
16055
16207
  WebkitBoxOrient: 'vertical',
@@ -16059,11 +16211,13 @@ var WarningEventItem = function WarningEventItem(_ref) {
16059
16211
  },
16060
16212
  children: warningTitle
16061
16213
  })
16062
- }), !!(hasValidationErrors || hasProbabilityError) && jsx(CustomTooltip, {
16214
+ }), !!(hasValidationErrors || hasProbabilityError || hasAreaError) && jsx(CustomTooltip, {
16063
16215
  title: t('warning-event-validation-warning-incomplete') + ": " + validationErrors.map(function (validationError) {
16064
16216
  return "" + validationError.message;
16065
16217
  }) + " " + probabilityError.map(function (validationError) {
16066
16218
  return "" + t('warning-event-validation-propbability-collapsed');
16219
+ }) + areaError.map(function (validationError) {
16220
+ return ", " + t('warning-event-validation-area-missing');
16067
16221
  }),
16068
16222
  children: jsx("span", {
16069
16223
  children: jsx(Info, {
@@ -16080,7 +16234,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
16080
16234
  },
16081
16235
  children: jsx(WarningsMapView, {
16082
16236
  defaultMapPreset: defaultMapPreset,
16083
- geojsonFeature: (warningAreas == null || (_warningAreas$3 = warningAreas[0]) == null ? void 0 : _warningAreas$3.geoJSON) || undefined,
16237
+ geojsonFeature: displayedGeoJSON,
16084
16238
  isSnapshot: isSnapshot,
16085
16239
  showMapMousePosition: false,
16086
16240
  showZoomControls: false,
@@ -16167,7 +16321,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
16167
16321
  },
16168
16322
  children: jsx(ReactHookFormSelect, {
16169
16323
  disabled: readOnlyWarning,
16170
- label: t('warning-probability'),
16324
+ label: t('warning-event-probability'),
16171
16325
  name: "warnings." + index + ".probability",
16172
16326
  rules: {
16173
16327
  validate: {
@@ -16294,9 +16448,33 @@ var WarningEventItem = function WarningEventItem(_ref) {
16294
16448
  height: 200,
16295
16449
  position: 'relative'
16296
16450
  },
16297
- children: [jsx(WarningsMapView, {
16451
+ children: [!!hasAreaError && jsx(Box, {
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,
16298
16475
  defaultMapPreset: defaultMapPreset,
16299
- geojsonFeature: (warningAreas == null || (_warningAreas$4 = warningAreas[0]) == null ? void 0 : _warningAreas$4.geoJSON) || undefined,
16476
+ geojsonFeature: displayedGeoJSON,
16477
+ hoverSelect: hoverSelect,
16300
16478
  isSnapshot: isSnapshot,
16301
16479
  showMapMousePosition: false,
16302
16480
  size: {
@@ -16308,7 +16486,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
16308
16486
  // Only show drawing loader on first warning
16309
16487
  index === 0 && jsx(CustomIconButton, {
16310
16488
  isSelected: false,
16311
- onClick: function onClick() {},
16489
+ onClick: onAddDrawing,
16312
16490
  sx: {
16313
16491
  position: 'absolute',
16314
16492
  left: 8,
@@ -16320,7 +16498,9 @@ var WarningEventItem = function WarningEventItem(_ref) {
16320
16498
  children: jsx(Polygons, {})
16321
16499
  }), jsx(CustomIconButton, {
16322
16500
  isSelected: false,
16323
- onClick: function onClick() {},
16501
+ onClick: function onClick(e) {
16502
+ return setMenuMapAnchorEl(e.currentTarget);
16503
+ },
16324
16504
  sx: {
16325
16505
  position: 'absolute',
16326
16506
  left: 8,
@@ -16330,6 +16510,67 @@ var WarningEventItem = function WarningEventItem(_ref) {
16330
16510
  tooltipTitle: t('warning-event-button-assign-object'),
16331
16511
  variant: "tool",
16332
16512
  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
+ })
16333
16574
  })]
16334
16575
  })]
16335
16576
  }), !!mapTitle && jsx(Box, {
@@ -16368,7 +16609,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
16368
16609
  height: '100%'
16369
16610
  },
16370
16611
  children: [jsx(CustomIconButton, {
16371
- disabled: readOnlyWarning,
16612
+ disabled: true,
16372
16613
  isSelected: false,
16373
16614
  onClick: function onClick() {},
16374
16615
  sx: {
@@ -16378,7 +16619,7 @@ var WarningEventItem = function WarningEventItem(_ref) {
16378
16619
  variant: "flat",
16379
16620
  children: jsx(DrawPolygon, {})
16380
16621
  }), jsx(CustomIconButton, {
16381
- disabled: readOnlyWarning,
16622
+ disabled: true,
16382
16623
  isSelected: false,
16383
16624
  onClick: function onClick() {},
16384
16625
  sx: {
@@ -16410,6 +16651,19 @@ var WarningEventItem = function WarningEventItem(_ref) {
16410
16651
  })
16411
16652
  })]
16412
16653
  })]
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
+ }
16413
16667
  }), jsx(ReactHookFormHiddenInput, {
16414
16668
  name: "warnings." + index + ".validFrom",
16415
16669
  rules: {
@@ -16460,8 +16714,8 @@ var WarningEventItem = function WarningEventItem(_ref) {
16460
16714
  };
16461
16715
 
16462
16716
  var SUMMARY_HEADLINE_LIMIT = 150;
16463
- var SUMMARY_CONCISE_SUMMARY_LIMIT = 500;
16464
- var SUMMARY_DESCRIPTION_LIMIT = 1500;
16717
+ var SUMMARY_CONCISE_SUMMARY_LIMIT = 1500;
16718
+ var SUMMARY_DESCRIPTION_LIMIT = 2500;
16465
16719
  var SUMMARY_TEXT_FIELDS = ['headlineOriginal', 'headlineTranslation', 'conciseSummaryOriginal', 'conciseSummaryTranslation', 'descriptionOriginal', 'descriptionTranslation'];
16466
16720
  var RemainingChars = function RemainingChars(_ref) {
16467
16721
  var _useWatch;
@@ -16780,7 +17034,7 @@ var WarningEventSummaryForm = function WarningEventSummaryForm(_ref2) {
16780
17034
  textTransform: 'none',
16781
17035
  fontSize: '12px'
16782
17036
  },
16783
- title: t('warning-event-summary-dialog-clear-button'),
17037
+ title: t('warning-event-summary-dialog-clear-button-title'),
16784
17038
  variant: "tertiary",
16785
17039
  children: t('warning-event-summary-dialog-clear-button')
16786
17040
  }), jsx(Button, {
@@ -16789,7 +17043,7 @@ var WarningEventSummaryForm = function WarningEventSummaryForm(_ref2) {
16789
17043
  textTransform: 'none',
16790
17044
  fontSize: '12px'
16791
17045
  },
16792
- title: t('warning-event-summary-dialog-OK-button'),
17046
+ title: t('warning-event-summary-dialog-OK-button-title'),
16793
17047
  variant: "primary",
16794
17048
  children: t('warning-event-summary-dialog-OK-button')
16795
17049
  })]
@@ -16836,6 +17090,8 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
16836
17090
  isDefaultCollapsed = _ref$isDefaultCollaps === void 0 ? false : _ref$isDefaultCollaps,
16837
17091
  _ref$onCancel = _ref.onCancel,
16838
17092
  onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
17093
+ _ref$onAddDrawing = _ref.onAddDrawing,
17094
+ onAddDrawing = _ref$onAddDrawing === void 0 ? function () {} : _ref$onAddDrawing,
16839
17095
  _ref$onChangeFormMode = _ref.onChangeFormMode,
16840
17096
  onChangeFormMode = _ref$onChangeFormMode === void 0 ? function () {} : _ref$onChangeFormMode,
16841
17097
  _ref$onDelete = _ref.onDelete,
@@ -16874,6 +17130,7 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
16874
17130
  }()) : _ref$onPublish,
16875
17131
  _ref$isSummaryDialogO = _ref.isSummaryDialogOpen,
16876
17132
  isSummaryDialogOpen = _ref$isSummaryDialogO === void 0 ? false : _ref$isSummaryDialogO,
17133
+ selectedDrawing = _ref.selectedDrawing,
16877
17134
  selectedEvent = _ref.selectedEvent;
16878
17135
  var _useWarningsTranslati = useWarningsTranslation(),
16879
17136
  t = _useWarningsTranslati.t;
@@ -16937,26 +17194,38 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
16937
17194
  React.useEffect(function () {
16938
17195
  // sync redux with react-hook-form
16939
17196
  reset(getFormData(selectedEvent));
16940
- // TODO once we implement areas
16941
- // setOriginalWarningAreas(publicWarningDetails?.areas);
16942
17197
  }, [eventId, reset, selectedEvent]);
16943
17198
  // When the editor gets set back to viewer and the form is dirty, reset any changes made
16944
17199
  React.useEffect(function () {
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
- // }
17200
+ if (isReadOnly && Object.keys(dirtyFields).length > 0) {
17201
+ reset(getFormData(selectedEvent));
16957
17202
  }
16958
17203
  // eslint-disable-next-line react-hooks/exhaustive-deps
16959
17204
  }, [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]);
16960
17229
  var warningEventType = useWatch({
16961
17230
  control: control,
16962
17231
  name: 'warningEventType'
@@ -17028,9 +17297,9 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
17028
17297
  deleteCount = _React$useState5[0],
17029
17298
  setDeleteCount = _React$useState5[1];
17030
17299
  var onAddWarning = function onAddWarning() {
17031
- var _getValues;
17300
+ var _getValues3;
17032
17301
  var newWarning = buildDefaultWarningItem(getValues());
17033
- var firstFinalisedIndex = ((_getValues = getValues('warnings')) != null ? _getValues : []).findIndex(isWarningFinalised);
17302
+ var firstFinalisedIndex = ((_getValues3 = getValues('warnings')) != null ? _getValues3 : []).findIndex(isWarningFinalised);
17034
17303
  if (firstFinalisedIndex === -1) {
17035
17304
  append(newWarning);
17036
17305
  return;
@@ -17045,11 +17314,11 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
17045
17314
  };
17046
17315
  // re-validate after the removal commits, react-hook-form shifts errors up
17047
17316
  React.useEffect(function () {
17048
- var _getValues2;
17317
+ var _getValues4;
17049
17318
  if (!deleteCount) {
17050
17319
  return;
17051
17320
  }
17052
- var remainingWarnings = (_getValues2 = getValues('warnings')) != null ? _getValues2 : [];
17321
+ var remainingWarnings = (_getValues4 = getValues('warnings')) != null ? _getValues4 : [];
17053
17322
  remainingWarnings.forEach(function (_warning, index) {
17054
17323
  void trigger("warnings." + index + ".validUntil");
17055
17324
  });
@@ -17153,7 +17422,6 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
17153
17422
  var onChangeMode = function onChangeMode() {
17154
17423
  onChangeFormMode(!isReadOnly);
17155
17424
  };
17156
- // Until we implement the full validation, set every field to be required when publishing
17157
17425
  var _useDraftFormHelpers2 = useDraftFormHelpers(),
17158
17426
  _isRequired = _useDraftFormHelpers2.isRequired;
17159
17427
  var disabledWarningDeleteButton = fields.length <= 1;
@@ -17487,11 +17755,13 @@ var WarningEventFormContent = function WarningEventFormContent(_ref) {
17487
17755
  isDeleteButtonDisabled: disabledWarningDeleteButton,
17488
17756
  isReadOnly: isReadOnly,
17489
17757
  isSnapshot: isSnapshot,
17758
+ onAddDrawing: onAddDrawing,
17490
17759
  onDeleteWarning: onDeleteWarning,
17491
17760
  onExpireWithdraw: onExpireWithdraw,
17492
17761
  onToggleCompact: function onToggleCompact() {
17493
17762
  return toggleCompact(field.id);
17494
- }
17763
+ },
17764
+ selectedDrawing: selectedDrawing
17495
17765
  })
17496
17766
  }, field.id);
17497
17767
  })
@@ -17798,8 +18068,11 @@ var WarningEventFormDialogContent = function WarningEventFormDialogContent(_ref)
17798
18068
  size = _ref.size,
17799
18069
  source = _ref.source,
17800
18070
  startPosition = _ref.startPosition,
18071
+ selectedDrawing = _ref.selectedDrawing,
17801
18072
  onClose = _ref.onClose,
17802
18073
  onMouseDown = _ref.onMouseDown,
18074
+ _ref$onAddDrawing = _ref.onAddDrawing,
18075
+ onAddDrawing = _ref$onAddDrawing === void 0 ? function () {} : _ref$onAddDrawing,
17803
18076
  _ref$onChangeFormMode = _ref.onChangeFormMode,
17804
18077
  onChangeFormMode = _ref$onChangeFormMode === void 0 ? function () {} : _ref$onChangeFormMode,
17805
18078
  _ref$onDelete = _ref.onDelete,
@@ -17904,6 +18177,7 @@ var WarningEventFormDialogContent = function WarningEventFormDialogContent(_ref)
17904
18177
  isReadOnly: isReadOnly,
17905
18178
  isSnapshot: isSnapshot,
17906
18179
  isSummaryDialogOpen: isSummaryOpen,
18180
+ onAddDrawing: onAddDrawing,
17907
18181
  onCancel: closeDialog,
17908
18182
  onChangeFormMode: onChangeFormMode,
17909
18183
  onDelete: onDelete,
@@ -17911,6 +18185,7 @@ var WarningEventFormDialogContent = function WarningEventFormDialogContent(_ref)
17911
18185
  onOpenWarningSummary: onOpenSummary,
17912
18186
  onPublish: onPublish,
17913
18187
  onSaveDraft: onSaveDraft,
18188
+ selectedDrawing: selectedDrawing,
17914
18189
  selectedEvent: selectedEvent,
17915
18190
  shouldHideFormToggleMode: shouldHideFormToggleMode
17916
18191
  })
@@ -17948,40 +18223,6 @@ var WarningEventFormDialog = function WarningEventFormDialog(_ref5) {
17948
18223
  });
17949
18224
  };
17950
18225
 
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
-
17985
18226
  var _excluded$4 = ["expandedSections", "hoveredWarningIds", "hiddenWarningIds"];
17986
18227
  var getWarningsFilters = function getWarningsFilters(store) {
17987
18228
  if (store != null && store.warningsFilters) {
@@ -18058,6 +18299,7 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
18058
18299
  var selectedEventId = useSelector(getSelectedEventId);
18059
18300
  var previousSelectedEventId = usePrevious(selectedEventId);
18060
18301
  var isFormDirty = useSelector(getWarningsEventIsFormDirty);
18302
+ var selectedDrawing = useSelector(getWarningsEventSelectedDrawing);
18061
18303
  var savedFilterState = useSelector(getWarningsFilterById);
18062
18304
  var eventState = useSelector(getWarningEvent);
18063
18305
  var _ref2 = eventState || {},
@@ -18106,6 +18348,12 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
18106
18348
  }));
18107
18349
  onCloseDialogSummary();
18108
18350
  };
18351
+ var closeAreaDrawingLoader = function closeAreaDrawingLoader() {
18352
+ dispatch(uiActions.setToggleOpenDialog({
18353
+ type: uiTypes.DialogTypes.AreaDrawingLoader,
18354
+ setOpen: false
18355
+ }));
18356
+ };
18109
18357
  var onFormDirty = function onFormDirty(isFormDirty) {
18110
18358
  dispatch(warningsEventFormActions.setFormDirty({
18111
18359
  isFormDirty: isFormDirty
@@ -18291,6 +18539,7 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
18291
18539
  dispatch(warningsEventFormActions.setFormValues({
18292
18540
  formState: isReadOnly ? 'readonly' : ''
18293
18541
  }));
18542
+ closeAreaDrawingLoader();
18294
18543
  case 1:
18295
18544
  return _context5.a(2);
18296
18545
  }
@@ -18348,6 +18597,12 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
18348
18597
  void setIsEditor(isReadOnly);
18349
18598
  }
18350
18599
  };
18600
+ var onAddDrawing = function onAddDrawing() {
18601
+ dispatch(uiActions.setToggleOpenDialog({
18602
+ type: uiTypes.DialogTypes.AreaDrawingLoader,
18603
+ setOpen: true
18604
+ }));
18605
+ };
18351
18606
  // Readonly in case you are not creating a new warning and you are not set as the editor
18352
18607
  var isReadOnly = formState === 'readonly' || !isEditor && status !== undefined;
18353
18608
  // Remove any errors when switching events
@@ -18366,11 +18621,13 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
18366
18621
  isOpen: isDialogOpen,
18367
18622
  isReadOnly: isReadOnly,
18368
18623
  isSummaryOpen: isDialogOpenSummary,
18624
+ onAddDrawing: onAddDrawing,
18369
18625
  onAddSummary: onAddSummary,
18370
18626
  onChangeFormMode: onChangeFormMode,
18371
18627
  onClose: function onClose() {
18372
- onCloseDialog();
18373
18628
  onCloseDialogSummary();
18629
+ closeAreaDrawingLoader();
18630
+ onCloseDialog();
18374
18631
  },
18375
18632
  onCloseSummary: onCloseDialogSummary,
18376
18633
  onDelete: onDeleteDraft,
@@ -18381,6 +18638,7 @@ var WarningEventDialogConnect = function WarningEventDialogConnect(_ref) {
18381
18638
  onPublish: onPublishForm,
18382
18639
  onSaveDraft: onSaveDraft,
18383
18640
  order: dialogOrder,
18641
+ selectedDrawing: selectedDrawing,
18384
18642
  selectedEvent: event,
18385
18643
  shouldHideFormToggleMode: shouldHideFormToggleMode,
18386
18644
  size: size,
@@ -19950,7 +20208,6 @@ var ExpandableFilterChip = function ExpandableFilterChip(_ref) {
19950
20208
  };
19951
20209
 
19952
20210
  var TimeFilterChip = function TimeFilterChip(_ref) {
19953
- var _getPickerValue;
19954
20211
  var timeFilter = _ref.timeFilter,
19955
20212
  onUpdateTimeFilter = _ref.onUpdateTimeFilter;
19956
20213
  var _useWarningsTranslati = useWarningsTranslation(),
@@ -19981,7 +20238,6 @@ var TimeFilterChip = function TimeFilterChip(_ref) {
19981
20238
  onUpdateTimeFilter(newFilter);
19982
20239
  };
19983
20240
  var handleTempTimeChange = function handleTempTimeChange(field, value) {
19984
- var _dateUtils$setUTCDate;
19985
20241
  if (!value) {
19986
20242
  if (field === 'customStart') {
19987
20243
  setTempCustomStart(undefined);
@@ -19990,20 +20246,13 @@ var TimeFilterChip = function TimeFilterChip(_ref) {
19990
20246
  }
19991
20247
  return;
19992
20248
  }
19993
- var isoString = (_dateUtils$setUTCDate = dateUtils.setUTCDate(value)) == null ? void 0 : _dateUtils$setUTCDate.toISOString();
20249
+ var isoString = value.toISOString();
19994
20250
  if (field === 'customStart') {
19995
20251
  setTempCustomStart(isoString);
19996
20252
  } else {
19997
20253
  setTempCustomEnd(isoString);
19998
20254
  }
19999
20255
  };
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
- };
20007
20256
  var handleApply = function handleApply() {
20008
20257
  onUpdateTimeFilter({
20009
20258
  mode: TimeFilterMode.custom,
@@ -20156,88 +20405,51 @@ var TimeFilterChip = function TimeFilterChip(_ref) {
20156
20405
  flexDirection: 'column',
20157
20406
  gap: 2
20158
20407
  },
20159
- children: [jsxs(LocalizationProvider, {
20160
- dateAdapter: AdapterDateFns,
20161
- children: [jsxs(Box, {
20408
+ children: [jsxs(Box, {
20409
+ sx: {
20410
+ display: 'flex',
20411
+ justifyContent: 'space-between',
20412
+ alignItems: 'center'
20413
+ },
20414
+ children: [jsx(Typography, {
20162
20415
  sx: {
20163
- display: 'flex',
20164
- justifyContent: 'space-between',
20165
- alignItems: 'center'
20416
+ mr: 1
20166
20417
  },
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, {
20418
+ children: t('filter-start')
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
+ }
20428
+ },
20429
+ value: pickerStartValue ? new Date(pickerStartValue) : new Date(Date.now())
20430
+ })]
20431
+ }), jsxs(Box, {
20432
+ sx: {
20433
+ display: 'flex',
20434
+ justifyContent: 'space-between',
20435
+ alignItems: 'center'
20436
+ },
20437
+ children: [jsx(Typography, {
20202
20438
  sx: {
20203
- display: 'flex',
20204
- justifyContent: 'space-between',
20205
- alignItems: 'center'
20439
+ mr: 1
20206
20440
  },
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
- })]
20441
+ children: t('filter-end')
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
+ }
20451
+ },
20452
+ value: pickerEndValue ? new Date(pickerEndValue) : null
20241
20453
  })]
20242
20454
  }), jsx(Box, {
20243
20455
  sx: {
@@ -20882,12 +21094,19 @@ var getSelectedFormAreaIds = function getSelectedFormAreaIds(selectedFormWarning
20882
21094
  return Boolean(areaId);
20883
21095
  }));
20884
21096
  };
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
+ };
20885
21103
  var shouldExcludeWarningFromFeatureSync = function shouldExcludeWarningFromFeatureSync(_ref) {
20886
21104
  var hiddenWarningIds = _ref.hiddenWarningIds,
20887
21105
  hasMatchingAreaId = _ref.hasMatchingAreaId,
20888
21106
  selectedWarningId = _ref.selectedWarningId,
20889
- warningIds = _ref.warningIds;
20890
- return warningIds.includes(selectedWarningId != null ? selectedWarningId : '') || hasMatchingAreaId || warningIds.some(function (warningId) {
21107
+ warningIds = _ref.warningIds,
21108
+ selectedFormWarning = _ref.selectedFormWarning;
21109
+ return !isUnsavedAviationCopy(selectedFormWarning) && (warningIds.includes(selectedWarningId != null ? selectedWarningId : '') || hasMatchingAreaId) || warningIds.some(function (warningId) {
20891
21110
  return hiddenWarningIds.has(warningId);
20892
21111
  });
20893
21112
  };
@@ -20953,6 +21172,7 @@ var useWarningListFeatureSync = function useWarningListFeatureSync(_ref) {
20953
21172
  if (shouldExcludeWarningFromFeatureSync({
20954
21173
  hiddenWarningIds: hiddenWarningIds,
20955
21174
  hasMatchingAreaId: hasMatchingAreaId,
21175
+ selectedFormWarning: selectedFormWarning,
20956
21176
  selectedWarningId: selectedWarningId,
20957
21177
  warningIds: warningIds
20958
21178
  })) {
@@ -20976,7 +21196,7 @@ var useWarningListFeatureSync = function useWarningListFeatureSync(_ref) {
20976
21196
  }).filter(function (feature) {
20977
21197
  return !!feature.id;
20978
21198
  });
20979
- }, [filteredWarningsByExpandedSections, hiddenWarningIds, selectedFormAreaIds, selectedWarningId]);
21199
+ }, [filteredWarningsByExpandedSections, hiddenWarningIds, selectedFormAreaIds, selectedFormWarning, selectedWarningId]);
20980
21200
  useRegisterFeatureSyncSource(panelId);
20981
21201
  var warningFeatureCollection = React.useMemo(function () {
20982
21202
  return createWarningFeatureCollection(allFeatures);
@@ -23454,8 +23674,10 @@ var drawingListJSON = [
23454
23674
  stroke: "#ff7800",
23455
23675
  "stroke-width": 2,
23456
23676
  "stroke-opacity": 1,
23457
- selectionType: "poly"
23677
+ selectionType: "poly",
23678
+ objectName: "Object 1"
23458
23679
  },
23680
+ id: "object-1",
23459
23681
  geometry: {
23460
23682
  type: "Polygon",
23461
23683
  coordinates: [
@@ -23479,6 +23701,62 @@ var drawingListJSON = [
23479
23701
  ]
23480
23702
  ]
23481
23703
  }
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
+ }
23482
23760
  }
23483
23761
  ]
23484
23762
  }
@@ -114758,7 +115036,7 @@ var warningEventsListJSON = [
114758
115036
  status: "DRAFT_PUBLISHED",
114759
115037
  areas: [
114760
115038
  {
114761
- objectName: "low temp 1",
115039
+ objectName: "Coastal zone north",
114762
115040
  geoJSON: {
114763
115041
  type: "FeatureCollection",
114764
115042
  features: [
@@ -114794,8 +115072,10 @@ var warningEventsListJSON = [
114794
115072
  "stroke-width": 2,
114795
115073
  selectionType: "poly",
114796
115074
  warning_level: "1",
114797
- "stroke-opacity": 1
114798
- }
115075
+ "stroke-opacity": 1,
115076
+ objectName: "Coastal zone north"
115077
+ },
115078
+ id: "drawing-storm-ciaran-object-1"
114799
115079
  }
114800
115080
  ]
114801
115081
  }
@@ -114809,7 +115089,92 @@ var warningEventsListJSON = [
114809
115089
  authority: "KNMI",
114810
115090
  incident: "Storm Ciaran"
114811
115091
  }
114812
- ]
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
+ }
114813
115178
  },
114814
115179
  {
114815
115180
  status: "PUBLISHED",
@@ -114838,7 +115203,7 @@ var warningEventsListJSON = [
114838
115203
  status: "PUBLISHED",
114839
115204
  areas: [
114840
115205
  {
114841
- objectName: "wind test name",
115206
+ objectName: "Coastal zone west",
114842
115207
  geoJSON: {
114843
115208
  type: "FeatureCollection",
114844
115209
  features: [
@@ -114914,8 +115279,10 @@ var warningEventsListJSON = [
114914
115279
  "stroke-width": 2,
114915
115280
  selectionType: "poly",
114916
115281
  warning_level: "1",
114917
- "stroke-opacity": 1
114918
- }
115282
+ "stroke-opacity": 1,
115283
+ objectName: "Coastal zone west"
115284
+ },
115285
+ id: "drawing-storm-coastal-object-1"
114919
115286
  }
114920
115287
  ]
114921
115288
  }
@@ -114937,7 +115304,7 @@ var warningEventsListJSON = [
114937
115304
  status: "PUBLISHED",
114938
115305
  areas: [
114939
115306
  {
114940
- objectName: "test name",
115307
+ objectName: "IJsselmeer",
114941
115308
  geoJSON: {
114942
115309
  type: "FeatureCollection",
114943
115310
  features: [
@@ -115005,8 +115372,10 @@ var warningEventsListJSON = [
115005
115372
  "stroke-width": 2,
115006
115373
  selectionType: "poly",
115007
115374
  warning_level: "1",
115008
- "stroke-opacity": 1
115009
- }
115375
+ "stroke-opacity": 1,
115376
+ objectName: "IJsselmeer"
115377
+ },
115378
+ id: "drawing-storm-coastal-object-2"
115010
115379
  }
115011
115380
  ]
115012
115381
  }
@@ -115021,7 +115390,201 @@ var warningEventsListJSON = [
115021
115390
  authority: "KNMI",
115022
115391
  incident: "Storm "
115023
115392
  }
115024
- ]
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
+ }
115025
115588
  },
115026
115589
  {
115027
115590
  status: "EXPIRED",
@@ -115050,7 +115613,7 @@ var warningEventsListJSON = [
115050
115613
  phenomenon: "thunderstorm",
115051
115614
  areas: [
115052
115615
  {
115053
- objectName: "test name",
115616
+ objectName: "Inland north",
115054
115617
  geoJSON: {
115055
115618
  type: "FeatureCollection",
115056
115619
  features: [
@@ -115085,8 +115648,10 @@ var warningEventsListJSON = [
115085
115648
  "fill-opacity": 0.2,
115086
115649
  "stroke-width": 2,
115087
115650
  selectionType: "poly",
115088
- "stroke-opacity": 1
115089
- }
115651
+ "stroke-opacity": 1,
115652
+ objectName: "Inland north"
115653
+ },
115654
+ id: "drawing-storm-marcel-object-1"
115090
115655
  }
115091
115656
  ]
115092
115657
  }
@@ -115107,7 +115672,7 @@ var warningEventsListJSON = [
115107
115672
  phenomenon: "thunderstorm",
115108
115673
  areas: [
115109
115674
  {
115110
- objectName: "test name",
115675
+ objectName: "Inland east",
115111
115676
  geoJSON: {
115112
115677
  type: "FeatureCollection",
115113
115678
  features: [
@@ -115175,8 +115740,10 @@ var warningEventsListJSON = [
115175
115740
  "stroke-width": 2,
115176
115741
  selectionType: "poly",
115177
115742
  warning_level: "1",
115178
- "stroke-opacity": 1
115179
- }
115743
+ "stroke-opacity": 1,
115744
+ objectName: "Inland east"
115745
+ },
115746
+ id: "drawing-storm-marcel-object-2"
115180
115747
  }
115181
115748
  ]
115182
115749
  }
@@ -115198,7 +115765,7 @@ var warningEventsListJSON = [
115198
115765
  phenomenon: "thunderstorm",
115199
115766
  areas: [
115200
115767
  {
115201
- objectName: "test name 3",
115768
+ objectName: "Inland south",
115202
115769
  geoJSON: {
115203
115770
  type: "FeatureCollection",
115204
115771
  features: [
@@ -115233,8 +115800,10 @@ var warningEventsListJSON = [
115233
115800
  "fill-opacity": 0.2,
115234
115801
  "stroke-width": 2,
115235
115802
  selectionType: "poly",
115236
- "stroke-opacity": 1
115237
- }
115803
+ "stroke-opacity": 1,
115804
+ objectName: "Inland south"
115805
+ },
115806
+ id: "drawing-storm-marcel-object-3"
115238
115807
  }
115239
115808
  ]
115240
115809
  }
@@ -115248,7 +115817,196 @@ var warningEventsListJSON = [
115248
115817
  authority: "KNMI",
115249
115818
  incident: "Storm Marcel"
115250
115819
  }
115251
- ]
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
+ }
115252
116010
  }
115253
116011
  ];
115254
116012