@opengeoweb/time-series 13.0.0 → 13.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 +189 -91
- package/package.json +10 -10
- package/src/lib/components/TimeSeries/TimeSeriesChart.d.ts +1 -0
- package/src/lib/components/TimeSeries/TimeSeriesView.d.ts +1 -0
- package/src/lib/components/TimeSeries/chartUtils.d.ts +9 -1
- package/src/lib/components/TimeSeries/types.d.ts +5 -0
- package/src/lib/components/TimeSeries/utils.d.ts +2 -2
- package/src/lib/components/TimeSeriesManager/ParameterList.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerRowAccordion.d.ts +2 -3
- package/src/lib/components/TimeSeriesSelect/utils.d.ts +2 -1
- package/src/lib/utils/edrUtils.d.ts +1 -1
- package/src/lib/utils/mocks/handlers.d.ts +3 -1
- package/src/lib/utils/timeseries-api/api.d.ts +2 -2
- package/src/lib/utils/utils.d.ts +3 -0
package/index.esm.js
CHANGED
|
@@ -911,14 +911,14 @@ var createUrl = function createUrl(baseUrl, pathToAdd, queryParameters) {
|
|
|
911
911
|
return urlObject.toString();
|
|
912
912
|
};
|
|
913
913
|
var supportedOutputFormat = 'CoverageJSON';
|
|
914
|
-
var getBaseQueryParamArray = function getBaseQueryParamArray(parameter, instance, clipInterval) {
|
|
915
|
-
var _instance$extent, _instance$extent2;
|
|
914
|
+
var getBaseQueryParamArray = function getBaseQueryParamArray(parameter, instance, collection, clipInterval) {
|
|
915
|
+
var _instance$extent, _collection$collectio, _instance$extent2, _collection$collectio2;
|
|
916
916
|
if (clipInterval === void 0) {
|
|
917
917
|
clipInterval = [1 * 24, 10 * 24];
|
|
918
918
|
}
|
|
919
919
|
var res = [];
|
|
920
920
|
res.push(['parameter-name', parameter.propertyName]);
|
|
921
|
-
var interval = (_instance$extent = instance.extent) == null || (_instance$extent = _instance$extent.temporal) == null ? void 0 : _instance$extent.interval[0];
|
|
921
|
+
var interval = ((_instance$extent = instance.extent) == null || (_instance$extent = _instance$extent.temporal) == null ? void 0 : _instance$extent.interval[0]) || ((_collection$collectio = collection.collectionDetails.extent) == null || (_collection$collectio = _collection$collectio.temporal) == null ? void 0 : _collection$collectio.interval[0]);
|
|
922
922
|
// -----> This will also set datetime parameter to the EDR query <-----
|
|
923
923
|
var _clipEdrInterval = clipEdrInterval(interval, clipInterval[0], clipInterval[1]),
|
|
924
924
|
start = _clipEdrInterval[0],
|
|
@@ -926,8 +926,9 @@ var getBaseQueryParamArray = function getBaseQueryParamArray(parameter, instance
|
|
|
926
926
|
if (interval != null && interval.length) {
|
|
927
927
|
res.push(['datetime', start + "/" + end]);
|
|
928
928
|
}
|
|
929
|
-
|
|
930
|
-
|
|
929
|
+
var crs = ((_instance$extent2 = instance.extent) == null ? void 0 : _instance$extent2.spatial.crs) || ((_collection$collectio2 = collection.collectionDetails.extent) == null ? void 0 : _collection$collectio2.spatial.crs);
|
|
930
|
+
if (crs) {
|
|
931
|
+
res.push(['crs', crs]);
|
|
931
932
|
}
|
|
932
933
|
if (parameter.dimension) {
|
|
933
934
|
if (parameter.dimension.id && parameter.dimension.id !== REFERENCE_TIME_ID && parameter.dimension.value !== '' && parameter.dimension.value !== undefined) {
|
|
@@ -941,6 +942,9 @@ var latestInstance = function latestInstance(instances) {
|
|
|
941
942
|
if (instances.length === 0) {
|
|
942
943
|
return null;
|
|
943
944
|
}
|
|
945
|
+
if (instances.length === 1) {
|
|
946
|
+
return instances[0];
|
|
947
|
+
}
|
|
944
948
|
return instances.reduce(function (latest, current) {
|
|
945
949
|
return latest.id < current.id ? current : latest;
|
|
946
950
|
}, {
|
|
@@ -1055,6 +1059,7 @@ var getParametersFromCollections = function getParametersFromCollections(service
|
|
|
1055
1059
|
collectionId: collection.id,
|
|
1056
1060
|
parameters: constructParameterObject(service.id, collection.id, parameterSource),
|
|
1057
1061
|
customDimensions: ((_collection$extent = collection.extent) == null ? void 0 : _collection$extent.custom) || [],
|
|
1062
|
+
collectionDetails: collection,
|
|
1058
1063
|
allInstances: allInstances
|
|
1059
1064
|
});
|
|
1060
1065
|
};
|
|
@@ -2273,32 +2278,38 @@ var fetchParametersForService = /*#__PURE__*/function () {
|
|
|
2273
2278
|
_context3.next = 7;
|
|
2274
2279
|
return Promise.all(collections.map(/*#__PURE__*/function () {
|
|
2275
2280
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(collection) {
|
|
2281
|
+
var _collection$data_quer2;
|
|
2276
2282
|
var allInstances, instance, details;
|
|
2277
2283
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2278
2284
|
while (1) switch (_context2.prev = _context2.next) {
|
|
2279
2285
|
case 0:
|
|
2280
|
-
|
|
2286
|
+
if (!((_collection$data_quer2 = collection.data_queries) != null && _collection$data_quer2.instances)) {
|
|
2287
|
+
_context2.next = 10;
|
|
2288
|
+
break;
|
|
2289
|
+
}
|
|
2290
|
+
_context2.next = 3;
|
|
2281
2291
|
return getSupportedInstances(url, collection.id);
|
|
2282
|
-
case
|
|
2292
|
+
case 3:
|
|
2283
2293
|
allInstances = _context2.sent;
|
|
2284
2294
|
instance = latestInstance(allInstances);
|
|
2285
2295
|
if (!instance) {
|
|
2286
|
-
_context2.next =
|
|
2296
|
+
_context2.next = 10;
|
|
2287
2297
|
break;
|
|
2288
2298
|
}
|
|
2289
|
-
_context2.next =
|
|
2299
|
+
_context2.next = 8;
|
|
2290
2300
|
return getInstanceDetails(url, collection.id, instance.id);
|
|
2291
|
-
case
|
|
2301
|
+
case 8:
|
|
2292
2302
|
details = _context2.sent;
|
|
2293
2303
|
return _context2.abrupt("return", {
|
|
2294
2304
|
latestInstance: Object.assign({}, instance, details),
|
|
2305
|
+
collectionDetails: collection,
|
|
2295
2306
|
allInstances: allInstances,
|
|
2296
2307
|
collectionId: collection.id,
|
|
2297
2308
|
serviceId: serviceId
|
|
2298
2309
|
});
|
|
2299
|
-
case 9:
|
|
2300
|
-
return _context2.abrupt("return", null);
|
|
2301
2310
|
case 10:
|
|
2311
|
+
return _context2.abrupt("return", null);
|
|
2312
|
+
case 11:
|
|
2302
2313
|
case "end":
|
|
2303
2314
|
return _context2.stop();
|
|
2304
2315
|
}
|
|
@@ -2337,15 +2348,15 @@ var getPosition = function getPosition(serviceUrl, collectionId, instanceId, pos
|
|
|
2337
2348
|
return fetch(url).then(handleResponse);
|
|
2338
2349
|
};
|
|
2339
2350
|
var fetchEdrParameter = /*#__PURE__*/function () {
|
|
2340
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(serviceUrl, parameter, location, instance) {
|
|
2341
|
-
var _instance$data_querie, _instance$data_querie2;
|
|
2351
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(serviceUrl, parameter, location, instance, collection) {
|
|
2352
|
+
var _instance$data_querie, _collection$collectio, _instance$data_querie2, _collection$collectio2;
|
|
2342
2353
|
var collectionId, queryParamArr, locationId, result, _result;
|
|
2343
2354
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
2344
2355
|
while (1) switch (_context4.prev = _context4.next) {
|
|
2345
2356
|
case 0:
|
|
2346
2357
|
collectionId = parameter.collectionId;
|
|
2347
|
-
queryParamArr = getBaseQueryParamArray(parameter, instance);
|
|
2348
|
-
if (!(isTimeSeriesLocation(location) && (_instance$data_querie = instance.data_queries) != null && _instance$data_querie.locations)) {
|
|
2358
|
+
queryParamArr = getBaseQueryParamArray(parameter, instance, collection);
|
|
2359
|
+
if (!(isTimeSeriesLocation(location) && ((_instance$data_querie = instance.data_queries) != null && _instance$data_querie.locations || (_collection$collectio = collection.collectionDetails.data_queries) != null && _collection$collectio.locations))) {
|
|
2349
2360
|
_context4.next = 11;
|
|
2350
2361
|
break;
|
|
2351
2362
|
}
|
|
@@ -2363,7 +2374,7 @@ var fetchEdrParameter = /*#__PURE__*/function () {
|
|
|
2363
2374
|
_context4.next = 16;
|
|
2364
2375
|
break;
|
|
2365
2376
|
case 11:
|
|
2366
|
-
if (!((_instance$data_querie2 = instance.data_queries) != null && _instance$data_querie2.position)) {
|
|
2377
|
+
if (!((_instance$data_querie2 = instance.data_queries) != null && _instance$data_querie2.position || (_collection$collectio2 = collection.collectionDetails.data_queries) != null && _collection$collectio2.position)) {
|
|
2367
2378
|
_context4.next = 16;
|
|
2368
2379
|
break;
|
|
2369
2380
|
}
|
|
@@ -2380,7 +2391,7 @@ var fetchEdrParameter = /*#__PURE__*/function () {
|
|
|
2380
2391
|
}
|
|
2381
2392
|
}, _callee4);
|
|
2382
2393
|
}));
|
|
2383
|
-
return function fetchEdrParameter(_x6, _x7, _x8, _x9) {
|
|
2394
|
+
return function fetchEdrParameter(_x6, _x7, _x8, _x9, _x0) {
|
|
2384
2395
|
return _ref4.apply(this, arguments);
|
|
2385
2396
|
};
|
|
2386
2397
|
}();
|
|
@@ -2499,37 +2510,39 @@ var getNearbyLocation = function getNearbyLocation(parameter, service, selectedL
|
|
|
2499
2510
|
return null;
|
|
2500
2511
|
};
|
|
2501
2512
|
var getEdrParameter = /*#__PURE__*/function () {
|
|
2502
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(presetParameter, serviceUrl, location,
|
|
2503
|
-
var
|
|
2513
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(presetParameter, serviceUrl, location, collection) {
|
|
2514
|
+
var _collection$allInstan, _collection$allInstan2;
|
|
2515
|
+
var instanceInfo, apiData, paramData, paramKey, unit;
|
|
2504
2516
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2505
2517
|
while (1) switch (_context.prev = _context.next) {
|
|
2506
2518
|
case 0:
|
|
2507
|
-
instanceInfo = presetParameter.instanceId && (allInstances == null ? void 0 :
|
|
2519
|
+
instanceInfo = presetParameter.instanceId && ((_collection$allInstan = collection.allInstances) == null ? void 0 : _collection$allInstan.find(function (inst) {
|
|
2508
2520
|
return inst.id === presetParameter.instanceId;
|
|
2509
|
-
})) || (allInstances == null ? void 0 :
|
|
2521
|
+
})) || ((_collection$allInstan2 = collection.allInstances) == null ? void 0 : _collection$allInstan2[0]) || {
|
|
2510
2522
|
id: ''
|
|
2511
2523
|
};
|
|
2512
2524
|
_context.next = 3;
|
|
2513
|
-
return fetchEdrParameter(serviceUrl, presetParameter, location, instanceInfo);
|
|
2525
|
+
return fetchEdrParameter(serviceUrl, presetParameter, location, instanceInfo, collection);
|
|
2514
2526
|
case 3:
|
|
2515
2527
|
apiData = _context.sent;
|
|
2516
|
-
|
|
2517
|
-
|
|
2528
|
+
paramData = apiData != null && apiData.coverages ? apiData == null ? void 0 : apiData.coverages[0] : apiData;
|
|
2529
|
+
if (!(!apiData || !(paramData != null && paramData.ranges) || !paramData.domain.axes.t || paramData.domain.axes.t.values.length === 0)) {
|
|
2530
|
+
_context.next = 7;
|
|
2518
2531
|
break;
|
|
2519
2532
|
}
|
|
2520
2533
|
return _context.abrupt("return", null);
|
|
2521
|
-
case
|
|
2534
|
+
case 7:
|
|
2522
2535
|
// assume only one parameter
|
|
2523
|
-
paramKey = Object.keys(
|
|
2536
|
+
paramKey = Object.keys(paramData.ranges)[0];
|
|
2524
2537
|
unit = getUnit(apiData.parameters[paramKey], i18n.language, 'en');
|
|
2525
2538
|
return _context.abrupt("return", Object.assign({}, presetParameter, {
|
|
2526
2539
|
unit: unit,
|
|
2527
|
-
timestep:
|
|
2540
|
+
timestep: paramData.domain.axes.t.values.map(function (str) {
|
|
2528
2541
|
return dateUtils.utc(str);
|
|
2529
2542
|
}),
|
|
2530
|
-
value:
|
|
2543
|
+
value: paramData.ranges[paramKey].values
|
|
2531
2544
|
}));
|
|
2532
|
-
case
|
|
2545
|
+
case 10:
|
|
2533
2546
|
case "end":
|
|
2534
2547
|
return _context.stop();
|
|
2535
2548
|
}
|
|
@@ -2548,8 +2561,14 @@ var fetchParameter = /*#__PURE__*/function () {
|
|
|
2548
2561
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2549
2562
|
while (1) switch (_context2.prev = _context2.next) {
|
|
2550
2563
|
case 0:
|
|
2564
|
+
if (collection) {
|
|
2565
|
+
_context2.next = 2;
|
|
2566
|
+
break;
|
|
2567
|
+
}
|
|
2568
|
+
throw new Error('No collection found for parameter');
|
|
2569
|
+
case 2:
|
|
2551
2570
|
if (!isTimeSeriesLocation(selectedLocation)) {
|
|
2552
|
-
_context2.next =
|
|
2571
|
+
_context2.next = 14;
|
|
2553
2572
|
break;
|
|
2554
2573
|
}
|
|
2555
2574
|
// The selected location contains a lisf of occurrences (combination of service and collection)
|
|
@@ -2558,68 +2577,68 @@ var fetchParameter = /*#__PURE__*/function () {
|
|
|
2558
2577
|
return ((_occ$properties = occ.properties) == null ? void 0 : _occ$properties.collectionId) === parameter.collectionId && ((_occ$properties2 = occ.properties) == null ? void 0 : _occ$properties2.serviceId) === parameter.serviceId;
|
|
2559
2578
|
});
|
|
2560
2579
|
if (!occurrence) {
|
|
2561
|
-
_context2.next =
|
|
2580
|
+
_context2.next = 14;
|
|
2562
2581
|
break;
|
|
2563
2582
|
}
|
|
2564
|
-
_context2.prev =
|
|
2565
|
-
_context2.next =
|
|
2583
|
+
_context2.prev = 5;
|
|
2584
|
+
_context2.next = 8;
|
|
2566
2585
|
return getEdrParameter(parameter, service.url, {
|
|
2567
2586
|
id: occurrence.id,
|
|
2568
2587
|
lat: selectedLocation.lat,
|
|
2569
2588
|
lon: selectedLocation.lon
|
|
2570
|
-
}, collection
|
|
2571
|
-
case
|
|
2589
|
+
}, collection);
|
|
2590
|
+
case 8:
|
|
2572
2591
|
return _context2.abrupt("return", _context2.sent);
|
|
2573
|
-
case
|
|
2574
|
-
_context2.prev =
|
|
2575
|
-
_context2.t0 = _context2["catch"](
|
|
2592
|
+
case 11:
|
|
2593
|
+
_context2.prev = 11;
|
|
2594
|
+
_context2.t0 = _context2["catch"](5);
|
|
2576
2595
|
throw new Error(getErrorMessage(parameter));
|
|
2577
|
-
case
|
|
2596
|
+
case 14:
|
|
2578
2597
|
// Try a position query
|
|
2579
2598
|
position = {
|
|
2580
2599
|
lon: selectedLocation.lon,
|
|
2581
2600
|
lat: selectedLocation.lat
|
|
2582
2601
|
};
|
|
2583
|
-
_context2.prev =
|
|
2584
|
-
_context2.next =
|
|
2585
|
-
return getEdrParameter(parameter, service.url, position, collection
|
|
2586
|
-
case
|
|
2602
|
+
_context2.prev = 15;
|
|
2603
|
+
_context2.next = 18;
|
|
2604
|
+
return getEdrParameter(parameter, service.url, position, collection);
|
|
2605
|
+
case 18:
|
|
2587
2606
|
result = _context2.sent;
|
|
2588
2607
|
if (!result) {
|
|
2589
|
-
_context2.next =
|
|
2608
|
+
_context2.next = 21;
|
|
2590
2609
|
break;
|
|
2591
2610
|
}
|
|
2592
2611
|
return _context2.abrupt("return", result);
|
|
2593
|
-
case 19:
|
|
2594
|
-
_context2.next = 35;
|
|
2595
|
-
break;
|
|
2596
2612
|
case 21:
|
|
2597
|
-
_context2.
|
|
2598
|
-
|
|
2613
|
+
_context2.next = 37;
|
|
2614
|
+
break;
|
|
2615
|
+
case 23:
|
|
2616
|
+
_context2.prev = 23;
|
|
2617
|
+
_context2.t1 = _context2["catch"](15);
|
|
2599
2618
|
// As a final option look for a nearby location
|
|
2600
2619
|
nearbyLocation = getNearbyLocation(parameter, service, selectedLocation, geojsonMap);
|
|
2601
2620
|
if (!nearbyLocation) {
|
|
2602
|
-
_context2.next =
|
|
2621
|
+
_context2.next = 36;
|
|
2603
2622
|
break;
|
|
2604
2623
|
}
|
|
2605
|
-
_context2.prev =
|
|
2606
|
-
_context2.next =
|
|
2607
|
-
return getEdrParameter(parameter, service.url, nearbyLocation, collection
|
|
2608
|
-
case
|
|
2624
|
+
_context2.prev = 27;
|
|
2625
|
+
_context2.next = 30;
|
|
2626
|
+
return getEdrParameter(parameter, service.url, nearbyLocation, collection);
|
|
2627
|
+
case 30:
|
|
2609
2628
|
return _context2.abrupt("return", _context2.sent);
|
|
2610
|
-
case
|
|
2611
|
-
_context2.prev =
|
|
2612
|
-
_context2.t2 = _context2["catch"](
|
|
2629
|
+
case 33:
|
|
2630
|
+
_context2.prev = 33;
|
|
2631
|
+
_context2.t2 = _context2["catch"](27);
|
|
2613
2632
|
throw new Error(getErrorMessage(parameter));
|
|
2614
|
-
case
|
|
2633
|
+
case 36:
|
|
2615
2634
|
throw new Error(getErrorMessage(parameter));
|
|
2616
|
-
case
|
|
2635
|
+
case 37:
|
|
2617
2636
|
throw new Error(getErrorMessage(parameter));
|
|
2618
|
-
case
|
|
2637
|
+
case 38:
|
|
2619
2638
|
case "end":
|
|
2620
2639
|
return _context2.stop();
|
|
2621
2640
|
}
|
|
2622
|
-
}, _callee2, null, [[
|
|
2641
|
+
}, _callee2, null, [[5, 11], [15, 23], [27, 33]]);
|
|
2623
2642
|
}));
|
|
2624
2643
|
return function fetchParameter(_x5, _x6, _x7, _x8, _x9) {
|
|
2625
2644
|
return _ref2.apply(this, arguments);
|
|
@@ -3345,15 +3364,14 @@ var ParameterDimensionSelect = function ParameterDimensionSelect(_ref) {
|
|
|
3345
3364
|
};
|
|
3346
3365
|
|
|
3347
3366
|
var TimeSeriesManagerRowAccordion = function TimeSeriesManagerRowAccordion(_ref) {
|
|
3348
|
-
var
|
|
3349
|
-
plotIsEnabled = _ref.plotIsEnabled,
|
|
3367
|
+
var plotIsEnabled = _ref.plotIsEnabled,
|
|
3350
3368
|
rowIsEnabled = _ref.rowIsEnabled,
|
|
3351
3369
|
parameter = _ref.parameter,
|
|
3352
3370
|
styles = _ref.styles,
|
|
3353
3371
|
addParameter = _ref.addParameter,
|
|
3354
3372
|
patchParameter = _ref.patchParameter,
|
|
3355
3373
|
deleteParameter = _ref.deleteParameter,
|
|
3356
|
-
|
|
3374
|
+
toggleParameter = _ref.toggleParameter,
|
|
3357
3375
|
t = _ref.t;
|
|
3358
3376
|
return jsx(CustomAccordion, {
|
|
3359
3377
|
"data-testid": "timeSeriesManagerRowAccordion",
|
|
@@ -3380,12 +3398,16 @@ var TimeSeriesManagerRowAccordion = function TimeSeriesManagerRowAccordion(_ref)
|
|
|
3380
3398
|
children: jsx(CustomIconButton, {
|
|
3381
3399
|
onClick: function onClick(event) {
|
|
3382
3400
|
event.stopPropagation();
|
|
3383
|
-
|
|
3401
|
+
toggleParameter(parameter.id);
|
|
3384
3402
|
},
|
|
3385
|
-
tooltipTitle: (
|
|
3386
|
-
shouldShowAsDisabled: !plotIsEnabled,
|
|
3403
|
+
tooltipTitle: (parameter.enabled !== false ? t('timeseries-hide') : t('timeseries-show')) + " " + parameter.propertyName,
|
|
3387
3404
|
"data-testid": "accordionEnableButton",
|
|
3388
|
-
|
|
3405
|
+
shouldShowAsDisabled: !plotIsEnabled,
|
|
3406
|
+
children: parameter.enabled !== false && plotIsEnabled ? jsx(Visibility, {
|
|
3407
|
+
"data-testid": "enabled-visible"
|
|
3408
|
+
}) : jsx(VisibilityOff, {
|
|
3409
|
+
"data-testid": "disabled-visible"
|
|
3410
|
+
})
|
|
3389
3411
|
})
|
|
3390
3412
|
}), jsx(Grid, {
|
|
3391
3413
|
children: jsx(Grid, {
|
|
@@ -3555,7 +3577,6 @@ var ParameterList = function ParameterList(_ref) {
|
|
|
3555
3577
|
toggleParameter = _ref.toggleParameter,
|
|
3556
3578
|
patchParameter = _ref.patchParameter,
|
|
3557
3579
|
addParameter = _ref.addParameter,
|
|
3558
|
-
togglePlot = _ref.togglePlot,
|
|
3559
3580
|
moveParameter = _ref.moveParameter,
|
|
3560
3581
|
t = _ref.t;
|
|
3561
3582
|
var onSortEnd = React__default.useCallback(function (sort) {
|
|
@@ -3599,8 +3620,7 @@ var ParameterList = function ParameterList(_ref) {
|
|
|
3599
3620
|
addParameter: addParameter,
|
|
3600
3621
|
patchParameter: patchParameter,
|
|
3601
3622
|
deleteParameter: deleteParameter,
|
|
3602
|
-
|
|
3603
|
-
plot: plot,
|
|
3623
|
+
toggleParameter: toggleParameter,
|
|
3604
3624
|
t: t
|
|
3605
3625
|
})
|
|
3606
3626
|
}), jsx(RowLayout, {
|
|
@@ -3866,7 +3886,6 @@ var PlotRows = function PlotRows(_ref) {
|
|
|
3866
3886
|
patchParameter: patchParameter,
|
|
3867
3887
|
addParameter: addParameter,
|
|
3868
3888
|
moveParameter: moveParameter,
|
|
3869
|
-
togglePlot: togglePlot,
|
|
3870
3889
|
t: t
|
|
3871
3890
|
})
|
|
3872
3891
|
})]
|
|
@@ -6399,6 +6418,59 @@ var dateFormatter = function dateFormatter(date) {
|
|
|
6399
6418
|
var getTooltipTimeLabel = function getTooltipTimeLabel(date) {
|
|
6400
6419
|
return dateUtils.dateToString(dateUtils.utc(date), dateUtils.DATE_FORMAT_NAME_OF_DAY_MONTH);
|
|
6401
6420
|
};
|
|
6421
|
+
var createParameterNames = function createParameterNames(plotsWithData) {
|
|
6422
|
+
var plotTitles = new Map();
|
|
6423
|
+
var parameters = plotsWithData.flatMap(function (plot) {
|
|
6424
|
+
plotTitles.set(plot.plotId, plot.title);
|
|
6425
|
+
return plot.parametersWithData;
|
|
6426
|
+
});
|
|
6427
|
+
// count all parameters with the same name
|
|
6428
|
+
var duplicateParameterCount = new Map();
|
|
6429
|
+
for (var _iterator = _createForOfIteratorHelperLoose(parameters), _step; !(_step = _iterator()).done;) {
|
|
6430
|
+
var _duplicateParameterCo2;
|
|
6431
|
+
var parameter = _step.value;
|
|
6432
|
+
var name = getParameterDisplayName(parameter);
|
|
6433
|
+
duplicateParameterCount.set(name, ((_duplicateParameterCo2 = duplicateParameterCount.get(name)) != null ? _duplicateParameterCo2 : 0) + 1);
|
|
6434
|
+
}
|
|
6435
|
+
// count per plot how many duplicate names there are
|
|
6436
|
+
var perBaseNamePlotCounters = new Map();
|
|
6437
|
+
return parameters.map(function (parameter) {
|
|
6438
|
+
var _parameter$id, _duplicateParameterCo, _plotCounters$get, _parameter$enabled3;
|
|
6439
|
+
var name = getParameterDisplayName(parameter);
|
|
6440
|
+
var id = (_parameter$id = parameter.id) != null ? _parameter$id : '';
|
|
6441
|
+
var totalCount = (_duplicateParameterCo = duplicateParameterCount.get(name)) != null ? _duplicateParameterCo : 0;
|
|
6442
|
+
if (totalCount === 1) {
|
|
6443
|
+
var _parameter$enabled;
|
|
6444
|
+
return {
|
|
6445
|
+
name: name,
|
|
6446
|
+
id: id,
|
|
6447
|
+
enabled: (_parameter$enabled = parameter.enabled) != null ? _parameter$enabled : true
|
|
6448
|
+
};
|
|
6449
|
+
}
|
|
6450
|
+
var plotCounters = perBaseNamePlotCounters.get(name);
|
|
6451
|
+
if (!plotCounters) {
|
|
6452
|
+
plotCounters = new Map();
|
|
6453
|
+
perBaseNamePlotCounters.set(name, plotCounters);
|
|
6454
|
+
}
|
|
6455
|
+
var idx = ((_plotCounters$get = plotCounters.get(parameter.plotId)) != null ? _plotCounters$get : 0) + 1;
|
|
6456
|
+
plotCounters.set(parameter.plotId, idx);
|
|
6457
|
+
// First occurrence in this plot → just plotId
|
|
6458
|
+
if (idx === 1) {
|
|
6459
|
+
var _parameter$enabled2;
|
|
6460
|
+
return {
|
|
6461
|
+
name: name + " (" + plotTitles.get(parameter.plotId) + ")",
|
|
6462
|
+
id: id,
|
|
6463
|
+
enabled: (_parameter$enabled2 = parameter.enabled) != null ? _parameter$enabled2 : true
|
|
6464
|
+
};
|
|
6465
|
+
}
|
|
6466
|
+
// Subsequent occurrences → plotId + index (starting at 2)
|
|
6467
|
+
return {
|
|
6468
|
+
name: name + " (" + plotTitles.get(parameter.plotId) + " - " + idx + ")",
|
|
6469
|
+
id: id,
|
|
6470
|
+
enabled: (_parameter$enabled3 = parameter.enabled) != null ? _parameter$enabled3 : true
|
|
6471
|
+
};
|
|
6472
|
+
});
|
|
6473
|
+
};
|
|
6402
6474
|
var paramIntervals = [{
|
|
6403
6475
|
propertyName: 'Temp',
|
|
6404
6476
|
interval: 2,
|
|
@@ -6617,10 +6689,11 @@ var getOption = function getOption(plotsWithData) {
|
|
|
6617
6689
|
var newTimeSpan = CalculateTimeSpan(plotsWithData);
|
|
6618
6690
|
var minDate = newTimeSpan.left;
|
|
6619
6691
|
var maxDate = newTimeSpan.right;
|
|
6692
|
+
var parameterNames = createParameterNames(plotsWithData);
|
|
6620
6693
|
var plotCharts = getPlotCharts(plotsWithData);
|
|
6621
6694
|
var xAxis = getXAxis(plotCharts, minDate, maxDate);
|
|
6622
6695
|
var yAxis = getYAxis(plotCharts);
|
|
6623
|
-
var series = getSeries(plotCharts);
|
|
6696
|
+
var series = getSeries(plotCharts, parameterNames);
|
|
6624
6697
|
var grid = getGrid(plotCharts);
|
|
6625
6698
|
var tooltip = {
|
|
6626
6699
|
trigger: 'axis',
|
|
@@ -6649,17 +6722,19 @@ var getOption = function getOption(plotsWithData) {
|
|
|
6649
6722
|
return "<b>" + timeLabel + "</b>" + value;
|
|
6650
6723
|
}
|
|
6651
6724
|
};
|
|
6652
|
-
var
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6725
|
+
var legend = parameterNames.reduce(function (legendConfig, parameter) {
|
|
6726
|
+
var _legendConfig$data, _parameter$enabled4, _Object$assign;
|
|
6727
|
+
return Object.assign({}, legendConfig, {
|
|
6728
|
+
data: (_legendConfig$data = legendConfig.data) == null ? void 0 : _legendConfig$data.concat(parameter.name),
|
|
6729
|
+
selected: Object.assign({}, legendConfig.selected, (_Object$assign = {}, _Object$assign[parameter.name] = (_parameter$enabled4 = parameter.enabled) != null ? _parameter$enabled4 : true, _Object$assign))
|
|
6730
|
+
});
|
|
6731
|
+
}, {
|
|
6732
|
+
data: [],
|
|
6733
|
+
selected: {}
|
|
6657
6734
|
});
|
|
6658
6735
|
var dataZoomLabelWidth = 70;
|
|
6659
6736
|
var option = {
|
|
6660
|
-
legend:
|
|
6661
|
-
data: parameterNames
|
|
6662
|
-
},
|
|
6737
|
+
legend: legend,
|
|
6663
6738
|
tooltip: tooltip,
|
|
6664
6739
|
axisPointer: {
|
|
6665
6740
|
link: [{
|
|
@@ -6671,7 +6746,7 @@ var getOption = function getOption(plotsWithData) {
|
|
|
6671
6746
|
realtime: true,
|
|
6672
6747
|
left: dataZoomLabelWidth,
|
|
6673
6748
|
right: dataZoomLabelWidth,
|
|
6674
|
-
xAxisIndex:
|
|
6749
|
+
xAxisIndex: parameterNames.map(function (_, index) {
|
|
6675
6750
|
return index;
|
|
6676
6751
|
}),
|
|
6677
6752
|
labelFormatter: function labelFormatter(_, date) {
|
|
@@ -6772,7 +6847,7 @@ var getEChartsSeriesDataByTimestep = function getEChartsSeriesDataByTimestep(tim
|
|
|
6772
6847
|
});
|
|
6773
6848
|
return data;
|
|
6774
6849
|
};
|
|
6775
|
-
var getSeries = function getSeries(plotCharts) {
|
|
6850
|
+
var getSeries = function getSeries(plotCharts, parameterNames) {
|
|
6776
6851
|
var allTimesteps = plotCharts.flatMap(function (plotChart) {
|
|
6777
6852
|
return Object.values(plotChart.parametersByUnit).flatMap(function (parameters) {
|
|
6778
6853
|
return parameters.flatMap(function (parameter) {
|
|
@@ -6789,12 +6864,14 @@ var getSeries = function getSeries(plotCharts) {
|
|
|
6789
6864
|
return Object.entries(plotChart.parametersByUnit).flatMap(function (_ref2, unitIndex) {
|
|
6790
6865
|
var parameters = _ref2[1];
|
|
6791
6866
|
return parameters.flatMap(function (parameter) {
|
|
6792
|
-
var _COLOR_NAME_TO_HEX_MA;
|
|
6867
|
+
var _COLOR_NAME_TO_HEX_MA, _parameterNames$find;
|
|
6793
6868
|
var color = (_COLOR_NAME_TO_HEX_MA = COLOR_NAME_TO_HEX_MAP[parameter.color]) != null ? _COLOR_NAME_TO_HEX_MA : COLOR_NAME_TO_HEX_MAP[COLOR_MAP[parameter.propertyName]];
|
|
6794
6869
|
var type = parameter.plotType === 'area' ? 'line' : parameter.plotType;
|
|
6795
6870
|
return Object.assign({
|
|
6796
6871
|
data: getEChartsSeriesDataByTimestep(uniqueTimesteps, parameter),
|
|
6797
|
-
name:
|
|
6872
|
+
name: (_parameterNames$find = parameterNames.find(function (pName) {
|
|
6873
|
+
return pName.id === parameter.id;
|
|
6874
|
+
})) == null ? void 0 : _parameterNames$find.name,
|
|
6798
6875
|
type: type,
|
|
6799
6876
|
xAxisIndex: plotIndex,
|
|
6800
6877
|
yAxisIndex: plotChart.countPreviousUnits + unitIndex,
|
|
@@ -6993,7 +7070,8 @@ var TimeSeriesChart = function TimeSeriesChart(_ref2) {
|
|
|
6993
7070
|
_ref2$animation = _ref2.animation,
|
|
6994
7071
|
animation = _ref2$animation === void 0 ? false : _ref2$animation,
|
|
6995
7072
|
_ref2$shouldShowLegen = _ref2.shouldShowLegend,
|
|
6996
|
-
shouldShowLegend = _ref2$shouldShowLegen === void 0 ? true : _ref2$shouldShowLegen
|
|
7073
|
+
shouldShowLegend = _ref2$shouldShowLegen === void 0 ? true : _ref2$shouldShowLegen,
|
|
7074
|
+
onToggleLegendParam = _ref2.onToggleLegendParam;
|
|
6997
7075
|
var _useThemeContext = useThemeContext(),
|
|
6998
7076
|
namedTheme = _useThemeContext.namedTheme;
|
|
6999
7077
|
var isDark = (namedTheme == null ? void 0 : namedTheme.theme.palette.mode) === 'dark';
|
|
@@ -7026,7 +7104,18 @@ var TimeSeriesChart = function TimeSeriesChart(_ref2) {
|
|
|
7026
7104
|
onChartReady: updateHeight,
|
|
7027
7105
|
// noop, prevent flickering when toggling legend
|
|
7028
7106
|
onEvents: {
|
|
7029
|
-
finished: function finished() {}
|
|
7107
|
+
finished: function finished() {},
|
|
7108
|
+
legendselectchanged: function legendselectchanged(params) {
|
|
7109
|
+
if (!option.legend) {
|
|
7110
|
+
return;
|
|
7111
|
+
}
|
|
7112
|
+
var foundParam = createParameterNames(plotsWithData).find(function (param) {
|
|
7113
|
+
return param.name === params.name;
|
|
7114
|
+
});
|
|
7115
|
+
if (foundParam && foundParam.id) {
|
|
7116
|
+
onToggleLegendParam == null || onToggleLegendParam(foundParam.id);
|
|
7117
|
+
}
|
|
7118
|
+
}
|
|
7030
7119
|
}
|
|
7031
7120
|
})
|
|
7032
7121
|
}) : null;
|
|
@@ -7039,7 +7128,8 @@ var TimeSeriesView = /*#__PURE__*/React__default.memo(function (_ref) {
|
|
|
7039
7128
|
splitGeoJsonByCollection = _ref.splitGeoJsonByCollection,
|
|
7040
7129
|
isLoading = _ref.isLoading,
|
|
7041
7130
|
_ref$shouldShowLegend = _ref.shouldShowLegend,
|
|
7042
|
-
shouldShowLegend = _ref$shouldShowLegend === void 0 ? true : _ref$shouldShowLegend
|
|
7131
|
+
shouldShowLegend = _ref$shouldShowLegend === void 0 ? true : _ref$shouldShowLegend,
|
|
7132
|
+
onToggleLegendParam = _ref.onToggleLegendParam;
|
|
7043
7133
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
7044
7134
|
t = _useTimeseriesTransla.t;
|
|
7045
7135
|
var _useGetPlotsWithData = useGetPlotsWithData(plotPreset, selectedLocation, services, splitGeoJsonByCollection),
|
|
@@ -7064,7 +7154,8 @@ var TimeSeriesView = /*#__PURE__*/React__default.memo(function (_ref) {
|
|
|
7064
7154
|
shouldClose: true
|
|
7065
7155
|
}), plotsWithData && jsx(TimeSeriesChart, {
|
|
7066
7156
|
plotsWithData: plotsWithData,
|
|
7067
|
-
shouldShowLegend: shouldShowLegend
|
|
7157
|
+
shouldShowLegend: shouldShowLegend,
|
|
7158
|
+
onToggleLegendParam: onToggleLegendParam
|
|
7068
7159
|
})]
|
|
7069
7160
|
});
|
|
7070
7161
|
}, function (previousProps, nextProps) {
|
|
@@ -7492,6 +7583,12 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
7492
7583
|
isLegendVisible: !shouldShowLegend
|
|
7493
7584
|
}));
|
|
7494
7585
|
};
|
|
7586
|
+
var onToggleLegendParam = function onToggleLegendParam(parameterId) {
|
|
7587
|
+
dispatch(timeSeriesActions.toggleParameter({
|
|
7588
|
+
parameterId: parameterId,
|
|
7589
|
+
panelId: panelId
|
|
7590
|
+
}));
|
|
7591
|
+
};
|
|
7495
7592
|
return jsxs(Stack, {
|
|
7496
7593
|
sx: {
|
|
7497
7594
|
padding: '20px',
|
|
@@ -7554,7 +7651,8 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
7554
7651
|
services: services,
|
|
7555
7652
|
splitGeoJsonByCollection: geoJSONWithService || [],
|
|
7556
7653
|
isLoading: isLoading,
|
|
7557
|
-
shouldShowLegend: shouldShowLegend
|
|
7654
|
+
shouldShowLegend: shouldShowLegend,
|
|
7655
|
+
onToggleLegendParam: onToggleLegendParam
|
|
7558
7656
|
})
|
|
7559
7657
|
})]
|
|
7560
7658
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/time-series",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.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": "13.
|
|
12
|
+
"@opengeoweb/shared": "13.1.0",
|
|
13
13
|
"@reduxjs/toolkit": "^2.6.1",
|
|
14
14
|
"react-redux": "^9.2.0",
|
|
15
|
-
"@opengeoweb/webmap": "13.
|
|
16
|
-
"@opengeoweb/webmap-react": "13.
|
|
15
|
+
"@opengeoweb/webmap": "13.1.0",
|
|
16
|
+
"@opengeoweb/webmap-react": "13.1.0",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
|
-
"@opengeoweb/api": "13.
|
|
19
|
-
"@opengeoweb/theme": "13.
|
|
20
|
-
"@opengeoweb/store": "13.
|
|
18
|
+
"@opengeoweb/api": "13.1.0",
|
|
19
|
+
"@opengeoweb/theme": "13.1.0",
|
|
20
|
+
"@opengeoweb/store": "13.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": "13.
|
|
24
|
+
"@opengeoweb/snackbar": "13.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": "13.
|
|
31
|
-
"@opengeoweb/form-fields": "13.
|
|
30
|
+
"@opengeoweb/core": "13.1.0",
|
|
31
|
+
"@opengeoweb/form-fields": "13.1.0",
|
|
32
32
|
"@mui/material": "^7.0.1",
|
|
33
33
|
"react-hook-form": "^7.61.1",
|
|
34
34
|
"uuid": "^10.0.0",
|
|
@@ -8,6 +8,7 @@ interface TimeSeriesViewProps {
|
|
|
8
8
|
splitGeoJsonByCollection: GeoJsonWithService[];
|
|
9
9
|
isLoading?: (startOrFinish: boolean) => void;
|
|
10
10
|
shouldShowLegend?: boolean;
|
|
11
|
+
onToggleLegendParam?: (legendId: string) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const TimeSeriesView: React.FC<TimeSeriesViewProps>;
|
|
13
14
|
export {};
|
|
@@ -3,6 +3,11 @@ import { ParameterWithData, Plot, PlotWithData } from './types';
|
|
|
3
3
|
export declare const MIN_GRAPH_WIDTH = 300;
|
|
4
4
|
export declare const dateFormatter: (date: string) => string;
|
|
5
5
|
export declare const getTooltipTimeLabel: (date: string) => string;
|
|
6
|
+
export declare const createParameterNames: (plotsWithData: PlotWithData[]) => {
|
|
7
|
+
name: string;
|
|
8
|
+
id: string;
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
}[];
|
|
6
11
|
interface ParamIntervalType {
|
|
7
12
|
unit?: string;
|
|
8
13
|
propertyName?: string;
|
|
@@ -18,7 +23,10 @@ export declare const getParameterDisplayName: (parameter: ParameterWithData) =>
|
|
|
18
23
|
export declare const roundDecimalValues: (value: number) => string;
|
|
19
24
|
export declare const getOption: (plotsWithData: PlotWithData[]) => EChartsOption;
|
|
20
25
|
export declare const getEChartsSeriesDataByTimestep: (timesteps: Date[], parameter: ParameterWithData) => (number | string)[][];
|
|
21
|
-
export declare const getSeries: (plotCharts: PlotChart[]
|
|
26
|
+
export declare const getSeries: (plotCharts: PlotChart[], parameterNames: {
|
|
27
|
+
name: string;
|
|
28
|
+
id: string;
|
|
29
|
+
}[]) => (LineSeriesOption | BarSeriesOption | ScatterSeriesOption)[];
|
|
22
30
|
export declare const getGrid: (plotCharts: PlotChart[]) => GridComponentOption[];
|
|
23
31
|
export declare const Y_AXIS_OFFSET = 80;
|
|
24
32
|
export declare const PLOT_HEIGHT = 150;
|
|
@@ -127,6 +127,11 @@ export interface EDRPositionResponse {
|
|
|
127
127
|
parameters: EDRParameters;
|
|
128
128
|
ranges?: EDRRange;
|
|
129
129
|
}
|
|
130
|
+
export interface EDRPositionResponseCoverageCollection {
|
|
131
|
+
coverages: EDRPositionResponse[];
|
|
132
|
+
parameters: EDRParameters;
|
|
133
|
+
type: string;
|
|
134
|
+
}
|
|
130
135
|
export interface EDRCollection {
|
|
131
136
|
parameter_names?: object;
|
|
132
137
|
parameters?: object;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Plot, PlotParameter, TimeSeriesService } from '@opengeoweb/shared';
|
|
2
2
|
import { FeatureCollection, GeoJsonProperties, GeometryObject } from 'geojson';
|
|
3
|
-
import {
|
|
3
|
+
import { GeoJsonWithService, Parameter, ParameterWithData, PlotWithData, PointerLocation, TimeSeriesLocation } from './types';
|
|
4
4
|
import { TimeseriesCollectionDetail } from '../TimeSeriesSelect/utils';
|
|
5
5
|
export declare const createGeoJsonArrays: (locations: (FeatureCollection<GeometryObject, GeoJsonProperties> | undefined)[], services: TimeSeriesService[] | undefined, hideFeatures: boolean, memoizedSelectedFeature: TimeSeriesLocation | null) => {
|
|
6
6
|
combinedGeoJson: FeatureCollection<GeometryObject, GeoJsonProperties>;
|
|
7
7
|
};
|
|
8
|
-
export declare const getEdrParameter: (presetParameter: Parameter, serviceUrl: string, location: PointerLocation,
|
|
8
|
+
export declare const getEdrParameter: (presetParameter: Parameter, serviceUrl: string, location: PointerLocation, collection: TimeseriesCollectionDetail) => Promise<ParameterWithData | null>;
|
|
9
9
|
export declare const fetchParameter: (parameter: PlotParameter, selectedLocation: PointerLocation, service: TimeSeriesService, geojsonMap: Map<string, GeoJsonWithService>, collection?: TimeseriesCollectionDetail) => Promise<ParameterWithData | null>;
|
|
10
10
|
export declare const getPlotsWithParameters: (plots: Plot[], parameters: ParameterWithData[]) => PlotWithData[];
|
|
11
11
|
export declare function consolidateFeatures(features: {
|
|
@@ -9,7 +9,6 @@ export declare const ParameterList: FC<{
|
|
|
9
9
|
toggleParameter: (id: string) => void;
|
|
10
10
|
patchParameter: (parameter: Partial<Parameter>) => void;
|
|
11
11
|
addParameter: (parameter: Parameter) => void;
|
|
12
|
-
togglePlot: (id: string) => void;
|
|
13
12
|
moveParameter: (event: MoveParameterPayload) => void;
|
|
14
13
|
t: TFunction;
|
|
15
14
|
}>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TFunction } from 'i18next';
|
|
3
|
-
import { Parameter, ParameterListStyles
|
|
3
|
+
import { Parameter, ParameterListStyles } from '../TimeSeries/types';
|
|
4
4
|
declare const TimeSeriesManagerRowAccordion: React.FC<{
|
|
5
|
-
plot: Plot;
|
|
6
5
|
plotIsEnabled: boolean;
|
|
7
6
|
rowIsEnabled: boolean;
|
|
8
7
|
parameter: Parameter;
|
|
@@ -10,7 +9,7 @@ declare const TimeSeriesManagerRowAccordion: React.FC<{
|
|
|
10
9
|
addParameter: (parameter: Parameter) => void;
|
|
11
10
|
patchParameter: (parameter: Partial<Parameter>) => void;
|
|
12
11
|
deleteParameter: (id: string) => void;
|
|
13
|
-
|
|
12
|
+
toggleParameter: (id: string) => void;
|
|
14
13
|
t: TFunction;
|
|
15
14
|
}>;
|
|
16
15
|
export default TimeSeriesManagerRowAccordion;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { EDRInstance } from '@opengeoweb/shared';
|
|
2
2
|
import { ServiceFilterChipsObjectEntities } from '../../store/types';
|
|
3
|
-
import { CustomDimension, SelectParameter } from '../TimeSeries/types';
|
|
3
|
+
import { CustomDimension, EDRCollection, SelectParameter } from '../TimeSeries/types';
|
|
4
4
|
export interface TimeseriesCollectionDetail {
|
|
5
5
|
collectionId: string;
|
|
6
|
+
collectionDetails: EDRCollection;
|
|
6
7
|
serviceId: string;
|
|
7
8
|
parameters: SelectParameter[];
|
|
8
9
|
serviceName: string;
|
|
@@ -5,7 +5,7 @@ import { type EDRCollection, type EDRInstance, type EDRParameter, type Parameter
|
|
|
5
5
|
import { TimeseriesCollectionDetail } from '../components/TimeSeriesSelect/utils';
|
|
6
6
|
export declare const createUrl: (baseUrl: string, pathToAdd?: string, queryParameters?: [string, string][]) => string;
|
|
7
7
|
export declare const supportedOutputFormat = "CoverageJSON";
|
|
8
|
-
export declare const getBaseQueryParamArray: (parameter: Parameter, instance: EDRInstance, clipInterval?: [number, number]) => [string, string][];
|
|
8
|
+
export declare const getBaseQueryParamArray: (parameter: Parameter, instance: EDRInstance, collection: TimeseriesCollectionDetail, clipInterval?: [number, number]) => [string, string][];
|
|
9
9
|
export declare const latestInstance: (instances: EDRInstance[]) => EDRInstance | null;
|
|
10
10
|
export declare const isSupportedInstance: (instances: EDRInstance) => boolean;
|
|
11
11
|
export declare const listSupportedInstances: (instances: EDRInstance[]) => EDRInstance[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EDRCollection, EDRInstance, EDRPositionResponse, Parameter } from '../../components/TimeSeries/types';
|
|
1
|
+
import { EDRCollection, EDRInstance, EDRPositionResponse, EDRPositionResponseCoverageCollection, Parameter } from '../../components/TimeSeries/types';
|
|
2
2
|
export declare const EDR_FINLAND_NAME = "EDR Finland";
|
|
3
3
|
export declare const EDR_FINLAND_DESCRIPTION = "EDR Finland Description";
|
|
4
4
|
export declare const EDR_FINLAND_URL = "https://opendata.fmi.fi/edr";
|
|
@@ -142,6 +142,7 @@ export declare const knmiUwcwHa43DInifInstances: {
|
|
|
142
142
|
};
|
|
143
143
|
})[];
|
|
144
144
|
};
|
|
145
|
+
export declare const edrPositionResponseCoverageCollectionMock: EDRPositionResponseCoverageCollection;
|
|
145
146
|
export declare const edrPositionResponseMock: EDRPositionResponse;
|
|
146
147
|
export declare const edrLocationResponseMock: EDRPositionResponse;
|
|
147
148
|
export declare const mockLocations: {
|
|
@@ -157,6 +158,7 @@ export declare const mockLocations: {
|
|
|
157
158
|
}[];
|
|
158
159
|
};
|
|
159
160
|
export declare const collectionsMockNorway: EDRCollection;
|
|
161
|
+
export declare const collectionsMockNoInstances: EDRCollection;
|
|
160
162
|
export declare const collectionsMockFinland: EDRCollection;
|
|
161
163
|
export declare const edrEndpoints: import("msw").HttpHandler[];
|
|
162
164
|
export declare const edrTestCollectionNoInstancesMock: {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GeometryObject } from 'geojson';
|
|
2
2
|
import { TimeSeriesService } from '@opengeoweb/shared';
|
|
3
|
-
import { EDRCollection, EDRInstance, EDRPositionResponse, Parameter, PointerLocation } from '../../components/TimeSeries/types';
|
|
3
|
+
import { EDRCollection, EDRInstance, EDRPositionResponse, EDRPositionResponseCoverageCollection, Parameter, PointerLocation } from '../../components/TimeSeries/types';
|
|
4
4
|
import { TimeseriesCollectionDetail } from '../../components/TimeSeriesSelect/utils';
|
|
5
5
|
export interface LocationsResult {
|
|
6
6
|
features: {
|
|
@@ -35,5 +35,5 @@ export declare const getCollections: (serviceUrl: string) => Promise<{
|
|
|
35
35
|
}>;
|
|
36
36
|
export declare const getSupportedInstances: (serviceUrl?: string, collectionId?: string, useCollectionFallback?: boolean) => Promise<EDRInstance[]>;
|
|
37
37
|
export declare const fetchParametersForService: (service: TimeSeriesService) => Promise<TimeseriesCollectionDetail[]>;
|
|
38
|
-
export declare const fetchEdrParameter: (serviceUrl: string, parameter: Parameter, location: PointerLocation, instance: EDRInstance) => Promise<EDRPositionResponse | null>;
|
|
38
|
+
export declare const fetchEdrParameter: (serviceUrl: string, parameter: Parameter, location: PointerLocation, instance: EDRInstance, collection: TimeseriesCollectionDetail) => Promise<EDRPositionResponse | EDRPositionResponseCoverageCollection | null>;
|
|
39
39
|
export {};
|