@opengeoweb/soundings 21.2.0 → 21.3.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/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Stack, Box, Tooltip, Typography, styled, Menu, ListSubheader, MenuItem,
|
|
|
3
3
|
import { range, isEqual } from 'lodash';
|
|
4
4
|
import React, { useMemo, useRef, useEffect, useId, useCallback, useState, Fragment as Fragment$1 } from 'react';
|
|
5
5
|
import { useDispatch, useSelector, shallowEqual } from 'react-redux';
|
|
6
|
-
import { dateUtils, referenceTimeUtils, safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, SwitchButton, CustomToggleButton, LegendToggleButton, ResizablePanel, useScrollingInIsolation, CustomSlider, SortablePanels, AlertBanner, ToolContainerDraggable, TooltipSelect, AlertIcon, useResizeObserver, SearchField, CustomAccordion } from '@opengeoweb/shared';
|
|
6
|
+
import { dateUtils, EARTH_MEAN_RADIUS_KM, referenceTimeUtils, safelyInitI18nForTestsAndStories, sharedTranslations, SHARED_NAMESPACE, SwitchButton, CustomToggleButton, LegendToggleButton, ResizablePanel, useScrollingInIsolation, CustomSlider, SortablePanels, AlertBanner, ToolContainerDraggable, TooltipSelect, AlertIcon, useResizeObserver, SearchField, CustomAccordion } from '@opengeoweb/shared';
|
|
7
7
|
import { selectorMemoizationOptions, uiSelectors, uiTypes, uiActions, syncGroupsSelectors, genericActions, useSyncgroupTimeState, useRegisterFeatureSyncSource, genericSelectors, mapSelectors, mapActions, useUpdateFeatureSyncLayers, layerActions, useSetupDialog, storeReducerMap, storeMiddlewares } from '@opengeoweb/store';
|
|
8
8
|
import { Layers, Sources, Location, Equalizer, Close, DragHandle, Visibility, VisibilityOff } from '@opengeoweb/theme';
|
|
9
9
|
import { ParseISOTimeRangeDuration, parseISO8601IntervalToDateInterval, handleDateUtilsISOString, webmapUtils } from '@opengeoweb/webmap';
|
|
@@ -144,7 +144,6 @@ var EPSILON = 0.622;
|
|
|
144
144
|
var R_AIR = 287.04;
|
|
145
145
|
var HEATCP = 1005;
|
|
146
146
|
var REFERENCE_PRESSURE = 1000 * 100; // 1000hPa = 100000Pa
|
|
147
|
-
var EARTH_MEAN_RADIUS = 6371; // [km]
|
|
148
147
|
var MAX_PROXIMITY_RADIUS = 100; // [km]
|
|
149
148
|
var SAME_POINT_DISTANCE_KM = 0.05;
|
|
150
149
|
var SOUNDINGS_CONTAINER_BREAKPOINT_PX = '740px';
|
|
@@ -624,7 +623,7 @@ var degToRad = function degToRad(deg) {
|
|
|
624
623
|
return deg * Math.PI / 180;
|
|
625
624
|
};
|
|
626
625
|
var kmToRad = function kmToRad(km) {
|
|
627
|
-
return km /
|
|
626
|
+
return km / EARTH_MEAN_RADIUS_KM;
|
|
628
627
|
};
|
|
629
628
|
/**
|
|
630
629
|
* Great-circle distance in km between two [lon, lat] points (haversine).
|
|
@@ -635,7 +634,7 @@ var haversineDistanceKm = function haversineDistanceKm(from, to) {
|
|
|
635
634
|
var deltaLatRad = toLatRad - fromLatRad;
|
|
636
635
|
var deltaLonRad = degToRad(to[0] - from[0]);
|
|
637
636
|
var haversineOfCentralAngle = Math.pow(Math.sin(deltaLatRad / 2), 2) + Math.cos(fromLatRad) * Math.cos(toLatRad) * Math.pow(Math.sin(deltaLonRad / 2), 2);
|
|
638
|
-
return 2 *
|
|
637
|
+
return 2 * EARTH_MEAN_RADIUS_KM * Math.asin(Math.min(1, Math.sqrt(haversineOfCentralAngle)));
|
|
639
638
|
};
|
|
640
639
|
var COMPASS_8 = ['N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'];
|
|
641
640
|
/**
|
|
@@ -6270,11 +6269,6 @@ var SoundingsConnect = function SoundingsConnect(_ref) {
|
|
|
6270
6269
|
var ownedFeatureLayerIds = useSelector(function (state) {
|
|
6271
6270
|
return genericSelectors.selectFeatureSyncLayerIdsForPanel(state, viewId);
|
|
6272
6271
|
}, shallowEqual);
|
|
6273
|
-
var linkedPanelIdsByMapId = useSelector(function (state) {
|
|
6274
|
-
return Object.fromEntries(selectedMapIds.map(function (mapId) {
|
|
6275
|
-
return [mapId, genericSelectors.selectLinkedPanelIdsForMap(state, mapId)];
|
|
6276
|
-
}));
|
|
6277
|
-
}, shallowEqual);
|
|
6278
6272
|
var firstLinkedMapId = selectedMapIds[0];
|
|
6279
6273
|
var _useTimesteps = useTimesteps(resolvedSourceSelections),
|
|
6280
6274
|
sourceTimesteps = _useTimesteps.data;
|
|
@@ -6419,28 +6413,22 @@ var SoundingsConnect = function SoundingsConnect(_ref) {
|
|
|
6419
6413
|
selectedMapIds.forEach(function (mapId) {
|
|
6420
6414
|
dispatch(mapActions.toggleMapPinIsVisible({
|
|
6421
6415
|
mapId: mapId,
|
|
6422
|
-
displayMapPin: displayMapPin
|
|
6416
|
+
displayMapPin: displayMapPin,
|
|
6417
|
+
sourceId: viewId
|
|
6423
6418
|
}));
|
|
6424
6419
|
});
|
|
6425
6420
|
};
|
|
6426
6421
|
toggleMapPinVisibility(true);
|
|
6427
6422
|
return function () {
|
|
6428
6423
|
selectedMapIds.forEach(function (mapId) {
|
|
6429
|
-
var _linkedPanelIdsByMapI;
|
|
6430
|
-
var linkedPanelIds = (_linkedPanelIdsByMapI = linkedPanelIdsByMapId[mapId]) != null ? _linkedPanelIdsByMapI : [];
|
|
6431
|
-
var isStillLinkedToAnotherPanel = linkedPanelIds.some(function (panelId) {
|
|
6432
|
-
return panelId !== viewId;
|
|
6433
|
-
});
|
|
6434
|
-
if (isStillLinkedToAnotherPanel) {
|
|
6435
|
-
return;
|
|
6436
|
-
}
|
|
6437
6424
|
dispatch(mapActions.toggleMapPinIsVisible({
|
|
6438
6425
|
mapId: mapId,
|
|
6439
|
-
displayMapPin: false
|
|
6426
|
+
displayMapPin: false,
|
|
6427
|
+
sourceId: viewId
|
|
6440
6428
|
}));
|
|
6441
6429
|
});
|
|
6442
6430
|
};
|
|
6443
|
-
}, [dispatch,
|
|
6431
|
+
}, [dispatch, selectedMapIds, viewId]);
|
|
6444
6432
|
// construct and send geojson to map for drawing locations
|
|
6445
6433
|
var geoJsonForMapRef = React.useRef(undefined);
|
|
6446
6434
|
var geoJsonForMap = useMemo(function () {
|
|
@@ -15,7 +15,6 @@ export declare const EPSILON = 0.622;
|
|
|
15
15
|
export declare const R_AIR = 287.04;
|
|
16
16
|
export declare const HEATCP = 1005;
|
|
17
17
|
export declare const REFERENCE_PRESSURE: number;
|
|
18
|
-
export declare const EARTH_MEAN_RADIUS = 6371;
|
|
19
18
|
export declare const MAX_PROXIMITY_RADIUS = 100;
|
|
20
19
|
export declare const SAME_POINT_DISTANCE_KM = 0.05;
|
|
21
20
|
export declare const SOUNDINGS_CONTAINER_BREAKPOINT_PX = "740px";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/soundings",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.3.0",
|
|
4
4
|
"description": "GeoWeb soundings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,24 +20,24 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/api": "21.
|
|
24
|
-
"@opengeoweb/authentication": "21.
|
|
23
|
+
"@opengeoweb/api": "21.3.0",
|
|
24
|
+
"@opengeoweb/authentication": "21.3.0",
|
|
25
25
|
"@tanstack/react-query": "^5.85.5",
|
|
26
26
|
"d3": "^7.9.0",
|
|
27
27
|
"react-i18next": "^15.1.1",
|
|
28
|
-
"i18next": "^
|
|
29
|
-
"@opengeoweb/shared": "21.
|
|
28
|
+
"i18next": "^26.3.4",
|
|
29
|
+
"@opengeoweb/shared": "21.3.0",
|
|
30
30
|
"@mui/material": "^9.0.1",
|
|
31
|
-
"@opengeoweb/store": "21.
|
|
31
|
+
"@opengeoweb/store": "21.3.0",
|
|
32
32
|
"react-redux": "^9.2.0",
|
|
33
|
-
"@opengeoweb/theme": "21.
|
|
33
|
+
"@opengeoweb/theme": "21.3.0",
|
|
34
34
|
"@reduxjs/toolkit": "^2.6.1",
|
|
35
|
-
"@opengeoweb/time-slider": "21.
|
|
35
|
+
"@opengeoweb/time-slider": "21.3.0",
|
|
36
36
|
"react-window": "^2.2.6",
|
|
37
|
-
"@opengeoweb/webmap": "21.
|
|
37
|
+
"@opengeoweb/webmap": "21.3.0",
|
|
38
38
|
"lodash": "^4.18.1",
|
|
39
39
|
"@types/geojson": "^7946.0.14",
|
|
40
|
-
"@opengeoweb/webmap-react": "21.
|
|
40
|
+
"@opengeoweb/webmap-react": "21.3.0",
|
|
41
41
|
"react-sortablejs": "^6.1.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|