@opengeoweb/time-series 19.3.0 → 19.4.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
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';
|
|
@@ -6799,6 +6799,27 @@ var createMockStore = function createMockStore(mockState) {
|
|
|
6799
6799
|
});
|
|
6800
6800
|
};
|
|
6801
6801
|
|
|
6802
|
+
/* *
|
|
6803
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6804
|
+
* you may not use this file except in compliance with the License.
|
|
6805
|
+
* You may obtain a copy of the License at
|
|
6806
|
+
*
|
|
6807
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6808
|
+
*
|
|
6809
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6810
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6811
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6812
|
+
* See the License for the specific language governing permissions and
|
|
6813
|
+
* limitations under the License.
|
|
6814
|
+
*
|
|
6815
|
+
* Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6816
|
+
* Copyright 2026 - Finnish Meteorological Institute (FMI)
|
|
6817
|
+
* Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
|
|
6818
|
+
* */
|
|
6819
|
+
var TIME_SERIES_CONTAINER_BREAKPOINT_PX = '720px';
|
|
6820
|
+
var TIME_SERIES_CONTAINER_NAME = 'time-series-container';
|
|
6821
|
+
|
|
6822
|
+
var _styled;
|
|
6802
6823
|
var _excluded$1 = ["icon", "shortText", "longText"];
|
|
6803
6824
|
var TimeSeriesTopRowButtonUnstyled = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
6804
6825
|
var icon = _ref.icon,
|
|
@@ -6817,30 +6838,27 @@ var TimeSeriesTopRowButtonUnstyled = /*#__PURE__*/React.forwardRef(function (_re
|
|
|
6817
6838
|
})]
|
|
6818
6839
|
}));
|
|
6819
6840
|
});
|
|
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
|
-
}
|
|
6841
|
+
var TimeSeriesTopRowButton = styled(TimeSeriesTopRowButtonUnstyled)((_styled = {
|
|
6842
|
+
height: '10px !important'
|
|
6843
|
+
}, _styled["@container " + TIME_SERIES_CONTAINER_NAME + " (width < " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
6844
|
+
maxWidth: '90px',
|
|
6845
|
+
'& .longText': {
|
|
6846
|
+
display: 'none'
|
|
6836
6847
|
},
|
|
6837
|
-
'&
|
|
6838
|
-
|
|
6839
|
-
whiteSpace: 'nowrap',
|
|
6840
|
-
textOverflow: 'ellipsis',
|
|
6841
|
-
overflow: 'hidden'
|
|
6848
|
+
'& svg': {
|
|
6849
|
+
marginRight: '0 !important'
|
|
6842
6850
|
}
|
|
6843
|
-
})
|
|
6851
|
+
}, _styled["@container " + TIME_SERIES_CONTAINER_NAME + " (min-width: " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
6852
|
+
width: '130px',
|
|
6853
|
+
'& .shortText': {
|
|
6854
|
+
display: 'none'
|
|
6855
|
+
}
|
|
6856
|
+
}, _styled['& span'] = {
|
|
6857
|
+
fontSize: '9pt',
|
|
6858
|
+
whiteSpace: 'nowrap',
|
|
6859
|
+
textOverflow: 'ellipsis',
|
|
6860
|
+
overflow: 'hidden'
|
|
6861
|
+
}, _styled));
|
|
6844
6862
|
|
|
6845
6863
|
var LocationInfoButtonConnect = function LocationInfoButtonConnect(_ref) {
|
|
6846
6864
|
var panelId = _ref.panelId,
|
|
@@ -6876,7 +6894,7 @@ var LocationInfoButtonConnect = function LocationInfoButtonConnect(_ref) {
|
|
|
6876
6894
|
};
|
|
6877
6895
|
|
|
6878
6896
|
var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
6879
|
-
var _timeSeriesLocation$o;
|
|
6897
|
+
var _timeSeriesLocation$o, _sx;
|
|
6880
6898
|
var panelId = _ref.panelId;
|
|
6881
6899
|
var dispatch = useDispatch();
|
|
6882
6900
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
@@ -6926,11 +6944,9 @@ var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
|
6926
6944
|
"data-testid": "locationSelectButton",
|
|
6927
6945
|
disabled: isMapPinDisabled,
|
|
6928
6946
|
icon: jsx(Location, {
|
|
6929
|
-
sx: {
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
}
|
|
6933
|
-
}
|
|
6947
|
+
sx: (_sx = {}, _sx["@container " + TIME_SERIES_CONTAINER_NAME + " (width < " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
6948
|
+
display: 'none'
|
|
6949
|
+
}, _sx)
|
|
6934
6950
|
}),
|
|
6935
6951
|
longText: selectedLocationName || t('timeseries-location'),
|
|
6936
6952
|
onClick: toggleLocationsDialog,
|
|
@@ -6942,12 +6958,13 @@ var LocationSelectButtonConnect = function LocationSelectButtonConnect(_ref) {
|
|
|
6942
6958
|
};
|
|
6943
6959
|
|
|
6944
6960
|
var TimeSeriesMarkersSwitch = function TimeSeriesMarkersSwitch(_ref) {
|
|
6961
|
+
var _sx;
|
|
6945
6962
|
var shouldHideMarkers = _ref.shouldHideMarkers,
|
|
6946
6963
|
toggleMarkers = _ref.toggleMarkers;
|
|
6947
6964
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
6948
6965
|
t = _useTimeseriesTransla.t;
|
|
6949
6966
|
return jsxs(Box, {
|
|
6950
|
-
sx: {
|
|
6967
|
+
sx: (_sx = {
|
|
6951
6968
|
display: 'flex',
|
|
6952
6969
|
flexWrap: 'wrap',
|
|
6953
6970
|
alignItems: 'flex-start',
|
|
@@ -6963,14 +6980,13 @@ var TimeSeriesMarkersSwitch = function TimeSeriesMarkersSwitch(_ref) {
|
|
|
6963
6980
|
},
|
|
6964
6981
|
'.markers-label': {
|
|
6965
6982
|
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
6983
|
}
|
|
6973
|
-
},
|
|
6984
|
+
}, _sx["@container " + TIME_SERIES_CONTAINER_NAME + " (min-width: " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
6985
|
+
minWidth: '146px',
|
|
6986
|
+
'.markers-label, .switch-button label': {
|
|
6987
|
+
display: 'initial'
|
|
6988
|
+
}
|
|
6989
|
+
}, _sx),
|
|
6974
6990
|
children: [jsx(Typography, {
|
|
6975
6991
|
className: "markers-label",
|
|
6976
6992
|
sx: {
|
|
@@ -8075,7 +8091,7 @@ var useMapPin = function useMapPin(_ref) {
|
|
|
8075
8091
|
};
|
|
8076
8092
|
};
|
|
8077
8093
|
var TimeSeriesConnect = function TimeSeriesConnect(_ref2) {
|
|
8078
|
-
var _linkedMapIds
|
|
8094
|
+
var _linkedMapIds$, _sx;
|
|
8079
8095
|
var panelId = _ref2.panelId;
|
|
8080
8096
|
var dispatch = useDispatch();
|
|
8081
8097
|
var _useTimeseriesTransla = useTimeseriesTranslation(),
|
|
@@ -8214,7 +8230,7 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref2) {
|
|
|
8214
8230
|
height: '100%',
|
|
8215
8231
|
backgroundColor: 'geowebColors.background.surfaceApp',
|
|
8216
8232
|
containerType: 'inline-size',
|
|
8217
|
-
containerName:
|
|
8233
|
+
containerName: TIME_SERIES_CONTAINER_NAME
|
|
8218
8234
|
},
|
|
8219
8235
|
children: [jsxs(Stack, {
|
|
8220
8236
|
direction: "row",
|
|
@@ -8247,16 +8263,23 @@ var TimeSeriesConnect = function TimeSeriesConnect(_ref2) {
|
|
|
8247
8263
|
}), jsx(TimeSeriesMarkersSwitch, {
|
|
8248
8264
|
shouldHideMarkers: shouldHideLocationMarkers,
|
|
8249
8265
|
toggleMarkers: toggleLocationMarkers
|
|
8250
|
-
}), jsx(
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8266
|
+
}), jsx(LegendToggleButton, {
|
|
8267
|
+
hideTooltipText: t('timeseries-legend-tooltip-hide'),
|
|
8268
|
+
isLegendVisible: shouldShowLegend,
|
|
8269
|
+
legendLabel: t('timeseries-legend'),
|
|
8270
|
+
onToggle: toggleLegend,
|
|
8271
|
+
showTooltipText: t('timeseries-legend-tooltip-show'),
|
|
8272
|
+
sx: (_sx = {}, _sx["@container " + TIME_SERIES_CONTAINER_NAME + " (width < " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
8273
|
+
maxWidth: '90px',
|
|
8274
|
+
'& .longText': {
|
|
8275
|
+
display: 'none'
|
|
8276
|
+
},
|
|
8277
|
+
'& svg': {
|
|
8278
|
+
marginRight: '0 !important'
|
|
8279
|
+
}
|
|
8280
|
+
}, _sx["@container " + TIME_SERIES_CONTAINER_NAME + " (min-width: " + TIME_SERIES_CONTAINER_BREAKPOINT_PX + ")"] = {
|
|
8281
|
+
width: '130px'
|
|
8282
|
+
}, _sx)
|
|
8260
8283
|
})]
|
|
8261
8284
|
}), !!timeSeriesLocation && !!plotPresetState && jsx(Box, {
|
|
8262
8285
|
sx: {
|