@opengeoweb/core 2.14.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +95 -100
- package/index.umd.js +98 -106
- package/lib/components/ConfigurableMap/ConfigurableMapConnect.d.ts +1 -0
- package/lib/components/Legend/LegendConnect.d.ts +1 -1
- package/lib/components/MapView/MapViewConnect.MapPin.stories.d.ts +4 -0
- package/lib/components/MapView/MapViewConnect.stories.d.ts +0 -1
- package/lib/components/MapWarning/MapWarningProperties.d.ts +16 -1
- package/lib/components/ReactMapView/ReactMapView.d.ts +1 -0
- package/lib/store/mapStore/map/selectors.d.ts +1 -1
- package/lib/store/mapStore/map/types.d.ts +1 -0
- package/lib/store/mapStore/map/utils.d.ts +2 -1
- package/package.json +7 -6
- package/lib/components/CustomSwitch/CustomSwitch.d.ts +0 -3
- package/lib/components/CustomSwitch/CustomSwitch.spec.d.ts +0 -1
- package/lib/components/CustomSwitch/CustomSwitch.stories.d.ts +0 -7
- package/lib/components/CustomSwitch/index.d.ts +0 -1
- package/lib/components/MapView/MapViewConnect.DisableMapPin.stories.d.ts +0 -5
package/index.esm.js
CHANGED
|
@@ -13,6 +13,7 @@ import makeStyles from '@mui/styles/makeStyles';
|
|
|
13
13
|
import { legendImageStore, WMImageEventType, getLegendGraphicURLForLayer, WMGetServiceFromStore, LayerType as LayerType$1, getMapImageStore, WMBBOX, debug, DebugType, WMJSMap, WMLayer } from '@opengeoweb/webmap';
|
|
14
14
|
import { Sortable, ReactSortable } from 'react-sortablejs';
|
|
15
15
|
import createStyles from '@mui/styles/createStyles';
|
|
16
|
+
import { FixedSizeList } from 'react-window';
|
|
16
17
|
import withStyles from '@mui/styles/withStyles';
|
|
17
18
|
import { debounce as debounce$1 } from 'throttle-debounce';
|
|
18
19
|
import cloneDeep from 'lodash.clonedeep';
|
|
@@ -971,6 +972,8 @@ var createMap = function createMap(_ref) {
|
|
|
971
972
|
activeMapPresetId = _ref$activeMapPresetI === void 0 ? null : _ref$activeMapPresetI,
|
|
972
973
|
_ref$displayMapPin = _ref.displayMapPin,
|
|
973
974
|
displayMapPin = _ref$displayMapPin === void 0 ? false : _ref$displayMapPin,
|
|
975
|
+
_ref$disableMapPin = _ref.disableMapPin,
|
|
976
|
+
disableMapPin = _ref$disableMapPin === void 0 ? false : _ref$disableMapPin,
|
|
974
977
|
_ref$shouldShowZoomCo = _ref.shouldShowZoomControls,
|
|
975
978
|
shouldShowZoomControls = _ref$shouldShowZoomCo === void 0 ? true : _ref$shouldShowZoomCo;
|
|
976
979
|
return {
|
|
@@ -998,6 +1001,7 @@ var createMap = function createMap(_ref) {
|
|
|
998
1001
|
isTimeSliderVisible: isTimeSliderVisible,
|
|
999
1002
|
activeMapPresetId: activeMapPresetId,
|
|
1000
1003
|
displayMapPin: displayMapPin,
|
|
1004
|
+
disableMapPin: disableMapPin,
|
|
1001
1005
|
shouldShowZoomControls: shouldShowZoomControls
|
|
1002
1006
|
};
|
|
1003
1007
|
};
|
|
@@ -4150,11 +4154,11 @@ var getPinLocation = createSelector(getMapById, function (store) {
|
|
|
4150
4154
|
* Example getDisableMapPin(store);
|
|
4151
4155
|
* @param {object} store store: object - store object
|
|
4152
4156
|
* @param {string} mapId mapId: string - Id of the map
|
|
4153
|
-
* @returns {boolean} returnType: boolean
|
|
4157
|
+
* @returns {boolean} returnType: boolean
|
|
4154
4158
|
*/
|
|
4155
4159
|
|
|
4156
4160
|
var getDisableMapPin = createSelector(getMapById, function (store) {
|
|
4157
|
-
return store ? store.disableMapPin :
|
|
4161
|
+
return store ? store.disableMapPin : false;
|
|
4158
4162
|
});
|
|
4159
4163
|
/**
|
|
4160
4164
|
* Returns the diplay map pin boolean for the current map
|
|
@@ -7307,7 +7311,7 @@ var LegendDialog = function LegendDialog(_ref) {
|
|
|
7307
7311
|
}, "No layers")));
|
|
7308
7312
|
};
|
|
7309
7313
|
|
|
7310
|
-
var IS_LEGEND_OPEN_BY_DEFAULT =
|
|
7314
|
+
var IS_LEGEND_OPEN_BY_DEFAULT = false;
|
|
7311
7315
|
|
|
7312
7316
|
var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
7313
7317
|
var _ref$showMapId = _ref.showMapId,
|
|
@@ -9012,6 +9016,12 @@ var AddLayersPopup = function AddLayersPopup(_ref) {
|
|
|
9012
9016
|
}
|
|
9013
9017
|
};
|
|
9014
9018
|
|
|
9019
|
+
React.useEffect(function () {
|
|
9020
|
+
if (!isEqual(preloadedServices, services)) {
|
|
9021
|
+
setServices(preloadedServices);
|
|
9022
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9023
|
+
|
|
9024
|
+
}, [preloadedServices]);
|
|
9015
9025
|
return /*#__PURE__*/React.createElement(Dialog, {
|
|
9016
9026
|
fullWidth: true,
|
|
9017
9027
|
maxWidth: "md",
|
|
@@ -9126,10 +9136,22 @@ var AddLayersButton = function AddLayersButton(_ref) {
|
|
|
9126
9136
|
open = _React$useState2[0],
|
|
9127
9137
|
setOpen = _React$useState2[1];
|
|
9128
9138
|
|
|
9139
|
+
var _React$useState3 = React.useState(shouldFocus),
|
|
9140
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
9141
|
+
isTooltipDisabled = _React$useState4[0],
|
|
9142
|
+
setTooltipDisabled = _React$useState4[1];
|
|
9143
|
+
|
|
9129
9144
|
var handleClose = function handleClose() {
|
|
9130
9145
|
setOpen(!open);
|
|
9131
9146
|
};
|
|
9132
9147
|
|
|
9148
|
+
var onBlurTooltip = function onBlurTooltip(event) {
|
|
9149
|
+
// enable tooltip again after user blurs
|
|
9150
|
+
if (event.relatedTarget) {
|
|
9151
|
+
setTooltipDisabled(false);
|
|
9152
|
+
}
|
|
9153
|
+
};
|
|
9154
|
+
|
|
9133
9155
|
React.useEffect(function () {
|
|
9134
9156
|
if (shouldFocus && ref.current) {
|
|
9135
9157
|
ref.current.focus();
|
|
@@ -9137,7 +9159,9 @@ var AddLayersButton = function AddLayersButton(_ref) {
|
|
|
9137
9159
|
|
|
9138
9160
|
}, []);
|
|
9139
9161
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
9140
|
-
title: tooltip
|
|
9162
|
+
title: tooltip,
|
|
9163
|
+
disableFocusListener: isTooltipDisabled,
|
|
9164
|
+
onBlur: onBlurTooltip
|
|
9141
9165
|
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
9142
9166
|
onClick: handleClose,
|
|
9143
9167
|
sx: styles$2.button,
|
|
@@ -11938,16 +11962,29 @@ var LayerList = function LayerList(_ref) {
|
|
|
11938
11962
|
mapLayers = _ref.mapLayers,
|
|
11939
11963
|
keywordIds = _ref.keywordIds,
|
|
11940
11964
|
allKeywordsActive = _ref.allKeywordsActive;
|
|
11965
|
+
var layerSelectFilterHeight = 199;
|
|
11941
11966
|
|
|
11942
11967
|
var _React$useState = React.useState(0),
|
|
11943
11968
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
11944
11969
|
numberOfLayers = _React$useState2[0],
|
|
11945
11970
|
setNumberOfLayers = _React$useState2[1];
|
|
11946
11971
|
|
|
11972
|
+
var _React$useState3 = React.useState([]),
|
|
11973
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
11974
|
+
layersFilteredFromService = _React$useState4[0],
|
|
11975
|
+
setLayersFilteredFromService = _React$useState4[1];
|
|
11976
|
+
|
|
11947
11977
|
React.useEffect(function () {
|
|
11948
11978
|
setNumberOfLayers(serviceIds.reduce(function (totalNumberOfLayers, serviceId) {
|
|
11949
11979
|
return totalNumberOfLayers + filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString).length;
|
|
11950
11980
|
}, 0));
|
|
11981
|
+
setLayersFilteredFromService(serviceIds.reduce(function (layerList, serviceId) {
|
|
11982
|
+
return layerList.concat(filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString).map(function (layer) {
|
|
11983
|
+
return Object.assign(Object.assign({}, layer), {
|
|
11984
|
+
serviceId: serviceId
|
|
11985
|
+
});
|
|
11986
|
+
}));
|
|
11987
|
+
}, []));
|
|
11951
11988
|
}, [serviceIds, keywordIds, services, searchString, allKeywordsActive]);
|
|
11952
11989
|
return /*#__PURE__*/React.createElement(Box, {
|
|
11953
11990
|
"data-testid": "layerList"
|
|
@@ -11956,25 +11993,26 @@ var LayerList = function LayerList(_ref) {
|
|
|
11956
11993
|
marginBottom: '4px',
|
|
11957
11994
|
fontSize: '12px'
|
|
11958
11995
|
}
|
|
11959
|
-
}, numberOfLayers, " results"), /*#__PURE__*/React.createElement(
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11996
|
+
}, numberOfLayers, " results"), /*#__PURE__*/React.createElement(FixedSizeList, {
|
|
11997
|
+
height: layerSelectHeight - layerSelectFilterHeight,
|
|
11998
|
+
itemCount: numberOfLayers,
|
|
11999
|
+
itemSize: 68
|
|
12000
|
+
}, function (_ref2) {
|
|
12001
|
+
var index = _ref2.index,
|
|
12002
|
+
style = _ref2.style;
|
|
12003
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12004
|
+
style: style,
|
|
12005
|
+
key: layersFilteredFromService[index].name
|
|
12006
|
+
}, /*#__PURE__*/React.createElement(LayerListRow, {
|
|
12007
|
+
layer: layersFilteredFromService[index],
|
|
12008
|
+
layerIndex: index,
|
|
12009
|
+
service: services[layersFilteredFromService[index].serviceId],
|
|
12010
|
+
serviceUrl: services[layersFilteredFromService[index].serviceId].serviceUrl,
|
|
12011
|
+
addLayer: addLayer,
|
|
12012
|
+
deleteLayer: deleteLayer,
|
|
12013
|
+
mapLayers: mapLayers
|
|
12014
|
+
}));
|
|
12015
|
+
}));
|
|
11978
12016
|
};
|
|
11979
12017
|
|
|
11980
12018
|
/* *
|
|
@@ -12796,40 +12834,6 @@ var KeywordFilterResultsListItemConnect = function KeywordFilterResultsListItemC
|
|
|
12796
12834
|
});
|
|
12797
12835
|
};
|
|
12798
12836
|
|
|
12799
|
-
/* *
|
|
12800
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12801
|
-
* you may not use this file except in compliance with the License.
|
|
12802
|
-
* You may obtain a copy of the License at
|
|
12803
|
-
*
|
|
12804
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12805
|
-
*
|
|
12806
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12807
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12808
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12809
|
-
* See the License for the specific language governing permissions and
|
|
12810
|
-
* limitations under the License.
|
|
12811
|
-
*
|
|
12812
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
12813
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
12814
|
-
* */
|
|
12815
|
-
var CustomSwitch = withStyles(function (theme) {
|
|
12816
|
-
return {
|
|
12817
|
-
switchBase: {
|
|
12818
|
-
'&$checked': {
|
|
12819
|
-
color: theme.palette.geowebColors.customSlider.thumb
|
|
12820
|
-
},
|
|
12821
|
-
'&$checked + $track': {
|
|
12822
|
-
backgroundColor: theme.palette.geowebColors.buttons.primary["default"].fill
|
|
12823
|
-
}
|
|
12824
|
-
},
|
|
12825
|
-
checked: {},
|
|
12826
|
-
track: {
|
|
12827
|
-
backgroundColor: theme.palette.geowebColors.customSlider.switchTrackDisabled,
|
|
12828
|
-
opacity: '1 !important'
|
|
12829
|
-
}
|
|
12830
|
-
};
|
|
12831
|
-
})(Switch);
|
|
12832
|
-
|
|
12833
12837
|
/* *
|
|
12834
12838
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12835
12839
|
* you may not use this file except in compliance with the License.
|
|
@@ -12866,7 +12870,7 @@ var KeywordFilterSelectAllSwitchConnect = function KeywordFilterSelectAllSwitchC
|
|
|
12866
12870
|
keywords: keywords
|
|
12867
12871
|
}));
|
|
12868
12872
|
}, [allKeywordIds, allKeywordsActive, checkedKeywordIds, dispatch]);
|
|
12869
|
-
return /*#__PURE__*/React.createElement(
|
|
12873
|
+
return /*#__PURE__*/React.createElement(Switch, {
|
|
12870
12874
|
checked: allKeywordsActive,
|
|
12871
12875
|
onChange: toggleKeywords,
|
|
12872
12876
|
"data-testid": "customSwitch"
|
|
@@ -14448,31 +14452,6 @@ var useStyles$b = makeStyles(function (theme) {
|
|
|
14448
14452
|
disabled: {}
|
|
14449
14453
|
};
|
|
14450
14454
|
});
|
|
14451
|
-
var TimeStepSwitch = withStyles(function (theme) {
|
|
14452
|
-
return {
|
|
14453
|
-
root: {
|
|
14454
|
-
marginLeft: '18px'
|
|
14455
|
-
},
|
|
14456
|
-
thumb: {
|
|
14457
|
-
width: 20,
|
|
14458
|
-
height: 20,
|
|
14459
|
-
margin: '0 0 0 0'
|
|
14460
|
-
},
|
|
14461
|
-
switchBase: {
|
|
14462
|
-
'&$checked': {
|
|
14463
|
-
color: theme.palette.geowebColors.customSlider.thumb
|
|
14464
|
-
},
|
|
14465
|
-
'&$checked + $track': {
|
|
14466
|
-
backgroundColor: theme.palette.geowebColors.customSlider.switchTrack
|
|
14467
|
-
}
|
|
14468
|
-
},
|
|
14469
|
-
checked: {},
|
|
14470
|
-
track: {
|
|
14471
|
-
backgroundColor: theme.palette.geowebColors.customSlider.switchTrackDisabled,
|
|
14472
|
-
opacity: '1 !important'
|
|
14473
|
-
}
|
|
14474
|
-
};
|
|
14475
|
-
})(Switch);
|
|
14476
14455
|
|
|
14477
14456
|
var TimeStepButton = function TimeStepButton(_ref) {
|
|
14478
14457
|
var timeStep = _ref.timeStep,
|
|
@@ -14575,14 +14554,17 @@ var TimeStepButton = function TimeStepButton(_ref) {
|
|
|
14575
14554
|
}, /*#__PURE__*/React.createElement("span", {
|
|
14576
14555
|
"data-testid": "timestepAutoSwitchTooltip"
|
|
14577
14556
|
}, /*#__PURE__*/React.createElement(FormControlLabel, {
|
|
14578
|
-
control: /*#__PURE__*/React.createElement(
|
|
14557
|
+
control: /*#__PURE__*/React.createElement(Switch, {
|
|
14579
14558
|
checked: isTimestepAuto,
|
|
14580
14559
|
onChange: function onChange() {
|
|
14581
14560
|
return onToggleTimestepAuto();
|
|
14582
14561
|
},
|
|
14583
14562
|
disabled: disabled,
|
|
14584
14563
|
id: "timestepAutoSwitch",
|
|
14585
|
-
disableRipple: true
|
|
14564
|
+
disableRipple: true,
|
|
14565
|
+
sx: {
|
|
14566
|
+
marginLeft: '18px'
|
|
14567
|
+
}
|
|
14586
14568
|
}),
|
|
14587
14569
|
label: "Auto",
|
|
14588
14570
|
labelPlacement: "end",
|
|
@@ -20405,8 +20387,10 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
20405
20387
|
|
|
20406
20388
|
|
|
20407
20389
|
if (!prevProps || prevProps.disableMapPin !== props.disableMapPin) {
|
|
20408
|
-
if (
|
|
20409
|
-
this.adaguc.webMapJS.getMapPin().
|
|
20390
|
+
if (props.disableMapPin === true) {
|
|
20391
|
+
this.adaguc.webMapJS.getMapPin().setMapPinDisabled();
|
|
20392
|
+
} else if (props.disableMapPin === false) {
|
|
20393
|
+
this.adaguc.webMapJS.getMapPin().setMapPinEnabled();
|
|
20410
20394
|
}
|
|
20411
20395
|
}
|
|
20412
20396
|
/* Change the animation delay */
|
|
@@ -20751,7 +20735,10 @@ var ReactMapView = /*#__PURE__*/function (_React$Component) {
|
|
|
20751
20735
|
_this4.onUpdateBBoxListener(newBbox);
|
|
20752
20736
|
}, true);
|
|
20753
20737
|
this.adaguc.webMapJS.addListener('onsetmappin', function (mapPinLatLonCoordinate) {
|
|
20754
|
-
|
|
20738
|
+
// only change location when mapPin is visible and enabled
|
|
20739
|
+
if (onMapPinChangeLocation && // eslint-disable-next-line react/destructuring-assignment
|
|
20740
|
+
_this4.props.displayMapPin && // eslint-disable-next-line react/destructuring-assignment
|
|
20741
|
+
!_this4.props.disableMapPin) {
|
|
20755
20742
|
onMapPinChangeLocation({
|
|
20756
20743
|
mapPinLocation: {
|
|
20757
20744
|
lat: mapPinLatLonCoordinate.lat,
|
|
@@ -20866,6 +20853,7 @@ ReactMapView.defaultProps = {
|
|
|
20866
20853
|
},
|
|
20867
20854
|
shouldAutoFetch: true,
|
|
20868
20855
|
displayMapPin: false,
|
|
20856
|
+
disableMapPin: false,
|
|
20869
20857
|
onMount: function onMount() {
|
|
20870
20858
|
return null;
|
|
20871
20859
|
},
|
|
@@ -21390,7 +21378,8 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_a) {
|
|
|
21390
21378
|
displayDimensionSelectButtonInMap = _a$displayDimensionSe === void 0 ? true : _a$displayDimensionSe,
|
|
21391
21379
|
_a$multiLegend = _a.multiLegend,
|
|
21392
21380
|
multiLegend = _a$multiLegend === void 0 ? true : _a$multiLegend,
|
|
21393
|
-
|
|
21381
|
+
shouldShowLayerManager = _a.shouldShowLayerManager,
|
|
21382
|
+
props = __rest(_a, ["id", "title", "layers", "shouldAutoUpdate", "shouldAnimate", "bbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager"]);
|
|
21394
21383
|
|
|
21395
21384
|
var dispatch = useDispatch();
|
|
21396
21385
|
var mapId = React__default.useRef(id || generateMapId()).current;
|
|
@@ -21419,7 +21408,17 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_a) {
|
|
|
21419
21408
|
dispatch(mapActions$1.setMapPreset({
|
|
21420
21409
|
mapId: mapId,
|
|
21421
21410
|
initialProps: initialProps
|
|
21422
|
-
}));
|
|
21411
|
+
}));
|
|
21412
|
+
|
|
21413
|
+
if (shouldShowLayerManager !== undefined) {
|
|
21414
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
21415
|
+
type: 'layerManager',
|
|
21416
|
+
mapId: mapId,
|
|
21417
|
+
setOpen: shouldShowLayerManager,
|
|
21418
|
+
source: 'app'
|
|
21419
|
+
}));
|
|
21420
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
21421
|
+
|
|
21423
21422
|
}, []);
|
|
21424
21423
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
21425
21424
|
sx: {
|
|
@@ -22437,21 +22436,17 @@ var MapWarningProperties = function MapWarningProperties(_ref) {
|
|
|
22437
22436
|
}
|
|
22438
22437
|
}, /*#__PURE__*/React__default.createElement("h1", {
|
|
22439
22438
|
"data-testid": "map-warning-properties-title"
|
|
22440
|
-
}, selectedFeatureProperties.
|
|
22441
|
-
"data-testid": "map-warning-properties-row"
|
|
22442
|
-
}, "Event: ", selectedFeatureProperties.details[0].event), selectedFeatureProperties.details[0].sent && /*#__PURE__*/React__default.createElement("pre", {
|
|
22443
|
-
"data-testid": "map-warning-properties-row"
|
|
22444
|
-
}, "Sent:", ' ', moment.utc(selectedFeatureProperties.details[0].sent).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.details[0].expires && /*#__PURE__*/React__default.createElement("pre", {
|
|
22439
|
+
}, selectedFeatureProperties.areaDesc), selectedFeatureProperties.areaDesc && /*#__PURE__*/React__default.createElement("pre", {
|
|
22445
22440
|
"data-testid": "map-warning-properties-row"
|
|
22446
|
-
}, "
|
|
22441
|
+
}, "event: ", selectedFeatureProperties.languages[2].event), selectedFeatureProperties.onset && /*#__PURE__*/React__default.createElement("pre", {
|
|
22447
22442
|
"data-testid": "map-warning-properties-row"
|
|
22448
|
-
}, "
|
|
22443
|
+
}, "Sent:", ' ', moment.utc(selectedFeatureProperties.onset).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.expires && /*#__PURE__*/React__default.createElement("pre", {
|
|
22449
22444
|
"data-testid": "map-warning-properties-row"
|
|
22450
|
-
}, "
|
|
22445
|
+
}, "Expires:", ' ', moment.utc(selectedFeatureProperties.expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.languages[2].senderName && /*#__PURE__*/React__default.createElement("pre", {
|
|
22451
22446
|
"data-testid": "map-warning-properties-row"
|
|
22452
|
-
}, "
|
|
22447
|
+
}, "Sender: ", selectedFeatureProperties.languages[2].senderName), selectedFeatureProperties.identifier && /*#__PURE__*/React__default.createElement("pre", {
|
|
22453
22448
|
"data-testid": "map-warning-properties-row"
|
|
22454
|
-
}, "
|
|
22449
|
+
}, "Identifier: ", selectedFeatureProperties.identifier));
|
|
22455
22450
|
};
|
|
22456
22451
|
|
|
22457
22452
|
/* *
|
package/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@mui/material'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@mui/styles/makeStyles'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('@mui/styles/createStyles'), require('@mui/styles/withStyles'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@mui/material', '@opengeoweb/shared', '@opengeoweb/theme', '@mui/styles/makeStyles', '@opengeoweb/webmap', 'react-sortablejs', '@mui/styles/createStyles', '@mui/styles/withStyles', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'redux-dynamic-modules', 'redux-dynamic-modules-saga'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.material, global.shared, global.theme, global.makeStyles, global.webmap, global.reactSortablejs, global.createStyles, global.withStyles, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.reduxDynamicModules, global.reduxDynamicModulesSaga));
|
|
5
|
-
})(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, material, shared, theme, makeStyles, webmap, reactSortablejs, createStyles, withStyles, throttleDebounce, cloneDeep, proj4, turf, reduxDynamicModules, reduxDynamicModulesSaga) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@reduxjs/toolkit'), require('immer'), require('moment'), require('react'), require('lodash'), require('redux-saga/effects'), require('react-redux'), require('@mui/material'), require('@opengeoweb/shared'), require('@opengeoweb/theme'), require('@mui/styles/makeStyles'), require('@opengeoweb/webmap'), require('react-sortablejs'), require('@mui/styles/createStyles'), require('react-window'), require('@mui/styles/withStyles'), require('throttle-debounce'), require('lodash.clonedeep'), require('proj4'), require('@turf/turf'), require('redux-dynamic-modules'), require('redux-dynamic-modules-saga')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@reduxjs/toolkit', 'immer', 'moment', 'react', 'lodash', 'redux-saga/effects', 'react-redux', '@mui/material', '@opengeoweb/shared', '@opengeoweb/theme', '@mui/styles/makeStyles', '@opengeoweb/webmap', 'react-sortablejs', '@mui/styles/createStyles', 'react-window', '@mui/styles/withStyles', 'throttle-debounce', 'lodash.clonedeep', 'proj4', '@turf/turf', 'redux-dynamic-modules', 'redux-dynamic-modules-saga'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Core = {}, global.toolkit, global.produce, global.moment, global.React, global._, global.effects, global.reactRedux, global.material, global.shared, global.theme, global.makeStyles, global.webmap, global.reactSortablejs, global.createStyles, global.reactWindow, global.withStyles, global.throttleDebounce, global.cloneDeep, global.proj4, global.turf, global.reduxDynamicModules, global.reduxDynamicModulesSaga));
|
|
5
|
+
})(this, (function (exports, toolkit, produce, moment, React, _, effects, reactRedux, material, shared, theme, makeStyles, webmap, reactSortablejs, createStyles, reactWindow, withStyles, throttleDebounce, cloneDeep, proj4, turf, reduxDynamicModules, reduxDynamicModulesSaga) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -822,8 +822,10 @@
|
|
|
822
822
|
activeMapPresetId = _y === void 0 ? null : _y,
|
|
823
823
|
_z = _a.displayMapPin,
|
|
824
824
|
displayMapPin = _z === void 0 ? false : _z,
|
|
825
|
-
_0 = _a.
|
|
826
|
-
|
|
825
|
+
_0 = _a.disableMapPin,
|
|
826
|
+
disableMapPin = _0 === void 0 ? false : _0,
|
|
827
|
+
_1 = _a.shouldShowZoomControls,
|
|
828
|
+
shouldShowZoomControls = _1 === void 0 ? true : _1;
|
|
827
829
|
return {
|
|
828
830
|
id: id,
|
|
829
831
|
isAnimating: isAnimating,
|
|
@@ -849,6 +851,7 @@
|
|
|
849
851
|
isTimeSliderVisible: isTimeSliderVisible,
|
|
850
852
|
activeMapPresetId: activeMapPresetId,
|
|
851
853
|
displayMapPin: displayMapPin,
|
|
854
|
+
disableMapPin: disableMapPin,
|
|
852
855
|
shouldShowZoomControls: shouldShowZoomControls
|
|
853
856
|
};
|
|
854
857
|
};
|
|
@@ -4067,11 +4070,11 @@
|
|
|
4067
4070
|
* Example getDisableMapPin(store);
|
|
4068
4071
|
* @param {object} store store: object - store object
|
|
4069
4072
|
* @param {string} mapId mapId: string - Id of the map
|
|
4070
|
-
* @returns {boolean} returnType: boolean
|
|
4073
|
+
* @returns {boolean} returnType: boolean
|
|
4071
4074
|
*/
|
|
4072
4075
|
|
|
4073
4076
|
var getDisableMapPin = toolkit.createSelector(getMapById, function (store) {
|
|
4074
|
-
return store ? store.disableMapPin :
|
|
4077
|
+
return store ? store.disableMapPin : false;
|
|
4075
4078
|
});
|
|
4076
4079
|
/**
|
|
4077
4080
|
* Returns the diplay map pin boolean for the current map
|
|
@@ -7433,7 +7436,7 @@
|
|
|
7433
7436
|
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
7434
7437
|
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
7435
7438
|
* */
|
|
7436
|
-
var IS_LEGEND_OPEN_BY_DEFAULT =
|
|
7439
|
+
var IS_LEGEND_OPEN_BY_DEFAULT = false;
|
|
7437
7440
|
|
|
7438
7441
|
var LegendConnectComponent = function LegendConnectComponent(_a) {
|
|
7439
7442
|
var _b = _a.showMapId,
|
|
@@ -9356,6 +9359,12 @@
|
|
|
9356
9359
|
}
|
|
9357
9360
|
};
|
|
9358
9361
|
|
|
9362
|
+
React__namespace.useEffect(function () {
|
|
9363
|
+
if (!_.isEqual(preloadedServices, services)) {
|
|
9364
|
+
setServices(preloadedServices);
|
|
9365
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9366
|
+
|
|
9367
|
+
}, [preloadedServices]);
|
|
9359
9368
|
return /*#__PURE__*/React__namespace.createElement(material.Dialog, {
|
|
9360
9369
|
fullWidth: true,
|
|
9361
9370
|
maxWidth: "md",
|
|
@@ -9485,10 +9494,21 @@
|
|
|
9485
9494
|
open = _f[0],
|
|
9486
9495
|
setOpen = _f[1];
|
|
9487
9496
|
|
|
9497
|
+
var _g = __read(React__namespace.useState(shouldFocus), 2),
|
|
9498
|
+
isTooltipDisabled = _g[0],
|
|
9499
|
+
setTooltipDisabled = _g[1];
|
|
9500
|
+
|
|
9488
9501
|
var handleClose = function handleClose() {
|
|
9489
9502
|
setOpen(!open);
|
|
9490
9503
|
};
|
|
9491
9504
|
|
|
9505
|
+
var onBlurTooltip = function onBlurTooltip(event) {
|
|
9506
|
+
// enable tooltip again after user blurs
|
|
9507
|
+
if (event.relatedTarget) {
|
|
9508
|
+
setTooltipDisabled(false);
|
|
9509
|
+
}
|
|
9510
|
+
};
|
|
9511
|
+
|
|
9492
9512
|
React__namespace.useEffect(function () {
|
|
9493
9513
|
if (shouldFocus && ref.current) {
|
|
9494
9514
|
ref.current.focus();
|
|
@@ -9496,7 +9516,9 @@
|
|
|
9496
9516
|
|
|
9497
9517
|
}, []);
|
|
9498
9518
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(material.Tooltip, {
|
|
9499
|
-
title: tooltip
|
|
9519
|
+
title: tooltip,
|
|
9520
|
+
disableFocusListener: isTooltipDisabled,
|
|
9521
|
+
onBlur: onBlurTooltip
|
|
9500
9522
|
}, /*#__PURE__*/React__namespace.createElement(material.IconButton, {
|
|
9501
9523
|
onClick: handleClose,
|
|
9502
9524
|
sx: styles$2.button,
|
|
@@ -12437,15 +12459,27 @@
|
|
|
12437
12459
|
mapLayers = _a.mapLayers,
|
|
12438
12460
|
keywordIds = _a.keywordIds,
|
|
12439
12461
|
allKeywordsActive = _a.allKeywordsActive;
|
|
12462
|
+
var layerSelectFilterHeight = 199;
|
|
12440
12463
|
|
|
12441
12464
|
var _b = __read(React__namespace.useState(0), 2),
|
|
12442
12465
|
numberOfLayers = _b[0],
|
|
12443
12466
|
setNumberOfLayers = _b[1];
|
|
12444
12467
|
|
|
12468
|
+
var _c = __read(React__namespace.useState([]), 2),
|
|
12469
|
+
layersFilteredFromService = _c[0],
|
|
12470
|
+
setLayersFilteredFromService = _c[1];
|
|
12471
|
+
|
|
12445
12472
|
React__namespace.useEffect(function () {
|
|
12446
12473
|
setNumberOfLayers(serviceIds.reduce(function (totalNumberOfLayers, serviceId) {
|
|
12447
12474
|
return totalNumberOfLayers + filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString).length;
|
|
12448
12475
|
}, 0));
|
|
12476
|
+
setLayersFilteredFromService(serviceIds.reduce(function (layerList, serviceId) {
|
|
12477
|
+
return layerList.concat(filterLayersFromService(serviceId, services, keywordIds, allKeywordsActive, searchString).map(function (layer) {
|
|
12478
|
+
return __assign(__assign({}, layer), {
|
|
12479
|
+
serviceId: serviceId
|
|
12480
|
+
});
|
|
12481
|
+
}));
|
|
12482
|
+
}, []));
|
|
12449
12483
|
}, [serviceIds, keywordIds, services, searchString, allKeywordsActive]);
|
|
12450
12484
|
return /*#__PURE__*/React__namespace.createElement(material.Box, {
|
|
12451
12485
|
"data-testid": "layerList"
|
|
@@ -12454,25 +12488,26 @@
|
|
|
12454
12488
|
marginBottom: '4px',
|
|
12455
12489
|
fontSize: '12px'
|
|
12456
12490
|
}
|
|
12457
|
-
}, numberOfLayers, " results"), /*#__PURE__*/React__namespace.createElement(
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
|
|
12473
|
-
|
|
12474
|
-
|
|
12475
|
-
|
|
12491
|
+
}, numberOfLayers, " results"), /*#__PURE__*/React__namespace.createElement(reactWindow.FixedSizeList, {
|
|
12492
|
+
height: layerSelectHeight - layerSelectFilterHeight,
|
|
12493
|
+
itemCount: numberOfLayers,
|
|
12494
|
+
itemSize: 68
|
|
12495
|
+
}, function (_a) {
|
|
12496
|
+
var index = _a.index,
|
|
12497
|
+
style = _a.style;
|
|
12498
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
12499
|
+
style: style,
|
|
12500
|
+
key: layersFilteredFromService[index].name
|
|
12501
|
+
}, /*#__PURE__*/React__namespace.createElement(LayerListRow, {
|
|
12502
|
+
layer: layersFilteredFromService[index],
|
|
12503
|
+
layerIndex: index,
|
|
12504
|
+
service: services[layersFilteredFromService[index].serviceId],
|
|
12505
|
+
serviceUrl: services[layersFilteredFromService[index].serviceId].serviceUrl,
|
|
12506
|
+
addLayer: addLayer,
|
|
12507
|
+
deleteLayer: deleteLayer,
|
|
12508
|
+
mapLayers: mapLayers
|
|
12509
|
+
}));
|
|
12510
|
+
}));
|
|
12476
12511
|
};
|
|
12477
12512
|
|
|
12478
12513
|
/* *
|
|
@@ -13394,40 +13429,6 @@
|
|
|
13394
13429
|
});
|
|
13395
13430
|
};
|
|
13396
13431
|
|
|
13397
|
-
/* *
|
|
13398
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13399
|
-
* you may not use this file except in compliance with the License.
|
|
13400
|
-
* You may obtain a copy of the License at
|
|
13401
|
-
*
|
|
13402
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13403
|
-
*
|
|
13404
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
13405
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13406
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13407
|
-
* See the License for the specific language governing permissions and
|
|
13408
|
-
* limitations under the License.
|
|
13409
|
-
*
|
|
13410
|
-
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
13411
|
-
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
13412
|
-
* */
|
|
13413
|
-
var CustomSwitch = withStyles__default["default"](function (theme) {
|
|
13414
|
-
return {
|
|
13415
|
-
switchBase: {
|
|
13416
|
-
'&$checked': {
|
|
13417
|
-
color: theme.palette.geowebColors.customSlider.thumb
|
|
13418
|
-
},
|
|
13419
|
-
'&$checked + $track': {
|
|
13420
|
-
backgroundColor: theme.palette.geowebColors.buttons.primary["default"].fill
|
|
13421
|
-
}
|
|
13422
|
-
},
|
|
13423
|
-
checked: {},
|
|
13424
|
-
track: {
|
|
13425
|
-
backgroundColor: theme.palette.geowebColors.customSlider.switchTrackDisabled,
|
|
13426
|
-
opacity: '1 !important'
|
|
13427
|
-
}
|
|
13428
|
-
};
|
|
13429
|
-
})(material.Switch);
|
|
13430
|
-
|
|
13431
13432
|
/* *
|
|
13432
13433
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13433
13434
|
* you may not use this file except in compliance with the License.
|
|
@@ -13464,7 +13465,7 @@
|
|
|
13464
13465
|
keywords: keywords
|
|
13465
13466
|
}));
|
|
13466
13467
|
}, [allKeywordIds, allKeywordsActive, checkedKeywordIds, dispatch]);
|
|
13467
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
13468
|
+
return /*#__PURE__*/React__namespace.createElement(material.Switch, {
|
|
13468
13469
|
checked: allKeywordsActive,
|
|
13469
13470
|
onChange: toggleKeywords,
|
|
13470
13471
|
"data-testid": "customSwitch"
|
|
@@ -15088,31 +15089,6 @@
|
|
|
15088
15089
|
disabled: {}
|
|
15089
15090
|
};
|
|
15090
15091
|
});
|
|
15091
|
-
var TimeStepSwitch = withStyles__default["default"](function (theme) {
|
|
15092
|
-
return {
|
|
15093
|
-
root: {
|
|
15094
|
-
marginLeft: '18px'
|
|
15095
|
-
},
|
|
15096
|
-
thumb: {
|
|
15097
|
-
width: 20,
|
|
15098
|
-
height: 20,
|
|
15099
|
-
margin: '0 0 0 0'
|
|
15100
|
-
},
|
|
15101
|
-
switchBase: {
|
|
15102
|
-
'&$checked': {
|
|
15103
|
-
color: theme.palette.geowebColors.customSlider.thumb
|
|
15104
|
-
},
|
|
15105
|
-
'&$checked + $track': {
|
|
15106
|
-
backgroundColor: theme.palette.geowebColors.customSlider.switchTrack
|
|
15107
|
-
}
|
|
15108
|
-
},
|
|
15109
|
-
checked: {},
|
|
15110
|
-
track: {
|
|
15111
|
-
backgroundColor: theme.palette.geowebColors.customSlider.switchTrackDisabled,
|
|
15112
|
-
opacity: '1 !important'
|
|
15113
|
-
}
|
|
15114
|
-
};
|
|
15115
|
-
})(material.Switch);
|
|
15116
15092
|
|
|
15117
15093
|
var TimeStepButton = function TimeStepButton(_a) {
|
|
15118
15094
|
var timeStep = _a.timeStep,
|
|
@@ -15214,14 +15190,17 @@
|
|
|
15214
15190
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
15215
15191
|
"data-testid": "timestepAutoSwitchTooltip"
|
|
15216
15192
|
}, /*#__PURE__*/React__namespace.createElement(material.FormControlLabel, {
|
|
15217
|
-
control: /*#__PURE__*/React__namespace.createElement(
|
|
15193
|
+
control: /*#__PURE__*/React__namespace.createElement(material.Switch, {
|
|
15218
15194
|
checked: isTimestepAuto,
|
|
15219
15195
|
onChange: function onChange() {
|
|
15220
15196
|
return onToggleTimestepAuto();
|
|
15221
15197
|
},
|
|
15222
15198
|
disabled: disabled,
|
|
15223
15199
|
id: "timestepAutoSwitch",
|
|
15224
|
-
disableRipple: true
|
|
15200
|
+
disableRipple: true,
|
|
15201
|
+
sx: {
|
|
15202
|
+
marginLeft: '18px'
|
|
15203
|
+
}
|
|
15225
15204
|
}),
|
|
15226
15205
|
label: "Auto",
|
|
15227
15206
|
labelPlacement: "end",
|
|
@@ -21052,8 +21031,10 @@
|
|
|
21052
21031
|
|
|
21053
21032
|
|
|
21054
21033
|
if (!prevProps || prevProps.disableMapPin !== props.disableMapPin) {
|
|
21055
|
-
if (
|
|
21056
|
-
this.adaguc.webMapJS.getMapPin().
|
|
21034
|
+
if (props.disableMapPin === true) {
|
|
21035
|
+
this.adaguc.webMapJS.getMapPin().setMapPinDisabled();
|
|
21036
|
+
} else if (props.disableMapPin === false) {
|
|
21037
|
+
this.adaguc.webMapJS.getMapPin().setMapPinEnabled();
|
|
21057
21038
|
}
|
|
21058
21039
|
}
|
|
21059
21040
|
/* Change the animation delay */
|
|
@@ -21376,7 +21357,10 @@
|
|
|
21376
21357
|
_this.onUpdateBBoxListener(newBbox);
|
|
21377
21358
|
}, true);
|
|
21378
21359
|
this.adaguc.webMapJS.addListener('onsetmappin', function (mapPinLatLonCoordinate) {
|
|
21379
|
-
|
|
21360
|
+
// only change location when mapPin is visible and enabled
|
|
21361
|
+
if (onMapPinChangeLocation && // eslint-disable-next-line react/destructuring-assignment
|
|
21362
|
+
_this.props.displayMapPin && // eslint-disable-next-line react/destructuring-assignment
|
|
21363
|
+
!_this.props.disableMapPin) {
|
|
21380
21364
|
onMapPinChangeLocation({
|
|
21381
21365
|
mapPinLocation: {
|
|
21382
21366
|
lat: mapPinLatLonCoordinate.lat,
|
|
@@ -21485,6 +21469,7 @@
|
|
|
21485
21469
|
},
|
|
21486
21470
|
shouldAutoFetch: true,
|
|
21487
21471
|
displayMapPin: false,
|
|
21472
|
+
disableMapPin: false,
|
|
21488
21473
|
onMount: function onMount() {
|
|
21489
21474
|
return null;
|
|
21490
21475
|
},
|
|
@@ -22029,7 +22014,8 @@
|
|
|
22029
22014
|
displayDimensionSelectButtonInMap = _o === void 0 ? true : _o,
|
|
22030
22015
|
_p = _a.multiLegend,
|
|
22031
22016
|
multiLegend = _p === void 0 ? true : _p,
|
|
22032
|
-
|
|
22017
|
+
shouldShowLayerManager = _a.shouldShowLayerManager,
|
|
22018
|
+
props = __rest(_a, ["id", "title", "layers", "shouldAutoUpdate", "shouldAnimate", "bbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager"]);
|
|
22033
22019
|
|
|
22034
22020
|
var dispatch = reactRedux.useDispatch();
|
|
22035
22021
|
var mapId = React__default["default"].useRef(id || generateMapId()).current;
|
|
@@ -22060,7 +22046,17 @@
|
|
|
22060
22046
|
dispatch(mapActions$1.setMapPreset({
|
|
22061
22047
|
mapId: mapId,
|
|
22062
22048
|
initialProps: initialProps
|
|
22063
|
-
}));
|
|
22049
|
+
}));
|
|
22050
|
+
|
|
22051
|
+
if (shouldShowLayerManager !== undefined) {
|
|
22052
|
+
dispatch(uiActions.setActiveMapIdForDialog({
|
|
22053
|
+
type: 'layerManager',
|
|
22054
|
+
mapId: mapId,
|
|
22055
|
+
setOpen: shouldShowLayerManager,
|
|
22056
|
+
source: 'app'
|
|
22057
|
+
}));
|
|
22058
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
22059
|
+
|
|
22064
22060
|
}, []);
|
|
22065
22061
|
return /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
22066
22062
|
sx: {
|
|
@@ -23131,21 +23127,17 @@
|
|
|
23131
23127
|
}
|
|
23132
23128
|
}, /*#__PURE__*/React__default["default"].createElement("h1", {
|
|
23133
23129
|
"data-testid": "map-warning-properties-title"
|
|
23134
|
-
}, selectedFeatureProperties.
|
|
23135
|
-
"data-testid": "map-warning-properties-row"
|
|
23136
|
-
}, "Event: ", selectedFeatureProperties.details[0].event), selectedFeatureProperties.details[0].sent && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23137
|
-
"data-testid": "map-warning-properties-row"
|
|
23138
|
-
}, "Sent:", ' ', moment__default["default"].utc(selectedFeatureProperties.details[0].sent).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.details[0].expires && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23130
|
+
}, selectedFeatureProperties.areaDesc), selectedFeatureProperties.areaDesc && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23139
23131
|
"data-testid": "map-warning-properties-row"
|
|
23140
|
-
}, "
|
|
23132
|
+
}, "event: ", selectedFeatureProperties.languages[2].event), selectedFeatureProperties.onset && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23141
23133
|
"data-testid": "map-warning-properties-row"
|
|
23142
|
-
}, "
|
|
23134
|
+
}, "Sent:", ' ', moment__default["default"].utc(selectedFeatureProperties.onset).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.expires && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23143
23135
|
"data-testid": "map-warning-properties-row"
|
|
23144
|
-
}, "
|
|
23136
|
+
}, "Expires:", ' ', moment__default["default"].utc(selectedFeatureProperties.expires).format('DD MMM YYYY, HH:mm'), ' ', "UTC"), selectedFeatureProperties.languages[2].senderName && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23145
23137
|
"data-testid": "map-warning-properties-row"
|
|
23146
|
-
}, "
|
|
23138
|
+
}, "Sender: ", selectedFeatureProperties.languages[2].senderName), selectedFeatureProperties.identifier && /*#__PURE__*/React__default["default"].createElement("pre", {
|
|
23147
23139
|
"data-testid": "map-warning-properties-row"
|
|
23148
|
-
}, "
|
|
23140
|
+
}, "Identifier: ", selectedFeatureProperties.identifier));
|
|
23149
23141
|
};
|
|
23150
23142
|
|
|
23151
23143
|
/* *
|
|
@@ -28,5 +28,6 @@ export interface ConfigurableMapConnectProps {
|
|
|
28
28
|
displayLayerManagerAndLegendButtonInMap?: boolean;
|
|
29
29
|
displayDimensionSelectButtonInMap?: boolean;
|
|
30
30
|
multiLegend?: boolean;
|
|
31
|
+
shouldShowLayerManager?: boolean;
|
|
31
32
|
}
|
|
32
33
|
export declare const ConfigurableMapConnect: React.FC<ConfigurableMapConnectProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Source } from '../../store/ui/types';
|
|
3
|
-
export declare const IS_LEGEND_OPEN_BY_DEFAULT =
|
|
3
|
+
export declare const IS_LEGEND_OPEN_BY_DEFAULT = false;
|
|
4
4
|
interface LegendConnectProps {
|
|
5
5
|
showMapId?: boolean;
|
|
6
6
|
source?: Source;
|
|
@@ -9,7 +9,6 @@ export * from './MapViewConnect.SetBaseLayers.stories';
|
|
|
9
9
|
export * from './MapViewConnect.ToggleControls.stories';
|
|
10
10
|
export * from './MapViewConnect.FeatureLayers.stories';
|
|
11
11
|
export * from './MapViewConnect.MapPin.stories';
|
|
12
|
-
export * from './MapViewConnect.DisableMapPin.stories';
|
|
13
12
|
export * from './MapViewConnect.SelectorTest.stories';
|
|
14
13
|
declare const _default: {
|
|
15
14
|
title: string;
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface WarningListProps {
|
|
3
|
-
selectedFeatureProperties:
|
|
3
|
+
selectedFeatureProperties: {
|
|
4
|
+
identifier?: string;
|
|
5
|
+
areaDesc?: string;
|
|
6
|
+
severity?: string;
|
|
7
|
+
certainty?: string;
|
|
8
|
+
onset?: string;
|
|
9
|
+
expires?: string;
|
|
10
|
+
languages?: Language[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface Language {
|
|
14
|
+
language: string;
|
|
15
|
+
event: string;
|
|
16
|
+
senderName: string;
|
|
17
|
+
headline: string;
|
|
18
|
+
description: string;
|
|
4
19
|
}
|
|
5
20
|
export declare const MapWarningProperties: React.FC<WarningListProps>;
|
|
6
21
|
export {};
|
|
@@ -752,7 +752,7 @@ export declare const getPinLocation: ((state: {
|
|
|
752
752
|
* Example getDisableMapPin(store);
|
|
753
753
|
* @param {object} store store: object - store object
|
|
754
754
|
* @param {string} mapId mapId: string - Id of the map
|
|
755
|
-
* @returns {boolean} returnType: boolean
|
|
755
|
+
* @returns {boolean} returnType: boolean
|
|
756
756
|
*/
|
|
757
757
|
export declare const getDisableMapPin: ((state: {
|
|
758
758
|
syncronizationGroupStore?: import("../../generic/synchronizationGroups/types").SynchronizationGroupState;
|
|
@@ -26,9 +26,10 @@ interface CreateMapProps {
|
|
|
26
26
|
isTimeSliderVisible?: boolean;
|
|
27
27
|
activeMapPresetId?: string;
|
|
28
28
|
displayMapPin?: boolean;
|
|
29
|
+
disableMapPin?: boolean;
|
|
29
30
|
shouldShowZoomControls?: boolean;
|
|
30
31
|
}
|
|
31
|
-
export declare const createMap: ({ id, isAnimating, animationStartTime, animationEndTime, isAutoUpdating, bbox, srs, baseLayers, overLayers, mapLayers, featureLayers, dimensions, activeLayerId, timeSliderScale, timeStep, animationDelay, timeSliderCenterTime, timeSliderSecondsPerPx, timeSliderDataScaleToSecondsPerPx, isTimestepAuto, isTimeSliderHoverOn, isTimeSliderVisible, activeMapPresetId, displayMapPin, shouldShowZoomControls, }: CreateMapProps) => WebMap;
|
|
32
|
+
export declare const createMap: ({ id, isAnimating, animationStartTime, animationEndTime, isAutoUpdating, bbox, srs, baseLayers, overLayers, mapLayers, featureLayers, dimensions, activeLayerId, timeSliderScale, timeStep, animationDelay, timeSliderCenterTime, timeSliderSecondsPerPx, timeSliderDataScaleToSecondsPerPx, isTimestepAuto, isTimeSliderHoverOn, isTimeSliderVisible, activeMapPresetId, displayMapPin, disableMapPin, shouldShowZoomControls, }: CreateMapProps) => WebMap;
|
|
32
33
|
export declare const checkValidLayersPayload: (layers: Layer[], mapId: string) => boolean;
|
|
33
34
|
/**
|
|
34
35
|
* This will get the map from the map draftstate.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "GeoWeb Core library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -13,25 +13,26 @@
|
|
|
13
13
|
"dependencies": {},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^17.0.2",
|
|
16
|
-
"@opengeoweb/theme": "2.
|
|
16
|
+
"@opengeoweb/theme": "2.15.0",
|
|
17
17
|
"@mui/material": "^5.2.8",
|
|
18
18
|
"@mui/styles": "^5.2.3",
|
|
19
19
|
"moment": "^2.29.0",
|
|
20
20
|
"react-redux": "^8.0.2",
|
|
21
21
|
"react-intl": "^5.17.5",
|
|
22
|
-
"
|
|
22
|
+
"lodash": "^4.17.20",
|
|
23
|
+
"@opengeoweb/shared": "2.15.0",
|
|
23
24
|
"react-draggable": "^4.4.3",
|
|
24
25
|
"re-resizable": "^6.9.0",
|
|
25
|
-
"
|
|
26
|
-
"@opengeoweb/form-fields": "2.14.0",
|
|
26
|
+
"@opengeoweb/form-fields": "2.15.0",
|
|
27
27
|
"react-hook-form": "^6.12.1",
|
|
28
28
|
"moment-timezone": "^0.5.31",
|
|
29
29
|
"@mui/lab": "^5.0.0-alpha.64",
|
|
30
30
|
"axios": "^0.25.0",
|
|
31
|
-
"@opengeoweb/webmap": "2.
|
|
31
|
+
"@opengeoweb/webmap": "2.15.0",
|
|
32
32
|
"throttle-debounce": "^3.0.1",
|
|
33
33
|
"proj4": "^2.6.2",
|
|
34
34
|
"react-sortablejs": "^6.0.0",
|
|
35
|
+
"react-window": "^1.8.7",
|
|
35
36
|
"immer": "^9.0.15",
|
|
36
37
|
"redux-dynamic-modules": "^5.2.0",
|
|
37
38
|
"@reduxjs/toolkit": "^1.8.3",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const CustomSwitch: import("react").JSXElementConstructor<Omit<import("@mui/material").SwitchProps, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"switchBase" | "checked" | "track"> & object>;
|
|
3
|
-
export default CustomSwitch;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as CustomSwitch } from './CustomSwitch';
|