@opengeoweb/soundings 19.4.0 → 19.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/dist/index.esm.js +866 -736
- package/dist/src/lib/api/edr-api/queryOptions.d.ts +12 -4
- package/dist/src/lib/components/MenuBar/LocationsMenu.d.ts +16 -1
- package/dist/src/lib/components/Soundings/Soundings.d.ts +1 -1
- package/dist/src/lib/components/WindBarbs/utils.d.ts +5 -1
- package/dist/src/lib/store/reducer.d.ts +3 -1
- package/dist/src/lib/store/selectors.d.ts +66 -0
- package/dist/src/lib/store/types.d.ts +25 -0
- package/package.json +1 -1
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import type { SoundingsInstances } from './types';
|
|
1
|
+
import type { CollectionDetails, SoundingsInstances } from './types';
|
|
2
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,
|
|
4
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<SoundingsInstances,
|
|
3
|
+
readonly getCollectionInstances: (collectionId: string, url: string) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<SoundingsInstances, Error, SoundingsInstances, string[]>, "queryFn"> & {
|
|
4
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<SoundingsInstances, string[], never> | undefined;
|
|
5
5
|
} & {
|
|
6
|
-
queryKey:
|
|
6
|
+
queryKey: string[] & {
|
|
7
7
|
[dataTagSymbol]: SoundingsInstances;
|
|
8
8
|
[dataTagErrorSymbol]: Error;
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
|
+
readonly getCollectionDetails: (collectionId: string, url: string) => import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<CollectionDetails, Error, CollectionDetails, string[]>, "queryFn"> & {
|
|
12
|
+
queryFn?: import("@tanstack/query-core").QueryFunction<CollectionDetails, string[], never> | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
queryKey: string[] & {
|
|
15
|
+
[dataTagSymbol]: CollectionDetails;
|
|
16
|
+
[dataTagErrorSymbol]: Error;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
11
19
|
};
|
|
@@ -15,6 +15,21 @@ interface Props {
|
|
|
15
15
|
order?: number;
|
|
16
16
|
isLoading?: boolean;
|
|
17
17
|
error?: Error | null;
|
|
18
|
+
locationMenuSize?: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
locationMenuPosition?: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
};
|
|
26
|
+
onSizeChange?: (size: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
}, position: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}) => void;
|
|
18
33
|
}
|
|
19
|
-
export declare const LocationsMenu: ({ services, selectedSourcesAmount, selectedLocations, isOpen, onClose, updateSelectedLocation, onMouseDown, order, isLoading, error, }: Props) => React.ReactElement;
|
|
34
|
+
export declare const LocationsMenu: ({ services, selectedSourcesAmount, selectedLocations, isOpen, onClose, updateSelectedLocation, onMouseDown, order, isLoading, error, locationMenuSize, onSizeChange, locationMenuPosition, }: Props) => React.ReactElement;
|
|
20
35
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Margin } from './drawUtils';
|
|
3
|
-
import type {
|
|
3
|
+
import type { SoundingDiagramType, SoundingFeature } from '../../api/edr-api/types';
|
|
4
4
|
export interface SoundingProps {
|
|
5
5
|
d3GraphId: string;
|
|
6
6
|
data: SoundingFeature[][];
|
|
@@ -18,6 +18,10 @@ export interface DrawWindBarbsProps {
|
|
|
18
18
|
columnOffsetX?: number;
|
|
19
19
|
verticalScale?: number;
|
|
20
20
|
}
|
|
21
|
+
export declare const MIN_VERTICAL_SCALE = 1;
|
|
22
|
+
export declare const MAX_VERTICAL_SCALE = 7;
|
|
23
|
+
export declare const getThinningBaseForVerticalScale: (verticalScale: number) => number;
|
|
21
24
|
export declare const drawWindBarbs: ({ svgRef, plotGroup, yScale, data, width, margin, barbColor, columnOffsetX, verticalScale, }: DrawWindBarbsProps) => void;
|
|
22
|
-
export declare const removeItemsExponential: (array: WindDataType[]) => WindDataType[];
|
|
25
|
+
export declare const removeItemsExponential: (array: WindDataType[], base?: number) => WindDataType[];
|
|
26
|
+
export declare const getVisibleWindItemsForVerticalScale: (data: WindDataType[], verticalScale: number) => WindDataType[];
|
|
23
27
|
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, ToggleLegendVisibilityPayload, UpdateProfileDataPreferencesPayload, AddSoundingPanelsPayload, ChangeSoundingPanelOrderPayload } from './types';
|
|
3
|
+
import type { SoundingsState, SoundingsViewState, RegisterSoundingsPresetPayload, UpdateLocationPayload, UpdateSourcePayload, UpdateTimePayload, UpdateDiagramTypePayload, ToggleLocationMarkersPayload, ToggleTimeSliderVisibilityPayload, ToggleLegendVisibilityPayload, UpdateProfileDataPreferencesPayload, AddSoundingPanelsPayload, ChangeSoundingPanelOrderPayload, SetLocationMenuSizeAndPositionPayload, SetLocationsMenuOpenPayload } 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
|
|
@@ -40,6 +40,8 @@ export declare const soundingsActions: import("@reduxjs/toolkit").CaseReducerAct
|
|
|
40
40
|
customWidth: number;
|
|
41
41
|
origin?: string;
|
|
42
42
|
}>) => void;
|
|
43
|
+
setLocationMenuSizeAndPosition: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<SetLocationMenuSizeAndPositionPayload>) => void;
|
|
44
|
+
setLocationsMenuOpen: (draft: Draft<SoundingsState>, payloadAction: PayloadAction<SetLocationsMenuOpenPayload>) => void;
|
|
43
45
|
notifyViewClosed: (draft: Draft<SoundingsState>) => void;
|
|
44
46
|
}, "soundings">;
|
|
45
47
|
export declare const soundingsReducer: import("redux").Reducer<SoundingsState>;
|
|
@@ -316,6 +316,72 @@ export declare const getSelectedSourcesIds: ((state: SoundingsModuleState, viewI
|
|
|
316
316
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
317
317
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
318
318
|
};
|
|
319
|
+
export declare const getLocationMenuSize: ((state: SoundingsModuleState, viewId?: string | undefined) => {
|
|
320
|
+
width: number;
|
|
321
|
+
height: number;
|
|
322
|
+
} | undefined) & {
|
|
323
|
+
clearCache: () => void;
|
|
324
|
+
resultsCount: () => number;
|
|
325
|
+
resetResultsCount: () => void;
|
|
326
|
+
} & {
|
|
327
|
+
resultFunc: (resultFuncArgs_0: SoundingsViewState) => {
|
|
328
|
+
width: number;
|
|
329
|
+
height: number;
|
|
330
|
+
} | undefined;
|
|
331
|
+
memoizedResultFunc: ((resultFuncArgs_0: SoundingsViewState) => {
|
|
332
|
+
width: number;
|
|
333
|
+
height: number;
|
|
334
|
+
} | undefined) & {
|
|
335
|
+
clearCache: () => void;
|
|
336
|
+
resultsCount: () => number;
|
|
337
|
+
resetResultsCount: () => void;
|
|
338
|
+
};
|
|
339
|
+
lastResult: () => {
|
|
340
|
+
width: number;
|
|
341
|
+
height: number;
|
|
342
|
+
} | undefined;
|
|
343
|
+
dependencies: [(store: SoundingsModuleState, viewId?: string) => SoundingsViewState];
|
|
344
|
+
recomputations: () => number;
|
|
345
|
+
resetRecomputations: () => void;
|
|
346
|
+
dependencyRecomputations: () => number;
|
|
347
|
+
resetDependencyRecomputations: () => void;
|
|
348
|
+
} & {
|
|
349
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
350
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
351
|
+
};
|
|
352
|
+
export declare const getLocationMenuPosition: ((state: SoundingsModuleState, viewId?: string | undefined) => {
|
|
353
|
+
x: number;
|
|
354
|
+
y: number;
|
|
355
|
+
} | undefined) & {
|
|
356
|
+
clearCache: () => void;
|
|
357
|
+
resultsCount: () => number;
|
|
358
|
+
resetResultsCount: () => void;
|
|
359
|
+
} & {
|
|
360
|
+
resultFunc: (resultFuncArgs_0: SoundingsViewState) => {
|
|
361
|
+
x: number;
|
|
362
|
+
y: number;
|
|
363
|
+
} | undefined;
|
|
364
|
+
memoizedResultFunc: ((resultFuncArgs_0: SoundingsViewState) => {
|
|
365
|
+
x: number;
|
|
366
|
+
y: number;
|
|
367
|
+
} | undefined) & {
|
|
368
|
+
clearCache: () => void;
|
|
369
|
+
resultsCount: () => number;
|
|
370
|
+
resetResultsCount: () => void;
|
|
371
|
+
};
|
|
372
|
+
lastResult: () => {
|
|
373
|
+
x: number;
|
|
374
|
+
y: number;
|
|
375
|
+
} | undefined;
|
|
376
|
+
dependencies: [(store: SoundingsModuleState, viewId?: string) => SoundingsViewState];
|
|
377
|
+
recomputations: () => number;
|
|
378
|
+
resetRecomputations: () => void;
|
|
379
|
+
dependencyRecomputations: () => number;
|
|
380
|
+
resetDependencyRecomputations: () => void;
|
|
381
|
+
} & {
|
|
382
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
383
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
384
|
+
};
|
|
319
385
|
export declare const getSoundingsPreset: ((state: SoundingsModuleState, viewId?: string | undefined) => SoundingsViewState) & {
|
|
320
386
|
clearCache: () => void;
|
|
321
387
|
resultsCount: () => number;
|
|
@@ -47,6 +47,19 @@ export interface ToggleLegendVisibilityPayload extends SoundingsPayload {
|
|
|
47
47
|
export interface UpdateProfileDataPreferencesPayload extends SoundingsPayload {
|
|
48
48
|
profileDataPreferences: SoundingsProfileDataPreferences;
|
|
49
49
|
}
|
|
50
|
+
export interface SetLocationMenuSizeAndPositionPayload extends SoundingsPayload {
|
|
51
|
+
size: {
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
};
|
|
55
|
+
position?: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface SetLocationsMenuOpenPayload extends SoundingsPayload {
|
|
61
|
+
isLocationsDialogOpen: boolean;
|
|
62
|
+
}
|
|
50
63
|
export interface RegisterSoundingsPresetPayload extends SoundingsPayload {
|
|
51
64
|
preset: SoundingsViewState;
|
|
52
65
|
}
|
|
@@ -92,6 +105,18 @@ export interface SoundingsViewState {
|
|
|
92
105
|
/** Per-view profile data table preferences: visible columns + units */
|
|
93
106
|
profileDataPreferences?: SoundingsProfileDataPreferences;
|
|
94
107
|
syncGroupsIds: string[];
|
|
108
|
+
/** Persisted size of the location menu dialog */
|
|
109
|
+
locationMenuSize?: {
|
|
110
|
+
width: number;
|
|
111
|
+
height: number;
|
|
112
|
+
};
|
|
113
|
+
/** Persisted drag position of the location menu dialog */
|
|
114
|
+
locationMenuPosition?: {
|
|
115
|
+
x: number;
|
|
116
|
+
y: number;
|
|
117
|
+
};
|
|
118
|
+
/** Whether the locations dialog was open when the preset was saved */
|
|
119
|
+
isLocationsDialogOpen?: boolean;
|
|
95
120
|
}
|
|
96
121
|
/**
|
|
97
122
|
* Root state for the soundings slice. Views are added dynamically when
|