@opengeoweb/store 9.32.1 → 9.33.1-spike-ol.3

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 CHANGED
@@ -6027,7 +6027,7 @@ const SYNCGROUPS_TYPE_SETBBOX = 'SYNCGROUPS_TYPE_SETBBOX';
6027
6027
  const SYNCGROUPS_TYPE_SETLAYERACTIONS = 'SYNCGROUPS_TYPE_SETLAYERACTIONS';
6028
6028
  const SYNCGROUPS_SET_VIEW_STATE = 'SYNCGROUPS_SET_VIEW_STATE';
6029
6029
 
6030
- var constants$1 = /*#__PURE__*/Object.freeze({
6030
+ var constants$2 = /*#__PURE__*/Object.freeze({
6031
6031
  __proto__: null,
6032
6032
  SYNCGROUPS_SET_VIEW_STATE: SYNCGROUPS_SET_VIEW_STATE,
6033
6033
  SYNCGROUPS_TYPE_SETBBOX: SYNCGROUPS_TYPE_SETBBOX,
@@ -6097,12 +6097,20 @@ const initialState$3 = {
6097
6097
  groups: [],
6098
6098
  sourcesById: []
6099
6099
  }
6100
- }
6100
+ },
6101
+ linkedState: {}
6101
6102
  };
6102
6103
  const slice$4 = createSlice({
6103
6104
  initialState: initialState$3,
6104
6105
  name: 'synchronizationGroupsReducer',
6105
6106
  reducers: {
6107
+ changeLinkedMap: (draft, action) => {
6108
+ const {
6109
+ panelId,
6110
+ mapIds
6111
+ } = action.payload;
6112
+ draft.linkedState[panelId] = mapIds;
6113
+ },
6106
6114
  syncGroupAddSource: (draft, action) => {
6107
6115
  const {
6108
6116
  id,
@@ -6621,9 +6629,11 @@ const getSyncSourceBySourceId = (state, id) => {
6621
6629
  return null;
6622
6630
  };
6623
6631
  const getTime = createSelector(getSyncSourceBySourceId, store => store && store.payloadByType && store.payloadByType[SYNCGROUPS_TYPE_SETTIME] ? store.payloadByType[SYNCGROUPS_TYPE_SETTIME].value : null, selectorMemoizationOptions);
6632
+ const getSelectedMaps = createSelector([store => store.linkedState, (store, panelId) => panelId], (linkedState, panelId) => linkedState[panelId] || []);
6624
6633
 
6625
6634
  var selectors$4 = /*#__PURE__*/Object.freeze({
6626
6635
  __proto__: null,
6636
+ getSelectedMaps: getSelectedMaps,
6627
6637
  getSynchronizationGroupStore: getSynchronizationGroupStore,
6628
6638
  getTime: getTime
6629
6639
  });
@@ -6669,7 +6679,7 @@ var types$1 = /*#__PURE__*/Object.freeze({
6669
6679
  * */
6670
6680
  const ANY_EDR_SERVICE = 'any_edr';
6671
6681
 
6672
- var constants = /*#__PURE__*/Object.freeze({
6682
+ var constants$1 = /*#__PURE__*/Object.freeze({
6673
6683
  __proto__: null,
6674
6684
  ANY_EDR_SERVICE: ANY_EDR_SERVICE
6675
6685
  });
@@ -10744,7 +10754,8 @@ const mockStateMapWithLayer = (layer, mapId) => ({
10744
10754
  groups: [],
10745
10755
  sourcesById: []
10746
10756
  }
10747
- }
10757
+ },
10758
+ linkedState: {}
10748
10759
  }
10749
10760
  });
10750
10761
  const webmapStateWithMultipleLayers = (layers, mapId) => {
@@ -10805,7 +10816,8 @@ const mockStateMapWithMultipleLayers = (layers, mapId) => ({
10805
10816
  groups: [],
10806
10817
  sourcesById: []
10807
10818
  }
10808
- }
10819
+ },
10820
+ linkedState: {}
10809
10821
  }
10810
10822
  });
10811
10823
  const testGeoJSON = {
@@ -10936,6 +10948,36 @@ const uiModuleConfig = {
10936
10948
  * */
10937
10949
  const coreModuleConfig = [mapStoreModuleConfig, synchronizationGroupConfig, uiModuleConfig, drawtoolModuleConfig];
10938
10950
 
10951
+ /* *
10952
+ * Licensed under the Apache License, Version 2.0 (the "License");
10953
+ * you may not use this file except in compliance with the License.
10954
+ * You may obtain a copy of the License at
10955
+ *
10956
+ * http://www.apache.org/licenses/LICENSE-2.0
10957
+ *
10958
+ * Unless required by applicable law or agreed to in writing, software
10959
+ * distributed under the License is distributed on an "AS IS" BASIS,
10960
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10961
+ * See the License for the specific language governing permissions and
10962
+ * limitations under the License.
10963
+ *
10964
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
10965
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
10966
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
10967
+ * */
10968
+ var SupportedComponentTypes;
10969
+ (function (SupportedComponentTypes) {
10970
+ SupportedComponentTypes["WarningList"] = "WarningList";
10971
+ SupportedComponentTypes["TimeSeries"] = "TimeSeries";
10972
+ })(SupportedComponentTypes || (SupportedComponentTypes = {}));
10973
+ const supportedComponentTypesForLinking = [SupportedComponentTypes.WarningList, SupportedComponentTypes.TimeSeries];
10974
+
10975
+ var constants = /*#__PURE__*/Object.freeze({
10976
+ __proto__: null,
10977
+ get SupportedComponentTypes () { return SupportedComponentTypes; },
10978
+ supportedComponentTypesForLinking: supportedComponentTypesForLinking
10979
+ });
10980
+
10939
10981
  const createCustomStore = () => createStore();
10940
10982
  const WrapperWithModules = withEggs(coreModuleConfig)(({
10941
10983
  children
@@ -10956,4 +10998,4 @@ const StoreProvider = ({
10956
10998
  })
10957
10999
  });
10958
11000
 
10959
- 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, loadingIndicatorActions, constants 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$1 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 };
11001
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/store",
3
- "version": "9.32.1",
3
+ "version": "9.33.1-spike-ol.3",
4
4
  "description": "GeoWeb Store library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,6 +1,7 @@
1
1
  export declare const genericActions: {
2
2
  setTime: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetTimePayload, string>;
3
3
  setBbox: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetBboxPayload, string>;
4
+ changeLinkedMap: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").ChangeLinkedMap, "synchronizationGroupsReducer/changeLinkedMap">;
4
5
  syncGroupAddSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupsAddSourcePayload, "synchronizationGroupsReducer/syncGroupAddSource">;
5
6
  syncGroupRemoveSource: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupRemoveSourcePayload, "synchronizationGroupsReducer/syncGroupRemoveSource">;
6
7
  syncGroupAddTarget: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./synchronizationGroups/types").SyncGroupAddTargetPayload, "synchronizationGroupsReducer/syncGroupAddTarget">;
@@ -0,0 +1,5 @@
1
+ export declare enum SupportedComponentTypes {
2
+ WarningList = "WarningList",
3
+ TimeSeries = "TimeSeries"
4
+ }
5
+ export declare const supportedComponentTypesForLinking: string[];
@@ -0,0 +1 @@
1
+ export * as linkComponentTypesConstants from './constants';
@@ -10,3 +10,8 @@ export declare const getTime: ((state: SynchronizationGroupState, id: string) =>
10
10
  }> & {
11
11
  clearCache: () => void;
12
12
  };
13
+ export declare const getSelectedMaps: ((state: SynchronizationGroupState, panelId: string) => string[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, string[]>, args_1: string) => string[], {
14
+ clearCache: () => void;
15
+ }> & {
16
+ clearCache: () => void;
17
+ };
@@ -1,7 +1,8 @@
1
1
  import { PayloadAction, Draft } from '@reduxjs/toolkit';
2
- import { SynchronizationGroupState, SyncGroupAddTargetPayload, SyncGroupAddGroupPayload, SyncGroupRemoveTargetPayload, SyncGroupRemoveGroupPayload, SyncGroupSetViewStatePayload, SyncGroupLinkTargetPayload, SyncGroupRemoveSourcePayload, SyncGroupsAddSourcePayload } from './types';
2
+ import { SynchronizationGroupState, SyncGroupAddTargetPayload, SyncGroupAddGroupPayload, SyncGroupRemoveTargetPayload, SyncGroupRemoveGroupPayload, SyncGroupSetViewStatePayload, SyncGroupLinkTargetPayload, SyncGroupRemoveSourcePayload, SyncGroupsAddSourcePayload, ChangeLinkedMap } from './types';
3
3
  export declare const initialState: SynchronizationGroupState;
4
4
  export declare const slice: import("@reduxjs/toolkit").Slice<SynchronizationGroupState, {
5
+ changeLinkedMap: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<ChangeLinkedMap>) => void;
5
6
  syncGroupAddSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupsAddSourcePayload>) => void;
6
7
  syncGroupRemoveSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupRemoveSourcePayload>) => void;
7
8
  syncGroupAddTarget: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupAddTargetPayload>) => void;
@@ -14,6 +15,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<SynchronizationGrou
14
15
  }, "synchronizationGroupsReducer">;
15
16
  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">;
16
17
  export declare const actions: import("@reduxjs/toolkit").CaseReducerActions<{
18
+ changeLinkedMap: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<ChangeLinkedMap>) => void;
17
19
  syncGroupAddSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupsAddSourcePayload>) => void;
18
20
  syncGroupRemoveSource: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupRemoveSourcePayload>) => void;
19
21
  syncGroupAddTarget: (draft: Draft<SynchronizationGroupState>, action: PayloadAction<SyncGroupAddTargetPayload>) => void;
@@ -47,6 +47,7 @@ export interface SynchronizationGroupState {
47
47
  sources: SynchronizationSources;
48
48
  groups: SynchronizationGroups;
49
49
  viewState: SyncGroupViewState;
50
+ linkedState: Record<string, string[]>;
50
51
  }
51
52
  export interface SynchronizationGroupModuleState {
52
53
  syncronizationGroupStore?: SynchronizationGroupState;
@@ -97,4 +98,8 @@ export declare enum SyncGroupActionOrigin {
97
98
  add = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_ADDACTION",
98
99
  autoLayerId = "ORIGIN_GENERIC_SYNCHRONIZATIONGROUP_UTILS_AUTOLAYERIDACTION"
99
100
  }
101
+ export interface ChangeLinkedMap {
102
+ panelId: string;
103
+ mapIds: string[];
104
+ }
100
105
  export {};
@@ -8,6 +8,7 @@ export * from './drawingtool';
8
8
  export * from './types';
9
9
  export * as storeTestUtils from './mapStore/storeTestUtils';
10
10
  export * from './coreModuleConfig';
11
+ export * from './generic/linking';
11
12
  export * as storeUtils from './utils';
12
13
  export * from './utils';
13
14
  export { uiModuleConfig } from './ui/config';
@@ -52,6 +52,7 @@ export interface WebMap {
52
52
  displayMapPin?: boolean;
53
53
  legendId?: string;
54
54
  dockedLayerManagerSize?: DockedLayerManagerSize;
55
+ selectedMapIds?: string[];
55
56
  }
56
57
  export type DockedLayerManagerSize = 'sizeSmall' | 'sizeMedium' | 'sizeLarge' | '';
57
58
  export interface WebMapState {
@@ -103,6 +104,7 @@ export interface MapPreset {
103
104
  shouldShowLayerManager?: boolean;
104
105
  shouldShowDockedLayerManager?: boolean;
105
106
  dockedLayerManagerSize?: DockedLayerManagerSize;
107
+ selectedMapIds?: string[];
106
108
  }
107
109
  export interface MapPresetInitialProps {
108
110
  mapPreset: MapPreset;