@opengeoweb/warnings 9.26.0 → 9.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +1008 -389
- package/package.json +5 -2
- package/src/lib/components/AreaObjectLoader/AreasObjects.d.ts +1 -0
- package/src/lib/components/FilterList/FilterList.d.ts +4 -0
- package/src/lib/components/PublicWarningList/PublicWarningList.d.ts +5 -11
- package/src/lib/components/PublicWarningList/PublicWarningListConnect.published.integration.spec.d.ts +1 -0
- package/src/lib/components/PublicWarningList/PublicWarningListConnect.stories.d.ts +0 -1
- package/src/lib/components/PublicWarningList/WarningListItem.d.ts +25 -0
- package/src/lib/components/PublicWarningList/WarningListItemSeperator.d.ts +8 -0
- package/src/lib/components/PublicWarningsForm/LevelField/LevelField.d.ts +3 -3
- package/src/lib/components/PublicWarningsForm/PhenomenonField/PhenomenonField.d.ts +5 -5
- package/src/lib/store/publicWarningForm/types.d.ts +11 -1
- package/src/lib/store/publicWarnings/types.d.ts +5 -0
- package/src/lib/utils/sig-airmet-util.d.ts +5 -0
package/index.esm.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useDispatch, useSelector } from 'react-redux';
|
|
3
|
-
import { Polygons, Share, ExitDomain, Edit, Delete, CoastalEvent, TemperatureLow, TemperatureHigh, Rain, Snow, Lightning, Fog, Wind, DrawPolygon, Visibility, Add, breakpoints, Close, Options, Copy, Success, Expire, Remove } from '@opengeoweb/theme';
|
|
3
|
+
import { Polygons, Share, ExitDomain, Edit, Delete, CoastalEvent, TemperatureLow, TemperatureHigh, Rain, Snow, Lightning, Fog, Wind, Thunderstorm, VulcanicEruption, Haze, FreezingPrecipitation, ModerateAircraftIcing, SevereAircraftIcing, ModerateTurbulence, SevereTurbulence, SandStorm, RadioactiveMaterials, DrawPolygon, Visibility, Add, breakpoints, Close, Options, Copy, Success, Expire, Remove } from '@opengeoweb/theme';
|
|
4
4
|
import { uiTypes, uiActions, getSingularDrawtoolDrawLayerId, drawtoolSelectors, layerSelectors, uiSelectors, mapStoreActions, drawtoolActions, layerActions, useSetupDialog } from '@opengeoweb/store';
|
|
5
5
|
import { defaultPolygon, emptyGeoJSON, MapControlButton, getIcon, rewindGeometry, getGeoJSONPropertyValue, currentlySupportedDrawModes, MapView, MapViewLayer, defaultLayers, getFeatureExtent } from '@opengeoweb/webmap-react';
|
|
6
|
-
import { SHARED_NAMESPACE, useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, CustomToggleButton, Filter, getPosition, FilterChip, FilterListItem, FilterLabel,
|
|
6
|
+
import { SHARED_NAMESPACE, useConfirmationDialog, ToggleMenu, dateUtils, calculateStartSize, ToolContainerDraggable, AlertBanner, ConfirmationDialog, getAxiosErrorMessage, usePrevious, CustomIconButton, CustomTooltip, Avatar, getInitials, SwitchButton, CustomToggleButton, Filter, getPosition, FilterChip, FilterListItem, FilterLabel, StatusTag, LastUpdateTime, ErrorBoundary, pollingIntervalTimeout, isAxiosError as isAxiosError$1 } from '@opengeoweb/shared';
|
|
7
7
|
import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf } from '@reduxjs/toolkit';
|
|
8
8
|
import i18n from 'i18next';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
import '@opengeoweb/core';
|
|
11
11
|
import { FORM_FIELDS_NAMESPACE, useDraftFormHelpers, ReactHookFormSelect, ReactHookFormHiddenInput, isValidGeoJsonCoordinates, ReactHookFormTextField, ReactHookFormProvider, defaultFormOptions, errorMessages, ReactHookFormDateTime, isXHoursBefore, isXHoursAfter, isEmpty } from '@opengeoweb/form-fields';
|
|
12
|
+
import { generateMapId, LayerType, getWMJSMapById, getGeoCoordFromLatLong, WMBBOX } from '@opengeoweb/webmap';
|
|
12
13
|
import { snackbarActions } from '@opengeoweb/snackbar';
|
|
13
14
|
import * as React from 'react';
|
|
14
15
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
15
|
-
import { styled, Box, Typography, ListItem, Grid, Paper, ListItemButton, Stack, LinearProgress, Button, MenuItem, ListItemIcon, FormHelperText, Tabs, Tab, Card, CardContent, CircularProgress, Menu, DialogTitle, DialogContent, Switch
|
|
16
|
+
import { styled, Box, Typography, ListItem, Grid, Paper, ListItemButton, Stack, LinearProgress, Button, MenuItem, ListItemIcon, FormHelperText, Tabs, Tab, Card, CardContent, CircularProgress, Menu, DialogTitle, DialogContent, Switch } from '@mui/material';
|
|
16
17
|
import { VariableSizeList } from 'react-window';
|
|
17
18
|
import AutoSizer from 'react-virtualized-auto-sizer';
|
|
18
|
-
import { getApi, createApiInstance, createNonAuthApiInstance, createFakeApiInstance, ApiProvider } from '@opengeoweb/api';
|
|
19
|
+
import { getApi, createApiInstance, createNonAuthApiInstance, createFakeApiInstance, ApiProvider, ProductStatus, useAirmetList, useSigmetList } from '@opengeoweb/api';
|
|
19
20
|
import { useFormContext } from 'react-hook-form';
|
|
20
21
|
import { isEqual, cloneDeep, clamp } from 'lodash';
|
|
21
22
|
import { useAuthenticationContext } from '@opengeoweb/authentication';
|
|
22
23
|
import { produce } from 'immer';
|
|
23
|
-
import { generateMapId, LayerType, getWMJSMapById, getGeoCoordFromLatLong, WMBBOX } from '@opengeoweb/webmap';
|
|
24
24
|
import { isAxiosError } from 'axios';
|
|
25
25
|
|
|
26
26
|
var en = {
|
|
@@ -143,7 +143,44 @@ var en = {
|
|
|
143
143
|
"filter-phenomenon": "Phenomena",
|
|
144
144
|
"filter-level": "Levels",
|
|
145
145
|
"filter-source": "Sources",
|
|
146
|
-
"
|
|
146
|
+
"filter-hide": "Hide {{subject}}",
|
|
147
|
+
"filter-show": "Show {{subject}}",
|
|
148
|
+
airmet: "Airmet",
|
|
149
|
+
sigmet: "Sigmet",
|
|
150
|
+
"error-title-retry": "Try again",
|
|
151
|
+
"aviation-phenomenon-radioactive-cloud": "Radioactive cloud",
|
|
152
|
+
"aviation-phenomenon-heavy-sandstorm": "Heavy sandstorm",
|
|
153
|
+
"aviation-phenomenon-severe-turbulence": "Severe turbulence",
|
|
154
|
+
"aviation-phenomenon-moderate-turbulence": "Moderate turbulence",
|
|
155
|
+
"aviation-phenomenon-severe-ice": "Severe icing",
|
|
156
|
+
"aviation-phenomenon-moderate-ice": "Moderate icing",
|
|
157
|
+
"aviation-phenomenon-severe-ice-freezing-rain": "Severe icing due to freezing rain",
|
|
158
|
+
"aviation-phenomenon-heavy-dust-storm": "Heavy duststorm",
|
|
159
|
+
"aviation-phenomenon-volcanic-cloud": "Volcanic ash cloud",
|
|
160
|
+
"aviation-phenomenon-embedded-thunderstorm": "Embedded thunderstorm(s)",
|
|
161
|
+
"aviation-phenomenon-embedded-thunderstorm-with-hail": "Emb. thunderstorm(s) with hail",
|
|
162
|
+
"aviation-phenomenon-frequent-thunderstorm": "Frequent thunderstorm(s)",
|
|
163
|
+
"aviation-phenomenon-frequent-thunderstorm-with-hail": "Freq. thunderstorm(s) with hail",
|
|
164
|
+
"aviation-phenomenon-obscured-thunderstorm": "Obscured thunderstorm(s)",
|
|
165
|
+
"aviation-phenomenon-obscured-thunderstorm-with-hail": "Obsc. thunderstorm(s) with hail",
|
|
166
|
+
"aviation-phenomenon-squall-thunderstorm-with-hail": "Squall thunderstorm(s) with hail",
|
|
167
|
+
"aviation-phenomenon-isolated-thunderstorm": "Isolated thunderstorm(s)",
|
|
168
|
+
"aviation-phenomenon-isolated-thunderstorm-with-hail": "Isol. thunderstorm(s) with hail",
|
|
169
|
+
"aviation-phenomenon-occasional-thunderstorm": "Occasional thunderstorm(s)",
|
|
170
|
+
"aviation-phenomenon-occasional-thunderstorm-with-hail": "Ocn. thunderstorm(s) with hail",
|
|
171
|
+
"aviation-phenomenon-severe-mountain-waves": "Severe mountain waves",
|
|
172
|
+
"aviation-phenomenon-surface-visibility": "Surface visibility",
|
|
173
|
+
"aviation-phenomenon-surface-wind": "Surface wind",
|
|
174
|
+
"aviation-phenomenon-overcast-cloud": "Overcast cloud",
|
|
175
|
+
"aviation-phenomenon-broken-cloud": "Broken cloud",
|
|
176
|
+
"aviation-phenomenon-isolated-cumulonimbus-cloud": "Isolated cumulonimbus cloud",
|
|
177
|
+
"aviation-phenomenon-occasional-cumulonimbus-cloud": "Occasional cumulonimbus cloud",
|
|
178
|
+
"aviation-phenomenon-frequent-cumulonimbus-cloud": "Frequent cumulonimbus cloud",
|
|
179
|
+
"aviation-phenomenon-isolated-towering-cumulus-cloud": "Isolated towering cumulus cloud",
|
|
180
|
+
"aviation-phenomenon-occasional-towering-cumulus-cloud": "Occasional towering cumulus cloud",
|
|
181
|
+
"aviation-phenomenon-frequent-towering-cumulus-cloud": "Frequent towering cumulus cloud",
|
|
182
|
+
"aviation-phenomenon-moderate-mountain-wave": "Moderate mountain wave",
|
|
183
|
+
"aviation-phenomenon-mountains-obscured": "Mountains obscured"
|
|
147
184
|
};
|
|
148
185
|
var nl = {
|
|
149
186
|
"drawing-tool-form-tools": "Gereedschap",
|
|
@@ -501,14 +538,14 @@ var no = {
|
|
|
501
538
|
"filter-select-all": "Velg alle",
|
|
502
539
|
"filter-no-results": "Ingen resultat",
|
|
503
540
|
"filter-all": "Alle",
|
|
504
|
-
"filter-options": "
|
|
505
|
-
"filter-show-all": "
|
|
506
|
-
"filter-hide-all": "
|
|
507
|
-
"filter-incident": "
|
|
508
|
-
"filter-domain": "
|
|
509
|
-
"filter-phenomenon": "
|
|
510
|
-
"filter-level": "
|
|
511
|
-
"filter-source": "
|
|
541
|
+
"filter-options": "Filtervalg",
|
|
542
|
+
"filter-show-all": "Vis alle",
|
|
543
|
+
"filter-hide-all": "Skjel alle",
|
|
544
|
+
"filter-incident": "Hendelse",
|
|
545
|
+
"filter-domain": "Domene",
|
|
546
|
+
"filter-phenomenon": "Fenomen",
|
|
547
|
+
"filter-level": "Grad",
|
|
548
|
+
"filter-source": "Kilder",
|
|
512
549
|
"error-title-retry": "Prøv igjen"
|
|
513
550
|
};
|
|
514
551
|
var warningsTranslations = {
|
|
@@ -3705,24 +3742,66 @@ const getWarningPhenomenaIcon = key => {
|
|
|
3705
3742
|
return undefined;
|
|
3706
3743
|
}
|
|
3707
3744
|
};
|
|
3745
|
+
const getAviationPhenomenaIcon = key => {
|
|
3746
|
+
switch (key) {
|
|
3747
|
+
case 'RDOACT_CLD':
|
|
3748
|
+
return jsx(RadioactiveMaterials, {});
|
|
3749
|
+
case 'HVY_SS':
|
|
3750
|
+
return jsx(SandStorm, {});
|
|
3751
|
+
case 'SEV_TURB':
|
|
3752
|
+
return jsx(SevereTurbulence, {});
|
|
3753
|
+
case 'MOD_TURB':
|
|
3754
|
+
return jsx(ModerateTurbulence, {});
|
|
3755
|
+
case 'SEV_ICE':
|
|
3756
|
+
return jsx(SevereAircraftIcing, {});
|
|
3757
|
+
case 'MOD_ICE':
|
|
3758
|
+
return jsx(ModerateAircraftIcing, {});
|
|
3759
|
+
case 'SEV_ICE_FRZ_RN':
|
|
3760
|
+
return jsx(FreezingPrecipitation, {});
|
|
3761
|
+
case 'HVY_DS':
|
|
3762
|
+
return jsx(Haze, {});
|
|
3763
|
+
case 'VA_CLD':
|
|
3764
|
+
return jsx(VulcanicEruption, {});
|
|
3765
|
+
case 'EMBD_TS':
|
|
3766
|
+
case 'EMBD_TSGR':
|
|
3767
|
+
case 'FRQ_TS':
|
|
3768
|
+
case 'FRQ_TSGR':
|
|
3769
|
+
case 'OBSC_TS':
|
|
3770
|
+
case 'OBSC_TSGR':
|
|
3771
|
+
case 'SQL_TSGR':
|
|
3772
|
+
case 'ISOL_TS':
|
|
3773
|
+
case 'ISOL_TSGR':
|
|
3774
|
+
case 'OCNL_TS':
|
|
3775
|
+
case 'OCNL_TSGR':
|
|
3776
|
+
return jsx(Thunderstorm, {});
|
|
3777
|
+
default:
|
|
3778
|
+
return undefined;
|
|
3779
|
+
}
|
|
3780
|
+
};
|
|
3708
3781
|
const warningPhenomena = [{
|
|
3709
3782
|
translationKey: 'warning-phenomenon-wind',
|
|
3710
|
-
key: 'wind'
|
|
3783
|
+
key: 'wind',
|
|
3784
|
+
isAviation: false
|
|
3711
3785
|
}, {
|
|
3712
3786
|
translationKey: 'warning-phenomenon-fog',
|
|
3713
|
-
key: 'fog'
|
|
3787
|
+
key: 'fog',
|
|
3788
|
+
isAviation: false
|
|
3714
3789
|
}, {
|
|
3715
3790
|
translationKey: 'warning-phenomenon-thunderstorm',
|
|
3716
|
-
key: 'thunderstorm'
|
|
3791
|
+
key: 'thunderstorm',
|
|
3792
|
+
isAviation: false
|
|
3717
3793
|
}, {
|
|
3718
3794
|
translationKey: 'warning-phenomenon-snow-ice',
|
|
3719
|
-
key: 'snowIce'
|
|
3795
|
+
key: 'snowIce',
|
|
3796
|
+
isAviation: false
|
|
3720
3797
|
}, {
|
|
3721
3798
|
translationKey: 'warning-phenomenon-rain',
|
|
3722
|
-
key: 'rain'
|
|
3799
|
+
key: 'rain',
|
|
3800
|
+
isAviation: false
|
|
3723
3801
|
}, {
|
|
3724
3802
|
translationKey: 'warning-phenomenon-high-temp',
|
|
3725
|
-
key: 'highTemp'
|
|
3803
|
+
key: 'highTemp',
|
|
3804
|
+
isAviation: false
|
|
3726
3805
|
},
|
|
3727
3806
|
// {
|
|
3728
3807
|
// title: 'warning-phenomenon-funnel-cloud',
|
|
@@ -3730,11 +3809,147 @@ const warningPhenomena = [{
|
|
|
3730
3809
|
// },
|
|
3731
3810
|
{
|
|
3732
3811
|
translationKey: 'warning-phenomenon-low-temp',
|
|
3733
|
-
key: 'lowTemp'
|
|
3812
|
+
key: 'lowTemp',
|
|
3813
|
+
isAviation: false
|
|
3734
3814
|
}, {
|
|
3735
3815
|
translationKey: 'warning-phenomenon-coastal-event',
|
|
3736
|
-
key: 'coastalEvent'
|
|
3816
|
+
key: 'coastalEvent',
|
|
3817
|
+
isAviation: false
|
|
3818
|
+
}, {
|
|
3819
|
+
translationKey: 'aviation-phenomenon-radioactive-cloud',
|
|
3820
|
+
key: 'RDOACT_CLD',
|
|
3821
|
+
isAviation: true
|
|
3822
|
+
}, {
|
|
3823
|
+
translationKey: 'aviation-phenomenon-heavy-sandstorm',
|
|
3824
|
+
key: 'HVY_SS',
|
|
3825
|
+
isAviation: true
|
|
3826
|
+
}, {
|
|
3827
|
+
translationKey: 'aviation-phenomenon-severe-turbulence',
|
|
3828
|
+
key: 'SEV_TURB',
|
|
3829
|
+
isAviation: true
|
|
3830
|
+
}, {
|
|
3831
|
+
translationKey: 'aviation-phenomenon-moderate-turbulence',
|
|
3832
|
+
key: 'MOD_TURB',
|
|
3833
|
+
isAviation: true
|
|
3834
|
+
}, {
|
|
3835
|
+
translationKey: 'aviation-phenomenon-severe-ice',
|
|
3836
|
+
key: 'SEV_ICE',
|
|
3837
|
+
isAviation: true
|
|
3838
|
+
}, {
|
|
3839
|
+
translationKey: 'aviation-phenomenon-moderate-ice',
|
|
3840
|
+
key: 'MOD_ICE',
|
|
3841
|
+
isAviation: true
|
|
3842
|
+
}, {
|
|
3843
|
+
translationKey: 'aviation-phenomenon-severe-ice-freezing-rain',
|
|
3844
|
+
key: 'SEV_ICE_FRZ_RN',
|
|
3845
|
+
isAviation: true
|
|
3846
|
+
}, {
|
|
3847
|
+
translationKey: 'aviation-phenomenon-heavy-dust-storm',
|
|
3848
|
+
key: 'HVY_DS',
|
|
3849
|
+
isAviation: true
|
|
3850
|
+
}, {
|
|
3851
|
+
translationKey: 'aviation-phenomenon-volcanic-cloud',
|
|
3852
|
+
key: 'VA_CLD',
|
|
3853
|
+
isAviation: true
|
|
3854
|
+
}, {
|
|
3855
|
+
translationKey: 'aviation-phenomenon-embedded-thunderstorm',
|
|
3856
|
+
key: 'EMBD_TS',
|
|
3857
|
+
isAviation: true
|
|
3858
|
+
}, {
|
|
3859
|
+
translationKey: 'aviation-phenomenon-embedded-thunderstorm-with-hail',
|
|
3860
|
+
key: 'EMBD_TSGR',
|
|
3861
|
+
isAviation: true
|
|
3862
|
+
}, {
|
|
3863
|
+
translationKey: 'aviation-phenomenon-obscured-thunderstorm-with-hail',
|
|
3864
|
+
key: 'OBSC_TSGR',
|
|
3865
|
+
isAviation: true
|
|
3866
|
+
}, {
|
|
3867
|
+
translationKey: 'aviation-phenomenon-squall-thunderstorm-with-hail',
|
|
3868
|
+
key: 'SQL_TSGR',
|
|
3869
|
+
isAviation: true
|
|
3870
|
+
}, {
|
|
3871
|
+
translationKey: 'aviation-phenomenon-isolated-thunderstorm',
|
|
3872
|
+
key: 'ISOL_TS',
|
|
3873
|
+
isAviation: true
|
|
3874
|
+
}, {
|
|
3875
|
+
translationKey: 'aviation-phenomenon-isolated-thunderstorm-with-hail',
|
|
3876
|
+
key: 'ISOL_TSGR',
|
|
3877
|
+
isAviation: true
|
|
3878
|
+
}, {
|
|
3879
|
+
translationKey: 'aviation-phenomenon-occasional-thunderstorm',
|
|
3880
|
+
key: 'OCNL_TS',
|
|
3881
|
+
isAviation: true
|
|
3882
|
+
}, {
|
|
3883
|
+
translationKey: 'aviation-phenomenon-occasional-thunderstorm-with-hail',
|
|
3884
|
+
key: 'OCNL_TSGR',
|
|
3885
|
+
isAviation: true
|
|
3886
|
+
}, {
|
|
3887
|
+
translationKey: 'aviation-phenomenon-frequent-thunderstorm',
|
|
3888
|
+
key: 'FRQ_TS',
|
|
3889
|
+
isAviation: true
|
|
3890
|
+
}, {
|
|
3891
|
+
translationKey: 'aviation-phenomenon-frequent-thunderstorm-with-hail',
|
|
3892
|
+
key: 'FRQ_TSGR',
|
|
3893
|
+
isAviation: true
|
|
3894
|
+
}, {
|
|
3895
|
+
translationKey: 'aviation-phenomenon-severe-mountain-waves',
|
|
3896
|
+
key: 'SEV_MTW',
|
|
3897
|
+
isAviation: true
|
|
3898
|
+
}, {
|
|
3899
|
+
translationKey: 'aviation-phenomenon-surface-visibility',
|
|
3900
|
+
key: 'SFC_VIS',
|
|
3901
|
+
isAviation: true
|
|
3902
|
+
}, {
|
|
3903
|
+
translationKey: 'aviation-phenomenon-surface-wind',
|
|
3904
|
+
key: 'SFC_WIND',
|
|
3905
|
+
isAviation: true
|
|
3906
|
+
}, {
|
|
3907
|
+
translationKey: 'aviation-phenomenon-overcast-cloud',
|
|
3908
|
+
key: 'OVC_CLD',
|
|
3909
|
+
isAviation: true
|
|
3910
|
+
}, {
|
|
3911
|
+
translationKey: 'aviation-phenomenon-broken-cloud',
|
|
3912
|
+
key: 'BKN_CLD',
|
|
3913
|
+
isAviation: true
|
|
3914
|
+
}, {
|
|
3915
|
+
translationKey: 'aviation-phenomenon-isolated-cumulonimbus-cloud',
|
|
3916
|
+
key: 'ISOL_CB',
|
|
3917
|
+
isAviation: true
|
|
3918
|
+
}, {
|
|
3919
|
+
translationKey: 'aviation-phenomenon-occasional-cumulonimbus-cloud',
|
|
3920
|
+
key: 'OCNL_CB',
|
|
3921
|
+
isAviation: true
|
|
3922
|
+
}, {
|
|
3923
|
+
translationKey: 'aviation-phenomenon-frequent-cumulonimbus-cloud',
|
|
3924
|
+
key: 'FRQ_CB',
|
|
3925
|
+
isAviation: true
|
|
3926
|
+
}, {
|
|
3927
|
+
translationKey: 'aviation-phenomenon-isolated-towering-cumulus-cloud',
|
|
3928
|
+
key: 'ISOL_TCU',
|
|
3929
|
+
isAviation: true
|
|
3930
|
+
}, {
|
|
3931
|
+
translationKey: 'aviation-phenomenon-occasional-towering-cumulus-cloud',
|
|
3932
|
+
key: 'OCNL_TCU',
|
|
3933
|
+
isAviation: true
|
|
3934
|
+
}, {
|
|
3935
|
+
translationKey: 'aviation-phenomenon-frequent-towering-cumulus-cloud',
|
|
3936
|
+
key: 'FRQ_TCU',
|
|
3937
|
+
isAviation: true
|
|
3938
|
+
}, {
|
|
3939
|
+
translationKey: 'aviation-phenomenon-moderate-mountain-wave',
|
|
3940
|
+
key: 'MOD_MTW',
|
|
3941
|
+
isAviation: true
|
|
3942
|
+
}, {
|
|
3943
|
+
translationKey: 'aviation-phenomenon-mountains-obscured',
|
|
3944
|
+
key: 'MT_OBSC',
|
|
3945
|
+
isAviation: true
|
|
3737
3946
|
}];
|
|
3947
|
+
const allPhenomenaDict = warningPhenomena.reduce((list, item) => Object.assign(Object.assign({}, list), {
|
|
3948
|
+
[item.key]: item
|
|
3949
|
+
}), {});
|
|
3950
|
+
const getPhenomenaIcon = key => {
|
|
3951
|
+
return getWarningPhenomenaIcon(key) || getAviationPhenomenaIcon(key);
|
|
3952
|
+
};
|
|
3738
3953
|
const Phenomenon = ({
|
|
3739
3954
|
isDisabled,
|
|
3740
3955
|
isReadOnly
|
|
@@ -3745,6 +3960,8 @@ const Phenomenon = ({
|
|
|
3745
3960
|
const {
|
|
3746
3961
|
isRequired
|
|
3747
3962
|
} = useDraftFormHelpers();
|
|
3963
|
+
// These phenomena are sent to Public Warning Form
|
|
3964
|
+
const warningFormPhenomena = warningPhenomena.filter(phenomenon => !phenomenon.isAviation);
|
|
3748
3965
|
return jsx(ReactHookFormSelect, Object.assign({
|
|
3749
3966
|
name: "phenomenon",
|
|
3750
3967
|
label: t('warning-phenomenon'),
|
|
@@ -3756,28 +3973,26 @@ const Phenomenon = ({
|
|
|
3756
3973
|
disabled: isDisabled || isReadOnly,
|
|
3757
3974
|
isReadOnly: isReadOnly
|
|
3758
3975
|
}, {
|
|
3759
|
-
children:
|
|
3760
|
-
|
|
3761
|
-
|
|
3976
|
+
children: warningFormPhenomena.map(phenomenon => jsx(MenuItem, Object.assign({
|
|
3977
|
+
value: phenomenon.key
|
|
3978
|
+
}, {
|
|
3979
|
+
children: jsxs(Grid, Object.assign({
|
|
3980
|
+
container: true,
|
|
3981
|
+
justifyContent: "space-between"
|
|
3762
3982
|
}, {
|
|
3763
|
-
children:
|
|
3764
|
-
|
|
3765
|
-
justifyContent: "space-between"
|
|
3983
|
+
children: [jsx(Grid, Object.assign({
|
|
3984
|
+
item: true
|
|
3766
3985
|
}, {
|
|
3767
|
-
children:
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
}
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
}))]
|
|
3778
|
-
}))
|
|
3779
|
-
}), phenomenon.key);
|
|
3780
|
-
})
|
|
3986
|
+
children: t(phenomenon.translationKey)
|
|
3987
|
+
})), jsx(Grid, Object.assign({
|
|
3988
|
+
item: true
|
|
3989
|
+
}, {
|
|
3990
|
+
children: jsx(ListItemIcon, {
|
|
3991
|
+
children: getPhenomenaIcon(phenomenon.key)
|
|
3992
|
+
})
|
|
3993
|
+
}))]
|
|
3994
|
+
}))
|
|
3995
|
+
}), phenomenon.key))
|
|
3781
3996
|
}));
|
|
3782
3997
|
};
|
|
3783
3998
|
|
|
@@ -3819,6 +4034,9 @@ const levelOptions = [Object.assign({
|
|
|
3819
4034
|
translationKey: 'warning-level-extreme',
|
|
3820
4035
|
key: WarningLevel.extreme
|
|
3821
4036
|
}, LevelColors[WarningLevel.extreme])];
|
|
4037
|
+
const levelOptionsDict = levelOptions.reduce((list, item) => Object.assign(Object.assign({}, list), {
|
|
4038
|
+
[item.key]: item
|
|
4039
|
+
}), {});
|
|
3822
4040
|
const LevelField = ({
|
|
3823
4041
|
isDisabled: _isDisabled = false,
|
|
3824
4042
|
isReadOnly: _isReadOnly = false
|
|
@@ -11638,6 +11856,33 @@ const getPublicWarningFormError = createSelector(getPublicWarningStore, publicWa
|
|
|
11638
11856
|
const getSelectedPublicWarningId = createSelector(getPublicWarningStore, publicWarningStore => (publicWarningStore === null || publicWarningStore === void 0 ? void 0 : publicWarningStore.selectedPublicWarningId) || '');
|
|
11639
11857
|
const getSelectedPublicIsFormDirty = createSelector(getPublicWarningStore, publicWarningStore => (publicWarningStore === null || publicWarningStore === void 0 ? void 0 : publicWarningStore.isFormDirty) || false);
|
|
11640
11858
|
|
|
11859
|
+
/* *
|
|
11860
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11861
|
+
* you may not use this file except in compliance with the License.
|
|
11862
|
+
* You may obtain a copy of the License at
|
|
11863
|
+
*
|
|
11864
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11865
|
+
*
|
|
11866
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11867
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11868
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11869
|
+
* See the License for the specific language governing permissions and
|
|
11870
|
+
* limitations under the License.
|
|
11871
|
+
*
|
|
11872
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11873
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
11874
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
11875
|
+
* */
|
|
11876
|
+
var PublicWarningStatus;
|
|
11877
|
+
(function (PublicWarningStatus) {
|
|
11878
|
+
PublicWarningStatus["DRAFT"] = "DRAFT";
|
|
11879
|
+
PublicWarningStatus["DRAFT_PUBLISHED"] = "DRAFT_PUBLISHED";
|
|
11880
|
+
PublicWarningStatus["PUBLISHED"] = "PUBLISHED";
|
|
11881
|
+
PublicWarningStatus["TODO"] = "TODO";
|
|
11882
|
+
PublicWarningStatus["EXPIRED"] = "EXPIRED";
|
|
11883
|
+
PublicWarningStatus["IGNORED"] = "IGNORED";
|
|
11884
|
+
})(PublicWarningStatus || (PublicWarningStatus = {}));
|
|
11885
|
+
|
|
11641
11886
|
const PublicWarningsFormConnect = ({
|
|
11642
11887
|
defaultBbox
|
|
11643
11888
|
}) => {
|
|
@@ -11655,12 +11900,12 @@ const PublicWarningsFormConnect = ({
|
|
|
11655
11900
|
dispatch(publicWarningFormActions.publishWarning({
|
|
11656
11901
|
publicWarning: {
|
|
11657
11902
|
warningDetail: newFormValues,
|
|
11658
|
-
status:
|
|
11903
|
+
status: PublicWarningStatus.PUBLISHED
|
|
11659
11904
|
}
|
|
11660
11905
|
}));
|
|
11661
11906
|
};
|
|
11662
11907
|
const saveForm = newFormValues => {
|
|
11663
|
-
const status = newFormValues.linked_to_id ?
|
|
11908
|
+
const status = newFormValues.linked_to_id ? PublicWarningStatus.DRAFT_PUBLISHED : PublicWarningStatus.DRAFT;
|
|
11664
11909
|
dispatch(publicWarningFormActions.saveWarning({
|
|
11665
11910
|
publicWarning: {
|
|
11666
11911
|
warningDetail: newFormValues,
|
|
@@ -13726,7 +13971,11 @@ const FilterChipWithOptionsConnect = ({
|
|
|
13726
13971
|
const FilterList = ({
|
|
13727
13972
|
filters: _filters = [],
|
|
13728
13973
|
onClickAll: _onClickAll = () => {},
|
|
13729
|
-
isAllSelected: _isAllSelected = true
|
|
13974
|
+
isAllSelected: _isAllSelected = true,
|
|
13975
|
+
showSigmet: _showSigmet = false,
|
|
13976
|
+
showAirmet: _showAirmet = false,
|
|
13977
|
+
setShowSigmet,
|
|
13978
|
+
setShowAirmet
|
|
13730
13979
|
}) => {
|
|
13731
13980
|
const {
|
|
13732
13981
|
t
|
|
@@ -13764,38 +14013,186 @@ const FilterList = ({
|
|
|
13764
14013
|
return jsx(FilterChipWithOptionsConnect, {
|
|
13765
14014
|
filter: filter
|
|
13766
14015
|
}, filter.id);
|
|
13767
|
-
})
|
|
14016
|
+
}), setShowSigmet && jsx(CustomTooltip, Object.assign({
|
|
14017
|
+
title: _showSigmet ? t('filter-hide', {
|
|
14018
|
+
subject: t('sigmet')
|
|
14019
|
+
}) : t('filter-show', {
|
|
14020
|
+
subject: t('sigmet')
|
|
14021
|
+
}),
|
|
14022
|
+
placement: "bottom"
|
|
14023
|
+
}, {
|
|
14024
|
+
children: jsx("span", Object.assign({
|
|
14025
|
+
style: {
|
|
14026
|
+
margin: 0
|
|
14027
|
+
}
|
|
14028
|
+
}, {
|
|
14029
|
+
children: jsx(FilterChip, {
|
|
14030
|
+
id: "sigmet",
|
|
14031
|
+
label: t('sigmet'),
|
|
14032
|
+
isSelected: _showSigmet,
|
|
14033
|
+
handleClick: () => setShowSigmet(!_showSigmet),
|
|
14034
|
+
size: "medium"
|
|
14035
|
+
})
|
|
14036
|
+
}))
|
|
14037
|
+
})), setShowAirmet && jsx(CustomTooltip, Object.assign({
|
|
14038
|
+
title: _showAirmet ? t('filter-hide', {
|
|
14039
|
+
subject: t('airmet')
|
|
14040
|
+
}) : t('filter-show', {
|
|
14041
|
+
subject: t('airmet')
|
|
14042
|
+
}),
|
|
14043
|
+
placement: "bottom"
|
|
14044
|
+
}, {
|
|
14045
|
+
children: jsx("span", Object.assign({
|
|
14046
|
+
style: {
|
|
14047
|
+
margin: 0
|
|
14048
|
+
}
|
|
14049
|
+
}, {
|
|
14050
|
+
children: jsx(FilterChip, {
|
|
14051
|
+
id: "airmet",
|
|
14052
|
+
label: t('airmet'),
|
|
14053
|
+
isSelected: _showAirmet,
|
|
14054
|
+
handleClick: () => setShowAirmet(!_showAirmet),
|
|
14055
|
+
size: "medium"
|
|
14056
|
+
})
|
|
14057
|
+
}))
|
|
14058
|
+
}))]
|
|
13768
14059
|
}));
|
|
13769
14060
|
};
|
|
13770
14061
|
|
|
13771
|
-
const
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
14062
|
+
const WarningListItemSeperator = _a => {
|
|
14063
|
+
var {
|
|
14064
|
+
totalWarnings,
|
|
14065
|
+
status
|
|
14066
|
+
} = _a,
|
|
14067
|
+
props = __rest(_a, ["totalWarnings", "status"]);
|
|
14068
|
+
const {
|
|
14069
|
+
t
|
|
14070
|
+
} = useWarningsTranslation();
|
|
14071
|
+
const getStatus = status => {
|
|
14072
|
+
switch (status) {
|
|
14073
|
+
case 'DRAFT':
|
|
14074
|
+
return t('warning-list-status-draft');
|
|
14075
|
+
case 'PUBLISHED':
|
|
14076
|
+
return t('warning-list-status-published');
|
|
14077
|
+
case 'TODO':
|
|
14078
|
+
return t('warning-list-status-todo');
|
|
14079
|
+
default:
|
|
14080
|
+
return t('warning-list-status-expired');
|
|
13782
14081
|
}
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
|
|
14082
|
+
};
|
|
14083
|
+
const headerText = `${totalWarnings} ${getStatus(status)}`;
|
|
14084
|
+
return jsx(ListItem, Object.assign({}, props, {
|
|
14085
|
+
"aria-label": `warninglist ${status}`
|
|
14086
|
+
}, {
|
|
14087
|
+
children: jsx(Typography, Object.assign({
|
|
14088
|
+
variant: "caption",
|
|
14089
|
+
sx: {
|
|
14090
|
+
opacity: 0.67
|
|
14091
|
+
}
|
|
14092
|
+
}, {
|
|
14093
|
+
children: headerText
|
|
14094
|
+
}))
|
|
14095
|
+
}));
|
|
14096
|
+
};
|
|
14097
|
+
|
|
14098
|
+
/* *
|
|
14099
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
14100
|
+
* you may not use this file except in compliance with the License.
|
|
14101
|
+
* You may obtain a copy of the License at
|
|
14102
|
+
*
|
|
14103
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14104
|
+
*
|
|
14105
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14106
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14107
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14108
|
+
* See the License for the specific language governing permissions and
|
|
14109
|
+
* limitations under the License.
|
|
14110
|
+
*
|
|
14111
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
14112
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
14113
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
14114
|
+
* */
|
|
14115
|
+
const transformAirmetToWarningFormat = apiAirmet => {
|
|
14116
|
+
const airmet = apiAirmet.airmet;
|
|
14117
|
+
return {
|
|
14118
|
+
id: apiAirmet.uuid,
|
|
14119
|
+
lastUpdatedTime: apiAirmet.lastUpdateDate,
|
|
14120
|
+
productStatus: airmet.status,
|
|
14121
|
+
warningDetail: {
|
|
14122
|
+
descriptionOriginal: '',
|
|
14123
|
+
descriptionTranslation: '',
|
|
14124
|
+
areas: [{
|
|
14125
|
+
geoJSON: airmet.startGeometry,
|
|
14126
|
+
objectName: ''
|
|
14127
|
+
}],
|
|
14128
|
+
phenomenon: airmet.phenomenon,
|
|
14129
|
+
validFrom: airmet.validDateStart,
|
|
14130
|
+
validUntil: airmet.validDateEnd,
|
|
14131
|
+
level: 'AIR',
|
|
14132
|
+
probability: 0,
|
|
14133
|
+
incident: airmet.sequence
|
|
13787
14134
|
}
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
|
|
14135
|
+
};
|
|
14136
|
+
};
|
|
14137
|
+
const transformSigmetToWarningFormat = apiSigmet => {
|
|
14138
|
+
const sigmet = apiSigmet.sigmet;
|
|
14139
|
+
return {
|
|
14140
|
+
id: apiSigmet.uuid,
|
|
14141
|
+
lastUpdatedTime: apiSigmet.lastUpdateDate,
|
|
14142
|
+
productStatus: sigmet.status,
|
|
14143
|
+
warningDetail: {
|
|
14144
|
+
descriptionOriginal: '',
|
|
14145
|
+
descriptionTranslation: '',
|
|
14146
|
+
areas: [{
|
|
14147
|
+
geoJSON: sigmet.startGeometry,
|
|
14148
|
+
objectName: ''
|
|
14149
|
+
}],
|
|
14150
|
+
phenomenon: sigmet.phenomenon,
|
|
14151
|
+
validFrom: sigmet.validDateStart,
|
|
14152
|
+
validUntil: sigmet.validDateEnd,
|
|
14153
|
+
level: 'SIG',
|
|
14154
|
+
probability: 0,
|
|
14155
|
+
incident: sigmet.sequence
|
|
13792
14156
|
}
|
|
13793
|
-
|
|
13794
|
-
|
|
13795
|
-
|
|
13796
|
-
|
|
13797
|
-
|
|
13798
|
-
|
|
14157
|
+
};
|
|
14158
|
+
};
|
|
14159
|
+
const mapProductStatusToWarningStatus = productStatus => {
|
|
14160
|
+
switch (productStatus) {
|
|
14161
|
+
case ProductStatus.PUBLISHED:
|
|
14162
|
+
return PublicWarningStatus.PUBLISHED;
|
|
14163
|
+
case ProductStatus.DRAFT:
|
|
14164
|
+
return PublicWarningStatus.DRAFT;
|
|
14165
|
+
case ProductStatus.CANCELLED:
|
|
14166
|
+
case ProductStatus.EXPIRED:
|
|
14167
|
+
case ProductStatus.DISCARDED:
|
|
14168
|
+
default:
|
|
14169
|
+
return PublicWarningStatus.EXPIRED;
|
|
14170
|
+
}
|
|
14171
|
+
};
|
|
14172
|
+
|
|
14173
|
+
const getSortedStatus = status => {
|
|
14174
|
+
switch (status) {
|
|
14175
|
+
case 'DRAFT_PUBLISHED':
|
|
14176
|
+
{
|
|
14177
|
+
return PublicWarningStatus.DRAFT;
|
|
14178
|
+
}
|
|
14179
|
+
default:
|
|
14180
|
+
{
|
|
14181
|
+
return status;
|
|
14182
|
+
}
|
|
14183
|
+
}
|
|
14184
|
+
};
|
|
14185
|
+
const getWarningWithoutIdStatusEditor = warning => {
|
|
14186
|
+
const {
|
|
14187
|
+
id,
|
|
14188
|
+
warningDetail,
|
|
14189
|
+
status,
|
|
14190
|
+
editor
|
|
14191
|
+
} = warning,
|
|
14192
|
+
fullWarning = __rest(warning, ["id", "warningDetail", "status", "editor"]);
|
|
14193
|
+
const cleanWarningDetail = __rest(warningDetail, ["id", "linked_to_id", "proposal_id", "warning_handle_uuid"]);
|
|
14194
|
+
return Object.assign(Object.assign({}, fullWarning), {
|
|
14195
|
+
warningDetail: cleanWarningDetail
|
|
13799
14196
|
});
|
|
13800
14197
|
};
|
|
13801
14198
|
const getWarningWithLinkedToId = warning => {
|
|
@@ -13808,7 +14205,7 @@ const getWarningWithLinkedToId = warning => {
|
|
|
13808
14205
|
warningDetail: Object.assign(Object.assign({}, cleanWarningDetail), {
|
|
13809
14206
|
linked_to_id: id
|
|
13810
14207
|
}),
|
|
13811
|
-
status:
|
|
14208
|
+
status: PublicWarningStatus.DRAFT_PUBLISHED
|
|
13812
14209
|
});
|
|
13813
14210
|
};
|
|
13814
14211
|
const getWarningWithProposalId = warning => {
|
|
@@ -13824,19 +14221,6 @@ const getWarningWithProposalId = warning => {
|
|
|
13824
14221
|
})
|
|
13825
14222
|
});
|
|
13826
14223
|
};
|
|
13827
|
-
const getWarningWithoutIdStatusEditor = warning => {
|
|
13828
|
-
const {
|
|
13829
|
-
id,
|
|
13830
|
-
warningDetail,
|
|
13831
|
-
status,
|
|
13832
|
-
editor
|
|
13833
|
-
} = warning,
|
|
13834
|
-
fullWarning = __rest(warning, ["id", "warningDetail", "status", "editor"]);
|
|
13835
|
-
const cleanWarningDetail = __rest(warningDetail, ["id", "linked_to_id", "proposal_id", "warning_handle_uuid"]);
|
|
13836
|
-
return Object.assign(Object.assign({}, fullWarning), {
|
|
13837
|
-
warningDetail: cleanWarningDetail
|
|
13838
|
-
});
|
|
13839
|
-
};
|
|
13840
14224
|
const getStatusIcon = warning => {
|
|
13841
14225
|
const getStatusTag = (content, color, icon = null) => jsx(StatusTag, {
|
|
13842
14226
|
content: content,
|
|
@@ -13848,7 +14232,8 @@ const getStatusIcon = warning => {
|
|
|
13848
14232
|
},
|
|
13849
14233
|
icon: icon
|
|
13850
14234
|
});
|
|
13851
|
-
|
|
14235
|
+
const status = warning.status || mapProductStatusToWarningStatus(warning.productStatus);
|
|
14236
|
+
switch (status) {
|
|
13852
14237
|
case 'TODO':
|
|
13853
14238
|
return null;
|
|
13854
14239
|
case 'DRAFT':
|
|
@@ -13879,34 +14264,6 @@ const getStatusIcon = warning => {
|
|
|
13879
14264
|
return getStatusTag('Exp', 'grey');
|
|
13880
14265
|
}
|
|
13881
14266
|
};
|
|
13882
|
-
const WarningListHeaderContent = _a => {
|
|
13883
|
-
var {
|
|
13884
|
-
title,
|
|
13885
|
-
width = 76
|
|
13886
|
-
} = _a,
|
|
13887
|
-
props = __rest(_a, ["title", "width"]);
|
|
13888
|
-
return jsx(Grid, Object.assign({
|
|
13889
|
-
item: true
|
|
13890
|
-
}, props, {
|
|
13891
|
-
sx: Object.assign(Object.assign({}, props.sx), {
|
|
13892
|
-
width
|
|
13893
|
-
})
|
|
13894
|
-
}, {
|
|
13895
|
-
children: jsx(Box, Object.assign({
|
|
13896
|
-
sx: {
|
|
13897
|
-
overflow: 'hidden',
|
|
13898
|
-
fontWeight: 'normal',
|
|
13899
|
-
textOverflow: 'ellipsis',
|
|
13900
|
-
fontSize: 12,
|
|
13901
|
-
lineHeight: 1.33,
|
|
13902
|
-
height: 16,
|
|
13903
|
-
color: 'geowebColors.captions.captionStatus.rgba'
|
|
13904
|
-
}
|
|
13905
|
-
}, {
|
|
13906
|
-
children: title
|
|
13907
|
-
}))
|
|
13908
|
-
}));
|
|
13909
|
-
};
|
|
13910
14267
|
const WarningListColumnContent = _a => {
|
|
13911
14268
|
var {
|
|
13912
14269
|
title,
|
|
@@ -13950,279 +14307,513 @@ const WarningListColumnContent = _a => {
|
|
|
13950
14307
|
}))]
|
|
13951
14308
|
}));
|
|
13952
14309
|
};
|
|
13953
|
-
const
|
|
13954
|
-
|
|
13955
|
-
status,
|
|
13956
|
-
activeWarningId,
|
|
13957
|
-
onSelectWarning: _onSelectWarning = () => {},
|
|
14310
|
+
const getMenuItems = ({
|
|
14311
|
+
warning,
|
|
13958
14312
|
onEditWarning: _onEditWarning = () => {},
|
|
13959
14313
|
onDeleteWarning: _onDeleteWarning = () => {},
|
|
13960
|
-
onDeleteReviewWarning: _onDeleteReviewWarning = () => {}
|
|
14314
|
+
onDeleteReviewWarning: _onDeleteReviewWarning = () => {},
|
|
14315
|
+
t
|
|
13961
14316
|
}) => {
|
|
14317
|
+
const duplicate = {
|
|
14318
|
+
text: t('warning-list-button-duplicate'),
|
|
14319
|
+
action: () => _onEditWarning(getWarningWithoutIdStatusEditor(warning)),
|
|
14320
|
+
icon: jsx(Copy, {})
|
|
14321
|
+
};
|
|
14322
|
+
switch (warning.status) {
|
|
14323
|
+
case 'PUBLISHED':
|
|
14324
|
+
return [{
|
|
14325
|
+
text: t('warning-list-button-update'),
|
|
14326
|
+
action: () => _onEditWarning(getWarningWithLinkedToId(warning)),
|
|
14327
|
+
icon: jsx(Edit, {})
|
|
14328
|
+
}, duplicate, {
|
|
14329
|
+
text: t('warning-list-button-expire'),
|
|
14330
|
+
action: () => null,
|
|
14331
|
+
icon: jsx(Expire, {}),
|
|
14332
|
+
isDisabled: true
|
|
14333
|
+
}, {
|
|
14334
|
+
text: t('warning-list-button-withdraw'),
|
|
14335
|
+
action: () => null,
|
|
14336
|
+
icon: jsx(Remove, {}),
|
|
14337
|
+
isDisabled: true
|
|
14338
|
+
}];
|
|
14339
|
+
case 'EXPIRED':
|
|
14340
|
+
return [duplicate];
|
|
14341
|
+
case 'DRAFT':
|
|
14342
|
+
case 'DRAFT_PUBLISHED':
|
|
14343
|
+
return [{
|
|
14344
|
+
text: t('object-manager-button-edit'),
|
|
14345
|
+
action: () => _onEditWarning(warning),
|
|
14346
|
+
icon: jsx(Edit, {})
|
|
14347
|
+
}, duplicate, {
|
|
14348
|
+
text: t('object-manager-button-delete'),
|
|
14349
|
+
action: () => _onDeleteWarning(warning.id, warning.editor),
|
|
14350
|
+
icon: jsx(Delete, {})
|
|
14351
|
+
}];
|
|
14352
|
+
case 'TODO':
|
|
14353
|
+
return [{
|
|
14354
|
+
text: t('warning-list-button-use'),
|
|
14355
|
+
action: () => _onEditWarning(getWarningWithProposalId(warning)),
|
|
14356
|
+
icon: jsx(Success, {})
|
|
14357
|
+
}, {
|
|
14358
|
+
text: t('object-manager-button-delete'),
|
|
14359
|
+
action: () => _onDeleteReviewWarning(warning),
|
|
14360
|
+
icon: jsx(Delete, {})
|
|
14361
|
+
}];
|
|
14362
|
+
default:
|
|
14363
|
+
return [];
|
|
14364
|
+
}
|
|
14365
|
+
};
|
|
14366
|
+
const WarningListItem = _a => {
|
|
14367
|
+
var {
|
|
14368
|
+
warning,
|
|
14369
|
+
status,
|
|
14370
|
+
activeWarningId,
|
|
14371
|
+
onSelectWarning = () => {},
|
|
14372
|
+
onEditWarning = () => {},
|
|
14373
|
+
onDeleteWarning = () => {},
|
|
14374
|
+
onDeleteReviewWarning = () => {}
|
|
14375
|
+
} = _a,
|
|
14376
|
+
props = __rest(_a, ["warning", "status", "activeWarningId", "onSelectWarning", "onEditWarning", "onDeleteWarning", "onDeleteReviewWarning"]);
|
|
13962
14377
|
const {
|
|
13963
14378
|
t
|
|
13964
14379
|
} = useWarningsTranslation();
|
|
13965
|
-
const
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
};
|
|
13977
|
-
const headerText = `${warnings.length} ${getStatus(status)}`;
|
|
13978
|
-
const getMenuItems = warning => {
|
|
13979
|
-
const duplicate = {
|
|
13980
|
-
text: t('warning-list-button-duplicate'),
|
|
13981
|
-
action: () => _onEditWarning(getWarningWithoutIdStatusEditor(warning)),
|
|
13982
|
-
icon: jsx(Copy, {})
|
|
14380
|
+
const phenomenonDetails = allPhenomenaDict[warning.warningDetail.phenomenon];
|
|
14381
|
+
const levelDetails = levelOptionsDict[warning.warningDetail.level];
|
|
14382
|
+
// State and effect to track if the phenomena text is overflowing
|
|
14383
|
+
const textRef = useRef(null);
|
|
14384
|
+
const [isOverflowing, setIsOverflowing] = useState(false);
|
|
14385
|
+
useEffect(() => {
|
|
14386
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
14387
|
+
const checkOverflow = () => {
|
|
14388
|
+
if (textRef.current) {
|
|
14389
|
+
setIsOverflowing(textRef.current.scrollWidth > textRef.current.clientWidth);
|
|
14390
|
+
}
|
|
13983
14391
|
};
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
|
|
13987
|
-
text: t('warning-list-button-update'),
|
|
13988
|
-
action: () => _onEditWarning(getWarningWithLinkedToId(warning)),
|
|
13989
|
-
icon: jsx(Edit, {})
|
|
13990
|
-
}, duplicate, {
|
|
13991
|
-
text: t('warning-list-button-expire'),
|
|
13992
|
-
action: () => null,
|
|
13993
|
-
icon: jsx(Expire, {}),
|
|
13994
|
-
isDisabled: true
|
|
13995
|
-
}, {
|
|
13996
|
-
text: t('warning-list-button-withdraw'),
|
|
13997
|
-
action: () => null,
|
|
13998
|
-
icon: jsx(Remove, {}),
|
|
13999
|
-
isDisabled: true
|
|
14000
|
-
}];
|
|
14001
|
-
case 'EXPIRED':
|
|
14002
|
-
return [duplicate];
|
|
14003
|
-
case 'DRAFT':
|
|
14004
|
-
case 'DRAFT_PUBLISHED':
|
|
14005
|
-
return [{
|
|
14006
|
-
text: t('object-manager-button-edit'),
|
|
14007
|
-
action: () => _onEditWarning(warning),
|
|
14008
|
-
icon: jsx(Edit, {})
|
|
14009
|
-
}, duplicate, {
|
|
14010
|
-
text: t('object-manager-button-delete'),
|
|
14011
|
-
action: () => _onDeleteWarning(warning.id, warning.editor),
|
|
14012
|
-
icon: jsx(Delete, {})
|
|
14013
|
-
}];
|
|
14014
|
-
case 'TODO':
|
|
14015
|
-
return [{
|
|
14016
|
-
text: t('warning-list-button-use'),
|
|
14017
|
-
action: () => _onEditWarning(getWarningWithProposalId(warning)),
|
|
14018
|
-
icon: jsx(Success, {})
|
|
14019
|
-
}, {
|
|
14020
|
-
text: t('object-manager-button-delete'),
|
|
14021
|
-
action: () => _onDeleteReviewWarning(warning),
|
|
14022
|
-
icon: jsx(Delete, {})
|
|
14023
|
-
}];
|
|
14024
|
-
default:
|
|
14025
|
-
return [];
|
|
14026
|
-
}
|
|
14027
|
-
};
|
|
14028
|
-
return jsxs(Box, Object.assign({
|
|
14392
|
+
checkOverflow();
|
|
14393
|
+
}, [phenomenonDetails]);
|
|
14394
|
+
return jsx(ListItem, Object.assign({
|
|
14029
14395
|
sx: {
|
|
14030
|
-
|
|
14031
|
-
|
|
14032
|
-
|
|
14033
|
-
|
|
14034
|
-
|
|
14396
|
+
marginBottom: 0.25,
|
|
14397
|
+
minHeight: '32px',
|
|
14398
|
+
padding: '0 0',
|
|
14399
|
+
backgroundColor: status === 'EXPIRED' ? 'geowebColors.cards.cardContainerDisabled' : 'geowebColors.cards.cardContainer',
|
|
14400
|
+
borderColor: status === 'EXPIRED' ? 'geowebColors.cards.cardContainerDisabledBorder' : 'geowebColors.cards.cardContainerBorder',
|
|
14401
|
+
borderRadius: 1,
|
|
14402
|
+
borderWidth: activeWarningId === warning.id ? '1px' : '1px',
|
|
14403
|
+
borderStyle: 'solid'
|
|
14404
|
+
},
|
|
14405
|
+
secondaryAction: jsx(ToggleMenu, {
|
|
14406
|
+
menuTitle: t('warning-list-button-options'),
|
|
14407
|
+
tooltipTitle: t('warning-list-button-options'),
|
|
14408
|
+
menuPosition: "bottom",
|
|
14409
|
+
"aria-label": t('warning-list-button-options'),
|
|
14410
|
+
menuItems: getMenuItems({
|
|
14411
|
+
warning,
|
|
14412
|
+
t,
|
|
14413
|
+
onEditWarning,
|
|
14414
|
+
onDeleteReviewWarning,
|
|
14415
|
+
onDeleteWarning
|
|
14416
|
+
}),
|
|
14417
|
+
buttonIcon: jsx(Options, {})
|
|
14418
|
+
}),
|
|
14419
|
+
"data-testid": `warning-${getSortedStatus(status)}`
|
|
14420
|
+
}, props, {
|
|
14421
|
+
children: jsx(ListItemButton, Object.assign({
|
|
14035
14422
|
sx: {
|
|
14036
|
-
|
|
14037
|
-
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
|
|
14423
|
+
height: '100%',
|
|
14424
|
+
padding: 1,
|
|
14425
|
+
'.warning-list': {
|
|
14426
|
+
justifyContent: 'left'
|
|
14427
|
+
},
|
|
14428
|
+
[`@container publicWarningList (min-width: ${breakpoints.desktop}px)`]: {
|
|
14429
|
+
'.warning-list': {
|
|
14430
|
+
justifyContent: 'space-between'
|
|
14431
|
+
}
|
|
14432
|
+
}
|
|
14433
|
+
},
|
|
14434
|
+
onClick: () => onSelectWarning(warning),
|
|
14435
|
+
"aria-label": `warning item for ${warning.id}`,
|
|
14436
|
+
selected: activeWarningId === warning.id
|
|
14042
14437
|
}, {
|
|
14043
|
-
children:
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
|
|
14047
|
-
|
|
14438
|
+
children: jsxs(Grid, Object.assign({
|
|
14439
|
+
className: "warning-list",
|
|
14440
|
+
container: true,
|
|
14441
|
+
item: true,
|
|
14442
|
+
xs: true,
|
|
14443
|
+
rowSpacing: 0,
|
|
14444
|
+
columnSpacing: 2,
|
|
14445
|
+
alignItems: "center"
|
|
14446
|
+
}, {
|
|
14447
|
+
children: [jsx(WarningListColumnContent, Object.assign({
|
|
14448
|
+
title: t('warning-list-header-incident'),
|
|
14449
|
+
status: status,
|
|
14450
|
+
width: 142
|
|
14451
|
+
}, {
|
|
14452
|
+
children: warning.productStatus !== 'DRAFT' ? warning.warningDetail.incident : ''
|
|
14453
|
+
})), jsx(WarningListColumnContent, Object.assign({
|
|
14454
|
+
title: `${t('warning-list-header-last-update')} UTC`,
|
|
14455
|
+
status: status,
|
|
14456
|
+
width: 142
|
|
14457
|
+
}, {
|
|
14458
|
+
children: warning.lastUpdatedTime && dateUtils.dateToString(dateUtils.utc(warning.lastUpdatedTime), dateUtils.DATE_FORMAT_NAME_OF_DAY_MONTH)
|
|
14459
|
+
})), jsx(WarningListColumnContent, Object.assign({
|
|
14460
|
+
title: `${t('warning-list-header-start-time')} UTC`,
|
|
14461
|
+
status: status,
|
|
14462
|
+
width: 142
|
|
14463
|
+
}, {
|
|
14464
|
+
children: warning.warningDetail.validFrom && dateUtils.dateToString(dateUtils.utc(warning.warningDetail.validFrom), dateUtils.DATE_FORMAT_NAME_OF_DAY_MONTH)
|
|
14465
|
+
})), jsx(WarningListColumnContent, Object.assign({
|
|
14466
|
+
title: `${t('warning-list-header-end-time')} UTC`,
|
|
14467
|
+
status: status,
|
|
14468
|
+
width: 142
|
|
14469
|
+
}, {
|
|
14470
|
+
children: warning.warningDetail.validUntil && dateUtils.dateToString(dateUtils.utc(warning.warningDetail.validUntil), dateUtils.DATE_FORMAT_NAME_OF_DAY_MONTH)
|
|
14471
|
+
})), jsx(WarningListColumnContent, Object.assign({
|
|
14472
|
+
title: t('warning-list-header-domain'),
|
|
14473
|
+
status: status
|
|
14474
|
+
}, {
|
|
14475
|
+
children: warning.warningDetail.domain
|
|
14476
|
+
})), jsx(WarningListColumnContent, Object.assign({
|
|
14477
|
+
title: t('warning-list-header-phenomenon'),
|
|
14478
|
+
status: status,
|
|
14479
|
+
width: 140,
|
|
14048
14480
|
sx: {
|
|
14049
|
-
|
|
14050
|
-
|
|
14051
|
-
padding: '0 0',
|
|
14052
|
-
backgroundColor: status === 'EXPIRED' ? 'geowebColors.cards.cardContainerDisabled' : 'geowebColors.cards.cardContainer',
|
|
14053
|
-
borderColor: status === 'EXPIRED' ? 'geowebColors.cards.cardContainerDisabledBorder' : 'geowebColors.cards.cardContainerBorder',
|
|
14054
|
-
borderRadius: 1,
|
|
14055
|
-
borderWidth: activeWarningId === warning.id ? '1px' : '1px',
|
|
14056
|
-
borderStyle: 'solid'
|
|
14057
|
-
},
|
|
14058
|
-
secondaryAction: jsx(ToggleMenu, {
|
|
14059
|
-
menuTitle: t('warning-list-button-options'),
|
|
14060
|
-
tooltipTitle: t('warning-list-button-options'),
|
|
14061
|
-
menuPosition: "bottom",
|
|
14062
|
-
"aria-label": t('warning-list-button-options'),
|
|
14063
|
-
menuItems: getMenuItems(warning),
|
|
14064
|
-
buttonIcon: jsx(Options, {})
|
|
14065
|
-
})
|
|
14481
|
+
position: 'relative'
|
|
14482
|
+
}
|
|
14066
14483
|
}, {
|
|
14067
|
-
children:
|
|
14484
|
+
children: jsxs(Box, Object.assign({
|
|
14485
|
+
display: "flex",
|
|
14486
|
+
justifyContent: "space-between",
|
|
14068
14487
|
sx: {
|
|
14069
|
-
|
|
14070
|
-
|
|
14071
|
-
'.warning-list': {
|
|
14072
|
-
justifyContent: 'left'
|
|
14073
|
-
},
|
|
14074
|
-
[`@container publicWarningList (min-width: ${breakpoints.desktop}px)`]: {
|
|
14075
|
-
'.warning-list': {
|
|
14076
|
-
justifyContent: 'space-between'
|
|
14077
|
-
}
|
|
14078
|
-
}
|
|
14079
|
-
},
|
|
14080
|
-
onClick: () => _onSelectWarning(warning),
|
|
14081
|
-
"aria-label": `warning item for ${warning.id}`,
|
|
14082
|
-
selected: activeWarningId === warning.id
|
|
14488
|
+
flexGrow: 1
|
|
14489
|
+
}
|
|
14083
14490
|
}, {
|
|
14084
|
-
children:
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
|
|
14491
|
+
children: [jsx(Box, Object.assign({
|
|
14492
|
+
display: "inline-block",
|
|
14493
|
+
component: "div",
|
|
14494
|
+
ref: textRef,
|
|
14495
|
+
sx: {
|
|
14496
|
+
textOverflow: 'ellipsis',
|
|
14497
|
+
overflow: 'hidden',
|
|
14498
|
+
width: 90,
|
|
14499
|
+
whiteSpace: 'nowrap'
|
|
14500
|
+
}
|
|
14092
14501
|
}, {
|
|
14093
|
-
children:
|
|
14094
|
-
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14098
|
-
title: `${t('warning-list-header-last-update')} UTC`,
|
|
14099
|
-
status: status,
|
|
14100
|
-
width: 142
|
|
14101
|
-
}, {
|
|
14102
|
-
children: warning.lastUpdatedTime && dateUtils.dateToString(dateUtils.utc(warning.lastUpdatedTime), dateUtils.DATE_FORMAT_NAME_OF_DAY_MONTH)
|
|
14103
|
-
})), jsx(WarningListColumnContent, Object.assign({
|
|
14104
|
-
title: `${t('warning-list-header-start-time')} UTC`,
|
|
14105
|
-
status: status,
|
|
14106
|
-
width: 142
|
|
14107
|
-
}, {
|
|
14108
|
-
children: warning.warningDetail.validFrom && dateUtils.dateToString(dateUtils.utc(warning.warningDetail.validFrom), dateUtils.DATE_FORMAT_NAME_OF_DAY_MONTH)
|
|
14109
|
-
})), jsx(WarningListColumnContent, Object.assign({
|
|
14110
|
-
title: `${t('warning-list-header-end-time')} UTC`,
|
|
14111
|
-
status: status,
|
|
14112
|
-
width: 142
|
|
14113
|
-
}, {
|
|
14114
|
-
children: warning.warningDetail.validUntil && dateUtils.dateToString(dateUtils.utc(warning.warningDetail.validUntil), dateUtils.DATE_FORMAT_NAME_OF_DAY_MONTH)
|
|
14115
|
-
})), jsx(WarningListColumnContent, Object.assign({
|
|
14116
|
-
title: t('warning-list-header-domain'),
|
|
14117
|
-
status: status
|
|
14118
|
-
}, {
|
|
14119
|
-
children: warning.warningDetail.domain
|
|
14120
|
-
})), jsxs(WarningListColumnContent, Object.assign({
|
|
14121
|
-
title: t('warning-list-header-phenomenon'),
|
|
14122
|
-
status: status,
|
|
14123
|
-
width: 140,
|
|
14124
|
-
sx: {
|
|
14125
|
-
position: 'relative'
|
|
14126
|
-
}
|
|
14127
|
-
}, {
|
|
14128
|
-
children: [(phenomenonDetails === null || phenomenonDetails === void 0 ? void 0 : phenomenonDetails.translationKey) ? t(phenomenonDetails === null || phenomenonDetails === void 0 ? void 0 : phenomenonDetails.translationKey) : '-', jsx(Box, Object.assign({
|
|
14129
|
-
sx: {
|
|
14130
|
-
position: 'absolute',
|
|
14131
|
-
right: 0,
|
|
14132
|
-
bottom: -6
|
|
14133
|
-
}
|
|
14134
|
-
}, {
|
|
14135
|
-
children: getWarningPhenomenaIcon(phenomenonDetails === null || phenomenonDetails === void 0 ? void 0 : phenomenonDetails.key)
|
|
14136
|
-
}))]
|
|
14137
|
-
})), jsx(WarningListColumnContent, Object.assign({
|
|
14138
|
-
title: t('warning-list-header-level'),
|
|
14139
|
-
status: status
|
|
14140
|
-
}, {
|
|
14141
|
-
children: jsx(Box, Object.assign({
|
|
14142
|
-
component: "span",
|
|
14143
|
-
sx: getLevelStyle(levelDetails)
|
|
14144
|
-
}, {
|
|
14145
|
-
children: ((_a = warning.warningDetail) === null || _a === void 0 ? void 0 : _a.level) && (levelDetails === null || levelDetails === void 0 ? void 0 : levelDetails.translationKey) ? t(levelDetails === null || levelDetails === void 0 ? void 0 : levelDetails.translationKey) : '-'
|
|
14146
|
-
}))
|
|
14147
|
-
})), jsx(WarningListColumnContent, Object.assign({
|
|
14148
|
-
title: t('warning-list-header-status'),
|
|
14149
|
-
status: status,
|
|
14150
|
-
width: 96
|
|
14151
|
-
}, {
|
|
14152
|
-
children: jsxs(Box, Object.assign({
|
|
14153
|
-
sx: {
|
|
14154
|
-
position: 'relative'
|
|
14155
|
-
}
|
|
14156
|
-
}, {
|
|
14157
|
-
children: [getStatusIcon(warning), warning.editor && jsx(Box, Object.assign({
|
|
14502
|
+
children: (() => {
|
|
14503
|
+
if (isOverflowing) {
|
|
14504
|
+
return jsx(CustomTooltip, Object.assign({
|
|
14505
|
+
title: (phenomenonDetails === null || phenomenonDetails === void 0 ? void 0 : phenomenonDetails.translationKey) ? t(phenomenonDetails.translationKey) : '-',
|
|
14506
|
+
placement: "top",
|
|
14158
14507
|
sx: {
|
|
14159
|
-
|
|
14160
|
-
position: 'absolute',
|
|
14161
|
-
top: '1px',
|
|
14162
|
-
right: '-12px'
|
|
14508
|
+
zIndex: 1000
|
|
14163
14509
|
}
|
|
14164
14510
|
}, {
|
|
14165
|
-
children: jsx(
|
|
14166
|
-
|
|
14511
|
+
children: jsx("span", {
|
|
14512
|
+
children: (phenomenonDetails === null || phenomenonDetails === void 0 ? void 0 : phenomenonDetails.translationKey) ? t(phenomenonDetails.translationKey) : '-'
|
|
14167
14513
|
})
|
|
14168
|
-
}))
|
|
14169
|
-
}
|
|
14170
|
-
|
|
14171
|
-
|
|
14514
|
+
}));
|
|
14515
|
+
}
|
|
14516
|
+
return (phenomenonDetails === null || phenomenonDetails === void 0 ? void 0 : phenomenonDetails.translationKey) ? t(phenomenonDetails.translationKey) : '-';
|
|
14517
|
+
})()
|
|
14518
|
+
})), jsx(Box, Object.assign({
|
|
14519
|
+
sx: {
|
|
14520
|
+
position: 'absolute',
|
|
14521
|
+
right: 0,
|
|
14522
|
+
bottom: -6
|
|
14523
|
+
}
|
|
14524
|
+
}, {
|
|
14525
|
+
children: getPhenomenaIcon(phenomenonDetails === null || phenomenonDetails === void 0 ? void 0 : phenomenonDetails.key)
|
|
14526
|
+
}))]
|
|
14172
14527
|
}))
|
|
14173
|
-
}),
|
|
14174
|
-
|
|
14175
|
-
|
|
14528
|
+
})), jsx(WarningListColumnContent, Object.assign({
|
|
14529
|
+
title: t('warning-list-header-level'),
|
|
14530
|
+
status: status
|
|
14531
|
+
}, {
|
|
14532
|
+
children: jsx(Box, Object.assign({
|
|
14533
|
+
component: "span",
|
|
14534
|
+
sx: getLevelStyle(levelDetails)
|
|
14535
|
+
}, {
|
|
14536
|
+
children: (() => {
|
|
14537
|
+
var _a, _b;
|
|
14538
|
+
if ((_a = warning.warningDetail) === null || _a === void 0 ? void 0 : _a.level) {
|
|
14539
|
+
if (levelDetails === null || levelDetails === void 0 ? void 0 : levelDetails.translationKey) {
|
|
14540
|
+
// Public warning level
|
|
14541
|
+
return t(levelDetails.translationKey);
|
|
14542
|
+
}
|
|
14543
|
+
if ((_b = warning.warningDetail) === null || _b === void 0 ? void 0 : _b.level) {
|
|
14544
|
+
// Aviation level
|
|
14545
|
+
return jsx("span", Object.assign({
|
|
14546
|
+
style: {
|
|
14547
|
+
fontWeight: 'bold'
|
|
14548
|
+
}
|
|
14549
|
+
}, {
|
|
14550
|
+
children: warning.warningDetail.level
|
|
14551
|
+
}));
|
|
14552
|
+
}
|
|
14553
|
+
}
|
|
14554
|
+
return '-';
|
|
14555
|
+
})()
|
|
14556
|
+
}))
|
|
14557
|
+
})), jsx(WarningListColumnContent, Object.assign({
|
|
14558
|
+
title: t('warning-list-header-status'),
|
|
14559
|
+
status: status,
|
|
14560
|
+
width: 96
|
|
14561
|
+
}, {
|
|
14562
|
+
children: jsxs(Box, Object.assign({
|
|
14563
|
+
sx: {
|
|
14564
|
+
position: 'relative'
|
|
14565
|
+
}
|
|
14566
|
+
}, {
|
|
14567
|
+
children: [getStatusIcon(warning), warning.editor && jsx(Box, Object.assign({
|
|
14568
|
+
sx: {
|
|
14569
|
+
width: '16px',
|
|
14570
|
+
position: 'absolute',
|
|
14571
|
+
top: '1px',
|
|
14572
|
+
right: '-12px'
|
|
14573
|
+
}
|
|
14574
|
+
}, {
|
|
14575
|
+
children: jsx(WarningAvatar, {
|
|
14576
|
+
editor: warning.editor
|
|
14577
|
+
})
|
|
14578
|
+
}))]
|
|
14579
|
+
}))
|
|
14580
|
+
}))]
|
|
14581
|
+
}))
|
|
14582
|
+
}))
|
|
14583
|
+
}), warning.id);
|
|
14584
|
+
};
|
|
14585
|
+
|
|
14586
|
+
const useHasScrollbar = (containerRef, scrollRef) => {
|
|
14587
|
+
const [hasScrollbar, setHasScrollbar] = React__default.useState(false);
|
|
14588
|
+
React__default.useEffect(() => {
|
|
14589
|
+
let resizeObserver;
|
|
14590
|
+
if (containerRef && containerRef.current && scrollRef) {
|
|
14591
|
+
resizeObserver = new ResizeObserver(entry => {
|
|
14592
|
+
var _a;
|
|
14593
|
+
const containerHeight = entry[0].target.clientHeight;
|
|
14594
|
+
const scrollHeight = (_a = scrollRef.current) === null || _a === void 0 ? void 0 : _a.scrollHeight;
|
|
14595
|
+
if (scrollHeight !== undefined) {
|
|
14596
|
+
setHasScrollbar(scrollHeight > containerHeight);
|
|
14597
|
+
}
|
|
14598
|
+
});
|
|
14599
|
+
resizeObserver.observe(containerRef.current);
|
|
14600
|
+
}
|
|
14601
|
+
return () => {
|
|
14602
|
+
if (resizeObserver) {
|
|
14603
|
+
resizeObserver.disconnect();
|
|
14604
|
+
}
|
|
14605
|
+
};
|
|
14606
|
+
}, [containerRef, scrollRef]);
|
|
14607
|
+
return hasScrollbar;
|
|
14608
|
+
};
|
|
14609
|
+
const sortWarningsOnStatus = warnings => {
|
|
14610
|
+
return warnings.reduce((allWarnings, warning) => {
|
|
14611
|
+
const status = warning.status || mapProductStatusToWarningStatus(warning.productStatus);
|
|
14612
|
+
if (status === PublicWarningStatus.DRAFT || status === PublicWarningStatus.DRAFT_PUBLISHED) {
|
|
14613
|
+
return Object.assign(Object.assign({}, allWarnings), {
|
|
14614
|
+
draft: allWarnings === null || allWarnings === void 0 ? void 0 : allWarnings.draft.concat(warning)
|
|
14615
|
+
});
|
|
14616
|
+
}
|
|
14617
|
+
if (status === PublicWarningStatus.PUBLISHED) {
|
|
14618
|
+
return Object.assign(Object.assign({}, allWarnings), {
|
|
14619
|
+
published: allWarnings === null || allWarnings === void 0 ? void 0 : allWarnings.published.concat(warning)
|
|
14620
|
+
});
|
|
14621
|
+
}
|
|
14622
|
+
if (status === PublicWarningStatus.TODO) {
|
|
14623
|
+
return Object.assign(Object.assign({}, allWarnings), {
|
|
14624
|
+
todo: allWarnings === null || allWarnings === void 0 ? void 0 : allWarnings.todo.concat(warning)
|
|
14625
|
+
});
|
|
14626
|
+
}
|
|
14627
|
+
if (status === PublicWarningStatus.EXPIRED) {
|
|
14628
|
+
return Object.assign(Object.assign({}, allWarnings), {
|
|
14629
|
+
expired: allWarnings === null || allWarnings === void 0 ? void 0 : allWarnings.expired.concat(warning)
|
|
14630
|
+
});
|
|
14631
|
+
}
|
|
14632
|
+
return allWarnings;
|
|
14633
|
+
}, {
|
|
14634
|
+
todo: [],
|
|
14635
|
+
draft: [],
|
|
14636
|
+
published: [],
|
|
14637
|
+
expired: []
|
|
14638
|
+
});
|
|
14639
|
+
};
|
|
14640
|
+
const WarningListHeaderContent = _a => {
|
|
14641
|
+
var {
|
|
14642
|
+
title,
|
|
14643
|
+
width = 76
|
|
14644
|
+
} = _a,
|
|
14645
|
+
props = __rest(_a, ["title", "width"]);
|
|
14646
|
+
return jsx(Grid, Object.assign({
|
|
14647
|
+
item: true
|
|
14648
|
+
}, props, {
|
|
14649
|
+
sx: Object.assign(Object.assign({}, props.sx), {
|
|
14650
|
+
width
|
|
14651
|
+
})
|
|
14652
|
+
}, {
|
|
14653
|
+
children: jsx(Box, Object.assign({
|
|
14654
|
+
sx: {
|
|
14655
|
+
overflow: 'hidden',
|
|
14656
|
+
fontWeight: 'normal',
|
|
14657
|
+
textOverflow: 'ellipsis',
|
|
14658
|
+
fontSize: 12,
|
|
14659
|
+
lineHeight: 1.33,
|
|
14660
|
+
height: 16,
|
|
14661
|
+
color: 'geowebColors.captions.captionStatus.rgba'
|
|
14662
|
+
}
|
|
14663
|
+
}, {
|
|
14664
|
+
children: title
|
|
14665
|
+
}))
|
|
14176
14666
|
}));
|
|
14177
14667
|
};
|
|
14178
14668
|
const PublicWarningList = ({
|
|
14179
|
-
warnings,
|
|
14669
|
+
warnings: _warnings = [],
|
|
14180
14670
|
filters,
|
|
14181
14671
|
isLoading: _isLoading = false,
|
|
14182
14672
|
error,
|
|
14183
14673
|
selectedPublicWarningId: _selectedPublicWarningId = '',
|
|
14184
14674
|
lastUpdatedTime,
|
|
14185
|
-
|
|
14186
|
-
|
|
14675
|
+
showSigmet,
|
|
14676
|
+
showAirmet,
|
|
14677
|
+
setShowSigmet,
|
|
14678
|
+
setShowAirmet,
|
|
14679
|
+
onSelectWarning: _onSelectWarning = () => {},
|
|
14680
|
+
onEditWarning: _onEditWarning = () => {},
|
|
14187
14681
|
onCreateWarning: _onCreateWarning = () => {},
|
|
14188
|
-
onDeleteWarning:
|
|
14682
|
+
onDeleteWarning: _onDeleteWarning = () => {},
|
|
14189
14683
|
onRefetchWarnings: _onRefetchWarnings = () => {},
|
|
14190
|
-
onDeleteReviewWarning:
|
|
14684
|
+
onDeleteReviewWarning: _onDeleteReviewWarning = () => {},
|
|
14191
14685
|
onClickAllChip: _onClickAllChip = () => {},
|
|
14192
14686
|
isAllChipSelected: _isAllChipSelected = true
|
|
14193
14687
|
}) => {
|
|
14194
14688
|
const {
|
|
14195
14689
|
t
|
|
14196
14690
|
} = useWarningsTranslation();
|
|
14197
|
-
const sortedWarnings =
|
|
14691
|
+
const sortedWarnings = sortWarningsOnStatus(_warnings);
|
|
14692
|
+
const items = [{
|
|
14693
|
+
status: PublicWarningStatus.TODO,
|
|
14694
|
+
totalWarnings: sortedWarnings.todo.length
|
|
14695
|
+
}, ...sortedWarnings.todo, {
|
|
14696
|
+
status: PublicWarningStatus.DRAFT,
|
|
14697
|
+
totalWarnings: sortedWarnings.draft.length
|
|
14698
|
+
}, ...sortedWarnings.draft, {
|
|
14699
|
+
status: PublicWarningStatus.PUBLISHED,
|
|
14700
|
+
totalWarnings: sortedWarnings.published.length
|
|
14701
|
+
}, ...sortedWarnings.published, {
|
|
14702
|
+
status: PublicWarningStatus.EXPIRED,
|
|
14703
|
+
totalWarnings: sortedWarnings.expired.length
|
|
14704
|
+
}, ...sortedWarnings.expired];
|
|
14705
|
+
const getItemSize = (index, width) => {
|
|
14706
|
+
const item = items[index];
|
|
14707
|
+
if (item.totalWarnings !== undefined) {
|
|
14708
|
+
return 36;
|
|
14709
|
+
}
|
|
14710
|
+
if (width <= 400) {
|
|
14711
|
+
return 201;
|
|
14712
|
+
}
|
|
14713
|
+
if (width <= 500) {
|
|
14714
|
+
return 101;
|
|
14715
|
+
}
|
|
14716
|
+
if (width <= breakpoints.tablet) {
|
|
14717
|
+
return 81;
|
|
14718
|
+
}
|
|
14719
|
+
if (width <= breakpoints.desktop) {
|
|
14720
|
+
return 71;
|
|
14721
|
+
}
|
|
14722
|
+
return 34;
|
|
14723
|
+
};
|
|
14724
|
+
const filterRef = React__default.useRef(null);
|
|
14725
|
+
const scrollContainerRef = React__default.useRef(null);
|
|
14726
|
+
const listRef = React__default.useRef(null);
|
|
14727
|
+
const listInnerRef = React__default.useRef(null);
|
|
14728
|
+
const resetListIndex = () => {
|
|
14729
|
+
if (listRef.current) {
|
|
14730
|
+
listRef.current.resetAfterIndex(0, true);
|
|
14731
|
+
}
|
|
14732
|
+
};
|
|
14733
|
+
React__default.useEffect(() => {
|
|
14734
|
+
if (listRef.current) {
|
|
14735
|
+
resetListIndex();
|
|
14736
|
+
}
|
|
14737
|
+
}, [_warnings]);
|
|
14738
|
+
const filterHeight = useGetFilterHeight(filterRef);
|
|
14739
|
+
const hasScrollbar = useHasScrollbar(scrollContainerRef, listInnerRef);
|
|
14198
14740
|
return jsxs(Box, Object.assign({
|
|
14199
14741
|
sx: {
|
|
14200
14742
|
padding: 3,
|
|
14201
14743
|
height: '100%',
|
|
14202
|
-
overflowY: '
|
|
14744
|
+
overflowY: 'hidden',
|
|
14203
14745
|
containerName: 'publicWarningList',
|
|
14204
14746
|
containerType: 'inline-size'
|
|
14205
14747
|
},
|
|
14206
14748
|
"data-testid": "publicWarningList"
|
|
14207
14749
|
}, {
|
|
14208
14750
|
children: [jsxs(Grid, Object.assign({
|
|
14209
|
-
container: true
|
|
14751
|
+
container: true,
|
|
14752
|
+
justifyItems: "flex-end",
|
|
14753
|
+
ref: filterRef,
|
|
14754
|
+
sx: {
|
|
14755
|
+
[`@container publicWarningList (max-width: ${breakpoints.tablet}px)`]: {
|
|
14756
|
+
' .MuiGrid-grid-sm-12': {
|
|
14757
|
+
maxWidth: '100%',
|
|
14758
|
+
flexBasis: '100%'
|
|
14759
|
+
},
|
|
14760
|
+
' .warning-filter': {
|
|
14761
|
+
order: 2
|
|
14762
|
+
},
|
|
14763
|
+
' .create-warning': {
|
|
14764
|
+
order: 1
|
|
14765
|
+
}
|
|
14766
|
+
}
|
|
14767
|
+
}
|
|
14210
14768
|
}, {
|
|
14211
14769
|
children: [jsx(Grid, Object.assign({
|
|
14770
|
+
className: "warning-filter",
|
|
14212
14771
|
item: true,
|
|
14213
14772
|
xs: 12,
|
|
14214
|
-
sm:
|
|
14773
|
+
sm: 12,
|
|
14774
|
+
md: 8,
|
|
14775
|
+
order: {
|
|
14776
|
+
xs: 2,
|
|
14777
|
+
md: 1
|
|
14778
|
+
}
|
|
14215
14779
|
}, {
|
|
14216
14780
|
children: jsx(FilterList, {
|
|
14217
14781
|
filters: filters,
|
|
14218
14782
|
isAllSelected: _isAllChipSelected,
|
|
14219
|
-
onClickAll: _onClickAllChip
|
|
14783
|
+
onClickAll: _onClickAllChip,
|
|
14784
|
+
showSigmet: showSigmet,
|
|
14785
|
+
showAirmet: showAirmet,
|
|
14786
|
+
setShowSigmet: setShowSigmet,
|
|
14787
|
+
setShowAirmet: setShowAirmet
|
|
14220
14788
|
})
|
|
14221
|
-
})),
|
|
14789
|
+
})), jsxs(Grid, Object.assign({
|
|
14790
|
+
className: "create-warning",
|
|
14222
14791
|
item: true,
|
|
14223
|
-
xs:
|
|
14792
|
+
xs: 12,
|
|
14793
|
+
sm: 12,
|
|
14794
|
+
md: 4,
|
|
14795
|
+
order: {
|
|
14796
|
+
xs: 1,
|
|
14797
|
+
md: 2
|
|
14798
|
+
},
|
|
14799
|
+
sx: {
|
|
14800
|
+
display: 'flex'
|
|
14801
|
+
},
|
|
14802
|
+
justifyContent: "flex-end",
|
|
14803
|
+
alignItems: "self-start"
|
|
14224
14804
|
}, {
|
|
14225
|
-
children: jsx(
|
|
14805
|
+
children: [lastUpdatedTime && jsx(Box, Object.assign({
|
|
14806
|
+
sx: {
|
|
14807
|
+
float: 'left',
|
|
14808
|
+
minWidth: 140,
|
|
14809
|
+
paddingTop: 0.5
|
|
14810
|
+
}
|
|
14811
|
+
}, {
|
|
14812
|
+
children: jsx(LastUpdateTime, {
|
|
14813
|
+
onPressRefresh: _onRefetchWarnings,
|
|
14814
|
+
lastUpdateTime: lastUpdatedTime
|
|
14815
|
+
})
|
|
14816
|
+
})), jsx(Button, Object.assign({
|
|
14226
14817
|
variant: "primary",
|
|
14227
14818
|
onClick: _onCreateWarning,
|
|
14228
14819
|
sx: {
|
|
@@ -14230,22 +14821,19 @@ const PublicWarningList = ({
|
|
|
14230
14821
|
marginBottom: '8px',
|
|
14231
14822
|
fontSize: '12px',
|
|
14232
14823
|
height: '32px',
|
|
14233
|
-
whiteSpace: 'nowrap'
|
|
14824
|
+
whiteSpace: 'nowrap',
|
|
14825
|
+
minWidth: 'auto'
|
|
14234
14826
|
}
|
|
14235
14827
|
}, {
|
|
14236
14828
|
children: t('warning-list-button_create')
|
|
14237
|
-
}))
|
|
14829
|
+
}))]
|
|
14238
14830
|
}))]
|
|
14239
14831
|
})), error && jsx(AlertBanner, {
|
|
14240
14832
|
title: error.message,
|
|
14241
14833
|
shouldClose: true
|
|
14242
|
-
}), _isLoading
|
|
14834
|
+
}), _isLoading && jsx(LinearProgress, {
|
|
14243
14835
|
"data-testid": "loading-bar",
|
|
14244
14836
|
color: "secondary"
|
|
14245
|
-
}) : jsx(Box, {
|
|
14246
|
-
sx: {
|
|
14247
|
-
height: '4px'
|
|
14248
|
-
}
|
|
14249
14837
|
}), !error && jsxs(Grid, Object.assign({
|
|
14250
14838
|
container: true,
|
|
14251
14839
|
rowSpacing: 0,
|
|
@@ -14255,9 +14843,12 @@ const PublicWarningList = ({
|
|
|
14255
14843
|
sx: {
|
|
14256
14844
|
maxWidth: '100%',
|
|
14257
14845
|
display: 'none',
|
|
14258
|
-
|
|
14846
|
+
marginTop: '4px',
|
|
14847
|
+
[`@container publicWarningList (min-width: ${breakpoints.desktop}px)`]: Object.assign({
|
|
14259
14848
|
display: 'flex'
|
|
14260
|
-
}
|
|
14849
|
+
}, hasScrollbar && {
|
|
14850
|
+
paddingRight: 2
|
|
14851
|
+
})
|
|
14261
14852
|
}
|
|
14262
14853
|
}, {
|
|
14263
14854
|
children: [jsx(WarningListHeaderContent, {
|
|
@@ -14289,53 +14880,57 @@ const PublicWarningList = ({
|
|
|
14289
14880
|
marginRight: '48px'
|
|
14290
14881
|
}
|
|
14291
14882
|
})]
|
|
14292
|
-
})),
|
|
14883
|
+
})), sortedWarnings && !error && jsx(Box, Object.assign({
|
|
14884
|
+
"data-testid": "warnings-list",
|
|
14293
14885
|
sx: {
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
}
|
|
14886
|
+
height: `calc(100% - ${filterHeight}px)`,
|
|
14887
|
+
minHeight: '206px'
|
|
14888
|
+
},
|
|
14889
|
+
ref: scrollContainerRef
|
|
14299
14890
|
}, {
|
|
14300
|
-
children: jsx(
|
|
14301
|
-
|
|
14302
|
-
|
|
14303
|
-
|
|
14304
|
-
|
|
14305
|
-
|
|
14306
|
-
|
|
14307
|
-
|
|
14308
|
-
|
|
14309
|
-
|
|
14310
|
-
|
|
14311
|
-
|
|
14312
|
-
|
|
14313
|
-
|
|
14314
|
-
|
|
14315
|
-
|
|
14316
|
-
|
|
14317
|
-
|
|
14318
|
-
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
|
|
14891
|
+
children: jsx(AutoSizer, Object.assign({
|
|
14892
|
+
onResize: resetListIndex
|
|
14893
|
+
}, {
|
|
14894
|
+
children: ({
|
|
14895
|
+
height: _height = 0,
|
|
14896
|
+
width: _width = 0
|
|
14897
|
+
}) => jsx(VariableSizeList, Object.assign({
|
|
14898
|
+
height: _height,
|
|
14899
|
+
width: _width,
|
|
14900
|
+
itemCount: items.length,
|
|
14901
|
+
itemSize: index => getItemSize(index, _width),
|
|
14902
|
+
ref: listRef,
|
|
14903
|
+
innerRef: listInnerRef
|
|
14904
|
+
}, {
|
|
14905
|
+
children: ({
|
|
14906
|
+
index,
|
|
14907
|
+
style
|
|
14908
|
+
}) => {
|
|
14909
|
+
const warning = items[index];
|
|
14910
|
+
const key = `warning-${warning.status}-${index}`;
|
|
14911
|
+
if (warning.totalWarnings !== undefined) {
|
|
14912
|
+
const header = warning;
|
|
14913
|
+
return jsx(WarningListItemSeperator, {
|
|
14914
|
+
status: header.status,
|
|
14915
|
+
totalWarnings: header.totalWarnings,
|
|
14916
|
+
style: style
|
|
14917
|
+
}, key);
|
|
14918
|
+
}
|
|
14919
|
+
const publicWarning = warning;
|
|
14920
|
+
return jsx(WarningListItem, {
|
|
14921
|
+
style: style,
|
|
14922
|
+
status: publicWarning.status,
|
|
14923
|
+
warning: publicWarning,
|
|
14924
|
+
onSelectWarning: _onSelectWarning,
|
|
14925
|
+
onEditWarning: _onEditWarning,
|
|
14926
|
+
onDeleteWarning: _onDeleteWarning,
|
|
14927
|
+
onDeleteReviewWarning: _onDeleteReviewWarning,
|
|
14928
|
+
activeWarningId: _selectedPublicWarningId
|
|
14929
|
+
}, key);
|
|
14930
|
+
}
|
|
14931
|
+
}))
|
|
14932
|
+
}))
|
|
14933
|
+
}))]
|
|
14339
14934
|
}));
|
|
14340
14935
|
};
|
|
14341
14936
|
|
|
@@ -14520,13 +15115,25 @@ const PublicWarningListConnect = () => {
|
|
|
14520
15115
|
const {
|
|
14521
15116
|
auth
|
|
14522
15117
|
} = useAuthenticationContext();
|
|
15118
|
+
const {
|
|
15119
|
+
data: airmetList,
|
|
15120
|
+
refetch: refetchAirmetList,
|
|
15121
|
+
isFetching: isFetchingAirmet
|
|
15122
|
+
} = useAirmetList();
|
|
15123
|
+
const {
|
|
15124
|
+
data: sigmetList,
|
|
15125
|
+
refetch: refetchSigmetList,
|
|
15126
|
+
isFetching: isFetchingSigmet
|
|
15127
|
+
} = useSigmetList();
|
|
15128
|
+
const [showAirmet, setShowAirmet] = React__default.useState(false);
|
|
15129
|
+
const [showSigmet, setShowSigmet] = React__default.useState(false);
|
|
14523
15130
|
const [confirmDialogOptions, setConfirmDialogOptions] = React__default.useState(undefined);
|
|
14524
15131
|
const filters = useSelector(selectAllFilters);
|
|
14525
15132
|
const isAllChipSelected = useSelector(getIsAllSelected);
|
|
14526
15133
|
const filteredWarnings = useSelector(getFilteredWarnings);
|
|
14527
15134
|
const warnings = useSelector(selectAllPublicWarnings);
|
|
14528
15135
|
const selectedPublicWarningId = useSelector(getSelectedPublicWarningId);
|
|
14529
|
-
const isLoading = useSelector(isPublicWarningsLoading);
|
|
15136
|
+
const isLoading = useSelector(isPublicWarningsLoading || isFetchingAirmet || isFetchingSigmet);
|
|
14530
15137
|
const error = useSelector(getPublicWarningsError);
|
|
14531
15138
|
const isFormDirty = useSelector(getSelectedPublicIsFormDirty);
|
|
14532
15139
|
const lastUpdatedTime = useSelector(getPublicWarningsLastUpdatedTime);
|
|
@@ -14582,7 +15189,7 @@ const PublicWarningListConnect = () => {
|
|
|
14582
15189
|
};
|
|
14583
15190
|
const deleteReviewWarning = warning => {
|
|
14584
15191
|
const ignoredWarning = Object.assign(Object.assign({}, warning), {
|
|
14585
|
-
status:
|
|
15192
|
+
status: PublicWarningStatus.IGNORED
|
|
14586
15193
|
});
|
|
14587
15194
|
setConfirmDialogOptions({
|
|
14588
15195
|
confirmLabel: t('warning-dialog-delete-confirm'),
|
|
@@ -14606,8 +15213,10 @@ const PublicWarningListConnect = () => {
|
|
|
14606
15213
|
fetchWarnings();
|
|
14607
15214
|
};
|
|
14608
15215
|
const fetchWarnings = React__default.useCallback(() => {
|
|
15216
|
+
refetchAirmetList();
|
|
15217
|
+
refetchSigmetList();
|
|
14609
15218
|
dispatch(publicWarningActions.fetchWarnings());
|
|
14610
|
-
}, [dispatch]);
|
|
15219
|
+
}, [dispatch, refetchAirmetList, refetchSigmetList]);
|
|
14611
15220
|
const onClickAllChip = React__default.useCallback(isChecked => {
|
|
14612
15221
|
dispatch(publicWarningActions.toggleAllFilters({
|
|
14613
15222
|
isChecked
|
|
@@ -14623,9 +15232,15 @@ const PublicWarningListConnect = () => {
|
|
|
14623
15232
|
warnings
|
|
14624
15233
|
}));
|
|
14625
15234
|
}, [dispatch, warnings]);
|
|
15235
|
+
const transformedSigmets = (sigmetList === null || sigmetList === void 0 ? void 0 : sigmetList.map(transformSigmetToWarningFormat)) || [];
|
|
15236
|
+
const transformedAirmets = (airmetList === null || airmetList === void 0 ? void 0 : airmetList.map(transformAirmetToWarningFormat)) || [];
|
|
15237
|
+
const combinedWarnings = filteredWarnings.concat(showSigmet ? transformedSigmets : []).concat(showAirmet ? transformedAirmets : []).sort((w1, w2) => {
|
|
15238
|
+
var _a;
|
|
15239
|
+
return ((_a = w2.lastUpdatedTime) === null || _a === void 0 ? void 0 : _a.localeCompare(w1.lastUpdatedTime || '')) || 0;
|
|
15240
|
+
});
|
|
14626
15241
|
return jsxs(Fragment, {
|
|
14627
15242
|
children: [jsx(PublicWarningList, {
|
|
14628
|
-
warnings:
|
|
15243
|
+
warnings: combinedWarnings,
|
|
14629
15244
|
isLoading: isLoading,
|
|
14630
15245
|
error: error,
|
|
14631
15246
|
onSelectWarning: selectWarning,
|
|
@@ -14638,7 +15253,11 @@ const PublicWarningListConnect = () => {
|
|
|
14638
15253
|
onRefetchWarnings: fetchWarnings,
|
|
14639
15254
|
filters: filters,
|
|
14640
15255
|
isAllChipSelected: isAllChipSelected,
|
|
14641
|
-
onClickAllChip: onClickAllChip
|
|
15256
|
+
onClickAllChip: onClickAllChip,
|
|
15257
|
+
showSigmet: showSigmet,
|
|
15258
|
+
showAirmet: showAirmet,
|
|
15259
|
+
setShowSigmet: setShowSigmet,
|
|
15260
|
+
setShowAirmet: setShowAirmet
|
|
14642
15261
|
}), confirmDialogOptions && jsx(ConfirmDeleteWarningDialog, {
|
|
14643
15262
|
onClose: () => setConfirmDialogOptions(undefined),
|
|
14644
15263
|
title: confirmDialogOptions.title,
|