@heycar/heycars-map 0.2.5 → 0.2.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.
Files changed (44) hide show
  1. package/README.md +1 -0
  2. package/dist/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +12 -0
  3. package/dist/business-components/BusinessQuotingMap/index.d.ts +1 -0
  4. package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +4 -3
  5. package/dist/business-components/FitView/FitView.d.ts +3 -1
  6. package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +18309 -4
  7. package/dist/business-components/TaxiCar/TaxiCar.d.ts +18309 -4
  8. package/dist/components/Demo/DemoBusinessQuoting.d.ts +1 -0
  9. package/dist/hooks/useMap.d.ts +4 -0
  10. package/dist/hooks/useMapAutoComplete.d.ts +3 -0
  11. package/dist/hooks/useMapPlace.d.ts +3 -0
  12. package/dist/hooks/useMapRecomendPlace.d.ts +6 -0
  13. package/dist/hooks/useOverlay.d.ts +1 -0
  14. package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +1 -0
  15. package/dist/hooks-business/useBusinessMapRecomendPlace.d.ts +2 -0
  16. package/dist/hooks-business/useBusinessQuotingMap.d.ts +2049 -0
  17. package/dist/hooks-business/useBusinessTaxiServiceMap.d.ts +2049 -0
  18. package/dist/index.cjs +51 -51
  19. package/dist/index.d.ts +3 -1
  20. package/dist/index.js +1460 -1276
  21. package/dist/style.css +1 -1
  22. package/dist/types/interface.d.ts +2 -0
  23. package/package.json +1 -1
  24. package/src/App.tsx +4 -3
  25. package/src/business-components/BusinessQuotingMap/BusinessQuotingMap.tsx +49 -0
  26. package/src/business-components/BusinessQuotingMap/index.ts +1 -0
  27. package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +159 -89
  28. package/src/business-components/FitView/FitView.tsx +10 -2
  29. package/src/business-components/PassengerCircle/PassengerCircle.tsx +26 -8
  30. package/src/business-components/TaxiCar/TaxiCar.tsx +18 -6
  31. package/src/components/Demo/DemoBusinessQuoting.tsx +38 -0
  32. package/src/components/Demo/DemoBusinessTaxiService.tsx +5 -1
  33. package/src/hooks/useGeoLocation.ts +3 -3
  34. package/src/hooks/useMap.ts +15 -1
  35. package/src/hooks/useMapFitView.ts +18 -16
  36. package/src/hooks/useOverlay.ts +1 -0
  37. package/src/hooks/useWalkingRoute.ts +0 -1
  38. package/src/hooks-business/useBusinessMapRecomendPlace.ts +1 -0
  39. package/src/hooks-business/useBusinessQuotingMap.ts +11 -0
  40. package/src/hooks-business/useBusinessTaxiServiceMap.ts +12 -0
  41. package/src/index.ts +3 -1
  42. package/src/types/interface.ts +2 -0
  43. package/dist/hooks-business/useBusinessMapFitView.d.ts +0 -2291
  44. package/src/hooks-business/useBusinessMapFitView.ts +0 -6
package/README.md CHANGED
@@ -114,6 +114,7 @@ export type Place = {
114
114
  lat: number;
115
115
  name: string;
116
116
  cityName?: string;
117
+ cityId?: string;
117
118
  };
118
119
 
119
120
  export interface AutoCompletePlace extends Place {
@@ -0,0 +1,12 @@
1
+ import { HeycarMapProps } from "../../components/MapProvider";
2
+ import type { MROP } from "../../hooks/useOverlay";
3
+ import type { Place } from "../../types/interface";
4
+ export type BusinessQuotingMapProps = Omit<HeycarMapProps, "center" | "zoom"> & Required<MROP> & {
5
+ from: Place;
6
+ to: Place;
7
+ renderDescription: (titleProps: {
8
+ distance: number;
9
+ duration: number;
10
+ }) => string;
11
+ };
12
+ export declare const BusinessQuotingMap: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessQuotingMapProps>, 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<BusinessQuotingMapProps, Required<BusinessQuotingMapProps>>, "dragEnd", BusinessQuotingMapProps, {} | {}>;
@@ -0,0 +1 @@
1
+ export * from "./BusinessQuotingMap";
@@ -1,6 +1,7 @@
1
1
  import { HeycarMapProps } from "../../components/MapProvider";
2
+ import type { MROP } from "../../hooks/useOverlay";
2
3
  import type { DriverStatus, Place, Point } from "../../types/interface";
3
- export interface BusinessTaxiServiceMapProps extends Omit<HeycarMapProps, "center" | "zoom"> {
4
+ export type BusinessTaxiServiceMapProps = Omit<HeycarMapProps, "center" | "zoom"> & Required<MROP> & {
4
5
  from: Place;
5
6
  to: Place;
6
7
  dispatchingTitle: string;
@@ -18,5 +19,5 @@ export interface BusinessTaxiServiceMapProps extends Omit<HeycarMapProps, "cente
18
19
  duration: number;
19
20
  }) => string;
20
21
  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, {}>;
22
+ };
23
+ 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, {} | {}>;
@@ -1,9 +1,11 @@
1
1
  import { UseMapFitViewOutput, UseMapFitViewProps } from "../../hooks/useMapFitView";
2
- import type { AmapOverlay, GmapOverlay } from "../../hooks/useOverlay";
2
+ import type { AmapOverlay, GmapOverlay, MROP } from "../../hooks/useOverlay";
3
3
  import { VNodeChild } from "../../types/helper";
4
4
  type FitViewRenderProps = UseMapFitViewOutput<AmapOverlay> | UseMapFitViewOutput<GmapOverlay>;
5
5
  export interface FitViewProps extends Omit<UseMapFitViewProps, "mapRef"> {
6
6
  render?: (props: FitViewRenderProps) => VNodeChild;
7
7
  }
8
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 type FitViewOnceProps = Required<MROP>;
10
+ 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, {} | {}>;
9
11
  export {};