@opengeoweb/webmap-react 14.4.0 → 14.5.1

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 (109) hide show
  1. package/index.esm.js +7074 -6072
  2. package/package.json +4 -4
  3. package/src/index.d.ts +2 -2
  4. package/src/lib/components/LayerInfo/LayerInfoButton.d.ts +1 -2
  5. package/src/lib/components/LayerInfo/LayerInfoDialog.d.ts +2 -3
  6. package/src/lib/components/LayerInfo/LayerInfoLegend.d.ts +1 -2
  7. package/src/lib/components/LayerInfo/LayerInfoList.d.ts +0 -1
  8. package/src/lib/components/LayerInfo/LayerInfoText.d.ts +0 -1
  9. package/src/lib/components/LayerInfo/LayerInfoUtils.d.ts +3 -4
  10. package/src/lib/components/Legend/Legend.d.ts +1 -1
  11. package/src/lib/components/Legend/LegendButton.d.ts +1 -1
  12. package/src/lib/components/Legend/LegendDialog.d.ts +3 -3
  13. package/src/lib/components/Legend/LegendLayout.d.ts +1 -2
  14. package/src/lib/components/MapControls/MapControlButton.d.ts +3 -3
  15. package/src/lib/components/MapControls/MapControls.d.ts +1 -1
  16. package/src/lib/components/MapControls/ZoomControls.d.ts +1 -1
  17. package/src/lib/components/MapDimensionSelect/DimensionSelectButton.d.ts +1 -1
  18. package/src/lib/components/MapDimensionSelect/DimensionSelectDialog.d.ts +2 -2
  19. package/src/lib/components/MapDimensionSelect/DimensionSelectSlider.d.ts +2 -2
  20. package/src/lib/components/MapDimensionSelect/MapDimensionSelect.d.ts +2 -2
  21. package/src/lib/components/MapDimensionSelect/MapDimensionSelect.stories.d.ts +1 -1
  22. package/src/lib/components/MapDimensionSelect/utils.d.ts +4 -4
  23. package/src/lib/components/MapMeasure/MapMeasure.d.ts +1 -0
  24. package/src/lib/components/MapMousePosition/MapMousePosition.d.ts +1 -1
  25. package/src/lib/components/MapTime/MapTime.d.ts +2 -2
  26. package/src/lib/components/MapWarning/MapWarningProperties.d.ts +0 -1
  27. package/src/lib/components/OpenLayers/OlStyles.d.ts +19 -6
  28. package/src/lib/components/OpenLayers/OpenLayers.ClickFeatureLayer.stories.d.ts +1 -1
  29. package/src/lib/components/OpenLayers/OpenLayers.ClickOnMapTool.stories.d.ts +1 -1
  30. package/src/lib/components/OpenLayers/OpenLayers.FeatureLayer.stories.d.ts +1 -1
  31. package/src/lib/components/OpenLayers/OpenLayers.FeatureLayerOpacity.stories.d.ts +1 -1
  32. package/src/lib/components/OpenLayers/OpenLayers.GeoTIFFLayer.stories.d.ts +17 -0
  33. package/src/lib/components/OpenLayers/OpenLayers.GetFeatureInfo.stories.d.ts +1 -1
  34. package/src/lib/components/OpenLayers/OpenLayers.HoverFeatureLayer.stories.d.ts +1 -1
  35. package/src/lib/components/OpenLayers/OpenLayers.Prefetch.stories.d.ts +1 -1
  36. package/src/lib/components/OpenLayers/OpenLayers.TimeAwareWMTSLayer.stories.d.ts +10 -0
  37. package/src/lib/components/OpenLayers/component/OpenLayersMapView.d.ts +1 -1
  38. package/src/lib/components/OpenLayers/context/MapContext.d.ts +1 -1
  39. package/src/lib/components/OpenLayers/context/TimeContext.d.ts +1 -1
  40. package/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +1 -1
  41. package/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.d.ts +1 -1
  42. package/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.d.ts +3 -3
  43. package/src/lib/components/OpenLayers/draw/geojsonShapes.d.ts +1 -0
  44. package/src/lib/components/OpenLayers/draw/mapDrawUtils.d.ts +4 -1
  45. package/src/lib/components/OpenLayers/draw/storyComponents/EditModeButton.d.ts +0 -1
  46. package/src/lib/components/OpenLayers/draw/storyComponents/FeatureLayers.d.ts +0 -1
  47. package/src/lib/components/OpenLayers/draw/storyComponents/GeoJSONTextField.d.ts +1 -1
  48. package/src/lib/components/OpenLayers/draw/storyComponents/SelectField.d.ts +0 -1
  49. package/src/lib/components/OpenLayers/draw/storyComponents/StoryLayout.d.ts +2 -3
  50. package/src/lib/components/OpenLayers/draw/storyComponents/StoryLayoutGrid.d.ts +0 -1
  51. package/src/lib/components/OpenLayers/draw/storyComponents/ToolButton.d.ts +1 -2
  52. package/src/lib/components/OpenLayers/draw/storyExamplesMapDrawTool.d.ts +2 -3
  53. package/src/lib/components/OpenLayers/draw/storyExamplesMapDrawToolIntersection.d.ts +2 -3
  54. package/src/lib/components/OpenLayers/draw/storyExamplesMapDrawToolMultipleDrawTools.d.ts +2 -3
  55. package/src/lib/components/OpenLayers/draw/types.d.ts +1 -1
  56. package/src/lib/components/OpenLayers/draw/useMapDrawTool.d.ts +2 -2
  57. package/src/lib/components/OpenLayers/index.d.ts +1 -1
  58. package/src/lib/components/OpenLayers/layers/DefaultBaseLayers.d.ts +0 -1
  59. package/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +3 -3
  60. package/src/lib/components/OpenLayers/layers/GeoTIFFLayer.d.ts +11 -0
  61. package/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +3 -3
  62. package/src/lib/components/OpenLayers/layers/OpenLayersLayer.d.ts +2 -2
  63. package/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +2 -2
  64. package/src/lib/components/OpenLayers/layers/TimeAwareEDRLocationLayer.d.ts +0 -1
  65. package/src/lib/components/OpenLayers/layers/TimeAwareGeoTIFFLayer.d.ts +15 -0
  66. package/src/lib/components/OpenLayers/layers/TimeAwareWMTSLayer.d.ts +17 -0
  67. package/src/lib/components/OpenLayers/layers/TimeAwareWMTSLayer.spec.d.ts +1 -0
  68. package/src/lib/components/OpenLayers/layers/TimeawareGeoTIFFLayer.spec.d.ts +1 -0
  69. package/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +1 -1
  70. package/src/lib/components/OpenLayers/layers/WMSLayer.d.ts +1 -1
  71. package/src/lib/components/OpenLayers/layers/WMTSLayer.d.ts +1 -1
  72. package/src/lib/components/OpenLayers/layers/XYZLayer.d.ts +1 -1
  73. package/src/lib/components/OpenLayers/layers/index.d.ts +2 -0
  74. package/src/lib/components/OpenLayers/layers/utils.d.ts +2 -0
  75. package/src/lib/components/OpenLayers/layers/utils.spec.d.ts +1 -0
  76. package/src/lib/components/OpenLayers/storyComponents/OlStoryLayout.d.ts +2 -2
  77. package/src/lib/components/OpenLayers/styles/useIconStyle.d.ts +1 -1
  78. package/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +1 -1
  79. package/src/lib/components/OpenLayers/useProjectionDropDown.d.ts +2 -2
  80. package/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.d.ts +3 -3
  81. package/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +4 -3
  82. package/src/lib/components/OpenLayers/utils/TimeawareImageSource.d.ts +3 -3
  83. package/src/lib/components/OpenLayers/utils/WorkerQueue.d.ts +1 -1
  84. package/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.d.ts +2 -2
  85. package/src/lib/components/OpenLayers/utils/projections.d.ts +1 -1
  86. package/src/lib/components/OpenLayers/utils/setMapCenter.d.ts +1 -1
  87. package/src/lib/components/OpenLayers/utils/types.d.ts +2 -2
  88. package/src/lib/components/OpenLayers/utils/viewUtils.d.ts +2 -2
  89. package/src/lib/components/Providers/Providers.d.ts +1 -2
  90. package/src/lib/components/TanStackDemo/TanStackDemo.GetCapabilitiesLiveUpdate.stories.d.ts +1 -1
  91. package/src/lib/components/TanStackDemo/storyUtils.d.ts +1 -1
  92. package/src/lib/components/WMSViewerDemo/components/WMSDimTimeYearSelector.d.ts +1 -1
  93. package/src/lib/components/WMSViewerDemo/components/WMSLayerSelector.d.ts +2 -2
  94. package/src/lib/components/WMSViewerDemo/components/WMSStyleSelector.d.ts +2 -2
  95. package/src/lib/components/WMSViewerDemo/components/WMSTimeSlider.d.ts +1 -1
  96. package/src/lib/edr-layer-api/api.d.ts +2 -2
  97. package/src/lib/edr-layer-api/colormaps/edrOlLegendUtils.d.ts +2 -2
  98. package/src/lib/edr-layer-api/hooks.d.ts +2 -2
  99. package/src/lib/geotiff-layer-api/api.d.ts +43 -0
  100. package/src/lib/geotiff-layer-api/fakeApi.d.ts +1 -0
  101. package/src/lib/geotiff-layer-api/hooks.d.ts +5 -0
  102. package/src/lib/geotiff-layer-api/utils/useGetStacGeoTIFFLayerInstance .d.ts +11 -0
  103. package/src/lib/hooks/useAnimationForLayer.d.ts +2 -2
  104. package/src/lib/hooks/useHooksGetCapabilities.d.ts +12 -9
  105. package/src/lib/index.d.ts +1 -1
  106. package/src/lib/types/index.d.ts +1 -1
  107. package/src/lib/types/types.d.ts +1 -1
  108. package/src/lib/utils/i18n.d.ts +3 -2
  109. package/src/lib/utils/utils.d.ts +2 -2
@@ -0,0 +1,17 @@
1
+ import TileLayer from 'ol/layer/Tile';
2
+ import type { Dimension } from '@opengeoweb/webmap';
3
+ import type { OnInitializeLayerProps } from '../utils/types';
4
+ export interface TimeAwareWMTSLayerProps {
5
+ layerId?: string;
6
+ getCapsURL: string;
7
+ layerName: string;
8
+ styleName?: string;
9
+ layerOptions: ConstructorParameters<typeof TileLayer>[0];
10
+ dimensions?: Dimension[];
11
+ visible?: boolean;
12
+ onInitializeLayer?: (payload: OnInitializeLayerProps) => void;
13
+ onLayerReady?: (layerId: string) => void;
14
+ onLayerError?: (layerId: string, message: string) => void;
15
+ debugMode?: boolean;
16
+ }
17
+ export declare const TimeAwareWMTSLayer: React.FC<TimeAwareWMTSLayerProps>;
@@ -1,5 +1,5 @@
1
1
  import ImageLayer from 'ol/layer/Image';
2
- import { Dimension } from '@opengeoweb/webmap';
2
+ import type { Dimension } from '@opengeoweb/webmap';
3
3
  import type { OnInitializeLayerProps } from '../utils/types';
4
4
  interface TimeawareImageSourceWMSLayerProps {
5
5
  layerId?: string;
@@ -1,5 +1,5 @@
1
1
  import ImageLayer from 'ol/layer/Image';
2
- import { LayerFoundation } from '@opengeoweb/webmap';
2
+ import type { LayerFoundation } from '@opengeoweb/webmap';
3
3
  export interface WMSLayerProps {
4
4
  url: string;
5
5
  layerName: string;
@@ -1,5 +1,5 @@
1
1
  import TileLayer from 'ol/layer/Tile';
2
- import { LayerFoundation } from '@opengeoweb/webmap';
2
+ import type { LayerFoundation } from '@opengeoweb/webmap';
3
3
  export interface WMTSLayerProps {
4
4
  getCapsURL: string;
5
5
  layerName: string;
@@ -1,5 +1,5 @@
1
1
  import TileLayer from 'ol/layer/Tile';
2
- import { LayerFoundation } from '@opengeoweb/webmap';
2
+ import type { LayerFoundation } from '@opengeoweb/webmap';
3
3
  export interface XYZLayerProps {
4
4
  urlTemplate: string;
5
5
  layerOptions: ConstructorParameters<typeof TileLayer>[0];
@@ -7,3 +7,5 @@ export * from './OpenLayersLayer';
7
7
  export * from './FeatureLayer';
8
8
  export * from './OpenLayersFeatureLayer';
9
9
  export * from './TimeAwareEDRLocationLayer';
10
+ export * from './TimeAwareWMTSLayer';
11
+ export * from './TimeAwareGeoTIFFLayer';
@@ -0,0 +1,2 @@
1
+ import type { Dimension } from '@opengeoweb/webmap';
2
+ export declare const WMTSDimensionsFromDimensions: (dimensions: Dimension[]) => Record<string, string>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { OpenLayersLayerProps } from '../layers';
3
- import { DrawModeExitCallback } from '../draw';
2
+ import type { DrawModeExitCallback } from '../draw';
3
+ import type { OpenLayersLayerProps } from '../layers';
4
4
  interface OlStoryLayoutProps {
5
5
  layers: OpenLayersLayerProps[];
6
6
  children: React.ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { Style } from 'ol/style';
2
- import { Options } from 'ol/style/Icon';
2
+ import type { Options } from 'ol/style/Icon';
3
3
  type IconSVG = string | {
4
4
  path: string;
5
5
  width?: number;
@@ -1,4 +1,4 @@
1
- import { StyleLike } from 'ol/style/Style';
1
+ import type { StyleLike } from 'ol/style/Style';
2
2
  export interface ClickOnMapToolProps {
3
3
  isActive: boolean;
4
4
  isVisible: boolean;
@@ -1,7 +1,7 @@
1
- import { EPSGCode } from '@opengeoweb/shared';
2
- import { Bbox } from '@opengeoweb/webmap';
3
1
  import { View } from 'ol';
4
2
  import React from 'react';
3
+ import type { EPSGCode } from '@opengeoweb/shared';
4
+ import type { Bbox } from '@opengeoweb/webmap';
5
5
  export interface BboxAndSrs {
6
6
  srs: EPSGCode;
7
7
  bbox: Bbox;
@@ -1,6 +1,6 @@
1
- import { WMLayer } from '@opengeoweb/webmap';
2
- import ImageLayer from 'ol/layer/Image';
3
- import { TimeawareImageSource } from './TimeawareImageSource';
1
+ import type ImageLayer from 'ol/layer/Image';
2
+ import type { WMLayer } from '@opengeoweb/webmap';
3
+ import type { TimeawareImageSource } from './TimeawareImageSource';
4
4
  export interface ShowTimeAwareLayerInfoProps {
5
5
  wmLayer: WMLayer;
6
6
  stepsToCheck: number[];
@@ -1,7 +1,8 @@
1
- import { Extent } from 'ol/extent';
1
+ import type { Extent } from 'ol/extent';
2
2
  import ImageWrapper from 'ol/Image';
3
- import { Projection } from 'ol/proj';
4
- import { WMImage, WMImageStore } from '@opengeoweb/webmap';
3
+ import type { Projection } from 'ol/proj';
4
+ import type { WMImage } from '@opengeoweb/webmap';
5
+ import { WMImageStore } from '@opengeoweb/webmap';
5
6
  export declare const openLayersGetMapImageStore: WMImageStore;
6
7
  export declare const clearImageCacheForAllMaps: () => void;
7
8
  interface TimeAwareGeoreferencedImageSrc {
@@ -1,6 +1,6 @@
1
- import { Extent } from 'ol/extent';
2
- import ImageWrapper from 'ol/Image';
3
- import { Projection } from 'ol/proj';
1
+ import type { Extent } from 'ol/extent';
2
+ import type ImageWrapper from 'ol/Image';
3
+ import type { Projection } from 'ol/proj';
4
4
  import ImageSource from 'ol/source/Image';
5
5
  import TimeAwareImageWrapper from './TimeAwareImageWrapper';
6
6
  export declare const initImageWrapper: () => TimeAwareImageWrapper;
@@ -1,4 +1,4 @@
1
- import { WorkerQueueJob } from '../types/WorkerQueue';
1
+ import type { WorkerQueueJob } from '../types/WorkerQueue';
2
2
  export declare class WorkerQueue {
3
3
  maxConcurrency: number;
4
4
  tasksInProcess: WorkerQueueJob[];
@@ -1,5 +1,5 @@
1
- import { WMJSDimension, Dimension, WMLayer } from '@opengeoweb/webmap';
2
- import { Timespan } from '../types/Timespan';
1
+ import type { WMJSDimension, Dimension, WMLayer } from '@opengeoweb/webmap';
2
+ import type { Timespan } from '../types/Timespan';
3
3
  export declare const makeDimValuesToPrefetch: (wmTimeDim: WMJSDimension, stepsToCheck: number[], isAnimating: boolean) => string[];
4
4
  export declare const extendPrefetchListWithModelRunTimeSteps: (wmLayer: WMLayer, stepsToCheck: number[]) => number[];
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { LayerProps } from '@opengeoweb/webmap';
1
+ import type { LayerProps } from '@opengeoweb/webmap';
2
2
  export declare const initializeOpenLayersProjections: () => void;
3
3
  /**
4
4
  * Returns a preferred projection to use with a particular layer. It will search the layer props for
@@ -1,2 +1,2 @@
1
- import { Map } from 'ol';
1
+ import type { Map } from 'ol';
2
2
  export declare const setMapCenter: (map: Map, lon: number, lat: number, zoomLevel?: number) => void;
@@ -1,5 +1,5 @@
1
- import { Feature } from 'ol';
2
- import { Dimension } from '@opengeoweb/webmap';
1
+ import type { Feature } from 'ol';
2
+ import type { Dimension } from '@opengeoweb/webmap';
3
3
  export interface HoverSelect {
4
4
  onHover?: (f: Feature | undefined) => void;
5
5
  active: boolean;
@@ -1,6 +1,6 @@
1
- import { Bbox } from '@opengeoweb/webmap';
2
- import { FeatureCollection, Geometry, GeoJsonProperties } from 'geojson';
1
+ import type { FeatureCollection, Geometry, GeoJsonProperties } from 'geojson';
3
2
  import { View } from 'ol';
3
+ import type { Bbox } from '@opengeoweb/webmap';
4
4
  export declare const setViewFromExtent: (view: View, bbox: Bbox) => void;
5
5
  export declare const setViewFromFeature: (view: View, geojsonFeature: FeatureCollection<Geometry, GeoJsonProperties> | undefined) => void;
6
6
  export declare const makeView: (projectionCode?: string) => View;
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- import { ThemeProviderProps } from '@opengeoweb/theme';
1
+ import type { ThemeProviderProps } from '@opengeoweb/theme';
3
2
  export declare const WebmapReactThemeProvider: React.FC<ThemeProviderProps>;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  declare const _default: {
3
3
  title: string;
4
4
  };
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface StoryWrapperProps {
3
3
  children: [] | React.ReactElement;
4
4
  }
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export declare enum TimeMode {
3
3
  YEAR = 0,
4
4
  MONTH = 1,
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { LayerProps, LayerFoundation } from '@opengeoweb/webmap';
1
+ import React from 'react';
2
+ import type { LayerProps, LayerFoundation } from '@opengeoweb/webmap';
3
3
  interface WMSLayerSelectorProps {
4
4
  layer: LayerFoundation;
5
5
  layers: LayerProps[];
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- import { LayerFoundation } from '@opengeoweb/webmap';
1
+ import React from 'react';
2
+ import type { LayerFoundation } from '@opengeoweb/webmap';
3
3
  interface WMSStyleSelectorProps {
4
4
  layer: LayerFoundation;
5
5
  onSelectStyle: (layer: LayerFoundation) => void;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  interface WMSTimeSliderProps {
3
3
  selectedISOTime: string;
4
4
  layerId: string;
@@ -1,5 +1,5 @@
1
- import { Coverage, CoverageCollection, EDRInstance, PointDomain, PointSeriesDomain } from '@opengeoweb/shared';
2
- export declare const handleResponse: (response: Response) => Promise<any>;
1
+ import type { Coverage, CoverageCollection, EDRInstance, PointDomain, PointSeriesDomain } from '@opengeoweb/shared';
2
+ export declare const handleResponse: (response: Response) => Promise<unknown>;
3
3
  export declare const joinUrlParams: (params: string[]) => string;
4
4
  export declare const fetchEDRCollectionDetails: (edrBaseUrlWithCollection: string, instanceId?: string) => Promise<EDRInstance>;
5
5
  export declare const fetchEDRCube: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => Promise<CoverageCollection<PointDomain | PointSeriesDomain> | Coverage<PointDomain | PointSeriesDomain>>;
@@ -1,6 +1,6 @@
1
- import { FeatureLike } from 'ol/Feature';
1
+ import type { FeatureLike } from 'ol/Feature';
2
2
  import { Circle, Style } from 'ol/style';
3
- import { ColorMap } from './colormaps';
3
+ import type { ColorMap } from './colormaps';
4
4
  export interface EdrMapLegendEntry {
5
5
  min: number;
6
6
  max: number;
@@ -1,5 +1,5 @@
1
- import { UseQueryResult } from '@tanstack/react-query';
2
- import { EDRInstance } from '@opengeoweb/shared';
1
+ import type { UseQueryResult } from '@tanstack/react-query';
2
+ import type { EDRInstance } from '@opengeoweb/shared';
3
3
  export declare const webmapEDRQueryOptions: {
4
4
  readonly getCollectionDetailsQuery: (edrBaseUrlWithCollection: string, enabled: boolean, instanceId?: string) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<EDRInstance, Error, EDRInstance, string[]>, "queryFn"> & {
5
5
  queryFn?: import("@tanstack/react-query").QueryFunction<EDRInstance, string[], never> | undefined;
@@ -0,0 +1,43 @@
1
+ import type { Geometry } from 'geojson';
2
+ interface Properties {
3
+ datetime: string | null;
4
+ 'proj:wkt2'?: string;
5
+ }
6
+ interface STACAsset {
7
+ href: string;
8
+ type: string;
9
+ created: string;
10
+ }
11
+ interface STACExtent {
12
+ temporal: {
13
+ interval: string[][];
14
+ };
15
+ }
16
+ export interface STACLink {
17
+ href: string;
18
+ rel: string;
19
+ }
20
+ export interface STACItem {
21
+ type: 'Feature';
22
+ stac_version: string;
23
+ id: string;
24
+ geometry: Geometry | null;
25
+ bbox: number[];
26
+ properties: Properties;
27
+ links: STACLink[];
28
+ assets: Record<string, STACAsset>;
29
+ }
30
+ export interface STACCollection {
31
+ type: 'Collection';
32
+ stac_version: string;
33
+ id: string;
34
+ description: string;
35
+ license: string;
36
+ extent: STACExtent;
37
+ links: STACLink[];
38
+ features: STACItem[];
39
+ }
40
+ export declare const fetchStacCollection: (stacBaseUrlWithCollection: string) => Promise<STACCollection>;
41
+ export declare const fetchStacItem: (stacItemUrl: string) => Promise<STACItem>;
42
+ export declare const fetchStacItems: (collectionUrl: string) => Promise<STACItem[]>;
43
+ export {};
@@ -0,0 +1 @@
1
+ export declare const fakeStacApiHandlers: import("msw").HttpHandler[];
@@ -0,0 +1,5 @@
1
+ import type { UseQueryResult } from '@tanstack/react-query';
2
+ import type { STACCollection, STACItem } from './api';
3
+ export declare const useStacCollection: (stacBaseUrlWithCollection: string, instanceId?: string, enabled?: boolean) => UseQueryResult<STACCollection, Error>;
4
+ export declare const useStacItems: (stacBaseUrlWithCollection: string, startDate?: string, endDate?: string) => UseQueryResult<STACItem[], Error>;
5
+ export declare const useFetchGeoTIFFBlob: (url: string, enabled?: boolean) => UseQueryResult<Blob, Error>;
@@ -0,0 +1,11 @@
1
+ import { WMLayer } from '@opengeoweb/webmap';
2
+ import type { OnInitializeLayerProps } from '../../components/OpenLayers/utils/types';
3
+ /**
4
+ * Returns WMLayer instance in STAC GeoTIFF mode. The layer will contains parsed dimensions and styles and keeps a state for these properties.
5
+ *
6
+ * @param {string} serviceUrl
7
+ * @param {string} name
8
+ * @returns {(WMLayer | null)}
9
+ */
10
+ export declare const useGetStacGeoTIFFWMLayerInstance: (serviceUrl: string, name: string, id?: string, onLayerError?: (layerId: string, message: string) => void) => WMLayer | null;
11
+ export declare const useGetStacGeoTIFFLayerInstance: (stacCollectionURL: string, parameter: string, layerId?: string, onInitializeLayer?: (payload: OnInitializeLayerProps) => void) => WMLayer | null;
@@ -1,6 +1,6 @@
1
- import { Dimension } from '@opengeoweb/webmap';
1
+ import type { Dimension } from '@opengeoweb/webmap';
2
2
  import type { OpenLayersLayerProps } from '../components/OpenLayers/layers';
3
- import { TimeContextType } from '../components/OpenLayers/types/Timespan';
3
+ import type { TimeContextType } from '../components/OpenLayers/types/Timespan';
4
4
  interface UseAnimationForLayerProps {
5
5
  dimensions: Dimension[];
6
6
  timeContext: TimeContextType;
@@ -1,12 +1,13 @@
1
- import { GetCapabilitiesJson, WMSServiceInfo, LayerTree, LayerProps, WMLayer, Style } from '@opengeoweb/webmap';
2
- import { UseQueryResult } from '@tanstack/react-query';
1
+ import type { UseQueryResult } from '@tanstack/react-query';
2
+ import type { WMSServiceInfo, LayerTree, LayerProps, Style, OGCWMSWMTSGetCapabilities, LayerFoundation } from '@opengeoweb/webmap';
3
+ import { WMLayer } from '@opengeoweb/webmap';
3
4
  /**
4
5
  * Queries the WMS GetCapabilities. This is the base TanStack hook for the other hooks in this file.
5
6
  *
6
7
  * @param {string} serviceUrl
7
- * @returns {UseQueryResult<GetCapabilitiesJson>}
8
+ * @returns {UseQueryResult<WMSGetCapabilities>}
8
9
  */
9
- export declare const useQueryGetWMSGetCapabilities: (serviceUrl: string) => UseQueryResult<GetCapabilitiesJson>;
10
+ export declare const useQueryGetWMSGetCapabilities: (serviceUrl: string) => UseQueryResult<OGCWMSWMTSGetCapabilities>;
10
11
  /**
11
12
  * Returns details about the WMS service
12
13
  *
@@ -45,13 +46,15 @@ export declare const useQueryGetWMSLayer: (serviceUrl: string, name: string) =>
45
46
  */
46
47
  export declare const useGetWMSLayerStyleList: (serviceUrl: string, name: string) => Style[] | null;
47
48
  /**
48
- * Returns WMLayer instance. The layer will contains parsed dimensions and styles and keeps a state for these properties.
49
+ * Returns a WMLayer instance. If the layerType is LayerType.mapLayer or LayerType.wmtsMapLayer, the layer will detect the right type and will contain the parsed dimensions and styles.
49
50
  *
50
- * @param {string} serviceUrl
51
- * @param {string} name
52
- * @returns {(WMLayer | null)}
51
+ * @param layerFoundation
52
+ * @returns object with wmLayer and if set an errorMessage
53
53
  */
54
- export declare const useGetWMLayerInstance: (serviceUrl: string, name: string, id?: string, onLayerError?: (layerId: string, message: string) => void) => WMLayer | null;
54
+ export declare const useGetWMLayerInstance: (layerFoundation?: LayerFoundation) => {
55
+ wmLayer: WMLayer | null;
56
+ errorMessage: string | null;
57
+ };
55
58
  /**
56
59
  * Used for querying WMTS GetCapabilities documents
57
60
  * @param serviceUrl
@@ -2,6 +2,6 @@ export * from './components';
2
2
  export * from './layers';
3
3
  export * from './hooks';
4
4
  export * from './utils';
5
- export * from './types';
5
+ export type * from './types';
6
6
  export * from './edr-layer-api';
7
7
  export { WEBMAP_REACT_NAMESPACE } from './utils/i18n';
@@ -1 +1 @@
1
- export * from './types';
1
+ export type * from './types';
@@ -1,4 +1,4 @@
1
- import { Bbox, Dimension } from '@opengeoweb/webmap';
1
+ import type { Bbox, Dimension } from '@opengeoweb/webmap';
2
2
  export interface MapLocation {
3
3
  lat: number;
4
4
  lon: number;
@@ -1,5 +1,6 @@
1
- import i18n, { Namespace } from 'i18next';
2
- import { UseTranslationResponse } from 'react-i18next';
1
+ import type { Namespace } from 'i18next';
2
+ import i18n from 'i18next';
3
+ import type { UseTranslationResponse } from 'react-i18next';
3
4
  export declare const WEBMAP_REACT_NAMESPACE = "webmapreact";
4
5
  export declare const initWebmapReactTestI18n: () => void;
5
6
  export declare const translateInTestsAndStories: (key: string, params?: Record<string, string | number> | undefined, ns?: string) => string;
@@ -1,4 +1,4 @@
1
- import { Dimension, WMLayer } from '@opengeoweb/webmap';
2
- import { UpdateLayerInfoPayload } from '../types/types';
1
+ import type { Dimension, WMLayer } from '@opengeoweb/webmap';
2
+ import type { UpdateLayerInfoPayload } from '../types/types';
3
3
  export declare function getIsInsideAcceptanceTime(acceptanceTimeInMinutes: number | undefined, mapDimensions: Dimension[] | undefined, layerDimensions: Dimension[] | undefined): boolean;
4
4
  export declare const getLayerUpdateInfo: (wmLayer: WMLayer, mapId: string) => UpdateLayerInfoPayload;