@opengeoweb/store 8.4.0 → 9.0.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.
Files changed (44) hide show
  1. package/index.esm.js +32842 -1217
  2. package/package.json +2 -18
  3. package/src/hooks/index.d.ts +1 -0
  4. package/src/hooks/useSetupDialog/index.d.ts +1 -0
  5. package/src/hooks/useSetupDialog/useSetupDialog.d.ts +12 -0
  6. package/src/index.d.ts +1 -0
  7. package/src/store/coreModuleConfig.d.ts +1 -1
  8. package/src/store/drawingtool/reducer.d.ts +2 -2
  9. package/src/store/drawingtool/selectors.d.ts +20 -0
  10. package/src/store/index.d.ts +2 -2
  11. package/src/store/mapStore/config.d.ts +1 -1
  12. package/src/store/mapStore/index.d.ts +4 -0
  13. package/src/store/mapStore/layers/reducer.d.ts +11 -3
  14. package/src/store/mapStore/layers/selectors.d.ts +5 -0
  15. package/src/store/mapStore/layers/types.d.ts +3 -0
  16. package/src/store/mapStore/map/sagas.d.ts +2 -2
  17. package/src/store/mapStore/storeTestSettings.d.ts +1 -0
  18. package/src/store/mapStore/storeTestUtils.d.ts +5 -0
  19. package/src/store/testUtils/Providers.d.ts +15 -0
  20. package/src/store/types.d.ts +2 -2
  21. package/src/store/ui/types.d.ts +2 -1
  22. package/src/store/utils.d.ts +0 -2
  23. package/src/store/layerSelect/config.d.ts +0 -5
  24. package/src/store/layerSelect/index.d.ts +0 -4
  25. package/src/store/layerSelect/localStorage.d.ts +0 -3
  26. package/src/store/layerSelect/reducer.d.ts +0 -21
  27. package/src/store/layerSelect/reducer.spec.d.ts +0 -1
  28. package/src/store/layerSelect/sagas.d.ts +0 -10
  29. package/src/store/layerSelect/sagas.spec.d.ts +0 -1
  30. package/src/store/layerSelect/selectors.d.ts +0 -115
  31. package/src/store/layerSelect/selectors.spec.d.ts +0 -1
  32. package/src/store/layerSelect/types.d.ts +0 -96
  33. package/src/store/layerSelect/utils.d.ts +0 -6
  34. package/src/store/layerSelect/utils.spec.d.ts +0 -1
  35. package/src/store/snackbar/config.d.ts +0 -4
  36. package/src/store/snackbar/index.d.ts +0 -6
  37. package/src/store/snackbar/reducer.d.ts +0 -11
  38. package/src/store/snackbar/reducer.spec.d.ts +0 -1
  39. package/src/store/snackbar/sagas.d.ts +0 -5
  40. package/src/store/snackbar/sagas.spec.d.ts +0 -1
  41. package/src/store/snackbar/selectors.d.ts +0 -8
  42. package/src/store/snackbar/selectors.spec.d.ts +0 -1
  43. package/src/store/snackbar/types.d.ts +0 -15
  44. /package/src/{store/layerSelect/localStorage.spec.d.ts → hooks/useSetupDialog/useSetupDialog.spec.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/store",
3
- "version": "8.4.0",
3
+ "version": "9.0.0",
4
4
  "description": "GeoWeb Store library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -9,21 +9,5 @@
9
9
  },
10
10
  "module": "./index.esm.js",
11
11
  "type": "module",
12
- "main": "./index.esm.js",
13
- "dependencies": {},
14
- "peerDependencies": {
15
- "@opengeoweb/shared": "8.4.0",
16
- "@opengeoweb/webmap": "8.4.0",
17
- "@opengeoweb/webmap-react": "8.4.0",
18
- "@redux-eggs/core": "2.2.0",
19
- "@redux-eggs/redux-toolkit": "2.2.0",
20
- "@redux-eggs/saga-extension": "2.2.0",
21
- "@reduxjs/toolkit": "1.9.7",
22
- "@turf/turf": "6.5.0",
23
- "date-fns": "2.30.0",
24
- "immer": "9.0.21",
25
- "lodash": "4.17.21",
26
- "moment": "2.29.4",
27
- "redux-saga": "1.2.3"
28
- }
12
+ "main": "./index.esm.js"
29
13
  }
@@ -0,0 +1 @@
1
+ export * from './useSetupDialog';
@@ -0,0 +1 @@
1
+ export * from './useSetupDialog';
@@ -0,0 +1,12 @@
1
+ import { uiTypes } from '../../store';
2
+ export interface SetupDialogReturnValue {
3
+ setDialogOrder: () => void;
4
+ dialogOrder: number;
5
+ onCloseDialog: () => void;
6
+ uiSource: uiTypes.Source;
7
+ isDialogOpen: boolean;
8
+ uiIsLoading: boolean;
9
+ uiError: string;
10
+ setFocused: (focused: boolean) => void;
11
+ }
12
+ export declare const useSetupDialog: (dialogType: uiTypes.DialogType, source?: uiTypes.Source) => SetupDialogReturnValue;
package/src/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './store';
2
+ export * from './hooks';
@@ -1 +1 @@
1
- export declare const coreModuleConfig: (import("@redux-eggs/core").Egg<import("redux").Store<import("./mapStore").WebMapStateModuleState, import("redux").AnyAction>> | import("@redux-eggs/core").Egg<import("redux").Store<import("./generic/synchronizationGroups/types").SynchronizationGroupModuleState, import("redux").AnyAction>> | import("@redux-eggs/core").Egg<import("redux").Store<import("./ui/types").UIModuleState, import("redux").AnyAction>> | import("@redux-eggs/core").Egg<import("redux").Store<import("./layerSelect/types").LayerSelectModuleState, import("redux").AnyAction>> | import("@redux-eggs/core").Egg<import("redux").Store<import("./snackbar/types").SnackbarModuleStore, import("redux").AnyAction>> | import("@redux-eggs/core").Egg<import("redux").Store<import("./drawingtool").DrawtoolModuleStore, import("redux").AnyAction>>)[];
1
+ export declare const coreModuleConfig: (import("@redux-eggs/core").Egg<import("redux").Store<import("./mapStore").WebMapStateModuleState, import("redux").AnyAction>> | import("@redux-eggs/core").Egg<import("redux").Store<import("./generic/synchronizationGroups/types").SynchronizationGroupModuleState, import("redux").AnyAction>> | import("@redux-eggs/core").Egg<import("redux").Store<import("./ui/types").UIModuleState, import("redux").AnyAction>> | import("@redux-eggs/core").Egg<import("redux").Store<import("./drawingtool").DrawtoolModuleStore, import("redux").AnyAction>>)[];
@@ -6,6 +6,8 @@ export interface DrawToolItem {
6
6
  activeDrawModeId: string;
7
7
  drawModes: DrawMode[];
8
8
  shouldAllowMultipleShapes: boolean;
9
+ geoJSONIntersectionLayerId?: string;
10
+ geoJSONIntersectionBoundsLayerId?: string;
9
11
  }
10
12
  export type DrawingToolState = EntityState<DrawToolItem>;
11
13
  export interface DrawtoolModuleStore {
@@ -16,10 +18,8 @@ export declare const initialState: DrawingToolState;
16
18
  export declare const reducer: import("redux").Reducer<DrawingToolState, import("redux").AnyAction>;
17
19
  export declare const drawtoolActions: import("@reduxjs/toolkit").CaseReducerActions<{
18
20
  registerDrawTool: (draft: Draft<DrawingToolState>, action: PayloadAction<MapDrawToolOptions & {
19
- drawModes: DrawMode[];
20
21
  drawToolId: string;
21
22
  mapId?: string;
22
- geoJSONLayerId?: string;
23
23
  }>) => void;
24
24
  unregisterDrawTool: (draft: Draft<DrawingToolState>, action: PayloadAction<{
25
25
  drawToolId: string;
@@ -1,6 +1,11 @@
1
1
  import type { DrawingToolState, DrawtoolModuleStore } from './reducer';
2
2
  export declare const getDrawingtoolStore: (store: DrawtoolModuleStore) => DrawingToolState;
3
3
  export declare const selectDrawToolById: (state: DrawtoolModuleStore, id: import("@reduxjs/toolkit").EntityId) => import("./reducer").DrawToolItem | undefined, selectAllDrawingTools: (state: DrawtoolModuleStore) => import("./reducer").DrawToolItem[];
4
+ export declare const getActiveDrawToolId: ((state: DrawtoolModuleStore) => string) & import("reselect").OutputSelectorFields<(args_0: import("./reducer").DrawToolItem[]) => string, {
5
+ clearCache: () => void;
6
+ }> & {
7
+ clearCache: () => void;
8
+ };
4
9
  export declare const getDrawModeById: ((state: DrawtoolModuleStore, _drawToolId: string, drawModeId: string) => import("dist/libs/webmap-react/src").DrawMode | undefined) & import("reselect").OutputSelectorFields<(args_0: import("./reducer").DrawToolItem | undefined, args_1: string) => import("dist/libs/webmap-react/src").DrawMode | undefined, {
5
10
  clearCache: () => void;
6
11
  }> & {
@@ -16,3 +21,18 @@ export declare const getDrawToolGeoJSONLayerId: ((state: DrawtoolModuleStore, id
16
21
  }> & {
17
22
  clearCache: () => void;
18
23
  };
24
+ export declare const getGeoJSONIntersectionLayerId: ((state: DrawtoolModuleStore, id: import("@reduxjs/toolkit").EntityId) => string | undefined) & import("reselect").OutputSelectorFields<(args_0: import("./reducer").DrawToolItem | undefined) => string | undefined, {
25
+ clearCache: () => void;
26
+ }> & {
27
+ clearCache: () => void;
28
+ };
29
+ export declare const getGeoJSONIntersectionBoundsLayerId: ((state: DrawtoolModuleStore, id: import("@reduxjs/toolkit").EntityId) => string | undefined) & import("reselect").OutputSelectorFields<(args_0: import("./reducer").DrawToolItem | undefined) => string | undefined, {
30
+ clearCache: () => void;
31
+ }> & {
32
+ clearCache: () => void;
33
+ };
34
+ export declare const getShouldAllowMultipleShapes: ((state: DrawtoolModuleStore, id: import("@reduxjs/toolkit").EntityId) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./reducer").DrawToolItem | undefined) => boolean, {
35
+ clearCache: () => void;
36
+ }> & {
37
+ clearCache: () => void;
38
+ };
@@ -1,9 +1,7 @@
1
1
  export * from './mapStore';
2
- export * from './layerSelect';
3
2
  export * from './ui';
4
3
  export * from './generic';
5
4
  export { rootSaga as genericSaga } from './generic/sagas';
6
- export * from './snackbar';
7
5
  export * from './router';
8
6
  export * from './app';
9
7
  export * from './drawingtool';
@@ -11,4 +9,6 @@ export * from './types';
11
9
  export * as storeTestUtils from './mapStore/storeTestUtils';
12
10
  export * from './coreModuleConfig';
13
11
  export * as storeUtils from './utils';
12
+ export * from './utils';
14
13
  export { uiModuleConfig } from './ui/config';
14
+ export * from './testUtils/Providers';
@@ -4,6 +4,6 @@ import { WebMapStateModuleState } from './types';
4
4
  export declare const mapStoreReducers: {
5
5
  webmap: import("redux").Reducer<import("./types").WebMapState, import("redux").AnyAction>;
6
6
  services: import("redux").Reducer<import("./types").ServiceState, import("redux").AnyAction>;
7
- layers: import("redux").Reducer<import("./types").LayerState, import("redux").AnyAction>;
7
+ layers: import("redux").Reducer<import("immer/dist/internal").WritableDraft<import("./types").LayerState>, import("redux").AnyAction>;
8
8
  };
9
9
  export declare const mapStoreModuleConfig: Egg<Store<WebMapStateModuleState>>;
@@ -66,6 +66,10 @@ export declare const mapStoreActions: {
66
66
  addAvailableBaseLayer: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").AddAvailableBaseLayerPayload, "layerReducer/addAvailableBaseLayer">;
67
67
  addAvailableBaseLayers: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").AddAvailableBaseLayersPayload, "layerReducer/addAvailableBaseLayers">;
68
68
  setAvailableBaseLayers: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetAvailableBaseLayersPayload, "layerReducer/setAvailableBaseLayers">;
69
+ setUseLatestReferenceTime: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
70
+ id: string;
71
+ useLatestReferenceTime: boolean;
72
+ }, "layerReducer/setUseLatestReferenceTime">;
69
73
  onUpdateLayerInformation: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("dist/libs/webmap-react/src").UpdateLayerInfoPayload, "layerReducer/onUpdateLayerInformation">;
70
74
  setSelectedFeature: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetSelectedFeaturePayload, "layerReducer/setSelectedFeature">;
71
75
  updateFeature: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").UpdateFeaturePayload, "layerReducer/updateFeature">;
@@ -1,9 +1,9 @@
1
1
  import { Draft, PayloadAction } from '@reduxjs/toolkit';
2
2
  import { SetLayerDimensionsPayload, SetLayerStylePayload, UpdateLayerInfoPayload } from '@opengeoweb/webmap-react';
3
3
  import { LayerState, Layer, AddLayerPayload, SetLayerDimensionPayload, SetLayerEnabledPayload, SetLayerOpacityPayload, SetLayerNamePayload, SetLayerGeojsonPayload, DeleteLayerPayload, ErrorLayerPayload, SetLayersPayload, SetBaseLayersPayload, AddBaseLayerPayload, AddAvailableBaseLayerPayload, AddAvailableBaseLayersPayload, SetAvailableBaseLayersPayload, SetSelectedFeaturePayload, UpdateFeaturePayload, ExitFeatureDrawModePayload, ToggleFeatureModePayload, UpdateFeaturePropertiesPayload, DuplicateMapLayerPayload } from './types';
4
- export declare const createLayer: ({ id, opacity, acceptanceTimeInMinutes, enabled, layerType, status, ...props }: Layer) => Layer;
4
+ export declare const createLayer: ({ id, opacity, acceptanceTimeInMinutes, enabled, layerType, status, useLatestReferenceTime, ...props }: Layer) => Layer;
5
5
  export declare const initialState: LayerState;
6
- export declare const slice: import("@reduxjs/toolkit").Slice<LayerState, {
6
+ export declare const slice: import("@reduxjs/toolkit").Slice<import("immer/dist/internal").WritableDraft<LayerState>, {
7
7
  addLayer: (draft: Draft<LayerState>, action: PayloadAction<AddLayerPayload>) => void;
8
8
  duplicateMapLayer: (draft: Draft<LayerState>, action: PayloadAction<DuplicateMapLayerPayload>) => void;
9
9
  layerChangeDimension: (draft: Draft<LayerState>, action: PayloadAction<SetLayerDimensionPayload>) => void;
@@ -26,6 +26,10 @@ export declare const slice: import("@reduxjs/toolkit").Slice<LayerState, {
26
26
  addAvailableBaseLayer: (draft: Draft<LayerState>, action: PayloadAction<AddAvailableBaseLayerPayload>) => void;
27
27
  addAvailableBaseLayers: (draft: Draft<LayerState>, action: PayloadAction<AddAvailableBaseLayersPayload>) => void;
28
28
  setAvailableBaseLayers: (draft: Draft<LayerState>, action: PayloadAction<SetAvailableBaseLayersPayload>) => void;
29
+ setUseLatestReferenceTime: (draft: import("immer/dist/internal").WritableDraft<LayerState>, action: PayloadAction<{
30
+ id: string;
31
+ useLatestReferenceTime: boolean;
32
+ }>) => void;
29
33
  onUpdateLayerInformation: (draft: Draft<LayerState>, action: PayloadAction<UpdateLayerInfoPayload>) => void;
30
34
  setSelectedFeature: (draft: Draft<LayerState>, action: PayloadAction<SetSelectedFeaturePayload>) => void;
31
35
  updateFeature: (draft: Draft<LayerState>, action: PayloadAction<UpdateFeaturePayload>) => void;
@@ -33,7 +37,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<LayerState, {
33
37
  toggleFeatureMode: (draft: Draft<LayerState>, action: PayloadAction<ToggleFeatureModePayload>) => void;
34
38
  exitFeatureDrawMode: (draft: Draft<LayerState>, action: PayloadAction<ExitFeatureDrawModePayload>) => void;
35
39
  }, "layerReducer">;
36
- export declare const reducer: import("redux").Reducer<LayerState, import("redux").AnyAction>;
40
+ export declare const reducer: import("redux").Reducer<import("immer/dist/internal").WritableDraft<LayerState>, import("redux").AnyAction>;
37
41
  export declare const layerActions: import("@reduxjs/toolkit").CaseReducerActions<{
38
42
  addLayer: (draft: Draft<LayerState>, action: PayloadAction<AddLayerPayload>) => void;
39
43
  duplicateMapLayer: (draft: Draft<LayerState>, action: PayloadAction<DuplicateMapLayerPayload>) => void;
@@ -57,6 +61,10 @@ export declare const layerActions: import("@reduxjs/toolkit").CaseReducerActions
57
61
  addAvailableBaseLayer: (draft: Draft<LayerState>, action: PayloadAction<AddAvailableBaseLayerPayload>) => void;
58
62
  addAvailableBaseLayers: (draft: Draft<LayerState>, action: PayloadAction<AddAvailableBaseLayersPayload>) => void;
59
63
  setAvailableBaseLayers: (draft: Draft<LayerState>, action: PayloadAction<SetAvailableBaseLayersPayload>) => void;
64
+ setUseLatestReferenceTime: (draft: import("immer/dist/internal").WritableDraft<LayerState>, action: PayloadAction<{
65
+ id: string;
66
+ useLatestReferenceTime: boolean;
67
+ }>) => void;
60
68
  onUpdateLayerInformation: (draft: Draft<LayerState>, action: PayloadAction<UpdateLayerInfoPayload>) => void;
61
69
  setSelectedFeature: (draft: Draft<LayerState>, action: PayloadAction<SetSelectedFeaturePayload>) => void;
62
70
  updateFeature: (draft: Draft<LayerState>, action: PayloadAction<UpdateFeaturePayload>) => void;
@@ -332,3 +332,8 @@ export declare const getLayerIsInsideAcceptanceTime: ((state: CoreAppStore, _lay
332
332
  }> & {
333
333
  clearCache: () => void;
334
334
  };
335
+ export declare const getUseLatestReferenceTime: ((state: CoreAppStore, layerId?: string | undefined) => boolean) & import("reselect").OutputSelectorFields<(args_0: Layer | undefined) => boolean, {
336
+ clearCache: () => void;
337
+ }> & {
338
+ clearCache: () => void;
339
+ };
@@ -30,6 +30,7 @@ export interface ReduxLayer extends LayerFoundation, FeatureLayer {
30
30
  dimensions?: Dimension[];
31
31
  mapId?: string;
32
32
  status?: LayerStatus;
33
+ useLatestReferenceTime?: boolean;
33
34
  }
34
35
  /**
35
36
  * Layer is used to define a layer with all its possible properties.
@@ -132,6 +133,8 @@ export interface UpdateFeaturePayload extends LayerPayload {
132
133
  geojson: GeoJSON.FeatureCollection;
133
134
  shouldAllowMultipleShapes?: boolean;
134
135
  reason?: string;
136
+ geoJSONIntersectionLayerId?: string;
137
+ geoJSONIntersectionBoundsLayerId?: string;
135
138
  }
136
139
  export interface UpdateFeaturePropertiesPayload extends LayerPayload {
137
140
  properties: GeoJSON.GeoJsonProperties;
@@ -1,6 +1,6 @@
1
1
  import { SagaIterator } from 'redux-saga';
2
2
  import { Moment } from 'moment';
3
- import { AnimationList } from '@opengeoweb/webmap';
3
+ import { AnimationStep } from '@opengeoweb/webmap';
4
4
  import { mapActions } from '.';
5
5
  import { layerActions } from '../layers';
6
6
  import { Layer } from '../layers/types';
@@ -10,7 +10,7 @@ export declare const generateTimeList: (start: Moment, end: Moment, interval: nu
10
10
  }[];
11
11
  export declare const getAnimationEndTime: (animationEndTime: string) => string;
12
12
  export declare const isAnimationEndTimeValid: (animationEndTime: string) => boolean;
13
- export declare function updateMapDraw(mapId: string, draw: string | AnimationList[] | undefined, initialAnimationStep?: number): void;
13
+ export declare function updateMapDraw(mapId: string, draw: string | AnimationStep[] | undefined, initialAnimationStep?: number): void;
14
14
  export declare function startAnimationSaga({ payload, }: ReturnType<typeof mapActions.mapStartAnimation>): Generator;
15
15
  export declare function stopAnimationSaga({ payload, }: ReturnType<typeof mapActions.mapStopAnimation>): Generator;
16
16
  export declare function deleteLayerSaga({ payload, }: ReturnType<typeof layerActions.layerDelete>): SagaIterator;
@@ -4,3 +4,4 @@ export declare const WmLayerWithoutTimeDimension: WMLayer, WmMultiDimensionLayer
4
4
  export declare const styleListForRADNLOPERR25PCPRRL3KNMILayer: Style[];
5
5
  export declare const defaultReduxServices: serviceTypes.Services;
6
6
  export declare const WmMultiDimensionLayer2: WMLayer;
7
+ export declare const WmMultiDimensionServices: serviceTypes.Services;
@@ -2,6 +2,7 @@ import { LayerType } from '@opengeoweb/webmap';
2
2
  import type { CoreAppStore } from '../types';
3
3
  import { layerTypes } from './layers';
4
4
  import { mapTypes } from './map';
5
+ import { WebMapStateModuleState } from './types';
5
6
  export declare const createLayersState: (layerId: string, props?: {}) => layerTypes.LayerState;
6
7
  export declare const createMultipleLayersState: (layers: layerTypes.Layer[], mapId: string) => layerTypes.LayerState;
7
8
  export declare const createWebmapState: (...mapIds: string[]) => mapTypes.WebMapState;
@@ -10,3 +11,7 @@ export declare const webmapStateWithAddedLayer: (layerType: LayerType, layerId:
10
11
  export declare const mockStateMapWithLayer: (layer: layerTypes.Layer, mapId: string) => CoreAppStore;
11
12
  export declare const mockStateMapWithMultipleLayers: (layers: layerTypes.Layer[], mapId: string) => CoreAppStore;
12
13
  export declare const testGeoJSON: GeoJSON.FeatureCollection;
14
+ export declare const mockStateMapWithAnimationDelayWithoutLayers: (mapId: string) => WebMapStateModuleState;
15
+ export declare const mockStateMapWithTimeSliderSpanWithoutLayers: (mapId: string, timeSliderSpan: number) => WebMapStateModuleState;
16
+ export declare const mockStateMapWithDimensions: (layer: layerTypes.Layer, mapId: string) => WebMapStateModuleState;
17
+ export declare const mockStateMapWithTimeStepWithoutLayers: (mapId: string, timeStep: number) => WebMapStateModuleState;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { ThemeProviderProps } from '@opengeoweb/theme';
3
+ import { Store } from '@reduxjs/toolkit';
4
+ export declare const createStore: () => Store;
5
+ interface ThemeStoreProviderProps extends ThemeProviderProps {
6
+ store: Store;
7
+ }
8
+ /**
9
+ * A Provider component which provides the GeoWeb theme and store for the core.
10
+ * Note: Should only be used with core components, as the provided store is only for core.
11
+ * @param children
12
+ * @returns
13
+ */
14
+ export declare const ThemeStoreProvider: React.FC<ThemeStoreProviderProps>;
15
+ export {};
@@ -1,6 +1,6 @@
1
1
  import type { WebMapStateModuleState } from './mapStore/types';
2
2
  import type { SynchronizationGroupModuleState } from './generic/synchronizationGroups/types';
3
- import type { uiTypes, layerSelectTypes } from '.';
3
+ import type { uiTypes } from '.';
4
4
  import type { DrawtoolModuleStore } from './drawingtool';
5
- export interface CoreAppStore extends SynchronizationGroupModuleState, uiTypes.UIModuleState, WebMapStateModuleState, layerSelectTypes.LayerSelectModuleState, DrawtoolModuleStore {
5
+ export interface CoreAppStore extends SynchronizationGroupModuleState, uiTypes.UIModuleState, WebMapStateModuleState, DrawtoolModuleStore {
6
6
  }
@@ -15,7 +15,8 @@ export declare enum DialogTypes {
15
15
  DrawingTool = "drawingTool",
16
16
  DockedLayerManager = "dockedLayerManager",
17
17
  ObjectManager = "objectManager",
18
- PublicWarnings = "publicWarnings"
18
+ PublicWarnings = "publicWarnings",
19
+ Search = "search"
19
20
  }
20
21
  export type DialogType = DialogTypes | LegendDialogType | GetFeatureInfoDialogType;
21
22
  export type { Source };
@@ -1,8 +1,6 @@
1
- import { ServiceScope } from './mapStore/types';
2
1
  export declare const selectorMemoizationOptions: {
3
2
  memoizeOptions: {
4
3
  maxSize: number;
5
4
  resultEqualityCheck: (value: any, other: any) => boolean;
6
5
  };
7
6
  };
8
- export declare const isUserAddedService: (scope: ServiceScope) => boolean;
@@ -1,5 +0,0 @@
1
- import { Egg } from '@redux-eggs/core';
2
- import { Store } from '@reduxjs/toolkit';
3
- import { LayerSelectModuleState } from './types';
4
- declare const layerSelectConfig: Egg<Store<LayerSelectModuleState>>;
5
- export default layerSelectConfig;
@@ -1,4 +0,0 @@
1
- export { layerSelectActions, initialState as layerSelectInitialState, reducer as layerSelectReducer, } from './reducer';
2
- export * as layerSelectSelectors from './selectors';
3
- export * as layerSelectTypes from './types';
4
- export * from './localStorage';
@@ -1,3 +0,0 @@
1
- import { UserAddedServices } from './types';
2
- export declare const getUserAddedServices: () => UserAddedServices;
3
- export declare const setUserAddedServices: (services: UserAddedServices) => void;
@@ -1,21 +0,0 @@
1
- import { PayloadAction, Draft } from '@reduxjs/toolkit';
2
- import { uiTypes } from '../ui';
3
- import { DisableActiveServicePayload, EnableActiveServicePayload, EnableOnlyOneKeywordPayload, LayerSelectRemoveServicePayload, LayerSelectStoreType, SetAllServicesEnabledPayload, SetActiveLayerInfoPayload, SetSearchFilterPayload, ToggleKeywordsPayload, Filter, ActiveServiceObject, ToggleServicePopupPayload, ServicePopupObject } from './types';
4
- export declare const layerSelectFilterAdapter: import("@reduxjs/toolkit").EntityAdapter<Filter>;
5
- export declare const layerSelectActiveServicesAdapter: import("@reduxjs/toolkit").EntityAdapter<ActiveServiceObject>;
6
- export declare const initialServicePopupState: ServicePopupObject;
7
- export declare const initialState: LayerSelectStoreType;
8
- export declare const reducer: import("redux").Reducer<LayerSelectStoreType, import("redux").AnyAction>;
9
- export declare const layerSelectActions: import("@reduxjs/toolkit").CaseReducerActions<{
10
- setSearchFilter: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<SetSearchFilterPayload>) => void;
11
- setAllServicesEnabled: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<SetAllServicesEnabledPayload>) => void;
12
- closeServicePopupOpen: (draft: Draft<LayerSelectStoreType>) => void;
13
- toggleServicePopup: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<ToggleServicePopupPayload>) => void;
14
- layerSelectRemoveService: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<LayerSelectRemoveServicePayload>) => void;
15
- enableActiveService: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<EnableActiveServicePayload>) => void;
16
- disableActiveService: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<DisableActiveServicePayload>) => void;
17
- toggleFilter: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<ToggleKeywordsPayload>) => void;
18
- enableOnlyOneFilter: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<EnableOnlyOneKeywordPayload>) => void;
19
- setActiveLayerInfo: (draft: Draft<LayerSelectStoreType>, action: PayloadAction<SetActiveLayerInfoPayload>) => void;
20
- }, uiTypes.DialogTypes.LayerSelect>;
21
- export type LayerSelectActions = ReturnType<typeof layerSelectActions.setSearchFilter> | ReturnType<typeof layerSelectActions.layerSelectRemoveService> | ReturnType<typeof layerSelectActions.enableActiveService> | ReturnType<typeof layerSelectActions.disableActiveService> | ReturnType<typeof layerSelectActions.toggleFilter> | ReturnType<typeof layerSelectActions.enableOnlyOneFilter> | ReturnType<typeof layerSelectActions.setActiveLayerInfo>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { SagaIterator } from 'redux-saga';
2
- import { serviceActions } from '../mapStore/service/reducer';
3
- import { layerSelectActions, LayerSelectActions } from './reducer';
4
- import { uiActions } from '../ui';
5
- export declare function layerSelectCloseInfoDialogSaga({ type, payload, }: ReturnType<typeof uiActions.setToggleOpenDialog | typeof uiActions.setActiveMapIdForDialog | typeof layerSelectActions.disableActiveService | typeof layerSelectActions.toggleFilter | typeof layerSelectActions.setSearchFilter>): SagaIterator;
6
- export declare function layerSelectRemoveServiceSaga(capturedAction: LayerSelectActions): SagaIterator;
7
- export declare function addServiceToLocalStorageSaga({ payload, }: ReturnType<typeof serviceActions.serviceSetLayers>): void;
8
- export declare function removeServiceFromLocalStorageSaga({ payload, }: ReturnType<typeof serviceActions.mapStoreRemoveService>): void;
9
- export declare function rootSaga(): SagaIterator;
10
- export default rootSaga;
@@ -1 +0,0 @@
1
- export {};
@@ -1,115 +0,0 @@
1
- import type { CoreAppStore } from '../types';
2
- import { LayerSelectStoreType, ActiveLayerObject, ActiveServiceObjectEntities, ServicePopupObject } 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
- */
10
- export declare const getSearchFilter: ((state: CoreAppStore) => string) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => string, {
11
- clearCache: () => void;
12
- }> & {
13
- clearCache: () => void;
14
- };
15
- /**
16
- * Returns active services array
17
- *
18
- * Example getActiveServices(store);
19
- * @param {object} store store: object - store object
20
- * @returns {ActiveServiceObjectEntities} returnType: ActiveServiceObjectEntitiesobject of active services
21
- */
22
- export declare const getActiveServices: (store: CoreAppStore) => ActiveServiceObjectEntities;
23
- export declare const getActiveServicesDictionary: (state: CoreAppStore) => import("@reduxjs/toolkit").Dictionary<import("./types").ActiveServiceObject>, getActiveServiceById: (state: CoreAppStore, id: import("@reduxjs/toolkit").EntityId) => import("./types").ActiveServiceObject | undefined;
24
- /**
25
- * Returns all ids of enabled services
26
- *
27
- * Example getEnabledServiceIds(store);
28
- * @param {object} store store: object - store object
29
- * @returns {array} returnType: array of service ids that are enabled
30
- */
31
- export declare const getEnabledServiceIds: ((state: CoreAppStore) => string[]) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => string[], {
32
- clearCache: () => void;
33
- }> & {
34
- clearCache: () => void;
35
- };
36
- /**
37
- * Returns all ids of checked keywords
38
- *
39
- * Example getCheckedKeywordIds(store);
40
- * @param {object} store store: object - store object
41
- * @returns {array} returnType: array of keyword ids that are checked
42
- */
43
- export declare const getCheckedFilterIds: ((state: CoreAppStore) => string[]) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => string[], {
44
- clearCache: () => void;
45
- }> & {
46
- clearCache: () => void;
47
- };
48
- /**
49
- * Returns ids of all keywords
50
- *
51
- * Example getAllKeywordIds(store);
52
- * @param {object} store store: object - store object
53
- * @returns {array} returnType: array of all keyword ids
54
- */
55
- export declare const getAllFilterIds: (store: CoreAppStore) => string[];
56
- /**
57
- * Returns all filters
58
- *
59
- * Example getAllFilters(store);
60
- * @param {object} store store: object - store object
61
- * @returns {array} returnType: array of all filters
62
- */
63
- export declare const getAllFilters: (state: CoreAppStore) => import("./types").Filter[];
64
- /**
65
- * Returns if all keywords are checked
66
- *
67
- * Example isAllKeywordsChecked(store);
68
- * @param {object} store store: object - store object
69
- * @returns {array} returnType: boolean if all keywords are checked
70
- */
71
- export declare const isAllFiltersChecked: ((state: CoreAppStore) => boolean) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => boolean, {
72
- clearCache: () => void;
73
- }> & {
74
- clearCache: () => void;
75
- };
76
- /**
77
- * Gets a KeywordObject by its id
78
- *
79
- * Example: keywordObject = getKeywordObjectById(store, 'keywordId')
80
- * @param {object} store object from which the keyword state will be extracted
81
- * @param {string} filterId Id of the keyword
82
- * @returns {object} object containing keyword information (id, amount, amountVisible, checked)
83
- */
84
- export declare const getFilterById: (state: CoreAppStore, id: import("@reduxjs/toolkit").EntityId) => import("./types").Filter | undefined;
85
- /**
86
- * Returns the active layer info
87
- *
88
- * Example getActiveLayerInfo(store);
89
- * @param {object} store store: object - store object
90
- * @returns {object} returnType: ActiveLayerObject
91
- */
92
- export declare const getActiveLayerInfo: ((state: CoreAppStore) => ActiveLayerObject) & import("reselect").OutputSelectorFields<(args_0: LayerSelectStoreType) => ActiveLayerObject, {
93
- clearCache: () => void;
94
- }> & {
95
- clearCache: () => void;
96
- };
97
- /**
98
- * Returns a filtered active layer object based on the given filter settings
99
- * Example: layerSelectSelectors.getFilteredLayers(store, filteredSettings);
100
- * @param {object} store store: object - object from which the service state will be extracted
101
- * @returns {array} returnType: ActiveLayerObject - an array of all filtered activelayers
102
- */
103
- export declare const getFilteredLayers: ((state: CoreAppStore) => ActiveLayerObject[]) & import("reselect").OutputSelectorFields<(args_0: string[], args_1: import("../mapStore/types").Services, args_2: string[], args_3: boolean, args_4: string) => ActiveLayerObject[], {
104
- clearCache: () => void;
105
- }> & {
106
- clearCache: () => void;
107
- };
108
- /**
109
- * Returns service popup details
110
- *
111
- * Example getActiveServices(store, 'server-id');
112
- * @param {object} store store: object - store object
113
- * @returns {object} returnType: object of active service
114
- */
115
- export declare const getServicePopupDetails: (store: CoreAppStore) => ServicePopupObject;
@@ -1 +0,0 @@
1
- export {};
@@ -1,96 +0,0 @@
1
- import { EntityState } from '@reduxjs/toolkit';
2
- import type { ServiceLayer, ServiceScope } from '../mapStore/types';
3
- export type NoIdService = Omit<LayerSelectService, 'id'>;
4
- export interface UserAddedServices {
5
- [url: string]: NoIdService;
6
- }
7
- export interface LayerSelectService {
8
- name: string;
9
- url: string;
10
- id: string;
11
- scope?: ServiceScope;
12
- abstract?: string;
13
- }
14
- export interface ActiveLayerObject extends ServiceLayer {
15
- serviceName: string;
16
- }
17
- export interface ActiveServiceObject {
18
- serviceId?: string;
19
- serviceName?: string;
20
- serviceUrl?: string;
21
- abstract?: string;
22
- enabled?: boolean;
23
- filterIds?: string[];
24
- scope?: ServiceScope;
25
- isLoading?: boolean;
26
- [key: string]: any;
27
- }
28
- export declare enum FilterType {
29
- Keyword = "keywords",
30
- Group = "groups"
31
- }
32
- export interface Filter {
33
- id: string;
34
- name: string;
35
- amount?: number;
36
- amountVisible?: number;
37
- checked?: boolean;
38
- type: FilterType;
39
- }
40
- export type ActiveServiceObjectEntities = Record<string, ActiveServiceObject>;
41
- export type Filters = EntityState<Filter>;
42
- export type ActiveServiceType = EntityState<ActiveServiceObject>;
43
- export interface FiltersType {
44
- searchFilter: string;
45
- activeServices: ActiveServiceType;
46
- filters: Filters;
47
- }
48
- export type PopupVariant = 'edit' | 'add' | 'save' | 'show';
49
- export interface ServicePopupObject {
50
- isOpen: boolean;
51
- variant: PopupVariant;
52
- url?: string;
53
- serviceId?: string;
54
- }
55
- export interface LayerSelectStoreType {
56
- filters: FiltersType;
57
- allServicesEnabled: boolean;
58
- activeLayerInfo: ActiveLayerObject;
59
- servicePopup: ServicePopupObject;
60
- }
61
- export interface LayerSelectModuleState {
62
- layerSelect?: LayerSelectStoreType;
63
- }
64
- export interface SetSearchFilterPayload {
65
- filterText: string;
66
- }
67
- export interface SetAllServicesEnabledPayload {
68
- allServicesEnabled: boolean;
69
- }
70
- export interface ToggleServicePopupPayload {
71
- url?: string;
72
- variant: PopupVariant;
73
- serviceId?: string;
74
- isOpen: boolean;
75
- }
76
- export interface EnableActiveServicePayload {
77
- serviceId: string;
78
- filters: string[];
79
- }
80
- export interface DisableActiveServicePayload {
81
- serviceId: string;
82
- filters: string[];
83
- }
84
- export interface LayerSelectRemoveServicePayload {
85
- serviceId: string;
86
- serviceUrl?: string;
87
- }
88
- export interface ToggleKeywordsPayload {
89
- filterIds: string[];
90
- }
91
- export interface EnableOnlyOneKeywordPayload {
92
- filterId: string;
93
- }
94
- export interface SetActiveLayerInfoPayload {
95
- layer: ActiveLayerObject;
96
- }
@@ -1,6 +0,0 @@
1
- import { EntityAdapter, Draft } from '@reduxjs/toolkit';
2
- import { Filter, FilterType, LayerSelectStoreType } from './types';
3
- import { serviceTypes } from '../mapStore';
4
- export declare const getFilterId: (filterType: FilterType, filterName: string) => string;
5
- export declare const produceFilters: (filterNames: string[], filterType: FilterType, draft: Draft<LayerSelectStoreType>, layerSelectFilterAdapter: EntityAdapter<Filter>) => void;
6
- export declare const filterLayersFromService: (serviceId: string, services: serviceTypes.Services, filterIds: string[], allFiltersActive: boolean, searchString: string) => serviceTypes.ServiceLayer[];
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { Store } from '@reduxjs/toolkit';
2
- import { Egg } from '@redux-eggs/core';
3
- import { SnackbarModuleStore } from './types';
4
- export declare const snackbarModuleConfig: Egg<Store<SnackbarModuleStore>>;
@@ -1,6 +0,0 @@
1
- export { snackbarActions } from './reducer';
2
- export * as snackbarSelectors from './selectors';
3
- export * as snackbarTypes from './types';
4
- export * from './config';
5
- export { reducer as snackbarReducer } from './reducer';
6
- export { rootSaga as snackbarSaga } from './sagas';
@@ -1,11 +0,0 @@
1
- import { PayloadAction, Draft } from '@reduxjs/toolkit';
2
- import { OpenSnackbarPayload, SnackbarItem, SnackbarState, TriggerOpenSnackbarBySagaPayload } from './types';
3
- export declare const snackbarAdapter: import("@reduxjs/toolkit").EntityAdapter<SnackbarItem>;
4
- export declare const initialState: SnackbarState;
5
- export declare const reducer: import("redux").Reducer<SnackbarState, import("redux").AnyAction>;
6
- export declare const snackbarActions: import("@reduxjs/toolkit").CaseReducerActions<{
7
- openSnackbar: (draft: Draft<SnackbarState>, action: PayloadAction<OpenSnackbarPayload>) => void;
8
- triggerOpenSnackbarBySaga: (draft: Draft<SnackbarState>, action: PayloadAction<TriggerOpenSnackbarBySagaPayload>) => void;
9
- closeSnackbar: (draft: Draft<SnackbarState>) => void;
10
- }, "snackbar">;
11
- export type SnackbarActions = ReturnType<typeof snackbarActions.openSnackbar> | ReturnType<typeof snackbarActions.triggerOpenSnackbarBySaga> | ReturnType<typeof snackbarActions.closeSnackbar>;
@@ -1 +0,0 @@
1
- export {};