@opengeoweb/core 14.5.2 → 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 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, getMapDimURL, getWMLayerById, handleDateUtilsISOString, WMLayer } from '@opengeoweb/webmap';
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, PlayButton, defaultTimeStep, ControlButtons, AnimationLengthButton, AnimationLength, SpeedButton, TimeSpanButton, secondsPerPxFromCanvasWidth, getNewCenterOfFixedPointZoom, TimeStepButton, OptionsMenu, TimeSliderClock, OptionsMenuButton, 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, 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';
@@ -4844,6 +4844,7 @@ var LayerInfoDialogConnect = function LayerInfoDialogConnect(_ref) {
4844
4844
  onMouseDown: setDialogOrder,
4845
4845
  order: dialogOrder,
4846
4846
  serviceName: currentService == null ? void 0 : currentService.name,
4847
+ serviceUrl: currentService == null ? void 0 : currentService.serviceUrl,
4847
4848
  source: source
4848
4849
  });
4849
4850
  };
@@ -4892,8 +4893,8 @@ var LayerRowConnect = /*#__PURE__*/React.memo(function (_ref) {
4892
4893
  isEnabled: isEnabled,
4893
4894
  isLayerMissing: isLayerMissing,
4894
4895
  layerAcceptanceTimeLayout: jsx(AcceptanceTimeConnect, Object.assign({
4895
- mapId: mapId,
4896
4896
  layerId: layerId,
4897
+ mapId: mapId,
4897
4898
  skipLocalStyling: true
4898
4899
  }, settings == null ? void 0 : settings.acceptanceTime)),
4899
4900
  layerActiveLayout: settings != null && (_settings$activateLay2 = settings.activateLayer) != null && _settings$activateLay2.isDisabled ? undefined : jsx(ActivateLayerConnect, {
@@ -6085,6 +6086,29 @@ var MultiMapMultiDimensionSelectConnect = function MultiMapMultiDimensionSelectC
6085
6086
  });
6086
6087
  };
6087
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
+
6088
6112
  var _excluded$2 = ["showMapId"];
6089
6113
  var LegendConnectComponent = function LegendConnectComponent(_ref) {
6090
6114
  var _ref$showMapId = _ref.showMapId,
@@ -6348,14 +6372,8 @@ var useLocationList = function useLocationList(search) {
6348
6372
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6349
6373
  while (1) switch (_context.prev = _context.next) {
6350
6374
  case 0:
6351
- if (!(search.length > 0)) {
6352
- _context.next = 2;
6353
- break;
6354
- }
6355
6375
  return _context.abrupt("return", getLocationList(search));
6356
- case 2:
6357
- return _context.abrupt("return", []);
6358
- case 3:
6376
+ case 1:
6359
6377
  case "end":
6360
6378
  return _context.stop();
6361
6379
  }
@@ -7040,7 +7058,7 @@ var makePrefetchTimeSpan = function makePrefetchTimeSpan(timeSliderStartCenterEn
7040
7058
  prefetchList: timeSpanList
7041
7059
  };
7042
7060
  };
7043
- var usePrefetchTimeSpan = function usePrefetchTimeSpan(timeSliderStartCenterEndTime, isAnimating, animationList) {
7061
+ var usePrefetchTimeSpan = function usePrefetchTimeSpan(timeSliderStartCenterEndTime, isAnimating, animationList, refTimeDimensionModes) {
7044
7062
  var _useState = useState({
7045
7063
  isAnimating: isAnimating,
7046
7064
  prefetchList: animationList || []
@@ -7058,17 +7076,21 @@ var usePrefetchTimeSpan = function usePrefetchTimeSpan(timeSliderStartCenterEndT
7058
7076
  useEffect(function () {
7059
7077
  return makeThrottledPrefetchTimespan(timeSliderStartCenterEndTime, isAnimating, animationList);
7060
7078
  }, [animationList, isAnimating, makeThrottledPrefetchTimespan, timeSliderStartCenterEndTime]);
7061
- return prefetchTimespan;
7079
+ return Object.assign({}, prefetchTimespan, {
7080
+ refTimeDimensionModes: refTimeDimensionModes
7081
+ });
7062
7082
  };
7063
7083
  var makeLayerInfoPayload = function makeLayerInfoPayload(payload, mapDimensions, mapId) {
7064
7084
  // During intialization, try to base the layer dimension on the current map dimension value.
7065
7085
  var origin = 'onInitializeLayer in OlMapViewLayerConnect';
7066
7086
  var dimensions = (payload.dimensions || []).map(function (layerDim) {
7067
- var _find;
7087
+ var _find, _getWMLayerById;
7068
7088
  var currentMapDim = ((_find = (mapDimensions || []).find(function (mapDim) {
7069
7089
  return mapDim.name === layerDim.name;
7070
7090
  })) == null ? void 0 : _find.currentValue) || layerDim.currentValue;
7071
- 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
+ }));
7072
7094
  return Object.assign({}, layerDim, {
7073
7095
  currentValue: wmDim.getClosestValue(currentMapDim, true)
7074
7096
  });
@@ -8055,7 +8077,10 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
8055
8077
  }
8056
8078
  }));
8057
8079
  }, [hoverId, previousHoverId, hoverLinkedFeature, featureProperties, linkedPanelId, dispatch]);
8058
- var prefetchTimespan = usePrefetchTimeSpan(timeSliderStartCenterEndTime, isAnimating, animationList);
8080
+ var refTimeDimensionModes = useSelector(function (store) {
8081
+ return mapSelectors.getRefTimeDimensionModes(store);
8082
+ });
8083
+ var prefetchTimespan = usePrefetchTimeSpan(timeSliderStartCenterEndTime, isAnimating, animationList, refTimeDimensionModes);
8059
8084
  var layerIds = mapLayerIds.join();
8060
8085
  var refetchLayers = React.useCallback(function () {
8061
8086
  mapLayerIds == null || mapLayerIds.forEach(/*#__PURE__*/function () {
@@ -8343,78 +8368,6 @@ var NowButtonConnect = function NowButtonConnect(_ref) {
8343
8368
  });
8344
8369
  };
8345
8370
 
8346
- var connectRedux$1 = connect(function (store, props) {
8347
- return {
8348
- timeStep: mapSelectors.getMapTimeStep(store, props.mapId),
8349
- linkedMapAnimationInfo: mapSelectors.linkedMapAnimationInfo(store, props.mapId)
8350
- };
8351
- }, {
8352
- mapStartAnimation: mapActions.mapStartAnimation,
8353
- mapStopAnimation: mapActions.mapStopAnimation
8354
- });
8355
- var PlayButtonConnect = connectRedux$1(function (_ref) {
8356
- var mapId = _ref.mapId,
8357
- isDisabled = _ref.isDisabled,
8358
- timeStep = _ref.timeStep,
8359
- linkedMapAnimationInfo = _ref.linkedMapAnimationInfo,
8360
- mapStartAnimation = _ref.mapStartAnimation,
8361
- mapStopAnimation = _ref.mapStopAnimation;
8362
- var _useSelector = useSelector(function (store) {
8363
- return mapSelectors.getAnimationRange(store, mapId);
8364
- }),
8365
- animationStartTime = _useSelector.animationStartTime,
8366
- animationEndTime = _useSelector.animationEndTime;
8367
- var animationInterval = timeStep || defaultTimeStep;
8368
- var onTogglePlay = function onTogglePlay() {
8369
- if (linkedMapAnimationInfo.isAnimating) {
8370
- mapStopAnimation({
8371
- mapId: linkedMapAnimationInfo.id,
8372
- origin: mapEnums.MapActionOrigin.map
8373
- });
8374
- } else {
8375
- mapStartAnimation({
8376
- mapId: mapId,
8377
- start: animationStartTime,
8378
- end: animationEndTime,
8379
- interval: animationInterval,
8380
- origin: mapEnums.MapActionOrigin.map
8381
- });
8382
- }
8383
- };
8384
- return jsx(PlayButton, {
8385
- isAnimating: linkedMapAnimationInfo.isAnimating,
8386
- isDisabled: isDisabled,
8387
- onTogglePlayButton: function onTogglePlayButton() {
8388
- onTogglePlay();
8389
- }
8390
- });
8391
- });
8392
-
8393
- var ControlButtonsConnect = function ControlButtonsConnect(_ref) {
8394
- var sourceId = _ref.sourceId,
8395
- mapId = _ref.mapId;
8396
- return jsx(ControlButtons, {
8397
- autoUpdateBtn: jsx(AutoUpdateButtonConnect, {
8398
- mapId: mapId
8399
- }),
8400
- backwardBtn: jsx(BackwardForwardStepButtonConnect, {
8401
- isForwardStep: false,
8402
- mapId: mapId
8403
- }),
8404
- forwardBtn: jsx(BackwardForwardStepButtonConnect, {
8405
- isForwardStep: true,
8406
- mapId: mapId
8407
- }),
8408
- nowBtn: jsx(NowButtonConnect, {
8409
- mapId: mapId,
8410
- sourceId: sourceId
8411
- }),
8412
- playBtn: jsx(PlayButtonConnect, {
8413
- mapId: mapId
8414
- })
8415
- });
8416
- };
8417
-
8418
8371
  var AnimationLengthButtonConnect = function AnimationLengthButtonConnect(_ref) {
8419
8372
  var mapId = _ref.mapId;
8420
8373
  var dispatch = useDispatch();
@@ -8598,45 +8551,6 @@ var TimeStepButtonConnect = function TimeStepButtonConnect(_ref) {
8598
8551
  });
8599
8552
  };
8600
8553
 
8601
- var OptionsMenuConnect = function OptionsMenuConnect(_ref) {
8602
- var mapId = _ref.mapId;
8603
- return jsx(OptionsMenu, {
8604
- animationLengthBtn: jsx(AnimationLengthButtonConnect, {
8605
- mapId: mapId
8606
- }),
8607
- speedBtn: jsx(SpeedButtonConnect, {
8608
- mapId: mapId
8609
- }),
8610
- timeSpanBtn: jsx(TimeSpanButtonConnect, {
8611
- mapId: mapId
8612
- }),
8613
- timeStepBtn: jsx(TimeStepButtonConnect, {
8614
- mapId: mapId
8615
- })
8616
- });
8617
- };
8618
-
8619
- var TimeSliderClockConnect = function TimeSliderClockConnect(_ref) {
8620
- var mapId = _ref.mapId;
8621
- var selectedTime = useSelector(function (store) {
8622
- return mapSelectors.getSelectedTime(store, mapId);
8623
- });
8624
- var isTimeSliderVisible = useSelector(function (store) {
8625
- return mapSelectors.isTimeSliderVisible(store, mapId);
8626
- });
8627
- return jsx(TimeSliderClock, {
8628
- controls: jsx(ControlButtonsConnect, {
8629
- mapId: mapId,
8630
- sourceId: mapId
8631
- }),
8632
- hideButton: isTimeSliderVisible,
8633
- options: jsx(OptionsMenuConnect, {
8634
- mapId: mapId
8635
- }),
8636
- time: selectedTime
8637
- });
8638
- };
8639
-
8640
8554
  /**
8641
8555
  * OptionsMenuButtonConnect component with components connected to the store displaying the options menu button
8642
8556
  *
@@ -8663,6 +8577,53 @@ var OptionsMenuButtonConnect = function OptionsMenuButtonConnect(_ref) {
8663
8577
  });
8664
8578
  };
8665
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
+
8666
8627
  /**
8667
8628
  * TimeSliderButtons component with components connected to the store displaying the time slider buttons
8668
8629
  *
@@ -9219,7 +9180,7 @@ var TimeSliderConnect = function TimeSliderConnect(_ref) {
9219
9180
  });
9220
9181
  };
9221
9182
 
9222
- var _excluded = ["id", "dockedLayerManagerSize", "title", "layers", "dimensions", "shouldAutoUpdate", "shouldAnimate", "shouldAutoFetch", "initialBbox", "srs", "shouldShowZoomControls", "displayMapPin", "showTimeSlider", "disableTimeSlider", "displayTimeInMap", "displayLayerManagerAndLegendButtonInMap", "displayDimensionSelectButtonInMap", "multiLegend", "shouldShowLayerManager", "shouldShowDockedLayerManager", "showClock", "displayGetFeatureInfoButtonInMap", "shouldDisplayDrawControls", "displaySearchButtonInMap", "displayDataExplorerButtonOnMap", "mapControls", "children", "shouldDisablePrefetching", "tileServerSettings", "featureStyle", "shouldDisplayMeasureToolButton"];
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"];
9223
9184
  var titleStyle = function titleStyle(theme) {
9224
9185
  return {
9225
9186
  position: 'absolute',
@@ -9275,8 +9236,8 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
9275
9236
  multiLegend = _ref$multiLegend === void 0 ? true : _ref$multiLegend,
9276
9237
  shouldShowLayerManager = _ref.shouldShowLayerManager,
9277
9238
  shouldShowDockedLayerManager = _ref.shouldShowDockedLayerManager,
9278
- _ref$showClock = _ref.showClock,
9279
- showClock = _ref$showClock === void 0 ? true : _ref$showClock,
9239
+ _ref$isClockEnabled = _ref.isClockEnabled,
9240
+ isClockEnabled = _ref$isClockEnabled === void 0 ? true : _ref$isClockEnabled,
9280
9241
  _ref$displayGetFeatur = _ref.displayGetFeatureInfoButtonInMap,
9281
9242
  displayGetFeatureInfoButtonInMap = _ref$displayGetFeatur === void 0 ? false : _ref$displayGetFeatur,
9282
9243
  _ref$shouldDisplayDra = _ref.shouldDisplayDrawControls,
@@ -9440,13 +9401,13 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
9440
9401
  showScaleBar: false,
9441
9402
  tileServerSettings: tileServerSettings,
9442
9403
  children: children
9443
- }), showClock ? jsx(TimeSliderClockConnect, {
9404
+ }), isClockEnabled ? jsx(ClockConnect, {
9444
9405
  mapId: mapId
9445
9406
  }) : null]
9446
9407
  });
9447
9408
  // don't include bbox directly, use bboxKey instead
9448
9409
  // eslint-disable-next-line react-hooks/exhaustive-deps
9449
- }, [mapId, title, bboxKey, mapControlConfig, tileServerSettings, disableTimeSlider, displayTimeInMap, shouldAutoFetch, shouldDisablePrefetching, children, showClock, featureStyle]);
9410
+ }, [mapId, title, bboxKey, mapControlConfig, tileServerSettings, disableTimeSlider, displayTimeInMap, shouldAutoFetch, shouldDisablePrefetching, children, isClockEnabled, featureStyle]);
9450
9411
  };
9451
9412
 
9452
9413
  var mapBoxStyle = function mapBoxStyle(theme) {
@@ -9468,8 +9429,8 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
9468
9429
  showZoomControls = _ref$showZoomControls === void 0 ? true : _ref$showZoomControls,
9469
9430
  _ref$multiLegend = _ref.multiLegend,
9470
9431
  multiLegend = _ref$multiLegend === void 0 ? false : _ref$multiLegend,
9471
- _ref$showClock = _ref.showClock,
9472
- showClock = _ref$showClock === void 0 ? true : _ref$showClock;
9432
+ _ref$isClockEnabled = _ref.isClockEnabled,
9433
+ isClockEnabled = _ref$isClockEnabled === void 0 ? true : _ref$isClockEnabled;
9473
9434
  var multiMapWindowRef = React.useRef(null);
9474
9435
  var dispatch = useDispatch();
9475
9436
  var syncGroupAddTarget = React.useCallback(function (payload) {
@@ -9530,7 +9491,7 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
9530
9491
  mapId: firstMapId,
9531
9492
  multiLegend: multiLegend,
9532
9493
  showMapId: true
9533
- }), !!showClock && jsx(TimeSliderClockConnect, {
9494
+ }), !!isClockEnabled && jsx(ClockConnect, {
9534
9495
  mapId: firstMapId
9535
9496
  }), maps.map(function (map, mapIndex) {
9536
9497
  var mapId = map.id;
@@ -9547,11 +9508,11 @@ var MultiMapViewConnect = function MultiMapViewConnect(_ref) {
9547
9508
  displayTimeInMap: map.displayTimeInMap || false,
9548
9509
  id: mapId,
9549
9510
  initialBbox: map.bbox,
9511
+ isClockEnabled: false,
9550
9512
  layers: map.layers || [],
9551
9513
  multiLegend: multiLegend,
9552
9514
  shouldDisablePrefetching: map.componentType === 'MultiMap',
9553
9515
  shouldShowZoomControls: !!showZoomControls && mapIndex === 0,
9554
- showClock: false,
9555
9516
  showTimeSlider: false,
9556
9517
  srs: map.srs,
9557
9518
  title: map.title || mapId
@@ -9662,10 +9623,10 @@ var ModelRunInterval = function ModelRunInterval(_ref) {
9662
9623
  });
9663
9624
  return jsx(MultiMapViewConnect, {
9664
9625
  cols: 5,
9626
+ isClockEnabled: false,
9665
9627
  maps: maps,
9666
9628
  multiLegend: multiLegend,
9667
9629
  rows: 3,
9668
- showClock: false,
9669
9630
  showTimeSlider: false,
9670
9631
  syncTime: false
9671
9632
  });
@@ -11010,14 +10971,11 @@ var fakeLocationDetailList = [{
11010
10971
  lon: 24.93545,
11011
10972
  bbox: [24.782805558281286, 59.92249323820872, 25.254496669447338, 60.29783941145479]
11012
10973
  }];
11013
- var locationApiEndpoints = [http.get(/^.*locations(.*)$/, function (_ref) {
10974
+ var locationApiEndpoints = [http.get(/^.*locations(.*)$/, function () {
10975
+ return HttpResponse.json(fakeLocationList);
10976
+ }), http.get(/^.*locationdetail(.*)$/, function (_ref) {
11014
10977
  var request = _ref.request;
11015
10978
  var url = new URL(request.url);
11016
- var search = url.searchParams.get('search');
11017
- return HttpResponse.json(search ? fakeLocationList : []);
11018
- }), http.get(/^.*locationdetail(.*)$/, function (_ref2) {
11019
- var request = _ref2.request;
11020
- var url = new URL(request.url);
11021
10979
  var id = url.searchParams.get('id');
11022
10980
  var result = fakeLocationDetailList.find(function (item) {
11023
10981
  return item.id === id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/core",
3
- "version": "14.5.2",
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": "14.5.2",
11
+ "@opengeoweb/shared": "15.0.0",
12
12
  "react-redux": "^9.2.0",
13
- "@opengeoweb/store": "14.5.2",
14
- "@opengeoweb/time-slider": "14.5.2",
13
+ "@opengeoweb/store": "15.0.0",
14
+ "@opengeoweb/time-slider": "15.0.0",
15
15
  "@reduxjs/toolkit": "^2.6.1",
16
- "@opengeoweb/webmap-react": "14.5.2",
17
- "@opengeoweb/webmap": "14.5.2",
18
- "@opengeoweb/theme": "14.5.2",
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": "14.5.2",
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": "14.5.2",
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": "14.5.2",
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,4 @@
1
+ import React from 'react';
2
+ export declare const ClockConnect: React.FC<{
3
+ mapId: string;
4
+ }>;
@@ -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
- showClock?: boolean;
40
+ isClockEnabled?: boolean;
41
41
  displayGetFeatureInfoButtonInMap?: boolean;
42
42
  shouldDisplayDrawControls?: boolean;
43
43
  displaySearchButtonInMap?: boolean;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.FC<import("./OlMapViewConnect").OlMapViewConnectProps>;
5
+ tags: string[];
6
+ };
7
+ export default _default;
8
+ export declare const ZoomToLayerExample: () => 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 {
@@ -24,6 +24,6 @@ export interface MultiMapViewProps {
24
24
  showTimeSlider?: boolean;
25
25
  showZoomControls?: boolean;
26
26
  multiLegend?: boolean;
27
- showClock?: boolean;
27
+ isClockEnabled?: boolean;
28
28
  }
29
29
  export declare const MultiMapViewConnect: React.FC<MultiMapViewProps>;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export declare const TimeSliderClockConnect: React.FC<{
3
- mapId: string;
4
- }>;
@@ -1 +0,0 @@
1
- export * from './TimeSliderClockConnect';
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- export declare const ControlButtonsConnect: React.FC<{
3
- sourceId: string;
4
- mapId: string;
5
- }>;
@@ -1,4 +0,0 @@
1
- import type { FC } from 'react';
2
- export declare const OptionsMenuConnect: FC<{
3
- mapId: string;
4
- }>;