@opengeoweb/core 2.1.3 → 2.1.4
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/{core.esm.js → index.esm.js} +745 -391
- package/{core.umd.js → index.umd.js} +959 -601
- package/lib/components/CustomSwitch/CustomSwitch.d.ts +1 -1
- package/lib/components/LayerManager/LayerContainerRow/LayerManagerButton.d.ts +1 -1
- package/lib/components/LayerManager/LayerManagerUtils.d.ts +2 -2
- package/lib/components/LayerManager/LayerSelect/LayerList/LayerList.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChip.d.ts +2 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.d.ts +9 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.spec.d.ts +1 -0
- package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceList.d.ts +2 -0
- package/lib/components/LayerManager/tooltipContainerStyles.d.ts +1 -1
- package/lib/components/MapView/MapViewConnect.LayerChangeEnabledOpacity.stories.d.ts +7 -0
- package/lib/components/MapView/MapViewConnect.d.ts +2 -0
- package/lib/components/Mapcontrols/MapControlButton.d.ts +1 -1
- package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectConfig.d.ts +1 -1
- package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +1 -1
- package/lib/components/Providers/Providers.d.ts +1 -1
- package/lib/components/ReactMapView/ReactMapView.d.ts +3 -7
- package/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +2 -2
- package/lib/components/ReactMapView/types.d.ts +2 -7
- package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegendRenderFunctions.d.ts +1 -1
- package/lib/components/TimeSlider/TimeSliderRail/TimeSliderRailRenderFunctions.d.ts +1 -1
- package/lib/components/ToggleIconButton/ToggleIconButton.d.ts +6 -3
- package/lib/components/TooltipSelect/TooltipSelect.d.ts +2 -2
- package/lib/store/layerSelect/actions.d.ts +19 -4
- package/lib/store/layerSelect/constants.d.ts +3 -0
- package/lib/store/layerSelect/sagas.d.ts +2 -1
- package/lib/store/layerSelect/selectors.d.ts +32 -2
- package/lib/store/layerSelect/types.d.ts +32 -6
- package/lib/store/mapStore/layers/actions.d.ts +2 -8
- package/lib/store/mapStore/layers/constants.d.ts +1 -1
- package/lib/store/mapStore/layers/selectors.d.ts +5 -14
- package/lib/store/mapStore/layers/types.d.ts +34 -21
- package/lib/store/mapStore/map/sagas.d.ts +2 -2
- package/lib/store/mapStore/map/selectors.d.ts +6 -6
- package/lib/store/mapStore/service/selectors.d.ts +35 -5
- package/lib/store/mapStore/service/types.d.ts +5 -1
- package/lib/storybookUtils/HelperComponents.d.ts +1 -1
- package/lib/storybookUtils/storyComponents/MapDrawGeoJSON.d.ts +5 -5
- package/lib/storybookUtils/storyComponents/MapDrawGeoJSONStyles.d.ts +2 -1
- package/lib/utils/defaultTestSettings.d.ts +13 -1
- package/package.json +13 -14
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const CustomSwitch: import("react").
|
|
2
|
+
export declare const CustomSwitch: import("react").JSXElementConstructor<Omit<import("@mui/material").SwitchProps, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"switchBase" | "checked" | "track"> & object>;
|
|
3
3
|
export default CustomSwitch;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IconButtonProps } from '@material
|
|
2
|
+
import { IconButtonProps } from '@mui/material';
|
|
3
3
|
interface LayerManagerButtonProps extends IconButtonProps {
|
|
4
4
|
tooltipTitle: string;
|
|
5
5
|
onClick?: (event: React.MouseEvent) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const LayerManagerColumnsLarge: (props?: any) => import("@
|
|
2
|
-
export declare const LayerManagerColumnsSmall: (props?: any) => import("@
|
|
1
|
+
export declare const LayerManagerColumnsLarge: (props?: any) => import("@mui/styles").ClassNameMap<"column1" | "column2" | "column3" | "column4" | "column5" | "column6">;
|
|
2
|
+
export declare const LayerManagerColumnsSmall: (props?: any) => import("@mui/styles").ClassNameMap<"column1" | "column2" | "column3" | "column4" | "column5" | "column6">;
|
|
3
3
|
export declare enum LayerManagerWidth {
|
|
4
4
|
sm = 0,
|
|
5
5
|
lg = 1
|
|
@@ -3,6 +3,8 @@ import { Service } from '../../../../store/mapStore/types';
|
|
|
3
3
|
interface ServiceChipProps {
|
|
4
4
|
all?: boolean;
|
|
5
5
|
service?: Service;
|
|
6
|
+
isEnabled?: boolean;
|
|
7
|
+
toggleChip?: (service: string) => void;
|
|
6
8
|
}
|
|
7
9
|
declare const ServiceChip: React.FC<ServiceChipProps>;
|
|
8
10
|
export default ServiceChip;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Service } from '../../../../store/mapStore/types';
|
|
3
|
+
interface ServiceChipConnectProps {
|
|
4
|
+
all?: boolean;
|
|
5
|
+
service?: Service;
|
|
6
|
+
isEnabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const ServiceChipConnect: React.FC<ServiceChipConnectProps>;
|
|
9
|
+
export default ServiceChipConnect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Service } from '../../../../store/mapStore/types';
|
|
3
|
+
import { ServiceObject } from '../../../../store/layerSelect/types';
|
|
3
4
|
interface ServiceListProps {
|
|
4
5
|
layerSelectWidth?: number;
|
|
5
6
|
services: Service[];
|
|
7
|
+
activeServices: ServiceObject[];
|
|
6
8
|
}
|
|
7
9
|
declare const ServiceList: React.FC<ServiceListProps>;
|
|
8
10
|
export default ServiceList;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useTooltipContainerStyles: (props?: any) => import("@
|
|
1
|
+
declare const useTooltipContainerStyles: (props?: any) => import("@mui/styles").ClassNameMap<"textContainer">;
|
|
2
2
|
export default useTooltipContainerStyles;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import * as mapActions from '../../store/mapStore/actions';
|
|
3
|
+
import { Layer } from '../../store/mapStore/types';
|
|
4
|
+
export interface LayerChangeOpacityInputProps {
|
|
5
|
+
mapId: string;
|
|
6
|
+
layerChangeOpacity: typeof mapActions.layerChangeOpacity;
|
|
7
|
+
layers: Layer[];
|
|
8
|
+
}
|
|
2
9
|
export declare const LayerChangeEnableOpacityAction: () => React.ReactElement;
|
|
@@ -10,6 +10,8 @@ export interface MapViewConnectProps {
|
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
showLayerInfo?: boolean;
|
|
12
12
|
}
|
|
13
|
+
export declare const ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION = "ORIGIN_REACTMAPVIEWCONNECT_ONMAPCHANGEDIMENSION";
|
|
14
|
+
export declare const ORIGIN_REACTMAPVIEWCONNECT_ONUPDATELAYERINFO = "ORIGIN_REACTMAPVIEWCONNECT_ONUPDATELAYERINFO";
|
|
13
15
|
/**
|
|
14
16
|
* Connected component used to display the map and selected layers.
|
|
15
17
|
* Includes options to disable the map controls and legend.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TooltipProps } from '@material
|
|
2
|
+
import { TooltipProps } from '@mui/material';
|
|
3
3
|
import { ToggleIconButtonProps } from '../ToggleIconButton/ToggleIconButton';
|
|
4
4
|
interface MapControlButtonProps extends ToggleIconButtonProps {
|
|
5
5
|
onClick: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Bbox, Layer } from '../../store/mapStore/types';
|
|
3
|
-
export declare const useStyles: (props?: any) => import("@
|
|
3
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"box" | "zoomControls">;
|
|
4
4
|
export interface MultiMapPreset {
|
|
5
5
|
title?: string;
|
|
6
6
|
layers: Layer[];
|
|
@@ -19,6 +19,7 @@ export declare const isAMapLayer: (layer: Layer) => boolean;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const isAGeoJSONLayer: (layer: Layer) => boolean;
|
|
21
21
|
export declare const ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION = "ORIGIN_REACTMAPVIEW_ONMAPCHANGEDIMENSION";
|
|
22
|
+
export declare const ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO = "ORIGIN_REACTMAPVIEW_ONUPDATELAYERINFO";
|
|
22
23
|
interface ReactMapViewState {
|
|
23
24
|
adagucInitialised: boolean;
|
|
24
25
|
}
|
|
@@ -54,12 +55,7 @@ declare class ReactMapView extends React.Component<ReactMapViewProps, ReactMapVi
|
|
|
54
55
|
onMount: () => void;
|
|
55
56
|
onUnMount: () => void;
|
|
56
57
|
onMapChangeDimension: () => void;
|
|
57
|
-
|
|
58
|
-
onLayerChangeStyle: () => void;
|
|
59
|
-
onLayerChangeDimension: () => void;
|
|
60
|
-
onLayerSetDimensions: () => void;
|
|
61
|
-
onServiceSetLayers: () => void;
|
|
62
|
-
onLayerSetStyles: () => void;
|
|
58
|
+
onUpdateLayerInformation: () => void;
|
|
63
59
|
onMapZoomEnd: () => void;
|
|
64
60
|
};
|
|
65
61
|
constructor(props: ReactMapViewProps);
|
|
@@ -75,7 +71,7 @@ declare class ReactMapView extends React.Component<ReactMapViewProps, ReactMapVi
|
|
|
75
71
|
layerArrayMutated: boolean;
|
|
76
72
|
};
|
|
77
73
|
clearRefetchTimer: () => void;
|
|
78
|
-
parseWMJSLayer: (wmLayer: WMLayer, forceReload: boolean,
|
|
74
|
+
parseWMJSLayer: (wmLayer: WMLayer, forceReload: boolean, child?: React.ReactElement) => void;
|
|
79
75
|
checkNewProps(prevProps: ReactMapViewProps, props: ReactMapViewProps): void;
|
|
80
76
|
drawDebounced(): void;
|
|
81
77
|
handleWindowResize(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WMLayer, WMJSMap } from '@opengeoweb/webmap';
|
|
2
|
-
import {
|
|
2
|
+
import { UpdateLayerInfoPayload } from '../../store/mapStore/types';
|
|
3
3
|
import { MapViewProps } from '../MapView/types';
|
|
4
4
|
export declare const ORIGIN_REACTMAPVIEWPARSELAYER = "ReactMapViewParseLayer";
|
|
5
|
-
export declare const setServiceMetadata: (wmLayer: WMLayer, mapId: string, webMapJSInstance: WMJSMap, mapProperties: MapViewProps,
|
|
5
|
+
export declare const setServiceMetadata: (wmLayer: WMLayer, mapId: string, webMapJSInstance: WMJSMap, mapProperties: MapViewProps, onUpdateLayerInformation?: (payload: UpdateLayerInfoPayload) => void) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WMJSMap } from '@opengeoweb/webmap';
|
|
3
|
-
import { SetMapDimensionPayload,
|
|
3
|
+
import { SetMapDimensionPayload, Dimension, SetBboxPayload, Bbox, MapPinLocationPayload, MapLocation, UpdateLayerInfoPayload } from '../../store/mapStore/types';
|
|
4
4
|
export interface ReactMapViewProps {
|
|
5
5
|
listeners?: {
|
|
6
6
|
name?: string;
|
|
@@ -27,13 +27,8 @@ export interface ReactMapViewProps {
|
|
|
27
27
|
onMount?: (mapId: string, WMJSMapInstance: WMJSMap) => void;
|
|
28
28
|
onUnMount?: (mapId: string, WMJSMapInstance: WMJSMap) => void;
|
|
29
29
|
onMapChangeDimension?: (payload: SetMapDimensionPayload) => void;
|
|
30
|
-
onMapUpdateAllDimensions?: (payload: UpdateAllMapDimensionsPayload) => void;
|
|
31
|
-
onLayerChangeStyle?: (payload: SetLayerStylePayload) => void;
|
|
32
|
-
onLayerChangeDimension?: (payload: SetLayerDimensionPayload) => void;
|
|
33
|
-
onServiceSetLayers?: (payload: SetLayersForServicePayload) => void;
|
|
34
|
-
onLayerSetStyles?: (payload: SetLayerStylesPayload) => void;
|
|
35
30
|
onMapZoomEnd?: (payload: SetBboxPayload) => void;
|
|
36
31
|
onRegisterAdaguc?: (WMJSMapInstance: WMJSMap) => void;
|
|
37
|
-
onLayerSetDimensions?: (payload: SetLayerDimensionsPayload) => void;
|
|
38
32
|
onMapPinChangeLocation?: (payload: MapPinLocationPayload) => void;
|
|
33
|
+
onUpdateLayerInformation?: (payload: UpdateLayerInfoPayload) => void;
|
|
39
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Theme } from '@material
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
2
|
import { Scale } from '../../../store/mapStore/types';
|
|
3
3
|
export declare const getRoundedStartAndEnd: (visibleTimeStart: number, visibleTimeEnd: number, scale: Scale) => [number, number];
|
|
4
4
|
export declare const getCustomRoundedStartAndEnd: (visibleTimeStart: number, visibleTimeEnd: number, unit: string) => [number, number];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Theme } from '@material
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
2
|
import { Scale } from '../../../store/mapStore/types';
|
|
3
3
|
export declare const renderTimeSliderRailWithNeedle: (ctx: CanvasRenderingContext2D, theme: Theme, width: number, height: number, centerTime: number, selected: number, secondsPerPx: number, scale: Scale, animationStart?: number, animationEnd?: number, dataStartTime?: number, dataEndTime?: number, currentTime?: number) => void;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ToggleButtonProps } from '@material
|
|
3
|
-
export declare const useButtonStyles: (props:
|
|
4
|
-
|
|
2
|
+
import { ToggleButtonProps } from '@mui/material';
|
|
3
|
+
export declare const useButtonStyles: (props: {
|
|
4
|
+
width: number;
|
|
5
|
+
}) => import("@mui/styles").ClassNameMap<"button">;
|
|
6
|
+
export interface ToggleIconButtonProps extends Omit<ToggleButtonProps, 'value'> {
|
|
5
7
|
active?: boolean;
|
|
6
8
|
width?: number;
|
|
9
|
+
value?: unknown;
|
|
7
10
|
}
|
|
8
11
|
declare const ToggleIconButton: React.FC<ToggleIconButtonProps>;
|
|
9
12
|
export default ToggleIconButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { SelectProps } from '@material
|
|
3
|
-
export declare const useStyles: (props?: any) => import("@
|
|
2
|
+
import { SelectProps } from '@mui/material';
|
|
3
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"select">;
|
|
4
4
|
declare type ListELement = {
|
|
5
5
|
value: string;
|
|
6
6
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddNewKeywordsPayload,
|
|
1
|
+
import { LayerSelectActions, SetSearchFilterPayload, SetActiveServicesPayload, AddNewKeywordsPayload, EnableActiveServicePayload, DisableActiveServicePayload } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Sets the given text to the searchFilter
|
|
4
4
|
*
|
|
@@ -7,9 +7,24 @@ import { AddNewKeywordsPayload, LayerSelectActions, SetSearchFilterPayload } fro
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const setSearchFilter: (payload: SetSearchFilterPayload) => LayerSelectActions;
|
|
9
9
|
/**
|
|
10
|
-
* Sets the given
|
|
10
|
+
* Sets the given array of string as active services
|
|
11
11
|
*
|
|
12
|
-
* Example:
|
|
13
|
-
* @param {string
|
|
12
|
+
* Example: setActiveServices({ activeServices: ['service-1', 'service-2'] })
|
|
13
|
+
* @param {string} payload { activeServices: string[] }
|
|
14
14
|
*/
|
|
15
|
+
export declare const setActiveServices: (payload: SetActiveServicesPayload) => LayerSelectActions;
|
|
16
|
+
/**
|
|
17
|
+
* Activates given service in the activeServices array
|
|
18
|
+
*
|
|
19
|
+
* Example: enableActiveService({ serviceId: 'service-1' })
|
|
20
|
+
* @param {string} payload { serviceId: string }
|
|
21
|
+
*/
|
|
22
|
+
export declare const enableActiveService: (payload: EnableActiveServicePayload) => LayerSelectActions;
|
|
23
|
+
/**
|
|
24
|
+
* Disables given service in the activeServices array
|
|
25
|
+
*
|
|
26
|
+
* Example: disableActiveService({ serviceId: 'service-1' })
|
|
27
|
+
* @param {string} payload { serviceId: string }
|
|
28
|
+
*/
|
|
29
|
+
export declare const disableActiveService: (payload: DisableActiveServicePayload) => LayerSelectActions;
|
|
15
30
|
export declare const addNewKeywords: (payload: AddNewKeywordsPayload) => LayerSelectActions;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export declare const LAYER_SELECT_SET_SEARCH_FILTER = "LAYER_SELECT_SET_SEARCH_FILTER";
|
|
2
|
+
export declare const LAYER_SELECT_SET_ACTIVE_SERVICES = "LAYER_SELECT_SET_ACTIVE_SERVICES";
|
|
3
|
+
export declare const LAYER_SELECT_DISABLE_ACTIVE_SERVICE = "LAYER_SELECT_DISABLE_ACTIVE_SERVICE";
|
|
4
|
+
export declare const LAYER_SELECT_ENABLE_ACTIVE_SERVICE = "LAYER_SELECT_ENABLE_ACTIVE_SERVICE";
|
|
2
5
|
export declare const LAYER_SELECT_ADD_NEW_KEYWORDS = "LAYER_SELECT_ADD_NEW_KEYWORDS";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SagaIterator } from 'redux-saga';
|
|
2
2
|
import { ServiceActions } from '../mapStore/types';
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function newServiceAddedSagaUpdateKeywords(capturedAction: ServiceActions): SagaIterator;
|
|
4
|
+
export declare function newServiceAddedSagaUpdateActiveServices(): SagaIterator;
|
|
4
5
|
export declare function rootSaga(): SagaIterator;
|
|
5
6
|
export default rootSaga;
|
|
@@ -1,4 +1,34 @@
|
|
|
1
1
|
import { AppStore } from '../../types/types';
|
|
2
|
-
import { LayerSelectStoreType } from './types';
|
|
2
|
+
import { KeywordObject, LayerSelectStoreType, ServiceObject } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Returns search filter string
|
|
5
|
+
*
|
|
6
|
+
* Example getSearchFilter(store);
|
|
7
|
+
* @param {object} store store: object - store object
|
|
8
|
+
* @returns {array} returnType: string
|
|
9
|
+
*/
|
|
3
10
|
export declare const getSearchFilter: import("reselect").OutputSelector<AppStore, string, (res: LayerSelectStoreType) => string>;
|
|
4
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Returns active services array
|
|
13
|
+
*
|
|
14
|
+
* Example getActiveServices(store);
|
|
15
|
+
* @param {object} store store: object - store object
|
|
16
|
+
* @returns {array} returnType: array of active services
|
|
17
|
+
*/
|
|
18
|
+
export declare const getActiveServices: import("reselect").OutputSelector<AppStore, ServiceObject[], (res: LayerSelectStoreType) => ServiceObject[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Returns all ids of enabled services
|
|
21
|
+
*
|
|
22
|
+
* Example getEnabledServiceIds(store);
|
|
23
|
+
* @param {object} store store: object - store object
|
|
24
|
+
* @returns {array} returnType: array of service ids that are enabled
|
|
25
|
+
*/
|
|
26
|
+
export declare const getEnabledServiceIds: import("reselect").OutputSelector<AppStore, string[], (res: LayerSelectStoreType) => string[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Returns all keywords
|
|
29
|
+
*
|
|
30
|
+
* Example getKeywords(store);
|
|
31
|
+
* @param {object} store store: object - store object
|
|
32
|
+
* @returns {array} returnType: array of keyword objects
|
|
33
|
+
*/
|
|
34
|
+
export declare const getKeywords: import("reselect").OutputSelector<AppStore, KeywordObject[], (res: LayerSelectStoreType) => KeywordObject[]>;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Action } from 'redux';
|
|
2
|
-
import { LAYER_SELECT_ADD_NEW_KEYWORDS, LAYER_SELECT_SET_SEARCH_FILTER } from './constants';
|
|
3
|
-
export interface
|
|
2
|
+
import { LAYER_SELECT_ADD_NEW_KEYWORDS, LAYER_SELECT_SET_SEARCH_FILTER, LAYER_SELECT_SET_ACTIVE_SERVICES, LAYER_SELECT_ENABLE_ACTIVE_SERVICE, LAYER_SELECT_DISABLE_ACTIVE_SERVICE } from './constants';
|
|
3
|
+
export interface ServiceObject {
|
|
4
4
|
id: string;
|
|
5
|
-
|
|
6
|
-
amountVisible: number;
|
|
7
|
-
checked: boolean;
|
|
5
|
+
enabled: boolean;
|
|
8
6
|
}
|
|
9
7
|
export interface FiltersType {
|
|
10
8
|
searchFilter: string;
|
|
9
|
+
activeServices: ServiceObject[];
|
|
11
10
|
keywords: KeywordObject[];
|
|
12
11
|
addedServices: string[];
|
|
13
12
|
}
|
|
13
|
+
export interface KeywordObject {
|
|
14
|
+
id: string;
|
|
15
|
+
amount: number;
|
|
16
|
+
amountVisible: number;
|
|
17
|
+
checked: boolean;
|
|
18
|
+
}
|
|
14
19
|
export interface LayerSelectStoreType {
|
|
15
20
|
filters: FiltersType;
|
|
16
21
|
}
|
|
@@ -24,6 +29,27 @@ export interface SetSearchFilter extends Action {
|
|
|
24
29
|
type: typeof LAYER_SELECT_SET_SEARCH_FILTER;
|
|
25
30
|
payload: SetSearchFilterPayload;
|
|
26
31
|
}
|
|
32
|
+
export interface SetActiveServicesPayload {
|
|
33
|
+
activeServices: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface SetActiveServices extends Action {
|
|
36
|
+
type: typeof LAYER_SELECT_SET_ACTIVE_SERVICES;
|
|
37
|
+
payload: SetActiveServicesPayload;
|
|
38
|
+
}
|
|
39
|
+
export interface EnableActiveServicePayload {
|
|
40
|
+
service: string;
|
|
41
|
+
}
|
|
42
|
+
export interface EnableActiveService extends Action {
|
|
43
|
+
type: typeof LAYER_SELECT_ENABLE_ACTIVE_SERVICE;
|
|
44
|
+
payload: EnableActiveServicePayload;
|
|
45
|
+
}
|
|
46
|
+
export interface DisableActiveServicePayload {
|
|
47
|
+
service: string;
|
|
48
|
+
}
|
|
49
|
+
export interface DisableActiveService extends Action {
|
|
50
|
+
type: typeof LAYER_SELECT_DISABLE_ACTIVE_SERVICE;
|
|
51
|
+
payload: DisableActiveServicePayload;
|
|
52
|
+
}
|
|
27
53
|
export interface AddNewKeywordsPayload {
|
|
28
54
|
serviceName: string;
|
|
29
55
|
keywords: string[];
|
|
@@ -32,4 +58,4 @@ export interface AddNewKeywords extends Action {
|
|
|
32
58
|
type: typeof LAYER_SELECT_ADD_NEW_KEYWORDS;
|
|
33
59
|
payload: AddNewKeywordsPayload;
|
|
34
60
|
}
|
|
35
|
-
export declare type LayerSelectActions = SetSearchFilter | AddNewKeywords;
|
|
61
|
+
export declare type LayerSelectActions = SetSearchFilter | SetActiveServices | EnableActiveService | DisableActiveService | AddNewKeywords;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SetLayerOpacityPayload, SetLayerEnabledPayload, SetLayerDimensionPayload, SetLayerNamePayload, SetLayerStylePayload, LayerActions, AddLayerPayload, DeleteLayerPayload, SetLayersPayload, SetBaseLayersPayload, AddBaseLayerPayload, ErrorLayerPayload, AddAvailableBaseLayerPayload, AddAvailableBaseLayersPayload, SetLayerDimensionsPayload,
|
|
1
|
+
import { SetLayerOpacityPayload, SetLayerEnabledPayload, SetLayerDimensionPayload, SetLayerNamePayload, SetLayerStylePayload, LayerActions, AddLayerPayload, DeleteLayerPayload, SetLayersPayload, SetBaseLayersPayload, AddBaseLayerPayload, ErrorLayerPayload, AddAvailableBaseLayerPayload, AddAvailableBaseLayersPayload, SetLayerDimensionsPayload, UpdateLayerInfoPayload } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Set the layers for a map. Erases all previous layers.
|
|
4
4
|
* The following action types are triggered after the getCapabilities are parsed:
|
|
@@ -72,13 +72,6 @@ export declare const layerChangeDimension: (payload: SetLayerDimensionPayload) =
|
|
|
72
72
|
* @param {object} payload Object with layerId: string, dimensions: [Dimension], origin?: string
|
|
73
73
|
*/
|
|
74
74
|
export declare const layerSetDimensions: (payload: SetLayerDimensionsPayload) => LayerActions;
|
|
75
|
-
/**
|
|
76
|
-
* Action layerSetStyles is used automatically after calling the setLayers action. Contents is based on WMS GetCapabilities
|
|
77
|
-
*
|
|
78
|
-
* Example: layerSetStyles({service: someService, name: 'layerName', styles: styleArray})
|
|
79
|
-
* @param {object} payload consisting of service: string, name: string, styles: Style[]
|
|
80
|
-
*/
|
|
81
|
-
export declare const layerSetStyles: (payload: SetLayerStylesPayload) => LayerActions;
|
|
82
75
|
/**
|
|
83
76
|
* Changes the name of the layer
|
|
84
77
|
*
|
|
@@ -131,3 +124,4 @@ export declare const addAvailableBaseLayer: (payload: AddAvailableBaseLayerPaylo
|
|
|
131
124
|
* @param {object} payload Object with a layer
|
|
132
125
|
*/
|
|
133
126
|
export declare const addAvailableBaseLayers: (payload: AddAvailableBaseLayersPayload) => LayerActions;
|
|
127
|
+
export declare const onUpdateLayerInformation: (payload: UpdateLayerInfoPayload) => LayerActions;
|
|
@@ -3,7 +3,6 @@ export declare const WEBMAP_LAYER_CHANGE_NAME = "WEBMAP_LAYER_CHANGE_NAME";
|
|
|
3
3
|
export declare const WEBMAP_LAYER_CHANGE_STYLE = "WEBMAP_LAYER_CHANGE_STYLE";
|
|
4
4
|
export declare const WEBMAP_LAYER_CHANGE_DIMENSION = "WEBMAP_LAYER_CHANGE_DIMENSION";
|
|
5
5
|
export declare const WEBMAP_LAYER_SET_DIMENSIONS = "WEBMAP_LAYER_SET_DIMENSIONS";
|
|
6
|
-
export declare const WEBMAP_LAYER_SET_STYLES = "WEBMAP_LAYER_SET_STYLES";
|
|
7
6
|
export declare const WEBMAP_LAYER_CHANGE_ENABLED = "WEBMAP_LAYER_CHANGE_ENABLED";
|
|
8
7
|
export declare const WEBMAP_LAYER_DELETE = "WEBMAP_LAYER_DELETE";
|
|
9
8
|
export declare const WEBMAP_LAYER_ERROR = "WEBMAP_LAYER_ERROR";
|
|
@@ -14,3 +13,4 @@ export declare const WEBMAP_SET_BASELAYERS = "WEBMAP_SET_BASELAYERS";
|
|
|
14
13
|
export declare const WEBMAP_ADD_BASELAYER = "WEBMAP_ADD_BASELAYER";
|
|
15
14
|
export declare const WEBMAP_ADD_AVAILABLE_BASELAYER = "WEBMAP_ADD_AVAILABLE_BASELAYER";
|
|
16
15
|
export declare const WEBMAP_ADD_AVAILABLE_BASELAYERS = "WEBMAP_ADD_AVAILABLE_BASELAYERS";
|
|
16
|
+
export declare const WEBMAP_UPDATE_LAYER_INFO = "WEBMAP_UPDATE_LAYER_INFO";
|
|
@@ -17,7 +17,7 @@ export declare const getLayerById: (store: AppStore, layerId: string) => Layer;
|
|
|
17
17
|
* @param {object} store store: object - object from which the layers state will be extracted
|
|
18
18
|
* @returns {object} returnType: object - an object of all layers containing layer information (service, name, style, enabled etc.) indexed by layerId
|
|
19
19
|
*/
|
|
20
|
-
export declare const getLayersById: import("reselect").OutputSelector<AppStore, Record<string,
|
|
20
|
+
export declare const getLayersById: import("reselect").OutputSelector<AppStore, Record<string, import("./types").ReduxLayer>, (res: LayerState) => Record<string, import("./types").ReduxLayer>>;
|
|
21
21
|
/**
|
|
22
22
|
* Retrieves all layerIds
|
|
23
23
|
*
|
|
@@ -33,7 +33,7 @@ export declare const getLayersIds: import("reselect").OutputSelector<AppStore, s
|
|
|
33
33
|
* @param {object} store store: object - object from which the layers state will be extracted
|
|
34
34
|
* @returns {array} returnType: array - an array of all layers containing layer information (service, name, style, enabled etc.)
|
|
35
35
|
*/
|
|
36
|
-
export declare const getAllLayers: import("reselect").OutputSelector<AppStore,
|
|
36
|
+
export declare const getAllLayers: import("reselect").OutputSelector<AppStore, import("./types").ReduxLayer[], (res1: string[], res2: Record<string, import("./types").ReduxLayer>) => import("./types").ReduxLayer[]>;
|
|
37
37
|
/**
|
|
38
38
|
* Retrieves all layers that aren't base layers and aren't overlayers
|
|
39
39
|
*
|
|
@@ -41,7 +41,7 @@ export declare const getAllLayers: import("reselect").OutputSelector<AppStore, L
|
|
|
41
41
|
* @param {object} store store: object - object from which the layers state will be extracted
|
|
42
42
|
* @returns {array} returnType: array - an array of all non-baselayers containing layer information (service, name, style, enabled etc.)
|
|
43
43
|
*/
|
|
44
|
-
export declare const getLayers: import("reselect").OutputSelector<AppStore,
|
|
44
|
+
export declare const getLayers: import("reselect").OutputSelector<AppStore, import("./types").ReduxLayer[], (res: import("./types").ReduxLayer[]) => import("./types").ReduxLayer[]>;
|
|
45
45
|
/**
|
|
46
46
|
* Retrieves all baselayers
|
|
47
47
|
*
|
|
@@ -49,7 +49,7 @@ export declare const getLayers: import("reselect").OutputSelector<AppStore, Laye
|
|
|
49
49
|
* @param {object} store store: object - object from which the layers state will be extracted
|
|
50
50
|
* @returns {array} returnType: array - an array of all baselayers containing layer information (service, name, style, enabled etc.)
|
|
51
51
|
*/
|
|
52
|
-
export declare const getBaseLayers: import("reselect").OutputSelector<AppStore,
|
|
52
|
+
export declare const getBaseLayers: import("reselect").OutputSelector<AppStore, import("./types").ReduxLayer[], (res: import("./types").ReduxLayer[]) => import("./types").ReduxLayer[]>;
|
|
53
53
|
/**
|
|
54
54
|
* Retrieves all overLayers
|
|
55
55
|
*
|
|
@@ -57,16 +57,7 @@ export declare const getBaseLayers: import("reselect").OutputSelector<AppStore,
|
|
|
57
57
|
* @param {object} store store: object - object from which the layers state will be extracted
|
|
58
58
|
* @returns {array} returnType: array - an array of all overLayers containing layer information (service, name, style, enabled etc.)
|
|
59
59
|
*/
|
|
60
|
-
export declare const getOverLayers: import("reselect").OutputSelector<AppStore,
|
|
61
|
-
/**
|
|
62
|
-
* Gets styles of the passed layer
|
|
63
|
-
*
|
|
64
|
-
* Example: layerStyles = getLayerStyles(store, 'layerId_1')
|
|
65
|
-
* @param {object} store store: object - object from which the layers state will be extracted
|
|
66
|
-
* @param {string} layerId layerId: string - Id of the layer
|
|
67
|
-
* @returns {array} returnType: Style[] - array containing layer styles
|
|
68
|
-
*/
|
|
69
|
-
export declare const getLayerStyles: import("reselect").OutputParametricSelector<AppStore, string, import("@opengeoweb/webmap").Style[], (res: Layer) => import("@opengeoweb/webmap").Style[]>;
|
|
60
|
+
export declare const getOverLayers: import("reselect").OutputSelector<AppStore, import("./types").ReduxLayer[], (res: import("./types").ReduxLayer[]) => import("./types").ReduxLayer[]>;
|
|
70
61
|
/**
|
|
71
62
|
* Gets dimensions of the passed layer
|
|
72
63
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Action } from 'redux';
|
|
2
2
|
import { Style } from '@opengeoweb/webmap';
|
|
3
|
-
import { Dimension } from '../map/types';
|
|
4
|
-
import { WEBMAP_LAYER_CHANGE_OPACITY, WEBMAP_LAYER_CHANGE_NAME, WEBMAP_LAYER_CHANGE_STYLE, WEBMAP_LAYER_CHANGE_DIMENSION, WEBMAP_LAYER_CHANGE_ENABLED, WEBMAP_LAYER_DELETE, WEBMAP_ADD_LAYER, WEBMAP_SET_LAYERS, WEBMAP_SET_BASELAYERS, WEBMAP_ADD_BASELAYER, WEBMAP_BASELAYER_DELETE, WEBMAP_LAYER_ERROR, WEBMAP_ADD_AVAILABLE_BASELAYER, WEBMAP_ADD_AVAILABLE_BASELAYERS, WEBMAP_LAYER_SET_DIMENSIONS,
|
|
3
|
+
import { Dimension, UpdateAllMapDimensionsPayload } from '../map/types';
|
|
4
|
+
import { WEBMAP_LAYER_CHANGE_OPACITY, WEBMAP_LAYER_CHANGE_NAME, WEBMAP_LAYER_CHANGE_STYLE, WEBMAP_LAYER_CHANGE_DIMENSION, WEBMAP_LAYER_CHANGE_ENABLED, WEBMAP_LAYER_DELETE, WEBMAP_ADD_LAYER, WEBMAP_SET_LAYERS, WEBMAP_SET_BASELAYERS, WEBMAP_ADD_BASELAYER, WEBMAP_BASELAYER_DELETE, WEBMAP_LAYER_ERROR, WEBMAP_ADD_AVAILABLE_BASELAYER, WEBMAP_ADD_AVAILABLE_BASELAYERS, WEBMAP_LAYER_SET_DIMENSIONS, WEBMAP_UPDATE_LAYER_INFO } from './constants';
|
|
5
|
+
import type { SetLayersForServicePayload } from '../types';
|
|
5
6
|
export interface WMJSDimension {
|
|
6
7
|
getFirstValue(): string;
|
|
7
8
|
getLastValue(): string;
|
|
@@ -26,30 +27,39 @@ export declare enum LayerStatus {
|
|
|
26
27
|
default = "default",
|
|
27
28
|
error = "error"
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
/**
|
|
31
|
+
* ReduxLayer is used to reflect the shape of the layer in the redux layers store.
|
|
32
|
+
* It is a subset of Layer since some properties like the styles list now come from the service store.
|
|
33
|
+
*/
|
|
34
|
+
export interface ReduxLayer {
|
|
30
35
|
id?: string;
|
|
31
36
|
mapId?: string;
|
|
32
37
|
service?: string;
|
|
33
38
|
name?: string;
|
|
34
39
|
title?: string;
|
|
35
|
-
format?: string;
|
|
36
40
|
enabled?: boolean;
|
|
37
41
|
style?: string;
|
|
38
42
|
dimensions?: Dimension[];
|
|
39
|
-
styles?: Style[];
|
|
40
43
|
opacity?: number;
|
|
41
|
-
headers?: Headers[];
|
|
42
44
|
type?: string;
|
|
43
45
|
layerType?: LayerType;
|
|
44
|
-
geojson?: GeoJSON.FeatureCollection;
|
|
45
46
|
status?: LayerStatus;
|
|
47
|
+
format?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Layer is used to define a layer with all its possible properties.
|
|
51
|
+
*/
|
|
52
|
+
export interface Layer extends ReduxLayer {
|
|
53
|
+
styles?: Style[];
|
|
54
|
+
geojson?: GeoJSON.FeatureCollection;
|
|
55
|
+
headers?: Headers[];
|
|
46
56
|
}
|
|
47
57
|
export interface AvailableBaseLayersType {
|
|
48
|
-
byId: Record<string,
|
|
58
|
+
byId: Record<string, ReduxLayer>;
|
|
49
59
|
allIds: string[];
|
|
50
60
|
}
|
|
51
61
|
export interface LayerState {
|
|
52
|
-
byId: Record<string,
|
|
62
|
+
byId: Record<string, ReduxLayer>;
|
|
53
63
|
allIds: string[];
|
|
54
64
|
availableBaseLayers: AvailableBaseLayersType;
|
|
55
65
|
}
|
|
@@ -59,7 +69,7 @@ export interface LayerPayload {
|
|
|
59
69
|
}
|
|
60
70
|
export interface SetLayersPayload {
|
|
61
71
|
mapId: string;
|
|
62
|
-
layers:
|
|
72
|
+
layers: ReduxLayer[];
|
|
63
73
|
origin?: string;
|
|
64
74
|
}
|
|
65
75
|
export interface SetLayers extends Action {
|
|
@@ -68,7 +78,7 @@ export interface SetLayers extends Action {
|
|
|
68
78
|
}
|
|
69
79
|
export interface SetBaseLayersPayload {
|
|
70
80
|
mapId: string;
|
|
71
|
-
layers:
|
|
81
|
+
layers: ReduxLayer[];
|
|
72
82
|
origin?: string;
|
|
73
83
|
}
|
|
74
84
|
export interface SetBaseLayers extends Action {
|
|
@@ -83,14 +93,6 @@ export interface SetLayerDimensions extends Action {
|
|
|
83
93
|
type: typeof WEBMAP_LAYER_SET_DIMENSIONS;
|
|
84
94
|
payload: SetLayerDimensionsPayload;
|
|
85
95
|
}
|
|
86
|
-
export interface SetLayerStylesPayload extends LayerPayload {
|
|
87
|
-
origin: string;
|
|
88
|
-
styles: Style[];
|
|
89
|
-
}
|
|
90
|
-
export interface SetLayerStyles extends Action {
|
|
91
|
-
type: typeof WEBMAP_LAYER_SET_STYLES;
|
|
92
|
-
payload: SetLayerStylesPayload;
|
|
93
|
-
}
|
|
94
96
|
export interface SetLayerOpacityPayload extends LayerPayload {
|
|
95
97
|
opacity: number;
|
|
96
98
|
}
|
|
@@ -173,7 +175,7 @@ export interface AddAvailableBaseLayers extends Action {
|
|
|
173
175
|
payload: AddAvailableBaseLayersPayload;
|
|
174
176
|
}
|
|
175
177
|
export interface AddAvailableBaseLayersPayload {
|
|
176
|
-
layers:
|
|
178
|
+
layers: ReduxLayer[];
|
|
177
179
|
origin?: string;
|
|
178
180
|
}
|
|
179
181
|
export interface ErrorLayerPayload extends LayerPayload {
|
|
@@ -183,4 +185,15 @@ export interface ErrorLayer extends Action {
|
|
|
183
185
|
type: typeof WEBMAP_LAYER_ERROR;
|
|
184
186
|
payload: ErrorLayerPayload;
|
|
185
187
|
}
|
|
186
|
-
export
|
|
188
|
+
export interface UpdateLayerInfoPayload {
|
|
189
|
+
origin?: string;
|
|
190
|
+
mapDimensions?: UpdateAllMapDimensionsPayload;
|
|
191
|
+
layerStyle?: SetLayerStylePayload;
|
|
192
|
+
layerDimensions?: SetLayerDimensionsPayload;
|
|
193
|
+
serviceLayers?: SetLayersForServicePayload;
|
|
194
|
+
}
|
|
195
|
+
export interface UpdateLayerInfo extends Action {
|
|
196
|
+
type: typeof WEBMAP_UPDATE_LAYER_INFO;
|
|
197
|
+
payload: UpdateLayerInfoPayload;
|
|
198
|
+
}
|
|
199
|
+
export declare type LayerActions = SetLayerDimensions | SetLayerOpacity | SetLayerEnabled | SetLayerDimension | SetLayerStyle | SetLayerName | DeleteLayer | DeleteBaseLayer | AddLayer | SetLayers | SetBaseLayers | AddBaseLayer | ErrorLayer | AddAvailableBaseLayer | AddAvailableBaseLayers | UpdateLayerInfo;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SagaIterator } from 'redux-saga';
|
|
2
2
|
import { Moment } from 'moment';
|
|
3
3
|
import { SetMapAnimationStop, SetMapAnimationStart, ToggleAutoUpdate } from './types';
|
|
4
|
-
import { DeleteLayer,
|
|
4
|
+
import { DeleteLayer, UpdateLayerInfo } from '../layers/types';
|
|
5
5
|
export declare const generateTimeList: (start: Moment, end: Moment, interval: number) => {
|
|
6
6
|
name: string;
|
|
7
7
|
value: string;
|
|
@@ -11,7 +11,7 @@ export declare function startAnimationSaga({ payload, }: SetMapAnimationStart):
|
|
|
11
11
|
export declare function stopAnimationSaga({ payload, }: SetMapAnimationStop): Generator;
|
|
12
12
|
export declare function deleteLayerSaga({ payload }: DeleteLayer): SagaIterator;
|
|
13
13
|
export declare function updateAnimation(mapId: string, maxValue: string): SagaIterator;
|
|
14
|
-
export declare function setLayerDimensionsSaga({ payload, }:
|
|
14
|
+
export declare function setLayerDimensionsSaga({ payload, }: UpdateLayerInfo): SagaIterator;
|
|
15
15
|
export declare function toggleAutoUpdateSaga({ payload, }: ToggleAutoUpdate): SagaIterator;
|
|
16
16
|
export declare function rootSaga(): SagaIterator;
|
|
17
17
|
export default rootSaga;
|