@heycar/heycars-map 0.2.9 → 0.2.10
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/Demo/DemoBusinessTaxiEnd.d.ts +4 -1
- package/dist/api/contants.d.ts +2 -0
- package/dist/business-components/AddressBox/AddressBox.d.ts +2 -1
- package/dist/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -1
- package/dist/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +4 -3
- package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +2 -1
- package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +2 -1
- package/dist/business-components/PickupPoints/PickupPoints.d.ts +2 -1
- package/dist/components/MapProvider/MapProvider.d.ts +2 -1
- package/dist/hooks/useMapAutoComplete.d.ts +3 -3
- package/dist/hooks/useMapLog.d.ts +4 -0
- package/dist/hooks/useMapPlace.d.ts +3 -3
- package/dist/hooks/useMapRecomendPlace.d.ts +6 -6
- package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +1 -1
- package/dist/hooks-business/useBusinessRecomendPlaceMap.d.ts +2 -2
- package/dist/hooks-business/useLagecyMapRecomendPlace.d.ts +2 -2
- package/dist/index.cjs +52 -52
- package/dist/index.js +644 -628
- package/dist/types/interface.d.ts +1 -1
- package/dist/utils/helper.d.ts +2 -0
- package/package.json +1 -1
- package/src/App.tsx +3 -3
- package/src/Demo/DemoBusinessRecomendPlace.tsx +42 -12
- package/src/Demo/DemoBusinessTaxiEnd.tsx +34 -9
- package/src/api/contants.ts +3 -0
- package/src/business-components/AddressBox/AddressBox.tsx +4 -1
- package/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.tsx +8 -3
- package/src/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.tsx +21 -11
- package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +3 -0
- package/src/business-components/PassengerCircle/PassengerCircle.tsx +4 -1
- package/src/business-components/PickupPoints/PickupPoints.tsx +3 -1
- package/src/components/MapProvider/MapProvider.tsx +4 -1
- package/src/hooks/useMapLog.ts +12 -0
- package/src/hooks/useMapPlace.ts +8 -3
- package/src/types/amap/geocoder.d.ts +2 -0
- package/src/types/interface.ts +1 -1
- package/src/utils/helper.ts +5 -0
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export declare const DemoBusinessTaxiEnd: import("vue").DefineComponent<
|
|
1
|
+
export declare const DemoBusinessTaxiEnd: import("vue").DefineComponent<{}, unknown, {
|
|
2
|
+
from: {};
|
|
3
|
+
to: {};
|
|
4
|
+
}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
@@ -2,13 +2,14 @@ import { HeycarMapProps } from "../../components/MapProvider";
|
|
|
2
2
|
import type { BusinessRecomendPlaceContext } from "../../hooks-business/useBusinessRecomendPlaceMap";
|
|
3
3
|
import { UseGeoLocationProps } from "../../hooks/useGeoLocation";
|
|
4
4
|
import { UseMapDragProps } from "../../hooks/useMapDrag";
|
|
5
|
+
import { MapLogProps } from "../../hooks/useMapLog";
|
|
5
6
|
import type { UseMapPlaceProps } from "../../hooks/useMapPlace";
|
|
6
7
|
import { UseMapRecomendPlaceProps } from "../../hooks/useMapRecomendPlace";
|
|
7
8
|
import type { Point } from "../../types/interface";
|
|
8
9
|
export interface CenterPlaceSource {
|
|
9
10
|
source: "default" | "geo" | "drag" | "recomend" | "api";
|
|
10
11
|
}
|
|
11
|
-
export interface BusinessRecomendPlaceMapProps extends Omit<HeycarMapProps, "center" | "zoom" | "mapRef">, Pick<UseMapRecomendPlaceProps<CenterPlaceSource>, "getRecomendPlace"
|
|
12
|
+
export interface BusinessRecomendPlaceMapProps extends Omit<HeycarMapProps, "center" | "zoom" | "mapRef">, Pick<UseMapRecomendPlaceProps<CenterPlaceSource>, "getRecomendPlace">, MapLogProps {
|
|
12
13
|
unavailableTitle: string;
|
|
13
14
|
recomendDescription: string;
|
|
14
15
|
noRecomendDescription: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { MapLogProps } from "../../hooks/useMapLog";
|
|
1
2
|
import type { Place } from "../../types/interface";
|
|
2
|
-
export interface BusinessTaxiEndMapProps {
|
|
3
|
-
from: Place
|
|
4
|
-
to: Place
|
|
3
|
+
export interface BusinessTaxiEndMapProps extends MapLogProps {
|
|
4
|
+
from: Partial<Place>;
|
|
5
|
+
to: Partial<Place>;
|
|
5
6
|
}
|
|
6
7
|
export declare const BusinessTaxiEndMap: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessTaxiEndMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessTaxiEndMapProps, Required<BusinessTaxiEndMapProps>>, never, BusinessTaxiEndMapProps, {}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { HeycarMapProps } from "../../components/MapProvider";
|
|
2
2
|
import { MapMountedProps } from "../../hooks/useMap";
|
|
3
|
+
import { MapLogProps } from "../../hooks/useMapLog";
|
|
3
4
|
import type { MROP } from "../../hooks/useOverlay";
|
|
4
5
|
import type { DriverStatus, Place, Point } from "../../types/interface";
|
|
5
|
-
export type SectionEndServiceProps = MROP & MapMountedProps & {
|
|
6
|
+
export type SectionEndServiceProps = MROP & MapLogProps & MapMountedProps & {
|
|
6
7
|
from: Place;
|
|
7
8
|
to: Place;
|
|
8
9
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { MapLogProps } from "../../hooks/useMapLog";
|
|
1
2
|
import type { GmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverlay";
|
|
2
|
-
interface PassengerCircleProps<T> extends MapRegisterOverlayProps<T
|
|
3
|
+
interface PassengerCircleProps<T> extends MapRegisterOverlayProps<T>, MapLogProps {
|
|
3
4
|
position: [number, number];
|
|
4
5
|
size?: "small" | "large";
|
|
5
6
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
2
|
import type { SetMap } from "../../hooks/useHeycarMap";
|
|
3
3
|
import { GmapLoaderProps, UseMapLoaderProps } from "../../hooks/useMapLoader";
|
|
4
|
+
import { MapLogProps } from "../../hooks/useMapLog";
|
|
4
5
|
import { MapSupplierPayolad } from "../../hooks/useMapSupplier";
|
|
5
6
|
import { AmapProps } from "../Amap";
|
|
6
7
|
export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId">;
|
|
7
8
|
export declare const MapProvider: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<MapProviderProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<MapProviderProps, Required<MapProviderProps>>, "change", MapProviderProps, {}>;
|
|
8
|
-
export interface HeycarMapProps extends Pick<GmapLoaderProps, "fallback" | "loading">, Pick<AmapProps, "center" | "zoom"
|
|
9
|
+
export interface HeycarMapProps extends Pick<GmapLoaderProps, "fallback" | "loading">, Pick<AmapProps, "center" | "zoom">, MapLogProps {
|
|
9
10
|
mapRef?: SetMap<AMap.Map> | SetMap<google.maps.Map>;
|
|
10
11
|
onDragEnd?: (value: [number, number]) => any;
|
|
11
12
|
}
|
|
@@ -12,7 +12,7 @@ export declare const useAmapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
|
12
12
|
lat: number;
|
|
13
13
|
name: string;
|
|
14
14
|
cityName?: string | undefined;
|
|
15
|
-
|
|
15
|
+
countryName?: string | undefined;
|
|
16
16
|
}[]>;
|
|
17
17
|
};
|
|
18
18
|
export declare const useGmapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
@@ -25,7 +25,7 @@ export declare const useGmapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
|
25
25
|
lat: number;
|
|
26
26
|
name: string;
|
|
27
27
|
cityName?: string | undefined;
|
|
28
|
-
|
|
28
|
+
countryName?: string | undefined;
|
|
29
29
|
}[]>;
|
|
30
30
|
};
|
|
31
31
|
export declare const useMapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
@@ -38,6 +38,6 @@ export declare const useMapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
|
38
38
|
lat: number;
|
|
39
39
|
name: string;
|
|
40
40
|
cityName?: string | undefined;
|
|
41
|
-
|
|
41
|
+
countryName?: string | undefined;
|
|
42
42
|
}[]>;
|
|
43
43
|
};
|
|
@@ -10,7 +10,7 @@ export declare const useAmapPlace: (props: UseMapPlaceProps) => {
|
|
|
10
10
|
lat: number;
|
|
11
11
|
name: string;
|
|
12
12
|
cityName?: string | undefined;
|
|
13
|
-
|
|
13
|
+
countryName?: string | undefined;
|
|
14
14
|
};
|
|
15
15
|
updatePlace: () => void;
|
|
16
16
|
};
|
|
@@ -20,7 +20,7 @@ export declare const useGmapPlace: (props: UseMapPlaceProps) => {
|
|
|
20
20
|
lat: number;
|
|
21
21
|
name: string;
|
|
22
22
|
cityName?: string | undefined;
|
|
23
|
-
|
|
23
|
+
countryName?: string | undefined;
|
|
24
24
|
};
|
|
25
25
|
updatePlace: () => void;
|
|
26
26
|
};
|
|
@@ -30,7 +30,7 @@ export declare const useMapPlace: (props: UseMapPlaceProps) => {
|
|
|
30
30
|
lat: number;
|
|
31
31
|
name: string;
|
|
32
32
|
cityName?: string | undefined;
|
|
33
|
-
|
|
33
|
+
countryName?: string | undefined;
|
|
34
34
|
};
|
|
35
35
|
updatePlace: () => void;
|
|
36
36
|
};
|
|
@@ -15,14 +15,14 @@ export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
15
15
|
lat: number;
|
|
16
16
|
name: string;
|
|
17
17
|
cityName?: string | undefined;
|
|
18
|
-
|
|
18
|
+
countryName?: string | undefined;
|
|
19
19
|
};
|
|
20
20
|
placeCandidates: Ref<{
|
|
21
21
|
lng: number;
|
|
22
22
|
lat: number;
|
|
23
23
|
name: string;
|
|
24
24
|
cityName?: string | undefined;
|
|
25
|
-
|
|
25
|
+
countryName?: string | undefined;
|
|
26
26
|
}[]>;
|
|
27
27
|
availableRef: Ref<boolean>;
|
|
28
28
|
updateRecomandPlace: () => void;
|
|
@@ -34,14 +34,14 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
34
34
|
lat: number;
|
|
35
35
|
name: string;
|
|
36
36
|
cityName?: string | undefined;
|
|
37
|
-
|
|
37
|
+
countryName?: string | undefined;
|
|
38
38
|
};
|
|
39
39
|
placeCandidates: Ref<{
|
|
40
40
|
lng: number;
|
|
41
41
|
lat: number;
|
|
42
42
|
name: string;
|
|
43
43
|
cityName?: string | undefined;
|
|
44
|
-
|
|
44
|
+
countryName?: string | undefined;
|
|
45
45
|
}[]>;
|
|
46
46
|
availableRef: Ref<boolean>;
|
|
47
47
|
updateRecomandPlace: () => void;
|
|
@@ -53,14 +53,14 @@ export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>
|
|
|
53
53
|
lat: number;
|
|
54
54
|
name: string;
|
|
55
55
|
cityName?: string | undefined;
|
|
56
|
-
|
|
56
|
+
countryName?: string | undefined;
|
|
57
57
|
};
|
|
58
58
|
placeCandidates: Ref<{
|
|
59
59
|
lng: number;
|
|
60
60
|
lat: number;
|
|
61
61
|
name: string;
|
|
62
62
|
cityName?: string | undefined;
|
|
63
|
-
|
|
63
|
+
countryName?: string | undefined;
|
|
64
64
|
}[]>;
|
|
65
65
|
availableRef: Ref<boolean>;
|
|
66
66
|
updateRecomandPlace: () => void;
|
|
@@ -10,7 +10,7 @@ export declare const useBusinessMapAutoComplete: (props: UseBusinessMapAutoCompl
|
|
|
10
10
|
lat: number;
|
|
11
11
|
name: string;
|
|
12
12
|
cityName?: string | undefined;
|
|
13
|
-
|
|
13
|
+
countryName?: string | undefined;
|
|
14
14
|
}[]>;
|
|
15
15
|
setKeyword: (value: string) => void;
|
|
16
16
|
setCity: (value: import("..").City) => void;
|
|
@@ -12,14 +12,14 @@ export declare const useBusinessRecomendPlaceMap: () => {
|
|
|
12
12
|
lat: number;
|
|
13
13
|
name: string;
|
|
14
14
|
cityName?: string | undefined;
|
|
15
|
-
|
|
15
|
+
countryName?: string | undefined;
|
|
16
16
|
};
|
|
17
17
|
placeCandidates: import("vue-demi").Ref<{
|
|
18
18
|
lng: number;
|
|
19
19
|
lat: number;
|
|
20
20
|
name: string;
|
|
21
21
|
cityName?: string | undefined;
|
|
22
|
-
|
|
22
|
+
countryName?: string | undefined;
|
|
23
23
|
}[]>;
|
|
24
24
|
panTo: (value: Point) => void;
|
|
25
25
|
setCenterPlaceByRecomand: (value: Point) => void;
|
|
@@ -39,7 +39,7 @@ export declare const useLagecyMapRecomendPlace: (props: UseLagecyMapRecomendPlac
|
|
|
39
39
|
lat: number;
|
|
40
40
|
name: string;
|
|
41
41
|
cityName?: string | undefined;
|
|
42
|
-
|
|
42
|
+
countryName?: string | undefined;
|
|
43
43
|
};
|
|
44
44
|
centerPoint: import("vue-demi").ComputedRef<Point>;
|
|
45
45
|
placeCandidates: import("vue-demi").Ref<{
|
|
@@ -47,7 +47,7 @@ export declare const useLagecyMapRecomendPlace: (props: UseLagecyMapRecomendPlac
|
|
|
47
47
|
lat: number;
|
|
48
48
|
name: string;
|
|
49
49
|
cityName?: string | undefined;
|
|
50
|
-
|
|
50
|
+
countryName?: string | undefined;
|
|
51
51
|
}[]>;
|
|
52
52
|
setCenterPlaceByRecomand: (point: Point) => void;
|
|
53
53
|
setCenterByPlace: (place: Place) => void;
|