@conboai/storybook.components 0.4.34 → 0.4.36

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, selectedGeoId: selectedGeoIdFromProps, onSelect, onMouseMove, showDirection, showNumbers, allowDelete, allowAdd, disableControls, fitZoom, mapCentering, showOnlyPoints, zoom: zoomFromProps }: GeoComponentProps) => React.JSX.Element;
4
+ declare const Geo: ({ mode: modeFromProps, resetKey: resetKeyFromProps, onChange: onChangeFromProps, onComplete, data, selectedGeoId: selectedGeoIdFromProps, onSelect, onMouseMove, onDragEnd, showDirection, showNumbers, allowDelete, allowAdd, disableControls, fitZoom, mapCentering, showOnlyPoints, initialCenter, zoom: zoomFromProps, }: GeoComponentProps) => React.JSX.Element;
5
5
  export default Geo;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { GeoType } from '../../types';
3
+
4
+ interface IPointMarker {
5
+ entity: GeoType;
6
+ onSelect?: (geo: GeoType) => void;
7
+ index: number;
8
+ selectedGeoId: string | null;
9
+ }
10
+ declare const PointMarker: ({ entity, onSelect, index, selectedGeoId, }: IPointMarker) => React.JSX.Element;
11
+ export default PointMarker;
@@ -11,5 +11,5 @@ export interface IPolygonProps {
11
11
  showOnlyPoints?: boolean;
12
12
  showNumbers?: boolean;
13
13
  }
14
- declare const Polygon: ({ selected, onChange: onChangeFromProps, onClick: onClickFromProps, data, mode, color, showNumbers, showOnlyPoints }: IPolygonProps) => React.JSX.Element;
14
+ declare const Polygon: React.MemoExoticComponent<({ selected, onChange: onChangeFromProps, onClick: onClickFromProps, data, mode, color, showNumbers, showOnlyPoints }: IPolygonProps) => React.JSX.Element>;
15
15
  export default Polygon;
@@ -0,0 +1,4 @@
1
+ import { CoordinatePoint } from '../../types';
2
+
3
+ export declare const removeSamePoint: (coordinates?: CoordinatePoint[]) => CoordinatePoint[];
4
+ export declare const addSamePoint: (coordinates?: CoordinatePoint[]) => CoordinatePoint[];
@@ -9,5 +9,5 @@ interface IPolyline {
9
9
  showNumbers?: boolean;
10
10
  showOnlyPoints?: boolean;
11
11
  }
12
- declare const Polyline: ({ zoom: zoomFromProps, showDirection, onChange: onChangeFromProps, data, showNumbers, showOnlyPoints }: IPolyline) => React.JSX.Element;
12
+ declare const Polyline: React.MemoExoticComponent<({ zoom: zoomFromProps, showDirection, onChange: onChangeFromProps, data, showNumbers, showOnlyPoints }: IPolyline) => React.JSX.Element>;
13
13
  export default Polyline;
@@ -12,5 +12,5 @@ interface ShapeDrawerProps {
12
12
  showNumbers?: boolean;
13
13
  showOnlyPoints?: boolean;
14
14
  }
15
- export declare const ShapeDrawer: ({ mapInstance, onComplete, onChange, resetKey, mode, zoom, setMode, showNumbers, showOnlyPoints }: ShapeDrawerProps) => React.JSX.Element;
15
+ export declare const ShapeDrawer: React.MemoExoticComponent<({ mapInstance, onComplete, onChange, resetKey, mode, zoom, setMode, showNumbers, showOnlyPoints }: ShapeDrawerProps) => React.JSX.Element>;
16
16
  export {};
@@ -8,6 +8,7 @@ export declare const defaultProps: {
8
8
  zoom: number;
9
9
  };
10
10
  export declare const defaultGeoObject: {
11
+ id: string;
11
12
  type: EntityTypes;
12
13
  coordinates: never[];
13
14
  };
@@ -13,11 +13,11 @@ export declare const resetStyles: {
13
13
  border: string;
14
14
  fontWeight: string;
15
15
  boxShadow: string;
16
- '&.${buttonClasses.disabled}': {
16
+ "&.${buttonClasses.disabled}": {
17
17
  cursor: string;
18
18
  opacity: string;
19
19
  };
20
- '&:hover': {
20
+ "&:hover": {
21
21
  color: string;
22
22
  backgroundColor: string;
23
23
  };
@@ -29,6 +29,7 @@ export declare const drawingManagerPolygonOptionsDefault: {
29
29
  strokeOpacity: number;
30
30
  strokeWeight: number;
31
31
  zIndex: number;
32
+ clickable: boolean;
32
33
  editable: boolean;
33
34
  };
34
35
  export declare const drawingManagerPolygonOptionsSelected: {
@@ -8,9 +8,13 @@ export interface GeoType {
8
8
  id: string;
9
9
  name?: string;
10
10
  type: EntityTypes;
11
- coordinates: Array<CoordinatePoint>;
11
+ coordinates: CoordinatePoint[];
12
12
  zoom?: number;
13
13
  isInFov?: boolean;
14
+ styles?: Record<string, any>;
15
+ showNumbers?: boolean;
16
+ isEditable?: boolean;
17
+ text?: string;
14
18
  }
15
19
  export interface CoordinatePoint {
16
20
  lat: number;
@@ -18,7 +22,7 @@ export interface CoordinatePoint {
18
22
  }
19
23
  export type GeoMode = {
20
24
  type: "view";
21
- shape: "polyline" | "polygon";
25
+ shape: "polyline" | "polygon" | "marker";
22
26
  } | {
23
27
  type: "edit";
24
28
  shape: "";
@@ -42,8 +46,10 @@ export interface GeoComponentProps {
42
46
  zoom?: number;
43
47
  fitZoom?: boolean;
44
48
  mapCentering?: boolean;
49
+ initialCenter?: CoordinatePoint;
45
50
  showOnlyPoints?: boolean;
46
51
  disableControls?: boolean;
52
+ onDragEnd?: (mapInstance: google.maps.Map | null) => void;
47
53
  }
48
54
  export declare enum LibraryTypes {
49
55
  DRAWING = "drawing",
@@ -5,6 +5,7 @@ export declare const pointsAreClose: (p1: google.maps.LatLng, p2: google.maps.La
5
5
  export declare const findPolygonCenter: (points: CoordinatePoint[]) => CoordinatePoint;
6
6
  export declare const findPolylineCenter: (points: CoordinatePoint[]) => CoordinatePoint;
7
7
  export declare const fitBoundsToPoints: (mapInstance: google.maps.Map | null, points: CoordinatePoint[]) => void;
8
- export declare const arrayToGeoCoordinates: (coordinates: number[][]) => CoordinatePoint[];
9
- export declare const geoCoordinatesToArray: (coordinates: CoordinatePoint[]) => number[][];
8
+ export declare const addRandomDecimal: (number: number) => number;
9
+ export declare const arrayToGeoCoordinates: (coordinates?: number[][]) => CoordinatePoint[];
10
+ export declare const geoCoordinatesToArray: (coordinates: CoordinatePoint[], altitude?: boolean) => number[][];
10
11
  export declare const colorPalette: string[];
@@ -1,25 +1,15 @@
1
1
  import { default as React } from 'react';
2
2
  import { SxProps } from '@mui/material';
3
+ import { GeoType } from '../Geo/types';
3
4
 
4
5
  export interface MapPlayerProps {
5
6
  data: any[];
6
- initialCenter: {
7
- lat: number;
8
- lng: number;
9
- };
10
- onChange?: (data: {
11
- id: string;
12
- type: string;
13
- time: string;
14
- coordinates: {
15
- lng: number;
16
- lat: number;
17
- }[];
18
- }) => void;
7
+ onChange?: (value: string) => void;
19
8
  onInitialLoad?: (data: {
20
9
  id: string;
21
10
  type: string;
22
- time: string;
11
+ startTime: string;
12
+ endTime: string;
23
13
  coordinates: {
24
14
  lng: number;
25
15
  lat: number;
@@ -29,19 +19,14 @@ export interface MapPlayerProps {
29
19
  disabled?: boolean;
30
20
  sx?: SxProps;
31
21
  clearFrameDetails?: () => void;
32
- fetchFrameDetails?: (data: {
33
- id: string;
34
- type: string;
35
- time: string;
36
- coordinates: {
37
- lng: number;
38
- lat: number;
39
- }[];
40
- }) => void;
22
+ fetchFrameDetails?: (value: string) => void;
41
23
  delay?: string;
42
24
  onClear?: () => void;
43
25
  previewImageSize?: string;
44
26
  mapHeight?: string;
27
+ getCurrentTime?: (value: string) => void;
28
+ onSelectPoint?: (geo: GeoType) => void;
29
+ selectedGeoId?: string | null;
45
30
  }
46
31
  declare const MapPlayer: React.FC<MapPlayerProps>;
47
32
  export default MapPlayer;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { IShapesProps } from './types';
2
+ import { default as React } from 'react';
3
3
 
4
- declare const Shapes: ({ children, mode: modeFromProps, onModeChange: _onModeChange, shapes: shapesFromProps, selected, onShapeChange, onShapeSelect, onMouseMove, menu, showNumbers, showId, showOnlyPoints, showPoints, showDirection, selectedShapeZIndex, styles, }: IShapesProps) => React.JSX.Element;
4
+ declare const Shapes: ({ children, mode: modeFromProps, onModeChange: _onModeChange, shapes: shapesFromProps, selected, onShapeChange, onShapeSelect, onMouseMove, menu, showNumbers, showId, showOnlyPoints, showPoints, showDirection, selectedShapeZIndex, styles }: IShapesProps) => React.JSX.Element;
5
5
  export default Shapes;
@@ -5,3 +5,8 @@ export declare const emptyShape: {
5
5
  type: ShapeType;
6
6
  points: never[];
7
7
  };
8
+ export declare const cursorTypes: {
9
+ 2: string;
10
+ 1: string;
11
+ 0: string;
12
+ };