@heycar/heycars-map 0.3.6 → 0.3.7
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/Gmap/Gmap.css.d.ts +1 -0
- package/dist/components/Gmap/Gmap.d.ts +2 -0
- package/dist/components/MapProvider/MapProvider.d.ts +2 -0
- package/dist/hooks/useMapPlace.d.ts +2 -1
- package/dist/hooks/useMapRecomendPlace.d.ts +1 -1
- package/dist/index.cjs +43 -43
- package/dist/index.js +860 -841
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.tsx +1 -1
- package/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.tsx +27 -9
- package/src/components/Gmap/Gmap.css.ts +5 -0
- package/src/components/Gmap/Gmap.ts +8 -10
- package/src/components/MapProvider/MapProvider.tsx +4 -2
- package/src/hooks/useMapPlace.ts +15 -7
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
2
|
import type { SetMap } from "../../hooks/useHeycarMap";
|
|
3
|
+
import { VueNode } from "../../types/helper";
|
|
3
4
|
import type { MapEventHandler } from "../../types/mapHelper";
|
|
4
5
|
export interface GmapProps extends google.maps.MapOptions {
|
|
5
6
|
mapRef?: SetMap<google.maps.Map>;
|
|
6
7
|
onDragStart?: MapEventHandler<google.maps.Map>;
|
|
7
8
|
onDragEnd?: MapEventHandler<google.maps.Map>;
|
|
9
|
+
renderOverlay?: () => VueNode;
|
|
8
10
|
}
|
|
9
11
|
export declare const Gmap: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<GmapProps>, 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<GmapProps, Required<GmapProps>>, "dragStart" | "dragEnd", GmapProps, {}>;
|
|
@@ -4,10 +4,12 @@ import { GmapLoaderProps, UseMapLoaderProps } from "../../hooks/useMapLoader";
|
|
|
4
4
|
import { MapLogProps } from "../../hooks/useMapLog";
|
|
5
5
|
import { MapSupplierPayolad } from "../../hooks/useMapSupplier";
|
|
6
6
|
import { AmapProps } from "../Amap";
|
|
7
|
+
import { GmapProps } from "../Gmap";
|
|
7
8
|
export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId">;
|
|
8
9
|
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, {}>;
|
|
9
10
|
export interface HeycarMapProps extends Pick<GmapLoaderProps, "fallback" | "loading">, Pick<AmapProps, "center" | "zoom">, MapLogProps {
|
|
10
11
|
mapRef?: SetMap<AMap.Map> | SetMap<google.maps.Map>;
|
|
12
|
+
renderOverlay?: GmapProps["renderOverlay"];
|
|
11
13
|
onDragEnd?: (value: [number, number]) => any;
|
|
12
14
|
}
|
|
13
15
|
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", HeycarMapProps, {}>;
|
|
@@ -3,6 +3,7 @@ import type { Place, Point } from "../types/interface";
|
|
|
3
3
|
export interface UseMapPlaceOnChangeCityProps {
|
|
4
4
|
cityName?: string;
|
|
5
5
|
cityParentName?: string;
|
|
6
|
+
countryName?: string;
|
|
6
7
|
}
|
|
7
8
|
export interface UseMapPlaceProps {
|
|
8
9
|
pointRef: Ref<Point>;
|
|
@@ -31,7 +32,7 @@ export declare const useGmapPlace: (props: UseMapPlaceProps) => {
|
|
|
31
32
|
cityParentName?: string | undefined;
|
|
32
33
|
countryName?: string | undefined;
|
|
33
34
|
};
|
|
34
|
-
updatePlace: () => void;
|
|
35
|
+
updatePlace: (value: Point) => void;
|
|
35
36
|
setPlace: (value: Place) => void;
|
|
36
37
|
updateCity: (value: Place) => Promise<void>;
|
|
37
38
|
};
|
|
@@ -54,7 +54,7 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
54
54
|
availableRef: Ref<boolean>;
|
|
55
55
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
56
56
|
updateRecomandPlace: () => void;
|
|
57
|
-
updatePlace: () => void;
|
|
57
|
+
updatePlace: (value: Point) => void;
|
|
58
58
|
setPlace: (value: Place) => void;
|
|
59
59
|
updateCity: (value: Place) => Promise<void>;
|
|
60
60
|
};
|