@heycar/heycars-map 0.2.12 → 0.3.1
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/business-components/AbsoluteAddressBox/AbsoluteAddressBox.css.d.ts +8 -0
- package/dist/business-components/AbsoluteAddressBox/AbsoluteAddressBox.d.ts +8 -2
- package/dist/business-components/AddressBox/AddressBox.d.ts +5 -7
- package/dist/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +3 -1
- package/dist/components/Gmap/Gmap.css.d.ts +1 -0
- package/dist/hooks/useMapAutoComplete.d.ts +5 -1
- package/dist/hooks/useMapLog.d.ts +2 -1
- package/dist/hooks/useMapPlace.d.ts +3 -0
- package/dist/hooks/useMapRecomendPlace.d.ts +6 -0
- package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +3 -1
- package/dist/hooks-business/useBusinessRecomendPlaceMap.d.ts +2 -0
- package/dist/hooks-business/useLagecyMapRecomendPlace.d.ts +2 -0
- package/dist/index.cjs +48 -48
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1026 -975
- package/dist/style.css +1 -1
- package/dist/types/interface.d.ts +1 -0
- package/package.json +1 -1
- package/src/Demo/DemoBusinessRecomendPlace.tsx +5 -3
- package/src/Demo/sample.json +793 -0
- package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.css.ts +66 -0
- package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.tsx +34 -3
- package/src/business-components/AddressBox/AddressBox.tsx +2 -4
- package/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.tsx +5 -4
- package/src/components/Amap/Amap.css.ts +3 -1
- package/src/components/Gmap/Gmap.css.ts +5 -0
- package/src/components/Gmap/Gmap.ts +3 -1
- package/src/hooks/useMapAutoComplete.ts +3 -1
- package/src/hooks/useMapLog.ts +14 -2
- package/src/hooks/useMapPlace.ts +6 -2
- package/src/hooks-business/useBusinessMapAutoComplete.ts +3 -2
- package/src/index.ts +1 -0
- package/src/types/interface.ts +1 -0
- package/todo.md +5 -9
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const absoluteAddressBoxLayout: string;
|
|
2
|
+
export declare const absoluteAddressBox: string;
|
|
3
|
+
export declare const boxTextLayout: string;
|
|
4
|
+
export declare const boxTitle: string;
|
|
5
|
+
export declare const boxDescription: string;
|
|
6
|
+
export declare const arrowRight: string;
|
|
7
|
+
export declare const straightLine: string;
|
|
8
|
+
export declare const locatorIcon: string;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export
|
|
1
|
+
import type { MapLogProps } from "../../hooks/useMapLog";
|
|
2
|
+
export interface AbsoluteAddressBoxProps extends MapLogProps {
|
|
3
|
+
type: "box" | "locator";
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
onClick?: () => any;
|
|
7
|
+
}
|
|
8
|
+
export declare const AbsoluteAddressBox: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AbsoluteAddressBoxProps>, 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<AbsoluteAddressBoxProps, Required<AbsoluteAddressBoxProps>>, "click", AbsoluteAddressBoxProps, {}>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { MapLogProps } from "../../hooks/useMapLog";
|
|
2
2
|
import type { Point } from "../../types/interface";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import type { AbsoluteAddressBoxProps } from "../AbsoluteAddressBox";
|
|
4
|
+
export interface AddressBoxProps extends MapLogProps, AbsoluteAddressBoxProps {
|
|
5
5
|
position: Point;
|
|
6
|
-
title: string;
|
|
7
|
-
description?: string;
|
|
8
6
|
}
|
|
9
|
-
export declare const AAddressBox: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AddressBoxProps>, 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<AddressBoxProps, Required<AddressBoxProps>>,
|
|
10
|
-
export declare const GAddressBox: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AddressBoxProps>, 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<AddressBoxProps, Required<AddressBoxProps>>,
|
|
11
|
-
export declare const AddressBox: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AddressBoxProps>, 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<AddressBoxProps, Required<AddressBoxProps>>,
|
|
7
|
+
export declare const AAddressBox: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AddressBoxProps>, 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<AddressBoxProps, Required<AddressBoxProps>>, "click", AddressBoxProps, {}>;
|
|
8
|
+
export declare const GAddressBox: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AddressBoxProps>, 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<AddressBoxProps, Required<AddressBoxProps>>, "click", AddressBoxProps, {}>;
|
|
9
|
+
export declare const AddressBox: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AddressBoxProps>, 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<AddressBoxProps, Required<AddressBoxProps>>, "click", AddressBoxProps, {}>;
|
|
@@ -6,6 +6,7 @@ import { MapLogProps } from "../../hooks/useMapLog";
|
|
|
6
6
|
import type { UseMapPlaceProps } from "../../hooks/useMapPlace";
|
|
7
7
|
import { UseMapRecomendPlaceProps } from "../../hooks/useMapRecomendPlace";
|
|
8
8
|
import type { Point } from "../../types/interface";
|
|
9
|
+
import { AbsoluteAddressBoxProps } from "../AbsoluteAddressBox";
|
|
9
10
|
export interface CenterPlaceSource {
|
|
10
11
|
source: "default" | "geo" | "drag" | "recomend" | "api";
|
|
11
12
|
}
|
|
@@ -22,5 +23,6 @@ export interface BusinessRecomendPlaceMapProps extends Omit<HeycarMapProps, "cen
|
|
|
22
23
|
onChangePlace?: UseMapPlaceProps["onChange"];
|
|
23
24
|
onChangeRecomandPlace?: UseMapRecomendPlaceProps["onChange"];
|
|
24
25
|
onGeoError?: UseGeoLocationProps["onError"];
|
|
26
|
+
onClickLocator?: AbsoluteAddressBoxProps["onClick"];
|
|
25
27
|
}
|
|
26
|
-
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" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoError", BusinessRecomendPlaceMapProps, {}>;
|
|
28
|
+
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" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "clickLocator", BusinessRecomendPlaceMapProps, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const gmap: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { City } from "../types/interface";
|
|
2
|
-
|
|
2
|
+
import { MapLogProps } from "./useMapLog";
|
|
3
|
+
export interface UseMapAutoCompleteProps extends MapLogProps {
|
|
3
4
|
city: City;
|
|
4
5
|
}
|
|
5
6
|
export declare const useAmapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
@@ -12,6 +13,7 @@ export declare const useAmapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
|
12
13
|
lat: number;
|
|
13
14
|
name: string;
|
|
14
15
|
cityName?: string | undefined;
|
|
16
|
+
cityParentName?: string | undefined;
|
|
15
17
|
countryName?: string | undefined;
|
|
16
18
|
}[]>;
|
|
17
19
|
};
|
|
@@ -25,6 +27,7 @@ export declare const useGmapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
|
25
27
|
lat: number;
|
|
26
28
|
name: string;
|
|
27
29
|
cityName?: string | undefined;
|
|
30
|
+
cityParentName?: string | undefined;
|
|
28
31
|
countryName?: string | undefined;
|
|
29
32
|
}[]>;
|
|
30
33
|
};
|
|
@@ -38,6 +41,7 @@ export declare const useMapAutoComplete: (props: UseMapAutoCompleteProps) => {
|
|
|
38
41
|
lat: number;
|
|
39
42
|
name: string;
|
|
40
43
|
cityName?: string | undefined;
|
|
44
|
+
cityParentName?: string | undefined;
|
|
41
45
|
countryName?: string | undefined;
|
|
42
46
|
}[]>;
|
|
43
47
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export interface MapLogProps {
|
|
2
2
|
log?: boolean;
|
|
3
3
|
}
|
|
4
|
-
export declare const useMapLog: <P extends MapLogProps>(props: P,
|
|
4
|
+
export declare const useMapLog: <P extends MapLogProps>(props: P, prefix: string) => void;
|
|
5
|
+
export declare const useMapLogVariable: <P extends MapLogProps>(props: P, prefix: string, variable: any, name: string) => void;
|
|
@@ -10,6 +10,7 @@ export declare const useAmapPlace: (props: UseMapPlaceProps) => {
|
|
|
10
10
|
lat: number;
|
|
11
11
|
name: string;
|
|
12
12
|
cityName?: string | undefined;
|
|
13
|
+
cityParentName?: string | undefined;
|
|
13
14
|
countryName?: string | undefined;
|
|
14
15
|
};
|
|
15
16
|
updatePlace: () => void;
|
|
@@ -20,6 +21,7 @@ export declare const useGmapPlace: (props: UseMapPlaceProps) => {
|
|
|
20
21
|
lat: number;
|
|
21
22
|
name: string;
|
|
22
23
|
cityName?: string | undefined;
|
|
24
|
+
cityParentName?: string | undefined;
|
|
23
25
|
countryName?: string | undefined;
|
|
24
26
|
};
|
|
25
27
|
updatePlace: () => void;
|
|
@@ -30,6 +32,7 @@ export declare const useMapPlace: (props: UseMapPlaceProps) => {
|
|
|
30
32
|
lat: number;
|
|
31
33
|
name: string;
|
|
32
34
|
cityName?: string | undefined;
|
|
35
|
+
cityParentName?: string | undefined;
|
|
33
36
|
countryName?: string | undefined;
|
|
34
37
|
};
|
|
35
38
|
updatePlace: () => void;
|
|
@@ -15,6 +15,7 @@ export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
15
15
|
lat: number;
|
|
16
16
|
name: string;
|
|
17
17
|
cityName?: string | undefined;
|
|
18
|
+
cityParentName?: string | undefined;
|
|
18
19
|
countryName?: string | undefined;
|
|
19
20
|
};
|
|
20
21
|
placeCandidates: Ref<{
|
|
@@ -22,6 +23,7 @@ export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
22
23
|
lat: number;
|
|
23
24
|
name: string;
|
|
24
25
|
cityName?: string | undefined;
|
|
26
|
+
cityParentName?: string | undefined;
|
|
25
27
|
countryName?: string | undefined;
|
|
26
28
|
}[]>;
|
|
27
29
|
availableRef: Ref<boolean>;
|
|
@@ -34,6 +36,7 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
34
36
|
lat: number;
|
|
35
37
|
name: string;
|
|
36
38
|
cityName?: string | undefined;
|
|
39
|
+
cityParentName?: string | undefined;
|
|
37
40
|
countryName?: string | undefined;
|
|
38
41
|
};
|
|
39
42
|
placeCandidates: Ref<{
|
|
@@ -41,6 +44,7 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
41
44
|
lat: number;
|
|
42
45
|
name: string;
|
|
43
46
|
cityName?: string | undefined;
|
|
47
|
+
cityParentName?: string | undefined;
|
|
44
48
|
countryName?: string | undefined;
|
|
45
49
|
}[]>;
|
|
46
50
|
availableRef: Ref<boolean>;
|
|
@@ -53,6 +57,7 @@ export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>
|
|
|
53
57
|
lat: number;
|
|
54
58
|
name: string;
|
|
55
59
|
cityName?: string | undefined;
|
|
60
|
+
cityParentName?: string | undefined;
|
|
56
61
|
countryName?: string | undefined;
|
|
57
62
|
};
|
|
58
63
|
placeCandidates: Ref<{
|
|
@@ -60,6 +65,7 @@ export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>
|
|
|
60
65
|
lat: number;
|
|
61
66
|
name: string;
|
|
62
67
|
cityName?: string | undefined;
|
|
68
|
+
cityParentName?: string | undefined;
|
|
63
69
|
countryName?: string | undefined;
|
|
64
70
|
}[]>;
|
|
65
71
|
availableRef: Ref<boolean>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Ref } from "vue-demi";
|
|
2
|
-
|
|
2
|
+
import type { MapLogProps } from "../hooks/useMapLog";
|
|
3
|
+
export interface UseBusinessMapAutoCompleteProps extends MapLogProps {
|
|
3
4
|
cityNameRef: Ref<string>;
|
|
4
5
|
}
|
|
5
6
|
export declare const useBusinessMapAutoComplete: (props: UseBusinessMapAutoCompleteProps) => {
|
|
@@ -10,6 +11,7 @@ export declare const useBusinessMapAutoComplete: (props: UseBusinessMapAutoCompl
|
|
|
10
11
|
lat: number;
|
|
11
12
|
name: string;
|
|
12
13
|
cityName?: string | undefined;
|
|
14
|
+
cityParentName?: string | undefined;
|
|
13
15
|
countryName?: string | undefined;
|
|
14
16
|
}[]>;
|
|
15
17
|
setKeyword: (value: string) => void;
|
|
@@ -12,6 +12,7 @@ export declare const useBusinessRecomendPlaceMap: () => {
|
|
|
12
12
|
lat: number;
|
|
13
13
|
name: string;
|
|
14
14
|
cityName?: string | undefined;
|
|
15
|
+
cityParentName?: string | undefined;
|
|
15
16
|
countryName?: string | undefined;
|
|
16
17
|
};
|
|
17
18
|
placeCandidates: import("vue-demi").Ref<{
|
|
@@ -19,6 +20,7 @@ export declare const useBusinessRecomendPlaceMap: () => {
|
|
|
19
20
|
lat: number;
|
|
20
21
|
name: string;
|
|
21
22
|
cityName?: string | undefined;
|
|
23
|
+
cityParentName?: string | undefined;
|
|
22
24
|
countryName?: string | undefined;
|
|
23
25
|
}[]>;
|
|
24
26
|
panToGeoPositionByRecomend: (value: Point) => void;
|
|
@@ -39,6 +39,7 @@ export declare const useLagecyMapRecomendPlace: (props: UseLagecyMapRecomendPlac
|
|
|
39
39
|
lat: number;
|
|
40
40
|
name: string;
|
|
41
41
|
cityName?: string | undefined;
|
|
42
|
+
cityParentName?: string | undefined;
|
|
42
43
|
countryName?: string | undefined;
|
|
43
44
|
};
|
|
44
45
|
centerPoint: import("vue-demi").ComputedRef<Point>;
|
|
@@ -47,6 +48,7 @@ export declare const useLagecyMapRecomendPlace: (props: UseLagecyMapRecomendPlac
|
|
|
47
48
|
lat: number;
|
|
48
49
|
name: string;
|
|
49
50
|
cityName?: string | undefined;
|
|
51
|
+
cityParentName?: string | undefined;
|
|
50
52
|
countryName?: string | undefined;
|
|
51
53
|
}[]>;
|
|
52
54
|
setCenterPlaceByRecomand: (point: Point) => void;
|