@opengeoweb/core 10.0.0 → 10.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/README.md +2 -2
- package/index.esm.js +1056 -764
- package/package.json +6 -2
- package/src/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRow.d.ts +2 -3
- package/src/lib/components/MapViewConnect/MapViewConnect.d.ts +11 -3
- 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 +6 -0
- package/src/lib/components/SyncGroups/SimpleTimeSliderConnect.d.ts +2 -2
- package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/AutoUpdateButtonConnect.d.ts +2 -2
- package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/PlayButtonConnect.d.ts +4 -4
- package/src/lib/components/TimeSliderConnect/TimeSliderCurrentTimeBoxConnect.d.ts +1 -1
- package/src/lib/utils/defaultConfigurations.d.ts +3 -3
- package/src/lib/utils/location-api/api.d.ts +3 -0
- package/src/lib/utils/location-api/fakeApi.d.ts +40 -0
- package/src/lib/utils/location-api/hooks.d.ts +9 -0
- package/src/lib/utils/testUtils.d.ts +2 -2
- 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": "10.
|
|
3
|
+
"version": "10.2.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
|
+
"@tanstack/react-query": "^5.62.7",
|
|
34
|
+
"@opengeoweb/authentication": "*",
|
|
35
|
+
"@opengeoweb/api": "*",
|
|
36
|
+
"msw": "^1.3.3"
|
|
33
37
|
},
|
|
34
38
|
"peerDependencies": {
|
|
35
39
|
"react": "18",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { mapTypes, layerTypes } from '@opengeoweb/store';
|
|
3
3
|
import type { serviceTypes } from '@opengeoweb/store';
|
|
4
|
-
type LayerRowProps = Omit<LayerRowUnstyledProps, 'className'>;
|
|
5
4
|
interface LayerRowUnstyledProps {
|
|
6
5
|
layerId?: string;
|
|
7
6
|
layer?: layerTypes.Layer;
|
|
@@ -58,10 +57,10 @@ interface LayerRowUnstyledProps {
|
|
|
58
57
|
isEnabled?: boolean;
|
|
59
58
|
dragHandle?: React.ReactElement;
|
|
60
59
|
isLayerMissing?: boolean;
|
|
61
|
-
className
|
|
60
|
+
className?: string;
|
|
62
61
|
collapsedColumns?: Record<string, boolean>;
|
|
63
62
|
}
|
|
64
|
-
declare const LayerRow: import("@emotion/styled").StyledComponent<
|
|
63
|
+
declare const LayerRow: import("@emotion/styled").StyledComponent<LayerRowUnstyledProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
65
64
|
isEnabled?: boolean | undefined;
|
|
66
65
|
}, {}, {}>;
|
|
67
66
|
export default LayerRow;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MapViewProps } from '@opengeoweb/webmap-react';
|
|
3
|
+
export interface MapControls {
|
|
4
|
+
mapControlsPositionTop?: number;
|
|
5
|
+
search?: boolean;
|
|
6
|
+
zoomControls?: boolean;
|
|
7
|
+
layerManagerAndLegend?: boolean;
|
|
8
|
+
multiLegend?: boolean;
|
|
9
|
+
dimensionSelect?: boolean;
|
|
10
|
+
getFeatureInfo?: boolean;
|
|
11
|
+
additionalMapControls?: React.ReactNode;
|
|
12
|
+
}
|
|
3
13
|
export interface MapViewConnectProps extends MapViewProps {
|
|
4
14
|
mapId: string;
|
|
5
15
|
displayTimeInMap?: boolean;
|
|
6
|
-
controls?:
|
|
7
|
-
zoomControls?: boolean;
|
|
8
|
-
};
|
|
16
|
+
controls?: MapControls;
|
|
9
17
|
showScaleBar?: boolean;
|
|
10
18
|
children?: React.ReactNode;
|
|
11
19
|
showLayerInfo?: boolean;
|
|
@@ -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,6 @@
|
|
|
1
|
+
import { MapDrawDrawFunctionArgs } from '@opengeoweb/webmap-react';
|
|
2
|
+
import { LocationDetail } from './types';
|
|
3
|
+
export declare const myLocationDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
4
|
+
export declare const selectedLocationDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
5
|
+
export declare const hoverDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
6
|
+
export declare const useDrawOnMap: (mapId: string, drawFunction: (args: MapDrawDrawFunctionArgs) => void) => [(location?: LocationDetail) => void];
|
|
@@ -2,14 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { genericActions } from '@opengeoweb/store';
|
|
3
3
|
interface SimpleTimeSliderConnectComponentProps {
|
|
4
4
|
id: string;
|
|
5
|
-
timeValue?: string;
|
|
5
|
+
timeValue?: string | null;
|
|
6
6
|
setTime?: typeof genericActions.setTime;
|
|
7
7
|
syncGroupAddSource?: typeof genericActions.syncGroupAddSource;
|
|
8
8
|
syncGroupRemoveSource?: typeof genericActions.syncGroupRemoveSource;
|
|
9
9
|
}
|
|
10
10
|
export declare const SimpleTimeSliderConnect: import("react-redux").ConnectedComponent<React.FC<SimpleTimeSliderConnectComponentProps>, {
|
|
11
11
|
id: string;
|
|
12
|
-
timeValue?: string | undefined;
|
|
12
|
+
timeValue?: string | null | undefined;
|
|
13
13
|
setTime?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/types").SetTimePayload, string> | undefined;
|
|
14
14
|
syncGroupAddSource?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/synchronizationGroups/types").SyncGroupsAddSourcePayload, "synchronizationGroupsReducer/syncGroupAddSource"> | undefined;
|
|
15
15
|
syncGroupRemoveSource?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/generic/synchronizationGroups/types").SyncGroupRemoveSourcePayload, "synchronizationGroupsReducer/syncGroupRemoveSource"> | undefined;
|
package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/AutoUpdateButtonConnect.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface ConnectedAutoUpdateButtonProps {
|
|
|
8
8
|
export declare const AutoUpdateButtonConnect: import("react-redux").ConnectedComponent<import("react-redux").ConnectedComponent<({ mapId, isAutoUpdating, toggleAutoUpdate, }: ConnectedAutoUpdateButtonProps) => import("react/jsx-runtime").JSX.Element, {
|
|
9
9
|
mapId: string;
|
|
10
10
|
isAutoUpdating?: boolean | undefined;
|
|
11
|
-
toggleAutoUpdate?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/
|
|
11
|
+
toggleAutoUpdate?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").ToggleAutoUpdatePayload, "mapReducer/toggleAutoUpdate"> | undefined;
|
|
12
12
|
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
13
13
|
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
14
14
|
}>, {
|
|
@@ -16,6 +16,6 @@ export declare const AutoUpdateButtonConnect: import("react-redux").ConnectedCom
|
|
|
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
|
isAutoUpdating?: boolean | undefined;
|
|
19
|
-
toggleAutoUpdate?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/
|
|
19
|
+
toggleAutoUpdate?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").ToggleAutoUpdatePayload, "mapReducer/toggleAutoUpdate"> | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
export {};
|
package/src/lib/components/TimeSliderConnect/TimeSliderButtonsConnect/PlayButtonConnect.d.ts
CHANGED
|
@@ -22,8 +22,8 @@ declare const connectRedux: import("react-redux").InferableComponentEnhancerWith
|
|
|
22
22
|
id: string;
|
|
23
23
|
};
|
|
24
24
|
} & {
|
|
25
|
-
mapStartAnimation: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/
|
|
26
|
-
mapStopAnimation: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/
|
|
25
|
+
mapStartAnimation: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").SetMapAnimationStartPayload, "mapReducer/mapStartAnimation">;
|
|
26
|
+
mapStopAnimation: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").SetMapAnimationStopPayload, "mapReducer/mapStopAnimation">;
|
|
27
27
|
}, PlayButtonConnectProps>;
|
|
28
28
|
type Props = PlayButtonConnectProps & ConnectedProps<typeof connectRedux>;
|
|
29
29
|
export declare const PlayButtonConnect: import("react-redux").ConnectedComponent<({ mapId, isDisabled, timeStep, linkedMapAnimationInfo, mapStartAnimation, mapStopAnimation, }: Props) => import("react/jsx-runtime").JSX.Element, {
|
|
@@ -32,8 +32,8 @@ export declare const PlayButtonConnect: import("react-redux").ConnectedComponent
|
|
|
32
32
|
isAnimating?: boolean | undefined;
|
|
33
33
|
animationStartTime?: string | undefined;
|
|
34
34
|
animationEndTime?: string | undefined;
|
|
35
|
-
mapStartAnimation?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/
|
|
36
|
-
mapStopAnimation?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/
|
|
35
|
+
mapStartAnimation?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").SetMapAnimationStartPayload, "mapReducer/mapStartAnimation"> | undefined;
|
|
36
|
+
mapStopAnimation?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").SetMapAnimationStopPayload, "mapReducer/mapStopAnimation"> | undefined;
|
|
37
37
|
timeStep?: number | undefined;
|
|
38
38
|
linkedMapAnimationInfo?: {
|
|
39
39
|
isAnimating: boolean;
|
|
@@ -22,7 +22,7 @@ export declare const TimeSliderCurrentTimeBoxConnect: import("react-redux").Conn
|
|
|
22
22
|
secondsPerPx?: number | undefined;
|
|
23
23
|
span?: number | undefined;
|
|
24
24
|
isAutoUpdating?: boolean | undefined;
|
|
25
|
-
setCenterTime?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/
|
|
25
|
+
setCenterTime?: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/store/src/store/map/types").SetTimeSliderCenterTimePayload, "mapReducer/setTimeSliderCenterTime"> | undefined;
|
|
26
26
|
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
27
27
|
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
28
28
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const availableDefaultBaseLayers: import("dist/libs/store/src/store/
|
|
2
|
-
export declare const preloadedDefaultBaseServices: import("dist/libs/store/src/store/
|
|
3
|
-
export declare const preloadedDefaultMapServices: import("dist/libs/store/src/store/
|
|
1
|
+
export declare const availableDefaultBaseLayers: import("dist/libs/store/src/store/map/types").Layer[];
|
|
2
|
+
export declare const preloadedDefaultBaseServices: import("dist/libs/store/src/store/map/types").InitialService[] | undefined;
|
|
3
|
+
export declare const preloadedDefaultMapServices: import("dist/libs/store/src/store/map/types").InitialService[] | undefined;
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
};
|
|
26
|
+
} | {
|
|
27
|
+
lat: number;
|
|
28
|
+
lon: number;
|
|
29
|
+
source: string;
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
geometry: {
|
|
33
|
+
type: string;
|
|
34
|
+
geometry: {
|
|
35
|
+
type: string;
|
|
36
|
+
coordinates: number[][][];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
})[];
|
|
40
|
+
export declare const locationApiEndpoints: import("msw").RestHandler<import("msw").MockedRequest<import("msw").DefaultBodyType>>[];
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
interface DetailProps {
|
|
5
|
+
id: string;
|
|
6
|
+
source: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const useLocationDetail: ({ id, source, }: DetailProps) => UseQueryResult<LocationDetail>;
|
|
9
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { snackbarTypes } from '@opengeoweb/snackbar';
|
|
2
2
|
import { WebMapStateModuleState, syncGroupsTypes, uiTypes } from '@opengeoweb/store';
|
|
3
3
|
import { Store } from '@reduxjs/toolkit';
|
|
4
|
-
export declare const mockStateMapWithDimensions: (layer: import("dist/libs/store/src/store/
|
|
4
|
+
export declare const mockStateMapWithDimensions: (layer: import("dist/libs/store/src/store/map/types").Layer, mapId: string) => WebMapStateModuleState;
|
|
5
5
|
export declare const mockStateMapWithDimensionsWithoutLayers: (mapId: string) => WebMapStateModuleState;
|
|
6
|
-
export declare const createMockStore: (mockState
|
|
6
|
+
export declare const createMockStore: (mockState?: WebMapStateModuleState & snackbarTypes.SnackbarModuleStore & syncGroupsTypes.SynchronizationGroupModuleState & uiTypes.UIModuleState) => Store;
|