@opengeoweb/core 10.2.0 → 10.2.1-spike-ol.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/README.md +3 -16
- package/index.esm.js +785 -71
- package/package.json +3 -2
- package/src/lib/components/ConfigurableMapConnect/ConfigurableMapConnect.d.ts +2 -1
- package/src/lib/components/FeatureInfo/utils.d.ts +4 -1
- package/src/lib/components/MapDrawToolRedux/OpenLayersFeatureLayerConnect.d.ts +13 -0
- package/src/lib/components/MapViewConnect/MapViewConnect.d.ts +4 -2
- package/src/lib/components/MapViewConnect/OlMapViewConnect.d.ts +16 -0
- package/src/lib/components/MapViewConnect/OlMapViewLayerConnect.d.ts +8 -0
- package/src/lib/components/MapViewConnect/index.d.ts +1 -0
- package/src/lib/components/MapViewConnect/olMapUtils.d.ts +5 -0
- package/src/lib/components/MapViewConnect/olMapUtils.spec.d.ts +1 -0
- package/src/lib/components/MapViewConnect/useGetOpenlayersView.d.ts +9 -0
- package/src/lib/components/Search/types.d.ts +1 -1
- package/src/lib/components/Search/utils.d.ts +2 -0
- package/src/lib/components/SyncGroups/SimpleTimeSliderConnect.d.ts +2 -2
- package/src/lib/components/TimeSliderConnect/TimeSliderConnect.d.ts +1 -1
- package/src/lib/components/TimeSliderConnect/TimeSliderLegendConnect.d.ts +4 -0
- package/src/lib/utils/location-api/fakeApi.d.ts +31 -1
- package/src/lib/utils/location-api/hooks.d.ts +1 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/core",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.1-spike-ol.1",
|
|
4
4
|
"description": "GeoWeb Core library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"axios": "^1.7.7",
|
|
20
20
|
"@opengeoweb/layer-select": "*",
|
|
21
21
|
"lodash": "^4.17.21",
|
|
22
|
+
"ol": "^10.4.0",
|
|
22
23
|
"react-sortablejs": "^6.1.4",
|
|
23
24
|
"sortablejs": "^1.15.1",
|
|
24
25
|
"@mui/system": "^6.1.1",
|
|
@@ -30,8 +31,8 @@
|
|
|
30
31
|
"dompurify": "^3.0.6",
|
|
31
32
|
"@mui/material": "^6.1.1",
|
|
32
33
|
"@sentry/react": "^8.34.0",
|
|
33
|
-
"@tanstack/react-query": "^5.62.7",
|
|
34
34
|
"@opengeoweb/authentication": "*",
|
|
35
|
+
"@tanstack/react-query": "^5.62.7",
|
|
35
36
|
"@opengeoweb/api": "*",
|
|
36
37
|
"msw": "^1.3.3"
|
|
37
38
|
},
|
|
@@ -21,7 +21,7 @@ export interface ConfigurableMapConnectProps {
|
|
|
21
21
|
tileServerSettings?: TileServerSettings;
|
|
22
22
|
autoUpdateLayerId?: string;
|
|
23
23
|
autoTimeStepLayerId?: string;
|
|
24
|
-
|
|
24
|
+
initialBbox?: mapTypes.Bbox;
|
|
25
25
|
srs?: string;
|
|
26
26
|
dimensions?: mapTypes.Dimension[];
|
|
27
27
|
animationPayload?: mapTypes.AnimationPayloadType;
|
|
@@ -43,5 +43,6 @@ export interface ConfigurableMapConnectProps {
|
|
|
43
43
|
children?: React.ReactNode;
|
|
44
44
|
mapControls?: React.ReactNode;
|
|
45
45
|
shouldDisablePrefetching?: boolean;
|
|
46
|
+
useOl?: boolean;
|
|
46
47
|
}
|
|
47
48
|
export declare const ConfigurableMapConnect: React.FC<ConfigurableMapConnectProps>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { layerTypes } from '@opengeoweb/store';
|
|
2
|
+
import { IWMJSMap } from '@opengeoweb/webmap';
|
|
3
|
+
import { MapLocation } from '@opengeoweb/webmap-react';
|
|
2
4
|
export interface GFIResult {
|
|
3
5
|
data: string;
|
|
4
6
|
isLoading: boolean;
|
|
@@ -8,10 +10,11 @@ export interface GFILayer {
|
|
|
8
10
|
url: string;
|
|
9
11
|
title: string;
|
|
10
12
|
}
|
|
13
|
+
export declare const getFeatureInfoUrl: (layer: layerTypes.Layer, wmjsMap: IWMJSMap | undefined, mapPinLocation: MapLocation | null) => string | undefined;
|
|
11
14
|
/**
|
|
12
15
|
* Make a list of GFI Layers to display.
|
|
13
16
|
* @param layers
|
|
14
17
|
* @param mapId
|
|
15
18
|
* @returns
|
|
16
19
|
*/
|
|
17
|
-
export declare const getLayersToUpdate: (layers: layerTypes.Layer[], mapId: string) => GFILayer[];
|
|
20
|
+
export declare const getLayersToUpdate: (mapPinLocation: MapLocation | null, layers: layerTypes.Layer[], mapId: string) => GFILayer[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { layerTypes } from '@opengeoweb/store';
|
|
3
|
+
import { StyleLike } from 'ol/style/Style';
|
|
4
|
+
import { HoverSelect } from '@opengeoweb/webmap-react';
|
|
5
|
+
interface OpenLayersFeatureLayerConnectProps {
|
|
6
|
+
layer: layerTypes.FeatureLayer;
|
|
7
|
+
layerId?: string;
|
|
8
|
+
zIndex: number;
|
|
9
|
+
style: StyleLike;
|
|
10
|
+
hoverSelect?: HoverSelect;
|
|
11
|
+
}
|
|
12
|
+
export declare const OpenLayersFeatureLayerConnect: React.FC<OpenLayersFeatureLayerConnectProps>;
|
|
13
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { Bbox } from '@opengeoweb/webmap';
|
|
2
3
|
import { MapViewProps } from '@opengeoweb/webmap-react';
|
|
3
|
-
export interface
|
|
4
|
+
export interface MapControlsProps {
|
|
4
5
|
mapControlsPositionTop?: number;
|
|
5
6
|
search?: boolean;
|
|
6
7
|
zoomControls?: boolean;
|
|
@@ -13,11 +14,12 @@ export interface MapControls {
|
|
|
13
14
|
export interface MapViewConnectProps extends MapViewProps {
|
|
14
15
|
mapId: string;
|
|
15
16
|
displayTimeInMap?: boolean;
|
|
16
|
-
controls?:
|
|
17
|
+
controls?: MapControlsProps;
|
|
17
18
|
showScaleBar?: boolean;
|
|
18
19
|
children?: React.ReactNode;
|
|
19
20
|
showLayerInfo?: boolean;
|
|
20
21
|
passiveMap?: boolean;
|
|
22
|
+
initialBbox?: Bbox;
|
|
21
23
|
}
|
|
22
24
|
export declare const ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION = "ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION";
|
|
23
25
|
export declare const ORIGIN_REACTMAPVIEWCONNECT_ONUPDATELAYERINFO = "ORIGIN_REACTMAPVIEWCONNECT_ONUPDATELAYERINFO";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MapViewConnectProps } from './MapViewConnect';
|
|
3
|
+
/**
|
|
4
|
+
* Connected component used to display the map and selected layers.
|
|
5
|
+
* Includes options to disable the map controls and legend.
|
|
6
|
+
*
|
|
7
|
+
* Expects the following props:
|
|
8
|
+
* @param {string} mapId mapId: string - Id of the map
|
|
9
|
+
* @param {object} [controls.zoomControls] **optional** controls: object - toggle the map controls, zoomControls defaults to true
|
|
10
|
+
* @param {boolean} [displayTimeInMap] **optional** displayTimeInMap: boolean, toggles the mapTime, defaults to true
|
|
11
|
+
* @param {boolean} [showScaleBar] **optional** showScaleBar: boolean, toggles the scaleBar, defaults to true
|
|
12
|
+
* @example
|
|
13
|
+
* ```<MapViewConnect mapId={mapId} controls={{ zoomControls: false }} displayTimeInMap={false} showScaleBar={false}/>```
|
|
14
|
+
*/
|
|
15
|
+
declare const OlMapViewConnect: React.FC<MapViewConnectProps>;
|
|
16
|
+
export default OlMapViewConnect;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface OlMapViewLayerConnectProps {
|
|
3
|
+
layerId: string | undefined;
|
|
4
|
+
mapId: string;
|
|
5
|
+
zIndex: number;
|
|
6
|
+
debugMode: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const OlMapViewLayerConnect: (layerProps: OlMapViewLayerConnectProps) => React.ReactElement | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TimeSliderStartCenterEndTime } from '@opengeoweb/store';
|
|
2
|
+
import { Dimension } from '@opengeoweb/webmap';
|
|
3
|
+
import { OnInitializeLayerProps, TimeContextType, UpdateLayerInfoPayload } from '@opengeoweb/webmap-react';
|
|
4
|
+
export declare const makePrefetchTimeSpan: (timeSliderStartCenterEndTime: TimeSliderStartCenterEndTime, animationStartTime: string | undefined, animationEndTime: string | undefined, isAnimating: boolean) => TimeContextType;
|
|
5
|
+
export declare const makeLayerInfoPayload: (payload: OnInitializeLayerProps, mapDimensions: Dimension[], mapId: string) => UpdateLayerInfoPayload;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CoreAppStore } from '@opengeoweb/store';
|
|
2
|
+
import { Store } from '@reduxjs/toolkit';
|
|
3
|
+
import { View } from 'ol';
|
|
4
|
+
interface UseGetOpenLayersViewValue {
|
|
5
|
+
view?: View;
|
|
6
|
+
name?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const useGetOpenlayersView: (mapId: string, store: Store<CoreAppStore>) => UseGetOpenLayersViewValue;
|
|
9
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { MapDrawDrawFunctionArgs } from '@opengeoweb/webmap-react';
|
|
2
|
+
import { GeoJsonProperties } from 'geojson';
|
|
2
3
|
import { LocationDetail } from './types';
|
|
3
4
|
export declare const myLocationDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
4
5
|
export declare const selectedLocationDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
6
|
+
export declare const geometryStyling: GeoJsonProperties;
|
|
5
7
|
export declare const hoverDrawFunction: (args: MapDrawDrawFunctionArgs) => void;
|
|
6
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 {};
|
|
@@ -22,19 +22,49 @@ export declare const fakeLocationDetailList: ({
|
|
|
22
22
|
type: string;
|
|
23
23
|
coordinates: number[];
|
|
24
24
|
};
|
|
25
|
+
properties?: undefined;
|
|
25
26
|
};
|
|
26
27
|
} | {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
source: string;
|
|
27
31
|
lat: number;
|
|
28
32
|
lon: number;
|
|
29
|
-
|
|
33
|
+
geometry: {
|
|
34
|
+
type: string;
|
|
35
|
+
properties: {};
|
|
36
|
+
geometry: {
|
|
37
|
+
type: string;
|
|
38
|
+
coordinates: number[][];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
} | {
|
|
30
42
|
id: string;
|
|
31
43
|
name: string;
|
|
44
|
+
source: string;
|
|
45
|
+
lat: number;
|
|
46
|
+
lon: number;
|
|
32
47
|
geometry: {
|
|
33
48
|
type: string;
|
|
34
49
|
geometry: {
|
|
35
50
|
type: string;
|
|
36
51
|
coordinates: number[][][];
|
|
37
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: {};
|
|
38
68
|
};
|
|
39
69
|
})[];
|
|
40
70
|
export declare const locationApiEndpoints: import("msw").RestHandler<import("msw").MockedRequest<import("msw").DefaultBodyType>>[];
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import { LocationDetail, LocationListResult } from '../../components/Search/types';
|
|
3
3
|
export declare const useLocationList: (search: string) => UseQueryResult<LocationListResult[]>;
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
source: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const useLocationDetail: ({ id, source, }: DetailProps) => UseQueryResult<LocationDetail>;
|
|
9
|
-
export {};
|
|
4
|
+
export declare const useLocationDetail: (id?: string, source?: string) => UseQueryResult<LocationDetail>;
|