@heycar/heycars-map 0.2.3 → 0.2.5

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.
Files changed (43) hide show
  1. package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +22 -0
  2. package/dist/business-components/BusinessTaxiServiceMap/index.d.ts +1 -0
  3. package/dist/business-components/DrivingRoute/DrivingRoute.d.ts +2 -0
  4. package/dist/business-components/FitView/FitView.d.ts +9 -0
  5. package/dist/business-components/FitView/index.d.ts +1 -0
  6. package/dist/business-components/PickupPoints/PickupPoints.d.ts +2 -1
  7. package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +5 -3
  8. package/dist/business-components/WalkingRoute/WalkingRoute.d.ts +0 -1
  9. package/dist/components/AmapMarker/AmapMarker.d.ts +5 -2
  10. package/dist/components/Demo/DemoBusinessTaxiService.d.ts +2 -0
  11. package/dist/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.d.ts +5 -2
  12. package/dist/hooks/useGeoLocation.d.ts +4 -0
  13. package/dist/hooks/useMapFitView.d.ts +6 -2296
  14. package/dist/hooks-business/useBusinessMapFitView.d.ts +2228 -2234
  15. package/dist/hooks-business/useBusinessMapRecomendPlace.d.ts +4 -1
  16. package/dist/index.cjs +52 -52
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.js +2072 -1698
  19. package/dist/types/interface.d.ts +1 -0
  20. package/dist/utils/compare.d.ts +1 -1
  21. package/package.json +1 -1
  22. package/src/App.tsx +1 -0
  23. package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +285 -0
  24. package/src/business-components/BusinessTaxiServiceMap/index.ts +1 -0
  25. package/src/business-components/DrivingRoute/DrivingRoute.tsx +2 -0
  26. package/src/business-components/FitView/FitView.tsx +14 -0
  27. package/src/business-components/FitView/index.ts +1 -0
  28. package/src/business-components/PickupPoints/PickupPoints.tsx +8 -2
  29. package/src/business-components/PlaceCircle/PlaceCircle.tsx +32 -8
  30. package/src/business-components/WalkingRoute/WalkingRoute.tsx +0 -1
  31. package/src/components/AmapMarker/AmapMarker.ts +10 -3
  32. package/src/components/Demo/DemoBusinessTaxiService.tsx +48 -0
  33. package/src/components/Demo/HeycarDemo.tsx +18 -8
  34. package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +15 -4
  35. package/src/hooks/useDrivingRoute.ts +0 -2
  36. package/src/hooks/useGeoLocation.ts +5 -1
  37. package/src/hooks/useMapFitView.ts +8 -1
  38. package/src/hooks/useWalkingRoute.ts +15 -9
  39. package/src/hooks-business/useBusinessMapRecomendPlace.ts +23 -0
  40. package/src/index.ts +1 -0
  41. package/src/types/interface.ts +12 -0
  42. package/src/utils/compare.ts +4 -1
  43. package/todo.md +7 -0
@@ -0,0 +1,22 @@
1
+ import { HeycarMapProps } from "../../components/MapProvider";
2
+ import type { DriverStatus, Place, Point } from "../../types/interface";
3
+ export interface BusinessTaxiServiceMapProps extends Omit<HeycarMapProps, "center" | "zoom"> {
4
+ from: Place;
5
+ to: Place;
6
+ dispatchingTitle: string;
7
+ bookDispatchingTitle: string;
8
+ bookDispatchedTitle: string;
9
+ driverArrivedTitle: string;
10
+ driverStatus: DriverStatus;
11
+ interval: number;
12
+ renderStartSerivceTitle: (titleProps: {
13
+ distance: number;
14
+ duration: number;
15
+ }) => string;
16
+ renderInServiceTitle: (titleProps: {
17
+ distance: number;
18
+ duration: number;
19
+ }) => string;
20
+ getDriverPosition: () => Promise<Point>;
21
+ }
22
+ export declare const BusinessTaxiServiceMap: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, 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<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "dragEnd", BusinessTaxiServiceMapProps, {}>;
@@ -0,0 +1 @@
1
+ export * from "./BusinessTaxiServiceMap";
@@ -4,6 +4,8 @@ import type { Point } from "../../types/interface";
4
4
  export type DrivingRouteRenderProps = {
5
5
  path: Point[];
6
6
  angle?: number;
7
+ distance: number;
8
+ duration: number;
7
9
  };
8
10
  export interface DrivingRouteProps extends UseDrivingRouteProps {
9
11
  render?: (props: DrivingRouteRenderProps) => VNodeChild;
@@ -0,0 +1,9 @@
1
+ import { UseMapFitViewOutput, UseMapFitViewProps } from "../../hooks/useMapFitView";
2
+ import type { AmapOverlay, GmapOverlay } from "../../hooks/useOverlay";
3
+ import { VNodeChild } from "../../types/helper";
4
+ type FitViewRenderProps = UseMapFitViewOutput<AmapOverlay> | UseMapFitViewOutput<GmapOverlay>;
5
+ export interface FitViewProps extends Omit<UseMapFitViewProps, "mapRef"> {
6
+ render?: (props: FitViewRenderProps) => VNodeChild;
7
+ }
8
+ 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
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./FitView";
@@ -1,5 +1,6 @@
1
1
  import type { Place } from "../../types/interface";
2
2
  export interface PickupPointsProps {
3
3
  places: Place[];
4
+ onClick?: (value: Place) => any;
4
5
  }
5
- export declare const PickupPoints: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PickupPointsProps>, 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<PickupPointsProps, Required<PickupPointsProps>>, never, PickupPointsProps, {}>;
6
+ export declare const PickupPoints: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PickupPointsProps>, 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<PickupPointsProps, Required<PickupPointsProps>>, "click", PickupPointsProps, {}>;
@@ -1,9 +1,11 @@
1
+ import type { Point } from "../../types/interface";
1
2
  export interface PlaceCircleProps {
2
3
  position: [number, number];
3
4
  label?: string;
4
5
  textAlign?: "left" | "right";
5
6
  hideIcon?: boolean;
7
+ onClick?: (value: Point) => any;
6
8
  }
7
- export declare const APlaceCircle: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PlaceCircleProps>, 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<PlaceCircleProps, Required<PlaceCircleProps>>, never, PlaceCircleProps, {}>;
8
- export declare const GPlaceCircle: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PlaceCircleProps>, 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<PlaceCircleProps, Required<PlaceCircleProps>>, never, PlaceCircleProps, {}>;
9
- export declare const PlaceCircle: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PlaceCircleProps>, 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<PlaceCircleProps, Required<PlaceCircleProps>>, never, PlaceCircleProps, {}>;
9
+ export declare const APlaceCircle: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PlaceCircleProps>, 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<PlaceCircleProps, Required<PlaceCircleProps>>, "click", PlaceCircleProps, {}>;
10
+ export declare const GPlaceCircle: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PlaceCircleProps>, 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<PlaceCircleProps, Required<PlaceCircleProps>>, "click", PlaceCircleProps, {}>;
11
+ export declare const PlaceCircle: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<PlaceCircleProps>, 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<PlaceCircleProps, Required<PlaceCircleProps>>, "click", PlaceCircleProps, {}>;
@@ -3,7 +3,6 @@ import { VNodeChild } from "../../types/helper";
3
3
  import type { Point } from "../../types/interface";
4
4
  export type WalkingRouteRenderProps = {
5
5
  path: Point[];
6
- angle?: number;
7
6
  };
8
7
  export interface WalkingRouteProps extends UseWalkingRouteProps {
9
8
  render?: (props: WalkingRouteRenderProps) => VNodeChild;
@@ -1,3 +1,6 @@
1
1
  import { AmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverlay";
2
- export type AmapMarkerProps = AMap.MarkerOptions & MapRegisterOverlayProps<AmapOverlay>;
3
- export declare const AmapMarker: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AmapMarkerProps>, 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<AmapMarkerProps, Required<AmapMarkerProps>>, never, AmapMarkerProps, {}>;
2
+ import type { MapEventHandler } from "../../types/mapHelper";
3
+ export interface AmapMarkerProps extends AMap.MarkerOptions, MapRegisterOverlayProps<AmapOverlay> {
4
+ onClick?: MapEventHandler<AMap.Marker>;
5
+ }
6
+ export declare const AmapMarker: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AmapMarkerProps>, 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<AmapMarkerProps, Required<AmapMarkerProps>>, "click", AmapMarkerProps, {}>;
@@ -0,0 +1,2 @@
1
+ export declare const DemoBusinessTaxiService: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<unknown>, 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<unknown, Required<unknown>>, never, unknown, {}>;
2
+ export declare const TaxiCarServicePage: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<unknown>, 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<unknown, Required<unknown>>, never, unknown, {}>;
@@ -1,4 +1,7 @@
1
1
  /// <reference types="google.maps" />
2
2
  import { GmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverlay";
3
- export type GmapAdvancedMarkerViewProps = google.maps.marker.AdvancedMarkerViewOptions & MapRegisterOverlayProps<GmapOverlay>;
4
- export declare const GmapAdvancedMarkerView: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<GmapAdvancedMarkerViewProps>, 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<GmapAdvancedMarkerViewProps, Required<GmapAdvancedMarkerViewProps>>, never, GmapAdvancedMarkerViewProps, {}>;
3
+ import type { MapEventHandler } from "../../types/mapHelper";
4
+ export interface GmapAdvancedMarkerViewProps extends google.maps.marker.AdvancedMarkerViewOptions, MapRegisterOverlayProps<GmapOverlay> {
5
+ onClick?: MapEventHandler<google.maps.marker.AdvancedMarkerView>;
6
+ }
7
+ export declare const GmapAdvancedMarkerView: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<GmapAdvancedMarkerViewProps>, 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<GmapAdvancedMarkerViewProps, Required<GmapAdvancedMarkerViewProps>>, "click", GmapAdvancedMarkerViewProps, {}>;
@@ -1,5 +1,6 @@
1
1
  import type { Point } from "../types/interface";
2
2
  export interface UseGeoLocationProps {
3
+ geoDefaultPosition?: Point;
3
4
  onChange?: (value: {
4
5
  position: Point;
5
6
  coordinate: GeolocationCoordinates;
@@ -8,6 +9,9 @@ export interface UseGeoLocationProps {
8
9
  position: Point;
9
10
  coordinate: GeolocationCoordinates;
10
11
  }) => any;
12
+ onLoadDefault?: (value: {
13
+ position: Point;
14
+ }) => any;
11
15
  }
12
16
  export declare const useGeoLocation: (props?: UseGeoLocationProps) => {
13
17
  geoError: import("vue-demi").Ref<GeolocationPositionError | undefined>;