@conboai/storybook.components 0.2.86 → 0.2.90

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.
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { GeoComponentProps } from './types';
3
3
 
4
- declare const Geo: ({ mode: modeFromProps, resetKey: resetKeyFromProps, onChange: onChangeFromProps, onComplete, data, onMouseMove, showNumbers, disableControls, zoom }: GeoComponentProps) => React.JSX.Element;
4
+ declare const Geo: ({ mode: modeFromProps, resetKey: resetKeyFromProps, onChange: onChangeFromProps, onComplete, data, selectedGeoId: selectedGeoIdFromProps, onSelect, onMouseMove, showNumbers, showDeleteIcon, disableControls, fitZoom, zoom: zoomFromProps }: GeoComponentProps) => React.JSX.Element;
5
5
  export default Geo;
@@ -3,9 +3,11 @@ import { CoordinatePoint, GeoMode, GeoType } from '../../types';
3
3
 
4
4
  export interface IPolygonProps {
5
5
  onChange?: (polygonPath: CoordinatePoint[]) => void;
6
+ onClick?: (geoData: GeoType) => void;
6
7
  data?: GeoType | null;
7
8
  mode?: GeoMode;
9
+ selected?: boolean;
8
10
  showNumbers?: boolean;
9
11
  }
10
- declare const Polygon: ({ onChange: onChangeFromProps, data, mode, showNumbers }: IPolygonProps) => React.JSX.Element;
12
+ declare const Polygon: ({ selected, onChange: onChangeFromProps, onClick: onClickFromProps, data, mode, showNumbers }: IPolygonProps) => React.JSX.Element;
11
13
  export default Polygon;
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { CoordinatePoint, GeoType } from '../../types';
3
3
 
4
- declare const Polyline: ({ onChange: onChangeFromProps, data, showNumbers, }: {
4
+ declare const Polyline: ({ onChange: onChangeFromProps, data, showNumbers }: {
5
5
  onChange?: (polygonPath: CoordinatePoint[]) => void;
6
6
  data?: GeoType | null;
7
7
  showNumbers?: boolean;
@@ -22,7 +22,16 @@ export declare const resetStyles: {
22
22
  backgroundColor: string;
23
23
  };
24
24
  };
25
- export declare const drawingManagerPolygonOptions: {
25
+ export declare const drawingManagerPolygonOptionsDefault: {
26
+ fillColor: string;
27
+ strokeColor: string;
28
+ fillOpacity: number;
29
+ strokeOpacity: number;
30
+ strokeWeight: number;
31
+ zIndex: number;
32
+ editable: boolean;
33
+ };
34
+ export declare const drawingManagerPolygonOptionsSelected: {
26
35
  fillColor: string;
27
36
  strokeColor: string;
28
37
  fillOpacity: number;
@@ -28,12 +28,16 @@ export type GeoMode = {
28
28
  export interface GeoComponentProps {
29
29
  onChange?: (polygonPath: CoordinatePoint[], isCompleted?: boolean) => void;
30
30
  onComplete?: (polygonPath: CoordinatePoint[]) => void;
31
+ onSelect?: (geo: GeoType) => void;
31
32
  mode?: GeoMode;
32
33
  resetKey?: number;
33
34
  data?: GeoType[] | null;
34
35
  onMouseMove?: (coordinatePoint: CoordinatePoint) => void;
35
36
  showNumbers?: boolean;
37
+ showDeleteIcon?: boolean;
38
+ selectedGeoId?: string | null;
36
39
  zoom?: number;
40
+ fitZoom?: boolean;
37
41
  disableControls?: boolean;
38
42
  }
39
43
  export declare enum LibraryTypes {
@@ -3,3 +3,6 @@ import { CoordinatePoint } from './types';
3
3
  export declare const getCoordinates: (polyPath: google.maps.MVCArray<google.maps.LatLng>) => CoordinatePoint[];
4
4
  export declare const getLatLngArray: (path: google.maps.LatLng[]) => CoordinatePoint[];
5
5
  export declare const pointsAreClose: (p1: google.maps.LatLng, p2: google.maps.LatLng, threshold?: number) => boolean;
6
+ export declare const findPolygonCenter: (points: CoordinatePoint[]) => CoordinatePoint;
7
+ export declare const findPolylineCenter: (points: CoordinatePoint[]) => CoordinatePoint;
8
+ export declare const fitBoundsToPoints: (mapInstance: google.maps.Map | null, points: CoordinatePoint[]) => void;