@heycar/heycars-map 2.0.0-switchMap1 → 2.0.0-switchMap3
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/README.md +43 -29
- package/dist/v2/App.js +5 -3
- package/dist/v2/Demo/DemoBusinessQuoting.js +3 -2
- package/dist/v2/Demo/DemoBusinessRecomendPlace.js +1 -1
- package/dist/v2/api/cdn.d.ts +1 -0
- package/dist/v2/api/cdn.js +2 -0
- package/dist/v2/business-components/BusinessQuotingMap/BusinessQuotingMap.js +5 -2
- package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -2
- package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +2 -1
- package/dist/v2/business-components/BusinessRecomendPlaceMap/index.js +1 -1
- package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +2 -2
- package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +18 -11
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +12 -5
- package/dist/v2/chunks/{BusinessRecomendPlaceMap.5be4fdcf.js → BusinessRecomendPlaceMap.f589ebf7.js} +17 -10
- package/dist/v2/chunks/{Loading.fc6e75d0.js → Loading.da68a2a6.js} +31 -1
- package/dist/v2/chunks/throttle.8bdd8d3b.js +20 -0
- package/dist/v2/components/Loading/Loading.css.d.ts +5 -0
- package/dist/v2/components/Loading/Loading.d.ts +6 -0
- package/dist/v2/components/Loading/Loading.js +3 -1
- package/dist/v2/components/Loading/index.js +2 -1
- package/dist/v2/components/MapProvider/MapProvider.d.ts +2 -2
- package/dist/v2/components/MapProvider/MapProvider.js +16 -9
- package/dist/v2/css/Loading-0e058b68.css +51 -0
- package/dist/v2/hooks/useDeviceOrientation.js +1 -17
- package/dist/v2/hooks/useMapGCJ02.js +1 -3
- package/dist/v2/hooks/useMapGraspRoad.js +1 -2
- package/dist/v2/hooks/useMapInChina.d.ts +3 -15
- package/dist/v2/hooks/useMapInChina.js +11 -16
- package/dist/v2/hooks/useMapLoader.d.ts +10 -6
- package/dist/v2/hooks/useMapLoader.js +88 -59
- package/dist/v2/hooks/useMapPlace.d.ts +1 -0
- package/dist/v2/hooks/useMapPlace.js +10 -9
- package/dist/v2/hooks/useMapRecomendPlace.d.ts +1 -0
- package/dist/v2/hooks/useMapRecomendPlace.js +72 -64
- package/dist/v2/hooks/useMapSupplier.d.ts +6 -0
- package/dist/v2/hooks/useMapSupplier.js +17 -0
- package/dist/v2/hooks-business/useBusinessQuotingMap.d.ts +2 -0
- package/dist/v2/hooks-business/useBusinessQuotingMap.js +7 -2
- package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
- package/dist/v2/index.js +1 -1
- package/dist/v2/utils/ManualAbortError.d.ts +3 -0
- package/dist/v2/utils/ManualAbortError.js +14 -0
- package/dist/v2/utils/helper.d.ts +1 -0
- package/dist/v2/utils/helper.js +17 -0
- package/dist/v2/utils/log.js +1 -1
- package/dist/v2/utils/patchGoogleMapLoader.d.ts +2 -0
- package/dist/v2/utils/patchGoogleMapLoader.js +64 -0
- package/dist/v3/App.js +5 -3
- package/dist/v3/Demo/DemoBusinessQuoting.js +4 -3
- package/dist/v3/Demo/DemoBusinessRecomendPlace.js +1 -1
- package/dist/v3/api/cdn.d.ts +1 -0
- package/dist/v3/api/cdn.js +2 -0
- package/dist/v3/business-components/BusinessQuotingMap/BusinessQuotingMap.js +5 -2
- package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -2
- package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +2 -1
- package/dist/v3/business-components/BusinessRecomendPlaceMap/index.js +1 -1
- package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +2 -2
- package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +18 -11
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +12 -5
- package/dist/v3/chunks/{BusinessRecomendPlaceMap.39888296.js → BusinessRecomendPlaceMap.86e9c287.js} +17 -10
- package/dist/v3/chunks/{Loading.a8e2f26a.js → Loading.98d687c0.js} +27 -1
- package/dist/v3/chunks/throttle.8bdd8d3b.js +20 -0
- package/dist/v3/components/Loading/Loading.css.d.ts +5 -0
- package/dist/v3/components/Loading/Loading.d.ts +8 -0
- package/dist/v3/components/Loading/Loading.js +3 -1
- package/dist/v3/components/Loading/index.js +2 -1
- package/dist/v3/components/MapProvider/MapProvider.d.ts +6 -3
- package/dist/v3/components/MapProvider/MapProvider.js +14 -9
- package/dist/v3/css/Loading-0e058b68.css +51 -0
- package/dist/v3/hooks/useDeviceOrientation.js +1 -17
- package/dist/v3/hooks/useMapGCJ02.js +1 -3
- package/dist/v3/hooks/useMapGraspRoad.js +1 -2
- package/dist/v3/hooks/useMapInChina.d.ts +3 -15
- package/dist/v3/hooks/useMapInChina.js +11 -16
- package/dist/v3/hooks/useMapLoader.d.ts +10 -6
- package/dist/v3/hooks/useMapLoader.js +88 -59
- package/dist/v3/hooks/useMapPlace.d.ts +1 -0
- package/dist/v3/hooks/useMapPlace.js +10 -9
- package/dist/v3/hooks/useMapRecomendPlace.d.ts +1 -0
- package/dist/v3/hooks/useMapRecomendPlace.js +72 -64
- package/dist/v3/hooks/useMapSupplier.d.ts +6 -0
- package/dist/v3/hooks/useMapSupplier.js +17 -0
- package/dist/v3/hooks-business/useBusinessQuotingMap.d.ts +2 -0
- package/dist/v3/hooks-business/useBusinessQuotingMap.js +7 -2
- package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
- package/dist/v3/index.js +1 -1
- package/dist/v3/utils/ManualAbortError.d.ts +3 -0
- package/dist/v3/utils/ManualAbortError.js +14 -0
- package/dist/v3/utils/helper.d.ts +1 -0
- package/dist/v3/utils/helper.js +17 -0
- package/dist/v3/utils/log.js +1 -1
- package/dist/v3/utils/patchGoogleMapLoader.d.ts +2 -0
- package/dist/v3/utils/patchGoogleMapLoader.js +64 -0
- package/package.json +2 -2
- package/dist/v2/css/Loading-523061b9.css +0 -9
- package/dist/v3/css/Loading-523061b9.css +0 -9
package/README.md
CHANGED
|
@@ -120,6 +120,12 @@ export interface BusinessGeolocationPositionError extends GeolocationPositionErr
|
|
|
120
120
|
gmapKey={gmapApiKey}
|
|
121
121
|
// 使用哪个地图供应商,目前两个供应商: amap 高德 / gmap 谷歌
|
|
122
122
|
supplier={"amap"}
|
|
123
|
+
// 地图加载失败时显示的标题
|
|
124
|
+
renderLoadFailedTitle={() => (supplier === "gmap" ? "未能成功访问谷歌地图" : "高德地图加载失败")}
|
|
125
|
+
// 地图加载失败时显示的描述
|
|
126
|
+
renderLoadFailedDescription={() =>
|
|
127
|
+
supplier === "gmap" ? "请确认您的网络能正常访问谷歌地图, \n或切回高德地图" : undefined
|
|
128
|
+
}
|
|
123
129
|
>
|
|
124
130
|
...
|
|
125
131
|
</MapProvider>
|
|
@@ -134,6 +140,8 @@ export interface BusinessGeolocationPositionError extends GeolocationPositionErr
|
|
|
134
140
|
:amap-key="amapApiKey"
|
|
135
141
|
:amap-secret="amapApiSecret"
|
|
136
142
|
supplier="amap"
|
|
143
|
+
render-load-failed-title='() => supplier === "gmap" ? "未能成功访问谷歌地图" : "高德地图加载失败"'
|
|
144
|
+
render-load-failed-description='() => supplier === "gmap" ? "请确认您的网络能正常访问谷歌地图,\n或切回高德地图" : undefined'
|
|
137
145
|
>
|
|
138
146
|
...
|
|
139
147
|
</MapProvider>
|
|
@@ -431,36 +439,42 @@ import { BusinessQuotingMap, useBusinessQuotingMap } from "@heycar/heycars-map";
|
|
|
431
439
|
|
|
432
440
|
export default defineComponent({
|
|
433
441
|
setup() {
|
|
434
|
-
const { mapContext } = useBusinessQuotingMap();
|
|
442
|
+
const { mapContext, toAmapCoordinateType } = useBusinessQuotingMap();
|
|
435
443
|
return () => (
|
|
436
|
-
<
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
444
|
+
<div>
|
|
445
|
+
<BusinessQuotingMap
|
|
446
|
+
class={"demo"}
|
|
447
|
+
from={{
|
|
448
|
+
displayName: "The Malayan Council",
|
|
449
|
+
name: "10 Winstedt Rd, #01-17, Singapore 227977",
|
|
450
|
+
type: "wgs84",
|
|
451
|
+
lat: 1.311295,
|
|
452
|
+
lng: 103.841974,
|
|
453
|
+
}}
|
|
454
|
+
to={{
|
|
455
|
+
displayName: "CDG Engie Charging Station",
|
|
456
|
+
name: "21 Kent Ridge Rd, Singapore 119220",
|
|
457
|
+
type: "wgs84",
|
|
458
|
+
lat: 1.2966426,
|
|
459
|
+
lng: 103.7763939,
|
|
460
|
+
}}
|
|
461
|
+
fromDescription={"您将在此上车"}
|
|
462
|
+
renderDescription={({ distance, duration, tolls }) =>
|
|
463
|
+
`全程 *${distance / 1000}公里* 约行驶 *${duration}* 高速费用 *${tolls ?? 0}*元`
|
|
464
|
+
}
|
|
465
|
+
mapContext={mapContext}
|
|
466
|
+
onClickStartPoint={(place) => console.log("点击起点时触发 palce = ", place)}
|
|
467
|
+
onClickEndPoint={(place) => console.log("点击终点时触发 palce = ", place)}
|
|
468
|
+
onChangeGoogleConnection={(status) =>
|
|
469
|
+
// 根据目前的产品需求,连通性检测只会被检测一次。
|
|
470
|
+
console.log("谷歌连通性发生变化时触发,连通性状态是:", status)
|
|
471
|
+
}
|
|
472
|
+
/>
|
|
473
|
+
<div>
|
|
474
|
+
经度 103.841974, 纬度 1.311295 在高德地图上的坐标类型是:
|
|
475
|
+
{toAmapCoordinateType([103.841974, 1.311295])}
|
|
476
|
+
</div>
|
|
477
|
+
<div>
|
|
464
478
|
);
|
|
465
479
|
},
|
|
466
480
|
});
|
package/dist/v2/App.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
2
|
import { defineComponent, ref } from "vue-demi";
|
|
3
|
-
import {
|
|
3
|
+
import { DemoBusinessQuoting } from "./Demo/DemoBusinessQuoting.js";
|
|
4
4
|
import { MapProvider } from "./components/MapProvider/MapProvider.js";
|
|
5
5
|
const gmapApiKey = "AIzaSyCRtkaNSWMOhOXDOUpJK4OVbm5RIstYj-I";
|
|
6
6
|
const gmapId = "d0af0c05331af64a";
|
|
@@ -19,9 +19,11 @@ const App = defineComponent({
|
|
|
19
19
|
"gmapRasterId": gmapRasterId,
|
|
20
20
|
"gmapKey": gmapApiKey,
|
|
21
21
|
"language": "en",
|
|
22
|
-
"supplier": supplierRef.value
|
|
22
|
+
"supplier": supplierRef.value,
|
|
23
|
+
"renderLoadFailedTitle": () => supplierRef.value === "gmap" ? "未能成功访问谷歌地图" : "高德地图加载失败",
|
|
24
|
+
"renderLoadFailedDescription": () => supplierRef.value === "gmap" ? "请确认您的网络能正常访问谷歌地图, \n或切回高德地图" : void 0
|
|
23
25
|
}
|
|
24
|
-
}, [h(
|
|
26
|
+
}, [h(DemoBusinessQuoting)]);
|
|
25
27
|
}
|
|
26
28
|
});
|
|
27
29
|
export {
|
|
@@ -5,7 +5,8 @@ import { defineSetup } from "../types/helper.js";
|
|
|
5
5
|
import { d as demo } from "../chunks/Demo.css.e921a2f6.js";
|
|
6
6
|
const DemoBusinessQuoting = defineSetup("DemoBusinessQuoting", function() {
|
|
7
7
|
const {
|
|
8
|
-
mapContext
|
|
8
|
+
mapContext,
|
|
9
|
+
toAmapCoordinateType
|
|
9
10
|
} = useBusinessQuotingMap();
|
|
10
11
|
return () => h("div", [h(BusinessQuotingMap, {
|
|
11
12
|
"class": demo,
|
|
@@ -36,7 +37,7 @@ const DemoBusinessQuoting = defineSetup("DemoBusinessQuoting", function() {
|
|
|
36
37
|
"clickStartPoint": (place) => console.log("点击起点时触发 palce = ", place),
|
|
37
38
|
"clickEndPoint": (place) => console.log("点击终点时触发 palce = ", place)
|
|
38
39
|
}
|
|
39
|
-
})]);
|
|
40
|
+
}), h("div", ["经度 103.841974, 纬度 1.311295 在高德地图上的坐标类型是:", toAmapCoordinateType([103.841974, 1.311295])])]);
|
|
40
41
|
});
|
|
41
42
|
export {
|
|
42
43
|
DemoBusinessQuoting
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.
|
|
2
|
+
import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.f589ebf7.js";
|
|
3
3
|
import { useBusinessRecomendPlaceMap } from "../hooks-business/useBusinessRecomendPlaceMap.js";
|
|
4
4
|
import { defineSetup } from "../types/helper.js";
|
|
5
5
|
import { d as demo } from "../chunks/Demo.css.e921a2f6.js";
|
package/dist/v2/api/cdn.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export declare const ICON_END_POINT_EN_URL = "https://overseas-oss.heycars.cn/he
|
|
|
5
5
|
export declare const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/end-point-zh-TW.svg";
|
|
6
6
|
export declare const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
7
|
export declare const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
|
+
export declare const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
package/dist/v2/api/cdn.js
CHANGED
|
@@ -5,12 +5,14 @@ const ICON_END_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/en
|
|
|
5
5
|
const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/end-point-zh-TW.svg";
|
|
6
6
|
const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
7
|
const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
|
+
const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
|
8
9
|
export {
|
|
9
10
|
AMAP_DEFAULT_MARKER_ICON_URL,
|
|
10
11
|
ICON_DOT_LOADING_URL,
|
|
11
12
|
ICON_END_POINT_EN_URL,
|
|
12
13
|
ICON_END_POINT_ZH_TW_URL,
|
|
13
14
|
ICON_FULL_SCREEN_URL,
|
|
15
|
+
ICON_LOAD_FAILED_URL,
|
|
14
16
|
ICON_START_POINT_EN_URL,
|
|
15
17
|
ICON_TAXI_CAR_URL
|
|
16
18
|
};
|
|
@@ -4,7 +4,7 @@ import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
|
4
4
|
import { useHeycarMap } from "../../hooks/useHeycarMap.js";
|
|
5
5
|
import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
|
|
6
6
|
import { useMapFitView } from "../../hooks/useMapFitView.js";
|
|
7
|
-
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
7
|
+
import { useMapSupplier, useMapAssertSupplier } from "../../hooks/useMapSupplier.js";
|
|
8
8
|
import { defineSetup, defineLagecySetup } from "../../types/helper.js";
|
|
9
9
|
import { generateCreateElementV2PropsOn } from "../../utils/compare.js";
|
|
10
10
|
import { place2point, pipeDefer } from "../../utils/transform.js";
|
|
@@ -25,6 +25,9 @@ const BusinessQuotingMapInner = defineSetup("BusinessQuotingMapInner", function(
|
|
|
25
25
|
const {
|
|
26
26
|
language
|
|
27
27
|
} = useMapSupplier();
|
|
28
|
+
const {
|
|
29
|
+
assertSupplier
|
|
30
|
+
} = useMapAssertSupplier();
|
|
28
31
|
const {
|
|
29
32
|
mapRef,
|
|
30
33
|
setMap
|
|
@@ -40,7 +43,7 @@ const BusinessQuotingMapInner = defineSetup("BusinessQuotingMapInner", function(
|
|
|
40
43
|
mapRef,
|
|
41
44
|
padding: BUSINESS_QUOTING_FITVIEW_PANDING
|
|
42
45
|
});
|
|
43
|
-
mapContext.setFitView = () => setFitView(false);
|
|
46
|
+
mapContext.setFitView = assertSupplier(() => setFitView(false));
|
|
44
47
|
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
45
48
|
registerOverlay,
|
|
46
49
|
immediate: true
|
|
@@ -45,5 +45,5 @@ export interface BusinessRecomendPlaceMapProps extends CoordinatifyProps<Omit<He
|
|
|
45
45
|
onClickLocatorText?: AbsoluteAddressBoxProps["onClickText"];
|
|
46
46
|
onClickLocatorPhoto?: AbsoluteAddressBoxProps["onClickPhoto"];
|
|
47
47
|
}
|
|
48
|
-
export declare const BusinessRecomendPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "
|
|
49
|
-
export declare const BusinessRecomendPlaceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "
|
|
48
|
+
export declare const BusinessRecomendPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessRecomendPlaceMapProps>;
|
|
49
|
+
export declare const BusinessRecomendPlaceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessRecomendPlaceMapProps>, 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<BusinessRecomendPlaceMapProps, Required<BusinessRecomendPlaceMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "changePlace" | "loadGeoLocation" | "loadDefaultGeoLocation" | "changeByDrag" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessRecomendPlaceMapProps>;
|
|
@@ -14,6 +14,7 @@ import "../../hooks/useMapSupplier.js";
|
|
|
14
14
|
import "../../hooks/useMapZoom.js";
|
|
15
15
|
import "../../types/helper.js";
|
|
16
16
|
import "../../types/interface.js";
|
|
17
|
+
import "../../utils/ManualAbortError.js";
|
|
17
18
|
import "../../utils/compare.js";
|
|
18
19
|
import "../../utils/helper.js";
|
|
19
20
|
import "../../utils/platform.js";
|
|
@@ -25,7 +26,7 @@ import "../GreenZone/GreenZone.js";
|
|
|
25
26
|
import "../PassengerCircle/PassengerCircle.js";
|
|
26
27
|
import "../PickupPoints/PickupPoints.js";
|
|
27
28
|
import "./useCacheCenterPlace.js";
|
|
28
|
-
import { B, f, D, E, a, c, R, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.
|
|
29
|
+
import { B, f, D, E, a, c, R, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.f589ebf7.js";
|
|
29
30
|
export {
|
|
30
31
|
B as BusinessRecomendPlaceMap,
|
|
31
32
|
f as BusinessRecomendPlaceMapInner,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B, f, D, E, a, c, R, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.
|
|
1
|
+
import { B, f, D, E, a, c, R, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.f589ebf7.js";
|
|
2
2
|
export {
|
|
3
3
|
B as BusinessRecomendPlaceMap,
|
|
4
4
|
f as BusinessRecomendPlaceMapInner,
|
|
@@ -3,5 +3,5 @@ import { type BusinessRecomendPlaceMapProps } from "../BusinessRecomendPlaceMap"
|
|
|
3
3
|
export interface BusinessReselectPlaceMapProps extends Pick<BusinessRecomendPlaceMapProps, "geoErrorOnceNotificationKey" | "loading" | "fallback" | "log" | "getAvailable" | "getRecomendPlace" | "unavailableTitle" | "emptyTitle" | "queryingTitle" | "recomendDescription" | "disableLocator" | "disableLocatorPhoto" | "mapContext" | "renderPlacePhoto" | "renderPlaceTag" | "onChangeGeoLocation" | "onChangePlace" | "onChangeRecomandPlace" | "onGeoError" | "onGeoErrorOnce" | "onClickLocatorText" | "onClickLocatorPhoto"> {
|
|
4
4
|
defaultPlace?: CoordinatePlace;
|
|
5
5
|
}
|
|
6
|
-
export declare const BusinessReselectPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "
|
|
7
|
-
export declare const BusinessReselectPlaceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "
|
|
6
|
+
export declare const BusinessReselectPlaceMapInner: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "changePlace" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessReselectPlaceMapProps>;
|
|
7
|
+
export declare const BusinessReselectPlaceMap: import("vue-demi").DefineComponent<import("@vue/runtime-core").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "changePlace" | "changeGeoLocation" | "changeRecomandPlace" | "geoError" | "geoErrorOnce" | "clickLocatorText" | "clickLocatorPhoto", BusinessReselectPlaceMapProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { reactive, watch, watchEffect } from "vue-demi";
|
|
2
|
+
import { reactive, watch, watchEffect, onUnmounted } from "vue-demi";
|
|
3
3
|
import { apiMemoryShouldSkipByKey } from "../../api/memory.js";
|
|
4
4
|
import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
|
|
5
5
|
import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
@@ -9,17 +9,18 @@ import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
|
|
|
9
9
|
import { useMapDrag } from "../../hooks/useMapDrag.js";
|
|
10
10
|
import { useMapGeometry } from "../../hooks/useMapGeometry.js";
|
|
11
11
|
import { useMapRecomendPlace } from "../../hooks/useMapRecomendPlace.js";
|
|
12
|
-
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
12
|
+
import { useMapAssertSupplier, useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
13
13
|
import { useMapZoom } from "../../hooks/useMapZoom.js";
|
|
14
14
|
import { defineSetup, defineLagecySetup } from "../../types/helper.js";
|
|
15
15
|
import { CenterPlaceStatus } from "../../types/interface.js";
|
|
16
|
+
import { throwNoneManualAbortError, MANUAL_ABORT_MESSAGE } from "../../utils/ManualAbortError.js";
|
|
16
17
|
import { watchPostEffectOnce, generateCreateElementV2PropsOn } from "../../utils/compare.js";
|
|
17
18
|
import { equalAssign, isPlacesInclude } from "../../utils/helper.js";
|
|
18
19
|
import { detectBrowserPlatform } from "../../utils/platform.js";
|
|
19
20
|
import { place2point, isPlaceEqual, pipeOnlyLastEffect, isZoneEqual, geoPositionError2businessTimeout } from "../../utils/transform.js";
|
|
20
21
|
import { toCoordinatePlaceType, toCoordinatePointType, toCoordinateRecommendZonePlacesType } from "../../utils/typeChecking.js";
|
|
21
22
|
import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
22
|
-
import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_LARGE_LIMIT, a as RECOMMEND_PLACE_DRAG_LIMIT, Z as ZONE_ZOOM, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM } from "../../chunks/BusinessRecomendPlaceMap.
|
|
23
|
+
import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_LARGE_LIMIT, a as RECOMMEND_PLACE_DRAG_LIMIT, Z as ZONE_ZOOM, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM } from "../../chunks/BusinessRecomendPlaceMap.f589ebf7.js";
|
|
23
24
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
24
25
|
import { GreenZone } from "../GreenZone/GreenZone.js";
|
|
25
26
|
import { PassengerCircle } from "../PassengerCircle/PassengerCircle.js";
|
|
@@ -41,6 +42,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
41
42
|
...EMPTY_PLACE
|
|
42
43
|
}
|
|
43
44
|
} = props;
|
|
45
|
+
const abortController = new AbortController();
|
|
44
46
|
const {
|
|
45
47
|
coordinatifyPoint,
|
|
46
48
|
unCoordinatifyPoint,
|
|
@@ -68,6 +70,9 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
68
70
|
mapRef,
|
|
69
71
|
defaultValue: DEFAULT_ZOOM
|
|
70
72
|
});
|
|
73
|
+
const {
|
|
74
|
+
assertSupplier
|
|
75
|
+
} = useMapAssertSupplier();
|
|
71
76
|
const defaultPlace = unCoordinatifyPlace(toCoordinatePlaceType(inputDefaultPlace));
|
|
72
77
|
const centerPlace = reactive({
|
|
73
78
|
lng: defaultPlace.lng,
|
|
@@ -148,19 +153,19 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
148
153
|
emitGeoErrorOnce(error);
|
|
149
154
|
}
|
|
150
155
|
});
|
|
151
|
-
mapContext.apiMapDistance = (from, to) => {
|
|
156
|
+
mapContext.apiMapDistance = assertSupplier((from, to) => {
|
|
152
157
|
return apiMapDistance(unCoordinatifyPoint(toCoordinatePointType(from)), unCoordinatifyPoint(toCoordinatePointType(to)));
|
|
153
|
-
};
|
|
154
|
-
mapContext.setCenterPlaceByUserSpecified = setCenterPlaceByUserSpecified;
|
|
155
|
-
mapContext.setCenterPlaceByUserSpecifiedInZone = setCenterPlaceByUserSpecifiedInZone;
|
|
156
|
-
mapContext.panToGeoPositionByRecomend = () => {
|
|
158
|
+
});
|
|
159
|
+
mapContext.setCenterPlaceByUserSpecified = assertSupplier(setCenterPlaceByUserSpecified);
|
|
160
|
+
mapContext.setCenterPlaceByUserSpecifiedInZone = assertSupplier(setCenterPlaceByUserSpecifiedInZone);
|
|
161
|
+
mapContext.panToGeoPositionByRecomend = assertSupplier(() => {
|
|
157
162
|
if (geoError.value)
|
|
158
163
|
return false;
|
|
159
164
|
updateCenterPlaceByPoint(geoPosition.value, {
|
|
160
165
|
source: "geo"
|
|
161
166
|
});
|
|
162
167
|
return true;
|
|
163
|
-
};
|
|
168
|
+
});
|
|
164
169
|
const {
|
|
165
170
|
isDragging
|
|
166
171
|
} = useMapDrag({
|
|
@@ -183,6 +188,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
183
188
|
emptyPlaceName: emptyTitle,
|
|
184
189
|
queryingPlaceName: queryingTitle,
|
|
185
190
|
context: centerSource,
|
|
191
|
+
signal: abortController.signal,
|
|
186
192
|
getAvailable: pipedGetAvailable,
|
|
187
193
|
getRecomendPlace: pipedGetRecomendPlace,
|
|
188
194
|
getLimit: (context) => {
|
|
@@ -202,7 +208,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
202
208
|
...place
|
|
203
209
|
}),
|
|
204
210
|
onChangePlace: (place) => emit("changePlace", coordinatifyPlace(place)),
|
|
205
|
-
onChange:
|
|
211
|
+
onChange: ({
|
|
206
212
|
place,
|
|
207
213
|
inputPlace,
|
|
208
214
|
isInZone,
|
|
@@ -224,7 +230,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
224
230
|
}));
|
|
225
231
|
}
|
|
226
232
|
});
|
|
227
|
-
watchPostEffectOnce(() => updateRecommendPlaceOnlyInZone(defaultPlace));
|
|
233
|
+
watchPostEffectOnce(() => updateRecommendPlaceOnlyInZone(defaultPlace).catch(throwNoneManualAbortError));
|
|
228
234
|
watch(centerPlace, (place) => {
|
|
229
235
|
equalAssign(mapContext.centerPlace, coordinatifyPlace({
|
|
230
236
|
...place
|
|
@@ -236,6 +242,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
236
242
|
watchEffect(() => {
|
|
237
243
|
mapContext.centerPlaceStatusRef.value = isQueryingRef.value ? CenterPlaceStatus.QUERYING_INFO : !availableRef.value ? CenterPlaceStatus.SERVICE_UNAVAILABLE : CenterPlaceStatus.OK;
|
|
238
244
|
});
|
|
245
|
+
onUnmounted(() => abortController.abort(MANUAL_ABORT_MESSAGE));
|
|
239
246
|
return () => {
|
|
240
247
|
var _a, _b, _c;
|
|
241
248
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { ref, watch } from "vue-demi";
|
|
2
|
+
import { ref, watch, onUnmounted } from "vue-demi";
|
|
3
3
|
import { apiGetAuxiliaryGrapStatus } from "../../api/browser.js";
|
|
4
4
|
import { setGlobalGoogleSnapRoadProxyUrl } from "../../api/googleSnapRoad.js";
|
|
5
5
|
import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
|
|
@@ -8,9 +8,10 @@ import { useGeoLocation } from "../../hooks/useGeoLocation.js";
|
|
|
8
8
|
import { useHeycarMap } from "../../hooks/useHeycarMap.js";
|
|
9
9
|
import { useMapCoordinatify } from "../../hooks/useMapCoordinatify.js";
|
|
10
10
|
import { useMapFitView } from "../../hooks/useMapFitView.js";
|
|
11
|
-
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
11
|
+
import { useMapAssertSupplier, useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
12
12
|
import { defineSetup, defineLagecySetup } from "../../types/helper.js";
|
|
13
|
-
import {
|
|
13
|
+
import { MANUAL_ABORT_MESSAGE } from "../../utils/ManualAbortError.js";
|
|
14
|
+
import { createAbortable, assertNotEmptyArray } from "../../utils/helper.js";
|
|
14
15
|
import { place2point, pipeDefer, lnglat2point } from "../../utils/transform.js";
|
|
15
16
|
import { toCoordinatePlaceType, toCoordinateTrackPoint } from "../../utils/typeChecking.js";
|
|
16
17
|
import { AuxiliaryGraspRoad } from "../AuxiliaryGraspRoad/AuxiliaryGraspRoad.js";
|
|
@@ -26,7 +27,6 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
26
27
|
interval,
|
|
27
28
|
disablePassenger,
|
|
28
29
|
mapContext,
|
|
29
|
-
getDriverPositionTrack,
|
|
30
30
|
renderStartSerivceTitle,
|
|
31
31
|
renderInServiceTitle
|
|
32
32
|
} = props;
|
|
@@ -36,6 +36,12 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
36
36
|
setMap,
|
|
37
37
|
mapElementRef
|
|
38
38
|
} = useHeycarMap();
|
|
39
|
+
const {
|
|
40
|
+
assertSupplier
|
|
41
|
+
} = useMapAssertSupplier();
|
|
42
|
+
const abortController = new AbortController();
|
|
43
|
+
const abortable = createAbortable(abortController.signal);
|
|
44
|
+
const getDriverPositionTrack = abortable(props.getDriverPositionTrack);
|
|
39
45
|
const {
|
|
40
46
|
unCoordinatifyPlace,
|
|
41
47
|
unCoordinatifyTrackPoint
|
|
@@ -47,7 +53,7 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
47
53
|
mapRef,
|
|
48
54
|
padding: BUSINESS_TAXI_SERVICE_FITVIEW_PANDING
|
|
49
55
|
});
|
|
50
|
-
mapContext.setFitView = () => setFitView(false);
|
|
56
|
+
mapContext.setFitView = assertSupplier(() => setFitView(false));
|
|
51
57
|
const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
|
|
52
58
|
const {
|
|
53
59
|
geoLoading,
|
|
@@ -79,6 +85,7 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
79
85
|
}, {
|
|
80
86
|
immediate: true
|
|
81
87
|
});
|
|
88
|
+
onUnmounted(() => abortController.abort(MANUAL_ABORT_MESSAGE));
|
|
82
89
|
return () => {
|
|
83
90
|
const {
|
|
84
91
|
driverStatus,
|
package/dist/v2/chunks/{BusinessRecomendPlaceMap.5be4fdcf.js → BusinessRecomendPlaceMap.f589ebf7.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
|
-
import { computed, watch, watchEffect } from "vue-demi";
|
|
2
|
+
import { computed, watch, watchEffect, onUnmounted } from "vue-demi";
|
|
3
3
|
import { apiSaveCenterPlaceToCache } from "../api/browser.js";
|
|
4
4
|
import { apiMemoryShouldSkipByKey } from "../api/memory.js";
|
|
5
5
|
import { HeycarMap } from "../components/MapProvider/MapProvider.js";
|
|
@@ -10,10 +10,11 @@ import { useMapCoordinatify } from "../hooks/useMapCoordinatify.js";
|
|
|
10
10
|
import { useMapDrag } from "../hooks/useMapDrag.js";
|
|
11
11
|
import { useMapGeometry } from "../hooks/useMapGeometry.js";
|
|
12
12
|
import { useMapRecomendPlace } from "../hooks/useMapRecomendPlace.js";
|
|
13
|
-
import { useMapSupplier } from "../hooks/useMapSupplier.js";
|
|
13
|
+
import { useMapSupplier, useMapAssertSupplier } from "../hooks/useMapSupplier.js";
|
|
14
14
|
import { useMapZoom } from "../hooks/useMapZoom.js";
|
|
15
15
|
import { defineSetup, defineLagecySetup } from "../types/helper.js";
|
|
16
16
|
import { CenterPlaceStatus } from "../types/interface.js";
|
|
17
|
+
import { throwNoneManualAbortError, MANUAL_ABORT_MESSAGE } from "../utils/ManualAbortError.js";
|
|
17
18
|
import { watchPostEffectOnce, generateCreateElementV2PropsOn } from "../utils/compare.js";
|
|
18
19
|
import { equalAssign, isPlacesInclude } from "../utils/helper.js";
|
|
19
20
|
import { detectBrowserPlatform } from "../utils/platform.js";
|
|
@@ -286,6 +287,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
286
287
|
getRecomendPlace,
|
|
287
288
|
mapContext
|
|
288
289
|
} = props;
|
|
290
|
+
const abortController = new AbortController();
|
|
289
291
|
const {
|
|
290
292
|
coordinatifyPoint,
|
|
291
293
|
unCoordinatifyPoint,
|
|
@@ -316,6 +318,9 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
316
318
|
const {
|
|
317
319
|
readyPromise
|
|
318
320
|
} = useMapSupplier();
|
|
321
|
+
const {
|
|
322
|
+
assertSupplier
|
|
323
|
+
} = useMapAssertSupplier();
|
|
319
324
|
const {
|
|
320
325
|
centerPlace,
|
|
321
326
|
isFirstLoad,
|
|
@@ -418,19 +423,19 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
418
423
|
emitGeoErrorOnce(error);
|
|
419
424
|
}
|
|
420
425
|
});
|
|
421
|
-
mapContext.apiMapDistance = (from, to) => {
|
|
426
|
+
mapContext.apiMapDistance = assertSupplier((from, to) => {
|
|
422
427
|
return apiMapDistance(unCoordinatifyPoint(toCoordinatePointType(from)), unCoordinatifyPoint(toCoordinatePointType(to)));
|
|
423
|
-
};
|
|
424
|
-
mapContext.setCenterPlaceByUserSpecified = setCenterPlaceByUserSpecified;
|
|
425
|
-
mapContext.setCenterPlaceByUserSpecifiedInZone = setCenterPlaceByUserSpecifiedInZone;
|
|
426
|
-
mapContext.panToGeoPositionByRecomend = () => {
|
|
428
|
+
});
|
|
429
|
+
mapContext.setCenterPlaceByUserSpecified = assertSupplier(setCenterPlaceByUserSpecified);
|
|
430
|
+
mapContext.setCenterPlaceByUserSpecifiedInZone = assertSupplier(setCenterPlaceByUserSpecifiedInZone);
|
|
431
|
+
mapContext.panToGeoPositionByRecomend = assertSupplier(() => {
|
|
427
432
|
if (geoError.value)
|
|
428
433
|
return false;
|
|
429
434
|
updateCenterPlaceByPoint(geoPosition.value, {
|
|
430
435
|
source: "geo"
|
|
431
436
|
});
|
|
432
437
|
return true;
|
|
433
|
-
};
|
|
438
|
+
});
|
|
434
439
|
const {
|
|
435
440
|
isDragging
|
|
436
441
|
} = useMapDrag({
|
|
@@ -454,6 +459,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
454
459
|
emptyPlaceName: emptyTitle,
|
|
455
460
|
queryingPlaceName: queryingTitle,
|
|
456
461
|
context: centerSource,
|
|
462
|
+
signal: abortController.signal,
|
|
457
463
|
getAvailable: pipedGetAvailable,
|
|
458
464
|
getRecomendPlace: pipedGetRecomendPlace,
|
|
459
465
|
getLimit: (context) => {
|
|
@@ -473,7 +479,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
473
479
|
...place
|
|
474
480
|
}),
|
|
475
481
|
onChangePlace: (place) => emit("changePlace", coordinatifyPlace(place)),
|
|
476
|
-
onChange:
|
|
482
|
+
onChange: ({
|
|
477
483
|
place,
|
|
478
484
|
inputPlace,
|
|
479
485
|
isInZone,
|
|
@@ -498,7 +504,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
498
504
|
const centerPlaceStatusRef = computed(() => isFirstLoad && geoLoading.value ? CenterPlaceStatus.GEO_LOADING : isQueryingRef.value ? CenterPlaceStatus.QUERYING_INFO : !availableRef.value ? CenterPlaceStatus.SERVICE_UNAVAILABLE : CenterPlaceStatus.OK);
|
|
499
505
|
watchPostEffectOnce(() => {
|
|
500
506
|
if (!isFirstLoad)
|
|
501
|
-
updateRecommendPlaceOnlyInZone(defaultCenterPlace);
|
|
507
|
+
updateRecommendPlaceOnlyInZone(defaultCenterPlace).catch(throwNoneManualAbortError);
|
|
502
508
|
});
|
|
503
509
|
watch(centerPlace, (place) => {
|
|
504
510
|
if (centerPlaceStatusRef.value === CenterPlaceStatus.OK) {
|
|
@@ -516,6 +522,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
516
522
|
watchEffect(() => {
|
|
517
523
|
mapContext.centerPlaceStatusRef.value = centerPlaceStatusRef.value;
|
|
518
524
|
});
|
|
525
|
+
onUnmounted(() => abortController.abort(MANUAL_ABORT_MESSAGE));
|
|
519
526
|
return () => {
|
|
520
527
|
var _a, _b, _c;
|
|
521
528
|
const {
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import "../css/Loading-
|
|
1
|
+
import "../css/Loading-0e058b68.css";
|
|
2
2
|
import { h } from "vue";
|
|
3
|
+
import { ICON_LOAD_FAILED_URL } from "../api/cdn.js";
|
|
3
4
|
import { AbsoluteAddressBox } from "../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
4
5
|
import { defineSetup } from "../types/helper.js";
|
|
5
6
|
const imgGrid = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzg1IiBoZWlnaHQ9IjgxNyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBzdHJva2U9IiNEOERCRTIiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWRhc2hhcnJheT0iMSI+PHBhdGggZD0iTS41IDgxN1YwTTI0LjUgODE3VjBNNDguNSA4MTdWME03Mi41IDgxN1YwTTk2LjUgODE3VjBNMTIwLjUgODE3VjBNMTQ0LjUgODE3VjBNMTY4LjUgODE3VjBNMTkyLjUgODE3VjBNMjE2LjUgODE3VjBNMjQwLjUgODE3VjBNMjY0LjUgODE3VjBNMjg4LjUgODE3VjBNMzEyLjUgODE3VjBNMzM2LjUgODE3VjBNMzYwLjUgODE3VjBNMzg0LjUgODE3VjBNMCAuNWgzODVNMCAyNC41aDM4NU0wIDQ4LjVoMzg1TTAgNzIuNWgzODVNMCA5Ni41aDM4NU0wIDEyMC41aDM4NU0wIDE0NC41aDM4NU0wIDE2OC41aDM4NU0wIDE5Mi41aDM4NU0wIDIxNi41aDM4NU0wIDI0MC41aDM4NU0wIDI2NC41aDM4NU0wIDI4OC41aDM4NU0wIDMxMi41aDM4NU0wIDMzNi41aDM4NU0wIDM2MC41aDM4NU0wIDM4NC41aDM4NU0wIDQwOC41aDM4NU0wIDQzMi41aDM4NU0wIDQ1Ni41aDM4NU0wIDQ4MC41aDM4NU0wIDUwNC41aDM4NU0wIDUyOC41aDM4NU0wIDU1Mi41aDM4NU0wIDU3Ni41aDM4NU0wIDYwMC41aDM4NU0wIDYyNC41aDM4NU0wIDY0OC41aDM4NU0wIDY3Mi41aDM4NU0wIDY5Ni41aDM4NU0wIDcyMC41aDM4NU0wIDc0NC41aDM4NU0wIDc2OC41aDM4NU0wIDc5Mi41aDM4NU0wIDgxNi41aDM4NSIvPjwvZz48L3N2Zz4=";
|
|
6
7
|
const Loading_css_ts_vanilla = "";
|
|
8
|
+
var description = "_17ify496";
|
|
9
|
+
var iconLayout = "_17ify492";
|
|
10
|
+
var iconLoadFailed = "_17ify493";
|
|
7
11
|
var loadingBg = "_17ify491";
|
|
8
12
|
var loadingLayout = "_17ify490";
|
|
13
|
+
var textLayout = "_17ify494";
|
|
14
|
+
var title = "_17ify495";
|
|
9
15
|
const Loading = defineSetup("Loading", function() {
|
|
10
16
|
return () => h("div", {
|
|
11
17
|
"class": loadingLayout
|
|
@@ -21,7 +27,31 @@ const Loading = defineSetup("Loading", function() {
|
|
|
21
27
|
}
|
|
22
28
|
})]);
|
|
23
29
|
});
|
|
30
|
+
const LoadFailed = defineSetup("LoadFailed", function(props) {
|
|
31
|
+
return () => h("div", {
|
|
32
|
+
"class": loadingLayout
|
|
33
|
+
}, [h("img", {
|
|
34
|
+
"class": loadingBg,
|
|
35
|
+
"attrs": {
|
|
36
|
+
"src": imgGrid
|
|
37
|
+
}
|
|
38
|
+
}), h("div", {
|
|
39
|
+
"class": iconLayout
|
|
40
|
+
}, [h("img", {
|
|
41
|
+
"class": iconLoadFailed,
|
|
42
|
+
"attrs": {
|
|
43
|
+
"src": ICON_LOAD_FAILED_URL
|
|
44
|
+
}
|
|
45
|
+
}), h("div", {
|
|
46
|
+
"class": textLayout
|
|
47
|
+
}, [h("span", {
|
|
48
|
+
"class": title
|
|
49
|
+
}, [props.title]), h("span", {
|
|
50
|
+
"class": description
|
|
51
|
+
}, [props.description])])])]);
|
|
52
|
+
});
|
|
24
53
|
export {
|
|
25
54
|
Loading as L,
|
|
55
|
+
LoadFailed as a,
|
|
26
56
|
imgGrid as i
|
|
27
57
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { i as isObject, d as debounce } from "./debounce.5afe7867.js";
|
|
2
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
3
|
+
function throttle(func, wait, options) {
|
|
4
|
+
var leading = true, trailing = true;
|
|
5
|
+
if (typeof func != "function") {
|
|
6
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
7
|
+
}
|
|
8
|
+
if (isObject(options)) {
|
|
9
|
+
leading = "leading" in options ? !!options.leading : leading;
|
|
10
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
11
|
+
}
|
|
12
|
+
return debounce(func, wait, {
|
|
13
|
+
"leading": leading,
|
|
14
|
+
"maxWait": wait,
|
|
15
|
+
"trailing": trailing
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
throttle as t
|
|
20
|
+
};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export declare const loadingLayout: string;
|
|
2
2
|
export declare const loadingBg: string;
|
|
3
|
+
export declare const iconLayout: string;
|
|
4
|
+
export declare const iconLoadFailed: string;
|
|
5
|
+
export declare const textLayout: string;
|
|
6
|
+
export declare const title: string;
|
|
7
|
+
export declare const description: string;
|
|
@@ -1 +1,7 @@
|
|
|
1
1
|
export declare const Loading: import("vue").DefineComponent<import("vue3").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
|
+
interface LoadFailedProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const LoadFailed: import("vue").DefineComponent<import("vue3").ComponentObjectPropsOptions<LoadFailedProps>, 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<LoadFailedProps, Required<LoadFailedProps>>, never, LoadFailedProps>;
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
import
|
|
2
|
+
import "../../api/cdn.js";
|
|
3
|
+
import { a, L } from "../../chunks/Loading.da68a2a6.js";
|
|
3
4
|
import "../../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
4
5
|
import "../../types/helper.js";
|
|
5
6
|
export {
|
|
7
|
+
a as LoadFailed,
|
|
6
8
|
L as Loading
|
|
7
9
|
};
|