@heycar/heycars-map 0.3.1 → 0.3.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/README.md CHANGED
@@ -122,7 +122,7 @@ export interface AutoCompletePlace extends Place {
122
122
  description: string;
123
123
  }
124
124
 
125
- export type City = {
125
+ export type Region = {
126
126
  bound?: {
127
127
  east: number;
128
128
  north: number;
@@ -11,6 +11,7 @@ export interface CenterPlaceSource {
11
11
  source: "default" | "geo" | "drag" | "recomend" | "api";
12
12
  }
13
13
  export interface BusinessRecomendPlaceMapProps extends Omit<HeycarMapProps, "center" | "zoom" | "mapRef">, Pick<UseMapRecomendPlaceProps<CenterPlaceSource>, "getRecomendPlace">, MapLogProps {
14
+ geoLoadingTitle: string;
14
15
  unavailableTitle: string;
15
16
  recomendDescription: string;
16
17
  noRecomendDescription: string;
@@ -21,8 +22,9 @@ export interface BusinessRecomendPlaceMapProps extends Omit<HeycarMapProps, "cen
21
22
  onChangeByDrag?: UseMapDragProps["onChange"];
22
23
  onChangeGeoLocation?: UseGeoLocationProps["onChange"];
23
24
  onChangePlace?: UseMapPlaceProps["onChange"];
25
+ onChangeCity?: UseMapPlaceProps["onChangeCity"];
24
26
  onChangeRecomandPlace?: UseMapRecomendPlaceProps["onChange"];
25
27
  onGeoError?: UseGeoLocationProps["onError"];
26
28
  onClickLocator?: AbsoluteAddressBoxProps["onClick"];
27
29
  }
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, {}>;
30
+ 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" | "changeCity" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "clickLocator", BusinessRecomendPlaceMapProps, {}>;
@@ -1,11 +1,11 @@
1
- import type { City } from "../types/interface";
1
+ import type { Region } from "../types/interface";
2
2
  import { MapLogProps } from "./useMapLog";
3
3
  export interface UseMapAutoCompleteProps extends MapLogProps {
4
- city: City;
4
+ city: Region;
5
5
  }
6
6
  export declare const useAmapAutoComplete: (props: UseMapAutoCompleteProps) => {
7
7
  setKeyword: (value: string) => void;
8
- setCity: (value: City) => void;
8
+ setCity: (value: Region) => void;
9
9
  autoCompletePlaces: import("vue-demi").Ref<{
10
10
  placeId?: string | undefined;
11
11
  description: string;
@@ -19,7 +19,7 @@ export declare const useAmapAutoComplete: (props: UseMapAutoCompleteProps) => {
19
19
  };
20
20
  export declare const useGmapAutoComplete: (props: UseMapAutoCompleteProps) => {
21
21
  setKeyword: (value: string) => void;
22
- setCity: (value: City) => void;
22
+ setCity: (value: Region) => void;
23
23
  autoCompletePlaces: import("vue-demi").Ref<{
24
24
  placeId?: string | undefined;
25
25
  description: string;
@@ -33,7 +33,7 @@ export declare const useGmapAutoComplete: (props: UseMapAutoCompleteProps) => {
33
33
  };
34
34
  export declare const useMapAutoComplete: (props: UseMapAutoCompleteProps) => {
35
35
  setKeyword: (value: string) => void;
36
- setCity: (value: City) => void;
36
+ setCity: (value: Region) => void;
37
37
  autoCompletePlaces: import("vue-demi").Ref<{
38
38
  placeId?: string | undefined;
39
39
  description: string;
@@ -1,9 +1,9 @@
1
1
  import { Ref } from "vue-demi";
2
- import type { City } from "../types/interface";
2
+ import type { Region } from "../types/interface";
3
3
  export interface UseMapCityBoundProps {
4
4
  cityNameRef: Ref<string | undefined>;
5
- onChange?: (value: City) => any;
5
+ onChange?: (value: Region) => any;
6
6
  }
7
- export declare const useAmapBoundCity: (props: UseMapCityBoundProps) => City;
8
- export declare const useGmapBoundCity: (props: UseMapCityBoundProps) => City;
9
- export declare const useMapBoundCity: (props: UseMapCityBoundProps) => City;
7
+ export declare const useAmapBoundCity: (props: UseMapCityBoundProps) => Region;
8
+ export declare const useGmapBoundCity: (props: UseMapCityBoundProps) => Region;
9
+ export declare const useMapBoundCity: (props: UseMapCityBoundProps) => Region;
@@ -1,8 +1,13 @@
1
1
  import { Ref } from "vue-demi";
2
2
  import type { Place, Point } from "../types/interface";
3
+ export interface UseMapPlaceOnChangeCityProps {
4
+ cityName?: string;
5
+ cityParentName?: string;
6
+ }
3
7
  export interface UseMapPlaceProps {
4
8
  pointRef: Ref<Point>;
5
9
  onChange?: (value: Place) => any;
10
+ onChangeCity?: (value: UseMapPlaceOnChangeCityProps) => any;
6
11
  }
7
12
  export declare const useAmapPlace: (props: UseMapPlaceProps) => {
8
13
  place: {
@@ -13,7 +18,8 @@ export declare const useAmapPlace: (props: UseMapPlaceProps) => {
13
18
  cityParentName?: string | undefined;
14
19
  countryName?: string | undefined;
15
20
  };
16
- updatePlace: () => void;
21
+ updatePlace: (value: Point) => void;
22
+ setPlace: (value: Place) => void;
17
23
  };
18
24
  export declare const useGmapPlace: (props: UseMapPlaceProps) => {
19
25
  place: {
@@ -25,6 +31,7 @@ export declare const useGmapPlace: (props: UseMapPlaceProps) => {
25
31
  countryName?: string | undefined;
26
32
  };
27
33
  updatePlace: () => void;
34
+ setPlace: (value: Place) => void;
28
35
  };
29
36
  export declare const useMapPlace: (props: UseMapPlaceProps) => {
30
37
  place: {
@@ -35,5 +42,6 @@ export declare const useMapPlace: (props: UseMapPlaceProps) => {
35
42
  cityParentName?: string | undefined;
36
43
  countryName?: string | undefined;
37
44
  };
38
- updatePlace: () => void;
45
+ updatePlace: (value: Point) => void;
46
+ setPlace: (value: Place) => void;
39
47
  };
@@ -6,6 +6,7 @@ export interface UseMapRecomendPlaceProps<C = Record<string, any>> {
6
6
  context?: C;
7
7
  getLimit: (context?: C) => number;
8
8
  getRecomendPlace: (place: Place, context?: C) => Promise<Place[] | undefined>;
9
+ onChangeCity?: UseMapPlaceProps["onChangeCity"];
9
10
  onChangePlace?: UseMapPlaceProps["onChange"];
10
11
  onChange?: (place: Place) => any;
11
12
  }
@@ -28,7 +29,8 @@ export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
28
29
  }[]>;
29
30
  availableRef: Ref<boolean>;
30
31
  updateRecomandPlace: () => void;
31
- updatePlace: () => void;
32
+ updatePlace: (value: Point) => void;
33
+ setPlace: (value: Place) => void;
32
34
  };
33
35
  export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>) => {
34
36
  recomendPlace: {
@@ -50,6 +52,7 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
50
52
  availableRef: Ref<boolean>;
51
53
  updateRecomandPlace: () => void;
52
54
  updatePlace: () => void;
55
+ setPlace: (value: Place) => void;
53
56
  };
54
57
  export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>) => {
55
58
  recomendPlace: {
@@ -70,5 +73,6 @@ export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>
70
73
  }[]>;
71
74
  availableRef: Ref<boolean>;
72
75
  updateRecomandPlace: () => void;
73
- updatePlace: () => void;
76
+ updatePlace: (value: Point) => void;
77
+ setPlace: (value: Place) => void;
74
78
  };
@@ -15,6 +15,6 @@ export declare const useBusinessMapAutoComplete: (props: UseBusinessMapAutoCompl
15
15
  countryName?: string | undefined;
16
16
  }[]>;
17
17
  setKeyword: (value: string) => void;
18
- setCity: (value: import("..").City) => void;
18
+ setCity: (value: import("..").Region) => void;
19
19
  handleKeywordInput: (e: Event) => void;
20
20
  };
@@ -1,7 +1,7 @@
1
1
  import type { Place, Point } from "../types/interface";
2
2
  export interface BusinessRecomendPlaceContext {
3
3
  panToGeoPositionByRecomend: (value: Point) => void;
4
- setCenterPlaceByRecomand: (value: Point) => void;
4
+ setCenterPlaceByUserSpecified: (value: Place) => void;
5
5
  onChangeCenterPlace: (value: Place) => void;
6
6
  onChangeRecomendPlaces: (value: Place[]) => void;
7
7
  }
@@ -24,6 +24,6 @@ export declare const useBusinessRecomendPlaceMap: () => {
24
24
  countryName?: string | undefined;
25
25
  }[]>;
26
26
  panToGeoPositionByRecomend: (value: Point) => void;
27
- setCenterPlaceByRecomand: (value: Point) => void;
27
+ setCenterPlaceByUserSpecified: (value: Place) => void;
28
28
  apiMapDistance: (from: Point, to: Point) => number | undefined;
29
29
  };