@heycar/heycars-map 0.2.4 → 0.2.6

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 (63) hide show
  1. package/README.md +1 -0
  2. package/dist/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +13 -0
  3. package/dist/business-components/BusinessQuotingMap/index.d.ts +1 -0
  4. package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +24 -0
  5. package/dist/business-components/BusinessTaxiServiceMap/index.d.ts +1 -0
  6. package/dist/business-components/FitView/FitView.d.ts +9 -0
  7. package/dist/business-components/FitView/index.d.ts +1 -0
  8. package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +18309 -4
  9. package/dist/business-components/PickupPoints/PickupPoints.d.ts +2 -1
  10. package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +5 -3
  11. package/dist/business-components/TaxiCar/TaxiCar.d.ts +18309 -4
  12. package/dist/business-components/WalkingRoute/WalkingRoute.d.ts +0 -1
  13. package/dist/components/AmapMarker/AmapMarker.d.ts +5 -2
  14. package/dist/components/Demo/DemoBusinessQuoting.d.ts +1 -0
  15. package/dist/components/Demo/DemoBusinessTaxiService.d.ts +2 -0
  16. package/dist/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.d.ts +5 -2
  17. package/dist/hooks/useGeoLocation.d.ts +4 -0
  18. package/dist/hooks/useMap.d.ts +4 -0
  19. package/dist/hooks/useMapAutoComplete.d.ts +3 -0
  20. package/dist/hooks/useMapFitView.d.ts +6 -2296
  21. package/dist/hooks/useMapPlace.d.ts +3 -0
  22. package/dist/hooks/useMapRecomendPlace.d.ts +6 -0
  23. package/dist/hooks/useOverlay.d.ts +1 -0
  24. package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +1 -0
  25. package/dist/hooks-business/useBusinessMapRecomendPlace.d.ts +6 -1
  26. package/dist/hooks-business/{useBusinessMapFitView.d.ts → useBusinessQuotingMap.d.ts} +494 -742
  27. package/dist/hooks-business/useBusinessTaxiServiceMap.d.ts +2049 -0
  28. package/dist/index.cjs +56 -56
  29. package/dist/index.d.ts +2 -1
  30. package/dist/index.js +2389 -1921
  31. package/dist/types/interface.d.ts +2 -0
  32. package/dist/utils/compare.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/src/App.tsx +4 -2
  35. package/src/business-components/BusinessQuotingMap/BusinessQuotingMap.tsx +49 -0
  36. package/src/business-components/BusinessQuotingMap/index.ts +1 -0
  37. package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +358 -0
  38. package/src/business-components/BusinessTaxiServiceMap/index.ts +1 -0
  39. package/src/business-components/FitView/FitView.tsx +14 -0
  40. package/src/business-components/FitView/index.ts +1 -0
  41. package/src/business-components/PassengerCircle/PassengerCircle.tsx +26 -8
  42. package/src/business-components/PickupPoints/PickupPoints.tsx +8 -2
  43. package/src/business-components/PlaceCircle/PlaceCircle.tsx +29 -5
  44. package/src/business-components/TaxiCar/TaxiCar.tsx +18 -6
  45. package/src/business-components/WalkingRoute/WalkingRoute.tsx +0 -1
  46. package/src/components/AmapMarker/AmapMarker.ts +10 -3
  47. package/src/components/Demo/DemoBusinessQuoting.tsx +39 -0
  48. package/src/components/Demo/DemoBusinessTaxiService.tsx +53 -0
  49. package/src/components/Demo/HeycarDemo.tsx +19 -10
  50. package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +15 -4
  51. package/src/hooks/useGeoLocation.ts +7 -3
  52. package/src/hooks/useMap.ts +15 -1
  53. package/src/hooks/useMapFitView.ts +8 -1
  54. package/src/hooks/useOverlay.ts +1 -0
  55. package/src/hooks/useWalkingRoute.ts +14 -9
  56. package/src/hooks-business/useBusinessMapRecomendPlace.ts +24 -0
  57. package/src/hooks-business/useBusinessQuotingMap.ts +11 -0
  58. package/src/hooks-business/useBusinessTaxiServiceMap.ts +12 -0
  59. package/src/index.ts +2 -1
  60. package/src/types/interface.ts +13 -0
  61. package/src/utils/compare.ts +4 -1
  62. package/todo.md +7 -0
  63. 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,13 @@
1
+ import { HeycarMapProps } from "../../components/MapProvider";
2
+ import type { MapMountedProps } from "../../hooks/useMap";
3
+ import type { MROP } from "../../hooks/useOverlay";
4
+ import type { Place } from "../../types/interface";
5
+ export type BusinessQuotingMapProps = Omit<HeycarMapProps, "center" | "zoom"> & MROP & MapMountedProps & {
6
+ from: Place;
7
+ to: Place;
8
+ renderDescription: (titleProps: {
9
+ distance: number;
10
+ duration: number;
11
+ }) => string;
12
+ };
13
+ 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" | "mapMounted", BusinessQuotingMapProps, {} | {}>;
@@ -0,0 +1 @@
1
+ export * from "./BusinessQuotingMap";
@@ -0,0 +1,24 @@
1
+ import { HeycarMapProps } from "../../components/MapProvider";
2
+ import { MapMountedProps } from "../../hooks/useMap";
3
+ import type { MROP } from "../../hooks/useOverlay";
4
+ import type { DriverStatus, Place, Point } from "../../types/interface";
5
+ export type BusinessTaxiServiceMapProps = Omit<HeycarMapProps, "center" | "zoom"> & MROP & MapMountedProps & {
6
+ from: Place;
7
+ to: Place;
8
+ dispatchingTitle: string;
9
+ bookDispatchingTitle: string;
10
+ bookDispatchedTitle: string;
11
+ driverArrivedTitle: string;
12
+ driverStatus: DriverStatus;
13
+ interval: number;
14
+ renderStartSerivceTitle: (titleProps: {
15
+ distance: number;
16
+ duration: number;
17
+ }) => string;
18
+ renderInServiceTitle: (titleProps: {
19
+ distance: number;
20
+ duration: number;
21
+ }) => string;
22
+ getDriverPosition: () => Promise<Point>;
23
+ };
24
+ 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" | "mapMounted", BusinessTaxiServiceMapProps, {} | {}>;
@@ -0,0 +1 @@
1
+ export * from "./BusinessTaxiServiceMap";
@@ -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";