@opengeoweb/store 9.9.0 → 9.10.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 +643 -458
- package/package.json +2 -3
- package/src/store/drawingtool/selectors.d.ts +5 -0
- package/src/store/generic/synchronizationActions/actions.d.ts +1 -1
- package/src/store/generic/synchronizationActions/types.d.ts +3 -3
- package/src/store/mapStore/layers/types.d.ts +1 -0
- package/src/store/mapStore/map/mapSagaAnimationUtils.d.ts +30 -0
- package/src/store/mapStore/map/sagas.d.ts +18 -8
- package/src/store/mapStore/map/selectors.d.ts +12 -1
- package/src/store/mapStore/map/types.d.ts +5 -0
- package/src/store/testUtils/Providers.d.ts +4 -6
- package/src/store/ui/listener.d.ts +2 -0
- package/src/store/ui/listener.spec.d.ts +1 -0
- package/src/store/ui/sagas.d.ts +0 -5
- /package/src/store/{ui/sagas.spec.d.ts → mapStore/map/mapSagaAnimationUtils.spec.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/store",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.10.0",
|
|
4
4
|
"description": "GeoWeb Store library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"immer": "^10.0.3",
|
|
19
19
|
"@redux-eggs/redux-toolkit": "^2.2.0",
|
|
20
20
|
"@redux-eggs/saga-extension": "^2.2.0",
|
|
21
|
-
"lodash": "^4.17.21"
|
|
22
|
-
"@opengeoweb/theme": "*"
|
|
21
|
+
"lodash": "^4.17.21"
|
|
23
22
|
},
|
|
24
23
|
"peerDependencies": {
|
|
25
24
|
"react": "18"
|
|
@@ -36,3 +36,8 @@ export declare const getShouldAllowMultipleShapes: ((state: DrawtoolModuleStore,
|
|
|
36
36
|
}> & {
|
|
37
37
|
clearCache: () => void;
|
|
38
38
|
};
|
|
39
|
+
export declare const getActiveDrawMode: ((state: DrawtoolModuleStore, id: import("@reduxjs/toolkit").EntityId) => import("dist/libs/webmap-react/src").DrawMode | undefined) & import("reselect").OutputSelectorFields<(args_0: import("./reducer").DrawToolItem | undefined) => import("dist/libs/webmap-react/src").DrawMode | undefined, {
|
|
40
|
+
clearCache: () => void;
|
|
41
|
+
}> & {
|
|
42
|
+
clearCache: () => void;
|
|
43
|
+
};
|
|
@@ -5,7 +5,7 @@ import type { SetBboxSyncActionPayload, SetBboxSyncPayload, SetLayerActionsSyncP
|
|
|
5
5
|
*
|
|
6
6
|
* These actions should not be used by components directly. Components should only use the generic actions.
|
|
7
7
|
*/
|
|
8
|
-
export declare const setTimeSync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[
|
|
8
|
+
export declare const setTimeSync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[setTimePayload: SetTimePayload | null, targets: SetTimeSyncPayload[], groups: string[]], SetTimeSyncActionPayload, "GENERIC_SYNC_SETTIME", never, never>;
|
|
9
9
|
export declare const setBboxSync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: SetBboxPayload, targets: SetBboxSyncPayload[], groups: string[]], SetBboxSyncActionPayload, "GENERIC_SYNC_SETBBOX", never, never>;
|
|
10
10
|
export declare const setLayerActionSync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: SyncLayerPayloads, targets: SyncLayerPayloads[], type: string], SetLayerActionsSyncPayload, "GENERIC_SYNC_SETLAYERACTIONS", never, never>;
|
|
11
11
|
export type GenericSyncActions = ReturnType<typeof setTimeSync> | ReturnType<typeof setBboxSync> | ReturnType<typeof setLayerActionSync>;
|
|
@@ -18,16 +18,16 @@ export interface SetLayerActionsSyncPayload {
|
|
|
18
18
|
source: {
|
|
19
19
|
type: string;
|
|
20
20
|
payload: SyncLayerPayloads;
|
|
21
|
-
};
|
|
21
|
+
} | null;
|
|
22
22
|
targets: SyncLayerPayloads[];
|
|
23
23
|
}
|
|
24
24
|
export interface SetTimeSyncActionPayload {
|
|
25
|
-
source: ReturnType<typeof setTime
|
|
25
|
+
source: ReturnType<typeof setTime> | null;
|
|
26
26
|
groups: string[];
|
|
27
27
|
targets: SetTimeSyncPayload[];
|
|
28
28
|
}
|
|
29
29
|
export interface SetBboxSyncActionPayload {
|
|
30
|
-
source: ReturnType<typeof setBbox
|
|
30
|
+
source: ReturnType<typeof setBbox> | null;
|
|
31
31
|
groups: string[];
|
|
32
32
|
targets: SetBboxSyncPayload[];
|
|
33
33
|
}
|
|
@@ -136,6 +136,7 @@ export interface UpdateFeaturePayload extends LayerPayload {
|
|
|
136
136
|
reason?: string;
|
|
137
137
|
geoJSONIntersectionLayerId?: string;
|
|
138
138
|
geoJSONIntersectionBoundsLayerId?: string;
|
|
139
|
+
selectionType?: string;
|
|
139
140
|
}
|
|
140
141
|
export interface UpdateFeaturePropertiesPayload extends LayerPayload {
|
|
141
142
|
properties: GeoJSON.GeoJsonProperties;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { SetTimeSyncPayload } from '../../generic/synchronizationActions/types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the next step for given timerId.
|
|
4
|
+
* @param timerId The timer id
|
|
5
|
+
* @param numberOfStepsInAnimation Animation length in steps
|
|
6
|
+
* @param numStepsToGoForward Amount of steps to go forwards, defaults to 1. Can be positive and negative
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const getNextStep: (timerId: string, numberOfStepsInAnimation: number, numStepsToGoForward?: number) => number;
|
|
10
|
+
/**
|
|
11
|
+
* Set step for the timerId
|
|
12
|
+
* @param timerId
|
|
13
|
+
* @param timerStep
|
|
14
|
+
*/
|
|
15
|
+
export declare const setStep: (timerId: string, timerStep: number) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Gets the current step for the timer
|
|
18
|
+
* @param timerId
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare const getCurrentStep: (timerId: string) => number;
|
|
22
|
+
export declare const MAX_NUMBER_STEPS_FORWARD_TO_PREFETCH = 2;
|
|
23
|
+
/**
|
|
24
|
+
* This prefetches all images connected to the same sync group as provided timerId
|
|
25
|
+
* @param timerId The timerId
|
|
26
|
+
* @param animationListValues List of animation steps in isostring to animate
|
|
27
|
+
* @param targets List of targets to check
|
|
28
|
+
* @returns True if all maps are ready to go forward, false if the map has no data to display yet.
|
|
29
|
+
*/
|
|
30
|
+
export declare const prefetchAnimationTargetsForSaga: (timerId: string, animationListValues: string[], targets: SetTimeSyncPayload[]) => boolean;
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
-
import { SagaIterator } from 'redux-saga';
|
|
2
|
-
import { AnimationStep } from '@opengeoweb/webmap';
|
|
1
|
+
import { EventChannel, SagaIterator } from 'redux-saga';
|
|
3
2
|
import { mapActions } from '.';
|
|
4
3
|
import { layerActions } from '../layers';
|
|
5
4
|
import { Layer } from '../layers/types';
|
|
6
|
-
export declare const generateTimeList: (start: Date, end: Date, interval: number) => {
|
|
7
|
-
name: string;
|
|
8
|
-
value: string;
|
|
9
|
-
}[];
|
|
10
5
|
export declare const getAnimationEndTime: (animationEndTime: string) => string;
|
|
11
6
|
export declare const isAnimationEndTimeValid: (animationEndTime: string) => boolean;
|
|
12
|
-
export declare function updateMapDraw(mapId: string, draw: string | AnimationStep[] | undefined, initialAnimationStep?: number): void;
|
|
13
7
|
export declare function startAnimationSaga({ payload, }: ReturnType<typeof mapActions.mapStartAnimation>): Generator;
|
|
14
8
|
export declare function stopAnimationSaga({ payload, }: ReturnType<typeof mapActions.mapStopAnimation>): Generator;
|
|
15
9
|
export declare function deleteLayerSaga({ payload, }: ReturnType<typeof layerActions.layerDelete>): SagaIterator;
|
|
16
10
|
export declare function updateAnimation(mapId: string, maxValue: string): SagaIterator;
|
|
17
|
-
export declare function
|
|
11
|
+
export declare function updateAnimationWithLatestUpdate({ payload, }: ReturnType<typeof layerActions.onUpdateLayerInformation>): SagaIterator;
|
|
18
12
|
export declare function toggleAutoUpdateSaga({ payload, }: ReturnType<typeof mapActions.toggleAutoUpdate>): SagaIterator;
|
|
19
13
|
export declare function handleBaseLayersSaga(mapId: string, baseLayers: Layer[]): SagaIterator;
|
|
20
14
|
export declare function setMapPresetSaga({ payload, }: ReturnType<typeof mapActions.setMapPreset>): SagaIterator;
|
|
21
15
|
export declare function unregisterMapSaga({ payload, }: ReturnType<typeof mapActions.unregisterMap>): Generator;
|
|
22
16
|
export declare function setStepBackwardOrForwardSaga({ payload, }: ReturnType<typeof mapActions.setStepBackwardOrForward>): Generator;
|
|
17
|
+
/**
|
|
18
|
+
* This saga is triggered by the metronome. An array of timerIds is given as argument.
|
|
19
|
+
* It will update the animation loop of multiple maps and sliders
|
|
20
|
+
* It will prefetch images for maps
|
|
21
|
+
* @param timerIds string[] array of timerIds
|
|
22
|
+
*/
|
|
23
|
+
export declare function metronomeSaga(timerIds: string[]): SagaIterator;
|
|
24
|
+
/**
|
|
25
|
+
* Creates a channel for the metronome
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export declare function metronomeTicker(): EventChannel<string[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Makes a saga channel for the metronome ticker
|
|
31
|
+
*/
|
|
32
|
+
export declare function metronomeSagaWithChannel(): SagaIterator;
|
|
23
33
|
export declare function rootSaga(): SagaIterator;
|
|
24
34
|
export default rootSaga;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Bbox, MapPreset, WebMap, WebMapState } from './types';
|
|
2
2
|
import type { CoreAppStore } from '../../types';
|
|
3
|
-
import type { Dimension, Layer } from '../types';
|
|
3
|
+
import type { Dimension, Layer, WebMapAnimationList } from '../types';
|
|
4
4
|
import type { uiTypes } from '../../ui';
|
|
5
5
|
/**
|
|
6
6
|
* Gets the map state by mapId
|
|
@@ -692,3 +692,14 @@ export declare const getDockedLayerManagerSize: ((state: any, mapId: any) => imp
|
|
|
692
692
|
}> & {
|
|
693
693
|
clearCache: () => void;
|
|
694
694
|
};
|
|
695
|
+
/**
|
|
696
|
+
* Returns the animation list for given map id
|
|
697
|
+
* @param {object} store store: object - store object
|
|
698
|
+
* @param {string} mapId mapId: string - Id of the map
|
|
699
|
+
* @returns {animationList} returnType: WebMapAnimationList, list of timesteps to animate for this map.
|
|
700
|
+
*/
|
|
701
|
+
export declare const getAnimationList: ((state: any, mapId: any) => WebMapAnimationList) & import("reselect").OutputSelectorFields<(args_0: WebMap | undefined, args_1: string | undefined, args_2: string | undefined, args_3: number) => WebMapAnimationList, {
|
|
702
|
+
clearCache: () => void;
|
|
703
|
+
}> & {
|
|
704
|
+
clearCache: () => void;
|
|
705
|
+
};
|
|
@@ -13,11 +13,16 @@ export interface Dimension {
|
|
|
13
13
|
validSyncSelection?: boolean;
|
|
14
14
|
values?: string;
|
|
15
15
|
}
|
|
16
|
+
export type WebMapAnimationList = {
|
|
17
|
+
name: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
16
20
|
export interface WebMap {
|
|
17
21
|
id: string;
|
|
18
22
|
isAnimating: boolean;
|
|
19
23
|
animationStartTime?: string;
|
|
20
24
|
animationEndTime?: string;
|
|
25
|
+
timeList?: WebMapAnimationList | undefined;
|
|
21
26
|
isAutoUpdating: boolean;
|
|
22
27
|
shouldEndtimeOverride: boolean;
|
|
23
28
|
srs: string;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ThemeProviderProps } from '@opengeoweb/theme';
|
|
3
2
|
import { Store } from '@reduxjs/toolkit';
|
|
4
3
|
export declare const createStore: () => Store;
|
|
5
|
-
interface ThemeStoreProviderProps extends ThemeProviderProps {
|
|
6
|
-
store: Store;
|
|
7
|
-
}
|
|
8
4
|
/**
|
|
9
5
|
* A Provider component which provides the GeoWeb theme and store for the core.
|
|
10
6
|
* Note: Should only be used with core components, as the provided store is only for core.
|
|
11
7
|
* @param children
|
|
12
8
|
* @returns
|
|
13
9
|
*/
|
|
14
|
-
export declare const
|
|
15
|
-
|
|
10
|
+
export declare const StoreProvider: React.FC<{
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
store: Store;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/store/ui/sagas.d.ts
DELETED
|
File without changes
|