@opengeoweb/core 9.34.0 → 9.35.1-spike-oltanstack.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +536 -251
- package/package.json +1 -1
- package/src/lib/components/ComponentsLookUp/componentsLookUp.d.ts +1 -1
- package/src/lib/components/ConfigurableMapConnect/ConfigurableMapConnect.d.ts +2 -0
- package/src/lib/components/LayerManager/DescriptionRow/DescriptionRow.d.ts +2 -0
- package/src/lib/components/LayerManager/LayerContainerRow/LayerContainerRow.d.ts +1 -0
- package/src/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRow.d.ts +1 -0
- package/src/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRowConnect.d.ts +1 -0
- package/src/lib/components/LayerManager/LayerManager.d.ts +1 -0
- package/src/lib/components/LayerManager/LayerManager.stories.d.ts +8 -0
- package/src/lib/components/LayerManager/LayerManagerUtils.d.ts +69 -3
- package/src/lib/components/LayerManager/useFetchServices.d.ts +1 -1
- package/src/lib/components/SyncGroups/SyncGroupViewer.d.ts +2 -0
- package/src/lib/components/SyncGroups/SyncGroupViewerConnect.spec.d.ts +1 -0
- package/src/lib/components/TimeSliderConnect/TimeSliderConnect.d.ts +1 -0
- package/src/lib/components/TimeSliderConnect/TimeSliderLegendConnect.d.ts +1 -0
- package/src/lib/utils/defaultTestSettings.d.ts +20 -4
package/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useState, useCallback, useRef } from 'react';
|
|
4
|
-
import { Grid2, Box, MenuItem, Typography, useTheme, Popper, Fade, Tooltip, styled, LinearProgress, FormControl, InputLabel, Paper, List, ListItemButton, ListItemText, CircularProgress, ListSubheader, Dialog, DialogTitle, DialogContent, DialogContentText, TextField, InputAdornment, DialogActions, Button, circularProgressClasses, ListItemIcon, Checkbox, Select } from '@mui/material';
|
|
5
|
-
import { SHARED_NAMESPACE, sharedTranslations, CustomIconButton, TooltipSelect, AlertIcon, sliderHeaderStyle, CustomSlider, ToggleMenu,
|
|
6
|
-
import { CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, CloudLoading, Copy, None, FastForward, AutoUpdateActive, Both, Visibility, VisibilityOff, Delete, DragHandle as DragHandle$1, Cached, Add, MapAdd, WorldMapProjection, Layers, ExitDomain, Info, Search, Exclamation, MyLocation, Close, ThemeWrapper, lightTheme, FlagBritain, FlagNetherlands, FlagFinland, FlagNorway } from '@opengeoweb/theme';
|
|
4
|
+
import { Grid2, Box, MenuItem, Typography, useTheme, Popper, Fade, Tooltip, styled, LinearProgress, FormControl, InputLabel, Paper, List, ListItemButton, ListItemText, CircularProgress, ListSubheader, Dialog, DialogTitle, DialogContent, DialogContentText, TextField, InputAdornment, DialogActions, Button, circularProgressClasses, ListItemIcon, Checkbox, Switch, Select } from '@mui/material';
|
|
5
|
+
import { SHARED_NAMESPACE, sharedTranslations, CustomIconButton, CustomTooltip, TooltipSelect, AlertIcon, sliderHeaderStyle, CustomSlider, ToggleMenu, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, PROJECTION, calculateStartSize, useWheelStopPropagation, ToolContainerDraggable, useDebounce, dateUtils, withEggs, ErrorBoundary } from '@opengeoweb/shared';
|
|
6
|
+
import { CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, CloudLoading, ColumnCollapsed, ColumnCollapse, Copy, None, FastForward, AutoUpdateActive, Both, Visibility, VisibilityOff, Delete, DragHandle as DragHandle$1, Cached, Add, MapAdd, WorldMapProjection, Layers, ExitDomain, Info, Search, Exclamation, MyLocation, Close, ThemeWrapper, lightTheme, FlagBritain, FlagNetherlands, FlagFinland, FlagNorway } from '@opengeoweb/theme';
|
|
7
7
|
import i18n from 'i18next';
|
|
8
8
|
import { initReactI18next, useTranslation, I18nextProvider } from 'react-i18next';
|
|
9
9
|
import { TIMESLIDER_NAMESPACE, timesliderTranslations, defaultTimeSpan, TIME_SLIDER_LEGEND_HEIGHT, SpeedButton, TimeStepButton, AnimationLengthButton, AnimationLength, TimeSpanButton, secondsPerPxFromCanvasWidth, getNewCenterOfFixedPointZoom, OptionsMenuButton, PlayButton, defaultTimeStep, BackwardForwardStepButton, AutoUpdateButton, NowButton, handleSetNowEvent, TimeSliderButtons, TimeSliderCurrentTimeBox, TimeSliderLegend, TimeSlider, onsetNewDateDebounced, getFilteredTime, ControlButtons, OptionsMenu, TimeSliderClock } from '@opengeoweb/timeslider';
|
|
@@ -11,14 +11,14 @@ import { WEBMAP_REACT_NAMESPACE, webmapReactTranslations, WEBMAP_NAMESPACE, webm
|
|
|
11
11
|
import { useDispatch, useSelector, connect, useStore, Provider } from 'react-redux';
|
|
12
12
|
import { ReactSortable } from 'react-sortablejs';
|
|
13
13
|
import Sortable from 'sortablejs';
|
|
14
|
-
import { layerTypes, layerUtils, mapSelectors, layerActions, layerSelectors, serviceSelectors, serviceActions, mapActions, mapEnums, uiSelectors, uiTypes, useSetupDialog, filterLayers, getUserAddedServices, uiActions, genericActions, drawtoolSelectors, syncConstants, loadingIndicatorActions, defaultLayers, mapStoreActions, getSingularDrawtoolDrawLayerId,
|
|
15
|
-
import { webmapUtils,
|
|
14
|
+
import { layerTypes, layerUtils, mapSelectors, layerActions, layerSelectors, serviceSelectors, serviceActions, mapActions, mapEnums, uiSelectors, uiTypes, useSetupDialog, filterLayers, getUserAddedServices, uiActions, genericSelectors, genericActions, drawtoolSelectors, syncConstants, loadingIndicatorActions, syncGroupsSelectors, defaultLayers, mapStoreActions, getSingularDrawtoolDrawLayerId, syncGroupsSelector, syncGroupsActions, coreModuleConfig, routerUtils, routerModuleConfig } from '@opengeoweb/store';
|
|
15
|
+
import { webmapUtils, queryWMSServiceInfo, queryWMSLayers, queryWMSLayersTree, invalidateWMSGetCapabilities, LayerType, getWMSServiceId, handleDateUtilsISOString, wmServiceListener, EVENT_GETCAPABILITIES_START, EVENT_GETCAPABILITIES_READY, getWMSGetFeatureInfoRequestURL, WMLayer } from '@opengeoweb/webmap';
|
|
16
16
|
import { Box as Box$1, styled as styled$1 } from '@mui/system';
|
|
17
17
|
import _, { isEqual, range } from 'lodash';
|
|
18
18
|
import { LayerSelectButtonConnect, LayerSelectConnect, layerSelectConfig } from '@opengeoweb/layer-select';
|
|
19
19
|
import axios from 'axios';
|
|
20
20
|
import DOMPurify from 'dompurify';
|
|
21
|
-
import { SnackbarWrapperConnect } from '@opengeoweb/snackbar';
|
|
21
|
+
import { snackbarTypes, snackbarActions, SnackbarWrapperConnect } from '@opengeoweb/snackbar';
|
|
22
22
|
import { useNavigate } from 'react-router-dom';
|
|
23
23
|
import * as Sentry from '@sentry/react';
|
|
24
24
|
|
|
@@ -86,7 +86,14 @@ var en = {
|
|
|
86
86
|
"layermanager-dimensions-none": "Layer has no time dimension",
|
|
87
87
|
feature_info_marker_info: "Event marker info",
|
|
88
88
|
feature_info_location_info: "Get information for a specific location",
|
|
89
|
-
"language-select": "Language"
|
|
89
|
+
"language-select": "Language",
|
|
90
|
+
"column-expand": "Expand {{title}}",
|
|
91
|
+
"column-collapse": "Collapse",
|
|
92
|
+
"workspace-time-scroll-off": "Workspace time scroll OFF",
|
|
93
|
+
"workspace-time-scroll-on": "ON",
|
|
94
|
+
"workspace-time-scroll-info": "This feature affects all views in this workspace",
|
|
95
|
+
"workspace-time-scroll-toggle-on": "Workspace time scroll ON",
|
|
96
|
+
"workspace-time-scroll-toggle-off": "Workspace time scroll OFF"
|
|
90
97
|
};
|
|
91
98
|
var fi = {
|
|
92
99
|
feature_info_title: "Napsauta karttaa nähdäksesi lisätietoja.",
|
|
@@ -152,7 +159,14 @@ var fi = {
|
|
|
152
159
|
"layermanager-dimensions-none": "Karttatasolla ei ole aika dimensioita",
|
|
153
160
|
feature_info_marker_info: "Karttamerkin tiedot",
|
|
154
161
|
feature_info_location_info: "Hae tietoja tietystä sijainnista",
|
|
155
|
-
"language-select": "Kieli"
|
|
162
|
+
"language-select": "Kieli",
|
|
163
|
+
"column-expand": "Laajenna {{title}}",
|
|
164
|
+
"column-collapse": "Kutista",
|
|
165
|
+
"workspace-time-scroll-off": "Työtilan aika scrollaus POIS PÄÄLTÄ",
|
|
166
|
+
"workspace-time-scroll-on": "PÄÄLLÄ",
|
|
167
|
+
"workspace-time-scroll-info": "Tämä ominaisuus vaikuttaa kaikkiin näkymiin tämän työtilan sisällä",
|
|
168
|
+
"workspace-time-scroll-toggle-on": "Työtilan aika scrollaus PÄÄLLÄ",
|
|
169
|
+
"workspace-time-scroll-toggle-off": "Työtilan aika scrollaus POIS PÄÄLTÄ"
|
|
156
170
|
};
|
|
157
171
|
var no = {
|
|
158
172
|
feature_info_title: "Klikk på kartet for å få mer informasjon.",
|
|
@@ -218,7 +232,14 @@ var no = {
|
|
|
218
232
|
"layermanager-dimensions-none": "Laget har ingen tidsdimensjon",
|
|
219
233
|
feature_info_marker_info: "Hendelse markør info",
|
|
220
234
|
feature_info_location_info: "Få informasjon for en spesifikk lokasjon",
|
|
221
|
-
"language-select": "Språk"
|
|
235
|
+
"language-select": "Språk",
|
|
236
|
+
"column-expand": "Ekspander {{title}}",
|
|
237
|
+
"column-collapse": "Kollaps",
|
|
238
|
+
"workspace-time-scroll-off": "ikke oversatt",
|
|
239
|
+
"workspace-time-scroll-on": "ikke oversatt",
|
|
240
|
+
"workspace-time-scroll-info": "ikke oversatt",
|
|
241
|
+
"workspace-time-scroll-toggle-on": "ikke oversatt",
|
|
242
|
+
"workspace-time-scroll-toggle-off": "ikke oversatt"
|
|
222
243
|
};
|
|
223
244
|
var nl = {
|
|
224
245
|
feature_info_title: "Klik op de kaart voor informatie.",
|
|
@@ -284,7 +305,14 @@ var nl = {
|
|
|
284
305
|
"layermanager-dimensions-none": "Laag heeft geen tijd dimensie",
|
|
285
306
|
feature_info_marker_info: "Locatie informatie",
|
|
286
307
|
feature_info_location_info: "Zie informatie voor een specifieke locatie",
|
|
287
|
-
"language-select": "Taal"
|
|
308
|
+
"language-select": "Taal",
|
|
309
|
+
"column-expand": "{{title}} uitklappen",
|
|
310
|
+
"column-collapse": "Inklappen",
|
|
311
|
+
"workspace-time-scroll-off": "niet vertaald",
|
|
312
|
+
"workspace-time-scroll-on": "niet vertaald",
|
|
313
|
+
"workspace-time-scroll-info": "niet vertaald",
|
|
314
|
+
"workspace-time-scroll-toggle-on": "niet vertaald",
|
|
315
|
+
"workspace-time-scroll-toggle-off": "niet vertaald"
|
|
288
316
|
};
|
|
289
317
|
var coreTranslations = {
|
|
290
318
|
en: en,
|
|
@@ -804,7 +832,10 @@ var columnClasses = {
|
|
|
804
832
|
column6: 'column-6',
|
|
805
833
|
column7: 'column-7',
|
|
806
834
|
acceptanceTime: 'column-acceptanceTime',
|
|
807
|
-
loadDuration: 'column-loadDuration'
|
|
835
|
+
loadDuration: 'column-loadDuration',
|
|
836
|
+
columnHeader: 'columnHeader',
|
|
837
|
+
baseLayer: 'baseLayer',
|
|
838
|
+
columnTarget: 'columnTarget'
|
|
808
839
|
};
|
|
809
840
|
var DRAG_VISIBILITY_LEADING_BUTTONS = 3;
|
|
810
841
|
var DELETE_MORE_BUTTONS = 3;
|
|
@@ -820,33 +851,67 @@ var leftButtonsStyle = {
|
|
|
820
851
|
display: 'flex',
|
|
821
852
|
background: 'transparent'
|
|
822
853
|
};
|
|
854
|
+
var columnCollapseStyle = {
|
|
855
|
+
height: 'inherit',
|
|
856
|
+
alignContent: 'center',
|
|
857
|
+
alignItems: 'center',
|
|
858
|
+
display: 'flex',
|
|
859
|
+
justifyContent: 'space-between',
|
|
860
|
+
whiteSpace: 'nowrap',
|
|
861
|
+
overflow: 'hidden',
|
|
862
|
+
color: 'geowebColors.buttons.icon.default.color',
|
|
863
|
+
flexGrow: 1
|
|
864
|
+
};
|
|
823
865
|
var layerManagerStyle = {
|
|
866
|
+
'.column-hover-icon': {
|
|
867
|
+
display: 'none'
|
|
868
|
+
},
|
|
869
|
+
'.columnHeader:hover': {
|
|
870
|
+
backgroundColor: 'geowebColors.buttons.icon.mouseOver.fill',
|
|
871
|
+
cursor: 'default',
|
|
872
|
+
'.column-hover-icon': {
|
|
873
|
+
display: 'block'
|
|
874
|
+
}
|
|
875
|
+
},
|
|
824
876
|
'.layerManagerContainer': {
|
|
825
877
|
containerType: 'inline-size'
|
|
826
878
|
},
|
|
879
|
+
'.descriptionRow': {
|
|
880
|
+
height: '32px',
|
|
881
|
+
marginTop: '4px',
|
|
882
|
+
marginBottom: '2px'
|
|
883
|
+
},
|
|
827
884
|
// disable overflow while dragging to prevent issues with scrollbar
|
|
828
885
|
'.is-dragging header+.MuiBox-root': {
|
|
829
886
|
overflow: 'hidden'
|
|
830
887
|
},
|
|
831
|
-
//
|
|
832
|
-
'.
|
|
888
|
+
// baselayer & projection
|
|
889
|
+
'.baseLayer': {
|
|
833
890
|
width: "calc(" + flexibleAreaWidth + " * 0.25)"
|
|
834
891
|
},
|
|
892
|
+
// layerName
|
|
893
|
+
'.column-2': Object.assign({
|
|
894
|
+
width: "calc(" + flexibleAreaWidth + " * 0.25)"
|
|
895
|
+
}, columnCollapseStyle),
|
|
835
896
|
// style
|
|
836
|
-
'.column-3': {
|
|
897
|
+
'.column-3': Object.assign({
|
|
837
898
|
width: "calc(" + flexibleAreaWidth + " * 0.25)"
|
|
838
|
-
},
|
|
899
|
+
}, columnCollapseStyle),
|
|
839
900
|
// opacity
|
|
840
|
-
'.column-4': {
|
|
901
|
+
'.column-4': Object.assign({
|
|
841
902
|
width: "calc(" + flexibleAreaWidth + " * 0.15)"
|
|
842
|
-
},
|
|
903
|
+
}, columnCollapseStyle, {
|
|
904
|
+
flexGrow: 0
|
|
905
|
+
}),
|
|
843
906
|
// dimensions
|
|
844
|
-
'.column-5': {
|
|
907
|
+
'.column-5': Object.assign({
|
|
845
908
|
width: "calc(" + flexibleAreaWidth + " * 0.35)"
|
|
846
|
-
},
|
|
847
|
-
'.column-acceptanceTime': {
|
|
909
|
+
}, columnCollapseStyle),
|
|
910
|
+
'.column-acceptanceTime': Object.assign({
|
|
848
911
|
width: acceptanceTimeWidth
|
|
849
|
-
},
|
|
912
|
+
}, columnCollapseStyle, {
|
|
913
|
+
flexGrow: 0
|
|
914
|
+
}),
|
|
850
915
|
'.column-loadDuration': {
|
|
851
916
|
width: loadDurationWidth,
|
|
852
917
|
paddingLeft: 1,
|
|
@@ -859,7 +924,7 @@ var layerManagerStyle = {
|
|
|
859
924
|
},
|
|
860
925
|
// layer missing warning
|
|
861
926
|
'.column-7': {
|
|
862
|
-
width: "calc(" + flexibleAreaWidth + " * 0.75 + " + acceptanceTimeWidth + "px)"
|
|
927
|
+
width: "calc(" + flexibleAreaWidth + " * 0.75 + " + acceptanceTimeWidth + "px + " + loadDurationWidth + "px)"
|
|
863
928
|
},
|
|
864
929
|
// sizes: mini
|
|
865
930
|
'.enable-btn-mini': {
|
|
@@ -885,11 +950,11 @@ var layerManagerStyle = {
|
|
|
885
950
|
'.activateLayer-btn, .enable-btn, .column-2, .column-3, .column-4, .column-5, .column-6, .column-7, .column-acceptanceTime, .column-loadDuration': {
|
|
886
951
|
display: 'none'
|
|
887
952
|
},
|
|
888
|
-
'
|
|
953
|
+
'.addLayer-column, .setProjection-column': {
|
|
889
954
|
display: 'none'
|
|
890
955
|
},
|
|
891
956
|
'.descriptionRow': {
|
|
892
|
-
height:
|
|
957
|
+
height: 0,
|
|
893
958
|
'.MuiButtonBase-root': {
|
|
894
959
|
display: 'none'
|
|
895
960
|
}
|
|
@@ -916,10 +981,10 @@ var layerManagerStyle = {
|
|
|
916
981
|
// sizes: medium
|
|
917
982
|
'@container (max-width: 600px)': {
|
|
918
983
|
'.layermanager': {
|
|
919
|
-
'.column-3, .column-4, .column-5, .column-6, .column-7, .column-acceptanceTime, .column-loadDuration': {
|
|
984
|
+
'.column-2, .column-3, .column-4, .column-5, .column-6, .column-7, .column-acceptanceTime, .column-loadDuration': {
|
|
920
985
|
display: 'none'
|
|
921
986
|
},
|
|
922
|
-
'.
|
|
987
|
+
'.columnLayerName, .baseLayer': {
|
|
923
988
|
width: "calc((100% - " + leftButtonsWidth + "px) )"
|
|
924
989
|
}
|
|
925
990
|
},
|
|
@@ -995,7 +1060,41 @@ var LayerSelectButton = function LayerSelectButton(_ref) {
|
|
|
995
1060
|
});
|
|
996
1061
|
};
|
|
997
1062
|
|
|
998
|
-
var _excluded$6 = ["settings", "addLayerComponent"];
|
|
1063
|
+
var _excluded$6 = ["settings", "addLayerComponent", "onToggleCollapsed", "collapsedColumns"];
|
|
1064
|
+
var RowItemCollapse$1 = function RowItemCollapse(_ref) {
|
|
1065
|
+
var className = _ref.className,
|
|
1066
|
+
title = _ref.title,
|
|
1067
|
+
collapsedColumns = _ref.collapsedColumns,
|
|
1068
|
+
_ref$onToggleCollapse = _ref.onToggleCollapsed,
|
|
1069
|
+
onToggleCollapsed = _ref$onToggleCollapse === void 0 ? function () {} : _ref$onToggleCollapse;
|
|
1070
|
+
var _useCoreTranslation = useCoreTranslation(),
|
|
1071
|
+
t = _useCoreTranslation.t;
|
|
1072
|
+
var hoverId = columnClasses.columnHeader + "-" + className;
|
|
1073
|
+
return jsx(CustomTooltip, {
|
|
1074
|
+
title: collapsedColumns != null && collapsedColumns[className] ? t('column-expand', {
|
|
1075
|
+
title: title
|
|
1076
|
+
}) : t('column-collapse'),
|
|
1077
|
+
children: jsx(Grid2, {
|
|
1078
|
+
id: hoverId,
|
|
1079
|
+
className: columnClasses.columnHeader + " " + className,
|
|
1080
|
+
style: Object.assign({}, (collapsedColumns == null ? void 0 : collapsedColumns[className]) && {
|
|
1081
|
+
width: '24px',
|
|
1082
|
+
flexGrow: 0
|
|
1083
|
+
}),
|
|
1084
|
+
onClick: function onClick() {
|
|
1085
|
+
onToggleCollapsed(className);
|
|
1086
|
+
},
|
|
1087
|
+
children: collapsedColumns != null && collapsedColumns[className] ? jsx(ColumnCollapsed, {}) : jsxs(Fragment, {
|
|
1088
|
+
children: [jsx(Box, {
|
|
1089
|
+
sx: styles$3.text,
|
|
1090
|
+
children: title
|
|
1091
|
+
}), jsx(ColumnCollapse, {
|
|
1092
|
+
className: "column-hover-icon"
|
|
1093
|
+
})]
|
|
1094
|
+
})
|
|
1095
|
+
})
|
|
1096
|
+
}, collapsedColumns != null && collapsedColumns[className] ? 'Expand' : 'Collapse');
|
|
1097
|
+
};
|
|
999
1098
|
var styles$3 = {
|
|
1000
1099
|
text: function text(theme) {
|
|
1001
1100
|
return Object.assign({
|
|
@@ -1003,22 +1102,25 @@ var styles$3 = {
|
|
|
1003
1102
|
fontSize: '12px',
|
|
1004
1103
|
fontFamily: 'Roboto',
|
|
1005
1104
|
opacity: 0.67
|
|
1006
|
-
}, theme.palette.geowebColors.layerManager.headerRowText
|
|
1105
|
+
}, theme.palette.geowebColors.layerManager.headerRowText, {
|
|
1106
|
+
overflow: 'hidden',
|
|
1107
|
+
textOverflow: 'ellipsis'
|
|
1108
|
+
});
|
|
1007
1109
|
}
|
|
1008
1110
|
};
|
|
1009
|
-
var DescriptionRow = function DescriptionRow(
|
|
1010
|
-
var _settings$addLayer, _settings$addLayer2, _settings$layerName$t, _settings$layerName, _settings$layerStyle$, _settings$layerStyle, _settings$opacity$tit, _settings$opacity, _settings$dimensions$, _settings$dimensions, _settings$acceptanceT, _settings$acceptanceT2;
|
|
1011
|
-
var settings =
|
|
1012
|
-
addLayerComponent =
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1111
|
+
var DescriptionRow = function DescriptionRow(_ref2) {
|
|
1112
|
+
var _settings$addLayer, _settings$addLayer2, _settings$layerName$t, _settings$layerName, _settings$layerName$t2, _settings$layerName2, _settings$layerStyle$, _settings$layerStyle, _settings$opacity$tit, _settings$opacity, _settings$dimensions$, _settings$dimensions, _settings$acceptanceT, _settings$acceptanceT2;
|
|
1113
|
+
var settings = _ref2.settings,
|
|
1114
|
+
addLayerComponent = _ref2.addLayerComponent,
|
|
1115
|
+
_ref2$onToggleCollaps = _ref2.onToggleCollapsed,
|
|
1116
|
+
onToggleCollapsed = _ref2$onToggleCollaps === void 0 ? function () {} : _ref2$onToggleCollaps,
|
|
1117
|
+
collapsedColumns = _ref2.collapsedColumns,
|
|
1118
|
+
gridProps = _objectWithoutPropertiesLoose(_ref2, _excluded$6);
|
|
1119
|
+
var _useCoreTranslation2 = useCoreTranslation(),
|
|
1120
|
+
t = _useCoreTranslation2.t;
|
|
1016
1121
|
return jsxs(Grid2, Object.assign({
|
|
1017
1122
|
container: true,
|
|
1018
1123
|
"data-testid": "descriptionRow",
|
|
1019
|
-
sx: {
|
|
1020
|
-
height: 40
|
|
1021
|
-
},
|
|
1022
1124
|
className: "descriptionRow",
|
|
1023
1125
|
alignItems: "center"
|
|
1024
1126
|
}, gridProps, {
|
|
@@ -1033,37 +1135,36 @@ var DescriptionRow = function DescriptionRow(_ref) {
|
|
|
1033
1135
|
icon: settings == null || (_settings$addLayer2 = settings.addLayer) == null ? void 0 : _settings$addLayer2.icon
|
|
1034
1136
|
})
|
|
1035
1137
|
}), jsx(Grid2, {
|
|
1036
|
-
className:
|
|
1138
|
+
className: "medium-layermanager columnLayerName",
|
|
1037
1139
|
children: jsx(Box, {
|
|
1038
1140
|
sx: styles$3.text,
|
|
1039
1141
|
children: (_settings$layerName$t = settings == null || (_settings$layerName = settings.layerName) == null ? void 0 : _settings$layerName.title) != null ? _settings$layerName$t : t('layermanager-layer')
|
|
1040
1142
|
})
|
|
1041
|
-
}), jsx(
|
|
1143
|
+
}), jsx(RowItemCollapse$1, {
|
|
1144
|
+
className: columnClasses.column2,
|
|
1145
|
+
title: (_settings$layerName$t2 = settings == null || (_settings$layerName2 = settings.layerName) == null ? void 0 : _settings$layerName2.title) != null ? _settings$layerName$t2 : t('layermanager-layer'),
|
|
1146
|
+
onToggleCollapsed: onToggleCollapsed,
|
|
1147
|
+
collapsedColumns: collapsedColumns
|
|
1148
|
+
}), jsx(RowItemCollapse$1, {
|
|
1042
1149
|
className: columnClasses.column3,
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
}), jsx(Grid2, {
|
|
1150
|
+
title: (_settings$layerStyle$ = settings == null || (_settings$layerStyle = settings.layerStyle) == null ? void 0 : _settings$layerStyle.title) != null ? _settings$layerStyle$ : t('layermanager-style-title'),
|
|
1151
|
+
onToggleCollapsed: onToggleCollapsed,
|
|
1152
|
+
collapsedColumns: collapsedColumns
|
|
1153
|
+
}), jsx(RowItemCollapse$1, {
|
|
1048
1154
|
className: columnClasses.column4,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
}), jsx(Grid2, {
|
|
1155
|
+
title: (_settings$opacity$tit = settings == null || (_settings$opacity = settings.opacity) == null ? void 0 : _settings$opacity.title) != null ? _settings$opacity$tit : t('layermanager-opacity-title'),
|
|
1156
|
+
onToggleCollapsed: onToggleCollapsed,
|
|
1157
|
+
collapsedColumns: collapsedColumns
|
|
1158
|
+
}), jsx(RowItemCollapse$1, {
|
|
1054
1159
|
className: columnClasses.column5,
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
}), jsx(Grid2, {
|
|
1160
|
+
title: (_settings$dimensions$ = settings == null || (_settings$dimensions = settings.dimensions) == null ? void 0 : _settings$dimensions.title) != null ? _settings$dimensions$ : t('layermanager-dimensions-title'),
|
|
1161
|
+
onToggleCollapsed: onToggleCollapsed,
|
|
1162
|
+
collapsedColumns: collapsedColumns
|
|
1163
|
+
}), jsx(RowItemCollapse$1, {
|
|
1060
1164
|
className: columnClasses.acceptanceTime,
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
}],
|
|
1065
|
-
children: (_settings$acceptanceT = settings == null || (_settings$acceptanceT2 = settings.acceptanceTime) == null ? void 0 : _settings$acceptanceT2.title) != null ? _settings$acceptanceT : t('layermanager-acceptance-time')
|
|
1066
|
-
})
|
|
1165
|
+
title: (_settings$acceptanceT = settings == null || (_settings$acceptanceT2 = settings.acceptanceTime) == null ? void 0 : _settings$acceptanceT2.title) != null ? _settings$acceptanceT : t('layermanager-acceptance-time'),
|
|
1166
|
+
onToggleCollapsed: onToggleCollapsed,
|
|
1167
|
+
collapsedColumns: collapsedColumns
|
|
1067
1168
|
}), jsx(Grid2, {
|
|
1068
1169
|
className: columnClasses.loadDuration,
|
|
1069
1170
|
children: jsx(Box, {
|
|
@@ -1263,43 +1364,36 @@ var DimensionSelect = function DimensionSelect(_ref) {
|
|
|
1263
1364
|
var defaultValueTooltip = (_defaultDimensionValu = defaultDimensionValueTooltip(t, selectedDimension)) != null ? _defaultDimensionValu : '';
|
|
1264
1365
|
var nameTooltip = (_tooltipGenerator = tooltipGenerator == null ? void 0 : tooltipGenerator(t, selectedDimension)) != null ? _tooltipGenerator : defaultNameTooltip;
|
|
1265
1366
|
var valueTooltip = (_tooltipGenerator2 = tooltipGenerator == null ? void 0 : tooltipGenerator(t, selectedDimension, true)) != null ? _tooltipGenerator2 : defaultValueTooltip;
|
|
1266
|
-
return
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
icon: icon,
|
|
1297
|
-
valueMappings: valueMappings,
|
|
1298
|
-
setUseLatestReferenceTime: setUseLatestReferenceTime,
|
|
1299
|
-
useLatestReferenceTime: useLatestReferenceTime,
|
|
1300
|
-
skipLocalStyling: skipLocalStyling
|
|
1301
|
-
})]
|
|
1302
|
-
})
|
|
1367
|
+
return jsxs(Fragment, {
|
|
1368
|
+
children: [collapseDimensionDropdown ? jsx(SingleValueComponent, Object.assign({}, layerDimensions[0], {
|
|
1369
|
+
nameMappings: nameMappings,
|
|
1370
|
+
valueMappings: valueMappings,
|
|
1371
|
+
position: "dimension"
|
|
1372
|
+
})) : jsx(DimensionSelectName, {
|
|
1373
|
+
selectedDimensionName: selectedDimensionName,
|
|
1374
|
+
setSelectedDimensionName: setSelectedDimensionName,
|
|
1375
|
+
dimensionNames: dimensionNames,
|
|
1376
|
+
tooltip: nameTooltip,
|
|
1377
|
+
isEnabled: isEnabled,
|
|
1378
|
+
icon: icon,
|
|
1379
|
+
nameMappings: nameMappings,
|
|
1380
|
+
skipLocalStyling: skipLocalStyling
|
|
1381
|
+
}), collapseValueDropdown ? jsx(SingleValueComponent, Object.assign({}, layerDimensions[0], {
|
|
1382
|
+
nameMappings: nameMappings,
|
|
1383
|
+
valueMappings: valueMappings,
|
|
1384
|
+
position: "value"
|
|
1385
|
+
})) : jsx(DimensionSelectValue, {
|
|
1386
|
+
selectedDimension: selectedDimension,
|
|
1387
|
+
onLayerChangeDimension: onLayerChangeDimension,
|
|
1388
|
+
tooltip: valueTooltip,
|
|
1389
|
+
isEnabled: isEnabled,
|
|
1390
|
+
hideLatestDuplicate: hideLatestDuplicate,
|
|
1391
|
+
icon: icon,
|
|
1392
|
+
valueMappings: valueMappings,
|
|
1393
|
+
setUseLatestReferenceTime: setUseLatestReferenceTime,
|
|
1394
|
+
useLatestReferenceTime: useLatestReferenceTime,
|
|
1395
|
+
skipLocalStyling: skipLocalStyling
|
|
1396
|
+
})]
|
|
1303
1397
|
});
|
|
1304
1398
|
};
|
|
1305
1399
|
|
|
@@ -1499,6 +1593,7 @@ var OpacitySelect = function OpacitySelect(_ref) {
|
|
|
1499
1593
|
disableFocusRipple: true,
|
|
1500
1594
|
sx: {
|
|
1501
1595
|
'&.MuiIconButton-root': Object.assign({
|
|
1596
|
+
justifyContent: 'normal',
|
|
1502
1597
|
width: '100%!important',
|
|
1503
1598
|
height: '100%!important',
|
|
1504
1599
|
borderRadius: '0',
|
|
@@ -2100,41 +2195,75 @@ var Acceptance = function Acceptance(_ref6) {
|
|
|
2100
2195
|
onChangeAcceptanceTime: onChangeAcceptanceTime
|
|
2101
2196
|
});
|
|
2102
2197
|
};
|
|
2103
|
-
var
|
|
2104
|
-
var
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2198
|
+
var RowItemCollapse = function RowItemCollapse(_ref7) {
|
|
2199
|
+
var className = _ref7.className,
|
|
2200
|
+
collapsedColumns = _ref7.collapsedColumns,
|
|
2201
|
+
children = _ref7.children;
|
|
2202
|
+
var theme = useTheme();
|
|
2203
|
+
var hoverId = columnClasses.columnHeader + "-" + className;
|
|
2204
|
+
var hoverElement = document.getElementById(hoverId);
|
|
2205
|
+
hoverElement == null || hoverElement.addEventListener('mouseenter', function () {
|
|
2206
|
+
var targetElements = document.getElementsByClassName(className);
|
|
2207
|
+
Array.from(targetElements).forEach(function (element) {
|
|
2208
|
+
// eslint-disable-next-line no-param-reassign
|
|
2209
|
+
element.style.backgroundColor = theme.palette.geowebColors.buttons.icon.mouseOver.fill || 'inherit';
|
|
2210
|
+
});
|
|
2211
|
+
});
|
|
2212
|
+
hoverElement == null || hoverElement.addEventListener('mouseleave', function () {
|
|
2213
|
+
var targetElements = document.getElementsByClassName(className);
|
|
2214
|
+
Array.from(targetElements).forEach(function (element) {
|
|
2215
|
+
// eslint-disable-next-line no-param-reassign
|
|
2216
|
+
element.style.backgroundColor = 'inherit';
|
|
2217
|
+
});
|
|
2218
|
+
});
|
|
2219
|
+
return jsx(Grid2, {
|
|
2220
|
+
className: className,
|
|
2221
|
+
style: Object.assign({
|
|
2222
|
+
height: '32px'
|
|
2223
|
+
}, (collapsedColumns == null ? void 0 : collapsedColumns[className]) && {
|
|
2224
|
+
width: '24px',
|
|
2225
|
+
flexGrow: 0,
|
|
2226
|
+
contentVisibility: 'hidden'
|
|
2227
|
+
}),
|
|
2228
|
+
children: children
|
|
2229
|
+
});
|
|
2230
|
+
};
|
|
2231
|
+
var LayerRowUnstyled = function LayerRowUnstyled(_ref8) {
|
|
2232
|
+
var layerId = _ref8.layerId,
|
|
2233
|
+
layer = _ref8.layer,
|
|
2234
|
+
layerName = _ref8.layerName,
|
|
2235
|
+
services = _ref8.services,
|
|
2236
|
+
mapId = _ref8.mapId,
|
|
2237
|
+
_ref8$onLayerRowClick = _ref8.onLayerRowClick,
|
|
2238
|
+
onLayerRowClick = _ref8$onLayerRowClick === void 0 ? function () {} : _ref8$onLayerRowClick,
|
|
2239
|
+
_ref8$isEnabled = _ref8.isEnabled,
|
|
2240
|
+
isEnabled = _ref8$isEnabled === void 0 ? true : _ref8$isEnabled,
|
|
2241
|
+
_ref8$isLayerMissing = _ref8.isLayerMissing,
|
|
2242
|
+
isLayerMissing = _ref8$isLayerMissing === void 0 ? false : _ref8$isLayerMissing,
|
|
2243
|
+
onLayerEnable = _ref8.onLayerEnable,
|
|
2244
|
+
onLayerChangeName = _ref8.onLayerChangeName,
|
|
2245
|
+
onLayerChangeStyle = _ref8.onLayerChangeStyle,
|
|
2246
|
+
onLayerChangeOpacity = _ref8.onLayerChangeOpacity,
|
|
2247
|
+
_onLayerChangeDimension = _ref8.onLayerChangeDimension,
|
|
2248
|
+
onLayerDelete = _ref8.onLayerDelete,
|
|
2249
|
+
onLayerDuplicate = _ref8.onLayerDuplicate,
|
|
2250
|
+
onChangeAcceptanceTime = _ref8.onChangeAcceptanceTime,
|
|
2251
|
+
layerEnableLayout = _ref8.layerEnableLayout,
|
|
2252
|
+
layerServicesLayout = _ref8.layerServicesLayout,
|
|
2253
|
+
layerStylesLayout = _ref8.layerStylesLayout,
|
|
2254
|
+
layerOpacityLayout = _ref8.layerOpacityLayout,
|
|
2255
|
+
layerDimensionLayout = _ref8.layerDimensionLayout,
|
|
2256
|
+
layerDeleteLayout = _ref8.layerDeleteLayout,
|
|
2257
|
+
layerShowLayerInfoLayout = _ref8.layerShowLayerInfoLayout,
|
|
2258
|
+
layerMenuLayout = _ref8.layerMenuLayout,
|
|
2259
|
+
layerActiveLayout = _ref8.layerActiveLayout,
|
|
2260
|
+
disableActivateLayer = _ref8.disableActivateLayer,
|
|
2261
|
+
dragHandle = _ref8.dragHandle,
|
|
2262
|
+
layerAcceptanceTimeLayout = _ref8.layerAcceptanceTimeLayout,
|
|
2263
|
+
layerMissingDataLayout = _ref8.layerMissingDataLayout,
|
|
2264
|
+
layerLoadDurationLayout = _ref8.layerLoadDurationLayout,
|
|
2265
|
+
className = _ref8.className,
|
|
2266
|
+
collapsedColumns = _ref8.collapsedColumns;
|
|
2138
2267
|
var _useCoreTranslation2 = useCoreTranslation(),
|
|
2139
2268
|
t = _useCoreTranslation2.t;
|
|
2140
2269
|
var onClickRow = function onClickRow() {
|
|
@@ -2232,8 +2361,9 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref7) {
|
|
|
2232
2361
|
onChangeEnable: changeEnable,
|
|
2233
2362
|
onChangeActive: onClickRow
|
|
2234
2363
|
})
|
|
2235
|
-
}), jsx(
|
|
2364
|
+
}), jsx(RowItemCollapse, {
|
|
2236
2365
|
className: columnClasses.column2,
|
|
2366
|
+
collapsedColumns: collapsedColumns,
|
|
2237
2367
|
children: layerServicesLayout || jsx(RenderLayers, {
|
|
2238
2368
|
layerName: layer.name,
|
|
2239
2369
|
layers: services && layer.service && services[layer.service] && services[layer.service].layers || [],
|
|
@@ -2251,20 +2381,23 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref7) {
|
|
|
2251
2381
|
isCompact: true
|
|
2252
2382
|
})
|
|
2253
2383
|
}) : jsxs(Fragment, {
|
|
2254
|
-
children: [jsx(
|
|
2384
|
+
children: [jsx(RowItemCollapse, {
|
|
2255
2385
|
className: columnClasses.column3,
|
|
2386
|
+
collapsedColumns: collapsedColumns,
|
|
2256
2387
|
children: layerStylesLayout || jsx(Styles, {
|
|
2257
2388
|
style: layer.style,
|
|
2258
2389
|
onChangeStyle: changeStyle
|
|
2259
2390
|
})
|
|
2260
|
-
}), jsx(
|
|
2391
|
+
}), jsx(RowItemCollapse, {
|
|
2261
2392
|
className: columnClasses.column4,
|
|
2393
|
+
collapsedColumns: collapsedColumns,
|
|
2262
2394
|
children: layerOpacityLayout || jsx(Opacity, {
|
|
2263
2395
|
opacity: layer.opacity,
|
|
2264
2396
|
onChangeOpacity: changeOpacity
|
|
2265
2397
|
})
|
|
2266
|
-
}), jsx(
|
|
2398
|
+
}), jsx(RowItemCollapse, {
|
|
2267
2399
|
className: columnClasses.column5,
|
|
2400
|
+
collapsedColumns: collapsedColumns,
|
|
2268
2401
|
children: layerDimensionLayout || jsx(DimensionSelect, {
|
|
2269
2402
|
layerDimensions: layerUtils.filterNonTimeDimensions(layer.dimensions),
|
|
2270
2403
|
onLayerChangeDimension: function onLayerChangeDimension(dimensionName, dimensionValue) {
|
|
@@ -2279,8 +2412,9 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref7) {
|
|
|
2279
2412
|
});
|
|
2280
2413
|
}
|
|
2281
2414
|
})
|
|
2282
|
-
}), jsx(
|
|
2415
|
+
}), jsx(RowItemCollapse, {
|
|
2283
2416
|
className: columnClasses.acceptanceTime,
|
|
2417
|
+
collapsedColumns: collapsedColumns,
|
|
2284
2418
|
children: layerAcceptanceTimeLayout || jsx(Acceptance, {
|
|
2285
2419
|
acceptanceTime: layer.acceptanceTimeInMinutes,
|
|
2286
2420
|
onChangeAcceptanceTime: changeAcceptanceTime
|
|
@@ -2311,10 +2445,10 @@ var LayerRowUnstyled = function LayerRowUnstyled(_ref7) {
|
|
|
2311
2445
|
})
|
|
2312
2446
|
);
|
|
2313
2447
|
};
|
|
2314
|
-
var LayerRow = styled(LayerRowUnstyled)(function (
|
|
2315
|
-
var theme =
|
|
2316
|
-
|
|
2317
|
-
isEnabled =
|
|
2448
|
+
var LayerRow = styled(LayerRowUnstyled)(function (_ref9) {
|
|
2449
|
+
var theme = _ref9.theme,
|
|
2450
|
+
_ref9$isEnabled = _ref9.isEnabled,
|
|
2451
|
+
isEnabled = _ref9$isEnabled === void 0 ? true : _ref9$isEnabled;
|
|
2318
2452
|
return {
|
|
2319
2453
|
'& .MuiInputBase-root': Object.assign({}, tooltipContainerStyles(theme, isEnabled)),
|
|
2320
2454
|
'& .layerRow': {
|
|
@@ -2322,20 +2456,20 @@ var LayerRow = styled(LayerRowUnstyled)(function (_ref8) {
|
|
|
2322
2456
|
border: '1px solid',
|
|
2323
2457
|
borderColor: isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultCardContainer.borderColor : theme.palette.geowebColors.layerManager.tableRowDisabledCardContainer.borderColor,
|
|
2324
2458
|
borderRadius: 1 * theme.shape.borderRadius,
|
|
2325
|
-
marginBottom: theme.spacing(0.
|
|
2326
|
-
minHeight: '
|
|
2459
|
+
marginBottom: theme.spacing(0.25),
|
|
2460
|
+
minHeight: '32px'
|
|
2327
2461
|
}
|
|
2328
2462
|
};
|
|
2329
2463
|
});
|
|
2330
|
-
var Accordion = function Accordion(
|
|
2331
|
-
var Styles =
|
|
2332
|
-
Acceptance =
|
|
2333
|
-
ShowLayerInfo =
|
|
2334
|
-
DeleteLayer =
|
|
2335
|
-
Opacity =
|
|
2336
|
-
layerName =
|
|
2337
|
-
LeftButtons =
|
|
2338
|
-
LoadDuration =
|
|
2464
|
+
var Accordion = function Accordion(_ref10) {
|
|
2465
|
+
var Styles = _ref10.Styles,
|
|
2466
|
+
Acceptance = _ref10.Acceptance,
|
|
2467
|
+
ShowLayerInfo = _ref10.ShowLayerInfo,
|
|
2468
|
+
DeleteLayer = _ref10.DeleteLayer,
|
|
2469
|
+
Opacity = _ref10.Opacity,
|
|
2470
|
+
layerName = _ref10.layerName,
|
|
2471
|
+
LeftButtons = _ref10.LeftButtons,
|
|
2472
|
+
LoadDuration = _ref10.LoadDuration;
|
|
2339
2473
|
var _useCoreTranslation3 = useCoreTranslation(),
|
|
2340
2474
|
t = _useCoreTranslation3.t;
|
|
2341
2475
|
return jsx(CustomAccordion, {
|
|
@@ -2700,10 +2834,13 @@ var RenderLayersConnect = function RenderLayersConnect(_ref) {
|
|
|
2700
2834
|
case 0:
|
|
2701
2835
|
_context.prev = 0;
|
|
2702
2836
|
_context.next = 3;
|
|
2703
|
-
return
|
|
2837
|
+
return queryWMSLayers(serviceUrl);
|
|
2704
2838
|
case 3:
|
|
2705
2839
|
_layers = _context.sent;
|
|
2706
|
-
|
|
2840
|
+
_context.next = 6;
|
|
2841
|
+
return queryWMSServiceInfo(serviceUrl);
|
|
2842
|
+
case 6:
|
|
2843
|
+
wmService = _context.sent;
|
|
2707
2844
|
serviceSetLayers({
|
|
2708
2845
|
id: wmService.id,
|
|
2709
2846
|
name: wmService.title,
|
|
@@ -2712,17 +2849,17 @@ var RenderLayersConnect = function RenderLayersConnect(_ref) {
|
|
|
2712
2849
|
scope: 'user',
|
|
2713
2850
|
"abstract": wmService["abstract"]
|
|
2714
2851
|
});
|
|
2715
|
-
_context.next =
|
|
2852
|
+
_context.next = 13;
|
|
2716
2853
|
break;
|
|
2717
|
-
case
|
|
2718
|
-
_context.prev =
|
|
2854
|
+
case 10:
|
|
2855
|
+
_context.prev = 10;
|
|
2719
2856
|
_context.t0 = _context["catch"](0);
|
|
2720
2857
|
console.warn(_context.t0.message);
|
|
2721
|
-
case
|
|
2858
|
+
case 13:
|
|
2722
2859
|
case "end":
|
|
2723
2860
|
return _context.stop();
|
|
2724
2861
|
}
|
|
2725
|
-
}, _callee, null, [[0,
|
|
2862
|
+
}, _callee, null, [[0, 10]]);
|
|
2726
2863
|
}));
|
|
2727
2864
|
return function addService(_x) {
|
|
2728
2865
|
return _ref2.apply(this, arguments);
|
|
@@ -3147,7 +3284,7 @@ var LayerInfoDialogConnect = function LayerInfoDialogConnect() {
|
|
|
3147
3284
|
|
|
3148
3285
|
// Whenever a new layer is added index is updated in the dragHandle, which modifies the testing text. Below we ignore this text, as it serves no other purpose.
|
|
3149
3286
|
var areEqual = function areEqual(prevProps, nextProps) {
|
|
3150
|
-
if (prevProps.layerId === nextProps.layerId && prevProps.mapId === nextProps.mapId && prevProps.settings === nextProps.settings && prevProps.dragHandle.props.isDisabled === nextProps.dragHandle.props.isDisabled && prevProps.dragHandle.props.toolTipTitle === nextProps.dragHandle.props.toolTipTitle) {
|
|
3287
|
+
if (prevProps.layerId === nextProps.layerId && prevProps.mapId === nextProps.mapId && prevProps.settings === nextProps.settings && prevProps.dragHandle.props.isDisabled === nextProps.dragHandle.props.isDisabled && prevProps.dragHandle.props.toolTipTitle === nextProps.dragHandle.props.toolTipTitle && prevProps.collapsedColumns === nextProps.collapsedColumns) {
|
|
3151
3288
|
return true;
|
|
3152
3289
|
}
|
|
3153
3290
|
return false;
|
|
@@ -3157,7 +3294,8 @@ var LayerRowConnect = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
3157
3294
|
var layerId = _ref.layerId,
|
|
3158
3295
|
mapId = _ref.mapId,
|
|
3159
3296
|
dragHandle = _ref.dragHandle,
|
|
3160
|
-
settings = _ref.settings
|
|
3297
|
+
settings = _ref.settings,
|
|
3298
|
+
collapsedColumns = _ref.collapsedColumns;
|
|
3161
3299
|
var isEnabled = useSelector(function (store) {
|
|
3162
3300
|
return layerSelectors.getLayerEnabled(store, layerId);
|
|
3163
3301
|
});
|
|
@@ -3249,7 +3387,8 @@ var LayerRowConnect = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
3249
3387
|
layerId: layerId
|
|
3250
3388
|
}),
|
|
3251
3389
|
disableActivateLayer: settings == null || (_settings$activateLay2 = settings.activateLayer) == null ? void 0 : _settings$activateLay2.isDisabled,
|
|
3252
|
-
dragHandle: dragHandle
|
|
3390
|
+
dragHandle: dragHandle,
|
|
3391
|
+
collapsedColumns: collapsedColumns
|
|
3253
3392
|
});
|
|
3254
3393
|
}, areEqual);
|
|
3255
3394
|
|
|
@@ -3293,10 +3432,11 @@ var DragHandle = function DragHandle(_ref) {
|
|
|
3293
3432
|
});
|
|
3294
3433
|
};
|
|
3295
3434
|
|
|
3296
|
-
var _excluded$4 = ["mapId", "settings"];
|
|
3435
|
+
var _excluded$4 = ["mapId", "settings", "collapsedColumns"];
|
|
3297
3436
|
var LayerContainerRow = /*#__PURE__*/React.memo(function (_ref) {
|
|
3298
3437
|
var mapId = _ref.mapId,
|
|
3299
3438
|
settings = _ref.settings,
|
|
3439
|
+
collapsedColumns = _ref.collapsedColumns,
|
|
3300
3440
|
gridProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
3301
3441
|
var dispatch = useDispatch();
|
|
3302
3442
|
var _React$useState = React.useState(false),
|
|
@@ -3395,7 +3535,8 @@ var LayerContainerRow = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
3395
3535
|
icon: settings == null || (_settings$dragHandle = settings.dragHandle) == null ? void 0 : _settings$dragHandle.icon,
|
|
3396
3536
|
tooltipTitle: settings == null || (_settings$dragHandle2 = settings.dragHandle) == null ? void 0 : _settings$dragHandle2.tooltipTitle
|
|
3397
3537
|
}),
|
|
3398
|
-
settings: settings
|
|
3538
|
+
settings: settings,
|
|
3539
|
+
collapsedColumns: collapsedColumns
|
|
3399
3540
|
}, "layerRowConnect-" + layerId);
|
|
3400
3541
|
});
|
|
3401
3542
|
React.useEffect(function () {
|
|
@@ -3701,17 +3842,40 @@ var WMSLayerTree = function WMSLayerTree(_ref) {
|
|
|
3701
3842
|
React.useEffect(function () {
|
|
3702
3843
|
var isMounted = true;
|
|
3703
3844
|
setIsLoading(true);
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3845
|
+
var makeServiceQuery = /*#__PURE__*/function () {
|
|
3846
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3847
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3848
|
+
while (1) switch (_context.prev = _context.next) {
|
|
3849
|
+
case 0:
|
|
3850
|
+
if (!forceReload) {
|
|
3851
|
+
_context.next = 3;
|
|
3852
|
+
break;
|
|
3853
|
+
}
|
|
3854
|
+
_context.next = 3;
|
|
3855
|
+
return invalidateWMSGetCapabilities(service.url);
|
|
3856
|
+
case 3:
|
|
3857
|
+
queryWMSLayersTree(service.url).then(function (layerTreeFromPromise) {
|
|
3858
|
+
if (isMounted) {
|
|
3859
|
+
setLayerTree(layerTreeFromPromise);
|
|
3860
|
+
setIsLoading(false);
|
|
3861
|
+
}
|
|
3862
|
+
})["catch"](function (error) {
|
|
3863
|
+
if (isMounted) {
|
|
3864
|
+
setLayerTree(error.toString());
|
|
3865
|
+
setIsLoading(false);
|
|
3866
|
+
}
|
|
3867
|
+
});
|
|
3868
|
+
case 4:
|
|
3869
|
+
case "end":
|
|
3870
|
+
return _context.stop();
|
|
3871
|
+
}
|
|
3872
|
+
}, _callee);
|
|
3873
|
+
}));
|
|
3874
|
+
return function makeServiceQuery() {
|
|
3875
|
+
return _ref2.apply(this, arguments);
|
|
3876
|
+
};
|
|
3877
|
+
}();
|
|
3878
|
+
void makeServiceQuery();
|
|
3715
3879
|
return function () {
|
|
3716
3880
|
isMounted = false;
|
|
3717
3881
|
setForceReload(false);
|
|
@@ -4157,7 +4321,7 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
|
|
|
4157
4321
|
// Check if valid URL was passed
|
|
4158
4322
|
} else if (validateServiceUrl(serviceURL)) {
|
|
4159
4323
|
// Check if service is WMS server
|
|
4160
|
-
|
|
4324
|
+
queryWMSLayersTree(serviceURL).then(function (layerTreeFromPromise) {
|
|
4161
4325
|
// Shorten URL as a naming backup
|
|
4162
4326
|
var shortenedURL = serviceURL.substring(serviceURL.indexOf('//') + 2, serviceURL.indexOf('?'));
|
|
4163
4327
|
handleAddToList(layerTreeFromPromise.title || layerTreeFromPromise.name || shortenedURL);
|
|
@@ -4366,7 +4530,6 @@ var BaseLayerRow = function BaseLayerRow(_ref2) {
|
|
|
4366
4530
|
}, theme.palette.geowebColors.layerManager.baseLayerRow.root)
|
|
4367
4531
|
}, gridProps, {
|
|
4368
4532
|
children: [jsxs(Grid2, {
|
|
4369
|
-
className: columnClasses.column1,
|
|
4370
4533
|
sx: [{
|
|
4371
4534
|
marginTop: '-2px'
|
|
4372
4535
|
}, leftButtonsStyle],
|
|
@@ -4382,7 +4545,7 @@ var BaseLayerRow = function BaseLayerRow(_ref2) {
|
|
|
4382
4545
|
}
|
|
4383
4546
|
}), settings == null || (_settings$baseLayerRo2 = settings.baseLayerRow) == null ? void 0 : _settings$baseLayerRo2.title]
|
|
4384
4547
|
}), jsx(Grid2, {
|
|
4385
|
-
className: columnClasses.
|
|
4548
|
+
className: columnClasses.baseLayer,
|
|
4386
4549
|
children: jsx(BaseLayersConnect, {
|
|
4387
4550
|
mapId: mapId,
|
|
4388
4551
|
preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
|
|
@@ -4507,7 +4670,6 @@ var ProjectionSelect = function ProjectionSelect(_ref) {
|
|
|
4507
4670
|
height: '36px'
|
|
4508
4671
|
},
|
|
4509
4672
|
children: [jsx(Grid2, {
|
|
4510
|
-
className: columnClasses.column1,
|
|
4511
4673
|
sx: [{
|
|
4512
4674
|
marginTop: '-2px'
|
|
4513
4675
|
}, leftButtonsStyle],
|
|
@@ -4520,7 +4682,7 @@ var ProjectionSelect = function ProjectionSelect(_ref) {
|
|
|
4520
4682
|
children: jsx(WorldMapProjection, {})
|
|
4521
4683
|
})
|
|
4522
4684
|
}), jsx(Grid2, {
|
|
4523
|
-
className: columnClasses.
|
|
4685
|
+
className: columnClasses.baseLayer,
|
|
4524
4686
|
children: jsx(FormControl, {
|
|
4525
4687
|
style: {
|
|
4526
4688
|
width: '100%'
|
|
@@ -4640,7 +4802,9 @@ var LayerManager = function LayerManager(_ref) {
|
|
|
4640
4802
|
settings = _ref.settings,
|
|
4641
4803
|
_ref$headerSize = _ref.headerSize,
|
|
4642
4804
|
headerSize = _ref$headerSize === void 0 ? 'medium' : _ref$headerSize,
|
|
4643
|
-
addLayerComponent = _ref.addLayerComponent
|
|
4805
|
+
addLayerComponent = _ref.addLayerComponent,
|
|
4806
|
+
_ref$defaultCollapsed = _ref.defaultCollapsedColumns,
|
|
4807
|
+
defaultCollapsedColumns = _ref$defaultCollapsed === void 0 ? {} : _ref$defaultCollapsed;
|
|
4644
4808
|
var _useCoreTranslation = useCoreTranslation(),
|
|
4645
4809
|
t = _useCoreTranslation.t;
|
|
4646
4810
|
var minSize = {
|
|
@@ -4655,6 +4819,10 @@ var LayerManager = function LayerManager(_ref) {
|
|
|
4655
4819
|
sizeInState = _React$useState[0],
|
|
4656
4820
|
setSizeInState = _React$useState[1];
|
|
4657
4821
|
var dataSize = getLayerManagerSizeValue(sizeInState);
|
|
4822
|
+
var _React$useState2 = React.useState(defaultCollapsedColumns),
|
|
4823
|
+
collapsedColumns = _React$useState2[0],
|
|
4824
|
+
setCollapsedColumns = _React$useState2[1];
|
|
4825
|
+
var stopWheelEventPropagationRef = useWheelStopPropagation();
|
|
4658
4826
|
return jsx(ToolContainerDraggable, {
|
|
4659
4827
|
title: nonEmptyTitle,
|
|
4660
4828
|
startSize: sizeInState,
|
|
@@ -4700,6 +4868,7 @@ var LayerManager = function LayerManager(_ref) {
|
|
|
4700
4868
|
}
|
|
4701
4869
|
},
|
|
4702
4870
|
children: jsxs(Box, {
|
|
4871
|
+
ref: stopWheelEventPropagationRef,
|
|
4703
4872
|
onKeyDown: function onKeyDown(event) {
|
|
4704
4873
|
event.stopPropagation();
|
|
4705
4874
|
},
|
|
@@ -4727,10 +4896,16 @@ var LayerManager = function LayerManager(_ref) {
|
|
|
4727
4896
|
children: [jsx(DescriptionRow, {
|
|
4728
4897
|
source: source,
|
|
4729
4898
|
settings: settings == null ? void 0 : settings.header,
|
|
4730
|
-
addLayerComponent: addLayerComponent
|
|
4899
|
+
addLayerComponent: addLayerComponent,
|
|
4900
|
+
onToggleCollapsed: function onToggleCollapsed(name) {
|
|
4901
|
+
var _Object$assign;
|
|
4902
|
+
return setCollapsedColumns(Object.assign({}, collapsedColumns, (_Object$assign = {}, _Object$assign[name] = !collapsedColumns[name], _Object$assign)));
|
|
4903
|
+
},
|
|
4904
|
+
collapsedColumns: collapsedColumns
|
|
4731
4905
|
}), jsx(LayerContainerRow, {
|
|
4732
4906
|
mapId: mapId,
|
|
4733
|
-
settings: settings == null ? void 0 : settings.content
|
|
4907
|
+
settings: settings == null ? void 0 : settings.content,
|
|
4908
|
+
collapsedColumns: collapsedColumns
|
|
4734
4909
|
}), jsx(BaseLayerRow, {
|
|
4735
4910
|
mapId: mapId,
|
|
4736
4911
|
tooltip: t('layermanager-baselayers-tooltip'),
|
|
@@ -4746,36 +4921,45 @@ var LayerManager = function LayerManager(_ref) {
|
|
|
4746
4921
|
});
|
|
4747
4922
|
};
|
|
4748
4923
|
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4924
|
+
var getServicesToLoad = /*#__PURE__*/function () {
|
|
4925
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(services) {
|
|
4926
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
4927
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
4928
|
+
case 0:
|
|
4929
|
+
return _context2.abrupt("return", Promise.all(services.map( /*#__PURE__*/function () {
|
|
4930
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(service) {
|
|
4931
|
+
var scope;
|
|
4932
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4933
|
+
while (1) switch (_context.prev = _context.next) {
|
|
4934
|
+
case 0:
|
|
4935
|
+
scope = service.scope ? service.scope : 'system';
|
|
4936
|
+
return _context.abrupt("return", {
|
|
4937
|
+
id: getWMSServiceId(service.url),
|
|
4938
|
+
name: service.name,
|
|
4939
|
+
url: service.url,
|
|
4940
|
+
scope: scope,
|
|
4941
|
+
"abstract": service["abstract"]
|
|
4942
|
+
});
|
|
4943
|
+
case 2:
|
|
4944
|
+
case "end":
|
|
4945
|
+
return _context.stop();
|
|
4946
|
+
}
|
|
4947
|
+
}, _callee);
|
|
4948
|
+
}));
|
|
4949
|
+
return function (_x2) {
|
|
4950
|
+
return _ref2.apply(this, arguments);
|
|
4951
|
+
};
|
|
4952
|
+
}())));
|
|
4953
|
+
case 1:
|
|
4954
|
+
case "end":
|
|
4955
|
+
return _context2.stop();
|
|
4956
|
+
}
|
|
4957
|
+
}, _callee2);
|
|
4958
|
+
}));
|
|
4959
|
+
return function getServicesToLoad(_x) {
|
|
4960
|
+
return _ref.apply(this, arguments);
|
|
4961
|
+
};
|
|
4962
|
+
}();
|
|
4779
4963
|
var useFetchServices = function useFetchServices(dialogType, preloadedServices, shouldDisableFetch) {
|
|
4780
4964
|
if (preloadedServices === void 0) {
|
|
4781
4965
|
preloadedServices = preloadedDefaultMapServices;
|
|
@@ -4798,7 +4982,7 @@ var useFetchServices = function useFetchServices(dialogType, preloadedServices,
|
|
|
4798
4982
|
React.useEffect(function () {
|
|
4799
4983
|
if (!shouldDisableFetch && isOpenInStore && preloadedServices && preloadedServices.length > 0 && !services.length) {
|
|
4800
4984
|
var allServicesToLoad = mergePresetsAndUserAddedServices(preloadedServices, getUserAddedServices());
|
|
4801
|
-
|
|
4985
|
+
void getServicesToLoad(allServicesToLoad).then(fetchInitialServices);
|
|
4802
4986
|
}
|
|
4803
4987
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4804
4988
|
}, [isOpenInStore, services]);
|
|
@@ -5472,6 +5656,10 @@ var MapViewConnect = function MapViewConnect(_ref) {
|
|
|
5472
5656
|
var featureLayers = useSelector(function (store) {
|
|
5473
5657
|
return mapSelectors.getMapFeatureLayers(store, mapId);
|
|
5474
5658
|
});
|
|
5659
|
+
var linkedFeatures = useSelector(function (store) {
|
|
5660
|
+
var _store$syncronization;
|
|
5661
|
+
return genericSelectors.selectLinkedFeatures((_store$syncronization = store.syncronizationGroupStore) == null ? void 0 : _store$syncronization.linkedState, mapId);
|
|
5662
|
+
});
|
|
5475
5663
|
var bbox = useSelector(function (store) {
|
|
5476
5664
|
return mapSelectors.getBbox(store, mapId);
|
|
5477
5665
|
});
|
|
@@ -5487,6 +5675,12 @@ var MapViewConnect = function MapViewConnect(_ref) {
|
|
|
5487
5675
|
var mapPinLocation = useSelector(function (store) {
|
|
5488
5676
|
return mapSelectors.getPinLocation(store, mapId);
|
|
5489
5677
|
});
|
|
5678
|
+
var linkedPanelId = useSelector(function (store) {
|
|
5679
|
+
return genericSelectors.selectLinkedPanelId(store, mapId);
|
|
5680
|
+
});
|
|
5681
|
+
var selectedFeatureCoordinates = useSelector(function (store) {
|
|
5682
|
+
return genericSelectors.getSelectedFeature(store.syncronizationGroupStore, linkedPanelId);
|
|
5683
|
+
});
|
|
5490
5684
|
var disableMapPin = useSelector(function (store) {
|
|
5491
5685
|
return mapSelectors.getDisableMapPin(store, mapId);
|
|
5492
5686
|
});
|
|
@@ -5546,6 +5740,12 @@ var MapViewConnect = function MapViewConnect(_ref) {
|
|
|
5546
5740
|
var setSelectedFeature = React.useCallback(function (payload) {
|
|
5547
5741
|
dispatch(layerActions.setSelectedFeature(payload));
|
|
5548
5742
|
}, [dispatch]);
|
|
5743
|
+
var handleFeatureSelect = function handleFeatureSelect(mapId, featureId) {
|
|
5744
|
+
dispatch(genericActions.setFeatureSelected({
|
|
5745
|
+
mapId: mapId,
|
|
5746
|
+
featureId: featureId
|
|
5747
|
+
}));
|
|
5748
|
+
};
|
|
5549
5749
|
var updateFeature = React.useCallback(function (_ref2) {
|
|
5550
5750
|
var geojson = _ref2.geojson,
|
|
5551
5751
|
reason = _ref2.reason,
|
|
@@ -5622,6 +5822,7 @@ var MapViewConnect = function MapViewConnect(_ref) {
|
|
|
5622
5822
|
isGetCapabilitiesLoading: false
|
|
5623
5823
|
}));
|
|
5624
5824
|
}, [dispatch, mapId]);
|
|
5825
|
+
var isTimeScrollingEnabled = useSelector(syncGroupsSelectors.isTimeScrollingEnabled);
|
|
5625
5826
|
return jsx("div", {
|
|
5626
5827
|
style: {
|
|
5627
5828
|
height: '100%'
|
|
@@ -5629,9 +5830,10 @@ var MapViewConnect = function MapViewConnect(_ref) {
|
|
|
5629
5830
|
ref: mapRef,
|
|
5630
5831
|
children: jsxs(MapView, Object.assign({}, props, {
|
|
5631
5832
|
mapId: mapId,
|
|
5833
|
+
isTimeScrollingEnabled: isTimeScrollingEnabled,
|
|
5632
5834
|
srs: srs,
|
|
5633
5835
|
bbox: bbox,
|
|
5634
|
-
mapPinLocation: displayMapPin ? mapPinLocation : undefined,
|
|
5836
|
+
mapPinLocation: displayMapPin ? selectedFeatureCoordinates || mapPinLocation : undefined,
|
|
5635
5837
|
dimensions: mapDimensions,
|
|
5636
5838
|
activeLayerId: activeLayerId,
|
|
5637
5839
|
animationDelay: animationDelay,
|
|
@@ -5695,6 +5897,29 @@ var MapViewConnect = function MapViewConnect(_ref) {
|
|
|
5695
5897
|
});
|
|
5696
5898
|
}
|
|
5697
5899
|
}, layer), layer.id);
|
|
5900
|
+
}), linkedFeatures == null ? void 0 : linkedFeatures.map(function (feature) {
|
|
5901
|
+
return jsx(MapViewLayer, {
|
|
5902
|
+
id: "feature-" + (feature == null ? void 0 : feature.id),
|
|
5903
|
+
geojson: feature.geoJSON,
|
|
5904
|
+
onClickFeature: function onClickFeature(event) {
|
|
5905
|
+
var _event$feature;
|
|
5906
|
+
var isClickOutsideFeature = !event;
|
|
5907
|
+
if (isClickOutsideFeature && !event.isInEditMode) {
|
|
5908
|
+
return;
|
|
5909
|
+
}
|
|
5910
|
+
var clickedFeatureName = (_event$feature = event.feature) == null || (_event$feature = _event$feature.properties) == null ? void 0 : _event$feature.name;
|
|
5911
|
+
var features = linkedFeatures[0].geoJSON.features;
|
|
5912
|
+
var clickedFeatureIndex = features.findIndex(function (feature) {
|
|
5913
|
+
var _feature$properties;
|
|
5914
|
+
return ((_feature$properties = feature.properties) == null ? void 0 : _feature$properties.name) === clickedFeatureName;
|
|
5915
|
+
});
|
|
5916
|
+
if (disableMapPin === false) {
|
|
5917
|
+
var _selectedFeature$id;
|
|
5918
|
+
var selectedFeature = features[clickedFeatureIndex];
|
|
5919
|
+
handleFeatureSelect(linkedPanelId, (_selectedFeature$id = selectedFeature.id) == null ? void 0 : _selectedFeature$id.toString());
|
|
5920
|
+
}
|
|
5921
|
+
}
|
|
5922
|
+
}, feature == null ? void 0 : feature.id);
|
|
5698
5923
|
}), featureLayers.map(function (layer) {
|
|
5699
5924
|
return jsx(MapViewLayer, Object.assign({
|
|
5700
5925
|
id: "featurelayer-" + layer.id,
|
|
@@ -6027,6 +6252,7 @@ var GetFeatureInfoDialog = function GetFeatureInfoDialog(_ref) {
|
|
|
6027
6252
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6028
6253
|
}, [debouncedlayerListString]);
|
|
6029
6254
|
var hasLayers = layers && layers.length > 0;
|
|
6255
|
+
var stopWheelEventPropagationRef = useWheelStopPropagation();
|
|
6030
6256
|
return jsx(ToolContainerDraggable, {
|
|
6031
6257
|
startPosition: {
|
|
6032
6258
|
right: 10,
|
|
@@ -6048,6 +6274,7 @@ var GetFeatureInfoDialog = function GetFeatureInfoDialog(_ref) {
|
|
|
6048
6274
|
},
|
|
6049
6275
|
children: [isOpen && hasLayers && isInitialMapLocationChanged && jsx(Box, {
|
|
6050
6276
|
"data-testid": "GetFeatureInfoList",
|
|
6277
|
+
ref: stopWheelEventPropagationRef,
|
|
6051
6278
|
children: layerToUpdateList.map(function (layer) {
|
|
6052
6279
|
var layerId = layer.layerId,
|
|
6053
6280
|
title = layer.title,
|
|
@@ -6945,7 +7172,9 @@ var TimeSliderLegendConnect = function TimeSliderLegendConnect(_ref) {
|
|
|
6945
7172
|
var mapId = _ref.mapId,
|
|
6946
7173
|
onSetTimeSliderSpan = _ref.onSetTimeSliderSpan,
|
|
6947
7174
|
unfilteredSelectedTime = _ref.unfilteredSelectedTime,
|
|
6948
|
-
setUnfilteredSelectedTime = _ref.setUnfilteredSelectedTime
|
|
7175
|
+
setUnfilteredSelectedTime = _ref.setUnfilteredSelectedTime,
|
|
7176
|
+
mapWindowRef = _ref.mapWindowRef;
|
|
7177
|
+
var isTimeScrollingEnabled = useSelector(syncGroupsSelectors.isTimeScrollingEnabled);
|
|
6949
7178
|
var centerTime = useSelector(function (store) {
|
|
6950
7179
|
return mapSelectors.getMapTimeSliderCenterTime(store, mapId);
|
|
6951
7180
|
});
|
|
@@ -7009,6 +7238,8 @@ var TimeSliderLegendConnect = function TimeSliderLegendConnect(_ref) {
|
|
|
7009
7238
|
};
|
|
7010
7239
|
return jsx(TimeSliderLegend, {
|
|
7011
7240
|
mapId: mapId,
|
|
7241
|
+
isTimeScrollingEnabled: isTimeScrollingEnabled,
|
|
7242
|
+
mapWindowRef: mapWindowRef,
|
|
7012
7243
|
centerTime: centerTime,
|
|
7013
7244
|
timeSliderWidth: timeSliderWidth,
|
|
7014
7245
|
secondsPerPx: secondsPerPx,
|
|
@@ -7161,7 +7392,8 @@ var TimeSliderConnect = function TimeSliderConnect(_ref) {
|
|
|
7161
7392
|
var sourceId = _ref.sourceId,
|
|
7162
7393
|
mapId = _ref.mapId,
|
|
7163
7394
|
_ref$isAlwaysVisible = _ref.isAlwaysVisible,
|
|
7164
|
-
isAlwaysVisible = _ref$isAlwaysVisible === void 0 ? false : _ref$isAlwaysVisible
|
|
7395
|
+
isAlwaysVisible = _ref$isAlwaysVisible === void 0 ? false : _ref$isAlwaysVisible,
|
|
7396
|
+
mapWindowRef = _ref.mapWindowRef;
|
|
7165
7397
|
var isTimeSliderHoverOn = useSelector(function (store) {
|
|
7166
7398
|
return mapSelectors.isTimeSliderHoverOn(store, mapId);
|
|
7167
7399
|
});
|
|
@@ -7324,7 +7556,8 @@ var TimeSliderConnect = function TimeSliderConnect(_ref) {
|
|
|
7324
7556
|
mapId: mapId,
|
|
7325
7557
|
onSetTimeSliderSpan: onSetTimeSliderSpan,
|
|
7326
7558
|
unfilteredSelectedTime: unfilteredSelectedTime,
|
|
7327
|
-
setUnfilteredSelectedTime: setUnfilteredSelectedTime
|
|
7559
|
+
setUnfilteredSelectedTime: setUnfilteredSelectedTime,
|
|
7560
|
+
mapWindowRef: mapWindowRef
|
|
7328
7561
|
}),
|
|
7329
7562
|
mapIsActive: mapIsActive,
|
|
7330
7563
|
onToggleTimeSlider: onToggleTimeSliderVisibility,
|
|
@@ -7396,7 +7629,7 @@ var TimeSliderClockConnect = function TimeSliderClockConnect(_ref) {
|
|
|
7396
7629
|
});
|
|
7397
7630
|
};
|
|
7398
7631
|
|
|
7399
|
-
var _excluded = ["id", "dockedLayerManagerSize", "title", "layers", "dimensions", "shouldAutoUpdate", "shouldAnimate", "shouldAutoFetch", "bbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager", "shouldShowDockedLayerManager", "showClock", "displayGetFeatureInfoButtonInMap", "shouldDisplayDrawControls", "displaySearchButtonInMap", "mapControls", "children", "shouldDisablePrefetching"];
|
|
7632
|
+
var _excluded = ["id", "dockedLayerManagerSize", "title", "layers", "dimensions", "shouldAutoUpdate", "shouldAnimate", "shouldAutoFetch", "bbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager", "shouldShowDockedLayerManager", "showClock", "displayGetFeatureInfoButtonInMap", "shouldDisplayDrawControls", "displaySearchButtonInMap", "mapControls", "children", "shouldDisablePrefetching", "tileServerSettings"];
|
|
7400
7633
|
var titleStyle = function titleStyle(theme) {
|
|
7401
7634
|
return {
|
|
7402
7635
|
position: 'absolute',
|
|
@@ -7463,12 +7696,14 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
7463
7696
|
mapControls = _ref.mapControls,
|
|
7464
7697
|
children = _ref.children,
|
|
7465
7698
|
shouldDisablePrefetching = _ref.shouldDisablePrefetching,
|
|
7699
|
+
tileServerSettings = _ref.tileServerSettings,
|
|
7466
7700
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
7467
7701
|
var dispatch = useDispatch();
|
|
7468
7702
|
var mapId = React__default.useRef(id || webmapUtils.generateMapId()).current;
|
|
7469
7703
|
var customLayers = useSelector(function (store) {
|
|
7470
7704
|
return mapSelectors.getdefaultMapSettingsLayers(store);
|
|
7471
7705
|
});
|
|
7706
|
+
var mapWindowRef = React__default.useRef(null);
|
|
7472
7707
|
React__default.useEffect(function () {
|
|
7473
7708
|
var addBaselayer = !(layers != null && layers.find(function (layer) {
|
|
7474
7709
|
return layer.layerType === LayerType.baseLayer;
|
|
@@ -7541,6 +7776,7 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
7541
7776
|
return React__default.useMemo(function () {
|
|
7542
7777
|
renderCounter.count(ConfigurableMapConnect.name + "_" + mapId);
|
|
7543
7778
|
return jsxs(Box, {
|
|
7779
|
+
ref: mapWindowRef,
|
|
7544
7780
|
sx: {
|
|
7545
7781
|
width: '100%',
|
|
7546
7782
|
height: '100%',
|
|
@@ -7581,7 +7817,8 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
7581
7817
|
},
|
|
7582
7818
|
children: jsx(TimeSliderConnect, {
|
|
7583
7819
|
mapId: id,
|
|
7584
|
-
sourceId: id
|
|
7820
|
+
sourceId: id,
|
|
7821
|
+
mapWindowRef: mapWindowRef
|
|
7585
7822
|
})
|
|
7586
7823
|
}), jsx(MapViewConnect, {
|
|
7587
7824
|
controls: {},
|
|
@@ -7590,6 +7827,7 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
7590
7827
|
shouldAutoFetch: shouldAutoFetch,
|
|
7591
7828
|
mapId: mapId,
|
|
7592
7829
|
shouldDisablePrefetching: shouldDisablePrefetching,
|
|
7830
|
+
tileServerSettings: tileServerSettings,
|
|
7593
7831
|
children: children
|
|
7594
7832
|
}), multiLegend && jsx(LegendConnect, {
|
|
7595
7833
|
showMapId: true,
|
|
@@ -7608,7 +7846,7 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
7608
7846
|
isDocked: true
|
|
7609
7847
|
})]
|
|
7610
7848
|
});
|
|
7611
|
-
}, [
|
|
7849
|
+
}, [mapId, title, mapControlsPositionTop, displaySearchButtonInMap, id, displayLayerManagerAndLegendButtonInMap, multiLegend, displayDimensionSelectButtonInMap, displayGetFeatureInfoButtonInMap, tileServerSettings, mapControls, disableTimeSlider, displayTimeInMap, shouldAutoFetch, shouldDisablePrefetching, children, showClock]);
|
|
7612
7850
|
};
|
|
7613
7851
|
|
|
7614
7852
|
var mapBoxStyle = function mapBoxStyle(theme) {
|
|
@@ -7632,6 +7870,7 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
|
|
|
7632
7870
|
multiLegend = _ref$multiLegend === void 0 ? false : _ref$multiLegend,
|
|
7633
7871
|
_ref$showClock = _ref.showClock,
|
|
7634
7872
|
showClock = _ref$showClock === void 0 ? true : _ref$showClock;
|
|
7873
|
+
var multiMapWindowRef = React__default.useRef(null);
|
|
7635
7874
|
var dispatch = useDispatch();
|
|
7636
7875
|
var syncGroupAddTarget = React__default.useCallback(function (payload) {
|
|
7637
7876
|
dispatch(genericActions.syncGroupAddTarget(payload));
|
|
@@ -7671,6 +7910,7 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
|
|
|
7671
7910
|
position: 'relative'
|
|
7672
7911
|
},
|
|
7673
7912
|
"data-testid": "MultiMapViewSliderConnect",
|
|
7913
|
+
ref: multiMapWindowRef,
|
|
7674
7914
|
children: [jsx("div", {
|
|
7675
7915
|
style: {
|
|
7676
7916
|
position: 'absolute',
|
|
@@ -7682,7 +7922,8 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
|
|
|
7682
7922
|
children: showTimeSlider && jsx(TimeSliderConnect, {
|
|
7683
7923
|
sourceId: firstMapId,
|
|
7684
7924
|
mapId: firstMapId,
|
|
7685
|
-
isAlwaysVisible: true
|
|
7925
|
+
isAlwaysVisible: true,
|
|
7926
|
+
mapWindowRef: multiMapWindowRef
|
|
7686
7927
|
})
|
|
7687
7928
|
}), !multiLegend && jsx(LegendConnect, {
|
|
7688
7929
|
showMapId: true,
|
|
@@ -7725,7 +7966,7 @@ var useGetLatestReferenceTime = function useGetLatestReferenceTime(inputLayer) {
|
|
|
7725
7966
|
setLatestReferenceTime = _React$useState[1];
|
|
7726
7967
|
React.useEffect(function () {
|
|
7727
7968
|
var wmLayer = new WMLayer(Object.assign({}, inputLayer));
|
|
7728
|
-
wmLayer.
|
|
7969
|
+
wmLayer.parseLayer().then(function (layer) {
|
|
7729
7970
|
var refTimeDim = layer.getDimension('reference_time');
|
|
7730
7971
|
var lastRefTime = refTimeDim.getLastValue();
|
|
7731
7972
|
setLatestReferenceTime(lastRefTime);
|
|
@@ -7832,7 +8073,7 @@ var useGetReferenceTimes = function useGetReferenceTimes(inputLayer) {
|
|
|
7832
8073
|
React.useEffect(function () {
|
|
7833
8074
|
var referenceTimes = [];
|
|
7834
8075
|
var wmLayer = new WMLayer(Object.assign({}, inputLayer));
|
|
7835
|
-
wmLayer.
|
|
8076
|
+
wmLayer.parseLayer().then(function (layer) {
|
|
7836
8077
|
var refTimeDim = layer.getDimension('reference_time');
|
|
7837
8078
|
/* Loop through all values of the dimension.
|
|
7838
8079
|
A map cannot be used for iterating, as the dimension values are not in an array (it is an API). */
|
|
@@ -8108,15 +8349,25 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
|
|
|
8108
8349
|
syncGroupRemoveGroup = _ref.syncGroupRemoveGroup,
|
|
8109
8350
|
onMouseDown = _ref.onMouseDown,
|
|
8110
8351
|
_ref$order = _ref.order,
|
|
8111
|
-
order = _ref$order === void 0 ? 0 : _ref$order
|
|
8352
|
+
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
8353
|
+
isTimeScrollingEnabled = _ref.isTimeScrollingEnabled,
|
|
8354
|
+
toggleTimeScroll = _ref.toggleTimeScroll;
|
|
8112
8355
|
var _useCoreTranslation = useCoreTranslation(),
|
|
8113
8356
|
t = _useCoreTranslation.t;
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8357
|
+
React.useEffect(function () {
|
|
8358
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
8359
|
+
var target = event.target;
|
|
8360
|
+
if (target.tagName !== 'INPUT' && target.tagName !== 'TEXTAREA' && event.key === 's') {
|
|
8361
|
+
toggleTimeScroll({
|
|
8362
|
+
isTimeScrollingEnabled: !isTimeScrollingEnabled
|
|
8363
|
+
});
|
|
8364
|
+
}
|
|
8365
|
+
};
|
|
8366
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
8367
|
+
return function () {
|
|
8368
|
+
window.removeEventListener('keydown', handleKeyDown);
|
|
8369
|
+
};
|
|
8370
|
+
}, [isTimeScrollingEnabled, toggleTimeScroll]);
|
|
8120
8371
|
var _handleToggle = function handleToggle(groupCategory, groupId, sourceId) {
|
|
8121
8372
|
var _syncGroupViewState$g = syncGroupViewState[groupCategory].groups.find(function (groupObject) {
|
|
8122
8373
|
return groupObject.id === groupId;
|
|
@@ -8131,7 +8382,6 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
|
|
|
8131
8382
|
});
|
|
8132
8383
|
} else {
|
|
8133
8384
|
var groups = syncGroupViewState[groupCategory].groups;
|
|
8134
|
-
// Check all other groups and if checkmark is found -> uncheck it
|
|
8135
8385
|
for (var _iterator = _createForOfIteratorHelperLoose(groups), _step; !(_step = _iterator()).done;) {
|
|
8136
8386
|
var group = _step.value;
|
|
8137
8387
|
if (group.id !== groupId && group.selected.includes(sourceId)) {
|
|
@@ -8142,7 +8392,6 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
|
|
|
8142
8392
|
});
|
|
8143
8393
|
}
|
|
8144
8394
|
}
|
|
8145
|
-
// Add new checkmark
|
|
8146
8395
|
syncGroupAddTarget({
|
|
8147
8396
|
groupId: String(groupId),
|
|
8148
8397
|
targetId: String(sourceId),
|
|
@@ -8150,11 +8399,6 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
|
|
|
8150
8399
|
});
|
|
8151
8400
|
}
|
|
8152
8401
|
};
|
|
8153
|
-
/*
|
|
8154
|
-
_____ Add new group _____
|
|
8155
|
-
- Called when user clicks on + in the sidepane
|
|
8156
|
-
- Sends an action to add a new group in Redux
|
|
8157
|
-
*/
|
|
8158
8402
|
var _addNewGroup = function addNewGroup(groupCategory, groupId) {
|
|
8159
8403
|
syncGroupsSelector.groupTypes.forEach(function (_ref2) {
|
|
8160
8404
|
var title = _ref2.title,
|
|
@@ -8170,11 +8414,6 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
|
|
|
8170
8414
|
}
|
|
8171
8415
|
});
|
|
8172
8416
|
};
|
|
8173
|
-
/*
|
|
8174
|
-
_____ Remove Group _____
|
|
8175
|
-
- Called when user clicks on the trashcan icon in sidepane
|
|
8176
|
-
- Send an action to remove the group in Redux
|
|
8177
|
-
*/
|
|
8178
8417
|
var _removeGroup = function removeGroup(groupCategory, groupId) {
|
|
8179
8418
|
syncGroupsSelector.groupTypes.forEach(function (_ref3) {
|
|
8180
8419
|
var groupType = _ref3.groupType;
|
|
@@ -8188,7 +8427,7 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
|
|
|
8188
8427
|
if (!syncGroupViewState) {
|
|
8189
8428
|
return null;
|
|
8190
8429
|
}
|
|
8191
|
-
return
|
|
8430
|
+
return jsxs(ToolContainerDraggable, {
|
|
8192
8431
|
title: t('syncgroups-title'),
|
|
8193
8432
|
startSize: {
|
|
8194
8433
|
width: 349,
|
|
@@ -8199,7 +8438,43 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
|
|
|
8199
8438
|
"data-testid": "syncGroupViewer",
|
|
8200
8439
|
onMouseDown: onMouseDown,
|
|
8201
8440
|
order: order,
|
|
8202
|
-
children: jsxs(
|
|
8441
|
+
children: [jsxs(Box, {
|
|
8442
|
+
sx: {
|
|
8443
|
+
display: 'flex',
|
|
8444
|
+
justifyContent: 'center',
|
|
8445
|
+
alignItems: 'center'
|
|
8446
|
+
},
|
|
8447
|
+
children: [jsx(Typography, {
|
|
8448
|
+
sx: {
|
|
8449
|
+
fontSize: 12
|
|
8450
|
+
},
|
|
8451
|
+
children: t('workspace-time-scroll-off')
|
|
8452
|
+
}), jsx(Switch, {
|
|
8453
|
+
inputProps: {
|
|
8454
|
+
'aria-label': 'workspace time scroll toggle'
|
|
8455
|
+
},
|
|
8456
|
+
checked: isTimeScrollingEnabled,
|
|
8457
|
+
onChange: function onChange() {
|
|
8458
|
+
return toggleTimeScroll({
|
|
8459
|
+
isTimeScrollingEnabled: !isTimeScrollingEnabled,
|
|
8460
|
+
origin: 'user'
|
|
8461
|
+
});
|
|
8462
|
+
}
|
|
8463
|
+
}), jsx(Typography, {
|
|
8464
|
+
sx: {
|
|
8465
|
+
fontSize: 12
|
|
8466
|
+
},
|
|
8467
|
+
children: t('workspace-time-scroll-on')
|
|
8468
|
+
}), jsx(Tooltip, {
|
|
8469
|
+
title: t('workspace-time-scroll-info'),
|
|
8470
|
+
placement: "bottom-start",
|
|
8471
|
+
children: jsx(CustomIconButton, {
|
|
8472
|
+
variant: "flat",
|
|
8473
|
+
"aria-label": "time scroll info",
|
|
8474
|
+
children: jsx(Info, {})
|
|
8475
|
+
})
|
|
8476
|
+
})]
|
|
8477
|
+
}), jsxs("div", {
|
|
8203
8478
|
children: [jsx(SyncGroupList, {
|
|
8204
8479
|
viewStateData: syncGroupViewState.zoompane,
|
|
8205
8480
|
title: t('syncgroups-zoom'),
|
|
@@ -8237,16 +8512,16 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
|
|
|
8237
8512
|
return _removeGroup('level', groupId);
|
|
8238
8513
|
}
|
|
8239
8514
|
})]
|
|
8240
|
-
})
|
|
8515
|
+
})]
|
|
8241
8516
|
});
|
|
8242
8517
|
};
|
|
8243
8518
|
|
|
8244
8519
|
var SyncGroupViewerConnect = function SyncGroupViewerConnect() {
|
|
8245
8520
|
var dispatch = useDispatch();
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
// For example dusting anination syncgroups should not re-render
|
|
8521
|
+
var _useCoreTranslation = useCoreTranslation(),
|
|
8522
|
+
t = _useCoreTranslation.t;
|
|
8249
8523
|
var viewState = useSelector(syncGroupsSelectors.syncGroupGetViewState);
|
|
8524
|
+
var isTimeScrollingEnabled = useSelector(syncGroupsSelectors.isTimeScrollingEnabled);
|
|
8250
8525
|
var syncGroupAddGroup = React.useCallback(function (payload) {
|
|
8251
8526
|
dispatch(genericActions.syncGroupAddGroup(payload));
|
|
8252
8527
|
}, [dispatch]);
|
|
@@ -8264,6 +8539,14 @@ var SyncGroupViewerConnect = function SyncGroupViewerConnect() {
|
|
|
8264
8539
|
isDialogOpen = _useSetupDialog.isDialogOpen,
|
|
8265
8540
|
onCloseDialog = _useSetupDialog.onCloseDialog,
|
|
8266
8541
|
setDialogOrder = _useSetupDialog.setDialogOrder;
|
|
8542
|
+
var toggleTimeScroll = React.useCallback(function (payload) {
|
|
8543
|
+
var message = {
|
|
8544
|
+
type: snackbarTypes.SnackbarMessageType.TRANSLATABLE_MESSAGE,
|
|
8545
|
+
key: payload.isTimeScrollingEnabled === true ? t('workspace-time-scroll-toggle-on') : t('workspace-time-scroll-toggle-off')
|
|
8546
|
+
};
|
|
8547
|
+
dispatch(snackbarActions.openSnackbar(message));
|
|
8548
|
+
dispatch(syncGroupsActions.syncGroupToggleIsTimeScrollingEnabled(payload));
|
|
8549
|
+
}, [dispatch, t]);
|
|
8267
8550
|
return jsx(SyncGroupViewer, {
|
|
8268
8551
|
onClose: onCloseDialog,
|
|
8269
8552
|
isOpen: isDialogOpen,
|
|
@@ -8273,7 +8556,9 @@ var SyncGroupViewerConnect = function SyncGroupViewerConnect() {
|
|
|
8273
8556
|
syncGroupAddGroup: syncGroupAddGroup,
|
|
8274
8557
|
syncGroupRemoveGroup: syncGroupRemoveGroup,
|
|
8275
8558
|
order: dialogOrder,
|
|
8276
|
-
onMouseDown: setDialogOrder
|
|
8559
|
+
onMouseDown: setDialogOrder,
|
|
8560
|
+
isTimeScrollingEnabled: isTimeScrollingEnabled,
|
|
8561
|
+
toggleTimeScroll: toggleTimeScroll
|
|
8277
8562
|
});
|
|
8278
8563
|
};
|
|
8279
8564
|
|