@opengeoweb/core 19.5.1 → 19.6.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 +190 -51
- package/dist/src/lib/components/ClockConnect/OptionsMenu.d.ts +3 -3
- package/dist/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/AutoUpdateButtonConnect.d.ts +1 -1
- package/dist/src/lib/components/TimeSliderConnect/TimeSliderConnect.d.ts +2 -0
- package/dist/src/lib/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { FormControl, MenuItem, Grid, InputLabel, Paper, Box, Typography, CircularProgress, List, ListSubheader, ListItemButton, ListItemText, DialogContentText, TextField, InputAdornment, Button, useTheme, Tooltip, ListItem, ListItemIcon, Checkbox, Popper, Fade, styled, LinearProgress, Autocomplete, Switch, Select } from '@mui/material';
|
|
3
3
|
import React, { useMemo, useState, useCallback, useEffect, useContext } from 'react';
|
|
4
|
-
import { safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, TooltipSelect, CustomIconButton, CustomDialog, CustomTooltip, ToggleMenu, AlertIcon, useConfirmationDialog, useScrollingInIsolation, sliderHeaderStyle, CustomSlider, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, PROJECTION, calculateStartSize, useWheelStopPropagation, ToolContainerDraggable, dateUtils, sessionStorageProvider, useDebounce, usePrevious } from '@opengeoweb/shared';
|
|
5
|
-
import { webmapUtils, queryWMSLayersTree, invalidateWMSGetCapabilities, LayerType, WMDefaultStyleName, WMJSMAP_LONLAT_EPSGCODE, queryWMSServiceInfo, queryWMSLayers, getWMSServiceId, handleDateUtilsISOString, generateLayerId,
|
|
4
|
+
import { safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, TooltipSelect, CustomIconButton, CustomDialog, CustomTooltip, ToggleMenu, AlertIcon, useConfirmationDialog, useScrollingInIsolation, sliderHeaderStyle, CustomSlider, SearchField, SearchHighlight, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, PROJECTION, calculateStartSize, useWheelStopPropagation, ToolContainerDraggable, dateUtils, sessionStorageProvider, useDebounce, usePrevious } from '@opengeoweb/shared';
|
|
5
|
+
import { webmapUtils, queryWMSLayersTree, invalidateWMSGetCapabilities, LayerType, WMJSDimension, WMDefaultStyleName, WMJSMAP_LONLAT_EPSGCODE, queryWMSServiceInfo, queryWMSLayers, getWMSServiceId, handleDateUtilsISOString, generateLayerId, getWMLayerById, getMapDimURL, WMLayer } from '@opengeoweb/webmap';
|
|
6
6
|
import _, { isEqual, isArray, range, zip, throttle } from 'lodash';
|
|
7
7
|
import { useDispatch, useSelector, connect, useStore, shallowEqual, Provider } from 'react-redux';
|
|
8
8
|
import { mapSelectors, layerSelectors, layerActions, layerTypes, filterLayers, mapActions, mapEnums, loadingIndicatorSelectors, layerUtils, serviceSelectors, serviceActions, uiSelectors, uiTypes, useSetupDialog, getUserAddedServices, uiActions, genericActions, drawingToolSelectors, syncGroupsSelectors, syncConstants, getViewObjectForSyncGroup, getViewObjectForMapId, loadingIndicatorActions, genericSelectors, PUBLIC_WARNING_DRAW_TOOL_ID, defaultLayers, getSingularDrawtoolDrawLayerId, syncGroupsSelector, syncGroupsActions, routerUtils, mapUtils } from '@opengeoweb/store';
|
|
@@ -2793,7 +2793,10 @@ var DimensionSelect = function DimensionSelect(_ref) {
|
|
|
2793
2793
|
return dimension.name === selectedDimensionName;
|
|
2794
2794
|
});
|
|
2795
2795
|
var wmDimension = webmapUtils.getWMJSDimensionForLayerAndDimension(layerId || '', selectedDimension == null ? void 0 : selectedDimension.name);
|
|
2796
|
-
var generatedValues = (
|
|
2796
|
+
var generatedValues = React.useMemo(function () {
|
|
2797
|
+
var dimension = wmDimension || (selectedDimension != null && selectedDimension.values ? new WMJSDimension(selectedDimension) : undefined);
|
|
2798
|
+
return (dimension == null ? void 0 : dimension.generateAllValues()) || [];
|
|
2799
|
+
}, [selectedDimension, wmDimension]);
|
|
2797
2800
|
var dimensionNames = layerDimensions.map(function (dimension) {
|
|
2798
2801
|
return dimension.name;
|
|
2799
2802
|
});
|
|
@@ -3694,6 +3697,9 @@ var RenderLayers = function RenderLayers(_ref) {
|
|
|
3694
3697
|
isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,
|
|
3695
3698
|
tooltipPrefix = _ref.tooltipPrefix,
|
|
3696
3699
|
skipLocalStyling = _ref.skipLocalStyling;
|
|
3700
|
+
var _React$useState = React.useState(''),
|
|
3701
|
+
searchFilter = _React$useState[0],
|
|
3702
|
+
setSearchFilter = _React$useState[1];
|
|
3697
3703
|
var _useCoreTranslation = useCoreTranslation(),
|
|
3698
3704
|
t = _useCoreTranslation.t;
|
|
3699
3705
|
var nonEmptyTooltipPrefix = tooltipPrefix != null ? tooltipPrefix : t('layermanager-layer') + ": ";
|
|
@@ -3713,7 +3719,25 @@ var RenderLayers = function RenderLayers(_ref) {
|
|
|
3713
3719
|
value: layer.name
|
|
3714
3720
|
};
|
|
3715
3721
|
});
|
|
3722
|
+
var filteredLayers = extendedLayers.filter(function (layer) {
|
|
3723
|
+
var _layer$title;
|
|
3724
|
+
return (_layer$title = layer.title) == null ? void 0 : _layer$title.toLowerCase().includes(searchFilter.toLowerCase());
|
|
3725
|
+
});
|
|
3716
3726
|
return jsxs(TooltipSelect, {
|
|
3727
|
+
MenuProps: {
|
|
3728
|
+
slotProps: {
|
|
3729
|
+
paper: {
|
|
3730
|
+
style: {
|
|
3731
|
+
width: '500px'
|
|
3732
|
+
}
|
|
3733
|
+
},
|
|
3734
|
+
list: {
|
|
3735
|
+
style: {
|
|
3736
|
+
padding: 0
|
|
3737
|
+
}
|
|
3738
|
+
}
|
|
3739
|
+
}
|
|
3740
|
+
},
|
|
3717
3741
|
currentIndex: currentIndex,
|
|
3718
3742
|
disableUnderline: true,
|
|
3719
3743
|
inputProps: {
|
|
@@ -3736,19 +3760,57 @@ var RenderLayers = function RenderLayers(_ref) {
|
|
|
3736
3760
|
skipLocalStyling: skipLocalStyling,
|
|
3737
3761
|
tooltip: "" + nonEmptyTooltipPrefix + ((_extendedLayers$curre = extendedLayers[currentIndex]) == null ? void 0 : _extendedLayers$curre.title),
|
|
3738
3762
|
value: currentValue,
|
|
3739
|
-
children: [jsx(
|
|
3763
|
+
children: [jsx(Box, {
|
|
3764
|
+
ref: function ref(node) {
|
|
3765
|
+
if (node) {
|
|
3766
|
+
// focus the search field when the menu opens
|
|
3767
|
+
requestAnimationFrame(function () {
|
|
3768
|
+
var _node$querySelector;
|
|
3769
|
+
(_node$querySelector = node.querySelector('input')) == null || _node$querySelector.focus();
|
|
3770
|
+
});
|
|
3771
|
+
}
|
|
3772
|
+
},
|
|
3773
|
+
sx: {
|
|
3774
|
+
position: 'sticky',
|
|
3775
|
+
top: 0,
|
|
3776
|
+
zIndex: 1,
|
|
3777
|
+
backgroundColor: 'geowebColors.background.surface'
|
|
3778
|
+
},
|
|
3779
|
+
children: jsx(SearchField, {
|
|
3780
|
+
searchFilter: searchFilter,
|
|
3781
|
+
setSearchFilter: setSearchFilter
|
|
3782
|
+
})
|
|
3783
|
+
}), jsx(MenuItem, {
|
|
3740
3784
|
disabled: true,
|
|
3741
|
-
children: t('layermanager-layer')
|
|
3742
|
-
}),
|
|
3785
|
+
children: filteredLayers.length ? t('layermanager-layer') : t('layermanager-layer') + " - " + t('search-no-results')
|
|
3786
|
+
}), filteredLayers.map(function (layerFromServiceLayers, currentIndex) {
|
|
3743
3787
|
return jsxs(MenuItem, {
|
|
3744
3788
|
disabled: !layerFromServiceLayers.leaf,
|
|
3745
3789
|
sx: {
|
|
3746
3790
|
'& .MuiSvgIcon-root': {
|
|
3747
3791
|
marginLeft: '28px'
|
|
3748
|
-
}
|
|
3792
|
+
},
|
|
3793
|
+
gap: 1
|
|
3749
3794
|
},
|
|
3750
3795
|
value: layerFromServiceLayers.name,
|
|
3751
|
-
children: [
|
|
3796
|
+
children: [jsx(CustomTooltip, {
|
|
3797
|
+
title: layerFromServiceLayers.title,
|
|
3798
|
+
children: jsx(Box, {
|
|
3799
|
+
component: "span",
|
|
3800
|
+
sx: {
|
|
3801
|
+
display: 'block',
|
|
3802
|
+
flex: '1 1 auto',
|
|
3803
|
+
minWidth: 0,
|
|
3804
|
+
overflow: 'hidden',
|
|
3805
|
+
textOverflow: 'ellipsis',
|
|
3806
|
+
whiteSpace: 'nowrap'
|
|
3807
|
+
},
|
|
3808
|
+
children: jsx(SearchHighlight, {
|
|
3809
|
+
search: searchFilter,
|
|
3810
|
+
text: layerFromServiceLayers.title
|
|
3811
|
+
})
|
|
3812
|
+
})
|
|
3813
|
+
}), currentIndex === layers.length && jsx(AlertIcon, {
|
|
3752
3814
|
severity: "error"
|
|
3753
3815
|
})]
|
|
3754
3816
|
}, layerFromServiceLayers.name);
|
|
@@ -4621,6 +4683,9 @@ var RenderEDRLayers = function RenderEDRLayers(_ref) {
|
|
|
4621
4683
|
isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,
|
|
4622
4684
|
tooltipPrefix = _ref.tooltipPrefix,
|
|
4623
4685
|
skipLocalStyling = _ref.skipLocalStyling;
|
|
4686
|
+
var _React$useState = React.useState(''),
|
|
4687
|
+
searchFilter = _React$useState[0],
|
|
4688
|
+
setSearchFilter = _React$useState[1];
|
|
4624
4689
|
var _useCoreTranslation = useCoreTranslation(),
|
|
4625
4690
|
t = _useCoreTranslation.t;
|
|
4626
4691
|
var nonEmptyTooltipPrefix = tooltipPrefix != null ? tooltipPrefix : selectedParams.length === 1 ? t('layermanager-layer') + ": " : t('layermanager-layer-multi') + ": ";
|
|
@@ -4646,6 +4711,10 @@ var RenderEDRLayers = function RenderEDRLayers(_ref) {
|
|
|
4646
4711
|
value: layer.name
|
|
4647
4712
|
};
|
|
4648
4713
|
});
|
|
4714
|
+
var filteredLayers = extendedLayers.filter(function (layer) {
|
|
4715
|
+
var _layer$title;
|
|
4716
|
+
return (_layer$title = layer.title) == null ? void 0 : _layer$title.toLowerCase().includes(searchFilter.toLowerCase());
|
|
4717
|
+
});
|
|
4649
4718
|
var edrText = t('layermanager-EDR');
|
|
4650
4719
|
var tooltipNames = currentValues.map(function (value) {
|
|
4651
4720
|
var layer = extendedLayers.find(function (layer) {
|
|
@@ -4657,6 +4726,20 @@ var RenderEDRLayers = function RenderEDRLayers(_ref) {
|
|
|
4657
4726
|
return (paramA != null ? paramA : '').localeCompare(paramB != null ? paramB : '');
|
|
4658
4727
|
}).join(', ');
|
|
4659
4728
|
return jsxs(TooltipSelect, {
|
|
4729
|
+
MenuProps: {
|
|
4730
|
+
slotProps: {
|
|
4731
|
+
paper: {
|
|
4732
|
+
style: {
|
|
4733
|
+
width: '500px'
|
|
4734
|
+
}
|
|
4735
|
+
},
|
|
4736
|
+
list: {
|
|
4737
|
+
style: {
|
|
4738
|
+
padding: 0
|
|
4739
|
+
}
|
|
4740
|
+
}
|
|
4741
|
+
}
|
|
4742
|
+
},
|
|
4660
4743
|
disableUnderline: true,
|
|
4661
4744
|
inputProps: {
|
|
4662
4745
|
SelectDisplayProps: {
|
|
@@ -4673,22 +4756,59 @@ var RenderEDRLayers = function RenderEDRLayers(_ref) {
|
|
|
4673
4756
|
skipLocalStyling: skipLocalStyling,
|
|
4674
4757
|
tooltip: tooltip,
|
|
4675
4758
|
value: currentValues,
|
|
4676
|
-
children: [jsx(
|
|
4759
|
+
children: [jsx(Box, {
|
|
4760
|
+
ref: function ref(node) {
|
|
4761
|
+
if (node) {
|
|
4762
|
+
requestAnimationFrame(function () {
|
|
4763
|
+
var _node$querySelector;
|
|
4764
|
+
(_node$querySelector = node.querySelector('input')) == null || _node$querySelector.focus();
|
|
4765
|
+
});
|
|
4766
|
+
}
|
|
4767
|
+
},
|
|
4768
|
+
sx: {
|
|
4769
|
+
position: 'sticky',
|
|
4770
|
+
top: 0,
|
|
4771
|
+
zIndex: 1,
|
|
4772
|
+
backgroundColor: 'geowebColors.background.surface'
|
|
4773
|
+
},
|
|
4774
|
+
children: jsx(SearchField, {
|
|
4775
|
+
searchFilter: searchFilter,
|
|
4776
|
+
setSearchFilter: setSearchFilter
|
|
4777
|
+
})
|
|
4778
|
+
}), jsx(MenuItem, {
|
|
4677
4779
|
disabled: true,
|
|
4678
|
-
children: t('layermanager-layer')
|
|
4679
|
-
}),
|
|
4780
|
+
children: filteredLayers.length ? t('layermanager-layer') : t('layermanager-layer') + " - " + t('search-no-results')
|
|
4781
|
+
}), filteredLayers.map(function (layerFromServiceLayers, currentIndex) {
|
|
4680
4782
|
return jsxs(MenuItem, {
|
|
4681
4783
|
disabled: !layerFromServiceLayers.leaf,
|
|
4682
4784
|
sx: {
|
|
4683
4785
|
'&.MuiMenuItem-root.Mui-selected': {
|
|
4684
4786
|
background: 'none',
|
|
4685
4787
|
color: 'geowebColors.typographyAndIcons.text'
|
|
4686
|
-
}
|
|
4788
|
+
},
|
|
4789
|
+
whiteSpace: 'pre-wrap'
|
|
4687
4790
|
},
|
|
4688
4791
|
value: layerFromServiceLayers.name,
|
|
4689
4792
|
children: [jsx(Checkbox, {
|
|
4690
4793
|
checked: currentValues.includes(layerFromServiceLayers.name)
|
|
4691
|
-
}),
|
|
4794
|
+
}), jsx(CustomTooltip, {
|
|
4795
|
+
title: layerFromServiceLayers.title,
|
|
4796
|
+
children: jsx(Box, {
|
|
4797
|
+
component: "span",
|
|
4798
|
+
sx: {
|
|
4799
|
+
display: 'block',
|
|
4800
|
+
flex: '1 1 auto',
|
|
4801
|
+
minWidth: 0,
|
|
4802
|
+
overflow: 'hidden',
|
|
4803
|
+
textOverflow: 'ellipsis',
|
|
4804
|
+
whiteSpace: 'nowrap'
|
|
4805
|
+
},
|
|
4806
|
+
children: jsx(SearchHighlight, {
|
|
4807
|
+
search: searchFilter,
|
|
4808
|
+
text: layerFromServiceLayers.title
|
|
4809
|
+
})
|
|
4810
|
+
})
|
|
4811
|
+
}), currentIndex === layers.length && jsx(AlertIcon, {
|
|
4692
4812
|
severity: "error"
|
|
4693
4813
|
})]
|
|
4694
4814
|
}, layerFromServiceLayers.name);
|
|
@@ -5932,6 +6052,7 @@ var _LayerManager = function LayerManager(_ref) {
|
|
|
5932
6052
|
"data-size": dataSize,
|
|
5933
6053
|
"data-testid": "layerManagerWindow",
|
|
5934
6054
|
dragHandleIcon: settings == null || (_settings$toolbar2 = settings.toolbar) == null || (_settings$toolbar2 = _settings$toolbar2.dragHandle) == null ? void 0 : _settings$toolbar2.icon,
|
|
6055
|
+
fixTopPosition: true,
|
|
5935
6056
|
headerSize: headerSize,
|
|
5936
6057
|
isOpen: isOpen,
|
|
5937
6058
|
minHeight: minSize.height,
|
|
@@ -6807,42 +6928,31 @@ var _TimeStepButtonConnect = function TimeStepButtonConnect(_ref) {
|
|
|
6807
6928
|
};
|
|
6808
6929
|
|
|
6809
6930
|
var POPPER_WIDTH = 440;
|
|
6810
|
-
var
|
|
6811
|
-
var getPopperplacement = function getPopperplacement(buttonElement, mapId) {
|
|
6931
|
+
var getOptionsMenuOrientation = function getOptionsMenuOrientation(buttonElement, mapId) {
|
|
6812
6932
|
var _document$getElementB;
|
|
6813
6933
|
var button = buttonElement == null ? void 0 : buttonElement.getBoundingClientRect();
|
|
6814
6934
|
var mapWindow = (_document$getElementB = document.getElementById("mapcontainer_" + mapId)) == null ? void 0 : _document$getElementB.getBoundingClientRect();
|
|
6815
|
-
if (button
|
|
6816
|
-
|
|
6817
|
-
var popperIsOutsideWindowOnBottom = button.bottom + POPPER_LENGTH > mapWindow.bottom;
|
|
6818
|
-
var popperIsOutsideWindowOnRight = button.right + POPPER_WIDTH > mapWindow.right;
|
|
6819
|
-
if (!popperIsOutsideWindowOnLeft) {
|
|
6820
|
-
return 'left';
|
|
6821
|
-
}
|
|
6822
|
-
if (!popperIsOutsideWindowOnBottom) {
|
|
6823
|
-
return 'bottom';
|
|
6824
|
-
}
|
|
6825
|
-
if (!popperIsOutsideWindowOnRight) {
|
|
6826
|
-
return 'right';
|
|
6827
|
-
}
|
|
6828
|
-
return 'top';
|
|
6935
|
+
if (!button || !mapWindow) {
|
|
6936
|
+
return 'horizontal';
|
|
6829
6937
|
}
|
|
6830
|
-
|
|
6938
|
+
var horizontalMenuFitsInsideMap = button.right - POPPER_WIDTH >= mapWindow.left;
|
|
6939
|
+
return horizontalMenuFitsInsideMap ? 'horizontal' : 'vertical';
|
|
6831
6940
|
};
|
|
6832
6941
|
var OptionsMenu = function OptionsMenu(_ref) {
|
|
6833
6942
|
var _ref$isOpen = _ref.isOpen,
|
|
6834
6943
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
6835
6944
|
buttonElement = _ref.buttonElement,
|
|
6836
|
-
|
|
6945
|
+
orientation = _ref.orientation,
|
|
6837
6946
|
mapId = _ref.mapId;
|
|
6838
6947
|
if (!buttonElement) {
|
|
6839
6948
|
return null;
|
|
6840
6949
|
}
|
|
6841
|
-
var
|
|
6950
|
+
var isVertical = orientation === 'vertical';
|
|
6842
6951
|
return jsx(Popper, {
|
|
6843
6952
|
anchorEl: buttonElement,
|
|
6953
|
+
"data-testid": "clockOptionsMenu",
|
|
6844
6954
|
open: isOpen,
|
|
6845
|
-
placement:
|
|
6955
|
+
placement: "bottom-end",
|
|
6846
6956
|
sx: {
|
|
6847
6957
|
zIndex: 1002
|
|
6848
6958
|
},
|
|
@@ -6853,12 +6963,12 @@ var OptionsMenu = function OptionsMenu(_ref) {
|
|
|
6853
6963
|
spacing: 0.5,
|
|
6854
6964
|
sx: Object.assign({
|
|
6855
6965
|
padding: '8px'
|
|
6856
|
-
},
|
|
6966
|
+
}, isVertical && {
|
|
6857
6967
|
'& button': {
|
|
6858
6968
|
width: '100%!important'
|
|
6859
6969
|
}
|
|
6860
6970
|
}, {
|
|
6861
|
-
flexDirection:
|
|
6971
|
+
flexDirection: isVertical ? 'column' : 'row'
|
|
6862
6972
|
}),
|
|
6863
6973
|
children: [jsx(NowButtonConnect, {
|
|
6864
6974
|
mapId: mapId,
|
|
@@ -6893,9 +7003,9 @@ var ClockConnect = function ClockConnect(_ref) {
|
|
|
6893
7003
|
var _useState = useState(null),
|
|
6894
7004
|
popperButtonElement = _useState[0],
|
|
6895
7005
|
setPopperButtonElement = _useState[1];
|
|
6896
|
-
var _useState2 = useState('
|
|
6897
|
-
|
|
6898
|
-
|
|
7006
|
+
var _useState2 = useState('horizontal'),
|
|
7007
|
+
optionsMenuOrientation = _useState2[0],
|
|
7008
|
+
setOptionsMenuOrientation = _useState2[1];
|
|
6899
7009
|
var selectedTime = useSelector(function (store) {
|
|
6900
7010
|
return mapSelectors.getSelectedTime(store, mapId);
|
|
6901
7011
|
});
|
|
@@ -6912,9 +7022,8 @@ var ClockConnect = function ClockConnect(_ref) {
|
|
|
6912
7022
|
return mapSelectors.getIsClockOptionsMenuVisible(store, mapId);
|
|
6913
7023
|
});
|
|
6914
7024
|
useEffect(function () {
|
|
6915
|
-
// Update optionsMenu placement when visiblity or clock position/size changes
|
|
6916
7025
|
if (popperButtonElement) {
|
|
6917
|
-
|
|
7026
|
+
setOptionsMenuOrientation(getOptionsMenuOrientation(popperButtonElement, mapId));
|
|
6918
7027
|
}
|
|
6919
7028
|
}, [mapId, isOptionsMenuVisible, clockPosition, clockSize, popperButtonElement]);
|
|
6920
7029
|
var onToggleClock = function onToggleClock(isClockVisible) {
|
|
@@ -6961,7 +7070,7 @@ var ClockConnect = function ClockConnect(_ref) {
|
|
|
6961
7070
|
buttonElement: popperButtonElement,
|
|
6962
7071
|
isOpen: isOptionsMenuVisible,
|
|
6963
7072
|
mapId: mapId,
|
|
6964
|
-
|
|
7073
|
+
orientation: optionsMenuOrientation
|
|
6965
7074
|
})]
|
|
6966
7075
|
});
|
|
6967
7076
|
};
|
|
@@ -6981,15 +7090,16 @@ var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
|
6981
7090
|
var mapIdStore = useSelector(function (store) {
|
|
6982
7091
|
return uiSelectors.getDialogMapId(store, legendType);
|
|
6983
7092
|
});
|
|
6984
|
-
var
|
|
6985
|
-
mapId = _React$useState[0],
|
|
6986
|
-
setMapId = _React$useState[1];
|
|
6987
|
-
React.useEffect(function () {
|
|
6988
|
-
setMapId(mapIdStore);
|
|
6989
|
-
}, [mapIdStore]);
|
|
7093
|
+
var mapId = initialMapId || mapIdStore;
|
|
6990
7094
|
var mapLayers = useSelector(function (store) {
|
|
6991
7095
|
return mapSelectors.getMapLayers(store, mapId);
|
|
6992
7096
|
});
|
|
7097
|
+
var legendPosition = useSelector(function (store) {
|
|
7098
|
+
return mapSelectors.getLegendPosition(store, mapId);
|
|
7099
|
+
});
|
|
7100
|
+
var legendSize = useSelector(function (store) {
|
|
7101
|
+
return mapSelectors.getLegendSize(store, mapId);
|
|
7102
|
+
});
|
|
6993
7103
|
var _useSetupDialog = useSetupDialog(legendType, source),
|
|
6994
7104
|
dialogOrder = _useSetupDialog.dialogOrder,
|
|
6995
7105
|
isDialogOpen = _useSetupDialog.isDialogOpen,
|
|
@@ -7013,16 +7123,42 @@ var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
|
7013
7123
|
origin: mapEnums.MapActionOrigin.map
|
|
7014
7124
|
}));
|
|
7015
7125
|
};
|
|
7126
|
+
var onLegendDialogMove = React.useCallback(function (position, size) {
|
|
7127
|
+
dispatch(mapActions.setLegendPositionSize(Object.assign({
|
|
7128
|
+
mapId: mapId,
|
|
7129
|
+
position: {
|
|
7130
|
+
x: position.x,
|
|
7131
|
+
y: position.y
|
|
7132
|
+
}
|
|
7133
|
+
}, typeof size.width === 'number' && typeof size.height === 'number' && {
|
|
7134
|
+
size: {
|
|
7135
|
+
width: size.width,
|
|
7136
|
+
height: size.height
|
|
7137
|
+
}
|
|
7138
|
+
}, {
|
|
7139
|
+
origin: mapEnums.MapActionOrigin.map
|
|
7140
|
+
})));
|
|
7141
|
+
}, [dispatch, mapId]);
|
|
7016
7142
|
return jsx(LegendDialog, {
|
|
7017
7143
|
isOpen: isDialogOpen,
|
|
7018
7144
|
layers: mapLayers,
|
|
7019
7145
|
mapId: mapId,
|
|
7020
7146
|
onClose: onCloseDialog,
|
|
7147
|
+
onDragEnd: onLegendDialogMove,
|
|
7021
7148
|
onMouseDown: setDialogOrder,
|
|
7022
7149
|
onToggleLayerLegendVisibility: onToggleLayerLegendVisibility,
|
|
7023
7150
|
order: dialogOrder,
|
|
7024
7151
|
showMapId: showMapId,
|
|
7025
|
-
source: uiSource
|
|
7152
|
+
source: uiSource,
|
|
7153
|
+
startDraggablePosition: legendPosition != null ? legendPosition : {
|
|
7154
|
+
x: 0,
|
|
7155
|
+
y: 0
|
|
7156
|
+
},
|
|
7157
|
+
startPosition: {
|
|
7158
|
+
right: 20,
|
|
7159
|
+
top: 50
|
|
7160
|
+
},
|
|
7161
|
+
startSize: legendSize
|
|
7026
7162
|
});
|
|
7027
7163
|
};
|
|
7028
7164
|
/**
|
|
@@ -8923,6 +9059,7 @@ var GetFeatureInfoDialog = function GetFeatureInfoDialog(_ref) {
|
|
|
8923
9059
|
return jsx(ToolContainerDraggable, {
|
|
8924
9060
|
bounds: "parent",
|
|
8925
9061
|
"data-testid": "moveable-getfeatureinfo",
|
|
9062
|
+
fixTopPosition: true,
|
|
8926
9063
|
initialMaxHeight: 440,
|
|
8927
9064
|
isOpen: isOpen,
|
|
8928
9065
|
minWidth: 100,
|
|
@@ -10128,6 +10265,8 @@ var calculateNewAnimationTimeBounds = function calculateNewAnimationTimeBounds(n
|
|
|
10128
10265
|
};
|
|
10129
10266
|
};
|
|
10130
10267
|
|
|
10268
|
+
/** Below dialogs, so their resize handles stay hoverable over the slider. */
|
|
10269
|
+
var TIME_SLIDER_Z_INDEX = 60;
|
|
10131
10270
|
var useUpdateTimestep = function useUpdateTimestep(mapId) {
|
|
10132
10271
|
var autoTimeStepLayerId = useSelector(function (store) {
|
|
10133
10272
|
return mapSelectors.getAutoTimeStepLayerId(store, mapId);
|
|
@@ -10670,7 +10809,7 @@ var _ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
10670
10809
|
position: 'absolute',
|
|
10671
10810
|
left: '0px',
|
|
10672
10811
|
bottom: '0px',
|
|
10673
|
-
zIndex:
|
|
10812
|
+
zIndex: TIME_SLIDER_Z_INDEX,
|
|
10674
10813
|
width: '100%'
|
|
10675
10814
|
},
|
|
10676
10815
|
children: jsx(TimeSliderConnect, {
|
|
@@ -10766,7 +10905,7 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
|
|
|
10766
10905
|
position: 'absolute',
|
|
10767
10906
|
left: '0px',
|
|
10768
10907
|
bottom: '0px',
|
|
10769
|
-
zIndex:
|
|
10908
|
+
zIndex: TIME_SLIDER_Z_INDEX,
|
|
10770
10909
|
width: '100%'
|
|
10771
10910
|
},
|
|
10772
10911
|
children: !!showTimeSlider && jsx(TimeSliderConnect, {
|
|
@@ -12137,4 +12276,4 @@ var storyUtils = /*#__PURE__*/Object.freeze({
|
|
|
12137
12276
|
useDefaultMapSettings: useDefaultMapSettings
|
|
12138
12277
|
});
|
|
12139
12278
|
|
|
12140
|
-
export { CORE_NAMESPACE, _ConfigurableMapConnect as ConfigurableMapConnect, CoreI18nProvider, CoreStoreProvider, CoreThemeProvider, CoreThemeStoreProvider, DemoWrapper, DemoWrapperConnect, HarmonieTempAndPrecipPreset, LanguageSelect, LayerInfoButtonConnect, LayerInfoDialogConnect, _LayerManager as LayerManager, BaseLayerRow as LayerManagerBaseLayerRow, LayerManagerConnect, DescriptionRow as LayerManagerDescriptionRow, HeaderOptions as LayerManagerHeaderOptions, LayerContainerRow as LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LegendConnect, LegendMapButtonConnect, LoadingIndicatorProgressBar, LocationSearch, LocationSearchConnect, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, MyMapLocation, OlMapViewConnect, RouterWrapperConnect, SearchControlButtonConnect, SelectedFeaturesDialogConnect, SyncGroupViewerConnect, TimeSliderConnect, componentsLookUp, coreTranslations, defaultBbox, defaultConfigurations, filterMapPresets, filterServices, filterTimeSeriesServices, getCenterOfLinkedFeature, getIsOutdated, getLanguageFromLocalStorage, getRenderedDimensions, languageLocalStorageKey, makeLayerInfoPayload, makePrefetchTimeSpan, saveLanguageToLocalStorage, storyUtils, testLayers, useFetchServices, useFitAndHighlightWarningFeature, useGetOpenLayersView, useLocationDetail, useLocationList, usePrefetchTimeSpan, useUpdateTimeSpan, useUpdateTimestep };
|
|
12279
|
+
export { CORE_NAMESPACE, _ConfigurableMapConnect as ConfigurableMapConnect, CoreI18nProvider, CoreStoreProvider, CoreThemeProvider, CoreThemeStoreProvider, DemoWrapper, DemoWrapperConnect, HarmonieTempAndPrecipPreset, LanguageSelect, LayerInfoButtonConnect, LayerInfoDialogConnect, _LayerManager as LayerManager, BaseLayerRow as LayerManagerBaseLayerRow, LayerManagerConnect, DescriptionRow as LayerManagerDescriptionRow, HeaderOptions as LayerManagerHeaderOptions, LayerContainerRow as LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LegendConnect, LegendMapButtonConnect, LoadingIndicatorProgressBar, LocationSearch, LocationSearchConnect, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, MyMapLocation, OlMapViewConnect, RouterWrapperConnect, SearchControlButtonConnect, SelectedFeaturesDialogConnect, SyncGroupViewerConnect, TIME_SLIDER_Z_INDEX, TimeSliderConnect, componentsLookUp, coreTranslations, defaultBbox, defaultConfigurations, filterMapPresets, filterServices, filterTimeSeriesServices, getAffectedIndices, getCenterOfLinkedFeature, getCurrentSelectedIndices, getIsOutdated, getLanguageFromLocalStorage, getRenderedDimensions, languageLocalStorageKey, makeLayerInfoPayload, makePrefetchTimeSpan, saveLanguageToLocalStorage, storyUtils, testLayers, useFetchServices, useFitAndHighlightWarningFeature, useGetOpenLayersView, useLocationDetail, useLocationList, usePrefetchTimeSpan, useUpdateTimeSpan, useUpdateTimestep };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
export type
|
|
3
|
-
export declare const
|
|
2
|
+
export type OptionsMenuOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export declare const getOptionsMenuOrientation: (buttonElement: HTMLButtonElement | null, mapId: string) => OptionsMenuOrientation;
|
|
4
4
|
export interface OptionsMenuProps {
|
|
5
5
|
isOpen?: boolean;
|
|
6
|
-
|
|
6
|
+
orientation: OptionsMenuOrientation;
|
|
7
7
|
buttonElement: HTMLButtonElement | null;
|
|
8
8
|
mapId: string;
|
|
9
9
|
}
|
|
@@ -5,7 +5,7 @@ interface ConnectedAutoUpdateButtonProps {
|
|
|
5
5
|
isAutoUpdating?: boolean;
|
|
6
6
|
toggleAutoUpdate?: typeof mapActions.toggleAutoUpdate;
|
|
7
7
|
}
|
|
8
|
-
export declare const AutoUpdateButtonConnect: import("react-redux").ConnectedComponent<import("react-redux").ConnectedComponent<({ mapId, isAutoUpdating, toggleAutoUpdate, }: ConnectedAutoUpdateButtonProps) =>
|
|
8
|
+
export declare const AutoUpdateButtonConnect: import("react-redux").ConnectedComponent<import("react-redux").ConnectedComponent<({ mapId, isAutoUpdating, toggleAutoUpdate, }: ConnectedAutoUpdateButtonProps) => React.JSX.Element, {
|
|
9
9
|
mapId: string;
|
|
10
10
|
isAutoUpdating?: boolean | undefined;
|
|
11
11
|
toggleAutoUpdate?: typeof mapActions.toggleAutoUpdate | undefined;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
/** Below dialogs, so their resize handles stay hoverable over the slider. */
|
|
3
|
+
export declare const TIME_SLIDER_Z_INDEX = 60;
|
|
2
4
|
export declare const useUpdateTimestep: (mapId: string) => void;
|
|
3
5
|
export declare const useUpdateTimeSpan: (mapId: string, myOnSetTimeSliderSpan: (newSpan: number, newCenterTime: number) => void) => void;
|
|
4
6
|
interface TimeSliderConnectProps {
|
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { SyncGroupViewerConnect } from './components/SyncGroups/SyncGroupViewerC
|
|
|
6
6
|
export * from './components/MultiMapViewConnect/MultiMapViewConnect';
|
|
7
7
|
export * from './components/MultiMapViewConnect/HarmoniePresets';
|
|
8
8
|
export * from './components/MapViewConnect';
|
|
9
|
+
export { getAffectedIndices, getCurrentSelectedIndices, } from './components/MapDrawToolRedux/OpenLayersFeatureLayerConnect';
|
|
9
10
|
export { LegendConnect, LegendMapButtonConnect, } from './components/LegendConnect';
|
|
10
11
|
export { LayerManagerConnect, LayerManagerHeaderOptions, LayerManagerDescriptionRow, LayerManagerBaseLayerRow, LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LayerManager, LoadingIndicatorProgressBar, useFetchServices, };
|
|
11
12
|
export { MultiDimensionSelectMapButtonsConnect, MultiMapDimensionSelectConnect, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/core",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.6.0",
|
|
4
4
|
"description": "GeoWeb Core library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"react-draggable": "^4.4.6",
|
|
39
39
|
"i18next": "^25.0.1",
|
|
40
40
|
"react-i18next": "^15.1.1",
|
|
41
|
-
"dompurify": "^3.4.
|
|
41
|
+
"dompurify": "^3.4.13",
|
|
42
42
|
"@mui/material": "^9.0.1",
|
|
43
43
|
"@tanstack/react-query": "^5.85.5",
|
|
44
44
|
"@opengeoweb/api": "*",
|
|
45
45
|
"@types/geojson": "^7946.0.14",
|
|
46
46
|
"@turf/turf": "^7.2.0",
|
|
47
47
|
"proj4": "^2.15.0",
|
|
48
|
-
"react-router": "^7.
|
|
48
|
+
"react-router": "^7.18.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": "19",
|