@longline/aqua-ui 1.0.39 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/map/Map/Map.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Map as OriginalMap } from 'mapbox-gl';
3
3
  import { ViewState } from 'react-map-gl';
4
+ import { MapLayerMouseEvent } from 'mapbox-gl';
4
5
  interface IProps {
5
6
  /** @ignore */
6
7
  children?: React.ReactNode;
@@ -61,6 +62,10 @@ interface IProps {
61
62
  * Fired when map is loaded.
62
63
  */
63
64
  onLoad?: (map: OriginalMap) => void;
65
+ /**
66
+ * Fired when map is clicked.
67
+ */
68
+ onClick?: (e: MapLayerMouseEvent) => void;
64
69
  }
65
70
  declare const useViewState: () => ViewState;
66
71
  declare const Map: ({ longitude, latitude, zoom, pitch, bearing, clipped, logoPosition, minZoom, maxZoom, ...props }: IProps) => React.JSX.Element;
package/map/Map/Map.js CHANGED
@@ -207,7 +207,7 @@ var MapBase = function (props) {
207
207
  var handleMove = function (e) {
208
208
  setViewState(e.viewState);
209
209
  };
210
- return (React.createElement(GLMap, __assign({}, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: 1, maxZoom: 20, doubleClickZoom: true, onMove: handleMove, onLoad: handleLoad }),
210
+ return (React.createElement(GLMap, __assign({}, viewState, { mapboxAccessToken: props.token, style: { width: '100%', height: '100%', minHeight: '300px', font: theme.font.bodyMedium }, logoPosition: props.logoPosition, mapStyle: props.style, minZoom: props.minZoom, maxZoom: props.maxZoom, doubleClickZoom: true, onMove: handleMove, onLoad: handleLoad, onClick: props.onClick }),
211
211
  props.clipped && React.createElement(React.Fragment, null,
212
212
  React.createElement(Source, { type: "raster", tiles: ["https://api.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/{z}/{x}/{y}.webp?access_token=".concat(props.token)] },
213
213
  React.createElement(Layer, { id: "overlay", type: "raster" })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longline/aqua-ui",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "AquaUI",
5
5
  "author": "Alexander van Oostenrijk / Longline Environment",
6
6
  "license": "Commercial",