@opengeoweb/webmap-react 19.1.0 → 19.1.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 (148) hide show
  1. package/dist/README.md +11 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.esm.js +12712 -0
  4. package/dist/src/index.d.ts +11 -0
  5. package/dist/src/lib/components/Clock/Clock.d.ts +23 -0
  6. package/dist/src/lib/components/Clock/ClockContainer.d.ts +9 -0
  7. package/dist/src/lib/components/Clock/clockContainerUtils.d.ts +1 -0
  8. package/dist/src/lib/components/Clock/index.d.ts +1 -0
  9. package/dist/src/lib/components/HoldShiftToZoomMessage/HoldShiftToZoomMessage.d.ts +2 -0
  10. package/dist/src/lib/components/LayerInfo/LayerInfoButton.d.ts +8 -0
  11. package/dist/src/lib/components/LayerInfo/LayerInfoDialog.d.ts +18 -0
  12. package/dist/src/lib/components/LayerInfo/LayerInfoLegend.d.ts +7 -0
  13. package/dist/src/lib/components/LayerInfo/LayerInfoList.d.ts +10 -0
  14. package/dist/src/lib/components/LayerInfo/LayerInfoText.d.ts +16 -0
  15. package/dist/src/lib/components/LayerInfo/LayerInfoUtils.d.ts +9 -0
  16. package/dist/src/lib/components/LayerInfo/index.d.ts +6 -0
  17. package/dist/src/lib/components/Legend/Legend.d.ts +8 -0
  18. package/dist/src/lib/components/Legend/LegendButton.d.ts +5 -0
  19. package/dist/src/lib/components/Legend/LegendDialog.d.ts +16 -0
  20. package/dist/src/lib/components/Legend/LegendLayout.d.ts +10 -0
  21. package/dist/src/lib/components/Legend/index.d.ts +4 -0
  22. package/dist/src/lib/components/MapControls/MapControlButton.d.ts +10 -0
  23. package/dist/src/lib/components/MapControls/MapControls.d.ts +7 -0
  24. package/dist/src/lib/components/MapControls/ZoomControls.d.ts +8 -0
  25. package/dist/src/lib/components/MapControls/index.d.ts +3 -0
  26. package/dist/src/lib/components/MapDimensionSelect/DimensionSelectButton.d.ts +8 -0
  27. package/dist/src/lib/components/MapDimensionSelect/DimensionSelectDialog.d.ts +14 -0
  28. package/dist/src/lib/components/MapDimensionSelect/DimensionSelectSlider.d.ts +14 -0
  29. package/dist/src/lib/components/MapDimensionSelect/MapDimensionSelect.d.ts +12 -0
  30. package/dist/src/lib/components/MapDimensionSelect/index.d.ts +6 -0
  31. package/dist/src/lib/components/MapDimensionSelect/utils.d.ts +18 -0
  32. package/dist/src/lib/components/MapMeasure/MapMeasure.d.ts +5 -0
  33. package/dist/src/lib/components/MapMeasure/index.d.ts +1 -0
  34. package/dist/src/lib/components/MapMousePosition/MapMousePosition.d.ts +2 -0
  35. package/dist/src/lib/components/MapMousePosition/index.d.ts +1 -0
  36. package/dist/src/lib/components/MapTime/MapTime.d.ts +11 -0
  37. package/dist/src/lib/components/MapTime/index.d.ts +1 -0
  38. package/dist/src/lib/components/MapWarning/MapWarningProperties.d.ts +22 -0
  39. package/dist/src/lib/components/MapWarning/index.d.ts +1 -0
  40. package/dist/src/lib/components/OpenLayers/OlColors.d.ts +5 -0
  41. package/dist/src/lib/components/OpenLayers/OlStyles.d.ts +52 -0
  42. package/dist/src/lib/components/OpenLayers/OpenLayersConstants.d.ts +2 -0
  43. package/dist/src/lib/components/OpenLayers/component/OpenLayersMapView.d.ts +13 -0
  44. package/dist/src/lib/components/OpenLayers/context/MapContext.d.ts +6 -0
  45. package/dist/src/lib/components/OpenLayers/context/TimeContext.d.ts +6 -0
  46. package/dist/src/lib/components/OpenLayers/controls/OpenLayersGetFeatureInfo.d.ts +8 -0
  47. package/dist/src/lib/components/OpenLayers/controls/OpenLayersZoomControl.d.ts +6 -0
  48. package/dist/src/lib/components/OpenLayers/controls/index.d.ts +2 -0
  49. package/dist/src/lib/components/OpenLayers/draw/OpenLayersMapDraw.d.ts +29 -0
  50. package/dist/src/lib/components/OpenLayers/draw/geojsonShapes.d.ts +19 -0
  51. package/dist/src/lib/components/OpenLayers/draw/index.d.ts +12 -0
  52. package/dist/src/lib/components/OpenLayers/draw/mapDrawUtils.d.ts +12 -0
  53. package/dist/src/lib/components/OpenLayers/draw/polygonCleanDangling.d.ts +35 -0
  54. package/dist/src/lib/components/OpenLayers/draw/storyComponents/EditModeButton.d.ts +7 -0
  55. package/dist/src/lib/components/OpenLayers/draw/storyComponents/FeatureLayers.d.ts +8 -0
  56. package/dist/src/lib/components/OpenLayers/draw/storyComponents/GeoJSONTextField.d.ts +11 -0
  57. package/dist/src/lib/components/OpenLayers/draw/storyComponents/IntersectionSelect.d.ts +12 -0
  58. package/dist/src/lib/components/OpenLayers/draw/storyComponents/SelectField.d.ts +9 -0
  59. package/dist/src/lib/components/OpenLayers/draw/storyComponents/StoryLayout.d.ts +9 -0
  60. package/dist/src/lib/components/OpenLayers/draw/storyComponents/StoryLayoutGrid.d.ts +4 -0
  61. package/dist/src/lib/components/OpenLayers/draw/storyComponents/ToolButton.d.ts +9 -0
  62. package/dist/src/lib/components/OpenLayers/draw/storyComponents/geojsonExamples.d.ts +12 -0
  63. package/dist/src/lib/components/OpenLayers/draw/storyComponents/index.d.ts +8 -0
  64. package/dist/src/lib/components/OpenLayers/draw/storyComponents/storyUtils.d.ts +48 -0
  65. package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawTool.d.ts +9 -0
  66. package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawToolIntersection.d.ts +9 -0
  67. package/dist/src/lib/components/OpenLayers/draw/storyExamplesMapDrawToolMultipleDrawTools.d.ts +12 -0
  68. package/dist/src/lib/components/OpenLayers/draw/types.d.ts +43 -0
  69. package/dist/src/lib/components/OpenLayers/draw/useMapDrawTool.d.ts +61 -0
  70. package/dist/src/lib/components/OpenLayers/draw/utils.d.ts +84 -0
  71. package/dist/src/lib/components/OpenLayers/index.d.ts +14 -0
  72. package/dist/src/lib/components/OpenLayers/layers/DefaultBaseLayers.d.ts +9 -0
  73. package/dist/src/lib/components/OpenLayers/layers/FeatureLayer.d.ts +16 -0
  74. package/dist/src/lib/components/OpenLayers/layers/GeoTIFFLayer.d.ts +13 -0
  75. package/dist/src/lib/components/OpenLayers/layers/OpenLayersFeatureLayer.d.ts +16 -0
  76. package/dist/src/lib/components/OpenLayers/layers/OpenLayersLayer.d.ts +20 -0
  77. package/dist/src/lib/components/OpenLayers/layers/TiledWMSLayer.d.ts +10 -0
  78. package/dist/src/lib/components/OpenLayers/layers/TimeAwareEDRLocationLayer.d.ts +14 -0
  79. package/dist/src/lib/components/OpenLayers/layers/TimeAwareGeoTIFFLayer.d.ts +17 -0
  80. package/dist/src/lib/components/OpenLayers/layers/TimeAwareGeoTIFFLayerUtils.d.ts +20 -0
  81. package/dist/src/lib/components/OpenLayers/layers/TimeAwareWMTSLayer.d.ts +17 -0
  82. package/dist/src/lib/components/OpenLayers/layers/TimeawareImageSourceWMSLayer.d.ts +18 -0
  83. package/dist/src/lib/components/OpenLayers/layers/WMSLayer.d.ts +10 -0
  84. package/dist/src/lib/components/OpenLayers/layers/WMTSLayer.d.ts +10 -0
  85. package/dist/src/lib/components/OpenLayers/layers/XYZLayer.d.ts +9 -0
  86. package/dist/src/lib/components/OpenLayers/layers/fakeApiWmtsQueries.d.ts +1 -0
  87. package/dist/src/lib/components/OpenLayers/layers/index.d.ts +11 -0
  88. package/dist/src/lib/components/OpenLayers/layers/utils.d.ts +2 -0
  89. package/dist/src/lib/components/OpenLayers/storyComponents/OlStoryLayout.d.ts +10 -0
  90. package/dist/src/lib/components/OpenLayers/storyComponents/index.d.ts +1 -0
  91. package/dist/src/lib/components/OpenLayers/styles/useIconStyle.d.ts +25 -0
  92. package/dist/src/lib/components/OpenLayers/tools/ClickOnMapTool.d.ts +9 -0
  93. package/dist/src/lib/components/OpenLayers/tools/index.d.ts +1 -0
  94. package/dist/src/lib/components/OpenLayers/types/Timespan.d.ts +11 -0
  95. package/dist/src/lib/components/OpenLayers/types/WorkerQueue.d.ts +6 -0
  96. package/dist/src/lib/components/OpenLayers/useProjectionDropDown.d.ts +17 -0
  97. package/dist/src/lib/components/OpenLayers/utils/ShowTimeAwareLayerInfo.d.ts +10 -0
  98. package/dist/src/lib/components/OpenLayers/utils/TimeAwareImageWrapper.d.ts +44 -0
  99. package/dist/src/lib/components/OpenLayers/utils/TimeawareImageSource.d.ts +68 -0
  100. package/dist/src/lib/components/OpenLayers/utils/WorkerQueue.d.ts +14 -0
  101. package/dist/src/lib/components/OpenLayers/utils/constants.d.ts +8 -0
  102. package/dist/src/lib/components/OpenLayers/utils/makeDimValuesToPrefetch.d.ts +26 -0
  103. package/dist/src/lib/components/OpenLayers/utils/projections.d.ts +16 -0
  104. package/dist/src/lib/components/OpenLayers/utils/setMapCenter.d.ts +2 -0
  105. package/dist/src/lib/components/OpenLayers/utils/types.d.ts +19 -0
  106. package/dist/src/lib/components/OpenLayers/utils/viewUtils.d.ts +11 -0
  107. package/dist/src/lib/components/Providers/Providers.d.ts +2 -0
  108. package/dist/src/lib/components/Providers/index.d.ts +1 -0
  109. package/dist/src/lib/components/TanStackDemo/storyUtils.d.ts +6 -0
  110. package/dist/src/lib/components/WMSViewerDemo/components/WMSDimTimeYearSelector.d.ts +18 -0
  111. package/dist/src/lib/components/WMSViewerDemo/components/WMSLayerSelector.d.ts +9 -0
  112. package/dist/src/lib/components/WMSViewerDemo/components/WMSStyleSelector.d.ts +8 -0
  113. package/dist/src/lib/components/WMSViewerDemo/components/WMSTimeSlider.d.ts +8 -0
  114. package/dist/src/lib/components/index.d.ts +9 -0
  115. package/dist/src/lib/edr-layer-api/api.d.ts +7 -0
  116. package/dist/src/lib/edr-layer-api/colormaps/colormaps.d.ts +9 -0
  117. package/dist/src/lib/edr-layer-api/colormaps/edrOlLegendUtils.d.ts +32 -0
  118. package/dist/src/lib/edr-layer-api/colormaps/index.d.ts +2 -0
  119. package/dist/src/lib/edr-layer-api/fakeApi.d.ts +1 -0
  120. package/dist/src/lib/edr-layer-api/hooks.d.ts +14 -0
  121. package/dist/src/lib/edr-layer-api/index.d.ts +3 -0
  122. package/dist/src/lib/edr-layer-api/utils/coverageCollectionToFeatureCollection.d.ts +2 -0
  123. package/dist/src/lib/edr-layer-api/utils/useEDRWMLayer.d.ts +11 -0
  124. package/dist/src/lib/geotiff-layer-api/api.d.ts +92 -0
  125. package/dist/src/lib/geotiff-layer-api/fakeApi.d.ts +1 -0
  126. package/dist/src/lib/geotiff-layer-api/hooks.d.ts +5 -0
  127. package/dist/src/lib/geotiff-layer-api/index.d.ts +3 -0
  128. package/dist/src/lib/geotiff-layer-api/utils/stacColormapToOlStyle.d.ts +25 -0
  129. package/dist/src/lib/geotiff-layer-api/utils/stacTimeStepUtils.d.ts +18 -0
  130. package/dist/src/lib/geotiff-layer-api/utils/useGetStacGeoTIFFLayerInstance.d.ts +11 -0
  131. package/dist/src/lib/hooks/index.d.ts +4 -0
  132. package/dist/src/lib/hooks/useAnimationForLayer.d.ts +9 -0
  133. package/dist/src/lib/hooks/useHooksGetCapabilities.d.ts +63 -0
  134. package/dist/src/lib/hooks/useSetInterValWhenVisible.d.ts +1 -0
  135. package/dist/src/lib/hooks/useViewFromLayer.d.ts +7 -0
  136. package/dist/src/lib/index.d.ts +8 -0
  137. package/dist/src/lib/layers/defaultLayers.d.ts +15 -0
  138. package/dist/src/lib/layers/defaultStorybookSettings.d.ts +9 -0
  139. package/dist/src/lib/layers/index.d.ts +3 -0
  140. package/dist/src/lib/layers/profileLayers.d.ts +19 -0
  141. package/dist/src/lib/layers/publicLayers.d.ts +310 -0
  142. package/dist/src/lib/layers/publicServices.d.ts +90 -0
  143. package/dist/src/lib/types/index.d.ts +1 -0
  144. package/dist/src/lib/types/types.d.ts +64 -0
  145. package/dist/src/lib/utils/i18n.d.ts +8 -0
  146. package/dist/src/lib/utils/index.d.ts +1 -0
  147. package/dist/src/lib/utils/utils.d.ts +4 -0
  148. package/package.json +2 -1
@@ -0,0 +1,11 @@
1
+ import { WEBMAP_NAMESPACE, webmapTranslations } from '@opengeoweb/webmap';
2
+ import webmapReactTranslations from '../locales/webmap-react.json';
3
+ import TimeContext from './lib/components/OpenLayers/context/TimeContext';
4
+ import type { TimeContextType } from './lib/components/OpenLayers/types/Timespan';
5
+ import { makeTimeList } from './lib/components/OpenLayers/utils/makeDimValuesToPrefetch';
6
+ import { TimeawareImageSource } from './lib/components/OpenLayers/utils/TimeawareImageSource';
7
+ export * from './lib';
8
+ export { webmapReactTranslations };
9
+ export { WEBMAP_NAMESPACE, webmapTranslations };
10
+ export { TimeContext, TimeawareImageSource, makeTimeList };
11
+ export type { TimeContextType };
@@ -0,0 +1,23 @@
1
+ import type { FC, Ref } from 'react';
2
+ export declare const MIN_WIDTH = 240;
3
+ export declare const MIN_HEIGHT = 32;
4
+ export interface Position {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ export interface Size {
9
+ width: number;
10
+ height: number;
11
+ }
12
+ export declare const Clock: FC<{
13
+ optionsElement: Ref<HTMLButtonElement>;
14
+ time: number;
15
+ isVisible?: boolean;
16
+ onToggleClock?: (isVisible: boolean) => void;
17
+ position?: Position | undefined;
18
+ onSetPosition: (position: Position) => void;
19
+ size?: Size | undefined;
20
+ onSetSize: (size: Size) => void;
21
+ onToggleOptions?: () => void;
22
+ isOptionsMenuVisible?: boolean;
23
+ }>;
@@ -0,0 +1,9 @@
1
+ import type { FC, Ref } from 'react';
2
+ export declare const ClockContainer: FC<{
3
+ isOptionsMenuVisible?: boolean;
4
+ onToggleClock: () => void;
5
+ onToggleOptions: () => void;
6
+ optionsElement: Ref<HTMLButtonElement>;
7
+ fontSize: number;
8
+ time: number;
9
+ }>;
@@ -0,0 +1 @@
1
+ export declare const dateToManualFormatString: (inDate: Date | undefined) => string;
@@ -0,0 +1 @@
1
+ export * from './Clock';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const HoldShiftToZoomMessage: () => React.ReactElement | null;
@@ -0,0 +1,8 @@
1
+ import type { CustomIconProps } from '@opengeoweb/shared';
2
+ interface LayerInfoButtonProps extends CustomIconProps {
3
+ disabled?: boolean;
4
+ isActive?: boolean;
5
+ onClick?: () => void;
6
+ }
7
+ export declare const LayerInfoButton: React.FC<LayerInfoButtonProps>;
8
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { Position, Source } from '@opengeoweb/shared';
2
+ import type { LayerProps } from '@opengeoweb/webmap';
3
+ export interface LayerInfoDialogProps {
4
+ layer: LayerProps;
5
+ serviceName: string;
6
+ serviceUrl?: string;
7
+ onClose: () => void;
8
+ isOpen: boolean;
9
+ onMouseDown?: () => void;
10
+ order?: number;
11
+ source?: Source;
12
+ dialogHeight?: number;
13
+ startPosition?: Position;
14
+ selectedStyle?: string;
15
+ showLayerLegend: boolean;
16
+ onToggleLayerLegendVisibility: (showLegend: boolean) => void;
17
+ }
18
+ export declare const LayerInfoDialog: React.FC<LayerInfoDialogProps>;
@@ -0,0 +1,7 @@
1
+ export interface LayerInfoLegendProps {
2
+ title: string;
3
+ legendURL?: string;
4
+ showLayerLegend: boolean;
5
+ onToggleLayerLegendVisibility: (showLegend: boolean) => void;
6
+ }
7
+ export declare const LayerInfoLegend: React.FC<LayerInfoLegendProps>;
@@ -0,0 +1,10 @@
1
+ export interface ListItem {
2
+ label: string;
3
+ value: string;
4
+ icon: React.ReactElement;
5
+ }
6
+ export interface LayerInfoListProps {
7
+ label: string;
8
+ list: ListItem[];
9
+ }
10
+ export declare const LayerInfoList: React.FC<LayerInfoListProps>;
@@ -0,0 +1,16 @@
1
+ export interface LayerInfoTextProps {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ export declare const textStyle: {
6
+ lineHeight: string;
7
+ letterSpacing: string;
8
+ overflowWrap: string;
9
+ };
10
+ export declare const textStyleWithMargin: {
11
+ marginBottom: number;
12
+ lineHeight: string;
13
+ letterSpacing: string;
14
+ overflowWrap: string;
15
+ };
16
+ export declare const LayerInfoText: React.FC<LayerInfoTextProps>;
@@ -0,0 +1,9 @@
1
+ import type { TFunction } from 'i18next';
2
+ import type { Dimension, LayerProps } from '@opengeoweb/webmap';
3
+ import type { ListItem } from './LayerInfoList';
4
+ export declare const getLayerStyles: (layer: LayerProps) => string;
5
+ export declare const getDimensionValue: (name: string, dimensions: Dimension[]) => string;
6
+ export declare const getLayerBbox: (t: TFunction, layer: LayerProps) => string;
7
+ export declare const getDimensionIcon: (name: string, dimensions: Dimension[]) => React.ReactElement;
8
+ export declare const getDimensionLabel: (name: string) => string;
9
+ export declare const getDimensionsList: (dimensions: Dimension[]) => ListItem[];
@@ -0,0 +1,6 @@
1
+ export * from './LayerInfoButton';
2
+ export * from './LayerInfoDialog';
3
+ export * from './LayerInfoLegend';
4
+ export * from './LayerInfoList';
5
+ export * from './LayerInfoText';
6
+ export * from './LayerInfoUtils';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { LayerFoundation } from '@opengeoweb/webmap';
3
+ interface LegendProps {
4
+ layer: LayerFoundation;
5
+ onToggleLayerLegendVisibility: (layerId: string, showLegend: boolean) => void;
6
+ }
7
+ export declare const Legend: React.FC<LegendProps>;
8
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const LegendButton: React.FC<{
3
+ openLegendDialog: () => void;
4
+ isOpen: boolean;
5
+ }>;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { Source } from '@opengeoweb/shared';
3
+ import type { LayerFoundation } from '@opengeoweb/webmap';
4
+ interface LegendDialogProps {
5
+ layers: LayerFoundation[];
6
+ isOpen: boolean;
7
+ onClose: () => void;
8
+ onMouseDown?: () => void;
9
+ mapId: string;
10
+ showMapId?: boolean;
11
+ order?: number;
12
+ source?: Source;
13
+ onToggleLayerLegendVisibility: (layerId: string, showLegend: boolean) => void;
14
+ }
15
+ export declare const LegendDialog: React.FC<LegendDialogProps>;
16
+ export {};
@@ -0,0 +1,10 @@
1
+ interface LegendLayoutProps {
2
+ title: string;
3
+ children: React.ReactNode;
4
+ height?: number;
5
+ width?: number;
6
+ showLayerLegend?: boolean;
7
+ toggleLayerLegendVisibility?: (showLegend: boolean) => void;
8
+ }
9
+ export declare const LegendLayout: React.FC<LegendLayoutProps>;
10
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './Legend';
2
+ export * from './LegendLayout';
3
+ export * from './LegendDialog';
4
+ export * from './LegendButton';
@@ -0,0 +1,10 @@
1
+ import type { TooltipProps } from '@mui/material';
2
+ import React from 'react';
3
+ import type { CustomIconProps } from '@opengeoweb/shared';
4
+ interface MapControlButtonProps extends CustomIconProps {
5
+ isActive?: boolean;
6
+ placement?: TooltipProps['placement'];
7
+ children: React.ReactNode;
8
+ }
9
+ export declare const MapControlButton: React.FC<MapControlButtonProps>;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface MapControlsProps {
3
+ children: React.ReactNode;
4
+ style?: React.CSSProperties;
5
+ }
6
+ export declare const MapControls: React.FC<MapControlsProps>;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface ZoomControlsProps {
3
+ onZoomIn: () => void;
4
+ onZoomOut: () => void;
5
+ onZoomReset: () => void;
6
+ }
7
+ export declare const ZoomControls: React.FC<ZoomControlsProps>;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './ZoomControls';
2
+ export * from './MapControlButton';
3
+ export * from './MapControls';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface DimensionSelectButtonProps {
3
+ dimension: string;
4
+ onClickDimensionButton: () => void;
5
+ isActive?: boolean;
6
+ }
7
+ declare const DimensionSelectButton: React.FC<DimensionSelectButtonProps>;
8
+ export default DimensionSelectButton;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { Source } from '@opengeoweb/shared';
3
+ export interface DimensionSelectProps {
4
+ isOpen: boolean;
5
+ order?: number;
6
+ onMouseDown?: () => void;
7
+ onClose?: () => void;
8
+ source?: Source;
9
+ dimensionName: string;
10
+ index?: number;
11
+ children?: React.ReactNode;
12
+ }
13
+ declare const DimensionSelectDialog: React.FC<DimensionSelectProps>;
14
+ export default DimensionSelectDialog;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { Mark } from './utils';
3
+ interface DimensionSelectSliderProps {
4
+ marks: Mark[];
5
+ layerTitle: string;
6
+ reverse?: boolean;
7
+ isDisabled?: boolean;
8
+ managedValue?: number | string;
9
+ validSelection?: boolean;
10
+ alertColor?: string;
11
+ onChangeDimensionValue: (dimensionValue: string) => void;
12
+ }
13
+ declare const DimensionSelectSlider: React.FC<DimensionSelectSliderProps>;
14
+ export default DimensionSelectSlider;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { Dimension } from '@opengeoweb/webmap';
3
+ export interface MapDimensionSelectProps {
4
+ layerId: string;
5
+ dimensionName: string;
6
+ handleDimensionValueChanged: (layerId: string, dimensionName: string, dimensionValue: string) => void;
7
+ handleSyncChanged: (layerId: string, dimensionName: string, dimensionValue: string, synced: boolean) => void;
8
+ layerDimension: Dimension;
9
+ layerName: string;
10
+ }
11
+ declare const MapDimensionSelect: React.FC<MapDimensionSelectProps>;
12
+ export default MapDimensionSelect;
@@ -0,0 +1,6 @@
1
+ export { default as DimensionSelectButton } from './DimensionSelectButton';
2
+ export { default as DimensionSelectDialog } from './DimensionSelectDialog';
3
+ export { default as DimensionSelectSlider } from './DimensionSelectSlider';
4
+ export { default as MapDimensionSelect } from './MapDimensionSelect';
5
+ export { dimensionConfig, marksByDimension } from './utils';
6
+ export type { DimensionConfig } from './utils';
@@ -0,0 +1,18 @@
1
+ import type { SvgIconProps } from '@mui/material';
2
+ import type { TFunction } from 'i18next';
3
+ import type React from 'react';
4
+ import type { WMJSDimension } from '@opengeoweb/webmap';
5
+ export interface DimensionConfig {
6
+ name: string;
7
+ label: string;
8
+ defaultUnit: string;
9
+ reversed: boolean;
10
+ iconType: string;
11
+ }
12
+ export declare const dimensionConfig: (t: TFunction) => DimensionConfig[];
13
+ export declare const getDimensionIcon: (iconType: string) => React.FC<SvgIconProps>;
14
+ export interface Mark {
15
+ value: number | string;
16
+ label?: React.ReactNode;
17
+ }
18
+ export declare const marksByDimension: (t: TFunction, dim: WMJSDimension) => Mark[];
@@ -0,0 +1,5 @@
1
+ export declare const CLASSNAME_MAP_MEASURE_TOOLTIP = "text-tooltip-map-measure";
2
+ export interface MapMeasureInterface {
3
+ lineColor?: string;
4
+ }
5
+ export declare const MapMeasure: React.FC;
@@ -0,0 +1 @@
1
+ export * from './MapMeasure';
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const MapMousePosition: React.FC;
@@ -0,0 +1 @@
1
+ export * from './MapMousePosition';
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { Dimension } from '@opengeoweb/webmap';
3
+ export declare const getTimeDimension: (dimensions: Dimension[]) => Dimension;
4
+ export declare const formatTime: (time: string, timeFormat: string) => string;
5
+ interface MapeTimeProps {
6
+ dimensions: Dimension[];
7
+ timeFormat?: string;
8
+ }
9
+ export declare const defaultTimeFormat = "EEE dd MMM yyyy HH:mm 'UTC'";
10
+ export declare const MapTime: React.FC<MapeTimeProps>;
11
+ export {};
@@ -0,0 +1 @@
1
+ export * from './MapTime';
@@ -0,0 +1,22 @@
1
+ interface WarningListProps {
2
+ selectedFeatureProperties: {
3
+ identifier?: string;
4
+ severity?: string;
5
+ certainty?: string;
6
+ onset?: string;
7
+ expires?: string;
8
+ languages?: Language[];
9
+ };
10
+ languageIndex?: number;
11
+ parentSize?: number;
12
+ }
13
+ interface Language {
14
+ areaDesc: string;
15
+ language: string;
16
+ event: string;
17
+ senderName: string;
18
+ headline: string;
19
+ description: string;
20
+ }
21
+ export declare const MapWarningProperties: React.FC<WarningListProps>;
22
+ export {};
@@ -0,0 +1 @@
1
+ export { MapWarningProperties } from './MapWarningProperties';
@@ -0,0 +1,5 @@
1
+ export declare const FEATURE_DRAW_FILL_COLOR_TRANSPARENT = "#186DFF18";
2
+ export declare const FEATURE_DRAW_FILL_COLOR = "#186DFF";
3
+ export declare const FEATURE_DRAW_STROKE_COLOR = "#186DFF";
4
+ export declare const FEATURE_DRAW_SECONDARY_FILL_COLOR = "#6e1e91";
5
+ export declare const FEATURE_DRAW_SECONDARY_STROKE_COLOR = "#6e1e91";
@@ -0,0 +1,52 @@
1
+ import type { ColorLike } from 'ol/colorlike';
2
+ import type { Coordinate } from 'ol/coordinate';
3
+ import type { FeatureLike } from 'ol/Feature';
4
+ import { Polygon } from 'ol/geom';
5
+ import type { LineCoordType, GeometryFunction } from 'ol/interaction/Draw';
6
+ import { Circle, Fill, Stroke } from 'ol/style';
7
+ import type { StyleFunction, StyleLike } from 'ol/style/Style';
8
+ import Style from 'ol/style/Style';
9
+ import type { DrawModeValue } from './draw/types';
10
+ export declare enum MapFeatureClass {
11
+ MyLocation = "MyLocation",
12
+ GenericMarker = "GenericMarker",
13
+ ObservationStation = "ObservationStation",
14
+ EDRFeature = "EDRFeature",
15
+ EDRMultiPolygon = "EDRMultiPolygon",
16
+ Plugin = "Plugin",
17
+ default = "default"
18
+ }
19
+ export declare const FEATURE_FILL: Fill;
20
+ export declare const FEATURE_STROKE: Stroke;
21
+ export declare const FEATURE_STROKE_EDIT: Stroke;
22
+ export declare const FEATURE_FILL_SELECTED: Fill;
23
+ export declare const FEATURE_STROKE_SELECTED: Stroke;
24
+ export declare const FEATURE_VERTICE_IMAGE: Circle;
25
+ export declare const FEATURE_VERTICE_HANDLE_IMAGE: Circle;
26
+ export declare const FEATURE_VERTICES_EDIT_HANDLES: Style;
27
+ export declare const getFeaturePointStyle: (fillColor?: string, fillOpacity?: number) => Style;
28
+ export declare const labelOptions: {
29
+ font: string;
30
+ padding: number[];
31
+ fill: Fill;
32
+ text: string;
33
+ backgroundFill: Fill;
34
+ backgroundStroke: Stroke;
35
+ offsetY: number;
36
+ overflow: boolean;
37
+ };
38
+ export declare const textLabelStyle: (text: string) => Style;
39
+ export declare const multiPolygonLabelStyle: (text: string) => Style;
40
+ export declare const multiLineStringLabelStyle: (text: string) => Style;
41
+ export declare const measureToolStyle: (lineColor: string) => Style;
42
+ export declare const measureResultStyle: (lineColor: string) => Style;
43
+ export declare const geowebColorToOpenLayersColor: (color: string | undefined, opacity?: string | number) => ColorLike;
44
+ export declare const inlineFeatureStyle: (feature: FeatureLike) => Style[];
45
+ export declare const genericOpenLayersFeatureStyle: StyleFunction;
46
+ export declare const splitStyle: StyleLike;
47
+ export declare const catmullRomSpline: (points: LineCoordType, numPoints?: number) => Coordinate[];
48
+ export declare const createBoxBasedOnModifiedVertex: (modifiedGeometry: Polygon, originalGeometry: Polygon, keepSquare?: boolean) => Polygon;
49
+ export declare const getBoxRotateHandlePoints: (feature: FeatureLike, resolution?: number) => Coordinate[] | undefined;
50
+ export declare const createOval: () => GeometryFunction;
51
+ export declare const drawStyles: Record<DrawModeValue, StyleLike>;
52
+ export declare const modifyStyles: Record<DrawModeValue, Style[] | StyleLike>;
@@ -0,0 +1,2 @@
1
+ export declare const OPENLAYERS_MOUSEWHEEL_DURATION = 50;
2
+ export declare const OPENLAYERS_MOUSEWHEEL_TIMEOUT = 50;
@@ -0,0 +1,13 @@
1
+ import { View } from 'ol';
2
+ import React from 'react';
3
+ import 'ol/ol.css';
4
+ export interface OpenLayersMapViewProps {
5
+ view?: View;
6
+ children?: React.ReactNode;
7
+ isFocused?: boolean;
8
+ isMouseWheelZoomEnabled?: boolean;
9
+ passiveMap?: boolean;
10
+ holdShiftToScroll?: boolean;
11
+ mapId?: string;
12
+ }
13
+ export declare const OpenLayersMapView: React.FC<OpenLayersMapViewProps>;
@@ -0,0 +1,6 @@
1
+ import type { Map } from 'ol';
2
+ export interface MapContextType {
3
+ map: Map | null;
4
+ }
5
+ declare const MapContext: import("react").Context<MapContextType>;
6
+ export default MapContext;
@@ -0,0 +1,6 @@
1
+ import type { TimeContextType } from '../types/Timespan';
2
+ export type ChangeRelevantTimestepsFn = (layerId: string, dimensionValues: string[]) => void;
3
+ export type ResetPrefetchFn = (layerId: string) => void;
4
+ export type TimestepPrefetchedFn = (layerId: string, dimensionValue: string) => void;
5
+ declare const TimeContext: import("react").Context<TimeContextType>;
6
+ export default TimeContext;
@@ -0,0 +1,8 @@
1
+ import type { MapLocation } from '../../../types/types';
2
+ export interface OpenLayersGetFeatureInfoProps {
3
+ displayMapPin?: boolean;
4
+ disableMapPin?: boolean;
5
+ mapPinLocation?: MapLocation;
6
+ selectLocation: (location: MapLocation) => void;
7
+ }
8
+ export declare const OpenLayersGetFeatureInfo: React.FC<OpenLayersGetFeatureInfoProps>;
@@ -0,0 +1,6 @@
1
+ import type { Extent } from 'ol/extent';
2
+ interface OpenLayersZoomControlProps {
3
+ homeExtent?: Extent;
4
+ }
5
+ export declare const OpenLayersZoomControl: React.FC<OpenLayersZoomControlProps>;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './OpenLayersGetFeatureInfo';
2
+ export * from './OpenLayersZoomControl';
@@ -0,0 +1,29 @@
1
+ import type { Feature } from 'ol';
2
+ import type { Geometry } from 'ol/geom';
3
+ import type { StyleLike } from 'ol/style/Style';
4
+ import React from 'react';
5
+ import type { DrawModeExitCallback, DrawModeValue } from './types';
6
+ export interface OpenLayersMapDrawProps {
7
+ geojson: GeoJSON.FeatureCollection;
8
+ drawMode?: DrawModeValue;
9
+ viewOnlyStyle: StyleLike;
10
+ exitDrawModeCallback?: (reason: DrawModeExitCallback) => void;
11
+ isInEditMode: boolean;
12
+ selectedFeatureIndex: number;
13
+ updateGeojson?: (geoJson: GeoJSON.FeatureCollection, text: string) => void;
14
+ onViewOnlyFeatureClick?: (feature: Feature<Geometry>[]) => void;
15
+ onNoFeatureClick?: () => void;
16
+ }
17
+ /**
18
+ * Integrates with OpenLayers Draw and Modify (+Snap) interactions, to implement feature drawing
19
+ * and modification behaviour.
20
+ *
21
+ * There is a corner case where this fails: the user will only be able to edit the existing
22
+ * feature (not add) when there are 1) multiple features in the geojson, and 2) the
23
+ * selectedFeatureIndex points to a feature with of the same type as drawMode is going to draw. To
24
+ * fix this properly, it would be better that the surrounding code would add a placeholder feature
25
+ * in the geojson and then activate drawing at that feature index. This means the openlayers version
26
+ * works slightly differently from the WebMapJS version, but since the multi-feature edit feature
27
+ * is not really a requirement for any production workflows, this functionality was left as is.
28
+ */
29
+ export declare const OpenLayersMapDraw: React.FC<OpenLayersMapDrawProps>;
@@ -0,0 +1,19 @@
1
+ export declare const DEFAULT_GEOJSON_STYLE_FILL_OPACITY = 0.1;
2
+ export declare const defaultGeoJSONStyleProperties: GeoJSON.GeoJsonProperties;
3
+ export declare const emptyGeoJSON: GeoJSON.FeatureCollection;
4
+ export declare const featurePoint: GeoJSON.Feature<GeoJSON.Point>;
5
+ export declare const featureMultiPoint: GeoJSON.Feature<GeoJSON.MultiPoint>;
6
+ export declare const featurePolygon: GeoJSON.Feature<GeoJSON.Polygon>;
7
+ export declare const lineString: GeoJSON.Feature<GeoJSON.LineString>;
8
+ export declare const lineStringCollection: GeoJSON.FeatureCollection;
9
+ export interface GeoFeatureStyle {
10
+ stroke?: string;
11
+ fill?: string;
12
+ 'stroke-width'?: number;
13
+ 'stroke-opacity'?: number;
14
+ 'fill-opacity'?: number;
15
+ }
16
+ export interface Coordinate {
17
+ x: number;
18
+ y: number;
19
+ }
@@ -0,0 +1,12 @@
1
+ export * from './OpenLayersMapDraw';
2
+ export * from './types';
3
+ export { useMapDrawTool, defaultPoint, defaultDelete, defaultPolygon, defaultBox, defaultLocation, defaultIntersectionStyleProperties, defaultSmoothLine, defaultCircle, defaultFreehandLine, defaultLineString, defaultOval, defaultSplit, defaultSquare, defaultRotatableBox, getIcon, currentlySupportedDrawModes, defaultModes, } from './useMapDrawTool';
4
+ export type { MapDrawToolOptions } from './useMapDrawTool';
5
+ export * from './utils';
6
+ export * from './storyExamplesMapDrawTool';
7
+ export * from './storyExamplesMapDrawToolIntersection';
8
+ export * from './storyExamplesMapDrawToolMultipleDrawTools';
9
+ export * from './geojsonShapes';
10
+ export * from './mapDrawUtils';
11
+ export * from './storyComponents';
12
+ export * from './polygonCleanDangling';
@@ -0,0 +1,12 @@
1
+ import type { FeatureCollection, Feature, Position } from 'geojson';
2
+ import type { Converter } from 'proj4';
3
+ export type ProjectorCache = Record<string, Converter>;
4
+ export declare const projectorCache: ProjectorCache;
5
+ export declare const getProj4: (projection: string | Converter) => Converter;
6
+ export declare const NEW_LINESTRING_CREATED = "new point in LineString created";
7
+ export declare const NEW_FEATURE_CREATED = "new feature created";
8
+ export declare const NEW_POINT_CREATED = "new point created";
9
+ export declare const roundCoordinates: <T extends Position | Position[] | Position[][] | Position[][][]>(coords: T) => T;
10
+ export declare const roundFeatureCoordinates: <T extends Feature>(feature: T) => T;
11
+ export declare const splitPolygon: (polygonFeature: Feature<GeoJSON.Polygon>, splitFeature: Feature<GeoJSON.Polygon>) => FeatureCollection<GeoJSON.Polygon> | null;
12
+ export declare const splitLine: (drawFeature: Feature<GeoJSON.LineString>, splitFeature: Feature<GeoJSON.LineString>) => FeatureCollection<GeoJSON.LineString> | null;
@@ -0,0 +1,35 @@
1
+ import type { Polygon, FeatureCollection, GeoJsonProperties } from 'geojson';
2
+ import type { Feature as OlFeature } from 'ol';
3
+ import type { Coordinate } from 'ol/coordinate';
4
+ /**
5
+ * Removes lines that are reversed in direction
6
+ * @param newPolyCoords List of coordinates
7
+ * @returns Cleaned up list of coordinates.
8
+ */
9
+ export declare const removeOverlappingLines: (newPolyCoords: Coordinate[], props?: {
10
+ angleTolerance: number;
11
+ }) => Coordinate[];
12
+ export declare const polygonCleanDanglingCoords: (polyCoords: Coordinate[], props?: {
13
+ distanceTolerance: number;
14
+ angleTolerance: number;
15
+ }) => Coordinate[];
16
+ /**
17
+ * This cleans dangling line segments from a polygon. The distanceTolerance can be set to remove small segments too.
18
+ * @param features Feature to clean, currently only Polygons are supported.
19
+ * @param distanceTolerance The distanceTolerance in the same coordinate system as the feature
20
+ * @returns cleaned up features
21
+ */
22
+ export declare const polygonCleanDangling: (features: OlFeature[], props?: {
23
+ distanceTolerance: number;
24
+ angleTolerance: number;
25
+ }) => OlFeature[];
26
+ /**
27
+ * This cleans dangling line segments from a polygon. The distanceTolerance can be set to remove small segments too.
28
+ * @param features Feature to clean, currently only Polygons are supported.
29
+ * @param distanceTolerance The distanceTolerance in the same coordinate system as the feature
30
+ * @returns cleaned up features
31
+ */
32
+ export declare const polygonFeatureCollectionCleanDangling: (features: FeatureCollection<Polygon, GeoJsonProperties> | null, props?: {
33
+ distanceTolerance: number;
34
+ angleTolerance: number;
35
+ }) => FeatureCollection<Polygon, GeoJsonProperties> | null;
@@ -0,0 +1,7 @@
1
+ interface EditModeButtonProps {
2
+ isInEditMode: boolean;
3
+ onToggleEditMode: (isEditMode: boolean) => void;
4
+ drawMode: string;
5
+ }
6
+ export declare const EditModeButton: React.FC<EditModeButtonProps>;
7
+ export default EditModeButton;
@@ -0,0 +1,8 @@
1
+ interface FeatureLayersProps {
2
+ geojson: GeoJSON.FeatureCollection;
3
+ onChangeLayerIndex: (newIndex: number, feature: GeoJSON.Feature) => void;
4
+ activeFeatureLayerIndex: number;
5
+ getToolIcon: (selectionType: string) => React.ReactElement;
6
+ }
7
+ declare const FeatureLayers: React.FC<FeatureLayersProps>;
8
+ export default FeatureLayers;