@opengeoweb/core 2.1.2 → 2.2.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/{core.esm.js → index.esm.js} +2293 -869
- package/{core.umd.js → index.umd.js} +2498 -948
- package/lib/components/ConfigurableConnectedMap/ConfigurableConnectedMap.d.ts +1 -0
- package/lib/components/ConfigurableMapWithSlider/ConfigurableMapWithSliderConnect.d.ts +1 -0
- package/lib/components/CustomSwitch/CustomSwitch.d.ts +1 -1
- package/lib/components/CustomSwitch/CustomSwitch.stories.d.ts +4 -0
- package/lib/components/LayerManager/LayerContainerRow/LayerManagerButton.d.ts +1 -1
- package/lib/components/LayerManager/LayerManagerUtils.d.ts +2 -2
- package/lib/components/LayerManager/LayerSelect/KeywordFilterButton/KeywordFilterButtonConnect.d.ts +8 -0
- package/lib/components/LayerManager/LayerSelect/KeywordFilterButton/{KeywordFilterButton.spec.d.ts → KeywordFilterButtonConnect.spec.d.ts} +0 -0
- package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResults.d.ts +12 -6
- package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResults.stories.d.ts +13 -0
- package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsConnect.d.ts +5 -1
- package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsListItem.d.ts +1 -1
- package/lib/components/{Mapcontrols/MapControlButton.spec.d.ts → LayerManager/LayerSelect/KeywordFilterResults/keywordFilterResultsConnect.spec.d.ts} +0 -0
- package/lib/components/LayerManager/LayerSelect/LayerList/LayerList.d.ts +12 -0
- package/lib/components/{Mapcontrols/MapControls.spec.d.ts → LayerManager/LayerSelect/LayerList/LayerList.spec.d.ts} +0 -0
- package/lib/components/LayerManager/LayerSelect/LayerList/LayerListConnect.d.ts +6 -0
- package/lib/components/{Mapcontrols/ZoomControls.spec.d.ts → LayerManager/LayerSelect/LayerList/LayerListConnect.spec.d.ts} +0 -0
- package/lib/components/LayerManager/LayerSelect/LayerList/LayerListUtils.d.ts +3 -0
- package/lib/components/{Mapcontrols/ZoomControlsConnect.spec.d.ts → LayerManager/LayerSelect/LayerList/LayerListUtils.spec.d.ts} +0 -0
- package/lib/components/LayerManager/LayerSelect/SearchField/SearchField.d.ts +5 -1
- package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldButtonContainer.d.ts +8 -0
- package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldButtonContainer.spec.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldConnect.d.ts +3 -0
- package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldConnect.spec.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChip.d.ts +2 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.d.ts +9 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.spec.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceList.d.ts +2 -0
- package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +6 -0
- package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.spec.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +13 -0
- package/lib/components/LayerManager/LayerSelect/ServicePopup/ServicePopup.d.ts +3 -0
- package/lib/components/LayerManager/tooltipContainerStyles.d.ts +1 -1
- package/lib/components/Legend/LegendConnect.d.ts +3 -0
- package/lib/components/Legend/LegendDialog.d.ts +2 -0
- package/lib/components/Legend/LegendMapButtonConnect.d.ts +2 -0
- package/lib/components/{Mapcontrols → MapControls}/MapControlButton.d.ts +1 -1
- package/lib/components/MapControls/MapControlButton.spec.d.ts +1 -0
- package/lib/components/{Mapcontrols → MapControls}/MapControls.d.ts +0 -0
- package/lib/components/MapControls/MapControls.spec.d.ts +1 -0
- package/lib/components/{Mapcontrols → MapControls}/ZoomControls.d.ts +0 -0
- package/lib/components/MapControls/ZoomControls.spec.d.ts +1 -0
- package/lib/components/{Mapcontrols → MapControls}/ZoomControlsConnect.d.ts +0 -0
- package/lib/components/MapControls/ZoomControlsConnect.spec.d.ts +1 -0
- package/lib/components/{Mapcontrols → MapControls}/index.d.ts +0 -0
- package/lib/components/MapView/MapViewConnect.LayerChangeEnabledOpacity.stories.d.ts +7 -0
- package/lib/components/MapView/MapViewConnect.SelectorTest.stories.d.ts +2 -0
- package/lib/components/MapView/MapViewConnect.d.ts +2 -0
- package/lib/components/MapView/MapViewConnect.stories.d.ts +1 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectButtonConnect.d.ts +2 -0
- package/lib/components/MultiMapDimensionSelect/DimensionSelectDialogConnect.d.ts +2 -0
- package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectConfig.d.ts +1 -1
- package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectMapButtonsConnect.d.ts +2 -0
- package/lib/components/MultiMapView/MultiMapView.stories.d.ts +2 -0
- package/lib/components/MultiMapView/MultiMapView10x10.stories.d.ts +2 -0
- package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +1 -1
- package/lib/components/Providers/Providers.d.ts +1 -1
- package/lib/components/ReactMapView/ReactMapView.d.ts +3 -8
- package/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +2 -2
- package/lib/components/ReactMapView/types.d.ts +2 -8
- package/lib/components/SyncGroups/selector.d.ts +13 -2
- package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegendRenderFunctions.d.ts +1 -1
- package/lib/components/TimeSlider/TimeSliderRail/TimeSliderRailRenderFunctions.d.ts +1 -1
- package/lib/components/TimeSlider/TimeSliderUtils.d.ts +1 -1
- package/lib/components/ToggleIconButton/ToggleIconButton.d.ts +6 -3
- package/lib/components/TooltipSelect/TooltipSelect.d.ts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/store/advancedLayerStore/selectors.d.ts +13 -2
- package/lib/store/coreModuleConfig.d.ts +1 -1
- package/lib/store/generic/selectors.d.ts +21 -3
- package/lib/store/generic/synchronizationGroups/selectors.d.ts +13 -1
- package/lib/store/layerSelect/actions.d.ts +17 -1
- package/lib/store/layerSelect/config.d.ts +2 -2
- package/lib/store/layerSelect/constants.d.ts +4 -0
- package/lib/store/layerSelect/sagas.d.ts +5 -0
- package/lib/store/layerSelect/sagas.spec.d.ts +1 -0
- package/lib/store/layerSelect/selectors.d.ts +81 -2
- package/lib/store/layerSelect/types.d.ts +57 -6
- package/lib/store/mapStore/layers/actions.d.ts +2 -8
- package/lib/store/mapStore/layers/constants.d.ts +1 -1
- package/lib/store/mapStore/layers/selectors.d.ts +208 -25
- package/lib/store/mapStore/layers/types.d.ts +34 -21
- package/lib/store/mapStore/map/sagas.d.ts +2 -2
- package/lib/store/mapStore/map/selectors.d.ts +427 -33
- package/lib/store/mapStore/service/selectors.d.ts +106 -13
- package/lib/store/mapStore/service/types.d.ts +7 -2
- package/lib/store/mapStore/utils/helpers.d.ts +0 -1
- package/lib/store/ui/actions.d.ts +2 -2
- package/lib/store/ui/selectors.d.ts +65 -5
- package/lib/store/ui/types.d.ts +2 -1
- package/lib/storybookUtils/HelperComponents.d.ts +1 -1
- package/lib/storybookUtils/storyComponents/MapDrawGeoJSON.d.ts +5 -5
- package/lib/storybookUtils/storyComponents/MapDrawGeoJSONStyles.d.ts +2 -1
- package/lib/utils/defaultTestSettings.d.ts +27 -6
- package/lib/utils/getCapabilities.d.ts +2 -2
- package/lib/utils/testUtils.d.ts +2 -2
- package/package.json +14 -15
- package/lib/components/LayerManager/LayerSelect/KeywordFilterButton/KeywordFilterButton.d.ts +0 -3
- package/lib/components/LayerManager/LayerSelect/KeywordFilterButton/KeywordFilterButton.stories.d.ts +0 -7
- package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsConnect.stories.d.ts +0 -7
- package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/mockServices.d.ts +0 -42
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { createSelector } from 'reselect';
|
|
2
|
+
import _, { isEqual, debounce } from 'lodash';
|
|
2
3
|
import moment from 'moment';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import React__default, { useState, Component, useRef, useEffect } from 'react';
|
|
5
6
|
import produce, { produce as produce$1 } from 'immer';
|
|
6
|
-
import { takeLatest, put, select, call } from 'redux-saga/effects';
|
|
7
|
+
import { takeLatest, put, select, call, takeEvery } from 'redux-saga/effects';
|
|
7
8
|
import { WMGetServiceFromStore, getMapImageStore, WMBBOX, debug, DebugType, WMJSMap, WMLayer, legendImageStore, WMImageEventType, getLegendGraphicURLForLayer } from '@opengeoweb/webmap';
|
|
8
|
-
import {
|
|
9
|
+
import { Tooltip, Select, Grid, InputLabel, IconButton, Paper, Box, Typography, CircularProgress, List, ListSubheader, ListItem, ListItemText, Dialog, DialogTitle, DialogContent, DialogContentText, TextField, DialogActions, Button, MenuItem, Checkbox, SvgIcon, ListItemIcon, Menu, FormControl, ToggleButton, InputAdornment, Switch, ListItemSecondaryAction, Slider, FormControlLabel, Popover, useMediaQuery, useTheme, SliderThumb } from '@mui/material';
|
|
10
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
9
11
|
import { connect, useDispatch, useSelector, Provider } from 'react-redux';
|
|
10
12
|
import { sliderStyles, CustomSlider, ToolContainerDraggable, useIsMounted } from '@opengeoweb/shared';
|
|
11
|
-
import
|
|
12
|
-
import { Cached, Add, MoreVert, FileCopy, Delete, DragIndicator, ChevronLeft, ChevronRight, Link, LinkOff, DeleteForever } from '@material-ui/icons';
|
|
13
|
+
import { Cached, Add, MoreVert, FileCopy, Delete, DragIndicator, Close, ChevronLeft, ChevronRight, Link, LinkOff, DeleteForever } from '@mui/icons-material';
|
|
13
14
|
import { Sortable, ReactSortable } from 'react-sortablejs';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
15
|
+
import createStyles from '@mui/styles/createStyles';
|
|
16
|
+
import withStyles from '@mui/styles/withStyles';
|
|
17
|
+
import { debounce as debounce$1 } from 'throttle-debounce';
|
|
16
18
|
import cloneDeep from 'lodash.clonedeep';
|
|
17
19
|
import proj4 from 'proj4';
|
|
18
20
|
import { createStore, DynamicModuleLoader } from 'redux-dynamic-modules';
|
|
@@ -387,7 +389,6 @@ var WEBMAP_LAYER_CHANGE_NAME = 'WEBMAP_LAYER_CHANGE_NAME';
|
|
|
387
389
|
var WEBMAP_LAYER_CHANGE_STYLE = 'WEBMAP_LAYER_CHANGE_STYLE';
|
|
388
390
|
var WEBMAP_LAYER_CHANGE_DIMENSION = 'WEBMAP_LAYER_CHANGE_DIMENSION';
|
|
389
391
|
var WEBMAP_LAYER_SET_DIMENSIONS = 'WEBMAP_LAYER_SET_DIMENSIONS';
|
|
390
|
-
var WEBMAP_LAYER_SET_STYLES = 'WEBMAP_LAYER_SET_STYLES';
|
|
391
392
|
var WEBMAP_LAYER_CHANGE_ENABLED = 'WEBMAP_LAYER_CHANGE_ENABLED';
|
|
392
393
|
var WEBMAP_LAYER_DELETE = 'WEBMAP_LAYER_DELETE';
|
|
393
394
|
var WEBMAP_LAYER_ERROR = 'WEBMAP_LAYER_ERROR';
|
|
@@ -398,6 +399,7 @@ var WEBMAP_SET_BASELAYERS = 'WEBMAP_SET_BASELAYERS';
|
|
|
398
399
|
var WEBMAP_ADD_BASELAYER = 'WEBMAP_ADD_BASELAYER';
|
|
399
400
|
var WEBMAP_ADD_AVAILABLE_BASELAYER = 'WEBMAP_ADD_AVAILABLE_BASELAYER';
|
|
400
401
|
var WEBMAP_ADD_AVAILABLE_BASELAYERS = 'WEBMAP_ADD_AVAILABLE_BASELAYERS';
|
|
402
|
+
var WEBMAP_UPDATE_LAYER_INFO = 'WEBMAP_UPDATE_LAYER_INFO';
|
|
401
403
|
|
|
402
404
|
/* *
|
|
403
405
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -536,19 +538,6 @@ var layerSetDimensions = function layerSetDimensions(payload) {
|
|
|
536
538
|
payload: payload
|
|
537
539
|
};
|
|
538
540
|
};
|
|
539
|
-
/**
|
|
540
|
-
* Action layerSetStyles is used automatically after calling the setLayers action. Contents is based on WMS GetCapabilities
|
|
541
|
-
*
|
|
542
|
-
* Example: layerSetStyles({service: someService, name: 'layerName', styles: styleArray})
|
|
543
|
-
* @param {object} payload consisting of service: string, name: string, styles: Style[]
|
|
544
|
-
*/
|
|
545
|
-
|
|
546
|
-
var layerSetStyles = function layerSetStyles(payload) {
|
|
547
|
-
return {
|
|
548
|
-
type: WEBMAP_LAYER_SET_STYLES,
|
|
549
|
-
payload: payload
|
|
550
|
-
};
|
|
551
|
-
};
|
|
552
541
|
/**
|
|
553
542
|
* Changes the name of the layer
|
|
554
543
|
*
|
|
@@ -644,6 +633,12 @@ var addAvailableBaseLayers = function addAvailableBaseLayers(payload) {
|
|
|
644
633
|
payload: payload
|
|
645
634
|
};
|
|
646
635
|
};
|
|
636
|
+
var onUpdateLayerInformation = function onUpdateLayerInformation(payload) {
|
|
637
|
+
return {
|
|
638
|
+
type: WEBMAP_UPDATE_LAYER_INFO,
|
|
639
|
+
payload: payload
|
|
640
|
+
};
|
|
641
|
+
};
|
|
647
642
|
|
|
648
643
|
/* *
|
|
649
644
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -742,7 +737,6 @@ var actions$3 = /*#__PURE__*/Object.freeze({
|
|
|
742
737
|
layerChangeEnabled: layerChangeEnabled,
|
|
743
738
|
layerChangeDimension: layerChangeDimension,
|
|
744
739
|
layerSetDimensions: layerSetDimensions,
|
|
745
|
-
layerSetStyles: layerSetStyles,
|
|
746
740
|
layerChangeName: layerChangeName,
|
|
747
741
|
layerChangeStyle: layerChangeStyle,
|
|
748
742
|
layerDelete: layerDelete,
|
|
@@ -750,6 +744,7 @@ var actions$3 = /*#__PURE__*/Object.freeze({
|
|
|
750
744
|
layerError: layerError,
|
|
751
745
|
addAvailableBaseLayer: addAvailableBaseLayer,
|
|
752
746
|
addAvailableBaseLayers: addAvailableBaseLayers,
|
|
747
|
+
onUpdateLayerInformation: onUpdateLayerInformation,
|
|
753
748
|
serviceSetLayers: serviceSetLayers
|
|
754
749
|
});
|
|
755
750
|
|
|
@@ -815,11 +810,6 @@ var generateTimesliderId = function generateTimesliderId() {
|
|
|
815
810
|
generatedTimesliderIds += 1;
|
|
816
811
|
return "timesliderid_".concat(generatedTimesliderIds);
|
|
817
812
|
};
|
|
818
|
-
var generatedScreenIds = 0;
|
|
819
|
-
var generateScreenId = function generateScreenId() {
|
|
820
|
-
generatedScreenIds += 1;
|
|
821
|
-
return "screen_".concat(generatedScreenIds);
|
|
822
|
-
};
|
|
823
813
|
/**
|
|
824
814
|
* Map for registering wmlayers with their id's
|
|
825
815
|
*/
|
|
@@ -1097,18 +1087,6 @@ var getOverLayers = createSelector(getAllLayers, function (layers) {
|
|
|
1097
1087
|
return layer.layerType === LayerType.overLayer;
|
|
1098
1088
|
});
|
|
1099
1089
|
});
|
|
1100
|
-
/**
|
|
1101
|
-
* Gets styles of the passed layer
|
|
1102
|
-
*
|
|
1103
|
-
* Example: layerStyles = getLayerStyles(store, 'layerId_1')
|
|
1104
|
-
* @param {object} store store: object - object from which the layers state will be extracted
|
|
1105
|
-
* @param {string} layerId layerId: string - Id of the layer
|
|
1106
|
-
* @returns {array} returnType: Style[] - array containing layer styles
|
|
1107
|
-
*/
|
|
1108
|
-
|
|
1109
|
-
var getLayerStyles = createSelector(getLayerById, function (layer) {
|
|
1110
|
-
return layer && layer.styles ? layer.styles : [];
|
|
1111
|
-
});
|
|
1112
1090
|
/**
|
|
1113
1091
|
* Gets dimensions of the passed layer
|
|
1114
1092
|
*
|
|
@@ -1680,12 +1658,30 @@ var getPreviousTimeStepvalue = function getPreviousTimeStepvalue(value, min) {
|
|
|
1680
1658
|
return newValue < min ? min : newValue;
|
|
1681
1659
|
};
|
|
1682
1660
|
var getValueFromKeyboardEvent = function getValueFromKeyboardEvent(event, value, min, max) {
|
|
1683
|
-
|
|
1661
|
+
var supportFourDirectionNavigation = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
1662
|
+
|
|
1663
|
+
if (!supportFourDirectionNavigation) {
|
|
1664
|
+
if (event.ctrlKey || event.metaKey) {
|
|
1665
|
+
switch (event.key) {
|
|
1666
|
+
case 'ArrowDown':
|
|
1667
|
+
return getPreviousTimeStepvalue(value, min);
|
|
1668
|
+
|
|
1669
|
+
case 'ArrowUp':
|
|
1670
|
+
return getNextTimeStepvalue(value, max);
|
|
1671
|
+
|
|
1672
|
+
default:
|
|
1673
|
+
return null;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
} else {
|
|
1677
|
+
// currently supportFourDirectionNavigation (left/right/up/down) is only used in horizontal slider TimeSliderScaleSlider
|
|
1684
1678
|
switch (event.key) {
|
|
1685
1679
|
case 'ArrowDown':
|
|
1680
|
+
case 'ArrowLeft':
|
|
1686
1681
|
return getPreviousTimeStepvalue(value, min);
|
|
1687
1682
|
|
|
1688
1683
|
case 'ArrowUp':
|
|
1684
|
+
case 'ArrowRight':
|
|
1689
1685
|
return getNextTimeStepvalue(value, max);
|
|
1690
1686
|
|
|
1691
1687
|
default:
|
|
@@ -2091,6 +2087,14 @@ var utils = /*#__PURE__*/Object.freeze({
|
|
|
2091
2087
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2092
2088
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
2093
2089
|
* */
|
|
2090
|
+
/* TODO:, move this to a right place https://gitlab.com/opengeoweb/opengeoweb/-/issues/1802 */
|
|
2091
|
+
|
|
2092
|
+
var selectorMemoizationOptions = {
|
|
2093
|
+
memoizeOptions: {
|
|
2094
|
+
maxSize: 1000,
|
|
2095
|
+
resultEqualityCheck: isEqual
|
|
2096
|
+
}
|
|
2097
|
+
};
|
|
2094
2098
|
/**
|
|
2095
2099
|
* Gets the map state by mapId
|
|
2096
2100
|
*
|
|
@@ -2190,7 +2194,7 @@ var getMapLayers = createSelector(getLayerIds, getLayersById, function (layerIds
|
|
|
2190
2194
|
return layerIds.map(function (layerId) {
|
|
2191
2195
|
return layers[layerId];
|
|
2192
2196
|
});
|
|
2193
|
-
});
|
|
2197
|
+
}, selectorMemoizationOptions);
|
|
2194
2198
|
/**
|
|
2195
2199
|
* Gets an array of baselayers ids for a map
|
|
2196
2200
|
*
|
|
@@ -2216,7 +2220,7 @@ var getMapBaseLayers = createSelector(getMapBaseLayersIds, getLayersById, functi
|
|
|
2216
2220
|
return layerIds.map(function (layerId) {
|
|
2217
2221
|
return layers[layerId];
|
|
2218
2222
|
});
|
|
2219
|
-
});
|
|
2223
|
+
}, selectorMemoizationOptions);
|
|
2220
2224
|
/**
|
|
2221
2225
|
* Gets and array of overLayers ids for a map
|
|
2222
2226
|
*
|
|
@@ -2242,7 +2246,7 @@ var getMapOverLayers = createSelector(getMapOverLayersIds, getLayersById, functi
|
|
|
2242
2246
|
return layerIds.map(function (layerId) {
|
|
2243
2247
|
return layers[layerId];
|
|
2244
2248
|
});
|
|
2245
|
-
});
|
|
2249
|
+
}, selectorMemoizationOptions);
|
|
2246
2250
|
/**
|
|
2247
2251
|
* Gets map dimensions
|
|
2248
2252
|
*
|
|
@@ -2588,9 +2592,26 @@ var getAllUniqueDimensions = createSelector(getAllMapIds, function (store) {
|
|
|
2588
2592
|
*/
|
|
2589
2593
|
|
|
2590
2594
|
var getPinLocation = createSelector(getMapById, function (store) {
|
|
2591
|
-
return store ? store.mapPinLocation :
|
|
2595
|
+
return store ? store.mapPinLocation : undefined;
|
|
2592
2596
|
});
|
|
2593
2597
|
|
|
2598
|
+
/* *
|
|
2599
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2600
|
+
* you may not use this file except in compliance with the License.
|
|
2601
|
+
* You may obtain a copy of the License at
|
|
2602
|
+
*
|
|
2603
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2604
|
+
*
|
|
2605
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2606
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2607
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2608
|
+
* See the License for the specific language governing permissions and
|
|
2609
|
+
* limitations under the License.
|
|
2610
|
+
*
|
|
2611
|
+
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
2612
|
+
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
2613
|
+
* */
|
|
2614
|
+
|
|
2594
2615
|
var servicesStore = function servicesStore(store) {
|
|
2595
2616
|
return store && store.services ? store.services : null;
|
|
2596
2617
|
};
|
|
@@ -2603,8 +2624,8 @@ var servicesStore = function servicesStore(store) {
|
|
|
2603
2624
|
*/
|
|
2604
2625
|
|
|
2605
2626
|
|
|
2606
|
-
var getServiceIds = createSelector(servicesStore, function (
|
|
2607
|
-
return
|
|
2627
|
+
var getServiceIds = createSelector(servicesStore, function (serviceState) {
|
|
2628
|
+
return serviceState ? serviceState.allIds : [];
|
|
2608
2629
|
});
|
|
2609
2630
|
/**
|
|
2610
2631
|
* Gets map services
|
|
@@ -2618,38 +2639,74 @@ var getServices = createSelector(servicesStore, function (store) {
|
|
|
2618
2639
|
return store ? store.byId : {};
|
|
2619
2640
|
});
|
|
2620
2641
|
/**
|
|
2621
|
-
* Gets
|
|
2642
|
+
* Gets the service object by its url
|
|
2622
2643
|
*
|
|
2623
|
-
* Example:
|
|
2644
|
+
* Example: service = getServiceByName(store, 'serviceName')
|
|
2624
2645
|
* @param {object} store store: object - Store object
|
|
2625
|
-
* @returns {
|
|
2646
|
+
* @returns {Service} returnType: Service
|
|
2626
2647
|
*/
|
|
2627
2648
|
|
|
2628
|
-
var
|
|
2629
|
-
|
|
2630
|
-
|
|
2649
|
+
var getServiceByName = createSelector([servicesStore, function (state, serviceName) {
|
|
2650
|
+
return serviceName;
|
|
2651
|
+
}], function (serviceState, serviceName) {
|
|
2652
|
+
if (serviceState && serviceState.byId && serviceState.byId[serviceName]) {
|
|
2653
|
+
return serviceState.byId[serviceName];
|
|
2631
2654
|
}
|
|
2632
2655
|
|
|
2633
2656
|
return null;
|
|
2634
|
-
};
|
|
2657
|
+
});
|
|
2635
2658
|
/**
|
|
2636
|
-
* Gets
|
|
2659
|
+
* Gets the layer from the store using the serviceUrl and layerName
|
|
2637
2660
|
*
|
|
2638
|
-
*
|
|
2639
|
-
* @param {object} store store: object -
|
|
2640
|
-
* @
|
|
2661
|
+
* Example: layers = getLayersFromService(store, 'https://geoservices.knmi.nl/...')
|
|
2662
|
+
* @param {object} store store: object - object from which the layers state will be extracted
|
|
2663
|
+
* @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
|
|
2664
|
+
* @returns {arrayr} returnType: ServiceLayer[] - All layers within the service object.
|
|
2641
2665
|
*/
|
|
2642
2666
|
|
|
2643
|
-
var
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2667
|
+
var getLayersFromService$1 = createSelector(getServiceByName, function (service) {
|
|
2668
|
+
return service && service.layers || null;
|
|
2669
|
+
});
|
|
2670
|
+
/**
|
|
2671
|
+
* Gets the layer from the store using the serviceUrl and layerName
|
|
2672
|
+
*
|
|
2673
|
+
* Example: layer = getLayerFromService(store, 'https://geoservices.knmi.nl/...', 'radar')
|
|
2674
|
+
* @param {object} store store: object - The application store
|
|
2675
|
+
* @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
|
|
2676
|
+
* @param {string} layerName layerName: string - Name of the layer in the service
|
|
2677
|
+
* @returns {ServiceLayer} returnType: ServiceLayer - The layer from the service object.
|
|
2678
|
+
*/
|
|
2649
2679
|
|
|
2650
|
-
|
|
2680
|
+
var getLayerFromService = createSelector(function (store, serviceUrl) {
|
|
2681
|
+
return getLayersFromService$1(store, serviceUrl);
|
|
2682
|
+
}, function (store, serviceUrl) {
|
|
2683
|
+
return serviceUrl;
|
|
2684
|
+
}, function (store, serviceUrl, layerName) {
|
|
2685
|
+
return layerName;
|
|
2686
|
+
}, function (layers, serviceUrl, layerName) {
|
|
2687
|
+
if (!layers) return null;
|
|
2688
|
+
var index = layers.findIndex(function (serviceLayer) {
|
|
2689
|
+
return serviceLayer.name === layerName;
|
|
2690
|
+
});
|
|
2691
|
+
|
|
2692
|
+
if (index === -1) {
|
|
2693
|
+
return null;
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
return layers[index];
|
|
2697
|
+
});
|
|
2698
|
+
/**
|
|
2699
|
+
* Gets the layers stylelist from the servicestore using the serviceUrl and layerName
|
|
2700
|
+
*
|
|
2701
|
+
* Example: layerStyles = getLayerStyles(store, layerService, layerName);
|
|
2702
|
+
* @param {object} store store: object - store from which the layers state will be extracted
|
|
2703
|
+
* @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
|
|
2704
|
+
* @param {string} layerName layerName: string - Name of the layer in the service
|
|
2705
|
+
* @returns {array} returnType: Style[] - array containing layer styles
|
|
2706
|
+
*/
|
|
2651
2707
|
|
|
2652
|
-
|
|
2708
|
+
var getLayerStyles = createSelector(getLayerFromService, function (layer) {
|
|
2709
|
+
return layer && layer.styles ? layer.styles : [];
|
|
2653
2710
|
});
|
|
2654
2711
|
|
|
2655
2712
|
/* *
|
|
@@ -2714,7 +2771,6 @@ var selectors = /*#__PURE__*/Object.freeze({
|
|
|
2714
2771
|
getLayers: getLayers,
|
|
2715
2772
|
getBaseLayers: getBaseLayers,
|
|
2716
2773
|
getOverLayers: getOverLayers,
|
|
2717
|
-
getLayerStyles: getLayerStyles,
|
|
2718
2774
|
getLayerDimensions: getLayerDimensions,
|
|
2719
2775
|
getLayerNonTimeDimensions: getLayerNonTimeDimensions,
|
|
2720
2776
|
getLayerTimeDimension: getLayerTimeDimension,
|
|
@@ -2728,8 +2784,10 @@ var selectors = /*#__PURE__*/Object.freeze({
|
|
|
2728
2784
|
getAvailableBaseLayersForMap: getAvailableBaseLayersForMap,
|
|
2729
2785
|
getServiceIds: getServiceIds,
|
|
2730
2786
|
getServices: getServices,
|
|
2731
|
-
|
|
2732
|
-
|
|
2787
|
+
getServiceByName: getServiceByName,
|
|
2788
|
+
getLayersFromService: getLayersFromService$1,
|
|
2789
|
+
getLayerFromService: getLayerFromService,
|
|
2790
|
+
getLayerStyles: getLayerStyles
|
|
2733
2791
|
});
|
|
2734
2792
|
|
|
2735
2793
|
/* *
|
|
@@ -2778,7 +2836,6 @@ var constants$1 = /*#__PURE__*/Object.freeze({
|
|
|
2778
2836
|
WEBMAP_LAYER_CHANGE_STYLE: WEBMAP_LAYER_CHANGE_STYLE,
|
|
2779
2837
|
WEBMAP_LAYER_CHANGE_DIMENSION: WEBMAP_LAYER_CHANGE_DIMENSION,
|
|
2780
2838
|
WEBMAP_LAYER_SET_DIMENSIONS: WEBMAP_LAYER_SET_DIMENSIONS,
|
|
2781
|
-
WEBMAP_LAYER_SET_STYLES: WEBMAP_LAYER_SET_STYLES,
|
|
2782
2839
|
WEBMAP_LAYER_CHANGE_ENABLED: WEBMAP_LAYER_CHANGE_ENABLED,
|
|
2783
2840
|
WEBMAP_LAYER_DELETE: WEBMAP_LAYER_DELETE,
|
|
2784
2841
|
WEBMAP_LAYER_ERROR: WEBMAP_LAYER_ERROR,
|
|
@@ -2789,6 +2846,7 @@ var constants$1 = /*#__PURE__*/Object.freeze({
|
|
|
2789
2846
|
WEBMAP_ADD_BASELAYER: WEBMAP_ADD_BASELAYER,
|
|
2790
2847
|
WEBMAP_ADD_AVAILABLE_BASELAYER: WEBMAP_ADD_AVAILABLE_BASELAYER,
|
|
2791
2848
|
WEBMAP_ADD_AVAILABLE_BASELAYERS: WEBMAP_ADD_AVAILABLE_BASELAYERS,
|
|
2849
|
+
WEBMAP_UPDATE_LAYER_INFO: WEBMAP_UPDATE_LAYER_INFO,
|
|
2792
2850
|
MAP_SERVICES_SET_LAYERS: MAP_SERVICES_SET_LAYERS
|
|
2793
2851
|
});
|
|
2794
2852
|
|
|
@@ -2833,8 +2891,8 @@ var UI_ORDER_DIALOG = 'UI_ORDER_DIALOG';
|
|
|
2833
2891
|
/**
|
|
2834
2892
|
* Registers the dialog in the store and creates the dialog state
|
|
2835
2893
|
*
|
|
2836
|
-
* Example: registerDialog({'dialogId1', type: 'legend}) you can optionally specify the activeMapId
|
|
2837
|
-
* @param {string} payload {type: 'legend' | 'layerManager' | 'dimensionSelect-elevation', activeMapId?: string, setOpen?: boolean}
|
|
2894
|
+
* Example: registerDialog({'dialogId1', type: 'legend}) you can optionally specify the activeMapId, whether the dialog is open and the souce ('app' or 'module', default is 'app')
|
|
2895
|
+
* @param {string} payload {type: 'legend' | 'layerManager' | 'dimensionSelect-elevation', activeMapId?: string, setOpen?: boolean, source?: Source}
|
|
2838
2896
|
*/
|
|
2839
2897
|
|
|
2840
2898
|
var registerDialog = function registerDialog(payload) {
|
|
@@ -3725,18 +3783,6 @@ var reducer$5 = function reducer() {
|
|
|
3725
3783
|
});
|
|
3726
3784
|
}
|
|
3727
3785
|
|
|
3728
|
-
case WEBMAP_LAYER_SET_STYLES:
|
|
3729
|
-
{
|
|
3730
|
-
var _action$payload12 = action.payload,
|
|
3731
|
-
styles = _action$payload12.styles,
|
|
3732
|
-
_layerId9 = _action$payload12.layerId;
|
|
3733
|
-
return produce(state, function (draft) {
|
|
3734
|
-
if (draft.byId[_layerId9]) {
|
|
3735
|
-
draft.byId[_layerId9].styles = styles;
|
|
3736
|
-
}
|
|
3737
|
-
});
|
|
3738
|
-
}
|
|
3739
|
-
|
|
3740
3786
|
case WEBMAP_ADD_AVAILABLE_BASELAYER:
|
|
3741
3787
|
{
|
|
3742
3788
|
var _layer2 = action.payload.layer;
|
|
@@ -3768,6 +3814,23 @@ var reducer$5 = function reducer() {
|
|
|
3768
3814
|
});
|
|
3769
3815
|
}
|
|
3770
3816
|
|
|
3817
|
+
case WEBMAP_UPDATE_LAYER_INFO:
|
|
3818
|
+
{
|
|
3819
|
+
var _action$payload12 = action.payload,
|
|
3820
|
+
layerStyle = _action$payload12.layerStyle,
|
|
3821
|
+
layerDimensions = _action$payload12.layerDimensions;
|
|
3822
|
+
var layerStyleAction = {
|
|
3823
|
+
payload: layerStyle,
|
|
3824
|
+
type: WEBMAP_LAYER_CHANGE_STYLE
|
|
3825
|
+
};
|
|
3826
|
+
var intermediateState = layerStyle === null ? state : reducer(state, layerStyleAction);
|
|
3827
|
+
var dimensionsAction = {
|
|
3828
|
+
payload: layerDimensions,
|
|
3829
|
+
type: WEBMAP_LAYER_SET_DIMENSIONS
|
|
3830
|
+
};
|
|
3831
|
+
return layerDimensions === null ? intermediateState : reducer(intermediateState, dimensionsAction);
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3771
3834
|
default:
|
|
3772
3835
|
return state;
|
|
3773
3836
|
}
|
|
@@ -3904,6 +3967,7 @@ var reducer$4 = function reducer() {
|
|
|
3904
3967
|
linked = _action$payload2.linked;
|
|
3905
3968
|
|
|
3906
3969
|
if (!draft.groups.byId[groupId]) {
|
|
3970
|
+
console.warn("SYNCGROUPS_ADD_TARGET: Group ".concat(groupId, " does not exist."));
|
|
3907
3971
|
return;
|
|
3908
3972
|
}
|
|
3909
3973
|
|
|
@@ -4463,99 +4527,84 @@ var getMapBaseLayerActionsTargets = function getMapBaseLayerActionsTargets(state
|
|
|
4463
4527
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
4464
4528
|
* */
|
|
4465
4529
|
var ORIGIN_REACTMAPVIEWPARSELAYER = 'ReactMapViewParseLayer';
|
|
4466
|
-
var setServiceMetadata = function setServiceMetadata(wmLayer, mapId,
|
|
4530
|
+
var setServiceMetadata = function setServiceMetadata(wmLayer, mapId, webMapJSInstance, mapProperties, onUpdateLayerInformation) {
|
|
4467
4531
|
var origin = ORIGIN_REACTMAPVIEWPARSELAYER;
|
|
4468
|
-
var service = WMGetServiceFromStore(wmLayer.service
|
|
4532
|
+
var service = WMGetServiceFromStore(wmLayer.service);
|
|
4469
4533
|
/* Update list of layers for service */
|
|
4470
4534
|
|
|
4471
4535
|
var done = function done(layers) {
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
units
|
|
4501
|
-
currentValue
|
|
4502
|
-
synced
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
dimTimeInterval = _ref2.dimTimeInterval,
|
|
4528
|
-
values = _ref2.values,
|
|
4529
|
-
synced = _ref2.synced;
|
|
4530
|
-
return {
|
|
4531
|
-
name: name,
|
|
4532
|
-
units: units,
|
|
4533
|
-
currentValue: currentValue,
|
|
4534
|
-
maxValue: dimMaxValue,
|
|
4535
|
-
minValue: dimMinValue,
|
|
4536
|
-
timeInterval: dimTimeInterval,
|
|
4537
|
-
values: values,
|
|
4538
|
-
synced: synced
|
|
4539
|
-
};
|
|
4540
|
-
})
|
|
4541
|
-
});
|
|
4536
|
+
var updateObject = {
|
|
4537
|
+
origin: ORIGIN_REACTMAPVIEWPARSELAYER,
|
|
4538
|
+
serviceLayers: {
|
|
4539
|
+
id: wmLayer.service,
|
|
4540
|
+
name: wmLayer.title,
|
|
4541
|
+
service: wmLayer.service,
|
|
4542
|
+
layers: layers
|
|
4543
|
+
},
|
|
4544
|
+
layerStyle: {
|
|
4545
|
+
origin: origin,
|
|
4546
|
+
layerId: wmLayer.ReactWMJSLayerId,
|
|
4547
|
+
style: wmLayer.currentStyle
|
|
4548
|
+
},
|
|
4549
|
+
mapDimensions: {
|
|
4550
|
+
origin: origin,
|
|
4551
|
+
mapId: mapId,
|
|
4552
|
+
dimensions: webMapJSInstance.mapdimensions.map(function (_ref) {
|
|
4553
|
+
var name = _ref.name,
|
|
4554
|
+
units = _ref.units,
|
|
4555
|
+
currentValue = _ref.currentValue,
|
|
4556
|
+
synced = _ref.synced;
|
|
4557
|
+
var reactDim = mapProperties.dimensions && mapProperties.dimensions.find(function (dim) {
|
|
4558
|
+
return dim.name === name;
|
|
4559
|
+
});
|
|
4560
|
+
var newDimValue = reactDim && reactDim.currentValue || currentValue;
|
|
4561
|
+
var newDimSynced = reactDim && reactDim.synced || synced;
|
|
4562
|
+
return {
|
|
4563
|
+
name: name,
|
|
4564
|
+
units: units,
|
|
4565
|
+
currentValue: newDimValue,
|
|
4566
|
+
synced: newDimSynced
|
|
4567
|
+
};
|
|
4568
|
+
})
|
|
4569
|
+
},
|
|
4570
|
+
layerDimensions: {
|
|
4571
|
+
origin: origin,
|
|
4572
|
+
layerId: wmLayer.id,
|
|
4573
|
+
dimensions: wmLayer.dimensions.map(function (dim) {
|
|
4574
|
+
var name = dim.name,
|
|
4575
|
+
units = dim.units,
|
|
4576
|
+
synced = dim.synced;
|
|
4577
|
+
return {
|
|
4578
|
+
name: name,
|
|
4579
|
+
units: units,
|
|
4580
|
+
currentValue: dim.getValue(),
|
|
4581
|
+
minValue: dim.getFirstValue(),
|
|
4582
|
+
maxValue: dim.getLastValue(),
|
|
4583
|
+
timeInterval: dim.getDimInterval(),
|
|
4584
|
+
values: dim.getValues(),
|
|
4585
|
+
synced: synced
|
|
4586
|
+
};
|
|
4587
|
+
})
|
|
4588
|
+
}
|
|
4589
|
+
};
|
|
4590
|
+
onUpdateLayerInformation && onUpdateLayerInformation(updateObject);
|
|
4542
4591
|
};
|
|
4543
4592
|
|
|
4544
4593
|
service.getLayerObjectsFlat(done, function () {// do nothing
|
|
4545
|
-
}, false,
|
|
4594
|
+
}, false, {
|
|
4546
4595
|
headers: wmLayer.headers
|
|
4547
4596
|
});
|
|
4548
4597
|
};
|
|
4549
4598
|
|
|
4550
|
-
var _marked$
|
|
4551
|
-
_marked2$
|
|
4599
|
+
var _marked$4 = /*#__PURE__*/regeneratorRuntime.mark(setTimeSaga),
|
|
4600
|
+
_marked2$4 = /*#__PURE__*/regeneratorRuntime.mark(setBBoxSaga),
|
|
4552
4601
|
_marked3$3 = /*#__PURE__*/regeneratorRuntime.mark(layerActionsSaga),
|
|
4553
4602
|
_marked4$2 = /*#__PURE__*/regeneratorRuntime.mark(addLayerActionsSaga),
|
|
4554
4603
|
_marked5$1 = /*#__PURE__*/regeneratorRuntime.mark(deleteLayerActionsSaga),
|
|
4555
4604
|
_marked6$1 = /*#__PURE__*/regeneratorRuntime.mark(moveLayerActionsSaga),
|
|
4556
4605
|
_marked7$1 = /*#__PURE__*/regeneratorRuntime.mark(setActiveLayerIdActionsSaga),
|
|
4557
4606
|
_marked8 = /*#__PURE__*/regeneratorRuntime.mark(mapBaseLayerActionsSaga),
|
|
4558
|
-
_marked9 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga$
|
|
4607
|
+
_marked9 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga$4);
|
|
4559
4608
|
var setTimeValidatorRexexp = new RegExp('^(19|20)\\d\\d-(0[1-9]|1[012])-([012]\\d|3[01])T([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)Z$');
|
|
4560
4609
|
function setTimeSaga(_ref) {
|
|
4561
4610
|
var payload, value, origin, targets, groups;
|
|
@@ -4595,7 +4644,7 @@ function setTimeSaga(_ref) {
|
|
|
4595
4644
|
return _context.stop();
|
|
4596
4645
|
}
|
|
4597
4646
|
}
|
|
4598
|
-
}, _marked$
|
|
4647
|
+
}, _marked$4);
|
|
4599
4648
|
}
|
|
4600
4649
|
function setBBoxSaga(_ref2) {
|
|
4601
4650
|
var payload, targets, groups;
|
|
@@ -4622,7 +4671,7 @@ function setBBoxSaga(_ref2) {
|
|
|
4622
4671
|
return _context2.stop();
|
|
4623
4672
|
}
|
|
4624
4673
|
}
|
|
4625
|
-
}, _marked2$
|
|
4674
|
+
}, _marked2$4);
|
|
4626
4675
|
}
|
|
4627
4676
|
function layerActionsSaga(_ref3) {
|
|
4628
4677
|
var payload, type, targets;
|
|
@@ -4837,7 +4886,7 @@ function mapBaseLayerActionsSaga(_ref8) {
|
|
|
4837
4886
|
}
|
|
4838
4887
|
}, _marked8);
|
|
4839
4888
|
}
|
|
4840
|
-
function rootSaga$
|
|
4889
|
+
function rootSaga$4() {
|
|
4841
4890
|
return regeneratorRuntime.wrap(function rootSaga$(_context9) {
|
|
4842
4891
|
while (1) {
|
|
4843
4892
|
switch (_context9.prev = _context9.next) {
|
|
@@ -4897,10 +4946,10 @@ function rootSaga$3() {
|
|
|
4897
4946
|
}, _marked9);
|
|
4898
4947
|
}
|
|
4899
4948
|
|
|
4900
|
-
var _marked$
|
|
4901
|
-
_marked2$
|
|
4949
|
+
var _marked$3 = /*#__PURE__*/regeneratorRuntime.mark(updateSourceValueWhenLinkingComponentToGroupSaga),
|
|
4950
|
+
_marked2$3 = /*#__PURE__*/regeneratorRuntime.mark(addGroupTargetSaga),
|
|
4902
4951
|
_marked3$2 = /*#__PURE__*/regeneratorRuntime.mark(linkGroupTargetSaga),
|
|
4903
|
-
_marked4$1 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga$
|
|
4952
|
+
_marked4$1 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga$3);
|
|
4904
4953
|
function updateSourceValueWhenLinkingComponentToGroupSaga(groupId, targetToUpdate) {
|
|
4905
4954
|
var group;
|
|
4906
4955
|
return regeneratorRuntime.wrap(function updateSourceValueWhenLinkingComponentToGroupSaga$(_context) {
|
|
@@ -4967,7 +5016,7 @@ function updateSourceValueWhenLinkingComponentToGroupSaga(groupId, targetToUpdat
|
|
|
4967
5016
|
return _context.stop();
|
|
4968
5017
|
}
|
|
4969
5018
|
}
|
|
4970
|
-
}, _marked$
|
|
5019
|
+
}, _marked$3);
|
|
4971
5020
|
}
|
|
4972
5021
|
function addGroupTargetSaga(_ref) {
|
|
4973
5022
|
var payload, groupId, linked, targetToUpdate;
|
|
@@ -4991,7 +5040,7 @@ function addGroupTargetSaga(_ref) {
|
|
|
4991
5040
|
return _context2.stop();
|
|
4992
5041
|
}
|
|
4993
5042
|
}
|
|
4994
|
-
}, _marked2$
|
|
5043
|
+
}, _marked2$3);
|
|
4995
5044
|
}
|
|
4996
5045
|
function linkGroupTargetSaga(_ref2) {
|
|
4997
5046
|
var payload, groupId, linked, targetToUpdate;
|
|
@@ -5018,7 +5067,7 @@ function linkGroupTargetSaga(_ref2) {
|
|
|
5018
5067
|
}, _marked3$2);
|
|
5019
5068
|
}
|
|
5020
5069
|
|
|
5021
|
-
function rootSaga$
|
|
5070
|
+
function rootSaga$3() {
|
|
5022
5071
|
return regeneratorRuntime.wrap(function rootSaga$(_context4) {
|
|
5023
5072
|
while (1) {
|
|
5024
5073
|
switch (_context4.prev = _context4.next) {
|
|
@@ -5059,10 +5108,10 @@ var synchronizationGroupConfig = {
|
|
|
5059
5108
|
reducerMap: {
|
|
5060
5109
|
syncronizationGroupStore: reducer$4
|
|
5061
5110
|
},
|
|
5062
|
-
sagas: [rootSaga$
|
|
5111
|
+
sagas: [rootSaga$4, rootSaga$3]
|
|
5063
5112
|
};
|
|
5064
5113
|
|
|
5065
|
-
var useStyles$
|
|
5114
|
+
var useStyles$I = makeStyles(function (theme) {
|
|
5066
5115
|
return {
|
|
5067
5116
|
select: {
|
|
5068
5117
|
'& ul': {
|
|
@@ -5107,6 +5156,9 @@ var TooltipSelect = function TooltipSelect(_a) {
|
|
|
5107
5156
|
onChangeMouseWheel = _a$onChangeMouseWheel === void 0 ? function () {} : _a$onChangeMouseWheel,
|
|
5108
5157
|
props = __rest(_a, ["tooltip", "list", "currentIndex", "onChangeMouseWheel"]);
|
|
5109
5158
|
|
|
5159
|
+
props.disableUnderline;
|
|
5160
|
+
var otherProps = __rest(props, ["disableUnderline"]);
|
|
5161
|
+
|
|
5110
5162
|
var _React$useState = React.useState(false),
|
|
5111
5163
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
5112
5164
|
selectOpen = _React$useState2[0],
|
|
@@ -5117,7 +5169,7 @@ var TooltipSelect = function TooltipSelect(_a) {
|
|
|
5117
5169
|
tooltipOpen = _React$useState4[0],
|
|
5118
5170
|
setTooltipOpen = _React$useState4[1];
|
|
5119
5171
|
|
|
5120
|
-
var classes = useStyles$
|
|
5172
|
+
var classes = useStyles$I();
|
|
5121
5173
|
|
|
5122
5174
|
var preventDefault = function preventDefault(event) {
|
|
5123
5175
|
event.preventDefault();
|
|
@@ -5178,7 +5230,7 @@ var TooltipSelect = function TooltipSelect(_a) {
|
|
|
5178
5230
|
paper: classes.select
|
|
5179
5231
|
}
|
|
5180
5232
|
}
|
|
5181
|
-
},
|
|
5233
|
+
}, otherProps)));
|
|
5182
5234
|
};
|
|
5183
5235
|
|
|
5184
5236
|
/* *
|
|
@@ -5261,12 +5313,14 @@ var reducer$3 = function reducer() {
|
|
|
5261
5313
|
var type = action.payload.type;
|
|
5262
5314
|
var activeMapId = action.payload.activeMapId ? action.payload.activeMapId : '';
|
|
5263
5315
|
var setOpen = action.payload.setOpen ? action.payload.setOpen : false;
|
|
5316
|
+
var source = action.payload.source ? action.payload.source : 'app';
|
|
5264
5317
|
return produce$1(state, function (draft) {
|
|
5265
5318
|
if (!Object.keys(draft.dialogs).includes(type)) {
|
|
5266
5319
|
draft.dialogs[type] = createUIDialogElement({
|
|
5267
5320
|
activeMapId: activeMapId,
|
|
5268
5321
|
type: type,
|
|
5269
|
-
setOpen: setOpen
|
|
5322
|
+
setOpen: setOpen,
|
|
5323
|
+
source: source
|
|
5270
5324
|
});
|
|
5271
5325
|
} // // register dialog to order
|
|
5272
5326
|
|
|
@@ -5295,7 +5349,7 @@ var reducer$3 = function reducer() {
|
|
|
5295
5349
|
var _action$payload = action.payload,
|
|
5296
5350
|
_type2 = _action$payload.type,
|
|
5297
5351
|
_activeMapId = _action$payload.activeMapId,
|
|
5298
|
-
|
|
5352
|
+
_source = _action$payload.source;
|
|
5299
5353
|
|
|
5300
5354
|
if (!state.dialogs[_type2]) {
|
|
5301
5355
|
return state;
|
|
@@ -5305,7 +5359,7 @@ var reducer$3 = function reducer() {
|
|
|
5305
5359
|
var isOpen = action.payload.setOpen !== undefined ? action.payload.setOpen : draft.dialogs[_type2].isOpen;
|
|
5306
5360
|
draft.dialogs[_type2].activeMapId = _activeMapId;
|
|
5307
5361
|
draft.dialogs[_type2].isOpen = isOpen;
|
|
5308
|
-
draft.dialogs[_type2].source =
|
|
5362
|
+
draft.dialogs[_type2].source = _source;
|
|
5309
5363
|
|
|
5310
5364
|
if (isOpen) {
|
|
5311
5365
|
draft.order = moveToTop(state.order, _type2);
|
|
@@ -5452,18 +5506,18 @@ var getDialogIsOrderedOnTop = createSelector(function (store, dialogType) {
|
|
|
5452
5506
|
return isOrderedOnTop;
|
|
5453
5507
|
});
|
|
5454
5508
|
var getDialogSource = createSelector(getDialogDetailsByType, function (details) {
|
|
5455
|
-
if (details) {
|
|
5509
|
+
if (details && details.source) {
|
|
5456
5510
|
return details.source;
|
|
5457
5511
|
}
|
|
5458
5512
|
|
|
5459
5513
|
return 'app';
|
|
5460
5514
|
});
|
|
5461
5515
|
|
|
5462
|
-
var _marked$
|
|
5463
|
-
_marked2$
|
|
5464
|
-
_marked3$1 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga$
|
|
5516
|
+
var _marked$2 = /*#__PURE__*/regeneratorRuntime.mark(registerMapUISaga),
|
|
5517
|
+
_marked2$2 = /*#__PURE__*/regeneratorRuntime.mark(unregisterUIMapSaga),
|
|
5518
|
+
_marked3$1 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga$2);
|
|
5465
5519
|
function registerMapUISaga() {
|
|
5466
|
-
var fields;
|
|
5520
|
+
var fields, source;
|
|
5467
5521
|
return regeneratorRuntime.wrap(function registerMapUISaga$(_context) {
|
|
5468
5522
|
while (1) {
|
|
5469
5523
|
switch (_context.prev = _context.next) {
|
|
@@ -5475,23 +5529,29 @@ function registerMapUISaga() {
|
|
|
5475
5529
|
fields = _context.sent;
|
|
5476
5530
|
|
|
5477
5531
|
if (!(fields.length === 1)) {
|
|
5478
|
-
_context.next =
|
|
5532
|
+
_context.next = 9;
|
|
5479
5533
|
break;
|
|
5480
5534
|
}
|
|
5481
5535
|
|
|
5482
5536
|
_context.next = 6;
|
|
5537
|
+
return select(getDialogSource, 'legend');
|
|
5538
|
+
|
|
5539
|
+
case 6:
|
|
5540
|
+
source = _context.sent;
|
|
5541
|
+
_context.next = 9;
|
|
5483
5542
|
return put(setActiveMapIdForDialog({
|
|
5484
5543
|
type: 'legend',
|
|
5485
5544
|
activeMapId: fields[0],
|
|
5486
|
-
setOpen: true
|
|
5545
|
+
setOpen: true,
|
|
5546
|
+
source: source
|
|
5487
5547
|
}));
|
|
5488
5548
|
|
|
5489
|
-
case
|
|
5549
|
+
case 9:
|
|
5490
5550
|
case "end":
|
|
5491
5551
|
return _context.stop();
|
|
5492
5552
|
}
|
|
5493
5553
|
}
|
|
5494
|
-
}, _marked$
|
|
5554
|
+
}, _marked$2);
|
|
5495
5555
|
}
|
|
5496
5556
|
function unregisterUIMapSaga() {
|
|
5497
5557
|
var fields, activeUI;
|
|
@@ -5543,9 +5603,9 @@ function unregisterUIMapSaga() {
|
|
|
5543
5603
|
return _context2.stop();
|
|
5544
5604
|
}
|
|
5545
5605
|
}
|
|
5546
|
-
}, _marked2$
|
|
5606
|
+
}, _marked2$2);
|
|
5547
5607
|
}
|
|
5548
|
-
function rootSaga$
|
|
5608
|
+
function rootSaga$2() {
|
|
5549
5609
|
return regeneratorRuntime.wrap(function rootSaga$(_context3) {
|
|
5550
5610
|
while (1) {
|
|
5551
5611
|
switch (_context3.prev = _context3.next) {
|
|
@@ -5586,7 +5646,7 @@ var uiModuleConfig = {
|
|
|
5586
5646
|
reducerMap: {
|
|
5587
5647
|
ui: reducer$3
|
|
5588
5648
|
},
|
|
5589
|
-
sagas: [rootSaga$
|
|
5649
|
+
sagas: [rootSaga$2]
|
|
5590
5650
|
};
|
|
5591
5651
|
|
|
5592
5652
|
/**
|
|
@@ -6235,6 +6295,17 @@ var reducer$2 = function reducer() {
|
|
|
6235
6295
|
}, state);
|
|
6236
6296
|
}
|
|
6237
6297
|
|
|
6298
|
+
case WEBMAP_UPDATE_LAYER_INFO:
|
|
6299
|
+
{
|
|
6300
|
+
var mapDimensions = action.payload.mapDimensions;
|
|
6301
|
+
if (mapDimensions === null) return state;
|
|
6302
|
+
var mapAction = {
|
|
6303
|
+
payload: mapDimensions,
|
|
6304
|
+
type: WEBMAP_MAP_UPDATE_ALL_DIMENSIONS
|
|
6305
|
+
};
|
|
6306
|
+
return reducer(state, mapAction);
|
|
6307
|
+
}
|
|
6308
|
+
|
|
6238
6309
|
default:
|
|
6239
6310
|
return state;
|
|
6240
6311
|
}
|
|
@@ -6275,18 +6346,29 @@ var reducer$1 = function reducer() {
|
|
|
6275
6346
|
if (!draft.allIds.includes(action.payload.service)) draft.allIds.push(action.payload.service);
|
|
6276
6347
|
});
|
|
6277
6348
|
|
|
6349
|
+
case WEBMAP_UPDATE_LAYER_INFO:
|
|
6350
|
+
{
|
|
6351
|
+
var serviceLayers = action.payload.serviceLayers;
|
|
6352
|
+
if (serviceLayers === null) return state;
|
|
6353
|
+
var mapAction = {
|
|
6354
|
+
payload: serviceLayers,
|
|
6355
|
+
type: MAP_SERVICES_SET_LAYERS
|
|
6356
|
+
};
|
|
6357
|
+
return reducer(state, mapAction);
|
|
6358
|
+
}
|
|
6359
|
+
|
|
6278
6360
|
default:
|
|
6279
6361
|
return state;
|
|
6280
6362
|
}
|
|
6281
6363
|
};
|
|
6282
6364
|
|
|
6283
|
-
var _marked = /*#__PURE__*/regeneratorRuntime.mark(startAnimationSaga),
|
|
6284
|
-
_marked2 = /*#__PURE__*/regeneratorRuntime.mark(stopAnimationSaga),
|
|
6365
|
+
var _marked$1 = /*#__PURE__*/regeneratorRuntime.mark(startAnimationSaga),
|
|
6366
|
+
_marked2$1 = /*#__PURE__*/regeneratorRuntime.mark(stopAnimationSaga),
|
|
6285
6367
|
_marked3 = /*#__PURE__*/regeneratorRuntime.mark(deleteLayerSaga),
|
|
6286
6368
|
_marked4 = /*#__PURE__*/regeneratorRuntime.mark(updateAnimation),
|
|
6287
6369
|
_marked5 = /*#__PURE__*/regeneratorRuntime.mark(setLayerDimensionsSaga),
|
|
6288
6370
|
_marked6 = /*#__PURE__*/regeneratorRuntime.mark(toggleAutoUpdateSaga),
|
|
6289
|
-
_marked7 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga);
|
|
6371
|
+
_marked7 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga$1);
|
|
6290
6372
|
|
|
6291
6373
|
var generateTimeList = function generateTimeList(start, end, interval) {
|
|
6292
6374
|
var timeList = [];
|
|
@@ -6336,7 +6418,7 @@ function startAnimationSaga(_ref) {
|
|
|
6336
6418
|
return _context.stop();
|
|
6337
6419
|
}
|
|
6338
6420
|
}
|
|
6339
|
-
}, _marked);
|
|
6421
|
+
}, _marked$1);
|
|
6340
6422
|
}
|
|
6341
6423
|
function stopAnimationSaga(_ref2) {
|
|
6342
6424
|
var payload, mapId;
|
|
@@ -6354,7 +6436,7 @@ function stopAnimationSaga(_ref2) {
|
|
|
6354
6436
|
return _context2.stop();
|
|
6355
6437
|
}
|
|
6356
6438
|
}
|
|
6357
|
-
}, _marked2);
|
|
6439
|
+
}, _marked2$1);
|
|
6358
6440
|
}
|
|
6359
6441
|
function deleteLayerSaga(_ref3) {
|
|
6360
6442
|
var payload, mapId, layers;
|
|
@@ -6455,66 +6537,76 @@ function updateAnimation(mapId, maxValue) {
|
|
|
6455
6537
|
}, _marked4);
|
|
6456
6538
|
}
|
|
6457
6539
|
function setLayerDimensionsSaga(_ref4) {
|
|
6458
|
-
var payload, dimensions, layerId, layer, newTimeDimension, mapId, activeLayerId, shouldAutoUpdate, prevTimeDimension, isAnimating$1, webmapInstance;
|
|
6540
|
+
var payload, layerDimensions, dimensions, layerId, layer, newTimeDimension, mapId, activeLayerId, shouldAutoUpdate, prevTimeDimension, isAnimating$1, webmapInstance;
|
|
6459
6541
|
return regeneratorRuntime.wrap(function setLayerDimensionsSaga$(_context5) {
|
|
6460
6542
|
while (1) {
|
|
6461
6543
|
switch (_context5.prev = _context5.next) {
|
|
6462
6544
|
case 0:
|
|
6463
6545
|
payload = _ref4.payload;
|
|
6464
6546
|
_context5.prev = 1;
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6547
|
+
layerDimensions = payload.layerDimensions;
|
|
6548
|
+
|
|
6549
|
+
if (layerDimensions) {
|
|
6550
|
+
_context5.next = 5;
|
|
6551
|
+
break;
|
|
6552
|
+
}
|
|
6553
|
+
|
|
6554
|
+
return _context5.abrupt("return");
|
|
6468
6555
|
|
|
6469
6556
|
case 5:
|
|
6557
|
+
dimensions = layerDimensions.dimensions, layerId = layerDimensions.layerId;
|
|
6558
|
+
_context5.next = 8;
|
|
6559
|
+
return select(getLayerById, layerId);
|
|
6560
|
+
|
|
6561
|
+
case 8:
|
|
6470
6562
|
layer = _context5.sent;
|
|
6471
6563
|
|
|
6472
6564
|
if (layer) {
|
|
6473
|
-
_context5.next =
|
|
6565
|
+
_context5.next = 11;
|
|
6474
6566
|
break;
|
|
6475
6567
|
}
|
|
6476
6568
|
|
|
6477
6569
|
return _context5.abrupt("return");
|
|
6478
6570
|
|
|
6479
|
-
case
|
|
6571
|
+
case 11:
|
|
6480
6572
|
newTimeDimension = dimensions.find(function (dimension) {
|
|
6481
6573
|
return dimension.name === 'time';
|
|
6482
6574
|
});
|
|
6483
6575
|
mapId = layer.mapId;
|
|
6484
|
-
_context5.next =
|
|
6576
|
+
_context5.next = 15;
|
|
6485
6577
|
return select(getActiveLayerId, mapId);
|
|
6486
6578
|
|
|
6487
|
-
case
|
|
6579
|
+
case 15:
|
|
6488
6580
|
activeLayerId = _context5.sent;
|
|
6489
|
-
_context5.next =
|
|
6581
|
+
_context5.next = 18;
|
|
6490
6582
|
return select(isAutoUpdating, mapId);
|
|
6491
6583
|
|
|
6492
|
-
case
|
|
6584
|
+
case 18:
|
|
6493
6585
|
shouldAutoUpdate = _context5.sent;
|
|
6494
|
-
_context5.next =
|
|
6586
|
+
_context5.next = 21;
|
|
6495
6587
|
return select(getLayerTimeDimension, layerId);
|
|
6496
6588
|
|
|
6497
|
-
case
|
|
6589
|
+
case 21:
|
|
6498
6590
|
prevTimeDimension = _context5.sent;
|
|
6499
|
-
_context5.next =
|
|
6591
|
+
_context5.next = 24;
|
|
6500
6592
|
return select(isAnimating, mapId);
|
|
6501
6593
|
|
|
6502
|
-
case
|
|
6594
|
+
case 24:
|
|
6503
6595
|
isAnimating$1 = _context5.sent;
|
|
6504
6596
|
webmapInstance = getWMJSMapById(mapId);
|
|
6505
6597
|
|
|
6506
6598
|
if (!(layerId === activeLayerId && // only update the active layer
|
|
6507
6599
|
shouldAutoUpdate && newTimeDimension && newTimeDimension.maxValue && prevTimeDimension && prevTimeDimension.currentValue && prevTimeDimension.currentValue !== newTimeDimension.maxValue)) {
|
|
6508
|
-
_context5.next =
|
|
6600
|
+
_context5.next = 34;
|
|
6509
6601
|
break;
|
|
6510
6602
|
}
|
|
6511
6603
|
|
|
6512
6604
|
if (isAnimating$1) {
|
|
6513
|
-
_context5.next =
|
|
6605
|
+
_context5.next = 30;
|
|
6514
6606
|
break;
|
|
6515
6607
|
}
|
|
6516
6608
|
|
|
6517
|
-
_context5.next =
|
|
6609
|
+
_context5.next = 30;
|
|
6518
6610
|
return put(layerChangeDimension({
|
|
6519
6611
|
layerId: layerId,
|
|
6520
6612
|
origin: 'setLayerDimensionSaga',
|
|
@@ -6524,39 +6616,39 @@ function setLayerDimensionsSaga(_ref4) {
|
|
|
6524
6616
|
}
|
|
6525
6617
|
}));
|
|
6526
6618
|
|
|
6527
|
-
case
|
|
6528
|
-
_context5.next =
|
|
6619
|
+
case 30:
|
|
6620
|
+
_context5.next = 32;
|
|
6529
6621
|
return call(updateAnimation, mapId, newTimeDimension.maxValue);
|
|
6530
6622
|
|
|
6531
|
-
case
|
|
6532
|
-
_context5.next =
|
|
6623
|
+
case 32:
|
|
6624
|
+
_context5.next = 37;
|
|
6533
6625
|
break;
|
|
6534
6626
|
|
|
6535
|
-
case
|
|
6627
|
+
case 34:
|
|
6536
6628
|
if (!(isAnimating$1 && !webmapInstance.isAnimating && newTimeDimension && newTimeDimension.maxValue)) {
|
|
6537
|
-
_context5.next =
|
|
6629
|
+
_context5.next = 37;
|
|
6538
6630
|
break;
|
|
6539
6631
|
}
|
|
6540
6632
|
|
|
6541
|
-
_context5.next =
|
|
6633
|
+
_context5.next = 37;
|
|
6542
6634
|
return call(updateAnimation, mapId, newTimeDimension.maxValue);
|
|
6543
6635
|
|
|
6544
|
-
case
|
|
6545
|
-
_context5.next =
|
|
6636
|
+
case 37:
|
|
6637
|
+
_context5.next = 42;
|
|
6546
6638
|
break;
|
|
6547
6639
|
|
|
6548
|
-
case
|
|
6549
|
-
_context5.prev =
|
|
6640
|
+
case 39:
|
|
6641
|
+
_context5.prev = 39;
|
|
6550
6642
|
_context5.t0 = _context5["catch"](1);
|
|
6551
6643
|
// eslint-disable-next-line no-console
|
|
6552
6644
|
console.warn(_context5.t0);
|
|
6553
6645
|
|
|
6554
|
-
case
|
|
6646
|
+
case 42:
|
|
6555
6647
|
case "end":
|
|
6556
6648
|
return _context5.stop();
|
|
6557
6649
|
}
|
|
6558
6650
|
}
|
|
6559
|
-
}, _marked5, null, [[1,
|
|
6651
|
+
}, _marked5, null, [[1, 39]]);
|
|
6560
6652
|
}
|
|
6561
6653
|
function toggleAutoUpdateSaga(_ref5) {
|
|
6562
6654
|
var payload, shouldAutoUpdate, mapId, layerId, timeDimension;
|
|
@@ -6620,7 +6712,7 @@ function toggleAutoUpdateSaga(_ref5) {
|
|
|
6620
6712
|
}
|
|
6621
6713
|
}, _marked6, null, [[1, 17]]);
|
|
6622
6714
|
}
|
|
6623
|
-
function rootSaga() {
|
|
6715
|
+
function rootSaga$1() {
|
|
6624
6716
|
return regeneratorRuntime.wrap(function rootSaga$(_context7) {
|
|
6625
6717
|
while (1) {
|
|
6626
6718
|
switch (_context7.prev = _context7.next) {
|
|
@@ -6638,7 +6730,7 @@ function rootSaga() {
|
|
|
6638
6730
|
|
|
6639
6731
|
case 6:
|
|
6640
6732
|
_context7.next = 8;
|
|
6641
|
-
return takeLatest(
|
|
6733
|
+
return takeLatest(WEBMAP_UPDATE_LAYER_INFO, setLayerDimensionsSaga);
|
|
6642
6734
|
|
|
6643
6735
|
case 8:
|
|
6644
6736
|
_context7.next = 10;
|
|
@@ -6675,28 +6767,17 @@ var moduleConfig = {
|
|
|
6675
6767
|
services: reducer$1,
|
|
6676
6768
|
layers: reducer$5
|
|
6677
6769
|
},
|
|
6678
|
-
sagas: [rootSaga]
|
|
6770
|
+
sagas: [rootSaga$1]
|
|
6679
6771
|
};
|
|
6680
6772
|
|
|
6681
|
-
/* *
|
|
6682
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6683
|
-
* you may not use this file except in compliance with the License.
|
|
6684
|
-
* You may obtain a copy of the License at
|
|
6685
|
-
*
|
|
6686
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6687
|
-
*
|
|
6688
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
6689
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6690
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6691
|
-
* See the License for the specific language governing permissions and
|
|
6692
|
-
* limitations under the License.
|
|
6693
|
-
*
|
|
6694
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6695
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
6696
|
-
* */
|
|
6697
6773
|
var initialState = {
|
|
6698
6774
|
filters: {
|
|
6699
|
-
searchFilter: ''
|
|
6775
|
+
searchFilter: '',
|
|
6776
|
+
activeServices: {
|
|
6777
|
+
byId: {},
|
|
6778
|
+
allIds: []
|
|
6779
|
+
},
|
|
6780
|
+
keywords: []
|
|
6700
6781
|
}
|
|
6701
6782
|
};
|
|
6702
6783
|
var reducer = function reducer() {
|
|
@@ -6712,49 +6793,315 @@ var reducer = function reducer() {
|
|
|
6712
6793
|
});
|
|
6713
6794
|
}
|
|
6714
6795
|
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6796
|
+
case 'LAYER_SELECT_ADD_KEYWORDS_AND_ACTIVE_SERVICES':
|
|
6797
|
+
{
|
|
6798
|
+
var _action$payload = action.payload,
|
|
6799
|
+
serviceUrl = _action$payload.serviceUrl,
|
|
6800
|
+
keywords = _action$payload.keywords;
|
|
6801
|
+
return produce(state, function (draft) {
|
|
6802
|
+
if (!draft.filters.activeServices.byId[serviceUrl]) {
|
|
6803
|
+
draft.filters.activeServices.byId[serviceUrl] = {};
|
|
6719
6804
|
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
* you may not use this file except in compliance with the License.
|
|
6723
|
-
* You may obtain a copy of the License at
|
|
6724
|
-
*
|
|
6725
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6726
|
-
*
|
|
6727
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
6728
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6729
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6730
|
-
* See the License for the specific language governing permissions and
|
|
6731
|
-
* limitations under the License.
|
|
6732
|
-
*
|
|
6733
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6734
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
6735
|
-
* */
|
|
6736
|
-
var layerSelectConfig = {
|
|
6737
|
-
id: 'layerSelect-module',
|
|
6738
|
-
reducerMap: {
|
|
6739
|
-
layerSelect: reducer
|
|
6740
|
-
}
|
|
6741
|
-
};
|
|
6805
|
+
var _iterator = _createForOfIteratorHelper(keywords),
|
|
6806
|
+
_step;
|
|
6742
6807
|
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6808
|
+
try {
|
|
6809
|
+
var _loop = function _loop() {
|
|
6810
|
+
var keyword = _step.value;
|
|
6811
|
+
var foundKeyword = draft.filters.keywords.find(function (object) {
|
|
6812
|
+
return object.id === keyword;
|
|
6813
|
+
});
|
|
6814
|
+
|
|
6815
|
+
if (foundKeyword) {
|
|
6816
|
+
foundKeyword.amount += 1;
|
|
6817
|
+
foundKeyword.amountVisible += 1;
|
|
6818
|
+
} else {
|
|
6819
|
+
var newKeywordObject = {
|
|
6820
|
+
id: keyword,
|
|
6821
|
+
amount: 1,
|
|
6822
|
+
amountVisible: 1,
|
|
6823
|
+
checked: true
|
|
6824
|
+
};
|
|
6825
|
+
draft.filters.keywords.push(newKeywordObject);
|
|
6826
|
+
}
|
|
6827
|
+
};
|
|
6828
|
+
|
|
6829
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
6830
|
+
_loop();
|
|
6831
|
+
}
|
|
6832
|
+
} catch (err) {
|
|
6833
|
+
_iterator.e(err);
|
|
6834
|
+
} finally {
|
|
6835
|
+
_iterator.f();
|
|
6836
|
+
}
|
|
6837
|
+
}
|
|
6838
|
+
|
|
6839
|
+
draft.filters.activeServices.byId[serviceUrl].id = serviceUrl;
|
|
6840
|
+
draft.filters.activeServices.byId[serviceUrl].enabled = true;
|
|
6841
|
+
draft.filters.activeServices.byId[serviceUrl].keywordsPerService = keywords;
|
|
6842
|
+
if (!draft.filters.activeServices.allIds.includes(serviceUrl)) draft.filters.activeServices.allIds.push(serviceUrl);
|
|
6843
|
+
});
|
|
6844
|
+
}
|
|
6845
|
+
|
|
6846
|
+
case 'LAYER_SELECT_ENABLE_ACTIVE_SERVICE':
|
|
6847
|
+
{
|
|
6848
|
+
var _action$payload2 = action.payload,
|
|
6849
|
+
_serviceUrl = _action$payload2.serviceUrl,
|
|
6850
|
+
_keywords = _action$payload2.keywords;
|
|
6851
|
+
return produce(state, function (draft) {
|
|
6852
|
+
draft.filters.activeServices.byId[_serviceUrl].enabled = true;
|
|
6853
|
+
|
|
6854
|
+
var _iterator2 = _createForOfIteratorHelper(_keywords),
|
|
6855
|
+
_step2;
|
|
6856
|
+
|
|
6857
|
+
try {
|
|
6858
|
+
var _loop2 = function _loop2() {
|
|
6859
|
+
var keyword = _step2.value;
|
|
6860
|
+
var foundObject = draft.filters.keywords.find(function (object) {
|
|
6861
|
+
return object.id === keyword;
|
|
6862
|
+
});
|
|
6863
|
+
|
|
6864
|
+
if (foundObject) {
|
|
6865
|
+
foundObject.amountVisible += 1;
|
|
6866
|
+
}
|
|
6867
|
+
};
|
|
6868
|
+
|
|
6869
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
6870
|
+
_loop2();
|
|
6871
|
+
}
|
|
6872
|
+
} catch (err) {
|
|
6873
|
+
_iterator2.e(err);
|
|
6874
|
+
} finally {
|
|
6875
|
+
_iterator2.f();
|
|
6876
|
+
}
|
|
6877
|
+
});
|
|
6878
|
+
}
|
|
6879
|
+
|
|
6880
|
+
case 'LAYER_SELECT_DISABLE_ACTIVE_SERVICE':
|
|
6881
|
+
{
|
|
6882
|
+
var _action$payload3 = action.payload,
|
|
6883
|
+
_serviceUrl2 = _action$payload3.serviceUrl,
|
|
6884
|
+
_keywords2 = _action$payload3.keywords;
|
|
6885
|
+
return produce(state, function (draft) {
|
|
6886
|
+
draft.filters.activeServices.byId[_serviceUrl2].enabled = false;
|
|
6887
|
+
|
|
6888
|
+
var _iterator3 = _createForOfIteratorHelper(_keywords2),
|
|
6889
|
+
_step3;
|
|
6890
|
+
|
|
6891
|
+
try {
|
|
6892
|
+
var _loop3 = function _loop3() {
|
|
6893
|
+
var keyword = _step3.value;
|
|
6894
|
+
var foundObject = draft.filters.keywords.find(function (object) {
|
|
6895
|
+
return object.id === keyword;
|
|
6896
|
+
});
|
|
6897
|
+
|
|
6898
|
+
if (foundObject && foundObject.amountVisible > 0) {
|
|
6899
|
+
foundObject.amountVisible -= 1;
|
|
6900
|
+
}
|
|
6901
|
+
};
|
|
6902
|
+
|
|
6903
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
6904
|
+
_loop3();
|
|
6905
|
+
}
|
|
6906
|
+
} catch (err) {
|
|
6907
|
+
_iterator3.e(err);
|
|
6908
|
+
} finally {
|
|
6909
|
+
_iterator3.f();
|
|
6910
|
+
}
|
|
6911
|
+
});
|
|
6912
|
+
}
|
|
6913
|
+
|
|
6914
|
+
case 'LAYER_SELECT_UPDATE_KEYWORDS':
|
|
6915
|
+
{
|
|
6916
|
+
return produce(state, function (draft) {
|
|
6917
|
+
var keywords = action.payload.keywords;
|
|
6918
|
+
draft.filters.keywords = keywords;
|
|
6919
|
+
});
|
|
6920
|
+
}
|
|
6921
|
+
|
|
6922
|
+
default:
|
|
6923
|
+
return state;
|
|
6924
|
+
}
|
|
6925
|
+
};
|
|
6926
|
+
|
|
6927
|
+
/* *
|
|
6928
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6929
|
+
* you may not use this file except in compliance with the License.
|
|
6930
|
+
* You may obtain a copy of the License at
|
|
6931
|
+
*
|
|
6932
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6933
|
+
*
|
|
6934
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6935
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6936
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6937
|
+
* See the License for the specific language governing permissions and
|
|
6938
|
+
* limitations under the License.
|
|
6939
|
+
*
|
|
6940
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6941
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
6942
|
+
* */
|
|
6943
|
+
var LAYER_SELECT_SET_SEARCH_FILTER = 'LAYER_SELECT_SET_SEARCH_FILTER';
|
|
6944
|
+
var LAYER_SELECT_DISABLE_ACTIVE_SERVICE = 'LAYER_SELECT_DISABLE_ACTIVE_SERVICE';
|
|
6945
|
+
var LAYER_SELECT_ENABLE_ACTIVE_SERVICE = 'LAYER_SELECT_ENABLE_ACTIVE_SERVICE';
|
|
6946
|
+
var LAYER_SELECT_ADD_KEYWORDS_AND_ACTIVE_SERVICES = 'LAYER_SELECT_ADD_KEYWORDS_AND_ACTIVE_SERVICES';
|
|
6947
|
+
var LAYER_SELECT_UPDATE_KEYWORDS = 'LAYER_SELECT_UPDATE_KEYWORDS';
|
|
6948
|
+
|
|
6949
|
+
/* *
|
|
6950
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6951
|
+
* you may not use this file except in compliance with the License.
|
|
6952
|
+
* You may obtain a copy of the License at
|
|
6953
|
+
*
|
|
6954
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6955
|
+
*
|
|
6956
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6957
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6958
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6959
|
+
* See the License for the specific language governing permissions and
|
|
6960
|
+
* limitations under the License.
|
|
6961
|
+
*
|
|
6962
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6963
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
6964
|
+
* */
|
|
6965
|
+
/**
|
|
6966
|
+
* Sets the given text to the searchFilter
|
|
6967
|
+
*
|
|
6968
|
+
* Example: setSearchFilter({ filterText: 'hello world' })
|
|
6969
|
+
* @param {string} payload { filterText: string }
|
|
6970
|
+
*/
|
|
6971
|
+
|
|
6972
|
+
var setSearchFilter = function setSearchFilter(payload) {
|
|
6973
|
+
return {
|
|
6974
|
+
type: LAYER_SELECT_SET_SEARCH_FILTER,
|
|
6975
|
+
payload: payload
|
|
6976
|
+
};
|
|
6977
|
+
};
|
|
6978
|
+
/**
|
|
6979
|
+
* Activates given service in the activeServices array
|
|
6980
|
+
*
|
|
6981
|
+
* Example: enableActiveService({ serviceId: 'service-1' })
|
|
6982
|
+
* @param {string} payload { serviceId: string }
|
|
6983
|
+
*/
|
|
6984
|
+
|
|
6985
|
+
var enableActiveService = function enableActiveService(payload) {
|
|
6986
|
+
return {
|
|
6987
|
+
type: LAYER_SELECT_ENABLE_ACTIVE_SERVICE,
|
|
6988
|
+
payload: payload
|
|
6989
|
+
};
|
|
6990
|
+
};
|
|
6991
|
+
/**
|
|
6992
|
+
* Disables given service in the activeServices array
|
|
6993
|
+
*
|
|
6994
|
+
* Example: disableActiveService({ serviceId: 'service-1' })
|
|
6995
|
+
* @param {string} payload { serviceId: string }
|
|
6996
|
+
*/
|
|
6997
|
+
|
|
6998
|
+
var disableActiveService = function disableActiveService(payload) {
|
|
6999
|
+
return {
|
|
7000
|
+
type: LAYER_SELECT_DISABLE_ACTIVE_SERVICE,
|
|
7001
|
+
payload: payload
|
|
7002
|
+
};
|
|
7003
|
+
};
|
|
7004
|
+
/*
|
|
7005
|
+
* Sets the given keywords to Layer Select store
|
|
7006
|
+
*
|
|
7007
|
+
* Example: addKeywordsAndActiveServices({ serviceUrl: 'https://service.wms', keywords: ['keyword1', 'keyword2'] })
|
|
7008
|
+
* @param {string, string[]} payload {serviceUrl: string keywords: string[] }
|
|
7009
|
+
*/
|
|
7010
|
+
|
|
7011
|
+
var addKeywordsAndActiveServices = function addKeywordsAndActiveServices(payload) {
|
|
7012
|
+
return {
|
|
7013
|
+
type: LAYER_SELECT_ADD_KEYWORDS_AND_ACTIVE_SERVICES,
|
|
7014
|
+
payload: payload
|
|
7015
|
+
};
|
|
7016
|
+
};
|
|
7017
|
+
var updateKeywords = function updateKeywords(payload) {
|
|
7018
|
+
return {
|
|
7019
|
+
type: LAYER_SELECT_UPDATE_KEYWORDS,
|
|
7020
|
+
payload: payload
|
|
7021
|
+
};
|
|
7022
|
+
};
|
|
7023
|
+
|
|
7024
|
+
var _marked = /*#__PURE__*/regeneratorRuntime.mark(newServiceAddedSaga),
|
|
7025
|
+
_marked2 = /*#__PURE__*/regeneratorRuntime.mark(rootSaga);
|
|
7026
|
+
function newServiceAddedSaga(capturedAction) {
|
|
7027
|
+
var addedService, service, keywords;
|
|
7028
|
+
return regeneratorRuntime.wrap(function newServiceAddedSaga$(_context) {
|
|
7029
|
+
while (1) {
|
|
7030
|
+
switch (_context.prev = _context.next) {
|
|
7031
|
+
case 0:
|
|
7032
|
+
addedService = capturedAction.payload;
|
|
7033
|
+
service = addedService.service;
|
|
7034
|
+
keywords = addedService.layers.reduce(function (keywordAccumulator, layer) {
|
|
7035
|
+
return keywordAccumulator.concat(layer.path, layer.keywords);
|
|
7036
|
+
}, []);
|
|
7037
|
+
_context.next = 5;
|
|
7038
|
+
return put(addKeywordsAndActiveServices({
|
|
7039
|
+
serviceUrl: service,
|
|
7040
|
+
keywords: keywords
|
|
7041
|
+
}));
|
|
7042
|
+
|
|
7043
|
+
case 5:
|
|
7044
|
+
case "end":
|
|
7045
|
+
return _context.stop();
|
|
7046
|
+
}
|
|
7047
|
+
}
|
|
7048
|
+
}, _marked);
|
|
7049
|
+
}
|
|
7050
|
+
function rootSaga() {
|
|
7051
|
+
return regeneratorRuntime.wrap(function rootSaga$(_context2) {
|
|
7052
|
+
while (1) {
|
|
7053
|
+
switch (_context2.prev = _context2.next) {
|
|
7054
|
+
case 0:
|
|
7055
|
+
_context2.next = 2;
|
|
7056
|
+
return takeEvery(MAP_SERVICES_SET_LAYERS, newServiceAddedSaga);
|
|
7057
|
+
|
|
7058
|
+
case 2:
|
|
7059
|
+
case "end":
|
|
7060
|
+
return _context2.stop();
|
|
7061
|
+
}
|
|
7062
|
+
}
|
|
7063
|
+
}, _marked2);
|
|
7064
|
+
}
|
|
7065
|
+
|
|
7066
|
+
/* *
|
|
7067
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7068
|
+
* you may not use this file except in compliance with the License.
|
|
7069
|
+
* You may obtain a copy of the License at
|
|
7070
|
+
*
|
|
7071
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7072
|
+
*
|
|
7073
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7074
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7075
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7076
|
+
* See the License for the specific language governing permissions and
|
|
7077
|
+
* limitations under the License.
|
|
7078
|
+
*
|
|
7079
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7080
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
7081
|
+
* */
|
|
7082
|
+
var layerSelectConfig = {
|
|
7083
|
+
id: 'layerSelect-module',
|
|
7084
|
+
reducerMap: {
|
|
7085
|
+
layerSelect: reducer
|
|
7086
|
+
},
|
|
7087
|
+
sagas: [rootSaga]
|
|
7088
|
+
};
|
|
7089
|
+
|
|
7090
|
+
/* *
|
|
7091
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7092
|
+
* you may not use this file except in compliance with the License.
|
|
7093
|
+
* You may obtain a copy of the License at
|
|
7094
|
+
*
|
|
7095
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
7096
|
+
*
|
|
7097
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
7098
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
7099
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
7100
|
+
* See the License for the specific language governing permissions and
|
|
7101
|
+
* limitations under the License.
|
|
7102
|
+
*
|
|
7103
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7104
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
6758
7105
|
* */
|
|
6759
7106
|
var coreModuleConfig = [moduleConfig, synchronizationGroupConfig, uiModuleConfig, layerSelectConfig];
|
|
6760
7107
|
|
|
@@ -6784,7 +7131,7 @@ var recurseNodes = function recurseNodes(nodesToRecur) {
|
|
|
6784
7131
|
leaf: nodesToRecur.leaf,
|
|
6785
7132
|
name: nodesToRecur.name,
|
|
6786
7133
|
title: nodesToRecur.text,
|
|
6787
|
-
path: nodesToRecur.path
|
|
7134
|
+
path: nodesToRecur.path || [],
|
|
6788
7135
|
children: [],
|
|
6789
7136
|
keywords: nodesToRecur.keywords || [],
|
|
6790
7137
|
"abstract": nodesToRecur["abstract"] || ''
|
|
@@ -6817,17 +7164,17 @@ var getLayersFromService = function getLayersFromService(serviceUrl) {
|
|
|
6817
7164
|
});
|
|
6818
7165
|
};
|
|
6819
7166
|
/**
|
|
6820
|
-
* Returns a promise with
|
|
7167
|
+
* Returns a promise with an array of flattened layerobjects from the WMS GetCapabilities document.
|
|
6821
7168
|
* @param serviceUrl The URL of the WMS service
|
|
6822
7169
|
* @param {boolean} forceReload **optional** forceReload: boolean, true will force the layers to be reloaded from the service, defaults to false
|
|
6823
7170
|
*/
|
|
6824
7171
|
|
|
6825
|
-
var
|
|
7172
|
+
var getLayersFlattenedFromService = function getLayersFlattenedFromService(serviceUrl) {
|
|
6826
7173
|
var forceReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
6827
7174
|
return new Promise(function (resolve, reject) {
|
|
6828
7175
|
var serviceObject = WMGetServiceFromStore(serviceUrl);
|
|
6829
|
-
serviceObject.
|
|
6830
|
-
resolve(
|
|
7176
|
+
serviceObject.getLayerObjectsFlat(function (layers) {
|
|
7177
|
+
resolve(layers);
|
|
6831
7178
|
}, function (error) {
|
|
6832
7179
|
reject(new Error(error));
|
|
6833
7180
|
}, forceReload);
|
|
@@ -6858,7 +7205,7 @@ var WMSLayerTreeHeader = function WMSLayerTreeHeader(_ref) {
|
|
|
6858
7205
|
container: true,
|
|
6859
7206
|
direction: "row",
|
|
6860
7207
|
spacing: 1,
|
|
6861
|
-
|
|
7208
|
+
justifyContent: "space-between"
|
|
6862
7209
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
6863
7210
|
item: true
|
|
6864
7211
|
}, /*#__PURE__*/React.createElement(InputLabel, {
|
|
@@ -6875,7 +7222,8 @@ var WMSLayerTreeHeader = function WMSLayerTreeHeader(_ref) {
|
|
|
6875
7222
|
style: {
|
|
6876
7223
|
padding: 3
|
|
6877
7224
|
},
|
|
6878
|
-
onClick: onClickReload
|
|
7225
|
+
onClick: onClickReload,
|
|
7226
|
+
size: "large"
|
|
6879
7227
|
}, /*#__PURE__*/React.createElement(Cached, {
|
|
6880
7228
|
fontSize: "small"
|
|
6881
7229
|
})))));
|
|
@@ -7412,7 +7760,7 @@ var radarLayer$1 = {
|
|
|
7412
7760
|
name: 'RAD_NL25_PCP_CM',
|
|
7413
7761
|
format: 'image/png',
|
|
7414
7762
|
enabled: true,
|
|
7415
|
-
style: '
|
|
7763
|
+
style: 'radar/nearest',
|
|
7416
7764
|
id: generateLayerId(),
|
|
7417
7765
|
layerType: LayerType.mapLayer
|
|
7418
7766
|
};
|
|
@@ -7737,7 +8085,7 @@ var defaultConfigurations = /*#__PURE__*/Object.freeze({
|
|
|
7737
8085
|
preloadedDefaultMapServices: preloadedDefaultMapServices
|
|
7738
8086
|
});
|
|
7739
8087
|
|
|
7740
|
-
var useStyles$
|
|
8088
|
+
var useStyles$H = makeStyles({
|
|
7741
8089
|
buttonDiv: {
|
|
7742
8090
|
position: 'relative'
|
|
7743
8091
|
},
|
|
@@ -7773,7 +8121,7 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
|
|
|
7773
8121
|
handleClose = _ref.handleClose,
|
|
7774
8122
|
_ref$layerType = _ref.layerType,
|
|
7775
8123
|
layerType = _ref$layerType === void 0 ? LayerType.mapLayer : _ref$layerType;
|
|
7776
|
-
var classes = useStyles$
|
|
8124
|
+
var classes = useStyles$H();
|
|
7777
8125
|
|
|
7778
8126
|
var _React$useState = React.useState(''),
|
|
7779
8127
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -7884,7 +8232,8 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
|
|
|
7884
8232
|
fullWidth: true,
|
|
7885
8233
|
disabled: loading,
|
|
7886
8234
|
error: urlError !== '',
|
|
7887
|
-
helperText: urlError
|
|
8235
|
+
helperText: urlError,
|
|
8236
|
+
variant: "standard"
|
|
7888
8237
|
})), /*#__PURE__*/React.createElement(Grid, {
|
|
7889
8238
|
item: true,
|
|
7890
8239
|
xs: 2,
|
|
@@ -7893,7 +8242,8 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
|
|
|
7893
8242
|
"data-testid": "add-service",
|
|
7894
8243
|
onClick: handleAddServiceURL,
|
|
7895
8244
|
color: "primary",
|
|
7896
|
-
disabled: loading
|
|
8245
|
+
disabled: loading,
|
|
8246
|
+
size: "large"
|
|
7897
8247
|
}, /*#__PURE__*/React.createElement(Add, null)), loading && /*#__PURE__*/React.createElement(CircularProgress, {
|
|
7898
8248
|
size: 35,
|
|
7899
8249
|
className: classes.loadingButton
|
|
@@ -7925,7 +8275,7 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
|
|
|
7925
8275
|
}, "Close")));
|
|
7926
8276
|
};
|
|
7927
8277
|
|
|
7928
|
-
var useStyles$
|
|
8278
|
+
var useStyles$G = makeStyles(function (theme) {
|
|
7929
8279
|
return {
|
|
7930
8280
|
buttonDiv: {
|
|
7931
8281
|
position: 'relative'
|
|
@@ -7960,7 +8310,7 @@ var AddLayersButton = function AddLayersButton(_ref) {
|
|
|
7960
8310
|
_ref$shouldFocus = _ref.shouldFocus,
|
|
7961
8311
|
shouldFocus = _ref$shouldFocus === void 0 ? false : _ref$shouldFocus;
|
|
7962
8312
|
var ref = React.useRef(null);
|
|
7963
|
-
var classes = useStyles$
|
|
8313
|
+
var classes = useStyles$G();
|
|
7964
8314
|
|
|
7965
8315
|
var _React$useState = React.useState(false),
|
|
7966
8316
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -7984,7 +8334,8 @@ var AddLayersButton = function AddLayersButton(_ref) {
|
|
|
7984
8334
|
className: classes.button,
|
|
7985
8335
|
disableRipple: true,
|
|
7986
8336
|
"data-testid": "addLayersButton",
|
|
7987
|
-
ref: ref
|
|
8337
|
+
ref: ref,
|
|
8338
|
+
size: "large"
|
|
7988
8339
|
}, /*#__PURE__*/React.createElement(Add, null))), /*#__PURE__*/React.createElement(AddLayersPopup, {
|
|
7989
8340
|
open: open,
|
|
7990
8341
|
handleClose: handleClose,
|
|
@@ -8085,7 +8436,7 @@ var widthToWidthClass = function widthToWidthClass(w) {
|
|
|
8085
8436
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8086
8437
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8087
8438
|
* */
|
|
8088
|
-
var useStyles$
|
|
8439
|
+
var useStyles$F = makeStyles(function (theme) {
|
|
8089
8440
|
return {
|
|
8090
8441
|
button: {
|
|
8091
8442
|
width: '24px',
|
|
@@ -8102,7 +8453,7 @@ var LayerSelectButtonConnect = function LayerSelectButtonConnect(_ref) {
|
|
|
8102
8453
|
_ref$source = _ref.source,
|
|
8103
8454
|
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
8104
8455
|
var dispatch = useDispatch();
|
|
8105
|
-
var classes = useStyles$
|
|
8456
|
+
var classes = useStyles$F();
|
|
8106
8457
|
var currentActiveMapId = useSelector(function (store) {
|
|
8107
8458
|
return getDialogMapId(store, 'layerSelect');
|
|
8108
8459
|
});
|
|
@@ -8124,7 +8475,8 @@ var LayerSelectButtonConnect = function LayerSelectButtonConnect(_ref) {
|
|
|
8124
8475
|
className: classes.button,
|
|
8125
8476
|
id: "layerSelectButton",
|
|
8126
8477
|
"data-testid": "layerSelectButton",
|
|
8127
|
-
disableRipple: true
|
|
8478
|
+
disableRipple: true,
|
|
8479
|
+
size: "large"
|
|
8128
8480
|
}, /*#__PURE__*/React.createElement(Add, null)));
|
|
8129
8481
|
};
|
|
8130
8482
|
|
|
@@ -8144,7 +8496,7 @@ var LayerSelectButtonConnect = function LayerSelectButtonConnect(_ref) {
|
|
|
8144
8496
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8145
8497
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8146
8498
|
* */
|
|
8147
|
-
var useStyles$
|
|
8499
|
+
var useStyles$E = makeStyles({
|
|
8148
8500
|
row: {
|
|
8149
8501
|
height: '32px'
|
|
8150
8502
|
},
|
|
@@ -8168,7 +8520,7 @@ var DescriptionRow = function DescriptionRow(_ref) {
|
|
|
8168
8520
|
layerManagerWidth = _ref.layerManagerWidth,
|
|
8169
8521
|
_ref$layerSelect = _ref.layerSelect,
|
|
8170
8522
|
layerSelect = _ref$layerSelect === void 0 ? false : _ref$layerSelect;
|
|
8171
|
-
var classes = useStyles$
|
|
8523
|
+
var classes = useStyles$E();
|
|
8172
8524
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
8173
8525
|
return /*#__PURE__*/React.createElement(Grid, {
|
|
8174
8526
|
container: true,
|
|
@@ -8238,6 +8590,12 @@ var useTooltipContainerStyles = makeStyles(function (theme) {
|
|
|
8238
8590
|
color: function color(isEnabled) {
|
|
8239
8591
|
return isEnabled ? theme.palette.geowebColors.layerManager.tableRowDefaultText.rgba : theme.palette.geowebColors.layerManager.tableRowDisabledText.rgba;
|
|
8240
8592
|
},
|
|
8593
|
+
'& .MuiOutlinedInput-input': {
|
|
8594
|
+
padding: '6px 24px 6px 8px'
|
|
8595
|
+
},
|
|
8596
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
8597
|
+
borderColor: 'transparent!important'
|
|
8598
|
+
},
|
|
8241
8599
|
'&:hover .MuiSelect-select': {
|
|
8242
8600
|
backgroundColor: theme.palette.geowebColors.layerManager.tableRowMouseover.rgba
|
|
8243
8601
|
},
|
|
@@ -8344,7 +8702,7 @@ var DimensionSelect = function DimensionSelect(_ref) {
|
|
|
8344
8702
|
return /*#__PURE__*/React.createElement(Grid, {
|
|
8345
8703
|
container: true,
|
|
8346
8704
|
direction: "row",
|
|
8347
|
-
|
|
8705
|
+
justifyContent: "flex-start",
|
|
8348
8706
|
alignItems: "center"
|
|
8349
8707
|
}, /*#__PURE__*/React.createElement(Grid, {
|
|
8350
8708
|
item: true,
|
|
@@ -8420,7 +8778,7 @@ var DimensionSelect = function DimensionSelect(_ref) {
|
|
|
8420
8778
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8421
8779
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8422
8780
|
* */
|
|
8423
|
-
var useStyles$
|
|
8781
|
+
var useStyles$D = makeStyles(function (theme) {
|
|
8424
8782
|
return createStyles({
|
|
8425
8783
|
button: {
|
|
8426
8784
|
height: 28,
|
|
@@ -8462,6 +8820,9 @@ var useStyles$z = makeStyles(function (theme) {
|
|
|
8462
8820
|
return isActive ? theme.palette.geowebColors.buttons.primaryMouseover.fill : theme.palette.geowebColors.layerManager.tableRowMouseover.rgba;
|
|
8463
8821
|
}
|
|
8464
8822
|
}
|
|
8823
|
+
},
|
|
8824
|
+
popper: {
|
|
8825
|
+
pointerEvents: 'none'
|
|
8465
8826
|
}
|
|
8466
8827
|
});
|
|
8467
8828
|
});
|
|
@@ -8479,7 +8840,7 @@ var LayerManagerButton = function LayerManagerButton(_a) {
|
|
|
8479
8840
|
testId = _a.testId,
|
|
8480
8841
|
props = __rest(_a, ["tooltipTitle", "onClick", "isActive", "isEnabled", "icon", "testId"]);
|
|
8481
8842
|
|
|
8482
|
-
var classes = useStyles$
|
|
8843
|
+
var classes = useStyles$D({
|
|
8483
8844
|
isActive: isActive,
|
|
8484
8845
|
isEnabled: isEnabled
|
|
8485
8846
|
});
|
|
@@ -8490,7 +8851,10 @@ var LayerManagerButton = function LayerManagerButton(_a) {
|
|
|
8490
8851
|
|
|
8491
8852
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
8492
8853
|
title: tooltipTitle,
|
|
8493
|
-
placement: "top"
|
|
8854
|
+
placement: "top",
|
|
8855
|
+
classes: {
|
|
8856
|
+
popper: classes.popper
|
|
8857
|
+
}
|
|
8494
8858
|
}, /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
8495
8859
|
size: "small",
|
|
8496
8860
|
onClick: handleClick,
|
|
@@ -8516,7 +8880,7 @@ var LayerManagerButton = function LayerManagerButton(_a) {
|
|
|
8516
8880
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8517
8881
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8518
8882
|
* */
|
|
8519
|
-
var useStyles$
|
|
8883
|
+
var useStyles$C = makeStyles(function (theme) {
|
|
8520
8884
|
return createStyles({
|
|
8521
8885
|
checkbox: {
|
|
8522
8886
|
color: 'inherit',
|
|
@@ -8539,7 +8903,7 @@ var EnableLayer = function EnableLayer(_ref) {
|
|
|
8539
8903
|
var isEnabled = _ref.isEnabled,
|
|
8540
8904
|
title = _ref.title,
|
|
8541
8905
|
onChangeEnableLayer = _ref.onChangeEnableLayer;
|
|
8542
|
-
var classes = useStyles$
|
|
8906
|
+
var classes = useStyles$C(isEnabled);
|
|
8543
8907
|
|
|
8544
8908
|
var onClick = function onClick() {
|
|
8545
8909
|
onChangeEnableLayer(!isEnabled);
|
|
@@ -8595,7 +8959,7 @@ var EnableLayer = function EnableLayer(_ref) {
|
|
|
8595
8959
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8596
8960
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8597
8961
|
* */
|
|
8598
|
-
var useStyles$
|
|
8962
|
+
var useStyles$B = makeStyles(function (theme) {
|
|
8599
8963
|
return createStyles({
|
|
8600
8964
|
dropdownEmpty: {
|
|
8601
8965
|
paddingLeft: 8,
|
|
@@ -8618,7 +8982,7 @@ var RenderLayers = function RenderLayers(_ref) {
|
|
|
8618
8982
|
layers = _ref$layers === void 0 ? [] : _ref$layers,
|
|
8619
8983
|
_ref$isEnabled = _ref.isEnabled,
|
|
8620
8984
|
isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
|
|
8621
|
-
var classes = useStyles$
|
|
8985
|
+
var classes = useStyles$B();
|
|
8622
8986
|
var containerClass = useTooltipContainerStyles(isEnabled);
|
|
8623
8987
|
|
|
8624
8988
|
if (!layers || !layers.length) {
|
|
@@ -8675,7 +9039,7 @@ var RenderLayers = function RenderLayers(_ref) {
|
|
|
8675
9039
|
}));
|
|
8676
9040
|
};
|
|
8677
9041
|
|
|
8678
|
-
var useStyles$
|
|
9042
|
+
var useStyles$A = makeStyles(function (theme) {
|
|
8679
9043
|
return {
|
|
8680
9044
|
opacityDiv: {
|
|
8681
9045
|
height: 'calc(100% - 5px)',
|
|
@@ -8736,7 +9100,7 @@ var OpacitySelect = function OpacitySelect(_ref) {
|
|
|
8736
9100
|
onLayerChangeOpacity = _ref.onLayerChangeOpacity,
|
|
8737
9101
|
_ref$isEnabled = _ref.isEnabled,
|
|
8738
9102
|
isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
|
|
8739
|
-
var classes = useStyles$
|
|
9103
|
+
var classes = useStyles$A();
|
|
8740
9104
|
var sliderClasses = sliderStyles();
|
|
8741
9105
|
var containerClass = useTooltipContainerStyles(isEnabled);
|
|
8742
9106
|
|
|
@@ -8812,7 +9176,7 @@ var OpacitySelect = function OpacitySelect(_ref) {
|
|
|
8812
9176
|
onMouseLeave: onMouseLeave,
|
|
8813
9177
|
onFocus: onFocus,
|
|
8814
9178
|
onBlur: onBlur
|
|
8815
|
-
},
|
|
9179
|
+
}, "".concat(Math.round(currentOpacity * 100), " %"))), open ? /*#__PURE__*/React.createElement("div", {
|
|
8816
9180
|
className: classes.sliderBackground
|
|
8817
9181
|
}, /*#__PURE__*/React.createElement("div", {
|
|
8818
9182
|
className: sliderClasses.sliderHeader
|
|
@@ -8848,7 +9212,7 @@ var OpacitySelect = function OpacitySelect(_ref) {
|
|
|
8848
9212
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8849
9213
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
8850
9214
|
* */
|
|
8851
|
-
var useStyles$
|
|
9215
|
+
var useStyles$z = makeStyles(function (theme) {
|
|
8852
9216
|
return createStyles({
|
|
8853
9217
|
icon: {
|
|
8854
9218
|
minWidth: 32,
|
|
@@ -8865,7 +9229,7 @@ var MenuItemButton = function MenuItemButton(_ref) {
|
|
|
8865
9229
|
var title = _ref.title,
|
|
8866
9230
|
tooltipTitle = _ref.tooltipTitle,
|
|
8867
9231
|
icon = _ref.icon;
|
|
8868
|
-
var classes = useStyles$
|
|
9232
|
+
var classes = useStyles$z();
|
|
8869
9233
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ListItemIcon, {
|
|
8870
9234
|
className: "".concat(classes.icon, " icon")
|
|
8871
9235
|
}, icon), /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -8877,7 +9241,7 @@ var MenuItemButton = function MenuItemButton(_ref) {
|
|
|
8877
9241
|
}, title)));
|
|
8878
9242
|
};
|
|
8879
9243
|
|
|
8880
|
-
var useStyles$
|
|
9244
|
+
var useStyles$y = makeStyles(function (theme) {
|
|
8881
9245
|
return {
|
|
8882
9246
|
menu: {
|
|
8883
9247
|
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
@@ -8895,7 +9259,7 @@ var LayerManagerMenuButton = function LayerManagerMenuButton(_ref) {
|
|
|
8895
9259
|
onLayerDuplicate = _ref.onLayerDuplicate,
|
|
8896
9260
|
_ref$isEnabled = _ref.isEnabled,
|
|
8897
9261
|
isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
|
|
8898
|
-
var classes = useStyles$
|
|
9262
|
+
var classes = useStyles$y();
|
|
8899
9263
|
|
|
8900
9264
|
var _React$useState = React.useState(null),
|
|
8901
9265
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -9020,7 +9384,7 @@ var RenderStyles = function RenderStyles(_ref) {
|
|
|
9020
9384
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9021
9385
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9022
9386
|
* */
|
|
9023
|
-
var useStyles$
|
|
9387
|
+
var useStyles$x = makeStyles(function () {
|
|
9024
9388
|
return createStyles({
|
|
9025
9389
|
icon: {
|
|
9026
9390
|
width: 20,
|
|
@@ -9034,7 +9398,7 @@ var DeleteButton = function DeleteButton(_ref) {
|
|
|
9034
9398
|
onClickDelete = _ref.onClickDelete,
|
|
9035
9399
|
_ref$isEnabled = _ref.isEnabled,
|
|
9036
9400
|
isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
|
|
9037
|
-
var classes = useStyles$
|
|
9401
|
+
var classes = useStyles$x();
|
|
9038
9402
|
return /*#__PURE__*/React.createElement(LayerManagerButton, {
|
|
9039
9403
|
tooltipTitle: tooltipTitle,
|
|
9040
9404
|
onClick: onClickDelete,
|
|
@@ -9062,7 +9426,7 @@ var DeleteButton = function DeleteButton(_ref) {
|
|
|
9062
9426
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9063
9427
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9064
9428
|
* */
|
|
9065
|
-
var useStyles$
|
|
9429
|
+
var useStyles$w = makeStyles(function (theme) {
|
|
9066
9430
|
return createStyles({
|
|
9067
9431
|
icon: {
|
|
9068
9432
|
width: 18,
|
|
@@ -9099,7 +9463,7 @@ var ActivateLayer = function ActivateLayer(_ref2) {
|
|
|
9099
9463
|
isActive = _ref2$isActive === void 0 ? false : _ref2$isActive,
|
|
9100
9464
|
_ref2$isEnabled = _ref2.isEnabled,
|
|
9101
9465
|
isEnabled = _ref2$isEnabled === void 0 ? true : _ref2$isEnabled;
|
|
9102
|
-
var classes = useStyles$
|
|
9466
|
+
var classes = useStyles$w({
|
|
9103
9467
|
isActive: isActive,
|
|
9104
9468
|
isEnabled: isEnabled
|
|
9105
9469
|
});
|
|
@@ -9148,7 +9512,7 @@ var ActivateLayer = function ActivateLayer(_ref2) {
|
|
|
9148
9512
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9149
9513
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9150
9514
|
* */
|
|
9151
|
-
var useStyles$
|
|
9515
|
+
var useStyles$v = makeStyles(function (theme) {
|
|
9152
9516
|
return createStyles({
|
|
9153
9517
|
row: {
|
|
9154
9518
|
background: function background(isEnabled) {
|
|
@@ -9199,7 +9563,7 @@ var LayerRow = function LayerRow(_ref) {
|
|
|
9199
9563
|
layerActiveLayout = _ref.layerActiveLayout,
|
|
9200
9564
|
layerManagerWidth = _ref.layerManagerWidth,
|
|
9201
9565
|
dragHandle = _ref.dragHandle;
|
|
9202
|
-
var classes = useStyles$
|
|
9566
|
+
var classes = useStyles$v(isEnabled);
|
|
9203
9567
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
9204
9568
|
|
|
9205
9569
|
var onClickRow = function onClickRow() {
|
|
@@ -9502,11 +9866,14 @@ var DimensionSelectConnect = function DimensionSelectConnect(_ref) {
|
|
|
9502
9866
|
var RenderStylesConnect = function RenderStylesConnect(_ref) {
|
|
9503
9867
|
var layerId = _ref.layerId;
|
|
9504
9868
|
var dispatch = useDispatch();
|
|
9869
|
+
var layerService = useSelector(function (store) {
|
|
9870
|
+
return getLayerService(store, layerId);
|
|
9871
|
+
});
|
|
9505
9872
|
var layerName = useSelector(function (store) {
|
|
9506
9873
|
return getLayerName(store, layerId);
|
|
9507
9874
|
});
|
|
9508
9875
|
var layerStyles = useSelector(function (store) {
|
|
9509
|
-
return getLayerStyles(store,
|
|
9876
|
+
return getLayerStyles(store, layerService, layerName);
|
|
9510
9877
|
});
|
|
9511
9878
|
var currentLayerStyle = useSelector(function (store) {
|
|
9512
9879
|
return getLayerStyle(store, layerId);
|
|
@@ -9559,7 +9926,7 @@ var RenderLayersConnect = function RenderLayersConnect(_ref) {
|
|
|
9559
9926
|
return getLayerEnabled(store, layerId);
|
|
9560
9927
|
});
|
|
9561
9928
|
var layers = useSelector(function (store) {
|
|
9562
|
-
return
|
|
9929
|
+
return getLayersFromService$1(store, layerService);
|
|
9563
9930
|
});
|
|
9564
9931
|
var layerChangeName$1 = React.useCallback(function (_ref2) {
|
|
9565
9932
|
var layerId = _ref2.layerId,
|
|
@@ -9778,7 +10145,7 @@ var LayerRowConnect = function LayerRowConnect(_ref) {
|
|
|
9778
10145
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
9779
10146
|
* */
|
|
9780
10147
|
var TOOLTIP_TITLE = 'Drag a layer up or down';
|
|
9781
|
-
var useStyles$
|
|
10148
|
+
var useStyles$u = makeStyles(function (theme) {
|
|
9782
10149
|
return {
|
|
9783
10150
|
dragHandle: {
|
|
9784
10151
|
cursor: 'grab',
|
|
@@ -9786,6 +10153,7 @@ var useStyles$q = makeStyles(function (theme) {
|
|
|
9786
10153
|
'&:hover': {
|
|
9787
10154
|
backgroundColor: 'inherit'
|
|
9788
10155
|
},
|
|
10156
|
+
height: 32,
|
|
9789
10157
|
color: function color(_ref) {
|
|
9790
10158
|
var isDisabled = _ref.isDisabled;
|
|
9791
10159
|
return isDisabled ? theme.palette.geowebColors.layerManager.tableRowDefaultIcon.rgba : theme.palette.geowebColors.layerManager.tableRowDisabledIcon.fill;
|
|
@@ -9801,7 +10169,7 @@ var DragHandle = function DragHandle(_ref2) {
|
|
|
9801
10169
|
index = _ref2$index === void 0 ? undefined : _ref2$index,
|
|
9802
10170
|
_ref2$hideTooltip = _ref2.hideTooltip,
|
|
9803
10171
|
hideTooltip = _ref2$hideTooltip === void 0 ? false : _ref2$hideTooltip;
|
|
9804
|
-
var classes = useStyles$
|
|
10172
|
+
var classes = useStyles$u({
|
|
9805
10173
|
isDisabled: isDisabled
|
|
9806
10174
|
});
|
|
9807
10175
|
var tooltipTitle = hideTooltip ? '' : TOOLTIP_TITLE;
|
|
@@ -9818,7 +10186,7 @@ var DragHandle = function DragHandle(_ref2) {
|
|
|
9818
10186
|
});
|
|
9819
10187
|
};
|
|
9820
10188
|
|
|
9821
|
-
var useStyles$
|
|
10189
|
+
var useStyles$t = makeStyles(function () {
|
|
9822
10190
|
return {
|
|
9823
10191
|
layerRows: {
|
|
9824
10192
|
width: '100%',
|
|
@@ -9885,7 +10253,7 @@ var LayerContainerRow = function LayerContainerRow(_ref) {
|
|
|
9885
10253
|
|
|
9886
10254
|
var isSorting = activeDragIndex !== null;
|
|
9887
10255
|
var isDragDisabled = layerIds.length === 1;
|
|
9888
|
-
var classes = useStyles$
|
|
10256
|
+
var classes = useStyles$t(isSorting);
|
|
9889
10257
|
return /*#__PURE__*/React.createElement(Grid, {
|
|
9890
10258
|
container: true,
|
|
9891
10259
|
item: true,
|
|
@@ -10095,7 +10463,7 @@ var BaseLayersConnect = function BaseLayersConnect(_ref) {
|
|
|
10095
10463
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10096
10464
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10097
10465
|
* */
|
|
10098
|
-
var useStyles$
|
|
10466
|
+
var useStyles$s = makeStyles({
|
|
10099
10467
|
layerRow: {
|
|
10100
10468
|
width: '100%',
|
|
10101
10469
|
height: '36px'
|
|
@@ -10118,7 +10486,7 @@ var BaseLayerRow = function BaseLayerRow(_ref) {
|
|
|
10118
10486
|
layerManagerWidth = _ref.layerManagerWidth,
|
|
10119
10487
|
_ref$tooltip = _ref.tooltip,
|
|
10120
10488
|
tooltip = _ref$tooltip === void 0 ? '' : _ref$tooltip;
|
|
10121
|
-
var classes = useStyles$
|
|
10489
|
+
var classes = useStyles$s();
|
|
10122
10490
|
var columnSizes = layerManagerWidth === LayerManagerWidth.sm ? LayerManagerColumnsSmall() : LayerManagerColumnsLarge();
|
|
10123
10491
|
return /*#__PURE__*/React.createElement(Grid, {
|
|
10124
10492
|
container: true,
|
|
@@ -10147,7 +10515,7 @@ var BaseLayerRow = function BaseLayerRow(_ref) {
|
|
|
10147
10515
|
})));
|
|
10148
10516
|
};
|
|
10149
10517
|
|
|
10150
|
-
var useStyles$
|
|
10518
|
+
var useStyles$r = makeStyles({
|
|
10151
10519
|
layerRowContainer: {
|
|
10152
10520
|
position: 'relative',
|
|
10153
10521
|
width: '100%',
|
|
@@ -10182,7 +10550,7 @@ var LayerManager = function LayerManager(_ref) {
|
|
|
10182
10550
|
layerSelect = _ref$layerSelect === void 0 ? false : _ref$layerSelect,
|
|
10183
10551
|
_ref$showAddLayersToo = _ref.showAddLayersTooltip,
|
|
10184
10552
|
showAddLayersTooltip = _ref$showAddLayersToo === void 0 ? true : _ref$showAddLayersToo;
|
|
10185
|
-
var classes = useStyles$
|
|
10553
|
+
var classes = useStyles$r();
|
|
10186
10554
|
|
|
10187
10555
|
var _React$useState = React.useState(LayerManagerWidth.lg),
|
|
10188
10556
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -10239,72 +10607,686 @@ var LayerManager = function LayerManager(_ref) {
|
|
|
10239
10607
|
}))));
|
|
10240
10608
|
};
|
|
10241
10609
|
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10264
|
-
|
|
10265
|
-
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10610
|
+
/* *
|
|
10611
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10612
|
+
* you may not use this file except in compliance with the License.
|
|
10613
|
+
* You may obtain a copy of the License at
|
|
10614
|
+
*
|
|
10615
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10616
|
+
*
|
|
10617
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10618
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10619
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10620
|
+
* See the License for the specific language governing permissions and
|
|
10621
|
+
* limitations under the License.
|
|
10622
|
+
*
|
|
10623
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10624
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10625
|
+
* */
|
|
10626
|
+
var useButtonStyles = makeStyles(function (theme) {
|
|
10627
|
+
return createStyles({
|
|
10628
|
+
button: {
|
|
10629
|
+
height: '24px',
|
|
10630
|
+
width: function width(_ref) {
|
|
10631
|
+
var _width = _ref.width;
|
|
10632
|
+
return _width ? "".concat(_width, "px") : '24px';
|
|
10633
|
+
},
|
|
10634
|
+
border: 0,
|
|
10635
|
+
backgroundColor: theme.palette.geowebColors.buttons.surfaceIconDefault.fill,
|
|
10636
|
+
borderRadius: '4.5px',
|
|
10637
|
+
textTransform: 'none',
|
|
10638
|
+
'& svg path, svg text': {
|
|
10639
|
+
fill: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat
|
|
10640
|
+
},
|
|
10641
|
+
'&:hover': {
|
|
10642
|
+
backgroundColor: theme.palette.geowebColors.buttons.flatMouseover.fill
|
|
10643
|
+
},
|
|
10644
|
+
'&:disabled': {
|
|
10645
|
+
backgroundColor: theme.palette.geowebColors.buttons.disabled.fill,
|
|
10646
|
+
'& svg path, svg text': {
|
|
10647
|
+
fill: theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
|
|
10648
|
+
},
|
|
10649
|
+
border: "1px solid ".concat(theme.palette.geowebColors.buttons.disabled.fill)
|
|
10650
|
+
},
|
|
10651
|
+
'&.Mui-selected': {
|
|
10652
|
+
backgroundColor: theme.palette.geowebColors.buttons.primaryActive.fill,
|
|
10653
|
+
'&:hover': {
|
|
10654
|
+
backgroundColor: theme.palette.geowebColors.buttons.primaryMouseover.fill
|
|
10655
|
+
},
|
|
10656
|
+
'& svg': {
|
|
10657
|
+
backgroundColor: 'transparent'
|
|
10658
|
+
},
|
|
10659
|
+
'& svg path, svg text': {
|
|
10660
|
+
fill: theme.palette.geowebColors.typographyAndIcons.buttonIcon
|
|
10661
|
+
}
|
|
10662
|
+
}
|
|
10663
|
+
}
|
|
10664
|
+
});
|
|
10665
|
+
});
|
|
10666
|
+
|
|
10667
|
+
var ToggleIconButton = function ToggleIconButton(_a) {
|
|
10668
|
+
var active = _a.active,
|
|
10669
|
+
width = _a.width,
|
|
10670
|
+
children = _a.children,
|
|
10671
|
+
_a$value = _a.value,
|
|
10672
|
+
value = _a$value === void 0 ? 0 : _a$value,
|
|
10673
|
+
props = __rest(_a, ["active", "width", "children", "value"]);
|
|
10674
|
+
|
|
10675
|
+
var classes = useButtonStyles({
|
|
10676
|
+
width: width
|
|
10677
|
+
});
|
|
10678
|
+
return /*#__PURE__*/React.createElement(ToggleButton, Object.assign({
|
|
10679
|
+
className: classes.button,
|
|
10680
|
+
disableRipple: true,
|
|
10681
|
+
selected: active,
|
|
10682
|
+
value: value
|
|
10683
|
+
}, props), children);
|
|
10684
|
+
};
|
|
10685
|
+
|
|
10686
|
+
/* *
|
|
10687
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10688
|
+
* you may not use this file except in compliance with the License.
|
|
10689
|
+
* You may obtain a copy of the License at
|
|
10690
|
+
*
|
|
10691
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10692
|
+
*
|
|
10693
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10694
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10695
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10696
|
+
* See the License for the specific language governing permissions and
|
|
10697
|
+
* limitations under the License.
|
|
10698
|
+
*
|
|
10699
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10700
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10701
|
+
* */
|
|
10702
|
+
|
|
10703
|
+
var KeywordFilterButtonConnect = function KeywordFilterButtonConnect(_ref) {
|
|
10704
|
+
var mapId = _ref.mapId,
|
|
10705
|
+
_ref$source = _ref.source,
|
|
10706
|
+
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
10707
|
+
var dispatch = useDispatch();
|
|
10708
|
+
var currentActiveMapId = useSelector(function (store) {
|
|
10709
|
+
return getDialogMapId(store, 'keywordFilter');
|
|
10710
|
+
});
|
|
10711
|
+
var isOpenInStore = useSelector(function (store) {
|
|
10712
|
+
return getisDialogOpen(store, 'keywordFilter');
|
|
10713
|
+
});
|
|
10714
|
+
var openFilterResultsDialog = React.useCallback(function () {
|
|
10715
|
+
dispatch(setActiveMapIdForDialog({
|
|
10716
|
+
type: 'keywordFilter',
|
|
10717
|
+
activeMapId: mapId,
|
|
10718
|
+
setOpen: currentActiveMapId !== mapId ? true : !isOpenInStore,
|
|
10719
|
+
source: source
|
|
10720
|
+
}));
|
|
10721
|
+
}, [currentActiveMapId, dispatch, isOpenInStore, mapId, source]);
|
|
10722
|
+
return /*#__PURE__*/React.createElement(ToggleIconButton, {
|
|
10723
|
+
onClick: openFilterResultsDialog,
|
|
10724
|
+
active: isOpenInStore,
|
|
10725
|
+
id: "keywordFilterButton",
|
|
10726
|
+
"data-testid": "keywordFilterButton",
|
|
10727
|
+
disableRipple: true
|
|
10728
|
+
}, /*#__PURE__*/React.createElement(SvgIcon, {
|
|
10729
|
+
viewBox: "0 0 24 24",
|
|
10730
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10731
|
+
}, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
10732
|
+
d: "M14.155 12.567c1.362 0 2.523.848 2.992 2.043h1.895a1.173 1.173 0 0 1 0 2.346h-1.895A3.213 3.213 0 0 1 14.155 19a3.213 3.213 0 0 1-2.992-2.044h-5.99a1.172 1.172 0 1 1 0-2.346h5.99a3.214 3.214 0 0 1 2.992-2.043zm0 1.755a1.461 1.461 0 1 0 0 2.922 1.461 1.461 0 0 0 0-2.922zM10.06 5c1.362 0 2.524.848 2.992 2.044h5.99a1.173 1.173 0 1 1 0 2.344h-5.99a3.214 3.214 0 0 1-2.992 2.044 3.216 3.216 0 0 1-2.992-2.044H5.173a1.172 1.172 0 1 1 0-2.344h1.895A3.216 3.216 0 0 1 10.06 5zm0 1.754a1.461 1.461 0 1 0 0 2.922 1.461 1.461 0 0 0 0-2.922z",
|
|
10733
|
+
fill: "#FFF",
|
|
10734
|
+
fillRule: "evenodd"
|
|
10735
|
+
}))));
|
|
10736
|
+
};
|
|
10737
|
+
|
|
10738
|
+
/* *
|
|
10739
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10740
|
+
* you may not use this file except in compliance with the License.
|
|
10741
|
+
* You may obtain a copy of the License at
|
|
10742
|
+
*
|
|
10743
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10744
|
+
*
|
|
10745
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10746
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10747
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10748
|
+
* See the License for the specific language governing permissions and
|
|
10749
|
+
* limitations under the License.
|
|
10750
|
+
*
|
|
10751
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10752
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10753
|
+
* */
|
|
10754
|
+
|
|
10755
|
+
var layerSelectStore = function layerSelectStore(store) {
|
|
10756
|
+
return store && store.layerSelect ? store.layerSelect : null;
|
|
10757
|
+
};
|
|
10758
|
+
/**
|
|
10759
|
+
* Returns search filter string
|
|
10760
|
+
*
|
|
10761
|
+
* Example getSearchFilter(store);
|
|
10762
|
+
* @param {object} store store: object - store object
|
|
10763
|
+
* @returns {array} returnType: string
|
|
10764
|
+
*/
|
|
10765
|
+
|
|
10766
|
+
|
|
10767
|
+
var getSearchFilter = createSelector(layerSelectStore, function (store) {
|
|
10768
|
+
return store ? store.filters.searchFilter : '';
|
|
10769
|
+
});
|
|
10770
|
+
/**
|
|
10771
|
+
* Returns active services array
|
|
10772
|
+
*
|
|
10773
|
+
* Example getActiveServices(store);
|
|
10774
|
+
* @param {object} store store: object - store object
|
|
10775
|
+
* @returns {array} returnType: array of active services
|
|
10776
|
+
*/
|
|
10777
|
+
|
|
10778
|
+
var getActiveServices = createSelector(layerSelectStore, function (store) {
|
|
10779
|
+
var _a;
|
|
10780
|
+
|
|
10781
|
+
return store ? (_a = store === null || store === void 0 ? void 0 : store.filters) === null || _a === void 0 ? void 0 : _a.activeServices.byId : {};
|
|
10782
|
+
});
|
|
10783
|
+
/**
|
|
10784
|
+
* Returns all ids of enabled services
|
|
10785
|
+
*
|
|
10786
|
+
* Example getEnabledServiceIds(store);
|
|
10787
|
+
* @param {object} store store: object - store object
|
|
10788
|
+
* @returns {array} returnType: array of service ids that are enabled
|
|
10789
|
+
*/
|
|
10790
|
+
|
|
10791
|
+
var getEnabledServiceIds = createSelector(layerSelectStore, function (store) {
|
|
10792
|
+
var _a, _b;
|
|
10793
|
+
|
|
10794
|
+
var enabledServices = (_b = (_a = store === null || store === void 0 ? void 0 : store.filters) === null || _a === void 0 ? void 0 : _a.activeServices.allIds.filter(function (service) {
|
|
10795
|
+
var _a;
|
|
10796
|
+
|
|
10797
|
+
return (_a = store === null || store === void 0 ? void 0 : store.filters) === null || _a === void 0 ? void 0 : _a.activeServices.byId[service].enabled;
|
|
10798
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
10799
|
+
return enabledServices.map(function (service) {
|
|
10800
|
+
var _a;
|
|
10801
|
+
|
|
10802
|
+
return (_a = store === null || store === void 0 ? void 0 : store.filters) === null || _a === void 0 ? void 0 : _a.activeServices.byId[service].id;
|
|
10803
|
+
});
|
|
10804
|
+
});
|
|
10805
|
+
/**
|
|
10806
|
+
* Returns all keywords
|
|
10807
|
+
*
|
|
10808
|
+
* Example getKeywords(store);
|
|
10809
|
+
* @param {object} store store: object - store object
|
|
10810
|
+
* @returns {array} returnType: array of keyword objects
|
|
10811
|
+
*/
|
|
10812
|
+
|
|
10813
|
+
var getKeywords = createSelector(layerSelectStore, function (store) {
|
|
10814
|
+
return store ? store.filters.keywords : [];
|
|
10815
|
+
});
|
|
10816
|
+
|
|
10817
|
+
/* *
|
|
10818
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10819
|
+
* you may not use this file except in compliance with the License.
|
|
10820
|
+
* You may obtain a copy of the License at
|
|
10821
|
+
*
|
|
10822
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10823
|
+
*
|
|
10824
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10825
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10826
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10827
|
+
* See the License for the specific language governing permissions and
|
|
10828
|
+
* limitations under the License.
|
|
10829
|
+
*
|
|
10830
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10831
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10832
|
+
* */
|
|
10833
|
+
var style = {
|
|
10834
|
+
dialogTitle: {
|
|
10835
|
+
display: 'flex',
|
|
10836
|
+
justifyContent: 'space-between',
|
|
10837
|
+
padding: '16px 16px 20px 16px',
|
|
10838
|
+
' span': {
|
|
10839
|
+
fontSize: '2.125rem'
|
|
10840
|
+
}
|
|
10841
|
+
},
|
|
10842
|
+
container: function container(theme) {
|
|
10843
|
+
return {
|
|
10844
|
+
'& .MuiDialog-paper': {
|
|
10845
|
+
backgroundColor: theme.palette.geowebColors.cards.cardContainer
|
|
10846
|
+
}
|
|
10847
|
+
};
|
|
10848
|
+
},
|
|
10849
|
+
closeBtn: function closeBtn(theme) {
|
|
10850
|
+
return {
|
|
10851
|
+
color: theme.palette.geowebColors.captions.captionDisabled.color,
|
|
10852
|
+
marginTop: 'auto',
|
|
10853
|
+
marginBottom: 'auto'
|
|
10854
|
+
};
|
|
10855
|
+
},
|
|
10856
|
+
textField: {
|
|
10857
|
+
width: '100%'
|
|
10858
|
+
},
|
|
10859
|
+
dialogContent: {
|
|
10860
|
+
padding: '8px 16px'
|
|
10861
|
+
},
|
|
10862
|
+
footerContent: {
|
|
10863
|
+
padding: '16px'
|
|
10864
|
+
}
|
|
10865
|
+
};
|
|
10866
|
+
var ADD_HEADING = 'Add a new service';
|
|
10867
|
+
var EDIT_HEADING = 'Edit service';
|
|
10868
|
+
var SAVE_HEADING = 'Save service';
|
|
10869
|
+
|
|
10870
|
+
var getTitleForVariant = function getTitleForVariant(variant) {
|
|
10871
|
+
switch (variant) {
|
|
10872
|
+
case 'add':
|
|
10873
|
+
return ADD_HEADING;
|
|
10874
|
+
|
|
10875
|
+
case 'edit':
|
|
10876
|
+
return EDIT_HEADING;
|
|
10877
|
+
|
|
10878
|
+
default:
|
|
10879
|
+
return SAVE_HEADING;
|
|
10880
|
+
}
|
|
10881
|
+
};
|
|
10882
|
+
|
|
10883
|
+
var ServicePopup = function ServicePopup(_ref) {
|
|
10884
|
+
var servicePopupVariant = _ref.servicePopupVariant,
|
|
10885
|
+
_ref$hideBackdrop = _ref.hideBackdrop,
|
|
10886
|
+
hideBackdrop = _ref$hideBackdrop === void 0 ? false : _ref$hideBackdrop,
|
|
10887
|
+
isOpen = _ref.isOpen,
|
|
10888
|
+
closePopup = _ref.closePopup,
|
|
10889
|
+
_ref$url = _ref.url,
|
|
10890
|
+
url = _ref$url === void 0 ? '' : _ref$url;
|
|
10891
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
10892
|
+
open: isOpen,
|
|
10893
|
+
hideBackdrop: hideBackdrop,
|
|
10894
|
+
fullWidth: true,
|
|
10895
|
+
maxWidth: "xs",
|
|
10896
|
+
sx: style.container
|
|
10897
|
+
}, /*#__PURE__*/React.createElement(DialogTitle, {
|
|
10898
|
+
sx: style.dialogTitle
|
|
10899
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
10900
|
+
variant: "h5",
|
|
10901
|
+
component: "span"
|
|
10902
|
+
}, getTitleForVariant(servicePopupVariant)), /*#__PURE__*/React.createElement(IconButton, {
|
|
10903
|
+
size: "small",
|
|
10904
|
+
onClick: closePopup,
|
|
10905
|
+
"data-testid": "ClosePopupButtonCross",
|
|
10906
|
+
sx: style.closeBtn
|
|
10907
|
+
}, /*#__PURE__*/React.createElement(Close, null))), /*#__PURE__*/React.createElement(DialogContent, {
|
|
10908
|
+
sx: style.dialogContent
|
|
10909
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
10910
|
+
sx: style.textField,
|
|
10911
|
+
variant: "filled",
|
|
10912
|
+
label: "Service name"
|
|
10913
|
+
})), /*#__PURE__*/React.createElement(DialogContent, {
|
|
10914
|
+
sx: style.dialogContent
|
|
10915
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
10916
|
+
sx: style.textField,
|
|
10917
|
+
variant: "filled",
|
|
10918
|
+
label: "Service URL",
|
|
10919
|
+
defaultValue: url,
|
|
10920
|
+
id: "service-url"
|
|
10921
|
+
})), /*#__PURE__*/React.createElement(DialogContent, {
|
|
10922
|
+
sx: style.dialogContent
|
|
10923
|
+
}, /*#__PURE__*/React.createElement(TextField, {
|
|
10924
|
+
sx: style.textField,
|
|
10925
|
+
variant: "filled",
|
|
10926
|
+
multiline: true,
|
|
10927
|
+
rows: 4,
|
|
10928
|
+
label: "Abstracts",
|
|
10929
|
+
helperText: "Short description of what this service does"
|
|
10930
|
+
})), /*#__PURE__*/React.createElement(DialogActions, {
|
|
10931
|
+
sx: style.footerContent
|
|
10932
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
10933
|
+
variant: "tertiary",
|
|
10934
|
+
onClick: closePopup,
|
|
10935
|
+
"data-testid": "ClosePopupButtonCancel",
|
|
10936
|
+
sx: {
|
|
10937
|
+
width: '117px'
|
|
10938
|
+
}
|
|
10939
|
+
}, "cancel"), /*#__PURE__*/React.createElement(Button, {
|
|
10940
|
+
sx: {
|
|
10941
|
+
width: '117px',
|
|
10942
|
+
marginLeft: '16px!important'
|
|
10943
|
+
},
|
|
10944
|
+
variant: "primary"
|
|
10945
|
+
}, "save")));
|
|
10946
|
+
};
|
|
10947
|
+
|
|
10948
|
+
var isURL = function isURL(string) {
|
|
10949
|
+
return /^https?:\/\//.test(string);
|
|
10950
|
+
};
|
|
10951
|
+
var useStyles$q = makeStyles(function (theme) {
|
|
10952
|
+
return {
|
|
10953
|
+
iconButton: {
|
|
10954
|
+
color: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat
|
|
10955
|
+
},
|
|
10956
|
+
saveButton: {
|
|
10957
|
+
color: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat,
|
|
10958
|
+
textTransform: 'none',
|
|
10959
|
+
border: "1px solid ".concat(theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat)
|
|
10960
|
+
}
|
|
10961
|
+
};
|
|
10962
|
+
});
|
|
10963
|
+
var clearIconPath = 'M12,2 C17.5228475,2 22,6.4771525 22,12 C22,17.5228475 17.5228475,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M15.44426,7.26697571 L12.0002861,10.7110482 L8.55573996,7.26697571 C8.19978253,6.9110081 7.62292549,6.9110081 7.26696807,7.26697571 C6.91101064,7.62294331 6.91101064,8.19981687 7.26696807,8.55578447 L10.7115142,11.9998569 L7.26696807,15.4445017 C6.91101064,15.8004693 6.91101064,16.3767705 7.26696807,16.7333104 C7.44494678,16.910722 7.67843653,17 7.91192629,17 C8.14484377,17 8.37776125,16.910722 8.55573996,16.7333104 L12.0002861,13.289238 L15.44426,16.7333104 C15.6222388,16.910722 15.8551562,17 16.088646,17 C16.3221357,17 16.5550532,16.910722 16.7330319,16.7333104 C17.0889894,16.3767705 17.0889894,15.8004693 16.7330319,15.4445017 L13.289058,11.9998569 L16.7330319,8.55578447 C17.0889894,8.19981687 17.0889894,7.62294331 16.7330319,7.26697571 C16.3770745,6.9110081 15.8002175,6.9110081 15.44426,7.26697571 Z';
|
|
10964
|
+
var clearIcon = /*#__PURE__*/React__default.createElement(SvgIcon, {
|
|
10965
|
+
style: {
|
|
10966
|
+
width: '24px',
|
|
10967
|
+
height: '24px'
|
|
10968
|
+
},
|
|
10969
|
+
viewBox: "0 0 24 24",
|
|
10970
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10971
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
10972
|
+
d: clearIconPath
|
|
10973
|
+
}));
|
|
10974
|
+
var searchIconPath = 'M7.81701445,12.5845372 L7.81701445,12.5845372 C7.17924024,11.946763 6.82932049,11.100321 6.82932049,10.1993044 C6.82932049,9.29828785 7.17924024,8.45077582 7.81701445,7.8140717 C8.47405029,7.15703585 9.3376137,6.82851792 10.2022472,6.82851792 C11.0658106,6.82851792 11.929374,7.15703585 12.5874799,7.8140717 C13.9026217,9.12921348 13.9026217,11.2693954 12.5874799,12.5845372 C11.9497057,13.2212413 11.1021937,13.5722311 10.2022472,13.5722311 C9.3012306,13.5722311 8.45371857,13.2212413 7.81701445,12.5845372 M19.5858748,17.581862 L15.4681648,13.465222 C16.9513109,11.0735688 16.6613162,7.88683788 14.5874799,5.81300161 C12.1690744,3.39566613 8.23434992,3.39566613 5.81594436,5.81300161 C4.64419476,6.9847512 4,8.54280364 4,10.1993044 C4,11.8558052 4.64419476,13.4138577 5.81594436,14.5845372 C6.98769395,15.7562868 8.5446763,16.4015516 10.2022472,16.4015516 C11.376137,16.4015516 12.4965222,16.0719636 13.4681648,15.4662921 L17.5837346,19.582932 C17.8608882,19.8590155 18.2225789,19.9970572 18.5853398,19.9970572 C18.9470305,19.9970572 19.3087212,19.8590155 19.5858748,19.582932 C20.1380417,19.029695 20.1380417,18.135099 19.5858748,17.581862';
|
|
10975
|
+
var searchIcon = /*#__PURE__*/React__default.createElement(SvgIcon, {
|
|
10976
|
+
style: {
|
|
10977
|
+
width: '24px',
|
|
10978
|
+
height: '24px'
|
|
10979
|
+
},
|
|
10980
|
+
viewBox: "0 0 24 24",
|
|
10981
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
10982
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
10983
|
+
d: searchIconPath
|
|
10984
|
+
}));
|
|
10985
|
+
|
|
10986
|
+
var SearchFieldButtonContainer = function SearchFieldButtonContainer(_ref) {
|
|
10987
|
+
var localSearchString = _ref.localSearchString,
|
|
10988
|
+
onClickClear = _ref.onClickClear;
|
|
10989
|
+
|
|
10990
|
+
var _React$useState = React__default.useState(false),
|
|
10991
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
10992
|
+
isPopupOpen = _React$useState2[0],
|
|
10993
|
+
setPopupOpen = _React$useState2[1];
|
|
10994
|
+
|
|
10995
|
+
var classes = useStyles$q();
|
|
10996
|
+
var ClearButton = /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
10997
|
+
title: "Clear",
|
|
10998
|
+
placement: "top"
|
|
10999
|
+
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
11000
|
+
className: classes.iconButton,
|
|
11001
|
+
edge: "end",
|
|
11002
|
+
onClick: function onClick() {
|
|
11003
|
+
onClickClear();
|
|
11004
|
+
},
|
|
11005
|
+
size: "large"
|
|
11006
|
+
}, clearIcon));
|
|
11007
|
+
if (isURL(localSearchString)) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
11008
|
+
style: {
|
|
11009
|
+
marginRight: '15px'
|
|
11010
|
+
}
|
|
11011
|
+
}, ClearButton), /*#__PURE__*/React__default.createElement(Button, {
|
|
11012
|
+
variant: "outlined",
|
|
11013
|
+
onClick: function onClick() {
|
|
11014
|
+
return setPopupOpen(true);
|
|
11015
|
+
},
|
|
11016
|
+
className: classes.saveButton
|
|
11017
|
+
}, "Save"), /*#__PURE__*/React__default.createElement(ServicePopup, {
|
|
11018
|
+
servicePopupVariant: "save",
|
|
11019
|
+
isOpen: isPopupOpen,
|
|
11020
|
+
closePopup: function closePopup() {
|
|
11021
|
+
return setPopupOpen(false);
|
|
11022
|
+
},
|
|
11023
|
+
url: localSearchString
|
|
11024
|
+
}));
|
|
11025
|
+
if (localSearchString) return ClearButton;
|
|
11026
|
+
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
11027
|
+
title: "Search",
|
|
11028
|
+
placement: "top"
|
|
11029
|
+
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
11030
|
+
className: classes.iconButton,
|
|
11031
|
+
edge: "end",
|
|
11032
|
+
size: "large"
|
|
11033
|
+
}, searchIcon));
|
|
11034
|
+
};
|
|
11035
|
+
|
|
11036
|
+
var SearchField = function SearchField(_ref) {
|
|
11037
|
+
var searchFilter = _ref.searchFilter,
|
|
11038
|
+
setSearchFilter = _ref.setSearchFilter;
|
|
10271
11039
|
|
|
10272
|
-
var SearchField = function SearchField() {
|
|
10273
11040
|
var _React$useState = React.useState(''),
|
|
10274
11041
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
10275
|
-
|
|
10276
|
-
|
|
11042
|
+
localSearchString = _React$useState2[0],
|
|
11043
|
+
setLocalSearchString = _React$useState2[1]; // mirror store unless typing a URL
|
|
11044
|
+
|
|
11045
|
+
|
|
11046
|
+
React.useEffect(function () {
|
|
11047
|
+
if (isURL(localSearchString)) return;
|
|
11048
|
+
setLocalSearchString(searchFilter); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11049
|
+
}, [searchFilter]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11050
|
+
|
|
11051
|
+
var setSearchFilterDebounced = React.useCallback(debounce(setSearchFilter, 300), []);
|
|
11052
|
+
|
|
11053
|
+
var handleChange = function handleChange(text) {
|
|
11054
|
+
setLocalSearchString(text);
|
|
11055
|
+
if (!isURL(text)) setSearchFilterDebounced(text);else if (searchFilter) setSearchFilterDebounced('');
|
|
11056
|
+
};
|
|
10277
11057
|
|
|
10278
|
-
var classes = useStyles$m();
|
|
10279
11058
|
return /*#__PURE__*/React.createElement(TextField, {
|
|
10280
11059
|
variant: "filled",
|
|
10281
11060
|
label: "Search through services or enter a service URL",
|
|
10282
|
-
value:
|
|
11061
|
+
value: localSearchString,
|
|
10283
11062
|
onChange: function onChange(e) {
|
|
10284
|
-
|
|
11063
|
+
handleChange(e.target.value);
|
|
10285
11064
|
},
|
|
10286
11065
|
autoFocus: true,
|
|
10287
11066
|
fullWidth: true,
|
|
10288
11067
|
InputProps: {
|
|
10289
11068
|
endAdornment: /*#__PURE__*/React.createElement(InputAdornment, {
|
|
10290
11069
|
position: "end"
|
|
10291
|
-
},
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
edge: "end",
|
|
10297
|
-
onClick: function onClick() {
|
|
10298
|
-
return setSearchString('');
|
|
11070
|
+
}, /*#__PURE__*/React.createElement(SearchFieldButtonContainer, {
|
|
11071
|
+
localSearchString: localSearchString,
|
|
11072
|
+
onClickClear: function onClickClear() {
|
|
11073
|
+
setLocalSearchString('');
|
|
11074
|
+
setSearchFilterDebounced('');
|
|
10299
11075
|
}
|
|
10300
|
-
}
|
|
10301
|
-
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
11076
|
+
}))
|
|
11077
|
+
}
|
|
11078
|
+
});
|
|
11079
|
+
};
|
|
11080
|
+
|
|
11081
|
+
/* *
|
|
11082
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11083
|
+
* you may not use this file except in compliance with the License.
|
|
11084
|
+
* You may obtain a copy of the License at
|
|
11085
|
+
*
|
|
11086
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11087
|
+
*
|
|
11088
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11089
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11090
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11091
|
+
* See the License for the specific language governing permissions and
|
|
11092
|
+
* limitations under the License.
|
|
11093
|
+
*
|
|
11094
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11095
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11096
|
+
* */
|
|
11097
|
+
|
|
11098
|
+
var SearchFieldConnect = function SearchFieldConnect() {
|
|
11099
|
+
var dispatch = useDispatch();
|
|
11100
|
+
var searchFilter = useSelector(function (store) {
|
|
11101
|
+
return getSearchFilter(store);
|
|
11102
|
+
});
|
|
11103
|
+
return /*#__PURE__*/React.createElement(SearchField, {
|
|
11104
|
+
setSearchFilter: function setSearchFilter$1(filterText) {
|
|
11105
|
+
return dispatch(setSearchFilter({
|
|
11106
|
+
filterText: filterText
|
|
11107
|
+
}));
|
|
11108
|
+
},
|
|
11109
|
+
searchFilter: searchFilter
|
|
11110
|
+
});
|
|
11111
|
+
};
|
|
11112
|
+
|
|
11113
|
+
/* *
|
|
11114
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11115
|
+
* you may not use this file except in compliance with the License.
|
|
11116
|
+
* You may obtain a copy of the License at
|
|
11117
|
+
*
|
|
11118
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11119
|
+
*
|
|
11120
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11121
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11122
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11123
|
+
* See the License for the specific language governing permissions and
|
|
11124
|
+
* limitations under the License.
|
|
11125
|
+
*
|
|
11126
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11127
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11128
|
+
* */
|
|
11129
|
+
var filterLayersFromService = function filterLayersFromService(serviceId, services, keywords, searchString) {
|
|
11130
|
+
var activeKeywords = keywords.filter(function (keyword) {
|
|
11131
|
+
return keyword.checked;
|
|
11132
|
+
});
|
|
11133
|
+
var keywordList = activeKeywords.map(function (keyword) {
|
|
11134
|
+
return keyword.id;
|
|
11135
|
+
});
|
|
11136
|
+
var allKeywordsActive = keywords.every(function (keyword) {
|
|
11137
|
+
return keyword.checked;
|
|
11138
|
+
});
|
|
11139
|
+
|
|
11140
|
+
if (searchString === '' && allKeywordsActive) {
|
|
11141
|
+
return services[serviceId].layers.filter(function (layer) {
|
|
11142
|
+
return layer.leaf;
|
|
11143
|
+
});
|
|
11144
|
+
}
|
|
11145
|
+
|
|
11146
|
+
var searchStringArray = searchString.split(' ');
|
|
11147
|
+
return services[serviceId].layers.filter(function (layer) {
|
|
11148
|
+
return searchStringArray.every(function (search) {
|
|
11149
|
+
var layerPathAndKeywords = layer.path.concat(layer.keywords);
|
|
11150
|
+
return (!!layerPathAndKeywords && !layerPathAndKeywords.every(function (keyword) {
|
|
11151
|
+
return !keywordList.includes(keyword);
|
|
11152
|
+
}) || allKeywordsActive) && (!!layer.name && layer.name.toLowerCase().includes(search.toLowerCase()) || !!layer.text && layer.text.toLowerCase().includes(search.toLowerCase()) || !!layer["abstract"] && layer["abstract"].toLowerCase().includes(search.toLowerCase()) || !!layerPathAndKeywords && !layerPathAndKeywords.every(function (keyword) {
|
|
11153
|
+
return !keyword.toLowerCase().includes(search.toLowerCase());
|
|
11154
|
+
}) || !!layer.path && !layer.path.every(function (group) {
|
|
11155
|
+
return !group.toLowerCase().includes(search.toLowerCase());
|
|
11156
|
+
}) || services[serviceId].name.toLowerCase().includes(search.toLowerCase()));
|
|
11157
|
+
});
|
|
11158
|
+
}).filter(function (layer) {
|
|
11159
|
+
return layer.leaf;
|
|
11160
|
+
});
|
|
11161
|
+
};
|
|
11162
|
+
|
|
11163
|
+
var useStyles$p = makeStyles(function (theme) {
|
|
11164
|
+
return {
|
|
11165
|
+
layerRow: {
|
|
11166
|
+
background: theme.palette.geowebColors.background.surface,
|
|
11167
|
+
padding: '8px 0px 8px 12px',
|
|
11168
|
+
marginBottom: '4px',
|
|
11169
|
+
height: '64px',
|
|
11170
|
+
border: "solid 1px ".concat(theme.palette.geowebColors.cards.cardContainerBorder)
|
|
11171
|
+
},
|
|
11172
|
+
layerText: {
|
|
11173
|
+
fontSize: '12px',
|
|
11174
|
+
fontWeight: 500,
|
|
11175
|
+
overflow: 'clip',
|
|
11176
|
+
height: '20px',
|
|
11177
|
+
textOverflow: 'ellipsis',
|
|
11178
|
+
whiteSpace: 'nowrap'
|
|
11179
|
+
},
|
|
11180
|
+
layerName: {
|
|
11181
|
+
fontSize: '12px',
|
|
11182
|
+
height: '24px',
|
|
11183
|
+
maxWidth: '100%',
|
|
11184
|
+
overflow: 'clip',
|
|
11185
|
+
"float": 'left',
|
|
11186
|
+
paddingTop: '6px',
|
|
11187
|
+
textOverflow: 'ellipsis',
|
|
11188
|
+
whiteSpace: 'nowrap'
|
|
11189
|
+
},
|
|
11190
|
+
layerNameMaxWidth: {
|
|
11191
|
+
maxWidth: '196px'
|
|
11192
|
+
},
|
|
11193
|
+
layerAbstract: {
|
|
11194
|
+
fontSize: '10px',
|
|
11195
|
+
paddingLeft: '200px',
|
|
11196
|
+
overflow: 'clip',
|
|
11197
|
+
height: '30px'
|
|
11198
|
+
},
|
|
11199
|
+
resultCount: {
|
|
11200
|
+
marginBottom: '4px',
|
|
11201
|
+
fontSize: '12px'
|
|
11202
|
+
}
|
|
11203
|
+
};
|
|
11204
|
+
});
|
|
11205
|
+
|
|
11206
|
+
var LayerList = function LayerList(_ref) {
|
|
11207
|
+
var services = _ref.services,
|
|
11208
|
+
serviceIds = _ref.serviceIds,
|
|
11209
|
+
layerSelectHeight = _ref.layerSelectHeight,
|
|
11210
|
+
searchString = _ref.searchString,
|
|
11211
|
+
keywords = _ref.keywords;
|
|
11212
|
+
var classes = useStyles$p();
|
|
11213
|
+
|
|
11214
|
+
var _React$useState = React.useState(0),
|
|
11215
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
11216
|
+
numberOfLayers = _React$useState2[0],
|
|
11217
|
+
setNumberOfLayers = _React$useState2[1];
|
|
11218
|
+
|
|
11219
|
+
React.useEffect(function () {
|
|
11220
|
+
setNumberOfLayers(serviceIds.reduce(function (totalNumberOfLayers, serviceId) {
|
|
11221
|
+
return totalNumberOfLayers + filterLayersFromService(serviceId, services, keywords, searchString).length;
|
|
11222
|
+
}, 0));
|
|
11223
|
+
}, [serviceIds, keywords, services, searchString]);
|
|
11224
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11225
|
+
"data-testid": "layerList"
|
|
11226
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11227
|
+
className: classes.resultCount
|
|
11228
|
+
}, numberOfLayers, " results"), /*#__PURE__*/React.createElement("div", {
|
|
11229
|
+
style: {
|
|
11230
|
+
height: layerSelectHeight - 199,
|
|
11231
|
+
overflow: 'auto'
|
|
10307
11232
|
}
|
|
11233
|
+
}, serviceIds.map(function (serviceId) {
|
|
11234
|
+
return filterLayersFromService(serviceId, services, keywords, searchString).map(function (layer) {
|
|
11235
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11236
|
+
key: "".concat(serviceId, "-").concat(layer.name),
|
|
11237
|
+
className: classes.layerRow,
|
|
11238
|
+
"data-testid": "layerListLayerRow"
|
|
11239
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11240
|
+
className: classes.layerText
|
|
11241
|
+
}, layer.text), /*#__PURE__*/React.createElement("div", null, layer["abstract"] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
11242
|
+
className: "".concat(classes.layerName, " ").concat(classes.layerNameMaxWidth)
|
|
11243
|
+
}, layer.name), /*#__PURE__*/React.createElement("div", {
|
|
11244
|
+
className: classes.layerAbstract,
|
|
11245
|
+
"data-testid": "layerAbstract"
|
|
11246
|
+
}, layer["abstract"])) : /*#__PURE__*/React.createElement("div", {
|
|
11247
|
+
className: classes.layerName
|
|
11248
|
+
}, layer.name)));
|
|
11249
|
+
});
|
|
11250
|
+
})));
|
|
11251
|
+
};
|
|
11252
|
+
|
|
11253
|
+
/* *
|
|
11254
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11255
|
+
* you may not use this file except in compliance with the License.
|
|
11256
|
+
* You may obtain a copy of the License at
|
|
11257
|
+
*
|
|
11258
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11259
|
+
*
|
|
11260
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11261
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11262
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11263
|
+
* See the License for the specific language governing permissions and
|
|
11264
|
+
* limitations under the License.
|
|
11265
|
+
*
|
|
11266
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11267
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11268
|
+
* */
|
|
11269
|
+
|
|
11270
|
+
var LayerListConnect = function LayerListConnect(_ref) {
|
|
11271
|
+
var layerSelectHeight = _ref.layerSelectHeight;
|
|
11272
|
+
var services = useSelector(function (store) {
|
|
11273
|
+
return getServices(store);
|
|
11274
|
+
});
|
|
11275
|
+
var enabledServiceIds = useSelector(function (store) {
|
|
11276
|
+
return getEnabledServiceIds(store);
|
|
11277
|
+
});
|
|
11278
|
+
var keywords = useSelector(function (store) {
|
|
11279
|
+
return getKeywords(store);
|
|
11280
|
+
});
|
|
11281
|
+
var searchString = useSelector(function (store) {
|
|
11282
|
+
return getSearchFilter(store);
|
|
11283
|
+
});
|
|
11284
|
+
return /*#__PURE__*/React.createElement(LayerList, {
|
|
11285
|
+
services: services,
|
|
11286
|
+
serviceIds: enabledServiceIds,
|
|
11287
|
+
layerSelectHeight: layerSelectHeight,
|
|
11288
|
+
keywords: keywords,
|
|
11289
|
+
searchString: searchString
|
|
10308
11290
|
});
|
|
10309
11291
|
};
|
|
10310
11292
|
|
|
@@ -10324,52 +11306,131 @@ var SearchField = function SearchField() {
|
|
|
10324
11306
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10325
11307
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10326
11308
|
* */
|
|
10327
|
-
var useStyles$
|
|
11309
|
+
var useStyles$o = makeStyles(function (theme) {
|
|
10328
11310
|
return createStyles({
|
|
10329
11311
|
chip: {
|
|
10330
11312
|
height: '32px',
|
|
10331
11313
|
margin: '0 8px 0 0',
|
|
10332
11314
|
padding: '5px 12px 7px',
|
|
10333
11315
|
borderRadius: '20px',
|
|
10334
|
-
border:
|
|
10335
|
-
|
|
10336
|
-
|
|
11316
|
+
border: function border(_ref) {
|
|
11317
|
+
var isEnabled = _ref.isEnabled;
|
|
11318
|
+
return isEnabled ? "solid 1px ".concat(theme.palette.geowebColors.buttons.primaryActive.fill) : "solid 1px ".concat(theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat);
|
|
11319
|
+
},
|
|
11320
|
+
backgroundColor: function backgroundColor(_ref2) {
|
|
11321
|
+
var isEnabled = _ref2.isEnabled;
|
|
11322
|
+
return isEnabled ? theme.palette.geowebColors.buttons.primaryActive.fill : theme.palette.geowebColors.buttons.surfaceIconDefault.fill;
|
|
11323
|
+
},
|
|
11324
|
+
color: function color(_ref3) {
|
|
11325
|
+
var isEnabled = _ref3.isEnabled;
|
|
11326
|
+
return isEnabled ? theme.palette.geowebColors.typographyAndIcons.buttonIcon : theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat;
|
|
11327
|
+
},
|
|
10337
11328
|
"float": 'left',
|
|
10338
11329
|
whiteSpace: 'nowrap',
|
|
10339
11330
|
'&:hover': {
|
|
10340
|
-
backgroundColor:
|
|
11331
|
+
backgroundColor: function backgroundColor(_ref4) {
|
|
11332
|
+
var isEnabled = _ref4.isEnabled;
|
|
11333
|
+
return isEnabled ? theme.palette.geowebColors.buttons.primaryMouseover.fill : theme.palette.geowebColors.buttons.flatMouseover.fill;
|
|
11334
|
+
},
|
|
11335
|
+
border: function border(_ref5) {
|
|
11336
|
+
var isEnabled = _ref5.isEnabled;
|
|
11337
|
+
return isEnabled ? "solid 1px ".concat(theme.palette.geowebColors.buttons.primaryMouseover.fill) : "solid 1px ".concat(theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat);
|
|
11338
|
+
},
|
|
10341
11339
|
cursor: 'pointer'
|
|
10342
11340
|
}
|
|
10343
11341
|
}
|
|
10344
11342
|
});
|
|
10345
11343
|
});
|
|
10346
11344
|
|
|
10347
|
-
var ServiceChip = function ServiceChip(
|
|
11345
|
+
var ServiceChip = function ServiceChip(_ref6) {
|
|
11346
|
+
var _ref6$all = _ref6.all,
|
|
11347
|
+
all = _ref6$all === void 0 ? false : _ref6$all,
|
|
11348
|
+
service = _ref6.service,
|
|
11349
|
+
isEnabled = _ref6.isEnabled,
|
|
11350
|
+
toggleChip = _ref6.toggleChip;
|
|
11351
|
+
var classes = useStyles$o({
|
|
11352
|
+
isEnabled: isEnabled
|
|
11353
|
+
});
|
|
11354
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11355
|
+
role: "button",
|
|
11356
|
+
tabIndex: 0,
|
|
11357
|
+
className: classes.chip,
|
|
11358
|
+
"data-testid": all ? 'serviceChipAll' : 'serviceChip',
|
|
11359
|
+
onClick: function onClick() {
|
|
11360
|
+
return toggleChip(all ? 'all' : service && service.service);
|
|
11361
|
+
},
|
|
11362
|
+
onKeyPress: function onKeyPress() {
|
|
11363
|
+
return toggleChip(all ? 'all' : service && service.service);
|
|
11364
|
+
}
|
|
11365
|
+
}, service ? service.name : 'All');
|
|
11366
|
+
};
|
|
11367
|
+
|
|
11368
|
+
/* *
|
|
11369
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11370
|
+
* you may not use this file except in compliance with the License.
|
|
11371
|
+
* You may obtain a copy of the License at
|
|
11372
|
+
*
|
|
11373
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11374
|
+
*
|
|
11375
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11376
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11377
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11378
|
+
* See the License for the specific language governing permissions and
|
|
11379
|
+
* limitations under the License.
|
|
11380
|
+
*
|
|
11381
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11382
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
11383
|
+
* */
|
|
11384
|
+
|
|
11385
|
+
var ServiceChipConnect = function ServiceChipConnect(_ref) {
|
|
10348
11386
|
var _ref$all = _ref.all,
|
|
10349
11387
|
all = _ref$all === void 0 ? false : _ref$all,
|
|
10350
|
-
service = _ref.service
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
return
|
|
10355
|
-
|
|
10356
|
-
"data-testid": "serviceChipAll"
|
|
10357
|
-
}, "All");
|
|
10358
|
-
}
|
|
11388
|
+
service = _ref.service,
|
|
11389
|
+
isEnabled = _ref.isEnabled;
|
|
11390
|
+
var dispatch = useDispatch();
|
|
11391
|
+
var activeServices = useSelector(function (store) {
|
|
11392
|
+
return getActiveServices(store);
|
|
11393
|
+
});
|
|
10359
11394
|
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
11395
|
+
var toggleChip = function toggleChip(service) {
|
|
11396
|
+
if (service === 'all') {
|
|
11397
|
+
if (isEnabled) {
|
|
11398
|
+
Object.values(activeServices).forEach(function (s) {
|
|
11399
|
+
if (s.enabled) dispatch(disableActiveService({
|
|
11400
|
+
serviceUrl: s.id,
|
|
11401
|
+
keywords: s.keywordsPerService
|
|
11402
|
+
}));
|
|
11403
|
+
});
|
|
11404
|
+
} else {
|
|
11405
|
+
Object.values(activeServices).forEach(function (s) {
|
|
11406
|
+
if (!s.enabled) dispatch(enableActiveService({
|
|
11407
|
+
serviceUrl: s.id,
|
|
11408
|
+
keywords: s.keywordsPerService
|
|
11409
|
+
}));
|
|
11410
|
+
});
|
|
11411
|
+
}
|
|
11412
|
+
} else if (isEnabled) {
|
|
11413
|
+
dispatch(disableActiveService({
|
|
11414
|
+
serviceUrl: service,
|
|
11415
|
+
keywords: activeServices[service].keywordsPerService
|
|
11416
|
+
}));
|
|
11417
|
+
} else {
|
|
11418
|
+
dispatch(enableActiveService({
|
|
11419
|
+
serviceUrl: service,
|
|
11420
|
+
keywords: activeServices[service].keywordsPerService
|
|
11421
|
+
}));
|
|
11422
|
+
}
|
|
11423
|
+
};
|
|
10366
11424
|
|
|
10367
|
-
return /*#__PURE__*/React.createElement(
|
|
10368
|
-
|
|
11425
|
+
return /*#__PURE__*/React.createElement(ServiceChip, {
|
|
11426
|
+
service: service,
|
|
11427
|
+
all: all,
|
|
11428
|
+
toggleChip: toggleChip,
|
|
11429
|
+
isEnabled: isEnabled
|
|
10369
11430
|
});
|
|
10370
11431
|
};
|
|
10371
11432
|
|
|
10372
|
-
var useStyles$
|
|
11433
|
+
var useStyles$n = makeStyles(function (theme) {
|
|
10373
11434
|
return createStyles({
|
|
10374
11435
|
serviceChips: {
|
|
10375
11436
|
width: '100%',
|
|
@@ -10377,22 +11438,37 @@ var useStyles$k = makeStyles(function (theme) {
|
|
|
10377
11438
|
alignItems: 'center',
|
|
10378
11439
|
overflowX: 'visible',
|
|
10379
11440
|
"float": 'left',
|
|
10380
|
-
paddingLeft: '
|
|
11441
|
+
paddingLeft: '40px',
|
|
11442
|
+
marginRight: function marginRight(_ref) {
|
|
11443
|
+
var margin = _ref.margin;
|
|
11444
|
+
return margin;
|
|
11445
|
+
},
|
|
11446
|
+
marginLeft: function marginLeft(_ref2) {
|
|
11447
|
+
var margin = _ref2.margin;
|
|
11448
|
+
return -margin;
|
|
11449
|
+
},
|
|
11450
|
+
maxWidth: function maxWidth(_ref3) {
|
|
11451
|
+
var maxWidthValue = _ref3.maxWidthValue;
|
|
11452
|
+
return maxWidthValue;
|
|
11453
|
+
},
|
|
11454
|
+
fontSize: '0.875rem'
|
|
10381
11455
|
},
|
|
10382
11456
|
scrollArrowLeft: {
|
|
10383
11457
|
width: '120px',
|
|
10384
11458
|
marginBottom: '-12px',
|
|
10385
11459
|
height: '34px',
|
|
10386
11460
|
backgroundImage: "linear-gradient(to left, rgba(0, 0, 0, 0), ".concat(theme.palette.geowebColors.background.surfaceApp, " 51%)"),
|
|
10387
|
-
|
|
10388
|
-
|
|
11461
|
+
cursor: 'pointer',
|
|
11462
|
+
marginRight: '-120px',
|
|
11463
|
+
"float": 'left',
|
|
11464
|
+
zIndex: 1,
|
|
11465
|
+
position: 'relative'
|
|
10389
11466
|
},
|
|
10390
11467
|
serviceList: {
|
|
10391
11468
|
height: '32px',
|
|
10392
11469
|
marginTop: '8px',
|
|
10393
11470
|
width: '100%',
|
|
10394
|
-
|
|
10395
|
-
marginRight: '-120px'
|
|
11471
|
+
overflow: 'hidden'
|
|
10396
11472
|
},
|
|
10397
11473
|
scrollArrowRight: {
|
|
10398
11474
|
width: '120px',
|
|
@@ -10406,10 +11482,10 @@ var useStyles$k = makeStyles(function (theme) {
|
|
|
10406
11482
|
});
|
|
10407
11483
|
});
|
|
10408
11484
|
|
|
10409
|
-
var ServiceList = function ServiceList(
|
|
10410
|
-
var layerSelectWidth =
|
|
10411
|
-
services =
|
|
10412
|
-
|
|
11485
|
+
var ServiceList = function ServiceList(_ref4) {
|
|
11486
|
+
var layerSelectWidth = _ref4.layerSelectWidth,
|
|
11487
|
+
services = _ref4.services,
|
|
11488
|
+
activeServices = _ref4.activeServices;
|
|
10413
11489
|
|
|
10414
11490
|
var _React$useState = React.useState(0),
|
|
10415
11491
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -10422,16 +11498,24 @@ var ServiceList = function ServiceList(_ref) {
|
|
|
10422
11498
|
setWidth = _React$useState4[1];
|
|
10423
11499
|
|
|
10424
11500
|
var ref = React.useRef(null);
|
|
11501
|
+
var maxWidthValue = ref && ref.current && ref.current.scrollWidth && ref.current.scrollWidth >= layerSelectWidth - margin && ref.current.scrollWidth || layerSelectWidth - 50;
|
|
11502
|
+
var classes = useStyles$n({
|
|
11503
|
+
margin: margin,
|
|
11504
|
+
maxWidthValue: maxWidthValue
|
|
11505
|
+
});
|
|
10425
11506
|
var onLeftArrowClick = React.useCallback(function () {
|
|
10426
11507
|
setMargin(Math.max(0, margin - 100));
|
|
10427
11508
|
}, [margin]);
|
|
10428
11509
|
var onRightArrowClick = React.useCallback(function () {
|
|
10429
11510
|
setMargin(Math.min(width - layerSelectWidth, margin + 100));
|
|
10430
11511
|
}, [margin, layerSelectWidth, width]);
|
|
10431
|
-
var gapRight = 35;
|
|
10432
11512
|
React.useEffect(function () {
|
|
10433
|
-
setWidth(ref.current.scrollWidth +
|
|
10434
|
-
|
|
11513
|
+
setWidth(ref.current.scrollWidth + 50);
|
|
11514
|
+
setMargin(Math.max(0, Math.min(width - layerSelectWidth, margin)));
|
|
11515
|
+
}, [services, layerSelectWidth, width, margin]);
|
|
11516
|
+
var isAllEnabled = Object.values(activeServices).every(function (activeService) {
|
|
11517
|
+
return activeService.enabled;
|
|
11518
|
+
});
|
|
10435
11519
|
return /*#__PURE__*/React.createElement("div", {
|
|
10436
11520
|
className: classes.serviceList,
|
|
10437
11521
|
"data-testid": "serviceList"
|
|
@@ -10441,20 +11525,20 @@ var ServiceList = function ServiceList(_ref) {
|
|
|
10441
11525
|
"data-testid": "leftScrollArrow"
|
|
10442
11526
|
}), /*#__PURE__*/React.createElement("div", {
|
|
10443
11527
|
className: classes.serviceChips,
|
|
10444
|
-
style: {
|
|
10445
|
-
marginLeft: "".concat(-margin, "px"),
|
|
10446
|
-
marginRight: "".concat(margin, "px")
|
|
10447
|
-
},
|
|
10448
11528
|
ref: ref
|
|
10449
|
-
}, services && Object.keys(services) && Object.keys(services).length > 0 && /*#__PURE__*/React.createElement(
|
|
11529
|
+
}, services && Object.keys(services) && Object.keys(services).length > 0 && /*#__PURE__*/React.createElement(ServiceChipConnect, {
|
|
10450
11530
|
key: "All",
|
|
10451
|
-
all: true
|
|
11531
|
+
all: true,
|
|
11532
|
+
isEnabled: isAllEnabled
|
|
10452
11533
|
}), Object.keys(services).map(function (service) {
|
|
10453
|
-
|
|
11534
|
+
var _a;
|
|
11535
|
+
|
|
11536
|
+
return /*#__PURE__*/React.createElement(ServiceChipConnect, {
|
|
10454
11537
|
key: services[service].id,
|
|
10455
|
-
service: services[service]
|
|
11538
|
+
service: services[service],
|
|
11539
|
+
isEnabled: (_a = activeServices[service]) === null || _a === void 0 ? void 0 : _a.enabled
|
|
10456
11540
|
});
|
|
10457
|
-
})), margin < width
|
|
11541
|
+
})), layerSelectWidth + margin < width && /*#__PURE__*/React.createElement(ChevronRight, {
|
|
10458
11542
|
className: classes.scrollArrowRight,
|
|
10459
11543
|
onClick: onRightArrowClick,
|
|
10460
11544
|
"data-testid": "rightScrollArrow"
|
|
@@ -10483,20 +11567,301 @@ var ServiceListConnect = function ServiceListConnect(_ref) {
|
|
|
10483
11567
|
var services = useSelector(function (store) {
|
|
10484
11568
|
return getServices(store);
|
|
10485
11569
|
});
|
|
11570
|
+
var activeServices = useSelector(function (store) {
|
|
11571
|
+
return getActiveServices(store);
|
|
11572
|
+
});
|
|
10486
11573
|
return /*#__PURE__*/React.createElement(ServiceList, {
|
|
10487
11574
|
layerSelectWidth: layerSelectWidth,
|
|
10488
|
-
services: services
|
|
11575
|
+
services: services,
|
|
11576
|
+
activeServices: activeServices
|
|
11577
|
+
});
|
|
11578
|
+
};
|
|
11579
|
+
|
|
11580
|
+
var useStyles$m = makeStyles(function (theme) {
|
|
11581
|
+
return createStyles({
|
|
11582
|
+
servicesContainer: {
|
|
11583
|
+
width: '300px',
|
|
11584
|
+
height: '380px',
|
|
11585
|
+
position: 'fixed',
|
|
11586
|
+
top: '140px',
|
|
11587
|
+
right: '-72px',
|
|
11588
|
+
backgroundColor: theme.palette.geowebColors.background.surface,
|
|
11589
|
+
boxShadow: theme.shadows[6]
|
|
11590
|
+
},
|
|
11591
|
+
servicesText: {
|
|
11592
|
+
paddingTop: '12px',
|
|
11593
|
+
paddingLeft: '12px'
|
|
11594
|
+
}
|
|
11595
|
+
});
|
|
11596
|
+
});
|
|
11597
|
+
|
|
11598
|
+
var ServiceOptionsButton = function ServiceOptionsButton() {
|
|
11599
|
+
var classes = useStyles$m();
|
|
11600
|
+
|
|
11601
|
+
var _React$useState = React.useState(false),
|
|
11602
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
11603
|
+
containerOpen = _React$useState2[0],
|
|
11604
|
+
setContainerOpen = _React$useState2[1];
|
|
11605
|
+
|
|
11606
|
+
var toggleContainer = function toggleContainer() {
|
|
11607
|
+
setContainerOpen(!containerOpen);
|
|
11608
|
+
};
|
|
11609
|
+
|
|
11610
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ToggleIconButton, {
|
|
11611
|
+
onClick: toggleContainer,
|
|
11612
|
+
active: containerOpen,
|
|
11613
|
+
"data-testid": "serviceOptionsButton"
|
|
11614
|
+
}, /*#__PURE__*/React.createElement(SvgIcon, {
|
|
11615
|
+
viewBox: "0 0 24 24",
|
|
11616
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11617
|
+
}, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
11618
|
+
d: "M12 16c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0-2c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm0-6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z",
|
|
11619
|
+
fill: "#FFF",
|
|
11620
|
+
fillRule: "evenodd"
|
|
11621
|
+
})))), containerOpen ? /*#__PURE__*/React.createElement(Box, {
|
|
11622
|
+
className: classes.servicesContainer,
|
|
11623
|
+
"data-testid": "container"
|
|
11624
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
11625
|
+
className: classes.servicesText
|
|
11626
|
+
}, "Services")) : null);
|
|
11627
|
+
};
|
|
11628
|
+
|
|
11629
|
+
var useStyles$l = makeStyles({
|
|
11630
|
+
serviceList: {
|
|
11631
|
+
height: '48px'
|
|
11632
|
+
},
|
|
11633
|
+
keywordFilterButton: {
|
|
11634
|
+
"float": 'left',
|
|
11635
|
+
position: 'absolute',
|
|
11636
|
+
margin: '12px 0 0 8px',
|
|
11637
|
+
zIndex: 2
|
|
11638
|
+
},
|
|
11639
|
+
serviceOptionsButton: {
|
|
11640
|
+
position: 'absolute',
|
|
11641
|
+
margin: '12px 0 0 calc(100% - 36px)',
|
|
11642
|
+
zIndex: 2
|
|
11643
|
+
},
|
|
11644
|
+
layerSelectContainer: {
|
|
11645
|
+
padding: '0 8px'
|
|
11646
|
+
}
|
|
11647
|
+
});
|
|
11648
|
+
|
|
11649
|
+
var LayerSelect = function LayerSelect(_ref) {
|
|
11650
|
+
var mapId = _ref.mapId,
|
|
11651
|
+
bounds = _ref.bounds,
|
|
11652
|
+
_ref$onClose = _ref.onClose,
|
|
11653
|
+
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
11654
|
+
showTitle = _ref.showTitle,
|
|
11655
|
+
isOpen = _ref.isOpen,
|
|
11656
|
+
_ref$onMouseDown = _ref.onMouseDown,
|
|
11657
|
+
onMouseDown = _ref$onMouseDown === void 0 ? function () {} : _ref$onMouseDown,
|
|
11658
|
+
_ref$order = _ref.order,
|
|
11659
|
+
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
11660
|
+
_ref$source = _ref.source,
|
|
11661
|
+
source = _ref$source === void 0 ? 'module' : _ref$source;
|
|
11662
|
+
var classes = useStyles$l();
|
|
11663
|
+
|
|
11664
|
+
var _React$useState = React.useState(500),
|
|
11665
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
11666
|
+
height = _React$useState2[0],
|
|
11667
|
+
setHeight = _React$useState2[1];
|
|
11668
|
+
|
|
11669
|
+
var _React$useState3 = React.useState(750),
|
|
11670
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
11671
|
+
width = _React$useState4[0],
|
|
11672
|
+
setWidth = _React$useState4[1];
|
|
11673
|
+
|
|
11674
|
+
var onChangeSize = function onChangeSize(_ref2) {
|
|
11675
|
+
var height = _ref2.height,
|
|
11676
|
+
width = _ref2.width;
|
|
11677
|
+
setHeight(height);
|
|
11678
|
+
setWidth(width);
|
|
11679
|
+
};
|
|
11680
|
+
|
|
11681
|
+
return /*#__PURE__*/React.createElement(ToolContainerDraggable, {
|
|
11682
|
+
title: showTitle ? "Layer Select ".concat(mapId) : 'Layer Select',
|
|
11683
|
+
startSize: {
|
|
11684
|
+
width: width,
|
|
11685
|
+
height: height
|
|
11686
|
+
},
|
|
11687
|
+
minWidth: 390,
|
|
11688
|
+
minHeight: 126,
|
|
11689
|
+
startPosition: {
|
|
11690
|
+
top: 150,
|
|
11691
|
+
left: 100
|
|
11692
|
+
},
|
|
11693
|
+
isOpen: isOpen,
|
|
11694
|
+
onChangeSize: onChangeSize,
|
|
11695
|
+
onClose: onClose,
|
|
11696
|
+
headerSize: "small",
|
|
11697
|
+
bounds: bounds,
|
|
11698
|
+
"data-testid": "layerSelectWindow",
|
|
11699
|
+
onMouseDown: onMouseDown,
|
|
11700
|
+
order: order,
|
|
11701
|
+
source: source
|
|
11702
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11703
|
+
style: {
|
|
11704
|
+
padding: '6px'
|
|
11705
|
+
}
|
|
11706
|
+
}, /*#__PURE__*/React.createElement(SearchFieldConnect, null)), /*#__PURE__*/React.createElement("div", {
|
|
11707
|
+
className: classes.keywordFilterButton
|
|
11708
|
+
}, /*#__PURE__*/React.createElement(KeywordFilterButtonConnect, {
|
|
11709
|
+
mapId: mapId
|
|
11710
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
11711
|
+
className: classes.serviceOptionsButton
|
|
11712
|
+
}, /*#__PURE__*/React.createElement(ServiceOptionsButton, null)), /*#__PURE__*/React.createElement("div", {
|
|
11713
|
+
className: classes.serviceList
|
|
11714
|
+
}, /*#__PURE__*/React.createElement(ServiceListConnect, {
|
|
11715
|
+
layerSelectWidth: width
|
|
11716
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
11717
|
+
className: classes.layerSelectContainer
|
|
11718
|
+
}, /*#__PURE__*/React.createElement(LayerListConnect, {
|
|
11719
|
+
layerSelectHeight: height
|
|
11720
|
+
})));
|
|
11721
|
+
};
|
|
11722
|
+
|
|
11723
|
+
/* *
|
|
11724
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11725
|
+
* you may not use this file except in compliance with the License.
|
|
11726
|
+
* You may obtain a copy of the License at
|
|
11727
|
+
*
|
|
11728
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11729
|
+
*
|
|
11730
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11731
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11732
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11733
|
+
* See the License for the specific language governing permissions and
|
|
11734
|
+
* limitations under the License.
|
|
11735
|
+
*
|
|
11736
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11737
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11738
|
+
* */
|
|
11739
|
+
var CustomSwitch = withStyles(function (theme) {
|
|
11740
|
+
return {
|
|
11741
|
+
switchBase: {
|
|
11742
|
+
'&$checked': {
|
|
11743
|
+
color: theme.palette.geowebColors.customSlider.thumb
|
|
11744
|
+
},
|
|
11745
|
+
'&$checked + $track': {
|
|
11746
|
+
backgroundColor: theme.palette.geowebColors.buttons.primary["default"].fill
|
|
11747
|
+
}
|
|
11748
|
+
},
|
|
11749
|
+
checked: {},
|
|
11750
|
+
track: {
|
|
11751
|
+
backgroundColor: theme.palette.geowebColors.customSlider.switchTrackDisabled,
|
|
11752
|
+
opacity: '1 !important'
|
|
11753
|
+
}
|
|
11754
|
+
};
|
|
11755
|
+
})(Switch);
|
|
11756
|
+
|
|
11757
|
+
var useStyles$k = makeStyles(function (theme) {
|
|
11758
|
+
return createStyles({
|
|
11759
|
+
listItem: {
|
|
11760
|
+
width: '100%',
|
|
11761
|
+
minWidth: '300px',
|
|
11762
|
+
padding: '0px',
|
|
11763
|
+
paddingLeft: '10px',
|
|
11764
|
+
paddingRight: '50px',
|
|
11765
|
+
fontSize: '12px'
|
|
11766
|
+
},
|
|
11767
|
+
onlyByttonText: {
|
|
11768
|
+
color: theme.palette.geowebColors.buttons.primary["default"].fill,
|
|
11769
|
+
fontSize: '14px',
|
|
11770
|
+
fontWeight: 500
|
|
11771
|
+
},
|
|
11772
|
+
checkbox: {
|
|
11773
|
+
paddingTop: '6px',
|
|
11774
|
+
paddingBottom: '7px',
|
|
11775
|
+
'&&:hover': {
|
|
11776
|
+
backgroundColor: 'transparent'
|
|
11777
|
+
}
|
|
11778
|
+
},
|
|
11779
|
+
listItemIcon: {
|
|
11780
|
+
minWidth: '42px'
|
|
11781
|
+
},
|
|
11782
|
+
listItemText: {
|
|
11783
|
+
textOverflow: 'ellipsis',
|
|
11784
|
+
whiteSpace: 'nowrap',
|
|
11785
|
+
overflow: 'hidden'
|
|
11786
|
+
}
|
|
10489
11787
|
});
|
|
11788
|
+
});
|
|
11789
|
+
|
|
11790
|
+
var FilterListItem = function FilterListItem(_ref) {
|
|
11791
|
+
var index = _ref.index,
|
|
11792
|
+
text = _ref.text,
|
|
11793
|
+
checked = _ref.checked,
|
|
11794
|
+
toggleCheckbox = _ref.toggleCheckbox,
|
|
11795
|
+
selectOnlyOne = _ref.selectOnlyOne;
|
|
11796
|
+
var classes = useStyles$k();
|
|
11797
|
+
|
|
11798
|
+
var _React$useState = React.useState(false),
|
|
11799
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
11800
|
+
hovering = _React$useState2[0],
|
|
11801
|
+
setHovering = _React$useState2[1];
|
|
11802
|
+
|
|
11803
|
+
var handleMouseOver = React.useCallback(function () {
|
|
11804
|
+
setHovering(true);
|
|
11805
|
+
}, []);
|
|
11806
|
+
var handleMouseLeave = React.useCallback(function () {
|
|
11807
|
+
setHovering(false);
|
|
11808
|
+
}, []);
|
|
11809
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11810
|
+
onMouseOver: handleMouseOver,
|
|
11811
|
+
onMouseLeave: handleMouseLeave,
|
|
11812
|
+
onFocus: handleMouseOver,
|
|
11813
|
+
onBlur: handleMouseLeave,
|
|
11814
|
+
"data-testid": "filterResultListItem"
|
|
11815
|
+
}, /*#__PURE__*/React.createElement(ListItem, {
|
|
11816
|
+
className: classes.listItem
|
|
11817
|
+
}, /*#__PURE__*/React.createElement(ListItemIcon, {
|
|
11818
|
+
className: classes.listItemIcon
|
|
11819
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
11820
|
+
color: "secondary",
|
|
11821
|
+
checked: checked,
|
|
11822
|
+
onChange: function onChange() {
|
|
11823
|
+
return toggleCheckbox(index);
|
|
11824
|
+
},
|
|
11825
|
+
className: classes.checkbox
|
|
11826
|
+
})), /*#__PURE__*/React.createElement(Typography, {
|
|
11827
|
+
variant: "body2",
|
|
11828
|
+
className: classes.listItemText
|
|
11829
|
+
}, text), hovering ? /*#__PURE__*/React.createElement(ListItemSecondaryAction, null, /*#__PURE__*/React.createElement(IconButton, {
|
|
11830
|
+
style: {
|
|
11831
|
+
backgroundColor: 'transparent'
|
|
11832
|
+
},
|
|
11833
|
+
edge: "end",
|
|
11834
|
+
size: "small",
|
|
11835
|
+
onClick: function onClick() {
|
|
11836
|
+
return selectOnlyOne(index);
|
|
11837
|
+
},
|
|
11838
|
+
"data-testid": "onlyButton"
|
|
11839
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
11840
|
+
className: classes.onlyByttonText
|
|
11841
|
+
}, "ONLY"))) : null));
|
|
10490
11842
|
};
|
|
10491
11843
|
|
|
10492
|
-
var useStyles$j = makeStyles({
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
11844
|
+
var useStyles$j = makeStyles(function (theme) {
|
|
11845
|
+
return createStyles({
|
|
11846
|
+
selectAll: {
|
|
11847
|
+
padding: '15px',
|
|
11848
|
+
paddingLeft: '20px'
|
|
11849
|
+
},
|
|
11850
|
+
"switch": {
|
|
11851
|
+
padding: '15px'
|
|
11852
|
+
},
|
|
11853
|
+
selectAllContainer: {
|
|
11854
|
+
backgroundColor: theme.palette.background.paper,
|
|
11855
|
+
position: 'sticky',
|
|
11856
|
+
top: 0,
|
|
11857
|
+
zIndex: 100
|
|
11858
|
+
}
|
|
11859
|
+
});
|
|
10496
11860
|
});
|
|
10497
11861
|
|
|
10498
|
-
var
|
|
10499
|
-
var
|
|
11862
|
+
var KeywordFilterResults = function KeywordFilterResults(_ref) {
|
|
11863
|
+
var keywordObjects = _ref.keywordObjects,
|
|
11864
|
+
mapId = _ref.mapId,
|
|
10500
11865
|
bounds = _ref.bounds,
|
|
10501
11866
|
_ref$onClose = _ref.onClose,
|
|
10502
11867
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
@@ -10507,49 +11872,212 @@ var LayerSelect = function LayerSelect(_ref) {
|
|
|
10507
11872
|
_ref$order = _ref.order,
|
|
10508
11873
|
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
10509
11874
|
_ref$source = _ref.source,
|
|
10510
|
-
source = _ref$source === void 0 ? 'module' : _ref$source
|
|
11875
|
+
source = _ref$source === void 0 ? 'module' : _ref$source,
|
|
11876
|
+
updateKeywords = _ref.updateKeywords;
|
|
10511
11877
|
var classes = useStyles$j();
|
|
10512
11878
|
|
|
10513
|
-
var _React$useState = React.useState(
|
|
11879
|
+
var _React$useState = React.useState(true),
|
|
10514
11880
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
10515
|
-
|
|
10516
|
-
|
|
11881
|
+
allSelected = _React$useState2[0],
|
|
11882
|
+
setAllSelected = _React$useState2[1];
|
|
10517
11883
|
|
|
10518
|
-
var
|
|
10519
|
-
var
|
|
10520
|
-
|
|
11884
|
+
var toggleSelectAll = function toggleSelectAll() {
|
|
11885
|
+
var editedKeywords = keywordObjects.map(function (object) {
|
|
11886
|
+
return Object.assign(Object.assign({}, object), {
|
|
11887
|
+
checked: !allSelected
|
|
11888
|
+
});
|
|
11889
|
+
});
|
|
11890
|
+
setAllSelected(!allSelected);
|
|
11891
|
+
updateKeywords(editedKeywords);
|
|
11892
|
+
};
|
|
11893
|
+
|
|
11894
|
+
var toggleCheckbox = function toggleCheckbox(listIndex) {
|
|
11895
|
+
var editedKeywords = keywordObjects.map(function (object, index) {
|
|
11896
|
+
return listIndex === index ? Object.assign(Object.assign({}, object), {
|
|
11897
|
+
checked: !object.checked
|
|
11898
|
+
}) : object;
|
|
11899
|
+
});
|
|
11900
|
+
updateKeywords(editedKeywords);
|
|
10521
11901
|
};
|
|
10522
11902
|
|
|
11903
|
+
var selectOnlyOne = function selectOnlyOne(listIndex) {
|
|
11904
|
+
var editedKeywords = keywordObjects.map(function (object, index) {
|
|
11905
|
+
return listIndex === index ? Object.assign(Object.assign({}, object), {
|
|
11906
|
+
checked: true
|
|
11907
|
+
}) : Object.assign(Object.assign({}, object), {
|
|
11908
|
+
checked: false
|
|
11909
|
+
});
|
|
11910
|
+
});
|
|
11911
|
+
updateKeywords(editedKeywords);
|
|
11912
|
+
}; // If even one checkbox is unchecked, switch toggleAll off
|
|
11913
|
+
// If all checkboxes becomes checked, switch toggleAll on
|
|
11914
|
+
|
|
11915
|
+
|
|
11916
|
+
React.useEffect(function () {
|
|
11917
|
+
var checked = keywordObjects.every(function (object) {
|
|
11918
|
+
return object.checked === true;
|
|
11919
|
+
});
|
|
11920
|
+
setAllSelected(checked);
|
|
11921
|
+
}, [keywordObjects]);
|
|
10523
11922
|
return /*#__PURE__*/React.createElement(ToolContainerDraggable, {
|
|
10524
|
-
title: showTitle ? "
|
|
11923
|
+
title: showTitle ? "Filter Results ".concat(mapId) : 'Filter Results',
|
|
11924
|
+
"data-testid": "keywordFilterResults",
|
|
10525
11925
|
startSize: {
|
|
10526
|
-
width:
|
|
10527
|
-
height:
|
|
10528
|
-
},
|
|
10529
|
-
minWidth: 300,
|
|
10530
|
-
minHeight: 126,
|
|
10531
|
-
startPosition: {
|
|
10532
|
-
top: 150,
|
|
10533
|
-
left: 100
|
|
11926
|
+
width: 349,
|
|
11927
|
+
height: 600
|
|
10534
11928
|
},
|
|
11929
|
+
minWidth: 312,
|
|
11930
|
+
minHeight: 192,
|
|
10535
11931
|
isOpen: isOpen,
|
|
10536
|
-
onChangeSize: onChangeSize,
|
|
10537
11932
|
onClose: onClose,
|
|
10538
11933
|
headerSize: "small",
|
|
10539
11934
|
bounds: bounds,
|
|
10540
|
-
"data-testid": "layerSelectWindow",
|
|
10541
11935
|
onMouseDown: onMouseDown,
|
|
10542
11936
|
order: order,
|
|
10543
11937
|
source: source
|
|
10544
|
-
}, /*#__PURE__*/React.createElement(
|
|
11938
|
+
}, /*#__PURE__*/React.createElement(Grid, {
|
|
11939
|
+
container: true,
|
|
11940
|
+
item: true,
|
|
11941
|
+
xs: 12,
|
|
11942
|
+
justifyContent: "space-between",
|
|
11943
|
+
alignItems: "center",
|
|
11944
|
+
className: classes.selectAllContainer
|
|
11945
|
+
}, /*#__PURE__*/React.createElement(Grid, {
|
|
11946
|
+
container: true,
|
|
11947
|
+
item: true,
|
|
11948
|
+
xs: 6,
|
|
11949
|
+
justifyContent: "flex-start",
|
|
11950
|
+
alignItems: "center",
|
|
11951
|
+
className: classes.selectAll
|
|
11952
|
+
}, "Select all"), /*#__PURE__*/React.createElement(Grid, {
|
|
11953
|
+
container: true,
|
|
11954
|
+
item: true,
|
|
11955
|
+
xs: 6,
|
|
11956
|
+
justifyContent: "flex-end",
|
|
11957
|
+
alignContent: "center",
|
|
11958
|
+
className: classes["switch"]
|
|
11959
|
+
}, /*#__PURE__*/React.createElement(CustomSwitch, {
|
|
11960
|
+
checked: allSelected,
|
|
11961
|
+
onChange: toggleSelectAll,
|
|
11962
|
+
"data-testid": "customSwitch"
|
|
11963
|
+
}))), /*#__PURE__*/React.createElement(List, {
|
|
11964
|
+
dense: true,
|
|
10545
11965
|
style: {
|
|
10546
|
-
padding: '
|
|
11966
|
+
padding: '0px'
|
|
11967
|
+
}
|
|
11968
|
+
}, keywordObjects.map(function (_ref2, index) {
|
|
11969
|
+
var id = _ref2.id,
|
|
11970
|
+
checked = _ref2.checked,
|
|
11971
|
+
amountVisible = _ref2.amountVisible;
|
|
11972
|
+
if (amountVisible === 0) return null;
|
|
11973
|
+
return /*#__PURE__*/React.createElement(FilterListItem, {
|
|
11974
|
+
key: "".concat(id, "-").concat(index),
|
|
11975
|
+
index: index,
|
|
11976
|
+
text: id,
|
|
11977
|
+
checked: checked,
|
|
11978
|
+
toggleCheckbox: toggleCheckbox,
|
|
11979
|
+
selectOnlyOne: selectOnlyOne
|
|
11980
|
+
});
|
|
11981
|
+
})));
|
|
11982
|
+
};
|
|
11983
|
+
|
|
11984
|
+
/* *
|
|
11985
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11986
|
+
* you may not use this file except in compliance with the License.
|
|
11987
|
+
* You may obtain a copy of the License at
|
|
11988
|
+
*
|
|
11989
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11990
|
+
*
|
|
11991
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11992
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11993
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11994
|
+
* See the License for the specific language governing permissions and
|
|
11995
|
+
* limitations under the License.
|
|
11996
|
+
*
|
|
11997
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
11998
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
11999
|
+
* */
|
|
12000
|
+
|
|
12001
|
+
var KeywordFilterResultsConnect = function KeywordFilterResultsConnect(_ref) {
|
|
12002
|
+
var bounds = _ref.bounds,
|
|
12003
|
+
_ref$showTitle = _ref.showTitle,
|
|
12004
|
+
showTitle = _ref$showTitle === void 0 ? false : _ref$showTitle;
|
|
12005
|
+
var dispatch = useDispatch();
|
|
12006
|
+
var mapId = useSelector(function (store) {
|
|
12007
|
+
return getDialogMapId(store, 'keywordFilter');
|
|
12008
|
+
});
|
|
12009
|
+
var isOpenInStore = useSelector(function (store) {
|
|
12010
|
+
return getisDialogOpen(store, 'keywordFilter');
|
|
12011
|
+
});
|
|
12012
|
+
var onClose = React.useCallback(function () {
|
|
12013
|
+
return dispatch(setToggleOpenDialog({
|
|
12014
|
+
type: 'keywordFilter',
|
|
12015
|
+
setOpen: false
|
|
12016
|
+
}));
|
|
12017
|
+
}, [dispatch]);
|
|
12018
|
+
var isMapPresent = useSelector(function (store) {
|
|
12019
|
+
return getIsMapPresent(store, mapId);
|
|
12020
|
+
});
|
|
12021
|
+
var uiOrder = useSelector(function (store) {
|
|
12022
|
+
return getDialogOrder(store, 'keywordFilter');
|
|
12023
|
+
});
|
|
12024
|
+
var uiSource = useSelector(function (store) {
|
|
12025
|
+
return getDialogSource(store, 'keywordFilter');
|
|
12026
|
+
});
|
|
12027
|
+
var uiIsOrderedOnTop = useSelector(function (store) {
|
|
12028
|
+
return getDialogIsOrderedOnTop(store, 'keywordFilter');
|
|
12029
|
+
});
|
|
12030
|
+
var updateKeywords$1 = React.useCallback(function (keywords) {
|
|
12031
|
+
dispatch(updateKeywords({
|
|
12032
|
+
keywords: keywords
|
|
12033
|
+
}));
|
|
12034
|
+
}, [dispatch]); // Check to ensure the currently active map is still present on screen - if not, close the dialog
|
|
12035
|
+
|
|
12036
|
+
React.useEffect(function () {
|
|
12037
|
+
if (mapId !== '' && !isMapPresent) {
|
|
12038
|
+
onClose();
|
|
10547
12039
|
}
|
|
10548
|
-
},
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
12040
|
+
}, [mapId, isMapPresent, onClose]);
|
|
12041
|
+
var registerDialog$1 = React.useCallback(function () {
|
|
12042
|
+
return dispatch(registerDialog({
|
|
12043
|
+
type: 'keywordFilter',
|
|
12044
|
+
setOpen: false
|
|
12045
|
+
}));
|
|
12046
|
+
}, [dispatch]);
|
|
12047
|
+
var unregisterDialog$1 = React.useCallback(function () {
|
|
12048
|
+
return dispatch(unregisterDialog({
|
|
12049
|
+
type: 'keywordFilter'
|
|
12050
|
+
}));
|
|
12051
|
+
}, [dispatch]);
|
|
12052
|
+
var onOrderDialog = React.useCallback(function () {
|
|
12053
|
+
if (!uiIsOrderedOnTop) {
|
|
12054
|
+
dispatch(orderDialog({
|
|
12055
|
+
type: 'keywordFilter'
|
|
12056
|
+
}));
|
|
12057
|
+
}
|
|
12058
|
+
}, [dispatch, uiIsOrderedOnTop]); // Register this dialog in the store
|
|
12059
|
+
|
|
12060
|
+
React.useEffect(function () {
|
|
12061
|
+
registerDialog$1();
|
|
12062
|
+
return function () {
|
|
12063
|
+
unregisterDialog$1();
|
|
12064
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
12065
|
+
}, []);
|
|
12066
|
+
var keywords = useSelector(function (store) {
|
|
12067
|
+
return getKeywords(store);
|
|
12068
|
+
});
|
|
12069
|
+
return /*#__PURE__*/React.createElement(KeywordFilterResults, {
|
|
12070
|
+
keywordObjects: keywords,
|
|
12071
|
+
mapId: mapId,
|
|
12072
|
+
bounds: bounds,
|
|
12073
|
+
isOpen: isOpenInStore,
|
|
12074
|
+
onClose: onClose,
|
|
12075
|
+
showTitle: showTitle,
|
|
12076
|
+
onMouseDown: onOrderDialog,
|
|
12077
|
+
order: uiOrder,
|
|
12078
|
+
source: uiSource,
|
|
12079
|
+
updateKeywords: updateKeywords$1
|
|
12080
|
+
});
|
|
10553
12081
|
};
|
|
10554
12082
|
|
|
10555
12083
|
/* *
|
|
@@ -10648,7 +12176,7 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
10648
12176
|
React.useEffect(function () {
|
|
10649
12177
|
if (isOpenInStore && preloadedServices && preloadedServices.length > 0) {
|
|
10650
12178
|
preloadedServices.forEach(function (service) {
|
|
10651
|
-
|
|
12179
|
+
getLayersFlattenedFromService(service.url).then(function (layers) {
|
|
10652
12180
|
if (isMounted.current) {
|
|
10653
12181
|
serviceSetLayers$1({
|
|
10654
12182
|
id: service.id,
|
|
@@ -10664,7 +12192,7 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
10664
12192
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10665
12193
|
|
|
10666
12194
|
}, [isOpenInStore, preloadedServices, serviceSetLayers$1]);
|
|
10667
|
-
return /*#__PURE__*/React.createElement(LayerSelect, {
|
|
12195
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LayerSelect, {
|
|
10668
12196
|
mapId: mapId,
|
|
10669
12197
|
bounds: bounds,
|
|
10670
12198
|
isOpen: isOpenInStore,
|
|
@@ -10673,7 +12201,7 @@ var LayerSelectConnect = function LayerSelectConnect(_ref) {
|
|
|
10673
12201
|
onMouseDown: onOrderDialog,
|
|
10674
12202
|
order: uiOrder,
|
|
10675
12203
|
source: uiSource
|
|
10676
|
-
});
|
|
12204
|
+
}), /*#__PURE__*/React.createElement(KeywordFilterResultsConnect, null));
|
|
10677
12205
|
};
|
|
10678
12206
|
|
|
10679
12207
|
/* *
|
|
@@ -10727,135 +12255,62 @@ var LayerManagerConnect = function LayerManagerConnect(_ref) {
|
|
|
10727
12255
|
}));
|
|
10728
12256
|
}, [dispatch]);
|
|
10729
12257
|
var isMapPresent = useSelector(function (store) {
|
|
10730
|
-
return getIsMapPresent(store, mapId);
|
|
10731
|
-
});
|
|
10732
|
-
var uiOrder = useSelector(function (store) {
|
|
10733
|
-
return getDialogOrder(store, 'layerManager');
|
|
10734
|
-
});
|
|
10735
|
-
var uiSource = useSelector(function (store) {
|
|
10736
|
-
return getDialogSource(store, 'layerManager');
|
|
10737
|
-
});
|
|
10738
|
-
var uiIsOrderedOnTop = useSelector(function (store) {
|
|
10739
|
-
return getDialogIsOrderedOnTop(store, 'layerManager');
|
|
10740
|
-
}); // Check to ensure the currently active map is still present on screen - if not, close the dialog
|
|
10741
|
-
|
|
10742
|
-
React.useEffect(function () {
|
|
10743
|
-
if (mapId !== '' && !isMapPresent) {
|
|
10744
|
-
onClose();
|
|
10745
|
-
}
|
|
10746
|
-
}, [mapId, isMapPresent, onClose]);
|
|
10747
|
-
var registerDialog$1 = React.useCallback(function () {
|
|
10748
|
-
return dispatch(registerDialog({
|
|
10749
|
-
type: 'layerManager',
|
|
10750
|
-
setOpen: false
|
|
10751
|
-
}));
|
|
10752
|
-
}, [dispatch]);
|
|
10753
|
-
var unregisterDialog$1 = React.useCallback(function () {
|
|
10754
|
-
return dispatch(unregisterDialog({
|
|
10755
|
-
type: 'layerManager'
|
|
10756
|
-
}));
|
|
10757
|
-
}, [dispatch]);
|
|
10758
|
-
var onOrderDialog = React.useCallback(function () {
|
|
10759
|
-
if (!uiIsOrderedOnTop) {
|
|
10760
|
-
dispatch(orderDialog({
|
|
10761
|
-
type: 'layerManager'
|
|
10762
|
-
}));
|
|
10763
|
-
}
|
|
10764
|
-
}, [dispatch, uiIsOrderedOnTop]); // Register this dialog in the store
|
|
10765
|
-
|
|
10766
|
-
React.useEffect(function () {
|
|
10767
|
-
registerDialog$1();
|
|
10768
|
-
return function () {
|
|
10769
|
-
unregisterDialog$1();
|
|
10770
|
-
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
10771
|
-
}, []);
|
|
10772
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LayerManager, {
|
|
10773
|
-
mapId: mapId,
|
|
10774
|
-
preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
|
|
10775
|
-
preloadedMapServices: preloadedMapServices,
|
|
10776
|
-
preloadedBaseServices: preloadedBaseServices,
|
|
10777
|
-
bounds: bounds,
|
|
10778
|
-
isOpen: isOpenInStore,
|
|
10779
|
-
onClose: onClose,
|
|
10780
|
-
showTitle: showTitle,
|
|
10781
|
-
onMouseDown: onOrderDialog,
|
|
10782
|
-
order: uiOrder,
|
|
10783
|
-
source: uiSource,
|
|
10784
|
-
layerSelect: layerSelect
|
|
10785
|
-
}), layerSelect && /*#__PURE__*/React.createElement(LayerSelectConnect, null));
|
|
10786
|
-
};
|
|
10787
|
-
|
|
10788
|
-
/* *
|
|
10789
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10790
|
-
* you may not use this file except in compliance with the License.
|
|
10791
|
-
* You may obtain a copy of the License at
|
|
10792
|
-
*
|
|
10793
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10794
|
-
*
|
|
10795
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
10796
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10797
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10798
|
-
* See the License for the specific language governing permissions and
|
|
10799
|
-
* limitations under the License.
|
|
10800
|
-
*
|
|
10801
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
10802
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
10803
|
-
* */
|
|
10804
|
-
var useButtonStyles = makeStyles(function (theme) {
|
|
10805
|
-
return createStyles({
|
|
10806
|
-
button: {
|
|
10807
|
-
height: '24px',
|
|
10808
|
-
width: function width(_ref) {
|
|
10809
|
-
var _width = _ref.width;
|
|
10810
|
-
return _width ? "".concat(_width, "px") : '24px';
|
|
10811
|
-
},
|
|
10812
|
-
border: 0,
|
|
10813
|
-
backgroundColor: theme.palette.geowebColors.buttons.surfaceIconDefault.fill,
|
|
10814
|
-
borderRadius: '4.5px',
|
|
10815
|
-
textTransform: 'none',
|
|
10816
|
-
'& svg path, svg text': {
|
|
10817
|
-
fill: theme.palette.geowebColors.typographyAndIcons.buttonIconTertiaryFlat
|
|
10818
|
-
},
|
|
10819
|
-
'&:hover': {
|
|
10820
|
-
backgroundColor: theme.palette.geowebColors.buttons.flatMouseover.fill
|
|
10821
|
-
},
|
|
10822
|
-
'&:disabled': {
|
|
10823
|
-
backgroundColor: theme.palette.geowebColors.buttons.disabled.fill,
|
|
10824
|
-
'& svg path, svg text': {
|
|
10825
|
-
fill: theme.palette.geowebColors.typographyAndIcons.iconLinkDisabled
|
|
10826
|
-
}
|
|
10827
|
-
},
|
|
10828
|
-
'&.Mui-selected': {
|
|
10829
|
-
backgroundColor: theme.palette.geowebColors.buttons.primaryActive.fill,
|
|
10830
|
-
'&:hover': {
|
|
10831
|
-
backgroundColor: theme.palette.geowebColors.buttons.primaryMouseover.fill
|
|
10832
|
-
},
|
|
10833
|
-
'& svg': {
|
|
10834
|
-
backgroundColor: 'transparent'
|
|
10835
|
-
},
|
|
10836
|
-
'& svg path, svg text': {
|
|
10837
|
-
fill: theme.palette.geowebColors.typographyAndIcons.buttonIcon
|
|
10838
|
-
}
|
|
10839
|
-
}
|
|
10840
|
-
}
|
|
12258
|
+
return getIsMapPresent(store, mapId);
|
|
10841
12259
|
});
|
|
10842
|
-
|
|
12260
|
+
var uiOrder = useSelector(function (store) {
|
|
12261
|
+
return getDialogOrder(store, 'layerManager');
|
|
12262
|
+
});
|
|
12263
|
+
var uiSource = useSelector(function (store) {
|
|
12264
|
+
return getDialogSource(store, 'layerManager');
|
|
12265
|
+
});
|
|
12266
|
+
var uiIsOrderedOnTop = useSelector(function (store) {
|
|
12267
|
+
return getDialogIsOrderedOnTop(store, 'layerManager');
|
|
12268
|
+
}); // Check to ensure the currently active map is still present on screen - if not, close the dialog
|
|
10843
12269
|
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
12270
|
+
React.useEffect(function () {
|
|
12271
|
+
if (mapId !== '' && !isMapPresent) {
|
|
12272
|
+
onClose();
|
|
12273
|
+
}
|
|
12274
|
+
}, [mapId, isMapPresent, onClose]);
|
|
12275
|
+
var registerDialog$1 = React.useCallback(function () {
|
|
12276
|
+
return dispatch(registerDialog({
|
|
12277
|
+
type: 'layerManager',
|
|
12278
|
+
setOpen: false
|
|
12279
|
+
}));
|
|
12280
|
+
}, [dispatch]);
|
|
12281
|
+
var unregisterDialog$1 = React.useCallback(function () {
|
|
12282
|
+
return dispatch(unregisterDialog({
|
|
12283
|
+
type: 'layerManager'
|
|
12284
|
+
}));
|
|
12285
|
+
}, [dispatch]);
|
|
12286
|
+
var onOrderDialog = React.useCallback(function () {
|
|
12287
|
+
if (!uiIsOrderedOnTop) {
|
|
12288
|
+
dispatch(orderDialog({
|
|
12289
|
+
type: 'layerManager'
|
|
12290
|
+
}));
|
|
12291
|
+
}
|
|
12292
|
+
}, [dispatch, uiIsOrderedOnTop]); // Register this dialog in the store
|
|
10849
12293
|
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
12294
|
+
React.useEffect(function () {
|
|
12295
|
+
registerDialog$1();
|
|
12296
|
+
return function () {
|
|
12297
|
+
unregisterDialog$1();
|
|
12298
|
+
}; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
12299
|
+
}, []);
|
|
12300
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LayerManager, {
|
|
12301
|
+
mapId: mapId,
|
|
12302
|
+
preloadedAvailableBaseLayers: preloadedAvailableBaseLayers,
|
|
12303
|
+
preloadedMapServices: preloadedMapServices,
|
|
12304
|
+
preloadedBaseServices: preloadedBaseServices,
|
|
12305
|
+
bounds: bounds,
|
|
12306
|
+
isOpen: isOpenInStore,
|
|
12307
|
+
onClose: onClose,
|
|
12308
|
+
showTitle: showTitle,
|
|
12309
|
+
onMouseDown: onOrderDialog,
|
|
12310
|
+
order: uiOrder,
|
|
12311
|
+
source: uiSource,
|
|
12312
|
+
layerSelect: layerSelect
|
|
12313
|
+
}), layerSelect && /*#__PURE__*/React.createElement(LayerSelectConnect, null));
|
|
10859
12314
|
};
|
|
10860
12315
|
|
|
10861
12316
|
/* *
|
|
@@ -11217,7 +12672,8 @@ var useStyles$h = makeStyles(function () {
|
|
|
11217
12672
|
height: '320px',
|
|
11218
12673
|
margin: '10px',
|
|
11219
12674
|
marginLeft: '-5px',
|
|
11220
|
-
minWidth: 120
|
|
12675
|
+
minWidth: 120,
|
|
12676
|
+
fontSize: '90%'
|
|
11221
12677
|
},
|
|
11222
12678
|
layerName: {
|
|
11223
12679
|
paddingLeft: '10px',
|
|
@@ -11258,11 +12714,10 @@ var DimensionSelectSlider = function DimensionSelectSlider(_ref) {
|
|
|
11258
12714
|
return null;
|
|
11259
12715
|
}
|
|
11260
12716
|
|
|
11261
|
-
var sortedMarks = _toConsumableArray(marks)
|
|
11262
|
-
|
|
11263
|
-
sortedMarks = sortedMarks.sort(function (a, b) {
|
|
12717
|
+
var sortedMarks = _toConsumableArray(marks).sort(function (a, b) {
|
|
11264
12718
|
return typeof a.value === 'number' && typeof b.value === 'number' && a.value - b.value;
|
|
11265
12719
|
});
|
|
12720
|
+
|
|
11266
12721
|
var adaptedMarks = reverse ? sortedMarks.reverse() : sortedMarks;
|
|
11267
12722
|
var values = adaptedMarks.map(function (m) {
|
|
11268
12723
|
return m.value;
|
|
@@ -11408,27 +12863,30 @@ var DimensionSelectSliderConnect = function DimensionSelectSliderConnect(_ref) {
|
|
|
11408
12863
|
var layerName = wmLayer.getLayerName();
|
|
11409
12864
|
var marks = marksByDimension(wmsDimension);
|
|
11410
12865
|
var isLayerDimensionSynced = layerDimension.synced !== undefined && layerDimension.synced === true;
|
|
12866
|
+
var tooltipTitle = isLayerDimensionSynced ? 'Click to disconnect layer' : 'Click to connect layer';
|
|
12867
|
+
|
|
12868
|
+
var Icon = function Icon() {
|
|
12869
|
+
return isLayerDimensionSynced ? /*#__PURE__*/React.createElement(Link, {
|
|
12870
|
+
"data-testid": "syncIcon"
|
|
12871
|
+
}) : /*#__PURE__*/React.createElement(LinkOff, {
|
|
12872
|
+
"data-testid": "syncDisIcon"
|
|
12873
|
+
});
|
|
12874
|
+
};
|
|
12875
|
+
|
|
11411
12876
|
return /*#__PURE__*/React.createElement(Grid, {
|
|
11412
12877
|
key: layerId,
|
|
11413
12878
|
item: true,
|
|
11414
12879
|
xs: "auto"
|
|
12880
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
12881
|
+
title: tooltipTitle,
|
|
12882
|
+
placement: "top"
|
|
11415
12883
|
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
11416
12884
|
"data-testid": "syncButton",
|
|
11417
12885
|
size: "small",
|
|
11418
12886
|
onClick: function onClick() {
|
|
11419
12887
|
return handleSyncChanged(layerId, dimensionName, layerDimension.currentValue, !layerDimension.synced);
|
|
11420
12888
|
}
|
|
11421
|
-
},
|
|
11422
|
-
title: "Click to disconnect layer",
|
|
11423
|
-
placement: "top"
|
|
11424
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
11425
|
-
"data-testid": "syncIcon"
|
|
11426
|
-
})) : /*#__PURE__*/React.createElement(Tooltip, {
|
|
11427
|
-
title: "Click to connect layer",
|
|
11428
|
-
placement: "top"
|
|
11429
|
-
}, /*#__PURE__*/React.createElement(LinkOff, {
|
|
11430
|
-
"data-testid": "syncDisIcon"
|
|
11431
|
-
}))), /*#__PURE__*/React.createElement(DimensionSelectSlider, {
|
|
12889
|
+
}, /*#__PURE__*/React.createElement(Icon, null))), /*#__PURE__*/React.createElement(DimensionSelectSlider, {
|
|
11432
12890
|
marks: marks,
|
|
11433
12891
|
layerName: layerName,
|
|
11434
12892
|
reverse: dimConfig ? dimConfig.reversed : false,
|
|
@@ -11467,7 +12925,9 @@ var DimensionSelectDialogConnect = function DimensionSelectDialogConnect(_ref) {
|
|
|
11467
12925
|
onMouseDown = _ref.onMouseDown,
|
|
11468
12926
|
onToggleDialog = _ref.onToggleDialog,
|
|
11469
12927
|
_ref$index = _ref.index,
|
|
11470
|
-
index = _ref$index === void 0 ? 0 : _ref$index
|
|
12928
|
+
index = _ref$index === void 0 ? 0 : _ref$index,
|
|
12929
|
+
_ref$source = _ref.source,
|
|
12930
|
+
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
11471
12931
|
var dispatch = useDispatch();
|
|
11472
12932
|
var mapDimension = useSelector(function (store) {
|
|
11473
12933
|
return getMapDimension(store, mapId, dimensionName);
|
|
@@ -11522,7 +12982,8 @@ var DimensionSelectDialogConnect = function DimensionSelectDialogConnect(_ref) {
|
|
|
11522
12982
|
},
|
|
11523
12983
|
bounds: "parent",
|
|
11524
12984
|
onMouseDown: onMouseDown,
|
|
11525
|
-
order: order
|
|
12985
|
+
order: order,
|
|
12986
|
+
source: source
|
|
11526
12987
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11527
12988
|
style: {
|
|
11528
12989
|
padding: 4
|
|
@@ -11573,6 +13034,9 @@ var MultiMapSingleDimensionSelectConnect = function MultiMapSingleDimensionSelec
|
|
|
11573
13034
|
var uiOrder = useSelector(function (store) {
|
|
11574
13035
|
return getDialogOrder(store, uiDialogType);
|
|
11575
13036
|
});
|
|
13037
|
+
var uiSource = useSelector(function (store) {
|
|
13038
|
+
return getDialogSource(store, uiDialogType);
|
|
13039
|
+
});
|
|
11576
13040
|
var uiIsOrderedOnTop = useSelector(function (store) {
|
|
11577
13041
|
return getDialogIsOrderedOnTop(store, uiDialogType);
|
|
11578
13042
|
});
|
|
@@ -11625,6 +13089,7 @@ var MultiMapSingleDimensionSelectConnect = function MultiMapSingleDimensionSelec
|
|
|
11625
13089
|
onMouseDown: onOrderDialog,
|
|
11626
13090
|
onToggleDialog: onToggleDialog,
|
|
11627
13091
|
order: uiOrder,
|
|
13092
|
+
source: uiSource,
|
|
11628
13093
|
isOpen: isOpen,
|
|
11629
13094
|
index: index
|
|
11630
13095
|
});
|
|
@@ -11649,7 +13114,9 @@ var MultiMapSingleDimensionSelectConnect = function MultiMapSingleDimensionSelec
|
|
|
11649
13114
|
|
|
11650
13115
|
var DimensionSelectMapButtonConnect = function DimensionSelectMapButtonConnect(_ref) {
|
|
11651
13116
|
var mapId = _ref.mapId,
|
|
11652
|
-
dimension = _ref.dimension
|
|
13117
|
+
dimension = _ref.dimension,
|
|
13118
|
+
_ref$source = _ref.source,
|
|
13119
|
+
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
11653
13120
|
var dispatch = useDispatch();
|
|
11654
13121
|
var uiDialogType = getDimensionType(dimension);
|
|
11655
13122
|
var currentActiveMapId = useSelector(function (store) {
|
|
@@ -11663,9 +13130,10 @@ var DimensionSelectMapButtonConnect = function DimensionSelectMapButtonConnect(_
|
|
|
11663
13130
|
dispatch(setActiveMapIdForDialog({
|
|
11664
13131
|
type: uiDialogType,
|
|
11665
13132
|
activeMapId: mapId,
|
|
11666
|
-
setOpen: setOpen
|
|
13133
|
+
setOpen: setOpen,
|
|
13134
|
+
source: source
|
|
11667
13135
|
}));
|
|
11668
|
-
}, [currentActiveMapId, dispatch, isOpenInStore, uiDialogType, mapId]);
|
|
13136
|
+
}, [currentActiveMapId, dispatch, isOpenInStore, uiDialogType, mapId, source]);
|
|
11669
13137
|
var isOpen = currentActiveMapId === mapId && isOpenInStore;
|
|
11670
13138
|
return /*#__PURE__*/React.createElement(DimensionSelectButton, {
|
|
11671
13139
|
dimension: dimension,
|
|
@@ -11692,7 +13160,9 @@ var DimensionSelectMapButtonConnect = function DimensionSelectMapButtonConnect(_
|
|
|
11692
13160
|
* */
|
|
11693
13161
|
|
|
11694
13162
|
var MultiDimensionSelectMapButtonsConnect = function MultiDimensionSelectMapButtonsConnect(_ref) {
|
|
11695
|
-
var mapId = _ref.mapId
|
|
13163
|
+
var mapId = _ref.mapId,
|
|
13164
|
+
_ref$source = _ref.source,
|
|
13165
|
+
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
11696
13166
|
var dimensions = useSelector(function (store) {
|
|
11697
13167
|
return getMapDimensions(store, mapId);
|
|
11698
13168
|
});
|
|
@@ -11708,7 +13178,8 @@ var MultiDimensionSelectMapButtonsConnect = function MultiDimensionSelectMapButt
|
|
|
11708
13178
|
return /*#__PURE__*/React.createElement(DimensionSelectMapButtonConnect, {
|
|
11709
13179
|
mapId: mapId,
|
|
11710
13180
|
dimension: dimension.name,
|
|
11711
|
-
key: dimension.name
|
|
13181
|
+
key: dimension.name,
|
|
13182
|
+
source: source
|
|
11712
13183
|
});
|
|
11713
13184
|
}));
|
|
11714
13185
|
};
|
|
@@ -11928,6 +13399,10 @@ var SpeedButton = function SpeedButton(_ref) {
|
|
|
11928
13399
|
};
|
|
11929
13400
|
|
|
11930
13401
|
var onKeyDown = function onKeyDown(event) {
|
|
13402
|
+
// disable default Slider behavior
|
|
13403
|
+
event.stopPropagation();
|
|
13404
|
+
event.preventDefault(); // custom logic
|
|
13405
|
+
|
|
11931
13406
|
if (event.key === 'Tab') {
|
|
11932
13407
|
setOpen(!open);
|
|
11933
13408
|
}
|
|
@@ -12197,6 +13672,10 @@ var TimeStepButton = function TimeStepButton(_ref) {
|
|
|
12197
13672
|
};
|
|
12198
13673
|
|
|
12199
13674
|
var onKeyDown = function onKeyDown(event) {
|
|
13675
|
+
// disable default Slider behavior
|
|
13676
|
+
event.stopPropagation();
|
|
13677
|
+
event.preventDefault(); // custom logic
|
|
13678
|
+
|
|
12200
13679
|
if (event.key === 'Tab') {
|
|
12201
13680
|
setOpen(!open);
|
|
12202
13681
|
}
|
|
@@ -13721,55 +15200,54 @@ var useStyles$c = makeStyles(function (theme) {
|
|
|
13721
15200
|
});
|
|
13722
15201
|
|
|
13723
15202
|
var thumbComponent = function thumbComponent(props) {
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
);
|
|
15203
|
+
var children = props.children,
|
|
15204
|
+
other = __rest(props, ["children"]);
|
|
15205
|
+
|
|
15206
|
+
return /*#__PURE__*/React.createElement(SliderThumb, Object.assign({}, other, {
|
|
15207
|
+
"data-testid": "scaleSliderSliderThumb",
|
|
15208
|
+
tabIndex: 0
|
|
15209
|
+
}), children, /*#__PURE__*/React.createElement(SvgIcon, null, /*#__PURE__*/React.createElement("polygon", {
|
|
15210
|
+
transform: "translate(6.5 5.5)",
|
|
15211
|
+
points: "6,0 11,5 11,12 0,12 0,5"
|
|
15212
|
+
})));
|
|
13735
15213
|
};
|
|
13736
15214
|
|
|
13737
15215
|
var marks = [{
|
|
13738
|
-
value: 0.1,
|
|
13739
15216
|
text: '5 min scale',
|
|
13740
|
-
paddingLeft: '2px'
|
|
15217
|
+
paddingLeft: '2px',
|
|
15218
|
+
value: Scale.Minutes5
|
|
13741
15219
|
}, {
|
|
13742
|
-
value: 0.35,
|
|
13743
15220
|
text: '1 h scale',
|
|
13744
|
-
paddingLeft: '25px'
|
|
15221
|
+
paddingLeft: '25px',
|
|
15222
|
+
value: Scale.Hour
|
|
13745
15223
|
}, {
|
|
13746
|
-
value: 0.6,
|
|
13747
15224
|
text: '3 h scale',
|
|
13748
|
-
paddingLeft: '45px'
|
|
15225
|
+
paddingLeft: '45px',
|
|
15226
|
+
value: Scale.Hours3
|
|
13749
15227
|
}, {
|
|
13750
|
-
value: 0.85,
|
|
13751
15228
|
text: '6 h scale',
|
|
13752
|
-
paddingLeft: '65px'
|
|
15229
|
+
paddingLeft: '65px',
|
|
15230
|
+
value: Scale.Hours6
|
|
13753
15231
|
}, {
|
|
13754
|
-
value: 1.1,
|
|
13755
15232
|
text: 'day scale',
|
|
13756
|
-
paddingLeft: '80px'
|
|
15233
|
+
paddingLeft: '80px',
|
|
15234
|
+
value: Scale.Day
|
|
13757
15235
|
}, {
|
|
13758
|
-
value: 1.35,
|
|
13759
15236
|
text: 'week scale',
|
|
13760
|
-
paddingLeft: '92px'
|
|
15237
|
+
paddingLeft: '92px',
|
|
15238
|
+
value: Scale.Week
|
|
13761
15239
|
}, {
|
|
13762
|
-
value: 1.6,
|
|
13763
15240
|
text: 'month scale',
|
|
13764
|
-
paddingLeft: '107px'
|
|
15241
|
+
paddingLeft: '107px',
|
|
15242
|
+
value: Scale.Month
|
|
13765
15243
|
}, {
|
|
13766
|
-
value: 1.85,
|
|
13767
15244
|
text: 'year scale',
|
|
13768
|
-
paddingLeft: '130px'
|
|
15245
|
+
paddingLeft: '130px',
|
|
15246
|
+
value: Scale.Year
|
|
13769
15247
|
}, {
|
|
13770
|
-
value: 2.1,
|
|
13771
15248
|
text: 'data scale',
|
|
13772
|
-
paddingLeft: '140px'
|
|
15249
|
+
paddingLeft: '140px',
|
|
15250
|
+
value: Scale.DataScale
|
|
13773
15251
|
}];
|
|
13774
15252
|
|
|
13775
15253
|
var valueLabelFormat = function valueLabelFormat(value) {
|
|
@@ -13787,9 +15265,14 @@ var GeoWebScaleSlider = withStyles(function (theme) {
|
|
|
13787
15265
|
thumb: {
|
|
13788
15266
|
backgroundColor: 'rgba(0,0,0,0)',
|
|
13789
15267
|
marginTop: 0,
|
|
15268
|
+
width: 12,
|
|
15269
|
+
height: 12,
|
|
13790
15270
|
color: theme.palette.geowebColors.timeSlider.timeScalePointer.fill,
|
|
13791
15271
|
'& svg polygon': {
|
|
13792
15272
|
filter: theme.palette.geowebColors.timeSlider.timeScaleShadowButtonScale.filter
|
|
15273
|
+
},
|
|
15274
|
+
'&:before': {
|
|
15275
|
+
display: 'none'
|
|
13793
15276
|
}
|
|
13794
15277
|
},
|
|
13795
15278
|
valueLabel: {
|
|
@@ -13832,77 +15315,59 @@ var GeoWebScaleSlider = withStyles(function (theme) {
|
|
|
13832
15315
|
}
|
|
13833
15316
|
};
|
|
13834
15317
|
})(Slider);
|
|
13835
|
-
|
|
13836
|
-
var getScaleSliderValue = function getScaleSliderValue(value) {
|
|
13837
|
-
if (Math.abs(value - marks[0].value) < 0.0001) {
|
|
13838
|
-
return Scale.Minutes5;
|
|
13839
|
-
}
|
|
13840
|
-
|
|
13841
|
-
if (Math.abs(value - marks[1].value) < 0.0001) {
|
|
13842
|
-
return Scale.Hour;
|
|
13843
|
-
}
|
|
13844
|
-
|
|
13845
|
-
if (Math.abs(value - marks[2].value) < 0.0001) {
|
|
13846
|
-
return Scale.Hours3;
|
|
13847
|
-
}
|
|
13848
|
-
|
|
13849
|
-
if (Math.abs(value - marks[3].value) < 0.0001) {
|
|
13850
|
-
return Scale.Hours6;
|
|
13851
|
-
}
|
|
13852
|
-
|
|
13853
|
-
if (Math.abs(value - marks[4].value) < 0.0001) {
|
|
13854
|
-
return Scale.Day;
|
|
13855
|
-
}
|
|
13856
|
-
|
|
13857
|
-
if (Math.abs(value - marks[5].value) < 0.0001) {
|
|
13858
|
-
return Scale.Week;
|
|
13859
|
-
}
|
|
13860
|
-
|
|
13861
|
-
if (Math.abs(value - marks[6].value) < 0.0001) {
|
|
13862
|
-
return Scale.Month;
|
|
13863
|
-
}
|
|
13864
|
-
|
|
13865
|
-
if (Math.abs(value - marks[7].value) < 0.0001) {
|
|
13866
|
-
return Scale.Year;
|
|
13867
|
-
}
|
|
13868
|
-
|
|
13869
|
-
if (Math.abs(value - marks[8].value) < 0.0001) {
|
|
13870
|
-
return Scale.DataScale;
|
|
13871
|
-
}
|
|
13872
|
-
|
|
13873
|
-
return Scale.Hour;
|
|
13874
|
-
};
|
|
13875
|
-
|
|
13876
|
-
var scaleValues = Object.keys(Scale).map(function (scale) {
|
|
13877
|
-
return Number(scale);
|
|
13878
|
-
});
|
|
15318
|
+
var RAIL_GUTTER_OFFSET = 0.4;
|
|
13879
15319
|
|
|
13880
15320
|
var TimeSliderScaleSlider = function TimeSliderScaleSlider(_ref) {
|
|
13881
15321
|
var layers = _ref.layers,
|
|
13882
|
-
timeSliderScale = _ref.timeSliderScale,
|
|
15322
|
+
_ref$timeSliderScale = _ref.timeSliderScale,
|
|
15323
|
+
timeSliderScale = _ref$timeSliderScale === void 0 ? Scale.Hour : _ref$timeSliderScale,
|
|
13883
15324
|
centerTime = _ref.centerTime,
|
|
13884
15325
|
secondsPerPx = _ref.secondsPerPx,
|
|
13885
15326
|
selectedTime = _ref.selectedTime,
|
|
13886
15327
|
onChangeTimeSliderScale = _ref.onChangeTimeSliderScale;
|
|
13887
15328
|
var classes = useStyles$c();
|
|
13888
|
-
var
|
|
13889
|
-
var
|
|
13890
|
-
|
|
13891
|
-
|
|
13892
|
-
};
|
|
13893
|
-
var newScaleObjectIndex = scaleObjectIndex !== -1 ? scaleObjectIndex : 1;
|
|
13894
|
-
var value = newScaleObject.value,
|
|
13895
|
-
text = newScaleObject.text;
|
|
15329
|
+
var min = 0;
|
|
15330
|
+
var max = marks.length - 1;
|
|
15331
|
+
var value = marks.findIndex(function (mark) {
|
|
15332
|
+
return mark.value === timeSliderScale;
|
|
15333
|
+
});
|
|
13896
15334
|
|
|
13897
|
-
var
|
|
13898
|
-
var
|
|
13899
|
-
var
|
|
15335
|
+
var onChangeSliderValue = function onChangeSliderValue(newSliderValue) {
|
|
15336
|
+
var newValue = newSliderValue ? Math.round(newSliderValue) : 0;
|
|
15337
|
+
var newScale = marks.find(function (el) {
|
|
15338
|
+
return el.value === newValue;
|
|
15339
|
+
}).value;
|
|
15340
|
+
var scaleToSecPerPx = newScale === Scale.DataScale ? getScaleToSecondsPerPxForDataScale(layers) : scaleToSecondsPerPx[newScale];
|
|
13900
15341
|
var newCenterTime = getNewCenterOfFixedPointZoom(selectedTime, secondsPerPx, scaleToSecPerPx, centerTime);
|
|
13901
15342
|
onChangeTimeSliderScale(newScale, newCenterTime, scaleToSecPerPx);
|
|
13902
15343
|
};
|
|
13903
15344
|
|
|
15345
|
+
var onChange = function onChange(event, value) {
|
|
15346
|
+
if (event.type !== 'keydown') {
|
|
15347
|
+
onChangeSliderValue(value);
|
|
15348
|
+
}
|
|
15349
|
+
};
|
|
15350
|
+
|
|
15351
|
+
var onKeyDown = function onKeyDown(event) {
|
|
15352
|
+
// disable default Slider behavior
|
|
15353
|
+
event.preventDefault();
|
|
15354
|
+
event.stopPropagation(); // custom logic
|
|
15355
|
+
|
|
15356
|
+
var newValue = getValueFromKeyboardEvent(event, value, min, max, true);
|
|
15357
|
+
|
|
15358
|
+
if (newValue !== null) {
|
|
15359
|
+
onChangeSliderValue(newValue);
|
|
15360
|
+
}
|
|
15361
|
+
};
|
|
15362
|
+
|
|
15363
|
+
var _marks$find = marks.find(function (mark) {
|
|
15364
|
+
return mark.value === value;
|
|
15365
|
+
}),
|
|
15366
|
+
paddingLeft = _marks$find.paddingLeft,
|
|
15367
|
+
text = _marks$find.text;
|
|
15368
|
+
|
|
13904
15369
|
var scaleTextPadding = {
|
|
13905
|
-
paddingLeft:
|
|
15370
|
+
paddingLeft: paddingLeft
|
|
13906
15371
|
};
|
|
13907
15372
|
return /*#__PURE__*/React.createElement("div", {
|
|
13908
15373
|
className: classes.Background,
|
|
@@ -13913,16 +15378,18 @@ var TimeSliderScaleSlider = function TimeSliderScaleSlider(_ref) {
|
|
|
13913
15378
|
style: scaleTextPadding
|
|
13914
15379
|
}, text)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(GeoWebScaleSlider, {
|
|
13915
15380
|
"data-testid": "scaleSliderSlider",
|
|
13916
|
-
defaultValue:
|
|
15381
|
+
defaultValue: Scale.Hour,
|
|
13917
15382
|
value: value,
|
|
13918
|
-
min:
|
|
13919
|
-
step:
|
|
13920
|
-
max:
|
|
15383
|
+
min: min - RAIL_GUTTER_OFFSET,
|
|
15384
|
+
step: 1,
|
|
15385
|
+
max: max + RAIL_GUTTER_OFFSET,
|
|
13921
15386
|
getAriaValueText: valueLabelFormat,
|
|
13922
|
-
onChange:
|
|
13923
|
-
|
|
15387
|
+
onChange: onChange,
|
|
15388
|
+
onKeyDown: onKeyDown,
|
|
13924
15389
|
"aria-labelledby": "scale-slider",
|
|
13925
|
-
|
|
15390
|
+
components: {
|
|
15391
|
+
Thumb: thumbComponent
|
|
15392
|
+
},
|
|
13926
15393
|
marks: marks,
|
|
13927
15394
|
track: false
|
|
13928
15395
|
})));
|
|
@@ -14495,7 +15962,7 @@ var TimeSlider = function TimeSlider(_ref) {
|
|
|
14495
15962
|
className: styles.scaleSlider
|
|
14496
15963
|
}, scaleSlider || /*#__PURE__*/React.createElement(TimeSliderScaleSlider, Object.assign({}, defaultProps, {
|
|
14497
15964
|
selectedTime: defaultProps.selectedTime.unix(),
|
|
14498
|
-
timeSliderScale:
|
|
15965
|
+
timeSliderScale: Scale.Hour,
|
|
14499
15966
|
onChangeTimeSliderScale: function onChangeTimeSliderScale() {
|
|
14500
15967
|
return null;
|
|
14501
15968
|
}
|
|
@@ -17965,7 +19432,7 @@ var getDisplayText = function getDisplayText(currentAdagucTime) {
|
|
|
17965
19432
|
};
|
|
17966
19433
|
|
|
17967
19434
|
var ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION = 'ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION';
|
|
17968
|
-
var
|
|
19435
|
+
var ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO = 'ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO';
|
|
17969
19436
|
|
|
17970
19437
|
var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
17971
19438
|
_inherits(ReactMapView, _React$Component);
|
|
@@ -18011,7 +19478,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18011
19478
|
|
|
18012
19479
|
layers.forEach(function (layer) {
|
|
18013
19480
|
if (layer.enabled !== false) {
|
|
18014
|
-
_this.parseWMJSLayer(layer, true
|
|
19481
|
+
_this.parseWMJSLayer(layer, true);
|
|
18015
19482
|
}
|
|
18016
19483
|
});
|
|
18017
19484
|
}, fetchSpeed);
|
|
@@ -18023,27 +19490,12 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18023
19490
|
}
|
|
18024
19491
|
};
|
|
18025
19492
|
|
|
18026
|
-
_this.parseWMJSLayer = function (wmLayer, forceReload,
|
|
19493
|
+
_this.parseWMJSLayer = function (wmLayer, forceReload, child) {
|
|
18027
19494
|
var callback = function callback() {
|
|
18028
|
-
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
onLayerSetDimensions = _this$props.onLayerSetDimensions,
|
|
18033
|
-
onServiceSetLayers = _this$props.onServiceSetLayers,
|
|
18034
|
-
onLayerSetStyles = _this$props.onLayerSetStyles,
|
|
18035
|
-
_xml2jsonrequestURL = _this$props.xml2jsonrequestURL,
|
|
18036
|
-
mapId = _this$props.mapId;
|
|
18037
|
-
setServiceMetadata(wmLayer, mapId, _xml2jsonrequestURL, _this.adaguc.webMapJS, _this.props, onMapUpdateAllDimensions, onLayerChangeStyle, onServiceSetLayers, onLayerSetStyles, onLayerSetDimensions);
|
|
18038
|
-
}
|
|
18039
|
-
|
|
18040
|
-
if (updateStrategy === 'onlydims') {
|
|
18041
|
-
var _this$props2 = _this.props,
|
|
18042
|
-
_onLayerSetDimensions = _this$props2.onLayerSetDimensions,
|
|
18043
|
-
_xml2jsonrequestURL2 = _this$props2.xml2jsonrequestURL,
|
|
18044
|
-
_mapId = _this$props2.mapId;
|
|
18045
|
-
setServiceMetadata(wmLayer, _mapId, _xml2jsonrequestURL2, _this.adaguc.webMapJS, _this.props, null, null, null, null, _onLayerSetDimensions);
|
|
18046
|
-
}
|
|
19495
|
+
var _this$props = _this.props,
|
|
19496
|
+
onUpdateLayerInformation = _this$props.onUpdateLayerInformation,
|
|
19497
|
+
mapId = _this$props.mapId;
|
|
19498
|
+
setServiceMetadata(wmLayer, mapId, _this.adaguc.webMapJS, _this.props, onUpdateLayerInformation);
|
|
18047
19499
|
|
|
18048
19500
|
if (child) {
|
|
18049
19501
|
if (wmLayer.hasError) {
|
|
@@ -18056,8 +19508,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18056
19508
|
}
|
|
18057
19509
|
};
|
|
18058
19510
|
|
|
18059
|
-
|
|
18060
|
-
wmLayer.parseLayer(callback, forceReload, xml2jsonrequestURL);
|
|
19511
|
+
wmLayer.parseLayer(callback, forceReload, 'ReactMapView parseWMJSLayer');
|
|
18061
19512
|
};
|
|
18062
19513
|
|
|
18063
19514
|
_this.state = {
|
|
@@ -18065,7 +19516,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18065
19516
|
};
|
|
18066
19517
|
_this.resize = _this.resize.bind(_assertThisInitialized(_this));
|
|
18067
19518
|
_this.handleWindowResize = _this.handleWindowResize.bind(_assertThisInitialized(_this));
|
|
18068
|
-
_this.drawDebounced = debounce(600, _this.drawDebounced);
|
|
19519
|
+
_this.drawDebounced = debounce$1(600, _this.drawDebounced);
|
|
18069
19520
|
_this.checkNewProps = _this.checkNewProps.bind(_assertThisInitialized(_this));
|
|
18070
19521
|
_this.checkAdaguc = _this.checkAdaguc.bind(_assertThisInitialized(_this));
|
|
18071
19522
|
_this.onAfterSetBBoxListener = _this.onAfterSetBBoxListener.bind(_assertThisInitialized(_this));
|
|
@@ -18080,11 +19531,11 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18080
19531
|
_createClass(ReactMapView, [{
|
|
18081
19532
|
key: "componentDidMount",
|
|
18082
19533
|
value: function componentDidMount() {
|
|
18083
|
-
var _this$
|
|
18084
|
-
onMount = _this$
|
|
18085
|
-
mapId = _this$
|
|
18086
|
-
onRegisterAdaguc = _this$
|
|
18087
|
-
shouldAutoFetch = _this$
|
|
19534
|
+
var _this$props2 = this.props,
|
|
19535
|
+
onMount = _this$props2.onMount,
|
|
19536
|
+
mapId = _this$props2.mapId,
|
|
19537
|
+
onRegisterAdaguc = _this$props2.onRegisterAdaguc,
|
|
19538
|
+
shouldAutoFetch = _this$props2.shouldAutoFetch;
|
|
18088
19539
|
this.checkAdaguc();
|
|
18089
19540
|
this.checkNewProps(null, this.props);
|
|
18090
19541
|
window.addEventListener('resize', this.handleWindowResize);
|
|
@@ -18106,9 +19557,9 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18106
19557
|
}, {
|
|
18107
19558
|
key: "componentWillUnmount",
|
|
18108
19559
|
value: function componentWillUnmount() {
|
|
18109
|
-
var _this$
|
|
18110
|
-
onUnMount = _this$
|
|
18111
|
-
mapId = _this$
|
|
19560
|
+
var _this$props3 = this.props,
|
|
19561
|
+
onUnMount = _this$props3.onUnMount,
|
|
19562
|
+
mapId = _this$props3.mapId;
|
|
18112
19563
|
window.removeEventListener('resize', this.handleWindowResize);
|
|
18113
19564
|
onUnMount(mapId, this.adaguc.webMapJS);
|
|
18114
19565
|
this.adaguc.webMapJS.getListener().suspendEvents();
|
|
@@ -18116,6 +19567,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18116
19567
|
if (typeof this.adaguc.webMapJS.stopAnimating === 'function') {
|
|
18117
19568
|
this.adaguc.webMapJS.stopAnimating();
|
|
18118
19569
|
this.adaguc.webMapJS.destroy();
|
|
19570
|
+
this.adaguc.webMapJSCreated = false;
|
|
18119
19571
|
}
|
|
18120
19572
|
|
|
18121
19573
|
this.clearRefetchTimer();
|
|
@@ -18123,9 +19575,9 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18123
19575
|
}, {
|
|
18124
19576
|
key: "onDimChangeListener",
|
|
18125
19577
|
value: function onDimChangeListener() {
|
|
18126
|
-
var _this$
|
|
18127
|
-
mapId = _this$
|
|
18128
|
-
onMapChangeDimension = _this$
|
|
19578
|
+
var _this$props4 = this.props,
|
|
19579
|
+
mapId = _this$props4.mapId,
|
|
19580
|
+
onMapChangeDimension = _this$props4.onMapChangeDimension;
|
|
18129
19581
|
|
|
18130
19582
|
if (this.adaguc && this.adaguc.webMapJS) {
|
|
18131
19583
|
var timeDimension = this.adaguc.webMapJS.getDimension('time');
|
|
@@ -18147,9 +19599,9 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18147
19599
|
value: function onAfterSetBBoxListener(wmjsMap) {
|
|
18148
19600
|
var _this2 = this;
|
|
18149
19601
|
|
|
18150
|
-
var _this$
|
|
18151
|
-
mapId = _this$
|
|
18152
|
-
onMapZoomEnd = _this$
|
|
19602
|
+
var _this$props5 = this.props,
|
|
19603
|
+
mapId = _this$props5.mapId,
|
|
19604
|
+
onMapZoomEnd = _this$props5.onMapZoomEnd;
|
|
18153
19605
|
/* Update the map after 100 ms */
|
|
18154
19606
|
|
|
18155
19607
|
window.setTimeout(function () {
|
|
@@ -18314,8 +19766,6 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18314
19766
|
this.adaguc.webMapJS.showLayerInfo = props.showLayerInfo;
|
|
18315
19767
|
}
|
|
18316
19768
|
}
|
|
18317
|
-
/* Check children */
|
|
18318
|
-
|
|
18319
19769
|
|
|
18320
19770
|
var children = props.children;
|
|
18321
19771
|
|
|
@@ -18354,23 +19804,29 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18354
19804
|
wmjsLayers[l].remove();
|
|
18355
19805
|
/* Trigger update of all map dimensions */
|
|
18356
19806
|
|
|
18357
|
-
var
|
|
19807
|
+
var onUpdateLayerInformation = props.onUpdateLayerInformation,
|
|
18358
19808
|
mapId = props.mapId;
|
|
18359
|
-
|
|
18360
|
-
origin:
|
|
18361
|
-
|
|
18362
|
-
|
|
18363
|
-
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
name
|
|
18369
|
-
|
|
18370
|
-
|
|
18371
|
-
|
|
18372
|
-
|
|
18373
|
-
|
|
19809
|
+
onUpdateLayerInformation && onUpdateLayerInformation({
|
|
19810
|
+
origin: ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO,
|
|
19811
|
+
serviceLayers: null,
|
|
19812
|
+
layerStyle: null,
|
|
19813
|
+
layerDimensions: null,
|
|
19814
|
+
mapDimensions: {
|
|
19815
|
+
origin: origin,
|
|
19816
|
+
mapId: mapId,
|
|
19817
|
+
dimensions: _this3.adaguc.webMapJS.mapdimensions.map(function (_ref) {
|
|
19818
|
+
var name = _ref.name,
|
|
19819
|
+
units = _ref.units,
|
|
19820
|
+
currentValue = _ref.currentValue,
|
|
19821
|
+
synced = _ref.synced;
|
|
19822
|
+
return {
|
|
19823
|
+
name: name,
|
|
19824
|
+
units: units,
|
|
19825
|
+
currentValue: currentValue,
|
|
19826
|
+
synced: synced
|
|
19827
|
+
};
|
|
19828
|
+
})
|
|
19829
|
+
}
|
|
18374
19830
|
});
|
|
18375
19831
|
|
|
18376
19832
|
_this3.checkNewProps(prevProps, props);
|
|
@@ -18478,9 +19934,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18478
19934
|
}
|
|
18479
19935
|
|
|
18480
19936
|
if (!isBaselayer) {
|
|
18481
|
-
newWMLayer
|
|
18482
|
-
|
|
18483
|
-
_this3.parseWMJSLayer(newWMLayer, false, 'all', child);
|
|
19937
|
+
_this3.parseWMJSLayer(newWMLayer, false, child);
|
|
18484
19938
|
}
|
|
18485
19939
|
|
|
18486
19940
|
needsRedraw = true;
|
|
@@ -18488,7 +19942,7 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18488
19942
|
/* Set the name of the ADAGUC WMJSLayer */
|
|
18489
19943
|
if (child.props.name !== undefined && wmLayer.name !== child.props.name) {
|
|
18490
19944
|
wmLayer.setName(child.props.name).then(function () {
|
|
18491
|
-
_this3.parseWMJSLayer(wmLayer, false,
|
|
19945
|
+
_this3.parseWMJSLayer(wmLayer, false, child);
|
|
18492
19946
|
});
|
|
18493
19947
|
needsRedraw = true;
|
|
18494
19948
|
}
|
|
@@ -18592,13 +20046,12 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18592
20046
|
value: function checkAdaguc() {
|
|
18593
20047
|
var _this4 = this;
|
|
18594
20048
|
|
|
18595
|
-
var _this$
|
|
18596
|
-
mapId = _this$
|
|
18597
|
-
listeners = _this$
|
|
18598
|
-
|
|
18599
|
-
|
|
18600
|
-
|
|
18601
|
-
onMapPinChangeLocation = _this$props7.onMapPinChangeLocation;
|
|
20049
|
+
var _this$props6 = this.props,
|
|
20050
|
+
mapId = _this$props6.mapId,
|
|
20051
|
+
listeners = _this$props6.listeners,
|
|
20052
|
+
srs = _this$props6.srs,
|
|
20053
|
+
bbox = _this$props6.bbox,
|
|
20054
|
+
onMapPinChangeLocation = _this$props6.onMapPinChangeLocation;
|
|
18602
20055
|
|
|
18603
20056
|
if (this.adaguc.webMapJSCreated) {
|
|
18604
20057
|
return;
|
|
@@ -18611,7 +20064,6 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18611
20064
|
|
|
18612
20065
|
registerWMJSMap(this.adaguc.webMapJS, mapId);
|
|
18613
20066
|
this.adaguc.webMapJS.removeAllLayers();
|
|
18614
|
-
this.adaguc.webMapJS.setXML2JSONURL(xml2jsonrequestURL);
|
|
18615
20067
|
this.adaguc.webMapJS.setProjection(srs, new WMBBOX(bbox));
|
|
18616
20068
|
this.adaguc.webMapJS.setWMTileRendererTileSettings(tileRenderSettings);
|
|
18617
20069
|
|
|
@@ -18670,10 +20122,10 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18670
20122
|
}, {
|
|
18671
20123
|
key: "render",
|
|
18672
20124
|
value: function render() {
|
|
18673
|
-
var _this$
|
|
18674
|
-
passiveMap = _this$
|
|
18675
|
-
children = _this$
|
|
18676
|
-
onClick = _this$
|
|
20125
|
+
var _this$props7 = this.props,
|
|
20126
|
+
passiveMap = _this$props7.passiveMap,
|
|
20127
|
+
children = _this$props7.children,
|
|
20128
|
+
onClick = _this$props7.onClick;
|
|
18677
20129
|
var adagucInitialised = this.state.adagucInitialised;
|
|
18678
20130
|
var featureLayers = getFeatureLayers(children);
|
|
18679
20131
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -18744,7 +20196,6 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
18744
20196
|
}(React.Component);
|
|
18745
20197
|
|
|
18746
20198
|
ReactMapView.defaultProps = {
|
|
18747
|
-
xml2jsonrequestURL: defaultxml2jsonrequestURL,
|
|
18748
20199
|
srs: 'EPSG:3857',
|
|
18749
20200
|
bbox: {
|
|
18750
20201
|
left: -2324980.5498391856,
|
|
@@ -18763,22 +20214,7 @@ ReactMapView.defaultProps = {
|
|
|
18763
20214
|
onMapChangeDimension: function onMapChangeDimension() {
|
|
18764
20215
|
/* nothing */
|
|
18765
20216
|
},
|
|
18766
|
-
|
|
18767
|
-
/* nothing */
|
|
18768
|
-
},
|
|
18769
|
-
onLayerChangeStyle: function onLayerChangeStyle() {
|
|
18770
|
-
/* nothing */
|
|
18771
|
-
},
|
|
18772
|
-
onLayerChangeDimension: function onLayerChangeDimension() {
|
|
18773
|
-
/* nothing */
|
|
18774
|
-
},
|
|
18775
|
-
onLayerSetDimensions: function onLayerSetDimensions() {
|
|
18776
|
-
/* nothing */
|
|
18777
|
-
},
|
|
18778
|
-
onServiceSetLayers: function onServiceSetLayers() {
|
|
18779
|
-
/* nothing */
|
|
18780
|
-
},
|
|
18781
|
-
onLayerSetStyles: function onLayerSetStyles() {
|
|
20217
|
+
onUpdateLayerInformation: function onUpdateLayerInformation() {
|
|
18782
20218
|
/* nothing */
|
|
18783
20219
|
},
|
|
18784
20220
|
onMapZoomEnd: function onMapZoomEnd() {
|
|
@@ -18932,6 +20368,7 @@ var MapView = function MapView(_a) {
|
|
|
18932
20368
|
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
18933
20369
|
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
18934
20370
|
* */
|
|
20371
|
+
var ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION = 'ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION';
|
|
18935
20372
|
/**
|
|
18936
20373
|
* Connected component used to display the map and selected layers.
|
|
18937
20374
|
* Includes options to disable the map controls and legend.
|
|
@@ -18980,29 +20417,28 @@ var MapViewConnect = function MapViewConnect(_a) {
|
|
|
18980
20417
|
return getPinLocation(store, mapId);
|
|
18981
20418
|
});
|
|
18982
20419
|
var dispatch = useDispatch();
|
|
20420
|
+
var map = getWMJSMapById(mapId);
|
|
18983
20421
|
var mapChangeDimension$1 = React.useCallback(function (mapDimensionPayload) {
|
|
18984
|
-
|
|
18985
|
-
|
|
20422
|
+
if (mapDimensionPayload.dimension) {
|
|
20423
|
+
var dimension = map.getDimension(mapDimensionPayload.dimension.name);
|
|
20424
|
+
|
|
20425
|
+
if (dimension && dimension.currentValue === mapDimensionPayload.dimension.currentValue) {
|
|
20426
|
+
return;
|
|
20427
|
+
}
|
|
20428
|
+
}
|
|
20429
|
+
|
|
20430
|
+
dispatch(mapChangeDimension(mapDimensionPayload));
|
|
20431
|
+
}, [dispatch, map]);
|
|
18986
20432
|
var setTime$1 = React.useCallback(function (setTimePayload) {
|
|
18987
|
-
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
18992
|
-
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
|
|
18996
|
-
return dispatch(layerSetDimensions(payload));
|
|
18997
|
-
}, [dispatch]);
|
|
18998
|
-
var mapUpdateAllDimensions = React.useCallback(function (payload) {
|
|
18999
|
-
return dispatch(mapUpdateAllMapDimensions(payload));
|
|
19000
|
-
}, [dispatch]);
|
|
19001
|
-
var serviceSetLayers$1 = React.useCallback(function (payload) {
|
|
19002
|
-
return dispatch(serviceSetLayers(payload));
|
|
19003
|
-
}, [dispatch]);
|
|
19004
|
-
var layerSetStyles$1 = React.useCallback(function (payload) {
|
|
19005
|
-
return dispatch(layerSetStyles(payload));
|
|
20433
|
+
/* Check if the map not already has this value set, otherwise this component will re-render */
|
|
20434
|
+
if (map.getDimension('time').currentValue === setTimePayload.value) {
|
|
20435
|
+
return;
|
|
20436
|
+
}
|
|
20437
|
+
|
|
20438
|
+
dispatch(setTime(setTimePayload));
|
|
20439
|
+
}, [dispatch, map]);
|
|
20440
|
+
var updateLayerInformation = React.useCallback(function (payload) {
|
|
20441
|
+
dispatch(onUpdateLayerInformation(payload));
|
|
19006
20442
|
}, [dispatch]);
|
|
19007
20443
|
var registerMap$1 = React.useCallback(function (payload) {
|
|
19008
20444
|
return dispatch(registerMap(payload));
|
|
@@ -19046,7 +20482,7 @@ var MapViewConnect = function MapViewConnect(_a) {
|
|
|
19046
20482
|
},
|
|
19047
20483
|
srs: srs,
|
|
19048
20484
|
bbox: bbox,
|
|
19049
|
-
mapPinLocation: displayMapPin &&
|
|
20485
|
+
mapPinLocation: displayMapPin && mapPinLocation,
|
|
19050
20486
|
dimensions: mapDimensions,
|
|
19051
20487
|
activeLayerId: activeLayerId,
|
|
19052
20488
|
animationDelay: animationDelay,
|
|
@@ -19055,33 +20491,14 @@ var MapViewConnect = function MapViewConnect(_a) {
|
|
|
19055
20491
|
if (mapDimensionPayload && mapDimensionPayload.dimension && mapDimensionPayload.dimension.name && mapDimensionPayload.dimension.name === 'time') {
|
|
19056
20492
|
setTime$1({
|
|
19057
20493
|
sourceId: mapId,
|
|
19058
|
-
origin: "".concat(mapDimensionPayload.origin, "==>
|
|
20494
|
+
origin: "".concat(mapDimensionPayload.origin, "==> ").concat(ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION),
|
|
19059
20495
|
value: handleMomentISOString(mapDimensionPayload.dimension.currentValue)
|
|
19060
20496
|
});
|
|
19061
20497
|
} else {
|
|
19062
20498
|
mapChangeDimension$1(mapDimensionPayload);
|
|
19063
20499
|
}
|
|
19064
20500
|
},
|
|
19065
|
-
|
|
19066
|
-
/* Always update all dimensions */
|
|
19067
|
-
mapUpdateAllDimensions(mapDimensionPayload);
|
|
19068
|
-
/* Additionally trigger the setTime action */
|
|
19069
|
-
|
|
19070
|
-
mapDimensionPayload.dimensions.forEach(function (dimension) {
|
|
19071
|
-
if (dimension.name && dimension.name === 'time') {
|
|
19072
|
-
setTime$1({
|
|
19073
|
-
sourceId: mapId,
|
|
19074
|
-
origin: 'MapViewConnect, 220',
|
|
19075
|
-
value: handleMomentISOString(dimension.currentValue)
|
|
19076
|
-
});
|
|
19077
|
-
}
|
|
19078
|
-
});
|
|
19079
|
-
},
|
|
19080
|
-
onLayerChangeStyle: layerChangeStyle$1,
|
|
19081
|
-
onLayerChangeDimension: layerChangeDimension$1,
|
|
19082
|
-
onLayerSetDimensions: layerSetDimensions$1,
|
|
19083
|
-
onServiceSetLayers: serviceSetLayers$1,
|
|
19084
|
-
onLayerSetStyles: layerSetStyles$1,
|
|
20501
|
+
onUpdateLayerInformation: updateLayerInformation,
|
|
19085
20502
|
onMapPinChangeLocation: mapPinChangeLocation,
|
|
19086
20503
|
onMapZoomEnd: function onMapZoomEnd(a) {
|
|
19087
20504
|
genericSetBbox({
|
|
@@ -19377,12 +20794,14 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
19377
20794
|
_ref$showMapId = _ref.showMapId,
|
|
19378
20795
|
showMapId = _ref$showMapId === void 0 ? false : _ref$showMapId,
|
|
19379
20796
|
_ref$order = _ref.order,
|
|
19380
|
-
order = _ref$order === void 0 ? 0 : _ref$order
|
|
20797
|
+
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
20798
|
+
_ref$source = _ref.source,
|
|
20799
|
+
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
19381
20800
|
var classes = useStyles$5();
|
|
19382
20801
|
return /*#__PURE__*/React.createElement(ToolContainerDraggable, {
|
|
19383
20802
|
startPosition: {
|
|
19384
20803
|
right: 20,
|
|
19385
|
-
top:
|
|
20804
|
+
top: 50
|
|
19386
20805
|
},
|
|
19387
20806
|
minWidth: 100,
|
|
19388
20807
|
onClose: onClose,
|
|
@@ -19393,7 +20812,8 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
19393
20812
|
"data-testid": "moveable-legend",
|
|
19394
20813
|
bounds: "parent",
|
|
19395
20814
|
onMouseDown: onMouseDown,
|
|
19396
|
-
order: order
|
|
20815
|
+
order: order,
|
|
20816
|
+
source: source
|
|
19397
20817
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19398
20818
|
className: classes.legendContainer
|
|
19399
20819
|
}, layers && layers.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -19433,7 +20853,9 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
19433
20853
|
|
|
19434
20854
|
var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
19435
20855
|
var _ref$showMapId = _ref.showMapId,
|
|
19436
|
-
showMapId = _ref$showMapId === void 0 ? false : _ref$showMapId
|
|
20856
|
+
showMapId = _ref$showMapId === void 0 ? false : _ref$showMapId,
|
|
20857
|
+
_ref$source = _ref.source,
|
|
20858
|
+
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
19437
20859
|
var dispatch = useDispatch();
|
|
19438
20860
|
var initialActiveMapId = useSelector(function (store) {
|
|
19439
20861
|
return getFirstMapId(store);
|
|
@@ -19451,6 +20873,9 @@ var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
|
19451
20873
|
var uiOrder = useSelector(function (store) {
|
|
19452
20874
|
return getDialogOrder(store, 'legend');
|
|
19453
20875
|
});
|
|
20876
|
+
var uiSource = useSelector(function (store) {
|
|
20877
|
+
return getDialogSource(store, 'legend');
|
|
20878
|
+
});
|
|
19454
20879
|
var uiIsOrderedOnTop = useSelector(function (store) {
|
|
19455
20880
|
return getDialogIsOrderedOnTop(store, 'legend');
|
|
19456
20881
|
});
|
|
@@ -19465,9 +20890,10 @@ var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
|
19465
20890
|
var registerDialog$1 = React.useCallback(function (setOpen) {
|
|
19466
20891
|
return dispatch(registerDialog({
|
|
19467
20892
|
type: 'legend',
|
|
19468
|
-
setOpen: setOpen
|
|
20893
|
+
setOpen: setOpen,
|
|
20894
|
+
source: source
|
|
19469
20895
|
}));
|
|
19470
|
-
}, [dispatch]);
|
|
20896
|
+
}, [dispatch, source]);
|
|
19471
20897
|
var unregisterDialog$1 = React.useCallback(function () {
|
|
19472
20898
|
return dispatch(unregisterDialog({
|
|
19473
20899
|
type: 'legend'
|
|
@@ -19494,7 +20920,8 @@ var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
|
19494
20920
|
mapId: mapId,
|
|
19495
20921
|
showMapId: showMapId,
|
|
19496
20922
|
onMouseDown: onOrderDialog,
|
|
19497
|
-
order: uiOrder
|
|
20923
|
+
order: uiOrder,
|
|
20924
|
+
source: uiSource
|
|
19498
20925
|
});
|
|
19499
20926
|
};
|
|
19500
20927
|
/**
|
|
@@ -19504,6 +20931,7 @@ var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
|
19504
20931
|
*
|
|
19505
20932
|
* Expects the following props:
|
|
19506
20933
|
* @param {boolean} showMapId (optional) showMapId: boolean - show the id of the map in the dialog title of which the legend is shown in te dialog
|
|
20934
|
+
* @param {Source} source (optional) source: Source - default is 'app', 'module' makes sure it will be shown on top of the module
|
|
19507
20935
|
|
|
19508
20936
|
* ``` <LegendConnect legendDialogId={legendDialogId} />```
|
|
19509
20937
|
*/
|
|
@@ -19537,7 +20965,9 @@ var LegendConnect = function LegendConnect(_a) {
|
|
|
19537
20965
|
* */
|
|
19538
20966
|
|
|
19539
20967
|
var LegendMapButtonConnect = function LegendMapButtonConnect(_ref) {
|
|
19540
|
-
var mapId = _ref.mapId
|
|
20968
|
+
var mapId = _ref.mapId,
|
|
20969
|
+
_ref$source = _ref.source,
|
|
20970
|
+
source = _ref$source === void 0 ? 'app' : _ref$source;
|
|
19541
20971
|
var dispatch = useDispatch();
|
|
19542
20972
|
var currentActiveMapId = useSelector(function (store) {
|
|
19543
20973
|
return getDialogMapId(store, 'legend');
|
|
@@ -19549,9 +20979,10 @@ var LegendMapButtonConnect = function LegendMapButtonConnect(_ref) {
|
|
|
19549
20979
|
dispatch(setActiveMapIdForDialog({
|
|
19550
20980
|
type: 'legend',
|
|
19551
20981
|
activeMapId: mapId,
|
|
19552
|
-
setOpen: currentActiveMapId !== mapId ? true : !isOpenInStore
|
|
20982
|
+
setOpen: currentActiveMapId !== mapId ? true : !isOpenInStore,
|
|
20983
|
+
source: source
|
|
19553
20984
|
}));
|
|
19554
|
-
}, [currentActiveMapId, dispatch, isOpenInStore, mapId]);
|
|
20985
|
+
}, [currentActiveMapId, dispatch, isOpenInStore, mapId, source]);
|
|
19555
20986
|
var isOpen = currentActiveMapId === mapId && isOpenInStore;
|
|
19556
20987
|
return /*#__PURE__*/React.createElement(MapControlButton, {
|
|
19557
20988
|
title: "Legend",
|
|
@@ -19608,22 +21039,6 @@ var generateUniqueLayerIds = function generateUniqueLayerIds(layers, activeLayer
|
|
|
19608
21039
|
};
|
|
19609
21040
|
};
|
|
19610
21041
|
|
|
19611
|
-
/* *
|
|
19612
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19613
|
-
* you may not use this file except in compliance with the License.
|
|
19614
|
-
* You may obtain a copy of the License at
|
|
19615
|
-
*
|
|
19616
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
19617
|
-
*
|
|
19618
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
19619
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19620
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19621
|
-
* See the License for the specific language governing permissions and
|
|
19622
|
-
* limitations under the License.
|
|
19623
|
-
*
|
|
19624
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
19625
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
19626
|
-
* */
|
|
19627
21042
|
var useStyles$4 = makeStyles(function (theme) {
|
|
19628
21043
|
return {
|
|
19629
21044
|
mapTitle: {
|
|
@@ -19658,6 +21073,8 @@ var ConfigurableConnectedMap = function ConfigurableConnectedMap(_ref) {
|
|
|
19658
21073
|
activeLayerId = _ref.activeLayerId,
|
|
19659
21074
|
_ref$baseLayer = _ref.baseLayer,
|
|
19660
21075
|
baseLayer = _ref$baseLayer === void 0 ? baseLayerGrey$1 : _ref$baseLayer,
|
|
21076
|
+
_ref$overLayers = _ref.overLayers,
|
|
21077
|
+
overLayers = _ref$overLayers === void 0 ? [overLayer$1] : _ref$overLayers,
|
|
19661
21078
|
bbox = _ref.bbox,
|
|
19662
21079
|
srs = _ref.srs,
|
|
19663
21080
|
_ref$displayTimeInMap = _ref.displayTimeInMap,
|
|
@@ -19681,6 +21098,11 @@ var ConfigurableConnectedMap = function ConfigurableConnectedMap(_ref) {
|
|
|
19681
21098
|
var mapId = React__default.useRef(id || generateMapId()).current;
|
|
19682
21099
|
var baseLayerWithUniqueId = Object.assign(Object.assign({}, baseLayer), {
|
|
19683
21100
|
id: "baseLayer-".concat(mapId)
|
|
21101
|
+
});
|
|
21102
|
+
var overLayersWithUniqueId = overLayers.map(function (layer) {
|
|
21103
|
+
return Object.assign(Object.assign({}, layer), {
|
|
21104
|
+
id: generateLayerId()
|
|
21105
|
+
});
|
|
19684
21106
|
}); // make sure all layers have a unique id before going forward
|
|
19685
21107
|
|
|
19686
21108
|
var _generateUniqueLayerI = generateUniqueLayerIds(layers, activeLayerId),
|
|
@@ -19701,9 +21123,7 @@ var ConfigurableConnectedMap = function ConfigurableConnectedMap(_ref) {
|
|
|
19701
21123
|
|
|
19702
21124
|
dispatch(setBaseLayers({
|
|
19703
21125
|
mapId: mapId,
|
|
19704
|
-
layers: [baseLayerWithUniqueId
|
|
19705
|
-
id: generateLayerId()
|
|
19706
|
-
})]
|
|
21126
|
+
layers: [baseLayerWithUniqueId].concat(_toConsumableArray(overLayersWithUniqueId))
|
|
19707
21127
|
})); // bbox
|
|
19708
21128
|
|
|
19709
21129
|
dispatch(setBbox$1({
|
|
@@ -20113,6 +21533,8 @@ var ConfigurableMapWithSliderConnect = function ConfigurableMapWithSliderConnect
|
|
|
20113
21533
|
layers = _ref.layers,
|
|
20114
21534
|
_ref$baseLayer = _ref.baseLayer,
|
|
20115
21535
|
baseLayer = _ref$baseLayer === void 0 ? undefined : _ref$baseLayer,
|
|
21536
|
+
_ref$overLayers = _ref.overLayers,
|
|
21537
|
+
overLayers = _ref$overLayers === void 0 ? undefined : _ref$overLayers,
|
|
20116
21538
|
_ref$activeLayerId = _ref.activeLayerId,
|
|
20117
21539
|
activeLayerId = _ref$activeLayerId === void 0 ? undefined : _ref$activeLayerId,
|
|
20118
21540
|
_ref$shouldAutoUpdate = _ref.shouldAutoUpdate,
|
|
@@ -20146,6 +21568,7 @@ var ConfigurableMapWithSliderConnect = function ConfigurableMapWithSliderConnect
|
|
|
20146
21568
|
layers: layers || [],
|
|
20147
21569
|
activeLayerId: activeLayerId,
|
|
20148
21570
|
baseLayer: baseLayer,
|
|
21571
|
+
overLayers: overLayers,
|
|
20149
21572
|
bbox: bbox,
|
|
20150
21573
|
srs: srs,
|
|
20151
21574
|
shouldAutoUpdate: shouldAutoUpdate,
|
|
@@ -20367,7 +21790,8 @@ var SyncGroupList = function SyncGroupList(_ref) {
|
|
|
20367
21790
|
return addNewGroup(groupObject.id);
|
|
20368
21791
|
} : function () {
|
|
20369
21792
|
return removeGroup(groupObject.id);
|
|
20370
|
-
}
|
|
21793
|
+
},
|
|
21794
|
+
size: "large"
|
|
20371
21795
|
}, index === 0 ? /*#__PURE__*/React.createElement(Add, {
|
|
20372
21796
|
className: classes.iconColor
|
|
20373
21797
|
}) : /*#__PURE__*/React.createElement(DeleteForever, {
|
|
@@ -20886,4 +22310,4 @@ var CoreThemeStoreProvider = function CoreThemeStoreProvider(_ref2) {
|
|
|
20886
22310
|
}, children)));
|
|
20887
22311
|
};
|
|
20888
22312
|
|
|
20889
|
-
export { ConfigurableConnectedMap, ConfigurableMapWithSliderConnect, CoreThemeProvider, CoreThemeStoreProvider, HarmRefTimePreset, HarmonieTempAndPrecipPreset, LayerManagerConnect, LayerManagerMapButtonConnect, Legend, LegendConnect, LegendMapButtonConnect, MapControls, MapView, MapViewConnect, MapViewLayer, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, ReactMapView, ReactMapViewLayer, SyncGroupViewerConnect, index as SyncGroups, TimeSliderConnect, TooltipSelect, ZoomControlConnect, ZoomControls, componentsLookUp, coreModuleConfig, dateFormat, defaultConfigurations, filterNonTimeDimensions, generateLayerId, generateMapId,
|
|
22313
|
+
export { ConfigurableConnectedMap, ConfigurableMapWithSliderConnect, CoreThemeProvider, CoreThemeStoreProvider, HarmRefTimePreset, HarmonieTempAndPrecipPreset, LayerManagerConnect, LayerManagerMapButtonConnect, Legend, LegendConnect, LegendMapButtonConnect, MapControls, MapView, MapViewConnect, MapViewLayer, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, ReactMapView, ReactMapViewLayer, SyncGroupViewerConnect, index as SyncGroups, TimeSliderConnect, TooltipSelect, ZoomControlConnect, ZoomControls, componentsLookUp, coreModuleConfig, dateFormat, defaultConfigurations, filterNonTimeDimensions, generateLayerId, generateMapId, generateTimesliderId, getFirstTimeStepForLayerId, getLastTimeStepForLayerId, getNextTimeStepForLayerId, getPreviousTimeStepForLayerId, getWMJSDimensionForLayerAndDimension, getWMJSMapById, getWMJSTimeDimensionForLayerId, getWMLayerById, reducer$6 as layerReducer, makeMapPreset, actions$3 as mapActions, constants$1 as mapConstants, selectors as mapSelectors, types$2 as mapTypes, utils as mapUtils, publicLayers, publicServices, registerWMJSMap, registerWMLayer, store, actions as syncGroupActions, synchronizationGroupConfig as synchronizationGroupModuleConfig, testLayers, actions$2 as uiActions, types$1 as uiTypes, useStyles$3 as useStyles };
|