@opengeoweb/core 9.32.1 → 9.33.1-spike-ol.3
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 +85 -53
- package/package.json +1 -1
- package/src/lib/components/LayerManager/DescriptionRow/DescriptionRow.d.ts +0 -1
- package/src/lib/components/LayerManager/LayerManager.d.ts +0 -1
- package/src/lib/components/LayerManager/LayerManagerConnect.d.ts +0 -1
- package/src/lib/components/LayerManager/LayerManagerUtils.d.ts +0 -18
- package/src/lib/components/MapViewConnect/useKeyboardZoomAndPan.d.ts +3 -1
- package/src/lib/components/Providers/Providers.d.ts +4 -0
- package/src/lib/components/TimeSliderConnect/TimeSliderCurrentTimeBoxConnect.d.ts +2 -0
- package/src/lib/components/TimeSliderConnect/timesliderUtils.d.ts +5 -0
package/index.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Grid2, Box, MenuItem, Typography, useTheme, Popper, Fade, Tooltip, styl
|
|
|
5
5
|
import { SHARED_NAMESPACE, sharedTranslations, CustomIconButton, TooltipSelect, AlertIcon, sliderHeaderStyle, CustomSlider, ToggleMenu, CustomTooltip, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, PROJECTION, calculateStartSize, ToolContainerDraggable, useDebounce, dateUtils, withEggs, ErrorBoundary } from '@opengeoweb/shared';
|
|
6
6
|
import { CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, CloudLoading, Copy, None, FastForward, AutoUpdateActive, Both, Visibility, VisibilityOff, Delete, DragHandle as DragHandle$1, Cached, Add, MapAdd, WorldMapProjection, Layers, ExitDomain, Info, Search, Exclamation, MyLocation, Close, ThemeWrapper, lightTheme, FlagBritain, FlagNetherlands, FlagFinland, FlagNorway } from '@opengeoweb/theme';
|
|
7
7
|
import i18n from 'i18next';
|
|
8
|
-
import {
|
|
8
|
+
import { initReactI18next, useTranslation, I18nextProvider } from 'react-i18next';
|
|
9
9
|
import { TIMESLIDER_NAMESPACE, timesliderTranslations, defaultTimeSpan, TIME_SLIDER_LEGEND_HEIGHT, SpeedButton, TimeStepButton, AnimationLengthButton, AnimationLength, TimeSpanButton, secondsPerPxFromCanvasWidth, getNewCenterOfFixedPointZoom, OptionsMenuButton, PlayButton, defaultTimeStep, BackwardForwardStepButton, AutoUpdateButton, NowButton, handleSetNowEvent, TimeSliderButtons, TimeSliderCurrentTimeBox, TimeSliderLegend, TimeSlider, onsetNewDateDebounced, getFilteredTime, ControlButtons, OptionsMenu, TimeSliderClock } from '@opengeoweb/timeslider';
|
|
10
10
|
import { WEBMAP_REACT_NAMESPACE, webmapReactTranslations, WEBMAP_NAMESPACE, webmapTranslations, LayerInfoButton, LayerInfoDialog, MapControlButton, MapDimensionSelect, dimensionConfig, DimensionSelectDialog, DimensionSelectButton, ZoomControls, MapView, MapViewLayer, LegendDialog, LegendButton, registerDrawFunction, emptyGeoJSON, MapControls, publicLayers } from '@opengeoweb/webmap-react';
|
|
11
11
|
import { useDispatch, useSelector, connect, useStore, Provider } from 'react-redux';
|
|
@@ -2141,9 +2141,6 @@ const layerManagerStyle = {
|
|
|
2141
2141
|
'.header-layermanager': {
|
|
2142
2142
|
containerType: 'inline-size'
|
|
2143
2143
|
},
|
|
2144
|
-
'.header-mapPresets': {
|
|
2145
|
-
display: 'none'
|
|
2146
|
-
},
|
|
2147
2144
|
'.medium-layermanager': {
|
|
2148
2145
|
display: 'none'
|
|
2149
2146
|
},
|
|
@@ -2197,25 +2194,9 @@ const layerManagerStyle = {
|
|
|
2197
2194
|
},
|
|
2198
2195
|
'.column-2': {
|
|
2199
2196
|
width: `calc((100% - ${leftButtonsWidth}px) )`
|
|
2200
|
-
},
|
|
2201
|
-
// presets
|
|
2202
|
-
'.header-layer.mappresetsModule-enabled': {
|
|
2203
|
-
display: 'none'
|
|
2204
|
-
},
|
|
2205
|
-
'.header-mapPresets': {
|
|
2206
|
-
display: 'block',
|
|
2207
|
-
'.MuiButtonBase-root': {
|
|
2208
|
-
height: 24,
|
|
2209
|
-
'.MuiBox-root': {
|
|
2210
|
-
textAlign: 'center'
|
|
2211
|
-
}
|
|
2212
|
-
}
|
|
2213
2197
|
}
|
|
2214
2198
|
},
|
|
2215
2199
|
'.header-layermanager': {
|
|
2216
|
-
'.mapPresets-btn': {
|
|
2217
|
-
display: 'none'
|
|
2218
|
-
},
|
|
2219
2200
|
'.collapseLarge-btn': {
|
|
2220
2201
|
display: 'inline-flex'
|
|
2221
2202
|
}
|
|
@@ -2287,7 +2268,7 @@ const LayerSelectButton = ({
|
|
|
2287
2268
|
});
|
|
2288
2269
|
};
|
|
2289
2270
|
|
|
2290
|
-
const _excluded$6 = ["
|
|
2271
|
+
const _excluded$6 = ["settings", "addLayerComponent"];
|
|
2291
2272
|
const styles$3 = {
|
|
2292
2273
|
text: theme => Object.assign({
|
|
2293
2274
|
paddingLeft: '10px',
|
|
@@ -2299,7 +2280,6 @@ const styles$3 = {
|
|
|
2299
2280
|
const DescriptionRow = _ref => {
|
|
2300
2281
|
var _settings$addLayer, _settings$addLayer2, _settings$layerName$t, _settings$layerName, _settings$layerStyle$, _settings$layerStyle, _settings$opacity$tit, _settings$opacity, _settings$dimensions$, _settings$dimensions, _settings$acceptanceT, _settings$acceptanceT2;
|
|
2301
2282
|
let {
|
|
2302
|
-
mapPresetsModule,
|
|
2303
2283
|
settings,
|
|
2304
2284
|
addLayerComponent
|
|
2305
2285
|
} = _ref,
|
|
@@ -2307,12 +2287,6 @@ const DescriptionRow = _ref => {
|
|
|
2307
2287
|
const {
|
|
2308
2288
|
t
|
|
2309
2289
|
} = useCoreTranslation();
|
|
2310
|
-
const [mapPresetsModuleInline] = React.useState(mapPresetsModule ? Object.assign({}, mapPresetsModule, {
|
|
2311
|
-
props: Object.assign({}, mapPresetsModule.props, {
|
|
2312
|
-
id: 'mappresets-menubuttonInline'
|
|
2313
|
-
})
|
|
2314
|
-
}) : undefined);
|
|
2315
|
-
const hasMapPresetsModule = mapPresetsModule !== undefined;
|
|
2316
2290
|
return jsxs(Grid2, Object.assign({
|
|
2317
2291
|
container: true,
|
|
2318
2292
|
"data-testid": "descriptionRow",
|
|
@@ -2332,19 +2306,12 @@ const DescriptionRow = _ref => {
|
|
|
2332
2306
|
tooltipTitle: settings == null || (_settings$addLayer = settings.addLayer) == null ? void 0 : _settings$addLayer.tooltipTitle,
|
|
2333
2307
|
icon: settings == null || (_settings$addLayer2 = settings.addLayer) == null ? void 0 : _settings$addLayer2.icon
|
|
2334
2308
|
})
|
|
2335
|
-
}),
|
|
2309
|
+
}), jsx(Grid2, {
|
|
2336
2310
|
className: columnClasses.column2,
|
|
2337
|
-
children:
|
|
2338
|
-
className: `header-layer ${hasMapPresetsModule ? 'mappresetsModule-enabled' : ''}`,
|
|
2311
|
+
children: jsx(Box, {
|
|
2339
2312
|
sx: styles$3.text,
|
|
2340
2313
|
children: (_settings$layerName$t = settings == null || (_settings$layerName = settings.layerName) == null ? void 0 : _settings$layerName.title) != null ? _settings$layerName$t : t('layermanager-layer')
|
|
2341
|
-
})
|
|
2342
|
-
className: "header-mapPresets",
|
|
2343
|
-
sx: {
|
|
2344
|
-
marginRight: 4
|
|
2345
|
-
},
|
|
2346
|
-
children: mapPresetsModuleInline
|
|
2347
|
-
})]
|
|
2314
|
+
})
|
|
2348
2315
|
}), jsx(Grid2, {
|
|
2349
2316
|
className: columnClasses.column3,
|
|
2350
2317
|
children: jsx(Box, {
|
|
@@ -7640,7 +7607,6 @@ const LayerManager = ({
|
|
|
7640
7607
|
onMouseDown: _onMouseDown = () => {},
|
|
7641
7608
|
order: _order = 0,
|
|
7642
7609
|
source: _source = 'app',
|
|
7643
|
-
leftHeaderComponent: _leftHeaderComponent = undefined,
|
|
7644
7610
|
isLoading: _isLoading = false,
|
|
7645
7611
|
error,
|
|
7646
7612
|
isDockedLayerManager: _isDockedLayerManager = false,
|
|
@@ -7683,7 +7649,6 @@ const LayerManager = ({
|
|
|
7683
7649
|
onMouseDown: _onMouseDown,
|
|
7684
7650
|
order: _order,
|
|
7685
7651
|
source: _source,
|
|
7686
|
-
leftHeaderComponent: _leftHeaderComponent,
|
|
7687
7652
|
rightHeaderComponent: jsx(HeaderOptionsConnect, {
|
|
7688
7653
|
isDockedLayerManager: _isDockedLayerManager,
|
|
7689
7654
|
mapId: mapId,
|
|
@@ -7742,7 +7707,6 @@ const LayerManager = ({
|
|
|
7742
7707
|
"data-testid": "layerManagerRowContainer",
|
|
7743
7708
|
sx: styles$1.layerRowContainer,
|
|
7744
7709
|
children: [jsx(DescriptionRow, {
|
|
7745
|
-
mapPresetsModule: _leftHeaderComponent,
|
|
7746
7710
|
source: _source,
|
|
7747
7711
|
settings: settings == null ? void 0 : settings.header,
|
|
7748
7712
|
addLayerComponent: addLayerComponent
|
|
@@ -7823,7 +7787,6 @@ const LayerManagerConnect = ({
|
|
|
7823
7787
|
bounds,
|
|
7824
7788
|
title,
|
|
7825
7789
|
showMapIdInTitle: _showMapIdInTitle = false,
|
|
7826
|
-
leftHeaderComponent: _leftHeaderComponent = undefined,
|
|
7827
7790
|
mapId: initialMapId = null,
|
|
7828
7791
|
isMultiMap: _isMultiMap = false,
|
|
7829
7792
|
isDocked: _isDocked = false,
|
|
@@ -7884,7 +7847,6 @@ const LayerManagerConnect = ({
|
|
|
7884
7847
|
order: dialogOrder,
|
|
7885
7848
|
source: uiSource,
|
|
7886
7849
|
size: _isDocked ? returnCorrectSize(dockedLayerManagerSize) : sizeLarge,
|
|
7887
|
-
leftHeaderComponent: _leftHeaderComponent,
|
|
7888
7850
|
isLoading: uiIsLoading,
|
|
7889
7851
|
error: uiError,
|
|
7890
7852
|
onToggleDock: onToggleDock,
|
|
@@ -7904,7 +7866,7 @@ const LayerManagerConnect = ({
|
|
|
7904
7866
|
})
|
|
7905
7867
|
}), !_isDocked && jsx(LayerInfoDialogConnect, {}), !_isDocked && jsx(LayerSelectConnect, {})]
|
|
7906
7868
|
});
|
|
7907
|
-
}, [bounds, dialogOrder, dockedLayerManagerSize, initialMapId, isDialogOpen, _isDocked, _isMultiMap,
|
|
7869
|
+
}, [bounds, dialogOrder, dockedLayerManagerSize, initialMapId, isDialogOpen, _isDocked, _isMultiMap, mapId, onCloseDialog, onToggleDock, preloadedAvailableBaseLayers, preloadedBaseServices, setDialogOrder, _showMapIdInTitle, nonEmptyTitle, uiError, uiIsLoading, uiSource, _source]);
|
|
7908
7870
|
};
|
|
7909
7871
|
|
|
7910
7872
|
const LayerManagerMapButtonConnect = ({
|
|
@@ -8683,11 +8645,31 @@ const TOUCH_PAN_STEP_PERCENTAGE = 0.02;
|
|
|
8683
8645
|
* See the License for the specific language governing permissions and
|
|
8684
8646
|
* limitations under the License.
|
|
8685
8647
|
*
|
|
8686
|
-
* Copyright
|
|
8687
|
-
* Copyright
|
|
8648
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
8649
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
8688
8650
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
8689
8651
|
* */
|
|
8690
|
-
const
|
|
8652
|
+
const isDialogOpen = mapRef => {
|
|
8653
|
+
const backdrops = Array.from(document.querySelectorAll('.MuiBackdrop-root'));
|
|
8654
|
+
return backdrops.find(backdropNode => {
|
|
8655
|
+
var _backdropNode$parentE;
|
|
8656
|
+
return (_backdropNode$parentE = backdropNode.parentElement) == null ? void 0 : _backdropNode$parentE.contains(mapRef);
|
|
8657
|
+
}) !== undefined;
|
|
8658
|
+
};
|
|
8659
|
+
const isMapKeyboardControlsAllowed = (target, mapRef) => {
|
|
8660
|
+
if (isDialogOpen(mapRef)) {
|
|
8661
|
+
return false;
|
|
8662
|
+
}
|
|
8663
|
+
if (target.tagName !== 'BODY') {
|
|
8664
|
+
if (target.tagName === 'BUTTON') {
|
|
8665
|
+
// return true for element is active but not focus visible to the user
|
|
8666
|
+
return !target.classList.contains('Mui-focusVisible');
|
|
8667
|
+
}
|
|
8668
|
+
return false;
|
|
8669
|
+
}
|
|
8670
|
+
return true;
|
|
8671
|
+
};
|
|
8672
|
+
const useKeyboardZoomAndPan = (mapIsActive, mapId, mapRef) => {
|
|
8691
8673
|
React.useEffect(() => {
|
|
8692
8674
|
const keysPressedDown = {};
|
|
8693
8675
|
const handleKeyPress = event => {
|
|
@@ -8698,7 +8680,7 @@ const useKeyboardZoomAndPan = (mapIsActive, mapId) => {
|
|
|
8698
8680
|
type
|
|
8699
8681
|
} = event;
|
|
8700
8682
|
keysPressedDown[key] = type === 'keydown';
|
|
8701
|
-
if (map &&
|
|
8683
|
+
if (map && mapIsActive && isMapKeyboardControlsAllowed(target, mapRef)) {
|
|
8702
8684
|
if (keysPressedDown['+']) {
|
|
8703
8685
|
map.zoomIn(1);
|
|
8704
8686
|
} else if (keysPressedDown['-']) {
|
|
@@ -8734,7 +8716,7 @@ const useKeyboardZoomAndPan = (mapIsActive, mapId) => {
|
|
|
8734
8716
|
document.removeEventListener('keydown', handleKeyPress);
|
|
8735
8717
|
document.removeEventListener('keyup', handleKeyPress);
|
|
8736
8718
|
};
|
|
8737
|
-
}, [mapIsActive, mapId]);
|
|
8719
|
+
}, [mapIsActive, mapId, mapRef]);
|
|
8738
8720
|
};
|
|
8739
8721
|
const PAN_STEP_PERCENTAGE = 0.02;
|
|
8740
8722
|
|
|
@@ -8758,6 +8740,7 @@ const MapViewConnect = _ref => {
|
|
|
8758
8740
|
children
|
|
8759
8741
|
} = _ref,
|
|
8760
8742
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
8743
|
+
const mapRef = React.useRef(null);
|
|
8761
8744
|
const store = useStore();
|
|
8762
8745
|
const mapDimensions = useSelector(store => mapSelectors.getMapDimensions(store, mapId));
|
|
8763
8746
|
const layers = useSelector(store => mapSelectors.getMapLayers(store, mapId));
|
|
@@ -8851,7 +8834,7 @@ const MapViewConnect = _ref => {
|
|
|
8851
8834
|
}));
|
|
8852
8835
|
}, [dispatch, store]);
|
|
8853
8836
|
const isActiveWindowId = useSelector(store => uiSelectors.getIsActiveWindowId(store, mapId));
|
|
8854
|
-
useKeyboardZoomAndPan(isActiveWindowId, mapId);
|
|
8837
|
+
useKeyboardZoomAndPan(isActiveWindowId, mapId, mapRef.current);
|
|
8855
8838
|
useTouchZoomPan(isActiveWindowId, mapId);
|
|
8856
8839
|
const unRegister = React.useCallback(mapId => {
|
|
8857
8840
|
unregisterMap({
|
|
@@ -8902,6 +8885,7 @@ const MapViewConnect = _ref => {
|
|
|
8902
8885
|
style: {
|
|
8903
8886
|
height: '100%'
|
|
8904
8887
|
},
|
|
8888
|
+
ref: mapRef,
|
|
8905
8889
|
children: jsxs(MapView, Object.assign({}, props, {
|
|
8906
8890
|
mapId: mapId,
|
|
8907
8891
|
srs: srs,
|
|
@@ -9714,6 +9698,25 @@ const getTimeBounds = dimensions => {
|
|
|
9714
9698
|
endTime
|
|
9715
9699
|
};
|
|
9716
9700
|
};
|
|
9701
|
+
const calculateNewAnimationEndTime = (newTimeInMilliseconds, dataStartTimeInMilliseconds, dataEndTimeInMilliseconds, animationDuration) => {
|
|
9702
|
+
if (newTimeInMilliseconds <= dataStartTimeInMilliseconds) {
|
|
9703
|
+
return dataStartTimeInMilliseconds + animationDuration;
|
|
9704
|
+
}
|
|
9705
|
+
if (newTimeInMilliseconds > dataEndTimeInMilliseconds) {
|
|
9706
|
+
return dataEndTimeInMilliseconds;
|
|
9707
|
+
}
|
|
9708
|
+
return newTimeInMilliseconds;
|
|
9709
|
+
};
|
|
9710
|
+
const calculateNewAnimationTimeBounds = (newTime, animationStartTime, animationEndTime, dataStartTime, dataEndTime) => {
|
|
9711
|
+
const dateToMillisecond = date => new Date(date).getTime();
|
|
9712
|
+
const animationDuration = dateToMillisecond(animationEndTime) - dateToMillisecond(animationStartTime);
|
|
9713
|
+
const newAnimationEndTime = calculateNewAnimationEndTime(newTime * 1000, dataStartTime * 1000, dataEndTime * 1000, animationDuration);
|
|
9714
|
+
const newAnimationStartTime = newAnimationEndTime - animationDuration;
|
|
9715
|
+
return {
|
|
9716
|
+
newAnimationStartTime,
|
|
9717
|
+
newAnimationEndTime
|
|
9718
|
+
};
|
|
9719
|
+
};
|
|
9717
9720
|
|
|
9718
9721
|
const SpeedButtonConnect = ({
|
|
9719
9722
|
mapId
|
|
@@ -10076,7 +10079,8 @@ const TimeSliderCurrentTimeBoxConnectComponent = ({
|
|
|
10076
10079
|
isAutoUpdating,
|
|
10077
10080
|
setCenterTime,
|
|
10078
10081
|
unfilteredSelectedTime,
|
|
10079
|
-
setUnfilteredSelectedTime
|
|
10082
|
+
setUnfilteredSelectedTime,
|
|
10083
|
+
onCalendarSelect
|
|
10080
10084
|
}) => {
|
|
10081
10085
|
const [dataStartTime, dataEndTime] = useSelector(store => mapSelectors.getDataLimitsFromLayers(store, mapId));
|
|
10082
10086
|
return jsx(TimeSliderCurrentTimeBox, {
|
|
@@ -10089,6 +10093,7 @@ const TimeSliderCurrentTimeBoxConnectComponent = ({
|
|
|
10089
10093
|
isAutoUpdating: isAutoUpdating,
|
|
10090
10094
|
unfilteredSelectedTime: unfilteredSelectedTime,
|
|
10091
10095
|
setUnfilteredSelectedTime: setUnfilteredSelectedTime,
|
|
10096
|
+
onCalendarSelect: onCalendarSelect,
|
|
10092
10097
|
onSetCenterTime: newTime => {
|
|
10093
10098
|
setCenterTime({
|
|
10094
10099
|
mapId,
|
|
@@ -10323,6 +10328,8 @@ const TimeSliderConnect = ({
|
|
|
10323
10328
|
const [dataStartTime, dataEndTime] = useSelector(store => mapSelectors.getDataLimitsFromLayers(store, mapId));
|
|
10324
10329
|
const isAnimating = useSelector(store => mapSelectors.isAnimating(store, mapId));
|
|
10325
10330
|
const selectedTime = useSelector(store => mapSelectors.getSelectedTime(store, mapId));
|
|
10331
|
+
const animationStartTime = useSelector(store => mapSelectors.getAnimationStartTime(store, mapId));
|
|
10332
|
+
const animationEndTime = useSelector(store => mapSelectors.getAnimationEndTime(store, mapId));
|
|
10326
10333
|
useUpdateTimestep(mapId);
|
|
10327
10334
|
useUpdateTimeSpan(mapId, onSetTimeSliderSpan);
|
|
10328
10335
|
const turnOffAutoUpdateIfItsOn = useTurnOffAutoUpdateIfItsOn(mapId);
|
|
@@ -10364,6 +10371,30 @@ const TimeSliderConnect = ({
|
|
|
10364
10371
|
onsetNewDateDebounced(timeToIso(filteredIsoTime), onSetNewDate);
|
|
10365
10372
|
}
|
|
10366
10373
|
};
|
|
10374
|
+
// Move animation bar when user changes time using time picker
|
|
10375
|
+
// Animation bar however cannot be moved into a time where there is no data
|
|
10376
|
+
const moveAnimationUsingCalendar = newTime => {
|
|
10377
|
+
if (!animationEndTime || !animationStartTime || !dataStartTime || !dataEndTime) {
|
|
10378
|
+
return;
|
|
10379
|
+
}
|
|
10380
|
+
const formatToIsoString = date => handleDateUtilsISOString(new Date(date).toISOString());
|
|
10381
|
+
const {
|
|
10382
|
+
newAnimationStartTime,
|
|
10383
|
+
newAnimationEndTime
|
|
10384
|
+
} = calculateNewAnimationTimeBounds(newTime, animationStartTime, animationEndTime, dataStartTime, dataEndTime);
|
|
10385
|
+
dispatch(mapActions.setAnimationStartTime({
|
|
10386
|
+
mapId,
|
|
10387
|
+
animationStartTime: formatToIsoString(newAnimationStartTime)
|
|
10388
|
+
}));
|
|
10389
|
+
dispatch(mapActions.setAnimationEndTime({
|
|
10390
|
+
mapId,
|
|
10391
|
+
animationEndTime: formatToIsoString(newAnimationEndTime)
|
|
10392
|
+
}));
|
|
10393
|
+
};
|
|
10394
|
+
const onCalendarSelect = newSelectedTime => {
|
|
10395
|
+
setUnfilteredSelectedTime(newSelectedTime);
|
|
10396
|
+
moveAnimationUsingCalendar(newSelectedTime);
|
|
10397
|
+
};
|
|
10367
10398
|
return jsx(TimeSlider, {
|
|
10368
10399
|
timeStep: timeStep,
|
|
10369
10400
|
dataStartTime: dataStartTime,
|
|
@@ -10385,7 +10416,8 @@ const TimeSliderConnect = ({
|
|
|
10385
10416
|
timeBox: jsx(TimeSliderCurrentTimeBoxConnect, {
|
|
10386
10417
|
mapId: mapId,
|
|
10387
10418
|
unfilteredSelectedTime: unfilteredSelectedTime,
|
|
10388
|
-
setUnfilteredSelectedTime: setUnfilteredSelectedTime
|
|
10419
|
+
setUnfilteredSelectedTime: setUnfilteredSelectedTime,
|
|
10420
|
+
onCalendarSelect: onCalendarSelect
|
|
10389
10421
|
}),
|
|
10390
10422
|
legend: jsx(TimeSliderLegendConnect, {
|
|
10391
10423
|
mapId: mapId,
|
|
@@ -11820,4 +11852,4 @@ const LanguageSelect = ({
|
|
|
11820
11852
|
});
|
|
11821
11853
|
};
|
|
11822
11854
|
|
|
11823
|
-
export { CORE_NAMESPACE, ConfigurableMapConnect, CoreThemeProvider, CoreThemeStoreProvider, DemoWrapper, DemoWrapperConnect, HarmonieTempAndPrecipPreset, LanguageSelect, LayerInfoButtonConnect, LayerInfoDialogConnect, LayerManager, BaseLayerRow as LayerManagerBaseLayerRow, LayerManagerConnect, DescriptionRow as LayerManagerDescriptionRow, HeaderOptions as LayerManagerHeaderOptions, LayerContainerRow as LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LegendConnect, LegendMapButtonConnect, MapViewConnect, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, MyMapLocation, RouterWrapperConnect, SearchControlButtonConnect, SearchControlConnect, SearchDialog, SentryRecordButton, SyncGroupViewerConnect, ThemeWrapperWithModules, TimeSliderConnect, ZoomControlConnect, componentsLookUp, coreTranslations, defaultBbox, defaultConfigurations, filterMapPresets, filterServices, filterTimeSeriesServices, testLayers, useFetchServices, useUpdateTimeSpan, useUpdateTimestep };
|
|
11855
|
+
export { CORE_NAMESPACE, ConfigurableMapConnect, CoreI18nProvider, CoreThemeProvider, CoreThemeStoreProvider, DemoWrapper, DemoWrapperConnect, HarmonieTempAndPrecipPreset, LanguageSelect, LayerInfoButtonConnect, LayerInfoDialogConnect, LayerManager, BaseLayerRow as LayerManagerBaseLayerRow, LayerManagerConnect, DescriptionRow as LayerManagerDescriptionRow, HeaderOptions as LayerManagerHeaderOptions, LayerContainerRow as LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LegendConnect, LegendMapButtonConnect, MapViewConnect, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, MyMapLocation, RouterWrapperConnect, SearchControlButtonConnect, SearchControlConnect, SearchDialog, SentryRecordButton, SyncGroupViewerConnect, ThemeWrapperWithModules, TimeSliderConnect, ZoomControlConnect, componentsLookUp, coreTranslations, defaultBbox, defaultConfigurations, filterMapPresets, filterServices, filterTimeSeriesServices, testLayers, useFetchServices, useUpdateTimeSpan, useUpdateTimestep };
|
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@ import * as React from 'react';
|
|
|
3
3
|
import { uiTypes } from '@opengeoweb/store';
|
|
4
4
|
import { LayerManagerCustomSettings } from '../LayerManagerUtils';
|
|
5
5
|
interface DescriptionRowProps extends React.ComponentProps<typeof Grid> {
|
|
6
|
-
mapPresetsModule?: React.ReactElement;
|
|
7
6
|
source?: uiTypes.Source;
|
|
8
7
|
settings?: LayerManagerCustomSettings['header'];
|
|
9
8
|
addLayerComponent?: React.ReactElement;
|
|
@@ -59,9 +59,6 @@ export declare const layerManagerStyle: {
|
|
|
59
59
|
'.header-layermanager': {
|
|
60
60
|
containerType: string;
|
|
61
61
|
};
|
|
62
|
-
'.header-mapPresets': {
|
|
63
|
-
display: string;
|
|
64
|
-
};
|
|
65
62
|
'.medium-layermanager': {
|
|
66
63
|
display: string;
|
|
67
64
|
};
|
|
@@ -115,23 +112,8 @@ export declare const layerManagerStyle: {
|
|
|
115
112
|
'.column-2': {
|
|
116
113
|
width: string;
|
|
117
114
|
};
|
|
118
|
-
'.header-layer.mappresetsModule-enabled': {
|
|
119
|
-
display: string;
|
|
120
|
-
};
|
|
121
|
-
'.header-mapPresets': {
|
|
122
|
-
display: string;
|
|
123
|
-
'.MuiButtonBase-root': {
|
|
124
|
-
height: number;
|
|
125
|
-
'.MuiBox-root': {
|
|
126
|
-
textAlign: string;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
115
|
};
|
|
131
116
|
'.header-layermanager': {
|
|
132
|
-
'.mapPresets-btn': {
|
|
133
|
-
display: string;
|
|
134
|
-
};
|
|
135
117
|
'.collapseLarge-btn': {
|
|
136
118
|
display: string;
|
|
137
119
|
};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const isDialogOpen: (mapRef: HTMLElement | null) => boolean;
|
|
2
|
+
export declare const isMapKeyboardControlsAllowed: (target: Element, mapRef: HTMLElement | null) => boolean;
|
|
3
|
+
export declare const useKeyboardZoomAndPan: (mapIsActive: boolean, mapId: string, mapRef: HTMLElement | null) => void;
|
|
@@ -6,6 +6,9 @@ interface CoreThemeProviderProps {
|
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
theme?: Theme;
|
|
8
8
|
}
|
|
9
|
+
interface CoreTranslationWrapperProps {
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
9
12
|
/**
|
|
10
13
|
* A Provider component which provides the GeoWeb theme
|
|
11
14
|
* @param children
|
|
@@ -23,6 +26,7 @@ interface CoreThemeStoreProviderProps extends CoreThemeProviderProps {
|
|
|
23
26
|
* @returns
|
|
24
27
|
*/
|
|
25
28
|
export declare const CoreThemeStoreProvider: React.FC<CoreThemeStoreProviderProps>;
|
|
29
|
+
export declare const CoreI18nProvider: React.FC<CoreTranslationWrapperProps>;
|
|
26
30
|
export declare const DemoWrapper: React.FC<CoreThemeProviderProps>;
|
|
27
31
|
export declare const DemoWrapperConnect: React.FC<CoreThemeStoreProviderProps>;
|
|
28
32
|
export {};
|
|
@@ -10,11 +10,13 @@ interface TimeSliderCurrentTimeBoxConnectComponentProps {
|
|
|
10
10
|
setCenterTime?: typeof mapActions.setTimeSliderCenterTime;
|
|
11
11
|
unfilteredSelectedTime: number;
|
|
12
12
|
setUnfilteredSelectedTime: (unfilteredSelectedTime: number) => void;
|
|
13
|
+
onCalendarSelect: (newTime: number) => void;
|
|
13
14
|
}
|
|
14
15
|
export declare const TimeSliderCurrentTimeBoxConnect: import("react-redux").ConnectedComponent<React.FC<TimeSliderCurrentTimeBoxConnectComponentProps>, {
|
|
15
16
|
mapId: string;
|
|
16
17
|
unfilteredSelectedTime: number;
|
|
17
18
|
setUnfilteredSelectedTime: (unfilteredSelectedTime: number) => void;
|
|
19
|
+
onCalendarSelect: (newTime: number) => void;
|
|
18
20
|
timeStep?: number | undefined;
|
|
19
21
|
centerTime?: number | undefined;
|
|
20
22
|
secondsPerPx?: number | undefined;
|
|
@@ -5,3 +5,8 @@ export declare const useTurnOffAutoUpdateIfItsOn: (mapId: string) => (() => void
|
|
|
5
5
|
* Returns time bounds from the given dimension. If no time dimension given, current time is returned as default
|
|
6
6
|
*/
|
|
7
7
|
export declare const getTimeBounds: (dimensions: mapTypes.Dimension[]) => TimeBounds;
|
|
8
|
+
export declare const calculateNewAnimationEndTime: (newTimeInMilliseconds: number, dataStartTimeInMilliseconds: number, dataEndTimeInMilliseconds: number, animationDuration: number) => number;
|
|
9
|
+
export declare const calculateNewAnimationTimeBounds: (newTime: number, animationStartTime: string, animationEndTime: string, dataStartTime: number, dataEndTime: number) => {
|
|
10
|
+
newAnimationStartTime: number;
|
|
11
|
+
newAnimationEndTime: number;
|
|
12
|
+
};
|