@opengeoweb/time-series 14.0.1 → 14.1.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 +44 -21
- package/package.json +10 -10
- package/src/lib/components/TimeSeriesSelect/utils.d.ts +2 -0
package/index.esm.js
CHANGED
|
@@ -42,6 +42,9 @@ var en = {
|
|
|
42
42
|
"timeseries-show": "Show",
|
|
43
43
|
"timeseries-hide": "Hide",
|
|
44
44
|
"timeseries-collection": "Collection",
|
|
45
|
+
"timeseries-collection-id": "Collection ID",
|
|
46
|
+
"timeseries-collection-title": "Collection title",
|
|
47
|
+
"timeseries-collection-description": "Collection description",
|
|
45
48
|
"timeseries-parameter": "Parameter",
|
|
46
49
|
"timeseries-parameter-info": "Timeseries parameter info",
|
|
47
50
|
"timeseries-style": "Style",
|
|
@@ -371,6 +374,9 @@ var nl = {
|
|
|
371
374
|
"timeseries-show": "Tonen",
|
|
372
375
|
"timeseries-hide": "Verbergen",
|
|
373
376
|
"timeseries-collection": "Collectie",
|
|
377
|
+
"timeseries-collection-id": "Collectie ID",
|
|
378
|
+
"timeseries-collection-title": "Collectie titel",
|
|
379
|
+
"timeseries-collection-description": "Collectie beschrijving",
|
|
374
380
|
"timeseries-parameter": "Parameter",
|
|
375
381
|
"timeseries-parameter-info": "Tijdreeksen parameter info",
|
|
376
382
|
"timeseries-style": "Stijl",
|
|
@@ -1009,15 +1015,20 @@ var constructParameterObject = function constructParameterObject(serviceId, coll
|
|
|
1009
1015
|
});
|
|
1010
1016
|
};
|
|
1011
1017
|
var getCollectionDetails = function getCollectionDetails(service, collection, instances) {
|
|
1012
|
-
var _collection$extent2;
|
|
1018
|
+
var _collection$extent$cu, _collection$extent2, _collection$data_quer, _collection$extent3;
|
|
1013
1019
|
return Object.assign({
|
|
1014
1020
|
serviceId: service.id,
|
|
1015
1021
|
serviceName: service.name || service.id,
|
|
1016
|
-
collectionId: collection.id
|
|
1022
|
+
collectionId: collection.id
|
|
1023
|
+
}, collection.title !== undefined ? {
|
|
1024
|
+
collectionTitle: collection.title
|
|
1025
|
+
} : {}, collection.description !== undefined ? {
|
|
1026
|
+
collectionDescription: collection.description
|
|
1027
|
+
} : {}, {
|
|
1017
1028
|
parameters: constructParameterObject(service.id, collection.id, collection.parameter_names),
|
|
1018
|
-
customDimensions: ((_collection$extent2 = collection.extent) == null ? void 0 : _collection$extent2.custom)
|
|
1019
|
-
dataQueries: collection.data_queries
|
|
1020
|
-
extent: collection.extent
|
|
1029
|
+
customDimensions: (_collection$extent$cu = (_collection$extent2 = collection.extent) == null ? void 0 : _collection$extent2.custom) != null ? _collection$extent$cu : [],
|
|
1030
|
+
dataQueries: (_collection$data_quer = collection.data_queries) != null ? _collection$data_quer : {},
|
|
1031
|
+
extent: (_collection$extent3 = collection.extent) != null ? _collection$extent3 : {}
|
|
1021
1032
|
}, {});
|
|
1022
1033
|
};
|
|
1023
1034
|
var getServiceCollectionDetails = function getServiceCollectionDetails(service, collections) {
|
|
@@ -1028,9 +1039,9 @@ var getServiceCollectionDetails = function getServiceCollectionDetails(service,
|
|
|
1028
1039
|
}
|
|
1029
1040
|
// Only use parameters from collections that support /locations or /position
|
|
1030
1041
|
for (var _iterator = _createForOfIteratorHelperLoose(collections), _step; !(_step = _iterator()).done;) {
|
|
1031
|
-
var _collection$
|
|
1042
|
+
var _collection$data_quer2, _collection$data_quer3;
|
|
1032
1043
|
var collection = _step.value;
|
|
1033
|
-
if ((_collection$
|
|
1044
|
+
if ((_collection$data_quer2 = collection.data_queries) != null && _collection$data_quer2.locations || (_collection$data_quer3 = collection.data_queries) != null && _collection$data_quer3.position) {
|
|
1034
1045
|
collectionsParameters.push(getCollectionDetails(service, collection));
|
|
1035
1046
|
}
|
|
1036
1047
|
}
|
|
@@ -1063,15 +1074,16 @@ var clipEdrInterval = function clipEdrInterval(interval, maxHoursBefore,
|
|
|
1063
1074
|
maxHoursAfter,
|
|
1064
1075
|
// 10 days to the future
|
|
1065
1076
|
date) {
|
|
1077
|
+
var _dateUtils$isoStringT, _dateUtils$isoStringT2;
|
|
1066
1078
|
if (date === void 0) {
|
|
1067
1079
|
date = Date.now();
|
|
1068
1080
|
}
|
|
1069
1081
|
var startTimeFromEdr = (interval == null ? void 0 : interval.length) && interval[0];
|
|
1070
1082
|
var endTimeFromEdr = (interval == null ? void 0 : interval.length) && interval[1];
|
|
1071
|
-
var startDate = (dateUtils.isoStringToDate(String(startTimeFromEdr), false)
|
|
1072
|
-
var endDate = (dateUtils.isoStringToDate(String(endTimeFromEdr), false)
|
|
1073
|
-
var clippedStartDate = new Date(Math.max(startDate
|
|
1074
|
-
var clippedEndDate = new Date(Math.min(endDate
|
|
1083
|
+
var startDate = ((_dateUtils$isoStringT = dateUtils.isoStringToDate(String(startTimeFromEdr), false)) != null ? _dateUtils$isoStringT : dateUtils.getNowUtc()).getTime();
|
|
1084
|
+
var endDate = ((_dateUtils$isoStringT2 = dateUtils.isoStringToDate(String(endTimeFromEdr), false)) != null ? _dateUtils$isoStringT2 : dateUtils.getNowUtc()).getTime();
|
|
1085
|
+
var clippedStartDate = new Date(Math.max(startDate != null ? startDate : date, date - maxHoursBefore * HOUR_IN_MILLISECONDS));
|
|
1086
|
+
var clippedEndDate = new Date(Math.min(endDate != null ? endDate : date, date + maxHoursAfter * HOUR_IN_MILLISECONDS));
|
|
1075
1087
|
// Round the dates to minutes to make caching more likely.
|
|
1076
1088
|
clippedStartDate.setMilliseconds(0);
|
|
1077
1089
|
clippedStartDate.setSeconds(0);
|
|
@@ -1084,8 +1096,8 @@ date) {
|
|
|
1084
1096
|
// 1 day to past, 10 days to future
|
|
1085
1097
|
var clipInterval = [1 * 24, 10 * 24];
|
|
1086
1098
|
var constructTimeInterval = function constructTimeInterval(collection, instance, parameter) {
|
|
1087
|
-
var _instance$extent2, _collection$
|
|
1088
|
-
var interval = ((_instance$extent2 = instance.extent) == null || (_instance$extent2 = _instance$extent2.temporal) == null ? void 0 : _instance$extent2.interval[0])
|
|
1099
|
+
var _instance$extent$temp, _instance$extent2, _collection$extent4;
|
|
1100
|
+
var interval = (_instance$extent$temp = (_instance$extent2 = instance.extent) == null || (_instance$extent2 = _instance$extent2.temporal) == null ? void 0 : _instance$extent2.interval[0]) != null ? _instance$extent$temp : collection == null || (_collection$extent4 = collection.extent) == null || (_collection$extent4 = _collection$extent4.temporal) == null ? void 0 : _collection$extent4.interval[0];
|
|
1089
1101
|
var _clipEdrInterval = clipEdrInterval(interval, clipInterval[0], clipInterval[1]),
|
|
1090
1102
|
start = _clipEdrInterval[0],
|
|
1091
1103
|
end = _clipEdrInterval[1];
|
|
@@ -1103,14 +1115,14 @@ var EARTH_RADIUS = 6371;
|
|
|
1103
1115
|
* @returns feature nearest to the target location or null if none are within the maximum distance
|
|
1104
1116
|
*/
|
|
1105
1117
|
var findNearestPoint = function findNearestPoint(targetLocation, pointFeatures, maxDistanceKm) {
|
|
1106
|
-
var _pointFeatures$reduce;
|
|
1118
|
+
var _pointFeatures$reduce, _pointFeatures$reduce2;
|
|
1107
1119
|
if (maxDistanceKm === void 0) {
|
|
1108
1120
|
maxDistanceKm = 2;
|
|
1109
1121
|
}
|
|
1110
1122
|
if (!pointFeatures.length) {
|
|
1111
1123
|
return null;
|
|
1112
1124
|
}
|
|
1113
|
-
return (
|
|
1125
|
+
return (_pointFeatures$reduce = (_pointFeatures$reduce2 = pointFeatures.reduce(function (nearestPoint, currentFeature) {
|
|
1114
1126
|
var _getFeatureCenterPoin = getFeatureCenterPoint(currentFeature),
|
|
1115
1127
|
featureLon = _getFeatureCenterPoin[0],
|
|
1116
1128
|
featureLat = _getFeatureCenterPoin[1];
|
|
@@ -1131,7 +1143,7 @@ var findNearestPoint = function findNearestPoint(targetLocation, pointFeatures,
|
|
|
1131
1143
|
};
|
|
1132
1144
|
}
|
|
1133
1145
|
return nearestPoint;
|
|
1134
|
-
}, null)) == null ? void 0 : _pointFeatures$
|
|
1146
|
+
}, null)) == null ? void 0 : _pointFeatures$reduce2.feature) != null ? _pointFeatures$reduce : null;
|
|
1135
1147
|
};
|
|
1136
1148
|
var getFeatureCenterPoint = function getFeatureCenterPoint(feature) {
|
|
1137
1149
|
return feature.geometry.type === 'Point' ? feature.geometry.coordinates : turf.center(feature).geometry.coordinates;
|
|
@@ -4121,12 +4133,13 @@ var filterCollectionsParametersFromService = function filterCollectionsParameter
|
|
|
4121
4133
|
return filteredCollectionList;
|
|
4122
4134
|
}
|
|
4123
4135
|
var collectionContainsSearch = searchStringArray.every(function (search) {
|
|
4124
|
-
var _collection$collectio, _collection$serviceId, _collection$serviceNa;
|
|
4136
|
+
var _collection$collectio, _collection$collectio2, _collection$serviceId, _collection$serviceNa;
|
|
4125
4137
|
var searchLowercase = search.toLowerCase();
|
|
4126
4138
|
var isSearchTextInCollectionId = (_collection$collectio = collection.collectionId) == null ? void 0 : _collection$collectio.toLowerCase().includes(searchLowercase);
|
|
4139
|
+
var isSearchTextInCollectionTitle = (_collection$collectio2 = collection.collectionTitle) == null ? void 0 : _collection$collectio2.toLowerCase().includes(searchLowercase);
|
|
4127
4140
|
var isSearchTextInServiceId = (_collection$serviceId = collection.serviceId) == null ? void 0 : _collection$serviceId.toLowerCase().includes(searchLowercase);
|
|
4128
4141
|
var isSearchTextInServiceName = (_collection$serviceNa = collection.serviceName) == null ? void 0 : _collection$serviceNa.toLowerCase().includes(searchLowercase);
|
|
4129
|
-
return isSearchTextInCollectionId || isSearchTextInServiceId || isSearchTextInServiceName;
|
|
4142
|
+
return isSearchTextInCollectionId || isSearchTextInCollectionTitle || isSearchTextInServiceId || isSearchTextInServiceName;
|
|
4130
4143
|
});
|
|
4131
4144
|
// Not found in collection - search in parameters
|
|
4132
4145
|
var filteredParamters = collection.parameters.reduce(function (filteredParameterList, parameter) {
|
|
@@ -4168,6 +4181,7 @@ var fontStyling = function fontStyling(primary) {
|
|
|
4168
4181
|
lineHeight: '14px',
|
|
4169
4182
|
fontWeight: primary ? 500 : 'normal',
|
|
4170
4183
|
textOverflow: 'ellipsis',
|
|
4184
|
+
whiteSpace: 'nowrap',
|
|
4171
4185
|
overflow: 'hidden'
|
|
4172
4186
|
};
|
|
4173
4187
|
};
|
|
@@ -4274,10 +4288,11 @@ var TimeSeriesSelectList = function TimeSeriesSelectList(_ref) {
|
|
|
4274
4288
|
alignItems: 'center'
|
|
4275
4289
|
},
|
|
4276
4290
|
children: [jsxs(Grid, {
|
|
4291
|
+
size: "grow",
|
|
4277
4292
|
children: [jsx(Box, {
|
|
4278
4293
|
sx: fontStyling(),
|
|
4279
4294
|
children: jsx(SearchHighlight, {
|
|
4280
|
-
text: collectionListItem.collectionId,
|
|
4295
|
+
text: collectionListItem.collectionTitle || collectionListItem.collectionId,
|
|
4281
4296
|
search: searchFilter
|
|
4282
4297
|
})
|
|
4283
4298
|
}), jsx(Box, {
|
|
@@ -4325,6 +4340,7 @@ var TimeSeriesSelectList = function TimeSeriesSelectList(_ref) {
|
|
|
4325
4340
|
' .MuiListItemText-primary': {
|
|
4326
4341
|
fontSize: '12px',
|
|
4327
4342
|
fontWeight: 500,
|
|
4343
|
+
whiteSpace: 'nowrap',
|
|
4328
4344
|
textOverflow: 'ellipsis',
|
|
4329
4345
|
overflow: 'hidden'
|
|
4330
4346
|
}
|
|
@@ -4373,6 +4389,7 @@ var TimeSeriesSelectList = function TimeSeriesSelectList(_ref) {
|
|
|
4373
4389
|
alignItems: 'center'
|
|
4374
4390
|
},
|
|
4375
4391
|
children: [jsx(Grid, {
|
|
4392
|
+
size: "grow",
|
|
4376
4393
|
children: jsx(Box, {
|
|
4377
4394
|
sx: fontStyling(),
|
|
4378
4395
|
children: jsx(SearchHighlight, {
|
|
@@ -5544,7 +5561,7 @@ var ParameterInfoDialog = function ParameterInfoDialog(_ref) {
|
|
|
5544
5561
|
onClose: onClose,
|
|
5545
5562
|
startSize: {
|
|
5546
5563
|
width: 288,
|
|
5547
|
-
height: dialogHeight
|
|
5564
|
+
height: dialogHeight != null ? dialogHeight : 650
|
|
5548
5565
|
},
|
|
5549
5566
|
startPosition: {
|
|
5550
5567
|
top: 150,
|
|
@@ -5580,8 +5597,14 @@ var ParameterInfoDialog = function ParameterInfoDialog(_ref) {
|
|
|
5580
5597
|
value: relatedService.type
|
|
5581
5598
|
})]
|
|
5582
5599
|
}), jsx(ParameterInfoText$1, {
|
|
5583
|
-
label: t('timeseries-collection'),
|
|
5600
|
+
label: t('timeseries-collection-id'),
|
|
5584
5601
|
value: currentParameterInfo.collectionId
|
|
5602
|
+
}), (collectionInformation == null ? void 0 : collectionInformation.collectionTitle) && (collectionInformation == null ? void 0 : collectionInformation.collectionTitle) !== '' && jsx(ParameterInfoText$1, {
|
|
5603
|
+
label: t('timeseries-collection-title'),
|
|
5604
|
+
value: collectionInformation == null ? void 0 : collectionInformation.collectionTitle
|
|
5605
|
+
}), (collectionInformation == null ? void 0 : collectionInformation.collectionDescription) && (collectionInformation == null ? void 0 : collectionInformation.collectionDescription) !== '' && jsx(ParameterInfoText$1, {
|
|
5606
|
+
label: t('timeseries-collection-description'),
|
|
5607
|
+
value: collectionInformation == null ? void 0 : collectionInformation.collectionDescription
|
|
5585
5608
|
}), jsx(QueryInfoElement, {
|
|
5586
5609
|
queryInformation: collectionInformation,
|
|
5587
5610
|
isLoadingCollectionInformation: isLoadingCollectionInformation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/time-series",
|
|
3
|
-
"version": "14.0
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "GeoWeb time-series library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -9,26 +9,26 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"immer": "^10.0.3",
|
|
12
|
-
"@opengeoweb/shared": "14.0
|
|
12
|
+
"@opengeoweb/shared": "14.1.0",
|
|
13
13
|
"@reduxjs/toolkit": "^2.6.1",
|
|
14
14
|
"react-redux": "^9.2.0",
|
|
15
|
-
"@opengeoweb/webmap": "14.0
|
|
16
|
-
"@opengeoweb/webmap-react": "14.0
|
|
15
|
+
"@opengeoweb/webmap": "14.1.0",
|
|
16
|
+
"@opengeoweb/webmap-react": "14.1.0",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
|
-
"@opengeoweb/api": "14.0
|
|
19
|
-
"@opengeoweb/theme": "14.0
|
|
20
|
-
"@opengeoweb/store": "14.0
|
|
18
|
+
"@opengeoweb/api": "14.1.0",
|
|
19
|
+
"@opengeoweb/theme": "14.1.0",
|
|
20
|
+
"@opengeoweb/store": "14.1.0",
|
|
21
21
|
"echarts-for-react": "^3.0.2",
|
|
22
22
|
"echarts": "^5.4.3",
|
|
23
23
|
"react-sortablejs": "^6.1.4",
|
|
24
|
-
"@opengeoweb/snackbar": "14.0
|
|
24
|
+
"@opengeoweb/snackbar": "14.1.0",
|
|
25
25
|
"react-window": "^1.8.10",
|
|
26
26
|
"react-virtualized-auto-sizer": "^1.0.21",
|
|
27
27
|
"msw": "^2.7.3",
|
|
28
28
|
"i18next": "^25.0.1",
|
|
29
29
|
"react-i18next": "^15.1.1",
|
|
30
|
-
"@opengeoweb/core": "14.0
|
|
31
|
-
"@opengeoweb/form-fields": "14.0
|
|
30
|
+
"@opengeoweb/core": "14.1.0",
|
|
31
|
+
"@opengeoweb/form-fields": "14.1.0",
|
|
32
32
|
"@mui/material": "^7.0.1",
|
|
33
33
|
"react-hook-form": "^7.61.1",
|
|
34
34
|
"uuid": "^10.0.0",
|
|
@@ -3,6 +3,8 @@ import { ServiceFilterChipsObjectEntities } from '../../store/types';
|
|
|
3
3
|
import { CustomDimension, EDRDataQueriesObject, EDRExtentObject, SelectParameter } from '../TimeSeries/types';
|
|
4
4
|
export interface TimeseriesCollectionDetail {
|
|
5
5
|
collectionId: string;
|
|
6
|
+
collectionTitle?: string;
|
|
7
|
+
collectionDescription?: string;
|
|
6
8
|
serviceId: string;
|
|
7
9
|
serviceName: string;
|
|
8
10
|
parameters: SelectParameter[];
|