@opengeoweb/core 12.4.1 → 12.5.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,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,
|
|
@@ -7358,7 +7391,8 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7358
7391
|
} : _ref$controls,
|
|
7359
7392
|
initialBbox = _ref.initialBbox,
|
|
7360
7393
|
holdShiftToScroll = _ref.holdShiftToScroll,
|
|
7361
|
-
source = _ref.source
|
|
7394
|
+
source = _ref.source,
|
|
7395
|
+
tileServerSettings = _ref.tileServerSettings;
|
|
7362
7396
|
var store = useStore();
|
|
7363
7397
|
var mapRef = React.useRef(null);
|
|
7364
7398
|
var _useGetOpenLayersView = useGetOpenLayersView(mapId, store),
|
|
@@ -7381,10 +7415,24 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7381
7415
|
var featureLayers = useSelector(function (store) {
|
|
7382
7416
|
return mapSelectors.getMapFeatureLayers(store, mapId);
|
|
7383
7417
|
});
|
|
7418
|
+
var _useSelector = useSelector(function (state) {
|
|
7419
|
+
return genericSelectors.selectSharedData(state, 'warning-dialog');
|
|
7420
|
+
}),
|
|
7421
|
+
warningDialogFeatures = _useSelector.features;
|
|
7422
|
+
var warningDialogOriginalIds = React.useMemo(function () {
|
|
7423
|
+
return warningDialogFeatures == null ? void 0 : warningDialogFeatures.map(function (feature) {
|
|
7424
|
+
return feature.originalId;
|
|
7425
|
+
});
|
|
7426
|
+
}, [warningDialogFeatures]);
|
|
7384
7427
|
var linkedFeaturesFromState = useSelector(function (store) {
|
|
7385
7428
|
var _store$syncGroups;
|
|
7386
7429
|
return genericSelectors.selectLinkedFeatures((_store$syncGroups = store.syncGroups) == null ? void 0 : _store$syncGroups.linkedState, mapId);
|
|
7387
7430
|
});
|
|
7431
|
+
var filteredLinkedFeaturesFromState = React.useMemo(function () {
|
|
7432
|
+
return linkedFeaturesFromState.filter(function (feature) {
|
|
7433
|
+
return !(warningDialogOriginalIds != null && warningDialogOriginalIds.includes(feature.originalId));
|
|
7434
|
+
});
|
|
7435
|
+
}, [linkedFeaturesFromState, warningDialogOriginalIds]);
|
|
7388
7436
|
var linkedFormFeaturesFromState = useSelector(function (store) {
|
|
7389
7437
|
var _store$syncGroups2;
|
|
7390
7438
|
return genericSelectors.selectLinkedFormFeatures((_store$syncGroups2 = store.syncGroups) == null ? void 0 : _store$syncGroups2.linkedState, mapId);
|
|
@@ -7392,7 +7440,7 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7392
7440
|
var linkedFeatures = React.useMemo(function () {
|
|
7393
7441
|
return {
|
|
7394
7442
|
type: 'FeatureCollection',
|
|
7395
|
-
features:
|
|
7443
|
+
features: filteredLinkedFeaturesFromState.flatMap(function (feature) {
|
|
7396
7444
|
return feature.geoJSON.features.map(function (geoFeature) {
|
|
7397
7445
|
return Object.assign({}, geoFeature, {
|
|
7398
7446
|
properties: Object.assign({}, geoFeature.properties, {
|
|
@@ -7402,7 +7450,7 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7402
7450
|
});
|
|
7403
7451
|
})
|
|
7404
7452
|
};
|
|
7405
|
-
}, [
|
|
7453
|
+
}, [filteredLinkedFeaturesFromState]);
|
|
7406
7454
|
var linkedFormFeatures = React.useMemo(function () {
|
|
7407
7455
|
return {
|
|
7408
7456
|
type: 'FeatureCollection',
|
|
@@ -7681,6 +7729,12 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7681
7729
|
}
|
|
7682
7730
|
return style;
|
|
7683
7731
|
}, [isSearchDialogOpen]);
|
|
7732
|
+
useFitAndHighlightWarningFeature({
|
|
7733
|
+
view: view,
|
|
7734
|
+
warningDialogFeatures: warningDialogFeatures,
|
|
7735
|
+
srs: srs,
|
|
7736
|
+
mapId: mapId
|
|
7737
|
+
});
|
|
7684
7738
|
var combinedLinkedFeatures = React.useMemo(function () {
|
|
7685
7739
|
return {
|
|
7686
7740
|
type: 'FeatureCollection',
|
|
@@ -7700,7 +7754,8 @@ var OlMapViewConnect = function OlMapViewConnect(_ref) {
|
|
|
7700
7754
|
children: [baseLayers.map(function (layer, zIndex) {
|
|
7701
7755
|
return jsx(OpenLayersLayer, Object.assign({
|
|
7702
7756
|
id: "baselayer-" + (layer == null ? void 0 : layer.id),
|
|
7703
|
-
zIndex: baseLayers.length - zIndex + 10
|
|
7757
|
+
zIndex: baseLayers.length - zIndex + 10,
|
|
7758
|
+
tileServerSettings: tileServerSettings
|
|
7704
7759
|
}, layer), "baselayer-" + (layer == null ? void 0 : layer.id));
|
|
7705
7760
|
}), mapLayerIds.map(function (layerId, zIndex) {
|
|
7706
7761
|
return jsx(OlMapViewLayerConnect, {
|
|
@@ -8183,14 +8238,12 @@ var NowButtonConnect = function NowButtonConnect(_ref) {
|
|
|
8183
8238
|
* Expects the following props:
|
|
8184
8239
|
* @param {string} mapId mapId: string - Id of the map
|
|
8185
8240
|
* @param {string} sourceId mapId: string - Id of the source
|
|
8186
|
-
* @param {boolean} isVisible mapId: boolean - Whether the time slider is visible or not
|
|
8187
8241
|
* @example
|
|
8188
|
-
* ``` <TimeSliderButtonsConnect mapId={mapId} sourceId={sourceId}
|
|
8242
|
+
* ``` <TimeSliderButtonsConnect mapId={mapId} sourceId={sourceId} />```
|
|
8189
8243
|
*/
|
|
8190
8244
|
var TimeSliderButtonsConnectComponent = function TimeSliderButtonsConnectComponent(_ref) {
|
|
8191
8245
|
var sourceId = _ref.sourceId,
|
|
8192
|
-
mapId = _ref.mapId
|
|
8193
|
-
isVisible = _ref.isVisible;
|
|
8246
|
+
mapId = _ref.mapId;
|
|
8194
8247
|
return jsx(TimeSliderButtons, {
|
|
8195
8248
|
nowBtn: jsx(NowButtonConnect, {
|
|
8196
8249
|
mapId: mapId,
|
|
@@ -8212,8 +8265,7 @@ var TimeSliderButtonsConnectComponent = function TimeSliderButtonsConnectCompone
|
|
|
8212
8265
|
forwardBtn: jsx(BackwardForwardStepButtonConnect, {
|
|
8213
8266
|
mapId: mapId,
|
|
8214
8267
|
isForwardStep: true
|
|
8215
|
-
})
|
|
8216
|
-
isVisible: isVisible
|
|
8268
|
+
})
|
|
8217
8269
|
});
|
|
8218
8270
|
};
|
|
8219
8271
|
var TimeSliderButtonsConnect = /*#__PURE__*/React.memo(TimeSliderButtonsConnectComponent);
|
|
@@ -8682,7 +8734,6 @@ var TimeSliderConnect = function TimeSliderConnect(_ref) {
|
|
|
8682
8734
|
},
|
|
8683
8735
|
selectedTime: selectedTime,
|
|
8684
8736
|
buttons: jsx(TimeSliderButtonsConnect, {
|
|
8685
|
-
isVisible: isVisible,
|
|
8686
8737
|
mapId: mapId,
|
|
8687
8738
|
sourceId: sourceId
|
|
8688
8739
|
}),
|
|
@@ -8940,79 +8991,50 @@ var ConfigurableMapConnect = function ConfigurableMapConnect(_ref) {
|
|
|
8940
8991
|
return jsxs(Box, {
|
|
8941
8992
|
ref: mapWindowRef,
|
|
8942
8993
|
sx: {
|
|
8994
|
+
width: '100%',
|
|
8995
|
+
height: '100%',
|
|
8943
8996
|
position: 'relative',
|
|
8944
|
-
|
|
8945
|
-
display: 'flex'
|
|
8997
|
+
overflow: 'hidden'
|
|
8946
8998
|
},
|
|
8947
8999
|
"data-testid": "ConfigurableMap",
|
|
8948
9000
|
children: [title && jsx(Typography, {
|
|
8949
9001
|
"data-testid": "mapTitle",
|
|
8950
9002
|
sx: titleStyle,
|
|
8951
9003
|
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
9004
|
}), !disableTimeSlider && jsx(Box, {
|
|
8979
9005
|
sx: {
|
|
8980
9006
|
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
|
|
9007
|
+
left: '0px',
|
|
9008
|
+
bottom: '0px',
|
|
9009
|
+
zIndex: 1000,
|
|
9010
|
+
width: '100%'
|
|
9010
9011
|
},
|
|
9011
9012
|
children: jsx(TimeSliderConnect, {
|
|
9012
9013
|
mapId: id,
|
|
9013
9014
|
sourceId: id,
|
|
9014
9015
|
mapWindowRef: mapWindowRef
|
|
9015
9016
|
})
|
|
9017
|
+
}), useOl ? jsx(OlMapViewConnect, {
|
|
9018
|
+
controls: mapControlConfig,
|
|
9019
|
+
displayTimeInMap: displayTimeInMap,
|
|
9020
|
+
showScaleBar: false,
|
|
9021
|
+
shouldAutoFetch: shouldAutoFetch,
|
|
9022
|
+
mapId: mapId,
|
|
9023
|
+
initialBbox: initialBbox,
|
|
9024
|
+
shouldDisablePrefetching: shouldDisablePrefetching,
|
|
9025
|
+
tileServerSettings: tileServerSettings,
|
|
9026
|
+
children: children
|
|
9027
|
+
}) : jsx(MapViewConnect, {
|
|
9028
|
+
controls: mapControlConfig,
|
|
9029
|
+
displayTimeInMap: displayTimeInMap,
|
|
9030
|
+
showScaleBar: false,
|
|
9031
|
+
shouldAutoFetch: shouldAutoFetch,
|
|
9032
|
+
mapId: mapId,
|
|
9033
|
+
shouldDisablePrefetching: shouldDisablePrefetching,
|
|
9034
|
+
tileServerSettings: tileServerSettings,
|
|
9035
|
+
children: children
|
|
9036
|
+
}), showClock && jsx(TimeSliderClockConnect, {
|
|
9037
|
+
mapId: mapId
|
|
9016
9038
|
})]
|
|
9017
9039
|
});
|
|
9018
9040
|
}, [mapId, title, id, useOl, initialBbox, mapControlConfig, tileServerSettings, disableTimeSlider, displayTimeInMap, shouldAutoFetch, shouldDisablePrefetching, children, showClock]);
|
|
@@ -10156,4 +10178,4 @@ var LanguageSelect = function LanguageSelect(_ref) {
|
|
|
10156
10178
|
});
|
|
10157
10179
|
};
|
|
10158
10180
|
|
|
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 };
|
|
10181
|
+
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, useGetOpenLayersView, useUpdateTimeSpan, useUpdateTimestep };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/core",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.5.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": "12.
|
|
11
|
+
"@opengeoweb/shared": "12.5.0",
|
|
12
12
|
"react-redux": "^9.2.0",
|
|
13
|
-
"@opengeoweb/store": "12.
|
|
14
|
-
"@opengeoweb/timeslider": "12.
|
|
13
|
+
"@opengeoweb/store": "12.5.0",
|
|
14
|
+
"@opengeoweb/timeslider": "12.5.0",
|
|
15
15
|
"@reduxjs/toolkit": "^2.6.1",
|
|
16
|
-
"@opengeoweb/webmap-react": "12.
|
|
17
|
-
"@opengeoweb/webmap": "12.
|
|
18
|
-
"@opengeoweb/theme": "12.
|
|
16
|
+
"@opengeoweb/webmap-react": "12.5.0",
|
|
17
|
+
"@opengeoweb/webmap": "12.5.0",
|
|
18
|
+
"@opengeoweb/theme": "12.5.0",
|
|
19
19
|
"axios": "^1.7.7",
|
|
20
|
-
"@opengeoweb/layer-select": "12.
|
|
20
|
+
"@opengeoweb/layer-select": "12.5.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.0.1",
|
|
26
|
-
"@opengeoweb/snackbar": "12.
|
|
26
|
+
"@opengeoweb/snackbar": "12.5.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.69.2",
|
|
35
|
-
"@opengeoweb/api": "12.
|
|
35
|
+
"@opengeoweb/api": "12.5.0"
|
|
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 {};
|