@opengeoweb/time-series 19.3.0 → 19.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +310 -82
- package/dist/src/lib/components/ComponentsLookUp/componentsLookUp.d.ts +9 -0
- package/dist/src/lib/components/TimeSeries/constants.d.ts +2 -0
- package/dist/src/lib/store/reducer.d.ts +3 -1
- package/dist/src/lib/store/selectors.d.ts +37 -3
- package/dist/src/lib/store/types.d.ts +42 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import React, { useCallback, useMemo, useState, useEffect, memo } from 'react';
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
-
import { CustomIconButton, dateUtils, TooltipSelect, referenceTimeUtils, CustomAccordion, CustomTooltip, CustomToggleButton, ToolContainerDraggable, ToggleMenu, CustomDialog, SearchField, SearchHighlight, AlertBanner, useConfirmationDialog, SwitchButton, useResizeObserver } from '@opengeoweb/shared';
|
|
4
|
+
import { CustomIconButton, dateUtils, TooltipSelect, referenceTimeUtils, CustomAccordion, CustomTooltip, CustomToggleButton, ToolContainerDraggable, ToggleMenu, CustomDialog, SearchField, SearchHighlight, AlertBanner, useConfirmationDialog, SwitchButton, LegendToggleButton, useResizeObserver } from '@opengeoweb/shared';
|
|
5
5
|
import { snackbarActions, snackbarTypes, snackbarListener, snackbarReducer } from '@opengeoweb/snackbar';
|
|
6
6
|
import { mapUtils, selectorMemoizationOptions, genericSelectors, uiSelectors, uiTypes, uiActions, useSetupDialog, mapSelectors, mapListener, serviceListener, layersListener, syncGroupsListener, genericListener, openlayersListener, uiReducer, syncGroupsReducer, layerReducer, serviceReducer, mapReducer, loadingIndicatorActions, useRegisterFeatureSyncSource, useUpdateFeatureSyncLayers, useSyncgroupTimeState, mapActions, layerActions } from '@opengeoweb/store';
|
|
7
7
|
import { useTheme, MenuItem, LinearProgress, Grid, Box, Typography, ClickAwayListener, Input, Collapse, Button, List, ListItem, ListItemText, InputAdornment, ListItemButton, styled, Card, Stack, Tooltip, ListItemIcon, Checkbox } from '@mui/material';
|
|
8
8
|
import { isString, trim, trimStart, compact, chain, groupBy, countBy, sortBy, uniqBy, isEqual } from 'lodash';
|
|
9
9
|
import { ReactSortable } from 'react-sortablejs';
|
|
10
|
-
import { Info, ArrowDropDownDown, Copy, Delete, Visibility, VisibilityOff, TimeSeriesSelect as TimeSeriesSelect$1, DragHandle, ChevronUp, ChevronDown, Add, DimensionsTime, DrawRegion, Cached, Edit, Location, useThemeContext, EChartsDarkTheme, EChartsLightTheme, Layers, LockLocked, LockUnlocked
|
|
10
|
+
import { Info, ArrowDropDownDown, Copy, Delete, Visibility, VisibilityOff, TimeSeriesSelect as TimeSeriesSelect$1, DragHandle, ChevronUp, ChevronDown, Add, DimensionsTime, DrawRegion, Cached, Edit, Location, useThemeContext, EChartsDarkTheme, EChartsLightTheme, Layers, LockLocked, LockUnlocked } from '@opengeoweb/theme';
|
|
11
11
|
import i18n from 'i18next';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
13
|
import '@opengeoweb/core';
|
|
@@ -1447,6 +1447,18 @@ var panelSlice = createSlice({
|
|
|
1447
1447
|
draft.locationData = Object.assign({}, draft.locationData, {
|
|
1448
1448
|
currentLocation: location
|
|
1449
1449
|
});
|
|
1450
|
+
},
|
|
1451
|
+
setLocationMenuSizeAndPosition: function setLocationMenuSizeAndPosition(draft, action) {
|
|
1452
|
+
draft.locationData = Object.assign({}, draft.locationData, {
|
|
1453
|
+
locationMenuSize: action.payload.size
|
|
1454
|
+
}, action.payload.position !== undefined && {
|
|
1455
|
+
locationMenuPosition: action.payload.position
|
|
1456
|
+
});
|
|
1457
|
+
},
|
|
1458
|
+
setLocationsDialogOpen: function setLocationsDialogOpen(draft, action) {
|
|
1459
|
+
draft.locationData = Object.assign({}, draft.locationData, {
|
|
1460
|
+
isLocationsDialogOpen: action.payload.isLocationsDialogOpen
|
|
1461
|
+
});
|
|
1450
1462
|
}
|
|
1451
1463
|
}
|
|
1452
1464
|
});
|
|
@@ -1637,7 +1649,7 @@ var timeSeriesReducer = function timeSeriesReducer(state, action) {
|
|
|
1637
1649
|
return didChange ? nextById : byId;
|
|
1638
1650
|
};
|
|
1639
1651
|
if (action.type === timeSeriesActions.registerTimeSeriesPreset.type) {
|
|
1640
|
-
var _normalizedState$byId, _payload2$services, _Object$assign;
|
|
1652
|
+
var _normalizedState$byId, _payload2$services, _Object$assign, _normalizedState$loca;
|
|
1641
1653
|
var _payload2 = action.payload;
|
|
1642
1654
|
if (!panelId) {
|
|
1643
1655
|
return Object.assign({}, normalizedState, {
|
|
@@ -1717,6 +1729,18 @@ var timeSeriesReducer = function timeSeriesReducer(state, action) {
|
|
|
1717
1729
|
payload: newServicesAdded,
|
|
1718
1730
|
type: timeSeriesActions.setServiceFilterChipsInStore.type
|
|
1719
1731
|
});
|
|
1732
|
+
if (!draft.locationData) {
|
|
1733
|
+
draft.locationData = {};
|
|
1734
|
+
}
|
|
1735
|
+
if (_payload2.locationMenuSize) {
|
|
1736
|
+
draft.locationData.locationMenuSize = _payload2.locationMenuSize;
|
|
1737
|
+
}
|
|
1738
|
+
if (_payload2.locationMenuPosition) {
|
|
1739
|
+
draft.locationData.locationMenuPosition = _payload2.locationMenuPosition;
|
|
1740
|
+
}
|
|
1741
|
+
if (_payload2.isLocationsDialogOpen !== undefined) {
|
|
1742
|
+
draft.locationData.isLocationsDialogOpen = _payload2.isLocationsDialogOpen;
|
|
1743
|
+
}
|
|
1720
1744
|
});
|
|
1721
1745
|
var updatedById = Object.assign({}, normalizedState.byId, (_Object$assign = {}, _Object$assign[panelId] = _nextPanelState, _Object$assign));
|
|
1722
1746
|
var servicesToSyncFromPreset = Array.from(new Map([].concat(newServicesAdded.map(function (service) {
|
|
@@ -1734,7 +1758,8 @@ var timeSeriesReducer = function timeSeriesReducer(state, action) {
|
|
|
1734
1758
|
})).values());
|
|
1735
1759
|
return Object.assign({}, normalizedState, {
|
|
1736
1760
|
services: nextServices,
|
|
1737
|
-
byId: syncServiceChipsAcrossPanels(updatedById, servicesToSyncFromPreset)
|
|
1761
|
+
byId: syncServiceChipsAcrossPanels(updatedById, servicesToSyncFromPreset),
|
|
1762
|
+
locationDialogRestoreVersion: ((_normalizedState$loca = normalizedState.locationDialogRestoreVersion) != null ? _normalizedState$loca : 0) + 1
|
|
1738
1763
|
});
|
|
1739
1764
|
}
|
|
1740
1765
|
if (!panelId) {
|
|
@@ -1969,7 +1994,45 @@ var getServicePopupDetails = createSelector(getTimeSeriesState, function (store)
|
|
|
1969
1994
|
var _store$timeseriesSele6;
|
|
1970
1995
|
return (store == null || (_store$timeseriesSele6 = store.timeseriesSelect) == null ? void 0 : _store$timeseriesSele6.servicePopup) || initialPanelState.timeseriesSelect.servicePopup;
|
|
1971
1996
|
});
|
|
1972
|
-
var
|
|
1997
|
+
var getLocationDialogRestoreVersion = function getLocationDialogRestoreVersion(state) {
|
|
1998
|
+
var ts = state.timeSeries;
|
|
1999
|
+
if (!ts || !('byId' in ts)) {
|
|
2000
|
+
return 0;
|
|
2001
|
+
}
|
|
2002
|
+
var version = ts.locationDialogRestoreVersion;
|
|
2003
|
+
return typeof version === 'number' ? version : 0;
|
|
2004
|
+
};
|
|
2005
|
+
/**
|
|
2006
|
+
* Returns the panelId of the first panel that has isLocationsDialogOpen: true or undefined.
|
|
2007
|
+
* @param {object} state store: object - store object
|
|
2008
|
+
* @returns {string | undefined} returnType: string | undefined
|
|
2009
|
+
*/
|
|
2010
|
+
var getDialogOpenPanelId = function getDialogOpenPanelId(state) {
|
|
2011
|
+
var _Object$entries$find;
|
|
2012
|
+
var ts = state.timeSeries;
|
|
2013
|
+
if (!ts || !('byId' in ts)) {
|
|
2014
|
+
return undefined;
|
|
2015
|
+
}
|
|
2016
|
+
var byId = ts.byId;
|
|
2017
|
+
return (_Object$entries$find = Object.entries(byId).find(function (_ref) {
|
|
2018
|
+
var _panel$locationData;
|
|
2019
|
+
var panel = _ref[1];
|
|
2020
|
+
return ((_panel$locationData = panel.locationData) == null ? void 0 : _panel$locationData.isLocationsDialogOpen) === true;
|
|
2021
|
+
})) == null ? void 0 : _Object$entries$find[0];
|
|
2022
|
+
};
|
|
2023
|
+
var getLocationMenuSize = function getLocationMenuSize(state, panelId) {
|
|
2024
|
+
var _getPanelState3;
|
|
2025
|
+
return (_getPanelState3 = getPanelState(state, panelId)) == null || (_getPanelState3 = _getPanelState3.locationData) == null ? void 0 : _getPanelState3.locationMenuSize;
|
|
2026
|
+
};
|
|
2027
|
+
var getLocationMenuPosition = function getLocationMenuPosition(state, panelId) {
|
|
2028
|
+
var _getPanelState4;
|
|
2029
|
+
return (_getPanelState4 = getPanelState(state, panelId)) == null || (_getPanelState4 = _getPanelState4.locationData) == null ? void 0 : _getPanelState4.locationMenuPosition;
|
|
2030
|
+
};
|
|
2031
|
+
var getLocationsDialogOpen = function getLocationsDialogOpen(state, panelId) {
|
|
2032
|
+
var _getPanelState$locati, _getPanelState5;
|
|
2033
|
+
return (_getPanelState$locati = (_getPanelState5 = getPanelState(state, panelId)) == null || (_getPanelState5 = _getPanelState5.locationData) == null ? void 0 : _getPanelState5.isLocationsDialogOpen) != null ? _getPanelState$locati : false;
|
|
2034
|
+
};
|
|
2035
|
+
var getTimeSeriesPreset = createSelector(getPlotState, getServices, getLocationMenuSize, getLocationMenuPosition, getLocationsDialogOpen, function (plotState, services, locationMenuSize, locationMenuPosition, isLocationsDialogOpen) {
|
|
1973
2036
|
if (!plotState || !services) {
|
|
1974
2037
|
return undefined;
|
|
1975
2038
|
}
|
|
@@ -1994,7 +2057,10 @@ var getTimeSeriesPreset = createSelector(getPlotState, getServices, function (pl
|
|
|
1994
2057
|
parameters: presetParameters
|
|
1995
2058
|
}),
|
|
1996
2059
|
services: usedServices,
|
|
1997
|
-
syncGroupsIds: []
|
|
2060
|
+
syncGroupsIds: [],
|
|
2061
|
+
locationMenuSize: locationMenuSize,
|
|
2062
|
+
locationMenuPosition: locationMenuPosition,
|
|
2063
|
+
isLocationsDialogOpen: isLocationsDialogOpen
|
|
1998
2064
|
};
|
|
1999
2065
|
});
|
|
2000
2066
|
var getGeoJSONWithService = createSelector([getServices, function (state, panelId) {
|
|
@@ -2053,9 +2119,14 @@ var selectors = /*#__PURE__*/Object.freeze({
|
|
|
2053
2119
|
getAllFilterChipsEnabled: getAllFilterChipsEnabled,
|
|
2054
2120
|
getCurrentLocation: getCurrentLocation,
|
|
2055
2121
|
getCurrentParameterInfoDisplayed: getCurrentParameterInfoDisplayed,
|
|
2122
|
+
getDialogOpenPanelId: getDialogOpenPanelId,
|
|
2056
2123
|
getGeoJSONWithService: getGeoJSONWithService,
|
|
2057
2124
|
getIsLegendVisible: getIsLegendVisible,
|
|
2058
2125
|
getIsMapPinDisabled: getIsMapPinDisabled,
|
|
2126
|
+
getLocationDialogRestoreVersion: getLocationDialogRestoreVersion,
|
|
2127
|
+
getLocationMenuPosition: getLocationMenuPosition,
|
|
2128
|
+
getLocationMenuSize: getLocationMenuSize,
|
|
2129
|
+
getLocationsDialogOpen: getLocationsDialogOpen,
|
|
2059
2130
|
getMapId: getMapId,
|
|
2060
2131
|
getPanelState: getPanelState,
|
|
2061
2132
|
getParameterById: getParameterById,
|
|
@@ -3177,7 +3248,7 @@ var useGetPlotsWithData = function useGetPlotsWithData(plotsWithoutData, selecte
|
|
|
3177
3248
|
// Create here so if new data is advertised by the collection/instance a new request is made
|
|
3178
3249
|
var intervalParam = constructTimeInterval(collection, instanceInfo, syncgroupTimeState);
|
|
3179
3250
|
return {
|
|
3180
|
-
queryKey: generateTimeSeriesQueryKeys(['get-parameter-data', parameter.plotId, parameter.propertyName, parameter.serviceId, parameter.collectionId, parameter.instanceId || 'undefined', ((_parameter$dimension = parameter.dimension) == null ? void 0 : _parameter$dimension.value) || 'undefined', intervalParam, selectedLocation.lat.toString() || 'undefined', selectedLocation.lon.toString() || 'undefined']),
|
|
3251
|
+
queryKey: generateTimeSeriesQueryKeys(['get-parameter-data', parameter.id || 'undefined', parameter.plotId, parameter.propertyName, parameter.serviceId, parameter.collectionId, parameter.instanceId || 'undefined', ((_parameter$dimension = parameter.dimension) == null ? void 0 : _parameter$dimension.value) || 'undefined', intervalParam, selectedLocation.lat.toString() || 'undefined', selectedLocation.lon.toString() || 'undefined']),
|
|
3181
3252
|
queryFn: function () {
|
|
3182
3253
|
var _queryFn7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
|
|
3183
3254
|
var edrResponse;
|
|
@@ -3792,14 +3863,16 @@ var ParameterList = function ParameterList(_ref) {
|
|
|
3792
3863
|
},
|
|
3793
3864
|
id: plot.plotId,
|
|
3794
3865
|
list: plot.parameters ? (_plot$parameters = plot.parameters) == null ? void 0 : _plot$parameters.map(function (param) {
|
|
3866
|
+
var _param$id, _param$instanceId;
|
|
3795
3867
|
return {
|
|
3796
|
-
id: param.
|
|
3868
|
+
id: (_param$id = param.id) != null ? _param$id : param.propertyName + "-" + param.collectionId + "-" + param.serviceId + "-" + ((_param$instanceId = param.instanceId) != null ? _param$instanceId : '')
|
|
3797
3869
|
};
|
|
3798
3870
|
}) : [],
|
|
3799
3871
|
onEnd: onSortEnd,
|
|
3800
3872
|
setList: function setList() {},
|
|
3801
3873
|
swapThreshold: 0.3,
|
|
3802
3874
|
children: (_plot$parameters2 = plot.parameters) == null ? void 0 : _plot$parameters2.map(function (parameter) {
|
|
3875
|
+
var _parameter$id, _parameter$instanceId;
|
|
3803
3876
|
var parameterIsEnabled = parameter.enabled !== false;
|
|
3804
3877
|
var rowIsEnabled = plotIsEnabled && parameterIsEnabled;
|
|
3805
3878
|
var styles = getStyles$1(rowIsEnabled);
|
|
@@ -3903,7 +3976,7 @@ var ParameterList = function ParameterList(_ref) {
|
|
|
3903
3976
|
}),
|
|
3904
3977
|
sx: styles.row
|
|
3905
3978
|
})]
|
|
3906
|
-
}, "" + parameter.
|
|
3979
|
+
}, (_parameter$id = parameter.id) != null ? _parameter$id : parameter.propertyName + "-" + parameter.collectionId + "-" + parameter.serviceId + "-" + ((_parameter$instanceId = parameter.instanceId) != null ? _parameter$instanceId : ''));
|
|
3907
3980
|
})
|
|
3908
3981
|
});
|
|
3909
3982
|
};
|
|
@@ -3963,22 +4036,24 @@ var TimeSeriesSelectButtonConnect = function TimeSeriesSelectButtonConnect(_ref)
|
|
|
3963
4036
|
var isOpenForPanel = isOpenInStore && currentSourcePanelId === panelId;
|
|
3964
4037
|
return jsx(CustomTooltip, {
|
|
3965
4038
|
title: t('timeseries-add-param-to-plot'),
|
|
3966
|
-
children: jsx(
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
4039
|
+
children: jsx("span", {
|
|
4040
|
+
children: jsx(CustomToggleButton, {
|
|
4041
|
+
"data-testid": "timeSeriesSelectButton",
|
|
4042
|
+
disabled: !isEnabled,
|
|
4043
|
+
onClick: handleClick,
|
|
4044
|
+
selected: !!isOpenForPanel && isSelectOpenForCurrentPlot,
|
|
4045
|
+
sx: {
|
|
4046
|
+
marginLeft: '4px',
|
|
4047
|
+
height: '24px!important',
|
|
4048
|
+
width: '24px',
|
|
4049
|
+
paddingLeft: '5px',
|
|
4050
|
+
svg: {
|
|
4051
|
+
marginLeft: '8px'
|
|
4052
|
+
}
|
|
4053
|
+
},
|
|
4054
|
+
variant: "tool",
|
|
4055
|
+
children: jsx(TimeSeriesSelect$1, {})
|
|
4056
|
+
})
|
|
3982
4057
|
})
|
|
3983
4058
|
});
|
|
3984
4059
|
};
|
|
@@ -6799,6 +6874,27 @@ var createMockStore = function createMockStore(mockState) {
|
|
|
6799
6874
|
});
|
|
6800
6875
|
};
|
|
6801
6876
|
|
|
6877
|
+
/* *
|
|
6878
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6879
|
+
* you may not use this file except in compliance with the License.
|
|
6880
|
+
* You may obtain a copy of the License at
|
|
6881
|
+
*
|
|
6882
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6883
|
+
*
|
|
6884
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6885
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6886
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6887
|
+
* See the License for the specific language governing permissions and
|
|
6888
|
+
* limitations under the License.
|
|
6889
|
+
*
|
|
6890
|
+
* Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6891
|
+
* Copyright 2026 - Finnish Meteorological Institute (FMI)
|
|
6892
|
+
* Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
|
|
6893
|
+
* */
|
|
6894
|
+
var TIME_SERIES_CONTAINER_BREAKPOINT_PX = '720px';
|
|
6895
|
+
var TIME_SERIES_CONTAINER_NAME = 'time-series-container';
|
|
6896
|
+
|
|
6897
|
+
var _styled;
|
|
6802
6898
|
var _excluded$1 = ["icon", "shortText", "longText"];
|
|
6803
6899
|
var TimeSeriesTopRowButtonUnstyled = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
6804
6900
|
var icon = _ref.icon,
|
|
@@ -6817,30 +6913,27 @@ var TimeSeriesTopRowButtonUnstyled = /*#__PURE__*/React.forwardRef(function (_re
|
|
|
6817
6913
|
})]
|
|
6818
6914
|
}));
|
|
6819
6915
|
});
|
|
6820
|
-
var TimeSeriesTopRowButton = styled(TimeSeriesTopRowButtonUnstyled)({
|
|
6821
|
-
height: '10px !important'
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
},
|
|
6827
|
-
'& svg': {
|
|
6828
|
-
marginRight: '0 !important'
|
|
6829
|
-
}
|
|
6830
|
-
},
|
|
6831
|
-
'@container time-series-container (width >= 720px)': {
|
|
6832
|
-
width: '130px',
|
|
6833
|
-
'& .shortText': {
|
|
6834
|
-
display: 'none'
|
|
6835
|
-
}
|
|
6916
|
+
var TimeSeriesTopRowButton = styled(TimeSeriesTopRowButtonUnstyled)((_styled = {
|
|
6917
|
+
height: '10px !important'
|
|
6918
|
+
}, _styled["@container " + TIME_SERIES_CONTAINER_NAME + " (width < " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
6919
|
+
maxWidth: '90px',
|
|
6920
|
+
'& .longText': {
|
|
6921
|
+
display: 'none'
|
|
6836
6922
|
},
|
|
6837
|
-
'&
|
|
6838
|
-
|
|
6839
|
-
whiteSpace: 'nowrap',
|
|
6840
|
-
textOverflow: 'ellipsis',
|
|
6841
|
-
overflow: 'hidden'
|
|
6923
|
+
'& svg': {
|
|
6924
|
+
marginRight: '0 !important'
|
|
6842
6925
|
}
|
|
6843
|
-
})
|
|
6926
|
+
}, _styled["@container " + TIME_SERIES_CONTAINER_NAME + " (min-width: " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
6927
|
+
width: '130px',
|
|
6928
|
+
'& .shortText': {
|
|
6929
|
+
display: 'none'
|
|
6930
|
+
}
|
|
6931
|
+
}, _styled['& span'] = {
|
|
6932
|
+
fontSize: '9pt',
|
|
6933
|
+
whiteSpace: 'nowrap',
|
|
6934
|
+
textOverflow: 'ellipsis',
|
|
6935
|
+
overflow: 'hidden'
|
|
6936
|
+
}, _styled));
|
|
6844
6937
|
|
|
6845
6938
|
var LocationInfoButtonConnect = function LocationInfoButtonConnect(_ref) {
|
|
6846
6939
|
var panelId = _ref.panelId,
|
|
@@ -6876,7 +6969,7 @@ var LocationInfoButtonConnect = function LocationInfoButtonConnect(_ref) {
|
|
|
6876
6969
|
};
|
|
6877
6970
|
|
|
6878
6971
|
var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
6879
|
-
var _timeSeriesLocation$o;
|
|
6972
|
+
var _timeSeriesLocation$o, _sx;
|
|
6880
6973
|
var panelId = _ref.panelId;
|
|
6881
6974
|
var dispatch = useDispatch();
|
|
6882
6975
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
@@ -6901,11 +6994,17 @@ var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
|
6901
6994
|
}, [isLocationsDialogOpen, currentSourcePanelId]);
|
|
6902
6995
|
var selectedLocationName = typeof (timeSeriesLocation == null || (_timeSeriesLocation$o = timeSeriesLocation.occurrences) == null || (_timeSeriesLocation$o = _timeSeriesLocation$o[0]) == null || (_timeSeriesLocation$o = _timeSeriesLocation$o.properties) == null ? void 0 : _timeSeriesLocation$o.name) === 'string' ? timeSeriesLocation.occurrences[0].properties.name : '';
|
|
6903
6996
|
var toggleLocationsDialog = function toggleLocationsDialog() {
|
|
6997
|
+
var newIsOpen = currentSourcePanelId !== panelId ? true : !isLocationsDialogOpen;
|
|
6904
6998
|
dispatch(uiActions.setToggleOpenDialog({
|
|
6905
6999
|
type: uiTypes.DialogTypes.TimeseriesLocations,
|
|
6906
|
-
setOpen:
|
|
7000
|
+
setOpen: newIsOpen,
|
|
6907
7001
|
sourcePanelId: panelId
|
|
6908
7002
|
}));
|
|
7003
|
+
dispatch(timeSeriesActions.setLocationsDialogOpen({
|
|
7004
|
+
panelId: panelId,
|
|
7005
|
+
isLocationsDialogOpen: newIsOpen,
|
|
7006
|
+
origin: TimeSeriesActionOrigin.timeSeriesManager
|
|
7007
|
+
}));
|
|
6909
7008
|
};
|
|
6910
7009
|
React.useEffect(function () {
|
|
6911
7010
|
return function () {
|
|
@@ -6926,11 +7025,9 @@ var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
|
6926
7025
|
"data-testid": "locationSelectButton",
|
|
6927
7026
|
disabled: isMapPinDisabled,
|
|
6928
7027
|
icon: jsx(Location, {
|
|
6929
|
-
sx: {
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
}
|
|
6933
|
-
}
|
|
7028
|
+
sx: (_sx = {}, _sx["@container " + TIME_SERIES_CONTAINER_NAME + " (width < " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
7029
|
+
display: 'none'
|
|
7030
|
+
}, _sx)
|
|
6934
7031
|
}),
|
|
6935
7032
|
longText: selectedLocationName || t('timeseries-location'),
|
|
6936
7033
|
onClick: toggleLocationsDialog,
|
|
@@ -6942,12 +7039,13 @@ var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
|
6942
7039
|
};
|
|
6943
7040
|
|
|
6944
7041
|
var TimeSeriesMarkersSwitch = function TimeSeriesMarkersSwitch(_ref) {
|
|
7042
|
+
var _sx;
|
|
6945
7043
|
var shouldHideMarkers = _ref.shouldHideMarkers,
|
|
6946
7044
|
toggleMarkers = _ref.toggleMarkers;
|
|
6947
7045
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
6948
7046
|
t = _useTimeseriesTransla.t;
|
|
6949
7047
|
return jsxs(Box, {
|
|
6950
|
-
sx: {
|
|
7048
|
+
sx: (_sx = {
|
|
6951
7049
|
display: 'flex',
|
|
6952
7050
|
flexWrap: 'wrap',
|
|
6953
7051
|
alignItems: 'flex-start',
|
|
@@ -6963,14 +7061,13 @@ var TimeSeriesMarkersSwitch = function TimeSeriesMarkersSwitch(_ref) {
|
|
|
6963
7061
|
},
|
|
6964
7062
|
'.markers-label': {
|
|
6965
7063
|
display: 'none'
|
|
6966
|
-
},
|
|
6967
|
-
'@container time-series-container (min-width: 720px)': {
|
|
6968
|
-
minWidth: '146px',
|
|
6969
|
-
'.markers-label, .switch-button label': {
|
|
6970
|
-
display: 'initial'
|
|
6971
|
-
}
|
|
6972
7064
|
}
|
|
6973
|
-
},
|
|
7065
|
+
}, _sx["@container " + TIME_SERIES_CONTAINER_NAME + " (min-width: " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
7066
|
+
minWidth: '146px',
|
|
7067
|
+
'.markers-label, .switch-button label': {
|
|
7068
|
+
display: 'initial'
|
|
7069
|
+
}
|
|
7070
|
+
}, _sx),
|
|
6974
7071
|
children: [jsx(Typography, {
|
|
6975
7072
|
className: "markers-label",
|
|
6976
7073
|
sx: {
|
|
@@ -7019,9 +7116,9 @@ var createParameterNames = function createParameterNames(plotsWithData) {
|
|
|
7019
7116
|
// count per plot how many duplicate names there are
|
|
7020
7117
|
var perBaseNamePlotCounters = new Map();
|
|
7021
7118
|
return parameters.map(function (parameter) {
|
|
7022
|
-
var
|
|
7119
|
+
var _duplicateParameterCo, _plotCounters$get, _parameter$enabled3;
|
|
7023
7120
|
var name = getParameterDisplayName(parameter);
|
|
7024
|
-
var id = (
|
|
7121
|
+
var id = getParameterKey$1(parameter);
|
|
7025
7122
|
var totalCount = (_duplicateParameterCo = duplicateParameterCount.get(name)) != null ? _duplicateParameterCo : 0;
|
|
7026
7123
|
if (totalCount === 1) {
|
|
7027
7124
|
var _parameter$enabled;
|
|
@@ -7269,6 +7366,14 @@ var isTimeSeriesParam = function isTimeSeriesParam(param) {
|
|
|
7269
7366
|
var getParameterDisplayName = function getParameterDisplayName(parameter) {
|
|
7270
7367
|
return parameter.propertyName + " - " + parameter.collectionId;
|
|
7271
7368
|
};
|
|
7369
|
+
// Stable unique key: uses id when present, otherwise a composite fallback.
|
|
7370
|
+
var getParameterKey$1 = function getParameterKey(parameter) {
|
|
7371
|
+
var _parameter$instanceId, _parameter$dimension$, _parameter$dimension, _parameter$dimension$2, _parameter$dimension2;
|
|
7372
|
+
if (parameter.id) {
|
|
7373
|
+
return parameter.id;
|
|
7374
|
+
}
|
|
7375
|
+
return [parameter.plotId, parameter.propertyName, parameter.collectionId, (_parameter$instanceId = parameter.instanceId) != null ? _parameter$instanceId : '', (_parameter$dimension$ = (_parameter$dimension = parameter.dimension) == null ? void 0 : _parameter$dimension.id) != null ? _parameter$dimension$ : '', (_parameter$dimension$2 = (_parameter$dimension2 = parameter.dimension) == null ? void 0 : _parameter$dimension2.value) != null ? _parameter$dimension$2 : ''].join('|');
|
|
7376
|
+
};
|
|
7272
7377
|
var roundDecimalValues = function roundDecimalValues(value) {
|
|
7273
7378
|
if (isNaN(value) || value === null || value === undefined) {
|
|
7274
7379
|
return 'no data';
|
|
@@ -7469,7 +7574,7 @@ var getSeries = function getSeries(plotCharts, parameterNames) {
|
|
|
7469
7574
|
return Object.assign({
|
|
7470
7575
|
data: getEChartsSeriesDataByTimestep(uniqueTimesteps, parameter),
|
|
7471
7576
|
name: (_parameterNames$find = parameterNames.find(function (pName) {
|
|
7472
|
-
return pName.id === parameter
|
|
7577
|
+
return pName.id === getParameterKey$1(parameter);
|
|
7473
7578
|
})) == null ? void 0 : _parameterNames$find.name,
|
|
7474
7579
|
type: type,
|
|
7475
7580
|
xAxisIndex: plotIndex,
|
|
@@ -7535,6 +7640,44 @@ function getPlotCharts(plotsWithData) {
|
|
|
7535
7640
|
return plotCharts;
|
|
7536
7641
|
}
|
|
7537
7642
|
|
|
7643
|
+
// Guard: mocked ReactECharts (forwardRef) has no real prototype chain.
|
|
7644
|
+
var reactEChartsProto = ReactECharts.prototype;
|
|
7645
|
+
var echartsReactCoreProto = reactEChartsProto ? Object.getPrototypeOf(reactEChartsProto) : null;
|
|
7646
|
+
if (echartsReactCoreProto != null && echartsReactCoreProto.renderNewEcharts) {
|
|
7647
|
+
var originalRenderNewEcharts = echartsReactCoreProto.renderNewEcharts;
|
|
7648
|
+
echartsReactCoreProto.renderNewEcharts = /*#__PURE__*/function () {
|
|
7649
|
+
var _patchedRenderNewEcharts = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
7650
|
+
var _t;
|
|
7651
|
+
return _regenerator().w(function (_context) {
|
|
7652
|
+
while (1) switch (_context.p = _context.n) {
|
|
7653
|
+
case 0:
|
|
7654
|
+
_context.p = 0;
|
|
7655
|
+
_context.n = 1;
|
|
7656
|
+
return originalRenderNewEcharts.call(this);
|
|
7657
|
+
case 1:
|
|
7658
|
+
_context.n = 4;
|
|
7659
|
+
break;
|
|
7660
|
+
case 2:
|
|
7661
|
+
_context.p = 2;
|
|
7662
|
+
_t = _context.v;
|
|
7663
|
+
if (this.ele) {
|
|
7664
|
+
_context.n = 3;
|
|
7665
|
+
break;
|
|
7666
|
+
}
|
|
7667
|
+
return _context.a(2);
|
|
7668
|
+
case 3:
|
|
7669
|
+
throw _t;
|
|
7670
|
+
case 4:
|
|
7671
|
+
return _context.a(2);
|
|
7672
|
+
}
|
|
7673
|
+
}, _callee, this, [[0, 2]]);
|
|
7674
|
+
}));
|
|
7675
|
+
function patchedRenderNewEcharts() {
|
|
7676
|
+
return _patchedRenderNewEcharts.apply(this, arguments);
|
|
7677
|
+
}
|
|
7678
|
+
return patchedRenderNewEcharts;
|
|
7679
|
+
}();
|
|
7680
|
+
}
|
|
7538
7681
|
var useChartHeight = function useChartHeight(_ref) {
|
|
7539
7682
|
var plotsWithData = _ref.plotsWithData,
|
|
7540
7683
|
shouldShowLegend = _ref.shouldShowLegend,
|
|
@@ -7548,6 +7691,9 @@ var useChartHeight = function useChartHeight(_ref) {
|
|
|
7548
7691
|
setChartHeight = _React$useState[1];
|
|
7549
7692
|
var chartRef = React.useRef(null);
|
|
7550
7693
|
var updateHeight = React.useCallback(function (echartsInstance) {
|
|
7694
|
+
if (echartsInstance.isDisposed()) {
|
|
7695
|
+
return;
|
|
7696
|
+
}
|
|
7551
7697
|
var legendApi = echartsInstance;
|
|
7552
7698
|
if (legendApi.getModel() !== null) {
|
|
7553
7699
|
var _option$grid;
|
|
@@ -7580,7 +7726,7 @@ var useChartHeight = function useChartHeight(_ref) {
|
|
|
7580
7726
|
React.useEffect(function () {
|
|
7581
7727
|
var _chartRef$current;
|
|
7582
7728
|
var instance = (_chartRef$current = chartRef.current) == null ? void 0 : _chartRef$current.getEchartsInstance();
|
|
7583
|
-
if (instance) {
|
|
7729
|
+
if (instance && !instance.isDisposed()) {
|
|
7584
7730
|
instance.setOption({
|
|
7585
7731
|
legend: {
|
|
7586
7732
|
top: 0,
|
|
@@ -7594,7 +7740,7 @@ var useChartHeight = function useChartHeight(_ref) {
|
|
|
7594
7740
|
var onHeight = function onHeight() {
|
|
7595
7741
|
var _chartRef$current2;
|
|
7596
7742
|
var instance = (_chartRef$current2 = chartRef.current) == null ? void 0 : _chartRef$current2.getEchartsInstance();
|
|
7597
|
-
if (instance) {
|
|
7743
|
+
if (instance && !instance.isDisposed()) {
|
|
7598
7744
|
updateHeight(instance);
|
|
7599
7745
|
}
|
|
7600
7746
|
};
|
|
@@ -8075,7 +8221,7 @@ var useMapPin = function useMapPin(_ref) {
|
|
|
8075
8221
|
};
|
|
8076
8222
|
};
|
|
8077
8223
|
var TimeSeriesConnect = function TimeSeriesConnect(_ref2) {
|
|
8078
|
-
var _linkedMapIds
|
|
8224
|
+
var _linkedMapIds$, _sx;
|
|
8079
8225
|
var panelId = _ref2.panelId;
|
|
8080
8226
|
var dispatch = useDispatch();
|
|
8081
8227
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
@@ -8214,7 +8360,7 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref2) {
|
|
|
8214
8360
|
height: '100%',
|
|
8215
8361
|
backgroundColor: 'geowebColors.background.surfaceApp',
|
|
8216
8362
|
containerType: 'inline-size',
|
|
8217
|
-
containerName:
|
|
8363
|
+
containerName: TIME_SERIES_CONTAINER_NAME
|
|
8218
8364
|
},
|
|
8219
8365
|
children: [jsxs(Stack, {
|
|
8220
8366
|
direction: "row",
|
|
@@ -8247,16 +8393,23 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref2) {
|
|
|
8247
8393
|
}), jsx(TimeSeriesMarkersSwitch, {
|
|
8248
8394
|
shouldHideMarkers: shouldHideLocationMarkers,
|
|
8249
8395
|
toggleMarkers: toggleLocationMarkers
|
|
8250
|
-
}), jsx(
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8396
|
+
}), jsx(LegendToggleButton, {
|
|
8397
|
+
hideTooltipText: t('timeseries-legend-tooltip-hide'),
|
|
8398
|
+
isLegendVisible: shouldShowLegend,
|
|
8399
|
+
legendLabel: t('timeseries-legend'),
|
|
8400
|
+
onToggle: toggleLegend,
|
|
8401
|
+
showTooltipText: t('timeseries-legend-tooltip-show'),
|
|
8402
|
+
sx: (_sx = {}, _sx["@container " + TIME_SERIES_CONTAINER_NAME + " (width < " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
8403
|
+
maxWidth: '90px',
|
|
8404
|
+
'& .longText': {
|
|
8405
|
+
display: 'none'
|
|
8406
|
+
},
|
|
8407
|
+
'& svg': {
|
|
8408
|
+
marginRight: '0 !important'
|
|
8409
|
+
}
|
|
8410
|
+
}, _sx["@container " + TIME_SERIES_CONTAINER_NAME + " (min-width: " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
8411
|
+
width: '130px'
|
|
8412
|
+
}, _sx)
|
|
8260
8413
|
})]
|
|
8261
8414
|
}), !!timeSeriesLocation && !!plotPresetState && jsx(Box, {
|
|
8262
8415
|
sx: {
|
|
@@ -8324,7 +8477,10 @@ var componentsLookUp = function componentsLookUp(_ref) {
|
|
|
8324
8477
|
timeSeriesPreset: {
|
|
8325
8478
|
plotPreset: initialProps.plotPreset,
|
|
8326
8479
|
services: initialProps.services,
|
|
8327
|
-
syncGroupsIds: initialProps.syncGroupsIds
|
|
8480
|
+
syncGroupsIds: initialProps.syncGroupsIds,
|
|
8481
|
+
locationMenuSize: initialProps.locationMenuSize,
|
|
8482
|
+
locationMenuPosition: initialProps.locationMenuPosition,
|
|
8483
|
+
isLocationsDialogOpen: initialProps.isLocationsDialogOpen
|
|
8328
8484
|
}
|
|
8329
8485
|
});
|
|
8330
8486
|
}
|
|
@@ -8878,6 +9034,44 @@ var LocationSelectDialogConnect = function LocationSelectDialogConnect() {
|
|
|
8878
9034
|
var timeSeriesLocation = useSelector(function (state) {
|
|
8879
9035
|
return panelId ? getCurrentLocation(state, panelId) : undefined;
|
|
8880
9036
|
});
|
|
9037
|
+
var locationMenuSize = useSelector(function (state) {
|
|
9038
|
+
return panelId ? getLocationMenuSize(state, panelId) : undefined;
|
|
9039
|
+
});
|
|
9040
|
+
var locationMenuPosition = useSelector(function (state) {
|
|
9041
|
+
return panelId ? getLocationMenuPosition(state, panelId) : undefined;
|
|
9042
|
+
});
|
|
9043
|
+
var locationDialogRestoreVersion = useSelector(function (state) {
|
|
9044
|
+
return getLocationDialogRestoreVersion(state);
|
|
9045
|
+
});
|
|
9046
|
+
var dialogOpenPanelId = useSelector(function (state) {
|
|
9047
|
+
return getDialogOpenPanelId(state);
|
|
9048
|
+
});
|
|
9049
|
+
useEffect(function () {
|
|
9050
|
+
if (locationDialogRestoreVersion === 0) {
|
|
9051
|
+
return;
|
|
9052
|
+
}
|
|
9053
|
+
if (dialogOpenPanelId) {
|
|
9054
|
+
dispatch(uiActions.setToggleOpenDialog({
|
|
9055
|
+
type: uiTypes.DialogTypes.TimeseriesLocations,
|
|
9056
|
+
setOpen: true,
|
|
9057
|
+
sourcePanelId: dialogOpenPanelId
|
|
9058
|
+
}));
|
|
9059
|
+
} else {
|
|
9060
|
+
dispatch(uiActions.setToggleOpenDialog({
|
|
9061
|
+
type: uiTypes.DialogTypes.TimeseriesLocations,
|
|
9062
|
+
setOpen: false
|
|
9063
|
+
}));
|
|
9064
|
+
}
|
|
9065
|
+
}, [locationDialogRestoreVersion, dialogOpenPanelId, dispatch]);
|
|
9066
|
+
useEffect(function () {
|
|
9067
|
+
if (!panelId) {
|
|
9068
|
+
return;
|
|
9069
|
+
}
|
|
9070
|
+
dispatch(timeSeriesActions.setLocationsDialogOpen({
|
|
9071
|
+
panelId: panelId,
|
|
9072
|
+
isLocationsDialogOpen: isDialogOpen
|
|
9073
|
+
}));
|
|
9074
|
+
}, [isDialogOpen, panelId, dispatch]);
|
|
8881
9075
|
var _useTimeSeriesLocatio = useTimeSeriesLocations(panelId || ''),
|
|
8882
9076
|
combinedGeoJson = _useTimeSeriesLocatio.combinedGeoJson,
|
|
8883
9077
|
splitGeoJsonByCollection = _useTimeSeriesLocatio.splitGeoJsonByCollection;
|
|
@@ -8898,6 +9092,34 @@ var LocationSelectDialogConnect = function LocationSelectDialogConnect() {
|
|
|
8898
9092
|
location: location
|
|
8899
9093
|
}));
|
|
8900
9094
|
}, [dispatch, panelId]);
|
|
9095
|
+
var handleClose = useCallback(function () {
|
|
9096
|
+
onCloseDialog();
|
|
9097
|
+
if (!panelId) {
|
|
9098
|
+
return;
|
|
9099
|
+
}
|
|
9100
|
+
dispatch(timeSeriesActions.setLocationsDialogOpen({
|
|
9101
|
+
panelId: panelId,
|
|
9102
|
+
isLocationsDialogOpen: false,
|
|
9103
|
+
origin: TimeSeriesActionOrigin.timeSeriesManager
|
|
9104
|
+
}));
|
|
9105
|
+
}, [dispatch, onCloseDialog, panelId]);
|
|
9106
|
+
var handleDragEnd = useCallback(function (position, size) {
|
|
9107
|
+
if (!panelId || typeof size.width !== 'number' || typeof size.height !== 'number') {
|
|
9108
|
+
return;
|
|
9109
|
+
}
|
|
9110
|
+
dispatch(timeSeriesActions.setLocationMenuSizeAndPosition({
|
|
9111
|
+
panelId: panelId,
|
|
9112
|
+
size: {
|
|
9113
|
+
width: size.width,
|
|
9114
|
+
height: size.height
|
|
9115
|
+
},
|
|
9116
|
+
position: {
|
|
9117
|
+
x: position.x,
|
|
9118
|
+
y: position.y
|
|
9119
|
+
},
|
|
9120
|
+
origin: TimeSeriesActionOrigin.timeSeriesManager
|
|
9121
|
+
}));
|
|
9122
|
+
}, [dispatch, panelId]);
|
|
8901
9123
|
var setMapPinLocation = function setMapPinLocation(mapPinLocation) {
|
|
8902
9124
|
selectedMapIds.forEach(function (mapId) {
|
|
8903
9125
|
dispatch(mapActions.setMapPinLocation({
|
|
@@ -8953,14 +9175,20 @@ var LocationSelectDialogConnect = function LocationSelectDialogConnect() {
|
|
|
8953
9175
|
bounds: "parent",
|
|
8954
9176
|
isOpen: isDialogOpen,
|
|
8955
9177
|
minWidth: 264,
|
|
8956
|
-
onClose:
|
|
9178
|
+
onClose: handleClose,
|
|
9179
|
+
onDragEnd: handleDragEnd,
|
|
8957
9180
|
onMouseDown: setDialogOrder,
|
|
8958
9181
|
order: dialogOrder,
|
|
9182
|
+
resetPositionOnOpen: true,
|
|
9183
|
+
startDraggablePosition: locationMenuPosition != null ? locationMenuPosition : {
|
|
9184
|
+
x: 0,
|
|
9185
|
+
y: 0
|
|
9186
|
+
},
|
|
8959
9187
|
startPosition: {
|
|
8960
9188
|
top: 60,
|
|
8961
9189
|
left: 200
|
|
8962
9190
|
},
|
|
8963
|
-
startSize: {
|
|
9191
|
+
startSize: locationMenuSize != null ? locationMenuSize : {
|
|
8964
9192
|
width: 320,
|
|
8965
9193
|
height: 500
|
|
8966
9194
|
},
|
|
@@ -6,6 +6,15 @@ interface InitialTimeseriesProps {
|
|
|
6
6
|
services: TimeSeriesService[];
|
|
7
7
|
hideLocationMarkers?: boolean;
|
|
8
8
|
syncGroupsIds: string[];
|
|
9
|
+
locationMenuSize?: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
locationMenuPosition?: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
isLocationsDialogOpen?: boolean;
|
|
9
18
|
}
|
|
10
19
|
export type SupportedComponentTypes = 'TimeSeries';
|
|
11
20
|
export type InitialProps = InitialTimeseriesProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Reducer } from '@reduxjs/toolkit';
|
|
2
2
|
import type { TimeSeriesService } from '@opengeoweb/shared';
|
|
3
|
-
import type { ServiceFilterChipsObject, SetCurrentParameterInfo, SetSearchFilterPayload, MovePlotPayload, SetTimeSeriesServicesPayload, TimeSeriesState, TimeSeriesStoreType, ParameterManipulationPayload, UpdateTitlePayload, MoveParameterPayload, SetTimeSeriesServicePopupPayload, UpsertTimeSeriesServicePayload, RemoveServiceFilterChipFromStorePayload, RemoveTimeSeriesServicePayload, ParameterActionPayload, PlotActionPayload, AddPlotPayload, ParameterPatchPayload, ToggleDisableMapPinPayload, ToggleLocationMarkersPayload, ToggleTimeSeriesLegendPayload, SetTimeSeriesLocationPayload, RegisterTimeSeriesPresetPayload } from './types';
|
|
3
|
+
import type { ServiceFilterChipsObject, SetCurrentParameterInfo, SetSearchFilterPayload, MovePlotPayload, SetTimeSeriesServicesPayload, TimeSeriesState, TimeSeriesStoreType, ParameterManipulationPayload, UpdateTitlePayload, MoveParameterPayload, SetTimeSeriesServicePopupPayload, UpsertTimeSeriesServicePayload, RemoveServiceFilterChipFromStorePayload, RemoveTimeSeriesServicePayload, ParameterActionPayload, PlotActionPayload, AddPlotPayload, ParameterPatchPayload, ToggleDisableMapPinPayload, ToggleLocationMarkersPayload, ToggleTimeSeriesLegendPayload, SetTimeSeriesLocationPayload, RegisterTimeSeriesPresetPayload, SetLocationMenuSizeAndPositionPayload, SetLocationsDialogOpenPayload } from './types';
|
|
4
4
|
export declare const timeseriesSelectServiceFilterChipsAdapter: import("@reduxjs/toolkit").EntityAdapter<ServiceFilterChipsObject, string>;
|
|
5
5
|
export declare const initialState: TimeSeriesState;
|
|
6
6
|
export declare const createPanelState: () => TimeSeriesStoreType;
|
|
@@ -49,6 +49,8 @@ export declare const timeSeriesActions: {
|
|
|
49
49
|
toggleLocationMarkers: import("@reduxjs/toolkit").ActionCreatorWithPayload<ToggleLocationMarkersPayload, "timeseriesPanel/toggleLocationMarkers">;
|
|
50
50
|
toggleLegend: import("@reduxjs/toolkit").ActionCreatorWithPayload<ToggleTimeSeriesLegendPayload, "timeseriesPanel/toggleLegend">;
|
|
51
51
|
setCurrentLocation: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetTimeSeriesLocationPayload, "timeseriesPanel/setCurrentLocation">;
|
|
52
|
+
setLocationMenuSizeAndPosition: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetLocationMenuSizeAndPositionPayload, "timeseriesPanel/setLocationMenuSizeAndPosition">;
|
|
53
|
+
setLocationsDialogOpen: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetLocationsDialogOpenPayload, "timeseriesPanel/setLocationsDialogOpen">;
|
|
52
54
|
};
|
|
53
55
|
export declare const timeSeriesReducer: Reducer<TimeSeriesState>;
|
|
54
56
|
export declare const generateServiceId: () => string;
|
|
@@ -264,13 +264,41 @@ export declare const getServicePopupDetails: ((state: TimeSeriesStateSlice, pane
|
|
|
264
264
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
265
265
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
266
266
|
};
|
|
267
|
+
export declare const getLocationDialogRestoreVersion: (state: TimeSeriesStateSlice) => number;
|
|
268
|
+
/**
|
|
269
|
+
* Returns the panelId of the first panel that has isLocationsDialogOpen: true or undefined.
|
|
270
|
+
* @param {object} state store: object - store object
|
|
271
|
+
* @returns {string | undefined} returnType: string | undefined
|
|
272
|
+
*/
|
|
273
|
+
export declare const getDialogOpenPanelId: (state: TimeSeriesStateSlice) => string | undefined;
|
|
274
|
+
export declare const getLocationMenuSize: (state: TimeSeriesStateSlice, panelId?: string) => {
|
|
275
|
+
width: number;
|
|
276
|
+
height: number;
|
|
277
|
+
} | undefined;
|
|
278
|
+
export declare const getLocationMenuPosition: (state: TimeSeriesStateSlice, panelId?: string) => {
|
|
279
|
+
x: number;
|
|
280
|
+
y: number;
|
|
281
|
+
} | undefined;
|
|
282
|
+
export declare const getLocationsDialogOpen: (state: TimeSeriesStateSlice, panelId?: string) => boolean;
|
|
267
283
|
export declare const getTimeSeriesPreset: ((state: TimeSeriesStateSlice, panelId?: string | undefined) => TimeSeriesPreset | undefined) & {
|
|
268
284
|
clearCache: () => void;
|
|
269
285
|
resultsCount: () => number;
|
|
270
286
|
resetResultsCount: () => void;
|
|
271
287
|
} & {
|
|
272
|
-
resultFunc: (resultFuncArgs_0: PlotPreset | undefined, resultFuncArgs_1: TimeSeriesService[] | undefined
|
|
273
|
-
|
|
288
|
+
resultFunc: (resultFuncArgs_0: PlotPreset | undefined, resultFuncArgs_1: TimeSeriesService[] | undefined, resultFuncArgs_2: {
|
|
289
|
+
width: number;
|
|
290
|
+
height: number;
|
|
291
|
+
} | undefined, resultFuncArgs_3: {
|
|
292
|
+
x: number;
|
|
293
|
+
y: number;
|
|
294
|
+
} | undefined, resultFuncArgs_4: boolean) => TimeSeriesPreset | undefined;
|
|
295
|
+
memoizedResultFunc: ((resultFuncArgs_0: PlotPreset | undefined, resultFuncArgs_1: TimeSeriesService[] | undefined, resultFuncArgs_2: {
|
|
296
|
+
width: number;
|
|
297
|
+
height: number;
|
|
298
|
+
} | undefined, resultFuncArgs_3: {
|
|
299
|
+
x: number;
|
|
300
|
+
y: number;
|
|
301
|
+
} | undefined, resultFuncArgs_4: boolean) => TimeSeriesPreset | undefined) & {
|
|
274
302
|
clearCache: () => void;
|
|
275
303
|
resultsCount: () => number;
|
|
276
304
|
resetResultsCount: () => void;
|
|
@@ -296,7 +324,13 @@ export declare const getTimeSeriesPreset: ((state: TimeSeriesStateSlice, panelId
|
|
|
296
324
|
} & {
|
|
297
325
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
298
326
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
299
|
-
}
|
|
327
|
+
}, (state: TimeSeriesStateSlice, panelId?: string) => {
|
|
328
|
+
width: number;
|
|
329
|
+
height: number;
|
|
330
|
+
} | undefined, (state: TimeSeriesStateSlice, panelId?: string) => {
|
|
331
|
+
x: number;
|
|
332
|
+
y: number;
|
|
333
|
+
} | undefined, (state: TimeSeriesStateSlice, panelId?: string) => boolean];
|
|
300
334
|
recomputations: () => number;
|
|
301
335
|
resetRecomputations: () => void;
|
|
302
336
|
dependencyRecomputations: () => number;
|
|
@@ -43,6 +43,15 @@ export interface TimeseriesLocationData {
|
|
|
43
43
|
shouldHideLocationMarkers?: boolean;
|
|
44
44
|
isLegendVisible?: boolean;
|
|
45
45
|
currentLocation?: TimeSeriesLocation | undefined;
|
|
46
|
+
locationMenuSize?: {
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
};
|
|
50
|
+
locationMenuPosition?: {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
};
|
|
54
|
+
isLocationsDialogOpen?: boolean;
|
|
46
55
|
}
|
|
47
56
|
export interface TimeSeriesStoreType {
|
|
48
57
|
plotPreset?: PlotPreset;
|
|
@@ -53,11 +62,22 @@ export interface TimeSeriesStoreType {
|
|
|
53
62
|
export interface TimeSeriesState {
|
|
54
63
|
byId: Record<string, TimeSeriesStoreType>;
|
|
55
64
|
services: TimeSeriesService[];
|
|
65
|
+
/** Increments whenever any panel's preset is registered; triggers dialog-state restore in LocationSelectDialogConnect. */
|
|
66
|
+
locationDialogRestoreVersion?: number;
|
|
56
67
|
}
|
|
57
68
|
export interface TimeSeriesPreset {
|
|
58
69
|
plotPreset: PlotPreset;
|
|
59
70
|
services: TimeSeriesService[];
|
|
60
71
|
syncGroupsIds: string[];
|
|
72
|
+
locationMenuSize?: {
|
|
73
|
+
width: number;
|
|
74
|
+
height: number;
|
|
75
|
+
};
|
|
76
|
+
locationMenuPosition?: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
};
|
|
80
|
+
isLocationsDialogOpen?: boolean;
|
|
61
81
|
}
|
|
62
82
|
export interface TimeSeriesPayload {
|
|
63
83
|
panelId?: string;
|
|
@@ -66,6 +86,15 @@ export interface TimeSeriesPayload {
|
|
|
66
86
|
export interface RegisterTimeSeriesPresetPayload extends TimeSeriesPayload {
|
|
67
87
|
plotPreset: PlotPreset;
|
|
68
88
|
services?: TimeSeriesService[];
|
|
89
|
+
locationMenuSize?: {
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
};
|
|
93
|
+
locationMenuPosition?: {
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
};
|
|
97
|
+
isLocationsDialogOpen?: boolean;
|
|
69
98
|
}
|
|
70
99
|
export interface ParameterManipulationPayload extends TimeSeriesPayload {
|
|
71
100
|
parameter: Parameter;
|
|
@@ -150,3 +179,16 @@ export interface SetTimeSeriesLocationPayload {
|
|
|
150
179
|
panelId?: string;
|
|
151
180
|
location: TimeSeriesLocation | undefined;
|
|
152
181
|
}
|
|
182
|
+
export interface SetLocationMenuSizeAndPositionPayload extends TimeSeriesPayload {
|
|
183
|
+
size: {
|
|
184
|
+
width: number;
|
|
185
|
+
height: number;
|
|
186
|
+
};
|
|
187
|
+
position?: {
|
|
188
|
+
x: number;
|
|
189
|
+
y: number;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
export interface SetLocationsDialogOpenPayload extends TimeSeriesPayload {
|
|
193
|
+
isLocationsDialogOpen: boolean;
|
|
194
|
+
}
|