@opengeoweb/soundings 15.0.0 → 15.2.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 +753 -207
- package/package.json +9 -9
- package/src/index.d.ts +3 -0
- package/src/lib/api/edr-api/hooks.d.ts +2 -2
- package/src/lib/components/MenuBar/LocationsMenu.d.ts +1 -1
- package/src/lib/components/MenuBar/LocationsMenuConnect.d.ts +2 -1
- package/src/lib/components/MenuBar/MenuBar.d.ts +3 -1
- package/src/lib/components/MenuBar/SoundingsMarkersSwitch.d.ts +6 -0
- package/src/lib/components/MenuBar/SoundingsMarkersSwitch.spec.d.ts +1 -0
- package/src/lib/components/MenuBar/SoundingsSourceMenu.d.ts +1 -1
- package/src/lib/components/SoundingPanelPlaceholder/SoundingPanelPlaceholder.d.ts +5 -0
- package/src/lib/components/SoundingPanelPlaceholder/SoundingPanelPlaceholder.spec.d.ts +1 -0
- package/src/lib/components/SoundingPanelPlaceholder/index.d.ts +1 -0
- package/src/lib/components/Soundings/SoundingsConnect.d.ts +3 -3
- package/src/lib/components/SoundingsAccordion/SoundingsAccordion.d.ts +1 -0
- package/src/lib/components/SoundingsManager/SoundingManagerListItem.d.ts +3 -1
- package/src/lib/components/SoundingsManager/SoundingsManager.d.ts +2 -1
- package/src/lib/components/SoundingsTimeSlider/SoundingsTimeSliderConnect.d.ts +5 -1
- package/src/lib/store/reducer.d.ts +23 -11
- package/src/lib/store/selectors.d.ts +85 -20
- package/src/lib/store/store.d.ts +4 -1
- package/src/lib/store/types.d.ts +40 -15
- package/src/lib/store/utils.d.ts +10 -0
- package/src/lib/utils/soundingsLookUp.d.ts +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/soundings",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.2.0",
|
|
4
4
|
"description": "GeoWeb soundings library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,24 +8,24 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/api": "15.
|
|
11
|
+
"@opengeoweb/api": "15.2.0",
|
|
12
12
|
"@tanstack/react-query": "^5.85.5",
|
|
13
13
|
"react": "^18.3.1",
|
|
14
14
|
"d3": "^7.9.0",
|
|
15
15
|
"react-i18next": "^15.1.1",
|
|
16
16
|
"i18next": "^25.0.1",
|
|
17
|
-
"@opengeoweb/shared": "15.
|
|
17
|
+
"@opengeoweb/shared": "15.2.0",
|
|
18
18
|
"@mui/material": "^7.0.1",
|
|
19
|
-
"@opengeoweb/store": "15.
|
|
19
|
+
"@opengeoweb/store": "15.2.0",
|
|
20
20
|
"react-redux": "^9.2.0",
|
|
21
|
-
"@opengeoweb/theme": "15.
|
|
21
|
+
"@opengeoweb/theme": "15.2.0",
|
|
22
22
|
"@reduxjs/toolkit": "^2.6.1",
|
|
23
|
-
"@opengeoweb/time-slider": "15.
|
|
24
|
-
"react-window": "^
|
|
25
|
-
"@opengeoweb/webmap": "15.
|
|
23
|
+
"@opengeoweb/time-slider": "15.2.0",
|
|
24
|
+
"react-window": "^2.2.6",
|
|
25
|
+
"@opengeoweb/webmap": "15.2.0",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"@types/geojson": "^7946.0.14",
|
|
28
|
-
"@opengeoweb/webmap-react": "15.
|
|
28
|
+
"@opengeoweb/webmap-react": "15.2.0",
|
|
29
29
|
"react-resizable-layout": "^0.7.3",
|
|
30
30
|
"react-sortablejs": "^6.1.4"
|
|
31
31
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -5,3 +5,6 @@ export * from './lib/utils/soundingsLookUp';
|
|
|
5
5
|
export * from './lib/api/edr-api/types';
|
|
6
6
|
export * from './lib/store/store';
|
|
7
7
|
export * from './lib/utils/i18n';
|
|
8
|
+
export * as SoundingsTypes from './lib/store/types';
|
|
9
|
+
export { SoundingsActionOrigin } from './lib/store/types';
|
|
10
|
+
export type { SoundingsRootState } from './lib/store/types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { SoundingsCollection } from '@opengeoweb/shared';
|
|
1
|
+
import type { Coordinates, SoundingsCollection } from '@opengeoweb/shared';
|
|
2
2
|
import type { SoundingFeature } from './types';
|
|
3
3
|
import type { ServiceWithLocations } from '../../components/MenuBar/LocationsMenu';
|
|
4
4
|
import type { SoundingsCollectionsWithInstances } from '../../components/Soundings/types';
|
|
5
|
-
import type {
|
|
5
|
+
import type { SourceType } from '../../store/types';
|
|
6
6
|
export declare const sortSoundingFeatures: (data: SoundingFeature[]) => SoundingFeature[];
|
|
7
7
|
export declare const defaultParameterMappings: {
|
|
8
8
|
temperature: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Coordinates } from '@opengeoweb/shared';
|
|
1
2
|
import type { LocationsResponseFromBE } from '../../api/edr-api/types';
|
|
2
|
-
import type { Coordinates } from '../../store/types';
|
|
3
3
|
export type ServiceWithLocations = LocationsResponseFromBE & {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { SoundingsCollection } from '@opengeoweb/shared';
|
|
2
3
|
interface Props {
|
|
3
|
-
soundingsCollections
|
|
4
|
+
soundingsCollections?: SoundingsCollection[];
|
|
4
5
|
}
|
|
5
6
|
export declare const LocationsMenuConnect: ({ soundingsCollections, }: Props) => React.ReactElement;
|
|
6
7
|
export {};
|
|
@@ -8,6 +8,8 @@ interface SoundingsMenuBarProps {
|
|
|
8
8
|
handleClick: (menuType: MenuOptions) => void;
|
|
9
9
|
isOpen: Record<MenuOptions, boolean>;
|
|
10
10
|
selectedSourcesAmount?: number;
|
|
11
|
+
shouldHideMarkers: boolean;
|
|
12
|
+
toggleMarkers: (shouldHideMarkers: boolean) => void;
|
|
11
13
|
}
|
|
12
|
-
export declare const SoundingsMenuBar: ({ handleClick, isOpen, selectedSourcesAmount, }: SoundingsMenuBarProps) => React.ReactElement;
|
|
14
|
+
export declare const SoundingsMenuBar: ({ handleClick, isOpen, selectedSourcesAmount, shouldHideMarkers, toggleMarkers, }: SoundingsMenuBarProps) => React.ReactElement;
|
|
13
15
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SourceSelection } from '
|
|
2
|
+
import type { SourceSelection } from '@opengeoweb/shared';
|
|
3
3
|
import type { SoundingsCollectionsWithInstances } from '../Soundings/types';
|
|
4
4
|
interface SoundingsSourceMenuProps {
|
|
5
5
|
soundingsCollections: SoundingsCollectionsWithInstances[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SoundingPanelPlaceholder';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SoundingsStore } from '../../store/types';
|
|
3
3
|
interface SoundingsConnectProps {
|
|
4
4
|
viewId: string;
|
|
5
|
-
|
|
5
|
+
soundingsPreset?: SoundingsStore;
|
|
6
6
|
}
|
|
7
|
-
export declare const SoundingsConnect: ({ viewId,
|
|
7
|
+
export declare const SoundingsConnect: ({ viewId, soundingsPreset, }: SoundingsConnectProps) => React.ReactElement;
|
|
8
8
|
export {};
|
|
@@ -10,5 +10,6 @@ export interface SoundingsAccordionProps {
|
|
|
10
10
|
setSoundingsIsClosed?: (isClosed: boolean) => void;
|
|
11
11
|
setPreviousHeight?: (size: number) => void;
|
|
12
12
|
size?: number;
|
|
13
|
+
isDisplayed?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare const SoundingsAccordion: React.ForwardRefExoticComponent<SoundingsAccordionProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare const SoundingManagerListItem: ({ name, isDisplayed, }: {
|
|
1
|
+
export declare const SoundingManagerListItem: ({ id, name, isDisplayed, onToggleVisibility, }: {
|
|
2
|
+
id: string;
|
|
2
3
|
name: string;
|
|
3
4
|
isDisplayed: boolean;
|
|
5
|
+
onToggleVisibility: (id: string) => void;
|
|
4
6
|
}) => React.ReactElement;
|
|
@@ -11,6 +11,7 @@ interface SoundingsManagerProps {
|
|
|
11
11
|
name: string;
|
|
12
12
|
isDisplayed: boolean;
|
|
13
13
|
}[]) => void;
|
|
14
|
+
onToggleVisibility: (id: string) => void;
|
|
14
15
|
}
|
|
15
|
-
export declare const SoundingsManager: ({ isOpen, onClose, onMouseDown, order, soundingPanelsInOrder, onOrderChange, }: SoundingsManagerProps) => React.ReactElement;
|
|
16
|
+
export declare const SoundingsManager: ({ isOpen, onClose, onMouseDown, order, soundingPanelsInOrder, onOrderChange, onToggleVisibility, }: SoundingsManagerProps) => React.ReactElement;
|
|
16
17
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface SoundingsTimeSliderConnectProps {
|
|
3
|
+
viewId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const SoundingsTimeSliderConnect: ({ viewId, }: SoundingsTimeSliderConnectProps) => React.ReactElement;
|
|
6
|
+
export {};
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Reducer } from '@reduxjs/toolkit';
|
|
2
|
+
import type { SoundingsCollection } from '@opengeoweb/shared';
|
|
3
|
+
import type { SoundingsStore, RegisterSoundingsPresetPayload, UpdateLocationPayload, UpdateSourcePayload, UpdateTimePayload, UpdateDiagramTypePayload, ToggleLocationMarkersPayload, AddSoundingPanelsPayload, ChangeSoundingPanelOrderPayload, SoundingsState } from './types';
|
|
3
4
|
export declare const initialSoundingsState: SoundingsStore;
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
export declare const soundingsActions: {
|
|
6
|
+
setSoundingsCollections: import("@reduxjs/toolkit").ActionCreatorWithPayload<SoundingsCollection[], string>;
|
|
7
|
+
registerSoundingsPanel: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
|
+
panelId: string;
|
|
9
|
+
}, "soundings/registerSoundingsPanel">;
|
|
10
|
+
registerSoundingsPreset: import("@reduxjs/toolkit").ActionCreatorWithPayload<RegisterSoundingsPresetPayload, "soundings/registerSoundingsPreset">;
|
|
11
|
+
updateSelectedSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateSourcePayload, "soundings/updateSelectedSource">;
|
|
12
|
+
updateSelectedLocation: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateLocationPayload, "soundings/updateSelectedLocation">;
|
|
13
|
+
updateSelectedTime: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateTimePayload, "soundings/updateSelectedTime">;
|
|
14
|
+
updateDiagramType: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateDiagramTypePayload, "soundings/updateDiagramType">;
|
|
15
|
+
toggleLocationMarkers: import("@reduxjs/toolkit").ActionCreatorWithPayload<ToggleLocationMarkersPayload, "soundings/toggleLocationMarkers">;
|
|
16
|
+
addSoundingPanelsFromPreset: import("@reduxjs/toolkit").ActionCreatorWithPayload<AddSoundingPanelsPayload, "soundings/addSoundingPanelsFromPreset">;
|
|
17
|
+
changeSoundingPanelOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChangeSoundingPanelOrderPayload, "soundings/changeSoundingPanelOrder">;
|
|
18
|
+
toggleSoundingPanelVisibility: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
id: string;
|
|
20
|
+
panelId?: string;
|
|
21
|
+
origin?: string;
|
|
22
|
+
}, "soundings/toggleSoundingPanelVisibility">;
|
|
23
|
+
};
|
|
24
|
+
export declare const soundingsReducer: Reducer<SoundingsState>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { SoundingsCollection, SourceSelection } from '@opengeoweb/shared';
|
|
2
|
+
import type { SoundingsModuleState, SoundingsStore, SourceType } from './types';
|
|
3
|
+
export declare const getSoundingsCollections: (store: SoundingsModuleState) => SoundingsCollection[];
|
|
4
|
+
export declare const getSourceSelections: ((state: SoundingsModuleState, panelId?: string | undefined) => Record<string, SourceSelection>) & {
|
|
3
5
|
clearCache: () => void;
|
|
4
6
|
resultsCount: () => number;
|
|
5
7
|
resetResultsCount: () => void;
|
|
@@ -11,7 +13,7 @@ export declare const getSourceSelections: ((state: SoundingsModuleState) => Reco
|
|
|
11
13
|
resetResultsCount: () => void;
|
|
12
14
|
};
|
|
13
15
|
lastResult: () => Record<string, SourceSelection>;
|
|
14
|
-
dependencies: [(store: SoundingsModuleState) => SoundingsStore];
|
|
16
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
15
17
|
recomputations: () => number;
|
|
16
18
|
resetRecomputations: () => void;
|
|
17
19
|
dependencyRecomputations: () => number;
|
|
@@ -20,19 +22,19 @@ export declare const getSourceSelections: ((state: SoundingsModuleState) => Reco
|
|
|
20
22
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
21
23
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
22
24
|
};
|
|
23
|
-
export declare const getLocationSelections: ((state: SoundingsModuleState) => Record<string, string | import("
|
|
25
|
+
export declare const getLocationSelections: ((state: SoundingsModuleState, panelId?: string | undefined) => Record<string, string | import("@opengeoweb/shared").Coordinates | undefined>) & {
|
|
24
26
|
clearCache: () => void;
|
|
25
27
|
resultsCount: () => number;
|
|
26
28
|
resetResultsCount: () => void;
|
|
27
29
|
} & {
|
|
28
|
-
resultFunc: (resultFuncArgs_0: SoundingsStore) => Record<string, string | import("
|
|
29
|
-
memoizedResultFunc: ((resultFuncArgs_0: SoundingsStore) => Record<string, string | import("
|
|
30
|
+
resultFunc: (resultFuncArgs_0: SoundingsStore) => Record<string, string | import("@opengeoweb/shared").Coordinates | undefined>;
|
|
31
|
+
memoizedResultFunc: ((resultFuncArgs_0: SoundingsStore) => Record<string, string | import("@opengeoweb/shared").Coordinates | undefined>) & {
|
|
30
32
|
clearCache: () => void;
|
|
31
33
|
resultsCount: () => number;
|
|
32
34
|
resetResultsCount: () => void;
|
|
33
35
|
};
|
|
34
|
-
lastResult: () => Record<string, string | import("
|
|
35
|
-
dependencies: [(store: SoundingsModuleState) => SoundingsStore];
|
|
36
|
+
lastResult: () => Record<string, string | import("@opengeoweb/shared").Coordinates | undefined>;
|
|
37
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
36
38
|
recomputations: () => number;
|
|
37
39
|
resetRecomputations: () => void;
|
|
38
40
|
dependencyRecomputations: () => number;
|
|
@@ -41,7 +43,7 @@ export declare const getLocationSelections: ((state: SoundingsModuleState) => Re
|
|
|
41
43
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
42
44
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
43
45
|
};
|
|
44
|
-
export declare const getSelectedTime: ((state: SoundingsModuleState) => string) & {
|
|
46
|
+
export declare const getSelectedTime: ((state: SoundingsModuleState, panelId?: string | undefined) => string) & {
|
|
45
47
|
clearCache: () => void;
|
|
46
48
|
resultsCount: () => number;
|
|
47
49
|
resetResultsCount: () => void;
|
|
@@ -53,7 +55,7 @@ export declare const getSelectedTime: ((state: SoundingsModuleState) => string)
|
|
|
53
55
|
resetResultsCount: () => void;
|
|
54
56
|
};
|
|
55
57
|
lastResult: () => string;
|
|
56
|
-
dependencies: [(store: SoundingsModuleState) => SoundingsStore];
|
|
58
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
57
59
|
recomputations: () => number;
|
|
58
60
|
resetRecomputations: () => void;
|
|
59
61
|
dependencyRecomputations: () => number;
|
|
@@ -62,7 +64,49 @@ export declare const getSelectedTime: ((state: SoundingsModuleState) => string)
|
|
|
62
64
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
63
65
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
64
66
|
};
|
|
65
|
-
export declare const
|
|
67
|
+
export declare const getDiagramType: ((state: SoundingsModuleState, panelId?: string | undefined) => "SKEWT" | "BIJVOET" | "EMAGRAM") & {
|
|
68
|
+
clearCache: () => void;
|
|
69
|
+
resultsCount: () => number;
|
|
70
|
+
resetResultsCount: () => void;
|
|
71
|
+
} & {
|
|
72
|
+
resultFunc: (resultFuncArgs_0: SoundingsStore) => "SKEWT" | "BIJVOET" | "EMAGRAM";
|
|
73
|
+
memoizedResultFunc: ((resultFuncArgs_0: SoundingsStore) => "SKEWT" | "BIJVOET" | "EMAGRAM") & {
|
|
74
|
+
clearCache: () => void;
|
|
75
|
+
resultsCount: () => number;
|
|
76
|
+
resetResultsCount: () => void;
|
|
77
|
+
};
|
|
78
|
+
lastResult: () => "SKEWT" | "BIJVOET" | "EMAGRAM";
|
|
79
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
80
|
+
recomputations: () => number;
|
|
81
|
+
resetRecomputations: () => void;
|
|
82
|
+
dependencyRecomputations: () => number;
|
|
83
|
+
resetDependencyRecomputations: () => void;
|
|
84
|
+
} & {
|
|
85
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
86
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
87
|
+
};
|
|
88
|
+
export declare const getShouldHideLocationMarkers: ((state: SoundingsModuleState, panelId?: string | undefined) => boolean) & {
|
|
89
|
+
clearCache: () => void;
|
|
90
|
+
resultsCount: () => number;
|
|
91
|
+
resetResultsCount: () => void;
|
|
92
|
+
} & {
|
|
93
|
+
resultFunc: (resultFuncArgs_0: SoundingsStore) => boolean;
|
|
94
|
+
memoizedResultFunc: ((resultFuncArgs_0: SoundingsStore) => boolean) & {
|
|
95
|
+
clearCache: () => void;
|
|
96
|
+
resultsCount: () => number;
|
|
97
|
+
resetResultsCount: () => void;
|
|
98
|
+
};
|
|
99
|
+
lastResult: () => boolean;
|
|
100
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
101
|
+
recomputations: () => number;
|
|
102
|
+
resetRecomputations: () => void;
|
|
103
|
+
dependencyRecomputations: () => number;
|
|
104
|
+
resetDependencyRecomputations: () => void;
|
|
105
|
+
} & {
|
|
106
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
107
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
108
|
+
};
|
|
109
|
+
export declare const getSelectedSources: ((state: SoundingsModuleState, panelId?: string | undefined) => SourceType[]) & {
|
|
66
110
|
clearCache: () => void;
|
|
67
111
|
resultsCount: () => number;
|
|
68
112
|
resetResultsCount: () => void;
|
|
@@ -74,7 +118,7 @@ export declare const getSelectedSources: ((state: SoundingsModuleState) => Sourc
|
|
|
74
118
|
resetResultsCount: () => void;
|
|
75
119
|
};
|
|
76
120
|
lastResult: () => SourceType[];
|
|
77
|
-
dependencies: [(store: SoundingsModuleState) => SoundingsStore];
|
|
121
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
78
122
|
recomputations: () => number;
|
|
79
123
|
resetRecomputations: () => void;
|
|
80
124
|
dependencyRecomputations: () => number;
|
|
@@ -83,7 +127,7 @@ export declare const getSelectedSources: ((state: SoundingsModuleState) => Sourc
|
|
|
83
127
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
84
128
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
85
129
|
};
|
|
86
|
-
export declare const getSelectedSourcesAmount: ((state: SoundingsModuleState) => number) & {
|
|
130
|
+
export declare const getSelectedSourcesAmount: ((state: SoundingsModuleState, panelId?: string | undefined) => number) & {
|
|
87
131
|
clearCache: () => void;
|
|
88
132
|
resultsCount: () => number;
|
|
89
133
|
resetResultsCount: () => void;
|
|
@@ -95,7 +139,7 @@ export declare const getSelectedSourcesAmount: ((state: SoundingsModuleState) =>
|
|
|
95
139
|
resetResultsCount: () => void;
|
|
96
140
|
};
|
|
97
141
|
lastResult: () => number;
|
|
98
|
-
dependencies: [((state: SoundingsModuleState) => SourceType[]) & {
|
|
142
|
+
dependencies: [((state: SoundingsModuleState, panelId?: string | undefined) => SourceType[]) & {
|
|
99
143
|
clearCache: () => void;
|
|
100
144
|
resultsCount: () => number;
|
|
101
145
|
resetResultsCount: () => void;
|
|
@@ -107,7 +151,7 @@ export declare const getSelectedSourcesAmount: ((state: SoundingsModuleState) =>
|
|
|
107
151
|
resetResultsCount: () => void;
|
|
108
152
|
};
|
|
109
153
|
lastResult: () => SourceType[];
|
|
110
|
-
dependencies: [(store: SoundingsModuleState) => SoundingsStore];
|
|
154
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
111
155
|
recomputations: () => number;
|
|
112
156
|
resetRecomputations: () => void;
|
|
113
157
|
dependencyRecomputations: () => number;
|
|
@@ -124,7 +168,7 @@ export declare const getSelectedSourcesAmount: ((state: SoundingsModuleState) =>
|
|
|
124
168
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
125
169
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
126
170
|
};
|
|
127
|
-
export declare const getSelectedSourcesIds: ((state: SoundingsModuleState) => string[]) & {
|
|
171
|
+
export declare const getSelectedSourcesIds: ((state: SoundingsModuleState, panelId?: string | undefined) => string[]) & {
|
|
128
172
|
clearCache: () => void;
|
|
129
173
|
resultsCount: () => number;
|
|
130
174
|
resetResultsCount: () => void;
|
|
@@ -136,7 +180,7 @@ export declare const getSelectedSourcesIds: ((state: SoundingsModuleState) => st
|
|
|
136
180
|
resetResultsCount: () => void;
|
|
137
181
|
};
|
|
138
182
|
lastResult: () => string[];
|
|
139
|
-
dependencies: [((state: SoundingsModuleState) => SourceType[]) & {
|
|
183
|
+
dependencies: [((state: SoundingsModuleState, panelId?: string | undefined) => SourceType[]) & {
|
|
140
184
|
clearCache: () => void;
|
|
141
185
|
resultsCount: () => number;
|
|
142
186
|
resetResultsCount: () => void;
|
|
@@ -148,7 +192,7 @@ export declare const getSelectedSourcesIds: ((state: SoundingsModuleState) => st
|
|
|
148
192
|
resetResultsCount: () => void;
|
|
149
193
|
};
|
|
150
194
|
lastResult: () => SourceType[];
|
|
151
|
-
dependencies: [(store: SoundingsModuleState) => SoundingsStore];
|
|
195
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
152
196
|
recomputations: () => number;
|
|
153
197
|
resetRecomputations: () => void;
|
|
154
198
|
dependencyRecomputations: () => number;
|
|
@@ -165,7 +209,28 @@ export declare const getSelectedSourcesIds: ((state: SoundingsModuleState) => st
|
|
|
165
209
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
166
210
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
167
211
|
};
|
|
168
|
-
export declare const
|
|
212
|
+
export declare const getSoundingsPreset: ((state: SoundingsModuleState, panelId?: string | undefined) => SoundingsStore) & {
|
|
213
|
+
clearCache: () => void;
|
|
214
|
+
resultsCount: () => number;
|
|
215
|
+
resetResultsCount: () => void;
|
|
216
|
+
} & {
|
|
217
|
+
resultFunc: (resultFuncArgs_0: SoundingsStore) => SoundingsStore;
|
|
218
|
+
memoizedResultFunc: ((resultFuncArgs_0: SoundingsStore) => SoundingsStore) & {
|
|
219
|
+
clearCache: () => void;
|
|
220
|
+
resultsCount: () => number;
|
|
221
|
+
resetResultsCount: () => void;
|
|
222
|
+
};
|
|
223
|
+
lastResult: () => SoundingsStore;
|
|
224
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
225
|
+
recomputations: () => number;
|
|
226
|
+
resetRecomputations: () => void;
|
|
227
|
+
dependencyRecomputations: () => number;
|
|
228
|
+
resetDependencyRecomputations: () => void;
|
|
229
|
+
} & {
|
|
230
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
231
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
232
|
+
};
|
|
233
|
+
export declare const getSoundingPanelsInOrder: ((state: SoundingsModuleState, panelId?: string | undefined) => import("./types").SoundingPanel[]) & {
|
|
169
234
|
clearCache: () => void;
|
|
170
235
|
resultsCount: () => number;
|
|
171
236
|
resetResultsCount: () => void;
|
|
@@ -177,7 +242,7 @@ export declare const getSoundingPanelsInOrder: ((state: SoundingsModuleState) =>
|
|
|
177
242
|
resetResultsCount: () => void;
|
|
178
243
|
};
|
|
179
244
|
lastResult: () => import("./types").SoundingPanel[];
|
|
180
|
-
dependencies: [(store: SoundingsModuleState) => SoundingsStore];
|
|
245
|
+
dependencies: [(store: SoundingsModuleState, panelId?: string) => SoundingsStore];
|
|
181
246
|
recomputations: () => number;
|
|
182
247
|
resetRecomputations: () => void;
|
|
183
248
|
dependencyRecomputations: () => number;
|
package/src/lib/store/store.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Store } from '@reduxjs/toolkit';
|
|
2
2
|
import type { UIModuleState, WebMapStateModuleState } from '@opengeoweb/store';
|
|
3
3
|
import type { SoundingsModuleState } from './types';
|
|
4
|
+
export * as soundingsSelectors from './selectors';
|
|
5
|
+
export { soundingsReducer, soundingsActions } from './reducer';
|
|
6
|
+
export type { SoundingsModuleState, SoundingsStore } from './types';
|
|
4
7
|
export declare const soundingsReducersMap: {
|
|
5
8
|
webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState>;
|
|
6
9
|
services: import("redux").Reducer<import("dist/libs/store/src/store/map/types").ServiceState>;
|
|
@@ -15,6 +18,6 @@ export declare const soundingsReducersMap: {
|
|
|
15
18
|
}, import("redux").UnknownAction, Partial<{
|
|
16
19
|
auth: import("dist/libs/store/src/store/common/auth/types").AuthStore | undefined;
|
|
17
20
|
}>>;
|
|
18
|
-
soundings: import("redux").Reducer<import("./types").
|
|
21
|
+
soundings: import("redux").Reducer<import("./types").SoundingsState>;
|
|
19
22
|
};
|
|
20
23
|
export declare const createMockStore: (mockState?: SoundingsModuleState | WebMapStateModuleState | UIModuleState) => Store;
|
package/src/lib/store/types.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { Coordinates, SoundingsCollection, SourceSelection } from '@opengeoweb/shared';
|
|
2
|
+
import type { CoreAppStore } from '@opengeoweb/store';
|
|
3
|
+
export declare enum SoundingsActionOrigin {
|
|
4
|
+
soundingsManager = "soundingsManager",
|
|
5
|
+
soundingsComponent = "soundingsComponent"
|
|
6
|
+
}
|
|
1
7
|
export interface SourceType {
|
|
2
8
|
collectionId: string;
|
|
3
9
|
url: string;
|
|
@@ -6,27 +12,37 @@ export interface SourceType {
|
|
|
6
12
|
parameterMappings?: Record<string, string>;
|
|
7
13
|
name?: string;
|
|
8
14
|
}
|
|
9
|
-
export interface
|
|
15
|
+
export interface SoundingsPayload {
|
|
16
|
+
panelId?: string;
|
|
17
|
+
origin?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface UpdateSourcePayload extends SoundingsPayload {
|
|
10
20
|
sourceId: string;
|
|
11
21
|
value: SourceSelection;
|
|
12
22
|
}
|
|
13
|
-
export interface
|
|
14
|
-
url: string;
|
|
15
|
-
instanceId?: string;
|
|
16
|
-
isChecked?: boolean;
|
|
17
|
-
verticalRange?: string;
|
|
18
|
-
parameterMappings?: Record<string, string>;
|
|
19
|
-
name?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface UpdateLocationPayload {
|
|
23
|
+
export interface UpdateLocationPayload extends SoundingsPayload {
|
|
22
24
|
sourceId: string;
|
|
23
25
|
location: string | Coordinates | undefined;
|
|
24
26
|
}
|
|
25
|
-
export interface UpdateTimePayload {
|
|
27
|
+
export interface UpdateTimePayload extends SoundingsPayload {
|
|
26
28
|
selectedTime: string;
|
|
27
29
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
export interface UpdateDiagramTypePayload extends SoundingsPayload {
|
|
31
|
+
diagramType: 'SKEWT' | 'BIJVOET' | 'EMAGRAM';
|
|
32
|
+
}
|
|
33
|
+
export interface ToggleLocationMarkersPayload extends SoundingsPayload {
|
|
34
|
+
shouldHideLocationMarkers: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface RegisterSoundingsPresetPayload extends SoundingsPayload {
|
|
37
|
+
preset: SoundingsStore;
|
|
38
|
+
}
|
|
39
|
+
export interface AddSoundingPanelsPayload extends SoundingsPayload {
|
|
40
|
+
panels: SoundingPanels;
|
|
41
|
+
}
|
|
42
|
+
export interface ChangeSoundingPanelOrderPayload extends SoundingsPayload {
|
|
43
|
+
newOrderOfIds: string[];
|
|
44
|
+
}
|
|
45
|
+
export type SoundingsRootState = CoreAppStore & SoundingsModuleState;
|
|
30
46
|
export interface SoundingPanel {
|
|
31
47
|
id: string;
|
|
32
48
|
name: string;
|
|
@@ -42,9 +58,18 @@ export interface SoundingsStore {
|
|
|
42
58
|
/** key: sourceId, value: locationId or position coordinates */
|
|
43
59
|
selectedLocations: Record<string, string | Coordinates | undefined>;
|
|
44
60
|
/** ISO date, e.g., 2025-01-02T12:00:00.000Z */
|
|
45
|
-
selectedTime
|
|
61
|
+
selectedTime?: string;
|
|
62
|
+
/** Diagram type: SKEWT, BIJVOET, or EMAGRAM */
|
|
63
|
+
diagramType?: 'SKEWT' | 'BIJVOET' | 'EMAGRAM';
|
|
46
64
|
soundingPanels: SoundingPanels;
|
|
65
|
+
/** Whether to hide location markers on the map */
|
|
66
|
+
shouldHideLocationMarkers?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface SoundingsState {
|
|
69
|
+
byId: Record<string, SoundingsStore>;
|
|
70
|
+
registeredPanelIds?: string[];
|
|
71
|
+
soundingsCollections: SoundingsCollection[];
|
|
47
72
|
}
|
|
48
73
|
export interface SoundingsModuleState {
|
|
49
|
-
soundings
|
|
74
|
+
soundings?: SoundingsState;
|
|
50
75
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SoundingsModuleState } from './types';
|
|
2
|
+
type PanelStateLike = SoundingsModuleState['soundings'];
|
|
3
|
+
export declare const getRegisteredPanelIds: (state: PanelStateLike | undefined) => string[];
|
|
4
|
+
export declare const isRegisteredPanelId: (state: PanelStateLike | undefined, panelId?: string) => boolean;
|
|
5
|
+
export declare const getPanelIdFromAction: (action: {
|
|
6
|
+
payload?: {
|
|
7
|
+
panelId?: string;
|
|
8
|
+
};
|
|
9
|
+
}) => string | undefined;
|
|
10
|
+
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SoundingsStore } from '../store/types';
|
|
2
2
|
export type SoundingsComponentType = 'Soundings';
|
|
3
3
|
export interface SoundingsLookUpPayload {
|
|
4
4
|
componentType: SoundingsComponentType;
|
|
5
5
|
id: string;
|
|
6
6
|
title?: string;
|
|
7
|
-
|
|
8
|
-
initialProps: Record<string, unknown>;
|
|
7
|
+
initialProps: SoundingsStore;
|
|
9
8
|
}
|
|
10
9
|
export declare const soundingsLookUp: (payload: SoundingsLookUpPayload) => React.JSX.Element | null;
|