@opengeoweb/cap 15.3.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +149 -36
- package/package.json +10 -10
- package/src/index.d.ts +0 -4
- package/src/lib/CapDemo.stories.d.ts +0 -8
- package/src/lib/components/CapMapAndList.integration.spec.d.ts +0 -1
- package/src/lib/components/ComponentsLookUp/componentsLookUp.d.ts +0 -32
- package/src/lib/components/ComponentsLookUp/componentsLookUp.spec.d.ts +0 -1
- package/src/lib/components/ComponentsLookUp/index.d.ts +0 -1
- package/src/lib/components/GanttChart/Gantt.d.ts +0 -40
- package/src/lib/components/GanttChart/GanttModule.d.ts +0 -7
- package/src/lib/components/GanttChart/GanttModule.spec.d.ts +0 -1
- package/src/lib/components/GanttChart/GanttModule.stories.d.ts +0 -7
- package/src/lib/components/GanttChart/GanttReactWrapper.d.ts +0 -37
- package/src/lib/components/GanttChart/GanttWrapper.d.ts +0 -9
- package/src/lib/components/GanttChart/GanttWrapper.spec.d.ts +0 -1
- package/src/lib/components/GanttChart/GanttWrapper.stories.d.ts +0 -11
- package/src/lib/components/GanttChart/Task.d.ts +0 -29
- package/src/lib/components/GanttChart/ViewMode.d.ts +0 -9
- package/src/lib/components/GanttChart/mockTasks.d.ts +0 -2
- package/src/lib/components/GanttChart/utils.d.ts +0 -5
- package/src/lib/components/GanttChart/utils.spec.d.ts +0 -1
- package/src/lib/components/MapViewCap/MapViewCapConnect.d.ts +0 -18
- package/src/lib/components/MapViewCap/MapViewCapConnect.spec.d.ts +0 -1
- package/src/lib/components/MapViewCap/MapViewCapConnect.stories.d.ts +0 -6
- package/src/lib/components/MapViewCap/MapViewCapConnectWrapper.d.ts +0 -17
- package/src/lib/components/MapViewCap/MapViewCapConnectWrapper.spec.d.ts +0 -1
- package/src/lib/components/MapViewCap/index.d.ts +0 -1
- package/src/lib/components/Providers/Providers.d.ts +0 -32
- package/src/lib/components/Providers/index.d.ts +0 -1
- package/src/lib/components/WarningListCap/WarningListCap.d.ts +0 -10
- package/src/lib/components/WarningListCap/WarningListCap.spec.d.ts +0 -1
- package/src/lib/components/WarningListCap/WarningListCap.stories.d.ts +0 -6
- package/src/lib/components/WarningListCap/WarningListCapConnect.d.ts +0 -7
- package/src/lib/components/WarningListCap/WarningListCapConnectWrapper.d.ts +0 -6
- package/src/lib/components/WarningListCap/WarningListCapConnectWrapper.spec.d.ts +0 -1
- package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCap.d.ts +0 -7
- package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCap.spec.d.ts +0 -1
- package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCap.stories.d.ts +0 -6
- package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCapConnect.d.ts +0 -9
- package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCapConnect.spec.d.ts +0 -1
- package/src/lib/components/WarningListCap/index.d.ts +0 -1
- package/src/lib/components/WarningListCap/types.d.ts +0 -47
- package/src/lib/components/types.d.ts +0 -69
- package/src/lib/index.d.ts +0 -2
- package/src/lib/store/index.d.ts +0 -1
- package/src/lib/store/store.d.ts +0 -3
- package/src/lib/store/types.d.ts +0 -15
- package/src/lib/utils/addColors.d.ts +0 -2
- package/src/lib/utils/addColors.spec.d.ts +0 -1
- package/src/lib/utils/addFeedAddressToCustomGeoJsonFeature.d.ts +0 -2
- package/src/lib/utils/addFeedAddressToCustomGeoJsonFeature.spec.d.ts +0 -1
- package/src/lib/utils/cap-api/api.d.ts +0 -12
- package/src/lib/utils/cap-api/fakeApi.d.ts +0 -2
- package/src/lib/utils/cap-api/hooks.d.ts +0 -10
- package/src/lib/utils/findEventIndexInLanguage.d.ts +0 -10
- package/src/lib/utils/findEventIndexInLanguage.spec.d.ts +0 -1
- package/src/lib/utils/highlightGeoJson.d.ts +0 -3
- package/src/lib/utils/highlightGeoJson.spec.d.ts +0 -1
- package/src/lib/utils/i18n.d.ts +0 -6
- package/src/lib/utils/mockAlert.d.ts +0 -2
- package/src/lib/utils/mockCapData.d.ts +0 -3
- package/src/lib/utils/mockGeoJson.d.ts +0 -2
- package/src/lib/utils/mockGeoJsonMultipleFeatures.d.ts +0 -3
package/index.esm.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { CircularProgress, Grid, Typography, Box as Box$1, LinearProgress, Card } from '@mui/material';
|
|
3
3
|
import { Box } from '@mui/system';
|
|
4
4
|
import { sessionStorageProvider, dateUtils, usePrevious, AlertBanner } from '@opengeoweb/shared';
|
|
5
5
|
import i18n from 'i18next';
|
|
6
6
|
import { GeoJSON } from 'ol/format';
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
8
7
|
import { useSelector } from 'react-redux';
|
|
9
8
|
import { ConfigurableMapConnect } from '@opengeoweb/core';
|
|
10
9
|
import { mapSelectors, mapListener, serviceListener, layersListener, syncGroupsListener, genericListener, openlayersListener, syncGroupsReducer, layerReducer, serviceReducer, mapReducer } from '@opengeoweb/store';
|
|
@@ -12,6 +11,7 @@ import { webmapUtils } from '@opengeoweb/webmap';
|
|
|
12
11
|
import { OpenLayersFeatureLayer, genericOpenLayersFeatureStyle, MapWarningProperties } from '@opengeoweb/webmap-react';
|
|
13
12
|
import { useQuery, useQueries } from '@tanstack/react-query';
|
|
14
13
|
import { handleResponse } from '@opengeoweb/api';
|
|
14
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import '@opengeoweb/time-slider';
|
|
17
17
|
import { combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
@@ -484,6 +484,7 @@ function _regeneratorRuntime() {
|
|
|
484
484
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
485
485
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
486
486
|
* */
|
|
487
|
+
|
|
487
488
|
var addColors = function addColors(features) {
|
|
488
489
|
var severityStyles = {
|
|
489
490
|
Extreme: {
|
|
@@ -539,6 +540,7 @@ var addColors = function addColors(features) {
|
|
|
539
540
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
540
541
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
541
542
|
* */
|
|
543
|
+
|
|
542
544
|
var addFeedAddressToCustomGeoJSonFeature = function addFeedAddressToCustomGeoJSonFeature(feedAddress, features) {
|
|
543
545
|
return features.reduce(function (list, feature) {
|
|
544
546
|
return list.concat(_objectSpread2(_objectSpread2({}, feature), {}, {
|
|
@@ -754,6 +756,7 @@ var useAllFeedAlerts = function useAllFeedAlerts(capPresets) {
|
|
|
754
756
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
755
757
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
756
758
|
* */
|
|
759
|
+
|
|
757
760
|
var findEventIndexInLanguage = function findEventIndexInLanguage(language, languages, capWarningPresets, feedAddressFromProps) {
|
|
758
761
|
var correctFeedIndex = capWarningPresets.feeds.findIndex(function (_ref) {
|
|
759
762
|
var feedAddress = _ref.feedAddress;
|
|
@@ -794,6 +797,7 @@ var findEventIndexInLanguage = function findEventIndexInLanguage(language, langu
|
|
|
794
797
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
795
798
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
796
799
|
* */
|
|
800
|
+
|
|
797
801
|
var highlightGeoJson = function highlightGeoJson(currentFeatures, featureResults) {
|
|
798
802
|
return Object.entries(currentFeatures).reduce(function (byId, _ref) {
|
|
799
803
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
@@ -901,27 +905,27 @@ var MapViewCapConnect = function MapViewCapConnect(_ref) {
|
|
|
901
905
|
};
|
|
902
906
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
903
907
|
}, [featuresByAlert]);
|
|
904
|
-
return jsx("div", {
|
|
908
|
+
return /*#__PURE__*/jsx("div", {
|
|
905
909
|
"data-testid": "mapViewCap",
|
|
906
910
|
ref: parentSizeRef,
|
|
907
911
|
style: {
|
|
908
912
|
height: '100%',
|
|
909
913
|
width: '100%'
|
|
910
914
|
},
|
|
911
|
-
children: jsxs(ConfigurableMapConnect, {
|
|
915
|
+
children: /*#__PURE__*/jsxs(ConfigurableMapConnect, {
|
|
912
916
|
"data-testid": "capWarningMap",
|
|
913
917
|
id: mapIdRef.current,
|
|
914
918
|
initialBbox: bbox,
|
|
915
919
|
layers: layers !== null && layers !== void 0 ? layers : [],
|
|
916
920
|
srs: srs,
|
|
917
921
|
title: title,
|
|
918
|
-
children: [jsx(OpenLayersFeatureLayer, {
|
|
922
|
+
children: [/*#__PURE__*/jsx(OpenLayersFeatureLayer, {
|
|
919
923
|
clickOnFeature: clickOnFeature,
|
|
920
924
|
featureCollection: geoJsonObject,
|
|
921
925
|
style: genericOpenLayersFeatureStyle,
|
|
922
926
|
testId: "MapViewCap-features",
|
|
923
927
|
zIndex: 1000
|
|
924
|
-
}), selectedFeatureEvent ? jsx(MapWarningProperties, {
|
|
928
|
+
}), selectedFeatureEvent ? /*#__PURE__*/jsx(MapWarningProperties, {
|
|
925
929
|
"data-testid": "mapWarnings",
|
|
926
930
|
languageIndex: findEventIndexInLanguage(i18n.language, selectedFeatureEvent.feature.properties.details.languages, capWarningPresets, selectedFeatureEvent.feature.properties.details.feedAddress),
|
|
927
931
|
parentSize: parentSize,
|
|
@@ -948,11 +952,30 @@ var MapViewCapConnect = function MapViewCapConnect(_ref) {
|
|
|
948
952
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
949
953
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
950
954
|
* */
|
|
955
|
+
|
|
951
956
|
var CAP_NAMESPACE = 'cap';
|
|
952
957
|
var useCapTranslation = function useCapTranslation() {
|
|
953
958
|
return useTranslation(CAP_NAMESPACE);
|
|
954
959
|
};
|
|
955
960
|
|
|
961
|
+
/* *
|
|
962
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
963
|
+
* you may not use this file except in compliance with the License.
|
|
964
|
+
* You may obtain a copy of the License at
|
|
965
|
+
*
|
|
966
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
967
|
+
*
|
|
968
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
969
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
970
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
971
|
+
* See the License for the specific language governing permissions and
|
|
972
|
+
* limitations under the License.
|
|
973
|
+
*
|
|
974
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
975
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
976
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
977
|
+
* */
|
|
978
|
+
|
|
956
979
|
var MapViewCapConnectWrapper = function MapViewCapConnectWrapper(_ref) {
|
|
957
980
|
var id = _ref.id,
|
|
958
981
|
title = _ref.title,
|
|
@@ -967,24 +990,24 @@ var MapViewCapConnectWrapper = function MapViewCapConnectWrapper(_ref) {
|
|
|
967
990
|
isPending = _useGetConfig.isPending,
|
|
968
991
|
error = _useGetConfig.error;
|
|
969
992
|
if (isPending) {
|
|
970
|
-
return jsx(Box, {
|
|
993
|
+
return /*#__PURE__*/jsx(Box, {
|
|
971
994
|
sx: {
|
|
972
995
|
display: 'flex',
|
|
973
996
|
justifyContent: 'center',
|
|
974
997
|
alignItems: 'center'
|
|
975
998
|
},
|
|
976
|
-
children: jsx(CircularProgress, {
|
|
999
|
+
children: /*#__PURE__*/jsx(CircularProgress, {
|
|
977
1000
|
"data-testid": "loadingSpinner"
|
|
978
1001
|
})
|
|
979
1002
|
});
|
|
980
1003
|
}
|
|
981
1004
|
if (error) {
|
|
982
|
-
return jsx(AlertBanner, {
|
|
1005
|
+
return /*#__PURE__*/jsx(AlertBanner, {
|
|
983
1006
|
info: error.message,
|
|
984
1007
|
title: t('map-view-cap-error-title')
|
|
985
1008
|
});
|
|
986
1009
|
}
|
|
987
|
-
return jsx(MapViewCapConnect, {
|
|
1010
|
+
return /*#__PURE__*/jsx(MapViewCapConnect, {
|
|
988
1011
|
bbox: bbox,
|
|
989
1012
|
capWarningPresets: capWarningPresets,
|
|
990
1013
|
id: id,
|
|
@@ -994,6 +1017,23 @@ var MapViewCapConnectWrapper = function MapViewCapConnectWrapper(_ref) {
|
|
|
994
1017
|
});
|
|
995
1018
|
};
|
|
996
1019
|
|
|
1020
|
+
/* *
|
|
1021
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1022
|
+
* you may not use this file except in compliance with the License.
|
|
1023
|
+
* You may obtain a copy of the License at
|
|
1024
|
+
*
|
|
1025
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1026
|
+
*
|
|
1027
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1028
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1029
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1030
|
+
* See the License for the specific language governing permissions and
|
|
1031
|
+
* limitations under the License.
|
|
1032
|
+
*
|
|
1033
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1034
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1035
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1036
|
+
* */
|
|
997
1037
|
var severityStyles = {
|
|
998
1038
|
Extreme: {
|
|
999
1039
|
border: 'solid 5px rgb(255, 9, 9)',
|
|
@@ -1018,7 +1058,7 @@ var WarningListRowCap = function WarningListRowCap(_ref) {
|
|
|
1018
1058
|
expires = _ref.expires;
|
|
1019
1059
|
var _useCapTranslation = useCapTranslation(),
|
|
1020
1060
|
t = _useCapTranslation.t;
|
|
1021
|
-
return jsxs(Grid, {
|
|
1061
|
+
return /*#__PURE__*/jsxs(Grid, {
|
|
1022
1062
|
container: true,
|
|
1023
1063
|
sx: {
|
|
1024
1064
|
border: severityStyles[severity].border,
|
|
@@ -1028,14 +1068,14 @@ var WarningListRowCap = function WarningListRowCap(_ref) {
|
|
|
1028
1068
|
marginBottom: '20px',
|
|
1029
1069
|
width: '100%'
|
|
1030
1070
|
},
|
|
1031
|
-
children: [jsxs(Grid, {
|
|
1071
|
+
children: [/*#__PURE__*/jsxs(Grid, {
|
|
1032
1072
|
size: {
|
|
1033
1073
|
xs: 4
|
|
1034
1074
|
},
|
|
1035
|
-
children: [jsx(Typography, {
|
|
1075
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
1036
1076
|
variant: "overline",
|
|
1037
1077
|
children: t('warning-list-row-event')
|
|
1038
|
-
}), jsx(Typography, {
|
|
1078
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
1039
1079
|
"data-testid": "event",
|
|
1040
1080
|
sx: {
|
|
1041
1081
|
fontWeight: 'normal'
|
|
@@ -1043,14 +1083,14 @@ var WarningListRowCap = function WarningListRowCap(_ref) {
|
|
|
1043
1083
|
variant: "subtitle2",
|
|
1044
1084
|
children: event || ''
|
|
1045
1085
|
})]
|
|
1046
|
-
}), jsxs(Grid, {
|
|
1086
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
1047
1087
|
size: {
|
|
1048
1088
|
xs: 4
|
|
1049
1089
|
},
|
|
1050
|
-
children: [jsx(Typography, {
|
|
1090
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
1051
1091
|
variant: "overline",
|
|
1052
1092
|
children: t('warning-list-row-severity')
|
|
1053
|
-
}), jsx(Typography, {
|
|
1093
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
1054
1094
|
"data-testid": "severity",
|
|
1055
1095
|
sx: {
|
|
1056
1096
|
fontWeight: 'normal'
|
|
@@ -1058,14 +1098,14 @@ var WarningListRowCap = function WarningListRowCap(_ref) {
|
|
|
1058
1098
|
variant: "subtitle2",
|
|
1059
1099
|
children: severity || ''
|
|
1060
1100
|
})]
|
|
1061
|
-
}), jsxs(Grid, {
|
|
1101
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
1062
1102
|
size: {
|
|
1063
1103
|
xs: 4
|
|
1064
1104
|
},
|
|
1065
|
-
children: [jsx(Typography, {
|
|
1105
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
1066
1106
|
variant: "overline",
|
|
1067
1107
|
children: t('warning-list-row-expires')
|
|
1068
|
-
}), jsx(Typography, {
|
|
1108
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
1069
1109
|
"data-testid": "expires",
|
|
1070
1110
|
sx: {
|
|
1071
1111
|
fontWeight: 'normal'
|
|
@@ -1093,8 +1133,8 @@ var WarningListRowCapConnect = function WarningListRowCapConnect(_ref) {
|
|
|
1093
1133
|
setLanguageIndex(foundLanguageIndex);
|
|
1094
1134
|
}
|
|
1095
1135
|
}, [alert, language, alertHasLanguages, capWarningPresets]);
|
|
1096
|
-
return jsx("div", {
|
|
1097
|
-
children: alert && alertHasLanguages ? jsx(WarningListRowCap, {
|
|
1136
|
+
return /*#__PURE__*/jsx("div", {
|
|
1137
|
+
children: alert && alertHasLanguages ? /*#__PURE__*/jsx(WarningListRowCap, {
|
|
1098
1138
|
event: alert.languages[languageIndex].event,
|
|
1099
1139
|
expires: alert.expires,
|
|
1100
1140
|
severity: alert.severity
|
|
@@ -1102,6 +1142,23 @@ var WarningListRowCapConnect = function WarningListRowCapConnect(_ref) {
|
|
|
1102
1142
|
});
|
|
1103
1143
|
};
|
|
1104
1144
|
|
|
1145
|
+
/* *
|
|
1146
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1147
|
+
* you may not use this file except in compliance with the License.
|
|
1148
|
+
* You may obtain a copy of the License at
|
|
1149
|
+
*
|
|
1150
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1151
|
+
*
|
|
1152
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1153
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1154
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1155
|
+
* See the License for the specific language governing permissions and
|
|
1156
|
+
* limitations under the License.
|
|
1157
|
+
*
|
|
1158
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1159
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1160
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1161
|
+
* */
|
|
1105
1162
|
var WarningListCap = function WarningListCap(_ref) {
|
|
1106
1163
|
var capWarningPresets = _ref.capWarningPresets,
|
|
1107
1164
|
alerts = _ref.alerts,
|
|
@@ -1109,19 +1166,19 @@ var WarningListCap = function WarningListCap(_ref) {
|
|
|
1109
1166
|
isPending = _ref$isPending === void 0 ? false : _ref$isPending;
|
|
1110
1167
|
var _useCapTranslation = useCapTranslation(),
|
|
1111
1168
|
t = _useCapTranslation.t;
|
|
1112
|
-
return jsxs(Box$1, {
|
|
1169
|
+
return /*#__PURE__*/jsxs(Box$1, {
|
|
1113
1170
|
sx: {
|
|
1114
1171
|
width: '100%',
|
|
1115
1172
|
height: '100%',
|
|
1116
1173
|
display: 'flex'
|
|
1117
1174
|
},
|
|
1118
|
-
children: [isPending ? jsx(LinearProgress, {
|
|
1175
|
+
children: [isPending ? /*#__PURE__*/jsx(LinearProgress, {
|
|
1119
1176
|
color: "secondary",
|
|
1120
1177
|
sx: {
|
|
1121
1178
|
position: 'absolute',
|
|
1122
1179
|
width: '100%'
|
|
1123
1180
|
}
|
|
1124
|
-
}) : null, jsxs(Card, {
|
|
1181
|
+
}) : null, /*#__PURE__*/jsxs(Card, {
|
|
1125
1182
|
"data-testid": "warningList",
|
|
1126
1183
|
sx: {
|
|
1127
1184
|
justifyContent: 'center',
|
|
@@ -1134,10 +1191,10 @@ var WarningListCap = function WarningListCap(_ref) {
|
|
|
1134
1191
|
marginBottom: '10px',
|
|
1135
1192
|
position: 'relative'
|
|
1136
1193
|
},
|
|
1137
|
-
children: [!isPending && !alerts.length && jsx(AlertBanner, {
|
|
1194
|
+
children: [!isPending && !alerts.length && /*#__PURE__*/jsx(AlertBanner, {
|
|
1138
1195
|
severity: "warning",
|
|
1139
1196
|
title: "No results"
|
|
1140
|
-
}), alerts.length > 0 && jsx(Box$1, {
|
|
1197
|
+
}), alerts.length > 0 && /*#__PURE__*/jsx(Box$1, {
|
|
1141
1198
|
sx: {
|
|
1142
1199
|
position: 'sticky',
|
|
1143
1200
|
top: 0,
|
|
@@ -1145,12 +1202,12 @@ var WarningListCap = function WarningListCap(_ref) {
|
|
|
1145
1202
|
display: 'flex',
|
|
1146
1203
|
justifyContent: 'center'
|
|
1147
1204
|
},
|
|
1148
|
-
children: jsx(AlertBanner, {
|
|
1205
|
+
children: /*#__PURE__*/jsx(AlertBanner, {
|
|
1149
1206
|
severity: "info",
|
|
1150
1207
|
title: t('warning-list-cap-alert-banner-title')
|
|
1151
1208
|
})
|
|
1152
1209
|
}), alerts.map(function (alert) {
|
|
1153
|
-
return jsx(WarningListRowCapConnect, {
|
|
1210
|
+
return /*#__PURE__*/jsx(WarningListRowCapConnect, {
|
|
1154
1211
|
alert: alert,
|
|
1155
1212
|
capWarningPresets: capWarningPresets
|
|
1156
1213
|
}, alert.identifier);
|
|
@@ -1159,12 +1216,30 @@ var WarningListCap = function WarningListCap(_ref) {
|
|
|
1159
1216
|
});
|
|
1160
1217
|
};
|
|
1161
1218
|
|
|
1219
|
+
/* *
|
|
1220
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1221
|
+
* you may not use this file except in compliance with the License.
|
|
1222
|
+
* You may obtain a copy of the License at
|
|
1223
|
+
*
|
|
1224
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1225
|
+
*
|
|
1226
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1227
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1228
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1229
|
+
* See the License for the specific language governing permissions and
|
|
1230
|
+
* limitations under the License.
|
|
1231
|
+
*
|
|
1232
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1233
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1234
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1235
|
+
* */
|
|
1236
|
+
|
|
1162
1237
|
var WarningListCapConnect = function WarningListCapConnect(_ref) {
|
|
1163
1238
|
var capWarningPresets = _ref.capWarningPresets;
|
|
1164
1239
|
var _useAllFeedAlerts = useAllFeedAlerts(capWarningPresets),
|
|
1165
1240
|
feedAlerts = _useAllFeedAlerts.results,
|
|
1166
1241
|
pending = _useAllFeedAlerts.pending;
|
|
1167
|
-
return jsx(WarningListCap, {
|
|
1242
|
+
return /*#__PURE__*/jsx(WarningListCap, {
|
|
1168
1243
|
alerts: feedAlerts.map(function (fa) {
|
|
1169
1244
|
return fa.alert;
|
|
1170
1245
|
}),
|
|
@@ -1173,6 +1248,24 @@ var WarningListCapConnect = function WarningListCapConnect(_ref) {
|
|
|
1173
1248
|
});
|
|
1174
1249
|
};
|
|
1175
1250
|
|
|
1251
|
+
/* *
|
|
1252
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1253
|
+
* you may not use this file except in compliance with the License.
|
|
1254
|
+
* You may obtain a copy of the License at
|
|
1255
|
+
*
|
|
1256
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1257
|
+
*
|
|
1258
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1259
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1260
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1261
|
+
* See the License for the specific language governing permissions and
|
|
1262
|
+
* limitations under the License.
|
|
1263
|
+
*
|
|
1264
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1265
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
1266
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1267
|
+
* */
|
|
1268
|
+
|
|
1176
1269
|
var WarningListCapConnectWrapper = function WarningListCapConnectWrapper(_ref) {
|
|
1177
1270
|
var productConfigKey = _ref.productConfigKey;
|
|
1178
1271
|
var _useCapTranslation = useCapTranslation(),
|
|
@@ -1182,33 +1275,52 @@ var WarningListCapConnectWrapper = function WarningListCapConnectWrapper(_ref) {
|
|
|
1182
1275
|
isPending = _useGetConfig.isPending,
|
|
1183
1276
|
error = _useGetConfig.error;
|
|
1184
1277
|
if (isPending) {
|
|
1185
|
-
return jsx(Box, {
|
|
1278
|
+
return /*#__PURE__*/jsx(Box, {
|
|
1186
1279
|
sx: {
|
|
1187
1280
|
display: 'flex',
|
|
1188
1281
|
justifyContent: 'center',
|
|
1189
1282
|
alignItems: 'center'
|
|
1190
1283
|
},
|
|
1191
|
-
children: jsx(CircularProgress, {
|
|
1284
|
+
children: /*#__PURE__*/jsx(CircularProgress, {
|
|
1192
1285
|
"data-testid": "loadingSpinner"
|
|
1193
1286
|
})
|
|
1194
1287
|
});
|
|
1195
1288
|
}
|
|
1196
1289
|
if (error) {
|
|
1197
|
-
return jsx(AlertBanner, {
|
|
1290
|
+
return /*#__PURE__*/jsx(AlertBanner, {
|
|
1198
1291
|
info: error.message,
|
|
1199
1292
|
title: t('warning-list-cap-error-title')
|
|
1200
1293
|
});
|
|
1201
1294
|
}
|
|
1202
|
-
return jsx(WarningListCapConnect, {
|
|
1295
|
+
return /*#__PURE__*/jsx(WarningListCapConnect, {
|
|
1203
1296
|
capWarningPresets: productConfig
|
|
1204
1297
|
});
|
|
1205
1298
|
};
|
|
1206
1299
|
|
|
1300
|
+
/* *
|
|
1301
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1302
|
+
* you may not use this file except in compliance with the License.
|
|
1303
|
+
* You may obtain a copy of the License at
|
|
1304
|
+
*
|
|
1305
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1306
|
+
*
|
|
1307
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1308
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1309
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1310
|
+
* See the License for the specific language governing permissions and
|
|
1311
|
+
* limitations under the License.
|
|
1312
|
+
*
|
|
1313
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
1314
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
1315
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1316
|
+
* */
|
|
1317
|
+
|
|
1207
1318
|
/**
|
|
1208
1319
|
* The lookup table is for registering your own components with the workspace.
|
|
1209
1320
|
* @param payload
|
|
1210
1321
|
* @returns
|
|
1211
1322
|
*/
|
|
1323
|
+
|
|
1212
1324
|
var ComponentsLookUp = function ComponentsLookUp(_ref) {
|
|
1213
1325
|
var componentType = _ref.componentType,
|
|
1214
1326
|
initialProps = _ref.initialProps,
|
|
@@ -1218,7 +1330,7 @@ var ComponentsLookUp = function ComponentsLookUp(_ref) {
|
|
|
1218
1330
|
case 'CapWarningMap':
|
|
1219
1331
|
{
|
|
1220
1332
|
var _initialProps$mapPres, _initialProps$mapPres2;
|
|
1221
|
-
return jsx(MapViewCapConnectWrapper, {
|
|
1333
|
+
return /*#__PURE__*/jsx(MapViewCapConnectWrapper, {
|
|
1222
1334
|
bbox: (_initialProps$mapPres = initialProps.mapPreset.proj) === null || _initialProps$mapPres === void 0 ? void 0 : _initialProps$mapPres.bbox,
|
|
1223
1335
|
id: id,
|
|
1224
1336
|
layers: initialProps.mapPreset.layers,
|
|
@@ -1228,7 +1340,7 @@ var ComponentsLookUp = function ComponentsLookUp(_ref) {
|
|
|
1228
1340
|
}
|
|
1229
1341
|
case 'CapWarningList':
|
|
1230
1342
|
{
|
|
1231
|
-
return jsx(WarningListCapConnectWrapper, {
|
|
1343
|
+
return /*#__PURE__*/jsx(WarningListCapConnectWrapper, {
|
|
1232
1344
|
productConfigKey: productConfigKey
|
|
1233
1345
|
});
|
|
1234
1346
|
}
|
|
@@ -1254,6 +1366,7 @@ var ComponentsLookUp = function ComponentsLookUp(_ref) {
|
|
|
1254
1366
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
1255
1367
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1256
1368
|
* */
|
|
1369
|
+
|
|
1257
1370
|
var capReducersMap = {
|
|
1258
1371
|
webmap: mapReducer,
|
|
1259
1372
|
services: serviceReducer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/cap",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "GeoWeb Common Alerting Protocol (CAP) library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/api": "
|
|
12
|
-
"@opengeoweb/core": "
|
|
11
|
+
"@opengeoweb/api": "17.0.0",
|
|
12
|
+
"@opengeoweb/core": "17.0.0",
|
|
13
13
|
"frappe-gantt": "^0.6.1",
|
|
14
|
-
"@opengeoweb/shared": "
|
|
15
|
-
"@opengeoweb/store": "
|
|
14
|
+
"@opengeoweb/shared": "17.0.0",
|
|
15
|
+
"@opengeoweb/store": "17.0.0",
|
|
16
16
|
"react-redux": "^9.2.0",
|
|
17
|
-
"@opengeoweb/webmap": "
|
|
18
|
-
"@opengeoweb/webmap-react": "
|
|
17
|
+
"@opengeoweb/webmap": "17.0.0",
|
|
18
|
+
"@opengeoweb/webmap-react": "17.0.0",
|
|
19
19
|
"@mui/system": "^7.3.2",
|
|
20
20
|
"react-i18next": "^15.1.1",
|
|
21
21
|
"@reduxjs/toolkit": "^2.6.1",
|
|
22
|
-
"@opengeoweb/theme": "
|
|
22
|
+
"@opengeoweb/theme": "17.0.0",
|
|
23
23
|
"i18next": "^25.0.1",
|
|
24
|
-
"@opengeoweb/time-slider": "
|
|
24
|
+
"@opengeoweb/time-slider": "17.0.0",
|
|
25
25
|
"@mui/material": "^7.0.1",
|
|
26
26
|
"ol": "^10.4.0",
|
|
27
27
|
"@tanstack/react-query": "^5.85.5"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@emotion/styled": "*"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"eslint-plugin-storybook": "
|
|
35
|
+
"eslint-plugin-storybook": "10.3.3"
|
|
36
36
|
},
|
|
37
37
|
"module": "./index.esm.js",
|
|
38
38
|
"type": "module",
|
package/src/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { InitialMapProps } from '@opengeoweb/core';
|
|
3
|
-
import type { CapFeatures } from '../types';
|
|
4
|
-
export type SupportedComponentTypes = 'CapWarningList' | 'CapWarningMap';
|
|
5
|
-
interface InitialProps {
|
|
6
|
-
mapPreset: {
|
|
7
|
-
layers?: InitialMapProps['mapPreset']['layers'];
|
|
8
|
-
proj: {
|
|
9
|
-
bbox: {
|
|
10
|
-
left: number;
|
|
11
|
-
bottom: number;
|
|
12
|
-
right: number;
|
|
13
|
-
top: number;
|
|
14
|
-
};
|
|
15
|
-
srs: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
geoJson: CapFeatures;
|
|
19
|
-
}
|
|
20
|
-
export interface ComponentsLookUpPayload {
|
|
21
|
-
productConfigKey: string;
|
|
22
|
-
componentType: SupportedComponentTypes;
|
|
23
|
-
id: string;
|
|
24
|
-
initialProps: InitialProps;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* The lookup table is for registering your own components with the workspace.
|
|
28
|
-
* @param payload
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
export declare const ComponentsLookUp: ({ componentType, initialProps, productConfigKey, id, }: ComponentsLookUpPayload) => React.ReactElement;
|
|
32
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './componentsLookUp';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import Gantt from 'frappe-gantt';
|
|
2
|
-
import type { Task } from './Task';
|
|
3
|
-
import { ViewMode } from './ViewMode';
|
|
4
|
-
interface Options {
|
|
5
|
-
view_mode?: ViewMode;
|
|
6
|
-
header_height?: number;
|
|
7
|
-
column_width?: number;
|
|
8
|
-
bar_height?: number;
|
|
9
|
-
language?: string;
|
|
10
|
-
step?: number;
|
|
11
|
-
date_format?: string;
|
|
12
|
-
bar_corner_radius?: number;
|
|
13
|
-
arrow_curve?: number;
|
|
14
|
-
padding?: number;
|
|
15
|
-
popup_trigger?: string;
|
|
16
|
-
custom_popup_html?: (task: Task) => string;
|
|
17
|
-
on_click?: (task: Task) => void;
|
|
18
|
-
on_view_change?: (mode: ViewMode) => void;
|
|
19
|
-
on_progress_change?: (task: Task, progress: number) => void;
|
|
20
|
-
on_date_change?: (task: Task, start: Date, end: Date) => void;
|
|
21
|
-
view_modes?: string[];
|
|
22
|
-
}
|
|
23
|
-
export default class CustomGantt extends Gantt {
|
|
24
|
-
private options;
|
|
25
|
-
private gantt_start;
|
|
26
|
-
private gantt_end;
|
|
27
|
-
private tasks;
|
|
28
|
-
constructor(wrapper: SVGSVGElement, tasks: Task[], options: Options);
|
|
29
|
-
update_view_scale(view_mode: ViewMode): void;
|
|
30
|
-
setup_gantt_dates(): void;
|
|
31
|
-
get_date_info(date: Date, newLastDate: Date, i: number): {
|
|
32
|
-
upper_text: string;
|
|
33
|
-
lower_text: string;
|
|
34
|
-
upper_x: number;
|
|
35
|
-
upper_y: number;
|
|
36
|
-
lower_x: number;
|
|
37
|
-
lower_y: number;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import GanttModule from './GanttModule';
|
|
3
|
-
declare const meta: Meta<typeof GanttModule>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof GanttModule>;
|
|
6
|
-
export declare const GanttDemoFakeApi: Story;
|
|
7
|
-
export declare const GanttDemoRealApi: Story;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Task } from './Task';
|
|
3
|
-
import { ViewMode } from './ViewMode';
|
|
4
|
-
export declare const renderDate: (date: Date) => string;
|
|
5
|
-
export declare const renderTime: (date: Date) => string;
|
|
6
|
-
interface GanttReactWrapperProps {
|
|
7
|
-
tasks: Task[];
|
|
8
|
-
viewMode?: ViewMode;
|
|
9
|
-
onTasksChange?: (tasks: Task[]) => void;
|
|
10
|
-
onClick?: (task: Task) => void;
|
|
11
|
-
onDateChange?: (task: Task, start: Date, end: Date) => void;
|
|
12
|
-
onProgressChange?: (task: Task, progress: number) => void;
|
|
13
|
-
onViewChange?: (mode: ViewMode) => void;
|
|
14
|
-
}
|
|
15
|
-
interface FrappeGanttState {
|
|
16
|
-
viewMode: ViewMode;
|
|
17
|
-
tasks: Task[];
|
|
18
|
-
}
|
|
19
|
-
export declare class GanttReactWrapper extends React.Component<GanttReactWrapperProps, FrappeGanttState> {
|
|
20
|
-
private _target;
|
|
21
|
-
private _svg;
|
|
22
|
-
private _gantt;
|
|
23
|
-
static defaultProps: {
|
|
24
|
-
viewMode: ViewMode;
|
|
25
|
-
onTasksChange: () => void;
|
|
26
|
-
onClick: () => void;
|
|
27
|
-
onDateChange: () => void;
|
|
28
|
-
onProgressChange: () => void;
|
|
29
|
-
onViewChange: () => void;
|
|
30
|
-
};
|
|
31
|
-
constructor(props: GanttReactWrapperProps);
|
|
32
|
-
static getDerivedStateFromProps(nextProps: GanttReactWrapperProps): FrappeGanttState;
|
|
33
|
-
componentDidMount(): void;
|
|
34
|
-
componentDidUpdate(): void;
|
|
35
|
-
render(): React.ReactElement;
|
|
36
|
-
}
|
|
37
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Task } from './Task';
|
|
3
|
-
import { ViewMode } from './ViewMode';
|
|
4
|
-
interface GantWrapperProps {
|
|
5
|
-
tasks: Task[];
|
|
6
|
-
defaultViewMode?: ViewMode;
|
|
7
|
-
}
|
|
8
|
-
declare const GantWrapper: React.FC<GantWrapperProps>;
|
|
9
|
-
export default GantWrapper;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import GanttWrapper from './GanttWrapper';
|
|
3
|
-
declare const meta: Meta<typeof GanttWrapper>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof GanttWrapper>;
|
|
6
|
-
export declare const Component: Story;
|
|
7
|
-
export declare const ComponentDark: Story;
|
|
8
|
-
export declare const EmptyList: Story;
|
|
9
|
-
export declare const GanttDemo: Story;
|
|
10
|
-
export declare const GanttDemoDark: Story;
|
|
11
|
-
export declare const GanttDemoEmptyList: Story;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare class Task {
|
|
2
|
-
private _dependencies;
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
start: string;
|
|
6
|
-
end: string;
|
|
7
|
-
_end: Date;
|
|
8
|
-
_start: Date;
|
|
9
|
-
severity: 'Minor' | 'Moderate' | 'Severe' | 'Extreme';
|
|
10
|
-
title: string;
|
|
11
|
-
description: string;
|
|
12
|
-
author: string;
|
|
13
|
-
area: string;
|
|
14
|
-
phenomenon: string;
|
|
15
|
-
constructor(options?: Partial<Task>);
|
|
16
|
-
/**
|
|
17
|
-
* Progress in percentage
|
|
18
|
-
*/
|
|
19
|
-
private _progress;
|
|
20
|
-
get progress(): number;
|
|
21
|
-
set progress(value: number);
|
|
22
|
-
/**
|
|
23
|
-
* A css custom class for the task chart bar
|
|
24
|
-
*/
|
|
25
|
-
custom_class?: string;
|
|
26
|
-
setDependencies(value: string | string[]): void;
|
|
27
|
-
set dependencies(value: string[] | string);
|
|
28
|
-
get dependencies(): string[] | string;
|
|
29
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { CustomFeature } from '../types';
|
|
2
|
-
import type { Task } from './Task';
|
|
3
|
-
export declare const convertSeverityToColorClass: (severity: Task["severity"]) => string;
|
|
4
|
-
export declare const getEndDateFromHeadline: (headline: string) => Date;
|
|
5
|
-
export declare const convertFeaturesToTasks: (features: CustomFeature[]) => Task[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { InitialMapProps } from '@opengeoweb/core';
|
|
3
|
-
import type { CapPresets } from '../types';
|
|
4
|
-
export interface MapViewCapConnectProps {
|
|
5
|
-
id?: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
bbox?: {
|
|
8
|
-
left: number;
|
|
9
|
-
bottom: number;
|
|
10
|
-
right: number;
|
|
11
|
-
top: number;
|
|
12
|
-
};
|
|
13
|
-
srs?: string;
|
|
14
|
-
capWarningPresets: CapPresets;
|
|
15
|
-
layers?: InitialMapProps['mapPreset']['layers'];
|
|
16
|
-
children?: React.ReactNode;
|
|
17
|
-
}
|
|
18
|
-
export declare const MapViewCapConnect: React.FC<MapViewCapConnectProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { MapViewCapConnect } from './MapViewCapConnect';
|
|
3
|
-
declare const meta: Meta<typeof MapViewCapConnect>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof MapViewCapConnect>;
|
|
6
|
-
export declare const MapViewCapConnectDemo: Story;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { InitialMapProps } from '@opengeoweb/core';
|
|
3
|
-
interface MapViewCapConnectWrapperProps {
|
|
4
|
-
id?: string;
|
|
5
|
-
title?: string;
|
|
6
|
-
bbox?: {
|
|
7
|
-
left: number;
|
|
8
|
-
bottom: number;
|
|
9
|
-
right: number;
|
|
10
|
-
top: number;
|
|
11
|
-
};
|
|
12
|
-
srs?: string;
|
|
13
|
-
productConfigKey: string;
|
|
14
|
-
layers?: InitialMapProps['mapPreset']['layers'];
|
|
15
|
-
}
|
|
16
|
-
export declare const MapViewCapConnectWrapper: React.FC<MapViewCapConnectWrapperProps>;
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MapViewCapConnect';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Theme } from '@mui/material';
|
|
2
|
-
import type { Store } from '@reduxjs/toolkit';
|
|
3
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
4
|
-
import type i18n from 'i18next';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { ThemeProviderProps } from '@opengeoweb/theme';
|
|
7
|
-
export declare const CapThemeWrapper: React.FC<ThemeProviderProps>;
|
|
8
|
-
interface CapQueryClientProviderProps {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
customClient?: QueryClient;
|
|
11
|
-
}
|
|
12
|
-
interface CapThemeStoreProviderProps extends CapQueryClientProviderProps {
|
|
13
|
-
theme?: Theme;
|
|
14
|
-
store: Store;
|
|
15
|
-
i18nInstance?: typeof i18n;
|
|
16
|
-
}
|
|
17
|
-
interface CapTranslationsWrapperProps {
|
|
18
|
-
children?: React.ReactNode;
|
|
19
|
-
i18nInstance?: typeof i18n;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* A Provider component which returns the QueryClientProvider for the Cap library
|
|
23
|
-
* @param children
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
export declare const CapQueryClientProvider: React.FC<CapQueryClientProviderProps>;
|
|
27
|
-
export interface CapStoreProviderProps extends ThemeProviderProps {
|
|
28
|
-
store: Store;
|
|
29
|
-
}
|
|
30
|
-
export declare const CapThemeStoreProvider: React.FC<CapThemeStoreProviderProps>;
|
|
31
|
-
export declare const CapI18nProvider: React.FC<CapTranslationsWrapperProps>;
|
|
32
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Providers';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CapPresets } from '../types';
|
|
3
|
-
import type { CapAlert } from '../../store/types';
|
|
4
|
-
interface WarningListCapProps {
|
|
5
|
-
capWarningPresets: CapPresets;
|
|
6
|
-
alerts: CapAlert[];
|
|
7
|
-
isPending?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const WarningListCap: React.FC<WarningListCapProps>;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CapAlert } from '../../../store/types';
|
|
3
|
-
import type { CapPresets } from '../../types';
|
|
4
|
-
interface WarningListRowCapConnectProps {
|
|
5
|
-
alert: CapAlert;
|
|
6
|
-
capWarningPresets: CapPresets;
|
|
7
|
-
}
|
|
8
|
-
export declare const WarningListRowCapConnect: React.FC<WarningListRowCapConnectProps>;
|
|
9
|
-
export {};
|
package/src/lib/components/WarningListCap/WarningListRowCap/WarningListRowCapConnect.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './WarningListCap';
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export interface CapData {
|
|
2
|
-
alert: {
|
|
3
|
-
identifier: string;
|
|
4
|
-
feedAddress: string;
|
|
5
|
-
sent: string;
|
|
6
|
-
status: string;
|
|
7
|
-
msgType: string;
|
|
8
|
-
scope: string;
|
|
9
|
-
code: string[];
|
|
10
|
-
references: string;
|
|
11
|
-
info: Info[];
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
interface Info {
|
|
15
|
-
language: string;
|
|
16
|
-
category: string;
|
|
17
|
-
event: string;
|
|
18
|
-
urgency: string;
|
|
19
|
-
severity: string;
|
|
20
|
-
certainty: string;
|
|
21
|
-
eventCode: {
|
|
22
|
-
valueName: string;
|
|
23
|
-
value: string;
|
|
24
|
-
};
|
|
25
|
-
onset: string;
|
|
26
|
-
expires: string;
|
|
27
|
-
senderName: string;
|
|
28
|
-
headline: string;
|
|
29
|
-
description: string;
|
|
30
|
-
web: string;
|
|
31
|
-
contact: string;
|
|
32
|
-
parameter: Parameter[];
|
|
33
|
-
area: Area | Area[];
|
|
34
|
-
}
|
|
35
|
-
interface Parameter {
|
|
36
|
-
valueName: string;
|
|
37
|
-
value: number | string;
|
|
38
|
-
}
|
|
39
|
-
interface Area {
|
|
40
|
-
areaDesc: string;
|
|
41
|
-
polygon: string | string[];
|
|
42
|
-
geocode: {
|
|
43
|
-
valueName: string;
|
|
44
|
-
value: string | number;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
export {};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export interface CapPresets {
|
|
2
|
-
pollInterval: number;
|
|
3
|
-
feeds: Feed[];
|
|
4
|
-
}
|
|
5
|
-
interface Feed {
|
|
6
|
-
feedAddress: string;
|
|
7
|
-
feedType: string;
|
|
8
|
-
}
|
|
9
|
-
export interface CapWarnings {
|
|
10
|
-
alert: CapAlert;
|
|
11
|
-
features: CapFeatures;
|
|
12
|
-
}
|
|
13
|
-
export interface CapAlert {
|
|
14
|
-
feedAddress: string;
|
|
15
|
-
identifier: string;
|
|
16
|
-
severity: string;
|
|
17
|
-
certainty: string;
|
|
18
|
-
onset: string;
|
|
19
|
-
expires: string;
|
|
20
|
-
languages: Language[];
|
|
21
|
-
}
|
|
22
|
-
export interface CapFeatures extends GeoJSON.FeatureCollection {
|
|
23
|
-
type: 'FeatureCollection';
|
|
24
|
-
features: CustomFeature[];
|
|
25
|
-
}
|
|
26
|
-
export interface CustomFeature {
|
|
27
|
-
type: 'Feature';
|
|
28
|
-
geometry: GeoJSON.Geometry;
|
|
29
|
-
id?: string | number;
|
|
30
|
-
properties: CustomProperties;
|
|
31
|
-
}
|
|
32
|
-
interface CustomProperties {
|
|
33
|
-
fill?: string;
|
|
34
|
-
stroke?: string;
|
|
35
|
-
'stroke-width'?: number;
|
|
36
|
-
'stroke-opacity'?: number;
|
|
37
|
-
details: CustomDetails;
|
|
38
|
-
}
|
|
39
|
-
export interface CustomDetails {
|
|
40
|
-
feedAddress: string;
|
|
41
|
-
identifier: string;
|
|
42
|
-
senderName?: string;
|
|
43
|
-
severity: string;
|
|
44
|
-
certainty: string;
|
|
45
|
-
onset: string;
|
|
46
|
-
expires: string;
|
|
47
|
-
languages: Language[];
|
|
48
|
-
}
|
|
49
|
-
export interface Language {
|
|
50
|
-
areaDesc: string;
|
|
51
|
-
language: string;
|
|
52
|
-
event: string;
|
|
53
|
-
senderName: string;
|
|
54
|
-
headline: string;
|
|
55
|
-
description: string;
|
|
56
|
-
}
|
|
57
|
-
interface SeverityStyle {
|
|
58
|
-
border?: string;
|
|
59
|
-
background?: string;
|
|
60
|
-
fill?: string;
|
|
61
|
-
stroke?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface SeverityStyles {
|
|
64
|
-
Extreme: SeverityStyle;
|
|
65
|
-
Severe: SeverityStyle;
|
|
66
|
-
Moderate: SeverityStyle;
|
|
67
|
-
Minor: SeverityStyle;
|
|
68
|
-
}
|
|
69
|
-
export {};
|
package/src/lib/index.d.ts
DELETED
package/src/lib/store/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './store';
|
package/src/lib/store/store.d.ts
DELETED
package/src/lib/store/types.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Language } from '../components/types';
|
|
2
|
-
export interface CapAlert {
|
|
3
|
-
feedAddress: string;
|
|
4
|
-
identifier: string;
|
|
5
|
-
severity: string;
|
|
6
|
-
certainty: string;
|
|
7
|
-
onset: string;
|
|
8
|
-
expires: string;
|
|
9
|
-
languages: Language[];
|
|
10
|
-
}
|
|
11
|
-
export interface CapFeed {
|
|
12
|
-
id: string;
|
|
13
|
-
lastUpdated: number;
|
|
14
|
-
alertIds: string[];
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { CapAlert, CapPresets, CustomFeature } from '../../components/types';
|
|
2
|
-
export interface FeedAddressLink {
|
|
3
|
-
feedAddress: string;
|
|
4
|
-
link: string;
|
|
5
|
-
}
|
|
6
|
-
export interface CapAlertAndFeatures {
|
|
7
|
-
alert: CapAlert;
|
|
8
|
-
features: CustomFeature[];
|
|
9
|
-
}
|
|
10
|
-
export declare const getConfig: (productConfigKey: string) => Promise<CapPresets>;
|
|
11
|
-
export declare const getFeedLinks: (feedAddress: string) => Promise<FeedAddressLink[]>;
|
|
12
|
-
export declare const getSingleAlert: (alertUrl: FeedAddressLink) => Promise<CapAlertAndFeatures>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import type { CapAlertAndFeatures } from './api';
|
|
3
|
-
import type { CapPresets } from '../../components/types';
|
|
4
|
-
interface CombinePendingResult<T> {
|
|
5
|
-
results: T;
|
|
6
|
-
pending: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const useGetConfig: (productConfigKey: string) => UseQueryResult<CapPresets>;
|
|
9
|
-
export declare const useAllFeedAlerts: (capPresets: CapPresets) => CombinePendingResult<CapAlertAndFeatures[]>;
|
|
10
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CapPresets } from '../components/types';
|
|
2
|
-
interface Language {
|
|
3
|
-
language: string;
|
|
4
|
-
event: string;
|
|
5
|
-
senderName: string;
|
|
6
|
-
headline: string;
|
|
7
|
-
description: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const findEventIndexInLanguage: (language: string, languages: Language[], capWarningPresets: CapPresets, feedAddressFromProps: string) => number;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { FeatureEvent } from '@opengeoweb/webmap-react';
|
|
2
|
-
import type { CustomFeature } from '../components/types';
|
|
3
|
-
export declare const highlightGeoJson: (currentFeatures: Record<string, CustomFeature[]>, featureResults?: FeatureEvent) => Record<string, CustomFeature[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/lib/utils/i18n.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import i18n from 'i18next';
|
|
2
|
-
import type { UseTranslationResponse } from 'react-i18next';
|
|
3
|
-
export declare const CAP_NAMESPACE = "cap";
|
|
4
|
-
export declare const initCapI18n: () => typeof i18n;
|
|
5
|
-
export declare const useCapTranslation: () => UseTranslationResponse<typeof CAP_NAMESPACE, typeof i18n>;
|
|
6
|
-
export { i18n };
|