@opengeoweb/store 9.7.0 → 9.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/store",
3
- "version": "9.7.0",
3
+ "version": "9.9.0",
4
4
  "description": "GeoWeb Store library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -15,10 +15,9 @@
15
15
  "@opengeoweb/webmap-react": "*",
16
16
  "redux-saga": "^1.2.3",
17
17
  "@opengeoweb/webmap": "*",
18
- "immer": "^9.0.21",
18
+ "immer": "^10.0.3",
19
19
  "@redux-eggs/redux-toolkit": "^2.2.0",
20
20
  "@redux-eggs/saga-extension": "^2.2.0",
21
- "date-fns": "^3.3.0",
22
21
  "lodash": "^4.17.21",
23
22
  "@opengeoweb/theme": "*"
24
23
  },
@@ -1,22 +1,4 @@
1
- import { DRAWMODE } from '@opengeoweb/webmap-react';
2
- export declare const testDefaultPoint: {
3
- drawModeId: string;
4
- value: DRAWMODE;
5
- title: string;
6
- shape: import("geojson").Feature<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
7
- isSelectable: boolean;
8
- };
9
- export declare const testDefaultPolygon: {
10
- drawModeId: string;
11
- value: DRAWMODE;
12
- title: string;
13
- shape: import("geojson").Feature<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
14
- isSelectable: boolean;
15
- };
16
- export declare const testDefaultDelete: {
17
- drawModeId: string;
18
- value: "DELETE";
19
- title: string;
20
- shape: import("geojson").Feature<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
21
- isSelectable: boolean;
22
- };
1
+ import { DrawMode } from '@opengeoweb/webmap-react';
2
+ export declare const testDefaultPoint: DrawMode;
3
+ export declare const testDefaultPolygon: DrawMode;
4
+ export declare const testDefaultDelete: DrawMode;
@@ -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("immer/dist/internal").WritableDraft<import("./types").LayerState>, import("redux").AnyAction>;
7
+ layers: import("redux").Reducer<import("./types").LayerState, import("redux").AnyAction>;
8
8
  };
9
9
  export declare const mapStoreModuleConfig: Egg<Store<WebMapStateModuleState>>;
@@ -45,6 +45,10 @@ export declare const mapStoreActions: {
45
45
  setDisableMapPin: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").DisableMapPinPayload, "mapReducer/setDisableMapPin">;
46
46
  toggleMapPinIsVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").ToggleMapPinIsVisiblePayload, "mapReducer/toggleMapPinIsVisible">;
47
47
  setDockedLayerManagerSize: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetDockedLayerManagerSize, "mapReducer/setDockedLayerManagerSize">;
48
+ setMapPresetError: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
49
+ mapId: string;
50
+ error: string;
51
+ }, "mapReducer/setMapPresetError">;
48
52
  addLayer: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").AddLayerPayload, "layerReducer/addLayer">;
49
53
  duplicateMapLayer: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").DuplicateMapLayerPayload, "layerReducer/duplicateMapLayer">;
50
54
  layerChangeDimension: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetLayerDimensionPayload, "layerReducer/layerChangeDimension">;
@@ -84,6 +88,6 @@ export declare const mapStoreActions: {
84
88
  export * from './service';
85
89
  export * from './map';
86
90
  export * from './layers';
87
- export type { WebMapStateModuleState } from './types';
91
+ export type { WebMapStateModuleState, MapPreset } from './types';
88
92
  export * as storeTestSettings from './storeTestSettings';
89
93
  export * from './config';
@@ -3,7 +3,7 @@ import { SetLayerDimensionsPayload, SetLayerStylePayload, UpdateLayerInfoPayload
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
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<import("immer/dist/internal").WritableDraft<LayerState>, {
6
+ export declare const slice: import("@reduxjs/toolkit").Slice<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,7 +26,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<import("immer/dist/
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<{
29
+ setUseLatestReferenceTime: (draft: Draft<LayerState>, action: PayloadAction<{
30
30
  id: string;
31
31
  useLatestReferenceTime: boolean;
32
32
  }>) => void;
@@ -40,7 +40,7 @@ export declare const slice: import("@reduxjs/toolkit").Slice<import("immer/dist/
40
40
  toggleFeatureMode: (draft: Draft<LayerState>, action: PayloadAction<ToggleFeatureModePayload>) => void;
41
41
  exitFeatureDrawMode: (draft: Draft<LayerState>, action: PayloadAction<ExitFeatureDrawModePayload>) => void;
42
42
  }, "layerReducer">;
43
- export declare const reducer: import("redux").Reducer<import("immer/dist/internal").WritableDraft<LayerState>, import("redux").AnyAction>;
43
+ export declare const reducer: import("redux").Reducer<LayerState, import("redux").AnyAction>;
44
44
  export declare const layerActions: import("@reduxjs/toolkit").CaseReducerActions<{
45
45
  addLayer: (draft: Draft<LayerState>, action: PayloadAction<AddLayerPayload>) => void;
46
46
  duplicateMapLayer: (draft: Draft<LayerState>, action: PayloadAction<DuplicateMapLayerPayload>) => void;
@@ -64,7 +64,7 @@ export declare const layerActions: import("@reduxjs/toolkit").CaseReducerActions
64
64
  addAvailableBaseLayer: (draft: Draft<LayerState>, action: PayloadAction<AddAvailableBaseLayerPayload>) => void;
65
65
  addAvailableBaseLayers: (draft: Draft<LayerState>, action: PayloadAction<AddAvailableBaseLayersPayload>) => void;
66
66
  setAvailableBaseLayers: (draft: Draft<LayerState>, action: PayloadAction<SetAvailableBaseLayersPayload>) => void;
67
- setUseLatestReferenceTime: (draft: import("immer/dist/internal").WritableDraft<LayerState>, action: PayloadAction<{
67
+ setUseLatestReferenceTime: (draft: Draft<LayerState>, action: PayloadAction<{
68
68
  id: string;
69
69
  useLatestReferenceTime: boolean;
70
70
  }>) => void;
@@ -1,10 +1,10 @@
1
1
  import { layerTypes } from '../layers';
2
2
  export declare const filterLayers: (layers?: layerTypes.Layer[], layerParser?: (layer: layerTypes.Layer) => layerTypes.Layer) => FilteredLayerList;
3
3
  export declare const createEmtpyFilteredList: (existingList: []) => FilteredLayerList;
4
- export type FilteredLayerList = {
4
+ export interface FilteredLayerList {
5
5
  mapLayers: layerTypes.Layer[];
6
6
  baseLayers: layerTypes.Layer[];
7
7
  overLayers?: layerTypes.Layer[];
8
- };
8
+ }
9
9
  export declare const parseBoolean: (value: string | boolean) => boolean;
10
10
  export declare const parseLayer: (layer: layerTypes.Layer) => layerTypes.Layer;
@@ -4,7 +4,7 @@ export declare const mapUtils: {
4
4
  replaceLayerIdsToEnsureUniqueLayerIdsInStore: (layerIds: import("./replaceLayerIdsToEnsureUniqueLayerIdsInStore").LayersAndAutoLayerIds) => import("./replaceLayerIdsToEnsureUniqueLayerIdsInStore").LayersAndAutoLayerIds;
5
5
  moveArrayElements<T>(array: T[], oldIndex: number, newIndex: number): T[];
6
6
  dateFormat: "yyyy-MM-dd'T'HH:mm:ss'Z";
7
- createMap: ({ id, isAnimating, animationStartTime, animationEndTime, isAutoUpdating, isEndTimeOverriding, bbox, srs, baseLayers, overLayers, mapLayers, featureLayers, dimensions, autoUpdateLayerId, autoTimeStepLayerId, timeSliderSpan, timeStep, animationDelay, timeSliderWidth, timeSliderCenterTime, timeSliderSecondsPerPx, isTimestepAuto, isTimeSpanAuto, isTimeSliderHoverOn, isTimeSliderVisible, displayMapPin, disableMapPin, shouldShowZoomControls, }: utils.CreateMapProps) => mapTypes.WebMap;
7
+ createMap: ({ id, isAnimating, animationStartTime, animationEndTime, isAutoUpdating, shouldEndtimeOverride, bbox, srs, baseLayers, overLayers, mapLayers, featureLayers, dimensions, autoUpdateLayerId, autoTimeStepLayerId, timeSliderSpan, timeStep, animationDelay, timeSliderWidth, timeSliderCenterTime, timeSliderSecondsPerPx, isTimestepAuto, isTimeSpanAuto, isTimeSliderHoverOn, isTimeSliderVisible, displayMapPin, disableMapPin, shouldShowZoomControls, }: utils.CreateMapProps) => mapTypes.WebMap;
8
8
  checkValidLayersPayload: (layers: import("../types").Layer[], mapId: string) => boolean;
9
9
  getDraftMapById: (mapId: string, draft: mapTypes.WebMapState) => mapTypes.WebMap;
10
10
  produceDraftStateSetWebMapDimension: (draft: mapTypes.WebMapState, mapId: string, dimensionFromAction: mapTypes.Dimension, overwriteCurrentValue: boolean) => void;
@@ -52,6 +52,10 @@ export declare const slice: import("@reduxjs/toolkit").Slice<WebMapState, {
52
52
  setDisableMapPin: (draft: Draft<WebMapState>, action: PayloadAction<DisableMapPinPayload>) => void;
53
53
  toggleMapPinIsVisible: (draft: Draft<WebMapState>, action: PayloadAction<ToggleMapPinIsVisiblePayload>) => void;
54
54
  setDockedLayerManagerSize: (draft: Draft<WebMapState>, action: PayloadAction<SetDockedLayerManagerSize>) => void;
55
+ setMapPresetError: (draft: Draft<WebMapState>, action: PayloadAction<{
56
+ mapId: string;
57
+ error: string;
58
+ }>) => void;
55
59
  }, "mapReducer">;
56
60
  export declare const mapActions: {
57
61
  setMapPreset: import("@reduxjs/toolkit").ActionCreatorWithPayload<import("./types").SetMapPresetPayload, string>;
@@ -97,5 +101,9 @@ export declare const mapActions: {
97
101
  setDisableMapPin: import("@reduxjs/toolkit").ActionCreatorWithPayload<DisableMapPinPayload, "mapReducer/setDisableMapPin">;
98
102
  toggleMapPinIsVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<ToggleMapPinIsVisiblePayload, "mapReducer/toggleMapPinIsVisible">;
99
103
  setDockedLayerManagerSize: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetDockedLayerManagerSize, "mapReducer/setDockedLayerManagerSize">;
104
+ setMapPresetError: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
105
+ mapId: string;
106
+ error: string;
107
+ }, "mapReducer/setMapPresetError">;
100
108
  };
101
109
  export declare const reducer: import("redux").Reducer<WebMapState, import("redux").AnyAction>;
@@ -264,7 +264,7 @@ export declare const linkedMapAnimationInfo: ((state: CoreAppStore, mapId: strin
264
264
  * @param {string} mapId mapId: string - Id of the map
265
265
  * @returns {string} returnType: string
266
266
  */
267
- export declare const getAnimationStartTime: ((state: any, mapId: any) => string) & import("reselect").OutputSelectorFields<(args_0: WebMap | undefined) => string, {
267
+ export declare const getAnimationStartTime: ((state: any, mapId: any) => string | undefined) & import("reselect").OutputSelectorFields<(args_0: WebMap | undefined) => string | undefined, {
268
268
  clearCache: () => void;
269
269
  }> & {
270
270
  clearCache: () => void;
@@ -277,7 +277,7 @@ export declare const getAnimationStartTime: ((state: any, mapId: any) => string)
277
277
  * @param {string} mapId mapId: string - Id of the map
278
278
  * @returns {string} returnType: string
279
279
  */
280
- export declare const getAnimationEndTime: ((state: any, mapId: any) => string) & import("reselect").OutputSelectorFields<(args_0: WebMap | undefined) => string, {
280
+ export declare const getAnimationEndTime: ((state: any, mapId: any) => string | undefined) & import("reselect").OutputSelectorFields<(args_0: WebMap | undefined) => string | undefined, {
281
281
  clearCache: () => void;
282
282
  }> & {
283
283
  clearCache: () => void;
@@ -298,12 +298,12 @@ export declare const isAutoUpdating: ((state: any, mapId: any) => boolean) & imp
298
298
  /**
299
299
  * Gets if endTime and duration of animationPayload are overriding maxValue and minValue of leading layer
300
300
  *
301
- * Example: isEndTimeOverriding = isEndTimeOverriding(store, 'mapid_1')
301
+ * Example: shouldEndtimeOverride = shouldEndtimeOverride(store, 'mapid_1')
302
302
  * @param {object} store store: object - store object
303
303
  * @param {string} mapId mapId: string - Id of the map
304
304
  * @returns {boolean} returnType: boolean
305
305
  */
306
- export declare const isEndTimeOverriding: ((state: any, mapId: any) => boolean) & import("reselect").OutputSelectorFields<(args_0: WebMap | undefined) => boolean, {
306
+ export declare const shouldEndtimeOverride: ((state: any, mapId: any) => boolean) & import("reselect").OutputSelectorFields<(args_0: WebMap | undefined) => boolean, {
307
307
  clearCache: () => void;
308
308
  }> & {
309
309
  clearCache: () => void;
@@ -647,7 +647,7 @@ export declare const getLegendId: ((state: any, mapId: any) => string | undefine
647
647
  * @param {string} mapId mapId: string - Id of the map
648
648
  * @returns {MapPreset} returnType: MapPreset
649
649
  */
650
- export declare const getMapPreset: ((state: any, mapId: any) => MapPreset) & import("reselect").OutputSelectorFields<(args_0: import("../types").ReduxLayer[], args_1: import("../types").ReduxLayer[], args_2: import("../types").ReduxLayer[], args_3: Bbox, args_4: string, args_5: string | undefined, args_6: string | undefined, args_7: string | undefined, args_8: boolean, args_9: boolean, args_10: boolean | undefined, args_11: boolean | undefined, args_12: boolean | undefined, args_13: number, args_14: number | undefined, args_15: string, args_16: string, args_17: boolean | undefined, args_18: string | undefined, args_19: uiTypes.UIStoreType) => MapPreset, {
650
+ export declare const getMapPreset: ((state: any, mapId: any) => MapPreset) & import("reselect").OutputSelectorFields<(args_0: import("../types").ReduxLayer[], args_1: import("../types").ReduxLayer[], args_2: import("../types").ReduxLayer[], args_3: Bbox, args_4: string, args_5: string | undefined, args_6: string | undefined, args_7: string | undefined, args_8: boolean, args_9: boolean, args_10: boolean | undefined, args_11: boolean | undefined, args_12: boolean | undefined, args_13: number, args_14: number | undefined, args_15: string | undefined, args_16: string | undefined, args_17: boolean | undefined, args_18: string | undefined, args_19: uiTypes.UIStoreType) => MapPreset, {
651
651
  clearCache: () => void;
652
652
  }> & {
653
653
  clearCache: () => void;
@@ -19,7 +19,7 @@ export interface WebMap {
19
19
  animationStartTime?: string;
20
20
  animationEndTime?: string;
21
21
  isAutoUpdating: boolean;
22
- isEndTimeOverriding: boolean;
22
+ shouldEndtimeOverride: boolean;
23
23
  srs: string;
24
24
  bbox: Bbox;
25
25
  mapLayers: string[];
@@ -108,10 +108,10 @@ export interface MoveLayerPayload {
108
108
  newIndex: number;
109
109
  origin: string;
110
110
  }
111
- export type TimeListType = {
111
+ export interface TimeListType {
112
112
  name: string;
113
113
  value: string;
114
- };
114
+ }
115
115
  export interface SetMapAnimationStartPayload {
116
116
  mapId: string;
117
117
  start?: string;
@@ -10,7 +10,7 @@ export interface CreateMapProps {
10
10
  animationStartTime?: string;
11
11
  animationEndTime?: string;
12
12
  isAutoUpdating?: boolean;
13
- isEndTimeOverriding?: boolean;
13
+ shouldEndtimeOverride?: boolean;
14
14
  srs?: string;
15
15
  bbox?: Bbox;
16
16
  mapLayers?: string[];
@@ -34,7 +34,7 @@ export interface CreateMapProps {
34
34
  disableMapPin?: boolean;
35
35
  shouldShowZoomControls?: boolean;
36
36
  }
37
- export declare const createMap: ({ id, isAnimating, animationStartTime, animationEndTime, isAutoUpdating, isEndTimeOverriding, bbox, srs, baseLayers, overLayers, mapLayers, featureLayers, dimensions, autoUpdateLayerId, autoTimeStepLayerId, timeSliderSpan, timeStep, animationDelay, timeSliderWidth, timeSliderCenterTime, timeSliderSecondsPerPx, isTimestepAuto, isTimeSpanAuto, isTimeSliderHoverOn, isTimeSliderVisible, displayMapPin, disableMapPin, shouldShowZoomControls, }: CreateMapProps) => WebMap;
37
+ export declare const createMap: ({ id, isAnimating, animationStartTime, animationEndTime, isAutoUpdating, shouldEndtimeOverride, bbox, srs, baseLayers, overLayers, mapLayers, featureLayers, dimensions, autoUpdateLayerId, autoTimeStepLayerId, timeSliderSpan, timeStep, animationDelay, timeSliderWidth, timeSliderCenterTime, timeSliderSecondsPerPx, isTimestepAuto, isTimeSpanAuto, isTimeSliderHoverOn, isTimeSliderVisible, displayMapPin, disableMapPin, shouldShowZoomControls, }: CreateMapProps) => WebMap;
38
38
  export declare const checkValidLayersPayload: (layers: Layer[], mapId: string) => boolean;
39
39
  /**
40
40
  * This will get the map from the map draftstate.
@@ -6,9 +6,7 @@ export interface InitialService {
6
6
  scope?: ServiceScope;
7
7
  abstract?: string;
8
8
  }
9
- export interface Services {
10
- [key: string]: ReduxService;
11
- }
9
+ export type Services = Record<string, ReduxService>;
12
10
  export type ServiceScope = 'user' | 'system';
13
11
  export interface ReduxService {
14
12
  id?: string;