@opengeoweb/store 21.1.0 → 21.2.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/dist/index.esm.js CHANGED
@@ -5,7 +5,7 @@ export { LayerType } from '@opengeoweb/webmap';
5
5
  import { dateUtils, PROJECTION, defaultDelay, useDebounce } from '@opengeoweb/shared';
6
6
  import { secondsPerPxFromCanvasWidth, defaultTimeSpan, defaultSecondsPerPx, defaultAnimationDelayAtStart, defaultTimeStep, MAX_ANIMATION_STEPS, AnimationLengthMode, defaultExactSelections, withDraggedRange, roundWithTimeStep, isValidAnimationLength, isWithinAnimationStepLimit, settingRange, isAnchoredMode, resolveAnimationRange, defaultOffsetSelections, getAnimationLengthFromRange, withModeSelections, getSpeedDelay } from '@opengeoweb/time-slider';
7
7
  import { produce } from 'immer';
8
- import { getLastEmptyFeatureIndex, getGeoJson, moveFeature, createInterSections, defaultLayers, fetchStacCatalogRoot, defaultEdrStyles, normalizeEDRLabel, fetchEDRJson, stacCatalogCollectionToLayerProps, fetchStacCatalogCollections, emptyGeoJSON, defaultIntersectionStyleProperties, addSelectionTypeToGeoJSON, getFeatureCollection } from '@opengeoweb/webmap-react';
8
+ import { getLastEmptyFeatureIndex, getGeoJson, moveFeature, createInterSections, defaultLayers, fetchEDRServiceLayers, fetchStacCatalogRoot, stacCatalogCollectionToLayerProps, fetchStacCatalogCollections, emptyGeoJSON, defaultIntersectionStyleProperties, addSelectionTypeToGeoJSON, getFeatureCollection } from '@opengeoweb/webmap-react';
9
9
  export { defaultLayers } from '@opengeoweb/webmap-react';
10
10
  import { v4 } from 'uuid';
11
11
  import React, { useEffect, useRef, useCallback } from 'react';
@@ -1324,6 +1324,11 @@ var getSTACServiceRootUrl = function getSTACServiceRootUrl(serviceUrl) {
1324
1324
  var getEDRServiceRootUrl = function getEDRServiceRootUrl(serviceUrl) {
1325
1325
  return trimTrailingSlashes(serviceUrl).replace(/\/collections\/[^/]+$/, '');
1326
1326
  };
1327
+ var getEDRCollectionId = function getEDRCollectionId(serviceUrl) {
1328
+ var _exec;
1329
+ var collectionId = (_exec = /\/collections\/([^/]+)$/.exec(trimTrailingSlashes(serviceUrl))) === null || _exec === void 0 ? void 0 : _exec[1];
1330
+ return collectionId ? decodeURIComponent(collectionId) : '';
1331
+ };
1327
1332
  var getTrailingSlashVariant = function getTrailingSlashVariant(url) {
1328
1333
  return url.endsWith('/') ? url.slice(0, -1) : "".concat(url, "/");
1329
1334
  };
@@ -1599,6 +1604,7 @@ var utils$1 = /*#__PURE__*/Object.freeze({
1599
1604
  filterNonTimeDimensions: filterNonTimeDimensions,
1600
1605
  findFeatureIndexById: findFeatureIndexById,
1601
1606
  generateFeatureId: generateFeatureId,
1607
+ getEDRCollectionId: getEDRCollectionId,
1602
1608
  getEDRServiceRootUrl: getEDRServiceRootUrl,
1603
1609
  getFeatureSelectionKey: getFeatureSelectionKey,
1604
1610
  getSTACServiceRootUrl: getSTACServiceRootUrl,
@@ -5110,11 +5116,14 @@ var useRegisterFeatureSyncSource = function useRegisterFeatureSyncSource(panelId
5110
5116
  * synced state is not initialized yet.
5111
5117
  *
5112
5118
  * @param panelId panelId to register as sync source
5119
+ * @param debounceMs delay for changes to the time state
5120
+ * @param immediateCurrent update the selected time immediately while debouncing the range
5113
5121
  * @returns timeslider state
5114
5122
  */
5115
5123
  var useSyncgroupTimeState = function useSyncgroupTimeState(panelId) {
5116
5124
  var _ref;
5117
5125
  var debounceMs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
5126
+ var immediateCurrent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
5118
5127
  var dispatch = useDispatch();
5119
5128
  var defaultNowTime = React.useRef(Math.round(Date.now() / 1000));
5120
5129
  var syncGroupsAddSourceCallBack = React.useCallback(function (payload) {
@@ -5225,7 +5234,26 @@ var useSyncgroupTimeState = function useSyncgroupTimeState(panelId) {
5225
5234
  var stateWithAuthoritativeCurrent = baseState && linkedMapSelectedTime !== undefined ? _objectSpread2(_objectSpread2({}, baseState), {}, {
5226
5235
  current: linkedMapSelectedTime
5227
5236
  }) : baseState;
5228
- return useDebounce(stateWithAuthoritativeCurrent, debounceMs);
5237
+ var _ref2 = stateWithAuthoritativeCurrent !== null && stateWithAuthoritativeCurrent !== void 0 ? stateWithAuthoritativeCurrent : {},
5238
+ start = _ref2.start,
5239
+ end = _ref2.end,
5240
+ step = _ref2.step;
5241
+ // Ignore current-time changes when debouncing the range during playback.
5242
+ var rangeState = React.useMemo(function () {
5243
+ return start !== undefined && end !== undefined && step !== undefined ? {
5244
+ start: start,
5245
+ end: end,
5246
+ step: step,
5247
+ current: 0
5248
+ } : undefined;
5249
+ }, [start, end, step]);
5250
+ var debouncedState = useDebounce(immediateCurrent ? rangeState : stateWithAuthoritativeCurrent, debounceMs);
5251
+ if (immediateCurrent) {
5252
+ return stateWithAuthoritativeCurrent ? _objectSpread2(_objectSpread2({}, debouncedState !== null && debouncedState !== void 0 ? debouncedState : stateWithAuthoritativeCurrent), {}, {
5253
+ current: stateWithAuthoritativeCurrent.current
5254
+ }) : undefined;
5255
+ }
5256
+ return debouncedState;
5229
5257
  };
5230
5258
 
5231
5259
  var layerStore = function layerStore(store) {
@@ -5761,6 +5789,43 @@ var getLayerDisplayName = createSelector(getLayerType, getLayerOptions, getLayer
5761
5789
  }
5762
5790
  return layerTitle || layerName;
5763
5791
  }, selectorMemoizationOptions);
5792
+ /**
5793
+ * Gets the service layer of a map layer. EDR and STAC layers point to a collection,
5794
+ * so the layer is also searched from the root service. For EDR root services the
5795
+ * collection id must match, as the same parameter can exist in several collections.
5796
+ *
5797
+ * Example: serviceLayer = getServiceLayer(store, 'layerId_1')
5798
+ * @param {object} store store: object - object from which the layers state will be extracted
5799
+ * @param {string} layerId layerId: string - Id of the layer
5800
+ * @returns {ServiceLayer} returnType: ServiceLayer - the layer from the service store
5801
+ */
5802
+ var getServiceLayer = createSelector(getServices, getLayerService, getLayerName, getLayerType, getLayerOptions, function (services, service, name, layerType, options) {
5803
+ var _findServiceLayers, _findServiceLayers2;
5804
+ if (!service || !name) {
5805
+ return undefined;
5806
+ }
5807
+ var findServiceLayers = function findServiceLayers(serviceUrl) {
5808
+ var _Object$values$find;
5809
+ return (_Object$values$find = Object.values(services).find(function (reduxService) {
5810
+ return reduxService.serviceUrl === serviceUrl;
5811
+ })) === null || _Object$values$find === void 0 ? void 0 : _Object$values$find.layers;
5812
+ };
5813
+ var collectionServiceLayer = (_findServiceLayers = findServiceLayers(service)) === null || _findServiceLayers === void 0 ? void 0 : _findServiceLayers.find(function (serviceLayer) {
5814
+ return serviceLayer.name === name;
5815
+ });
5816
+ if (collectionServiceLayer) {
5817
+ return collectionServiceLayer;
5818
+ }
5819
+ var serviceRootUrl = getCollectionServiceRootUrl(layerType, service);
5820
+ if (!serviceRootUrl) {
5821
+ return undefined;
5822
+ }
5823
+ var rootServiceLayers = (_findServiceLayers2 = findServiceLayers(serviceRootUrl)) !== null && _findServiceLayers2 !== void 0 ? _findServiceLayers2 : findServiceLayers(getTrailingSlashVariant(serviceRootUrl));
5824
+ var collectionId = options && 'collectionId' in options && options.collectionId || getEDRCollectionId(service);
5825
+ return rootServiceLayers === null || rootServiceLayers === void 0 ? void 0 : rootServiceLayers.find(function (serviceLayer) {
5826
+ return serviceLayer.name === name && (!collectionId || !serviceLayer.edrCollectionId || serviceLayer.edrCollectionId === collectionId);
5827
+ });
5828
+ }, selectorMemoizationOptions);
5764
5829
  /**
5765
5830
  * Gets the layer missing status. A layer is missing if it is not found in the service store or if its status is 'error'.
5766
5831
  *
@@ -5769,14 +5834,10 @@ var getLayerDisplayName = createSelector(getLayerType, getLayerOptions, getLayer
5769
5834
  * @param {string} layerId layerId: string - Id of the layer
5770
5835
  * @returns {boolean} returnType: boolean - true if layer is missing
5771
5836
  */
5772
- var getIsLayerMissing = createSelector(function (store) {
5773
- return store;
5774
- }, getLayerService, getLayerName, getLayerStatus, getLayerType, function (store, service, name, status, type) {
5837
+ var getIsLayerMissing = createSelector(getServiceLayer, getLayerStatus, getLayerType, function (serviceLayer, status, type) {
5775
5838
  if (type === LayerType.featureLayer || type === LayerType.stacGeoTIFFLayer) {
5776
5839
  return false;
5777
5840
  }
5778
- var serviceRootUrl = getCollectionServiceRootUrl(type, service);
5779
- var serviceLayer = getLayerFromService(store, service, name) || (serviceRootUrl ? getLayerFromService(store, serviceRootUrl, name) || getLayerFromService(store, getTrailingSlashVariant(serviceRootUrl), name) : undefined);
5780
5841
  return !serviceLayer || status === LayerStatus.error;
5781
5842
  }, selectorMemoizationOptions);
5782
5843
  var getIsLayerSelectable = createSelector(getLayerById, function (layer) {
@@ -5829,6 +5890,7 @@ var selectors$4 = /*#__PURE__*/Object.freeze({
5829
5890
  getOverLayers: getOverLayers,
5830
5891
  getOverlayersForMapId: getOverlayersForMapId,
5831
5892
  getSelectedFeatureIds: getSelectedFeatureIds$1,
5893
+ getServiceLayer: getServiceLayer,
5832
5894
  getTimeStepForLayerId: getTimeStepForLayerId,
5833
5895
  getUseLatestReferenceTime: getUseLatestReferenceTime
5834
5896
  });
@@ -9988,59 +10050,21 @@ var fetchSTACLayers = /*#__PURE__*/function () {
9988
10050
  return _ref.apply(this, arguments);
9989
10051
  };
9990
10052
  }();
9991
- var fetchEDRLayers = /*#__PURE__*/function () {
9992
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(serviceUrl) {
9993
- var _data$collections;
9994
- var baseUrl, data;
9995
- return _regenerator().w(function (_context2) {
9996
- while (1) switch (_context2.n) {
9997
- case 0:
9998
- baseUrl = serviceUrl.endsWith('/') ? serviceUrl.slice(0, -1) : serviceUrl;
9999
- _context2.n = 1;
10000
- return fetchEDRJson("".concat(baseUrl, "/collections"));
10001
- case 1:
10002
- data = _context2.v;
10003
- return _context2.a(2, ((_data$collections = data.collections) !== null && _data$collections !== void 0 ? _data$collections : []).flatMap(function (collection) {
10004
- var _collection$parameter;
10005
- return Object.entries((_collection$parameter = collection.parameter_names) !== null && _collection$parameter !== void 0 ? _collection$parameter : {}).map(function (_ref3) {
10006
- var _parameter$label, _ref5, _collection$path, _collection$title, _parameter$observedPr, _parameter$label2;
10007
- var _ref4 = _slicedToArray(_ref3, 2),
10008
- parameterId = _ref4[0],
10009
- parameter = _ref4[1];
10010
- return {
10011
- name: parameterId,
10012
- title: (_parameter$label = parameter.label) !== null && _parameter$label !== void 0 ? _parameter$label : parameterId,
10013
- leaf: true,
10014
- path: [].concat(_toConsumableArray((_ref5 = (_collection$path = collection.path) !== null && _collection$path !== void 0 ? _collection$path : collection.groups) !== null && _ref5 !== void 0 ? _ref5 : collection.group ? [collection.group] : []), [(_collection$title = collection.title) !== null && _collection$title !== void 0 ? _collection$title : collection.id]),
10015
- keywords: (_parameter$observedPr = parameter.observedProperty) !== null && _parameter$observedPr !== void 0 && _parameter$observedPr.label ? [normalizeEDRLabel(parameter.observedProperty.label, (_parameter$label2 = parameter.label) !== null && _parameter$label2 !== void 0 ? _parameter$label2 : parameterId)] : [],
10016
- edrCollectionId: collection.id,
10017
- edrParameter: parameter,
10018
- styles: defaultEdrStyles
10019
- };
10020
- });
10021
- }));
10022
- }
10023
- }, _callee2);
10024
- }));
10025
- return function fetchEDRLayers(_x2) {
10026
- return _ref2.apply(this, arguments);
10027
- };
10028
- }();
10029
10053
  var dispatchServiceLayers = function dispatchServiceLayers(service, layers, listenerApi) {
10030
10054
  listenerApi.dispatch(serviceActions.serviceSetLayers(_objectSpread2(_objectSpread2({}, service), {}, {
10031
10055
  layers: layers
10032
10056
  })));
10033
10057
  };
10034
10058
  var fetchSTACService = /*#__PURE__*/function () {
10035
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(service, listenerApi) {
10059
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(service, listenerApi) {
10036
10060
  var _yield$Promise$all, _yield$Promise$all2, root, layers;
10037
- return _regenerator().w(function (_context3) {
10038
- while (1) switch (_context3.n) {
10061
+ return _regenerator().w(function (_context2) {
10062
+ while (1) switch (_context2.n) {
10039
10063
  case 0:
10040
- _context3.n = 1;
10064
+ _context2.n = 1;
10041
10065
  return Promise.all([fetchStacCatalogRoot(service.serviceUrl), fetchSTACLayers(service.serviceUrl)]);
10042
10066
  case 1:
10043
- _yield$Promise$all = _context3.v;
10067
+ _yield$Promise$all = _context2.v;
10044
10068
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
10045
10069
  root = _yield$Promise$all2[0];
10046
10070
  layers = _yield$Promise$all2[1];
@@ -10050,139 +10074,139 @@ var fetchSTACService = /*#__PURE__*/function () {
10050
10074
  type: 'STAC'
10051
10075
  }), layers, listenerApi);
10052
10076
  case 2:
10053
- return _context3.a(2);
10077
+ return _context2.a(2);
10054
10078
  }
10055
- }, _callee3);
10079
+ }, _callee2);
10056
10080
  }));
10057
- return function fetchSTACService(_x3, _x4) {
10058
- return _ref6.apply(this, arguments);
10081
+ return function fetchSTACService(_x2, _x3) {
10082
+ return _ref2.apply(this, arguments);
10059
10083
  };
10060
10084
  }();
10061
10085
  var fetchService = /*#__PURE__*/function () {
10062
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(service, listenerApi) {
10086
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(service, listenerApi) {
10063
10087
  var layers, _layers, _t, _t2;
10064
- return _regenerator().w(function (_context4) {
10065
- while (1) switch (_context4.p = _context4.n) {
10088
+ return _regenerator().w(function (_context3) {
10089
+ while (1) switch (_context3.p = _context3.n) {
10066
10090
  case 0:
10067
10091
  if (!(service.type === 'EDR')) {
10068
- _context4.n = 5;
10092
+ _context3.n = 5;
10069
10093
  break;
10070
10094
  }
10071
- _context4.p = 1;
10072
- _context4.n = 2;
10073
- return fetchEDRLayers(service.serviceUrl);
10095
+ _context3.p = 1;
10096
+ _context3.n = 2;
10097
+ return fetchEDRServiceLayers(service.serviceUrl);
10074
10098
  case 2:
10075
- layers = _context4.v;
10099
+ layers = _context3.v;
10076
10100
  dispatchServiceLayers(service, layers, listenerApi);
10077
- _context4.n = 4;
10101
+ _context3.n = 4;
10078
10102
  break;
10079
10103
  case 3:
10080
- _context4.p = 3;
10081
- _t = _context4.v;
10104
+ _context3.p = 3;
10105
+ _t = _context3.v;
10082
10106
  if (_t instanceof Error) {
10083
10107
  console.warn(_t.message);
10084
10108
  }
10085
10109
  dispatchServiceLayers(service, [], listenerApi);
10086
10110
  case 4:
10087
- return _context4.a(2);
10111
+ return _context3.a(2);
10088
10112
  case 5:
10089
10113
  if (!(service.type === 'STAC')) {
10090
- _context4.n = 7;
10114
+ _context3.n = 7;
10091
10115
  break;
10092
10116
  }
10093
- _context4.n = 6;
10117
+ _context3.n = 6;
10094
10118
  return fetchSTACService(service, listenerApi);
10095
10119
  case 6:
10096
- return _context4.a(2);
10120
+ return _context3.a(2);
10097
10121
  case 7:
10098
- _context4.p = 7;
10099
- _context4.n = 8;
10122
+ _context3.p = 7;
10123
+ _context3.n = 8;
10100
10124
  return queryWMSLayers(service.serviceUrl);
10101
10125
  case 8:
10102
- _layers = _context4.v;
10126
+ _layers = _context3.v;
10103
10127
  dispatchServiceLayers(service, _layers, listenerApi);
10104
- _context4.n = 10;
10128
+ _context3.n = 10;
10105
10129
  break;
10106
10130
  case 9:
10107
- _context4.p = 9;
10108
- _t2 = _context4.v;
10131
+ _context3.p = 9;
10132
+ _t2 = _context3.v;
10109
10133
  if (_t2 instanceof Error) {
10110
10134
  console.warn(_t2.message);
10111
10135
  }
10112
10136
  case 10:
10113
- return _context4.a(2);
10137
+ return _context3.a(2);
10114
10138
  }
10115
- }, _callee4, null, [[7, 9], [1, 3]]);
10139
+ }, _callee3, null, [[7, 9], [1, 3]]);
10116
10140
  }));
10117
- return function fetchService(_x5, _x6) {
10118
- return _ref7.apply(this, arguments);
10141
+ return function fetchService(_x4, _x5) {
10142
+ return _ref3.apply(this, arguments);
10119
10143
  };
10120
10144
  }();
10121
10145
  var fetchInitialServices = /*#__PURE__*/function () {
10122
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(payload, listenerApi) {
10146
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(payload, listenerApi) {
10123
10147
  var _t3;
10124
- return _regenerator().w(function (_context6) {
10125
- while (1) switch (_context6.p = _context6.n) {
10148
+ return _regenerator().w(function (_context5) {
10149
+ while (1) switch (_context5.p = _context5.n) {
10126
10150
  case 0:
10127
10151
  if (payload !== null && payload !== void 0 && payload.services) {
10128
- _context6.n = 1;
10152
+ _context5.n = 1;
10129
10153
  break;
10130
10154
  }
10131
- return _context6.a(2);
10155
+ return _context5.a(2);
10132
10156
  case 1:
10133
- _context6.p = 1;
10134
- _context6.n = 2;
10157
+ _context5.p = 1;
10158
+ _context5.n = 2;
10135
10159
  return Promise.all(payload.services.map(/*#__PURE__*/function () {
10136
- var _ref0 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(_ref9) {
10160
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(_ref5) {
10137
10161
  var url, service;
10138
- return _regenerator().w(function (_context5) {
10139
- while (1) switch (_context5.n) {
10162
+ return _regenerator().w(function (_context4) {
10163
+ while (1) switch (_context4.n) {
10140
10164
  case 0:
10141
- url = _ref9.url, service = _objectWithoutProperties(_ref9, _excluded);
10142
- return _context5.a(2, fetchService(_objectSpread2(_objectSpread2({}, service), {}, {
10165
+ url = _ref5.url, service = _objectWithoutProperties(_ref5, _excluded);
10166
+ return _context4.a(2, fetchService(_objectSpread2(_objectSpread2({}, service), {}, {
10143
10167
  serviceUrl: url
10144
10168
  }), listenerApi));
10145
10169
  }
10146
- }, _callee5);
10170
+ }, _callee4);
10147
10171
  }));
10148
- return function (_x9) {
10149
- return _ref0.apply(this, arguments);
10172
+ return function (_x8) {
10173
+ return _ref6.apply(this, arguments);
10150
10174
  };
10151
10175
  }()));
10152
10176
  case 2:
10153
- _context6.n = 4;
10177
+ _context5.n = 4;
10154
10178
  break;
10155
10179
  case 3:
10156
- _context6.p = 3;
10157
- _t3 = _context6.v;
10180
+ _context5.p = 3;
10181
+ _t3 = _context5.v;
10158
10182
  console.warn(_t3);
10159
10183
  case 4:
10160
- return _context6.a(2);
10184
+ return _context5.a(2);
10161
10185
  }
10162
- }, _callee6, null, [[1, 3]]);
10186
+ }, _callee5, null, [[1, 3]]);
10163
10187
  }));
10164
- return function fetchInitialServices(_x7, _x8) {
10165
- return _ref8.apply(this, arguments);
10188
+ return function fetchInitialServices(_x6, _x7) {
10189
+ return _ref4.apply(this, arguments);
10166
10190
  };
10167
10191
  }();
10168
10192
  serviceListener.startListening({
10169
10193
  actionCreator: serviceActions.fetchInitialServices,
10170
10194
  effect: function () {
10171
- var _effect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(_ref1, listenerApi) {
10195
+ var _effect = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(_ref7, listenerApi) {
10172
10196
  var payload;
10173
- return _regenerator().w(function (_context7) {
10174
- while (1) switch (_context7.n) {
10197
+ return _regenerator().w(function (_context6) {
10198
+ while (1) switch (_context6.n) {
10175
10199
  case 0:
10176
- payload = _ref1.payload;
10200
+ payload = _ref7.payload;
10177
10201
  listenerApi.cancelActiveListeners();
10178
- _context7.n = 1;
10202
+ _context6.n = 1;
10179
10203
  return fetchInitialServices(payload, listenerApi);
10180
10204
  case 1:
10181
- return _context7.a(2);
10205
+ return _context6.a(2);
10182
10206
  }
10183
- }, _callee7);
10207
+ }, _callee6);
10184
10208
  }));
10185
- function effect(_x0, _x1) {
10209
+ function effect(_x9, _x0) {
10186
10210
  return _effect.apply(this, arguments);
10187
10211
  }
10188
10212
  return effect;
@@ -15,6 +15,8 @@ export declare const useRegisterFeatureSyncSource: (panelId: string) => void;
15
15
  * synced state is not initialized yet.
16
16
  *
17
17
  * @param panelId panelId to register as sync source
18
+ * @param debounceMs delay for changes to the time state
19
+ * @param immediateCurrent update the selected time immediately while debouncing the range
18
20
  * @returns timeslider state
19
21
  */
20
- export declare const useSyncgroupTimeState: (panelId: string, debounceMs?: number) => TimeSliderStartEndStepCurrent | undefined;
22
+ export declare const useSyncgroupTimeState: (panelId: string, debounceMs?: number, immediateCurrent?: boolean) => TimeSliderStartEndStepCurrent | undefined;
@@ -1,5 +1,5 @@
1
1
  export * from './service';
2
2
  export * from './map';
3
3
  export * from './layer';
4
- export type { WebMapStateModuleState, MapPreset, MapPresetInitialProps, TimeSliderStartEndStep, } from './types';
4
+ export type { WebMapStateModuleState, MapPreset, MapPresetInitialProps, TimeSliderStartEndStep, TimeSliderStartEndStepCurrent, } from './types';
5
5
  export * as storeTestSettings from './storeTestSettings';
@@ -1,6 +1,6 @@
1
1
  import { LayerType } from '@opengeoweb/webmap';
2
2
  import type { CoreAppStore } from '../../types';
3
- import type { Dimension, ReduxLayer } from '../types';
3
+ import type { Dimension, ReduxLayer, ServiceLayer } from '../types';
4
4
  import type { LayerState, Layer } from './types';
5
5
  import { LayerStatus } from './types';
6
6
  /**
@@ -2626,6 +2626,217 @@ export declare const getLayerDisplayName: ((state: any, layerId: any) => string)
2626
2626
  argsMemoize: typeof import("reselect").weakMapMemoize;
2627
2627
  memoize: typeof import("reselect").weakMapMemoize;
2628
2628
  };
2629
+ /**
2630
+ * Gets the service layer of a map layer. EDR and STAC layers point to a collection,
2631
+ * so the layer is also searched from the root service. For EDR root services the
2632
+ * collection id must match, as the same parameter can exist in several collections.
2633
+ *
2634
+ * Example: serviceLayer = getServiceLayer(store, 'layerId_1')
2635
+ * @param {object} store store: object - object from which the layers state will be extracted
2636
+ * @param {string} layerId layerId: string - Id of the layer
2637
+ * @returns {ServiceLayer} returnType: ServiceLayer - the layer from the service store
2638
+ */
2639
+ export declare const getServiceLayer: ((state: any, layerId: any) => ServiceLayer | undefined) & {
2640
+ clearCache: () => void;
2641
+ resultsCount: () => number;
2642
+ resetResultsCount: () => void;
2643
+ } & {
2644
+ resultFunc: (resultFuncArgs_0: import("../types").Services, resultFuncArgs_1: string, resultFuncArgs_2: string, resultFuncArgs_3: LayerType | "mapLayer", resultFuncArgs_4: import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined) => ServiceLayer | undefined;
2645
+ memoizedResultFunc: ((resultFuncArgs_0: import("../types").Services, resultFuncArgs_1: string, resultFuncArgs_2: string, resultFuncArgs_3: LayerType | "mapLayer", resultFuncArgs_4: import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined) => ServiceLayer | undefined) & {
2646
+ clearCache: () => void;
2647
+ resultsCount: () => number;
2648
+ resetResultsCount: () => void;
2649
+ };
2650
+ lastResult: () => ServiceLayer | undefined;
2651
+ dependencies: [((state: CoreAppStore) => import("../types").Services) & {
2652
+ clearCache: () => void;
2653
+ resultsCount: () => number;
2654
+ resetResultsCount: () => void;
2655
+ } & {
2656
+ resultFunc: (resultFuncArgs_0: import("../types").ServiceState | undefined) => import("../types").Services;
2657
+ memoizedResultFunc: ((resultFuncArgs_0: import("../types").ServiceState | undefined) => import("../types").Services) & {
2658
+ clearCache: () => void;
2659
+ resultsCount: () => number;
2660
+ resetResultsCount: () => void;
2661
+ };
2662
+ lastResult: () => import("../types").Services;
2663
+ dependencies: [(store: CoreAppStore) => import("../types").ServiceState | undefined];
2664
+ recomputations: () => number;
2665
+ resetRecomputations: () => void;
2666
+ dependencyRecomputations: () => number;
2667
+ resetDependencyRecomputations: () => void;
2668
+ } & {
2669
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2670
+ memoize: typeof import("reselect").weakMapMemoize;
2671
+ }, ((state: any, layerId: any) => string) & {
2672
+ clearCache: () => void;
2673
+ resultsCount: () => number;
2674
+ resetResultsCount: () => void;
2675
+ } & {
2676
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => string;
2677
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => string) & {
2678
+ clearCache: () => void;
2679
+ resultsCount: () => number;
2680
+ resetResultsCount: () => void;
2681
+ };
2682
+ lastResult: () => string;
2683
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
2684
+ clearCache: () => void;
2685
+ resultsCount: () => number;
2686
+ resetResultsCount: () => void;
2687
+ } & {
2688
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
2689
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
2690
+ clearCache: () => void;
2691
+ resultsCount: () => number;
2692
+ resetResultsCount: () => void;
2693
+ };
2694
+ lastResult: () => ReduxLayer | undefined;
2695
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
2696
+ recomputations: () => number;
2697
+ resetRecomputations: () => void;
2698
+ dependencyRecomputations: () => number;
2699
+ resetDependencyRecomputations: () => void;
2700
+ } & {
2701
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2702
+ memoize: typeof import("reselect").weakMapMemoize;
2703
+ }];
2704
+ recomputations: () => number;
2705
+ resetRecomputations: () => void;
2706
+ dependencyRecomputations: () => number;
2707
+ resetDependencyRecomputations: () => void;
2708
+ } & {
2709
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2710
+ memoize: typeof import("reselect").weakMapMemoize;
2711
+ }, ((state: any, layerId: any) => string) & {
2712
+ clearCache: () => void;
2713
+ resultsCount: () => number;
2714
+ resetResultsCount: () => void;
2715
+ } & {
2716
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => string;
2717
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => string) & {
2718
+ clearCache: () => void;
2719
+ resultsCount: () => number;
2720
+ resetResultsCount: () => void;
2721
+ };
2722
+ lastResult: () => string;
2723
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
2724
+ clearCache: () => void;
2725
+ resultsCount: () => number;
2726
+ resetResultsCount: () => void;
2727
+ } & {
2728
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
2729
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
2730
+ clearCache: () => void;
2731
+ resultsCount: () => number;
2732
+ resetResultsCount: () => void;
2733
+ };
2734
+ lastResult: () => ReduxLayer | undefined;
2735
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
2736
+ recomputations: () => number;
2737
+ resetRecomputations: () => void;
2738
+ dependencyRecomputations: () => number;
2739
+ resetDependencyRecomputations: () => void;
2740
+ } & {
2741
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2742
+ memoize: typeof import("reselect").weakMapMemoize;
2743
+ }];
2744
+ recomputations: () => number;
2745
+ resetRecomputations: () => void;
2746
+ dependencyRecomputations: () => number;
2747
+ resetDependencyRecomputations: () => void;
2748
+ } & {
2749
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2750
+ memoize: typeof import("reselect").weakMapMemoize;
2751
+ }, ((state: any, layerId: any) => LayerType | "mapLayer") & {
2752
+ clearCache: () => void;
2753
+ resultsCount: () => number;
2754
+ resetResultsCount: () => void;
2755
+ } & {
2756
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => LayerType | "mapLayer";
2757
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => LayerType | "mapLayer") & {
2758
+ clearCache: () => void;
2759
+ resultsCount: () => number;
2760
+ resetResultsCount: () => void;
2761
+ };
2762
+ lastResult: () => LayerType | "mapLayer";
2763
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
2764
+ clearCache: () => void;
2765
+ resultsCount: () => number;
2766
+ resetResultsCount: () => void;
2767
+ } & {
2768
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
2769
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
2770
+ clearCache: () => void;
2771
+ resultsCount: () => number;
2772
+ resetResultsCount: () => void;
2773
+ };
2774
+ lastResult: () => ReduxLayer | undefined;
2775
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
2776
+ recomputations: () => number;
2777
+ resetRecomputations: () => void;
2778
+ dependencyRecomputations: () => number;
2779
+ resetDependencyRecomputations: () => void;
2780
+ } & {
2781
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2782
+ memoize: typeof import("reselect").weakMapMemoize;
2783
+ }];
2784
+ recomputations: () => number;
2785
+ resetRecomputations: () => void;
2786
+ dependencyRecomputations: () => number;
2787
+ resetDependencyRecomputations: () => void;
2788
+ } & {
2789
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2790
+ memoize: typeof import("reselect").weakMapMemoize;
2791
+ }, ((state: any, layerId: any) => import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined) & {
2792
+ clearCache: () => void;
2793
+ resultsCount: () => number;
2794
+ resetResultsCount: () => void;
2795
+ } & {
2796
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined;
2797
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined) & {
2798
+ clearCache: () => void;
2799
+ resultsCount: () => number;
2800
+ resetResultsCount: () => void;
2801
+ };
2802
+ lastResult: () => import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined;
2803
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
2804
+ clearCache: () => void;
2805
+ resultsCount: () => number;
2806
+ resetResultsCount: () => void;
2807
+ } & {
2808
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
2809
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
2810
+ clearCache: () => void;
2811
+ resultsCount: () => number;
2812
+ resetResultsCount: () => void;
2813
+ };
2814
+ lastResult: () => ReduxLayer | undefined;
2815
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
2816
+ recomputations: () => number;
2817
+ resetRecomputations: () => void;
2818
+ dependencyRecomputations: () => number;
2819
+ resetDependencyRecomputations: () => void;
2820
+ } & {
2821
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2822
+ memoize: typeof import("reselect").weakMapMemoize;
2823
+ }];
2824
+ recomputations: () => number;
2825
+ resetRecomputations: () => void;
2826
+ dependencyRecomputations: () => number;
2827
+ resetDependencyRecomputations: () => void;
2828
+ } & {
2829
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2830
+ memoize: typeof import("reselect").weakMapMemoize;
2831
+ }];
2832
+ recomputations: () => number;
2833
+ resetRecomputations: () => void;
2834
+ dependencyRecomputations: () => number;
2835
+ resetDependencyRecomputations: () => void;
2836
+ } & {
2837
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2838
+ memoize: typeof import("reselect").weakMapMemoize;
2839
+ };
2629
2840
  /**
2630
2841
  * Gets the layer missing status. A layer is missing if it is not found in the service store or if its status is 'error'.
2631
2842
  *
@@ -2634,19 +2845,299 @@ export declare const getLayerDisplayName: ((state: any, layerId: any) => string)
2634
2845
  * @param {string} layerId layerId: string - Id of the layer
2635
2846
  * @returns {boolean} returnType: boolean - true if layer is missing
2636
2847
  */
2637
- export declare const getIsLayerMissing: ((state: any, ...params: any[]) => boolean) & {
2848
+ export declare const getIsLayerMissing: ((state: any, layerId: any) => boolean) & {
2638
2849
  clearCache: () => void;
2639
2850
  resultsCount: () => number;
2640
2851
  resetResultsCount: () => void;
2641
2852
  } & {
2642
- resultFunc: (...resultFuncArgs: readonly any[]) => boolean;
2643
- memoizedResultFunc: ((...resultFuncArgs: readonly any[]) => boolean) & {
2853
+ resultFunc: (resultFuncArgs_0: ServiceLayer | undefined, resultFuncArgs_1: LayerStatus, resultFuncArgs_2: LayerType | "mapLayer") => boolean;
2854
+ memoizedResultFunc: ((resultFuncArgs_0: ServiceLayer | undefined, resultFuncArgs_1: LayerStatus, resultFuncArgs_2: LayerType | "mapLayer") => boolean) & {
2644
2855
  clearCache: () => void;
2645
2856
  resultsCount: () => number;
2646
2857
  resetResultsCount: () => void;
2647
2858
  };
2648
2859
  lastResult: () => boolean;
2649
- dependencies: import("reselect").SelectorArray<any>;
2860
+ dependencies: [((state: any, layerId: any) => ServiceLayer | undefined) & {
2861
+ clearCache: () => void;
2862
+ resultsCount: () => number;
2863
+ resetResultsCount: () => void;
2864
+ } & {
2865
+ resultFunc: (resultFuncArgs_0: import("../types").Services, resultFuncArgs_1: string, resultFuncArgs_2: string, resultFuncArgs_3: LayerType | "mapLayer", resultFuncArgs_4: import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined) => ServiceLayer | undefined;
2866
+ memoizedResultFunc: ((resultFuncArgs_0: import("../types").Services, resultFuncArgs_1: string, resultFuncArgs_2: string, resultFuncArgs_3: LayerType | "mapLayer", resultFuncArgs_4: import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined) => ServiceLayer | undefined) & {
2867
+ clearCache: () => void;
2868
+ resultsCount: () => number;
2869
+ resetResultsCount: () => void;
2870
+ };
2871
+ lastResult: () => ServiceLayer | undefined;
2872
+ dependencies: [((state: CoreAppStore) => import("../types").Services) & {
2873
+ clearCache: () => void;
2874
+ resultsCount: () => number;
2875
+ resetResultsCount: () => void;
2876
+ } & {
2877
+ resultFunc: (resultFuncArgs_0: import("../types").ServiceState | undefined) => import("../types").Services;
2878
+ memoizedResultFunc: ((resultFuncArgs_0: import("../types").ServiceState | undefined) => import("../types").Services) & {
2879
+ clearCache: () => void;
2880
+ resultsCount: () => number;
2881
+ resetResultsCount: () => void;
2882
+ };
2883
+ lastResult: () => import("../types").Services;
2884
+ dependencies: [(store: CoreAppStore) => import("../types").ServiceState | undefined];
2885
+ recomputations: () => number;
2886
+ resetRecomputations: () => void;
2887
+ dependencyRecomputations: () => number;
2888
+ resetDependencyRecomputations: () => void;
2889
+ } & {
2890
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2891
+ memoize: typeof import("reselect").weakMapMemoize;
2892
+ }, ((state: any, layerId: any) => string) & {
2893
+ clearCache: () => void;
2894
+ resultsCount: () => number;
2895
+ resetResultsCount: () => void;
2896
+ } & {
2897
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => string;
2898
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => string) & {
2899
+ clearCache: () => void;
2900
+ resultsCount: () => number;
2901
+ resetResultsCount: () => void;
2902
+ };
2903
+ lastResult: () => string;
2904
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
2905
+ clearCache: () => void;
2906
+ resultsCount: () => number;
2907
+ resetResultsCount: () => void;
2908
+ } & {
2909
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
2910
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
2911
+ clearCache: () => void;
2912
+ resultsCount: () => number;
2913
+ resetResultsCount: () => void;
2914
+ };
2915
+ lastResult: () => ReduxLayer | undefined;
2916
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
2917
+ recomputations: () => number;
2918
+ resetRecomputations: () => void;
2919
+ dependencyRecomputations: () => number;
2920
+ resetDependencyRecomputations: () => void;
2921
+ } & {
2922
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2923
+ memoize: typeof import("reselect").weakMapMemoize;
2924
+ }];
2925
+ recomputations: () => number;
2926
+ resetRecomputations: () => void;
2927
+ dependencyRecomputations: () => number;
2928
+ resetDependencyRecomputations: () => void;
2929
+ } & {
2930
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2931
+ memoize: typeof import("reselect").weakMapMemoize;
2932
+ }, ((state: any, layerId: any) => string) & {
2933
+ clearCache: () => void;
2934
+ resultsCount: () => number;
2935
+ resetResultsCount: () => void;
2936
+ } & {
2937
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => string;
2938
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => string) & {
2939
+ clearCache: () => void;
2940
+ resultsCount: () => number;
2941
+ resetResultsCount: () => void;
2942
+ };
2943
+ lastResult: () => string;
2944
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
2945
+ clearCache: () => void;
2946
+ resultsCount: () => number;
2947
+ resetResultsCount: () => void;
2948
+ } & {
2949
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
2950
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
2951
+ clearCache: () => void;
2952
+ resultsCount: () => number;
2953
+ resetResultsCount: () => void;
2954
+ };
2955
+ lastResult: () => ReduxLayer | undefined;
2956
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
2957
+ recomputations: () => number;
2958
+ resetRecomputations: () => void;
2959
+ dependencyRecomputations: () => number;
2960
+ resetDependencyRecomputations: () => void;
2961
+ } & {
2962
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2963
+ memoize: typeof import("reselect").weakMapMemoize;
2964
+ }];
2965
+ recomputations: () => number;
2966
+ resetRecomputations: () => void;
2967
+ dependencyRecomputations: () => number;
2968
+ resetDependencyRecomputations: () => void;
2969
+ } & {
2970
+ argsMemoize: typeof import("reselect").weakMapMemoize;
2971
+ memoize: typeof import("reselect").weakMapMemoize;
2972
+ }, ((state: any, layerId: any) => LayerType | "mapLayer") & {
2973
+ clearCache: () => void;
2974
+ resultsCount: () => number;
2975
+ resetResultsCount: () => void;
2976
+ } & {
2977
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => LayerType | "mapLayer";
2978
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => LayerType | "mapLayer") & {
2979
+ clearCache: () => void;
2980
+ resultsCount: () => number;
2981
+ resetResultsCount: () => void;
2982
+ };
2983
+ lastResult: () => LayerType | "mapLayer";
2984
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
2985
+ clearCache: () => void;
2986
+ resultsCount: () => number;
2987
+ resetResultsCount: () => void;
2988
+ } & {
2989
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
2990
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
2991
+ clearCache: () => void;
2992
+ resultsCount: () => number;
2993
+ resetResultsCount: () => void;
2994
+ };
2995
+ lastResult: () => ReduxLayer | undefined;
2996
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
2997
+ recomputations: () => number;
2998
+ resetRecomputations: () => void;
2999
+ dependencyRecomputations: () => number;
3000
+ resetDependencyRecomputations: () => void;
3001
+ } & {
3002
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3003
+ memoize: typeof import("reselect").weakMapMemoize;
3004
+ }];
3005
+ recomputations: () => number;
3006
+ resetRecomputations: () => void;
3007
+ dependencyRecomputations: () => number;
3008
+ resetDependencyRecomputations: () => void;
3009
+ } & {
3010
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3011
+ memoize: typeof import("reselect").weakMapMemoize;
3012
+ }, ((state: any, layerId: any) => import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined) & {
3013
+ clearCache: () => void;
3014
+ resultsCount: () => number;
3015
+ resetResultsCount: () => void;
3016
+ } & {
3017
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined;
3018
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined) & {
3019
+ clearCache: () => void;
3020
+ resultsCount: () => number;
3021
+ resetResultsCount: () => void;
3022
+ };
3023
+ lastResult: () => import("@opengeoweb/webmap").EDRFeatureLayerOptions | import("@opengeoweb/webmap").STACGeoTIFFLayerOptions | undefined;
3024
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
3025
+ clearCache: () => void;
3026
+ resultsCount: () => number;
3027
+ resetResultsCount: () => void;
3028
+ } & {
3029
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
3030
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
3031
+ clearCache: () => void;
3032
+ resultsCount: () => number;
3033
+ resetResultsCount: () => void;
3034
+ };
3035
+ lastResult: () => ReduxLayer | undefined;
3036
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
3037
+ recomputations: () => number;
3038
+ resetRecomputations: () => void;
3039
+ dependencyRecomputations: () => number;
3040
+ resetDependencyRecomputations: () => void;
3041
+ } & {
3042
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3043
+ memoize: typeof import("reselect").weakMapMemoize;
3044
+ }];
3045
+ recomputations: () => number;
3046
+ resetRecomputations: () => void;
3047
+ dependencyRecomputations: () => number;
3048
+ resetDependencyRecomputations: () => void;
3049
+ } & {
3050
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3051
+ memoize: typeof import("reselect").weakMapMemoize;
3052
+ }];
3053
+ recomputations: () => number;
3054
+ resetRecomputations: () => void;
3055
+ dependencyRecomputations: () => number;
3056
+ resetDependencyRecomputations: () => void;
3057
+ } & {
3058
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3059
+ memoize: typeof import("reselect").weakMapMemoize;
3060
+ }, ((state: any, layerId: any) => LayerStatus) & {
3061
+ clearCache: () => void;
3062
+ resultsCount: () => number;
3063
+ resetResultsCount: () => void;
3064
+ } & {
3065
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => LayerStatus;
3066
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => LayerStatus) & {
3067
+ clearCache: () => void;
3068
+ resultsCount: () => number;
3069
+ resetResultsCount: () => void;
3070
+ };
3071
+ lastResult: () => LayerStatus;
3072
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
3073
+ clearCache: () => void;
3074
+ resultsCount: () => number;
3075
+ resetResultsCount: () => void;
3076
+ } & {
3077
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
3078
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
3079
+ clearCache: () => void;
3080
+ resultsCount: () => number;
3081
+ resetResultsCount: () => void;
3082
+ };
3083
+ lastResult: () => ReduxLayer | undefined;
3084
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
3085
+ recomputations: () => number;
3086
+ resetRecomputations: () => void;
3087
+ dependencyRecomputations: () => number;
3088
+ resetDependencyRecomputations: () => void;
3089
+ } & {
3090
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3091
+ memoize: typeof import("reselect").weakMapMemoize;
3092
+ }];
3093
+ recomputations: () => number;
3094
+ resetRecomputations: () => void;
3095
+ dependencyRecomputations: () => number;
3096
+ resetDependencyRecomputations: () => void;
3097
+ } & {
3098
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3099
+ memoize: typeof import("reselect").weakMapMemoize;
3100
+ }, ((state: any, layerId: any) => LayerType | "mapLayer") & {
3101
+ clearCache: () => void;
3102
+ resultsCount: () => number;
3103
+ resetResultsCount: () => void;
3104
+ } & {
3105
+ resultFunc: (resultFuncArgs_0: ReduxLayer | undefined) => LayerType | "mapLayer";
3106
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxLayer | undefined) => LayerType | "mapLayer") & {
3107
+ clearCache: () => void;
3108
+ resultsCount: () => number;
3109
+ resetResultsCount: () => void;
3110
+ };
3111
+ lastResult: () => LayerType | "mapLayer";
3112
+ dependencies: [((state: any, layerId: any) => ReduxLayer | undefined) & {
3113
+ clearCache: () => void;
3114
+ resultsCount: () => number;
3115
+ resetResultsCount: () => void;
3116
+ } & {
3117
+ resultFunc: (resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined;
3118
+ memoizedResultFunc: ((resultFuncArgs_0: LayerState | undefined, resultFuncArgs_1: string) => ReduxLayer | undefined) & {
3119
+ clearCache: () => void;
3120
+ resultsCount: () => number;
3121
+ resetResultsCount: () => void;
3122
+ };
3123
+ lastResult: () => ReduxLayer | undefined;
3124
+ dependencies: [(store: CoreAppStore) => LayerState | undefined, (layerStore: any, layerId: any) => string];
3125
+ recomputations: () => number;
3126
+ resetRecomputations: () => void;
3127
+ dependencyRecomputations: () => number;
3128
+ resetDependencyRecomputations: () => void;
3129
+ } & {
3130
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3131
+ memoize: typeof import("reselect").weakMapMemoize;
3132
+ }];
3133
+ recomputations: () => number;
3134
+ resetRecomputations: () => void;
3135
+ dependencyRecomputations: () => number;
3136
+ resetDependencyRecomputations: () => void;
3137
+ } & {
3138
+ argsMemoize: typeof import("reselect").weakMapMemoize;
3139
+ memoize: typeof import("reselect").weakMapMemoize;
3140
+ }];
2650
3141
  recomputations: () => number;
2651
3142
  resetRecomputations: () => void;
2652
3143
  dependencyRecomputations: () => number;
@@ -5,6 +5,7 @@ import type { LayerState } from './types';
5
5
  export declare const trimTrailingSlashes: (url: string) => string;
6
6
  export declare const getSTACServiceRootUrl: (serviceUrl: string) => string;
7
7
  export declare const getEDRServiceRootUrl: (serviceUrl: string) => string;
8
+ export declare const getEDRCollectionId: (serviceUrl: string) => string;
8
9
  export declare const getTrailingSlashVariant: (url: string) => string;
9
10
  /**
10
11
  * Generates a unique id for a geoJSON feature. Feature ids need to be stable
@@ -1,5 +1,5 @@
1
- import type { LayerProps, Style } from '@opengeoweb/webmap';
2
- import type { ServiceState, ReduxService } from './types';
1
+ import type { Style } from '@opengeoweb/webmap';
2
+ import type { ServiceState, ServiceLayer, ReduxService } from './types';
3
3
  import type { CoreAppStore } from '../../types';
4
4
  /**
5
5
  * Retrieves all serviceIds
@@ -93,18 +93,18 @@ export declare const getServiceByUrl: ((state: CoreAppStore, serviceUrl: string)
93
93
  * @param {string} serviceUrl serviceUrl: string - Url of the service where the layer belongs to
94
94
  * @returns {array} returnType: ServiceLayer[] - All layers within the service object.
95
95
  */
96
- export declare const getLayersFromServiceSelector: ((state: CoreAppStore, serviceUrl: string) => LayerProps[]) & {
96
+ export declare const getLayersFromServiceSelector: ((state: CoreAppStore, serviceUrl: string) => ServiceLayer[]) & {
97
97
  clearCache: () => void;
98
98
  resultsCount: () => number;
99
99
  resetResultsCount: () => void;
100
100
  } & {
101
- resultFunc: (resultFuncArgs_0: ReduxService | undefined) => LayerProps[];
102
- memoizedResultFunc: ((resultFuncArgs_0: ReduxService | undefined) => LayerProps[]) & {
101
+ resultFunc: (resultFuncArgs_0: ReduxService | undefined) => ServiceLayer[];
102
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxService | undefined) => ServiceLayer[]) & {
103
103
  clearCache: () => void;
104
104
  resultsCount: () => number;
105
105
  resetResultsCount: () => void;
106
106
  };
107
- lastResult: () => LayerProps[];
107
+ lastResult: () => ServiceLayer[];
108
108
  dependencies: [((state: CoreAppStore, serviceUrl: string) => ReduxService | undefined) & {
109
109
  clearCache: () => void;
110
110
  resultsCount: () => number;
@@ -143,30 +143,30 @@ export declare const getLayersFromServiceSelector: ((state: CoreAppStore, servic
143
143
  * @param {string} layerName layerName: string - Name of the layer in the service
144
144
  * @returns {ServiceLayer} returnType: ServiceLayer - The layer from the service object.
145
145
  */
146
- export declare const getLayerFromService: ((state: CoreAppStore, _serviceUrl: string, layerName: string) => LayerProps | undefined) & {
146
+ export declare const getLayerFromService: ((state: CoreAppStore, _serviceUrl: string, layerName: string) => ServiceLayer | undefined) & {
147
147
  clearCache: () => void;
148
148
  resultsCount: () => number;
149
149
  resetResultsCount: () => void;
150
150
  } & {
151
- resultFunc: (resultFuncArgs_0: LayerProps[], resultFuncArgs_1: string) => LayerProps | undefined;
152
- memoizedResultFunc: ((resultFuncArgs_0: LayerProps[], resultFuncArgs_1: string) => LayerProps | undefined) & {
151
+ resultFunc: (resultFuncArgs_0: ServiceLayer[], resultFuncArgs_1: string) => ServiceLayer | undefined;
152
+ memoizedResultFunc: ((resultFuncArgs_0: ServiceLayer[], resultFuncArgs_1: string) => ServiceLayer | undefined) & {
153
153
  clearCache: () => void;
154
154
  resultsCount: () => number;
155
155
  resetResultsCount: () => void;
156
156
  };
157
- lastResult: () => LayerProps | undefined;
158
- dependencies: [((state: CoreAppStore, serviceUrl: string) => LayerProps[]) & {
157
+ lastResult: () => ServiceLayer | undefined;
158
+ dependencies: [((state: CoreAppStore, serviceUrl: string) => ServiceLayer[]) & {
159
159
  clearCache: () => void;
160
160
  resultsCount: () => number;
161
161
  resetResultsCount: () => void;
162
162
  } & {
163
- resultFunc: (resultFuncArgs_0: ReduxService | undefined) => LayerProps[];
164
- memoizedResultFunc: ((resultFuncArgs_0: ReduxService | undefined) => LayerProps[]) & {
163
+ resultFunc: (resultFuncArgs_0: ReduxService | undefined) => ServiceLayer[];
164
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxService | undefined) => ServiceLayer[]) & {
165
165
  clearCache: () => void;
166
166
  resultsCount: () => number;
167
167
  resetResultsCount: () => void;
168
168
  };
169
- lastResult: () => LayerProps[];
169
+ lastResult: () => ServiceLayer[];
170
170
  dependencies: [((state: CoreAppStore, serviceUrl: string) => ReduxService | undefined) & {
171
171
  clearCache: () => void;
172
172
  resultsCount: () => number;
@@ -218,37 +218,37 @@ export declare const getLayerStyles: ((state: CoreAppStore, _serviceUrl: string,
218
218
  resultsCount: () => number;
219
219
  resetResultsCount: () => void;
220
220
  } & {
221
- resultFunc: (resultFuncArgs_0: LayerProps | undefined) => Style[];
222
- memoizedResultFunc: ((resultFuncArgs_0: LayerProps | undefined) => Style[]) & {
221
+ resultFunc: (resultFuncArgs_0: ServiceLayer | undefined) => Style[];
222
+ memoizedResultFunc: ((resultFuncArgs_0: ServiceLayer | undefined) => Style[]) & {
223
223
  clearCache: () => void;
224
224
  resultsCount: () => number;
225
225
  resetResultsCount: () => void;
226
226
  };
227
227
  lastResult: () => Style[];
228
- dependencies: [((state: CoreAppStore, _serviceUrl: string, layerName: string) => LayerProps | undefined) & {
228
+ dependencies: [((state: CoreAppStore, _serviceUrl: string, layerName: string) => ServiceLayer | undefined) & {
229
229
  clearCache: () => void;
230
230
  resultsCount: () => number;
231
231
  resetResultsCount: () => void;
232
232
  } & {
233
- resultFunc: (resultFuncArgs_0: LayerProps[], resultFuncArgs_1: string) => LayerProps | undefined;
234
- memoizedResultFunc: ((resultFuncArgs_0: LayerProps[], resultFuncArgs_1: string) => LayerProps | undefined) & {
233
+ resultFunc: (resultFuncArgs_0: ServiceLayer[], resultFuncArgs_1: string) => ServiceLayer | undefined;
234
+ memoizedResultFunc: ((resultFuncArgs_0: ServiceLayer[], resultFuncArgs_1: string) => ServiceLayer | undefined) & {
235
235
  clearCache: () => void;
236
236
  resultsCount: () => number;
237
237
  resetResultsCount: () => void;
238
238
  };
239
- lastResult: () => LayerProps | undefined;
240
- dependencies: [((state: CoreAppStore, serviceUrl: string) => LayerProps[]) & {
239
+ lastResult: () => ServiceLayer | undefined;
240
+ dependencies: [((state: CoreAppStore, serviceUrl: string) => ServiceLayer[]) & {
241
241
  clearCache: () => void;
242
242
  resultsCount: () => number;
243
243
  resetResultsCount: () => void;
244
244
  } & {
245
- resultFunc: (resultFuncArgs_0: ReduxService | undefined) => LayerProps[];
246
- memoizedResultFunc: ((resultFuncArgs_0: ReduxService | undefined) => LayerProps[]) & {
245
+ resultFunc: (resultFuncArgs_0: ReduxService | undefined) => ServiceLayer[];
246
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxService | undefined) => ServiceLayer[]) & {
247
247
  clearCache: () => void;
248
248
  resultsCount: () => number;
249
249
  resetResultsCount: () => void;
250
250
  };
251
- lastResult: () => LayerProps[];
251
+ lastResult: () => ServiceLayer[];
252
252
  dependencies: [((state: CoreAppStore, serviceUrl: string) => ReduxService | undefined) & {
253
253
  clearCache: () => void;
254
254
  resultsCount: () => number;
@@ -308,37 +308,37 @@ export declare const getLayerTitle: ((state: CoreAppStore, _serviceUrl: string,
308
308
  resultsCount: () => number;
309
309
  resetResultsCount: () => void;
310
310
  } & {
311
- resultFunc: (resultFuncArgs_0: LayerProps | undefined) => string | undefined;
312
- memoizedResultFunc: ((resultFuncArgs_0: LayerProps | undefined) => string | undefined) & {
311
+ resultFunc: (resultFuncArgs_0: ServiceLayer | undefined) => string | undefined;
312
+ memoizedResultFunc: ((resultFuncArgs_0: ServiceLayer | undefined) => string | undefined) & {
313
313
  clearCache: () => void;
314
314
  resultsCount: () => number;
315
315
  resetResultsCount: () => void;
316
316
  };
317
317
  lastResult: () => string | undefined;
318
- dependencies: [((state: CoreAppStore, _serviceUrl: string, layerName: string) => LayerProps | undefined) & {
318
+ dependencies: [((state: CoreAppStore, _serviceUrl: string, layerName: string) => ServiceLayer | undefined) & {
319
319
  clearCache: () => void;
320
320
  resultsCount: () => number;
321
321
  resetResultsCount: () => void;
322
322
  } & {
323
- resultFunc: (resultFuncArgs_0: LayerProps[], resultFuncArgs_1: string) => LayerProps | undefined;
324
- memoizedResultFunc: ((resultFuncArgs_0: LayerProps[], resultFuncArgs_1: string) => LayerProps | undefined) & {
323
+ resultFunc: (resultFuncArgs_0: ServiceLayer[], resultFuncArgs_1: string) => ServiceLayer | undefined;
324
+ memoizedResultFunc: ((resultFuncArgs_0: ServiceLayer[], resultFuncArgs_1: string) => ServiceLayer | undefined) & {
325
325
  clearCache: () => void;
326
326
  resultsCount: () => number;
327
327
  resetResultsCount: () => void;
328
328
  };
329
- lastResult: () => LayerProps | undefined;
330
- dependencies: [((state: CoreAppStore, serviceUrl: string) => LayerProps[]) & {
329
+ lastResult: () => ServiceLayer | undefined;
330
+ dependencies: [((state: CoreAppStore, serviceUrl: string) => ServiceLayer[]) & {
331
331
  clearCache: () => void;
332
332
  resultsCount: () => number;
333
333
  resetResultsCount: () => void;
334
334
  } & {
335
- resultFunc: (resultFuncArgs_0: ReduxService | undefined) => LayerProps[];
336
- memoizedResultFunc: ((resultFuncArgs_0: ReduxService | undefined) => LayerProps[]) & {
335
+ resultFunc: (resultFuncArgs_0: ReduxService | undefined) => ServiceLayer[];
336
+ memoizedResultFunc: ((resultFuncArgs_0: ReduxService | undefined) => ServiceLayer[]) & {
337
337
  clearCache: () => void;
338
338
  resultsCount: () => number;
339
339
  resetResultsCount: () => void;
340
340
  };
341
- lastResult: () => LayerProps[];
341
+ lastResult: () => ServiceLayer[];
342
342
  dependencies: [((state: CoreAppStore, serviceUrl: string) => ReduxService | undefined) & {
343
343
  clearCache: () => void;
344
344
  resultsCount: () => number;
@@ -1,5 +1,5 @@
1
1
  import type { ServiceInterface, SystemScope } from '@opengeoweb/shared';
2
- import type { LayerProps } from '@opengeoweb/webmap';
2
+ import type { EDRParameterMetadata, LayerProps } from '@opengeoweb/webmap';
3
3
  export interface InitialService {
4
4
  id: string;
5
5
  name: string;
@@ -23,7 +23,10 @@ export interface ReduxService {
23
23
  /**
24
24
  Used in the services object of webmap to keep a list of available layers in the service
25
25
  */
26
- export type ServiceLayer = LayerProps;
26
+ export interface ServiceLayer extends LayerProps {
27
+ edrCollectionId?: string;
28
+ edrParameter?: EDRParameterMetadata;
29
+ }
27
30
  export interface ServiceState {
28
31
  byId: Services;
29
32
  allIds: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/store",
3
- "version": "21.1.0",
3
+ "version": "21.2.0",
4
4
  "description": "GeoWeb Store library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -20,15 +20,15 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@opengeoweb/shared": "21.1.0",
23
+ "@opengeoweb/shared": "21.2.0",
24
24
  "react-redux": "^9.2.0",
25
25
  "@reduxjs/toolkit": "^2.6.1",
26
- "@opengeoweb/webmap-react": "21.1.0",
27
- "@opengeoweb/webmap": "21.1.0",
26
+ "@opengeoweb/webmap-react": "21.2.0",
27
+ "@opengeoweb/webmap": "21.2.0",
28
28
  "immer": "^10.0.3",
29
29
  "lodash": "^4.18.1",
30
- "@opengeoweb/metronome": "21.1.0",
31
- "@opengeoweb/time-slider": "21.1.0",
30
+ "@opengeoweb/metronome": "21.2.0",
31
+ "@opengeoweb/time-slider": "21.2.0",
32
32
  "ol": "^10.4.0",
33
33
  "@turf/turf": "^7.2.0",
34
34
  "@types/geojson": "^7946.0.14",