@opengeoweb/core 12.4.1 → 12.4.2
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,7 +2,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useState, useCallback, useEffect, useContext, useMemo } from 'react';
|
|
4
4
|
import { Grid, Box, MenuItem, Typography, useTheme, Popper, Fade, Tooltip, styled, LinearProgress, FormControl, InputLabel, Paper, List, ListItemButton, ListItemText, CircularProgress, ListSubheader, DialogContentText, TextField, InputAdornment, Button, Autocomplete, ListItemIcon, Checkbox, Switch, Select } from '@mui/material';
|
|
5
|
-
import { safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, CustomIconButton, CustomTooltip, TooltipSelect, AlertIcon, sliderHeaderStyle, CustomSlider, ToggleMenu, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, CustomDialog, PROJECTION, calculateStartSize, useWheelStopPropagation, ToolContainerDraggable, sessionStorageProvider, useDebounce, dateUtils, usePrevious, ErrorBoundary } from '@opengeoweb/shared';
|
|
5
|
+
import { safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, CustomIconButton, CustomTooltip, TooltipSelect, AlertIcon, useScrollingInIsolation, sliderHeaderStyle, CustomSlider, ToggleMenu, tooltipContainerStyles, renderCounter, AlertBanner, CustomAccordion, CustomDialog, PROJECTION, calculateStartSize, useWheelStopPropagation, ToolContainerDraggable, sessionStorageProvider, useDebounce, dateUtils, usePrevious, ErrorBoundary } from '@opengeoweb/shared';
|
|
6
6
|
import { CollapseSmall, CollapseMedium, CollapseLarge, CollapseWindow, ExpandWindow, LayersAdd, CloudLoading, ColumnCollapsed, ColumnCollapse, Copy, None, FastForward, AutoUpdateActive, Both, Delete, Visibility, VisibilityOff, DragHandle as DragHandle$1, Cached, Add, MapAdd, WorldMapProjection, Layers, Search, Exclamation, MyLocation, Close, ExitDomain, Info, ThemeWrapper, lightTheme, FlagBritain, FlagNetherlands, FlagFinland, FlagNorway } from '@opengeoweb/theme';
|
|
7
7
|
import i18n from 'i18next';
|
|
8
8
|
import { useTranslation, I18nextProvider } from 'react-i18next';
|
|
@@ -22,7 +22,9 @@ import axios from 'axios';
|
|
|
22
22
|
import { ImageWMS } from 'ol/source';
|
|
23
23
|
import DOMPurify from 'dompurify';
|
|
24
24
|
import { unByKey } from 'ol/Observable';
|
|
25
|
+
import GeoJSON from 'ol/format/GeoJSON';
|
|
25
26
|
import { toLonLat } from 'ol/proj';
|
|
27
|
+
import { getIntersection } from 'ol/extent';
|
|
26
28
|
import { snackbarTypes, snackbarActions, SnackbarWrapperConnect } from '@opengeoweb/snackbar';
|
|
27
29
|
import { useNavigate } from 'react-router-dom';
|
|
28
30
|
import * as Sentry from '@sentry/react';
|
|
@@ -1512,7 +1514,6 @@ var RenderLayers = function RenderLayers(_ref) {
|
|
|
1512
1514
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
1513
1515
|
return onChangeLayerName(e.value);
|
|
1514
1516
|
},
|
|
1515
|
-
requiresCtrlToChange: true,
|
|
1516
1517
|
skipLocalStyling: skipLocalStyling,
|
|
1517
1518
|
renderValue: function renderValue(value) {
|
|
1518
1519
|
return extendedLayers.find(function (layer) {
|
|
@@ -1605,8 +1606,11 @@ var OpacitySelect = function OpacitySelect(_ref) {
|
|
|
1605
1606
|
closeSliderPopper();
|
|
1606
1607
|
}
|
|
1607
1608
|
}, [anchorEl]);
|
|
1609
|
+
var scrollInIsolationRef = useScrollingInIsolation({
|
|
1610
|
+
onWheel: onWheel
|
|
1611
|
+
});
|
|
1608
1612
|
return jsxs(Box, {
|
|
1609
|
-
|
|
1613
|
+
ref: scrollInIsolationRef,
|
|
1610
1614
|
"data-testid": "scrollOpacity",
|
|
1611
1615
|
sx: {
|
|
1612
1616
|
width: '100%',
|
|
@@ -1787,7 +1791,6 @@ var RenderStyles = function RenderStyles(_ref) {
|
|
|
1787
1791
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
1788
1792
|
return onChangeLayerStyle(e.value);
|
|
1789
1793
|
},
|
|
1790
|
-
requiresCtrlToChange: true,
|
|
1791
1794
|
IconComponent: icon,
|
|
1792
1795
|
skipLocalStyling: skipLocalStyling,
|
|
1793
1796
|
children: [jsx(MenuItem, {
|
|
@@ -1974,7 +1977,6 @@ var AcceptanceTime = function AcceptanceTime(_ref) {
|
|
|
1974
1977
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
1975
1978
|
_onChange(e.value);
|
|
1976
1979
|
},
|
|
1977
|
-
requiresCtrlToChange: true,
|
|
1978
1980
|
list: acceptanceTimesValues,
|
|
1979
1981
|
currentIndex: acceptanceTimes.findIndex(function (time) {
|
|
1980
1982
|
return layerAcceptanceTime === time.value;
|
|
@@ -3476,15 +3478,12 @@ var LayerContainerRow = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
3476
3478
|
collapsedColumns = _ref.collapsedColumns,
|
|
3477
3479
|
gridProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
3478
3480
|
var dispatch = useDispatch();
|
|
3479
|
-
var _React$useState = React.useState(false),
|
|
3480
|
-
keyPressed = _React$useState[0],
|
|
3481
|
-
setKeyPressed = _React$useState[1];
|
|
3482
3481
|
var _React$useTransition = React.useTransition(),
|
|
3483
3482
|
isPending = _React$useTransition[0],
|
|
3484
3483
|
startTransition = _React$useTransition[1];
|
|
3485
|
-
var _React$
|
|
3486
|
-
rowsToDisplay = _React$
|
|
3487
|
-
setRowsToDisplay = _React$
|
|
3484
|
+
var _React$useState = React.useState(0),
|
|
3485
|
+
rowsToDisplay = _React$useState[0],
|
|
3486
|
+
setRowsToDisplay = _React$useState[1];
|
|
3488
3487
|
var layerIds = useSelector(function (store) {
|
|
3489
3488
|
return mapSelectors.getLayerIds(store, mapId);
|
|
3490
3489
|
});
|
|
@@ -3500,9 +3499,9 @@ var LayerContainerRow = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
3500
3499
|
origin: layerTypes.LayerActionOrigin.layerManager
|
|
3501
3500
|
}));
|
|
3502
3501
|
}, [dispatch]);
|
|
3503
|
-
var _React$
|
|
3504
|
-
activeDragIndex = _React$
|
|
3505
|
-
setActiveDragIndex = _React$
|
|
3502
|
+
var _React$useState2 = React.useState(null),
|
|
3503
|
+
activeDragIndex = _React$useState2[0],
|
|
3504
|
+
setActiveDragIndex = _React$useState2[1];
|
|
3506
3505
|
var onSetList = function onSetList() {}; // since we use activeDragIndex, we don't need inner state handling of ReactSortable
|
|
3507
3506
|
var onStart = React.useCallback(function (_ref3) {
|
|
3508
3507
|
var oldIndex = _ref3.oldIndex;
|
|
@@ -3528,38 +3527,6 @@ var LayerContainerRow = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
3528
3527
|
};
|
|
3529
3528
|
var isSorting = activeDragIndex !== null;
|
|
3530
3529
|
var isDragDisabled = layerLength === 1;
|
|
3531
|
-
var keyPressedTrue = function keyPressedTrue(event) {
|
|
3532
|
-
if (event.ctrlKey || event.metaKey) {
|
|
3533
|
-
setKeyPressed(true);
|
|
3534
|
-
}
|
|
3535
|
-
};
|
|
3536
|
-
var keyPressedFalse = function keyPressedFalse() {
|
|
3537
|
-
setKeyPressed(false);
|
|
3538
|
-
};
|
|
3539
|
-
React.useEffect(function () {
|
|
3540
|
-
window.addEventListener('keydown', keyPressedTrue);
|
|
3541
|
-
window.addEventListener('keyup', keyPressedFalse);
|
|
3542
|
-
return function () {
|
|
3543
|
-
window.removeEventListener('keydown', keyPressedTrue);
|
|
3544
|
-
window.removeEventListener('keyup', keyPressedFalse);
|
|
3545
|
-
};
|
|
3546
|
-
}, []);
|
|
3547
|
-
var preventDefault = React.useCallback(function (event) {
|
|
3548
|
-
event.preventDefault();
|
|
3549
|
-
event.stopPropagation();
|
|
3550
|
-
}, []);
|
|
3551
|
-
React.useEffect(function () {
|
|
3552
|
-
if (keyPressed === true) {
|
|
3553
|
-
window.addEventListener('wheel', preventDefault, {
|
|
3554
|
-
passive: false
|
|
3555
|
-
});
|
|
3556
|
-
} else {
|
|
3557
|
-
window.removeEventListener('wheel', preventDefault);
|
|
3558
|
-
}
|
|
3559
|
-
return function () {
|
|
3560
|
-
return window.removeEventListener('wheel', preventDefault);
|
|
3561
|
-
};
|
|
3562
|
-
}, [keyPressed, preventDefault]);
|
|
3563
3530
|
var contents = layerIds.map(function (layerId) {
|
|
3564
3531
|
var _settings$dragHandle, _settings$dragHandle2;
|
|
3565
3532
|
return jsx(LayerRowConnect, {
|
|
@@ -4740,7 +4707,6 @@ var ProjectionSelect = function ProjectionSelect(_ref) {
|
|
|
4740
4707
|
onChangeMouseWheel: function onChangeMouseWheel(e) {
|
|
4741
4708
|
return selectProjection(e.value);
|
|
4742
4709
|
},
|
|
4743
|
-
requiresCtrlToChange: true,
|
|
4744
4710
|
children: [jsx(MenuItem, {
|
|
4745
4711
|
disabled: true,
|
|
4746
4712
|
children: title
|
|
@@ -7254,6 +7220,73 @@ var getCenterOfLinkedFeature = function getCenterOfLinkedFeature(feature, srs) {
|
|
|
7254
7220
|
}
|
|
7255
7221
|
return null;
|
|
7256
7222
|
};
|
|
7223
|
+
function useFitAndHighlightWarningFeature(_ref) {
|
|
7224
|
+
var view = _ref.view,
|
|
7225
|
+
warningDialogFeatures = _ref.warningDialogFeatures,
|
|
7226
|
+
srs = _ref.srs,
|
|
7227
|
+
mapId = _ref.mapId;
|
|
7228
|
+
var dispatch = useDispatch();
|
|
7229
|
+
useEffect(function () {
|
|
7230
|
+
var _warningDialogFeature, _geoJsonFeature$prope, _warningDialogFeature2, _geoJsonFeature$bbox;
|
|
7231
|
+
if (!view || !(warningDialogFeatures != null && warningDialogFeatures.length) || !srs) {
|
|
7232
|
+
return;
|
|
7233
|
+
}
|
|
7234
|
+
var geoJsonFeature = (_warningDialogFeature = warningDialogFeatures[0]) == null || (_warningDialogFeature = _warningDialogFeature.geoJSON) == null || (_warningDialogFeature = _warningDialogFeature.features) == null ? void 0 : _warningDialogFeature[0];
|
|
7235
|
+
var warningLevel = geoJsonFeature == null || (_geoJsonFeature$prope = geoJsonFeature.properties) == null ? void 0 : _geoJsonFeature$prope.warningLevel;
|
|
7236
|
+
var isAviationWarning = warningLevel === 'SIG' || warningLevel === 'AIR';
|
|
7237
|
+
if (!geoJsonFeature) {
|
|
7238
|
+
return;
|
|
7239
|
+
}
|
|
7240
|
+
var warningDialogFeature = new GeoJSON().readFeature(geoJsonFeature, {
|
|
7241
|
+
featureProjection: srs
|
|
7242
|
+
});
|
|
7243
|
+
var geometry = Array.isArray(warningDialogFeature) ? (_warningDialogFeature2 = warningDialogFeature[0]) == null ? void 0 : _warningDialogFeature2.getGeometry() : warningDialogFeature.getGeometry();
|
|
7244
|
+
if (!geometry) {
|
|
7245
|
+
return;
|
|
7246
|
+
}
|
|
7247
|
+
var featureExtent = (_geoJsonFeature$bbox = geoJsonFeature.bbox) != null ? _geoJsonFeature$bbox : geometry.getExtent();
|
|
7248
|
+
var currentExtent = view.calculateExtent();
|
|
7249
|
+
var intersection = getIntersection(currentExtent, featureExtent);
|
|
7250
|
+
var isCompletelyOutside = !intersection || intersection[0] >= intersection[2] || intersection[1] >= intersection[3];
|
|
7251
|
+
var shouldPan = false;
|
|
7252
|
+
if (isCompletelyOutside) {
|
|
7253
|
+
shouldPan = true;
|
|
7254
|
+
} else {
|
|
7255
|
+
var featureArea = (featureExtent[2] - featureExtent[0]) * (featureExtent[3] - featureExtent[1]);
|
|
7256
|
+
var visibleArea = (intersection[2] - intersection[0]) * (intersection[3] - intersection[1]);
|
|
7257
|
+
var visibleRatio = visibleArea / featureArea;
|
|
7258
|
+
shouldPan = visibleRatio <= 0.5;
|
|
7259
|
+
}
|
|
7260
|
+
if (shouldPan) {
|
|
7261
|
+
view.fit(featureExtent, {
|
|
7262
|
+
duration: 500,
|
|
7263
|
+
padding: [40, 40, 40, 40],
|
|
7264
|
+
maxZoom: 5
|
|
7265
|
+
});
|
|
7266
|
+
}
|
|
7267
|
+
if (!isAviationWarning) {
|
|
7268
|
+
dispatch(layerActions.addLayer({
|
|
7269
|
+
mapId: mapId,
|
|
7270
|
+
layer: {
|
|
7271
|
+
geojson: {
|
|
7272
|
+
type: 'FeatureCollection',
|
|
7273
|
+
features: [geoJsonFeature]
|
|
7274
|
+
},
|
|
7275
|
+
layerType: LayerType.featureLayer
|
|
7276
|
+
},
|
|
7277
|
+
layerId: 'highlight-layer',
|
|
7278
|
+
origin: 'OlMapViewConnect'
|
|
7279
|
+
}));
|
|
7280
|
+
// eslint-disable-next-line consistent-return
|
|
7281
|
+
return function () {
|
|
7282
|
+
dispatch(layerActions.layerDelete({
|
|
7283
|
+
mapId: mapId,
|
|
7284
|
+
layerId: 'highlight-layer'
|
|
7285
|
+
}));
|
|
7286
|
+
};
|
|
7287
|
+
}
|
|
7288
|
+
}, [view, warningDialogFeatures, srs, dispatch, mapId]);
|
|
7289
|
+
}
|
|
7257
7290
|
|
|
7258
7291
|
var OlMapViewLayerConnect = function OlMapViewLayerConnect(layerProps) {
|
|
7259
7292
|
var layerId = layerProps.layerId,
|
|
@@ -7381,10 +7414,24 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7381
7414
|
var featureLayers = useSelector(function (store) {
|
|
7382
7415
|
return mapSelectors.getMapFeatureLayers(store, mapId);
|
|
7383
7416
|
});
|
|
7417
|
+
var _useSelector = useSelector(function (state) {
|
|
7418
|
+
return genericSelectors.selectSharedData(state, 'warning-dialog');
|
|
7419
|
+
}),
|
|
7420
|
+
warningDialogFeatures = _useSelector.features;
|
|
7421
|
+
var warningDialogOriginalIds = React.useMemo(function () {
|
|
7422
|
+
return warningDialogFeatures == null ? void 0 : warningDialogFeatures.map(function (feature) {
|
|
7423
|
+
return feature.originalId;
|
|
7424
|
+
});
|
|
7425
|
+
}, [warningDialogFeatures]);
|
|
7384
7426
|
var linkedFeaturesFromState = useSelector(function (store) {
|
|
7385
7427
|
var _store$syncGroups;
|
|
7386
7428
|
return genericSelectors.selectLinkedFeatures((_store$syncGroups = store.syncGroups) == null ? void 0 : _store$syncGroups.linkedState, mapId);
|
|
7387
7429
|
});
|
|
7430
|
+
var filteredLinkedFeaturesFromState = React.useMemo(function () {
|
|
7431
|
+
return linkedFeaturesFromState.filter(function (feature) {
|
|
7432
|
+
return !(warningDialogOriginalIds != null && warningDialogOriginalIds.includes(feature.originalId));
|
|
7433
|
+
});
|
|
7434
|
+
}, [linkedFeaturesFromState, warningDialogOriginalIds]);
|
|
7388
7435
|
var linkedFormFeaturesFromState = useSelector(function (store) {
|
|
7389
7436
|
var _store$syncGroups2;
|
|
7390
7437
|
return genericSelectors.selectLinkedFormFeatures((_store$syncGroups2 = store.syncGroups) == null ? void 0 : _store$syncGroups2.linkedState, mapId);
|
|
@@ -7392,7 +7439,7 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7392
7439
|
var linkedFeatures = React.useMemo(function () {
|
|
7393
7440
|
return {
|
|
7394
7441
|
type: 'FeatureCollection',
|
|
7395
|
-
features:
|
|
7442
|
+
features: filteredLinkedFeaturesFromState.flatMap(function (feature) {
|
|
7396
7443
|
return feature.geoJSON.features.map(function (geoFeature) {
|
|
7397
7444
|
return Object.assign({}, geoFeature, {
|
|
7398
7445
|
properties: Object.assign({}, geoFeature.properties, {
|
|
@@ -7402,7 +7449,7 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7402
7449
|
});
|
|
7403
7450
|
})
|
|
7404
7451
|
};
|
|
7405
|
-
}, [
|
|
7452
|
+
}, [filteredLinkedFeaturesFromState]);
|
|
7406
7453
|
var linkedFormFeatures = React.useMemo(function () {
|
|
7407
7454
|
return {
|
|
7408
7455
|
type: 'FeatureCollection',
|
|
@@ -7681,6 +7728,12 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7681
7728
|
}
|
|
7682
7729
|
return style;
|
|
7683
7730
|
}, [isSearchDialogOpen]);
|
|
7731
|
+
useFitAndHighlightWarningFeature({
|
|
7732
|
+
view: view,
|
|
7733
|
+
warningDialogFeatures: warningDialogFeatures,
|
|
7734
|
+
srs: srs,
|
|
7735
|
+
mapId: mapId
|
|
7736
|
+
});
|
|
7684
7737
|
var combinedLinkedFeatures = React.useMemo(function () {
|
|
7685
7738
|
return {
|
|
7686
7739
|
type: 'FeatureCollection',
|
|
@@ -8183,14 +8236,12 @@ var NowButtonConnect = function NowButtonConnect(_ref) {
|
|
|
8183
8236
|
* Expects the following props:
|
|
8184
8237
|
* @param {string} mapId mapId: string - Id of the map
|
|
8185
8238
|
* @param {string} sourceId mapId: string - Id of the source
|
|
8186
|
-
* @param {boolean} isVisible mapId: boolean - Whether the time slider is visible or not
|
|
8187
8239
|
* @example
|
|
8188
|
-
* ``` <TimeSliderButtonsConnect mapId={mapId} sourceId={sourceId}
|
|
8240
|
+
* ``` <TimeSliderButtonsConnect mapId={mapId} sourceId={sourceId} />```
|
|
8189
8241
|
*/
|
|
8190
8242
|
var TimeSliderButtonsConnectComponent = function TimeSliderButtonsConnectComponent(_ref) {
|
|
8191
8243
|
var sourceId = _ref.sourceId,
|
|
8192
|
-
mapId = _ref.mapId
|
|
8193
|
-
isVisible = _ref.isVisible;
|
|
8244
|
+
mapId = _ref.mapId;
|
|
8194
8245
|
return jsx(TimeSliderButtons, {
|
|
8195
8246
|
nowBtn: jsx(NowButtonConnect, {
|
|
8196
8247
|
mapId: mapId,
|
|
@@ -8212,8 +8263,7 @@ var TimeSliderButtonsConnectComponent = function TimeSliderButtonsConnectCompone
|
|
|
8212
8263
|
forwardBtn: jsx(BackwardForwardStepButtonConnect, {
|
|
8213
8264
|
mapId: mapId,
|
|
8214
8265
|
isForwardStep: true
|
|
8215
|
-
})
|
|
8216
|
-
isVisible: isVisible
|
|
8266
|
+
})
|
|
8217
8267
|
});
|
|
8218
8268
|
};
|
|
8219
8269
|
var TimeSliderButtonsConnect = /*#__PURE__*/React.memo(TimeSliderButtonsConnectComponent);
|
|
@@ -8682,7 +8732,6 @@ var TimeSliderConnect = function TimeSliderConnect(_ref) {
|
|
|
8682
8732
|
},
|
|
8683
8733
|
selectedTime: selectedTime,
|
|
8684
8734
|
buttons: jsx(TimeSliderButtonsConnect, {
|
|
8685
|
-
isVisible: isVisible,
|
|
8686
8735
|
mapId: mapId,
|
|
8687
8736
|
sourceId: sourceId
|
|
8688
8737
|
}),
|
|
@@ -8940,79 +8989,50 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
8940
8989
|
return jsxs(Box, {
|
|
8941
8990
|
ref: mapWindowRef,
|
|
8942
8991
|
sx: {
|
|
8992
|
+
width: '100%',
|
|
8993
|
+
height: '100%',
|
|
8943
8994
|
position: 'relative',
|
|
8944
|
-
|
|
8945
|
-
display: 'flex'
|
|
8995
|
+
overflow: 'hidden'
|
|
8946
8996
|
},
|
|
8947
8997
|
"data-testid": "ConfigurableMap",
|
|
8948
8998
|
children: [title && jsx(Typography, {
|
|
8949
8999
|
"data-testid": "mapTitle",
|
|
8950
9000
|
sx: titleStyle,
|
|
8951
9001
|
children: title
|
|
8952
|
-
}), jsxs(Box, {
|
|
8953
|
-
sx: {
|
|
8954
|
-
flex: '1'
|
|
8955
|
-
},
|
|
8956
|
-
children: [useOl ? jsx(OlMapViewConnect, {
|
|
8957
|
-
controls: mapControlConfig,
|
|
8958
|
-
displayTimeInMap: displayTimeInMap,
|
|
8959
|
-
showScaleBar: false,
|
|
8960
|
-
shouldAutoFetch: shouldAutoFetch,
|
|
8961
|
-
mapId: mapId,
|
|
8962
|
-
initialBbox: initialBbox,
|
|
8963
|
-
shouldDisablePrefetching: shouldDisablePrefetching,
|
|
8964
|
-
tileServerSettings: tileServerSettings,
|
|
8965
|
-
children: children
|
|
8966
|
-
}) : jsx(MapViewConnect, {
|
|
8967
|
-
controls: mapControlConfig,
|
|
8968
|
-
displayTimeInMap: displayTimeInMap,
|
|
8969
|
-
showScaleBar: false,
|
|
8970
|
-
shouldAutoFetch: shouldAutoFetch,
|
|
8971
|
-
mapId: mapId,
|
|
8972
|
-
shouldDisablePrefetching: shouldDisablePrefetching,
|
|
8973
|
-
tileServerSettings: tileServerSettings,
|
|
8974
|
-
children: children
|
|
8975
|
-
}), showClock && jsx(TimeSliderClockConnect, {
|
|
8976
|
-
mapId: mapId
|
|
8977
|
-
})]
|
|
8978
9002
|
}), !disableTimeSlider && jsx(Box, {
|
|
8979
9003
|
sx: {
|
|
8980
9004
|
position: 'absolute',
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
xs: '125px',
|
|
8986
|
-
sm: '100px',
|
|
8987
|
-
md: '80px'
|
|
8988
|
-
},
|
|
8989
|
-
paddingLeft: {
|
|
8990
|
-
xs: '40px',
|
|
8991
|
-
md: 'env(safe-area-inset-right)'
|
|
8992
|
-
},
|
|
8993
|
-
bottom: {
|
|
8994
|
-
xs: 'max(5px, 7dvh)',
|
|
8995
|
-
sm: 'max(5px, 6dvh)',
|
|
8996
|
-
md: 'max(5px, 6dvh)',
|
|
8997
|
-
xl: 'max(5px, 4dvh)'
|
|
8998
|
-
}
|
|
8999
|
-
},
|
|
9000
|
-
'@media screen and (orientation: portrait)': {
|
|
9001
|
-
minHeight: {
|
|
9002
|
-
xs: '110px',
|
|
9003
|
-
sm: '100px',
|
|
9004
|
-
md: '80px'
|
|
9005
|
-
},
|
|
9006
|
-
bottom: 'max(5px, 6dvh)',
|
|
9007
|
-
paddingLeft: 'env(safe-area-inset-left)'
|
|
9008
|
-
},
|
|
9009
|
-
zIndex: 1000
|
|
9005
|
+
left: '0px',
|
|
9006
|
+
bottom: '0px',
|
|
9007
|
+
zIndex: 1000,
|
|
9008
|
+
width: '100%'
|
|
9010
9009
|
},
|
|
9011
9010
|
children: jsx(TimeSliderConnect, {
|
|
9012
9011
|
mapId: id,
|
|
9013
9012
|
sourceId: id,
|
|
9014
9013
|
mapWindowRef: mapWindowRef
|
|
9015
9014
|
})
|
|
9015
|
+
}), useOl ? jsx(OlMapViewConnect, {
|
|
9016
|
+
controls: mapControlConfig,
|
|
9017
|
+
displayTimeInMap: displayTimeInMap,
|
|
9018
|
+
showScaleBar: false,
|
|
9019
|
+
shouldAutoFetch: shouldAutoFetch,
|
|
9020
|
+
mapId: mapId,
|
|
9021
|
+
initialBbox: initialBbox,
|
|
9022
|
+
shouldDisablePrefetching: shouldDisablePrefetching,
|
|
9023
|
+
tileServerSettings: tileServerSettings,
|
|
9024
|
+
children: children
|
|
9025
|
+
}) : jsx(MapViewConnect, {
|
|
9026
|
+
controls: mapControlConfig,
|
|
9027
|
+
displayTimeInMap: displayTimeInMap,
|
|
9028
|
+
showScaleBar: false,
|
|
9029
|
+
shouldAutoFetch: shouldAutoFetch,
|
|
9030
|
+
mapId: mapId,
|
|
9031
|
+
shouldDisablePrefetching: shouldDisablePrefetching,
|
|
9032
|
+
tileServerSettings: tileServerSettings,
|
|
9033
|
+
children: children
|
|
9034
|
+
}), showClock && jsx(TimeSliderClockConnect, {
|
|
9035
|
+
mapId: mapId
|
|
9016
9036
|
})]
|
|
9017
9037
|
});
|
|
9018
9038
|
}, [mapId, title, id, useOl, initialBbox, mapControlConfig, tileServerSettings, disableTimeSlider, displayTimeInMap, shouldAutoFetch, shouldDisablePrefetching, children, showClock]);
|
|
@@ -10156,4 +10176,4 @@ var LanguageSelect = function LanguageSelect(_ref) {
|
|
|
10156
10176
|
});
|
|
10157
10177
|
};
|
|
10158
10178
|
|
|
10159
|
-
export { CORE_NAMESPACE, ConfigurableMapConnect, CoreI18nProvider, CoreStoreProvider, 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, LocationSearch, LocationSearchConnect, MapViewConnect, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, MyMapLocation, OlMapViewConnect, RouterWrapperConnect, SearchControlButtonConnect, SentryRecordButton, SyncGroupViewerConnect, TimeSliderConnect, ZoomControlConnect, componentsLookUp, coreTranslations, defaultBbox, defaultConfigurations, filterMapPresets, filterServices, filterTimeSeriesServices, getCenterOfLinkedFeature, getLanguageFromLocalStorage, languageLocalStorageKey, makeLayerInfoPayload, makePrefetchTimeSpan, saveLanguageToLocalStorage, testLayers, useFetchServices, useUpdateTimeSpan, useUpdateTimestep };
|
|
10179
|
+
export { CORE_NAMESPACE, ConfigurableMapConnect, CoreI18nProvider, CoreStoreProvider, 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, LocationSearch, LocationSearchConnect, MapViewConnect, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, MyMapLocation, OlMapViewConnect, RouterWrapperConnect, SearchControlButtonConnect, SentryRecordButton, SyncGroupViewerConnect, TimeSliderConnect, ZoomControlConnect, componentsLookUp, coreTranslations, defaultBbox, defaultConfigurations, filterMapPresets, filterServices, filterTimeSeriesServices, getCenterOfLinkedFeature, getLanguageFromLocalStorage, languageLocalStorageKey, makeLayerInfoPayload, makePrefetchTimeSpan, saveLanguageToLocalStorage, testLayers, useFetchServices, useFitAndHighlightWarningFeature, useUpdateTimeSpan, useUpdateTimestep };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/core",
|
|
3
|
-
"version": "12.4.
|
|
3
|
+
"version": "12.4.2",
|
|
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": "12.4.
|
|
11
|
+
"@opengeoweb/shared": "12.4.2",
|
|
12
12
|
"react-redux": "^9.2.0",
|
|
13
|
-
"@opengeoweb/store": "12.4.
|
|
14
|
-
"@opengeoweb/timeslider": "12.4.
|
|
13
|
+
"@opengeoweb/store": "12.4.2",
|
|
14
|
+
"@opengeoweb/timeslider": "12.4.2",
|
|
15
15
|
"@reduxjs/toolkit": "^2.6.1",
|
|
16
|
-
"@opengeoweb/webmap-react": "12.4.
|
|
17
|
-
"@opengeoweb/webmap": "12.4.
|
|
18
|
-
"@opengeoweb/theme": "12.4.
|
|
16
|
+
"@opengeoweb/webmap-react": "12.4.2",
|
|
17
|
+
"@opengeoweb/webmap": "12.4.2",
|
|
18
|
+
"@opengeoweb/theme": "12.4.2",
|
|
19
19
|
"axios": "^1.7.7",
|
|
20
|
-
"@opengeoweb/layer-select": "12.4.
|
|
20
|
+
"@opengeoweb/layer-select": "12.4.2",
|
|
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.0.1",
|
|
26
|
-
"@opengeoweb/snackbar": "12.4.
|
|
26
|
+
"@opengeoweb/snackbar": "12.4.2",
|
|
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.69.2",
|
|
35
|
-
"@opengeoweb/api": "12.4.
|
|
35
|
+
"@opengeoweb/api": "12.4.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "18",
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { TimeSliderStartCenterEndTime } from '@opengeoweb/store';
|
|
2
2
|
import { Dimension } from '@opengeoweb/webmap';
|
|
3
3
|
import { MapLocation, OnInitializeLayerProps, TimeContextType, UpdateLayerInfoPayload } from '@opengeoweb/webmap-react';
|
|
4
|
-
import { Feature } from 'ol';
|
|
4
|
+
import { Feature, View } from 'ol';
|
|
5
5
|
export declare const makePrefetchTimeSpan: (timeSliderStartCenterEndTime: TimeSliderStartCenterEndTime, animationStartTime: string | undefined, animationEndTime: string | undefined, isAnimating: boolean) => TimeContextType;
|
|
6
6
|
export declare const makeLayerInfoPayload: (payload: OnInitializeLayerProps, mapDimensions: Dimension[], mapId: string) => UpdateLayerInfoPayload;
|
|
7
7
|
export declare const getCenterOfLinkedFeature: (feature: Feature | undefined, srs: string) => MapLocation | null;
|
|
8
|
+
interface UseFitAndHighlightWarningFeatureOptions {
|
|
9
|
+
view: View | undefined;
|
|
10
|
+
warningDialogFeatures?: {
|
|
11
|
+
id: string;
|
|
12
|
+
originalId?: string;
|
|
13
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
14
|
+
}[];
|
|
15
|
+
srs: string | undefined;
|
|
16
|
+
mapId: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function useFitAndHighlightWarningFeature({ view, warningDialogFeatures, srs, mapId, }: UseFitAndHighlightWarningFeatureOptions): void;
|
|
19
|
+
export {};
|
|
@@ -2,7 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
interface TimeSliderButtonsConnectProps {
|
|
3
3
|
sourceId: string;
|
|
4
4
|
mapId: string;
|
|
5
|
-
isVisible: boolean | undefined;
|
|
6
5
|
}
|
|
7
6
|
export declare const TimeSliderButtonsConnect: React.NamedExoticComponent<TimeSliderButtonsConnectProps>;
|
|
8
7
|
export {};
|