@opengeoweb/core 2.1.0 → 2.1.4

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 (137) hide show
  1. package/{core.esm.js → index.esm.js} +3442 -1204
  2. package/{core.umd.js → index.umd.js} +3832 -1412
  3. package/lib/components/ComponentsLookUp/componentsLookUp.d.ts +48 -0
  4. package/lib/components/ComponentsLookUp/componentsLookUp.stories.d.ts +7 -0
  5. package/lib/components/ComponentsLookUp/componentsLookup.spec.d.ts +1 -0
  6. package/lib/components/ComponentsLookUp/index.d.ts +1 -0
  7. package/lib/components/ConfigurableConnectedMap/ConfigurableConnectedMap.d.ts +37 -0
  8. package/lib/components/ConfigurableConnectedMap/ConfigurableConnectedMap.spec.d.ts +1 -0
  9. package/lib/components/ConfigurableConnectedMap/ConfigurableConnectedMap.stories.d.ts +6 -0
  10. package/lib/components/ConfigurableConnectedMap/index.d.ts +1 -0
  11. package/lib/components/ConfigurableMapWithSlider/ConfigurableMapWithSliderConnect.d.ts +5 -0
  12. package/lib/components/CustomSwitch/CustomSwitch.d.ts +3 -0
  13. package/lib/components/CustomSwitch/CustomSwitch.spec.d.ts +1 -0
  14. package/lib/components/CustomSwitch/CustomSwitch.stories.d.ts +3 -0
  15. package/lib/components/CustomSwitch/index.d.ts +1 -0
  16. package/lib/components/LayerManager/DescriptionRow/DescriptionRow.d.ts +1 -0
  17. package/lib/components/LayerManager/LayerContainerRow/LayerManagerButton.d.ts +1 -1
  18. package/lib/components/LayerManager/LayerContainerRow/LayerRow/DimensionSelect/DimensionSelect.d.ts +4 -5
  19. package/lib/components/LayerManager/LayerContainerRow/LayerRow/DimensionSelect/DimensionSelectConnect.d.ts +0 -1
  20. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStyles.d.ts +5 -5
  21. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStylesConnect.d.ts +0 -1
  22. package/lib/components/LayerManager/LayerManager.d.ts +2 -0
  23. package/lib/components/LayerManager/LayerManager.stories.d.ts +7 -9
  24. package/lib/components/LayerManager/LayerManagerConnect.d.ts +1 -0
  25. package/lib/components/LayerManager/LayerManagerConnect.stories.d.ts +5 -0
  26. package/lib/components/LayerManager/LayerManagerStories.stories.d.ts +6 -0
  27. package/lib/components/LayerManager/LayerManagerUtils.d.ts +2 -2
  28. package/lib/components/LayerManager/LayerSelect/KeywordFilterButton/KeywordFilterButtonConnect.d.ts +8 -0
  29. package/lib/components/LayerManager/LayerSelect/KeywordFilterButton/KeywordFilterButtonConnect.spec.d.ts +1 -0
  30. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResults.d.ts +16 -0
  31. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResults.spec.d.ts +1 -0
  32. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResults.stories.d.ts +13 -0
  33. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsConnect.d.ts +7 -0
  34. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsListItem.d.ts +10 -0
  35. package/lib/components/LayerManager/LayerSelect/KeywordFilterResults/KeywordFilterResultsListItem.spec.d.ts +1 -0
  36. package/lib/components/LayerManager/LayerSelect/LayerList/LayerList.d.ts +10 -0
  37. package/lib/components/LayerManager/LayerSelect/LayerList/LayerList.spec.d.ts +1 -0
  38. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListConnect.d.ts +6 -0
  39. package/lib/components/LayerManager/LayerSelect/LayerList/LayerListConnect.spec.d.ts +1 -0
  40. package/lib/components/LayerManager/LayerSelect/LayerSelect.stories.d.ts +7 -7
  41. package/lib/components/LayerManager/LayerSelect/LayerSelectConnect.d.ts +2 -0
  42. package/lib/components/LayerManager/LayerSelect/LayerSelectConnect.stories.d.ts +3 -0
  43. package/lib/components/LayerManager/LayerSelect/LayerSelectStories.stories.d.ts +6 -0
  44. package/lib/components/LayerManager/LayerSelect/SearchField/SearchField.d.ts +7 -0
  45. package/lib/components/LayerManager/LayerSelect/SearchField/SearchField.spec.d.ts +1 -0
  46. package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldButtonContainer.d.ts +8 -0
  47. package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldButtonContainer.spec.d.ts +1 -0
  48. package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldConnect.d.ts +3 -0
  49. package/lib/components/LayerManager/LayerSelect/SearchField/SearchFieldConnect.spec.d.ts +1 -0
  50. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChip.d.ts +10 -0
  51. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChip.spec.d.ts +1 -0
  52. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.d.ts +9 -0
  53. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceChipConnect.spec.d.ts +1 -0
  54. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceList.d.ts +10 -0
  55. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceList.spec.d.ts +1 -0
  56. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceListConnect.d.ts +6 -0
  57. package/lib/components/LayerManager/LayerSelect/ServiceList/ServiceListConnect.spec.d.ts +1 -0
  58. package/lib/components/LayerManager/LayerSelect/ServiceOptionsButton/ServiceOptionsButton.d.ts +3 -0
  59. package/lib/components/LayerManager/LayerSelect/ServiceOptionsButton/ServiceOptionsButton.spec.d.ts +1 -0
  60. package/lib/components/LayerManager/LayerSelect/ServiceOptionsButton/ServiceOptionsButton.stories.d.ts +7 -0
  61. package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +6 -0
  62. package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.spec.d.ts +1 -0
  63. package/lib/components/LayerManager/LayerSelect/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +13 -0
  64. package/lib/components/LayerManager/LayerSelect/ServicePopup/ServicePopup.d.ts +3 -1
  65. package/lib/components/LayerManager/tooltipContainerStyles.d.ts +1 -1
  66. package/lib/components/Legend/LegendConnect.d.ts +3 -0
  67. package/lib/components/Legend/LegendDialog.d.ts +2 -0
  68. package/lib/components/Legend/LegendMapButtonConnect.d.ts +2 -0
  69. package/lib/components/MapView/MapView.Error.stories.d.ts +4 -0
  70. package/lib/components/MapView/{MapView.MapCursor.stories.d.ts → MapView.MapPin.stories.d.ts} +1 -1
  71. package/lib/components/MapView/MapView.ShowLayerInfo.stories.d.ts +5 -0
  72. package/lib/components/MapView/MapView.stories.d.ts +2 -1
  73. package/lib/components/MapView/MapViewConnect.LayerChangeEnabledOpacity.stories.d.ts +7 -0
  74. package/lib/components/MapView/MapViewConnect.MapPin.stories.d.ts +5 -0
  75. package/lib/components/MapView/MapViewConnect.d.ts +7 -3
  76. package/lib/components/MapView/MapViewConnect.stories.d.ts +1 -0
  77. package/lib/components/Mapcontrols/MapControlButton.d.ts +1 -1
  78. package/lib/components/MultiMapDimensionSelect/DimensionSelectButtonConnect.d.ts +2 -0
  79. package/lib/components/MultiMapDimensionSelect/DimensionSelectDialogConnect.d.ts +2 -0
  80. package/lib/components/MultiMapDimensionSelect/DimensionSelectDialogConnect.stories.d.ts +25 -0
  81. package/lib/components/MultiMapDimensionSelect/MultiDimensionSelect.stories.d.ts +1 -0
  82. package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectConfig.d.ts +1 -1
  83. package/lib/components/MultiMapDimensionSelect/MultiDimensionSelectMapButtonsConnect.d.ts +2 -0
  84. package/lib/components/MultiMapView/MultiMapView.stories.d.ts +2 -0
  85. package/lib/components/MultiMapView/MultiMapView10x10.stories.d.ts +2 -0
  86. package/lib/components/MultiMapView/MultiMapViewConnect.d.ts +1 -1
  87. package/lib/components/Providers/Providers.d.ts +1 -1
  88. package/lib/components/ReactMapView/ReactMapView.d.ts +8 -9
  89. package/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +2 -2
  90. package/lib/components/ReactMapView/types.d.ts +6 -17
  91. package/lib/components/TimeSlider/TimeSliderButtons/PlayButton/PlayButtonConnect.d.ts +3 -3
  92. package/lib/components/TimeSlider/TimeSliderButtons/SpeedButton/SpeedButton.d.ts +0 -2
  93. package/lib/components/TimeSlider/TimeSliderLegend/TimeSliderLegendRenderFunctions.d.ts +1 -1
  94. package/lib/components/TimeSlider/TimeSliderRail/TimeSliderRail.d.ts +4 -4
  95. package/lib/components/TimeSlider/TimeSliderRail/TimeSliderRailRenderFunctions.d.ts +1 -1
  96. package/lib/components/TimeSlider/TimeSliderUtils.d.ts +10 -1
  97. package/lib/components/ToggleIconButton/ToggleIconButton.d.ts +6 -3
  98. package/lib/components/TooltipSelect/TooltipSelect.d.ts +2 -2
  99. package/lib/index.d.ts +2 -1
  100. package/lib/store/coreModuleConfig.d.ts +1 -1
  101. package/lib/store/layerSelect/actions.d.ts +30 -0
  102. package/lib/store/layerSelect/config.d.ts +4 -0
  103. package/lib/store/layerSelect/constants.d.ts +5 -0
  104. package/lib/store/layerSelect/reducer.d.ts +3 -0
  105. package/lib/store/layerSelect/reducer.spec.d.ts +1 -0
  106. package/lib/store/layerSelect/sagas.d.ts +6 -0
  107. package/lib/store/layerSelect/sagas.spec.d.ts +1 -0
  108. package/lib/store/layerSelect/selectors.d.ts +34 -0
  109. package/lib/store/layerSelect/selectors.spec.d.ts +1 -0
  110. package/lib/store/layerSelect/types.d.ts +61 -0
  111. package/lib/store/mapStore/layers/actions.d.ts +2 -1
  112. package/lib/store/mapStore/layers/constants.d.ts +1 -0
  113. package/lib/store/mapStore/layers/selectors.d.ts +14 -5
  114. package/lib/store/mapStore/layers/types.d.ts +44 -20
  115. package/lib/store/mapStore/map/actions.d.ts +12 -5
  116. package/lib/store/mapStore/map/constants.d.ts +1 -0
  117. package/lib/store/mapStore/map/reducer.d.ts +7 -0
  118. package/lib/store/mapStore/map/sagas.d.ts +2 -2
  119. package/lib/store/mapStore/map/selectors.d.ts +20 -12
  120. package/lib/store/mapStore/map/types.d.ts +19 -7
  121. package/lib/store/mapStore/service/actions.d.ts +1 -8
  122. package/lib/store/mapStore/service/constants.d.ts +0 -1
  123. package/lib/store/mapStore/service/selectors.d.ts +35 -5
  124. package/lib/store/mapStore/service/types.d.ts +12 -16
  125. package/lib/store/mapStore/utils/helpers.d.ts +4 -3
  126. package/lib/store/ui/actions.d.ts +2 -2
  127. package/lib/store/ui/types.d.ts +2 -1
  128. package/lib/storybookUtils/HelperComponents.d.ts +1 -1
  129. package/lib/storybookUtils/storyComponents/MapDrawGeoJSON.d.ts +5 -5
  130. package/lib/storybookUtils/storyComponents/MapDrawGeoJSONStyles.d.ts +2 -1
  131. package/lib/types/types.d.ts +2 -1
  132. package/lib/utils/__mocks__/WMS111GetCapabilitiesGeoServicesRADAR.d.ts +2 -0
  133. package/lib/utils/defaultTestSettings.d.ts +69 -190
  134. package/lib/utils/getCapabilities.d.ts +6 -0
  135. package/lib/utils/testUtils.d.ts +2 -2
  136. package/package.json +14 -15
  137. package/lib/components/SyncGroups/ConfigurableConnectedMap.d.ts +0 -19
@@ -13,3 +13,4 @@ export declare const WEBMAP_SET_BASELAYERS = "WEBMAP_SET_BASELAYERS";
13
13
  export declare const WEBMAP_ADD_BASELAYER = "WEBMAP_ADD_BASELAYER";
14
14
  export declare const WEBMAP_ADD_AVAILABLE_BASELAYER = "WEBMAP_ADD_AVAILABLE_BASELAYER";
15
15
  export declare const WEBMAP_ADD_AVAILABLE_BASELAYERS = "WEBMAP_ADD_AVAILABLE_BASELAYERS";
16
+ export declare const WEBMAP_UPDATE_LAYER_INFO = "WEBMAP_UPDATE_LAYER_INFO";
@@ -17,7 +17,7 @@ export declare const getLayerById: (store: AppStore, layerId: string) => Layer;
17
17
  * @param {object} store store: object - object from which the layers state will be extracted
18
18
  * @returns {object} returnType: object - an object of all layers containing layer information (service, name, style, enabled etc.) indexed by layerId
19
19
  */
20
- export declare const getLayersById: import("reselect").OutputSelector<AppStore, Record<string, Layer>, (res: LayerState) => Record<string, Layer>>;
20
+ export declare const getLayersById: import("reselect").OutputSelector<AppStore, Record<string, import("./types").ReduxLayer>, (res: LayerState) => Record<string, import("./types").ReduxLayer>>;
21
21
  /**
22
22
  * Retrieves all layerIds
23
23
  *
@@ -33,7 +33,7 @@ export declare const getLayersIds: import("reselect").OutputSelector<AppStore, s
33
33
  * @param {object} store store: object - object from which the layers state will be extracted
34
34
  * @returns {array} returnType: array - an array of all layers containing layer information (service, name, style, enabled etc.)
35
35
  */
36
- export declare const getAllLayers: import("reselect").OutputSelector<AppStore, Layer[], (res1: string[], res2: Record<string, Layer>) => Layer[]>;
36
+ export declare const getAllLayers: import("reselect").OutputSelector<AppStore, import("./types").ReduxLayer[], (res1: string[], res2: Record<string, import("./types").ReduxLayer>) => import("./types").ReduxLayer[]>;
37
37
  /**
38
38
  * Retrieves all layers that aren't base layers and aren't overlayers
39
39
  *
@@ -41,7 +41,7 @@ export declare const getAllLayers: import("reselect").OutputSelector<AppStore, L
41
41
  * @param {object} store store: object - object from which the layers state will be extracted
42
42
  * @returns {array} returnType: array - an array of all non-baselayers containing layer information (service, name, style, enabled etc.)
43
43
  */
44
- export declare const getLayers: import("reselect").OutputSelector<AppStore, Layer[], (res: Layer[]) => Layer[]>;
44
+ export declare const getLayers: import("reselect").OutputSelector<AppStore, import("./types").ReduxLayer[], (res: import("./types").ReduxLayer[]) => import("./types").ReduxLayer[]>;
45
45
  /**
46
46
  * Retrieves all baselayers
47
47
  *
@@ -49,7 +49,7 @@ export declare const getLayers: import("reselect").OutputSelector<AppStore, Laye
49
49
  * @param {object} store store: object - object from which the layers state will be extracted
50
50
  * @returns {array} returnType: array - an array of all baselayers containing layer information (service, name, style, enabled etc.)
51
51
  */
52
- export declare const getBaseLayers: import("reselect").OutputSelector<AppStore, Layer[], (res: Layer[]) => Layer[]>;
52
+ export declare const getBaseLayers: import("reselect").OutputSelector<AppStore, import("./types").ReduxLayer[], (res: import("./types").ReduxLayer[]) => import("./types").ReduxLayer[]>;
53
53
  /**
54
54
  * Retrieves all overLayers
55
55
  *
@@ -57,7 +57,7 @@ export declare const getBaseLayers: import("reselect").OutputSelector<AppStore,
57
57
  * @param {object} store store: object - object from which the layers state will be extracted
58
58
  * @returns {array} returnType: array - an array of all overLayers containing layer information (service, name, style, enabled etc.)
59
59
  */
60
- export declare const getOverLayers: import("reselect").OutputSelector<AppStore, Layer[], (res: Layer[]) => Layer[]>;
60
+ export declare const getOverLayers: import("reselect").OutputSelector<AppStore, import("./types").ReduxLayer[], (res: import("./types").ReduxLayer[]) => import("./types").ReduxLayer[]>;
61
61
  /**
62
62
  * Gets dimensions of the passed layer
63
63
  *
@@ -131,6 +131,15 @@ export declare const getLayerName: import("reselect").OutputParametricSelector<A
131
131
  * @returns {string} returnType: string - layer service
132
132
  */
133
133
  export declare const getLayerService: import("reselect").OutputParametricSelector<AppStore, string, string, (res: Layer) => string>;
134
+ /**
135
+ * Gets selected style of the passed layer
136
+ *
137
+ * Example: layerStyle = getLayerStyle(store, 'layerId_1')
138
+ * @param {object} store store: object - object from which the layers state will be extracted
139
+ * @param {string} layerId layerId: string - Id of the layer
140
+ * @returns {string} returnType: string - style that is currently selected
141
+ */
142
+ export declare const getLayerStyle: import("reselect").OutputParametricSelector<AppStore, string, string, (res: Layer) => string>;
134
143
  /**
135
144
  * Gets layer status
136
145
  *
@@ -1,6 +1,8 @@
1
1
  import { Action } from 'redux';
2
- import { WEBMAP_LAYER_CHANGE_OPACITY, WEBMAP_LAYER_CHANGE_NAME, WEBMAP_LAYER_CHANGE_STYLE, WEBMAP_LAYER_CHANGE_DIMENSION, WEBMAP_LAYER_CHANGE_ENABLED, WEBMAP_LAYER_DELETE, WEBMAP_ADD_LAYER, WEBMAP_SET_LAYERS, WEBMAP_SET_BASELAYERS, WEBMAP_ADD_BASELAYER, WEBMAP_BASELAYER_DELETE, WEBMAP_LAYER_ERROR, WEBMAP_ADD_AVAILABLE_BASELAYER, WEBMAP_ADD_AVAILABLE_BASELAYERS, WEBMAP_LAYER_SET_DIMENSIONS } from './constants';
3
- import { Dimension } from '../map/types';
2
+ import { Style } from '@opengeoweb/webmap';
3
+ import { Dimension, UpdateAllMapDimensionsPayload } from '../map/types';
4
+ import { WEBMAP_LAYER_CHANGE_OPACITY, WEBMAP_LAYER_CHANGE_NAME, WEBMAP_LAYER_CHANGE_STYLE, WEBMAP_LAYER_CHANGE_DIMENSION, WEBMAP_LAYER_CHANGE_ENABLED, WEBMAP_LAYER_DELETE, WEBMAP_ADD_LAYER, WEBMAP_SET_LAYERS, WEBMAP_SET_BASELAYERS, WEBMAP_ADD_BASELAYER, WEBMAP_BASELAYER_DELETE, WEBMAP_LAYER_ERROR, WEBMAP_ADD_AVAILABLE_BASELAYER, WEBMAP_ADD_AVAILABLE_BASELAYERS, WEBMAP_LAYER_SET_DIMENSIONS, WEBMAP_UPDATE_LAYER_INFO } from './constants';
5
+ import type { SetLayersForServicePayload } from '../types';
4
6
  export interface WMJSDimension {
5
7
  getFirstValue(): string;
6
8
  getLastValue(): string;
@@ -25,28 +27,39 @@ export declare enum LayerStatus {
25
27
  default = "default",
26
28
  error = "error"
27
29
  }
28
- export interface Layer {
30
+ /**
31
+ * ReduxLayer is used to reflect the shape of the layer in the redux layers store.
32
+ * It is a subset of Layer since some properties like the styles list now come from the service store.
33
+ */
34
+ export interface ReduxLayer {
29
35
  id?: string;
30
36
  mapId?: string;
31
37
  service?: string;
32
38
  name?: string;
33
- format?: string;
39
+ title?: string;
34
40
  enabled?: boolean;
35
41
  style?: string;
36
42
  dimensions?: Dimension[];
37
43
  opacity?: number;
38
- headers?: Headers[];
39
44
  type?: string;
40
45
  layerType?: LayerType;
41
- geojson?: GeoJSON.FeatureCollection;
42
46
  status?: LayerStatus;
47
+ format?: string;
48
+ }
49
+ /**
50
+ * Layer is used to define a layer with all its possible properties.
51
+ */
52
+ export interface Layer extends ReduxLayer {
53
+ styles?: Style[];
54
+ geojson?: GeoJSON.FeatureCollection;
55
+ headers?: Headers[];
43
56
  }
44
57
  export interface AvailableBaseLayersType {
45
- byId: Record<string, Layer>;
58
+ byId: Record<string, ReduxLayer>;
46
59
  allIds: string[];
47
60
  }
48
61
  export interface LayerState {
49
- byId: Record<string, Layer>;
62
+ byId: Record<string, ReduxLayer>;
50
63
  allIds: string[];
51
64
  availableBaseLayers: AvailableBaseLayersType;
52
65
  }
@@ -56,7 +69,7 @@ export interface LayerPayload {
56
69
  }
57
70
  export interface SetLayersPayload {
58
71
  mapId: string;
59
- layers: Layer[];
72
+ layers: ReduxLayer[];
60
73
  origin?: string;
61
74
  }
62
75
  export interface SetLayers extends Action {
@@ -65,13 +78,21 @@ export interface SetLayers extends Action {
65
78
  }
66
79
  export interface SetBaseLayersPayload {
67
80
  mapId: string;
68
- layers: Layer[];
81
+ layers: ReduxLayer[];
69
82
  origin?: string;
70
83
  }
71
84
  export interface SetBaseLayers extends Action {
72
85
  type: typeof WEBMAP_SET_BASELAYERS;
73
86
  payload: SetBaseLayersPayload;
74
87
  }
88
+ export interface SetLayerDimensionsPayload extends LayerPayload {
89
+ origin: string;
90
+ dimensions: Dimension[];
91
+ }
92
+ export interface SetLayerDimensions extends Action {
93
+ type: typeof WEBMAP_LAYER_SET_DIMENSIONS;
94
+ payload: SetLayerDimensionsPayload;
95
+ }
75
96
  export interface SetLayerOpacityPayload extends LayerPayload {
76
97
  opacity: number;
77
98
  }
@@ -98,18 +119,10 @@ export interface SetLayerDimensionPayload extends LayerPayload {
98
119
  dimension: Dimension;
99
120
  service?: string;
100
121
  }
101
- export interface SetLayerDimensionsPayload extends LayerPayload {
102
- origin: string;
103
- dimensions: Dimension[];
104
- }
105
122
  export interface SetLayerDimension extends Action {
106
123
  type: typeof WEBMAP_LAYER_CHANGE_DIMENSION;
107
124
  payload: SetLayerDimensionPayload;
108
125
  }
109
- export interface SetLayerDimensions extends Action {
110
- type: typeof WEBMAP_LAYER_SET_DIMENSIONS;
111
- payload: SetLayerDimensionsPayload;
112
- }
113
126
  export interface SetLayerStylePayload extends LayerPayload {
114
127
  style: string;
115
128
  }
@@ -162,7 +175,7 @@ export interface AddAvailableBaseLayers extends Action {
162
175
  payload: AddAvailableBaseLayersPayload;
163
176
  }
164
177
  export interface AddAvailableBaseLayersPayload {
165
- layers: Layer[];
178
+ layers: ReduxLayer[];
166
179
  origin?: string;
167
180
  }
168
181
  export interface ErrorLayerPayload extends LayerPayload {
@@ -172,4 +185,15 @@ export interface ErrorLayer extends Action {
172
185
  type: typeof WEBMAP_LAYER_ERROR;
173
186
  payload: ErrorLayerPayload;
174
187
  }
175
- export declare type LayerActions = SetLayerOpacity | SetLayerEnabled | SetLayerDimension | SetLayerDimensions | SetLayerName | SetLayerStyle | DeleteLayer | DeleteBaseLayer | AddLayer | SetLayers | SetBaseLayers | AddBaseLayer | ErrorLayer | AddAvailableBaseLayer | AddAvailableBaseLayers;
188
+ export interface UpdateLayerInfoPayload {
189
+ origin?: string;
190
+ mapDimensions?: UpdateAllMapDimensionsPayload;
191
+ layerStyle?: SetLayerStylePayload;
192
+ layerDimensions?: SetLayerDimensionsPayload;
193
+ serviceLayers?: SetLayersForServicePayload;
194
+ }
195
+ export interface UpdateLayerInfo extends Action {
196
+ type: typeof WEBMAP_UPDATE_LAYER_INFO;
197
+ payload: UpdateLayerInfoPayload;
198
+ }
199
+ export declare type LayerActions = SetLayerDimensions | SetLayerOpacity | SetLayerEnabled | SetLayerDimension | SetLayerStyle | SetLayerName | DeleteLayer | DeleteBaseLayer | AddLayer | SetLayers | SetBaseLayers | AddBaseLayer | ErrorLayer | AddAvailableBaseLayer | AddAvailableBaseLayers | UpdateLayerInfo;
@@ -1,4 +1,4 @@
1
- import { MapActions, SetBboxPayload, MoveLayerPayload, SetMapDimensionPayload, UpdateAllMapDimensionsPayload, SetMapAnimationStartPayload, SetMapAnimationStopPayload, SetActiveLayerIdPayload, MoveLayer, SetActiveLayerId, ToggleAutoUpdatePayload, ToggleAutoUpdate, ToggleLoopPayload, ToggleLoop, SetTimeSliderScalePayload, SetTimeStepPayload, SetAnimationDelayPayload, SetAnimationStartTimePayload, SetAnimationEndTimePayload, ToggleTimestepAutoPayload, ToggleTimestepAuto, ToggleTimeSliderHoverPayload, ToggleTimeSliderHover, SetTimeSliderCenterTimePayload, SetTimeSliderSecondsPerPxPayload, SetTimeSliderDataScaleToSecondsPerPxPayload } from './types';
1
+ import { MapActions, SetBboxPayload, MoveLayerPayload, SetMapDimensionPayload, UpdateAllMapDimensionsPayload, SetMapAnimationStartPayload, SetMapAnimationStopPayload, SetActiveLayerIdPayload, MoveLayer, SetActiveLayerId, ToggleAutoUpdatePayload, ToggleAutoUpdate, ToggleLoopPayload, ToggleLoop, SetTimeSliderScalePayload, SetTimeStepPayload, SetAnimationDelayPayload, SetAnimationStartTimePayload, SetAnimationEndTimePayload, ToggleTimestepAutoPayload, ToggleTimestepAuto, ToggleTimeSliderHoverPayload, ToggleTimeSliderHover, SetTimeSliderCenterTimePayload, SetTimeSliderSecondsPerPxPayload, SetTimeSliderDataScaleToSecondsPerPxPayload, MapPinLocationPayload } from './types';
2
2
  /**
3
3
  * Registers the map in the store and creates the map state
4
4
  *
@@ -38,8 +38,8 @@ export declare const mapUpdateAllMapDimensions: (payload: UpdateAllMapDimensions
38
38
  /**
39
39
  * Starts the animation for a map.
40
40
  *
41
- * Example: mapStartAnimation({mapId:'mapId1', start: 'someISOTime', end: 'someISOTime', interval: 1000})
42
- * @param {object} payload Object with mapId: string, start: Moment, end: Moment and interval: number (in seconds), timeList?: TimeListType[]
41
+ * Example: mapStartAnimation({mapId:'mapId1', start: 'someISOTime', end: 'someISOTime', interval: 15})
42
+ * @param {object} payload Object with mapId: string, start: string, end: string and interval: number (in minutes), timeList?: TimeListType[]
43
43
  */
44
44
  export declare const mapStartAnimation: (payload: SetMapAnimationStartPayload) => MapActions;
45
45
  /**
@@ -102,14 +102,14 @@ export declare const setAnimationDelay: (payload: SetAnimationDelayPayload) => M
102
102
  *Sets the animation start time with id for a map
103
103
  *
104
104
  * Example: setAnimationStartTime({ mapId: 'mapId1'})
105
- * @param {object} payload object with mapId: string, animationStartTime: Moment
105
+ * @param {object} payload object with mapId: string, animationStartTime: string
106
106
  */
107
107
  export declare const setAnimationStartTime: (payload: SetAnimationStartTimePayload) => MapActions;
108
108
  /**
109
109
  *Sets the animation end time with id for a map
110
110
  *
111
111
  * Example: setAnimationEndTime({ mapId: 'mapId1'})
112
- * @param {object} payload object with mapId: string, animationEndTime: Moment
112
+ * @param {object} payload object with mapId: string, animationEndTime: string
113
113
  */
114
114
  export declare const setAnimationEndTime: (payload: SetAnimationEndTimePayload) => MapActions;
115
115
  /**
@@ -147,3 +147,10 @@ export declare const setTimeSliderSecondsPerPx: (payload: SetTimeSliderSecondsPe
147
147
  * @param {object} payload object with mapId: string, timeSliderDataScaleSecondsToPerPx: number
148
148
  */
149
149
  export declare const setTimeSliderDataScaleToSecondsPerPx: (payload: SetTimeSliderDataScaleToSecondsPerPxPayload) => MapActions;
150
+ /**
151
+ * Sets current curser location for a map to display the point marker
152
+ *
153
+ * Example: setMapPinLocation({ mapId: 'mapId1', mapPinLocation: {lon: 1.2, lat: 3.4} })
154
+ * @param {object} payload object with mapId: string, mapPinLocation: MapLocation
155
+ */
156
+ export declare const setMapPinLocation: (payload: MapPinLocationPayload) => MapActions;
@@ -19,3 +19,4 @@ export declare const WEBMAP_TOGGLE_TIME_SLIDER_HOVER = "WEBMAP_TOGGLE_TIME_SLIDE
19
19
  export declare const WEBMAP_SET_TIME_SLIDER_CENTER_TIME = "WEBMAP_SET_TIME_SLIDER_CENTER_TIME";
20
20
  export declare const WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX = "WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX";
21
21
  export declare const WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX = "WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX";
22
+ export declare const WEBMAP_SET_PIN = "WEBMAP_SET_PIN";
@@ -1,5 +1,12 @@
1
1
  import { WebMapState, MapActions } from './types';
2
2
  import { LayerActions } from '../layers/types';
3
3
  import { GenericSyncActions } from '../../generic/synchronizationActions/types';
4
+ /**
5
+ * Checks if the layer id is already taken in one of the maps.
6
+ * @param state The WebMapState
7
+ * @param layerIdToCheck The layerId to check
8
+ * @returns true if the layerId is already taken somewhere else.
9
+ */
10
+ export declare const checkIfMapLayerIdIsAlreadyTaken: (state: WebMapState, layerId: string) => boolean;
4
11
  export declare const initialState: WebMapState;
5
12
  export declare const reducer: (state: WebMapState, action: MapActions | LayerActions | GenericSyncActions) => WebMapState;
@@ -1,7 +1,7 @@
1
1
  import { SagaIterator } from 'redux-saga';
2
2
  import { Moment } from 'moment';
3
3
  import { SetMapAnimationStop, SetMapAnimationStart, ToggleAutoUpdate } from './types';
4
- import { DeleteLayer, SetLayerDimensions } from '../layers/types';
4
+ import { DeleteLayer, UpdateLayerInfo } from '../layers/types';
5
5
  export declare const generateTimeList: (start: Moment, end: Moment, interval: number) => {
6
6
  name: string;
7
7
  value: string;
@@ -11,7 +11,7 @@ export declare function startAnimationSaga({ payload, }: SetMapAnimationStart):
11
11
  export declare function stopAnimationSaga({ payload, }: SetMapAnimationStop): Generator;
12
12
  export declare function deleteLayerSaga({ payload }: DeleteLayer): SagaIterator;
13
13
  export declare function updateAnimation(mapId: string, maxValue: string): SagaIterator;
14
- export declare function setLayerDimensionsSaga({ payload, }: SetLayerDimensions): SagaIterator;
14
+ export declare function setLayerDimensionsSaga({ payload, }: UpdateLayerInfo): SagaIterator;
15
15
  export declare function toggleAutoUpdateSaga({ payload, }: ToggleAutoUpdate): SagaIterator;
16
16
  export declare function rootSaga(): SagaIterator;
17
17
  export default rootSaga;
@@ -1,4 +1,3 @@
1
- import moment from 'moment';
2
1
  import { Scale, WebMap, WebMapState } from './types';
3
2
  import { AppStore } from '../../../types/types';
4
3
  import { Layer } from '../types';
@@ -60,7 +59,7 @@ export declare const getLayerIds: import("reselect").OutputParametricSelector<Ap
60
59
  * @param {string} mapId mapId: string - Id of the map
61
60
  * @returns {array} returnType: array - array containing all layer states for the map
62
61
  */
63
- export declare const getMapLayers: import("reselect").OutputParametricSelector<AppStore, string, Layer[], (res1: string[], res2: Record<string, Layer>) => Layer[]>;
62
+ export declare const getMapLayers: import("reselect").OutputParametricSelector<AppStore, string, import("../types").ReduxLayer[], (res1: string[], res2: Record<string, import("../types").ReduxLayer>) => import("../types").ReduxLayer[]>;
64
63
  /**
65
64
  * Gets an array of baselayers ids for a map
66
65
  *
@@ -78,7 +77,7 @@ export declare const getMapBaseLayersIds: import("reselect").OutputParametricSel
78
77
  * @param {string} mapId mapId: string - Id of the map
79
78
  * @returns {array} returnType: array - array containing all baselayers for the map
80
79
  */
81
- export declare const getMapBaseLayers: import("reselect").OutputParametricSelector<AppStore, string, Layer[], (res1: string[], res2: Record<string, Layer>) => Layer[]>;
80
+ export declare const getMapBaseLayers: import("reselect").OutputParametricSelector<AppStore, string, import("../types").ReduxLayer[], (res1: string[], res2: Record<string, import("../types").ReduxLayer>) => import("../types").ReduxLayer[]>;
82
81
  /**
83
82
  * Gets and array of overLayers ids for a map
84
83
  *
@@ -96,7 +95,7 @@ export declare const getMapOverLayersIds: import("reselect").OutputParametricSel
96
95
  * @param {string} mapId mapId: string - Id of the map
97
96
  * @returns {array} returnType: array - array containing all overLayers for the map
98
97
  */
99
- export declare const getMapOverLayers: import("reselect").OutputParametricSelector<AppStore, string, Layer[], (res1: string[], res2: Record<string, Layer>) => Layer[]>;
98
+ export declare const getMapOverLayers: import("reselect").OutputParametricSelector<AppStore, string, import("../types").ReduxLayer[], (res1: string[], res2: Record<string, import("../types").ReduxLayer>) => import("../types").ReduxLayer[]>;
100
99
  /**
101
100
  * Gets map dimensions
102
101
  *
@@ -149,18 +148,18 @@ export declare const isAnimating: import("reselect").OutputParametricSelector<Ap
149
148
  * Example: endTimeOfAnimetion = getAnimationStartTime(store, 'mapid_1')
150
149
  * @param {object} store store: object - store object
151
150
  * @param {string} mapId mapId: string - Id of the map
152
- * @returns {moment} returnType: Moment
151
+ * @returns {string} returnType: string
153
152
  */
154
- export declare const getAnimationStartTime: import("reselect").OutputParametricSelector<AppStore, string, moment.Moment, (res: WebMap) => moment.Moment>;
153
+ export declare const getAnimationStartTime: import("reselect").OutputParametricSelector<AppStore, string, string, (res: WebMap) => string>;
155
154
  /**
156
155
  * Gets end time of animation
157
156
  *
158
- * Example: endTimeOfAnimetion = getAnimationEndTime(store, 'mapid_1')
157
+ * Example: endTimeOfAnimation = getAnimationEndTime(store, 'mapid_1')
159
158
  * @param {object} store store: object - store object
160
159
  * @param {string} mapId mapId: string - Id of the map
161
- * @returns {moment} returnType: Moment
160
+ * @returns {string} returnType: string
162
161
  */
163
- export declare const getAnimationEndTime: import("reselect").OutputParametricSelector<AppStore, string, moment.Moment, (res: WebMap) => moment.Moment>;
162
+ export declare const getAnimationEndTime: import("reselect").OutputParametricSelector<AppStore, string, string, (res: WebMap) => string>;
164
163
  /**
165
164
  * Returns map is auto updating
166
165
  *
@@ -287,7 +286,7 @@ export declare const getMapIdFromLayerId: import("reselect").OutputParametricSel
287
286
  * @param {string} layerId layerId: string - Id of the layer
288
287
  * @returns {string} returnType: the layerId, or null if not found
289
288
  */
290
- export declare const getLayerIdByLayerName: import("reselect").OutputParametricSelector<AppStore, string, string, (res1: Layer[], res2: string) => string>;
289
+ export declare const getLayerIdByLayerName: import("reselect").OutputParametricSelector<AppStore, string, string, (res1: import("../types").ReduxLayer[], res2: string) => string>;
291
290
  /**
292
291
  * Returns the layerIndex in the map for given layerId
293
292
  *
@@ -297,7 +296,7 @@ export declare const getLayerIdByLayerName: import("reselect").OutputParametricS
297
296
  * @param {string} layerId layerId: string - Id of the layer
298
297
  * @returns {number} returnType: index number or -1 if not found
299
298
  */
300
- export declare const getLayerIndexByLayerId: import("reselect").OutputParametricSelector<AppStore, string, number, (res1: Layer[], res2: string) => number>;
299
+ export declare const getLayerIndexByLayerId: import("reselect").OutputParametricSelector<AppStore, string, number, (res1: import("../types").ReduxLayer[], res2: string) => number>;
301
300
  /**
302
301
  * Returns the Layer in the map for given layerIndex
303
302
  *
@@ -307,7 +306,7 @@ export declare const getLayerIndexByLayerId: import("reselect").OutputParametric
307
306
  * @param {number} layerIndex layerId: number - Index of the layer in the map
308
307
  * @returns {object} returnType: layer, or null if not found
309
308
  */
310
- export declare const getLayerByLayerIndex: import("reselect").OutputParametricSelector<AppStore, string, Layer, (res1: Layer[], res2: number) => Layer>;
309
+ export declare const getLayerByLayerIndex: import("reselect").OutputParametricSelector<AppStore, string, Layer, (res1: import("../types").ReduxLayer[], res2: number) => Layer>;
311
310
  /**
312
311
  * Returns name of all unique dimensions present in all maps
313
312
  *
@@ -316,3 +315,12 @@ export declare const getLayerByLayerIndex: import("reselect").OutputParametricSe
316
315
  * @returns {array} returnType: array of dimension names
317
316
  */
318
317
  export declare const getAllUniqueDimensions: import("reselect").OutputSelector<AppStore, string[], (res1: string[], res2: AppStore) => string[]>;
318
+ /**
319
+ * Returns the mapPinLocation for the current map
320
+ *
321
+ * Example getAllUniqueDimensions(store);
322
+ * @param {object} store store: object - store object
323
+ * @param {string} mapId mapId: string - Id of the map
324
+ * @returns {object} returnType: latitude and longitude of pin
325
+ */
326
+ export declare const getPinLocation: import("reselect").OutputParametricSelector<AppStore, string, import("./types").MapLocation, (res: WebMap) => import("./types").MapLocation>;
@@ -1,7 +1,6 @@
1
1
  import { DateInterval } from '@opengeoweb/webmap';
2
- import { Moment } from 'moment';
3
2
  import { Action } from 'redux';
4
- import { WEBMAP_LAYER_MOVE, WEBMAP_SET_BBOX, WEBMAP_MAP_UPDATE_ALL_DIMENSIONS, WEBMAP_MAP_CHANGE_DIMENSION, WEBMAP_START_ANIMATION, WEBMAP_STOP_ANIMATION, WEBMAP_REGISTER_MAP, WEBMAP_UNREGISTER_MAP, WEBMAP_SET_ACTIVELAYERID, WEBMAP_TOGGLE_AUTO_UPDATE, WEBMAP_TOGGLE_LOOP, WEBMAP_SET_TIME_SLIDER_SCALE, WEBMAP_SET_TIME_STEP, WEBMAP_SET_ANIMATION_DELAY, WEBMAP_SET_ANIMATION_START_TIME, WEBMAP_SET_ANIMATION_END_TIME, WEBMAP_TOGGLE_TIMESTEP_AUTO, WEBMAP_TOGGLE_TIME_SLIDER_HOVER, WEBMAP_SET_TIME_SLIDER_CENTER_TIME, WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX, WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX } from './constants';
3
+ import { WEBMAP_LAYER_MOVE, WEBMAP_SET_BBOX, WEBMAP_MAP_UPDATE_ALL_DIMENSIONS, WEBMAP_MAP_CHANGE_DIMENSION, WEBMAP_START_ANIMATION, WEBMAP_STOP_ANIMATION, WEBMAP_REGISTER_MAP, WEBMAP_UNREGISTER_MAP, WEBMAP_SET_ACTIVELAYERID, WEBMAP_TOGGLE_AUTO_UPDATE, WEBMAP_TOGGLE_LOOP, WEBMAP_SET_TIME_SLIDER_SCALE, WEBMAP_SET_TIME_STEP, WEBMAP_SET_ANIMATION_DELAY, WEBMAP_SET_ANIMATION_START_TIME, WEBMAP_SET_ANIMATION_END_TIME, WEBMAP_TOGGLE_TIMESTEP_AUTO, WEBMAP_TOGGLE_TIME_SLIDER_HOVER, WEBMAP_SET_TIME_SLIDER_CENTER_TIME, WEBMAP_SET_TIME_SLIDER_SECONDS_PER_PX, WEBMAP_SET_TIME_SLIDER_DATA_SCALE_TO_SECONDS_PER_PX, WEBMAP_SET_PIN } from './constants';
5
4
  export interface Dimension {
6
5
  name?: string;
7
6
  units?: string;
@@ -36,11 +35,16 @@ export interface WebMap {
36
35
  timeSliderDataScaleToSecondsPerPx?: number;
37
36
  isTimestepAuto?: boolean;
38
37
  isTimeSliderHoverOn?: boolean;
38
+ mapPinLocation?: MapLocation;
39
39
  }
40
40
  export interface WebMapState {
41
41
  byId: Record<string, WebMap>;
42
42
  allIds: string[];
43
43
  }
44
+ export interface MapLocation {
45
+ lat: number;
46
+ lon: number;
47
+ }
44
48
  export interface Bbox {
45
49
  left: number;
46
50
  right: number;
@@ -109,8 +113,8 @@ export declare type TimeListType = {
109
113
  };
110
114
  export interface SetMapAnimationStartPayload {
111
115
  mapId: string;
112
- start?: Moment;
113
- end?: Moment;
116
+ start?: string;
117
+ end?: string;
114
118
  interval?: number;
115
119
  timeList?: TimeListType[];
116
120
  }
@@ -183,7 +187,7 @@ export interface SetAnimationStartTime extends Action {
183
187
  }
184
188
  export interface SetAnimationStartTimePayload {
185
189
  mapId: string;
186
- animationStartTime: Moment;
190
+ animationStartTime: string;
187
191
  }
188
192
  export interface SetAnimationEndTime extends Action {
189
193
  type: typeof WEBMAP_SET_ANIMATION_END_TIME;
@@ -191,7 +195,7 @@ export interface SetAnimationEndTime extends Action {
191
195
  }
192
196
  export interface SetAnimationEndTimePayload {
193
197
  mapId: string;
194
- animationEndTime: Moment;
198
+ animationEndTime: string;
195
199
  }
196
200
  export interface ToggleTimestepAutoPayload {
197
201
  mapId: string;
@@ -233,4 +237,12 @@ export interface SetTimeSliderDataScaleToSecondsPerPxPayload {
233
237
  mapId: string;
234
238
  timeSliderDataScaleToSecondsPerPx: number;
235
239
  }
236
- export declare type MapActions = RegisterMap | UnregisterMap | SetMapDimension | UpdateAllMapDimensions | SetMapAnimationStart | SetMapAnimationStop | SetBbox | MoveLayer | SetActiveLayerId | ToggleAutoUpdate | ToggleLoop | SetTimeStep | SetTimeSliderScale | SetAnimationDelay | SetAnimationStartTime | SetAnimationEndTime | ToggleTimestepAuto | ToggleTimeSliderHover | SetTimeSliderCenterTime | SetTimeSliderSecondsPerPx | SetTimeSliderDataScaleToSecondsPerPx;
240
+ export interface SetMapPinLocation extends Action {
241
+ type: typeof WEBMAP_SET_PIN;
242
+ payload: MapPinLocationPayload;
243
+ }
244
+ export interface MapPinLocationPayload {
245
+ mapId: string;
246
+ mapPinLocation: MapLocation;
247
+ }
248
+ export declare type MapActions = RegisterMap | UnregisterMap | SetMapDimension | UpdateAllMapDimensions | SetMapAnimationStart | SetMapAnimationStop | SetBbox | MoveLayer | SetActiveLayerId | ToggleAutoUpdate | ToggleLoop | SetTimeStep | SetTimeSliderScale | SetAnimationDelay | SetAnimationStartTime | SetAnimationEndTime | ToggleTimestepAuto | ToggleTimeSliderHover | SetTimeSliderCenterTime | SetTimeSliderSecondsPerPx | SetTimeSliderDataScaleToSecondsPerPx | SetMapPinLocation;
@@ -1,4 +1,4 @@
1
- import { ServiceActions, SetLayersForServicePayload, SetLayerStylesForServicePayload } from './types';
1
+ import { ServiceActions, SetLayersForServicePayload } from './types';
2
2
  /**
3
3
  * Action serviceSetLayers is used automatically after calling the setLayers action. Contents is based on WMS GetCapabilities
4
4
  *
@@ -6,10 +6,3 @@ import { ServiceActions, SetLayersForServicePayload, SetLayerStylesForServicePay
6
6
  * @param {object} payload consisting of service: string, layers: ServiceLayer[]
7
7
  */
8
8
  export declare const serviceSetLayers: (payload: SetLayersForServicePayload) => ServiceActions;
9
- /**
10
- * Action layerSetStyles is used automatically after calling the setLayers action. Contents is based on WMS GetCapabilities
11
- *
12
- * Example: layerSetStyles({service: someService, name: 'layerName', styles: styleArray})
13
- * @param {object} payload consisting of service: string, name: string, styles: Style[]
14
- */
15
- export declare const layerSetStyles: (payload: SetLayerStylesForServicePayload) => ServiceActions;
@@ -1,2 +1 @@
1
1
  export declare const MAP_SERVICES_SET_LAYERS = "MAP_SERVICES_SET_LAYERS";
2
- export declare const MAP_SERVICES_LAYER_SET_STYLES = "MAP_SERVICES_LAYER_SET_STYLES";
@@ -1,5 +1,6 @@
1
+ import { Style } from '@opengeoweb/webmap';
1
2
  import { AppStore } from '../../../types/types';
2
- import { ServiceState, ServiceLayer } from './types';
3
+ import { ServiceState, ServiceLayer, Service } from './types';
3
4
  /**
4
5
  * Retrieves all serviceIds
5
6
  *
@@ -17,10 +18,39 @@ export declare const getServiceIds: import("reselect").OutputSelector<AppStore,
17
18
  */
18
19
  export declare const getServices: import("reselect").OutputSelector<AppStore, import("./types").Services, (res: ServiceState) => import("./types").Services>;
19
20
  /**
20
- * Gets map layers from servicename
21
+ * Gets the service object by its url
21
22
  *
22
- * Example: layers = getServices(store, 'serviceName')
23
+ * Example: service = getServiceByName(store, 'serviceName')
23
24
  * @param {object} store store: object - Store object
24
- * @returns {array} returnType: ServiceLayer[]
25
+ * @returns {Service} returnType: Service
25
26
  */
26
- export declare const getServiceLayersByName: (store: AppStore, serviceName: string) => ServiceLayer[];
27
+ export declare const getServiceByName: import("reselect").OutputParametricSelector<any, any, Service, (res1: ServiceState, res2: string) => Service>;
28
+ /**
29
+ * Gets the layer from the store using the serviceUrl and layerName
30
+ *
31
+ * Example: layers = getLayersFromService(store, 'https://geoservices.knmi.nl/...')
32
+ * @param {object} store store: object - object from which the layers state will be extracted
33
+ * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
34
+ * @returns {arrayr} returnType: ServiceLayer[] - All layers within the service object.
35
+ */
36
+ export declare const getLayersFromService: import("reselect").OutputParametricSelector<any, any, ServiceLayer[], (res: Service) => ServiceLayer[]>;
37
+ /**
38
+ * Gets the layer from the store using the serviceUrl and layerName
39
+ *
40
+ * Example: layer = getLayerFromService(store, 'https://geoservices.knmi.nl/...', 'radar')
41
+ * @param {object} store store: object - The application store
42
+ * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
43
+ * @param {string} layerName layerName: string - Name of the layer in the service
44
+ * @returns {ServiceLayer} returnType: ServiceLayer - The layer from the service object.
45
+ */
46
+ export declare const getLayerFromService: import("reselect").OutputParametricSelector<AppStore, string, ServiceLayer, (res1: ServiceLayer[], res2: string, res3: string) => ServiceLayer>;
47
+ /**
48
+ * Gets the layers stylelist from the servicestore using the serviceUrl and layerName
49
+ *
50
+ * Example: layerStyles = getLayerStyles(store, layerService, layerName);
51
+ * @param {object} store store: object - store from which the layers state will be extracted
52
+ * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
53
+ * @param {string} layerName layerName: string - Name of the layer in the service
54
+ * @returns {array} returnType: Style[] - array containing layer styles
55
+ */
56
+ export declare const getLayerStyles: import("reselect").OutputParametricSelector<AppStore, string, Style[], (res: ServiceLayer) => Style[]>;
@@ -1,15 +1,16 @@
1
1
  import { Style } from '@opengeoweb/webmap';
2
2
  import { Action } from 'redux';
3
- import { MAP_SERVICES_SET_LAYERS, MAP_SERVICES_LAYER_SET_STYLES } from './constants';
4
- export interface ServicesLayerStyles {
5
- styles: Record<string, unknown>[];
6
- }
3
+ import type { UpdateLayerInfo } from '../types';
4
+ import { MAP_SERVICES_SET_LAYERS } from './constants';
7
5
  export interface Services {
8
6
  [key: string]: Service;
9
7
  }
10
8
  export interface Service {
9
+ id?: string;
10
+ name?: string;
11
+ service?: string;
12
+ active?: boolean;
11
13
  layers?: ServiceLayer[];
12
- layer?: Record<string, ServicesLayerStyles>;
13
14
  }
14
15
  /**
15
16
  * Used in the services object of webmap to keep a list of available layers in the service
@@ -19,12 +20,17 @@ export interface ServiceLayer {
19
20
  text: string;
20
21
  leaf: boolean;
21
22
  path: string;
23
+ abstract?: string;
24
+ keywords?: string[];
25
+ styles?: Style[];
22
26
  }
23
27
  export interface ServiceState {
24
28
  byId: Services;
25
29
  allIds: string[];
26
30
  }
27
31
  export interface SetLayersForServicePayload {
32
+ id: string;
33
+ name: string;
28
34
  service: string;
29
35
  layers: ServiceLayer[];
30
36
  }
@@ -32,15 +38,5 @@ interface SetLayersForService extends Action {
32
38
  type: typeof MAP_SERVICES_SET_LAYERS;
33
39
  payload: SetLayersForServicePayload;
34
40
  }
35
- export interface SetLayerStylesForServicePayload {
36
- origin?: string;
37
- service: string;
38
- name: string;
39
- styles: Style[];
40
- }
41
- interface SetLayerStylesForService extends Action {
42
- type: typeof MAP_SERVICES_LAYER_SET_STYLES;
43
- payload: SetLayerStylesForServicePayload;
44
- }
45
- export declare type ServiceActions = SetLayersForService | SetLayerStylesForService;
41
+ export declare type ServiceActions = SetLayersForService | UpdateLayerInfo;
46
42
  export {};
@@ -1,5 +1,6 @@
1
1
  import { WMJSMap, WMLayer } from '@opengeoweb/webmap';
2
2
  import { Dimension, WMJSDimension } from '../types';
3
+ export declare const dateFormat = "YYYY-MM-DDTHH:mm:ss[Z]";
3
4
  export declare const generateLayerId: () => string;
4
5
  export declare const generateMapId: () => string;
5
6
  export declare const generateTimesliderId: () => string;
@@ -27,11 +28,11 @@ export declare const registerWMJSMap: (wmjsMap: WMJSMap, wmjsMapId: string) => v
27
28
  */
28
29
  export declare const getWMJSMapById: (wmjsMapId: string) => WMJSMap;
29
30
  /**
30
- * Returns the WMJSDimension object for given layerId and Dimension
31
+ * Returns the WMJSDimension object for given layerId and dimension name
31
32
  * @param layerId The layerId
32
- * @param dimension The dimension to lookup
33
+ * @param dimensionName The dimension to lookup
33
34
  */
34
- export declare const getWMJSDimensionForLayerAndDimension: (layerId: string, dimension: Dimension) => WMJSDimension;
35
+ export declare const getWMJSDimensionForLayerAndDimension: (layerId: string, dimensionName: string) => WMJSDimension;
35
36
  /**
36
37
  * Returns the list of dimensions without the time dimension
37
38
  * @param dimensions Dimension[]
@@ -2,8 +2,8 @@ import { SetActiveMapIdForDialogPayload, UIActions, UIOrderDialogPayload, UIRegi
2
2
  /**
3
3
  * Registers the dialog in the store and creates the dialog state
4
4
  *
5
- * Example: registerDialog({'dialogId1', type: 'legend}) you can optionally specify the activeMapId and whether the dialog is open
6
- * @param {string} payload {type: 'legend' | 'layerManager' | 'dimensionSelect-elevation', activeMapId?: string, setOpen?: boolean}
5
+ * Example: registerDialog({'dialogId1', type: 'legend}) you can optionally specify the activeMapId, whether the dialog is open and the souce ('app' or 'module', default is 'app')
6
+ * @param {string} payload {type: 'legend' | 'layerManager' | 'dimensionSelect-elevation', activeMapId?: string, setOpen?: boolean, source?: Source}
7
7
  */
8
8
  export declare const registerDialog: (payload: UIRegisterDialogPayload) => UIActions;
9
9
  /**
@@ -1,6 +1,6 @@
1
1
  import { Action } from 'redux';
2
2
  import { UI_SET_ACTIVE_MAPID_FOR_DIALOG, UI_REGISTER_DIALOG, UI_TOGGLE_DIALOG, UI_UNREGISTER_DIALOG, UI_ORDER_DIALOG } from './constants';
3
- export declare type DialogType = 'legend' | 'layerManager' | 'layerSelect' | 'dimensionSelect-elevation' | 'dimensionSelect-ensemble_member';
3
+ export declare type DialogType = 'legend' | 'layerManager' | 'layerSelect' | 'dimensionSelect-elevation' | 'dimensionSelect-ensemble_member' | 'keywordFilter';
4
4
  export declare type Source = 'app' | 'module';
5
5
  export interface UIType {
6
6
  type: DialogType;
@@ -29,6 +29,7 @@ export interface UIRegisterDialogPayload {
29
29
  type: DialogType;
30
30
  activeMapId?: string;
31
31
  setOpen?: boolean;
32
+ source?: Source;
32
33
  }
33
34
  export interface UIRegisterDialog extends Action {
34
35
  type: typeof UI_REGISTER_DIALOG;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Layer } from '../store/mapStore/layers/types';
3
- export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"content" | "title" | "root" | "chips">;
3
+ export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"content" | "title" | "root" | "chips">;
4
4
  declare type ExampleLayer = {
5
5
  title: string;
6
6
  layers: Layer[];