@opengeoweb/soundings 19.2.0 → 19.4.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 +850 -478
- package/dist/src/lib/api/edr-api/api.d.ts +1 -0
- package/dist/src/lib/api/edr-api/hooks.d.ts +2 -1
- package/dist/src/lib/api/edr-api/queryOptions.d.ts +11 -0
- package/dist/src/lib/components/MenuBar/MenuBar.d.ts +3 -1
- package/dist/src/lib/components/MenuBar/SoundingsSourceMenu.d.ts +6 -1
- package/dist/src/lib/components/Soundings/SharedMouseYProvider.d.ts +8 -0
- package/dist/src/lib/components/Soundings/constants.d.ts +2 -0
- package/dist/src/lib/components/Soundings/drawUtils.d.ts +2 -1
- package/dist/src/lib/components/Soundings/useSoundingsDiagramSize.d.ts +1 -1
- package/dist/src/lib/components/SoundingsTooltip/utils.d.ts +4 -2
- package/dist/src/lib/components/StaticLines/drawIsotherms.d.ts +2 -1
- package/dist/src/lib/components/StaticLines/utils.d.ts +2 -1
- package/dist/src/lib/components/WindBarbs/utils.d.ts +2 -1
- package/dist/src/lib/store/reducer.d.ts +2 -1
- package/dist/src/lib/store/selectors.d.ts +21 -0
- package/dist/src/lib/store/types.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Coverage, CoverageCollection, VerticalProfileDomain } from '@opengeoweb/shared';
|
|
2
2
|
import type { CollectionDetails, LocationsResponseFromBE, SoundingsInstance, SoundingsInstances } from './types';
|
|
3
3
|
export declare const getCollectionLocations: (collectionId: string, baseUrl: string) => Promise<LocationsResponseFromBE>;
|
|
4
|
+
export declare const getInstanceLocations: (collectionId: string, instanceId: string, baseUrl: string) => Promise<LocationsResponseFromBE>;
|
|
4
5
|
export declare const getCollectionInstances: (collectionId: string, baseUrl: string) => Promise<SoundingsInstances>;
|
|
5
6
|
export declare const getCollectionDetails: (collectionId: string, baseUrl: string) => Promise<CollectionDetails>;
|
|
6
7
|
export declare const getInstanceDetails: (collectionId: string, instanceId: string, baseUrl: string) => Promise<SoundingsInstance>;
|
|
@@ -40,10 +40,11 @@ export declare const useGetCollectionsInstances: (collections?: SoundingsCollect
|
|
|
40
40
|
isPending: boolean;
|
|
41
41
|
error: Error | null | undefined;
|
|
42
42
|
};
|
|
43
|
-
export declare const
|
|
43
|
+
export declare const useGetLocations: <SoundingsCollectionLike extends {
|
|
44
44
|
id: string;
|
|
45
45
|
url: string;
|
|
46
46
|
name: string;
|
|
47
|
+
instanceId?: string;
|
|
47
48
|
}>(collections: SoundingsCollectionLike[], enabled?: boolean) => {
|
|
48
49
|
data: ServiceWithLocations[] | undefined;
|
|
49
50
|
isPending: boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SoundingsInstances } from './types';
|
|
2
|
+
export declare const soundingsQueryOptions: {
|
|
3
|
+
readonly getCollectionInstances: (collectionId: string, url: string) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<SoundingsInstances, Error, SoundingsInstances, readonly ["edr-soundings-instances", string, string]>, "queryFn"> & {
|
|
4
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<SoundingsInstances, readonly ["edr-soundings-instances", string, string], never> | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
queryKey: readonly ["edr-soundings-instances", string, string] & {
|
|
7
|
+
[dataTagSymbol]: SoundingsInstances;
|
|
8
|
+
[dataTagErrorSymbol]: Error;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -11,6 +11,8 @@ interface SoundingsMenuBarProps {
|
|
|
11
11
|
selectedSourcesAmount?: number;
|
|
12
12
|
shouldHideMarkers: boolean;
|
|
13
13
|
toggleMarkers: (shouldHideMarkers: boolean) => void;
|
|
14
|
+
isLegendVisible: boolean;
|
|
15
|
+
toggleLegend: () => void;
|
|
14
16
|
}
|
|
15
|
-
export declare const SoundingsMenuBar: ({ handleClick, isOpen, selectedSourcesAmount, shouldHideMarkers, toggleMarkers, }: SoundingsMenuBarProps) => React.ReactElement;
|
|
17
|
+
export declare const SoundingsMenuBar: ({ handleClick, isOpen, selectedSourcesAmount, shouldHideMarkers, toggleMarkers, isLegendVisible, toggleLegend, }: SoundingsMenuBarProps) => React.ReactElement;
|
|
16
18
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SourceSelection } from '@opengeoweb/shared';
|
|
3
3
|
import type { SoundingsCollectionsWithInstances } from '../Soundings/types';
|
|
4
|
+
export declare const defaultInstanceId = "latest-0";
|
|
4
5
|
interface SoundingsSourceMenuProps {
|
|
5
6
|
soundingsCollections: SoundingsCollectionsWithInstances[] | undefined;
|
|
6
7
|
isOpen?: boolean;
|
|
@@ -11,6 +12,10 @@ interface SoundingsSourceMenuProps {
|
|
|
11
12
|
order?: number;
|
|
12
13
|
isLoading?: boolean;
|
|
13
14
|
error?: Error | null;
|
|
15
|
+
startSize?: {
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
};
|
|
14
19
|
}
|
|
15
|
-
export declare const SoundingsSourceMenu: ({ soundingsCollections, isOpen, handleClose, updateCollection, sourceSelections, onMouseDown, order, isLoading, error, }: SoundingsSourceMenuProps) => React.ReactElement;
|
|
20
|
+
export declare const SoundingsSourceMenu: ({ soundingsCollections, isOpen, handleClose, updateCollection, sourceSelections, onMouseDown, order, isLoading, error, startSize, }: SoundingsSourceMenuProps) => React.ReactElement;
|
|
16
21
|
export {};
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
interface SharedVerticalZoom {
|
|
3
|
+
scale: number;
|
|
4
|
+
y: number;
|
|
5
|
+
sourceId: string | null;
|
|
6
|
+
}
|
|
2
7
|
interface MouseYCtx {
|
|
3
8
|
clientY: number | null;
|
|
9
|
+
verticalZoom: SharedVerticalZoom;
|
|
10
|
+
publishVerticalZoom: (sourceId: string, scale: number, y: number) => void;
|
|
11
|
+
resetVerticalZoom: (sourceId: string) => void;
|
|
4
12
|
}
|
|
5
13
|
export declare const useSharedMouseY: () => MouseYCtx;
|
|
6
14
|
/**
|
|
@@ -18,3 +18,5 @@ export declare const REFERENCE_PRESSURE: number;
|
|
|
18
18
|
export declare const EARTH_MEAN_RADIUS = 6371;
|
|
19
19
|
export declare const MAX_PROXIMITY_RADIUS = 100;
|
|
20
20
|
export declare const SAME_POINT_DISTANCE_KM = 0.05;
|
|
21
|
+
export declare const SOUNDINGS_CONTAINER_BREAKPOINT_PX = "720px";
|
|
22
|
+
export declare const SOUNDINGS_CONTAINER_NAME = "soundings-container";
|
|
@@ -29,6 +29,7 @@ interface PlotSounding {
|
|
|
29
29
|
pressureValues: number[];
|
|
30
30
|
color: string;
|
|
31
31
|
lineStyle: string;
|
|
32
|
+
d3GraphId: string;
|
|
32
33
|
xScale: ScalesType;
|
|
33
34
|
yScale: ScalesType;
|
|
34
35
|
height: number;
|
|
@@ -40,6 +41,6 @@ export declare const initializeSvg: ({ svgRef, width, height, margin, diagramTyp
|
|
|
40
41
|
export declare const createScales: (diagramType: SoundingDiagramType, width: number, height: number, minPressure: number, maxPressure: number, minTemperature: number, maxTemperature: number) => [ScalesType, ScalesType];
|
|
41
42
|
export declare const drawAxes: ({ svg, xScale, yScale, height, diagramType, }: DrawAxis) => void;
|
|
42
43
|
export declare const mapToPlot: (diagramType: SoundingDiagramType, filteredPressureValues: number[], filteredTemperatureValues: number[], xScale: ScalesType, yScale: ScalesType, height: number) => [number, number][];
|
|
43
|
-
export declare const plotSounding: ({ temperatureValues, pressureValues, color, lineStyle, xScale, yScale, height, svg, diagramType, }: PlotSounding) => void;
|
|
44
|
+
export declare const plotSounding: ({ temperatureValues, pressureValues, color, lineStyle, d3GraphId, xScale, yScale, height, svg, diagramType, }: PlotSounding) => void;
|
|
44
45
|
export declare const filterDomainRangeForParameter: (pressureDomain: number[], parameterDomain: number[]) => [number[], number[]];
|
|
45
46
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const useSoundingsDiagramSize: (ref: React.RefObject<HTMLDivElement | null
|
|
2
|
+
export declare const useSoundingsDiagramSize: (ref: React.RefObject<HTMLDivElement | null>, useWidth?: boolean) => number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as d3 from 'd3';
|
|
2
2
|
import type { SoundingDiagramType, SoundingFeature } from '../../api/edr-api/types';
|
|
3
3
|
import type { Margin } from '../Soundings/drawUtils';
|
|
4
|
+
import type { ScalesType } from '../Soundings/types';
|
|
4
5
|
interface DrawSoundingsTooltipData {
|
|
5
6
|
pressureData: number[];
|
|
6
7
|
interpolatePressure: (value: number) => number;
|
|
@@ -16,10 +17,10 @@ interface DrawSoundingsTooltipProps {
|
|
|
16
17
|
pageY: number;
|
|
17
18
|
clientY: number;
|
|
18
19
|
};
|
|
19
|
-
yScale: d3.ScaleLinear<number, number>;
|
|
20
20
|
svgRectangle: DOMRect;
|
|
21
21
|
margin: Margin;
|
|
22
22
|
width: number;
|
|
23
|
+
hoveredPressure: number;
|
|
23
24
|
pressureRefd3?: d3.Selection<HTMLDivElement | null, unknown, null, undefined>;
|
|
24
25
|
tempRefd3?: d3.Selection<HTMLDivElement | null, unknown, null, undefined>;
|
|
25
26
|
dewpointRefd3?: d3.Selection<HTMLDivElement | null, unknown, null, undefined>;
|
|
@@ -27,5 +28,6 @@ interface DrawSoundingsTooltipProps {
|
|
|
27
28
|
tooltipData: DrawSoundingsTooltipData[];
|
|
28
29
|
diagramType: SoundingDiagramType;
|
|
29
30
|
}
|
|
30
|
-
export declare const
|
|
31
|
+
export declare const extractPressureFromY: (diagramType: SoundingDiagramType, y: number, yScale: ScalesType) => number;
|
|
32
|
+
export declare const drawSoundingsTooltip: ({ event, svgRectangle, hoveredPressure, pressureRefd3, tempRefd3, dewpointRefd3, windRefd3, margin, width, tooltipData, diagramType, }: DrawSoundingsTooltipProps) => void;
|
|
31
33
|
export {};
|
|
@@ -17,7 +17,8 @@ interface DrawIsothermsBijvoetProps {
|
|
|
17
17
|
yScale: ScalesType;
|
|
18
18
|
height: number;
|
|
19
19
|
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
20
|
+
labelSvg?: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
20
21
|
d3GraphId: string;
|
|
21
22
|
}
|
|
22
|
-
export declare const drawIsothermsBijvoet: ({ staticPressureArray, xScale, yScale, svg, height, d3GraphId, }: DrawIsothermsBijvoetProps) => void;
|
|
23
|
+
export declare const drawIsothermsBijvoet: ({ staticPressureArray, xScale, yScale, svg, labelSvg, height, d3GraphId, }: DrawIsothermsBijvoetProps) => void;
|
|
23
24
|
export {};
|
|
@@ -13,7 +13,8 @@ interface DrawStaticLinesProps {
|
|
|
13
13
|
xScale: ScalesType;
|
|
14
14
|
yScale: ScalesType;
|
|
15
15
|
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
16
|
+
bijvoetLabelSvg?: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
16
17
|
d3GraphId: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const drawStaticLines: ({ diagramType, dp, staticPressureArray, minTemperature, maxTemperature, height, width, xScale, yScale, minPressure, maxPressure, svg, d3GraphId, }: DrawStaticLinesProps) => void;
|
|
19
|
+
export declare const drawStaticLines: ({ diagramType, dp, staticPressureArray, minTemperature, maxTemperature, height, width, xScale, yScale, minPressure, maxPressure, svg, bijvoetLabelSvg, d3GraphId, }: DrawStaticLinesProps) => void;
|
|
19
20
|
export {};
|
|
@@ -16,7 +16,8 @@ export interface DrawWindBarbsProps {
|
|
|
16
16
|
margin: Margin;
|
|
17
17
|
barbColor?: string;
|
|
18
18
|
columnOffsetX?: number;
|
|
19
|
+
verticalScale?: number;
|
|
19
20
|
}
|
|
20
|
-
export declare const drawWindBarbs: ({ svgRef, plotGroup, yScale, data, width, margin, barbColor, columnOffsetX, }: DrawWindBarbsProps) => void;
|
|
21
|
+
export declare const drawWindBarbs: ({ svgRef, plotGroup, yScale, data, width, margin, barbColor, columnOffsetX, verticalScale, }: DrawWindBarbsProps) => void;
|
|
21
22
|
export declare const removeItemsExponential: (array: WindDataType[]) => WindDataType[];
|
|
22
23
|
export declare const getWindSymbol: (value: number) => Node | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
2
|
import type { SoundingsCollection } from '@opengeoweb/shared';
|
|
3
|
-
import type { SoundingsState, SoundingsViewState, RegisterSoundingsPresetPayload, UpdateLocationPayload, UpdateSourcePayload, UpdateTimePayload, UpdateDiagramTypePayload, ToggleLocationMarkersPayload, ToggleTimeSliderVisibilityPayload, UpdateProfileDataPreferencesPayload, AddSoundingPanelsPayload, ChangeSoundingPanelOrderPayload } from './types';
|
|
3
|
+
import type { SoundingsState, SoundingsViewState, RegisterSoundingsPresetPayload, UpdateLocationPayload, UpdateSourcePayload, UpdateTimePayload, UpdateDiagramTypePayload, ToggleLocationMarkersPayload, ToggleTimeSliderVisibilityPayload, ToggleLegendVisibilityPayload, UpdateProfileDataPreferencesPayload, AddSoundingPanelsPayload, ChangeSoundingPanelOrderPayload } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Default state every new soundings view starts with. Views are created
|
|
6
6
|
* dynamically when a soundings view mounts, so this serves as the template
|
|
@@ -19,6 +19,7 @@ export declare const soundingsActions: import("@reduxjs/toolkit").CaseReducerAct
|
|
|
19
19
|
updateDiagramType: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<UpdateDiagramTypePayload>) => void;
|
|
20
20
|
toggleLocationMarkers: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<ToggleLocationMarkersPayload>) => void;
|
|
21
21
|
toggleTimeSliderVisibility: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<ToggleTimeSliderVisibilityPayload>) => void;
|
|
22
|
+
toggleLegendVisibility: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<ToggleLegendVisibilityPayload>) => void;
|
|
22
23
|
updateProfileDataPreferences: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<UpdateProfileDataPreferencesPayload>) => void;
|
|
23
24
|
addSoundingPanelsFromPreset: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<AddSoundingPanelsPayload>) => void;
|
|
24
25
|
changeSoundingPanelOrder: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<ChangeSoundingPanelOrderPayload>) => void;
|
|
@@ -171,6 +171,27 @@ export declare const getIsTimeSliderVisible: ((state: SoundingsModuleState, view
|
|
|
171
171
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
172
172
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
173
173
|
};
|
|
174
|
+
export declare const getIsLegendVisible: ((state: SoundingsModuleState, viewId?: string | undefined) => boolean) & {
|
|
175
|
+
clearCache: () => void;
|
|
176
|
+
resultsCount: () => number;
|
|
177
|
+
resetResultsCount: () => void;
|
|
178
|
+
} & {
|
|
179
|
+
resultFunc: (resultFuncArgs_0: SoundingsViewState) => boolean;
|
|
180
|
+
memoizedResultFunc: ((resultFuncArgs_0: SoundingsViewState) => boolean) & {
|
|
181
|
+
clearCache: () => void;
|
|
182
|
+
resultsCount: () => number;
|
|
183
|
+
resetResultsCount: () => void;
|
|
184
|
+
};
|
|
185
|
+
lastResult: () => boolean;
|
|
186
|
+
dependencies: [(store: SoundingsModuleState, viewId?: string) => SoundingsViewState];
|
|
187
|
+
recomputations: () => number;
|
|
188
|
+
resetRecomputations: () => void;
|
|
189
|
+
dependencyRecomputations: () => number;
|
|
190
|
+
resetDependencyRecomputations: () => void;
|
|
191
|
+
} & {
|
|
192
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
193
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
194
|
+
};
|
|
174
195
|
export declare const getProfileDataPreferences: ((state: SoundingsModuleState, viewId?: string | undefined) => SoundingsProfileDataPreferences) & {
|
|
175
196
|
clearCache: () => void;
|
|
176
197
|
resultsCount: () => number;
|
|
@@ -41,6 +41,9 @@ export interface ToggleLocationMarkersPayload extends SoundingsPayload {
|
|
|
41
41
|
export interface ToggleTimeSliderVisibilityPayload extends SoundingsPayload {
|
|
42
42
|
isTimeSliderVisible: boolean;
|
|
43
43
|
}
|
|
44
|
+
export interface ToggleLegendVisibilityPayload extends SoundingsPayload {
|
|
45
|
+
isLegendVisible: boolean;
|
|
46
|
+
}
|
|
44
47
|
export interface UpdateProfileDataPreferencesPayload extends SoundingsPayload {
|
|
45
48
|
profileDataPreferences: SoundingsProfileDataPreferences;
|
|
46
49
|
}
|
|
@@ -84,6 +87,8 @@ export interface SoundingsViewState {
|
|
|
84
87
|
shouldHideLocationMarkers?: boolean;
|
|
85
88
|
/** Whether the timeslider is shown below the panels (defaults to true) */
|
|
86
89
|
isTimeSliderVisible?: boolean;
|
|
90
|
+
/** Whether the legend is shown above the panels (defaults to true) */
|
|
91
|
+
isLegendVisible?: boolean;
|
|
87
92
|
/** Per-view profile data table preferences: visible columns + units */
|
|
88
93
|
profileDataPreferences?: SoundingsProfileDataPreferences;
|
|
89
94
|
syncGroupsIds: string[];
|