@opengeoweb/webmap-react 12.9.1 → 12.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/index.esm.js +13869 -12571
  2. package/package.json +7 -4
  3. package/src/index.d.ts +2 -5
  4. package/src/lib/components/LayerInfo/LayerInfoDialog.stories.d.ts +1 -1
  5. package/src/lib/components/Legend/Legend.stories.d.ts +1 -1
  6. package/src/lib/components/MapDimensionSelect/DimensionSelectDialog.stories.d.ts +1 -1
  7. package/src/lib/components/MapDimensionSelect/MapDimensionSelect.stories.d.ts +1 -1
  8. package/src/lib/components/MapDraw/storyComponents/storyUtils.d.ts +0 -1
  9. package/src/lib/components/MapDrawTool/MapDrawTool.stories.d.ts +1 -1
  10. package/src/lib/components/MapDrawTool/MapDrawToolMultipleDrawTools.stories.d.ts +1 -1
  11. package/src/lib/components/MapDrawTool/storyExamplesMapDrawToolMultipleDrawTools.d.ts +1 -1
  12. package/src/lib/components/MapDrawTool/utils.d.ts +8 -8
  13. package/src/lib/components/OpenLayers/OlStyles.d.ts +1 -1
  14. package/src/lib/components/OpenLayers/OpenLayers.BaseLayer.stories.d.ts +1 -1
  15. package/src/lib/components/OpenLayers/OpenLayersMapView.Error.stories.d.ts +1 -1
  16. package/src/lib/components/OpenLayers/OpenLayersMapView.MapPin.stories.d.ts +1 -1
  17. package/src/lib/components/OpenLayers/OpenLayersMapView.Passive.stories.d.ts +1 -1
  18. package/src/lib/components/OpenLayers/OpenLayersMapView.RadarAnimation.stories.d.ts +1 -1
  19. package/src/lib/components/OpenLayers/OpenLayersMapView.RadarData.stories.d.ts +1 -1
  20. package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBox.stories.d.ts +1 -1
  21. package/src/lib/components/OpenLayers/OpenLayersMapView.SetProjectionBBoxLocalState.stories.d.ts +1 -1
  22. package/src/lib/components/OpenLayers/OpenLayersMapView.ShiftToZoom.stories.d.ts +1 -1
  23. package/src/lib/components/OpenLayers/OpenLayersMapView.ShowLayerInfo.stories.d.ts +1 -1
  24. package/src/lib/components/OpenLayers/OpenLayersMapView.TiledBaseLayers.stories.d.ts +1 -1
  25. package/src/lib/components/OpenLayers/OpenLayersMapView.VFXData.stories.d.ts +1 -1
  26. package/src/lib/components/OpenLayers/context/MapContext.d.ts +0 -1
  27. package/src/lib/components/OpenLayers/context/TimeContext.d.ts +0 -1
  28. package/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +1 -2
  29. package/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.d.ts +0 -1
  30. package/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.stories.d.ts +1 -1
  31. package/src/lib/components/OpenLayers/draw/types.d.ts +0 -15
  32. package/src/lib/components/OpenLayers/index.d.ts +1 -0
  33. package/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +0 -1
  34. package/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +1 -2
  35. package/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +0 -1
  36. package/src/lib/components/OpenLayers/layers/TimeAwareEDRLocationLayer.d.ts +6 -3
  37. package/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +0 -1
  38. package/src/lib/components/OpenLayers/layers/WMSLayer.d.ts +0 -1
  39. package/src/lib/components/OpenLayers/layers/WMTSLayer.d.ts +0 -1
  40. package/src/lib/components/OpenLayers/layers/XYZLayer.d.ts +0 -1
  41. package/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +0 -1
  42. package/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.d.ts +0 -1
  43. package/src/lib/components/OpenLayers/utils/constants.d.ts +2 -0
  44. package/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.d.ts +9 -1
  45. package/src/lib/components/TanStackDemo/EDRLayerApi.stories.d.ts +2 -2
  46. package/src/lib/components/index.d.ts +0 -3
  47. package/src/lib/edr-layer-api/api.d.ts +4 -0
  48. package/src/lib/edr-layer-api/colormaps/colormaps.d.ts +6 -3
  49. package/src/lib/edr-layer-api/colormaps/edrOlLegendUtils.d.ts +2 -1
  50. package/src/lib/edr-layer-api/hooks.d.ts +6 -5
  51. package/src/lib/edr-layer-api/index.d.ts +1 -0
  52. package/src/lib/edr-layer-api/utils/useGetEDRLayerInstance.d.ts +11 -0
  53. package/src/lib/edr-layer-api/utils/useGetEDRLayerInstance.spec.d.ts +1 -0
  54. package/src/lib/hooks/useHooksGetCapabilities.d.ts +1 -1
  55. package/src/lib/index.d.ts +2 -0
  56. package/src/lib/types/index.d.ts +1 -0
  57. package/src/lib/utils/i18n.d.ts +1 -1
  58. package/src/lib/utils/index.d.ts +1 -0
  59. package/src/lib/utils/utils.d.ts +4 -0
  60. package/src/lib/utils/utils.spec.d.ts +1 -0
  61. package/src/lib/components/ReactMapView/ReactMapViewParseLayer.d.ts +0 -4
  62. package/src/lib/components/ReactMapView/ReactMapViewParseLayer.spec.d.ts +0 -1
  63. package/src/lib/components/ReactMapView/index.d.ts +0 -3
  64. package/src/lib/components/ReactMapView/utils.d.ts +0 -18
  65. /package/src/lib/{components/ReactMapView/utils.spec.d.ts → edr-layer-api/hooks.spec.d.ts} +0 -0
  66. /package/src/lib/{components/ReactMapView → types}/types.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/webmap-react",
3
- "version": "12.9.1",
3
+ "version": "12.11.0",
4
4
  "description": "GeoWeb react wrapper for webmap",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,9 +8,9 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/webmap": "12.9.1",
12
- "@opengeoweb/theme": "12.9.1",
13
- "@opengeoweb/shared": "12.9.1",
11
+ "@opengeoweb/webmap": "12.11.0",
12
+ "@opengeoweb/theme": "12.11.0",
13
+ "@opengeoweb/shared": "12.11.0",
14
14
  "lodash": "^4.17.21",
15
15
  "ol": "^10.4.0",
16
16
  "proj4": "^2.9.2",
@@ -27,6 +27,9 @@
27
27
  "@emotion/react": "*",
28
28
  "@emotion/styled": "*"
29
29
  },
30
+ "devDependencies": {
31
+ "eslint-plugin-storybook": "9.0.17"
32
+ },
30
33
  "module": "./index.esm.js",
31
34
  "type": "module",
32
35
  "main": "./index.esm.js",
package/src/index.d.ts CHANGED
@@ -1,13 +1,10 @@
1
1
  import { WEBMAP_NAMESPACE, webmapTranslations } from '@opengeoweb/webmap';
2
2
  import webmapReactTranslations from '../locales/webmap-react.json';
3
- import { OpenLayersLayerProps, OpenLayersLayer } from './lib/components/OpenLayers/layers/OpenLayersLayer';
4
- import { DefaultBaseLayers } from './lib/components/OpenLayers/layers/DefaultBaseLayers';
5
- import { OpenLayersFeatureLayer, TimeAwareEDRLocationLayer, WMSLayer } from './lib/components/OpenLayers/layers';
6
3
  import TimeContext from './lib/components/OpenLayers/context/TimeContext';
7
4
  import { TimeContextType } from './lib/components/OpenLayers/types/Timespan';
8
5
  import { TimeawareImageSource } from './lib/components/OpenLayers/utils/TimeawareImageSource';
9
6
  export * from './lib';
10
7
  export { webmapReactTranslations };
11
8
  export { WEBMAP_NAMESPACE, webmapTranslations };
12
- export { TimeContext, TimeawareImageSource, OpenLayersFeatureLayer, TimeAwareEDRLocationLayer, WMSLayer, DefaultBaseLayers, OpenLayersLayer, };
13
- export type { TimeContextType, OpenLayersLayerProps };
9
+ export { TimeContext, TimeawareImageSource };
10
+ export type { TimeContextType };
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { LayerInfoDialog } from './LayerInfoDialog';
3
3
  declare const meta: Meta<typeof LayerInfoDialog>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { Legend } from './Legend';
3
3
  declare const meta: Meta<typeof Legend>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import MapDimensionSelect from './MapDimensionSelect';
3
3
  declare const meta: Meta<typeof MapDimensionSelect>;
4
4
  export default meta;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { StoryObj } from '@storybook/react';
2
+ import type { StoryObj } from '@storybook/react-webpack5';
3
3
  import MapDimensionSelect from './MapDimensionSelect';
4
4
  declare const _default: {
5
5
  title: string;
@@ -1,4 +1,3 @@
1
- import { FeatureCollection } from 'geojson';
2
1
  export declare const drawPolyStoryStyles: {
3
2
  MapDrawGeoJSONContainer: {
4
3
  display: string;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { useMapDrawTool } from './useMapDrawTool';
3
3
  declare const meta: Meta<typeof useMapDrawTool>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { useMapDrawTool } from './useMapDrawTool';
3
3
  declare const meta: Meta<typeof useMapDrawTool>;
4
4
  export default meta;
@@ -4,7 +4,7 @@ import { MapDrawToolOptions } from './useMapDrawTool';
4
4
  export declare const firSelectionType = "fir";
5
5
  export declare const exampleIntersectionsMultiDrawTool: {
6
6
  title: string;
7
- geojson: import("geojson").FeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties>;
7
+ geojson: GeoJSON.FeatureCollection;
8
8
  }[];
9
9
  export declare const getDoubleControlToolIcon: (drawMode: DrawMode) => React.ReactElement;
10
10
  export declare const getFirTitle: (isNL: boolean) => string;
@@ -1,4 +1,4 @@
1
- import { Feature, FeatureCollection, GeoJsonProperties, Point } from 'geojson';
1
+ import { FeatureCollection, GeoJsonProperties, Point } from 'geojson';
2
2
  import { Bbox } from '@opengeoweb/webmap';
3
3
  import { DrawMode, SelectionType } from './types';
4
4
  /**
@@ -31,11 +31,11 @@ export declare const getGeoJSONPropertyValue: (property: string, properties: Geo
31
31
  export declare const moveFeature: (currentGeoJSON: GeoJSON.FeatureCollection, newGeoJSON: GeoJSON.FeatureCollection, featureLayerIndex: number, reason: string, selectionType?: string) => number | undefined;
32
32
  /**
33
33
  * Returns the intersection of two point features. In case of a polygon, only the first feature is used.
34
- * @param a Feature A
35
- * @param b Feature B
34
+ * @param intersectA Feature A
35
+ * @param intersectB Feature B
36
36
  * @returns The intersection of the two features.
37
37
  */
38
- export declare const intersectPointGeoJSONS: (a: GeoJSON.FeatureCollection<GeoJSON.Point>, b: GeoJSON.FeatureCollection, geoJSONProperties?: {
38
+ export declare const intersectPointGeoJSONS: (intersectA: GeoJSON.FeatureCollection<GeoJSON.Point>, intersectB: GeoJSON.FeatureCollection, geoJSONProperties?: {
39
39
  stroke: string;
40
40
  'stroke-width': number;
41
41
  'stroke-opacity': number;
@@ -44,18 +44,18 @@ export declare const intersectPointGeoJSONS: (a: GeoJSON.FeatureCollection<GeoJS
44
44
  }) => GeoJSON.FeatureCollection;
45
45
  /**
46
46
  * Returns the intersection of two (multi) polygon features. In case of a polygon, only the first feature is used.
47
- * @param a Feature A
48
- * @param b Feature B
47
+ * @param intersectA Feature A
48
+ * @param intersectB Feature B
49
49
  * @returns The intersection of the two features.
50
50
  */
51
- export declare const intersectPolygonGeoJSONS: (a: GeoJSON.FeatureCollection, b: GeoJSON.FeatureCollection, geoJSONProperties?: {
51
+ export declare const intersectPolygonGeoJSONS: (intersectA: GeoJSON.FeatureCollection, intersectB: GeoJSON.FeatureCollection, geoJSONProperties?: {
52
52
  stroke: string;
53
53
  'stroke-width': number;
54
54
  'stroke-opacity': number;
55
55
  fill: string;
56
56
  'fill-opacity': number;
57
57
  }) => GeoJSON.FeatureCollection;
58
- export declare const isPointFeatureCollection: (geojson: GeoJSON.FeatureCollection) => geojson is FeatureCollection<Point, GeoJsonProperties>;
58
+ export declare const isPointFeatureCollection: (geojson: GeoJSON.FeatureCollection) => geojson is GeoJSON.FeatureCollection<Point>;
59
59
  /**
60
60
  * Adds the intersectionStart and intersectionEnd properties to the GeoJSONS structure
61
61
  * @param geoJSONs
@@ -23,7 +23,7 @@ export declare const textLabelStyle: (text: string) => Style;
23
23
  export declare const multiPolygonLabelStyle: (text: string) => Style;
24
24
  export declare const multiLineStringLabelStyle: (text: string) => Style;
25
25
  export declare const geowebColorToOpenLayersColor: (color: string, opacity?: string | number) => ColorLike;
26
- export declare const inlineFeatureStyle: (f: FeatureLike) => Style[];
26
+ export declare const inlineFeatureStyle: (feature: FeatureLike) => Style[];
27
27
  export declare const genericOpenLayersFeatureStyle: StyleFunction;
28
28
  export declare const drawStyles: Record<DrawModeValue, StyleLike>;
29
29
  export declare const modifyStyles: Record<DrawModeValue, Style[]>;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from '.';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { OpenLayersMapView } from './component/OpenLayersMapView';
3
3
  declare const meta: Meta<typeof OpenLayersMapView>;
4
4
  export default meta;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Map } from 'ol';
3
2
  export interface MapContextType {
4
3
  map: Map | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TimeContextType } from '../types/Timespan';
3
2
  export type ChangeRelevantTimestepsFn = (layerId: string, dimensionValues: string[]) => void;
4
3
  export type ResetPrefetchFn = (layerId: string) => void;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { MapLocation } from '../../ReactMapView';
1
+ import { MapLocation } from '../../../types/types';
3
2
  export interface OpenLayersGetFeatureInfoProps {
4
3
  displayMapPin?: boolean;
5
4
  disableMapPin?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Extent } from 'ol/extent';
3
2
  interface OpenLayersZoomControlProps {
4
3
  homeExtent?: Extent;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { useMapDrawTool } from '../../MapDrawTool';
3
3
  declare const meta: Meta<typeof useMapDrawTool>;
4
4
  export default meta;
@@ -1,4 +1,3 @@
1
- import { GeometryObject } from 'geojson';
2
1
  export declare enum DRAWMODE {
3
2
  POLYGON = "POLYGON",
4
3
  BOX = "BOX",
@@ -18,18 +17,4 @@ export interface FeatureEvent {
18
17
  isInEditMode: boolean;
19
18
  feature: GeoJSON.Feature;
20
19
  }
21
- export interface FeatureLayer {
22
- id: string;
23
- type: string;
24
- features: [];
25
- isInEditMode?: boolean;
26
- isInDeleteMode?: boolean;
27
- geojson?: GeoJSON.FeatureCollection;
28
- drawMode?: string;
29
- onHoverFeature?: (feature: FeatureEvent) => void;
30
- onClickFeature?: (feature: FeatureEvent) => void;
31
- updateGeojson?: (feature: GeometryObject, reason: string) => void;
32
- exitDrawModeCallback?: (reason: DrawModeExitCallback, newGeoJSON?: GeoJSON.FeatureCollection) => void;
33
- selectedFeatureIndex?: string;
34
- }
35
20
  export type DrawModeExitCallback = 'escaped' | 'doubleClicked' | 'shiftClick';
@@ -10,3 +10,4 @@ export * from './draw';
10
10
  export * from './styles/useIconStyle';
11
11
  export * from './OlStyles';
12
12
  export * from './tools';
13
+ export * from './layers';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Feature } from 'ol';
3
2
  import { StyleLike } from 'ol/style/Style';
4
3
  import { ClickOnFeature, HoverSelect } from '../utils/types';
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { StyleLike } from 'ol/style/Style';
3
2
  import { FeatureCollection } from 'geojson';
4
3
  import { ClickOnFeature, HoverSelect } from '../utils/types';
5
4
  export interface OpenLayersFeatureLayerProps {
6
5
  featureCollection?: FeatureCollection;
7
- style: StyleLike;
6
+ style?: StyleLike;
8
7
  zIndex?: number;
9
8
  hoverSelect?: HoverSelect;
10
9
  clickOnFeature?: ClickOnFeature;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import ImageLayer from 'ol/layer/Image';
3
2
  import { LayerFoundation } from '@opengeoweb/webmap';
4
3
  export interface TiledWMSLayerProps {
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
+ import { Dimension } from '@opengeoweb/webmap';
2
3
  import { OpenLayersFeatureLayerProps } from './OpenLayersFeatureLayer';
4
+ import { OnInitializeLayerProps } from '../utils/types';
3
5
  interface TimeAwareEDRLocationLayerProps extends OpenLayersFeatureLayerProps {
4
- currentTime: string | undefined;
5
- timestep: number;
6
+ layerId?: string;
6
7
  edrBaseUrl: string;
7
- collectionId: string;
8
8
  parameter: string;
9
+ dimensions?: Dimension[];
10
+ onInitializeLayer?: (payload: OnInitializeLayerProps) => void;
11
+ opacity?: number;
9
12
  }
10
13
  export declare const TimeAwareEDRLocationLayer: React.FC<TimeAwareEDRLocationLayerProps>;
11
14
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import ImageLayer from 'ol/layer/Image';
3
2
  import { Dimension } from '@opengeoweb/webmap';
4
3
  import type { OnInitializeLayerProps } from '../utils/types';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import ImageLayer from 'ol/layer/Image';
3
2
  import { LayerFoundation } from '@opengeoweb/webmap';
4
3
  export interface WMSLayerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import TileLayer from 'ol/layer/Tile';
3
2
  import { LayerFoundation } from '@opengeoweb/webmap';
4
3
  export interface WMTSLayerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import TileLayer from 'ol/layer/Tile';
3
2
  import { LayerFoundation } from '@opengeoweb/webmap';
4
3
  export interface XYZLayerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StyleLike } from 'ol/style/Style';
3
2
  export interface ClickOnMapToolProps {
4
3
  isActive: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WMLayer } from '@opengeoweb/webmap';
3
2
  import ImageLayer from 'ol/layer/Image';
4
3
  import { TimeawareImageSource } from './TimeawareImageSource';
@@ -1,6 +1,8 @@
1
1
  export declare const MAX_NUMBER_TO_PREFETCH = 200;
2
2
  export declare const MAX_NUMBER_STEPS_IN_TIMESLIDER_TO_PREFETCH = 10000;
3
3
  export declare const NUMBER_PREFETCH_WORKERS = 4;
4
+ export declare const ENABLE_PREFETCH = true;
5
+ export declare const ADD_SHOW_DIMS_OPTION = false;
4
6
  export declare const NUM_IMAGES_TO_CACHE = 10000;
5
7
  export declare const WMS_EXTENT_RATIO_TO_VIEWPORT = 1.2;
6
8
  export declare const TIMEAWAREIMAGEWRAPPER_IMAGEDIDNOTLOADSUCCESFULLY = "Image did not load succesfully";
@@ -1,7 +1,15 @@
1
1
  import { WMJSDimension, Dimension, WMLayer } from '@opengeoweb/webmap';
2
2
  import { Timespan } from '../types/Timespan';
3
3
  export declare const makeDimValuesToPrefetch: (wmTimeDim: WMJSDimension, stepsToCheck: number[], isAnimating: boolean) => string[];
4
- export declare const getDimensionParamsForWMS: (dimensions: Dimension[] | undefined, wmLayer: WMLayer | null) => Record<string, string>;
4
+ /**
5
+ * We use the WMLayer dimension logic to obtain the dimension value to use in the WMS GetMap request. The input is the dimensions array which is typically the properties set for the layer component.
6
+ * The input time is descretized to the closest value which is available in the WMS layer.
7
+ *
8
+ * @param dimensions Array of dimension key/values to use as input
9
+ * @param wmLayer The layer for which we would like to do the request
10
+ * @returns A map which returns a key/value to use
11
+ */
12
+ export declare const getDimensionParamsForWMS: (dimensions: Dimension[] | undefined, wmLayer: WMLayer | null) => Record<string, string> | undefined;
5
13
  /**
6
14
  * Calculates number of timesteps for given timespan
7
15
  * @param timespan Object of Timespan, with start/stop/end in milliseconds
@@ -7,11 +7,11 @@ export declare const EdrLayerAPICollection: {
7
7
  (): React.ReactElement;
8
8
  storyName: string;
9
9
  };
10
- export declare const EdrLayerAPILocations: {
10
+ export declare const EdrLayerAPICubeOnObs: {
11
11
  (): React.ReactElement;
12
12
  storyName: string;
13
13
  };
14
- export declare const EdrLayerAPICubeOnObs: {
14
+ export declare const EdrLayerAPIGetParameters: {
15
15
  (): React.ReactElement;
16
16
  storyName: string;
17
17
  };
@@ -1,9 +1,6 @@
1
1
  export * from './Legend';
2
2
  export * from './MapDraw';
3
3
  export * from './MapDrawTool';
4
- export * from './ReactMapView';
5
- export * from './ReactMapView/ReactMapViewParseLayer';
6
- export * from './ReactMapView/utils';
7
4
  export * from './MapTime';
8
5
  export * from './MapControls';
9
6
  export * from './MapWarning';
@@ -0,0 +1,4 @@
1
+ import { CoverageCollection, EDRInstance } from '@opengeoweb/shared';
2
+ export declare const joinUrlParams: (params: string[]) => string;
3
+ export declare const fetchEDRLayerCollection: (edrBaseUrlWithCollection: string, instanceId?: string) => Promise<EDRInstance>;
4
+ export declare const fetchEDRLayerCollectionCube: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => Promise<CoverageCollection>;
@@ -1,5 +1,8 @@
1
- import { ColorMap } from './edrOlLegendUtils';
2
- export declare const wowTemperatureLegendColors: ColorMap;
1
+ export type ColorMap = string[];
2
+ export declare const temperatureLegendColorsWoW: ColorMap;
3
+ export declare const precipitationMMLegendColorsWoW: ColorMap;
4
+ export declare const temperatureLegendColorsCWK: ColorMap;
3
5
  export declare const colorMaps: {
4
- wowTemperatureLegendColors: ColorMap;
6
+ temperatureLegendColorsWoW: ColorMap;
7
+ temperatureLegendColorsCWK: ColorMap;
5
8
  };
@@ -1,6 +1,6 @@
1
1
  import { FeatureLike } from 'ol/Feature';
2
2
  import { Circle, Style } from 'ol/style';
3
- export type ColorMap = string[];
3
+ import { ColorMap } from './colormaps';
4
4
  export interface EdrMapLegendEntry {
5
5
  min: number;
6
6
  max: number;
@@ -18,3 +18,4 @@ export declare const makeLegendFromColorMap: (props: {
18
18
  export declare const getLegendClass: (edrColorLegend: EdrOlColorLegend, value: number, clip?: boolean) => EdrMapLegendEntry | undefined;
19
19
  export declare const makeFeatureStyleDisc: (feature: FeatureLike, legend: EdrOlColorLegend) => Style;
20
20
  export declare const makeFeatureStyleLoading: (feature: FeatureLike) => Style;
21
+ export declare const styleNameToStyleLike: ((styleName: string) => ((feature: FeatureLike) => Style)) & import("lodash").MemoizedFunction;
@@ -1,6 +1,7 @@
1
- import { EDRInstance, CoverageCollection } from '@opengeoweb/shared';
1
+ import { EDRInstance, CoverageCollection, EdrParameters } from '@opengeoweb/shared';
2
2
  import { UseQueryResult } from '@tanstack/react-query';
3
- import { FeatureCollection } from 'geojson';
4
- export declare const useEDRCollection: (edrBaseUrl: string, collectionId: string, instanceId?: string) => UseQueryResult<EDRInstance, Error>;
5
- export declare const useEDRCollectionLocation: (edrBaseUrl: string, collectionId: string, instanceId?: string) => UseQueryResult<FeatureCollection, Error>;
6
- export declare const useEDRCollectionCube: (edrBaseUrl: string, collectionId: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => UseQueryResult<CoverageCollection, Error>;
3
+ export interface EdrLayerInstance extends EDRInstance {
4
+ parameter_names?: EdrParameters;
5
+ }
6
+ export declare const useEDRLayerCollection: (edrBaseUrlWithCollection: string, instanceId?: string) => UseQueryResult<EdrLayerInstance, Error>;
7
+ export declare const useEDRLayerCollectionCube: (edrBaseUrlWithCollection: string, parameterName: string, datetime?: string, instanceId?: string, bbox?: string) => UseQueryResult<CoverageCollection, Error>;
@@ -1,3 +1,4 @@
1
1
  export * from './hooks';
2
2
  export * from './colormaps';
3
+ export { useGetEDRLayerInstance } from './utils/useGetEDRLayerInstance';
3
4
  export { fakeEdrLayerApiHandlers } from './fakeApi';
@@ -0,0 +1,11 @@
1
+ import { WMLayer } from '@opengeoweb/webmap';
2
+ import { OnInitializeLayerProps } from '../../components/OpenLayers/utils/types';
3
+ /**
4
+ * Returns WMLayer instance in EDR 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 useGetEDRWMLayerInstance: (serviceUrl: string, name: string, id?: string, onLayerError?: (layerId: string, message: string) => void) => WMLayer | null;
11
+ export declare const useGetEDRLayerInstance: (edrBaseUrl: string, parameter: string, layerId?: string, onInitializeLayer?: (payload: OnInitializeLayerProps) => void) => WMLayer | null;
@@ -55,6 +55,6 @@ export declare const useGetWMLayerInstance: (serviceUrl: string, name: string, i
55
55
  /**
56
56
  * Used for querying WMTS GetCapabilities documents
57
57
  * @param serviceUrl
58
- * @returns {UseQueryResult<string>}
58
+ * @returns
59
59
  */
60
60
  export declare const useQueryWMTSGetCapabilities: (serviceUrl: string) => UseQueryResult<string>;
@@ -1,5 +1,7 @@
1
1
  export * from './components';
2
2
  export * from './layers';
3
3
  export * from './hooks';
4
+ export * from './utils';
5
+ export * from './types';
4
6
  export * from './edr-layer-api';
5
7
  export { WEBMAP_REACT_NAMESPACE } from './utils/i18n';
@@ -0,0 +1 @@
1
+ export * from './types';
@@ -3,5 +3,5 @@ import { UseTranslationResponse } from 'react-i18next';
3
3
  export declare const WEBMAP_REACT_NAMESPACE = "webmapreact";
4
4
  export declare const initWebmapReactTestI18n: () => void;
5
5
  export declare const translateKeyOutsideComponents: (key: string, params?: Record<string, string | number> | undefined, ns?: string) => string;
6
- export declare const useWebmapReactTranslation: (ns?: Namespace) => UseTranslationResponse<Namespace, import("i18next").i18n>;
6
+ export declare const useWebmapReactTranslation: (ns?: Namespace) => UseTranslationResponse<typeof ns, typeof i18n>;
7
7
  export { i18n };
@@ -0,0 +1 @@
1
+ export * from './utils';
@@ -0,0 +1,4 @@
1
+ import { Dimension, WMLayer } from '@opengeoweb/webmap';
2
+ import { UpdateLayerInfoPayload } from '../types/types';
3
+ export declare function getIsInsideAcceptanceTime(acceptanceTimeInMinutes: number | undefined, mapDimensions: Dimension[] | undefined, layerDimensions: Dimension[] | undefined): boolean;
4
+ export declare const getLayerUpdateInfo: (wmLayer: WMLayer, mapId: string) => UpdateLayerInfoPayload;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +0,0 @@
1
- import { WMLayer, WMJSDimension } from '@opengeoweb/webmap';
2
- import { UpdateLayerInfoPayload } from './types';
3
- export declare const getCurrentDimensionValue: (name: string, dimensions?: WMJSDimension[]) => string;
4
- export declare const getLayerUpdateInfo: (wmLayer: WMLayer, mapId: string) => UpdateLayerInfoPayload;
@@ -1 +0,0 @@
1
- export declare const mockGeoJSON: GeoJSON.FeatureCollection;
@@ -1,3 +0,0 @@
1
- import RadarGetCapabilities from './radarGetCapabilities.spec.json';
2
- export * from './types';
3
- export { RadarGetCapabilities };
@@ -1,18 +0,0 @@
1
- import { Dimension, LayerFoundation } from '@opengeoweb/webmap';
2
- import React from 'react';
3
- import { FeatureLayer } from '../OpenLayers/draw/types';
4
- /** Returns filtered list of props with geoJson
5
- * @param children React.ReactNode, layers with geoJson
6
- */
7
- export declare const getFeatureLayers: (children: React.ReactNode) => FeatureLayer[];
8
- /**
9
- * Returns true if this is a maplayer and not a baselayer or overlayer
10
- * @param layer The LayerFoundation object, or the props from the ReactWMJSLayer
11
- */
12
- export declare const isAMapLayer: (layer: LayerFoundation) => boolean;
13
- /**
14
- * Returns true if this is a geojsonlayer (layer containing geojson field)
15
- * @param layer The LayerFoundation object, or the props from the ReactWMJSLayer
16
- */
17
- export declare const isAGeoJSONLayer: (layer: LayerFoundation) => boolean;
18
- export declare function getIsInsideAcceptanceTime(acceptanceTimeInMinutes: number | undefined, mapDimensions: Dimension[] | undefined, layerDimensions: Dimension[] | undefined): boolean;