@opengeoweb/store 9.27.0 → 9.28.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 +117 -129
- package/package.json +1 -3
- package/src/store/generic/synchronizationActions/actions.d.ts +1 -1
- package/src/store/generic/synchronizationGroups/types.d.ts +1 -1
- package/src/store/generic/synchronizationGroups/utils.d.ts +3 -3
- package/src/store/generic/sagas.d.ts +0 -11
- package/src/store/generic/sagas.spec.d.ts +0 -1
package/index.esm.js
CHANGED
|
@@ -8,11 +8,9 @@ import { produce } from 'immer';
|
|
|
8
8
|
import { isEqual, isEmpty, compact } from 'lodash';
|
|
9
9
|
import { useSelector, useDispatch, Provider } from 'react-redux';
|
|
10
10
|
import { useCallback, useEffect } from 'react';
|
|
11
|
-
import { createStore } from '@redux-eggs/redux-toolkit';
|
|
12
|
-
import { getSagaExtension } from '@redux-eggs/saga-extension';
|
|
13
11
|
import { metronome } from '@opengeoweb/metronome';
|
|
14
|
-
import { takeLatest, select, put } from 'redux-saga/effects';
|
|
15
12
|
import { jsx } from 'react/jsx-runtime';
|
|
13
|
+
import { createStore } from '@redux-eggs/redux-toolkit';
|
|
16
14
|
|
|
17
15
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
18
16
|
|
|
@@ -2608,7 +2606,7 @@ const setBbox = createAction('GENERIC_SETBBOX');
|
|
|
2608
2606
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
2609
2607
|
* */
|
|
2610
2608
|
/**
|
|
2611
|
-
* These actions are fired by the generic/
|
|
2609
|
+
* These actions are fired by the generic/listener.ts, based on generic actions and the synchronizationGroup state.
|
|
2612
2610
|
*
|
|
2613
2611
|
* These actions should not be used by components directly. Components should only use the generic actions.
|
|
2614
2612
|
*/
|
|
@@ -3195,7 +3193,7 @@ const slice$7 = createSlice({
|
|
|
3195
3193
|
});
|
|
3196
3194
|
}).addCase(setLayerActionSync, (draft, action) => {
|
|
3197
3195
|
/*
|
|
3198
|
-
* This GENERIC_SYNC_SETLAYERACTIONS action is generated by the syncgroup
|
|
3196
|
+
* This GENERIC_SYNC_SETLAYERACTIONS action is generated by the syncgroup listener.
|
|
3199
3197
|
* It has multiple targets (Layers) in its payload.
|
|
3200
3198
|
* These targets can be used as payloads in new Layer actions.
|
|
3201
3199
|
* These actions are here handled via the layer reducer, as it is the same logic
|
|
@@ -4544,7 +4542,7 @@ const slice$5 = createSlice({
|
|
|
4544
4542
|
});
|
|
4545
4543
|
}).addCase(setLayerActionSync, (draft, action) => {
|
|
4546
4544
|
/*
|
|
4547
|
-
* This GENERIC_SYNC_SETLAYERACTIONS action is generated by the syncgroup
|
|
4545
|
+
* This GENERIC_SYNC_SETLAYERACTIONS action is generated by the syncgroup listener.
|
|
4548
4546
|
* It has multiple targets (Layers) in its payload.
|
|
4549
4547
|
* These targets can be used as payloads in new Layer actions.
|
|
4550
4548
|
* These actions are here handled via the layer reducer, as it is the same logic
|
|
@@ -4587,7 +4585,7 @@ const slice$5 = createSlice({
|
|
|
4587
4585
|
if (!draft.byId[mapId]) {
|
|
4588
4586
|
return;
|
|
4589
4587
|
}
|
|
4590
|
-
// reset preset state (currently setMapPreset
|
|
4588
|
+
// reset preset state (currently setMapPreset listener is firing actions and these are setting values)
|
|
4591
4589
|
draft.byId[mapId].baseLayers = [];
|
|
4592
4590
|
draft.byId[mapId].mapLayers = [];
|
|
4593
4591
|
draft.byId[mapId].overLayers = [];
|
|
@@ -5205,7 +5203,7 @@ var SyncGroupActionOrigin;
|
|
|
5205
5203
|
SyncGroupActionOrigin["layerActions"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_LAYERACTIONS";
|
|
5206
5204
|
SyncGroupActionOrigin["move"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_MOVEACTION";
|
|
5207
5205
|
SyncGroupActionOrigin["add"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_ADDACTION";
|
|
5208
|
-
SyncGroupActionOrigin["
|
|
5206
|
+
SyncGroupActionOrigin["autoLayerId"] = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_AUTOLAYERIDACTION";
|
|
5209
5207
|
})(SyncGroupActionOrigin || (SyncGroupActionOrigin = {}));
|
|
5210
5208
|
|
|
5211
5209
|
var types$2 = /*#__PURE__*/Object.freeze({
|
|
@@ -7127,7 +7125,7 @@ const metronomeHandler = (timerIds, listenerApi) => {
|
|
|
7127
7125
|
}
|
|
7128
7126
|
// Update all targets of all sync groups in one action.
|
|
7129
7127
|
if (targetsWithUpdateValue.length > 0) {
|
|
7130
|
-
listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['
|
|
7128
|
+
listenerApi.dispatch(setTimeSync(null, targetsWithUpdateValue, ['metronomelistener']));
|
|
7131
7129
|
}
|
|
7132
7130
|
};
|
|
7133
7131
|
const metronomeListener = createListenerMiddleware();
|
|
@@ -8608,10 +8606,6 @@ serviceListener.startListening({
|
|
|
8608
8606
|
})
|
|
8609
8607
|
});
|
|
8610
8608
|
|
|
8611
|
-
// TODO: This fixes typecheck errors but maybe there is a better way to do that
|
|
8612
|
-
createStore({
|
|
8613
|
-
extensions: [getSagaExtension()]
|
|
8614
|
-
});
|
|
8615
8609
|
const mapStoreReducers = {
|
|
8616
8610
|
webmap: reducer$4,
|
|
8617
8611
|
services: reducer$2,
|
|
@@ -8776,23 +8770,22 @@ const getLayerMoveActionsTargets = (state, payload, actionType) => {
|
|
|
8776
8770
|
});
|
|
8777
8771
|
};
|
|
8778
8772
|
/**
|
|
8779
|
-
* These targets are found for the
|
|
8773
|
+
* These targets are found for the map action SetAutoLayerId. It needs both a target mapId and layerId
|
|
8780
8774
|
* @param state
|
|
8781
8775
|
* @param payload
|
|
8782
8776
|
* @param actionType
|
|
8783
8777
|
* @returns
|
|
8784
8778
|
*/
|
|
8785
|
-
const
|
|
8786
|
-
const
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
const foundTargets = findTargets(state, payload, actionType, sourceMapId);
|
|
8779
|
+
const getSetAutoLayerIdActionsTargets = (state, payload, actionType) => {
|
|
8780
|
+
const payloadWithLayerId = Object.assign(Object.assign({}, payload), {
|
|
8781
|
+
layerId: payload.autoUpdateLayerId || payload.autoTimeStepLayerId || payload.layerId
|
|
8782
|
+
});
|
|
8783
|
+
const foundTargets = findTargets(state, payloadWithLayerId, actionType, payload.mapId);
|
|
8791
8784
|
return foundTargets.map(target => {
|
|
8792
8785
|
return {
|
|
8793
8786
|
mapId: target.targetId,
|
|
8794
8787
|
layerId: target.layerId,
|
|
8795
|
-
origin: SyncGroupActionOrigin.
|
|
8788
|
+
origin: SyncGroupActionOrigin.autoLayerId
|
|
8796
8789
|
};
|
|
8797
8790
|
});
|
|
8798
8791
|
};
|
|
@@ -8868,6 +8861,105 @@ genericListener.startListening({
|
|
|
8868
8861
|
}
|
|
8869
8862
|
})
|
|
8870
8863
|
});
|
|
8864
|
+
genericListener.startListening({
|
|
8865
|
+
actionCreator: layerActions.addLayer,
|
|
8866
|
+
effect: ({
|
|
8867
|
+
payload,
|
|
8868
|
+
type
|
|
8869
|
+
}, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8870
|
+
listenerApi.cancelActiveListeners();
|
|
8871
|
+
/* Should not listen to actions from itself */
|
|
8872
|
+
if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
|
|
8873
|
+
return;
|
|
8874
|
+
}
|
|
8875
|
+
const targets = getAddLayerActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
8876
|
+
if (targets && targets.length > 0) {
|
|
8877
|
+
listenerApi.dispatch(setLayerActionSync(payload, targets, type));
|
|
8878
|
+
}
|
|
8879
|
+
})
|
|
8880
|
+
});
|
|
8881
|
+
genericListener.startListening({
|
|
8882
|
+
actionCreator: layerActions.duplicateMapLayer,
|
|
8883
|
+
effect: ({
|
|
8884
|
+
payload
|
|
8885
|
+
}, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8886
|
+
listenerApi.cancelActiveListeners();
|
|
8887
|
+
const sourceLayer = getLayerById(listenerApi.getState(), payload.oldLayerId);
|
|
8888
|
+
const newPayload = {
|
|
8889
|
+
mapId: payload.mapId,
|
|
8890
|
+
layer: sourceLayer,
|
|
8891
|
+
origin: payload.origin
|
|
8892
|
+
};
|
|
8893
|
+
const targets = getAddLayerActionsTargets(listenerApi.getState(), newPayload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
8894
|
+
if (targets && targets.length > 0) {
|
|
8895
|
+
listenerApi.dispatch(setLayerActionSync(newPayload, targets, layerActions.addLayer.type));
|
|
8896
|
+
}
|
|
8897
|
+
})
|
|
8898
|
+
});
|
|
8899
|
+
genericListener.startListening({
|
|
8900
|
+
actionCreator: mapActions.layerMoveLayer,
|
|
8901
|
+
effect: ({
|
|
8902
|
+
payload,
|
|
8903
|
+
type
|
|
8904
|
+
}, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8905
|
+
listenerApi.cancelActiveListeners();
|
|
8906
|
+
/* Should not listen to actions from itself */
|
|
8907
|
+
if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
|
|
8908
|
+
return;
|
|
8909
|
+
}
|
|
8910
|
+
const targets = getLayerMoveActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
8911
|
+
if (targets && targets.length > 0) {
|
|
8912
|
+
listenerApi.dispatch(setLayerActionSync(payload, targets, type));
|
|
8913
|
+
}
|
|
8914
|
+
})
|
|
8915
|
+
});
|
|
8916
|
+
genericListener.startListening({
|
|
8917
|
+
matcher: isAnyOf(mapActions.setAutoLayerId, mapActions.setAutoUpdateLayerId, mapActions.setAutoTimestepLayerId),
|
|
8918
|
+
effect: ({
|
|
8919
|
+
payload,
|
|
8920
|
+
type
|
|
8921
|
+
}, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8922
|
+
listenerApi.cancelActiveListeners();
|
|
8923
|
+
const targets = getSetAutoLayerIdActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
8924
|
+
if (targets && targets.length > 0) {
|
|
8925
|
+
listenerApi.dispatch(setLayerActionSync(payload, targets, type));
|
|
8926
|
+
}
|
|
8927
|
+
})
|
|
8928
|
+
});
|
|
8929
|
+
genericListener.startListening({
|
|
8930
|
+
actionCreator: layerActions.setBaseLayers,
|
|
8931
|
+
effect: ({
|
|
8932
|
+
payload,
|
|
8933
|
+
type
|
|
8934
|
+
}, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8935
|
+
listenerApi.cancelActiveListeners();
|
|
8936
|
+
/* Should not listen to actions from itself */
|
|
8937
|
+
if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
|
|
8938
|
+
return;
|
|
8939
|
+
}
|
|
8940
|
+
const targets = getMapBaseLayerActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
8941
|
+
if (targets && targets.length > 0) {
|
|
8942
|
+
listenerApi.dispatch(setLayerActionSync(payload, targets, type));
|
|
8943
|
+
}
|
|
8944
|
+
})
|
|
8945
|
+
});
|
|
8946
|
+
genericListener.startListening({
|
|
8947
|
+
actionCreator: layerActions.layerDelete,
|
|
8948
|
+
effect: ({
|
|
8949
|
+
payload,
|
|
8950
|
+
type
|
|
8951
|
+
}, listenerApi) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8952
|
+
listenerApi.cancelActiveListeners();
|
|
8953
|
+
/* Should not listen to actions from itself */
|
|
8954
|
+
if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
|
|
8955
|
+
return;
|
|
8956
|
+
}
|
|
8957
|
+
const targets = getLayerDeleteActionsTargets(listenerApi.getState(), payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
8958
|
+
if (targets && targets.length > 0) {
|
|
8959
|
+
listenerApi.dispatch(setLayerActionSync(payload, targets, type));
|
|
8960
|
+
}
|
|
8961
|
+
})
|
|
8962
|
+
});
|
|
8871
8963
|
|
|
8872
8964
|
/* *
|
|
8873
8965
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -9085,7 +9177,7 @@ const slice = createSlice({
|
|
|
9085
9177
|
draft,
|
|
9086
9178
|
// eslint-disable-next-line no-unused-vars
|
|
9087
9179
|
action) => {
|
|
9088
|
-
// action caught in drawingTool/
|
|
9180
|
+
// action caught in drawingTool/listener
|
|
9089
9181
|
}
|
|
9090
9182
|
},
|
|
9091
9183
|
extraReducers: builder => {
|
|
@@ -9209,7 +9301,7 @@ var selectors = /*#__PURE__*/Object.freeze({
|
|
|
9209
9301
|
});
|
|
9210
9302
|
|
|
9211
9303
|
const drawingToolListener = createListenerMiddleware();
|
|
9212
|
-
const registerOrigin = 'drawings
|
|
9304
|
+
const registerOrigin = 'drawings listener:registerDrawToolListener';
|
|
9213
9305
|
// register draw tool
|
|
9214
9306
|
drawingToolListener.startListening({
|
|
9215
9307
|
actionCreator: drawtoolActions.registerDrawTool,
|
|
@@ -9381,7 +9473,7 @@ drawingToolListener.startListening({
|
|
|
9381
9473
|
}));
|
|
9382
9474
|
} catch (error) {
|
|
9383
9475
|
// eslint-disable-next-line no-console
|
|
9384
|
-
console.log('error
|
|
9476
|
+
console.log('error changeDrawToolListener', error);
|
|
9385
9477
|
}
|
|
9386
9478
|
})
|
|
9387
9479
|
});
|
|
@@ -9726,107 +9818,6 @@ var storeTestUtils = /*#__PURE__*/Object.freeze({
|
|
|
9726
9818
|
webmapStateWithAddedLayer: webmapStateWithAddedLayer
|
|
9727
9819
|
});
|
|
9728
9820
|
|
|
9729
|
-
/* *
|
|
9730
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9731
|
-
* you may not use this file except in compliance with the License.
|
|
9732
|
-
* You may obtain a copy of the License at
|
|
9733
|
-
*
|
|
9734
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9735
|
-
*
|
|
9736
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
9737
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
9738
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9739
|
-
* See the License for the specific language governing permissions and
|
|
9740
|
-
* limitations under the License.
|
|
9741
|
-
*
|
|
9742
|
-
* Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
9743
|
-
* Copyright 2020 - Finnish Meteorological Institute (FMI)
|
|
9744
|
-
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
9745
|
-
* */
|
|
9746
|
-
function* addLayerActionsSaga({
|
|
9747
|
-
payload,
|
|
9748
|
-
type
|
|
9749
|
-
}) {
|
|
9750
|
-
/* Should not listen to actions from itself */
|
|
9751
|
-
if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
|
|
9752
|
-
return;
|
|
9753
|
-
}
|
|
9754
|
-
const targets = yield select(getAddLayerActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
9755
|
-
if (targets && targets.length > 0) {
|
|
9756
|
-
yield put(setLayerActionSync(payload, targets, type));
|
|
9757
|
-
}
|
|
9758
|
-
}
|
|
9759
|
-
function* duplicateMapLayerActionsSaga({
|
|
9760
|
-
payload
|
|
9761
|
-
}) {
|
|
9762
|
-
const sourceLayer = yield select(getLayerById, payload.oldLayerId);
|
|
9763
|
-
const newPayload = {
|
|
9764
|
-
mapId: payload.mapId,
|
|
9765
|
-
layer: sourceLayer,
|
|
9766
|
-
origin: payload.origin
|
|
9767
|
-
};
|
|
9768
|
-
const targets = yield select(getAddLayerActionsTargets, newPayload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
9769
|
-
if (targets && targets.length > 0) {
|
|
9770
|
-
yield put(setLayerActionSync(newPayload, targets, layerActions.addLayer.type));
|
|
9771
|
-
}
|
|
9772
|
-
}
|
|
9773
|
-
function* deleteLayerActionsSaga({
|
|
9774
|
-
payload,
|
|
9775
|
-
type
|
|
9776
|
-
}) {
|
|
9777
|
-
/* Should not listen to actions from itself */
|
|
9778
|
-
if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
|
|
9779
|
-
return;
|
|
9780
|
-
}
|
|
9781
|
-
const targets = yield select(getLayerDeleteActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
9782
|
-
if (targets && targets.length > 0) {
|
|
9783
|
-
yield put(setLayerActionSync(payload, targets, type));
|
|
9784
|
-
}
|
|
9785
|
-
}
|
|
9786
|
-
function* moveLayerActionsSaga({
|
|
9787
|
-
payload,
|
|
9788
|
-
type
|
|
9789
|
-
}) {
|
|
9790
|
-
/* Should not listen to actions from itself */
|
|
9791
|
-
if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
|
|
9792
|
-
return;
|
|
9793
|
-
}
|
|
9794
|
-
const targets = yield select(getLayerMoveActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
9795
|
-
if (targets && targets.length > 0) {
|
|
9796
|
-
yield put(setLayerActionSync(payload, targets, type));
|
|
9797
|
-
}
|
|
9798
|
-
}
|
|
9799
|
-
function* setAutoLayerIdActionsSaga({
|
|
9800
|
-
payload,
|
|
9801
|
-
type
|
|
9802
|
-
}) {
|
|
9803
|
-
const targets = yield select(getSetActiveLayerIdActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
9804
|
-
if (targets && targets.length > 0) {
|
|
9805
|
-
yield put(setLayerActionSync(payload, targets, type));
|
|
9806
|
-
}
|
|
9807
|
-
}
|
|
9808
|
-
function* mapBaseLayerActionsSaga({
|
|
9809
|
-
payload,
|
|
9810
|
-
type
|
|
9811
|
-
}) {
|
|
9812
|
-
/* Should not listen to actions from itself */
|
|
9813
|
-
if (payload && payload.origin === LayerActionOrigin.ReactMapViewParseLayer) {
|
|
9814
|
-
return;
|
|
9815
|
-
}
|
|
9816
|
-
const targets = yield select(getMapBaseLayerActionsTargets, payload, SYNCGROUPS_TYPE_SETLAYERACTIONS);
|
|
9817
|
-
if (targets && targets.length > 0) {
|
|
9818
|
-
yield put(setLayerActionSync(payload, targets, type));
|
|
9819
|
-
}
|
|
9820
|
-
}
|
|
9821
|
-
function* rootSaga() {
|
|
9822
|
-
yield takeLatest(layerActions.layerDelete.type, deleteLayerActionsSaga);
|
|
9823
|
-
yield takeLatest(layerActions.addLayer.type, addLayerActionsSaga);
|
|
9824
|
-
yield takeLatest(layerActions.duplicateMapLayer.type, duplicateMapLayerActionsSaga);
|
|
9825
|
-
yield takeLatest(mapActions.layerMoveLayer.type, moveLayerActionsSaga);
|
|
9826
|
-
yield takeLatest(mapActions.setAutoLayerId.type, setAutoLayerIdActionsSaga);
|
|
9827
|
-
yield takeLatest(layerActions.setBaseLayers.type, mapBaseLayerActionsSaga);
|
|
9828
|
-
}
|
|
9829
|
-
|
|
9830
9821
|
/* *
|
|
9831
9822
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9832
9823
|
* you may not use this file except in compliance with the License.
|
|
@@ -9899,7 +9890,6 @@ const synchronizationGroupConfig = {
|
|
|
9899
9890
|
syncronizationGroupStore: reducer$3,
|
|
9900
9891
|
loadingIndicatorStore: loadingIndicatorReducer
|
|
9901
9892
|
},
|
|
9902
|
-
sagas: [rootSaga],
|
|
9903
9893
|
middlewares: [genericListener.middleware, syncGroupsListener.middleware]
|
|
9904
9894
|
};
|
|
9905
9895
|
|
|
@@ -9946,9 +9936,7 @@ const uiModuleConfig = {
|
|
|
9946
9936
|
* */
|
|
9947
9937
|
const coreModuleConfig = [mapStoreModuleConfig, synchronizationGroupConfig, uiModuleConfig, drawtoolModuleConfig];
|
|
9948
9938
|
|
|
9949
|
-
const createCustomStore = () => createStore(
|
|
9950
|
-
extensions: [getSagaExtension({})]
|
|
9951
|
-
});
|
|
9939
|
+
const createCustomStore = () => createStore();
|
|
9952
9940
|
const WrapperWithModules = withEggs(coreModuleConfig)(({
|
|
9953
9941
|
children
|
|
9954
9942
|
}) => children);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/store",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.28.0",
|
|
4
4
|
"description": "GeoWeb Store library for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -13,11 +13,9 @@
|
|
|
13
13
|
"@reduxjs/toolkit": "^1.9.7",
|
|
14
14
|
"@redux-eggs/core": "^2.2.0",
|
|
15
15
|
"@opengeoweb/webmap-react": "*",
|
|
16
|
-
"redux-saga": "^1.2.3",
|
|
17
16
|
"@opengeoweb/webmap": "*",
|
|
18
17
|
"immer": "^10.0.3",
|
|
19
18
|
"@redux-eggs/redux-toolkit": "^2.2.0",
|
|
20
|
-
"@redux-eggs/saga-extension": "^2.2.0",
|
|
21
19
|
"lodash": "^4.17.21",
|
|
22
20
|
"@opengeoweb/metronome": "*",
|
|
23
21
|
"@opengeoweb/timeslider": "*"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SetBboxPayload, SetTimePayload, SyncLayerPayloads } from '../types';
|
|
2
2
|
import type { SetBboxSyncActionPayload, SetBboxSyncPayload, SetLayerActionsSyncPayload, SetTimeSyncActionPayload, SetTimeSyncPayload } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* These actions are fired by the generic/
|
|
4
|
+
* These actions are fired by the generic/listener.ts, based on generic actions and the synchronizationGroup state.
|
|
5
5
|
*
|
|
6
6
|
* These actions should not be used by components directly. Components should only use the generic actions.
|
|
7
7
|
*/
|
|
@@ -95,6 +95,6 @@ export declare enum SyncGroupActionOrigin {
|
|
|
95
95
|
layerActions = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_LAYERACTIONS",
|
|
96
96
|
move = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_MOVEACTION",
|
|
97
97
|
add = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_ADDACTION",
|
|
98
|
-
|
|
98
|
+
autoLayerId = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_AUTOLAYERIDACTION"
|
|
99
99
|
}
|
|
100
100
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CoreAppStore } from '../../types';
|
|
2
|
-
import { AddLayerPayload, DeleteLayerPayload, MoveLayerPayload, SetBaseLayersPayload } from '../../mapStore/types';
|
|
2
|
+
import { AddLayerPayload, DeleteLayerPayload, MoveLayerPayload, SetAutoLayerIdPayload, SetBaseLayersPayload } from '../../mapStore/types';
|
|
3
3
|
import { SyncLayerPayloads, LayerActionPayloadsWithLayerIds } from '../types';
|
|
4
4
|
import { SyncType } from './types';
|
|
5
5
|
interface FoundTargets {
|
|
@@ -58,13 +58,13 @@ export declare const getLayerDeleteActionsTargets: (state: CoreAppStore, payload
|
|
|
58
58
|
*/
|
|
59
59
|
export declare const getLayerMoveActionsTargets: (state: CoreAppStore, payload: MoveLayerPayload, actionType: SyncType) => MoveLayerPayload[];
|
|
60
60
|
/**
|
|
61
|
-
* These targets are found for the
|
|
61
|
+
* These targets are found for the map action SetAutoLayerId. It needs both a target mapId and layerId
|
|
62
62
|
* @param state
|
|
63
63
|
* @param payload
|
|
64
64
|
* @param actionType
|
|
65
65
|
* @returns
|
|
66
66
|
*/
|
|
67
|
-
export declare const
|
|
67
|
+
export declare const getSetAutoLayerIdActionsTargets: (state: CoreAppStore, payload: SetAutoLayerIdPayload, actionType: SyncType) => LayerActionPayloadsWithLayerIds[];
|
|
68
68
|
/**
|
|
69
69
|
* These targets are found for baselayer actions that work with a mapId like: setBaseLayers
|
|
70
70
|
* @param state
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SagaIterator } from 'redux-saga';
|
|
2
|
-
import { mapActions } from '../mapStore';
|
|
3
|
-
import { layerActions } from '../mapStore/layers/reducer';
|
|
4
|
-
export declare function addLayerActionsSaga({ payload, type, }: ReturnType<typeof layerActions.addLayer>): SagaIterator;
|
|
5
|
-
export declare function duplicateMapLayerActionsSaga({ payload, }: ReturnType<typeof layerActions.duplicateMapLayer>): SagaIterator;
|
|
6
|
-
export declare function deleteLayerActionsSaga({ payload, type, }: ReturnType<typeof layerActions.layerDelete>): SagaIterator;
|
|
7
|
-
export declare function moveLayerActionsSaga({ payload, type, }: ReturnType<typeof mapActions.layerMoveLayer>): SagaIterator;
|
|
8
|
-
export declare function setAutoLayerIdActionsSaga({ payload, type, }: ReturnType<typeof mapActions.setAutoLayerId>): SagaIterator;
|
|
9
|
-
export declare function mapBaseLayerActionsSaga({ payload, type, }: ReturnType<typeof layerActions.setBaseLayers>): SagaIterator;
|
|
10
|
-
export declare function rootSaga(): SagaIterator;
|
|
11
|
-
export default rootSaga;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|