@conboai/storybook.components 0.3.30 → 0.3.31
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/dist/components/Geo/Geo.d.ts +1 -1
- package/dist/components/Geo/LoadScriptWrapper.d.ts +2 -2
- package/dist/components/Geo/components/Polygon/index.d.ts +3 -2
- package/dist/components/Geo/components/Polyline/index.d.ts +1 -1
- package/dist/components/Geo/components/ShapeDrawer/index.d.ts +3 -2
- package/dist/components/Geo/styles.d.ts +16 -0
- package/dist/components/Geo/types.d.ts +4 -3
- package/dist/components/Geo/useGetMapZoom.d.ts +2 -1
- package/dist/components/Geo/useMousePosition.d.ts +2 -8
- package/dist/components/Geo/utils.d.ts +1 -0
- package/dist/storybook.components.mjs +8771 -8715
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { GeoComponentProps } from './types';
|
|
3
3
|
|
|
4
|
-
declare const Geo: ({ showDirection, mode: modeFromProps, resetKey: resetKeyFromProps, onChange: onChangeFromProps, onComplete, data, selectedGeoId: selectedGeoIdFromProps, onSelect, onMouseMove, showNumbers,
|
|
4
|
+
declare const Geo: ({ showDirection, mode: modeFromProps, resetKey: resetKeyFromProps, onChange: onChangeFromProps, onComplete, data, selectedGeoId: selectedGeoIdFromProps, onSelect, onMouseMove, showNumbers, allowDelete, allowAdd, disableControls, fitZoom, mapCentering, zoom: zoomFromProps }: GeoComponentProps) => React.JSX.Element;
|
|
5
5
|
export default Geo;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { LibraryTypes } from './types';
|
|
3
3
|
|
|
4
4
|
export declare const libraries: LibraryTypes[];
|
|
5
5
|
export declare const LoadScriptWrapper: ({ children }: {
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
}) =>
|
|
7
|
+
}) => JSX.Element;
|
|
@@ -2,12 +2,13 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { CoordinatePoint, GeoMode, GeoType } from '../../types';
|
|
3
3
|
|
|
4
4
|
export interface IPolygonProps {
|
|
5
|
-
onChange?: (polygonPath: CoordinatePoint[]) => void;
|
|
5
|
+
onChange?: (polygonPath: CoordinatePoint[], id: string, isComplete: boolean) => void;
|
|
6
6
|
onClick?: (geoData: GeoType) => void;
|
|
7
7
|
data?: GeoType | null;
|
|
8
8
|
mode?: GeoMode;
|
|
9
|
+
color?: string;
|
|
9
10
|
selected?: boolean;
|
|
10
11
|
showNumbers?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare const Polygon: ({ selected, onChange: onChangeFromProps, onClick: onClickFromProps, data, mode, showNumbers }: IPolygonProps) => React.JSX.Element;
|
|
13
|
+
declare const Polygon: ({ selected, onChange: onChangeFromProps, onClick: onClickFromProps, data, mode, color, showNumbers }: IPolygonProps) => React.JSX.Element;
|
|
13
14
|
export default Polygon;
|
|
@@ -4,7 +4,7 @@ import { CoordinatePoint, GeoType } from '../../types';
|
|
|
4
4
|
interface IPolyline {
|
|
5
5
|
zoom?: number;
|
|
6
6
|
showDirection?: boolean;
|
|
7
|
-
onChange?: (polygonPath: CoordinatePoint[]) => void;
|
|
7
|
+
onChange?: (polygonPath: CoordinatePoint[], id: string, isComplete: boolean) => void;
|
|
8
8
|
data?: GeoType | null;
|
|
9
9
|
showNumbers?: boolean;
|
|
10
10
|
}
|
|
@@ -4,11 +4,12 @@ import { CoordinatePoint, GeoMode } from '../../types';
|
|
|
4
4
|
interface ShapeDrawerProps {
|
|
5
5
|
mapInstance: google.maps.Map | null;
|
|
6
6
|
onComplete?: (path: CoordinatePoint[]) => void;
|
|
7
|
-
onChange?: (path: CoordinatePoint[], isCompleted?: boolean) => void;
|
|
7
|
+
onChange?: (path: CoordinatePoint[], id: string, isCompleted?: boolean) => void;
|
|
8
8
|
resetKey: number;
|
|
9
9
|
mode: GeoMode;
|
|
10
|
+
zoom: number;
|
|
10
11
|
setMode: Dispatch<SetStateAction<GeoMode>>;
|
|
11
12
|
showNumbers?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare const ShapeDrawer: ({ mapInstance, onComplete, onChange, resetKey, mode, setMode, showNumbers }: ShapeDrawerProps) => React.JSX.Element;
|
|
14
|
+
export declare const ShapeDrawer: ({ mapInstance, onComplete, onChange, resetKey, mode, zoom, setMode, showNumbers }: ShapeDrawerProps) => React.JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -50,3 +50,19 @@ export declare const drawingManagerPolylineOptions: {
|
|
|
50
50
|
strokeWeight: number;
|
|
51
51
|
zIndex: number;
|
|
52
52
|
};
|
|
53
|
+
export declare const addBtnStyle: {
|
|
54
|
+
opacity: number;
|
|
55
|
+
backgroundColor: string;
|
|
56
|
+
color: string;
|
|
57
|
+
borderRadius: string;
|
|
58
|
+
border: string;
|
|
59
|
+
position: string;
|
|
60
|
+
height: number;
|
|
61
|
+
top: number;
|
|
62
|
+
right: number;
|
|
63
|
+
"&:hover": {
|
|
64
|
+
backgroundColor: string;
|
|
65
|
+
cursor: string;
|
|
66
|
+
color: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -5,7 +5,7 @@ export declare enum EntityTypes {
|
|
|
5
5
|
Polyline = "polyline"
|
|
6
6
|
}
|
|
7
7
|
export interface GeoType {
|
|
8
|
-
id
|
|
8
|
+
id: string;
|
|
9
9
|
name?: string;
|
|
10
10
|
type: EntityTypes;
|
|
11
11
|
coordinates: Array<CoordinatePoint>;
|
|
@@ -27,7 +27,7 @@ export type GeoMode = {
|
|
|
27
27
|
shape: "polyline" | "polygon";
|
|
28
28
|
};
|
|
29
29
|
export interface GeoComponentProps {
|
|
30
|
-
onChange?: (polygonPath: CoordinatePoint[], isCompleted?: boolean) => void;
|
|
30
|
+
onChange?: (polygonPath: CoordinatePoint[], id: string, isCompleted?: boolean) => void;
|
|
31
31
|
onComplete?: (polygonPath: CoordinatePoint[]) => void;
|
|
32
32
|
onSelect?: (geo: GeoType) => void;
|
|
33
33
|
mode?: GeoMode;
|
|
@@ -36,7 +36,8 @@ export interface GeoComponentProps {
|
|
|
36
36
|
data?: GeoType[] | null;
|
|
37
37
|
onMouseMove?: (coordinatePoint: CoordinatePoint) => void;
|
|
38
38
|
showNumbers?: boolean;
|
|
39
|
-
|
|
39
|
+
allowDelete?: boolean;
|
|
40
|
+
allowAdd?: boolean;
|
|
40
41
|
selectedGeoId?: string | null;
|
|
41
42
|
zoom?: number;
|
|
42
43
|
fitZoom?: boolean;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
export declare const useMousePosition: (path: google.maps.LatLng[] | undefined, isPolygonComplete: boolean) => {
|
|
2
|
-
mousePositionPath:
|
|
3
|
-
lat: number;
|
|
4
|
-
lng: number;
|
|
5
|
-
} | undefined)[];
|
|
2
|
+
mousePositionPath: any;
|
|
6
3
|
onMouseMove: (event: google.maps.MapMouseEvent) => void;
|
|
7
|
-
|
|
8
|
-
lat: number;
|
|
9
|
-
lng: number;
|
|
10
|
-
};
|
|
4
|
+
mousePosition: google.maps.LatLng | null;
|
|
11
5
|
};
|
|
@@ -6,3 +6,4 @@ export declare const pointsAreClose: (p1: google.maps.LatLng, p2: google.maps.La
|
|
|
6
6
|
export declare const findPolygonCenter: (points: CoordinatePoint[]) => CoordinatePoint;
|
|
7
7
|
export declare const findPolylineCenter: (points: CoordinatePoint[]) => CoordinatePoint;
|
|
8
8
|
export declare const fitBoundsToPoints: (mapInstance: google.maps.Map | null, points: CoordinatePoint[]) => void;
|
|
9
|
+
export declare const colorPalette: string[];
|