@heycar/heycars-map 0.4.0 → 0.4.2
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/CHANGELOG.md +12 -0
- package/dist/Demo/DemoBusinessTaxiService.d.ts +2 -1
- package/dist/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +1 -1
- package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +14 -15
- package/dist/business-components/FitView/FitView.d.ts +7 -0
- package/dist/components/MapProvider/MapProvider.d.ts +1 -0
- package/dist/hooks/useMap.d.ts +2 -5
- package/dist/hooks/useMapRecomendPlace.d.ts +3 -0
- package/dist/hooks/useMapZoom.d.ts +4 -0
- package/dist/index.cjs +57 -57
- package/dist/index.js +2209 -2099
- package/dist/utils/log.d.ts +1 -0
- package/dist/utils/transform.d.ts +1 -0
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
import type { Place, Point } from "../types/interface";
|
|
2
|
+
import type { DriverStatus, Place, Point } from "../types/interface";
|
|
3
3
|
export declare const DemoBusinessTaxiService: import("vue").DefineComponent<Readonly<{}>, {
|
|
4
4
|
setMap: import("../hooks/useHeycarMap").SetMap<{
|
|
5
5
|
_outseaDataType: string;
|
|
@@ -2049,6 +2049,7 @@ export declare const DemoBusinessTaxiService: import("vue").DefineComponent<Read
|
|
|
2049
2049
|
}, {
|
|
2050
2050
|
from: Partial<Place>;
|
|
2051
2051
|
to: Partial<Place>;
|
|
2052
|
+
status: DriverStatus;
|
|
2052
2053
|
}, {}, {
|
|
2053
2054
|
getDriverPosition(): Promise<Point>;
|
|
2054
2055
|
}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<Readonly<{}>>>, {}>;
|
|
@@ -28,4 +28,4 @@ export interface BusinessRecomendPlaceMapProps extends Omit<HeycarMapProps, "cen
|
|
|
28
28
|
onGeoError?: UseGeoLocationProps["onError"];
|
|
29
29
|
onClickLocator?: AbsoluteAddressBoxProps["onClick"];
|
|
30
30
|
}
|
|
31
|
-
export declare const BusinessRecomendPlaceMap: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "dragEnd" | "zoomEnd" | "changeCity" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "clickLocator", BusinessRecomendPlaceMapProps, {}>;
|
|
31
|
+
export declare const BusinessRecomendPlaceMap: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "dragEnd" | "zoomEnd" | "changeCity" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "clickLocator", BusinessRecomendPlaceMapProps, {}>;
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import { MapMountedProps } from "../../hooks/useMap";
|
|
2
1
|
import type { MROP } from "../../hooks/useOverlay";
|
|
3
2
|
import type { Place, Point } from "../../types/interface";
|
|
4
3
|
import { DrivingRouteRenderProps } from "../DrivingRoute";
|
|
5
|
-
type SectionDispatchingProps = MROP &
|
|
4
|
+
type SectionDispatchingProps = Required<MROP> & {
|
|
6
5
|
title: string;
|
|
7
6
|
from: Place;
|
|
8
7
|
};
|
|
9
|
-
export declare const SectionDispatching: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionDispatchingProps>, 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<SectionDispatchingProps, Required<SectionDispatchingProps>>,
|
|
10
|
-
type SectionDriverStartServiceProps = MROP &
|
|
8
|
+
export declare const SectionDispatching: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionDispatchingProps>, 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<SectionDispatchingProps, Required<SectionDispatchingProps>>, never, SectionDispatchingProps, {} | {}>;
|
|
9
|
+
type SectionDriverStartServiceProps = Required<MROP> & {
|
|
11
10
|
passengerPosition?: Point;
|
|
12
11
|
carPosition: Point;
|
|
13
12
|
from: Place;
|
|
14
13
|
renderTitle: (props: Pick<DrivingRouteRenderProps, "duration" | "distance">) => string;
|
|
15
14
|
};
|
|
16
|
-
export declare const SectionDriverStartService: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionDriverStartServiceProps>, 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<SectionDriverStartServiceProps, Required<SectionDriverStartServiceProps>>,
|
|
17
|
-
type SectionBookDispatchedProps = MROP &
|
|
15
|
+
export declare const SectionDriverStartService: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionDriverStartServiceProps>, 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<SectionDriverStartServiceProps, Required<SectionDriverStartServiceProps>>, never, SectionDriverStartServiceProps, {} | {}>;
|
|
16
|
+
type SectionBookDispatchedProps = Required<MROP> & {
|
|
18
17
|
passengerPosition?: Point;
|
|
19
18
|
from: Place;
|
|
20
19
|
title: string;
|
|
21
20
|
};
|
|
22
|
-
export declare const SectionBookDispatched: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionBookDispatchedProps>, 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<SectionBookDispatchedProps, Required<SectionBookDispatchedProps>>,
|
|
23
|
-
type SectionDriverArrivedProps = MROP &
|
|
21
|
+
export declare const SectionBookDispatched: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionBookDispatchedProps>, 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<SectionBookDispatchedProps, Required<SectionBookDispatchedProps>>, never, SectionBookDispatchedProps, {} | {}>;
|
|
22
|
+
type SectionDriverArrivedProps = Required<MROP> & {
|
|
24
23
|
from: Place;
|
|
25
24
|
carPosition: Point;
|
|
26
25
|
passengerPosition?: Point;
|
|
27
26
|
title: string;
|
|
28
27
|
};
|
|
29
|
-
export declare const SectionDriverArrived: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionDriverArrivedProps>, 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<SectionDriverArrivedProps, Required<SectionDriverArrivedProps>>,
|
|
30
|
-
type SectionInServiceProps = MROP &
|
|
28
|
+
export declare const SectionDriverArrived: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionDriverArrivedProps>, 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<SectionDriverArrivedProps, Required<SectionDriverArrivedProps>>, never, SectionDriverArrivedProps, {} | {}>;
|
|
29
|
+
type SectionInServiceProps = Required<MROP> & {
|
|
31
30
|
to: Place;
|
|
32
31
|
carPosition: Point;
|
|
33
32
|
renderTitle: (props: Pick<DrivingRouteRenderProps, "duration" | "distance">) => string;
|
|
34
33
|
};
|
|
35
|
-
export declare const SectionInService: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionInServiceProps>, 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<SectionInServiceProps, Required<SectionInServiceProps>>,
|
|
36
|
-
type SectionCanceledProps = MROP &
|
|
34
|
+
export declare const SectionInService: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionInServiceProps>, 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<SectionInServiceProps, Required<SectionInServiceProps>>, never, SectionInServiceProps, {} | {}>;
|
|
35
|
+
type SectionCanceledProps = Required<MROP> & {
|
|
37
36
|
from: Place;
|
|
38
37
|
to: Place;
|
|
39
38
|
};
|
|
40
|
-
export declare const SectionCanceled: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionCanceledProps>, 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<SectionCanceledProps, Required<SectionCanceledProps>>,
|
|
41
|
-
export type SectionEndServiceProps = MROP &
|
|
39
|
+
export declare const SectionCanceled: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionCanceledProps>, 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<SectionCanceledProps, Required<SectionCanceledProps>>, never, SectionCanceledProps, {} | {}>;
|
|
40
|
+
export type SectionEndServiceProps = Required<MROP> & {
|
|
42
41
|
from: Place;
|
|
43
42
|
to: Place;
|
|
44
43
|
};
|
|
45
|
-
export declare const SectionEndService: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionEndServiceProps>, 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<SectionEndServiceProps, Required<SectionEndServiceProps>>,
|
|
44
|
+
export declare const SectionEndService: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<SectionEndServiceProps>, 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<SectionEndServiceProps, Required<SectionEndServiceProps>>, never, SectionEndServiceProps, {} | {}>;
|
|
46
45
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UseMapFitViewOutput, UseMapFitViewProps } from "../../hooks/useMapFitView";
|
|
2
2
|
import type { AmapOverlay, GmapOverlay, MROP } from "../../hooks/useOverlay";
|
|
3
3
|
import { VNodeChild } from "../../types/helper";
|
|
4
|
+
import type { RegisterOverlay } from "../../types/interface";
|
|
4
5
|
type FitViewRenderProps = UseMapFitViewOutput<AmapOverlay> | UseMapFitViewOutput<GmapOverlay>;
|
|
5
6
|
export interface FitViewProps extends Omit<UseMapFitViewProps, "mapRef"> {
|
|
6
7
|
render?: (props: FitViewRenderProps) => VNodeChild;
|
|
@@ -8,4 +9,10 @@ export interface FitViewProps extends Omit<UseMapFitViewProps, "mapRef"> {
|
|
|
8
9
|
export declare const FitView: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<FitViewProps>, 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<FitViewProps, Required<FitViewProps>>, never, FitViewProps, {}>;
|
|
9
10
|
export type FitViewOnceProps = Required<MROP>;
|
|
10
11
|
export declare const FitViewOnce: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<FitViewOnceProps>, 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<FitViewOnceProps, Required<FitViewOnceProps>>, never, FitViewOnceProps, {} | {}>;
|
|
12
|
+
type R = RegisterOverlay<AmapOverlay> | RegisterOverlay<GmapOverlay>;
|
|
13
|
+
export declare function createFittableRegisterOverlay(registerOverlay: R): R;
|
|
14
|
+
export type KeyedFitViewProps = Required<MROP> & {
|
|
15
|
+
fitViewKey: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const KeyedFitView: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<KeyedFitViewProps>, 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<KeyedFitViewProps, Required<KeyedFitViewProps>>, never, KeyedFitViewProps, {} | {}>;
|
|
11
18
|
export {};
|
|
@@ -9,5 +9,6 @@ export interface HeycarMapProps extends Pick<GmapLoaderProps, "fallback" | "load
|
|
|
9
9
|
mapRef?: SetMap<AMap.Map> | SetMap<google.maps.Map>;
|
|
10
10
|
onDragEnd?: (value: [number, number]) => any;
|
|
11
11
|
onZoomEnd?: (value: number) => any;
|
|
12
|
+
touchEnable?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const HeycarMap: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<HeycarMapProps>, 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<HeycarMapProps, Required<HeycarMapProps>>, "dragEnd" | "zoomEnd", HeycarMapProps, {}>;
|
package/dist/hooks/useMap.d.ts
CHANGED
|
@@ -801,8 +801,5 @@ export declare const useMap: () => MapShallowRef<{
|
|
|
801
801
|
export interface MapMountedProps {
|
|
802
802
|
onMapMounted?: () => any;
|
|
803
803
|
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
* @param callback 挂载成功时的回调函数
|
|
807
|
-
*/
|
|
808
|
-
export declare const onMapMounted: (callback: (...args: any) => any) => void;
|
|
804
|
+
export declare const onMapMounted: (callback: () => any) => void;
|
|
805
|
+
export declare const useMapMountedPromise: () => Promise<void>;
|
|
@@ -30,6 +30,7 @@ export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
30
30
|
availableRef: Ref<boolean>;
|
|
31
31
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
32
32
|
updateRecomandPlace: () => void;
|
|
33
|
+
updatePlaceCandidates: () => Promise<void>;
|
|
33
34
|
updatePlace: (value: Point) => void;
|
|
34
35
|
setPlace: (value: Place) => void;
|
|
35
36
|
updateCity: (value: Place) => void;
|
|
@@ -54,6 +55,7 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
54
55
|
availableRef: Ref<boolean>;
|
|
55
56
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
56
57
|
updateRecomandPlace: () => void;
|
|
58
|
+
updatePlaceCandidates: () => Promise<void>;
|
|
57
59
|
updatePlace: (value: Point) => void;
|
|
58
60
|
setPlace: (value: Place) => void;
|
|
59
61
|
updateCity: (value: Place) => Promise<void>;
|
|
@@ -78,6 +80,7 @@ export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>
|
|
|
78
80
|
availableRef: Ref<boolean>;
|
|
79
81
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
80
82
|
updateRecomandPlace: () => void;
|
|
83
|
+
updatePlaceCandidates: () => Promise<void>;
|
|
81
84
|
updatePlace: (value: Point) => void;
|
|
82
85
|
setPlace: (value: Place) => void;
|
|
83
86
|
updateCity: (value: Place) => void;
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
import { ShallowRef } from "vue-demi";
|
|
3
3
|
export interface UseMapZoomProps<M = AMap.Map | google.maps.Map> {
|
|
4
4
|
mapRef: ShallowRef<M | undefined>;
|
|
5
|
+
defaultValue?: number;
|
|
5
6
|
onChange?: (value: number) => any;
|
|
6
7
|
}
|
|
7
8
|
export declare const useAmapZoom: (props: UseMapZoomProps<AMap.Map>) => {
|
|
8
9
|
zoomRef: import("vue-demi").Ref<number>;
|
|
10
|
+
setZoom: (v: number) => void;
|
|
9
11
|
};
|
|
10
12
|
export declare const useGmapZoom: (props: UseMapZoomProps<google.maps.Map>) => {
|
|
11
13
|
zoomRef: import("vue-demi").Ref<number>;
|
|
14
|
+
setZoom: (v: number) => void;
|
|
12
15
|
};
|
|
13
16
|
export declare const useMapZoom: (props: UseMapZoomProps) => {
|
|
14
17
|
zoomRef: import("vue-demi").Ref<number>;
|
|
18
|
+
setZoom: (v: number) => void;
|
|
15
19
|
};
|