@heycar/heycars-map 1.0.0-coordinate → 1.0.0-coordinate2
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/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +2 -2
- package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +2 -2
- package/dist/v2/hooks/useMapRecomendPlace.js +4 -1
- package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +2 -2
- package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +2 -2
- package/dist/v3/hooks/useMapRecomendPlace.js +4 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ import { watchPostEffectOnce } from "../../utils/compare.js";
|
|
|
16
16
|
import { equalAssign, isPlacesInclude } from "../../utils/helper.js";
|
|
17
17
|
import { detectBrowserPlatform } from "../../utils/platform.js";
|
|
18
18
|
import { geoPositionError2businessTimeout, place2point, isPlaceEqual, pipeOnlyLastEffect, isZoneEqual } from "../../utils/transform.js";
|
|
19
|
-
import {
|
|
19
|
+
import { toCoordinateRecommendZonePlacesType, toCoordinatePlaceType } from "../../utils/typeChecking.js";
|
|
20
20
|
import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
21
21
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
22
22
|
import { GreenZone } from "../GreenZone/GreenZone.js";
|
|
@@ -55,7 +55,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
|
|
|
55
55
|
coordinatifyGeoPosition
|
|
56
56
|
} = useMapCoordinatify();
|
|
57
57
|
const pipedGetAvailable = getAvailable && pipeOnlyLastEffect((p) => getAvailable(coordinatifyPlace(p)));
|
|
58
|
-
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(r)));
|
|
58
|
+
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(r))));
|
|
59
59
|
const {
|
|
60
60
|
mapRef,
|
|
61
61
|
mapElementRef,
|
|
@@ -14,7 +14,7 @@ import { watchPostEffectOnce } from "../../utils/compare.js";
|
|
|
14
14
|
import { equalAssign, isPlacesInclude } from "../../utils/helper.js";
|
|
15
15
|
import { detectBrowserPlatform } from "../../utils/platform.js";
|
|
16
16
|
import { geoPositionError2businessTimeout, place2point, isPlaceEqual, pipeOnlyLastEffect, isZoneEqual } from "../../utils/transform.js";
|
|
17
|
-
import {
|
|
17
|
+
import { toCoordinateRecommendZonePlacesType, toCoordinatePlaceType } from "../../utils/typeChecking.js";
|
|
18
18
|
import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
19
19
|
import { RECOMMEND_PLACE_LARGE_LIMIT, RECOMMEND_PLACE_DRAG_LIMIT, ZONE_ZOOM, RECOMMEND_PLACE_ZONE_ICON_MIN, RECOMMEND_PLACE_ICON_ZOOM_MIN, RECOMMEND_PLACE_ZONE_TEXT_MIN, RECOMMEND_PLACE_TEXT_ZOOM_MIN, DEFAULT_ZOOM } from "../BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js";
|
|
20
20
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
@@ -54,7 +54,7 @@ const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", f
|
|
|
54
54
|
coordinatifyGeoPosition
|
|
55
55
|
} = useMapCoordinatify();
|
|
56
56
|
const pipedGetAvailable = getAvailable && pipeOnlyLastEffect((p) => getAvailable(coordinatifyPlace(p)));
|
|
57
|
-
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(r)));
|
|
57
|
+
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(r))));
|
|
58
58
|
const {
|
|
59
59
|
mapRef,
|
|
60
60
|
mapElementRef,
|
|
@@ -11,8 +11,11 @@ function mergeGetRecommendPlaceAndGetAvailable(getRecomendPlace, getAvailable, t
|
|
|
11
11
|
getAvailable == null ? void 0 : getAvailable(place).then((value) => {
|
|
12
12
|
if (!value)
|
|
13
13
|
resolve({ available: false });
|
|
14
|
+
}).catch((error) => console.error(error));
|
|
15
|
+
getRecomendPlace(place, context).then((result) => resolve(result != null ? result : { available })).catch((error) => {
|
|
16
|
+
console.error(error);
|
|
17
|
+
resolve({ available });
|
|
14
18
|
});
|
|
15
|
-
getRecomendPlace(place, context).then((result) => resolve(result != null ? result : { available })).catch(() => resolve({ available }));
|
|
16
19
|
setTimeout(() => resolve({ available }), timeout);
|
|
17
20
|
});
|
|
18
21
|
};
|
|
@@ -16,7 +16,7 @@ import { watchPostEffectOnce } from "../../utils/compare.js";
|
|
|
16
16
|
import { equalAssign, isPlacesInclude } from "../../utils/helper.js";
|
|
17
17
|
import { detectBrowserPlatform } from "../../utils/platform.js";
|
|
18
18
|
import { geoPositionError2businessTimeout, place2point, isPlaceEqual, pipeOnlyLastEffect, isZoneEqual } from "../../utils/transform.js";
|
|
19
|
-
import {
|
|
19
|
+
import { toCoordinateRecommendZonePlacesType, toCoordinatePlaceType } from "../../utils/typeChecking.js";
|
|
20
20
|
import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
21
21
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
22
22
|
import { GreenZone } from "../GreenZone/GreenZone.js";
|
|
@@ -55,7 +55,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup("BusinessRecomendPlaceMap", f
|
|
|
55
55
|
coordinatifyGeoPosition
|
|
56
56
|
} = useMapCoordinatify();
|
|
57
57
|
const pipedGetAvailable = getAvailable && pipeOnlyLastEffect((p) => getAvailable(coordinatifyPlace(p)));
|
|
58
|
-
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(r)));
|
|
58
|
+
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(r))));
|
|
59
59
|
const {
|
|
60
60
|
mapRef,
|
|
61
61
|
mapElementRef,
|
|
@@ -14,7 +14,7 @@ import { watchPostEffectOnce } from "../../utils/compare.js";
|
|
|
14
14
|
import { equalAssign, isPlacesInclude } from "../../utils/helper.js";
|
|
15
15
|
import { detectBrowserPlatform } from "../../utils/platform.js";
|
|
16
16
|
import { geoPositionError2businessTimeout, place2point, isPlaceEqual, pipeOnlyLastEffect, isZoneEqual } from "../../utils/transform.js";
|
|
17
|
-
import {
|
|
17
|
+
import { toCoordinateRecommendZonePlacesType, toCoordinatePlaceType } from "../../utils/typeChecking.js";
|
|
18
18
|
import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
19
19
|
import { RECOMMEND_PLACE_LARGE_LIMIT, RECOMMEND_PLACE_DRAG_LIMIT, ZONE_ZOOM, RECOMMEND_PLACE_ZONE_ICON_MIN, RECOMMEND_PLACE_ICON_ZOOM_MIN, RECOMMEND_PLACE_ZONE_TEXT_MIN, RECOMMEND_PLACE_TEXT_ZOOM_MIN, DEFAULT_ZOOM } from "../BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js";
|
|
20
20
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
@@ -54,7 +54,7 @@ const BusinessReselectPlaceMap = defineLagecySetup("BusinessReselectPlaceMap", f
|
|
|
54
54
|
coordinatifyGeoPosition
|
|
55
55
|
} = useMapCoordinatify();
|
|
56
56
|
const pipedGetAvailable = getAvailable && pipeOnlyLastEffect((p) => getAvailable(coordinatifyPlace(p)));
|
|
57
|
-
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(r)));
|
|
57
|
+
const pipedGetRecomendPlace = pipeOnlyLastEffect((p) => getRecomendPlace(coordinatifyPlace(p)).then((r) => r && unCoordinatifyRecommendZonePlaces(toCoordinateRecommendZonePlacesType(r))));
|
|
58
58
|
const {
|
|
59
59
|
mapRef,
|
|
60
60
|
mapElementRef,
|
|
@@ -11,8 +11,11 @@ function mergeGetRecommendPlaceAndGetAvailable(getRecomendPlace, getAvailable, t
|
|
|
11
11
|
getAvailable == null ? void 0 : getAvailable(place).then((value) => {
|
|
12
12
|
if (!value)
|
|
13
13
|
resolve({ available: false });
|
|
14
|
+
}).catch((error) => console.error(error));
|
|
15
|
+
getRecomendPlace(place, context).then((result) => resolve(result != null ? result : { available })).catch((error) => {
|
|
16
|
+
console.error(error);
|
|
17
|
+
resolve({ available });
|
|
14
18
|
});
|
|
15
|
-
getRecomendPlace(place, context).then((result) => resolve(result != null ? result : { available })).catch(() => resolve({ available }));
|
|
16
19
|
setTimeout(() => resolve({ available }), timeout);
|
|
17
20
|
});
|
|
18
21
|
};
|