@opengeoweb/store 9.34.0 → 9.35.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 +131 -58
- package/package.json +1 -1
- package/src/store/generic/hooks.d.ts +2 -0
- package/src/store/generic/index.d.ts +5 -0
- package/src/store/generic/selectors.d.ts +19 -2
- package/src/store/generic/synchronizationGroups/reducer.d.ts +7 -1
- package/src/store/generic/synchronizationGroups/selectors.d.ts +5 -0
- package/src/store/generic/synchronizationGroups/types.d.ts +22 -1
- package/src/store/mapStore/map/types.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ export { defaultLayers } from '@opengeoweb/webmap-react';
|
|
|
5
5
|
import { dateUtils, PROJECTION, defaultDelay, withEggs } from '@opengeoweb/shared';
|
|
6
6
|
import { defaultTimeStep, defaultTimeSpan, defaultAnimationDelayAtStart, defaultSecondsPerPx, roundWithTimeStep, getSpeedDelay } from '@opengeoweb/timeslider';
|
|
7
7
|
import { produce } from 'immer';
|
|
8
|
-
import { isEqual, isEmpty, compact } from 'lodash';
|
|
8
|
+
import { isEqual, isEmpty, pick, compact } from 'lodash';
|
|
9
9
|
import { useSelector, useDispatch, Provider } from 'react-redux';
|
|
10
10
|
import { useCallback, useEffect } from 'react';
|
|
11
11
|
import { metronome } from '@opengeoweb/metronome';
|
|
@@ -3463,7 +3463,11 @@ var initialState$3 = {
|
|
|
3463
3463
|
sourcesById: []
|
|
3464
3464
|
}
|
|
3465
3465
|
},
|
|
3466
|
-
|
|
3466
|
+
isTimeScrollingEnabled: false,
|
|
3467
|
+
linkedState: {
|
|
3468
|
+
links: {},
|
|
3469
|
+
sharedData: {}
|
|
3470
|
+
}
|
|
3467
3471
|
};
|
|
3468
3472
|
var slice$4 = createSlice({
|
|
3469
3473
|
initialState: initialState$3,
|
|
@@ -3473,13 +3477,24 @@ var slice$4 = createSlice({
|
|
|
3473
3477
|
var _action$payload = action.payload,
|
|
3474
3478
|
panelId = _action$payload.panelId,
|
|
3475
3479
|
mapIds = _action$payload.mapIds;
|
|
3476
|
-
draft.linkedState[panelId] = mapIds;
|
|
3480
|
+
draft.linkedState.links[panelId] = mapIds;
|
|
3477
3481
|
},
|
|
3478
|
-
|
|
3482
|
+
addSharedData: function addSharedData(draft, action) {
|
|
3479
3483
|
var _action$payload2 = action.payload,
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3484
|
+
panelId = _action$payload2.panelId,
|
|
3485
|
+
data = _action$payload2.data;
|
|
3486
|
+
draft.linkedState.sharedData[panelId] = Object.assign({}, draft.linkedState.sharedData[panelId], data);
|
|
3487
|
+
},
|
|
3488
|
+
deleteSharedData: function deleteSharedData(draft, action) {
|
|
3489
|
+
var panelId = action.payload.panelId;
|
|
3490
|
+
delete draft.linkedState.links[panelId];
|
|
3491
|
+
delete draft.linkedState.sharedData[panelId];
|
|
3492
|
+
},
|
|
3493
|
+
syncGroupAddSource: function syncGroupAddSource(draft, action) {
|
|
3494
|
+
var _action$payload3 = action.payload,
|
|
3495
|
+
id = _action$payload3.id,
|
|
3496
|
+
payloadType = _action$payload3.type,
|
|
3497
|
+
defaultPayload = _action$payload3.defaultPayload;
|
|
3483
3498
|
if (!draft.sources.byId[id]) {
|
|
3484
3499
|
draft.sources.byId[id] = {
|
|
3485
3500
|
types: payloadType,
|
|
@@ -3514,10 +3529,10 @@ var slice$4 = createSlice({
|
|
|
3514
3529
|
},
|
|
3515
3530
|
syncGroupAddTarget: function syncGroupAddTarget(draft, action) {
|
|
3516
3531
|
var _synchronizationGroup;
|
|
3517
|
-
var _action$
|
|
3518
|
-
groupId = _action$
|
|
3519
|
-
targetId = _action$
|
|
3520
|
-
linked = _action$
|
|
3532
|
+
var _action$payload4 = action.payload,
|
|
3533
|
+
groupId = _action$payload4.groupId,
|
|
3534
|
+
targetId = _action$payload4.targetId,
|
|
3535
|
+
linked = _action$payload4.linked;
|
|
3521
3536
|
var synchronizationGroup = draft.groups.byId[groupId];
|
|
3522
3537
|
if (!synchronizationGroup) {
|
|
3523
3538
|
console.warn("SYNCGROUPS_ADD_TARGET: Group " + groupId + " does not exist.");
|
|
@@ -3541,9 +3556,9 @@ var slice$4 = createSlice({
|
|
|
3541
3556
|
}
|
|
3542
3557
|
},
|
|
3543
3558
|
syncGroupRemoveTarget: function syncGroupRemoveTarget(draft, action) {
|
|
3544
|
-
var _action$
|
|
3545
|
-
groupId = _action$
|
|
3546
|
-
targetId = _action$
|
|
3559
|
+
var _action$payload5 = action.payload,
|
|
3560
|
+
groupId = _action$payload5.groupId,
|
|
3561
|
+
targetId = _action$payload5.targetId;
|
|
3547
3562
|
if (!draft.groups.byId[groupId]) {
|
|
3548
3563
|
return;
|
|
3549
3564
|
}
|
|
@@ -3556,20 +3571,20 @@ var slice$4 = createSlice({
|
|
|
3556
3571
|
});
|
|
3557
3572
|
},
|
|
3558
3573
|
syncGroupLinkTarget: function syncGroupLinkTarget(draft, action) {
|
|
3559
|
-
var _action$
|
|
3560
|
-
groupId = _action$
|
|
3561
|
-
targetId = _action$
|
|
3562
|
-
linked = _action$
|
|
3574
|
+
var _action$payload6 = action.payload,
|
|
3575
|
+
groupId = _action$payload6.groupId,
|
|
3576
|
+
targetId = _action$payload6.targetId,
|
|
3577
|
+
linked = _action$payload6.linked;
|
|
3563
3578
|
if (!draft.groups.byId[groupId] || !draft.groups.byId[groupId].targets.byId[targetId]) {
|
|
3564
3579
|
return;
|
|
3565
3580
|
}
|
|
3566
3581
|
draft.groups.byId[groupId].targets.byId[targetId].linked = linked;
|
|
3567
3582
|
},
|
|
3568
3583
|
syncGroupAddGroup: function syncGroupAddGroup(draft, action) {
|
|
3569
|
-
var _action$
|
|
3570
|
-
groupId = _action$
|
|
3571
|
-
type = _action$
|
|
3572
|
-
title = _action$
|
|
3584
|
+
var _action$payload7 = action.payload,
|
|
3585
|
+
groupId = _action$payload7.groupId,
|
|
3586
|
+
type = _action$payload7.type,
|
|
3587
|
+
title = _action$payload7.title;
|
|
3573
3588
|
if (draft.groups.byId[groupId]) {
|
|
3574
3589
|
return;
|
|
3575
3590
|
}
|
|
@@ -3603,6 +3618,9 @@ var slice$4 = createSlice({
|
|
|
3603
3618
|
syncGroupSetViewState: function syncGroupSetViewState(draft, action) {
|
|
3604
3619
|
var viewState = action.payload.viewState;
|
|
3605
3620
|
draft.viewState = viewState;
|
|
3621
|
+
},
|
|
3622
|
+
syncGroupToggleIsTimeScrollingEnabled: function syncGroupToggleIsTimeScrollingEnabled(draft, action) {
|
|
3623
|
+
draft.isTimeScrollingEnabled = action.payload.isTimeScrollingEnabled;
|
|
3606
3624
|
}
|
|
3607
3625
|
},
|
|
3608
3626
|
extraReducers: function extraReducers(builder) {
|
|
@@ -3614,10 +3632,10 @@ var slice$4 = createSlice({
|
|
|
3614
3632
|
}
|
|
3615
3633
|
});
|
|
3616
3634
|
var setBboxOrTimeSync = function setBboxOrTimeSync(draft, action) {
|
|
3617
|
-
var _action$
|
|
3618
|
-
targets = _action$
|
|
3619
|
-
source = _action$
|
|
3620
|
-
groups = _action$
|
|
3635
|
+
var _action$payload8 = action.payload,
|
|
3636
|
+
targets = _action$payload8.targets,
|
|
3637
|
+
source = _action$payload8.source,
|
|
3638
|
+
groups = _action$payload8.groups;
|
|
3621
3639
|
var getPayLoadKey = function getPayLoadKey(type) {
|
|
3622
3640
|
switch (type) {
|
|
3623
3641
|
case setTimeSync.type:
|
|
@@ -3799,6 +3817,9 @@ var getAllTargetGroupsForSource = createSelector([syncGroupStore, getSourceId],
|
|
|
3799
3817
|
var syncGroupGetViewState = createSelector(syncGroupStore, function (store) {
|
|
3800
3818
|
return store && store.viewState;
|
|
3801
3819
|
}, selectorMemoizationOptions);
|
|
3820
|
+
var isTimeScrollingEnabled = createSelector(syncGroupStore, function (store) {
|
|
3821
|
+
return store && store.isTimeScrollingEnabled;
|
|
3822
|
+
}, selectorMemoizationOptions);
|
|
3802
3823
|
var getSyncedMapIdsForTimeslider = createSelector(syncGroupStore, function (store) {
|
|
3803
3824
|
var _store$viewState$time, _store$viewState$time2;
|
|
3804
3825
|
return (_store$viewState$time = (_store$viewState$time2 = store.viewState.timeslider.groups[0]) == null ? void 0 : _store$viewState$time2.selected) != null ? _store$viewState$time : [];
|
|
@@ -3830,6 +3851,7 @@ var selectors$5 = /*#__PURE__*/Object.freeze({
|
|
|
3830
3851
|
getSynchronizationGroupState: getSynchronizationGroupState,
|
|
3831
3852
|
getTargetGroups: getTargetGroups,
|
|
3832
3853
|
getTargets: getTargets,
|
|
3854
|
+
isTimeScrollingEnabled: isTimeScrollingEnabled,
|
|
3833
3855
|
syncGroupGetViewState: syncGroupGetViewState,
|
|
3834
3856
|
syncGroupStore: syncGroupStore
|
|
3835
3857
|
});
|
|
@@ -4076,7 +4098,7 @@ var getSynchronizationGroupStore = createSelector(synchronizationGroupStore, fun
|
|
|
4076
4098
|
}, selectorMemoizationOptions);
|
|
4077
4099
|
/**
|
|
4078
4100
|
* Returns the synchronization source by id
|
|
4079
|
-
* @param store The app
|
|
4101
|
+
* @param store The app store
|
|
4080
4102
|
* @param id The source id to find
|
|
4081
4103
|
*/
|
|
4082
4104
|
var getSyncSourceBySourceId = function getSyncSourceBySourceId(state, id) {
|
|
@@ -4091,21 +4113,89 @@ var getSyncSourceBySourceId = function getSyncSourceBySourceId(state, id) {
|
|
|
4091
4113
|
var getTime = createSelector(getSyncSourceBySourceId, function (store) {
|
|
4092
4114
|
return store && store.payloadByType && store.payloadByType[SYNCGROUPS_TYPE_SETTIME] ? store.payloadByType[SYNCGROUPS_TYPE_SETTIME].value : null;
|
|
4093
4115
|
}, selectorMemoizationOptions);
|
|
4094
|
-
var
|
|
4095
|
-
return
|
|
4096
|
-
}
|
|
4116
|
+
var selectLinkedState = createSelector(synchronizationGroupStore, function (syncState) {
|
|
4117
|
+
return syncState.linkedState;
|
|
4118
|
+
});
|
|
4119
|
+
var getLinkedMaps = createSelector([selectLinkedState, function (store, panelId) {
|
|
4120
|
+
return panelId;
|
|
4121
|
+
}], function (linkedState, panelId) {
|
|
4122
|
+
return linkedState.links[panelId] || [];
|
|
4123
|
+
}, selectorMemoizationOptions);
|
|
4124
|
+
var getLinkedFeatureProviders = function getLinkedFeatureProviders(linkedState, mapId) {
|
|
4125
|
+
return Object.keys(linkedState.links).filter(function (panelId) {
|
|
4126
|
+
return linkedState.links[panelId].find(function (id) {
|
|
4127
|
+
return id === mapId;
|
|
4128
|
+
});
|
|
4129
|
+
});
|
|
4130
|
+
};
|
|
4131
|
+
var selectSharedData = createSelector([selectLinkedState, function (store, panelId) {
|
|
4097
4132
|
return panelId;
|
|
4098
4133
|
}], function (linkedState, panelId) {
|
|
4099
|
-
return linkedState[panelId]
|
|
4134
|
+
return pick(linkedState.sharedData, [panelId]);
|
|
4135
|
+
});
|
|
4136
|
+
var selectLinkedFeatures = createSelector([function (linkedState) {
|
|
4137
|
+
return linkedState;
|
|
4138
|
+
}, getLinkedFeatureProviders], function (linkedState, featureProviders) {
|
|
4139
|
+
var features = featureProviders.flatMap(function (providerId) {
|
|
4140
|
+
var _linkedState$sharedDa;
|
|
4141
|
+
return (_linkedState$sharedDa = linkedState.sharedData[providerId]) == null ? void 0 : _linkedState$sharedDa.features;
|
|
4142
|
+
}).filter(function (f) {
|
|
4143
|
+
return f !== undefined;
|
|
4144
|
+
});
|
|
4145
|
+
return features;
|
|
4100
4146
|
});
|
|
4101
4147
|
|
|
4102
4148
|
var selectors$4 = /*#__PURE__*/Object.freeze({
|
|
4103
4149
|
__proto__: null,
|
|
4104
|
-
|
|
4150
|
+
getLinkedFeatureProviders: getLinkedFeatureProviders,
|
|
4151
|
+
getLinkedMaps: getLinkedMaps,
|
|
4105
4152
|
getSynchronizationGroupStore: getSynchronizationGroupStore,
|
|
4106
|
-
getTime: getTime
|
|
4153
|
+
getTime: getTime,
|
|
4154
|
+
selectLinkedFeatures: selectLinkedFeatures,
|
|
4155
|
+
selectSharedData: selectSharedData
|
|
4107
4156
|
});
|
|
4108
4157
|
|
|
4158
|
+
/* *
|
|
4159
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4160
|
+
* you may not use this file except in compliance with the License.
|
|
4161
|
+
* You may obtain a copy of the License at
|
|
4162
|
+
*
|
|
4163
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4164
|
+
*
|
|
4165
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4166
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4167
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4168
|
+
* See the License for the specific language governing permissions and
|
|
4169
|
+
* limitations under the License.
|
|
4170
|
+
*
|
|
4171
|
+
* Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4172
|
+
* Copyright 2024 - Finnish Meteorological Institute (FMI)
|
|
4173
|
+
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
4174
|
+
* */
|
|
4175
|
+
var useUpdateSharedData = function useUpdateSharedData(data, panelId) {
|
|
4176
|
+
var linkedMaps = useSelector(function (store) {
|
|
4177
|
+
return getLinkedMaps(store, panelId);
|
|
4178
|
+
});
|
|
4179
|
+
var dispatch = useDispatch();
|
|
4180
|
+
useEffect(function () {
|
|
4181
|
+
return function () {
|
|
4182
|
+
if (panelId) {
|
|
4183
|
+
dispatch(actions.deleteSharedData({
|
|
4184
|
+
panelId: panelId
|
|
4185
|
+
}));
|
|
4186
|
+
}
|
|
4187
|
+
};
|
|
4188
|
+
}, [dispatch, panelId]);
|
|
4189
|
+
useEffect(function () {
|
|
4190
|
+
if (panelId && (linkedMaps == null ? void 0 : linkedMaps.length) > 0) {
|
|
4191
|
+
dispatch(actions.addSharedData({
|
|
4192
|
+
panelId: panelId,
|
|
4193
|
+
data: data
|
|
4194
|
+
}));
|
|
4195
|
+
}
|
|
4196
|
+
}, [panelId, linkedMaps, data, dispatch]);
|
|
4197
|
+
};
|
|
4198
|
+
|
|
4109
4199
|
/* *
|
|
4110
4200
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4111
4201
|
* you may not use this file except in compliance with the License.
|
|
@@ -4287,6 +4377,7 @@ var selectors$3 = /*#__PURE__*/Object.freeze({
|
|
|
4287
4377
|
* Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
|
|
4288
4378
|
* */
|
|
4289
4379
|
var genericActions = Object.assign({}, actions, {
|
|
4380
|
+
initialSyncState: initialState$3,
|
|
4290
4381
|
setTime: setTime,
|
|
4291
4382
|
setBbox: setBbox
|
|
4292
4383
|
});
|
|
@@ -8002,15 +8093,7 @@ var mockStateMapWithLayer = function mockStateMapWithLayer(layer, mapId) {
|
|
|
8002
8093
|
service: layer.service,
|
|
8003
8094
|
dimensions: layer.dimensions
|
|
8004
8095
|
}),
|
|
8005
|
-
syncronizationGroupStore: {
|
|
8006
|
-
groups: {
|
|
8007
|
-
byId: {},
|
|
8008
|
-
allIds: []
|
|
8009
|
-
},
|
|
8010
|
-
sources: {
|
|
8011
|
-
byId: {},
|
|
8012
|
-
allIds: []
|
|
8013
|
-
},
|
|
8096
|
+
syncronizationGroupStore: Object.assign({}, initialState$3, {
|
|
8014
8097
|
viewState: {
|
|
8015
8098
|
timeslider: {
|
|
8016
8099
|
groups: [{
|
|
@@ -8027,9 +8110,8 @@ var mockStateMapWithLayer = function mockStateMapWithLayer(layer, mapId) {
|
|
|
8027
8110
|
groups: [],
|
|
8028
8111
|
sourcesById: []
|
|
8029
8112
|
}
|
|
8030
|
-
}
|
|
8031
|
-
|
|
8032
|
-
}
|
|
8113
|
+
}
|
|
8114
|
+
})
|
|
8033
8115
|
};
|
|
8034
8116
|
};
|
|
8035
8117
|
var webmapStateWithMultipleLayers = function webmapStateWithMultipleLayers(layers, mapId) {
|
|
@@ -8066,15 +8148,7 @@ var mockStateMapWithMultipleLayers = function mockStateMapWithMultipleLayers(lay
|
|
|
8066
8148
|
allIds: ['serviceid_1']
|
|
8067
8149
|
},
|
|
8068
8150
|
layers: createMultipleLayersState(layers, mapId),
|
|
8069
|
-
syncronizationGroupStore: {
|
|
8070
|
-
groups: {
|
|
8071
|
-
byId: {},
|
|
8072
|
-
allIds: []
|
|
8073
|
-
},
|
|
8074
|
-
sources: {
|
|
8075
|
-
byId: {},
|
|
8076
|
-
allIds: []
|
|
8077
|
-
},
|
|
8151
|
+
syncronizationGroupStore: Object.assign({}, initialState$3, {
|
|
8078
8152
|
viewState: {
|
|
8079
8153
|
timeslider: {
|
|
8080
8154
|
groups: [{
|
|
@@ -8091,9 +8165,8 @@ var mockStateMapWithMultipleLayers = function mockStateMapWithMultipleLayers(lay
|
|
|
8091
8165
|
groups: [],
|
|
8092
8166
|
sourcesById: []
|
|
8093
8167
|
}
|
|
8094
|
-
}
|
|
8095
|
-
|
|
8096
|
-
}
|
|
8168
|
+
}
|
|
8169
|
+
})
|
|
8097
8170
|
};
|
|
8098
8171
|
};
|
|
8099
8172
|
var testGeoJSON = {
|
|
@@ -8286,4 +8359,4 @@ var StoreProvider = function StoreProvider(_ref2) {
|
|
|
8286
8359
|
});
|
|
8287
8360
|
};
|
|
8288
8361
|
|
|
8289
|
-
export { IS_LEGEND_OPEN_BY_DEFAULT, StoreProvider, coreModuleConfig, createCustomStore, drawtoolActions, drawtoolModuleConfig, reducer as drawtoolReducer, selectors as drawtoolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$4 as genericSelectors, types$1 as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, initialState$3 as initialState, layerActions, reducer$6 as layerReducer, selectors$7 as layerSelectors, types$5 as layerTypes, utils$2 as layerUtils, constants as linkComponentTypesConstants, loadingIndicatorActions, constants$1 as loadingIndicatorConstants, loadingIndicatorReducer, selectors$3 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, selectors$2 as mapSelectors, mapStoreActions, mapStoreModuleConfig, mapStoreReducers, types$4 as mapTypes, mapUtils, routerActions, routerModuleConfig, utils as routerUtils, selectorMemoizationOptions, serviceActions, selectors$1 as serviceSelectors, types as serviceTypes, setUserAddedServices, storeTestSettings, storeTestUtils, utils$1 as storeUtils, constants$2 as syncConstants, actions as syncGroupsActions, syncGroupsListener, reducer$3 as syncGroupsReducer, selector as syncGroupsSelector, selectors$5 as syncGroupsSelectors, types$2 as syncGroupsTypes, types$2 as types, uiActions, uiModuleConfig, reducer$5 as uiReducer, selectors$6 as uiSelectors, types$3 as uiTypes, useSetupDialog, reducer$4 as webmapReducer };
|
|
8362
|
+
export { IS_LEGEND_OPEN_BY_DEFAULT, StoreProvider, coreModuleConfig, createCustomStore, drawtoolActions, drawtoolModuleConfig, reducer as drawtoolReducer, selectors as drawtoolSelectors, filterLayers$1 as filterLayers, genericActions, genericListener, selectors$4 as genericSelectors, types$1 as genericTypes, getSingularDrawtoolDrawLayerId, getUserAddedServices, initialState$3 as initialState, layerActions, reducer$6 as layerReducer, selectors$7 as layerSelectors, types$5 as layerTypes, utils$2 as layerUtils, constants as linkComponentTypesConstants, loadingIndicatorActions, constants$1 as loadingIndicatorConstants, loadingIndicatorReducer, selectors$3 as loadingIndicatorSelectors, mapActions, enums as mapEnums, mapListener, selectors$2 as mapSelectors, mapStoreActions, mapStoreModuleConfig, mapStoreReducers, types$4 as mapTypes, mapUtils, routerActions, routerModuleConfig, utils as routerUtils, selectorMemoizationOptions, serviceActions, selectors$1 as serviceSelectors, types as serviceTypes, setUserAddedServices, storeTestSettings, storeTestUtils, utils$1 as storeUtils, constants$2 as syncConstants, actions as syncGroupsActions, syncGroupsListener, reducer$3 as syncGroupsReducer, selector as syncGroupsSelector, selectors$5 as syncGroupsSelectors, types$2 as syncGroupsTypes, types$2 as types, uiActions, uiModuleConfig, reducer$5 as uiReducer, selectors$6 as uiSelectors, types$3 as uiTypes, useSetupDialog, useUpdateSharedData, reducer$4 as webmapReducer };
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export declare const genericActions: {
|
|
2
|
+
initialSyncState: import("./synchronizationGroups/types").SynchronizationGroupState;
|
|
2
3
|
setTime: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetTimePayload, string>;
|
|
3
4
|
setBbox: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetBboxPayload, string>;
|
|
4
5
|
changeLinkedMap: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").ChangeLinkedMap, "synchronizationGroupsReducer/changeLinkedMap">;
|
|
6
|
+
addSharedData: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").AddSharedData, "synchronizationGroupsReducer/addSharedData">;
|
|
7
|
+
deleteSharedData: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").DeleteSharedData, "synchronizationGroupsReducer/deleteSharedData">;
|
|
5
8
|
syncGroupAddSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupsAddSourcePayload, "synchronizationGroupsReducer/syncGroupAddSource">;
|
|
6
9
|
syncGroupRemoveSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupRemoveSourcePayload, "synchronizationGroupsReducer/syncGroupRemoveSource">;
|
|
7
10
|
syncGroupAddTarget: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupAddTargetPayload, "synchronizationGroupsReducer/syncGroupAddTarget">;
|
|
@@ -11,8 +14,10 @@ export declare const genericActions: {
|
|
|
11
14
|
syncGroupRemoveGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupRemoveGroupPayload, "synchronizationGroupsReducer/syncGroupRemoveGroup">;
|
|
12
15
|
syncGroupClear: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"synchronizationGroupsReducer/syncGroupClear">;
|
|
13
16
|
syncGroupSetViewState: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupSetViewStatePayload, "synchronizationGroupsReducer/syncGroupSetViewState">;
|
|
17
|
+
syncGroupToggleIsTimeScrollingEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupToggleIsTimeScrollingEnabled, "synchronizationGroupsReducer/syncGroupToggleIsTimeScrollingEnabled">;
|
|
14
18
|
};
|
|
15
19
|
export * as genericSelectors from './selectors';
|
|
20
|
+
export * from './hooks';
|
|
16
21
|
export * from './synchronizationGroups';
|
|
17
22
|
export * as genericTypes from './types';
|
|
18
23
|
export * from './loadingIndicator';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CoreAppStore } from '../types';
|
|
2
|
-
import type { SynchronizationGroupState, SynchronizationSource } from './synchronizationGroups/types';
|
|
2
|
+
import type { LinkedState, SynchronizationGroupState, SynchronizationSource } from './synchronizationGroups/types';
|
|
3
3
|
export declare const getSynchronizationGroupStore: ((state: CoreAppStore) => SynchronizationGroupState) & import("reselect").OutputSelectorFields<(args_0: SynchronizationGroupState) => SynchronizationGroupState, {
|
|
4
4
|
clearCache: () => void;
|
|
5
5
|
}> & {
|
|
@@ -10,7 +10,24 @@ export declare const getTime: ((state: SynchronizationGroupState, id: string) =>
|
|
|
10
10
|
}> & {
|
|
11
11
|
clearCache: () => void;
|
|
12
12
|
};
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const getLinkedMaps: ((state: any, panelId: string) => string[]) & import("reselect").OutputSelectorFields<(args_0: LinkedState, args_1: string) => string[], {
|
|
14
|
+
clearCache: () => void;
|
|
15
|
+
}> & {
|
|
16
|
+
clearCache: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const getLinkedFeatureProviders: (linkedState: LinkedState, mapId: string) => string[];
|
|
19
|
+
export declare const selectSharedData: ((state: any, panelId: string) => Pick<Record<string, import("./synchronizationGroups/types").PotentialData>, string>) & import("reselect").OutputSelectorFields<(args_0: LinkedState, args_1: string) => Pick<Record<string, import("./synchronizationGroups/types").PotentialData>, string>, {
|
|
20
|
+
clearCache: () => void;
|
|
21
|
+
}> & {
|
|
22
|
+
clearCache: () => void;
|
|
23
|
+
};
|
|
24
|
+
export declare const selectLinkedFeatures: ((state: any, mapId: string) => ({
|
|
25
|
+
id: string;
|
|
26
|
+
geoJSON: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
|
|
27
|
+
} | undefined)[]) & import("reselect").OutputSelectorFields<(args_0: LinkedState, args_1: string[]) => ({
|
|
28
|
+
id: string;
|
|
29
|
+
geoJSON: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
|
|
30
|
+
} | undefined)[], {
|
|
14
31
|
clearCache: () => void;
|
|
15
32
|
}> & {
|
|
16
33
|
clearCache: () => void;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { PayloadAction, Draft } from '@reduxjs/toolkit';
|
|
2
|
-
import { SynchronizationGroupState, SyncGroupAddTargetPayload, SyncGroupAddGroupPayload, SyncGroupRemoveTargetPayload, SyncGroupRemoveGroupPayload, SyncGroupSetViewStatePayload, SyncGroupLinkTargetPayload, SyncGroupRemoveSourcePayload, SyncGroupsAddSourcePayload, ChangeLinkedMap } from './types';
|
|
2
|
+
import { SynchronizationGroupState, SyncGroupAddTargetPayload, SyncGroupAddGroupPayload, SyncGroupRemoveTargetPayload, SyncGroupRemoveGroupPayload, SyncGroupSetViewStatePayload, SyncGroupLinkTargetPayload, SyncGroupRemoveSourcePayload, SyncGroupsAddSourcePayload, SyncGroupToggleIsTimeScrollingEnabled, ChangeLinkedMap, AddSharedData, DeleteSharedData } from './types';
|
|
3
3
|
export declare const initialState: SynchronizationGroupState;
|
|
4
4
|
export declare const slice: import("@reduxjs/toolkit").Slice<SynchronizationGroupState, {
|
|
5
5
|
changeLinkedMap: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<ChangeLinkedMap>) => void;
|
|
6
|
+
addSharedData: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<AddSharedData>) => void;
|
|
7
|
+
deleteSharedData: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<DeleteSharedData>) => void;
|
|
6
8
|
syncGroupAddSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupsAddSourcePayload>) => void;
|
|
7
9
|
syncGroupRemoveSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupRemoveSourcePayload>) => void;
|
|
8
10
|
syncGroupAddTarget: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupAddTargetPayload>) => void;
|
|
@@ -12,10 +14,13 @@ export declare const slice: import("@reduxjs/toolkit").Slice<SynchronizationGrou
|
|
|
12
14
|
syncGroupRemoveGroup: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupRemoveGroupPayload>) => void;
|
|
13
15
|
syncGroupClear: () => SynchronizationGroupState;
|
|
14
16
|
syncGroupSetViewState: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupSetViewStatePayload>) => void;
|
|
17
|
+
syncGroupToggleIsTimeScrollingEnabled: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupToggleIsTimeScrollingEnabled>) => void;
|
|
15
18
|
}, "synchronizationGroupsReducer">;
|
|
16
19
|
export declare const syncGroupAddGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<SyncGroupAddGroupPayload, "synchronizationGroupsReducer/syncGroupAddGroup">, syncGroupAddSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<SyncGroupsAddSourcePayload, "synchronizationGroupsReducer/syncGroupAddSource">, syncGroupAddTarget: import("@reduxjs/toolkit").ActionCreatorWithPayload<SyncGroupAddTargetPayload, "synchronizationGroupsReducer/syncGroupAddTarget">, syncGroupClear: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"synchronizationGroupsReducer/syncGroupClear">, syncGroupLinkTarget: import("@reduxjs/toolkit").ActionCreatorWithPayload<SyncGroupLinkTargetPayload, "synchronizationGroupsReducer/syncGroupLinkTarget">, syncGroupRemoveGroup: import("@reduxjs/toolkit").ActionCreatorWithPayload<SyncGroupRemoveGroupPayload, "synchronizationGroupsReducer/syncGroupRemoveGroup">, syncGroupRemoveSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<SyncGroupRemoveSourcePayload, "synchronizationGroupsReducer/syncGroupRemoveSource">, syncGroupRemoveTarget: import("@reduxjs/toolkit").ActionCreatorWithPayload<SyncGroupRemoveTargetPayload, "synchronizationGroupsReducer/syncGroupRemoveTarget">, syncGroupSetViewState: import("@reduxjs/toolkit").ActionCreatorWithPayload<SyncGroupSetViewStatePayload, "synchronizationGroupsReducer/syncGroupSetViewState">;
|
|
17
20
|
export declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
18
21
|
changeLinkedMap: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<ChangeLinkedMap>) => void;
|
|
22
|
+
addSharedData: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<AddSharedData>) => void;
|
|
23
|
+
deleteSharedData: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<DeleteSharedData>) => void;
|
|
19
24
|
syncGroupAddSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupsAddSourcePayload>) => void;
|
|
20
25
|
syncGroupRemoveSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupRemoveSourcePayload>) => void;
|
|
21
26
|
syncGroupAddTarget: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupAddTargetPayload>) => void;
|
|
@@ -25,4 +30,5 @@ export declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
|
|
|
25
30
|
syncGroupRemoveGroup: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupRemoveGroupPayload>) => void;
|
|
26
31
|
syncGroupClear: () => SynchronizationGroupState;
|
|
27
32
|
syncGroupSetViewState: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupSetViewStatePayload>) => void;
|
|
33
|
+
syncGroupToggleIsTimeScrollingEnabled: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupToggleIsTimeScrollingEnabled>) => void;
|
|
28
34
|
}, "synchronizationGroupsReducer">, reducer: import("redux").Reducer<SynchronizationGroupState>;
|
|
@@ -52,6 +52,11 @@ export declare const syncGroupGetViewState: ((state: CoreAppStore) => import("./
|
|
|
52
52
|
}> & {
|
|
53
53
|
clearCache: () => void;
|
|
54
54
|
};
|
|
55
|
+
export declare const isTimeScrollingEnabled: ((state: CoreAppStore) => boolean) & import("reselect").OutputSelectorFields<(args_0: SynchronizationGroupState) => boolean, {
|
|
56
|
+
clearCache: () => void;
|
|
57
|
+
}> & {
|
|
58
|
+
clearCache: () => void;
|
|
59
|
+
};
|
|
55
60
|
export declare const getSyncedMapIdsForTimeslider: ((state: CoreAppStore) => string[]) & import("reselect").OutputSelectorFields<(args_0: SynchronizationGroupState) => string[], {
|
|
56
61
|
clearCache: () => void;
|
|
57
62
|
}> & {
|
|
@@ -29,6 +29,16 @@ export interface SynchronizationGroup {
|
|
|
29
29
|
allIds: string[];
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
+
export interface PotentialData {
|
|
33
|
+
features?: {
|
|
34
|
+
id: string;
|
|
35
|
+
geoJSON: GeoJSON.FeatureCollection;
|
|
36
|
+
}[];
|
|
37
|
+
}
|
|
38
|
+
export interface LinkedState {
|
|
39
|
+
links: Record<string, string[]>;
|
|
40
|
+
sharedData: Record<string, PotentialData>;
|
|
41
|
+
}
|
|
32
42
|
type Origin = 'user' | 'system';
|
|
33
43
|
export type SynchronizationSourcePayLoadByType = Record<string, GenericActionPayload>;
|
|
34
44
|
export interface SynchronizationSource {
|
|
@@ -47,7 +57,8 @@ export interface SynchronizationGroupState {
|
|
|
47
57
|
sources: SynchronizationSources;
|
|
48
58
|
groups: SynchronizationGroups;
|
|
49
59
|
viewState: SyncGroupViewState;
|
|
50
|
-
|
|
60
|
+
isTimeScrollingEnabled: boolean;
|
|
61
|
+
linkedState: LinkedState;
|
|
51
62
|
}
|
|
52
63
|
export interface SynchronizationGroupModuleState {
|
|
53
64
|
syncronizationGroupStore?: SynchronizationGroupState;
|
|
@@ -90,6 +101,9 @@ export interface SyncGroupRemoveGroupPayload {
|
|
|
90
101
|
export interface SyncGroupSetViewStatePayload {
|
|
91
102
|
viewState: SyncGroupViewState;
|
|
92
103
|
}
|
|
104
|
+
export interface SyncGroupToggleIsTimeScrollingEnabled {
|
|
105
|
+
isTimeScrollingEnabled: boolean;
|
|
106
|
+
}
|
|
93
107
|
export declare const SyncGroupTypeList: string[];
|
|
94
108
|
export declare enum SyncGroupActionOrigin {
|
|
95
109
|
delete = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_DELETEACTION",
|
|
@@ -102,4 +116,11 @@ export interface ChangeLinkedMap {
|
|
|
102
116
|
panelId: string;
|
|
103
117
|
mapIds: string[];
|
|
104
118
|
}
|
|
119
|
+
export interface AddSharedData {
|
|
120
|
+
panelId: string;
|
|
121
|
+
data: PotentialData;
|
|
122
|
+
}
|
|
123
|
+
export interface DeleteSharedData {
|
|
124
|
+
panelId: string;
|
|
125
|
+
}
|
|
105
126
|
export {};
|
|
@@ -52,6 +52,7 @@ export interface WebMap {
|
|
|
52
52
|
displayMapPin?: boolean;
|
|
53
53
|
legendId?: string;
|
|
54
54
|
dockedLayerManagerSize?: DockedLayerManagerSize;
|
|
55
|
+
isTimeScrollingEnabled?: boolean;
|
|
55
56
|
selectedMapIds?: string[];
|
|
56
57
|
}
|
|
57
58
|
export type DockedLayerManagerSize = 'sizeSmall' | 'sizeMedium' | 'sizeLarge' | '';
|