@opengeoweb/time-series 16.0.0 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +1427 -446
- package/package.json +11 -11
- package/src/index.d.ts +0 -4
- package/src/lib/TimeSeriesDemo.stories.d.ts +0 -44
- package/src/lib/components/ComponentsLookUp/componentsLookUp.d.ts +0 -23
- package/src/lib/components/ComponentsLookUp/componentsLookUp.stories.d.ts +0 -9
- 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/Providers/Providers.d.ts +0 -32
- package/src/lib/components/Providers/index.d.ts +0 -1
- package/src/lib/components/TimeSeries/LocationDropdown/LocationDropdown.d.ts +0 -13
- package/src/lib/components/TimeSeries/LocationDropdown/LocationDropdown.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/LocationDropdown/LocationDropdown.stories.d.ts +0 -11
- package/src/lib/components/TimeSeries/LocationDropdown/LocationDropdownHeader.d.ts +0 -7
- package/src/lib/components/TimeSeries/LocationDropdown/LocationDropdownHeader.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/LocationDropdown/LocationListItem.d.ts +0 -8
- package/src/lib/components/TimeSeries/LocationDropdown/LocationListItem.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/LocationDropdown/OverflowTooltip.d.ts +0 -9
- package/src/lib/components/TimeSeries/LocationDropdown/testData.d.ts +0 -2
- package/src/lib/components/TimeSeries/LocationInfo/LocationInfo.d.ts +0 -30
- package/src/lib/components/TimeSeries/LocationInfo/LocationInfo.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/LocationInfo/LocationInfo.stories.d.ts +0 -10
- package/src/lib/components/TimeSeries/LocationInfo/LocationInfoButtonConnect.d.ts +0 -7
- package/src/lib/components/TimeSeries/LocationInfo/LocationInfoConnect.d.ts +0 -2
- package/src/lib/components/TimeSeries/LocationSelect/LocationSelectButtonConnect.d.ts +0 -6
- package/src/lib/components/TimeSeries/LocationSelect/LocationSelectDialogConnect.d.ts +0 -2
- package/src/lib/components/TimeSeries/LocationSelect/index.d.ts +0 -1
- package/src/lib/components/TimeSeries/TimeSeriesChart.d.ts +0 -33
- package/src/lib/components/TimeSeries/TimeSeriesChart.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/TimeSeriesChart.stories.d.ts +0 -12
- package/src/lib/components/TimeSeries/TimeSeriesConnect.d.ts +0 -9
- package/src/lib/components/TimeSeries/TimeSeriesConnect.integration.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/TimeSeriesConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/TimeSeriesConnect.stories.d.ts +0 -11
- package/src/lib/components/TimeSeries/TimeSeriesConnectWrapper.d.ts +0 -9
- package/src/lib/components/TimeSeries/TimeSeriesConnectWrapper.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/TimeSeriesMarkersSwitch.d.ts +0 -6
- package/src/lib/components/TimeSeries/TimeSeriesMarkersSwitch.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/TimeSeriesTopRowButton.d.ts +0 -9
- package/src/lib/components/TimeSeries/TimeSeriesTopRowButton.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/TimeSeriesTopRowButton.stories.d.ts +0 -8
- package/src/lib/components/TimeSeries/TimeSeriesView.d.ts +0 -16
- package/src/lib/components/TimeSeries/TimeSeriesView.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/TimeSeriesView.stories.d.ts +0 -9
- package/src/lib/components/TimeSeries/chartUtils.d.ts +0 -43
- package/src/lib/components/TimeSeries/chartUtils.spec.d.ts +0 -1
- package/src/lib/components/TimeSeries/types.d.ts +0 -251
- package/src/lib/components/TimeSeries/utils.d.ts +0 -25
- package/src/lib/components/TimeSeries/utils.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesAddPlot/TimeSeriesAddPlot.d.ts +0 -10
- package/src/lib/components/TimeSeriesManager/ParameterInfo/ParameterInfoButton.d.ts +0 -8
- package/src/lib/components/TimeSeriesManager/ParameterInfo/ParameterInfoButtonConnect.d.ts +0 -8
- package/src/lib/components/TimeSeriesManager/ParameterInfo/ParameterInfoDialog.d.ts +0 -43
- package/src/lib/components/TimeSeriesManager/ParameterInfo/ParameterInfoDialog.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/ParameterInfo/ParameterInfoDialog.stories.d.ts +0 -15
- package/src/lib/components/TimeSeriesManager/ParameterInfo/ParameterInfoDialogConnect.d.ts +0 -2
- package/src/lib/components/TimeSeriesManager/ParameterList.d.ts +0 -15
- package/src/lib/components/TimeSeriesManager/ParameterList.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/PlotRows.d.ts +0 -21
- package/src/lib/components/TimeSeriesManager/RowLayout.d.ts +0 -10
- package/src/lib/components/TimeSeriesManager/TimeSeriesManager.d.ts +0 -40
- package/src/lib/components/TimeSeriesManager/TimeSeriesManager.integration.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManager.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManager.stories.d.ts +0 -12
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerConnect.d.ts +0 -9
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerMapButtonConnect.d.ts +0 -7
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerMapButtonConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterColorSelect.d.ts +0 -11
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterColorSelect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterDimensionIdSelect.d.ts +0 -12
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterDimensionIdSelect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterDimensionSelect.d.ts +0 -10
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterDimensionValueSelect.d.ts +0 -11
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterDimensionValueSelect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterNameSelect.d.ts +0 -10
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterOpacitySelect.d.ts +0 -10
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterOpacitySelect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterReferenceTimeSelect.d.ts +0 -10
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterReferenceTimeSelect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterTypeSelect.d.ts +0 -10
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerParameterComponents/ParameterTypeSelect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerRowAccordion.d.ts +0 -16
- package/src/lib/components/TimeSeriesManager/TimeSeriesManagerRowAccordion.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesManager/index.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/ServiceChips/ServiceChip.d.ts +0 -11
- package/src/lib/components/TimeSeriesSelect/ServiceChips/ServiceChip.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/ServiceChips/ServiceChipConnect.d.ts +0 -12
- package/src/lib/components/TimeSeriesSelect/ServiceOptionsConnect.d.ts +0 -6
- package/src/lib/components/TimeSeriesSelect/ServiceOptionsConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/ServiceOptionsDialog.d.ts +0 -13
- package/src/lib/components/TimeSeriesSelect/ServiceOptionsDialog.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/ServiceOptionsDialog.stories.d.ts +0 -8
- package/src/lib/components/TimeSeriesSelect/ServicePopup/ServicePopup.d.ts +0 -18
- package/src/lib/components/TimeSeriesSelect/ServicePopup/ServicePopup.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/ServicePopup/ServicePopup.stories.d.ts +0 -11
- package/src/lib/components/TimeSeriesSelect/ServicePopup/ServicePopupConnect.d.ts +0 -6
- package/src/lib/components/TimeSeriesSelect/ServicePopup/ServicePopupConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/ServicePopup/ServicePopupConnect.stories.d.ts +0 -7
- package/src/lib/components/TimeSeriesSelect/ServicePopup/ServicePopupDialogConnect.d.ts +0 -12
- package/src/lib/components/TimeSeriesSelect/ServicePopup/utils.d.ts +0 -4
- package/src/lib/components/TimeSeriesSelect/ServicePopup/utils.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSearchConnect.d.ts +0 -6
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSearchConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelect.d.ts +0 -15
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelect.stories.d.ts +0 -9
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelectButtonConnect.d.ts +0 -11
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelectButtonConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelectConnect.d.ts +0 -7
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelectConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelectList.d.ts +0 -19
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelectListConnect.d.ts +0 -12
- package/src/lib/components/TimeSeriesSelect/TimeSeriesSelectListConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSeriesSelect/TimeSeriesServiceList.d.ts +0 -9
- package/src/lib/components/TimeSeriesSelect/TimeSeriesServiceListConnect.d.ts +0 -8
- package/src/lib/components/TimeSeriesSelect/utils.d.ts +0 -16
- package/src/lib/constants.d.ts +0 -66
- package/src/lib/index.d.ts +0 -10
- package/src/lib/store/index.d.ts +0 -4
- package/src/lib/store/listeners.d.ts +0 -2
- package/src/lib/store/reducer.d.ts +0 -54
- package/src/lib/store/reducer.spec.d.ts +0 -1
- package/src/lib/store/selectors.d.ts +0 -433
- package/src/lib/store/selectors.spec.d.ts +0 -1
- package/src/lib/store/store.d.ts +0 -15
- package/src/lib/store/types.d.ts +0 -151
- package/src/lib/storybookUtils/SimpleLinkMenu.d.ts +0 -6
- package/src/lib/storybookUtils/ToggleThemeButton.d.ts +0 -2
- package/src/lib/storybookUtils/chartSeriesExampleData.d.ts +0 -4
- package/src/lib/storybookUtils/defaultStorySettings.d.ts +0 -18
- package/src/lib/utils/edrUtils.d.ts +0 -62
- package/src/lib/utils/edrUtils.spec.d.ts +0 -2
- package/src/lib/utils/fakeData/mockDimensions.d.ts +0 -2
- package/src/lib/utils/fakeData/mockGeoJSON.d.ts +0 -2
- package/src/lib/utils/fakeData/mockTimeSeriesServices.d.ts +0 -2
- package/src/lib/utils/i18n.d.ts +0 -6
- package/src/lib/utils/localStorage.d.ts +0 -3
- package/src/lib/utils/localStorage.spec.d.ts +0 -1
- package/src/lib/utils/mocks/handlers.d.ts +0 -189
- package/src/lib/utils/mocks/index.d.ts +0 -2
- package/src/lib/utils/mocks/server.d.ts +0 -1
- package/src/lib/utils/timeseries-api/api.d.ts +0 -41
- package/src/lib/utils/timeseries-api/fakeApi.d.ts +0 -1
- package/src/lib/utils/timeseries-api/hooks.d.ts +0 -70
- package/src/lib/utils/timeseries-api/hooks.spec.d.ts +0 -1
- package/src/lib/utils/utils.d.ts +0 -3
package/index.esm.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
1
|
import React, { useCallback, useMemo, useState, useEffect, memo } from 'react';
|
|
3
2
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
3
|
import { CustomIconButton, dateUtils, TooltipSelect, CustomAccordion, CustomTooltip, CustomToggleButton, ToolContainerDraggable, ToggleMenu, CustomDialog, SearchField, SearchHighlight, AlertBanner, useConfirmationDialog, SwitchButton, useResizeObserver } from '@opengeoweb/shared';
|
|
@@ -11,13 +10,14 @@ import { Info, ArrowDropDownDown, Copy, Delete, Visibility, VisibilityOff, TimeS
|
|
|
11
10
|
import i18n from 'i18next';
|
|
12
11
|
import { useTranslation } from 'react-i18next';
|
|
13
12
|
import '@opengeoweb/core';
|
|
13
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
import { createEntityAdapter, createSlice, createAction, createSelector, createListenerMiddleware, isAnyOf, combineReducers, configureStore } from '@reduxjs/toolkit';
|
|
15
15
|
import { produce } from 'immer';
|
|
16
16
|
import { v4 } from 'uuid';
|
|
17
17
|
import { center } from '@turf/turf';
|
|
18
18
|
import { MapFeatureClass } from '@opengeoweb/webmap-react';
|
|
19
19
|
import { useQueries, useQueryClient, useQuery, queryOptions } from '@tanstack/react-query';
|
|
20
|
-
import {
|
|
20
|
+
import { withJsonFormat, handleResponse } from '@opengeoweb/api';
|
|
21
21
|
import Box$1 from '@mui/material/Box';
|
|
22
22
|
import { useFormContext } from 'react-hook-form';
|
|
23
23
|
import { ReactHookFormProvider, defaultFormOptions, ReactHookFormTextField, ReactHookFormSelect } from '@opengeoweb/form-fields';
|
|
@@ -515,23 +515,42 @@ var timeseriesTranslations = {
|
|
|
515
515
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
516
516
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
517
517
|
* */
|
|
518
|
+
|
|
518
519
|
var TIME_SERIES_NAMESPACE = 'timeseries';
|
|
519
520
|
var useTimeseriesTranslation = function useTimeseriesTranslation() {
|
|
520
521
|
return useTranslation(TIME_SERIES_NAMESPACE);
|
|
521
522
|
};
|
|
522
523
|
|
|
524
|
+
/* *
|
|
525
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
526
|
+
* you may not use this file except in compliance with the License.
|
|
527
|
+
* You may obtain a copy of the License at
|
|
528
|
+
*
|
|
529
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
530
|
+
*
|
|
531
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
532
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
533
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
534
|
+
* See the License for the specific language governing permissions and
|
|
535
|
+
* limitations under the License.
|
|
536
|
+
*
|
|
537
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
538
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
539
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
540
|
+
* */
|
|
541
|
+
|
|
523
542
|
var ParameterInfoButton = function ParameterInfoButton(_ref) {
|
|
524
543
|
var isOpenInStore = _ref.isOpenInStore,
|
|
525
544
|
isActive = _ref.isActive,
|
|
526
545
|
onClick = _ref.onClick;
|
|
527
546
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
528
547
|
t = _useTimeseriesTransla.t;
|
|
529
|
-
return jsx(CustomIconButton, {
|
|
548
|
+
return /*#__PURE__*/jsx(CustomIconButton, {
|
|
530
549
|
"aria-label": t('timeseries-parameter-info'),
|
|
531
550
|
isSelected: !!isActive && isOpenInStore,
|
|
532
551
|
onClick: onClick,
|
|
533
552
|
variant: "flat",
|
|
534
|
-
children: jsx(Info, {})
|
|
553
|
+
children: /*#__PURE__*/jsx(Info, {})
|
|
535
554
|
});
|
|
536
555
|
};
|
|
537
556
|
|
|
@@ -862,6 +881,7 @@ function _regeneratorRuntime() {
|
|
|
862
881
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
863
882
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
864
883
|
* */
|
|
884
|
+
|
|
865
885
|
var COLOR_MAP = {
|
|
866
886
|
air_pressure_at_sea_level: 'W',
|
|
867
887
|
air_temperature_2m: 'A',
|
|
@@ -1031,7 +1051,7 @@ var getUnit = function getUnit(param, lang, fallbackLang) {
|
|
|
1031
1051
|
};
|
|
1032
1052
|
var constructParameterObject = function constructParameterObject(serviceId, collectionId, parametersById) {
|
|
1033
1053
|
return Object.keys(parametersById).map(function (parameterId) {
|
|
1034
|
-
var _parameter$unit$label, _parameter$unit, _COLOR_MAP
|
|
1054
|
+
var _parameter$unit$label, _parameter$unit, _COLOR_MAP;
|
|
1035
1055
|
var parameter = parametersById[parameterId];
|
|
1036
1056
|
return Object.assign({
|
|
1037
1057
|
plotType: 'line',
|
|
@@ -1042,7 +1062,7 @@ var constructParameterObject = function constructParameterObject(serviceId, coll
|
|
|
1042
1062
|
unit: (_parameter$unit$label = (_parameter$unit = parameter.unit) == null ? void 0 : _parameter$unit.label) != null ? _parameter$unit$label : ' ',
|
|
1043
1063
|
serviceId: serviceId,
|
|
1044
1064
|
collectionId: collectionId,
|
|
1045
|
-
color: (_COLOR_MAP
|
|
1065
|
+
color: (_COLOR_MAP = COLOR_MAP[parameter.id]) != null ? _COLOR_MAP : 'A',
|
|
1046
1066
|
opacity: 70
|
|
1047
1067
|
});
|
|
1048
1068
|
});
|
|
@@ -1070,6 +1090,7 @@ var getServiceCollectionDetails = function getServiceCollectionDetails(service,
|
|
|
1070
1090
|
// If no collections are provided, return an empty array
|
|
1071
1091
|
return collectionsParameters;
|
|
1072
1092
|
}
|
|
1093
|
+
|
|
1073
1094
|
// Only use parameters from collections that support /locations or /position
|
|
1074
1095
|
for (var _iterator = _createForOfIteratorHelperLoose(collections), _step; !(_step = _iterator()).done;) {
|
|
1075
1096
|
var _collection$data_quer2, _collection$data_quer3;
|
|
@@ -1117,6 +1138,7 @@ date) {
|
|
|
1117
1138
|
var endDate = ((_dateUtils$isoStringT2 = dateUtils.isoStringToDate(String(endTimeFromEdr), false)) != null ? _dateUtils$isoStringT2 : dateUtils.getNowUtc()).getTime();
|
|
1118
1139
|
var clippedStartDate = new Date(Math.max(startDate != null ? startDate : date, date - maxHoursBefore * HOUR_IN_MILLISECONDS));
|
|
1119
1140
|
var clippedEndDate = new Date(Math.min(endDate != null ? endDate : date, date + maxHoursAfter * HOUR_IN_MILLISECONDS));
|
|
1141
|
+
|
|
1120
1142
|
// Round the dates to minutes to make caching more likely.
|
|
1121
1143
|
clippedStartDate.setMilliseconds(0);
|
|
1122
1144
|
clippedStartDate.setSeconds(0);
|
|
@@ -1126,11 +1148,13 @@ date) {
|
|
|
1126
1148
|
var end = dateUtils.dateToString(clippedEndDate);
|
|
1127
1149
|
return [start, end];
|
|
1128
1150
|
};
|
|
1151
|
+
|
|
1129
1152
|
// 1 day to past, 10 days to future
|
|
1130
1153
|
var clipInterval = [1 * 24, 10 * 24];
|
|
1131
1154
|
var constructTimeInterval = function constructTimeInterval(collection, instance, syncgroupTimeState) {
|
|
1132
1155
|
var _instance$extent$temp, _instance$extent2, _collection$extent4;
|
|
1133
1156
|
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];
|
|
1157
|
+
|
|
1134
1158
|
// If syncgroupTimeState is set, use this instead of the fixed timerange.
|
|
1135
1159
|
if ((syncgroupTimeState == null ? void 0 : syncgroupTimeState.start) !== undefined && (syncgroupTimeState == null ? void 0 : syncgroupTimeState.end) !== undefined) {
|
|
1136
1160
|
var timeRangeStartIso = dateUtils.dateToString(dateUtils.fromUnix(syncgroupTimeState.start));
|
|
@@ -1601,8 +1625,9 @@ var normalizeTimeSeriesState = function normalizeTimeSeriesState(state) {
|
|
|
1601
1625
|
return state;
|
|
1602
1626
|
}
|
|
1603
1627
|
var legacyServices = state.services || [];
|
|
1604
|
-
state
|
|
1605
|
-
|
|
1628
|
+
var _ref = state;
|
|
1629
|
+
_ref.services;
|
|
1630
|
+
var panelState = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
1606
1631
|
return Object.assign({}, initialState, {
|
|
1607
1632
|
services: legacyServices,
|
|
1608
1633
|
byId: Object.assign({}, initialState.byId, {
|
|
@@ -1659,7 +1684,8 @@ var timeSeriesReducer = function timeSeriesReducer(state, action) {
|
|
|
1659
1684
|
var serviceActionTypes = new Set([timeSeriesActions.loadUserAddedTimeSeriesServices.type, timeSeriesActions.addServices.type, timeSeriesActions.upsertService.type, timeSeriesActions.removeService.type, timeSeriesActions.registerTimeSeriesPreset.type]);
|
|
1660
1685
|
var nextServices = normalizedState.services;
|
|
1661
1686
|
if (action.type === timeSeriesActions.loadUserAddedTimeSeriesServices.type) {
|
|
1662
|
-
var
|
|
1687
|
+
var _ref2 = action,
|
|
1688
|
+
payload = _ref2.payload;
|
|
1663
1689
|
var servicesPayload = Array.isArray(payload) ? payload : payload.timeSeriesServices;
|
|
1664
1690
|
var newServices = [];
|
|
1665
1691
|
servicesPayload.forEach(function (service) {
|
|
@@ -1702,7 +1728,8 @@ var timeSeriesReducer = function timeSeriesReducer(state, action) {
|
|
|
1702
1728
|
}
|
|
1703
1729
|
}
|
|
1704
1730
|
if (action.type === timeSeriesActions.upsertService.type) {
|
|
1705
|
-
var
|
|
1731
|
+
var _ref3 = action,
|
|
1732
|
+
_payload = _ref3.payload;
|
|
1706
1733
|
var newService = {
|
|
1707
1734
|
id: _payload.id || generateServiceId(),
|
|
1708
1735
|
description: _payload.description,
|
|
@@ -1761,9 +1788,9 @@ var timeSeriesReducer = function timeSeriesReducer(state, action) {
|
|
|
1761
1788
|
}
|
|
1762
1789
|
var nextById = {};
|
|
1763
1790
|
var didChange = false;
|
|
1764
|
-
Object.entries(byId).forEach(function (
|
|
1765
|
-
var id =
|
|
1766
|
-
panelState =
|
|
1791
|
+
Object.entries(byId).forEach(function (_ref4) {
|
|
1792
|
+
var id = _ref4[0],
|
|
1793
|
+
panelState = _ref4[1];
|
|
1767
1794
|
var nextPanelState = panelState;
|
|
1768
1795
|
nextPanelState = addServiceFilterChipsToPanel(nextPanelState, servicesForSync);
|
|
1769
1796
|
nextPanelState = removeServiceFilterChipsFromPanel(nextPanelState, removedIdsForSync);
|
|
@@ -1776,7 +1803,8 @@ var timeSeriesReducer = function timeSeriesReducer(state, action) {
|
|
|
1776
1803
|
};
|
|
1777
1804
|
if (action.type === timeSeriesActions.registerTimeSeriesPreset.type) {
|
|
1778
1805
|
var _normalizedState$byId, _payload2$services, _Object$assign;
|
|
1779
|
-
var
|
|
1806
|
+
var _ref5 = action,
|
|
1807
|
+
_payload2 = _ref5.payload;
|
|
1780
1808
|
if (!panelId) {
|
|
1781
1809
|
return Object.assign({}, normalizedState, {
|
|
1782
1810
|
services: nextServices,
|
|
@@ -1925,6 +1953,7 @@ var generateServiceId = function generateServiceId() {
|
|
|
1925
1953
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
1926
1954
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
1927
1955
|
* */
|
|
1956
|
+
|
|
1928
1957
|
var getPanelState = function getPanelState(state, panelId) {
|
|
1929
1958
|
var timeSeriesState = state.timeSeries;
|
|
1930
1959
|
if (!timeSeriesState) {
|
|
@@ -1992,6 +2021,7 @@ var getServices = createSelector([function (state, _panelId) {
|
|
|
1992
2021
|
}
|
|
1993
2022
|
return [];
|
|
1994
2023
|
}, selectorMemoizationOptions);
|
|
2024
|
+
|
|
1995
2025
|
/**
|
|
1996
2026
|
* Returns search filter string
|
|
1997
2027
|
*
|
|
@@ -2003,6 +2033,7 @@ var getSearchFilter = createSelector(getTimeSeriesState, function (store) {
|
|
|
2003
2033
|
var _store$timeseriesSele;
|
|
2004
2034
|
return (store == null || (_store$timeseriesSele = store.timeseriesSelect) == null || (_store$timeseriesSele = _store$timeseriesSele.filters) == null ? void 0 : _store$timeseriesSele.searchFilter) || '';
|
|
2005
2035
|
});
|
|
2036
|
+
|
|
2006
2037
|
/**
|
|
2007
2038
|
* Returns all currently used parameters
|
|
2008
2039
|
*
|
|
@@ -2014,6 +2045,7 @@ var getParametersInUse = createSelector(getTimeSeriesState, function (store) {
|
|
|
2014
2045
|
var _store$plotPreset;
|
|
2015
2046
|
return (store == null || (_store$plotPreset = store.plotPreset) == null ? void 0 : _store$plotPreset.parameters) || [];
|
|
2016
2047
|
});
|
|
2048
|
+
|
|
2017
2049
|
/**
|
|
2018
2050
|
* Returns active services array
|
|
2019
2051
|
*
|
|
@@ -2040,6 +2072,7 @@ var getServiceFilterChips = function getServiceFilterChips(store, panelId) {
|
|
|
2040
2072
|
var getServiceFilterChipsById = function getServiceFilterChipsById(store, id, panelId) {
|
|
2041
2073
|
return makeServiceFilterChipsSelectors(panelId).selectById(store, id);
|
|
2042
2074
|
};
|
|
2075
|
+
|
|
2043
2076
|
/**
|
|
2044
2077
|
* Returns whether all service filter chips are enabled
|
|
2045
2078
|
*
|
|
@@ -2062,6 +2095,7 @@ var getCurrentParameterInfoDisplayed = createSelector(getTimeSeriesState, functi
|
|
|
2062
2095
|
var _store$timeseriesSele3;
|
|
2063
2096
|
return typeof (store == null || (_store$timeseriesSele3 = store.timeseriesSelect) == null ? void 0 : _store$timeseriesSele3.currentParameterInfo) === 'string' ? store.timeseriesSelect.currentParameterInfo : '';
|
|
2064
2097
|
});
|
|
2098
|
+
|
|
2065
2099
|
/**
|
|
2066
2100
|
* Returns parameter for the parameterInfo window
|
|
2067
2101
|
*
|
|
@@ -2082,6 +2116,7 @@ var getParameterInfoParameter = createSelector(getTimeSeriesState, function (sto
|
|
|
2082
2116
|
}
|
|
2083
2117
|
return store == null || (_store$timeseriesSele5 = store.timeseriesSelect) == null ? void 0 : _store$timeseriesSele5.currentParameterInfo;
|
|
2084
2118
|
});
|
|
2119
|
+
|
|
2085
2120
|
/**
|
|
2086
2121
|
* Returns parameter by id
|
|
2087
2122
|
*
|
|
@@ -2113,7 +2148,10 @@ var getTimeSeriesPreset = createSelector(getPlotState, getServices, function (pl
|
|
|
2113
2148
|
}
|
|
2114
2149
|
var presetParameters = plotState.parameters.map(function (parameter) {
|
|
2115
2150
|
var presetParam = Object.assign({}, parameter);
|
|
2116
|
-
|
|
2151
|
+
var isRelativeReferenceTime = /^latest(?:-\d+)?$/.test(presetParam.instanceId || '');
|
|
2152
|
+
if (!isRelativeReferenceTime) {
|
|
2153
|
+
delete presetParam.instanceId;
|
|
2154
|
+
}
|
|
2117
2155
|
return presetParam;
|
|
2118
2156
|
});
|
|
2119
2157
|
var usedServicesIds = chain(presetParameters).keyBy(function (param) {
|
|
@@ -2227,17 +2265,36 @@ var selectors = /*#__PURE__*/Object.freeze({
|
|
|
2227
2265
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
2228
2266
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2229
2267
|
* */
|
|
2230
|
-
|
|
2231
|
-
|
|
2268
|
+
|
|
2269
|
+
var TimeSeriesActionOrigin = /*#__PURE__*/function (TimeSeriesActionOrigin) {
|
|
2232
2270
|
TimeSeriesActionOrigin["timeSeriesManager"] = "timeSeriesManager";
|
|
2233
2271
|
TimeSeriesActionOrigin["timeSeriesSelect"] = "timeSeriesSelect";
|
|
2234
|
-
|
|
2272
|
+
return TimeSeriesActionOrigin;
|
|
2273
|
+
}({});
|
|
2235
2274
|
|
|
2236
2275
|
var types = /*#__PURE__*/Object.freeze({
|
|
2237
2276
|
__proto__: null,
|
|
2238
|
-
|
|
2277
|
+
TimeSeriesActionOrigin: TimeSeriesActionOrigin
|
|
2239
2278
|
});
|
|
2240
2279
|
|
|
2280
|
+
/* *
|
|
2281
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2282
|
+
* you may not use this file except in compliance with the License.
|
|
2283
|
+
* You may obtain a copy of the License at
|
|
2284
|
+
*
|
|
2285
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2286
|
+
*
|
|
2287
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2288
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2289
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2290
|
+
* See the License for the specific language governing permissions and
|
|
2291
|
+
* limitations under the License.
|
|
2292
|
+
*
|
|
2293
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2294
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
2295
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2296
|
+
* */
|
|
2297
|
+
|
|
2241
2298
|
var ParameterInfoButtonConnect = function ParameterInfoButtonConnect(_ref) {
|
|
2242
2299
|
var parameter = _ref.parameter,
|
|
2243
2300
|
panelId = _ref.panelId;
|
|
@@ -2281,13 +2338,31 @@ var ParameterInfoButtonConnect = function ParameterInfoButtonConnect(_ref) {
|
|
|
2281
2338
|
toggleInfoDialog();
|
|
2282
2339
|
}
|
|
2283
2340
|
}, [isActive, toggleInfoDialog, isOpenForPanel, setCurrentParameterInfoDisplayed]);
|
|
2284
|
-
return jsx(ParameterInfoButton, {
|
|
2341
|
+
return /*#__PURE__*/jsx(ParameterInfoButton, {
|
|
2285
2342
|
isActive: isActive,
|
|
2286
2343
|
isOpenInStore: isOpenForPanel,
|
|
2287
2344
|
onClick: onClick
|
|
2288
2345
|
});
|
|
2289
2346
|
};
|
|
2290
2347
|
|
|
2348
|
+
/* *
|
|
2349
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2350
|
+
* you may not use this file except in compliance with the License.
|
|
2351
|
+
* You may obtain a copy of the License at
|
|
2352
|
+
*
|
|
2353
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2354
|
+
*
|
|
2355
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2356
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2357
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2358
|
+
* See the License for the specific language governing permissions and
|
|
2359
|
+
* limitations under the License.
|
|
2360
|
+
*
|
|
2361
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2362
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
2363
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2364
|
+
* */
|
|
2365
|
+
|
|
2291
2366
|
function getTextColor(bgColor) {
|
|
2292
2367
|
if (!bgColor) {
|
|
2293
2368
|
return '#fff';
|
|
@@ -2304,7 +2379,7 @@ var ParameterColorSelect = function ParameterColorSelect(_ref) {
|
|
|
2304
2379
|
var theme = useTheme();
|
|
2305
2380
|
var parameterColor = (_ref2 = (_parameter$color = parameter.color) != null ? _parameter$color : COLOR_MAP[parameter.propertyName]) != null ? _ref2 : '#000';
|
|
2306
2381
|
var textColor = getTextColor(COLOR_NAME_TO_HEX_MAP[parameterColor]);
|
|
2307
|
-
return jsxs(TooltipSelect, {
|
|
2382
|
+
return /*#__PURE__*/jsxs(TooltipSelect, {
|
|
2308
2383
|
SelectDisplayProps: {
|
|
2309
2384
|
'aria-label': 'timeseriesManager-color'
|
|
2310
2385
|
},
|
|
@@ -2336,12 +2411,12 @@ var ParameterColorSelect = function ParameterColorSelect(_ref) {
|
|
|
2336
2411
|
},
|
|
2337
2412
|
tooltip: t('timeseries-choose-color'),
|
|
2338
2413
|
value: parameterColor,
|
|
2339
|
-
children: [jsx(MenuItem, {
|
|
2414
|
+
children: [/*#__PURE__*/jsx(MenuItem, {
|
|
2340
2415
|
disabled: true,
|
|
2341
2416
|
children: t('timeseries-color')
|
|
2342
2417
|
}), Object.keys(COLOR_NAME_TO_HEX_MAP).map(function (name) {
|
|
2343
2418
|
var textColor = getTextColor(COLOR_NAME_TO_HEX_MAP[name]);
|
|
2344
|
-
return jsx(MenuItem, {
|
|
2419
|
+
return /*#__PURE__*/jsx(MenuItem, {
|
|
2345
2420
|
sx: {
|
|
2346
2421
|
width: useEntireWidth ? '100%' : '100px',
|
|
2347
2422
|
'&.MuiMenuItem-root ': {
|
|
@@ -2368,7 +2443,7 @@ var ParameterColorSelect = function ParameterColorSelect(_ref) {
|
|
|
2368
2443
|
}
|
|
2369
2444
|
},
|
|
2370
2445
|
value: name,
|
|
2371
|
-
children: jsx("div", {
|
|
2446
|
+
children: /*#__PURE__*/jsx("div", {
|
|
2372
2447
|
style: {
|
|
2373
2448
|
paddingTop: '8px',
|
|
2374
2449
|
color: "" + textColor,
|
|
@@ -2381,6 +2456,24 @@ var ParameterColorSelect = function ParameterColorSelect(_ref) {
|
|
|
2381
2456
|
});
|
|
2382
2457
|
};
|
|
2383
2458
|
|
|
2459
|
+
/* *
|
|
2460
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2461
|
+
* you may not use this file except in compliance with the License.
|
|
2462
|
+
* You may obtain a copy of the License at
|
|
2463
|
+
*
|
|
2464
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2465
|
+
*
|
|
2466
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2467
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2468
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2469
|
+
* See the License for the specific language governing permissions and
|
|
2470
|
+
* limitations under the License.
|
|
2471
|
+
*
|
|
2472
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2473
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
2474
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
2475
|
+
* */
|
|
2476
|
+
|
|
2384
2477
|
var ParameterDimensionIdSelect = function ParameterDimensionIdSelect(_ref) {
|
|
2385
2478
|
var _parameter$dimension, _parameter$dimension2;
|
|
2386
2479
|
var rowIsEnabled = _ref.rowIsEnabled,
|
|
@@ -2394,7 +2487,7 @@ var ParameterDimensionIdSelect = function ParameterDimensionIdSelect(_ref) {
|
|
|
2394
2487
|
return null;
|
|
2395
2488
|
}
|
|
2396
2489
|
var defaultDimension = hasReferenceTime ? REFERENCE_TIME_ID : customDimensions[0].id;
|
|
2397
|
-
return jsxs(TooltipSelect, {
|
|
2490
|
+
return /*#__PURE__*/jsxs(TooltipSelect, {
|
|
2398
2491
|
SelectDisplayProps: {
|
|
2399
2492
|
'aria-label': 'timeseriesManager-dimensionId'
|
|
2400
2493
|
},
|
|
@@ -2411,18 +2504,19 @@ var ParameterDimensionIdSelect = function ParameterDimensionIdSelect(_ref) {
|
|
|
2411
2504
|
};
|
|
2412
2505
|
patchParameter(newParameter);
|
|
2413
2506
|
},
|
|
2414
|
-
tooltip: t('timeseries-dimension-id') + ": " + (((_parameter$dimension = parameter.dimension) == null ? void 0 : _parameter$dimension.id) || defaultDimension)
|
|
2507
|
+
tooltip: t('timeseries-dimension-id') + ": " + (((_parameter$dimension = parameter.dimension) == null ? void 0 : _parameter$dimension.id) || defaultDimension)
|
|
2415
2508
|
// If parameter has no selected dimension id, choose reference time if it is available, otherwise the first dimension
|
|
2509
|
+
,
|
|
2416
2510
|
value: ((_parameter$dimension2 = parameter.dimension) == null ? void 0 : _parameter$dimension2.id) || defaultDimension,
|
|
2417
|
-
children: [jsx(MenuItem, {
|
|
2511
|
+
children: [/*#__PURE__*/jsx(MenuItem, {
|
|
2418
2512
|
disabled: true,
|
|
2419
2513
|
children: t('timeseries-dimension-id')
|
|
2420
|
-
}), !!hasReferenceTime && jsx(MenuItem, {
|
|
2514
|
+
}), !!hasReferenceTime && /*#__PURE__*/jsx(MenuItem, {
|
|
2421
2515
|
"data-testid": "timeseries-dimension-id-reference-time",
|
|
2422
2516
|
value: REFERENCE_TIME_ID,
|
|
2423
2517
|
children: t('timeseries-reference-time')
|
|
2424
2518
|
}, "dimensionmenu-id-reference-time"), customDimensions == null ? void 0 : customDimensions.map(function (dimension) {
|
|
2425
|
-
return jsx(MenuItem, {
|
|
2519
|
+
return /*#__PURE__*/jsx(MenuItem, {
|
|
2426
2520
|
"data-testid": "timeseries-dimension-id-" + dimension.id,
|
|
2427
2521
|
value: dimension.id,
|
|
2428
2522
|
children: dimension.id
|
|
@@ -2431,6 +2525,24 @@ var ParameterDimensionIdSelect = function ParameterDimensionIdSelect(_ref) {
|
|
|
2431
2525
|
});
|
|
2432
2526
|
};
|
|
2433
2527
|
|
|
2528
|
+
/* *
|
|
2529
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2530
|
+
* you may not use this file except in compliance with the License.
|
|
2531
|
+
* You may obtain a copy of the License at
|
|
2532
|
+
*
|
|
2533
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2534
|
+
*
|
|
2535
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2536
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2537
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2538
|
+
* See the License for the specific language governing permissions and
|
|
2539
|
+
* limitations under the License.
|
|
2540
|
+
*
|
|
2541
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2542
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
2543
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
2544
|
+
* */
|
|
2545
|
+
|
|
2434
2546
|
var defaultValue = 'none';
|
|
2435
2547
|
var ParameterDimensionValueSelect = function ParameterDimensionValueSelect(_ref) {
|
|
2436
2548
|
var _parameter$dimension3, _parameter$dimension4, _parameter$dimension5, _parameter$dimension6, _parameter$dimension7, _parameter$dimension8, _parameter$dimension9, _selectedDimension$va;
|
|
@@ -2446,7 +2558,7 @@ var ParameterDimensionValueSelect = function ParameterDimensionValueSelect(_ref)
|
|
|
2446
2558
|
if (!selectedDimension || !customDimensions || customDimensions.length === 0) {
|
|
2447
2559
|
return null;
|
|
2448
2560
|
}
|
|
2449
|
-
return jsxs(TooltipSelect, {
|
|
2561
|
+
return /*#__PURE__*/jsxs(TooltipSelect, {
|
|
2450
2562
|
SelectDisplayProps: {
|
|
2451
2563
|
'aria-label': 'timeseriesManager-dimensionValue'
|
|
2452
2564
|
},
|
|
@@ -2465,15 +2577,15 @@ var ParameterDimensionValueSelect = function ParameterDimensionValueSelect(_ref)
|
|
|
2465
2577
|
},
|
|
2466
2578
|
tooltip: t('timeseries-dimension-value') + ": " + (((_parameter$dimension3 = parameter.dimension) == null ? void 0 : _parameter$dimension3.value) !== undefined ? (_parameter$dimension4 = parameter.dimension) == null ? void 0 : _parameter$dimension4.value : ''),
|
|
2467
2579
|
value: ((_parameter$dimension5 = parameter.dimension) == null ? void 0 : _parameter$dimension5.value) === undefined || ((_parameter$dimension6 = parameter.dimension) == null ? void 0 : _parameter$dimension6.value) === '' ? defaultValue : (_parameter$dimension7 = parameter.dimension) == null ? void 0 : _parameter$dimension7.value,
|
|
2468
|
-
children: [jsx(MenuItem, {
|
|
2580
|
+
children: [/*#__PURE__*/jsx(MenuItem, {
|
|
2469
2581
|
disabled: true,
|
|
2470
2582
|
children: t('timeseries-dimension-value')
|
|
2471
|
-
}), (((_parameter$dimension8 = parameter.dimension) == null ? void 0 : _parameter$dimension8.value) === undefined || ((_parameter$dimension9 = parameter.dimension) == null ? void 0 : _parameter$dimension9.value) === '') && jsx(MenuItem, {
|
|
2583
|
+
}), (((_parameter$dimension8 = parameter.dimension) == null ? void 0 : _parameter$dimension8.value) === undefined || ((_parameter$dimension9 = parameter.dimension) == null ? void 0 : _parameter$dimension9.value) === '') && /*#__PURE__*/jsx(MenuItem, {
|
|
2472
2584
|
"data-testid": "timeseries-dimension-value-none",
|
|
2473
2585
|
value: "none",
|
|
2474
2586
|
children: t('timeseries-dimension-none')
|
|
2475
2587
|
}, "dimensionvaluemenu-none"), selectedDimension == null || (_selectedDimension$va = selectedDimension.values) == null ? void 0 : _selectedDimension$va.map(function (value) {
|
|
2476
|
-
return jsx(MenuItem, {
|
|
2588
|
+
return /*#__PURE__*/jsx(MenuItem, {
|
|
2477
2589
|
"data-testid": "timeseries-dimension-value-" + value,
|
|
2478
2590
|
value: value,
|
|
2479
2591
|
children: value
|
|
@@ -2482,6 +2594,24 @@ var ParameterDimensionValueSelect = function ParameterDimensionValueSelect(_ref)
|
|
|
2482
2594
|
});
|
|
2483
2595
|
};
|
|
2484
2596
|
|
|
2597
|
+
/* *
|
|
2598
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2599
|
+
* you may not use this file except in compliance with the License.
|
|
2600
|
+
* You may obtain a copy of the License at
|
|
2601
|
+
*
|
|
2602
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2603
|
+
*
|
|
2604
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2605
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2606
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2607
|
+
* See the License for the specific language governing permissions and
|
|
2608
|
+
* limitations under the License.
|
|
2609
|
+
*
|
|
2610
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2611
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
2612
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2613
|
+
* */
|
|
2614
|
+
|
|
2485
2615
|
var ReferenceTimeSelect = function ReferenceTimeSelect(_ref) {
|
|
2486
2616
|
var rowIsEnabled = _ref.rowIsEnabled,
|
|
2487
2617
|
parameter = _ref.parameter,
|
|
@@ -2491,10 +2621,34 @@ var ReferenceTimeSelect = function ReferenceTimeSelect(_ref) {
|
|
|
2491
2621
|
var _React$useState = React.useState(undefined),
|
|
2492
2622
|
referenceTime = _React$useState[0],
|
|
2493
2623
|
setReferenceTime = _React$useState[1];
|
|
2624
|
+
var validRefTimes = React.useMemo(function () {
|
|
2625
|
+
return refTimeList.filter(function (option) {
|
|
2626
|
+
var date = dateUtils.parseCustomDateString(option.id);
|
|
2627
|
+
return dateUtils.isValid(date);
|
|
2628
|
+
}).sort(function (instance1, instance2) {
|
|
2629
|
+
var time1 = dateUtils.parseCustomDateString(instance1.id);
|
|
2630
|
+
var time2 = dateUtils.parseCustomDateString(instance2.id);
|
|
2631
|
+
return time2.getTime() - time1.getTime();
|
|
2632
|
+
}).slice(0, 5);
|
|
2633
|
+
}, [refTimeList]);
|
|
2494
2634
|
React.useEffect(function () {
|
|
2495
2635
|
var initializeReferenceTime = function initializeReferenceTime() {
|
|
2636
|
+
// Don't override if a "latest-" value is already selected
|
|
2637
|
+
if (referenceTime != null && referenceTime.startsWith('latest-')) {
|
|
2638
|
+
return;
|
|
2639
|
+
}
|
|
2496
2640
|
var referenceTimes = refTimeList.length > 0;
|
|
2497
2641
|
if (referenceTimes) {
|
|
2642
|
+
var _parameter$instanceId;
|
|
2643
|
+
var relativeReferenceTime = (_parameter$instanceId = parameter.instanceId) == null ? void 0 : _parameter$instanceId.match(/^latest(?:-(\d+))?$/);
|
|
2644
|
+
if (relativeReferenceTime) {
|
|
2645
|
+
var _relativeReferenceTim;
|
|
2646
|
+
var index = Number((_relativeReferenceTim = relativeReferenceTime[1]) != null ? _relativeReferenceTim : 0);
|
|
2647
|
+
if (Number.isInteger(index) && index >= 0 && index < validRefTimes.length) {
|
|
2648
|
+
setReferenceTime(parameter.instanceId === 'latest' ? 'latest-0' : parameter.instanceId);
|
|
2649
|
+
return;
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2498
2652
|
var alreadyHasReferenceTime = parameter.instanceId && refTimeList.some(function (item) {
|
|
2499
2653
|
return item.id === parameter.instanceId;
|
|
2500
2654
|
});
|
|
@@ -2514,49 +2668,70 @@ var ReferenceTimeSelect = function ReferenceTimeSelect(_ref) {
|
|
|
2514
2668
|
}
|
|
2515
2669
|
};
|
|
2516
2670
|
initializeReferenceTime();
|
|
2671
|
+
|
|
2517
2672
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2518
|
-
}, [refTimeList, parameter.instanceId]);
|
|
2673
|
+
}, [refTimeList, parameter.instanceId, validRefTimes.length]);
|
|
2519
2674
|
var isFetching = refTimeList.length === 0;
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2675
|
+
var handleReferenceTimeChange = function handleReferenceTimeChange(event) {
|
|
2676
|
+
var target = event.target;
|
|
2677
|
+
if (target.value.startsWith('latest-')) {
|
|
2678
|
+
var relativeReferenceTimeRegexp = /^latest-(\d+)$/;
|
|
2679
|
+
var relativeSelection = relativeReferenceTimeRegexp.exec(target.value);
|
|
2680
|
+
if (relativeSelection) {
|
|
2681
|
+
var newParameter = {
|
|
2682
|
+
id: parameter.id,
|
|
2683
|
+
instanceId: target.value
|
|
2684
|
+
};
|
|
2685
|
+
patchParameter(newParameter);
|
|
2686
|
+
setReferenceTime(target.value);
|
|
2687
|
+
}
|
|
2688
|
+
} else {
|
|
2533
2689
|
var selectedRefTime = refTimeList.find(function (ref) {
|
|
2534
2690
|
return ref.id === target.value;
|
|
2535
2691
|
});
|
|
2536
2692
|
if (selectedRefTime) {
|
|
2537
|
-
var
|
|
2693
|
+
var _newParameter = {
|
|
2538
2694
|
id: parameter.id,
|
|
2539
2695
|
instanceId: target.value
|
|
2540
2696
|
};
|
|
2541
|
-
patchParameter(
|
|
2697
|
+
patchParameter(_newParameter);
|
|
2542
2698
|
setReferenceTime(target.value);
|
|
2543
2699
|
} else {
|
|
2544
2700
|
console.warn("Unable to find reference time " + event.target.value);
|
|
2545
2701
|
}
|
|
2702
|
+
}
|
|
2703
|
+
};
|
|
2704
|
+
if (!referenceTime) {
|
|
2705
|
+
return null;
|
|
2706
|
+
}
|
|
2707
|
+
return refTimeList && refTimeList.length > 0 && !refTimeList.some(function (value) {
|
|
2708
|
+
return value.id === 'unvalidated';
|
|
2709
|
+
}) ? /*#__PURE__*/jsxs(TooltipSelect, {
|
|
2710
|
+
SelectDisplayProps: {
|
|
2711
|
+
'aria-label': 'timeseriesManager-refTime'
|
|
2546
2712
|
},
|
|
2713
|
+
"data-testid": "parameterReferenceTimeSelect",
|
|
2714
|
+
isEnabled: rowIsEnabled,
|
|
2715
|
+
onChange: handleReferenceTimeChange,
|
|
2547
2716
|
tooltip: t('timeseries-choose-ref-time'),
|
|
2548
2717
|
value: referenceTime,
|
|
2549
|
-
children: [!!isFetching && jsx(LinearProgress, {
|
|
2718
|
+
children: [!!isFetching && /*#__PURE__*/jsx(LinearProgress, {
|
|
2550
2719
|
color: "inherit",
|
|
2551
2720
|
"data-testid": "spinner"
|
|
2552
|
-
}), jsx(MenuItem, {
|
|
2721
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
2553
2722
|
disabled: true,
|
|
2554
2723
|
children: t('timeseries-reference-time')
|
|
2555
|
-
}), !!isFetching && jsx(MenuItem, {
|
|
2724
|
+
}), !!isFetching && /*#__PURE__*/jsx(MenuItem, {
|
|
2556
2725
|
value: referenceTime,
|
|
2557
2726
|
children: dateUtils.isValid(dateUtils.parseCustomDateString(referenceTime)) ? dateUtils.dateToString(dateUtils.parseCustomDateString(referenceTime), "yyyy-MM-dd'T'HH:mm:ss 'Z'") : referenceTime
|
|
2727
|
+
}), validRefTimes.map(function (value, index) {
|
|
2728
|
+
return /*#__PURE__*/jsx(MenuItem, {
|
|
2729
|
+
"data-testid": "timeseries-ref-time-latest-" + index,
|
|
2730
|
+
value: "latest-" + index,
|
|
2731
|
+
children: index > 0 ? "Latest -" + index : 'Latest'
|
|
2732
|
+
}, "latest-" + value.id);
|
|
2558
2733
|
}), refTimeList.map(function (value) {
|
|
2559
|
-
return jsx(MenuItem, {
|
|
2734
|
+
return /*#__PURE__*/jsx(MenuItem, {
|
|
2560
2735
|
"data-testid": "timeseries-ref-time-" + value.id,
|
|
2561
2736
|
value: value.id,
|
|
2562
2737
|
children: dateUtils.isValid(dateUtils.parseCustomDateString(value.id)) ? dateUtils.dateToString(dateUtils.parseCustomDateString(value.id), "yyyy-MM-dd'T'HH:mm:ss 'Z'") : value.id
|
|
@@ -2582,10 +2757,21 @@ var ReferenceTimeSelect = function ReferenceTimeSelect(_ref) {
|
|
|
2582
2757
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
2583
2758
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2584
2759
|
* */
|
|
2760
|
+
|
|
2761
|
+
// properties provided by https://for.weather.fmibeta.com/sofp
|
|
2762
|
+
|
|
2763
|
+
// A copy of this type exists in libs/shared/src/lib/types/types.ts
|
|
2764
|
+
|
|
2765
|
+
// A copy of this type exists in libs/shared/src/lib/types/types.ts
|
|
2766
|
+
|
|
2767
|
+
// A copy of this type exists in libs/shared/src/lib/types/types.ts as PlotParameter
|
|
2768
|
+
|
|
2585
2769
|
var isTimeSeriesLocation = function isTimeSeriesLocation(obj) {
|
|
2586
2770
|
return 'id' in obj;
|
|
2587
2771
|
};
|
|
2588
2772
|
|
|
2773
|
+
// A copy of this type exists in libs/shared/src/lib/types/types.ts
|
|
2774
|
+
|
|
2589
2775
|
/* *
|
|
2590
2776
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2591
2777
|
* you may not use this file except in compliance with the License.
|
|
@@ -2603,6 +2789,12 @@ var isTimeSeriesLocation = function isTimeSeriesLocation(obj) {
|
|
|
2603
2789
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
2604
2790
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2605
2791
|
* */
|
|
2792
|
+
|
|
2793
|
+
|
|
2794
|
+
/** Maps plot ID to array of error message strings */
|
|
2795
|
+
|
|
2796
|
+
/** Maps plot ID to array of failed parameter information */
|
|
2797
|
+
|
|
2606
2798
|
var createGeoJsonArrays = function createGeoJsonArrays(locations, services, hideFeatures, memoizedSelectedFeature) {
|
|
2607
2799
|
var initialAccumulator = {
|
|
2608
2800
|
obj: {},
|
|
@@ -2618,6 +2810,7 @@ var createGeoJsonArrays = function createGeoJsonArrays(locations, services, hide
|
|
|
2618
2810
|
if (!feature.geometry) {
|
|
2619
2811
|
return;
|
|
2620
2812
|
}
|
|
2813
|
+
|
|
2621
2814
|
// Geometrycollection does not have coordinates
|
|
2622
2815
|
// Single location should not be a geometry collection, exclude it here because otherwise type checking will fail
|
|
2623
2816
|
var key = JSON.stringify(feature.geometry.coordinates);
|
|
@@ -3006,6 +3199,21 @@ var fetchEdrParameter = /*#__PURE__*/function () {
|
|
|
3006
3199
|
};
|
|
3007
3200
|
}();
|
|
3008
3201
|
|
|
3202
|
+
var getInstanceByRelativeReferenceTime = function getInstanceByRelativeReferenceTime(instances, relativeReferenceTime) {
|
|
3203
|
+
var relativeMatch = relativeReferenceTime == null ? void 0 : relativeReferenceTime.match(/^latest-(\d+)$/);
|
|
3204
|
+
if (!relativeMatch) {
|
|
3205
|
+
return null;
|
|
3206
|
+
}
|
|
3207
|
+
var index = Number(relativeMatch[1]);
|
|
3208
|
+
if (!Number.isInteger(index) || index < 0) {
|
|
3209
|
+
return null;
|
|
3210
|
+
}
|
|
3211
|
+
var sortedInstances = instances.toSorted(function (instanceA, instanceB) {
|
|
3212
|
+
return instanceB.id.localeCompare(instanceA.id);
|
|
3213
|
+
});
|
|
3214
|
+
return sortedInstances[index] || null;
|
|
3215
|
+
};
|
|
3216
|
+
|
|
3009
3217
|
// Ensures every timeseries query starts with the same query key
|
|
3010
3218
|
var generateTimeSeriesQueryKeys = function generateTimeSeriesQueryKeys(queryKeys) {
|
|
3011
3219
|
return ['time-series'].concat(queryKeys);
|
|
@@ -3269,6 +3477,7 @@ var useGetPlotsWithData = function useGetPlotsWithData(plotsWithoutData, selecte
|
|
|
3269
3477
|
var collectionsList = useMemo(function () {
|
|
3270
3478
|
return extractUsedCollections(plotsWithoutData, services);
|
|
3271
3479
|
}, [plotsWithoutData, services]);
|
|
3480
|
+
|
|
3272
3481
|
// First fetch collection and any relevant instance data
|
|
3273
3482
|
var _useGetCollectionsAnd = useGetCollectionsAndInstanceDetails(collectionsList),
|
|
3274
3483
|
collectionDetails = _useGetCollectionsAnd.data,
|
|
@@ -3278,6 +3487,7 @@ var useGetPlotsWithData = function useGetPlotsWithData(plotsWithoutData, selecte
|
|
|
3278
3487
|
return [gjs.serviceName + "_" + gjs.collectionName, gjs];
|
|
3279
3488
|
}));
|
|
3280
3489
|
}, [splitGeoJsonByCollection]);
|
|
3490
|
+
|
|
3281
3491
|
// Construct all queries to be executed
|
|
3282
3492
|
var queries = useMemo(function () {
|
|
3283
3493
|
return plotsWithoutData.parameters.map(function (parameter) {
|
|
@@ -3287,11 +3497,12 @@ var useGetPlotsWithData = function useGetPlotsWithData(plotsWithoutData, selecte
|
|
|
3287
3497
|
var collection = collectionDetails == null ? void 0 : collectionDetails.find(function (collection) {
|
|
3288
3498
|
return collection.serviceId === parameter.serviceId && collection.collectionId === parameter.collectionId;
|
|
3289
3499
|
});
|
|
3290
|
-
var instanceInfo = parameter.instanceId && (collection == null || (_collection$allInstan = collection.allInstances) == null ? void 0 : _collection$allInstan.find(function (inst) {
|
|
3500
|
+
var instanceInfo = getInstanceByRelativeReferenceTime((collection == null ? void 0 : collection.allInstances) || [], parameter.instanceId) || parameter.instanceId && (collection == null || (_collection$allInstan = collection.allInstances) == null ? void 0 : _collection$allInstan.find(function (inst) {
|
|
3291
3501
|
return inst.id === parameter.instanceId;
|
|
3292
3502
|
})) || latestInstance((collection == null ? void 0 : collection.allInstances) || []) || {
|
|
3293
3503
|
id: ''
|
|
3294
3504
|
};
|
|
3505
|
+
|
|
3295
3506
|
// Construct timeinterval that needs to be fetched
|
|
3296
3507
|
// Create here so if new data is advertised by the collection/instance a new request is made
|
|
3297
3508
|
var intervalParam = constructTimeInterval(collection, instanceInfo, syncgroupTimeState);
|
|
@@ -3370,10 +3581,12 @@ var useGetPlotsWithData = function useGetPlotsWithData(plotsWithoutData, selecte
|
|
|
3370
3581
|
};
|
|
3371
3582
|
}
|
|
3372
3583
|
});
|
|
3584
|
+
|
|
3373
3585
|
// Combine fetched data with parameters and plots, including errors per plot
|
|
3374
3586
|
var plotsWithData = useMemo(function () {
|
|
3375
3587
|
var _results$data;
|
|
3376
3588
|
var data = (_results$data = results.data) != null && _results$data.length ? results.data : [];
|
|
3589
|
+
|
|
3377
3590
|
// Create maps of parameter errors and failed parameter names by plotId
|
|
3378
3591
|
var plotErrors = {};
|
|
3379
3592
|
var failedParametersByPlotId = {};
|
|
@@ -3482,6 +3695,24 @@ var useGetLocations = function useGetLocations(options) {
|
|
|
3482
3695
|
return results;
|
|
3483
3696
|
};
|
|
3484
3697
|
|
|
3698
|
+
/* *
|
|
3699
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3700
|
+
* you may not use this file except in compliance with the License.
|
|
3701
|
+
* You may obtain a copy of the License at
|
|
3702
|
+
*
|
|
3703
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3704
|
+
*
|
|
3705
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3706
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3707
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3708
|
+
* See the License for the specific language governing permissions and
|
|
3709
|
+
* limitations under the License.
|
|
3710
|
+
*
|
|
3711
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3712
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
3713
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
3714
|
+
* */
|
|
3715
|
+
|
|
3485
3716
|
var ParameterDimensionSelect = function ParameterDimensionSelect(_ref) {
|
|
3486
3717
|
var _collectionDetails$da, _parameter$dimension, _parameter$dimension2, _parameter$dimension3;
|
|
3487
3718
|
var rowIsEnabled = _ref.rowIsEnabled,
|
|
@@ -3515,15 +3746,16 @@ var ParameterDimensionSelect = function ParameterDimensionSelect(_ref) {
|
|
|
3515
3746
|
var hasReferenceTime = refTimeList.length > 0 && !refTimeList.some(function (value) {
|
|
3516
3747
|
return value.id === 'unvalidated';
|
|
3517
3748
|
});
|
|
3749
|
+
|
|
3518
3750
|
// Show nothing if no reference time and neither any custom dimensions
|
|
3519
3751
|
if ((!customDimensions || customDimensions.length === 0) && !hasReferenceTime) {
|
|
3520
3752
|
return null;
|
|
3521
3753
|
}
|
|
3522
|
-
return jsxs(Grid, {
|
|
3754
|
+
return /*#__PURE__*/jsxs(Grid, {
|
|
3523
3755
|
container: true,
|
|
3524
|
-
children: [jsx(Grid, {
|
|
3756
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
3525
3757
|
size: "grow",
|
|
3526
|
-
children: jsx(ParameterDimensionIdSelect, {
|
|
3758
|
+
children: /*#__PURE__*/jsx(ParameterDimensionIdSelect, {
|
|
3527
3759
|
customDimensions: customDimensions,
|
|
3528
3760
|
hasReferenceTime: hasReferenceTime,
|
|
3529
3761
|
parameter: parameter,
|
|
@@ -3531,17 +3763,17 @@ var ParameterDimensionSelect = function ParameterDimensionSelect(_ref) {
|
|
|
3531
3763
|
rowIsEnabled: rowIsEnabled,
|
|
3532
3764
|
t: t
|
|
3533
3765
|
})
|
|
3534
|
-
}), jsx(Grid, {
|
|
3766
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
3535
3767
|
size: "grow",
|
|
3536
3768
|
children:
|
|
3537
3769
|
// Show referene time select if no dimension selected yet and reference time is available OR if reference time has been selected
|
|
3538
|
-
!((_parameter$dimension = parameter.dimension) != null && _parameter$dimension.id) && hasReferenceTime || (_parameter$dimension2 = parameter.dimension) != null && _parameter$dimension2.id && ((_parameter$dimension3 = parameter.dimension) == null ? void 0 : _parameter$dimension3.id) === REFERENCE_TIME_ID ? jsx(ReferenceTimeSelect, {
|
|
3770
|
+
!((_parameter$dimension = parameter.dimension) != null && _parameter$dimension.id) && hasReferenceTime || (_parameter$dimension2 = parameter.dimension) != null && _parameter$dimension2.id && ((_parameter$dimension3 = parameter.dimension) == null ? void 0 : _parameter$dimension3.id) === REFERENCE_TIME_ID ? /*#__PURE__*/jsx(ReferenceTimeSelect, {
|
|
3539
3771
|
parameter: parameter,
|
|
3540
3772
|
patchParameter: patchParameter,
|
|
3541
3773
|
refTimeList: refTimeList,
|
|
3542
3774
|
rowIsEnabled: rowIsEnabled,
|
|
3543
3775
|
t: t
|
|
3544
|
-
}) : jsx(ParameterDimensionValueSelect, {
|
|
3776
|
+
}) : /*#__PURE__*/jsx(ParameterDimensionValueSelect, {
|
|
3545
3777
|
customDimensions: customDimensions,
|
|
3546
3778
|
parameter: parameter,
|
|
3547
3779
|
patchParameter: patchParameter,
|
|
@@ -3552,13 +3784,31 @@ var ParameterDimensionSelect = function ParameterDimensionSelect(_ref) {
|
|
|
3552
3784
|
});
|
|
3553
3785
|
};
|
|
3554
3786
|
|
|
3787
|
+
/* *
|
|
3788
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3789
|
+
* you may not use this file except in compliance with the License.
|
|
3790
|
+
* You may obtain a copy of the License at
|
|
3791
|
+
*
|
|
3792
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3793
|
+
*
|
|
3794
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3795
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3796
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3797
|
+
* See the License for the specific language governing permissions and
|
|
3798
|
+
* limitations under the License.
|
|
3799
|
+
*
|
|
3800
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3801
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
3802
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3803
|
+
* */
|
|
3804
|
+
|
|
3555
3805
|
var ParameterOpacitySelect = function ParameterOpacitySelect(_ref) {
|
|
3556
3806
|
var rowIsEnabled = _ref.rowIsEnabled,
|
|
3557
3807
|
parameter = _ref.parameter,
|
|
3558
3808
|
patchParameter = _ref.patchParameter,
|
|
3559
3809
|
t = _ref.t;
|
|
3560
3810
|
var opacityValues = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
|
|
3561
|
-
return jsxs(TooltipSelect, {
|
|
3811
|
+
return /*#__PURE__*/jsxs(TooltipSelect, {
|
|
3562
3812
|
SelectDisplayProps: {
|
|
3563
3813
|
'aria-label': 'timeseriesManager-opacity'
|
|
3564
3814
|
},
|
|
@@ -3572,11 +3822,11 @@ var ParameterOpacitySelect = function ParameterOpacitySelect(_ref) {
|
|
|
3572
3822
|
},
|
|
3573
3823
|
tooltip: t('timeseries-choose-opacity'),
|
|
3574
3824
|
value: parameter.opacity,
|
|
3575
|
-
children: [jsx(MenuItem, {
|
|
3825
|
+
children: [/*#__PURE__*/jsx(MenuItem, {
|
|
3576
3826
|
disabled: true,
|
|
3577
3827
|
children: t('timeseries-opacity')
|
|
3578
3828
|
}), opacityValues.map(function (value) {
|
|
3579
|
-
return jsxs(MenuItem, {
|
|
3829
|
+
return /*#__PURE__*/jsxs(MenuItem, {
|
|
3580
3830
|
value: value,
|
|
3581
3831
|
children: [value, "%"]
|
|
3582
3832
|
}, value);
|
|
@@ -3584,12 +3834,30 @@ var ParameterOpacitySelect = function ParameterOpacitySelect(_ref) {
|
|
|
3584
3834
|
});
|
|
3585
3835
|
};
|
|
3586
3836
|
|
|
3837
|
+
/* *
|
|
3838
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3839
|
+
* you may not use this file except in compliance with the License.
|
|
3840
|
+
* You may obtain a copy of the License at
|
|
3841
|
+
*
|
|
3842
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3843
|
+
*
|
|
3844
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3845
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3846
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3847
|
+
* See the License for the specific language governing permissions and
|
|
3848
|
+
* limitations under the License.
|
|
3849
|
+
*
|
|
3850
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3851
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
3852
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3853
|
+
* */
|
|
3854
|
+
|
|
3587
3855
|
var ParameterTypeSelect = function ParameterTypeSelect(_ref) {
|
|
3588
3856
|
var rowIsEnabled = _ref.rowIsEnabled,
|
|
3589
3857
|
parameter = _ref.parameter,
|
|
3590
3858
|
patchParameter = _ref.patchParameter,
|
|
3591
3859
|
t = _ref.t;
|
|
3592
|
-
return jsxs(TooltipSelect, {
|
|
3860
|
+
return /*#__PURE__*/jsxs(TooltipSelect, {
|
|
3593
3861
|
SelectDisplayProps: {
|
|
3594
3862
|
'aria-label': 'timeseriesManager-type'
|
|
3595
3863
|
},
|
|
@@ -3606,25 +3874,43 @@ var ParameterTypeSelect = function ParameterTypeSelect(_ref) {
|
|
|
3606
3874
|
},
|
|
3607
3875
|
tooltip: t('timeseries-choose-type'),
|
|
3608
3876
|
value: parameter.plotType,
|
|
3609
|
-
children: [jsx(MenuItem, {
|
|
3877
|
+
children: [/*#__PURE__*/jsx(MenuItem, {
|
|
3610
3878
|
disabled: true,
|
|
3611
3879
|
children: t('timeseries-type')
|
|
3612
|
-
}), jsx(MenuItem, {
|
|
3880
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
3613
3881
|
value: "line",
|
|
3614
3882
|
children: t('timeseries-line')
|
|
3615
|
-
}), jsx(MenuItem, {
|
|
3883
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
3616
3884
|
value: "bar",
|
|
3617
3885
|
children: t('timeseries-bar')
|
|
3618
|
-
}), jsx(MenuItem, {
|
|
3886
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
3619
3887
|
value: "area",
|
|
3620
3888
|
children: t('timeseries-area')
|
|
3621
|
-
}), jsx(MenuItem, {
|
|
3889
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
3622
3890
|
value: "scatter",
|
|
3623
3891
|
children: t('timeseries-scatter')
|
|
3624
3892
|
})]
|
|
3625
3893
|
});
|
|
3626
3894
|
};
|
|
3627
3895
|
|
|
3896
|
+
/* *
|
|
3897
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3898
|
+
* you may not use this file except in compliance with the License.
|
|
3899
|
+
* You may obtain a copy of the License at
|
|
3900
|
+
*
|
|
3901
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3902
|
+
*
|
|
3903
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3904
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3905
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3906
|
+
* See the License for the specific language governing permissions and
|
|
3907
|
+
* limitations under the License.
|
|
3908
|
+
*
|
|
3909
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3910
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
3911
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3912
|
+
* */
|
|
3913
|
+
|
|
3628
3914
|
var ParameterNameSelect = function ParameterNameSelect(_ref) {
|
|
3629
3915
|
var rowIsEnabled = _ref.rowIsEnabled,
|
|
3630
3916
|
parameter = _ref.parameter,
|
|
@@ -3639,7 +3925,7 @@ var ParameterNameSelect = function ParameterNameSelect(_ref) {
|
|
|
3639
3925
|
collectionDetails = _useGetDetailsForColl.data;
|
|
3640
3926
|
var parameterList = (collectionDetails == null ? void 0 : collectionDetails.parameters) || [];
|
|
3641
3927
|
var isFetching = parameterList.length === 0;
|
|
3642
|
-
return jsxs(TooltipSelect, {
|
|
3928
|
+
return /*#__PURE__*/jsxs(TooltipSelect, {
|
|
3643
3929
|
SelectDisplayProps: {
|
|
3644
3930
|
'aria-label': 'timeseriesManager-parameterName'
|
|
3645
3931
|
},
|
|
@@ -3660,17 +3946,17 @@ var ParameterNameSelect = function ParameterNameSelect(_ref) {
|
|
|
3660
3946
|
},
|
|
3661
3947
|
tooltip: "Parameter: " + parameter.propertyName + " " + (parameter.propertyLabel ? '-' : '') + " " + (parameter.propertyLabel ? parameter.propertyLabel : ''),
|
|
3662
3948
|
value: parameter.propertyName,
|
|
3663
|
-
children: [!!isFetching && jsx(LinearProgress, {
|
|
3949
|
+
children: [!!isFetching && /*#__PURE__*/jsx(LinearProgress, {
|
|
3664
3950
|
color: "inherit",
|
|
3665
3951
|
"data-testid": "spinner"
|
|
3666
|
-
}), jsx(MenuItem, {
|
|
3952
|
+
}), /*#__PURE__*/jsx(MenuItem, {
|
|
3667
3953
|
disabled: true,
|
|
3668
3954
|
children: t('timeseries-parameter')
|
|
3669
|
-
}), parameterList.length === 0 && jsx(MenuItem, {
|
|
3955
|
+
}), parameterList.length === 0 && /*#__PURE__*/jsx(MenuItem, {
|
|
3670
3956
|
value: parameter.propertyName,
|
|
3671
3957
|
children: parameter.propertyName
|
|
3672
3958
|
}), parameterList.map(function (parameter) {
|
|
3673
|
-
return jsx(MenuItem, {
|
|
3959
|
+
return /*#__PURE__*/jsx(MenuItem, {
|
|
3674
3960
|
value: parameter.propertyName,
|
|
3675
3961
|
children: parameter.propertyLabel || parameter.propertyName
|
|
3676
3962
|
}, "parametermenu" + parameter.propertyName);
|
|
@@ -3678,18 +3964,36 @@ var ParameterNameSelect = function ParameterNameSelect(_ref) {
|
|
|
3678
3964
|
});
|
|
3679
3965
|
};
|
|
3680
3966
|
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3967
|
+
/* *
|
|
3968
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3969
|
+
* you may not use this file except in compliance with the License.
|
|
3970
|
+
* You may obtain a copy of the License at
|
|
3971
|
+
*
|
|
3972
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3973
|
+
*
|
|
3974
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3975
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3976
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3977
|
+
* See the License for the specific language governing permissions and
|
|
3978
|
+
* limitations under the License.
|
|
3979
|
+
*
|
|
3980
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
3981
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
3982
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
3983
|
+
* */
|
|
3984
|
+
|
|
3985
|
+
var TimeSeriesManagerRowAccordion = function TimeSeriesManagerRowAccordion(_ref) {
|
|
3986
|
+
var panelId = _ref.panelId,
|
|
3987
|
+
plotIsEnabled = _ref.plotIsEnabled,
|
|
3988
|
+
rowIsEnabled = _ref.rowIsEnabled,
|
|
3989
|
+
parameter = _ref.parameter,
|
|
3686
3990
|
styles = _ref.styles,
|
|
3687
3991
|
addParameter = _ref.addParameter,
|
|
3688
3992
|
patchParameter = _ref.patchParameter,
|
|
3689
3993
|
deleteParameter = _ref.deleteParameter,
|
|
3690
3994
|
toggleParameter = _ref.toggleParameter,
|
|
3691
3995
|
t = _ref.t;
|
|
3692
|
-
return jsx(CustomAccordion, {
|
|
3996
|
+
return /*#__PURE__*/jsx(CustomAccordion, {
|
|
3693
3997
|
CustomExpandIcon: ArrowDropDownDown,
|
|
3694
3998
|
"data-testid": "timeSeriesManagerRowAccordion",
|
|
3695
3999
|
defaultExpanded: false,
|
|
@@ -3702,7 +4006,7 @@ var TimeSeriesManagerRowAccordion = function TimeSeriesManagerRowAccordion(_ref)
|
|
|
3702
4006
|
},
|
|
3703
4007
|
backgroundColor: plotIsEnabled ? 'geowebColors.layerManager.tableRowDefaultCardContainer.fill' : 'geowebColors.layerManager.tableRowDisabledCardContainer.fill'
|
|
3704
4008
|
},
|
|
3705
|
-
title: jsxs(Grid, {
|
|
4009
|
+
title: /*#__PURE__*/jsxs(Grid, {
|
|
3706
4010
|
alignItems: "center",
|
|
3707
4011
|
container: true,
|
|
3708
4012
|
size: "grow",
|
|
@@ -3710,8 +4014,8 @@ var TimeSeriesManagerRowAccordion = function TimeSeriesManagerRowAccordion(_ref)
|
|
|
3710
4014
|
sx: {
|
|
3711
4015
|
pl: '14px'
|
|
3712
4016
|
},
|
|
3713
|
-
children: [jsx(Grid, {
|
|
3714
|
-
children: jsx(CustomIconButton, {
|
|
4017
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
4018
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
3715
4019
|
"data-testid": "accordionEnableButton",
|
|
3716
4020
|
onClick: function onClick(event) {
|
|
3717
4021
|
event.stopPropagation();
|
|
@@ -3719,112 +4023,112 @@ var TimeSeriesManagerRowAccordion = function TimeSeriesManagerRowAccordion(_ref)
|
|
|
3719
4023
|
},
|
|
3720
4024
|
shouldShowAsDisabled: !plotIsEnabled,
|
|
3721
4025
|
tooltipTitle: (parameter.enabled !== false ? t('timeseries-hide') : t('timeseries-show')) + " " + parameter.propertyName,
|
|
3722
|
-
children: parameter.enabled !== false && plotIsEnabled ? jsx(Visibility, {
|
|
4026
|
+
children: parameter.enabled !== false && plotIsEnabled ? /*#__PURE__*/jsx(Visibility, {
|
|
3723
4027
|
"data-testid": "enabled-visible"
|
|
3724
|
-
}) : jsx(VisibilityOff, {
|
|
4028
|
+
}) : /*#__PURE__*/jsx(VisibilityOff, {
|
|
3725
4029
|
"data-testid": "disabled-visible"
|
|
3726
4030
|
})
|
|
3727
4031
|
})
|
|
3728
|
-
}), jsx(Grid, {
|
|
3729
|
-
children: jsx(Grid, {
|
|
4032
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4033
|
+
children: /*#__PURE__*/jsx(Grid, {
|
|
3730
4034
|
sx: [styles.rowText],
|
|
3731
4035
|
title: parameter.collectionId,
|
|
3732
4036
|
children: parameter.collectionId
|
|
3733
4037
|
})
|
|
3734
4038
|
})]
|
|
3735
4039
|
}),
|
|
3736
|
-
children: jsxs(Grid, {
|
|
4040
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
3737
4041
|
container: true,
|
|
3738
4042
|
direction: "column",
|
|
3739
4043
|
spacing: 2,
|
|
3740
4044
|
sx: {
|
|
3741
4045
|
padding: '16px 10px'
|
|
3742
4046
|
},
|
|
3743
|
-
children: [jsxs(Grid, {
|
|
4047
|
+
children: [/*#__PURE__*/jsxs(Grid, {
|
|
3744
4048
|
children: [" ", t('timeseries-collection')]
|
|
3745
|
-
}), jsx(Grid, {
|
|
4049
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
3746
4050
|
sx: [styles.rowText],
|
|
3747
4051
|
title: parameter.collectionId,
|
|
3748
4052
|
children: parameter.collectionId
|
|
3749
|
-
}), jsxs(Grid, {
|
|
4053
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
3750
4054
|
children: [" ", t('timeseries-parameter')]
|
|
3751
|
-
}), jsx(Grid, {
|
|
3752
|
-
children: jsx(ParameterNameSelect, {
|
|
4055
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4056
|
+
children: /*#__PURE__*/jsx(ParameterNameSelect, {
|
|
3753
4057
|
parameter: parameter,
|
|
3754
4058
|
patchParameter: patchParameter,
|
|
3755
4059
|
rowIsEnabled: plotIsEnabled || rowIsEnabled,
|
|
3756
4060
|
t: t
|
|
3757
4061
|
})
|
|
3758
|
-
}), jsxs(Grid, {
|
|
4062
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
3759
4063
|
children: [" ", t('timeseries-style')]
|
|
3760
|
-
}), jsx(Grid, {
|
|
3761
|
-
children: jsx(ParameterTypeSelect, {
|
|
4064
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4065
|
+
children: /*#__PURE__*/jsx(ParameterTypeSelect, {
|
|
3762
4066
|
parameter: parameter,
|
|
3763
4067
|
patchParameter: patchParameter,
|
|
3764
4068
|
rowIsEnabled: plotIsEnabled || rowIsEnabled,
|
|
3765
4069
|
t: t
|
|
3766
4070
|
})
|
|
3767
|
-
}), jsxs(Grid, {
|
|
4071
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
3768
4072
|
children: [" ", t('timeseries-color')]
|
|
3769
|
-
}), jsx(Grid, {
|
|
4073
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
3770
4074
|
sx: {
|
|
3771
4075
|
width: '100%'
|
|
3772
4076
|
},
|
|
3773
|
-
children: jsx(ParameterColorSelect, {
|
|
4077
|
+
children: /*#__PURE__*/jsx(ParameterColorSelect, {
|
|
3774
4078
|
parameter: parameter,
|
|
3775
4079
|
patchParameter: patchParameter,
|
|
3776
4080
|
rowIsEnabled: plotIsEnabled || rowIsEnabled,
|
|
3777
4081
|
t: t,
|
|
3778
4082
|
useEntireWidth: true
|
|
3779
4083
|
})
|
|
3780
|
-
}), jsxs(Grid, {
|
|
4084
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
3781
4085
|
children: [" ", t('timeseries-opacity')]
|
|
3782
|
-
}), jsx(Grid, {
|
|
3783
|
-
children: jsx(ParameterOpacitySelect, {
|
|
4086
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4087
|
+
children: /*#__PURE__*/jsx(ParameterOpacitySelect, {
|
|
3784
4088
|
parameter: parameter,
|
|
3785
4089
|
patchParameter: patchParameter,
|
|
3786
4090
|
rowIsEnabled: plotIsEnabled || rowIsEnabled,
|
|
3787
4091
|
t: t
|
|
3788
4092
|
})
|
|
3789
|
-
}), jsxs(Grid, {
|
|
4093
|
+
}), /*#__PURE__*/jsxs(Grid, {
|
|
3790
4094
|
children: [" ", t('timeseries-dimension')]
|
|
3791
|
-
}), jsx(Grid, {
|
|
3792
|
-
children: jsx(ParameterDimensionSelect, {
|
|
4095
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4096
|
+
children: /*#__PURE__*/jsx(ParameterDimensionSelect, {
|
|
3793
4097
|
parameter: parameter,
|
|
3794
4098
|
patchParameter: patchParameter,
|
|
3795
4099
|
rowIsEnabled: plotIsEnabled || rowIsEnabled,
|
|
3796
4100
|
t: t
|
|
3797
4101
|
})
|
|
3798
|
-
}), jsx(Grid, {
|
|
3799
|
-
children: jsxs(Grid, {
|
|
4102
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4103
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
3800
4104
|
container: true,
|
|
3801
4105
|
sx: {
|
|
3802
4106
|
justifyContent: 'space-evenly'
|
|
3803
4107
|
},
|
|
3804
|
-
children: [jsx(Grid, {
|
|
3805
|
-
children: jsx(ParameterInfoButtonConnect, {
|
|
4108
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
4109
|
+
children: /*#__PURE__*/jsx(ParameterInfoButtonConnect, {
|
|
3806
4110
|
panelId: panelId,
|
|
3807
4111
|
parameter: parameter
|
|
3808
4112
|
})
|
|
3809
|
-
}), jsx(Grid, {
|
|
3810
|
-
children: jsx(CustomIconButton, {
|
|
4113
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4114
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
3811
4115
|
"data-testid": "accordionDuplicateButton",
|
|
3812
4116
|
onClick: function onClick() {
|
|
3813
4117
|
addParameter(parameter);
|
|
3814
4118
|
},
|
|
3815
4119
|
shouldShowAsDisabled: !plotIsEnabled,
|
|
3816
4120
|
tooltipTitle: "Duplicate " + parameter.propertyName,
|
|
3817
|
-
children: jsx(Copy, {})
|
|
4121
|
+
children: /*#__PURE__*/jsx(Copy, {})
|
|
3818
4122
|
})
|
|
3819
|
-
}), jsx(Grid, {
|
|
3820
|
-
children: jsx(CustomIconButton, {
|
|
4123
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4124
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
3821
4125
|
"data-testid": "accordionDeleteButton",
|
|
3822
4126
|
onClick: function onClick() {
|
|
3823
4127
|
deleteParameter(parameter.id);
|
|
3824
4128
|
},
|
|
3825
4129
|
shouldShowAsDisabled: !plotIsEnabled,
|
|
3826
4130
|
tooltipTitle: t('timeseries-remove') + " " + parameter.propertyName,
|
|
3827
|
-
children: jsx(Delete, {})
|
|
4131
|
+
children: /*#__PURE__*/jsx(Delete, {})
|
|
3828
4132
|
})
|
|
3829
4133
|
})]
|
|
3830
4134
|
})
|
|
@@ -3842,40 +4146,40 @@ var RowLayout = function RowLayout(_ref) {
|
|
|
3842
4146
|
dimension = _ref.dimension,
|
|
3843
4147
|
actions = _ref.actions,
|
|
3844
4148
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
3845
|
-
return jsxs(Grid, Object.assign({
|
|
4149
|
+
return /*#__PURE__*/jsxs(Grid, Object.assign({
|
|
3846
4150
|
alignItems: "center",
|
|
3847
4151
|
container: true,
|
|
3848
4152
|
justifyContent: "space-between",
|
|
3849
4153
|
spacing: 2
|
|
3850
4154
|
}, props, {
|
|
3851
|
-
children: [jsx(Grid, {
|
|
4155
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
3852
4156
|
sx: {
|
|
3853
4157
|
width: 48
|
|
3854
4158
|
},
|
|
3855
4159
|
children: plot
|
|
3856
|
-
}), jsx(Grid, {
|
|
4160
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
3857
4161
|
className: "timeSeriesManagerCollection",
|
|
3858
4162
|
sx: {
|
|
3859
4163
|
width: 60
|
|
3860
4164
|
},
|
|
3861
4165
|
children: collection
|
|
3862
|
-
}), jsx(Grid, {
|
|
4166
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
3863
4167
|
className: "timeSeriesManagerParameter",
|
|
3864
4168
|
sx: {
|
|
3865
4169
|
width: '15%'
|
|
3866
4170
|
},
|
|
3867
4171
|
children: parameter
|
|
3868
|
-
}), jsx(Grid, {
|
|
4172
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
3869
4173
|
className: "timeSeriesManagerStyle",
|
|
3870
4174
|
sx: {
|
|
3871
4175
|
width: '25%'
|
|
3872
4176
|
},
|
|
3873
4177
|
children: style
|
|
3874
|
-
}), jsx(Grid, {
|
|
4178
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
3875
4179
|
className: "timeseriesManagerDimension",
|
|
3876
4180
|
size: "grow",
|
|
3877
4181
|
children: dimension
|
|
3878
|
-
}), jsx(Grid, {
|
|
4182
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
3879
4183
|
className: "timeSeriesManagerActions",
|
|
3880
4184
|
sx: {
|
|
3881
4185
|
width: 88,
|
|
@@ -3886,6 +4190,24 @@ var RowLayout = function RowLayout(_ref) {
|
|
|
3886
4190
|
}));
|
|
3887
4191
|
};
|
|
3888
4192
|
|
|
4193
|
+
/* *
|
|
4194
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4195
|
+
* you may not use this file except in compliance with the License.
|
|
4196
|
+
* You may obtain a copy of the License at
|
|
4197
|
+
*
|
|
4198
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4199
|
+
*
|
|
4200
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4201
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4202
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4203
|
+
* See the License for the specific language governing permissions and
|
|
4204
|
+
* limitations under the License.
|
|
4205
|
+
*
|
|
4206
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4207
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
4208
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
4209
|
+
* */
|
|
4210
|
+
|
|
3889
4211
|
var ParameterList = function ParameterList(_ref) {
|
|
3890
4212
|
var _plot$parameters, _plot$parameters2;
|
|
3891
4213
|
var panelId = _ref.panelId,
|
|
@@ -3905,7 +4227,7 @@ var ParameterList = function ParameterList(_ref) {
|
|
|
3905
4227
|
toPlotId: sort.to.id
|
|
3906
4228
|
});
|
|
3907
4229
|
}, [moveParameter]);
|
|
3908
|
-
return jsx(ReactSortable, {
|
|
4230
|
+
return /*#__PURE__*/jsx(ReactSortable, {
|
|
3909
4231
|
animation: 200,
|
|
3910
4232
|
direction: "vertical",
|
|
3911
4233
|
group: {
|
|
@@ -3921,16 +4243,17 @@ var ParameterList = function ParameterList(_ref) {
|
|
|
3921
4243
|
}) : [],
|
|
3922
4244
|
onEnd: onSortEnd,
|
|
3923
4245
|
setList: function setList() {},
|
|
3924
|
-
swapThreshold: 0.3
|
|
4246
|
+
swapThreshold: 0.3 // Nested sortable gets jumpy without this. Cant be lower because e2e will fail.
|
|
4247
|
+
,
|
|
3925
4248
|
children: (_plot$parameters2 = plot.parameters) == null ? void 0 : _plot$parameters2.map(function (parameter) {
|
|
3926
4249
|
var parameterIsEnabled = parameter.enabled !== false;
|
|
3927
4250
|
var rowIsEnabled = plotIsEnabled && parameterIsEnabled;
|
|
3928
4251
|
var styles = getStyles$1(rowIsEnabled);
|
|
3929
|
-
return jsxs(Box, {
|
|
4252
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
3930
4253
|
sx: styles.plot,
|
|
3931
|
-
children: [jsx(Box, {
|
|
4254
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
3932
4255
|
className: "medium-timeseriesmanager",
|
|
3933
|
-
children: jsx(TimeSeriesManagerRowAccordion, {
|
|
4256
|
+
children: /*#__PURE__*/jsx(TimeSeriesManagerRowAccordion, {
|
|
3934
4257
|
panelId: panelId,
|
|
3935
4258
|
addParameter: addParameter,
|
|
3936
4259
|
deleteParameter: deleteParameter,
|
|
@@ -3942,49 +4265,49 @@ var ParameterList = function ParameterList(_ref) {
|
|
|
3942
4265
|
t: t,
|
|
3943
4266
|
toggleParameter: toggleParameter
|
|
3944
4267
|
})
|
|
3945
|
-
}), jsx(RowLayout, {
|
|
3946
|
-
actions: jsxs(Grid, {
|
|
4268
|
+
}), /*#__PURE__*/jsx(RowLayout, {
|
|
4269
|
+
actions: /*#__PURE__*/jsxs(Grid, {
|
|
3947
4270
|
container: true,
|
|
3948
4271
|
justifyContent: "space-between",
|
|
3949
|
-
children: [jsx(ParameterInfoButtonConnect, {
|
|
4272
|
+
children: [/*#__PURE__*/jsx(ParameterInfoButtonConnect, {
|
|
3950
4273
|
panelId: panelId,
|
|
3951
4274
|
parameter: parameter
|
|
3952
|
-
}), ' ', jsx(CustomIconButton, {
|
|
4275
|
+
}), ' ', /*#__PURE__*/jsx(CustomIconButton, {
|
|
3953
4276
|
"data-testid": "duplicateButton",
|
|
3954
4277
|
onClick: function onClick() {
|
|
3955
4278
|
addParameter(parameter);
|
|
3956
4279
|
},
|
|
3957
4280
|
shouldShowAsDisabled: !plotIsEnabled,
|
|
3958
4281
|
tooltipTitle: t('timeseries-duplicate') + " " + parameter.propertyName,
|
|
3959
|
-
children: jsx(Copy, {})
|
|
3960
|
-
}), jsx(CustomIconButton, {
|
|
4282
|
+
children: /*#__PURE__*/jsx(Copy, {})
|
|
4283
|
+
}), /*#__PURE__*/jsx(CustomIconButton, {
|
|
3961
4284
|
"data-testid": "deleteButton",
|
|
3962
4285
|
onClick: function onClick() {
|
|
3963
4286
|
deleteParameter(parameter.id);
|
|
3964
4287
|
},
|
|
3965
4288
|
shouldShowAsDisabled: !plotIsEnabled,
|
|
3966
4289
|
tooltipTitle: t('timeseries-remove') + " " + parameter.propertyName,
|
|
3967
|
-
children: jsx(Delete, {})
|
|
4290
|
+
children: /*#__PURE__*/jsx(Delete, {})
|
|
3968
4291
|
})]
|
|
3969
4292
|
}),
|
|
3970
4293
|
className: "plotRow",
|
|
3971
|
-
collection: jsx(Typography, {
|
|
4294
|
+
collection: /*#__PURE__*/jsx(Typography, {
|
|
3972
4295
|
sx: Object.assign({}, styles.rowText),
|
|
3973
4296
|
children: parameter.collectionId
|
|
3974
4297
|
}),
|
|
3975
|
-
dimension: jsx(ParameterDimensionSelect, {
|
|
4298
|
+
dimension: /*#__PURE__*/jsx(ParameterDimensionSelect, {
|
|
3976
4299
|
parameter: parameter,
|
|
3977
4300
|
patchParameter: patchParameter,
|
|
3978
4301
|
rowIsEnabled: rowIsEnabled,
|
|
3979
4302
|
t: t
|
|
3980
4303
|
}),
|
|
3981
|
-
parameter: jsx(ParameterNameSelect, {
|
|
4304
|
+
parameter: /*#__PURE__*/jsx(ParameterNameSelect, {
|
|
3982
4305
|
parameter: parameter,
|
|
3983
4306
|
patchParameter: patchParameter,
|
|
3984
4307
|
rowIsEnabled: rowIsEnabled,
|
|
3985
4308
|
t: t
|
|
3986
4309
|
}),
|
|
3987
|
-
plot: jsx(CustomIconButton, {
|
|
4310
|
+
plot: /*#__PURE__*/jsx(CustomIconButton, {
|
|
3988
4311
|
"data-testid": "enableButton",
|
|
3989
4312
|
onClick: function onClick() {
|
|
3990
4313
|
toggleParameter(parameter.id);
|
|
@@ -3994,27 +4317,27 @@ var ParameterList = function ParameterList(_ref) {
|
|
|
3994
4317
|
marginLeft: 3
|
|
3995
4318
|
},
|
|
3996
4319
|
tooltipTitle: (parameterIsEnabled ? t('timeseries-hide') : t('timeseries-show')) + " " + parameter.propertyName,
|
|
3997
|
-
children: rowIsEnabled ? jsx(Visibility, {}) : jsx(VisibilityOff, {})
|
|
4320
|
+
children: rowIsEnabled ? /*#__PURE__*/jsx(Visibility, {}) : /*#__PURE__*/jsx(VisibilityOff, {})
|
|
3998
4321
|
}),
|
|
3999
|
-
style: jsxs(Grid, {
|
|
4322
|
+
style: /*#__PURE__*/jsxs(Grid, {
|
|
4000
4323
|
container: true,
|
|
4001
|
-
children: [jsx(Grid, {
|
|
4324
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
4002
4325
|
size: "grow",
|
|
4003
|
-
children: jsx(ParameterTypeSelect, {
|
|
4326
|
+
children: /*#__PURE__*/jsx(ParameterTypeSelect, {
|
|
4004
4327
|
parameter: parameter,
|
|
4005
4328
|
patchParameter: patchParameter,
|
|
4006
4329
|
rowIsEnabled: rowIsEnabled,
|
|
4007
4330
|
t: t
|
|
4008
4331
|
})
|
|
4009
|
-
}), jsx(Grid, {
|
|
4010
|
-
children: jsx(ParameterColorSelect, {
|
|
4332
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4333
|
+
children: /*#__PURE__*/jsx(ParameterColorSelect, {
|
|
4011
4334
|
parameter: parameter,
|
|
4012
4335
|
patchParameter: patchParameter,
|
|
4013
4336
|
rowIsEnabled: rowIsEnabled,
|
|
4014
4337
|
t: t
|
|
4015
4338
|
})
|
|
4016
|
-
}), jsx(Grid, {
|
|
4017
|
-
children: jsx(ParameterOpacitySelect, {
|
|
4339
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4340
|
+
children: /*#__PURE__*/jsx(ParameterOpacitySelect, {
|
|
4018
4341
|
parameter: parameter,
|
|
4019
4342
|
patchParameter: patchParameter,
|
|
4020
4343
|
rowIsEnabled: rowIsEnabled,
|
|
@@ -4054,6 +4377,24 @@ var getStyles$1 = function getStyles(isEnabled) {
|
|
|
4054
4377
|
};
|
|
4055
4378
|
};
|
|
4056
4379
|
|
|
4380
|
+
/* *
|
|
4381
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4382
|
+
* you may not use this file except in compliance with the License.
|
|
4383
|
+
* You may obtain a copy of the License at
|
|
4384
|
+
*
|
|
4385
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4386
|
+
*
|
|
4387
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4388
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4389
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4390
|
+
* See the License for the specific language governing permissions and
|
|
4391
|
+
* limitations under the License.
|
|
4392
|
+
*
|
|
4393
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4394
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
4395
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
4396
|
+
* */
|
|
4397
|
+
|
|
4057
4398
|
var TimeSeriesSelectButtonConnect = function TimeSeriesSelectButtonConnect(_ref) {
|
|
4058
4399
|
var isEnabled = _ref.isEnabled,
|
|
4059
4400
|
onClick = _ref.onClick,
|
|
@@ -4082,9 +4423,9 @@ var TimeSeriesSelectButtonConnect = function TimeSeriesSelectButtonConnect(_ref)
|
|
|
4082
4423
|
};
|
|
4083
4424
|
var isSelectOpenForCurrentPlot = plotId === selectPlotId;
|
|
4084
4425
|
var isOpenForPanel = isOpenInStore && currentSourcePanelId === panelId;
|
|
4085
|
-
return jsx(CustomTooltip, {
|
|
4426
|
+
return /*#__PURE__*/jsx(CustomTooltip, {
|
|
4086
4427
|
title: t('timeseries-add-param-to-plot'),
|
|
4087
|
-
children: jsx(CustomToggleButton, {
|
|
4428
|
+
children: /*#__PURE__*/jsx(CustomToggleButton, {
|
|
4088
4429
|
"data-testid": "timeSeriesSelectButton",
|
|
4089
4430
|
disabled: !isEnabled,
|
|
4090
4431
|
onClick: handleClick,
|
|
@@ -4099,11 +4440,29 @@ var TimeSeriesSelectButtonConnect = function TimeSeriesSelectButtonConnect(_ref)
|
|
|
4099
4440
|
}
|
|
4100
4441
|
},
|
|
4101
4442
|
variant: "tool",
|
|
4102
|
-
children: jsx(TimeSeriesSelect$1, {})
|
|
4443
|
+
children: /*#__PURE__*/jsx(TimeSeriesSelect$1, {})
|
|
4103
4444
|
})
|
|
4104
4445
|
});
|
|
4105
4446
|
};
|
|
4106
4447
|
|
|
4448
|
+
/* *
|
|
4449
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4450
|
+
* you may not use this file except in compliance with the License.
|
|
4451
|
+
* You may obtain a copy of the License at
|
|
4452
|
+
*
|
|
4453
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4454
|
+
*
|
|
4455
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4456
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4457
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4458
|
+
* See the License for the specific language governing permissions and
|
|
4459
|
+
* limitations under the License.
|
|
4460
|
+
*
|
|
4461
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4462
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
4463
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
4464
|
+
* */
|
|
4465
|
+
|
|
4107
4466
|
var PlotRows = function PlotRows(_ref) {
|
|
4108
4467
|
var panelId = _ref.panelId,
|
|
4109
4468
|
plot = _ref.plot,
|
|
@@ -4142,31 +4501,31 @@ var PlotRows = function PlotRows(_ref) {
|
|
|
4142
4501
|
setEditTitle(false);
|
|
4143
4502
|
}
|
|
4144
4503
|
};
|
|
4145
|
-
return jsxs(Box, {
|
|
4504
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
4146
4505
|
sx: styles.plot,
|
|
4147
|
-
children: [jsx(RowLayout, {
|
|
4148
|
-
actions: jsxs(Grid, {
|
|
4506
|
+
children: [/*#__PURE__*/jsx(RowLayout, {
|
|
4507
|
+
actions: /*#__PURE__*/jsxs(Grid, {
|
|
4149
4508
|
container: true,
|
|
4150
4509
|
justifyContent: "space-between",
|
|
4151
|
-
children: [jsx(CustomIconButton, {
|
|
4510
|
+
children: [/*#__PURE__*/jsx(CustomIconButton, {
|
|
4152
4511
|
"data-testid": "deleteButton",
|
|
4153
4512
|
onClick: function onClick() {
|
|
4154
4513
|
deletePlot(plot.plotId);
|
|
4155
4514
|
},
|
|
4156
4515
|
shouldShowAsDisabled: !plotIsEnabled,
|
|
4157
4516
|
tooltipTitle: t('timeseries-remove') + " " + plot.title,
|
|
4158
|
-
children: jsx(Delete, {})
|
|
4159
|
-
}), jsx(CustomIconButton, {
|
|
4517
|
+
children: /*#__PURE__*/jsx(Delete, {})
|
|
4518
|
+
}), /*#__PURE__*/jsx(CustomIconButton, {
|
|
4160
4519
|
"data-testid": "openParameterListButton",
|
|
4161
4520
|
onClick: function onClick(event) {
|
|
4162
4521
|
event.stopPropagation();
|
|
4163
4522
|
setOpenParameterList(!openParameterList);
|
|
4164
4523
|
},
|
|
4165
4524
|
tooltipTitle: t('timeseries-open-param-list'),
|
|
4166
|
-
children: openParameterList ? jsx(ChevronUp, {}) : jsx(ChevronDown, {})
|
|
4525
|
+
children: openParameterList ? /*#__PURE__*/jsx(ChevronUp, {}) : /*#__PURE__*/jsx(ChevronDown, {})
|
|
4167
4526
|
})]
|
|
4168
4527
|
}),
|
|
4169
|
-
collection: jsx(TimeSeriesSelectButtonConnect, {
|
|
4528
|
+
collection: /*#__PURE__*/jsx(TimeSeriesSelectButtonConnect, {
|
|
4170
4529
|
isEnabled: plotIsEnabled,
|
|
4171
4530
|
onClick: function onClick() {
|
|
4172
4531
|
return setSelectPlotId(plot.plotId);
|
|
@@ -4176,13 +4535,13 @@ var PlotRows = function PlotRows(_ref) {
|
|
|
4176
4535
|
selectPlotId: selectPlotId,
|
|
4177
4536
|
t: t
|
|
4178
4537
|
}),
|
|
4179
|
-
parameter: jsx(ClickAwayListener, {
|
|
4538
|
+
parameter: /*#__PURE__*/jsx(ClickAwayListener, {
|
|
4180
4539
|
onClickAway: plotTitleClickAway,
|
|
4181
|
-
children: jsx(Box, {
|
|
4540
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
4182
4541
|
onClick: function onClick() {
|
|
4183
4542
|
return setEditTitle(true);
|
|
4184
4543
|
},
|
|
4185
|
-
children: editTitle ? jsx(Input, {
|
|
4544
|
+
children: editTitle ? /*#__PURE__*/jsx(Input, {
|
|
4186
4545
|
"aria-label": t('timeseries-edit-title'),
|
|
4187
4546
|
defaultValue: plot.title,
|
|
4188
4547
|
inputProps: {
|
|
@@ -4193,18 +4552,19 @@ var PlotRows = function PlotRows(_ref) {
|
|
|
4193
4552
|
},
|
|
4194
4553
|
onFocus: function onFocus(event) {
|
|
4195
4554
|
return event.target.select();
|
|
4196
|
-
}
|
|
4555
|
+
}
|
|
4197
4556
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
4557
|
+
,
|
|
4198
4558
|
onKeyDown: function onKeyDown(e) {
|
|
4199
4559
|
return e.key === 'Enter' && plotTitleClickAway();
|
|
4200
4560
|
},
|
|
4201
4561
|
sx: Object.assign({}, styles.rowText, {
|
|
4202
4562
|
backgroundColor: 'geowebColors.textInputField.default.rgba'
|
|
4203
4563
|
})
|
|
4204
|
-
}) : jsx(CustomTooltip, {
|
|
4564
|
+
}) : /*#__PURE__*/jsx(CustomTooltip, {
|
|
4205
4565
|
placement: "top",
|
|
4206
4566
|
title: t('timeseries-edit-title'),
|
|
4207
|
-
children: jsx(Box, {
|
|
4567
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
4208
4568
|
"aria-label": plot.title + ", " + t('timeseries-click-to-edit'),
|
|
4209
4569
|
sx: Object.assign({}, styles.rowText, {
|
|
4210
4570
|
minWidth: '100%',
|
|
@@ -4217,10 +4577,10 @@ var PlotRows = function PlotRows(_ref) {
|
|
|
4217
4577
|
})
|
|
4218
4578
|
})
|
|
4219
4579
|
}),
|
|
4220
|
-
plot: jsxs(Grid, {
|
|
4580
|
+
plot: /*#__PURE__*/jsxs(Grid, {
|
|
4221
4581
|
container: true,
|
|
4222
4582
|
justifyContent: "space-between",
|
|
4223
|
-
children: [jsx(CustomIconButton, {
|
|
4583
|
+
children: [/*#__PURE__*/jsx(CustomIconButton, {
|
|
4224
4584
|
className: "handle",
|
|
4225
4585
|
"data-testid": "dragHandleButton_" + rowIndex,
|
|
4226
4586
|
disableTouchRipple: true,
|
|
@@ -4233,24 +4593,24 @@ var PlotRows = function PlotRows(_ref) {
|
|
|
4233
4593
|
},
|
|
4234
4594
|
tabIndex: -1,
|
|
4235
4595
|
tooltipTitle: showTooltip ? t('timeseries-drag') : '',
|
|
4236
|
-
children: jsx(DragHandle, {})
|
|
4237
|
-
}), jsx(CustomIconButton, {
|
|
4596
|
+
children: /*#__PURE__*/jsx(DragHandle, {})
|
|
4597
|
+
}), /*#__PURE__*/jsx(CustomIconButton, {
|
|
4238
4598
|
"data-testid": "enableButton",
|
|
4239
4599
|
onClick: function onClick() {
|
|
4240
4600
|
togglePlot(plot.plotId);
|
|
4241
4601
|
},
|
|
4242
4602
|
shouldShowAsDisabled: !plotIsEnabled,
|
|
4243
4603
|
tooltipTitle: (plotIsEnabled ? t('timeseries-hide') : t('timeseries-show')) + " " + plot.title,
|
|
4244
|
-
children: plotIsEnabled ? jsx(Visibility, {}) : jsx(VisibilityOff, {})
|
|
4604
|
+
children: plotIsEnabled ? /*#__PURE__*/jsx(Visibility, {}) : /*#__PURE__*/jsx(VisibilityOff, {})
|
|
4245
4605
|
})]
|
|
4246
4606
|
}),
|
|
4247
4607
|
sx: styles.row
|
|
4248
|
-
}), jsx(Collapse, {
|
|
4608
|
+
}), /*#__PURE__*/jsx(Collapse, {
|
|
4249
4609
|
"in": openParameterList,
|
|
4250
4610
|
sx: styles.parameter,
|
|
4251
4611
|
timeout: "auto",
|
|
4252
4612
|
unmountOnExit: true,
|
|
4253
|
-
children: jsx(ParameterList, {
|
|
4613
|
+
children: /*#__PURE__*/jsx(ParameterList, {
|
|
4254
4614
|
panelId: panelId,
|
|
4255
4615
|
addParameter: addParameter,
|
|
4256
4616
|
deleteParameter: deleteParameter,
|
|
@@ -4264,6 +4624,7 @@ var PlotRows = function PlotRows(_ref) {
|
|
|
4264
4624
|
})]
|
|
4265
4625
|
}, plot.plotId);
|
|
4266
4626
|
};
|
|
4627
|
+
|
|
4267
4628
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4268
4629
|
var getStyles = function getStyles(isEnabled) {
|
|
4269
4630
|
return {
|
|
@@ -4296,6 +4657,24 @@ var getStyles = function getStyles(isEnabled) {
|
|
|
4296
4657
|
};
|
|
4297
4658
|
};
|
|
4298
4659
|
|
|
4660
|
+
/* *
|
|
4661
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4662
|
+
* you may not use this file except in compliance with the License.
|
|
4663
|
+
* You may obtain a copy of the License at
|
|
4664
|
+
*
|
|
4665
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4666
|
+
*
|
|
4667
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4668
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4669
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4670
|
+
* See the License for the specific language governing permissions and
|
|
4671
|
+
* limitations under the License.
|
|
4672
|
+
*
|
|
4673
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4674
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
4675
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
4676
|
+
* */
|
|
4677
|
+
|
|
4299
4678
|
var AddPlotButton = function AddPlotButton(_ref) {
|
|
4300
4679
|
var handleClick = _ref.handleClick,
|
|
4301
4680
|
plotState = _ref.plotState,
|
|
@@ -4305,7 +4684,7 @@ var AddPlotButton = function AddPlotButton(_ref) {
|
|
|
4305
4684
|
var plotIndex = plotState.plots.length ? +titleRegex.exec(plotState.plots[plotState.plots.length - 1].title) : 0;
|
|
4306
4685
|
handleClick(t('timeseries-plot') + " " + (plotIndex + 1));
|
|
4307
4686
|
};
|
|
4308
|
-
return jsx(CustomIconButton, {
|
|
4687
|
+
return /*#__PURE__*/jsx(CustomIconButton, {
|
|
4309
4688
|
"data-testid": "timeSeriesAddPlotButton",
|
|
4310
4689
|
onClick: onClick,
|
|
4311
4690
|
size: "small",
|
|
@@ -4313,12 +4692,30 @@ var AddPlotButton = function AddPlotButton(_ref) {
|
|
|
4313
4692
|
border: 'none'
|
|
4314
4693
|
},
|
|
4315
4694
|
tooltipTitle: t('timeseries-add-plot'),
|
|
4316
|
-
children: jsx("span", {
|
|
4317
|
-
children: jsx(Add, {})
|
|
4695
|
+
children: /*#__PURE__*/jsx("span", {
|
|
4696
|
+
children: /*#__PURE__*/jsx(Add, {})
|
|
4318
4697
|
})
|
|
4319
4698
|
});
|
|
4320
4699
|
};
|
|
4321
4700
|
|
|
4701
|
+
/* *
|
|
4702
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4703
|
+
* you may not use this file except in compliance with the License.
|
|
4704
|
+
* You may obtain a copy of the License at
|
|
4705
|
+
*
|
|
4706
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4707
|
+
*
|
|
4708
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4709
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4710
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4711
|
+
* See the License for the specific language governing permissions and
|
|
4712
|
+
* limitations under the License.
|
|
4713
|
+
*
|
|
4714
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4715
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
4716
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
4717
|
+
* */
|
|
4718
|
+
|
|
4322
4719
|
var timeSeriesManagerStyle = {
|
|
4323
4720
|
'.timeSeriesManagerContainer': {
|
|
4324
4721
|
containerType: 'inline-size'
|
|
@@ -4413,7 +4810,7 @@ var TimeSeriesManager = function TimeSeriesManager(_ref) {
|
|
|
4413
4810
|
setIsSorting(false);
|
|
4414
4811
|
}, []);
|
|
4415
4812
|
var showTooltip = !isSorting;
|
|
4416
|
-
return jsx(ToolContainerDraggable, {
|
|
4813
|
+
return /*#__PURE__*/jsx(ToolContainerDraggable, {
|
|
4417
4814
|
className: "timeseriesmanager",
|
|
4418
4815
|
isOpen: isOpen,
|
|
4419
4816
|
minHeight: 126,
|
|
@@ -4425,40 +4822,40 @@ var TimeSeriesManager = function TimeSeriesManager(_ref) {
|
|
|
4425
4822
|
startSize: startSize,
|
|
4426
4823
|
sx: Object.assign({}, timeSeriesManagerStyle),
|
|
4427
4824
|
title: "Time Series Manager",
|
|
4428
|
-
children: jsxs(Box, {
|
|
4825
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
4429
4826
|
className: "timeSeriesManagerContainer",
|
|
4430
4827
|
sx: {
|
|
4431
4828
|
padding: '0 6px'
|
|
4432
4829
|
},
|
|
4433
|
-
children: [jsx(RowLayout, {
|
|
4830
|
+
children: [/*#__PURE__*/jsx(RowLayout, {
|
|
4434
4831
|
className: "timeSeriesManagerHeaderRow",
|
|
4435
|
-
collection: jsx(Typography, {
|
|
4832
|
+
collection: /*#__PURE__*/jsx(Typography, {
|
|
4436
4833
|
sx: {
|
|
4437
4834
|
fontSize: 12,
|
|
4438
4835
|
opacity: 0.67
|
|
4439
4836
|
},
|
|
4440
4837
|
children: t('timeseries-collection')
|
|
4441
4838
|
}),
|
|
4442
|
-
dimension: jsx(Typography, {
|
|
4839
|
+
dimension: /*#__PURE__*/jsx(Typography, {
|
|
4443
4840
|
sx: {
|
|
4444
4841
|
fontSize: 12,
|
|
4445
4842
|
opacity: 0.67
|
|
4446
4843
|
},
|
|
4447
4844
|
children: t('timeseries-dimension')
|
|
4448
4845
|
}),
|
|
4449
|
-
parameter: jsx(Typography, {
|
|
4846
|
+
parameter: /*#__PURE__*/jsx(Typography, {
|
|
4450
4847
|
sx: {
|
|
4451
4848
|
fontSize: 12,
|
|
4452
4849
|
opacity: 0.67
|
|
4453
4850
|
},
|
|
4454
4851
|
children: t('timeseries-parameter')
|
|
4455
4852
|
}),
|
|
4456
|
-
plot: jsx(AddPlotButton, {
|
|
4853
|
+
plot: /*#__PURE__*/jsx(AddPlotButton, {
|
|
4457
4854
|
handleClick: addPlot,
|
|
4458
4855
|
plotState: plotState,
|
|
4459
4856
|
t: t
|
|
4460
4857
|
}),
|
|
4461
|
-
style: jsx(Typography, {
|
|
4858
|
+
style: /*#__PURE__*/jsx(Typography, {
|
|
4462
4859
|
sx: {
|
|
4463
4860
|
fontSize: 12,
|
|
4464
4861
|
opacity: 0.67
|
|
@@ -4468,7 +4865,7 @@ var TimeSeriesManager = function TimeSeriesManager(_ref) {
|
|
|
4468
4865
|
sx: {
|
|
4469
4866
|
height: 48
|
|
4470
4867
|
}
|
|
4471
|
-
}), jsx(ReactSortable, {
|
|
4868
|
+
}), /*#__PURE__*/jsx(ReactSortable, {
|
|
4472
4869
|
animation: 200,
|
|
4473
4870
|
direction: "vertical",
|
|
4474
4871
|
group: {
|
|
@@ -4485,9 +4882,10 @@ var TimeSeriesManager = function TimeSeriesManager(_ref) {
|
|
|
4485
4882
|
onSort: onSortEnd,
|
|
4486
4883
|
onStart: onStart,
|
|
4487
4884
|
setList: function setList() {},
|
|
4488
|
-
swapThreshold: 0.3
|
|
4885
|
+
swapThreshold: 0.3 // Nested sortable gets jumpy without this. Cant be lower because e2e will fail.
|
|
4886
|
+
,
|
|
4489
4887
|
children: plotHierarchy.map(function (plot, i) {
|
|
4490
|
-
return jsx(PlotRows, {
|
|
4888
|
+
return /*#__PURE__*/jsx(PlotRows, {
|
|
4491
4889
|
addParameter: addParameter,
|
|
4492
4890
|
deleteParameter: deleteParameter,
|
|
4493
4891
|
deletePlot: deletePlot,
|
|
@@ -4510,6 +4908,24 @@ var TimeSeriesManager = function TimeSeriesManager(_ref) {
|
|
|
4510
4908
|
});
|
|
4511
4909
|
};
|
|
4512
4910
|
|
|
4911
|
+
/* *
|
|
4912
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4913
|
+
* you may not use this file except in compliance with the License.
|
|
4914
|
+
* You may obtain a copy of the License at
|
|
4915
|
+
*
|
|
4916
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4917
|
+
*
|
|
4918
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4919
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4920
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4921
|
+
* See the License for the specific language governing permissions and
|
|
4922
|
+
* limitations under the License.
|
|
4923
|
+
*
|
|
4924
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4925
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
4926
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
4927
|
+
* */
|
|
4928
|
+
|
|
4513
4929
|
var ParameterInfoDialog = function ParameterInfoDialog(_ref) {
|
|
4514
4930
|
var onClose = _ref.onClose,
|
|
4515
4931
|
currentParameterInfo = _ref.currentParameterInfo,
|
|
@@ -4529,7 +4945,7 @@ var ParameterInfoDialog = function ParameterInfoDialog(_ref) {
|
|
|
4529
4945
|
dialogHeight = _ref.dialogHeight;
|
|
4530
4946
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
4531
4947
|
t = _useTimeseriesTransla.t;
|
|
4532
|
-
return jsx(ToolContainerDraggable, {
|
|
4948
|
+
return /*#__PURE__*/jsx(ToolContainerDraggable, {
|
|
4533
4949
|
isOpen: isOpen,
|
|
4534
4950
|
onClose: onClose,
|
|
4535
4951
|
onMouseDown: onMouseDown,
|
|
@@ -4544,48 +4960,48 @@ var ParameterInfoDialog = function ParameterInfoDialog(_ref) {
|
|
|
4544
4960
|
height: dialogHeight != null ? dialogHeight : 650
|
|
4545
4961
|
},
|
|
4546
4962
|
title: t('timeseries-info-title'),
|
|
4547
|
-
children: jsxs(Box$1, {
|
|
4963
|
+
children: /*#__PURE__*/jsxs(Box$1, {
|
|
4548
4964
|
sx: {
|
|
4549
4965
|
padding: 2
|
|
4550
4966
|
},
|
|
4551
|
-
children: [!!currentParameterInfo.propertyLabel && jsx(ParameterInfoText$1, {
|
|
4967
|
+
children: [!!currentParameterInfo.propertyLabel && /*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4552
4968
|
label: t('timeseries-info-label'),
|
|
4553
4969
|
value: currentParameterInfo.propertyLabel
|
|
4554
|
-
}), jsx(ParameterInfoText$1, {
|
|
4970
|
+
}), /*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4555
4971
|
label: t('timeseries-info-name'),
|
|
4556
4972
|
value: currentParameterInfo.propertyName
|
|
4557
|
-
}), jsx(ParameterInfoText$1, {
|
|
4973
|
+
}), /*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4558
4974
|
label: t('timeseries-info-service'),
|
|
4559
4975
|
value: (relatedService == null ? void 0 : relatedService.name) || currentParameterInfo.serviceId
|
|
4560
|
-
}), !!relatedService && jsxs(Fragment, {
|
|
4561
|
-
children: [jsx(ParameterInfoText$1, {
|
|
4976
|
+
}), !!relatedService && /*#__PURE__*/jsxs(Fragment, {
|
|
4977
|
+
children: [/*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4562
4978
|
label: t('timeseries-info-service-url'),
|
|
4563
4979
|
value: relatedService.url
|
|
4564
|
-
}), jsx(ParameterInfoText$1, {
|
|
4980
|
+
}), /*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4565
4981
|
label: t('timeseries-info-service-description'),
|
|
4566
4982
|
value: relatedService.description
|
|
4567
|
-
}), jsx(ParameterInfoText$1, {
|
|
4983
|
+
}), /*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4568
4984
|
label: t('timeseries-info-service-type'),
|
|
4569
4985
|
value: relatedService.type
|
|
4570
4986
|
})]
|
|
4571
|
-
}), jsx(ParameterInfoText$1, {
|
|
4987
|
+
}), /*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4572
4988
|
label: t('timeseries-collection-id'),
|
|
4573
4989
|
value: currentParameterInfo.collectionId
|
|
4574
|
-
}), !!(collectionInformation != null && collectionInformation.collectionTitle) && (collectionInformation == null ? void 0 : collectionInformation.collectionTitle) !== '' && jsx(ParameterInfoText$1, {
|
|
4990
|
+
}), !!(collectionInformation != null && collectionInformation.collectionTitle) && (collectionInformation == null ? void 0 : collectionInformation.collectionTitle) !== '' && /*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4575
4991
|
label: t('timeseries-collection-title'),
|
|
4576
4992
|
value: collectionInformation == null ? void 0 : collectionInformation.collectionTitle
|
|
4577
|
-
}), !!(collectionInformation != null && collectionInformation.collectionDescription) && (collectionInformation == null ? void 0 : collectionInformation.collectionDescription) !== '' && jsx(ParameterInfoText$1, {
|
|
4993
|
+
}), !!(collectionInformation != null && collectionInformation.collectionDescription) && (collectionInformation == null ? void 0 : collectionInformation.collectionDescription) !== '' && /*#__PURE__*/jsx(ParameterInfoText$1, {
|
|
4578
4994
|
label: t('timeseries-collection-description'),
|
|
4579
4995
|
value: collectionInformation == null ? void 0 : collectionInformation.collectionDescription
|
|
4580
|
-
}), jsx(QueryInfoElement, {
|
|
4996
|
+
}), /*#__PURE__*/jsx(QueryInfoElement, {
|
|
4581
4997
|
isLoadingCollectionInformation: isLoadingCollectionInformation,
|
|
4582
4998
|
queryInformation: collectionInformation
|
|
4583
|
-
}), supportsInstances ? jsx(DimensionInfoElement, {
|
|
4999
|
+
}), supportsInstances ? /*#__PURE__*/jsx(DimensionInfoElement, {
|
|
4584
5000
|
instanceInformation: instanceInformation,
|
|
4585
5001
|
isLoading: isLoadingInstanceInformation
|
|
4586
5002
|
}) :
|
|
4587
5003
|
// If no instances, display temporal and spatial extent here
|
|
4588
|
-
collectionInformation && jsx(ParameterInfoList, {
|
|
5004
|
+
collectionInformation && /*#__PURE__*/jsx(ParameterInfoList, {
|
|
4589
5005
|
label: currentParameterInfo.collectionId,
|
|
4590
5006
|
list: generateInfoList(collectionInformation, t)
|
|
4591
5007
|
}, currentParameterInfo.collectionId)]
|
|
@@ -4595,17 +5011,17 @@ var ParameterInfoDialog = function ParameterInfoDialog(_ref) {
|
|
|
4595
5011
|
var LoadingIndicator = function LoadingIndicator(_ref2) {
|
|
4596
5012
|
var subtitle = _ref2.subtitle,
|
|
4597
5013
|
textStyle = _ref2.textStyle;
|
|
4598
|
-
return jsxs(Fragment, {
|
|
4599
|
-
children: [jsx(Typography, {
|
|
5014
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5015
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4600
5016
|
sx: textStyle,
|
|
4601
5017
|
variant: "subtitle2",
|
|
4602
5018
|
children: subtitle
|
|
4603
|
-
}), jsx(Box$1, {
|
|
5019
|
+
}), /*#__PURE__*/jsx(Box$1, {
|
|
4604
5020
|
sx: {
|
|
4605
5021
|
position: 'relative',
|
|
4606
5022
|
marginBottom: 3
|
|
4607
5023
|
},
|
|
4608
|
-
children: jsx(LinearProgress, {
|
|
5024
|
+
children: /*#__PURE__*/jsx(LinearProgress, {
|
|
4609
5025
|
color: "secondary",
|
|
4610
5026
|
"data-testid": "loadingIndicator",
|
|
4611
5027
|
sx: {
|
|
@@ -4623,7 +5039,7 @@ var QueryInfoElement = function QueryInfoElement(_ref3) {
|
|
|
4623
5039
|
var _useTimeseriesTransla2 = useTimeseriesTranslation(),
|
|
4624
5040
|
t = _useTimeseriesTransla2.t;
|
|
4625
5041
|
if (isLoadingCollectionInformation) {
|
|
4626
|
-
return jsx(LoadingIndicator, {
|
|
5042
|
+
return /*#__PURE__*/jsx(LoadingIndicator, {
|
|
4627
5043
|
subtitle: t('timeseries-info-queries'),
|
|
4628
5044
|
textStyle: textStyle$1
|
|
4629
5045
|
});
|
|
@@ -4633,12 +5049,12 @@ var QueryInfoElement = function QueryInfoElement(_ref3) {
|
|
|
4633
5049
|
var queries = [(dataQueries == null ? void 0 : dataQueries.locations) && 'locations', (dataQueries == null ? void 0 : dataQueries.position) && 'position'].filter(Boolean);
|
|
4634
5050
|
return queries.length === 0 ? t('timeseries-info-no-data-available') : queries.join(', ');
|
|
4635
5051
|
}();
|
|
4636
|
-
return jsxs(Fragment, {
|
|
4637
|
-
children: [jsx(Typography, {
|
|
5052
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5053
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4638
5054
|
sx: textStyle$1,
|
|
4639
5055
|
variant: "subtitle2",
|
|
4640
5056
|
children: t('timeseries-info-queries')
|
|
4641
|
-
}), jsx(Typography, {
|
|
5057
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4642
5058
|
sx: textStyleWithMargin$1,
|
|
4643
5059
|
variant: "body2",
|
|
4644
5060
|
children: queryInfo
|
|
@@ -4651,7 +5067,7 @@ var generateInfoList = function generateInfoList(element, t) {
|
|
|
4651
5067
|
if ((_element$extent = element.extent) != null && (_element$extent = _element$extent.temporal) != null && _element$extent.values) {
|
|
4652
5068
|
infoList.push({
|
|
4653
5069
|
label: t('timeseries-info-time'),
|
|
4654
|
-
icon: jsx(DimensionsTime, {}),
|
|
5070
|
+
icon: /*#__PURE__*/jsx(DimensionsTime, {}),
|
|
4655
5071
|
value: element.extent.temporal.values.join(', ')
|
|
4656
5072
|
});
|
|
4657
5073
|
}
|
|
@@ -4665,7 +5081,7 @@ var generateInfoList = function generateInfoList(element, t) {
|
|
|
4665
5081
|
});
|
|
4666
5082
|
infoList.push({
|
|
4667
5083
|
label: t('timeseries-info-bbox'),
|
|
4668
|
-
icon: jsx(DrawRegion, {}),
|
|
5084
|
+
icon: /*#__PURE__*/jsx(DrawRegion, {}),
|
|
4669
5085
|
value: value === 'timeseries-info-bbox-rendering' ? bbox.join(', ') : value
|
|
4670
5086
|
});
|
|
4671
5087
|
}
|
|
@@ -4677,17 +5093,17 @@ var DimensionInfoElement = function DimensionInfoElement(_ref4) {
|
|
|
4677
5093
|
var _useTimeseriesTransla3 = useTimeseriesTranslation(),
|
|
4678
5094
|
t = _useTimeseriesTransla3.t;
|
|
4679
5095
|
if (isLoading) {
|
|
4680
|
-
return jsx(LoadingIndicator, {
|
|
5096
|
+
return /*#__PURE__*/jsx(LoadingIndicator, {
|
|
4681
5097
|
subtitle: t('timeseries-info-instance-dimensions'),
|
|
4682
5098
|
textStyle: textStyle$1
|
|
4683
5099
|
});
|
|
4684
5100
|
}
|
|
4685
|
-
return jsxs(Fragment, {
|
|
4686
|
-
children: [jsx(Typography, {
|
|
5101
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5102
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4687
5103
|
sx: textStyle$1,
|
|
4688
5104
|
variant: "subtitle2",
|
|
4689
5105
|
children: t('timeseries-info-instance-dimensions')
|
|
4690
|
-
}), !instanceInformation || instanceInformation.length === 0 ? jsx(Typography, {
|
|
5106
|
+
}), !instanceInformation || instanceInformation.length === 0 ? /*#__PURE__*/jsx(Typography, {
|
|
4691
5107
|
sx: textStyleWithMargin$1,
|
|
4692
5108
|
variant: "body2",
|
|
4693
5109
|
children: t('timeseries-info-no-data-available')
|
|
@@ -4695,7 +5111,7 @@ var DimensionInfoElement = function DimensionInfoElement(_ref4) {
|
|
|
4695
5111
|
// eslint-disable-next-line @typescript-eslint/require-array-sort-compare
|
|
4696
5112
|
[].concat(instanceInformation).sort().reverse().map(function (element) {
|
|
4697
5113
|
var infoList = generateInfoList(element, t);
|
|
4698
|
-
return jsx(ParameterInfoList, {
|
|
5114
|
+
return /*#__PURE__*/jsx(ParameterInfoList, {
|
|
4699
5115
|
label: element.id,
|
|
4700
5116
|
list: infoList
|
|
4701
5117
|
}, element.id);
|
|
@@ -4712,12 +5128,12 @@ var textStyleWithMargin$1 = Object.assign({}, textStyle$1, {
|
|
|
4712
5128
|
var ParameterInfoText$1 = function ParameterInfoText(_ref5) {
|
|
4713
5129
|
var label = _ref5.label,
|
|
4714
5130
|
value = _ref5.value;
|
|
4715
|
-
return jsxs(Fragment, {
|
|
4716
|
-
children: [jsx(Typography, {
|
|
5131
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5132
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4717
5133
|
sx: textStyle$1,
|
|
4718
5134
|
variant: "subtitle2",
|
|
4719
5135
|
children: label
|
|
4720
|
-
}), jsx(Typography, {
|
|
5136
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
4721
5137
|
sx: textStyleWithMargin$1,
|
|
4722
5138
|
variant: "body2",
|
|
4723
5139
|
children: value
|
|
@@ -4730,41 +5146,41 @@ var valueStyle = Object.assign({}, textStyle$1, {
|
|
|
4730
5146
|
var ParameterInfoList = function ParameterInfoList(_ref6) {
|
|
4731
5147
|
var label = _ref6.label,
|
|
4732
5148
|
list = _ref6.list;
|
|
4733
|
-
return jsxs(Fragment, {
|
|
4734
|
-
children: [jsx(Typography, {
|
|
5149
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
5150
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
4735
5151
|
sx: textStyle$1,
|
|
4736
5152
|
variant: "subtitle2",
|
|
4737
5153
|
children: label
|
|
4738
|
-
}), list.length === 0 ? jsx(Typography, {
|
|
5154
|
+
}), list.length === 0 ? /*#__PURE__*/jsx(Typography, {
|
|
4739
5155
|
sx: textStyleWithMargin$1,
|
|
4740
5156
|
variant: "body2",
|
|
4741
5157
|
children: "-"
|
|
4742
|
-
}) : jsx(Grid, {
|
|
5158
|
+
}) : /*#__PURE__*/jsx(Grid, {
|
|
4743
5159
|
container: true,
|
|
4744
5160
|
direction: "column",
|
|
4745
5161
|
children: list.map(function (item) {
|
|
4746
|
-
return jsxs("div", {
|
|
4747
|
-
children: [jsxs(Grid, {
|
|
5162
|
+
return /*#__PURE__*/jsxs("div", {
|
|
5163
|
+
children: [/*#__PURE__*/jsxs(Grid, {
|
|
4748
5164
|
container: true,
|
|
4749
5165
|
direction: "row",
|
|
4750
|
-
children: [item.icon, jsx(Grid, {
|
|
5166
|
+
children: [item.icon, /*#__PURE__*/jsx(Grid, {
|
|
4751
5167
|
sx: {
|
|
4752
5168
|
marginLeft: '10px'
|
|
4753
5169
|
},
|
|
4754
|
-
children: jsxs(Typography, {
|
|
5170
|
+
children: /*#__PURE__*/jsxs(Typography, {
|
|
4755
5171
|
sx: textStyle$1,
|
|
4756
5172
|
variant: "body2",
|
|
4757
5173
|
children: [item.label, ":"]
|
|
4758
5174
|
})
|
|
4759
5175
|
})]
|
|
4760
|
-
}), jsx(Grid, {
|
|
5176
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
4761
5177
|
container: true,
|
|
4762
5178
|
direction: "row",
|
|
4763
5179
|
sx: {
|
|
4764
5180
|
marginBottom: 1,
|
|
4765
5181
|
paddingLeft: '34px'
|
|
4766
5182
|
},
|
|
4767
|
-
children: jsx(Typography, {
|
|
5183
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
4768
5184
|
sx: valueStyle,
|
|
4769
5185
|
variant: "body2",
|
|
4770
5186
|
children: item.value
|
|
@@ -4776,6 +5192,24 @@ var ParameterInfoList = function ParameterInfoList(_ref6) {
|
|
|
4776
5192
|
});
|
|
4777
5193
|
};
|
|
4778
5194
|
|
|
5195
|
+
/* *
|
|
5196
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5197
|
+
* you may not use this file except in compliance with the License.
|
|
5198
|
+
* You may obtain a copy of the License at
|
|
5199
|
+
*
|
|
5200
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5201
|
+
*
|
|
5202
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5203
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5204
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5205
|
+
* See the License for the specific language governing permissions and
|
|
5206
|
+
* limitations under the License.
|
|
5207
|
+
*
|
|
5208
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5209
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
5210
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5211
|
+
* */
|
|
5212
|
+
|
|
4779
5213
|
var ParameterInfoDialogConnect = function ParameterInfoDialogConnect() {
|
|
4780
5214
|
var _collection$dataQueri;
|
|
4781
5215
|
var panelId = useSelector(function (store) {
|
|
@@ -4805,7 +5239,7 @@ var ParameterInfoDialogConnect = function ParameterInfoDialogConnect() {
|
|
|
4805
5239
|
if (!currentParameterInfoDisplayed) {
|
|
4806
5240
|
return null;
|
|
4807
5241
|
}
|
|
4808
|
-
return jsx(ParameterInfoDialog, {
|
|
5242
|
+
return /*#__PURE__*/jsx(ParameterInfoDialog, {
|
|
4809
5243
|
collectionInformation: collection,
|
|
4810
5244
|
currentParameterInfo: currentParameterInfoDisplayed,
|
|
4811
5245
|
instanceInformation: instances,
|
|
@@ -4821,6 +5255,24 @@ var ParameterInfoDialogConnect = function ParameterInfoDialogConnect() {
|
|
|
4821
5255
|
});
|
|
4822
5256
|
};
|
|
4823
5257
|
|
|
5258
|
+
/* *
|
|
5259
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5260
|
+
* you may not use this file except in compliance with the License.
|
|
5261
|
+
* You may obtain a copy of the License at
|
|
5262
|
+
*
|
|
5263
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5264
|
+
*
|
|
5265
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5266
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5267
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5268
|
+
* See the License for the specific language governing permissions and
|
|
5269
|
+
* limitations under the License.
|
|
5270
|
+
*
|
|
5271
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5272
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
5273
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5274
|
+
* */
|
|
5275
|
+
|
|
4824
5276
|
var sortByService$1 = function sortByService(serviceObj) {
|
|
4825
5277
|
// Need to make a copy as we are not allowed to mutate the original serviceObj and .sort mutates
|
|
4826
5278
|
var newServiceObj = serviceObj.slice();
|
|
@@ -4880,7 +5332,7 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
|
|
|
4880
5332
|
(_dialogRef$current = dialogRef.current) == null || _dialogRef$current.focus();
|
|
4881
5333
|
}, []);
|
|
4882
5334
|
if (!services || services.length === 0) {
|
|
4883
|
-
return jsx(Box, {
|
|
5335
|
+
return /*#__PURE__*/jsx(Box, {
|
|
4884
5336
|
onKeyDown: function onKeyDown(event) {
|
|
4885
5337
|
if (event.key !== 'Escape') {
|
|
4886
5338
|
event.stopPropagation();
|
|
@@ -4896,7 +5348,7 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
|
|
|
4896
5348
|
children: t('timeseries-no-services')
|
|
4897
5349
|
});
|
|
4898
5350
|
}
|
|
4899
|
-
return jsxs(Box, {
|
|
5351
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
4900
5352
|
"aria-label": t('timeseries-services-options'),
|
|
4901
5353
|
onKeyDown: function onKeyDown(event) {
|
|
4902
5354
|
if (event.key !== 'Escape') {
|
|
@@ -4906,21 +5358,21 @@ var ServiceOptionsDialog = function ServiceOptionsDialog(_ref) {
|
|
|
4906
5358
|
ref: dialogRef,
|
|
4907
5359
|
sx: styles.servicesContainer,
|
|
4908
5360
|
tabIndex: -1,
|
|
4909
|
-
children: [jsx(Box, {
|
|
5361
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
4910
5362
|
sx: styles.header,
|
|
4911
5363
|
children: t('timeseries-services')
|
|
4912
|
-
}), jsx(Rows, {
|
|
5364
|
+
}), /*#__PURE__*/jsx(Rows, {
|
|
4913
5365
|
openServicePopup: openServicePopup,
|
|
4914
5366
|
parametersInUse: parametersInUse,
|
|
4915
5367
|
removeService: removeService,
|
|
4916
5368
|
services: services
|
|
4917
|
-
}), jsx(Box, {
|
|
5369
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
4918
5370
|
sx: styles.footer,
|
|
4919
|
-
children: jsx(Button, {
|
|
5371
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
4920
5372
|
"data-testid": "add-new-ts-service",
|
|
4921
5373
|
onClick: openNewServicePopup,
|
|
4922
5374
|
onKeyDown: stopTabPropagation,
|
|
4923
|
-
startIcon: jsx(Add, {}),
|
|
5375
|
+
startIcon: /*#__PURE__*/jsx(Add, {}),
|
|
4924
5376
|
sx: styles.button,
|
|
4925
5377
|
variant: "tertiary",
|
|
4926
5378
|
children: t('timeseries-add-service')
|
|
@@ -4955,7 +5407,7 @@ var Rows = function Rows(_ref2) {
|
|
|
4955
5407
|
var sortedServices = sortByService$1(services);
|
|
4956
5408
|
var _useTimeseriesTransla2 = useTimeseriesTranslation(),
|
|
4957
5409
|
t = _useTimeseriesTransla2.t;
|
|
4958
|
-
return jsx(List, {
|
|
5410
|
+
return /*#__PURE__*/jsx(List, {
|
|
4959
5411
|
disablePadding: true,
|
|
4960
5412
|
children: sortedServices.map(function (service) {
|
|
4961
5413
|
var url = service.url,
|
|
@@ -4967,8 +5419,8 @@ var Rows = function Rows(_ref2) {
|
|
|
4967
5419
|
var openDialog = function openDialog() {
|
|
4968
5420
|
return openServicePopup(userAddedService ? 'edit' : 'show', id, url);
|
|
4969
5421
|
};
|
|
4970
|
-
return jsx(ListItem, {
|
|
4971
|
-
secondaryAction: jsxs(Grid, {
|
|
5422
|
+
return /*#__PURE__*/jsx(ListItem, {
|
|
5423
|
+
secondaryAction: /*#__PURE__*/jsxs(Grid, {
|
|
4972
5424
|
container: true,
|
|
4973
5425
|
justifyContent: "left",
|
|
4974
5426
|
sx: {
|
|
@@ -4978,60 +5430,60 @@ var Rows = function Rows(_ref2) {
|
|
|
4978
5430
|
marginLeft: 1
|
|
4979
5431
|
}
|
|
4980
5432
|
},
|
|
4981
|
-
children: [jsx(CustomTooltip, {
|
|
5433
|
+
children: [/*#__PURE__*/jsx(CustomTooltip, {
|
|
4982
5434
|
placement: "left",
|
|
4983
5435
|
slotProps: {
|
|
4984
5436
|
popper: tooltipPopperProps
|
|
4985
5437
|
},
|
|
4986
5438
|
title: t('timeseries-update-service'),
|
|
4987
|
-
children: jsx("span", {
|
|
4988
|
-
children: jsx(CustomIconButton, {
|
|
5439
|
+
children: /*#__PURE__*/jsx("span", {
|
|
5440
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
4989
5441
|
"aria-label": t('timeseries-update-service'),
|
|
4990
5442
|
disabled: true,
|
|
4991
5443
|
onClick: function onClick() {},
|
|
4992
5444
|
onKeyDown: stopTabPropagation,
|
|
4993
|
-
children: jsx(Cached, {})
|
|
5445
|
+
children: /*#__PURE__*/jsx(Cached, {})
|
|
4994
5446
|
})
|
|
4995
5447
|
})
|
|
4996
|
-
}), userAddedService ? jsx(CustomTooltip, {
|
|
5448
|
+
}), userAddedService ? /*#__PURE__*/jsx(CustomTooltip, {
|
|
4997
5449
|
placement: "left",
|
|
4998
5450
|
slotProps: {
|
|
4999
5451
|
popper: tooltipPopperProps
|
|
5000
5452
|
},
|
|
5001
5453
|
title: t('timeseries-edit-service'),
|
|
5002
|
-
children: jsx("span", {
|
|
5003
|
-
children: jsx(CustomIconButton, {
|
|
5454
|
+
children: /*#__PURE__*/jsx("span", {
|
|
5455
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
5004
5456
|
"aria-label": t('timeseries-edit-service'),
|
|
5005
5457
|
"data-testid": "edit-button-" + id,
|
|
5006
5458
|
onClick: openDialog,
|
|
5007
5459
|
onKeyDown: stopTabPropagation,
|
|
5008
|
-
children: jsx(Edit, {})
|
|
5460
|
+
children: /*#__PURE__*/jsx(Edit, {})
|
|
5009
5461
|
})
|
|
5010
5462
|
})
|
|
5011
|
-
}) : jsx(CustomTooltip, {
|
|
5463
|
+
}) : /*#__PURE__*/jsx(CustomTooltip, {
|
|
5012
5464
|
placement: "left",
|
|
5013
5465
|
slotProps: {
|
|
5014
5466
|
popper: tooltipPopperProps
|
|
5015
5467
|
},
|
|
5016
5468
|
title: t('timeseries-show-service'),
|
|
5017
|
-
children: jsx("span", {
|
|
5018
|
-
children: jsx(CustomIconButton, {
|
|
5469
|
+
children: /*#__PURE__*/jsx("span", {
|
|
5470
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
5019
5471
|
"aria-label": t('timeseries-show-service'),
|
|
5020
5472
|
"data-testid": "show-button-" + id,
|
|
5021
5473
|
onClick: openDialog,
|
|
5022
5474
|
onKeyDown: stopTabPropagation,
|
|
5023
|
-
children: jsx(Visibility, {})
|
|
5475
|
+
children: /*#__PURE__*/jsx(Visibility, {})
|
|
5024
5476
|
})
|
|
5025
5477
|
})
|
|
5026
|
-
}), !!userAddedService && jsx(Box, {
|
|
5027
|
-
children: jsx(CustomTooltip, {
|
|
5478
|
+
}), !!userAddedService && /*#__PURE__*/jsx(Box, {
|
|
5479
|
+
children: /*#__PURE__*/jsx(CustomTooltip, {
|
|
5028
5480
|
placement: "left",
|
|
5029
5481
|
slotProps: {
|
|
5030
5482
|
popper: tooltipPopperProps
|
|
5031
5483
|
},
|
|
5032
5484
|
title: deleteServiceTitle(serviceHasParametersInUse, t),
|
|
5033
|
-
children: jsx("span", {
|
|
5034
|
-
children: jsx(CustomIconButton, {
|
|
5485
|
+
children: /*#__PURE__*/jsx("span", {
|
|
5486
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
5035
5487
|
"aria-label": t('timeseries-delete-service'),
|
|
5036
5488
|
"data-testid": "remove-button-" + id,
|
|
5037
5489
|
disabled: serviceHasParametersInUse,
|
|
@@ -5041,17 +5493,17 @@ var Rows = function Rows(_ref2) {
|
|
|
5041
5493
|
}));
|
|
5042
5494
|
},
|
|
5043
5495
|
onKeyDown: stopTabPropagation,
|
|
5044
|
-
children: jsx(Delete, {})
|
|
5496
|
+
children: /*#__PURE__*/jsx(Delete, {})
|
|
5045
5497
|
})
|
|
5046
5498
|
})
|
|
5047
5499
|
})
|
|
5048
5500
|
})]
|
|
5049
5501
|
}),
|
|
5050
|
-
children: jsx(ListItemText, {
|
|
5502
|
+
children: /*#__PURE__*/jsx(ListItemText, {
|
|
5051
5503
|
style: {
|
|
5052
5504
|
fontSize: '16px'
|
|
5053
5505
|
},
|
|
5054
|
-
children: jsx(Typography, {
|
|
5506
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
5055
5507
|
noWrap: true,
|
|
5056
5508
|
style: {
|
|
5057
5509
|
textOverflow: 'ellipsis',
|
|
@@ -5065,6 +5517,24 @@ var Rows = function Rows(_ref2) {
|
|
|
5065
5517
|
});
|
|
5066
5518
|
};
|
|
5067
5519
|
|
|
5520
|
+
/* *
|
|
5521
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5522
|
+
* you may not use this file except in compliance with the License.
|
|
5523
|
+
* You may obtain a copy of the License at
|
|
5524
|
+
*
|
|
5525
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5526
|
+
*
|
|
5527
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5528
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5529
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5530
|
+
* See the License for the specific language governing permissions and
|
|
5531
|
+
* limitations under the License.
|
|
5532
|
+
*
|
|
5533
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
5534
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5535
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5536
|
+
* */
|
|
5537
|
+
|
|
5068
5538
|
var ServiceOptionsButtonConnect = function ServiceOptionsButtonConnect(_ref) {
|
|
5069
5539
|
var panelId = _ref.panelId;
|
|
5070
5540
|
var dispatch = useDispatch();
|
|
@@ -5102,9 +5572,9 @@ var ServiceOptionsButtonConnect = function ServiceOptionsButtonConnect(_ref) {
|
|
|
5102
5572
|
}));
|
|
5103
5573
|
}
|
|
5104
5574
|
}, [dispatch, panelId]);
|
|
5105
|
-
return jsx(ToggleMenu, {
|
|
5575
|
+
return /*#__PURE__*/jsx(ToggleMenu, {
|
|
5106
5576
|
menuPosition: "bottom",
|
|
5107
|
-
children: jsx(ServiceOptionsDialog, {
|
|
5577
|
+
children: /*#__PURE__*/jsx(ServiceOptionsDialog, {
|
|
5108
5578
|
openNewServicePopup: openNewServicePopup,
|
|
5109
5579
|
openServicePopup: openServicePopup,
|
|
5110
5580
|
parametersInUse: parametersInUse,
|
|
@@ -5131,6 +5601,7 @@ var ServiceOptionsButtonConnect = function ServiceOptionsButtonConnect(_ref) {
|
|
|
5131
5601
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
5132
5602
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5133
5603
|
* */
|
|
5604
|
+
|
|
5134
5605
|
var validateServiceName = function validateServiceName(value, services, ownServiceName) {
|
|
5135
5606
|
if (ownServiceName === void 0) {
|
|
5136
5607
|
ownServiceName = '';
|
|
@@ -5380,16 +5851,16 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5380
5851
|
var isShowPopup = servicePopupVariant === 'show';
|
|
5381
5852
|
var isServiceUrlDisabled = isShowPopup || servicePopupVariant === 'edit';
|
|
5382
5853
|
//
|
|
5383
|
-
return jsxs(CustomDialog, {
|
|
5384
|
-
actions: isShowPopup ? jsx(Button, {
|
|
5854
|
+
return /*#__PURE__*/jsxs(CustomDialog, {
|
|
5855
|
+
actions: isShowPopup ? /*#__PURE__*/jsx(Button, {
|
|
5385
5856
|
onClick: closePopup,
|
|
5386
5857
|
sx: {
|
|
5387
5858
|
width: '117px'
|
|
5388
5859
|
},
|
|
5389
5860
|
variant: "tertiary",
|
|
5390
5861
|
children: t('timeseries-close')
|
|
5391
|
-
}) : jsxs(Fragment, {
|
|
5392
|
-
children: [jsx(Button, {
|
|
5862
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
5863
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
5393
5864
|
"data-testid": "closePopupButtonCancel",
|
|
5394
5865
|
onClick: closePopup,
|
|
5395
5866
|
sx: {
|
|
@@ -5397,7 +5868,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5397
5868
|
},
|
|
5398
5869
|
variant: "tertiary",
|
|
5399
5870
|
children: t('timeseries-cancel')
|
|
5400
|
-
}), jsx(Button, {
|
|
5871
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
5401
5872
|
"data-testid": "saveServiceButton",
|
|
5402
5873
|
disabled: isSubmitDisabled || isLoading,
|
|
5403
5874
|
form: "timeseriesServicePopupForm",
|
|
@@ -5417,11 +5888,11 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5417
5888
|
onClose: closePopup,
|
|
5418
5889
|
open: isOpen,
|
|
5419
5890
|
title: t(getTranslationIdForVariant(servicePopupVariant)),
|
|
5420
|
-
children: [!!isLoading && jsx(Box, {
|
|
5891
|
+
children: [!!isLoading && /*#__PURE__*/jsx(Box, {
|
|
5421
5892
|
sx: {
|
|
5422
5893
|
position: 'relative'
|
|
5423
5894
|
},
|
|
5424
|
-
children: jsx(LinearProgress, {
|
|
5895
|
+
children: /*#__PURE__*/jsx(LinearProgress, {
|
|
5425
5896
|
color: "secondary",
|
|
5426
5897
|
"data-testid": "loadingIndicator",
|
|
5427
5898
|
sx: {
|
|
@@ -5429,7 +5900,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5429
5900
|
width: '100%'
|
|
5430
5901
|
}
|
|
5431
5902
|
})
|
|
5432
|
-
}), jsxs("form", {
|
|
5903
|
+
}), /*#__PURE__*/jsxs("form", {
|
|
5433
5904
|
id: "timeseriesServicePopupForm",
|
|
5434
5905
|
onSubmit: handleSubmit(/*#__PURE__*/function () {
|
|
5435
5906
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(formValues) {
|
|
@@ -5447,15 +5918,15 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5447
5918
|
return _ref4.apply(this, arguments);
|
|
5448
5919
|
};
|
|
5449
5920
|
}()),
|
|
5450
|
-
children: [jsx(ReactHookFormTextField, {
|
|
5921
|
+
children: [/*#__PURE__*/jsx(ReactHookFormTextField, {
|
|
5451
5922
|
autoFocus: !shouldDisableAutoFocus,
|
|
5452
5923
|
defaultValue: serviceUrl,
|
|
5453
5924
|
disabled: isServiceUrlDisabled || isLoading,
|
|
5454
5925
|
inputSlotProps: {
|
|
5455
5926
|
disableUnderline: isShowPopup,
|
|
5456
|
-
endAdornment: isShowPopup && jsx(InputAdornment, {
|
|
5927
|
+
endAdornment: isShowPopup && /*#__PURE__*/jsx(InputAdornment, {
|
|
5457
5928
|
position: "end",
|
|
5458
|
-
children: jsx(CustomIconButton, {
|
|
5929
|
+
children: /*#__PURE__*/jsx(CustomIconButton, {
|
|
5459
5930
|
"aria-label": t('timeseries-service-url-copy'),
|
|
5460
5931
|
onClick: function onClick() {
|
|
5461
5932
|
void navigator.clipboard.writeText(serviceUrl);
|
|
@@ -5464,7 +5935,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5464
5935
|
sx: {
|
|
5465
5936
|
marginTop: 0.5
|
|
5466
5937
|
},
|
|
5467
|
-
children: jsx(Copy, {})
|
|
5938
|
+
children: /*#__PURE__*/jsx(Copy, {})
|
|
5468
5939
|
})
|
|
5469
5940
|
})
|
|
5470
5941
|
},
|
|
@@ -5481,7 +5952,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5481
5952
|
})
|
|
5482
5953
|
},
|
|
5483
5954
|
sx: style$1.textField
|
|
5484
|
-
}), jsx(ReactHookFormTextField, {
|
|
5955
|
+
}), /*#__PURE__*/jsx(ReactHookFormTextField, {
|
|
5485
5956
|
defaultValue: serviceName,
|
|
5486
5957
|
disabled: isShowPopup || isLoading,
|
|
5487
5958
|
inputSlotProps: {
|
|
@@ -5497,7 +5968,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5497
5968
|
}
|
|
5498
5969
|
},
|
|
5499
5970
|
sx: style$1.textField
|
|
5500
|
-
}), jsx(ReactHookFormTextField, {
|
|
5971
|
+
}), /*#__PURE__*/jsx(ReactHookFormTextField, {
|
|
5501
5972
|
defaultValue: serviceDescription || '',
|
|
5502
5973
|
disabled: isShowPopup || isLoading,
|
|
5503
5974
|
helperText: !isShowPopup ? t('timeseries-description-helper-text') : '',
|
|
@@ -5510,7 +5981,7 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5510
5981
|
name: fields.serviceDescription.name,
|
|
5511
5982
|
rows: 4,
|
|
5512
5983
|
sx: style$1.textField
|
|
5513
|
-
}), jsx(ReactHookFormSelect, {
|
|
5984
|
+
}), /*#__PURE__*/jsx(ReactHookFormSelect, {
|
|
5514
5985
|
defaultValue: serviceType || 'EDR',
|
|
5515
5986
|
disabled: true,
|
|
5516
5987
|
isReadOnly: isShowPopup,
|
|
@@ -5519,11 +5990,11 @@ var ServicePopupUnwrapped = function ServicePopupUnwrapped(_ref2) {
|
|
|
5519
5990
|
rules: {
|
|
5520
5991
|
required: true
|
|
5521
5992
|
},
|
|
5522
|
-
children: jsx(MenuItem, {
|
|
5993
|
+
children: /*#__PURE__*/jsx(MenuItem, {
|
|
5523
5994
|
value: "EDR",
|
|
5524
5995
|
children: "EDR"
|
|
5525
5996
|
})
|
|
5526
|
-
}), !isServiceUrlDisabled && jsx(InitialValidationsTrigger, {
|
|
5997
|
+
}), !isServiceUrlDisabled && /*#__PURE__*/jsx(InitialValidationsTrigger, {
|
|
5527
5998
|
getValues: getValues,
|
|
5528
5999
|
onValidField: onBlurServiceUrl,
|
|
5529
6000
|
trigger: trigger
|
|
@@ -5536,7 +6007,7 @@ var ServicePopup = function ServicePopup(props) {
|
|
|
5536
6007
|
serviceName = props.serviceName,
|
|
5537
6008
|
serviceDescription = props.serviceDescription,
|
|
5538
6009
|
serviceType = props.serviceType;
|
|
5539
|
-
return jsx(ReactHookFormProvider, {
|
|
6010
|
+
return /*#__PURE__*/jsx(ReactHookFormProvider, {
|
|
5540
6011
|
options: Object.assign({}, defaultFormOptions, {
|
|
5541
6012
|
defaultValues: {
|
|
5542
6013
|
serviceUrl: serviceUrl,
|
|
@@ -5545,10 +6016,28 @@ var ServicePopup = function ServicePopup(props) {
|
|
|
5545
6016
|
serviceType: serviceType
|
|
5546
6017
|
}
|
|
5547
6018
|
}),
|
|
5548
|
-
children: jsx(ServicePopupUnwrapped, Object.assign({}, props))
|
|
6019
|
+
children: /*#__PURE__*/jsx(ServicePopupUnwrapped, Object.assign({}, props))
|
|
5549
6020
|
});
|
|
5550
6021
|
};
|
|
5551
6022
|
|
|
6023
|
+
/* *
|
|
6024
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6025
|
+
* you may not use this file except in compliance with the License.
|
|
6026
|
+
* You may obtain a copy of the License at
|
|
6027
|
+
*
|
|
6028
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6029
|
+
*
|
|
6030
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6031
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6032
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6033
|
+
* See the License for the specific language governing permissions and
|
|
6034
|
+
* limitations under the License.
|
|
6035
|
+
*
|
|
6036
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6037
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
6038
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6039
|
+
* */
|
|
6040
|
+
|
|
5552
6041
|
// Extracted from ServicePopupConnect as the getActiveServices and getActiveServiceById selectors
|
|
5553
6042
|
// Result in many rerenders. By extracting we're able to only render this component and these selectors
|
|
5554
6043
|
// when the dialog is open
|
|
@@ -5584,7 +6073,7 @@ var ServicePopupDialogConnect = function ServicePopupDialogConnect(_ref) {
|
|
|
5584
6073
|
message: message
|
|
5585
6074
|
}));
|
|
5586
6075
|
}, [dispatch]);
|
|
5587
|
-
return jsx(ServicePopup, {
|
|
6076
|
+
return /*#__PURE__*/jsx(ServicePopup, {
|
|
5588
6077
|
closePopup: setServicePopupClosed,
|
|
5589
6078
|
isOpen: isOpen,
|
|
5590
6079
|
serviceDescription: activeService == null ? void 0 : activeService.description,
|
|
@@ -5597,6 +6086,24 @@ var ServicePopupDialogConnect = function ServicePopupDialogConnect(_ref) {
|
|
|
5597
6086
|
});
|
|
5598
6087
|
};
|
|
5599
6088
|
|
|
6089
|
+
/* *
|
|
6090
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6091
|
+
* you may not use this file except in compliance with the License.
|
|
6092
|
+
* You may obtain a copy of the License at
|
|
6093
|
+
*
|
|
6094
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6095
|
+
*
|
|
6096
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6097
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6098
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6099
|
+
* See the License for the specific language governing permissions and
|
|
6100
|
+
* limitations under the License.
|
|
6101
|
+
*
|
|
6102
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6103
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
6104
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6105
|
+
* */
|
|
6106
|
+
|
|
5600
6107
|
var ServicePopupConnect = function ServicePopupConnect(_ref) {
|
|
5601
6108
|
var panelId = _ref.panelId;
|
|
5602
6109
|
var dispatch = useDispatch();
|
|
@@ -5615,7 +6122,7 @@ var ServicePopupConnect = function ServicePopupConnect(_ref) {
|
|
|
5615
6122
|
if (!isOpen) {
|
|
5616
6123
|
return null;
|
|
5617
6124
|
}
|
|
5618
|
-
return jsx(ServicePopupDialogConnect, {
|
|
6125
|
+
return /*#__PURE__*/jsx(ServicePopupDialogConnect, {
|
|
5619
6126
|
isOpen: isOpen,
|
|
5620
6127
|
panelId: panelId,
|
|
5621
6128
|
serviceId: serviceId,
|
|
@@ -5625,6 +6132,24 @@ var ServicePopupConnect = function ServicePopupConnect(_ref) {
|
|
|
5625
6132
|
});
|
|
5626
6133
|
};
|
|
5627
6134
|
|
|
6135
|
+
/* *
|
|
6136
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6137
|
+
* you may not use this file except in compliance with the License.
|
|
6138
|
+
* You may obtain a copy of the License at
|
|
6139
|
+
*
|
|
6140
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6141
|
+
*
|
|
6142
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6143
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6144
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6145
|
+
* See the License for the specific language governing permissions and
|
|
6146
|
+
* limitations under the License.
|
|
6147
|
+
*
|
|
6148
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6149
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
6150
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6151
|
+
* */
|
|
6152
|
+
|
|
5628
6153
|
var SearchFieldConnect = function SearchFieldConnect(_ref) {
|
|
5629
6154
|
var panelId = _ref.panelId;
|
|
5630
6155
|
var dispatch = useDispatch();
|
|
@@ -5647,7 +6172,7 @@ var SearchFieldConnect = function SearchFieldConnect(_ref) {
|
|
|
5647
6172
|
panelId: panelId
|
|
5648
6173
|
}));
|
|
5649
6174
|
};
|
|
5650
|
-
return jsx(SearchField, {
|
|
6175
|
+
return /*#__PURE__*/jsx(SearchField, {
|
|
5651
6176
|
label: t('timeseries-search-ts-or-enter-url'),
|
|
5652
6177
|
onOpenServicePopup: toggleServicePopup,
|
|
5653
6178
|
searchFilter: searchFilter,
|
|
@@ -5672,6 +6197,7 @@ var SearchFieldConnect = function SearchFieldConnect(_ref) {
|
|
|
5672
6197
|
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
5673
6198
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
5674
6199
|
* */
|
|
6200
|
+
|
|
5675
6201
|
var filterCollectionsParametersFromService = function filterCollectionsParametersFromService(collectionList, searchString, serviceFilterChips, allFilterChipsEnabled) {
|
|
5676
6202
|
// If no search string and all filterchips are enabled, simply return the same list
|
|
5677
6203
|
if (searchString === '' && allFilterChipsEnabled) {
|
|
@@ -5692,6 +6218,7 @@ var filterCollectionsParametersFromService = function filterCollectionsParameter
|
|
|
5692
6218
|
var isSearchTextInServiceName = (_collection$serviceNa = collection.serviceName) == null ? void 0 : _collection$serviceNa.toLowerCase().includes(searchLowercase);
|
|
5693
6219
|
return isSearchTextInCollectionId || isSearchTextInCollectionTitle || isSearchTextInServiceId || isSearchTextInServiceName;
|
|
5694
6220
|
});
|
|
6221
|
+
|
|
5695
6222
|
// Not found in collection - search in parameters
|
|
5696
6223
|
var filteredParamters = collection.parameters.reduce(function (filteredParameterList, parameter) {
|
|
5697
6224
|
var parameterContainsSearch = searchStringArray.every(function (search) {
|
|
@@ -5715,6 +6242,24 @@ var filterCollectionsParametersFromService = function filterCollectionsParameter
|
|
|
5715
6242
|
}, []);
|
|
5716
6243
|
};
|
|
5717
6244
|
|
|
6245
|
+
/* *
|
|
6246
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6247
|
+
* you may not use this file except in compliance with the License.
|
|
6248
|
+
* You may obtain a copy of the License at
|
|
6249
|
+
*
|
|
6250
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6251
|
+
*
|
|
6252
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6253
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6254
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6255
|
+
* See the License for the specific language governing permissions and
|
|
6256
|
+
* limitations under the License.
|
|
6257
|
+
*
|
|
6258
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6259
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
6260
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6261
|
+
* */
|
|
6262
|
+
|
|
5718
6263
|
var RowComponent$1 = function RowComponent(_ref) {
|
|
5719
6264
|
var index = _ref.index,
|
|
5720
6265
|
style = _ref.style,
|
|
@@ -5728,9 +6273,9 @@ var RowComponent$1 = function RowComponent(_ref) {
|
|
|
5728
6273
|
t = _ref.t;
|
|
5729
6274
|
var collectionListItem = filteredCollectionList[index];
|
|
5730
6275
|
var collectionId = collectionListItem.collectionId;
|
|
5731
|
-
return jsxs(Box, {
|
|
6276
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
5732
6277
|
style: style,
|
|
5733
|
-
children: [jsx(ListItem, {
|
|
6278
|
+
children: [/*#__PURE__*/jsx(ListItem, {
|
|
5734
6279
|
sx: {
|
|
5735
6280
|
backgroundColor: 'geowebColors.cards.cardContainer',
|
|
5736
6281
|
height: '44px',
|
|
@@ -5749,7 +6294,7 @@ var RowComponent$1 = function RowComponent(_ref) {
|
|
|
5749
6294
|
overflow: 'hidden'
|
|
5750
6295
|
}
|
|
5751
6296
|
},
|
|
5752
|
-
children: jsxs(ListItemButton, {
|
|
6297
|
+
children: /*#__PURE__*/jsxs(ListItemButton, {
|
|
5753
6298
|
onClick: function onClick() {
|
|
5754
6299
|
var _Object$assign;
|
|
5755
6300
|
var currentState = collectionListItemDetails[collectionId];
|
|
@@ -5760,30 +6305,30 @@ var RowComponent$1 = function RowComponent(_ref) {
|
|
|
5760
6305
|
paddingLeft: '24px',
|
|
5761
6306
|
paddingRight: '8px'
|
|
5762
6307
|
},
|
|
5763
|
-
children: [jsxs(Grid, {
|
|
6308
|
+
children: [/*#__PURE__*/jsxs(Grid, {
|
|
5764
6309
|
container: true,
|
|
5765
6310
|
size: "grow",
|
|
5766
6311
|
sx: {
|
|
5767
6312
|
justifyContent: 'space-between',
|
|
5768
6313
|
alignItems: 'center'
|
|
5769
6314
|
},
|
|
5770
|
-
children: [jsxs(Grid, {
|
|
6315
|
+
children: [/*#__PURE__*/jsxs(Grid, {
|
|
5771
6316
|
size: "grow",
|
|
5772
|
-
children: [jsx(Box, {
|
|
6317
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
5773
6318
|
sx: fontStyling(),
|
|
5774
|
-
children: jsx(SearchHighlight, {
|
|
6319
|
+
children: /*#__PURE__*/jsx(SearchHighlight, {
|
|
5775
6320
|
search: searchFilter,
|
|
5776
6321
|
text: collectionListItem.collectionTitle || collectionListItem.collectionId
|
|
5777
6322
|
})
|
|
5778
|
-
}), jsx(Box, {
|
|
6323
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
5779
6324
|
sx: fontStyling(false),
|
|
5780
|
-
children: jsx(SearchHighlight, {
|
|
6325
|
+
children: /*#__PURE__*/jsx(SearchHighlight, {
|
|
5781
6326
|
search: searchFilter,
|
|
5782
6327
|
text: collectionListItem.serviceName
|
|
5783
6328
|
})
|
|
5784
6329
|
})]
|
|
5785
|
-
}), jsx(Grid, {
|
|
5786
|
-
children: jsx(ListItemText, {
|
|
6330
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
6331
|
+
children: /*#__PURE__*/jsx(ListItemText, {
|
|
5787
6332
|
primary: collectionListItem.parameters.length + " " + t('timeseries-results'),
|
|
5788
6333
|
sx: {
|
|
5789
6334
|
paddingLeft: 1,
|
|
@@ -5792,12 +6337,12 @@ var RowComponent$1 = function RowComponent(_ref) {
|
|
|
5792
6337
|
}
|
|
5793
6338
|
})
|
|
5794
6339
|
})]
|
|
5795
|
-
}), collectionListItemDetails[collectionId] ? jsx(ChevronUp, {}) : jsx(ChevronDown, {})]
|
|
6340
|
+
}), collectionListItemDetails[collectionId] ? /*#__PURE__*/jsx(ChevronUp, {}) : /*#__PURE__*/jsx(ChevronDown, {})]
|
|
5796
6341
|
})
|
|
5797
|
-
}), jsx(Collapse, {
|
|
6342
|
+
}), /*#__PURE__*/jsx(Collapse, {
|
|
5798
6343
|
"in": collectionListItemDetails[collectionId],
|
|
5799
6344
|
unmountOnExit: true,
|
|
5800
|
-
children: jsxs(List, {
|
|
6345
|
+
children: /*#__PURE__*/jsxs(List, {
|
|
5801
6346
|
sx: {
|
|
5802
6347
|
paddingBottom: DEFAULT_PARAMTER_LIST_PADDING_BOTTOM + "px",
|
|
5803
6348
|
paddingTop: 0,
|
|
@@ -5810,7 +6355,7 @@ var RowComponent$1 = function RowComponent(_ref) {
|
|
|
5810
6355
|
boxShadow: 1,
|
|
5811
6356
|
top: -5
|
|
5812
6357
|
},
|
|
5813
|
-
children: [(collectionListItem == null ? void 0 : collectionListItem.parameters.length) < 1 && jsx(ListItem, {
|
|
6358
|
+
children: [(collectionListItem == null ? void 0 : collectionListItem.parameters.length) < 1 && /*#__PURE__*/jsx(ListItem, {
|
|
5814
6359
|
role: "listitem",
|
|
5815
6360
|
sx: {
|
|
5816
6361
|
height: DEFAULT_PARAMETER_ROW_HEIGHT + 4 + "px",
|
|
@@ -5826,7 +6371,7 @@ var RowComponent$1 = function RowComponent(_ref) {
|
|
|
5826
6371
|
overflow: 'hidden'
|
|
5827
6372
|
}
|
|
5828
6373
|
},
|
|
5829
|
-
children: jsx(ListItemText, {
|
|
6374
|
+
children: /*#__PURE__*/jsx(ListItemText, {
|
|
5830
6375
|
secondary: t('timeseries-no-params'),
|
|
5831
6376
|
sx: {
|
|
5832
6377
|
paddingLeft: 1,
|
|
@@ -5839,7 +6384,7 @@ var RowComponent$1 = function RowComponent(_ref) {
|
|
|
5839
6384
|
});
|
|
5840
6385
|
var plotHasParameter = Boolean(plotParameter);
|
|
5841
6386
|
var paramDisplayName = parameter.propertyLabel ? parameter.propertyLabel + " (" + parameter.propertyName + ")" : parameter.propertyName;
|
|
5842
|
-
return jsx(ListItem, {
|
|
6387
|
+
return /*#__PURE__*/jsx(ListItem, {
|
|
5843
6388
|
"aria-label": paramDisplayName,
|
|
5844
6389
|
role: "listitem",
|
|
5845
6390
|
sx: {
|
|
@@ -5861,33 +6406,33 @@ var RowComponent$1 = function RowComponent(_ref) {
|
|
|
5861
6406
|
backgroundColor: 'geowebColors.cards.cardContainerMouseOver'
|
|
5862
6407
|
}
|
|
5863
6408
|
},
|
|
5864
|
-
children: jsxs(Grid, {
|
|
6409
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
5865
6410
|
container: true,
|
|
5866
6411
|
size: "grow",
|
|
5867
6412
|
sx: {
|
|
5868
6413
|
justifyContent: 'space-between',
|
|
5869
6414
|
alignItems: 'center'
|
|
5870
6415
|
},
|
|
5871
|
-
children: [jsx(Grid, {
|
|
6416
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
5872
6417
|
size: "grow",
|
|
5873
|
-
children: jsx(Box, {
|
|
6418
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
5874
6419
|
sx: fontStyling(),
|
|
5875
|
-
children: jsx(SearchHighlight, {
|
|
6420
|
+
children: /*#__PURE__*/jsx(SearchHighlight, {
|
|
5876
6421
|
search: searchFilter,
|
|
5877
6422
|
text: paramDisplayName
|
|
5878
6423
|
})
|
|
5879
6424
|
})
|
|
5880
|
-
}), jsx(Grid, {
|
|
5881
|
-
children: jsxs(Box, {
|
|
6425
|
+
}), /*#__PURE__*/jsx(Grid, {
|
|
6426
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
5882
6427
|
sx: {
|
|
5883
6428
|
marginRight: '8px'
|
|
5884
6429
|
},
|
|
5885
|
-
children: [jsx(ParameterInfoButtonConnect, {
|
|
6430
|
+
children: [/*#__PURE__*/jsx(ParameterInfoButtonConnect, {
|
|
5886
6431
|
panelId: panelId,
|
|
5887
6432
|
parameter: plotParameter != null ? plotParameter : Object.assign({}, parameter, {
|
|
5888
6433
|
plotId: selectPlot.plotId
|
|
5889
6434
|
})
|
|
5890
|
-
}), jsx(CustomToggleButton, {
|
|
6435
|
+
}), /*#__PURE__*/jsx(CustomToggleButton, {
|
|
5891
6436
|
fullWidth: true,
|
|
5892
6437
|
onClick: function onClick() {
|
|
5893
6438
|
var parameterWithPlotId = Object.assign({}, parameter, {
|
|
@@ -5957,20 +6502,20 @@ var TimeSeriesSelectList = function TimeSeriesSelectList(_ref2) {
|
|
|
5957
6502
|
var filterResults = filterCollectionsParametersFromService(collectionList, searchFilter, filterChipsServices, allFilterChipsEnabled);
|
|
5958
6503
|
setFilteredCollectionList(filterResults);
|
|
5959
6504
|
}, [searchFilter, collectionList, filterChipsServices, allFilterChipsEnabled]);
|
|
5960
|
-
return jsxs(Box, {
|
|
6505
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
5961
6506
|
"data-testid": "timeseriesSelectList",
|
|
5962
6507
|
sx: {
|
|
5963
6508
|
flex: 1,
|
|
5964
6509
|
minHeight: 0,
|
|
5965
6510
|
overflow: 'hidden'
|
|
5966
6511
|
},
|
|
5967
|
-
children: [jsxs(Box, {
|
|
6512
|
+
children: [/*#__PURE__*/jsxs(Box, {
|
|
5968
6513
|
sx: {
|
|
5969
6514
|
marginBottom: '4px',
|
|
5970
6515
|
fontSize: '12px'
|
|
5971
6516
|
},
|
|
5972
6517
|
children: [filteredCollectionList.length, " ", t('timeseries-results')]
|
|
5973
|
-
}), jsx(List$1, {
|
|
6518
|
+
}), /*#__PURE__*/jsx(List$1, {
|
|
5974
6519
|
rowComponent: RowComponent$1,
|
|
5975
6520
|
rowCount: filteredCollectionList.length,
|
|
5976
6521
|
rowHeight: function rowHeight(index) {
|
|
@@ -6001,6 +6546,24 @@ var TimeSeriesSelectList = function TimeSeriesSelectList(_ref2) {
|
|
|
6001
6546
|
});
|
|
6002
6547
|
};
|
|
6003
6548
|
|
|
6549
|
+
/* *
|
|
6550
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6551
|
+
* you may not use this file except in compliance with the License.
|
|
6552
|
+
* You may obtain a copy of the License at
|
|
6553
|
+
*
|
|
6554
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6555
|
+
*
|
|
6556
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6557
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6558
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6559
|
+
* See the License for the specific language governing permissions and
|
|
6560
|
+
* limitations under the License.
|
|
6561
|
+
*
|
|
6562
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6563
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
6564
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6565
|
+
* */
|
|
6566
|
+
|
|
6004
6567
|
var TimeSeriesSelectListConnect = /*#__PURE__*/memo(function (_ref) {
|
|
6005
6568
|
var selectPlot = _ref.selectPlot,
|
|
6006
6569
|
handleAddOrRemoveClick = _ref.handleAddOrRemoveClick,
|
|
@@ -6021,7 +6584,7 @@ var TimeSeriesSelectListConnect = /*#__PURE__*/memo(function (_ref) {
|
|
|
6021
6584
|
var searchFilter = useSelector(function (state) {
|
|
6022
6585
|
return getSearchFilter(state, panelId);
|
|
6023
6586
|
});
|
|
6024
|
-
return jsx(TimeSeriesSelectList, {
|
|
6587
|
+
return /*#__PURE__*/jsx(TimeSeriesSelectList, {
|
|
6025
6588
|
allFilterChipsEnabled: allFilterChipsEnabled,
|
|
6026
6589
|
collectionList: collectionList,
|
|
6027
6590
|
collectionListItemDetails: collectionListItemDetails,
|
|
@@ -6034,6 +6597,24 @@ var TimeSeriesSelectListConnect = /*#__PURE__*/memo(function (_ref) {
|
|
|
6034
6597
|
});
|
|
6035
6598
|
});
|
|
6036
6599
|
|
|
6600
|
+
/* *
|
|
6601
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6602
|
+
* you may not use this file except in compliance with the License.
|
|
6603
|
+
* You may obtain a copy of the License at
|
|
6604
|
+
*
|
|
6605
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6606
|
+
*
|
|
6607
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6608
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6609
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6610
|
+
* See the License for the specific language governing permissions and
|
|
6611
|
+
* limitations under the License.
|
|
6612
|
+
*
|
|
6613
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6614
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
6615
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6616
|
+
* */
|
|
6617
|
+
|
|
6037
6618
|
var style = {
|
|
6038
6619
|
borderRadius: '20px!important',
|
|
6039
6620
|
marginRight: '4px',
|
|
@@ -6054,10 +6635,10 @@ var ServiceChip = function ServiceChip(_ref) {
|
|
|
6054
6635
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
6055
6636
|
t = _useTimeseriesTransla.t;
|
|
6056
6637
|
var chip = all ? 'all' : service == null ? void 0 : service.serviceUrl;
|
|
6057
|
-
return jsx(CustomTooltip, {
|
|
6638
|
+
return /*#__PURE__*/jsx(CustomTooltip, {
|
|
6058
6639
|
title: service != null && service.serviceUrl ? "URL: " + service.serviceUrl : '',
|
|
6059
|
-
children: jsx("span", {
|
|
6060
|
-
children: jsx(CustomToggleButton, {
|
|
6640
|
+
children: /*#__PURE__*/jsx("span", {
|
|
6641
|
+
children: /*#__PURE__*/jsx(CustomToggleButton, {
|
|
6061
6642
|
disabled: isDisabled,
|
|
6062
6643
|
onClick: function onClick() {
|
|
6063
6644
|
return toggleChip(chip);
|
|
@@ -6072,6 +6653,24 @@ var ServiceChip = function ServiceChip(_ref) {
|
|
|
6072
6653
|
});
|
|
6073
6654
|
};
|
|
6074
6655
|
|
|
6656
|
+
/* *
|
|
6657
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6658
|
+
* you may not use this file except in compliance with the License.
|
|
6659
|
+
* You may obtain a copy of the License at
|
|
6660
|
+
*
|
|
6661
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6662
|
+
*
|
|
6663
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6664
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6665
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6666
|
+
* See the License for the specific language governing permissions and
|
|
6667
|
+
* limitations under the License.
|
|
6668
|
+
*
|
|
6669
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6670
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
6671
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6672
|
+
* */
|
|
6673
|
+
|
|
6075
6674
|
var ServiceChipConnect = function ServiceChipConnect(_ref) {
|
|
6076
6675
|
var service = _ref.service,
|
|
6077
6676
|
isAllSelected = _ref.isAllSelected,
|
|
@@ -6098,7 +6697,7 @@ var ServiceChipConnect = function ServiceChipConnect(_ref) {
|
|
|
6098
6697
|
panelId: panelId
|
|
6099
6698
|
}));
|
|
6100
6699
|
};
|
|
6101
|
-
return jsx(ServiceChip, {
|
|
6700
|
+
return /*#__PURE__*/jsx(ServiceChip, {
|
|
6102
6701
|
isDisabled: service.isLoading,
|
|
6103
6702
|
isSelected: isAllSelected ? false : service.enabled,
|
|
6104
6703
|
service: service,
|
|
@@ -6109,7 +6708,7 @@ var AllChipConnect = function AllChipConnect(_ref2) {
|
|
|
6109
6708
|
var isAllSelected = _ref2.isAllSelected,
|
|
6110
6709
|
panelId = _ref2.panelId;
|
|
6111
6710
|
var dispatch = useDispatch();
|
|
6112
|
-
return jsx(ServiceChip, {
|
|
6711
|
+
return /*#__PURE__*/jsx(ServiceChip, {
|
|
6113
6712
|
isSelected: isAllSelected,
|
|
6114
6713
|
toggleChip: function toggleChip() {
|
|
6115
6714
|
if (!isAllSelected) {
|
|
@@ -6121,19 +6720,37 @@ var AllChipConnect = function AllChipConnect(_ref2) {
|
|
|
6121
6720
|
});
|
|
6122
6721
|
};
|
|
6123
6722
|
|
|
6723
|
+
/* *
|
|
6724
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6725
|
+
* you may not use this file except in compliance with the License.
|
|
6726
|
+
* You may obtain a copy of the License at
|
|
6727
|
+
*
|
|
6728
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6729
|
+
*
|
|
6730
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6731
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6732
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6733
|
+
* See the License for the specific language governing permissions and
|
|
6734
|
+
* limitations under the License.
|
|
6735
|
+
*
|
|
6736
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6737
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
6738
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6739
|
+
* */
|
|
6740
|
+
|
|
6124
6741
|
var TimeSeriesServiceList = function TimeSeriesServiceList(_ref) {
|
|
6125
6742
|
var filterChipsServicesById = _ref.filterChipsServicesById,
|
|
6126
6743
|
isAllSelected = _ref.isAllSelected,
|
|
6127
6744
|
panelId = _ref.panelId;
|
|
6128
6745
|
var activeServices = Object.values(filterChipsServicesById);
|
|
6129
|
-
return jsx(Box, {
|
|
6746
|
+
return /*#__PURE__*/jsx(Box, {
|
|
6130
6747
|
"data-testid": "serviceList",
|
|
6131
6748
|
sx: {
|
|
6132
6749
|
marginTop: '8px',
|
|
6133
6750
|
width: '100%',
|
|
6134
6751
|
overflow: 'hidden'
|
|
6135
6752
|
},
|
|
6136
|
-
children: jsxs(Box, {
|
|
6753
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
6137
6754
|
sx: {
|
|
6138
6755
|
width: '100%',
|
|
6139
6756
|
display: 'block',
|
|
@@ -6142,11 +6759,11 @@ var TimeSeriesServiceList = function TimeSeriesServiceList(_ref) {
|
|
|
6142
6759
|
marginBottom: '8px',
|
|
6143
6760
|
fontSize: '0.875rem'
|
|
6144
6761
|
},
|
|
6145
|
-
children: [activeServices.length ? jsx(AllChipConnect, {
|
|
6762
|
+
children: [activeServices.length ? /*#__PURE__*/jsx(AllChipConnect, {
|
|
6146
6763
|
isAllSelected: isAllSelected,
|
|
6147
6764
|
panelId: panelId
|
|
6148
6765
|
}) : null, activeServices.map(function (service) {
|
|
6149
|
-
return jsx(ServiceChipConnect, {
|
|
6766
|
+
return /*#__PURE__*/jsx(ServiceChipConnect, {
|
|
6150
6767
|
isAllSelected: isAllSelected,
|
|
6151
6768
|
panelId: panelId,
|
|
6152
6769
|
service: service
|
|
@@ -6156,6 +6773,24 @@ var TimeSeriesServiceList = function TimeSeriesServiceList(_ref) {
|
|
|
6156
6773
|
});
|
|
6157
6774
|
};
|
|
6158
6775
|
|
|
6776
|
+
/* *
|
|
6777
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6778
|
+
* you may not use this file except in compliance with the License.
|
|
6779
|
+
* You may obtain a copy of the License at
|
|
6780
|
+
*
|
|
6781
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6782
|
+
*
|
|
6783
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6784
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6785
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6786
|
+
* See the License for the specific language governing permissions and
|
|
6787
|
+
* limitations under the License.
|
|
6788
|
+
*
|
|
6789
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6790
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
6791
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6792
|
+
* */
|
|
6793
|
+
|
|
6159
6794
|
var sortByService = function sortByService(serviceObj) {
|
|
6160
6795
|
return Object.entries(serviceObj).sort(function (_ref, _ref2) {
|
|
6161
6796
|
var serviceA = _ref[1];
|
|
@@ -6176,13 +6811,31 @@ var TimeSeriesServiceListConnect = function TimeSeriesServiceListConnect(_ref4)
|
|
|
6176
6811
|
var isAllFilterchipsEnabled = useSelector(function (store) {
|
|
6177
6812
|
return getAllFilterChipsEnabled(store, panelId);
|
|
6178
6813
|
});
|
|
6179
|
-
return jsx(TimeSeriesServiceList, {
|
|
6814
|
+
return /*#__PURE__*/jsx(TimeSeriesServiceList, {
|
|
6180
6815
|
filterChipsServicesById: sortByService(filterChipsServices),
|
|
6181
6816
|
isAllSelected: isAllFilterchipsEnabled,
|
|
6182
6817
|
panelId: panelId
|
|
6183
6818
|
});
|
|
6184
6819
|
};
|
|
6185
6820
|
|
|
6821
|
+
/* *
|
|
6822
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6823
|
+
* you may not use this file except in compliance with the License.
|
|
6824
|
+
* You may obtain a copy of the License at
|
|
6825
|
+
*
|
|
6826
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6827
|
+
*
|
|
6828
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6829
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6830
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6831
|
+
* See the License for the specific language governing permissions and
|
|
6832
|
+
* limitations under the License.
|
|
6833
|
+
*
|
|
6834
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6835
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
6836
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6837
|
+
* */
|
|
6838
|
+
|
|
6186
6839
|
var TimeSeriesSelect = function TimeSeriesSelect(_ref) {
|
|
6187
6840
|
var panelId = _ref.panelId,
|
|
6188
6841
|
onClose = _ref.onClose,
|
|
@@ -6197,7 +6850,7 @@ var TimeSeriesSelect = function TimeSeriesSelect(_ref) {
|
|
|
6197
6850
|
var _useGetServiceCollect = useGetServiceCollectionDetails(services, isOpen),
|
|
6198
6851
|
isFetching = _useGetServiceCollect.isFetching,
|
|
6199
6852
|
error = _useGetServiceCollect.error;
|
|
6200
|
-
return jsxs(ToolContainerDraggable, {
|
|
6853
|
+
return /*#__PURE__*/jsxs(ToolContainerDraggable, {
|
|
6201
6854
|
"data-testid": "TimeSeriesSelect",
|
|
6202
6855
|
isOpen: isOpen,
|
|
6203
6856
|
minHeight: 200,
|
|
@@ -6214,21 +6867,21 @@ var TimeSeriesSelect = function TimeSeriesSelect(_ref) {
|
|
|
6214
6867
|
height: DEFAULT_DIALOG_HEIGHT
|
|
6215
6868
|
},
|
|
6216
6869
|
title: t('timeseries-select-for') + " " + selectPlot.title,
|
|
6217
|
-
children: [!!isFetching && jsx(LinearProgress, {
|
|
6870
|
+
children: [!!isFetching && /*#__PURE__*/jsx(LinearProgress, {
|
|
6218
6871
|
color: "secondary",
|
|
6219
6872
|
sx: {
|
|
6220
6873
|
width: '100%',
|
|
6221
6874
|
position: 'absolute'
|
|
6222
6875
|
}
|
|
6223
|
-
}), !!error && jsx(Box, {
|
|
6876
|
+
}), !!error && /*#__PURE__*/jsx(Box, {
|
|
6224
6877
|
sx: {
|
|
6225
6878
|
padding: '0 6px'
|
|
6226
6879
|
},
|
|
6227
|
-
children: jsx(AlertBanner, {
|
|
6880
|
+
children: /*#__PURE__*/jsx(AlertBanner, {
|
|
6228
6881
|
shouldClose: true,
|
|
6229
6882
|
title: error == null ? void 0 : error.message
|
|
6230
6883
|
})
|
|
6231
|
-
}), jsxs(Box, {
|
|
6884
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
6232
6885
|
sx: {
|
|
6233
6886
|
padding: '6px 8px',
|
|
6234
6887
|
height: "calc(100% - " + (error ? 48 : 0) + "px)",
|
|
@@ -6236,39 +6889,57 @@ var TimeSeriesSelect = function TimeSeriesSelect(_ref) {
|
|
|
6236
6889
|
flexDirection: 'column',
|
|
6237
6890
|
minHeight: 0
|
|
6238
6891
|
},
|
|
6239
|
-
children: [jsx(SearchFieldConnect, {
|
|
6892
|
+
children: [/*#__PURE__*/jsx(SearchFieldConnect, {
|
|
6240
6893
|
panelId: panelId
|
|
6241
|
-
}), jsx(Box, {
|
|
6894
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
6242
6895
|
sx: {
|
|
6243
6896
|
position: 'absolute',
|
|
6244
6897
|
margin: '64px 0 0 calc(100% - 40px)',
|
|
6245
6898
|
zIndex: 2,
|
|
6246
6899
|
"float": 'right'
|
|
6247
6900
|
},
|
|
6248
|
-
children: jsx(ServiceOptionsButtonConnect, {
|
|
6901
|
+
children: /*#__PURE__*/jsx(ServiceOptionsButtonConnect, {
|
|
6249
6902
|
panelId: panelId
|
|
6250
6903
|
})
|
|
6251
|
-
}), jsx(Box, {
|
|
6904
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
6252
6905
|
sx: {
|
|
6253
6906
|
paddingBottom: '6px',
|
|
6254
6907
|
paddingRight: '32px'
|
|
6255
6908
|
},
|
|
6256
|
-
children: jsx(TimeSeriesServiceListConnect, {
|
|
6909
|
+
children: /*#__PURE__*/jsx(TimeSeriesServiceListConnect, {
|
|
6257
6910
|
panelId: panelId
|
|
6258
6911
|
})
|
|
6259
|
-
}), jsx(TimeSeriesSelectListConnect, {
|
|
6912
|
+
}), /*#__PURE__*/jsx(TimeSeriesSelectListConnect, {
|
|
6260
6913
|
handleAddOrRemoveClick: handleAddOrRemoveClick,
|
|
6261
6914
|
isOpen: isOpen,
|
|
6262
6915
|
panelId: panelId,
|
|
6263
6916
|
selectPlot: selectPlot,
|
|
6264
6917
|
services: services
|
|
6265
|
-
}), jsx(ServicePopupConnect, {
|
|
6918
|
+
}), /*#__PURE__*/jsx(ServicePopupConnect, {
|
|
6266
6919
|
panelId: panelId
|
|
6267
6920
|
})]
|
|
6268
6921
|
})]
|
|
6269
6922
|
});
|
|
6270
6923
|
};
|
|
6271
6924
|
|
|
6925
|
+
/* *
|
|
6926
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6927
|
+
* you may not use this file except in compliance with the License.
|
|
6928
|
+
* You may obtain a copy of the License at
|
|
6929
|
+
*
|
|
6930
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6931
|
+
*
|
|
6932
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6933
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6934
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6935
|
+
* See the License for the specific language governing permissions and
|
|
6936
|
+
* limitations under the License.
|
|
6937
|
+
*
|
|
6938
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6939
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
6940
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6941
|
+
* */
|
|
6942
|
+
|
|
6272
6943
|
var DIALOG_TYPE = uiTypes.DialogTypes.TimeSeriesSelect;
|
|
6273
6944
|
var origin$1 = TimeSeriesActionOrigin.timeSeriesSelect;
|
|
6274
6945
|
var TimeSeriesSelectConnect = function TimeSeriesSelectConnect(_ref) {
|
|
@@ -6286,6 +6957,7 @@ var TimeSeriesSelectConnect = function TimeSeriesSelectConnect(_ref) {
|
|
|
6286
6957
|
var plot = useSelector(function (state) {
|
|
6287
6958
|
return getPlotWithParameters(state, selectPlotId, panelId);
|
|
6288
6959
|
});
|
|
6960
|
+
|
|
6289
6961
|
// If select dialog for a plot is open but the plot is deleted, close the dialog
|
|
6290
6962
|
React.useEffect(function () {
|
|
6291
6963
|
if (isDialogOpen && activePanelId === panelId && !plot) {
|
|
@@ -6311,7 +6983,7 @@ var TimeSeriesSelectConnect = function TimeSeriesSelectConnect(_ref) {
|
|
|
6311
6983
|
return getServices(state);
|
|
6312
6984
|
});
|
|
6313
6985
|
var isDialogOpenForPanel = isDialogOpen && activePanelId === panelId;
|
|
6314
|
-
return plot && services && services.length > 0 ? jsx(TimeSeriesSelect, {
|
|
6986
|
+
return plot && services && services.length > 0 ? /*#__PURE__*/jsx(TimeSeriesSelect, {
|
|
6315
6987
|
handleAddOrRemoveClick: handleAddOrRemoveClick,
|
|
6316
6988
|
isOpen: isDialogOpenForPanel,
|
|
6317
6989
|
onClose: onCloseDialog,
|
|
@@ -6323,6 +6995,24 @@ var TimeSeriesSelectConnect = function TimeSeriesSelectConnect(_ref) {
|
|
|
6323
6995
|
}) : null;
|
|
6324
6996
|
};
|
|
6325
6997
|
|
|
6998
|
+
/* *
|
|
6999
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7000
|
+
* you may not use this file except in compliance with the License.
|
|
7001
|
+
* You may obtain a copy of the License at
|
|
7002
|
+
*
|
|
7003
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7004
|
+
*
|
|
7005
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7006
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7007
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7008
|
+
* See the License for the specific language governing permissions and
|
|
7009
|
+
* limitations under the License.
|
|
7010
|
+
*
|
|
7011
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7012
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
7013
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
7014
|
+
* */
|
|
7015
|
+
|
|
6326
7016
|
var DIALOG_TYPE_MANAGER = uiTypes.DialogTypes.TimeSeriesManager;
|
|
6327
7017
|
var origin = TimeSeriesActionOrigin.timeSeriesManager;
|
|
6328
7018
|
var TimeSeriesManagerConnect = function TimeSeriesManagerConnect(_ref) {
|
|
@@ -6445,8 +7135,8 @@ var TimeSeriesManagerConnect = function TimeSeriesManagerConnect(_ref) {
|
|
|
6445
7135
|
parameter: parameter
|
|
6446
7136
|
}));
|
|
6447
7137
|
};
|
|
6448
|
-
return jsxs(Fragment, {
|
|
6449
|
-
children: [!!plotState && jsx(TimeSeriesManager, {
|
|
7138
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
7139
|
+
children: [!!plotState && /*#__PURE__*/jsx(TimeSeriesManager, {
|
|
6450
7140
|
addParameter: addParameter,
|
|
6451
7141
|
addPlot: addPlot,
|
|
6452
7142
|
deleteParameter: deleteParameter,
|
|
@@ -6465,13 +7155,31 @@ var TimeSeriesManagerConnect = function TimeSeriesManagerConnect(_ref) {
|
|
|
6465
7155
|
toggleParameter: toggleParameter,
|
|
6466
7156
|
togglePlot: togglePlot,
|
|
6467
7157
|
updateTitle: updateTitle
|
|
6468
|
-
}), jsx(TimeSeriesSelectConnect, {
|
|
7158
|
+
}), /*#__PURE__*/jsx(TimeSeriesSelectConnect, {
|
|
6469
7159
|
panelId: panelId,
|
|
6470
7160
|
selectPlotId: selectPlotId
|
|
6471
|
-
}), jsx(ParameterInfoDialogConnect, {})]
|
|
7161
|
+
}), /*#__PURE__*/jsx(ParameterInfoDialogConnect, {})]
|
|
6472
7162
|
});
|
|
6473
7163
|
};
|
|
6474
7164
|
|
|
7165
|
+
/* *
|
|
7166
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7167
|
+
* you may not use this file except in compliance with the License.
|
|
7168
|
+
* You may obtain a copy of the License at
|
|
7169
|
+
*
|
|
7170
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7171
|
+
*
|
|
7172
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7173
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7174
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7175
|
+
* See the License for the specific language governing permissions and
|
|
7176
|
+
* limitations under the License.
|
|
7177
|
+
*
|
|
7178
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7179
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
7180
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
7181
|
+
* */
|
|
7182
|
+
|
|
6475
7183
|
var extractUsedServices = function extractUsedServices(services, feature) {
|
|
6476
7184
|
var _feature$properties;
|
|
6477
7185
|
if (!services || !(feature != null && (_feature$properties = feature.properties) != null && _feature$properties.occurrences) || feature.properties.occurrences.length < 1) {
|
|
@@ -6582,6 +7290,7 @@ var LocationInfo = function LocationInfo(_ref) {
|
|
|
6582
7290
|
properties: {},
|
|
6583
7291
|
collections: []
|
|
6584
7292
|
};
|
|
7293
|
+
|
|
6585
7294
|
// Internal properties
|
|
6586
7295
|
for (var i = 0; i < (feature == null || (_feature$properties3 = feature.properties) == null ? void 0 : _feature$properties3.occurrences.length); i += 1) {
|
|
6587
7296
|
var _feature$properties3, _feature$properties4;
|
|
@@ -6614,7 +7323,7 @@ var LocationInfo = function LocationInfo(_ref) {
|
|
|
6614
7323
|
}
|
|
6615
7324
|
return '';
|
|
6616
7325
|
}, [location, mapPinLocation]);
|
|
6617
|
-
return jsx(ToolContainerDraggable, {
|
|
7326
|
+
return /*#__PURE__*/jsx(ToolContainerDraggable, {
|
|
6618
7327
|
"data-testid": "LocationInfo",
|
|
6619
7328
|
initialMaxHeight: 800,
|
|
6620
7329
|
isOpen: isOpen,
|
|
@@ -6632,26 +7341,26 @@ var LocationInfo = function LocationInfo(_ref) {
|
|
|
6632
7341
|
height: 500
|
|
6633
7342
|
},
|
|
6634
7343
|
title: "" + t('timeseries-location-info-title'),
|
|
6635
|
-
children: jsxs(Box, {
|
|
7344
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
6636
7345
|
className: "locationInfoContainer",
|
|
6637
7346
|
sx: {
|
|
6638
7347
|
padding: '0 6px'
|
|
6639
7348
|
},
|
|
6640
|
-
children: [!!location && jsxs(Fragment, {
|
|
6641
|
-
children: [jsxs(Box, {
|
|
7349
|
+
children: [!!location && /*#__PURE__*/jsxs(Fragment, {
|
|
7350
|
+
children: [/*#__PURE__*/jsxs(Box, {
|
|
6642
7351
|
sx: {
|
|
6643
7352
|
paddingLeft: '12px',
|
|
6644
7353
|
paddingTop: '12px'
|
|
6645
7354
|
},
|
|
6646
|
-
children: [location.geometry.type === 'Point' && jsx(ParameterInfoText, {
|
|
7355
|
+
children: [location.geometry.type === 'Point' && /*#__PURE__*/jsx(ParameterInfoText, {
|
|
6647
7356
|
label: t('timeseries-location-info-coordinates'),
|
|
6648
7357
|
value: formattedCoordinates
|
|
6649
7358
|
}), Object.keys(location.properties).sort().map(function (prop) {
|
|
6650
|
-
return jsx(ParameterInfoText, {
|
|
7359
|
+
return /*#__PURE__*/jsx(ParameterInfoText, {
|
|
6651
7360
|
label: t("timeseries-location-info-" + prop),
|
|
6652
7361
|
value: location.properties[prop] || t('timeseries-location-info-no-data')
|
|
6653
7362
|
}, prop);
|
|
6654
|
-
}), jsx(Typography, {
|
|
7363
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
6655
7364
|
color: "textSecondary",
|
|
6656
7365
|
sx: Object.assign({}, textStyle, {
|
|
6657
7366
|
marginLeft: '-6px'
|
|
@@ -6659,25 +7368,25 @@ var LocationInfo = function LocationInfo(_ref) {
|
|
|
6659
7368
|
variant: "caption",
|
|
6660
7369
|
children: location.collections.length + " " + (location.collections.length === 1 ? t('timeseries-location-info-collection') : t('timeseries-location-info-collections'))
|
|
6661
7370
|
})]
|
|
6662
|
-
}), jsx(CollectionList, {
|
|
7371
|
+
}), /*#__PURE__*/jsx(CollectionList, {
|
|
6663
7372
|
collections: location.collections,
|
|
6664
7373
|
parameters: parameters
|
|
6665
7374
|
})]
|
|
6666
|
-
}), !location && !!mapPinLocation && jsx(Box, {
|
|
7375
|
+
}), !location && !!mapPinLocation && /*#__PURE__*/jsx(Box, {
|
|
6667
7376
|
sx: {
|
|
6668
7377
|
paddingLeft: '12px',
|
|
6669
7378
|
paddingTop: '12px'
|
|
6670
7379
|
},
|
|
6671
|
-
children: jsx(ParameterInfoText, {
|
|
7380
|
+
children: /*#__PURE__*/jsx(ParameterInfoText, {
|
|
6672
7381
|
label: t('timeseries-location-info-coordinates'),
|
|
6673
7382
|
value: formattedCoordinates
|
|
6674
7383
|
})
|
|
6675
|
-
}), !location && !mapPinLocation && jsx(Box, {
|
|
7384
|
+
}), !location && !mapPinLocation && /*#__PURE__*/jsx(Box, {
|
|
6676
7385
|
sx: {
|
|
6677
7386
|
paddingLeft: '12px',
|
|
6678
7387
|
paddingTop: '12px'
|
|
6679
7388
|
},
|
|
6680
|
-
children: jsx(Typography, {
|
|
7389
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
6681
7390
|
sx: textStyleWithMargin,
|
|
6682
7391
|
variant: "body2",
|
|
6683
7392
|
children: t('timeseries-location-info-no-location-selected')
|
|
@@ -6689,9 +7398,9 @@ var LocationInfo = function LocationInfo(_ref) {
|
|
|
6689
7398
|
var CollectionList = function CollectionList(_ref2) {
|
|
6690
7399
|
var collections = _ref2.collections,
|
|
6691
7400
|
parameters = _ref2.parameters;
|
|
6692
|
-
return jsx("div", {
|
|
7401
|
+
return /*#__PURE__*/jsx("div", {
|
|
6693
7402
|
children: collections.map(function (collection) {
|
|
6694
|
-
return jsx(CollectionInfo, {
|
|
7403
|
+
return /*#__PURE__*/jsx(CollectionInfo, {
|
|
6695
7404
|
collection: collection,
|
|
6696
7405
|
parameters: parameters
|
|
6697
7406
|
}, collection.properties.collectionId);
|
|
@@ -6703,18 +7412,18 @@ var CollectionInfo = function CollectionInfo(_ref3) {
|
|
|
6703
7412
|
parameters = _ref3.parameters;
|
|
6704
7413
|
var _useTimeseriesTransla2 = useTimeseriesTranslation(),
|
|
6705
7414
|
t = _useTimeseriesTransla2.t;
|
|
6706
|
-
return jsx(CustomAccordion, {
|
|
7415
|
+
return /*#__PURE__*/jsx(CustomAccordion, {
|
|
6707
7416
|
sx: {
|
|
6708
7417
|
margin: '0'
|
|
6709
7418
|
},
|
|
6710
7419
|
title: collection.properties.collectionId,
|
|
6711
|
-
children: jsxs(Box, {
|
|
7420
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
6712
7421
|
children: [Object.keys(collection.properties).sort().map(function (prop) {
|
|
6713
|
-
return jsx(ParameterInfoText, {
|
|
7422
|
+
return /*#__PURE__*/jsx(ParameterInfoText, {
|
|
6714
7423
|
label: t("timeseries-location-info-" + prop),
|
|
6715
7424
|
value: collection.properties[prop] || t('timeseries-location-info-no-data')
|
|
6716
7425
|
}, prop);
|
|
6717
|
-
}), jsx(ParameterInfoElem, {
|
|
7426
|
+
}), /*#__PURE__*/jsx(ParameterInfoElem, {
|
|
6718
7427
|
parameter: parameters ? parameters[collection.parameterIndex] : undefined
|
|
6719
7428
|
})]
|
|
6720
7429
|
})
|
|
@@ -6726,9 +7435,9 @@ var ParameterInfoElem = function ParameterInfoElem(_ref4) {
|
|
|
6726
7435
|
t = _useTimeseriesTransla3.t;
|
|
6727
7436
|
if (parameter) {
|
|
6728
7437
|
if (parameter.loading) {
|
|
6729
|
-
return jsx(ParameterInfoLabel, {
|
|
7438
|
+
return /*#__PURE__*/jsx(ParameterInfoLabel, {
|
|
6730
7439
|
label: t('timeseries-location-info-parameters'),
|
|
6731
|
-
children: jsx(LinearProgress, {
|
|
7440
|
+
children: /*#__PURE__*/jsx(LinearProgress, {
|
|
6732
7441
|
color: "secondary",
|
|
6733
7442
|
"data-testid": "loadingIndicator",
|
|
6734
7443
|
sx: {
|
|
@@ -6740,12 +7449,12 @@ var ParameterInfoElem = function ParameterInfoElem(_ref4) {
|
|
|
6740
7449
|
})
|
|
6741
7450
|
});
|
|
6742
7451
|
}
|
|
6743
|
-
return jsx(ParameterInfoText, {
|
|
7452
|
+
return /*#__PURE__*/jsx(ParameterInfoText, {
|
|
6744
7453
|
label: t('timeseries-location-info-parameters'),
|
|
6745
7454
|
value: parameter.parameters.length ? parameter.parameters.join(', ') : t('timeseries-location-info-no-data')
|
|
6746
7455
|
});
|
|
6747
7456
|
}
|
|
6748
|
-
return jsx(ParameterInfoText, {
|
|
7457
|
+
return /*#__PURE__*/jsx(ParameterInfoText, {
|
|
6749
7458
|
label: t('timeseries-location-info-parameters'),
|
|
6750
7459
|
value: t('timeseries-location-info-no-data')
|
|
6751
7460
|
});
|
|
@@ -6760,12 +7469,12 @@ var textStyleWithMargin = Object.assign({}, textStyle, {
|
|
|
6760
7469
|
var ParameterInfoLabel = function ParameterInfoLabel(_ref5) {
|
|
6761
7470
|
var label = _ref5.label,
|
|
6762
7471
|
children = _ref5.children;
|
|
6763
|
-
return jsxs(Box, {
|
|
7472
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
6764
7473
|
sx: {
|
|
6765
7474
|
minWidth: '12rem',
|
|
6766
7475
|
paddingRight: '1rem'
|
|
6767
7476
|
},
|
|
6768
|
-
children: [jsx(Typography, {
|
|
7477
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
6769
7478
|
color: "textSecondary",
|
|
6770
7479
|
sx: textStyle,
|
|
6771
7480
|
variant: "caption",
|
|
@@ -6776,9 +7485,9 @@ var ParameterInfoLabel = function ParameterInfoLabel(_ref5) {
|
|
|
6776
7485
|
var ParameterInfoText = function ParameterInfoText(_ref6) {
|
|
6777
7486
|
var label = _ref6.label,
|
|
6778
7487
|
value = _ref6.value;
|
|
6779
|
-
return jsx(ParameterInfoLabel, {
|
|
7488
|
+
return /*#__PURE__*/jsx(ParameterInfoLabel, {
|
|
6780
7489
|
label: label,
|
|
6781
|
-
children: jsx(Typography, {
|
|
7490
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
6782
7491
|
sx: textStyleWithMargin,
|
|
6783
7492
|
variant: "body2",
|
|
6784
7493
|
children: value
|
|
@@ -6786,6 +7495,24 @@ var ParameterInfoText = function ParameterInfoText(_ref6) {
|
|
|
6786
7495
|
});
|
|
6787
7496
|
};
|
|
6788
7497
|
|
|
7498
|
+
/* *
|
|
7499
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7500
|
+
* you may not use this file except in compliance with the License.
|
|
7501
|
+
* You may obtain a copy of the License at
|
|
7502
|
+
*
|
|
7503
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7504
|
+
*
|
|
7505
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7506
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7507
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7508
|
+
* See the License for the specific language governing permissions and
|
|
7509
|
+
* limitations under the License.
|
|
7510
|
+
*
|
|
7511
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7512
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
7513
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
7514
|
+
* */
|
|
7515
|
+
|
|
6789
7516
|
var LocationInfoConnect = function LocationInfoConnect() {
|
|
6790
7517
|
var panelId = useSelector(function (store) {
|
|
6791
7518
|
return uiSelectors.getSourcePanelId(store, uiTypes.DialogTypes.TimeSeriesLocationInfo);
|
|
@@ -6794,7 +7521,7 @@ var LocationInfoConnect = function LocationInfoConnect() {
|
|
|
6794
7521
|
return getServices(state);
|
|
6795
7522
|
});
|
|
6796
7523
|
var selectedMapIds = useSelector(function (state) {
|
|
6797
|
-
return genericSelectors.
|
|
7524
|
+
return genericSelectors.getLinkedTargetIds(state, panelId);
|
|
6798
7525
|
});
|
|
6799
7526
|
var selectedFeature = useSelector(function (state) {
|
|
6800
7527
|
return genericSelectors.getSelectedFeatureAsGeoJSON(state.syncGroups, panelId);
|
|
@@ -6808,7 +7535,7 @@ var LocationInfoConnect = function LocationInfoConnect() {
|
|
|
6808
7535
|
dialogOrder = _useSetupDialog.dialogOrder,
|
|
6809
7536
|
isDialogOpen = _useSetupDialog.isDialogOpen,
|
|
6810
7537
|
onCloseDialog = _useSetupDialog.onCloseDialog;
|
|
6811
|
-
return jsx(LocationInfo, {
|
|
7538
|
+
return /*#__PURE__*/jsx(LocationInfo, {
|
|
6812
7539
|
feature: selectedFeature,
|
|
6813
7540
|
isOpen: isDialogOpen,
|
|
6814
7541
|
mapPinLocation: mapPinLocation,
|
|
@@ -6836,6 +7563,7 @@ var LocationInfoConnect = function LocationInfoConnect() {
|
|
|
6836
7563
|
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
6837
7564
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6838
7565
|
* */
|
|
7566
|
+
|
|
6839
7567
|
var getUserAddedEDRServices = function getUserAddedEDRServices() {
|
|
6840
7568
|
try {
|
|
6841
7569
|
var storedString = window.localStorage.getItem('userAddedEDRServices');
|
|
@@ -6895,6 +7623,7 @@ timeseriesListener.startListening({
|
|
|
6895
7623
|
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
6896
7624
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
6897
7625
|
* */
|
|
7626
|
+
|
|
6898
7627
|
var timeSeriesReducersMap = {
|
|
6899
7628
|
webmap: mapReducer,
|
|
6900
7629
|
services: serviceReducer,
|
|
@@ -6922,13 +7651,13 @@ var TimeSeriesTopRowButtonUnstyled = /*#__PURE__*/React.forwardRef(function (_re
|
|
|
6922
7651
|
shortText = _ref.shortText,
|
|
6923
7652
|
longText = _ref.longText,
|
|
6924
7653
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
6925
|
-
return jsxs(CustomToggleButton, Object.assign({}, props, {
|
|
7654
|
+
return /*#__PURE__*/jsxs(CustomToggleButton, Object.assign({}, props, {
|
|
6926
7655
|
ref: ref,
|
|
6927
7656
|
variant: "tool",
|
|
6928
|
-
children: [icon, jsx("span", {
|
|
7657
|
+
children: [icon, /*#__PURE__*/jsx("span", {
|
|
6929
7658
|
className: "longText",
|
|
6930
7659
|
children: longText
|
|
6931
|
-
}), jsx("span", {
|
|
7660
|
+
}), /*#__PURE__*/jsx("span", {
|
|
6932
7661
|
className: "shortText",
|
|
6933
7662
|
children: shortText
|
|
6934
7663
|
})]
|
|
@@ -6959,6 +7688,24 @@ var TimeSeriesTopRowButton = styled(TimeSeriesTopRowButtonUnstyled)({
|
|
|
6959
7688
|
}
|
|
6960
7689
|
});
|
|
6961
7690
|
|
|
7691
|
+
/* *
|
|
7692
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7693
|
+
* you may not use this file except in compliance with the License.
|
|
7694
|
+
* You may obtain a copy of the License at
|
|
7695
|
+
*
|
|
7696
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7697
|
+
*
|
|
7698
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7699
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7700
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7701
|
+
* See the License for the specific language governing permissions and
|
|
7702
|
+
* limitations under the License.
|
|
7703
|
+
*
|
|
7704
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7705
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
7706
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
7707
|
+
* */
|
|
7708
|
+
|
|
6962
7709
|
var LocationInfoButtonConnect = function LocationInfoButtonConnect(_ref) {
|
|
6963
7710
|
var panelId = _ref.panelId,
|
|
6964
7711
|
t = _ref.t;
|
|
@@ -6977,12 +7724,12 @@ var LocationInfoButtonConnect = function LocationInfoButtonConnect(_ref) {
|
|
|
6977
7724
|
}));
|
|
6978
7725
|
};
|
|
6979
7726
|
var isOpenForPanel = isOpenInStore && currentSourcePanelId === panelId;
|
|
6980
|
-
return jsx(CustomTooltip, {
|
|
7727
|
+
return /*#__PURE__*/jsx(CustomTooltip, {
|
|
6981
7728
|
title: t('timeseries-location-info-title'),
|
|
6982
|
-
children: jsx("span", {
|
|
6983
|
-
children: jsx(TimeSeriesTopRowButton, {
|
|
7729
|
+
children: /*#__PURE__*/jsx("span", {
|
|
7730
|
+
children: /*#__PURE__*/jsx(TimeSeriesTopRowButton, {
|
|
6984
7731
|
"data-testid": "timeSeriesLocationInfoButton",
|
|
6985
|
-
icon: jsx(Info, {}),
|
|
7732
|
+
icon: /*#__PURE__*/jsx(Info, {}),
|
|
6986
7733
|
longText: t('timeseries-location-info-button'),
|
|
6987
7734
|
onClick: handleClick,
|
|
6988
7735
|
selected: isOpenForPanel,
|
|
@@ -6992,12 +7739,30 @@ var LocationInfoButtonConnect = function LocationInfoButtonConnect(_ref) {
|
|
|
6992
7739
|
});
|
|
6993
7740
|
};
|
|
6994
7741
|
|
|
7742
|
+
/* *
|
|
7743
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7744
|
+
* you may not use this file except in compliance with the License.
|
|
7745
|
+
* You may obtain a copy of the License at
|
|
7746
|
+
*
|
|
7747
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7748
|
+
*
|
|
7749
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7750
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7751
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7752
|
+
* See the License for the specific language governing permissions and
|
|
7753
|
+
* limitations under the License.
|
|
7754
|
+
*
|
|
7755
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7756
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
7757
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
7758
|
+
* */
|
|
7759
|
+
|
|
6995
7760
|
var TimeSeriesMarkersSwitch = function TimeSeriesMarkersSwitch(_ref) {
|
|
6996
7761
|
var shouldHideMarkers = _ref.shouldHideMarkers,
|
|
6997
7762
|
toggleMarkers = _ref.toggleMarkers;
|
|
6998
7763
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
6999
7764
|
t = _useTimeseriesTransla.t;
|
|
7000
|
-
return jsxs(Box, {
|
|
7765
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
7001
7766
|
sx: {
|
|
7002
7767
|
display: 'flex',
|
|
7003
7768
|
flexWrap: 'wrap',
|
|
@@ -7022,18 +7787,18 @@ var TimeSeriesMarkersSwitch = function TimeSeriesMarkersSwitch(_ref) {
|
|
|
7022
7787
|
}
|
|
7023
7788
|
}
|
|
7024
7789
|
},
|
|
7025
|
-
children: [jsx(Typography, {
|
|
7790
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
7026
7791
|
className: "markers-label",
|
|
7027
7792
|
sx: {
|
|
7028
7793
|
marginTop: '4px'
|
|
7029
7794
|
},
|
|
7030
7795
|
variant: "body2",
|
|
7031
7796
|
children: t('timeseries-toggle-location-markers-label')
|
|
7032
|
-
}), jsx(Box, {
|
|
7797
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
7033
7798
|
sx: {
|
|
7034
7799
|
marginTop: '-5px'
|
|
7035
7800
|
},
|
|
7036
|
-
children: jsx(SwitchButton, {
|
|
7801
|
+
children: /*#__PURE__*/jsx(SwitchButton, {
|
|
7037
7802
|
activeLabel: "ON",
|
|
7038
7803
|
checked: !shouldHideMarkers,
|
|
7039
7804
|
inActiveLabel: "OFF",
|
|
@@ -7059,6 +7824,7 @@ var createParameterNames = function createParameterNames(plotsWithData) {
|
|
|
7059
7824
|
plotTitles.set(plot.plotId, plot.title);
|
|
7060
7825
|
return plot.parametersWithData;
|
|
7061
7826
|
});
|
|
7827
|
+
|
|
7062
7828
|
// count all parameters with the same name
|
|
7063
7829
|
var duplicateParameterCount = new Map();
|
|
7064
7830
|
for (var _iterator = _createForOfIteratorHelperLoose(parameters), _step; !(_step = _iterator()).done;) {
|
|
@@ -7067,6 +7833,7 @@ var createParameterNames = function createParameterNames(plotsWithData) {
|
|
|
7067
7833
|
var name = getParameterDisplayName(parameter);
|
|
7068
7834
|
duplicateParameterCount.set(name, ((_duplicateParameterCo2 = duplicateParameterCount.get(name)) != null ? _duplicateParameterCo2 : 0) + 1);
|
|
7069
7835
|
}
|
|
7836
|
+
|
|
7070
7837
|
// count per plot how many duplicate names there are
|
|
7071
7838
|
var perBaseNamePlotCounters = new Map();
|
|
7072
7839
|
return parameters.map(function (parameter) {
|
|
@@ -7089,6 +7856,7 @@ var createParameterNames = function createParameterNames(plotsWithData) {
|
|
|
7089
7856
|
}
|
|
7090
7857
|
var idx = ((_plotCounters$get = plotCounters.get(parameter.plotId)) != null ? _plotCounters$get : 0) + 1;
|
|
7091
7858
|
plotCounters.set(parameter.plotId, idx);
|
|
7859
|
+
|
|
7092
7860
|
// First occurrence in this plot → just plotId
|
|
7093
7861
|
if (idx === 1) {
|
|
7094
7862
|
var _parameter$enabled2;
|
|
@@ -7098,6 +7866,7 @@ var createParameterNames = function createParameterNames(plotsWithData) {
|
|
|
7098
7866
|
enabled: (_parameter$enabled2 = parameter.enabled) != null ? _parameter$enabled2 : true
|
|
7099
7867
|
};
|
|
7100
7868
|
}
|
|
7869
|
+
|
|
7101
7870
|
// Subsequent occurrences → plotId + index (starting at 2)
|
|
7102
7871
|
return {
|
|
7103
7872
|
name: name + " (" + plotTitles.get(parameter.plotId) + " - " + idx + ")",
|
|
@@ -7122,6 +7891,7 @@ var paramIntervals = [{
|
|
|
7122
7891
|
maxNumberOfIntervals: 6,
|
|
7123
7892
|
minNumberOfIntervals: 2
|
|
7124
7893
|
}];
|
|
7894
|
+
|
|
7125
7895
|
// Expands the given initial interval up until the number of values on range gets less than a predefined maximum number.
|
|
7126
7896
|
var expandedInterval = function expandedInterval(min, max, initialInterval, maxNumberOfIntervals) {
|
|
7127
7897
|
if (min === Infinity) {
|
|
@@ -7136,6 +7906,7 @@ var expandedInterval = function expandedInterval(min, max, initialInterval, maxN
|
|
|
7136
7906
|
}
|
|
7137
7907
|
return interval;
|
|
7138
7908
|
};
|
|
7909
|
+
|
|
7139
7910
|
// Shrinks the given initial interval down until the number of values on range gets greater than a predefined minimum number.
|
|
7140
7911
|
var shrunkInterval = function shrunkInterval(min, max, initialInterval, minNumberOfIntervals) {
|
|
7141
7912
|
if (min === Infinity) {
|
|
@@ -7160,6 +7931,7 @@ var customizedInterval = function customizedInterval(min, max, propertyNames) {
|
|
|
7160
7931
|
if (foundInterval) {
|
|
7161
7932
|
var _paramIntervals$find2, _paramIntervals$find3, _paramIntervals$find4;
|
|
7162
7933
|
// Padding applied only if percentage value is not supposed to exceed 100 or get below 0 (like humidity percentage)
|
|
7934
|
+
|
|
7163
7935
|
var isHumidityNameFound = ((_paramIntervals$find2 = paramIntervals.find(function (pres) {
|
|
7164
7936
|
return propertyNames.find(function (name) {
|
|
7165
7937
|
return pres.propertyName && name.toLowerCase().includes(pres.propertyName.toLowerCase());
|
|
@@ -7582,6 +8354,7 @@ var CalculateTimeSpan = function CalculateTimeSpan(plotsWithData) {
|
|
|
7582
8354
|
var containsForecast = {
|
|
7583
8355
|
value: false
|
|
7584
8356
|
};
|
|
8357
|
+
|
|
7585
8358
|
// Loop over all plots and find min and max values for each dataset
|
|
7586
8359
|
plotsWithData.forEach(function (plot) {
|
|
7587
8360
|
var maxValue = {
|
|
@@ -7590,6 +8363,7 @@ var CalculateTimeSpan = function CalculateTimeSpan(plotsWithData) {
|
|
|
7590
8363
|
var minValue = {
|
|
7591
8364
|
value: undefined
|
|
7592
8365
|
};
|
|
8366
|
+
|
|
7593
8367
|
// Find the min and max values for all plots
|
|
7594
8368
|
plot.parametersWithData.forEach(function (parameter) {
|
|
7595
8369
|
var firstTimestep = parameter.timestep[0];
|
|
@@ -7633,6 +8407,24 @@ var CalculateTimeSpan = function CalculateTimeSpan(plotsWithData) {
|
|
|
7633
8407
|
return newTimeSpan;
|
|
7634
8408
|
};
|
|
7635
8409
|
|
|
8410
|
+
/* *
|
|
8411
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8412
|
+
* you may not use this file except in compliance with the License.
|
|
8413
|
+
* You may obtain a copy of the License at
|
|
8414
|
+
*
|
|
8415
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8416
|
+
*
|
|
8417
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8418
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8419
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8420
|
+
* See the License for the specific language governing permissions and
|
|
8421
|
+
* limitations under the License.
|
|
8422
|
+
*
|
|
8423
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8424
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8425
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
8426
|
+
* */
|
|
8427
|
+
|
|
7636
8428
|
var useChartHeight = function useChartHeight(_ref) {
|
|
7637
8429
|
var plotsWithData = _ref.plotsWithData,
|
|
7638
8430
|
shouldShowLegend = _ref.shouldShowLegend,
|
|
@@ -7666,6 +8458,7 @@ var useChartHeight = function useChartHeight(_ref) {
|
|
|
7666
8458
|
onLegendHeightChange == null || onLegendHeightChange(shouldShowLegend ? height : 0);
|
|
7667
8459
|
var grid = (_option$grid = option.grid) != null ? _option$grid : [];
|
|
7668
8460
|
var gridArray = Array.isArray(grid) ? grid : [];
|
|
8461
|
+
|
|
7669
8462
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
7670
8463
|
var newGrid = gridArray.map(function (grid) {
|
|
7671
8464
|
return Object.assign({}, grid, {
|
|
@@ -7759,12 +8552,13 @@ var TimeSeriesChart = function TimeSeriesChart(_ref2) {
|
|
|
7759
8552
|
chartHeight = _useChartHeight.chartHeight,
|
|
7760
8553
|
chartRef = _useChartHeight.chartRef,
|
|
7761
8554
|
updateHeight = _useChartHeight.updateHeight;
|
|
7762
|
-
return option ? jsx("div", {
|
|
8555
|
+
return option ? /*#__PURE__*/jsx("div", {
|
|
7763
8556
|
"data-testid": "TimeSeriesChart",
|
|
7764
|
-
children: jsx(ReactECharts, {
|
|
8557
|
+
children: /*#__PURE__*/jsx(ReactECharts, {
|
|
7765
8558
|
notMerge: true,
|
|
7766
|
-
onChartReady: updateHeight
|
|
8559
|
+
onChartReady: updateHeight
|
|
7767
8560
|
// noop, prevent flickering when toggling legend
|
|
8561
|
+
,
|
|
7768
8562
|
onEvents: {
|
|
7769
8563
|
finished: function finished() {},
|
|
7770
8564
|
datazoom: function datazoom(params) {
|
|
@@ -7799,6 +8593,24 @@ var TimeSeriesChart = function TimeSeriesChart(_ref2) {
|
|
|
7799
8593
|
}) : null;
|
|
7800
8594
|
};
|
|
7801
8595
|
|
|
8596
|
+
/* *
|
|
8597
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8598
|
+
* you may not use this file except in compliance with the License.
|
|
8599
|
+
* You may obtain a copy of the License at
|
|
8600
|
+
*
|
|
8601
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8602
|
+
*
|
|
8603
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8604
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8605
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8606
|
+
* See the License for the specific language governing permissions and
|
|
8607
|
+
* limitations under the License.
|
|
8608
|
+
*
|
|
8609
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8610
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
8611
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
8612
|
+
* */
|
|
8613
|
+
|
|
7802
8614
|
var getParameterKey = function getParameterKey(param) {
|
|
7803
8615
|
return param.serviceId + "|" + param.collectionId + "|" + param.propertyName;
|
|
7804
8616
|
};
|
|
@@ -7809,7 +8621,7 @@ var PlotErrorBanners = function PlotErrorBanners(_ref) {
|
|
|
7809
8621
|
getErrorTitle = _ref.getErrorTitle,
|
|
7810
8622
|
getErrorTranslationKey = _ref.getErrorTranslationKey,
|
|
7811
8623
|
t = _ref.t;
|
|
7812
|
-
return jsx(Fragment, {
|
|
8624
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
7813
8625
|
children: plotsWithData.map(function (plot, index) {
|
|
7814
8626
|
var _plot$failedParameter, _plot$errors;
|
|
7815
8627
|
var parametersFailingKeys = new Set(parametersFailingInAllPlots.map(getParameterKey));
|
|
@@ -7823,7 +8635,7 @@ var PlotErrorBanners = function PlotErrorBanners(_ref) {
|
|
|
7823
8635
|
var errorKey = ((_plot$errors = plot.errors) == null ? void 0 : _plot$errors[0]) || 'error-message-general';
|
|
7824
8636
|
var translationKey = getErrorTranslationKey(errorKey, plotSpecificFailedParameters.length);
|
|
7825
8637
|
var errorInfo = t(translationKey);
|
|
7826
|
-
return jsx(Box, {
|
|
8638
|
+
return /*#__PURE__*/jsx(Box, {
|
|
7827
8639
|
sx: {
|
|
7828
8640
|
position: 'absolute',
|
|
7829
8641
|
top: legendHeight + PLOT_HEIGHT * index + 35,
|
|
@@ -7832,11 +8644,11 @@ var PlotErrorBanners = function PlotErrorBanners(_ref) {
|
|
|
7832
8644
|
zIndex: 10,
|
|
7833
8645
|
pointerEvents: 'none'
|
|
7834
8646
|
},
|
|
7835
|
-
children: jsx(Box, {
|
|
8647
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
7836
8648
|
sx: {
|
|
7837
8649
|
pointerEvents: 'auto'
|
|
7838
8650
|
},
|
|
7839
|
-
children: jsx(AlertBanner, {
|
|
8651
|
+
children: /*#__PURE__*/jsx(AlertBanner, {
|
|
7840
8652
|
info: errorInfo,
|
|
7841
8653
|
shouldClose: true,
|
|
7842
8654
|
title: errorTitle
|
|
@@ -7928,37 +8740,37 @@ var TimeSeriesView = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
7928
8740
|
var combinedErrorInfo = React.useMemo(function () {
|
|
7929
8741
|
return hasParametersFailingInAllPlots ? getCombinedErrorInfo(parametersFailingInAllPlots, plotsWithData, totalPlotCount) : '';
|
|
7930
8742
|
}, [getCombinedErrorInfo, hasParametersFailingInAllPlots, parametersFailingInAllPlots, plotsWithData, totalPlotCount]);
|
|
7931
|
-
return jsxs(Box, {
|
|
8743
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
7932
8744
|
"data-testid": "TimeSeriesView",
|
|
7933
|
-
children: [hasParametersFailingInAllPlots ? jsx(Card, {
|
|
8745
|
+
children: [hasParametersFailingInAllPlots ? /*#__PURE__*/jsx(Card, {
|
|
7934
8746
|
sx: {
|
|
7935
8747
|
border: 'solid 1px',
|
|
7936
8748
|
borderColor: 'geowebColors.cards.cardContainerBorder',
|
|
7937
8749
|
boxShadow: 'none'
|
|
7938
8750
|
},
|
|
7939
|
-
children: jsx(Box, {
|
|
8751
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
7940
8752
|
"data-testid": "TimeSeriesView-alert-banner",
|
|
7941
|
-
children: jsx(AlertBanner, {
|
|
8753
|
+
children: /*#__PURE__*/jsx(AlertBanner, {
|
|
7942
8754
|
info: combinedErrorInfo,
|
|
7943
8755
|
shouldClose: true,
|
|
7944
8756
|
title: combinedErrorTitle
|
|
7945
8757
|
})
|
|
7946
8758
|
})
|
|
7947
|
-
}) : null, !!plotsWithData && plotsWithData.length > 0 && jsxs(Card, {
|
|
8759
|
+
}) : null, !!plotsWithData && plotsWithData.length > 0 && /*#__PURE__*/jsxs(Card, {
|
|
7948
8760
|
sx: {
|
|
7949
8761
|
border: 'solid 1px',
|
|
7950
8762
|
borderColor: 'geowebColors.cards.cardContainerBorder',
|
|
7951
8763
|
boxShadow: 'none',
|
|
7952
8764
|
position: 'relative'
|
|
7953
8765
|
},
|
|
7954
|
-
children: [!!plotsWithData && plotsWithData.length > 0 && jsx(PlotErrorBanners, {
|
|
8766
|
+
children: [!!plotsWithData && plotsWithData.length > 0 && /*#__PURE__*/jsx(PlotErrorBanners, {
|
|
7955
8767
|
getErrorTitle: getErrorTitle,
|
|
7956
8768
|
getErrorTranslationKey: getErrorTranslationKey,
|
|
7957
8769
|
legendHeight: legendHeight,
|
|
7958
8770
|
parametersFailingInAllPlots: parametersFailingInAllPlots,
|
|
7959
8771
|
plotsWithData: plotsWithData,
|
|
7960
8772
|
t: t
|
|
7961
|
-
}), jsx(TimeSeriesChart, {
|
|
8773
|
+
}), /*#__PURE__*/jsx(TimeSeriesChart, {
|
|
7962
8774
|
onLegendHeightChange: setLegendHeight,
|
|
7963
8775
|
onToggleLegendParam: onToggleLegendParam,
|
|
7964
8776
|
plotsWithData: plotsWithData,
|
|
@@ -7977,6 +8789,24 @@ var TimeSeriesView = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
7977
8789
|
return samePreset && sameLocation && sameGeoJson && sameLegend && sameServices && sameTime;
|
|
7978
8790
|
});
|
|
7979
8791
|
|
|
8792
|
+
/* *
|
|
8793
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8794
|
+
* you may not use this file except in compliance with the License.
|
|
8795
|
+
* You may obtain a copy of the License at
|
|
8796
|
+
*
|
|
8797
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8798
|
+
*
|
|
8799
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8800
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8801
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8802
|
+
* See the License for the specific language governing permissions and
|
|
8803
|
+
* limitations under the License.
|
|
8804
|
+
*
|
|
8805
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8806
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
8807
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
8808
|
+
* */
|
|
8809
|
+
|
|
7980
8810
|
var TOOLTIP_TITLE = 'Timeseries Manager';
|
|
7981
8811
|
var TimeSeriesManagerMapButtonConnect = function TimeSeriesManagerMapButtonConnect(_ref) {
|
|
7982
8812
|
var viewId = _ref.viewId;
|
|
@@ -7997,13 +8827,13 @@ var TimeSeriesManagerMapButtonConnect = function TimeSeriesManagerMapButtonConne
|
|
|
7997
8827
|
}));
|
|
7998
8828
|
}, [currentSourcePanelId, dispatch, isOpenInStore, viewId]);
|
|
7999
8829
|
var isOpen = currentSourcePanelId === viewId && isOpenInStore;
|
|
8000
|
-
return jsx(CustomTooltip, {
|
|
8830
|
+
return /*#__PURE__*/jsx(CustomTooltip, {
|
|
8001
8831
|
title: TOOLTIP_TITLE,
|
|
8002
|
-
children: jsx("span", {
|
|
8003
|
-
children: jsx(TimeSeriesTopRowButton, {
|
|
8832
|
+
children: /*#__PURE__*/jsx("span", {
|
|
8833
|
+
children: /*#__PURE__*/jsx(TimeSeriesTopRowButton, {
|
|
8004
8834
|
"aria-label": t('timeseries-manager'),
|
|
8005
8835
|
"data-testid": "timeSeriesManagerButton",
|
|
8006
|
-
icon: jsx(Layers, {}),
|
|
8836
|
+
icon: /*#__PURE__*/jsx(Layers, {}),
|
|
8007
8837
|
longText: t('timeseries-ts-manager'),
|
|
8008
8838
|
onClick: openTimeSeriesManagerDialog,
|
|
8009
8839
|
selected: isOpen
|
|
@@ -8012,6 +8842,23 @@ var TimeSeriesManagerMapButtonConnect = function TimeSeriesManagerMapButtonConne
|
|
|
8012
8842
|
});
|
|
8013
8843
|
};
|
|
8014
8844
|
|
|
8845
|
+
/* *
|
|
8846
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8847
|
+
* you may not use this file except in compliance with the License.
|
|
8848
|
+
* You may obtain a copy of the License at
|
|
8849
|
+
*
|
|
8850
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8851
|
+
*
|
|
8852
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8853
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8854
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8855
|
+
* See the License for the specific language governing permissions and
|
|
8856
|
+
* limitations under the License.
|
|
8857
|
+
*
|
|
8858
|
+
* Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8859
|
+
* Copyright 2025 - Finnish Meteorological Institute (FMI)
|
|
8860
|
+
* Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
|
|
8861
|
+
* */
|
|
8015
8862
|
var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
8016
8863
|
var _timeSeriesLocation$o;
|
|
8017
8864
|
var panelId = _ref.panelId;
|
|
@@ -8055,14 +8902,14 @@ var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
|
8055
8902
|
}
|
|
8056
8903
|
};
|
|
8057
8904
|
}, [dispatch, panelId]);
|
|
8058
|
-
return jsx(CustomTooltip, {
|
|
8905
|
+
return /*#__PURE__*/jsx(CustomTooltip, {
|
|
8059
8906
|
title: selectedLocationName || t('timeseries-select-location'),
|
|
8060
|
-
children: jsx("span", {
|
|
8061
|
-
children: jsx(TimeSeriesTopRowButton, {
|
|
8907
|
+
children: /*#__PURE__*/jsx("span", {
|
|
8908
|
+
children: /*#__PURE__*/jsx(TimeSeriesTopRowButton, {
|
|
8062
8909
|
"aria-label": t('timeseries-location'),
|
|
8063
8910
|
"data-testid": "locationSelectButton",
|
|
8064
8911
|
disabled: isMapPinDisabled,
|
|
8065
|
-
icon: jsx(Location, {
|
|
8912
|
+
icon: /*#__PURE__*/jsx(Location, {
|
|
8066
8913
|
sx: {
|
|
8067
8914
|
'@container time-series-container (width < 720px)': {
|
|
8068
8915
|
display: 'none'
|
|
@@ -8078,6 +8925,24 @@ var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
|
8078
8925
|
});
|
|
8079
8926
|
};
|
|
8080
8927
|
|
|
8928
|
+
/* *
|
|
8929
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8930
|
+
* you may not use this file except in compliance with the License.
|
|
8931
|
+
* You may obtain a copy of the License at
|
|
8932
|
+
*
|
|
8933
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8934
|
+
*
|
|
8935
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8936
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8937
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8938
|
+
* See the License for the specific language governing permissions and
|
|
8939
|
+
* limitations under the License.
|
|
8940
|
+
*
|
|
8941
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8942
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
8943
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
8944
|
+
* */
|
|
8945
|
+
|
|
8081
8946
|
var getUniqueServicesFromPreset = function getUniqueServicesFromPreset(parameters, services) {
|
|
8082
8947
|
if (!parameters.length || !services.length) {
|
|
8083
8948
|
return [];
|
|
@@ -8097,6 +8962,7 @@ var getUniqueServicesFromPreset = function getUniqueServicesFromPreset(parameter
|
|
|
8097
8962
|
.filter(function (item) {
|
|
8098
8963
|
return item !== null;
|
|
8099
8964
|
});
|
|
8965
|
+
|
|
8100
8966
|
// Remove duplicates
|
|
8101
8967
|
var uniqueOptions = options.filter(function (current, index, array) {
|
|
8102
8968
|
return index === array.findIndex(function (item) {
|
|
@@ -8109,11 +8975,12 @@ var useMapPin = function useMapPin(_ref2) {
|
|
|
8109
8975
|
var panelId = _ref2.panelId;
|
|
8110
8976
|
var dispatch = useDispatch();
|
|
8111
8977
|
var selectedMapIds = useSelector(function (state) {
|
|
8112
|
-
return genericSelectors.
|
|
8978
|
+
return genericSelectors.getLinkedTargetIds(state, panelId);
|
|
8113
8979
|
});
|
|
8114
8980
|
var isMapPinDisabled = useSelector(function (state) {
|
|
8115
8981
|
return getIsMapPinDisabled(state, panelId);
|
|
8116
8982
|
});
|
|
8983
|
+
|
|
8117
8984
|
/* Make sure the mappin is visible when linking new maps */
|
|
8118
8985
|
useEffect(function () {
|
|
8119
8986
|
var toggleMapPinVisibility = function toggleMapPinVisibility(displayMapPin) {
|
|
@@ -8168,7 +9035,7 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
8168
9035
|
return getPlotState(state, panelId);
|
|
8169
9036
|
});
|
|
8170
9037
|
var linkedMapIds = useSelector(function (state) {
|
|
8171
|
-
return genericSelectors.
|
|
9038
|
+
return genericSelectors.getLinkedTargetIds(state, panelId);
|
|
8172
9039
|
});
|
|
8173
9040
|
var panelMapId = (_linkedMapIds$ = linkedMapIds == null ? void 0 : linkedMapIds[0]) != null ? _linkedMapIds$ : plotPresetState == null ? void 0 : plotPresetState.mapId;
|
|
8174
9041
|
var timeSeriesLocation = useSelector(function (state) {
|
|
@@ -8260,10 +9127,12 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
8260
9127
|
var _useGetLocations = useGetLocations(serviceListForLocations),
|
|
8261
9128
|
locationsData = _useGetLocations.data,
|
|
8262
9129
|
isLocationsFetching = _useGetLocations.isFetching;
|
|
9130
|
+
|
|
8263
9131
|
/* Set the loading state based on the locations fetching status */
|
|
8264
9132
|
useEffect(function () {
|
|
8265
9133
|
isLoading(isLocationsFetching);
|
|
8266
9134
|
}, [isLoading, isLocationsFetching]);
|
|
9135
|
+
|
|
8267
9136
|
/* Create GeoJSON arrays and draw the geojson layer based on the locationsData */
|
|
8268
9137
|
useEffect(function () {
|
|
8269
9138
|
if (stableServices.length) {
|
|
@@ -8306,7 +9175,7 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
8306
9175
|
}));
|
|
8307
9176
|
};
|
|
8308
9177
|
var syncgroupTimeState = useSyncgroupTimeState(panelId, 1000);
|
|
8309
|
-
return jsxs(Stack, {
|
|
9178
|
+
return /*#__PURE__*/jsxs(Stack, {
|
|
8310
9179
|
"data-testid": "TimeSeriesConnect",
|
|
8311
9180
|
sx: {
|
|
8312
9181
|
padding: '20px',
|
|
@@ -8316,7 +9185,7 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
8316
9185
|
containerType: 'inline-size',
|
|
8317
9186
|
containerName: 'time-series-container'
|
|
8318
9187
|
},
|
|
8319
|
-
children: [jsxs(Stack, {
|
|
9188
|
+
children: [/*#__PURE__*/jsxs(Stack, {
|
|
8320
9189
|
direction: "row",
|
|
8321
9190
|
spacing: 1,
|
|
8322
9191
|
sx: {
|
|
@@ -8324,19 +9193,19 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
8324
9193
|
marginBottom: '4px',
|
|
8325
9194
|
marginLeft: '10px'
|
|
8326
9195
|
},
|
|
8327
|
-
children: [jsx(TimeSeriesManagerMapButtonConnect, {
|
|
9196
|
+
children: [/*#__PURE__*/jsx(TimeSeriesManagerMapButtonConnect, {
|
|
8328
9197
|
viewId: panelId
|
|
8329
|
-
}), !!geojson && jsx(LocationSelectButtonConnect, {
|
|
9198
|
+
}), !!geojson && /*#__PURE__*/jsx(LocationSelectButtonConnect, {
|
|
8330
9199
|
panelId: panelId
|
|
8331
|
-
}), jsx(LocationInfoButtonConnect, {
|
|
9200
|
+
}), /*#__PURE__*/jsx(LocationInfoButtonConnect, {
|
|
8332
9201
|
panelId: panelId,
|
|
8333
9202
|
t: t
|
|
8334
|
-
}), jsx(CustomTooltip, {
|
|
9203
|
+
}), /*#__PURE__*/jsx(CustomTooltip, {
|
|
8335
9204
|
title: isMapPinDisabled ? t('timeseries-unlock-location') : t('timeseries-lock-location'),
|
|
8336
|
-
children: jsx("span", {
|
|
8337
|
-
children: jsx(TimeSeriesTopRowButton, {
|
|
9205
|
+
children: /*#__PURE__*/jsx("span", {
|
|
9206
|
+
children: /*#__PURE__*/jsx(TimeSeriesTopRowButton, {
|
|
8338
9207
|
"data-testid": "toggleLockLocationButton",
|
|
8339
|
-
icon: isMapPinDisabled ? jsx(LockLocked, {}) : jsx(LockUnlocked, {}),
|
|
9208
|
+
icon: isMapPinDisabled ? /*#__PURE__*/jsx(LockLocked, {}) : /*#__PURE__*/jsx(LockUnlocked, {}),
|
|
8340
9209
|
longText: isMapPinDisabled ? t('timeseries-unlock-location') : t('timeseries-lock-location'),
|
|
8341
9210
|
onClick: function onClick() {
|
|
8342
9211
|
return toggleDisableMapPin();
|
|
@@ -8344,25 +9213,25 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
8344
9213
|
selected: isMapPinDisabled
|
|
8345
9214
|
})
|
|
8346
9215
|
})
|
|
8347
|
-
}), jsx(TimeSeriesMarkersSwitch, {
|
|
9216
|
+
}), /*#__PURE__*/jsx(TimeSeriesMarkersSwitch, {
|
|
8348
9217
|
shouldHideMarkers: shouldHideLocationMarkers,
|
|
8349
9218
|
toggleMarkers: toggleLocationMarkers
|
|
8350
|
-
}), jsx(CustomTooltip, {
|
|
9219
|
+
}), /*#__PURE__*/jsx(CustomTooltip, {
|
|
8351
9220
|
title: shouldShowLegend ? t('timeseries-legend-tooltip-hide') : t('timeseries-legend-tooltip-show'),
|
|
8352
|
-
children: jsx("span", {
|
|
8353
|
-
children: jsx(TimeSeriesTopRowButton, {
|
|
8354
|
-
icon: jsx(Menu, {}),
|
|
9221
|
+
children: /*#__PURE__*/jsx("span", {
|
|
9222
|
+
children: /*#__PURE__*/jsx(TimeSeriesTopRowButton, {
|
|
9223
|
+
icon: /*#__PURE__*/jsx(Menu, {}),
|
|
8355
9224
|
longText: t('timeseries-legend'),
|
|
8356
9225
|
onClick: toggleLegend,
|
|
8357
9226
|
selected: shouldShowLegend
|
|
8358
9227
|
})
|
|
8359
9228
|
})
|
|
8360
9229
|
})]
|
|
8361
|
-
}), !!timeSeriesLocation && !!plotPresetState && jsx(Box, {
|
|
9230
|
+
}), !!timeSeriesLocation && !!plotPresetState && /*#__PURE__*/jsx(Box, {
|
|
8362
9231
|
sx: {
|
|
8363
9232
|
overflow: 'auto'
|
|
8364
9233
|
},
|
|
8365
|
-
children: !!services && jsx(TimeSeriesView, {
|
|
9234
|
+
children: !!services && /*#__PURE__*/jsx(TimeSeriesView, {
|
|
8366
9235
|
isLoading: isLoading,
|
|
8367
9236
|
onToggleLegendParam: onToggleLegendParam,
|
|
8368
9237
|
plotPreset: plotPresetState,
|
|
@@ -8376,13 +9245,33 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref3) {
|
|
|
8376
9245
|
});
|
|
8377
9246
|
};
|
|
8378
9247
|
|
|
9248
|
+
/* *
|
|
9249
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9250
|
+
* you may not use this file except in compliance with the License.
|
|
9251
|
+
* You may obtain a copy of the License at
|
|
9252
|
+
*
|
|
9253
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9254
|
+
*
|
|
9255
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9256
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9257
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9258
|
+
* See the License for the specific language governing permissions and
|
|
9259
|
+
* limitations under the License.
|
|
9260
|
+
*
|
|
9261
|
+
* Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9262
|
+
* Copyright 2023 - Finnish Meteorological Institute (FMI)
|
|
9263
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9264
|
+
* */
|
|
9265
|
+
|
|
8379
9266
|
var TimeSeriesConnectWrapper = function TimeSeriesConnectWrapper(_ref) {
|
|
8380
9267
|
var panelId = _ref.panelId,
|
|
8381
9268
|
timeSeriesPreset = _ref.timeSeriesPreset,
|
|
8382
9269
|
hideLocationMarkers = _ref.hideLocationMarkers;
|
|
8383
9270
|
var dispatch = useDispatch();
|
|
9271
|
+
|
|
8384
9272
|
// The preset should only be set once the component is mounted or when it has changed.
|
|
8385
9273
|
var timeSeriesPresetRef = React.useRef();
|
|
9274
|
+
|
|
8386
9275
|
// Load services from localstorage before timeseriespresets are loaded as after that preset registering action can change ids accordingly
|
|
8387
9276
|
React.useEffect(function () {
|
|
8388
9277
|
var localStorageServices = getUserAddedEDRServices();
|
|
@@ -8401,11 +9290,28 @@ var TimeSeriesConnectWrapper = function TimeSeriesConnectWrapper(_ref) {
|
|
|
8401
9290
|
}));
|
|
8402
9291
|
}
|
|
8403
9292
|
}, [dispatch, timeSeriesPreset, timeSeriesPresetRef, hideLocationMarkers, panelId]);
|
|
8404
|
-
return jsx(TimeSeriesConnect, {
|
|
9293
|
+
return /*#__PURE__*/jsx(TimeSeriesConnect, {
|
|
8405
9294
|
panelId: panelId
|
|
8406
9295
|
});
|
|
8407
9296
|
};
|
|
8408
9297
|
|
|
9298
|
+
/* *
|
|
9299
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9300
|
+
* you may not use this file except in compliance with the License.
|
|
9301
|
+
* You may obtain a copy of the License at
|
|
9302
|
+
*
|
|
9303
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9304
|
+
*
|
|
9305
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9306
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9307
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9308
|
+
* See the License for the specific language governing permissions and
|
|
9309
|
+
* limitations under the License.
|
|
9310
|
+
*
|
|
9311
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9312
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
9313
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9314
|
+
* */
|
|
8409
9315
|
/**
|
|
8410
9316
|
* The lookup table is for registering your own components with the workspace.
|
|
8411
9317
|
* @param payload
|
|
@@ -8418,7 +9324,7 @@ var componentsLookUp = function componentsLookUp(_ref) {
|
|
|
8418
9324
|
switch (componentType) {
|
|
8419
9325
|
case 'TimeSeries':
|
|
8420
9326
|
{
|
|
8421
|
-
return jsx(TimeSeriesConnectWrapper, {
|
|
9327
|
+
return /*#__PURE__*/jsx(TimeSeriesConnectWrapper, {
|
|
8422
9328
|
hideLocationMarkers: initialProps.hideLocationMarkers,
|
|
8423
9329
|
panelId: panelId,
|
|
8424
9330
|
timeSeriesPreset: {
|
|
@@ -8432,13 +9338,31 @@ var componentsLookUp = function componentsLookUp(_ref) {
|
|
|
8432
9338
|
}
|
|
8433
9339
|
};
|
|
8434
9340
|
|
|
9341
|
+
/* *
|
|
9342
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9343
|
+
* you may not use this file except in compliance with the License.
|
|
9344
|
+
* You may obtain a copy of the License at
|
|
9345
|
+
*
|
|
9346
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9347
|
+
*
|
|
9348
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9349
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9350
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9351
|
+
* See the License for the specific language governing permissions and
|
|
9352
|
+
* limitations under the License.
|
|
9353
|
+
*
|
|
9354
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9355
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
9356
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9357
|
+
* */
|
|
9358
|
+
|
|
8435
9359
|
var LocationDropdownHeader = function LocationDropdownHeader(_ref) {
|
|
8436
9360
|
var searchTerm = _ref.searchTerm,
|
|
8437
9361
|
setSearchTerm = _ref.setSearchTerm;
|
|
8438
9362
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
8439
9363
|
t = _useTimeseriesTransla.t;
|
|
8440
9364
|
t('timeseries-locataion-dropdown-select-all');
|
|
8441
|
-
return jsxs(Grid, {
|
|
9365
|
+
return /*#__PURE__*/jsxs(Grid, {
|
|
8442
9366
|
container: true,
|
|
8443
9367
|
spacing: 1,
|
|
8444
9368
|
sx: {
|
|
@@ -8446,12 +9370,12 @@ var LocationDropdownHeader = function LocationDropdownHeader(_ref) {
|
|
|
8446
9370
|
backgroundColor: 'geowebColors.background.surface',
|
|
8447
9371
|
width: '100%'
|
|
8448
9372
|
},
|
|
8449
|
-
children: [jsx(Grid, {
|
|
9373
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
8450
9374
|
container: true,
|
|
8451
9375
|
sx: {
|
|
8452
9376
|
width: '100%'
|
|
8453
9377
|
},
|
|
8454
|
-
children: jsx(SearchField, {
|
|
9378
|
+
children: /*#__PURE__*/jsx(SearchField, {
|
|
8455
9379
|
searchFilter: searchTerm,
|
|
8456
9380
|
setSearchFilter: setSearchTerm,
|
|
8457
9381
|
small: true
|
|
@@ -8460,6 +9384,24 @@ var LocationDropdownHeader = function LocationDropdownHeader(_ref) {
|
|
|
8460
9384
|
});
|
|
8461
9385
|
};
|
|
8462
9386
|
|
|
9387
|
+
/* *
|
|
9388
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9389
|
+
* you may not use this file except in compliance with the License.
|
|
9390
|
+
* You may obtain a copy of the License at
|
|
9391
|
+
*
|
|
9392
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9393
|
+
*
|
|
9394
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9395
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9396
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9397
|
+
* See the License for the specific language governing permissions and
|
|
9398
|
+
* limitations under the License.
|
|
9399
|
+
*
|
|
9400
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9401
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
9402
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9403
|
+
* */
|
|
9404
|
+
|
|
8463
9405
|
var OverflowTooltip = function OverflowTooltip(_ref) {
|
|
8464
9406
|
var text = _ref.text,
|
|
8465
9407
|
textContainerWidth = _ref.textContainerWidth,
|
|
@@ -8482,8 +9424,8 @@ var OverflowTooltip = function OverflowTooltip(_ref) {
|
|
|
8482
9424
|
var handleMouseLeave = function handleMouseLeave() {
|
|
8483
9425
|
setIsOverflowing(false);
|
|
8484
9426
|
};
|
|
8485
|
-
return jsxs(Fragment, {
|
|
8486
|
-
children: [jsx(Tooltip, {
|
|
9427
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
9428
|
+
children: [/*#__PURE__*/jsx(Tooltip, {
|
|
8487
9429
|
"data-testid": "overflowTooltip",
|
|
8488
9430
|
onClose: function onClose() {
|
|
8489
9431
|
return setIsOpen(false);
|
|
@@ -8496,13 +9438,13 @@ var OverflowTooltip = function OverflowTooltip(_ref) {
|
|
|
8496
9438
|
open: isOpen,
|
|
8497
9439
|
placement: "top",
|
|
8498
9440
|
title: isOverflowing ? text : '',
|
|
8499
|
-
children: jsx(Box, {
|
|
9441
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
8500
9442
|
sx: {
|
|
8501
9443
|
maxWidth: '100%'
|
|
8502
9444
|
},
|
|
8503
9445
|
children: children
|
|
8504
9446
|
})
|
|
8505
|
-
}), jsx("div", {
|
|
9447
|
+
}), /*#__PURE__*/jsx("div", {
|
|
8506
9448
|
"data-testid": "measurementDiv",
|
|
8507
9449
|
ref: textMeasureRef,
|
|
8508
9450
|
style: {
|
|
@@ -8516,6 +9458,24 @@ var OverflowTooltip = function OverflowTooltip(_ref) {
|
|
|
8516
9458
|
});
|
|
8517
9459
|
};
|
|
8518
9460
|
|
|
9461
|
+
/* *
|
|
9462
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9463
|
+
* you may not use this file except in compliance with the License.
|
|
9464
|
+
* You may obtain a copy of the License at
|
|
9465
|
+
*
|
|
9466
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9467
|
+
*
|
|
9468
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9469
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9470
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9471
|
+
* See the License for the specific language governing permissions and
|
|
9472
|
+
* limitations under the License.
|
|
9473
|
+
*
|
|
9474
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9475
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
9476
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9477
|
+
* */
|
|
9478
|
+
|
|
8519
9479
|
var LocationListItem = function LocationListItem(_ref) {
|
|
8520
9480
|
var location = _ref.location,
|
|
8521
9481
|
handleChange = _ref.handleChange,
|
|
@@ -8579,6 +9539,7 @@ var LocationListItem = function LocationListItem(_ref) {
|
|
|
8579
9539
|
setTextContainerWidth(textContainerRef.current.clientWidth);
|
|
8580
9540
|
}
|
|
8581
9541
|
}, [textContainerRef]);
|
|
9542
|
+
|
|
8582
9543
|
// If selection state changes and this item is now the selected one, ensure it regains focus.
|
|
8583
9544
|
React.useEffect(function () {
|
|
8584
9545
|
if (selectedLocation === location && mouseMoveRef.current) {
|
|
@@ -8596,10 +9557,10 @@ var LocationListItem = function LocationListItem(_ref) {
|
|
|
8596
9557
|
});
|
|
8597
9558
|
}
|
|
8598
9559
|
}, [selectedLocation, location]);
|
|
8599
|
-
return jsx(OverflowTooltip, {
|
|
9560
|
+
return /*#__PURE__*/jsx(OverflowTooltip, {
|
|
8600
9561
|
text: location,
|
|
8601
9562
|
textContainerWidth: textContainerWidth,
|
|
8602
|
-
children: jsx("div", {
|
|
9563
|
+
children: /*#__PURE__*/jsx("div", {
|
|
8603
9564
|
"aria-selected": selectedLocation === location,
|
|
8604
9565
|
onBlur: handleMouseLeave,
|
|
8605
9566
|
onFocus: handleMouseEnter,
|
|
@@ -8628,7 +9589,7 @@ var LocationListItem = function LocationListItem(_ref) {
|
|
|
8628
9589
|
ref: mouseMoveRef,
|
|
8629
9590
|
role: "option",
|
|
8630
9591
|
tabIndex: 0,
|
|
8631
|
-
children: jsxs(ListItem, Object.assign({
|
|
9592
|
+
children: /*#__PURE__*/jsxs(ListItem, Object.assign({
|
|
8632
9593
|
"data-testid": "locationDropdownListItem",
|
|
8633
9594
|
role: "listitem"
|
|
8634
9595
|
}, !isDisabled && {
|
|
@@ -8643,11 +9604,11 @@ var LocationListItem = function LocationListItem(_ref) {
|
|
|
8643
9604
|
fontSize: '12px',
|
|
8644
9605
|
backgroundColor: isHovering ? theme.palette.geowebColors.buttons.tool.mouseOver.fill : undefined
|
|
8645
9606
|
},
|
|
8646
|
-
children: [jsx(ListItemIcon, {
|
|
9607
|
+
children: [/*#__PURE__*/jsx(ListItemIcon, {
|
|
8647
9608
|
sx: {
|
|
8648
9609
|
minWidth: '42px'
|
|
8649
9610
|
},
|
|
8650
|
-
children: jsx(Checkbox, {
|
|
9611
|
+
children: /*#__PURE__*/jsx(Checkbox, {
|
|
8651
9612
|
checked: selectedLocation === location,
|
|
8652
9613
|
color: "secondary",
|
|
8653
9614
|
disabled: isDisabled,
|
|
@@ -8672,11 +9633,12 @@ var LocationListItem = function LocationListItem(_ref) {
|
|
|
8672
9633
|
'&&:hover': {
|
|
8673
9634
|
backgroundColor: 'transparent'
|
|
8674
9635
|
}
|
|
8675
|
-
}
|
|
9636
|
+
}
|
|
8676
9637
|
// Remove from tab order so row wrapper is the single focus target
|
|
9638
|
+
,
|
|
8677
9639
|
tabIndex: -1
|
|
8678
9640
|
})
|
|
8679
|
-
}), jsx(Typography, {
|
|
9641
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
8680
9642
|
ref: textContainerRef,
|
|
8681
9643
|
sx: {
|
|
8682
9644
|
fontSize: '16px',
|
|
@@ -8693,6 +9655,24 @@ var LocationListItem = function LocationListItem(_ref) {
|
|
|
8693
9655
|
});
|
|
8694
9656
|
};
|
|
8695
9657
|
|
|
9658
|
+
/* *
|
|
9659
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9660
|
+
* you may not use this file except in compliance with the License.
|
|
9661
|
+
* You may obtain a copy of the License at
|
|
9662
|
+
*
|
|
9663
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9664
|
+
*
|
|
9665
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
9666
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9667
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9668
|
+
* See the License for the specific language governing permissions and
|
|
9669
|
+
* limitations under the License.
|
|
9670
|
+
*
|
|
9671
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9672
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
9673
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9674
|
+
* */
|
|
9675
|
+
|
|
8696
9676
|
var RowComponent = function RowComponent(_ref) {
|
|
8697
9677
|
var _feature$properties;
|
|
8698
9678
|
var index = _ref.index,
|
|
@@ -8703,9 +9683,9 @@ var RowComponent = function RowComponent(_ref) {
|
|
|
8703
9683
|
_ref$isDisabled = _ref.isDisabled,
|
|
8704
9684
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
|
|
8705
9685
|
var feature = features[index];
|
|
8706
|
-
return jsx("div", {
|
|
9686
|
+
return /*#__PURE__*/jsx("div", {
|
|
8707
9687
|
style: Object.assign({}, style),
|
|
8708
|
-
children: jsx(LocationListItem, {
|
|
9688
|
+
children: /*#__PURE__*/jsx(LocationListItem, {
|
|
8709
9689
|
handleChange: handleChange,
|
|
8710
9690
|
isDisabled: isDisabled,
|
|
8711
9691
|
location: (_feature$properties = feature.properties) == null ? void 0 : _feature$properties.name,
|
|
@@ -8772,7 +9752,7 @@ var FocusableListWrapper = function FocusableListWrapper(_ref2) {
|
|
|
8772
9752
|
onKeyDown = _ref2.onKeyDown,
|
|
8773
9753
|
ariaLabel = _ref2['aria-label'];
|
|
8774
9754
|
var fv = useFocusVisible();
|
|
8775
|
-
return jsx("div", {
|
|
9755
|
+
return /*#__PURE__*/jsx("div", {
|
|
8776
9756
|
"aria-label": ariaLabel,
|
|
8777
9757
|
onBlur: fv.onBlur,
|
|
8778
9758
|
onFocus: fv.onFocus,
|
|
@@ -8857,7 +9837,7 @@ var LocationDropdown = function LocationDropdown(_ref3) {
|
|
|
8857
9837
|
behavior: 'smooth'
|
|
8858
9838
|
});
|
|
8859
9839
|
};
|
|
8860
|
-
return jsx(Box, {
|
|
9840
|
+
return /*#__PURE__*/jsx(Box, {
|
|
8861
9841
|
"data-testid": "locationDropdownContainer",
|
|
8862
9842
|
ref: listContainerRef,
|
|
8863
9843
|
sx: {
|
|
@@ -8866,9 +9846,9 @@ var LocationDropdown = function LocationDropdown(_ref3) {
|
|
|
8866
9846
|
overflowY: 'auto',
|
|
8867
9847
|
backgroundColor: 'geowebColors.background.surface'
|
|
8868
9848
|
},
|
|
8869
|
-
children: jsxs(Grid, {
|
|
9849
|
+
children: /*#__PURE__*/jsxs(Grid, {
|
|
8870
9850
|
container: true,
|
|
8871
|
-
children: [jsx(Grid, {
|
|
9851
|
+
children: [/*#__PURE__*/jsx(Grid, {
|
|
8872
9852
|
container: true,
|
|
8873
9853
|
size: {
|
|
8874
9854
|
xs: 12
|
|
@@ -8879,7 +9859,7 @@ var LocationDropdown = function LocationDropdown(_ref3) {
|
|
|
8879
9859
|
zIndex: 1,
|
|
8880
9860
|
backgroundColor: 'white'
|
|
8881
9861
|
},
|
|
8882
|
-
children: jsx(LocationDropdownHeader, {
|
|
9862
|
+
children: /*#__PURE__*/jsx(LocationDropdownHeader, {
|
|
8883
9863
|
searchTerm: searchTerm,
|
|
8884
9864
|
setSearchTerm: setSearchTerm
|
|
8885
9865
|
})
|
|
@@ -8888,17 +9868,18 @@ var LocationDropdown = function LocationDropdown(_ref3) {
|
|
|
8888
9868
|
var serviceName = object.serviceName,
|
|
8889
9869
|
collectionName = object.collectionName;
|
|
8890
9870
|
var collectionGeoJson = object.geoJson;
|
|
9871
|
+
|
|
8891
9872
|
// Find location from the collection that matches the selected location
|
|
8892
9873
|
var collectionSelectedLocation = collectionGeoJson.features.find(function (feature) {
|
|
8893
9874
|
var _feature$properties4;
|
|
8894
9875
|
return selectedLocationNames.includes((_feature$properties4 = feature.properties) == null ? void 0 : _feature$properties4.name);
|
|
8895
9876
|
});
|
|
8896
|
-
return jsx(Box, {
|
|
9877
|
+
return /*#__PURE__*/jsx(Box, {
|
|
8897
9878
|
"data-testid": "serviceDropdown",
|
|
8898
9879
|
sx: {
|
|
8899
9880
|
width: '100%'
|
|
8900
9881
|
},
|
|
8901
|
-
children: jsx(CustomAccordion, {
|
|
9882
|
+
children: /*#__PURE__*/jsx(CustomAccordion, {
|
|
8902
9883
|
amountOfItems: collectionGeoJson.features.length || 0,
|
|
8903
9884
|
"data-testid": "locationDropdownCollectionAccordion",
|
|
8904
9885
|
defaultExpanded: defaultExpanded || false,
|
|
@@ -8908,10 +9889,10 @@ var LocationDropdown = function LocationDropdown(_ref3) {
|
|
|
8908
9889
|
},
|
|
8909
9890
|
title: collectionName,
|
|
8910
9891
|
title2: serviceName,
|
|
8911
|
-
children: jsx(FocusableListWrapper, {
|
|
9892
|
+
children: /*#__PURE__*/jsx(FocusableListWrapper, {
|
|
8912
9893
|
"aria-label": "Locations list",
|
|
8913
9894
|
onKeyDown: handleKeyDown,
|
|
8914
|
-
children: jsx(List$1, {
|
|
9895
|
+
children: /*#__PURE__*/jsx(List$1, {
|
|
8915
9896
|
listRef: listRef,
|
|
8916
9897
|
rowComponent: RowComponent,
|
|
8917
9898
|
rowCount: collectionGeoJson.features.length,
|
|
@@ -8957,7 +9938,7 @@ var LocationSelectDialogConnect = function LocationSelectDialogConnect() {
|
|
|
8957
9938
|
return panelId ? genericSelectors.selectSharedData(state, panelId) : undefined;
|
|
8958
9939
|
});
|
|
8959
9940
|
var selectedMapIds = useSelector(function (state) {
|
|
8960
|
-
return panelId ? genericSelectors.
|
|
9941
|
+
return panelId ? genericSelectors.getLinkedTargetIds(state, panelId) : emptyMapIdList;
|
|
8961
9942
|
});
|
|
8962
9943
|
var isMapPinDisabled = useSelector(function (state) {
|
|
8963
9944
|
return panelId ? getIsMapPinDisabled(state, panelId) : false;
|
|
@@ -9043,7 +10024,7 @@ var LocationSelectDialogConnect = function LocationSelectDialogConnect() {
|
|
|
9043
10024
|
if (!panelId) {
|
|
9044
10025
|
return null;
|
|
9045
10026
|
}
|
|
9046
|
-
return jsx(ToolContainerDraggable, {
|
|
10027
|
+
return /*#__PURE__*/jsx(ToolContainerDraggable, {
|
|
9047
10028
|
bounds: "parent",
|
|
9048
10029
|
isOpen: isDialogOpen,
|
|
9049
10030
|
minWidth: 264,
|
|
@@ -9059,7 +10040,7 @@ var LocationSelectDialogConnect = function LocationSelectDialogConnect() {
|
|
|
9059
10040
|
height: 500
|
|
9060
10041
|
},
|
|
9061
10042
|
title: t('locations'),
|
|
9062
|
-
children: jsx(LocationDropdown, {
|
|
10043
|
+
children: /*#__PURE__*/jsx(LocationDropdown, {
|
|
9063
10044
|
geoJson: geojson,
|
|
9064
10045
|
handleChange: onChangeLocation,
|
|
9065
10046
|
isDisabled: isMapPinDisabled,
|