@opengeoweb/soundings 19.0.0 → 19.1.1
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/README.md +59 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +7803 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/lib/api/edr-api/api.d.ts +13 -0
- package/dist/src/lib/api/edr-api/fakeApi.d.ts +16 -0
- package/dist/src/lib/api/edr-api/hooks.d.ts +98 -0
- package/dist/src/lib/api/edr-api/types.d.ts +38 -0
- package/dist/src/lib/api/edr-api/utils.d.ts +21 -0
- package/dist/src/lib/components/Hodograph/Hodograph.d.ts +6 -0
- package/dist/src/lib/components/Hodograph/HodographCollection.d.ts +6 -0
- package/dist/src/lib/components/Hodograph/HodographLegend.d.ts +2 -0
- package/dist/src/lib/components/Hodograph/drawUtils.d.ts +53 -0
- package/dist/src/lib/components/MenuBar/LocationsMenu.d.ts +20 -0
- package/dist/src/lib/components/MenuBar/LocationsMenuConnect.d.ts +7 -0
- package/dist/src/lib/components/MenuBar/MenuBar.d.ts +16 -0
- package/dist/src/lib/components/MenuBar/MenuBarConnect.d.ts +8 -0
- package/dist/src/lib/components/MenuBar/SoundingsMarkersSwitch.d.ts +6 -0
- package/dist/src/lib/components/MenuBar/SoundingsProfileDataDialogConnect.d.ts +2 -0
- package/dist/src/lib/components/MenuBar/SoundingsProfileDataMenu.d.ts +11 -0
- package/dist/src/lib/components/MenuBar/SoundingsSourceDialogConnect.d.ts +7 -0
- package/dist/src/lib/components/MenuBar/SoundingsSourceMenu.d.ts +16 -0
- package/dist/src/lib/components/MenuBar/SoundingsTopRowButton.d.ts +9 -0
- package/dist/src/lib/components/Providers/Providers.d.ts +12 -0
- package/dist/src/lib/components/ResizablePanel/MultipleResizablePanelsDemo.d.ts +2 -0
- package/dist/src/lib/components/ResizablePanel/ResizablePanel.d.ts +18 -0
- package/dist/src/lib/components/ResizablePanel/ResizablePanelStandalone.d.ts +25 -0
- package/dist/src/lib/components/SortablePanels/SortablePanels.d.ts +30 -0
- package/dist/src/lib/components/SoundingPanelPlaceholder/SoundingPanelPlaceholder.d.ts +5 -0
- package/dist/src/lib/components/SoundingPanelPlaceholder/index.d.ts +1 -0
- package/dist/src/lib/components/Soundings/DiagramTypeButton.d.ts +8 -0
- package/dist/src/lib/components/Soundings/SharedMouseYProvider.d.ts +13 -0
- package/dist/src/lib/components/Soundings/Soundings.d.ts +15 -0
- package/dist/src/lib/components/Soundings/SoundingsConnect.d.ts +8 -0
- package/dist/src/lib/components/Soundings/SoundingsLegend.d.ts +13 -0
- package/dist/src/lib/components/Soundings/WindBarbs.d.ts +16 -0
- package/dist/src/lib/components/Soundings/animateResizeTransform.d.ts +4 -0
- package/dist/src/lib/components/Soundings/constants.d.ts +20 -0
- package/dist/src/lib/components/Soundings/drawUtils.d.ts +45 -0
- package/dist/src/lib/components/Soundings/timeMismatchUtils.d.ts +4 -0
- package/dist/src/lib/components/Soundings/types.d.ts +6 -0
- package/dist/src/lib/components/Soundings/useSoundingsDiagramSize.d.ts +2 -0
- package/dist/src/lib/components/SoundingsManager/SoundingManagerListItem.d.ts +6 -0
- package/dist/src/lib/components/SoundingsManager/SoundingsManager.d.ts +17 -0
- package/dist/src/lib/components/SoundingsManager/SoundingsManagerConnect.d.ts +2 -0
- package/dist/src/lib/components/SoundingsPanels/SoundingsPanelConnect.d.ts +3 -0
- package/dist/src/lib/components/SoundingsPanels/SoundingsPanels.d.ts +20 -0
- package/dist/src/lib/components/SoundingsProfileDataTable/SoundingsProfileDataTable.d.ts +9 -0
- package/dist/src/lib/components/SoundingsTimeSlider/SoundingsTimeSlider.d.ts +8 -0
- package/dist/src/lib/components/SoundingsTimeSlider/SoundingsTimeSliderConnect.d.ts +8 -0
- package/dist/src/lib/components/SoundingsTimeSlider/index.d.ts +2 -0
- package/dist/src/lib/components/SoundingsTooltip/utils.d.ts +31 -0
- package/dist/src/lib/components/StaticLines/bijvoetUtils.d.ts +6 -0
- package/dist/src/lib/components/StaticLines/drawDryAdiabats.d.ts +23 -0
- package/dist/src/lib/components/StaticLines/drawIsobars.d.ts +14 -0
- package/dist/src/lib/components/StaticLines/drawIsohumes.d.ts +23 -0
- package/dist/src/lib/components/StaticLines/drawIsotherms.d.ts +23 -0
- package/dist/src/lib/components/StaticLines/drawMoistAdiabats.d.ts +29 -0
- package/dist/src/lib/components/StaticLines/utils.d.ts +19 -0
- package/dist/src/lib/components/WindBarbs/utils.d.ts +22 -0
- package/dist/src/lib/components/WindBarbs/windsymbols.d.ts +5 -0
- package/dist/src/lib/components/index.d.ts +20 -0
- package/dist/src/lib/components/utils.d.ts +36 -0
- package/dist/src/lib/store/reducer.d.ts +44 -0
- package/dist/src/lib/store/selectors.d.ts +339 -0
- package/dist/src/lib/store/store.d.ts +8 -0
- package/dist/src/lib/store/types.d.ts +108 -0
- package/dist/src/lib/store/utils.d.ts +10 -0
- package/dist/src/lib/utils/i18n.d.ts +7 -0
- package/dist/src/lib/utils/profileDataPreferences.d.ts +50 -0
- package/dist/src/lib/utils/soundingsLookUp.d.ts +9 -0
- package/package.json +2 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
import type { i18n, TFunction } from 'i18next';
|
|
3
|
+
import type { ScalesType } from './types';
|
|
4
|
+
import type { SoundingDiagramType } from '../../api/edr-api/types';
|
|
5
|
+
export declare const SOUNDING_COLORS: string[];
|
|
6
|
+
export interface Margin {
|
|
7
|
+
top: number;
|
|
8
|
+
right: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
left: number;
|
|
11
|
+
}
|
|
12
|
+
interface InitializeSvg {
|
|
13
|
+
svgRef: React.RefObject<SVGSVGElement | null>;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
margin: Margin;
|
|
17
|
+
diagramType: SoundingDiagramType;
|
|
18
|
+
d3GraphId: string;
|
|
19
|
+
}
|
|
20
|
+
interface DrawAxis {
|
|
21
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, undefined>;
|
|
22
|
+
xScale: ScalesType;
|
|
23
|
+
yScale: ScalesType;
|
|
24
|
+
height: number;
|
|
25
|
+
diagramType: SoundingDiagramType;
|
|
26
|
+
}
|
|
27
|
+
interface PlotSounding {
|
|
28
|
+
temperatureValues: number[];
|
|
29
|
+
pressureValues: number[];
|
|
30
|
+
color: string;
|
|
31
|
+
lineStyle: string;
|
|
32
|
+
xScale: ScalesType;
|
|
33
|
+
yScale: ScalesType;
|
|
34
|
+
height: number;
|
|
35
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, undefined>;
|
|
36
|
+
diagramType: SoundingDiagramType;
|
|
37
|
+
}
|
|
38
|
+
export declare const getDiagramName: (t: TFunction<"soundings", i18n>, diagramType: SoundingDiagramType) => string;
|
|
39
|
+
export declare const initializeSvg: ({ svgRef, width, height, margin, diagramType, d3GraphId, }: InitializeSvg) => d3.Selection<SVGGElement, unknown, null, undefined>;
|
|
40
|
+
export declare const createScales: (diagramType: SoundingDiagramType, width: number, height: number, minPressure: number, maxPressure: number, minTemperature: number, maxTemperature: number) => [ScalesType, ScalesType];
|
|
41
|
+
export declare const drawAxes: ({ svg, xScale, yScale, height, diagramType, }: DrawAxis) => void;
|
|
42
|
+
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 filterDomainRangeForParameter: (pressureDomain: number[], parameterDomain: number[]) => [number[], number[]];
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SoundingsCollection } from '@opengeoweb/shared';
|
|
2
|
+
import type { SoundingsInstance } from '../../api/edr-api/types';
|
|
3
|
+
export interface SoundingsCollectionsWithInstances extends SoundingsCollection {
|
|
4
|
+
instances: SoundingsInstance[];
|
|
5
|
+
}
|
|
6
|
+
export type ScalesType = d3.ScaleLinear<number, number, never> | d3.ScaleLogarithmic<number, number, never>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SoundingPanel } from '../../store/types';
|
|
3
|
+
interface SoundingsManagerProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onMouseDown: () => void;
|
|
7
|
+
order: number;
|
|
8
|
+
soundingPanelsInOrder: SoundingPanel[];
|
|
9
|
+
onOrderChange: (newOrder: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
isDisplayed: boolean;
|
|
13
|
+
}[]) => void;
|
|
14
|
+
onToggleVisibility: (id: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const SoundingsManager: ({ isOpen, onClose, onMouseDown, order, soundingPanelsInOrder, onOrderChange, onToggleVisibility, }: SoundingsManagerProps) => React.ReactElement;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SoundingFeature } from '../../api/edr-api/types';
|
|
3
|
+
import type { SoundingPanel } from '../../store/types';
|
|
4
|
+
import type { SoundingsProfileDataPreferences } from '../../utils/profileDataPreferences';
|
|
5
|
+
import type { ResizablePanelComponent } from '../ResizablePanel/ResizablePanelStandalone';
|
|
6
|
+
export interface SoundingsPanelsProps {
|
|
7
|
+
viewId: string;
|
|
8
|
+
soundingPanelsInOrder: SoundingPanel[];
|
|
9
|
+
data: SoundingFeature[][];
|
|
10
|
+
chosenDiagramType: 'SKEWT' | 'BIJVOET' | 'EMAGRAM';
|
|
11
|
+
setChosenDiagramType: (type: 'SKEWT' | 'BIJVOET' | 'EMAGRAM') => void;
|
|
12
|
+
onOrderChange: (newOrder: {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
isDisplayed: boolean;
|
|
16
|
+
}[]) => void;
|
|
17
|
+
panelComponent?: ResizablePanelComponent;
|
|
18
|
+
profileDataPreferences?: SoundingsProfileDataPreferences;
|
|
19
|
+
}
|
|
20
|
+
export declare const SoundingsPanels: ({ viewId, soundingPanelsInOrder, data, chosenDiagramType, setChosenDiagramType, onOrderChange, panelComponent, profileDataPreferences, }: SoundingsPanelsProps) => React.ReactElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SoundingFeature } from '../../api/edr-api/types';
|
|
3
|
+
import type { SoundingsProfileDataPreferences } from '../../utils/profileDataPreferences';
|
|
4
|
+
export interface SoundingsProfileDataTableProps {
|
|
5
|
+
features: SoundingFeature[];
|
|
6
|
+
maxHeight?: number | string;
|
|
7
|
+
preferences?: SoundingsProfileDataPreferences;
|
|
8
|
+
}
|
|
9
|
+
export declare const SoundingsProfileDataTable: React.FC<SoundingsProfileDataTableProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const TIMESLIDER_HEIGHT = 135;
|
|
3
|
+
export interface SoundingsTimeSliderProps {
|
|
4
|
+
timesteps: string[];
|
|
5
|
+
selectedTime: string;
|
|
6
|
+
updateSelectedTime: (date: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SoundingsTimeSlider: ({ timesteps, selectedTime, updateSelectedTime, }: SoundingsTimeSliderProps) => React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SoundingsTimeSliderConnectProps {
|
|
3
|
+
viewId: string;
|
|
4
|
+
timeInUse?: string;
|
|
5
|
+
syncEnabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const SoundingsTimeSliderConnect: ({ viewId, timeInUse, syncEnabled, }: SoundingsTimeSliderConnectProps) => React.ReactElement;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
import type { SoundingDiagramType, SoundingFeature } from '../../api/edr-api/types';
|
|
3
|
+
import type { Margin } from '../Soundings/drawUtils';
|
|
4
|
+
interface DrawSoundingsTooltipData {
|
|
5
|
+
pressureData: number[];
|
|
6
|
+
interpolatePressure: (value: number) => number;
|
|
7
|
+
interpolateTemperature: (value: number) => number;
|
|
8
|
+
interpolateDewpoint: (value: number) => number;
|
|
9
|
+
interpolateWindSpeed: (value: number) => number;
|
|
10
|
+
interpolateWindDirection: (value: number) => number;
|
|
11
|
+
tooltipColor: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const constructTooltipData: (data: SoundingFeature[][]) => DrawSoundingsTooltipData[];
|
|
14
|
+
interface DrawSoundingsTooltipProps {
|
|
15
|
+
event: {
|
|
16
|
+
pageY: number;
|
|
17
|
+
clientY: number;
|
|
18
|
+
};
|
|
19
|
+
yScale: d3.ScaleLinear<number, number>;
|
|
20
|
+
svgRectangle: DOMRect;
|
|
21
|
+
margin: Margin;
|
|
22
|
+
width: number;
|
|
23
|
+
pressureRefd3?: d3.Selection<HTMLDivElement | null, unknown, null, undefined>;
|
|
24
|
+
tempRefd3?: d3.Selection<HTMLDivElement | null, unknown, null, undefined>;
|
|
25
|
+
dewpointRefd3?: d3.Selection<HTMLDivElement | null, unknown, null, undefined>;
|
|
26
|
+
windRefd3?: d3.Selection<HTMLDivElement | null, unknown, null, undefined>;
|
|
27
|
+
tooltipData: DrawSoundingsTooltipData[];
|
|
28
|
+
diagramType: SoundingDiagramType;
|
|
29
|
+
}
|
|
30
|
+
export declare const drawSoundingsTooltip: ({ event, yScale, svgRectangle, pressureRefd3, tempRefd3, dewpointRefd3, windRefd3, margin, width, tooltipData, diagramType, }: DrawSoundingsTooltipProps) => void;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const tempToKelvin: (value: number) => number;
|
|
2
|
+
export declare const pressToPascal: (value: number) => number;
|
|
3
|
+
export declare const bijvoetInterpolationTheta: (minRange: number, maxRange: number) => (t: number) => number;
|
|
4
|
+
export declare const bijvoetInterpolationPres: (minRange: number, maxRange: number) => (t: number) => number;
|
|
5
|
+
export declare const pressureFromPosition: (y: number) => number;
|
|
6
|
+
export declare const calculateThetaFromPressTemp: (pressure: number, temperature: number, basePressure?: number) => number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
import type { SoundingDiagramType } from '../../api/edr-api/types';
|
|
3
|
+
import type { ScalesType } from '../Soundings/types';
|
|
4
|
+
interface DrawDryAdiabatsProps {
|
|
5
|
+
staticPressureArray: number[];
|
|
6
|
+
height: number;
|
|
7
|
+
xScale: ScalesType;
|
|
8
|
+
yScale: ScalesType;
|
|
9
|
+
dp: number;
|
|
10
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
11
|
+
diagramType: SoundingDiagramType;
|
|
12
|
+
d3GraphId: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const drawDryAdiabats: ({ staticPressureArray, height, xScale, yScale, svg, dp, diagramType, d3GraphId, }: DrawDryAdiabatsProps) => void;
|
|
15
|
+
interface DrawDryAdiabatsBijvoetProps {
|
|
16
|
+
staticPressureArray: number[];
|
|
17
|
+
xScale: ScalesType;
|
|
18
|
+
yScale: ScalesType;
|
|
19
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
20
|
+
d3GraphId: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const drawDryAdiabatsBijvoet: ({ staticPressureArray, xScale, yScale, svg, d3GraphId, }: DrawDryAdiabatsBijvoetProps) => void;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
import type { SoundingDiagramType } from '../../api/edr-api/types';
|
|
3
|
+
import type { ScalesType } from '../Soundings/types';
|
|
4
|
+
export declare const isobarValues: number[];
|
|
5
|
+
interface DrawIsobarsProps {
|
|
6
|
+
diagramType: SoundingDiagramType;
|
|
7
|
+
minTemperature: number;
|
|
8
|
+
maxTemperature: number;
|
|
9
|
+
xScale: ScalesType;
|
|
10
|
+
yScale: ScalesType;
|
|
11
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export declare const drawIsobars: ({ diagramType, minTemperature, maxTemperature, xScale, yScale, svg, }: DrawIsobarsProps) => void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
import type { SoundingDiagramType } from '../../api/edr-api/types';
|
|
3
|
+
import type { ScalesType } from '../Soundings/types';
|
|
4
|
+
interface DrawIsohumesProps {
|
|
5
|
+
staticPressureArray: number[];
|
|
6
|
+
height: number;
|
|
7
|
+
xScale: ScalesType;
|
|
8
|
+
yScale: ScalesType;
|
|
9
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
10
|
+
diagramType: SoundingDiagramType;
|
|
11
|
+
d3GraphId: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const drawIsohumes: ({ staticPressureArray, height, xScale, yScale, svg, diagramType, d3GraphId, }: DrawIsohumesProps) => void;
|
|
14
|
+
interface DrawIsohumesBijvoetProps {
|
|
15
|
+
staticPressureArray: number[];
|
|
16
|
+
height: number;
|
|
17
|
+
xScale: ScalesType;
|
|
18
|
+
yScale: ScalesType;
|
|
19
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
20
|
+
d3GraphId: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const drawIsohumesBijvoet: ({ staticPressureArray, height, xScale, yScale, svg, d3GraphId, }: DrawIsohumesBijvoetProps) => void;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
import type { SoundingDiagramType } from '../../api/edr-api/types';
|
|
3
|
+
import type { ScalesType } from '../Soundings/types';
|
|
4
|
+
interface DrawIsothermsProps {
|
|
5
|
+
staticPressureArray: number[];
|
|
6
|
+
height: number;
|
|
7
|
+
xScale: ScalesType;
|
|
8
|
+
yScale: ScalesType;
|
|
9
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
10
|
+
diagramType: SoundingDiagramType;
|
|
11
|
+
d3GraphId: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const drawIsotherms: ({ staticPressureArray, height, xScale, yScale, svg, diagramType, d3GraphId, }: DrawIsothermsProps) => void;
|
|
14
|
+
interface DrawIsothermsBijvoetProps {
|
|
15
|
+
staticPressureArray: number[];
|
|
16
|
+
xScale: ScalesType;
|
|
17
|
+
yScale: ScalesType;
|
|
18
|
+
height: number;
|
|
19
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
20
|
+
d3GraphId: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const drawIsothermsBijvoet: ({ staticPressureArray, xScale, yScale, svg, height, d3GraphId, }: DrawIsothermsBijvoetProps) => void;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
import type { SoundingDiagramType } from '../../api/edr-api/types';
|
|
3
|
+
import type { ScalesType } from '../Soundings/types';
|
|
4
|
+
interface DrawMoistAdiabatsProps {
|
|
5
|
+
staticPressureArray: number[];
|
|
6
|
+
minTemperature: number;
|
|
7
|
+
maxTemperature: number;
|
|
8
|
+
minPressure: number;
|
|
9
|
+
maxPressure: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
dp: number;
|
|
13
|
+
xScale: ScalesType;
|
|
14
|
+
yScale: ScalesType;
|
|
15
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
16
|
+
diagramType: SoundingDiagramType;
|
|
17
|
+
d3GraphId: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const drawMoistAdiabats: ({ staticPressureArray, minTemperature, maxTemperature, minPressure, maxPressure, width, height, xScale, yScale, svg, dp, diagramType, d3GraphId, }: DrawMoistAdiabatsProps) => void;
|
|
20
|
+
interface DrawMoistAdiabatsBijvoetProps {
|
|
21
|
+
minPressure: number;
|
|
22
|
+
maxPressure: number;
|
|
23
|
+
xScale: ScalesType;
|
|
24
|
+
yScale: ScalesType;
|
|
25
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
26
|
+
d3GraphId: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const drawMoistAdiabatsBijvoet: ({ minPressure, maxPressure, xScale, yScale, svg, d3GraphId, }: DrawMoistAdiabatsBijvoetProps) => void;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SoundingDiagramType } from '../../api/edr-api/types';
|
|
2
|
+
import type { ScalesType } from '../Soundings/types';
|
|
3
|
+
interface DrawStaticLinesProps {
|
|
4
|
+
diagramType: SoundingDiagramType;
|
|
5
|
+
dp: number;
|
|
6
|
+
staticPressureArray: number[];
|
|
7
|
+
minTemperature: number;
|
|
8
|
+
maxTemperature: number;
|
|
9
|
+
minPressure: number;
|
|
10
|
+
maxPressure: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
xScale: ScalesType;
|
|
14
|
+
yScale: ScalesType;
|
|
15
|
+
svg: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
16
|
+
d3GraphId: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const drawStaticLines: ({ diagramType, dp, staticPressureArray, minTemperature, maxTemperature, height, width, xScale, yScale, minPressure, maxPressure, svg, d3GraphId, }: DrawStaticLinesProps) => void;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as d3 from 'd3';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { Margin } from '../Soundings/drawUtils';
|
|
4
|
+
import type { ScalesType } from '../Soundings/types';
|
|
5
|
+
export interface WindDataType {
|
|
6
|
+
pressure: number;
|
|
7
|
+
windSpeed: number;
|
|
8
|
+
windDirection: number;
|
|
9
|
+
}
|
|
10
|
+
export interface DrawWindBarbsProps {
|
|
11
|
+
svgRef: React.RefObject<SVGSVGElement | null>;
|
|
12
|
+
plotGroup: d3.Selection<SVGElement, unknown, HTMLElement, unknown>;
|
|
13
|
+
yScale: ScalesType;
|
|
14
|
+
data: WindDataType[];
|
|
15
|
+
width: number;
|
|
16
|
+
margin: Margin;
|
|
17
|
+
barbColor?: string;
|
|
18
|
+
columnOffsetX?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare const drawWindBarbs: ({ svgRef, plotGroup, yScale, data, width, margin, barbColor, columnOffsetX, }: DrawWindBarbsProps) => void;
|
|
21
|
+
export declare const removeItemsExponential: (array: WindDataType[]) => WindDataType[];
|
|
22
|
+
export declare const getWindSymbol: (value: number) => Node | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from './Soundings/SoundingsConnect';
|
|
2
|
+
export * from './SoundingsProfileDataTable/SoundingsProfileDataTable';
|
|
3
|
+
export * from './MenuBar/SoundingsSourceDialogConnect';
|
|
4
|
+
export * from './MenuBar/LocationsMenuConnect';
|
|
5
|
+
export * from './MenuBar/SoundingsProfileDataDialogConnect';
|
|
6
|
+
export * from './SoundingsManager/SoundingsManagerConnect';
|
|
7
|
+
export { ResizablePanel } from './ResizablePanel/ResizablePanel';
|
|
8
|
+
export type { ResizablePanelProps } from './ResizablePanel/ResizablePanel';
|
|
9
|
+
export { ResizablePanelStandalone } from './ResizablePanel/ResizablePanelStandalone';
|
|
10
|
+
export type { ResizablePanelWrapperProps, ResizablePanelComponent, } from './ResizablePanel/ResizablePanelStandalone';
|
|
11
|
+
export { SortablePanels } from './SortablePanels/SortablePanels';
|
|
12
|
+
export type { SortablePanelsProps, SortablePanelItem, } from './SortablePanels/SortablePanels';
|
|
13
|
+
export { SoundingsPanels } from './SoundingsPanels/SoundingsPanels';
|
|
14
|
+
export type { SoundingsPanelsProps } from './SoundingsPanels/SoundingsPanels';
|
|
15
|
+
export { SoundingsPanelConnect } from './SoundingsPanels/SoundingsPanelConnect';
|
|
16
|
+
export { Soundings } from './Soundings/Soundings';
|
|
17
|
+
export { WindBarbs } from './Soundings/WindBarbs';
|
|
18
|
+
export { DiagramTypeButton } from './Soundings/DiagramTypeButton';
|
|
19
|
+
export { HodographCollection } from './Hodograph/HodographCollection';
|
|
20
|
+
export { SharedMouseYProvider } from './Soundings/SharedMouseYProvider';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ListImperativeAPI } from 'react-window';
|
|
3
|
+
import type { FeaturesFromBE } from '../api/edr-api/types';
|
|
4
|
+
export declare const getDisplayValue: (instanceId: string, stringFormat?: string) => string;
|
|
5
|
+
export declare const degToRad: (deg: number) => number;
|
|
6
|
+
export declare const kmToRad: (km: number) => number;
|
|
7
|
+
/**
|
|
8
|
+
* Great-circle distance in km between two [lon, lat] points (haversine).
|
|
9
|
+
*/
|
|
10
|
+
export declare const haversineDistanceKm: (from: [number, number], to: [number, number]) => number;
|
|
11
|
+
/**
|
|
12
|
+
* Initial bearing in degrees from `from` toward `to` (0° = north, clockwise).
|
|
13
|
+
*/
|
|
14
|
+
export declare const bearingDeg: (from: [number, number], to: [number, number]) => number;
|
|
15
|
+
export declare const bearingToCompass8: (deg: number) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Format [lon, lat] as "60.24°N 24.15°E".
|
|
18
|
+
*/
|
|
19
|
+
export declare const formatLatLon: ([lon, lat]: [number, number]) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Format a distance in km using m below 1 km, one decimal below 10 km,
|
|
22
|
+
* whole km otherwise.
|
|
23
|
+
*/
|
|
24
|
+
export declare const formatDistanceKm: (km: number) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Find nearest point to the target location in the given features, if it is within the specified maximum distance.
|
|
27
|
+
* Uses (mid-latitude modified) equirectangular distance approximation which is not accurate for long
|
|
28
|
+
* distances, but works for finding nearby (< 100 km) locations.
|
|
29
|
+
*
|
|
30
|
+
* @param targetLocation target location the user has clicked
|
|
31
|
+
* @param pointFeatures features to search through
|
|
32
|
+
* @param maxDistanceKm maximum distance to consider
|
|
33
|
+
* @returns feature nearest to the target location or null if none are within the maximum distance
|
|
34
|
+
*/
|
|
35
|
+
export declare const findNearestLocationFeature: (pointFeatures: FeaturesFromBE[], targetLocation: [number, number], maxDistanceKm?: number) => FeaturesFromBE | null;
|
|
36
|
+
export declare const useScrollToBottomOnDatasetChange: <Row>(listRef: React.RefObject<ListImperativeAPI | null>, rows: readonly Row[]) => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Draft, PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
+
import type { SoundingsCollection } from '@opengeoweb/shared';
|
|
3
|
+
import type { SoundingsState, SoundingsViewState, RegisterSoundingsPresetPayload, UpdateLocationPayload, UpdateSourcePayload, UpdateTimePayload, UpdateDiagramTypePayload, ToggleLocationMarkersPayload, ToggleTimeSliderVisibilityPayload, UpdateProfileDataPreferencesPayload, AddSoundingPanelsPayload, ChangeSoundingPanelOrderPayload } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Default state every new soundings view starts with. Views are created
|
|
6
|
+
* dynamically when a soundings view mounts, so this serves as the template
|
|
7
|
+
* for each new view added to the store.
|
|
8
|
+
*/
|
|
9
|
+
export declare const initialSoundingsViewState: SoundingsViewState;
|
|
10
|
+
export declare const soundingsActions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
11
|
+
registerSoundingsView: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<{
|
|
12
|
+
viewId: string;
|
|
13
|
+
}>) => void;
|
|
14
|
+
registerSoundingsPreset: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<RegisterSoundingsPresetPayload>) => void;
|
|
15
|
+
setSoundingsCollections: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<SoundingsCollection[]>) => void;
|
|
16
|
+
updateSelectedSource: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<UpdateSourcePayload>) => void;
|
|
17
|
+
updateSelectedLocation: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<UpdateLocationPayload>) => void;
|
|
18
|
+
updateSelectedTime: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<UpdateTimePayload>) => void;
|
|
19
|
+
updateDiagramType: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<UpdateDiagramTypePayload>) => void;
|
|
20
|
+
toggleLocationMarkers: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<ToggleLocationMarkersPayload>) => void;
|
|
21
|
+
toggleTimeSliderVisibility: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<ToggleTimeSliderVisibilityPayload>) => void;
|
|
22
|
+
updateProfileDataPreferences: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<UpdateProfileDataPreferencesPayload>) => void;
|
|
23
|
+
addSoundingPanelsFromPreset: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<AddSoundingPanelsPayload>) => void;
|
|
24
|
+
changeSoundingPanelOrder: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<ChangeSoundingPanelOrderPayload>) => void;
|
|
25
|
+
toggleSoundingPanelVisibility: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<{
|
|
26
|
+
id: string;
|
|
27
|
+
viewId?: string;
|
|
28
|
+
origin?: string;
|
|
29
|
+
}>) => void;
|
|
30
|
+
setPanelIsOpen: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<{
|
|
31
|
+
panelId: string;
|
|
32
|
+
viewId?: string;
|
|
33
|
+
isOpen: boolean;
|
|
34
|
+
origin?: string;
|
|
35
|
+
}>) => void;
|
|
36
|
+
setPanelCustomWidth: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<{
|
|
37
|
+
panelId: string;
|
|
38
|
+
viewId?: string;
|
|
39
|
+
customWidth: number;
|
|
40
|
+
origin?: string;
|
|
41
|
+
}>) => void;
|
|
42
|
+
notifyViewClosed: (draft: Draft<SoundingsState>) => void;
|
|
43
|
+
}, "soundings">;
|
|
44
|
+
export declare const soundingsReducer: import("redux").Reducer<SoundingsState>;
|