@heycar/heycars-map 0.8.1 → 0.8.3
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/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
9
9
|
const Vue = require("vue");
|
|
10
10
|
const style = "";
|
|
11
11
|
const name = "@heycar/heycars-map";
|
|
12
|
-
const version = "0.8.
|
|
12
|
+
const version = "0.8.3";
|
|
13
13
|
const type = "module";
|
|
14
14
|
const scripts = {
|
|
15
15
|
dev: "vite -c vite.config.dev.ts",
|
|
@@ -3508,7 +3508,7 @@ function compatibaleAddEventListenerDeviceOrientation(handler) {
|
|
|
3508
3508
|
addEventListener("touchend", handleTouchEnd);
|
|
3509
3509
|
return;
|
|
3510
3510
|
}
|
|
3511
|
-
if (typeof DeviceOrientationEvent
|
|
3511
|
+
if (typeof DeviceOrientationEvent.requestPermission !== "function") {
|
|
3512
3512
|
console.warn("My Warning: ios not support DeviceOrientationEvent");
|
|
3513
3513
|
return;
|
|
3514
3514
|
}
|
|
@@ -5610,6 +5610,11 @@ const useAmapRecomendPlace = (props) => {
|
|
|
5610
5610
|
availableRef.value = !!available;
|
|
5611
5611
|
zoneRef.value = zone;
|
|
5612
5612
|
placeCandidatesRef.value = placeCandidates != null ? placeCandidates : [];
|
|
5613
|
+
return {
|
|
5614
|
+
inputPlace: { ...place2 },
|
|
5615
|
+
isInZone: !!zone,
|
|
5616
|
+
place: place2
|
|
5617
|
+
};
|
|
5613
5618
|
};
|
|
5614
5619
|
const updateRecommendPlace = (place2) => {
|
|
5615
5620
|
setPlace(place2);
|
|
@@ -5694,6 +5699,11 @@ const useGmapRecomendPlace = (props) => {
|
|
|
5694
5699
|
availableRef.value = !!available;
|
|
5695
5700
|
zoneRef.value = zone;
|
|
5696
5701
|
placeCandidatesRef.value = placeCandidates != null ? placeCandidates : [];
|
|
5702
|
+
return {
|
|
5703
|
+
inputPlace: { ...place2 },
|
|
5704
|
+
isInZone: !!zone,
|
|
5705
|
+
place: place2
|
|
5706
|
+
};
|
|
5697
5707
|
};
|
|
5698
5708
|
const updateRecommendPlace = (place2) => {
|
|
5699
5709
|
setPlace(place2);
|
|
@@ -6466,6 +6476,14 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6466
6476
|
});
|
|
6467
6477
|
}
|
|
6468
6478
|
});
|
|
6479
|
+
Vue.watchEffect(() => {
|
|
6480
|
+
mapContext.onChangeCenterPlace({
|
|
6481
|
+
...centerPlace
|
|
6482
|
+
});
|
|
6483
|
+
});
|
|
6484
|
+
Vue.watchEffect(() => {
|
|
6485
|
+
mapContext.onChangeRecomendPlaces([...placeCandidates.value]);
|
|
6486
|
+
});
|
|
6469
6487
|
return () => {
|
|
6470
6488
|
var _a2, _b2;
|
|
6471
6489
|
const {
|
|
@@ -6473,6 +6491,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6473
6491
|
recomendDescription,
|
|
6474
6492
|
unavailableTitle
|
|
6475
6493
|
} = props;
|
|
6494
|
+
console.log("centerPlace = ", JSON.stringify(centerPlace));
|
|
6476
6495
|
const title = geoLoading.value ? geoLoadingTitle2 : !availableRef.value ? unavailableTitle : centerPlace.displayName;
|
|
6477
6496
|
const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
|
|
6478
6497
|
return Vue.h(HeycarMap, {
|
|
@@ -6684,7 +6703,18 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
6684
6703
|
});
|
|
6685
6704
|
}
|
|
6686
6705
|
});
|
|
6687
|
-
watchPostEffectOnce(() =>
|
|
6706
|
+
watchPostEffectOnce(async () => {
|
|
6707
|
+
const value = await updatePlaceCandidates(defaultPlace);
|
|
6708
|
+
emit("changeRecomandPlace", value);
|
|
6709
|
+
});
|
|
6710
|
+
Vue.watchEffect(() => {
|
|
6711
|
+
mapContext.onChangeCenterPlace({
|
|
6712
|
+
...centerPlace
|
|
6713
|
+
});
|
|
6714
|
+
});
|
|
6715
|
+
Vue.watchEffect(() => {
|
|
6716
|
+
mapContext.onChangeRecomendPlaces([...placeCandidates.value]);
|
|
6717
|
+
});
|
|
6688
6718
|
return () => {
|
|
6689
6719
|
var _a, _b;
|
|
6690
6720
|
const {
|
|
@@ -7860,6 +7890,12 @@ const useBusinessRecomendPlaceMap = () => {
|
|
|
7860
7890
|
},
|
|
7861
7891
|
setCenterPlaceByUserSpecifiedInZone: () => {
|
|
7862
7892
|
throw new Error("MyError: setCenterPlaceByUserSpecifiedInZone used before assigned");
|
|
7893
|
+
},
|
|
7894
|
+
onChangeCenterPlace: (place) => {
|
|
7895
|
+
Object.assign(centerPlace, { ...place });
|
|
7896
|
+
},
|
|
7897
|
+
onChangeRecomendPlaces: (places) => {
|
|
7898
|
+
placeCandidates.value = [...places];
|
|
7863
7899
|
}
|
|
7864
7900
|
};
|
|
7865
7901
|
return {
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
import Vue, { defineComponent, h, computed, inject, provide, watch, onMounted, onUnmounted, watchPostEffect, shallowRef, ref, watchEffect, reactive, toRefs, toRef } from "vue";
|
|
8
8
|
const style = "";
|
|
9
9
|
const name = "@heycar/heycars-map";
|
|
10
|
-
const version = "0.8.
|
|
10
|
+
const version = "0.8.3";
|
|
11
11
|
const type = "module";
|
|
12
12
|
const scripts = {
|
|
13
13
|
dev: "vite -c vite.config.dev.ts",
|
|
@@ -3506,7 +3506,7 @@ function compatibaleAddEventListenerDeviceOrientation(handler) {
|
|
|
3506
3506
|
addEventListener("touchend", handleTouchEnd);
|
|
3507
3507
|
return;
|
|
3508
3508
|
}
|
|
3509
|
-
if (typeof DeviceOrientationEvent
|
|
3509
|
+
if (typeof DeviceOrientationEvent.requestPermission !== "function") {
|
|
3510
3510
|
console.warn("My Warning: ios not support DeviceOrientationEvent");
|
|
3511
3511
|
return;
|
|
3512
3512
|
}
|
|
@@ -5608,6 +5608,11 @@ const useAmapRecomendPlace = (props) => {
|
|
|
5608
5608
|
availableRef.value = !!available;
|
|
5609
5609
|
zoneRef.value = zone;
|
|
5610
5610
|
placeCandidatesRef.value = placeCandidates != null ? placeCandidates : [];
|
|
5611
|
+
return {
|
|
5612
|
+
inputPlace: { ...place2 },
|
|
5613
|
+
isInZone: !!zone,
|
|
5614
|
+
place: place2
|
|
5615
|
+
};
|
|
5611
5616
|
};
|
|
5612
5617
|
const updateRecommendPlace = (place2) => {
|
|
5613
5618
|
setPlace(place2);
|
|
@@ -5692,6 +5697,11 @@ const useGmapRecomendPlace = (props) => {
|
|
|
5692
5697
|
availableRef.value = !!available;
|
|
5693
5698
|
zoneRef.value = zone;
|
|
5694
5699
|
placeCandidatesRef.value = placeCandidates != null ? placeCandidates : [];
|
|
5700
|
+
return {
|
|
5701
|
+
inputPlace: { ...place2 },
|
|
5702
|
+
isInZone: !!zone,
|
|
5703
|
+
place: place2
|
|
5704
|
+
};
|
|
5695
5705
|
};
|
|
5696
5706
|
const updateRecommendPlace = (place2) => {
|
|
5697
5707
|
setPlace(place2);
|
|
@@ -6464,6 +6474,14 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6464
6474
|
});
|
|
6465
6475
|
}
|
|
6466
6476
|
});
|
|
6477
|
+
watchEffect(() => {
|
|
6478
|
+
mapContext.onChangeCenterPlace({
|
|
6479
|
+
...centerPlace
|
|
6480
|
+
});
|
|
6481
|
+
});
|
|
6482
|
+
watchEffect(() => {
|
|
6483
|
+
mapContext.onChangeRecomendPlaces([...placeCandidates.value]);
|
|
6484
|
+
});
|
|
6467
6485
|
return () => {
|
|
6468
6486
|
var _a2, _b2;
|
|
6469
6487
|
const {
|
|
@@ -6471,6 +6489,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6471
6489
|
recomendDescription,
|
|
6472
6490
|
unavailableTitle
|
|
6473
6491
|
} = props;
|
|
6492
|
+
console.log("centerPlace = ", JSON.stringify(centerPlace));
|
|
6474
6493
|
const title = geoLoading.value ? geoLoadingTitle2 : !availableRef.value ? unavailableTitle : centerPlace.displayName;
|
|
6475
6494
|
const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
|
|
6476
6495
|
return h(HeycarMap, {
|
|
@@ -6682,7 +6701,18 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
6682
6701
|
});
|
|
6683
6702
|
}
|
|
6684
6703
|
});
|
|
6685
|
-
watchPostEffectOnce(() =>
|
|
6704
|
+
watchPostEffectOnce(async () => {
|
|
6705
|
+
const value = await updatePlaceCandidates(defaultPlace);
|
|
6706
|
+
emit("changeRecomandPlace", value);
|
|
6707
|
+
});
|
|
6708
|
+
watchEffect(() => {
|
|
6709
|
+
mapContext.onChangeCenterPlace({
|
|
6710
|
+
...centerPlace
|
|
6711
|
+
});
|
|
6712
|
+
});
|
|
6713
|
+
watchEffect(() => {
|
|
6714
|
+
mapContext.onChangeRecomendPlaces([...placeCandidates.value]);
|
|
6715
|
+
});
|
|
6686
6716
|
return () => {
|
|
6687
6717
|
var _a, _b;
|
|
6688
6718
|
const {
|
|
@@ -7858,6 +7888,12 @@ const useBusinessRecomendPlaceMap = () => {
|
|
|
7858
7888
|
},
|
|
7859
7889
|
setCenterPlaceByUserSpecifiedInZone: () => {
|
|
7860
7890
|
throw new Error("MyError: setCenterPlaceByUserSpecifiedInZone used before assigned");
|
|
7891
|
+
},
|
|
7892
|
+
onChangeCenterPlace: (place) => {
|
|
7893
|
+
Object.assign(centerPlace, { ...place });
|
|
7894
|
+
},
|
|
7895
|
+
onChangeRecomendPlaces: (places) => {
|
|
7896
|
+
placeCandidates.value = [...places];
|
|
7861
7897
|
}
|
|
7862
7898
|
};
|
|
7863
7899
|
return {
|
|
@@ -32,7 +32,7 @@ export declare const useAmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
32
32
|
availableRef: Ref<boolean>;
|
|
33
33
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
34
34
|
updateRecommendPlace: (place: Place) => void;
|
|
35
|
-
updatePlaceCandidates: (place: Place) => Promise<
|
|
35
|
+
updatePlaceCandidates: (place: Place) => Promise<ValueOfOnChangeRecommendPlace>;
|
|
36
36
|
updatePlace: (value: Point) => void;
|
|
37
37
|
setPlaceCandidatesAndZone: ({ zone, places: inputPlaceCandidates, }: RecommendZonePlaces) => void;
|
|
38
38
|
};
|
|
@@ -53,7 +53,7 @@ export declare const useGmapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C
|
|
|
53
53
|
availableRef: Ref<boolean>;
|
|
54
54
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
55
55
|
updateRecommendPlace: (place: Place) => void;
|
|
56
|
-
updatePlaceCandidates: (place: Place) => Promise<
|
|
56
|
+
updatePlaceCandidates: (place: Place) => Promise<ValueOfOnChangeRecommendPlace>;
|
|
57
57
|
updatePlace: (value: Point) => void;
|
|
58
58
|
setPlaceCandidatesAndZone: ({ zone, places }: RecommendZonePlaces) => void;
|
|
59
59
|
};
|
|
@@ -74,7 +74,7 @@ export declare const useMapRecomendPlace: <C>(props: UseMapRecomendPlaceProps<C>
|
|
|
74
74
|
availableRef: Ref<boolean>;
|
|
75
75
|
isElectedRef: import("vue-demi").ComputedRef<boolean>;
|
|
76
76
|
updateRecommendPlace: (place: Place) => void;
|
|
77
|
-
updatePlaceCandidates: (place: Place) => Promise<
|
|
77
|
+
updatePlaceCandidates: (place: Place) => Promise<ValueOfOnChangeRecommendPlace>;
|
|
78
78
|
updatePlace: (value: Point) => void;
|
|
79
79
|
setPlaceCandidatesAndZone: ({ zone, places }: RecommendZonePlaces) => void;
|
|
80
80
|
};
|
|
@@ -7,6 +7,8 @@ export interface BusinessRecomendPlaceContext {
|
|
|
7
7
|
panToGeoPositionByRecomend: (value: Point) => void;
|
|
8
8
|
setCenterPlaceByUserSpecified: (value: Place) => void;
|
|
9
9
|
setCenterPlaceByUserSpecifiedInZone: (value: SetCenterPlaceByUserSpecifiedInZoneProps) => void;
|
|
10
|
+
onChangeCenterPlace: (value: Place) => void;
|
|
11
|
+
onChangeRecomendPlaces: (value: Place[]) => void;
|
|
10
12
|
}
|
|
11
13
|
export declare const useBusinessRecomendPlaceMap: () => {
|
|
12
14
|
mapContext: BusinessRecomendPlaceContext;
|