@opengeoweb/core 14.5.1 → 15.0.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 +118 -148
- package/package.json +10 -10
- package/src/lib/components/ClockConnect/ClockConnect.d.ts +4 -0
- package/src/lib/components/ClockConnect/index.d.ts +1 -0
- package/src/lib/components/ConfigurableMapConnect/ConfigurableMapConnect.d.ts +1 -1
- package/src/lib/components/LayerManager/LayerContainerRow/LayerRow/AcceptanceTime/AcceptanceTime.d.ts +2 -2
- package/src/lib/components/LayerManager/LayerContainerRow/LayerRow/AcceptanceTime/AcceptanceTimeConnect.d.ts +1 -0
- package/src/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRow.d.ts +1 -1
- package/src/lib/components/MapViewConnect/MapViewConnect.ZoomToLayer.stories.d.ts +8 -0
- package/src/lib/components/MapViewConnect/olMapUtils.d.ts +2 -2
- package/src/lib/components/MultiMapViewConnect/MultiMapViewConnect.d.ts +1 -1
- package/src/lib/components/TimeSliderClockConnect/TimeSliderClockConnect.d.ts +0 -4
- package/src/lib/components/TimeSliderClockConnect/index.d.ts +0 -1
- package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/ControlButtonsConnect.d.ts +0 -5
- package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/ControlButtonsConnect.spec.d.ts +0 -1
- package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/OptionsMenuConnect.d.ts +0 -4
- package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/OptionsMenuConnect.spec.d.ts +0 -1
- /package/src/lib/components/{TimeSliderClockConnect/TimeSliderClockConnect.spec.d.ts → ClockConnect/ClockConnect.spec.d.ts} +0 -0
package/index.esm.js
CHANGED
|
@@ -2,15 +2,15 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Grid, InputLabel, Paper, Box, Typography, CircularProgress, List, ListSubheader, ListItemButton, ListItemText, DialogContentText, TextField, InputAdornment, Button, FormControl, MenuItem, useTheme, Tooltip, ListItem, ListItemIcon, Checkbox, Popper, Fade, styled, LinearProgress, Autocomplete, Switch, Select } from '@mui/material';
|
|
3
3
|
import React, { useMemo, useState, useCallback, useEffect, useContext } from 'react';
|
|
4
4
|
import { safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, CustomIconButton, CustomDialog, TooltipSelect, CustomTooltip, ToggleMenu, AlertIcon, useConfirmationDialog, useScrollingInIsolation, sliderHeaderStyle, CustomSlider, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, PROJECTION, calculateStartSize, useWheelStopPropagation, ToolContainerDraggable, sessionStorageProvider, useDebounce, usePrevious, dateUtils, ErrorBoundary } from '@opengeoweb/shared';
|
|
5
|
-
import { queryWMSLayersTree, invalidateWMSGetCapabilities, LayerType, webmapUtils, queryWMSServiceInfo, queryWMSLayers, getWMSServiceId, generateLayerId, WMJSDimension,
|
|
5
|
+
import { queryWMSLayersTree, invalidateWMSGetCapabilities, LayerType, webmapUtils, queryWMSServiceInfo, queryWMSLayers, getWMSServiceId, generateLayerId, WMJSDimension, getWMLayerById, getMapDimURL, handleDateUtilsISOString, WMLayer } from '@opengeoweb/webmap';
|
|
6
6
|
import { filterLayers, mapSelectors, layerActions, layerTypes, layerSelectors, mapActions, mapEnums, loadingIndicatorSelectors, layerUtils, serviceSelectors, serviceActions, uiSelectors, uiTypes, useSetupDialog, getUserAddedServices, uiActions, drawingToolSelectors, syncGroupsSelectors, syncConstants, getViewObjectForSyncGroup, getViewObjectForMapId, loadingIndicatorActions, genericSelectors, genericActions, defaultLayers, getSingularDrawtoolDrawLayerId, syncGroupsSelector, syncGroupsActions, routerUtils, mapUtils } from '@opengeoweb/store';
|
|
7
7
|
import { connect, useDispatch, useSelector, useStore, Provider } from 'react-redux';
|
|
8
8
|
import _, { isEqual, isArray, range, zip, throttle } from 'lodash';
|
|
9
9
|
import { Cached, Add, MapAdd, CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, CloudLoading, ColumnCollapsed, ColumnCollapse, DragHandle as DragHandle$1, None, FastForward, AutoUpdateActive, Both, Delete, Visibility, VisibilityOff, Copy, Overlayers, WorldMapProjection, Layers, Search, Exclamation, MyLocation, Airplane, Region, Pinned, Close, ExitDomain, LocationInfo, Measure, Options, Info, ThemeWrapper, lightTheme, FlagBritain, FlagNetherlands, FlagFinland, FlagNorway } from '@opengeoweb/theme';
|
|
10
10
|
import i18n from 'i18next';
|
|
11
11
|
import { useTranslation, I18nextProvider } from 'react-i18next';
|
|
12
|
-
import { TIME_SLIDER_NAMESPACE, timesliderTranslations, defaultTimeSpan, AutoUpdateButton, BackwardForwardStepButton, NowButton, handleSetNowEvent,
|
|
13
|
-
import { webmapReactTranslations, WEBMAP_REACT_NAMESPACE, webmapTranslations, WEBMAP_NAMESPACE, openLayersGetMapImageStore, LayerInfoButton, useEDRGetCollectionDetails, defaultEdrStyles, LayerInfoDialog, MapControlButton, MapDimensionSelect, dimensionConfig, DimensionSelectDialog, DimensionSelectButton, LegendDialog, LegendButton, MapContext, emptyGeoJSON, MapFeatureClass, setMapCenter, OpenLayersFeatureLayer, OpenLayersMapDraw, makeTimeList, useGetWMLayerInstance, getIsInsideAcceptanceTime, OpenLayersLayer, MapMeasure, useSetIntervalWhenVisible, TimeContext, OpenLayersMapView, WMSLayer, genericOpenLayersFeatureStyle, OpenLayersGetFeatureInfo, MapControls, OpenLayersZoomControl, getLayerUpdateInfo, publicLayers } from '@opengeoweb/webmap-react';
|
|
12
|
+
import { TIME_SLIDER_NAMESPACE, timesliderTranslations, defaultTimeSpan, AutoUpdateButton, BackwardForwardStepButton, NowButton, handleSetNowEvent, AnimationLengthButton, AnimationLength, SpeedButton, TimeSpanButton, secondsPerPxFromCanvasWidth, getNewCenterOfFixedPointZoom, TimeStepButton, OptionsMenuButton, PlayButton, defaultTimeStep, TimeSliderButtons, TimeSliderCurrentTimeBox, TimeSliderLegend, onsetNewDateDebounced, defaultSecondsPerPx, moveSelectedTimePx, TimeSlider, getFilteredTime } from '@opengeoweb/time-slider';
|
|
13
|
+
import { webmapReactTranslations, WEBMAP_REACT_NAMESPACE, webmapTranslations, WEBMAP_NAMESPACE, openLayersGetMapImageStore, LayerInfoButton, useEDRGetCollectionDetails, defaultEdrStyles, LayerInfoDialog, MapControlButton, MapDimensionSelect, dimensionConfig, DimensionSelectDialog, DimensionSelectButton, Clock, LegendDialog, LegendButton, MapContext, emptyGeoJSON, MapFeatureClass, setMapCenter, OpenLayersFeatureLayer, OpenLayersMapDraw, makeTimeList, useGetWMLayerInstance, getIsInsideAcceptanceTime, OpenLayersLayer, MapMeasure, useSetIntervalWhenVisible, TimeContext, OpenLayersMapView, WMSLayer, genericOpenLayersFeatureStyle, OpenLayersGetFeatureInfo, MapControls, OpenLayersZoomControl, getLayerUpdateInfo, publicLayers } from '@opengeoweb/webmap-react';
|
|
14
14
|
import { ReactSortable } from 'react-sortablejs';
|
|
15
15
|
import Sortable from 'sortablejs';
|
|
16
16
|
import { Box as Box$1, Stack, styled as styled$1 } from '@mui/system';
|
|
@@ -2229,17 +2229,18 @@ var AcceptanceTime = function AcceptanceTime(_ref) {
|
|
|
2229
2229
|
var onChangeAcceptanceTime = _ref.onChangeAcceptanceTime,
|
|
2230
2230
|
_ref$isEnabled = _ref.isEnabled,
|
|
2231
2231
|
isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,
|
|
2232
|
-
|
|
2232
|
+
_ref$acceptanceTimeIn = _ref.acceptanceTimeInMinutes,
|
|
2233
|
+
acceptanceTimeInMinutes = _ref$acceptanceTimeIn === void 0 ? 60 : _ref$acceptanceTimeIn,
|
|
2233
2234
|
icon = _ref.icon,
|
|
2234
2235
|
tooltipTitle = _ref.tooltipTitle,
|
|
2235
2236
|
skipLocalStyling = _ref.skipLocalStyling;
|
|
2236
2237
|
var _useCoreTranslation = useCoreTranslation(),
|
|
2237
2238
|
t = _useCoreTranslation.t;
|
|
2238
2239
|
var _onChange = function onChange(acceptanceTimeRaw) {
|
|
2239
|
-
var acceptanceTime = acceptanceTimeRaw === 'off' ?
|
|
2240
|
+
var acceptanceTime = acceptanceTimeRaw === 'off' ? null : Number(acceptanceTimeRaw);
|
|
2240
2241
|
onChangeAcceptanceTime(acceptanceTime);
|
|
2241
2242
|
};
|
|
2242
|
-
var layerAcceptanceTime = acceptanceTimeInMinutes ===
|
|
2243
|
+
var layerAcceptanceTime = acceptanceTimeInMinutes === null ? 'off' : acceptanceTimeInMinutes.toString();
|
|
2243
2244
|
var getAcceptenceTimes = function getAcceptenceTimes() {
|
|
2244
2245
|
var acceptanceTimes = [{
|
|
2245
2246
|
value: 'off',
|
|
@@ -2316,20 +2317,23 @@ var AcceptanceTimeConnect = function AcceptanceTimeConnect(_ref) {
|
|
|
2316
2317
|
var layerId = _ref.layerId,
|
|
2317
2318
|
icon = _ref.icon,
|
|
2318
2319
|
tooltipTitle = _ref.tooltipTitle,
|
|
2319
|
-
skipLocalStyling = _ref.skipLocalStyling
|
|
2320
|
+
skipLocalStyling = _ref.skipLocalStyling,
|
|
2321
|
+
mapId = _ref.mapId;
|
|
2320
2322
|
var _useCoreTranslation = useCoreTranslation(),
|
|
2321
2323
|
t = _useCoreTranslation.t;
|
|
2324
|
+
var dispatch = useDispatch();
|
|
2322
2325
|
var isEnabled = useSelector(function (store) {
|
|
2323
2326
|
return layerSelectors.getLayerEnabled(store, layerId);
|
|
2324
2327
|
});
|
|
2325
|
-
var dispatch = useDispatch();
|
|
2326
2328
|
var acceptanceTimeInMinutes = useSelector(function (store) {
|
|
2327
2329
|
return layerSelectors.getAcceptanceTimeInMinutes(store, layerId);
|
|
2328
2330
|
});
|
|
2329
2331
|
var onChangeAcceptanceTime = function onChangeAcceptanceTime(acceptanceTime) {
|
|
2330
2332
|
dispatch(layerActions.layerChangeAcceptanceTime({
|
|
2331
2333
|
layerId: layerId,
|
|
2332
|
-
acceptanceTime: acceptanceTime
|
|
2334
|
+
acceptanceTime: acceptanceTime,
|
|
2335
|
+
mapId: mapId,
|
|
2336
|
+
origin: layerTypes.LayerActionOrigin.layerManager
|
|
2333
2337
|
}));
|
|
2334
2338
|
};
|
|
2335
2339
|
var layerHasTimeDimension = useSelector(function (store) {
|
|
@@ -4840,6 +4844,7 @@ var LayerInfoDialogConnect = function LayerInfoDialogConnect(_ref) {
|
|
|
4840
4844
|
onMouseDown: setDialogOrder,
|
|
4841
4845
|
order: dialogOrder,
|
|
4842
4846
|
serviceName: currentService == null ? void 0 : currentService.name,
|
|
4847
|
+
serviceUrl: currentService == null ? void 0 : currentService.serviceUrl,
|
|
4843
4848
|
source: source
|
|
4844
4849
|
});
|
|
4845
4850
|
};
|
|
@@ -4889,6 +4894,7 @@ var LayerRowConnect = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
4889
4894
|
isLayerMissing: isLayerMissing,
|
|
4890
4895
|
layerAcceptanceTimeLayout: jsx(AcceptanceTimeConnect, Object.assign({
|
|
4891
4896
|
layerId: layerId,
|
|
4897
|
+
mapId: mapId,
|
|
4892
4898
|
skipLocalStyling: true
|
|
4893
4899
|
}, settings == null ? void 0 : settings.acceptanceTime)),
|
|
4894
4900
|
layerActiveLayout: settings != null && (_settings$activateLay2 = settings.activateLayer) != null && _settings$activateLay2.isDisabled ? undefined : jsx(ActivateLayerConnect, {
|
|
@@ -5351,6 +5357,13 @@ var availableProjections = [Object.assign({}, PROJECTION.EPSG_3857, {
|
|
|
5351
5357
|
right: 9359725.15673533,
|
|
5352
5358
|
top: 1089291.7566655697
|
|
5353
5359
|
}
|
|
5360
|
+
}), Object.assign({}, PROJECTION.EPSG_5041, {
|
|
5361
|
+
bbox: {
|
|
5362
|
+
left: -3078812.468202346,
|
|
5363
|
+
bottom: -5551735.866551964,
|
|
5364
|
+
right: 9359725.15673533,
|
|
5365
|
+
top: 1089291.7566655697
|
|
5366
|
+
}
|
|
5354
5367
|
}), Object.assign({}, PROJECTION.EPSG_54030, {
|
|
5355
5368
|
bbox: {
|
|
5356
5369
|
left: -2020532.0269369134,
|
|
@@ -6073,6 +6086,29 @@ var MultiMapMultiDimensionSelectConnect = function MultiMapMultiDimensionSelectC
|
|
|
6073
6086
|
});
|
|
6074
6087
|
};
|
|
6075
6088
|
|
|
6089
|
+
var ClockConnect = function ClockConnect(_ref) {
|
|
6090
|
+
var mapId = _ref.mapId;
|
|
6091
|
+
var dispatch = useDispatch();
|
|
6092
|
+
var selectedTime = useSelector(function (store) {
|
|
6093
|
+
return mapSelectors.getSelectedTime(store, mapId);
|
|
6094
|
+
});
|
|
6095
|
+
var isMapClockVisible = useSelector(function (store) {
|
|
6096
|
+
return mapSelectors.getIsClockVisible(store, mapId);
|
|
6097
|
+
});
|
|
6098
|
+
var onToggleClock = function onToggleClock(isClockVisible) {
|
|
6099
|
+
dispatch(mapActions.toggleClock({
|
|
6100
|
+
mapId: mapId,
|
|
6101
|
+
isClockVisible: isClockVisible,
|
|
6102
|
+
origin: mapEnums.MapActionOrigin.map
|
|
6103
|
+
}));
|
|
6104
|
+
};
|
|
6105
|
+
return jsx(Clock, {
|
|
6106
|
+
isVisible: isMapClockVisible,
|
|
6107
|
+
onToggleClock: onToggleClock,
|
|
6108
|
+
time: selectedTime
|
|
6109
|
+
});
|
|
6110
|
+
};
|
|
6111
|
+
|
|
6076
6112
|
var _excluded$2 = ["showMapId"];
|
|
6077
6113
|
var LegendConnectComponent = function LegendConnectComponent(_ref) {
|
|
6078
6114
|
var _ref$showMapId = _ref.showMapId,
|
|
@@ -6336,14 +6372,8 @@ var useLocationList = function useLocationList(search) {
|
|
|
6336
6372
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6337
6373
|
while (1) switch (_context.prev = _context.next) {
|
|
6338
6374
|
case 0:
|
|
6339
|
-
if (!(search.length > 0)) {
|
|
6340
|
-
_context.next = 2;
|
|
6341
|
-
break;
|
|
6342
|
-
}
|
|
6343
6375
|
return _context.abrupt("return", getLocationList(search));
|
|
6344
|
-
case
|
|
6345
|
-
return _context.abrupt("return", []);
|
|
6346
|
-
case 3:
|
|
6376
|
+
case 1:
|
|
6347
6377
|
case "end":
|
|
6348
6378
|
return _context.stop();
|
|
6349
6379
|
}
|
|
@@ -7028,7 +7058,7 @@ var makePrefetchTimeSpan = function makePrefetchTimeSpan(timeSliderStartCenterEn
|
|
|
7028
7058
|
prefetchList: timeSpanList
|
|
7029
7059
|
};
|
|
7030
7060
|
};
|
|
7031
|
-
var usePrefetchTimeSpan = function usePrefetchTimeSpan(timeSliderStartCenterEndTime, isAnimating, animationList) {
|
|
7061
|
+
var usePrefetchTimeSpan = function usePrefetchTimeSpan(timeSliderStartCenterEndTime, isAnimating, animationList, refTimeDimensionModes) {
|
|
7032
7062
|
var _useState = useState({
|
|
7033
7063
|
isAnimating: isAnimating,
|
|
7034
7064
|
prefetchList: animationList || []
|
|
@@ -7046,17 +7076,21 @@ var usePrefetchTimeSpan = function usePrefetchTimeSpan(timeSliderStartCenterEndT
|
|
|
7046
7076
|
useEffect(function () {
|
|
7047
7077
|
return makeThrottledPrefetchTimespan(timeSliderStartCenterEndTime, isAnimating, animationList);
|
|
7048
7078
|
}, [animationList, isAnimating, makeThrottledPrefetchTimespan, timeSliderStartCenterEndTime]);
|
|
7049
|
-
return prefetchTimespan
|
|
7079
|
+
return Object.assign({}, prefetchTimespan, {
|
|
7080
|
+
refTimeDimensionModes: refTimeDimensionModes
|
|
7081
|
+
});
|
|
7050
7082
|
};
|
|
7051
7083
|
var makeLayerInfoPayload = function makeLayerInfoPayload(payload, mapDimensions, mapId) {
|
|
7052
7084
|
// During intialization, try to base the layer dimension on the current map dimension value.
|
|
7053
7085
|
var origin = 'onInitializeLayer in OlMapViewLayerConnect';
|
|
7054
7086
|
var dimensions = (payload.dimensions || []).map(function (layerDim) {
|
|
7055
|
-
var _find;
|
|
7087
|
+
var _find, _getWMLayerById;
|
|
7056
7088
|
var currentMapDim = ((_find = (mapDimensions || []).find(function (mapDim) {
|
|
7057
7089
|
return mapDim.name === layerDim.name;
|
|
7058
7090
|
})) == null ? void 0 : _find.currentValue) || layerDim.currentValue;
|
|
7059
|
-
var wmDim = new WMJSDimension(layerDim
|
|
7091
|
+
var wmDim = new WMJSDimension(Object.assign({}, layerDim, {
|
|
7092
|
+
refTimeDimensionMode: (_getWMLayerById = getWMLayerById(payload.layerId)) == null ? void 0 : _getWMLayerById.refTimeDimensionMode
|
|
7093
|
+
}));
|
|
7060
7094
|
return Object.assign({}, layerDim, {
|
|
7061
7095
|
currentValue: wmDim.getClosestValue(currentMapDim, true)
|
|
7062
7096
|
});
|
|
@@ -8043,7 +8077,10 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
8043
8077
|
}
|
|
8044
8078
|
}));
|
|
8045
8079
|
}, [hoverId, previousHoverId, hoverLinkedFeature, featureProperties, linkedPanelId, dispatch]);
|
|
8046
|
-
var
|
|
8080
|
+
var refTimeDimensionModes = useSelector(function (store) {
|
|
8081
|
+
return mapSelectors.getRefTimeDimensionModes(store);
|
|
8082
|
+
});
|
|
8083
|
+
var prefetchTimespan = usePrefetchTimeSpan(timeSliderStartCenterEndTime, isAnimating, animationList, refTimeDimensionModes);
|
|
8047
8084
|
var layerIds = mapLayerIds.join();
|
|
8048
8085
|
var refetchLayers = React.useCallback(function () {
|
|
8049
8086
|
mapLayerIds == null || mapLayerIds.forEach(/*#__PURE__*/function () {
|
|
@@ -8331,78 +8368,6 @@ var NowButtonConnect = function NowButtonConnect(_ref) {
|
|
|
8331
8368
|
});
|
|
8332
8369
|
};
|
|
8333
8370
|
|
|
8334
|
-
var connectRedux$1 = connect(function (store, props) {
|
|
8335
|
-
return {
|
|
8336
|
-
timeStep: mapSelectors.getMapTimeStep(store, props.mapId),
|
|
8337
|
-
linkedMapAnimationInfo: mapSelectors.linkedMapAnimationInfo(store, props.mapId)
|
|
8338
|
-
};
|
|
8339
|
-
}, {
|
|
8340
|
-
mapStartAnimation: mapActions.mapStartAnimation,
|
|
8341
|
-
mapStopAnimation: mapActions.mapStopAnimation
|
|
8342
|
-
});
|
|
8343
|
-
var PlayButtonConnect = connectRedux$1(function (_ref) {
|
|
8344
|
-
var mapId = _ref.mapId,
|
|
8345
|
-
isDisabled = _ref.isDisabled,
|
|
8346
|
-
timeStep = _ref.timeStep,
|
|
8347
|
-
linkedMapAnimationInfo = _ref.linkedMapAnimationInfo,
|
|
8348
|
-
mapStartAnimation = _ref.mapStartAnimation,
|
|
8349
|
-
mapStopAnimation = _ref.mapStopAnimation;
|
|
8350
|
-
var _useSelector = useSelector(function (store) {
|
|
8351
|
-
return mapSelectors.getAnimationRange(store, mapId);
|
|
8352
|
-
}),
|
|
8353
|
-
animationStartTime = _useSelector.animationStartTime,
|
|
8354
|
-
animationEndTime = _useSelector.animationEndTime;
|
|
8355
|
-
var animationInterval = timeStep || defaultTimeStep;
|
|
8356
|
-
var onTogglePlay = function onTogglePlay() {
|
|
8357
|
-
if (linkedMapAnimationInfo.isAnimating) {
|
|
8358
|
-
mapStopAnimation({
|
|
8359
|
-
mapId: linkedMapAnimationInfo.id,
|
|
8360
|
-
origin: mapEnums.MapActionOrigin.map
|
|
8361
|
-
});
|
|
8362
|
-
} else {
|
|
8363
|
-
mapStartAnimation({
|
|
8364
|
-
mapId: mapId,
|
|
8365
|
-
start: animationStartTime,
|
|
8366
|
-
end: animationEndTime,
|
|
8367
|
-
interval: animationInterval,
|
|
8368
|
-
origin: mapEnums.MapActionOrigin.map
|
|
8369
|
-
});
|
|
8370
|
-
}
|
|
8371
|
-
};
|
|
8372
|
-
return jsx(PlayButton, {
|
|
8373
|
-
isAnimating: linkedMapAnimationInfo.isAnimating,
|
|
8374
|
-
isDisabled: isDisabled,
|
|
8375
|
-
onTogglePlayButton: function onTogglePlayButton() {
|
|
8376
|
-
onTogglePlay();
|
|
8377
|
-
}
|
|
8378
|
-
});
|
|
8379
|
-
});
|
|
8380
|
-
|
|
8381
|
-
var ControlButtonsConnect = function ControlButtonsConnect(_ref) {
|
|
8382
|
-
var sourceId = _ref.sourceId,
|
|
8383
|
-
mapId = _ref.mapId;
|
|
8384
|
-
return jsx(ControlButtons, {
|
|
8385
|
-
autoUpdateBtn: jsx(AutoUpdateButtonConnect, {
|
|
8386
|
-
mapId: mapId
|
|
8387
|
-
}),
|
|
8388
|
-
backwardBtn: jsx(BackwardForwardStepButtonConnect, {
|
|
8389
|
-
isForwardStep: false,
|
|
8390
|
-
mapId: mapId
|
|
8391
|
-
}),
|
|
8392
|
-
forwardBtn: jsx(BackwardForwardStepButtonConnect, {
|
|
8393
|
-
isForwardStep: true,
|
|
8394
|
-
mapId: mapId
|
|
8395
|
-
}),
|
|
8396
|
-
nowBtn: jsx(NowButtonConnect, {
|
|
8397
|
-
mapId: mapId,
|
|
8398
|
-
sourceId: sourceId
|
|
8399
|
-
}),
|
|
8400
|
-
playBtn: jsx(PlayButtonConnect, {
|
|
8401
|
-
mapId: mapId
|
|
8402
|
-
})
|
|
8403
|
-
});
|
|
8404
|
-
};
|
|
8405
|
-
|
|
8406
8371
|
var AnimationLengthButtonConnect = function AnimationLengthButtonConnect(_ref) {
|
|
8407
8372
|
var mapId = _ref.mapId;
|
|
8408
8373
|
var dispatch = useDispatch();
|
|
@@ -8586,45 +8551,6 @@ var TimeStepButtonConnect = function TimeStepButtonConnect(_ref) {
|
|
|
8586
8551
|
});
|
|
8587
8552
|
};
|
|
8588
8553
|
|
|
8589
|
-
var OptionsMenuConnect = function OptionsMenuConnect(_ref) {
|
|
8590
|
-
var mapId = _ref.mapId;
|
|
8591
|
-
return jsx(OptionsMenu, {
|
|
8592
|
-
animationLengthBtn: jsx(AnimationLengthButtonConnect, {
|
|
8593
|
-
mapId: mapId
|
|
8594
|
-
}),
|
|
8595
|
-
speedBtn: jsx(SpeedButtonConnect, {
|
|
8596
|
-
mapId: mapId
|
|
8597
|
-
}),
|
|
8598
|
-
timeSpanBtn: jsx(TimeSpanButtonConnect, {
|
|
8599
|
-
mapId: mapId
|
|
8600
|
-
}),
|
|
8601
|
-
timeStepBtn: jsx(TimeStepButtonConnect, {
|
|
8602
|
-
mapId: mapId
|
|
8603
|
-
})
|
|
8604
|
-
});
|
|
8605
|
-
};
|
|
8606
|
-
|
|
8607
|
-
var TimeSliderClockConnect = function TimeSliderClockConnect(_ref) {
|
|
8608
|
-
var mapId = _ref.mapId;
|
|
8609
|
-
var selectedTime = useSelector(function (store) {
|
|
8610
|
-
return mapSelectors.getSelectedTime(store, mapId);
|
|
8611
|
-
});
|
|
8612
|
-
var isTimeSliderVisible = useSelector(function (store) {
|
|
8613
|
-
return mapSelectors.isTimeSliderVisible(store, mapId);
|
|
8614
|
-
});
|
|
8615
|
-
return jsx(TimeSliderClock, {
|
|
8616
|
-
controls: jsx(ControlButtonsConnect, {
|
|
8617
|
-
mapId: mapId,
|
|
8618
|
-
sourceId: mapId
|
|
8619
|
-
}),
|
|
8620
|
-
hideButton: isTimeSliderVisible,
|
|
8621
|
-
options: jsx(OptionsMenuConnect, {
|
|
8622
|
-
mapId: mapId
|
|
8623
|
-
}),
|
|
8624
|
-
time: selectedTime
|
|
8625
|
-
});
|
|
8626
|
-
};
|
|
8627
|
-
|
|
8628
8554
|
/**
|
|
8629
8555
|
* OptionsMenuButtonConnect component with components connected to the store displaying the options menu button
|
|
8630
8556
|
*
|
|
@@ -8651,6 +8577,53 @@ var OptionsMenuButtonConnect = function OptionsMenuButtonConnect(_ref) {
|
|
|
8651
8577
|
});
|
|
8652
8578
|
};
|
|
8653
8579
|
|
|
8580
|
+
var connectRedux$1 = connect(function (store, props) {
|
|
8581
|
+
return {
|
|
8582
|
+
timeStep: mapSelectors.getMapTimeStep(store, props.mapId),
|
|
8583
|
+
linkedMapAnimationInfo: mapSelectors.linkedMapAnimationInfo(store, props.mapId)
|
|
8584
|
+
};
|
|
8585
|
+
}, {
|
|
8586
|
+
mapStartAnimation: mapActions.mapStartAnimation,
|
|
8587
|
+
mapStopAnimation: mapActions.mapStopAnimation
|
|
8588
|
+
});
|
|
8589
|
+
var PlayButtonConnect = connectRedux$1(function (_ref) {
|
|
8590
|
+
var mapId = _ref.mapId,
|
|
8591
|
+
isDisabled = _ref.isDisabled,
|
|
8592
|
+
timeStep = _ref.timeStep,
|
|
8593
|
+
linkedMapAnimationInfo = _ref.linkedMapAnimationInfo,
|
|
8594
|
+
mapStartAnimation = _ref.mapStartAnimation,
|
|
8595
|
+
mapStopAnimation = _ref.mapStopAnimation;
|
|
8596
|
+
var _useSelector = useSelector(function (store) {
|
|
8597
|
+
return mapSelectors.getAnimationRange(store, mapId);
|
|
8598
|
+
}),
|
|
8599
|
+
animationStartTime = _useSelector.animationStartTime,
|
|
8600
|
+
animationEndTime = _useSelector.animationEndTime;
|
|
8601
|
+
var animationInterval = timeStep || defaultTimeStep;
|
|
8602
|
+
var onTogglePlay = function onTogglePlay() {
|
|
8603
|
+
if (linkedMapAnimationInfo.isAnimating) {
|
|
8604
|
+
mapStopAnimation({
|
|
8605
|
+
mapId: linkedMapAnimationInfo.id,
|
|
8606
|
+
origin: mapEnums.MapActionOrigin.map
|
|
8607
|
+
});
|
|
8608
|
+
} else {
|
|
8609
|
+
mapStartAnimation({
|
|
8610
|
+
mapId: mapId,
|
|
8611
|
+
start: animationStartTime,
|
|
8612
|
+
end: animationEndTime,
|
|
8613
|
+
interval: animationInterval,
|
|
8614
|
+
origin: mapEnums.MapActionOrigin.map
|
|
8615
|
+
});
|
|
8616
|
+
}
|
|
8617
|
+
};
|
|
8618
|
+
return jsx(PlayButton, {
|
|
8619
|
+
isAnimating: linkedMapAnimationInfo.isAnimating,
|
|
8620
|
+
isDisabled: isDisabled,
|
|
8621
|
+
onTogglePlayButton: function onTogglePlayButton() {
|
|
8622
|
+
onTogglePlay();
|
|
8623
|
+
}
|
|
8624
|
+
});
|
|
8625
|
+
});
|
|
8626
|
+
|
|
8654
8627
|
/**
|
|
8655
8628
|
* TimeSliderButtons component with components connected to the store displaying the time slider buttons
|
|
8656
8629
|
*
|
|
@@ -9207,7 +9180,7 @@ var TimeSliderConnect = function TimeSliderConnect(_ref) {
|
|
|
9207
9180
|
});
|
|
9208
9181
|
};
|
|
9209
9182
|
|
|
9210
|
-
var _excluded = ["id", "dockedLayerManagerSize", "title", "layers", "dimensions", "shouldAutoUpdate", "shouldAnimate", "shouldAutoFetch", "initialBbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager", "shouldShowDockedLayerManager", "
|
|
9183
|
+
var _excluded = ["id", "dockedLayerManagerSize", "title", "layers", "dimensions", "shouldAutoUpdate", "shouldAnimate", "shouldAutoFetch", "initialBbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager", "shouldShowDockedLayerManager", "isClockEnabled", "displayGetFeatureInfoButtonInMap", "shouldDisplayDrawControls", "displaySearchButtonInMap", "displayDataExplorerButtonOnMap", "mapControls", "children", "shouldDisablePrefetching", "tileServerSettings", "featureStyle", "shouldDisplayMeasureToolButton"];
|
|
9211
9184
|
var titleStyle = function titleStyle(theme) {
|
|
9212
9185
|
return {
|
|
9213
9186
|
position: 'absolute',
|
|
@@ -9263,8 +9236,8 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
9263
9236
|
multiLegend = _ref$multiLegend === void 0 ? true : _ref$multiLegend,
|
|
9264
9237
|
shouldShowLayerManager = _ref.shouldShowLayerManager,
|
|
9265
9238
|
shouldShowDockedLayerManager = _ref.shouldShowDockedLayerManager,
|
|
9266
|
-
_ref$
|
|
9267
|
-
|
|
9239
|
+
_ref$isClockEnabled = _ref.isClockEnabled,
|
|
9240
|
+
isClockEnabled = _ref$isClockEnabled === void 0 ? true : _ref$isClockEnabled,
|
|
9268
9241
|
_ref$displayGetFeatur = _ref.displayGetFeatureInfoButtonInMap,
|
|
9269
9242
|
displayGetFeatureInfoButtonInMap = _ref$displayGetFeatur === void 0 ? false : _ref$displayGetFeatur,
|
|
9270
9243
|
_ref$shouldDisplayDra = _ref.shouldDisplayDrawControls,
|
|
@@ -9428,13 +9401,13 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
9428
9401
|
showScaleBar: false,
|
|
9429
9402
|
tileServerSettings: tileServerSettings,
|
|
9430
9403
|
children: children
|
|
9431
|
-
}),
|
|
9404
|
+
}), isClockEnabled ? jsx(ClockConnect, {
|
|
9432
9405
|
mapId: mapId
|
|
9433
9406
|
}) : null]
|
|
9434
9407
|
});
|
|
9435
9408
|
// don't include bbox directly, use bboxKey instead
|
|
9436
9409
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9437
|
-
}, [mapId, title, bboxKey, mapControlConfig, tileServerSettings, disableTimeSlider, displayTimeInMap, shouldAutoFetch, shouldDisablePrefetching, children,
|
|
9410
|
+
}, [mapId, title, bboxKey, mapControlConfig, tileServerSettings, disableTimeSlider, displayTimeInMap, shouldAutoFetch, shouldDisablePrefetching, children, isClockEnabled, featureStyle]);
|
|
9438
9411
|
};
|
|
9439
9412
|
|
|
9440
9413
|
var mapBoxStyle = function mapBoxStyle(theme) {
|
|
@@ -9456,8 +9429,8 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
|
|
|
9456
9429
|
showZoomControls = _ref$showZoomControls === void 0 ? true : _ref$showZoomControls,
|
|
9457
9430
|
_ref$multiLegend = _ref.multiLegend,
|
|
9458
9431
|
multiLegend = _ref$multiLegend === void 0 ? false : _ref$multiLegend,
|
|
9459
|
-
_ref$
|
|
9460
|
-
|
|
9432
|
+
_ref$isClockEnabled = _ref.isClockEnabled,
|
|
9433
|
+
isClockEnabled = _ref$isClockEnabled === void 0 ? true : _ref$isClockEnabled;
|
|
9461
9434
|
var multiMapWindowRef = React.useRef(null);
|
|
9462
9435
|
var dispatch = useDispatch();
|
|
9463
9436
|
var syncGroupAddTarget = React.useCallback(function (payload) {
|
|
@@ -9518,7 +9491,7 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
|
|
|
9518
9491
|
mapId: firstMapId,
|
|
9519
9492
|
multiLegend: multiLegend,
|
|
9520
9493
|
showMapId: true
|
|
9521
|
-
}), !!
|
|
9494
|
+
}), !!isClockEnabled && jsx(ClockConnect, {
|
|
9522
9495
|
mapId: firstMapId
|
|
9523
9496
|
}), maps.map(function (map, mapIndex) {
|
|
9524
9497
|
var mapId = map.id;
|
|
@@ -9535,11 +9508,11 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
|
|
|
9535
9508
|
displayTimeInMap: map.displayTimeInMap || false,
|
|
9536
9509
|
id: mapId,
|
|
9537
9510
|
initialBbox: map.bbox,
|
|
9511
|
+
isClockEnabled: false,
|
|
9538
9512
|
layers: map.layers || [],
|
|
9539
9513
|
multiLegend: multiLegend,
|
|
9540
9514
|
shouldDisablePrefetching: map.componentType === 'MultiMap',
|
|
9541
9515
|
shouldShowZoomControls: !!showZoomControls && mapIndex === 0,
|
|
9542
|
-
showClock: false,
|
|
9543
9516
|
showTimeSlider: false,
|
|
9544
9517
|
srs: map.srs,
|
|
9545
9518
|
title: map.title || mapId
|
|
@@ -9650,10 +9623,10 @@ var ModelRunInterval = function ModelRunInterval(_ref) {
|
|
|
9650
9623
|
});
|
|
9651
9624
|
return jsx(MultiMapViewConnect, {
|
|
9652
9625
|
cols: 5,
|
|
9626
|
+
isClockEnabled: false,
|
|
9653
9627
|
maps: maps,
|
|
9654
9628
|
multiLegend: multiLegend,
|
|
9655
9629
|
rows: 3,
|
|
9656
|
-
showClock: false,
|
|
9657
9630
|
showTimeSlider: false,
|
|
9658
9631
|
syncTime: false
|
|
9659
9632
|
});
|
|
@@ -10998,14 +10971,11 @@ var fakeLocationDetailList = [{
|
|
|
10998
10971
|
lon: 24.93545,
|
|
10999
10972
|
bbox: [24.782805558281286, 59.92249323820872, 25.254496669447338, 60.29783941145479]
|
|
11000
10973
|
}];
|
|
11001
|
-
var locationApiEndpoints = [http.get(/^.*locations(.*)$/, function (
|
|
10974
|
+
var locationApiEndpoints = [http.get(/^.*locations(.*)$/, function () {
|
|
10975
|
+
return HttpResponse.json(fakeLocationList);
|
|
10976
|
+
}), http.get(/^.*locationdetail(.*)$/, function (_ref) {
|
|
11002
10977
|
var request = _ref.request;
|
|
11003
10978
|
var url = new URL(request.url);
|
|
11004
|
-
var search = url.searchParams.get('search');
|
|
11005
|
-
return HttpResponse.json(search ? fakeLocationList : []);
|
|
11006
|
-
}), http.get(/^.*locationdetail(.*)$/, function (_ref2) {
|
|
11007
|
-
var request = _ref2.request;
|
|
11008
|
-
var url = new URL(request.url);
|
|
11009
10979
|
var id = url.searchParams.get('id');
|
|
11010
10980
|
var result = fakeLocationDetailList.find(function (item) {
|
|
11011
10981
|
return item.id === id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "GeoWeb Core library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,22 +8,22 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/shared": "
|
|
11
|
+
"@opengeoweb/shared": "15.0.0",
|
|
12
12
|
"react-redux": "^9.2.0",
|
|
13
|
-
"@opengeoweb/store": "
|
|
14
|
-
"@opengeoweb/time-slider": "
|
|
13
|
+
"@opengeoweb/store": "15.0.0",
|
|
14
|
+
"@opengeoweb/time-slider": "15.0.0",
|
|
15
15
|
"@reduxjs/toolkit": "^2.6.1",
|
|
16
|
-
"@opengeoweb/webmap-react": "
|
|
17
|
-
"@opengeoweb/webmap": "
|
|
18
|
-
"@opengeoweb/theme": "
|
|
16
|
+
"@opengeoweb/webmap-react": "15.0.0",
|
|
17
|
+
"@opengeoweb/webmap": "15.0.0",
|
|
18
|
+
"@opengeoweb/theme": "15.0.0",
|
|
19
19
|
"axios": "^1.7.7",
|
|
20
|
-
"@opengeoweb/layer-select": "
|
|
20
|
+
"@opengeoweb/layer-select": "15.0.0",
|
|
21
21
|
"lodash": "^4.17.21",
|
|
22
22
|
"ol": "^10.4.0",
|
|
23
23
|
"react-sortablejs": "^6.1.4",
|
|
24
24
|
"sortablejs": "^1.15.1",
|
|
25
25
|
"@mui/system": "^7.3.2",
|
|
26
|
-
"@opengeoweb/snackbar": "
|
|
26
|
+
"@opengeoweb/snackbar": "15.0.0",
|
|
27
27
|
"react-router-dom": "^6.21.0",
|
|
28
28
|
"react-draggable": "^4.4.6",
|
|
29
29
|
"i18next": "^25.0.1",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@mui/material": "^7.0.1",
|
|
33
33
|
"@sentry/react": "^8.34.0",
|
|
34
34
|
"@tanstack/react-query": "^5.85.5",
|
|
35
|
-
"@opengeoweb/api": "
|
|
35
|
+
"@opengeoweb/api": "15.0.0",
|
|
36
36
|
"@types/geojson": "^7946.0.14",
|
|
37
37
|
"@turf/turf": "^7.2.0",
|
|
38
38
|
"proj4": "^2.15.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ClockConnect';
|
|
@@ -37,7 +37,7 @@ export interface ConfigurableMapConnectProps {
|
|
|
37
37
|
multiLegend?: boolean;
|
|
38
38
|
shouldShowLayerManager?: boolean;
|
|
39
39
|
shouldShowDockedLayerManager?: boolean;
|
|
40
|
-
|
|
40
|
+
isClockEnabled?: boolean;
|
|
41
41
|
displayGetFeatureInfoButtonInMap?: boolean;
|
|
42
42
|
shouldDisplayDrawControls?: boolean;
|
|
43
43
|
displaySearchButtonInMap?: boolean;
|
|
@@ -2,8 +2,8 @@ import type { FC } from 'react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const AcceptanceTime: FC<{
|
|
4
4
|
isEnabled?: boolean;
|
|
5
|
-
acceptanceTimeInMinutes: number | undefined;
|
|
6
|
-
onChangeAcceptanceTime: (acceptanceTime: number |
|
|
5
|
+
acceptanceTimeInMinutes: number | null | undefined;
|
|
6
|
+
onChangeAcceptanceTime: (acceptanceTime: number | null) => void;
|
|
7
7
|
icon?: React.ElementType;
|
|
8
8
|
tooltipTitle?: string;
|
|
9
9
|
skipLocalStyling?: boolean;
|
|
@@ -38,7 +38,7 @@ interface LayerRowUnstyledProps {
|
|
|
38
38
|
}) => void;
|
|
39
39
|
onChangeAcceptanceTime?: (payload: {
|
|
40
40
|
layerId: string;
|
|
41
|
-
acceptanceTime: number |
|
|
41
|
+
acceptanceTime: number | null;
|
|
42
42
|
}) => void;
|
|
43
43
|
layerEnableLayout?: React.ReactElement;
|
|
44
44
|
layerServicesLayout?: React.ReactElement;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Feature, View } from 'ol';
|
|
2
2
|
import type { TimeSliderStartCenterEndTime } from '@opengeoweb/store';
|
|
3
|
-
import type { Dimension } from '@opengeoweb/webmap';
|
|
3
|
+
import type { Dimension, RefTimeDimensionModes } from '@opengeoweb/webmap';
|
|
4
4
|
import type { MapLocation, OnInitializeLayerProps, TimeContextType, UpdateLayerInfoPayload } from '@opengeoweb/webmap-react';
|
|
5
5
|
export declare const makePrefetchTimeSpan: (timeSliderStartCenterEndTime: TimeSliderStartCenterEndTime, isAnimating: boolean, prefetchList: number[]) => TimeContextType;
|
|
6
|
-
export declare const usePrefetchTimeSpan: (timeSliderStartCenterEndTime: TimeSliderStartCenterEndTime, isAnimating: boolean, animationList: number[]) => TimeContextType;
|
|
6
|
+
export declare const usePrefetchTimeSpan: (timeSliderStartCenterEndTime: TimeSliderStartCenterEndTime, isAnimating: boolean, animationList: number[], refTimeDimensionModes?: RefTimeDimensionModes) => TimeContextType;
|
|
7
7
|
export declare const makeLayerInfoPayload: (payload: OnInitializeLayerProps, mapDimensions: Dimension[], mapId: string) => UpdateLayerInfoPayload;
|
|
8
8
|
export declare const getCenterOfLinkedFeature: (feature: Feature | undefined, srs: string) => MapLocation | null;
|
|
9
9
|
interface UseFitAndHighlightWarningFeatureOptions {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TimeSliderClockConnect';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/OptionsMenuConnect.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|