@opengeoweb/core 10.1.0 → 11.0.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/README.md +3 -16
- package/index.esm.js +572 -227
- package/package.json +6 -2
- package/src/lib/components/Providers/Providers.d.ts +0 -2
- package/src/lib/components/Search/MyMapLocation.d.ts +5 -6
- package/src/lib/components/Search/SearchDialog.d.ts +4 -1
- package/src/lib/components/Search/{SearchControl.stories.d.ts → SearchDialog.stories.d.ts} +4 -4
- package/src/lib/components/Search/SearchDialogConnect.d.ts +5 -0
- package/src/lib/components/Search/SearchDialogConnect.spec.d.ts +1 -0
- package/src/lib/components/Search/SearchDialogConnect.stories.d.ts +7 -0
- package/src/lib/components/Search/index.d.ts +1 -1
- package/src/lib/components/Search/types.d.ts +13 -0
- package/src/lib/components/Search/utils.d.ts +8 -0
- package/src/lib/components/SyncGroups/SimpleTimeSliderConnect.d.ts +2 -2
- package/src/lib/components/SyncGroups/SyncGroupViewer.d.ts +1 -1
- package/src/lib/components/TimeSliderConnect/TimeSliderConnect.d.ts +1 -1
- package/src/lib/components/TimeSliderConnect/TimeSliderLegendConnect.d.ts +4 -0
- package/src/lib/store/index.d.ts +1 -0
- package/src/lib/store/store.d.ts +13 -0
- package/src/lib/utils/location-api/api.d.ts +3 -0
- package/src/lib/utils/location-api/fakeApi.d.ts +70 -0
- package/src/lib/utils/location-api/hooks.d.ts +4 -0
- package/src/lib/utils/testUtils.d.ts +1 -4
- package/src/lib/components/Search/SearchControlConnect.d.ts +0 -5
- /package/src/lib/components/{Search/SearchControlConnect.spec.d.ts → MultiMapViewConnect/HarmoniePresets/HarmonieTempAndPrecipPreset.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "GeoWeb Core library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
"react-i18next": "^15.1.1",
|
|
30
30
|
"dompurify": "^3.0.6",
|
|
31
31
|
"@mui/material": "^6.1.1",
|
|
32
|
-
"@sentry/react": "^8.34.0"
|
|
32
|
+
"@sentry/react": "^8.34.0",
|
|
33
|
+
"@opengeoweb/authentication": "*",
|
|
34
|
+
"@tanstack/react-query": "^5.62.7",
|
|
35
|
+
"@opengeoweb/api": "*",
|
|
36
|
+
"msw": "^1.3.3"
|
|
33
37
|
},
|
|
34
38
|
"peerDependencies": {
|
|
35
39
|
"react": "18",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Theme } from '@mui/material';
|
|
3
|
-
import { ThemeProviderProps } from '@opengeoweb/theme';
|
|
4
3
|
import { Store } from '@reduxjs/toolkit';
|
|
5
4
|
interface CoreThemeProviderProps {
|
|
6
5
|
children?: React.ReactNode;
|
|
@@ -15,7 +14,6 @@ interface CoreTranslationWrapperProps {
|
|
|
15
14
|
* @returns
|
|
16
15
|
*/
|
|
17
16
|
export declare const CoreThemeProvider: React.FC<CoreThemeProviderProps>;
|
|
18
|
-
export declare const ThemeWrapperWithModules: React.FC<ThemeProviderProps>;
|
|
19
17
|
interface CoreThemeStoreProviderProps extends CoreThemeProviderProps {
|
|
20
18
|
store: Store;
|
|
21
19
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { LocationDetail } from './types';
|
|
2
3
|
export interface MyMapLocationProps {
|
|
3
|
-
mapId
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
setIsLoading: (value: boolean) => void;
|
|
7
|
-
setHasFailed: (value: boolean) => void;
|
|
4
|
+
mapId?: string;
|
|
5
|
+
isSelected?: boolean;
|
|
6
|
+
onUpdateMyLocation?: (location?: LocationDetail) => void;
|
|
8
7
|
}
|
|
9
|
-
export declare const MY_LOCATION = "
|
|
8
|
+
export declare const MY_LOCATION = "My location";
|
|
10
9
|
export declare const MyMapLocation: React.FC<MyMapLocationProps>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { LocationDetail } from './types';
|
|
2
3
|
export interface SearchDialogProps {
|
|
3
4
|
isOpen: boolean;
|
|
4
|
-
onClose: () => void;
|
|
5
5
|
mapId?: string;
|
|
6
|
+
onSelectLocation?: (location?: LocationDetail) => void;
|
|
7
|
+
onUpdateMyLocation?: (location?: LocationDetail) => void;
|
|
8
|
+
isMyLocationSelected?: boolean;
|
|
6
9
|
}
|
|
7
10
|
export declare const SearchDialog: React.FC<SearchDialogProps>;
|
|
@@ -3,11 +3,11 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const SearchDialogLight: {
|
|
7
7
|
(): React.ReactElement;
|
|
8
|
-
|
|
8
|
+
tags: string[];
|
|
9
9
|
};
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const SearchDialogDark: {
|
|
11
11
|
(): React.ReactElement;
|
|
12
|
-
|
|
12
|
+
tags: string[];
|
|
13
13
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { SearchControlButtonConnect } from './SearchControlButtonConnect';
|
|
2
|
-
export {
|
|
2
|
+
export { SearchDialogConnect } from './SearchDialogConnect';
|
|
3
3
|
export { SearchDialog } from './SearchDialog';
|
|
4
4
|
export { MyMapLocation } from './MyMapLocation';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MapDrawDrawFunctionArgs } from '@opengeoweb/webmap-react';
|
|
2
|
+
import { GeoJsonProperties } from 'geojson';
|
|
3
|
+
import { LocationDetail } from './types';
|
|
4
|
+
export declare const myLocationDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
5
|
+
export declare const selectedLocationDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
6
|
+
export declare const geometryStyling: GeoJsonProperties;
|
|
7
|
+
export declare const hoverDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
8
|
+
export declare const useDrawOnMap: (mapId: string, drawFunction: (args: MapDrawDrawFunctionArgs) => void) => [(location?: LocationDetail) => void];
|
|
@@ -11,8 +11,8 @@ export declare const SimpleTimeSliderConnect: import("react-redux").ConnectedCom
|
|
|
11
11
|
id: string;
|
|
12
12
|
timeValue?: string | null | undefined;
|
|
13
13
|
setTime?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/types").SetTimePayload, string> | undefined;
|
|
14
|
-
syncGroupAddSource?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/
|
|
15
|
-
syncGroupRemoveSource?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/
|
|
14
|
+
syncGroupAddSource?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/syncGroups/types").SyncGroupsAddSourcePayload, "synchronizationGroupsReducer/syncGroupAddSource"> | undefined;
|
|
15
|
+
syncGroupRemoveSource?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/syncGroups/types").SyncGroupRemoveSourcePayload, "synchronizationGroupsReducer/syncGroupRemoveSource"> | undefined;
|
|
16
16
|
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
17
17
|
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
18
18
|
}>;
|
|
@@ -5,7 +5,7 @@ interface TimeSliderConnectProps {
|
|
|
5
5
|
sourceId: string;
|
|
6
6
|
mapId: string;
|
|
7
7
|
isAlwaysVisible?: boolean;
|
|
8
|
-
mapWindowRef?: React.MutableRefObject<null>;
|
|
8
|
+
mapWindowRef?: React.MutableRefObject<HTMLElement | null>;
|
|
9
9
|
}
|
|
10
10
|
export declare const TimeSliderConnect: React.FC<TimeSliderConnectProps>;
|
|
11
11
|
export {};
|
|
@@ -5,6 +5,10 @@ interface TimeSliderLegendConnectProps {
|
|
|
5
5
|
unfilteredSelectedTime: number;
|
|
6
6
|
setUnfilteredSelectedTime: (unfilteredSelectedTime: number) => void;
|
|
7
7
|
mapWindowRef?: React.MutableRefObject<HTMLElement | null>;
|
|
8
|
+
adjustSelectedTimeOnWheel?: ({ event, deltaY, }: {
|
|
9
|
+
event: WheelEvent | KeyboardEvent;
|
|
10
|
+
deltaY: number;
|
|
11
|
+
}) => void;
|
|
8
12
|
}
|
|
9
13
|
export declare const TimeSliderLegendConnect: React.FC<TimeSliderLegendConnectProps>;
|
|
10
14
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './store';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SnackbarModuleStore } from '@opengeoweb/snackbar';
|
|
2
|
+
import { WebMapStateModuleState, SynchronizationGroupModuleState, UIModuleState } from '@opengeoweb/store';
|
|
3
|
+
import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore';
|
|
4
|
+
export declare const coreReducerMap: {
|
|
5
|
+
webmap: import("redux").Reducer<import("dist/libs/store/src/store/map/types").WebMapState, import("redux").AnyAction>;
|
|
6
|
+
services: import("redux").Reducer<import("dist/libs/store/src/store/map/types").ServiceState, import("redux").AnyAction>;
|
|
7
|
+
layers: import("redux").Reducer<import("dist/libs/store/src/store/map/types").LayerState, import("redux").AnyAction>;
|
|
8
|
+
syncGroups: import("redux").Reducer<import("dist/libs/store/src/store/generic/syncGroups/types").SynchronizationGroupState, import("redux").AnyAction>;
|
|
9
|
+
ui: import("redux").Reducer<import("dist/libs/store/src/store/ui/types").UIStoreType, import("redux").AnyAction>;
|
|
10
|
+
snackbar: import("redux").Reducer<import("dist/libs/snackbar/src/lib/store/types").SnackbarState, import("redux").AnyAction>;
|
|
11
|
+
};
|
|
12
|
+
export declare const coreMiddlewares: import("@reduxjs/toolkit").ListenerMiddleware<import("@opengeoweb/store").CoreAppStore, import("@reduxjs/toolkit").ThunkDispatch<import("@opengeoweb/store").CoreAppStore, unknown, import("redux").AnyAction>, unknown>[];
|
|
13
|
+
export declare const createMockStore: (mockState?: WebMapStateModuleState | SynchronizationGroupModuleState | UIModuleState | SnackbarModuleStore) => ToolkitStore;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const fakeLocationList: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
source: string;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const fakeLocationDetailList: ({
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
source: string;
|
|
10
|
+
lon: number;
|
|
11
|
+
lat: number;
|
|
12
|
+
geometry?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
lat: number;
|
|
15
|
+
lon: number;
|
|
16
|
+
source: string;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
geometry: {
|
|
20
|
+
type: string;
|
|
21
|
+
geometry: {
|
|
22
|
+
type: string;
|
|
23
|
+
coordinates: number[];
|
|
24
|
+
};
|
|
25
|
+
properties?: undefined;
|
|
26
|
+
};
|
|
27
|
+
} | {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
source: string;
|
|
31
|
+
lat: number;
|
|
32
|
+
lon: number;
|
|
33
|
+
geometry: {
|
|
34
|
+
type: string;
|
|
35
|
+
properties: {};
|
|
36
|
+
geometry: {
|
|
37
|
+
type: string;
|
|
38
|
+
coordinates: number[][];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
source: string;
|
|
45
|
+
lat: number;
|
|
46
|
+
lon: number;
|
|
47
|
+
geometry: {
|
|
48
|
+
type: string;
|
|
49
|
+
geometry: {
|
|
50
|
+
type: string;
|
|
51
|
+
coordinates: number[][][];
|
|
52
|
+
};
|
|
53
|
+
properties: {};
|
|
54
|
+
};
|
|
55
|
+
} | {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
source: string;
|
|
59
|
+
lat: number;
|
|
60
|
+
lon: number;
|
|
61
|
+
geometry: {
|
|
62
|
+
type: string;
|
|
63
|
+
geometry: {
|
|
64
|
+
type: string;
|
|
65
|
+
coordinates: number[][][][];
|
|
66
|
+
};
|
|
67
|
+
properties: {};
|
|
68
|
+
};
|
|
69
|
+
})[];
|
|
70
|
+
export declare const locationApiEndpoints: import("msw").RestHandler<import("msw").MockedRequest<import("msw").DefaultBodyType>>[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { LocationDetail, LocationListResult } from '../../components/Search/types';
|
|
3
|
+
export declare const useLocationList: (search: string) => UseQueryResult<LocationListResult[]>;
|
|
4
|
+
export declare const useLocationDetail: (id?: string, source?: string) => UseQueryResult<LocationDetail>;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { WebMapStateModuleState, syncGroupsTypes, uiTypes } from '@opengeoweb/store';
|
|
3
|
-
import { Store } from '@reduxjs/toolkit';
|
|
1
|
+
import { WebMapStateModuleState } from '@opengeoweb/store';
|
|
4
2
|
export declare const mockStateMapWithDimensions: (layer: import("dist/libs/store/src/store/map/types").Layer, mapId: string) => WebMapStateModuleState;
|
|
5
3
|
export declare const mockStateMapWithDimensionsWithoutLayers: (mapId: string) => WebMapStateModuleState;
|
|
6
|
-
export declare const createMockStore: (mockState?: WebMapStateModuleState & snackbarTypes.SnackbarModuleStore & syncGroupsTypes.SynchronizationGroupModuleState & uiTypes.UIModuleState) => Store;
|