@heycar/heycars-map 2.13.0-relay1 → 2.14.0-walkOptimize1
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 +35 -0
- package/dist/v2/api/cdn.d.ts +1 -2
- package/dist/v2/api/cdn.js +1 -3
- package/dist/v2/api/contants.d.ts +3 -0
- package/dist/v2/api/contants.js +6 -0
- package/dist/v2/business-components/AbsoluteAddressBox/AbsoluteAddressBox.js +7 -1
- package/dist/v2/business-components/AuxiliaryPassanger/AuxiliaryPassanger.d.ts +6 -0
- package/dist/v2/business-components/AuxiliaryPassanger/AuxiliaryPassanger.js +50 -0
- package/dist/v2/business-components/AuxiliaryPassanger/index.d.ts +1 -0
- package/dist/v2/business-components/AuxiliaryPassanger/index.js +4 -0
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +6 -0
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +1 -3
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.d.ts +4 -1
- package/dist/v2/business-components/StartEndPoint/StartEndPoint.js +20 -5
- package/dist/v2/business-components/TaxiCar/TaxiCar.d.ts +1 -0
- package/dist/v2/business-components/TaxiCar/TaxiCar.js +16 -5
- package/dist/v2/chunks/{Loading.96f573fe.js → Loading.70dfc720.js} +7 -1
- package/dist/v2/components/Loading/Loading.d.ts +1 -0
- package/dist/v2/components/Loading/Loading.js +2 -1
- package/dist/v2/components/Loading/index.js +1 -1
- package/dist/v2/components/MapProvider/MapProvider.js +1 -1
- package/dist/v2/hooks/useMapGeometry.d.ts +3 -3
- package/dist/v2/hooks/useMapGeometry.js +3 -3
- package/dist/v2/hooks/useWalkingRoute.js +46 -4
- package/dist/v2/types/interface.d.ts +7 -0
- package/dist/v2/utils/geometry.d.ts +1 -0
- package/dist/v2/utils/geometry.js +4 -2
- package/dist/v2/utils/geometryPolygon.d.ts +5 -0
- package/dist/v2/utils/geometryPolygon.js +27 -0
- package/dist/v2/utils/log.js +11 -3
- package/dist/v2/utils/ttlCache.d.ts +34 -0
- package/dist/v2/utils/ttlCache.js +64 -0
- package/dist/v3/api/cdn.d.ts +1 -2
- package/dist/v3/api/cdn.js +1 -3
- package/dist/v3/api/contants.d.ts +3 -0
- package/dist/v3/api/contants.js +6 -0
- package/dist/v3/business-components/AbsoluteAddressBox/AbsoluteAddressBox.js +7 -1
- package/dist/v3/business-components/AuxiliaryPassanger/AuxiliaryPassanger.d.ts +8 -0
- package/dist/v3/business-components/AuxiliaryPassanger/AuxiliaryPassanger.js +46 -0
- package/dist/v3/business-components/AuxiliaryPassanger/index.d.ts +1 -0
- package/dist/v3/business-components/AuxiliaryPassanger/index.js +4 -0
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +4 -0
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.js +1 -3
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.d.ts +4 -1
- package/dist/v3/business-components/StartEndPoint/StartEndPoint.js +20 -5
- package/dist/v3/business-components/TaxiCar/TaxiCar.d.ts +1 -0
- package/dist/v3/business-components/TaxiCar/TaxiCar.js +16 -5
- package/dist/v3/chunks/{Loading.8c26ab6c.js → Loading.4c949ec9.js} +7 -1
- package/dist/v3/components/Loading/Loading.d.ts +1 -0
- package/dist/v3/components/Loading/Loading.js +2 -1
- package/dist/v3/components/Loading/index.js +1 -1
- package/dist/v3/components/MapProvider/MapProvider.js +1 -1
- package/dist/v3/hooks/useMapGeometry.d.ts +3 -3
- package/dist/v3/hooks/useMapGeometry.js +3 -3
- package/dist/v3/hooks/useWalkingRoute.js +46 -4
- package/dist/v3/types/interface.d.ts +7 -0
- package/dist/v3/utils/geometry.d.ts +1 -0
- package/dist/v3/utils/geometry.js +4 -2
- package/dist/v3/utils/geometryPolygon.d.ts +5 -0
- package/dist/v3/utils/geometryPolygon.js +27 -0
- package/dist/v3/utils/log.js +11 -3
- package/dist/v3/utils/ttlCache.d.ts +34 -0
- package/dist/v3/utils/ttlCache.js +64 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ export declare const findClosestPointInSegment: (point: Point, segment: [Point,
|
|
|
4
4
|
export declare const findClosestPointInLine: (point: Point, path: Point[], distanceFn: DistanceFn) => {
|
|
5
5
|
point: Point;
|
|
6
6
|
distance: number;
|
|
7
|
+
index: number;
|
|
7
8
|
};
|
|
8
9
|
export declare const isPointInSegment: (point: Point, segment: [Point, Point]) => boolean;
|
|
9
10
|
export declare const isPointInHalfOpenSegment: (point: Point, segment: [Point, Point]) => boolean;
|
|
@@ -23,9 +23,10 @@ const findClosestPointInLine = (point, path, distanceFn) => {
|
|
|
23
23
|
var _a, _b;
|
|
24
24
|
let min = Infinity;
|
|
25
25
|
let target;
|
|
26
|
+
let idx;
|
|
26
27
|
assertPropNoEmptyArray(path, "findClosestPointInLine", "path");
|
|
27
28
|
if (path.length === 1)
|
|
28
|
-
return { point: path[0], distance: (_a = distanceFn(point, path[0])) != null ? _a : 0 };
|
|
29
|
+
return { point: path[0], distance: (_a = distanceFn(point, path[0])) != null ? _a : 0, index: 0 };
|
|
29
30
|
for (let index = 0; index < path.length - 1; index++) {
|
|
30
31
|
const closestPoint = findClosestPointInSegment(point, [path[index], path[index + 1]]);
|
|
31
32
|
const distance = (_b = distanceFn(point, closestPoint)) != null ? _b : 0;
|
|
@@ -33,8 +34,9 @@ const findClosestPointInLine = (point, path, distanceFn) => {
|
|
|
33
34
|
continue;
|
|
34
35
|
target = closestPoint;
|
|
35
36
|
min = distance;
|
|
37
|
+
idx = index;
|
|
36
38
|
}
|
|
37
|
-
return { point: target, distance: min };
|
|
39
|
+
return { point: target, distance: min, index: idx };
|
|
38
40
|
};
|
|
39
41
|
const floatEqual = (x1, x2) => {
|
|
40
42
|
return Math.abs(x1 - x2) < 1e4 * Number.EPSILON;
|
|
@@ -4,3 +4,8 @@ import type { Point } from "../types/interface";
|
|
|
4
4
|
* @returns 1 在内部, 0 边界上 , -1 在外部
|
|
5
5
|
*/
|
|
6
6
|
export declare function pointInPolygon(point: Point, polygon: Point[]): 1 | 0 | -1;
|
|
7
|
+
export declare const distanceBetweenTwoPoints: (from: Point, to: Point) => number;
|
|
8
|
+
/**
|
|
9
|
+
* 计算折线(按顺序连接各点)总长度。
|
|
10
|
+
*/
|
|
11
|
+
export declare const computeLineLength: (line: Point[]) => number;
|
|
@@ -22,6 +22,33 @@ function pointInPolygon(point, polygon) {
|
|
|
22
22
|
}
|
|
23
23
|
return inside ? 1 : -1;
|
|
24
24
|
}
|
|
25
|
+
const distanceBetweenTwoPoints = (from, to) => {
|
|
26
|
+
const [lng1, lat1] = from;
|
|
27
|
+
const [lng2, lat2] = to;
|
|
28
|
+
if (lng1 === lng2 && lat1 === lat2)
|
|
29
|
+
return 0;
|
|
30
|
+
const toRad = (deg) => deg * Math.PI / 180;
|
|
31
|
+
const R = 6378137;
|
|
32
|
+
const phi1 = toRad(lat1);
|
|
33
|
+
const phi2 = toRad(lat2);
|
|
34
|
+
const dPhi = toRad(lat2 - lat1);
|
|
35
|
+
const dLambda = toRad(lng2 - lng1);
|
|
36
|
+
const a = Math.sin(dPhi / 2) * Math.sin(dPhi / 2) + Math.cos(phi1) * Math.cos(phi2) * Math.sin(dLambda / 2) * Math.sin(dLambda / 2);
|
|
37
|
+
const c = 2 * Math.asin(Math.min(1, Math.sqrt(a)));
|
|
38
|
+
return R * c;
|
|
39
|
+
};
|
|
40
|
+
const computeLineLength = (line) => {
|
|
41
|
+
var _a;
|
|
42
|
+
if (!Array.isArray(line) || line.length < 2)
|
|
43
|
+
return 0;
|
|
44
|
+
let totalLength = 0;
|
|
45
|
+
for (let i = 1; i < line.length; i++) {
|
|
46
|
+
totalLength += (_a = distanceBetweenTwoPoints(line[i - 1], line[i])) != null ? _a : 0;
|
|
47
|
+
}
|
|
48
|
+
return totalLength;
|
|
49
|
+
};
|
|
25
50
|
export {
|
|
51
|
+
computeLineLength,
|
|
52
|
+
distanceBetweenTwoPoints,
|
|
26
53
|
pointInPolygon
|
|
27
54
|
};
|
package/dist/v2/utils/log.js
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.
|
|
3
|
+
const pkgVersion = "2.14.0-walkOptimize1";
|
|
4
|
+
const spaceLogSessionKey = "wiajlf;jwiatitruiq3jrlw";
|
|
5
|
+
const enableSessionLogKey = (key) => {
|
|
6
|
+
const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
|
|
7
|
+
sessionParam.set(`log-${key}`, "true");
|
|
8
|
+
sessionStorage.setItem(spaceLogSessionKey, sessionParam.toString());
|
|
9
|
+
};
|
|
4
10
|
const isEnableLog = (name) => {
|
|
5
11
|
const searchParam = new URLSearchParams(location.search);
|
|
6
|
-
|
|
12
|
+
const sessionParam = new URLSearchParams(sessionStorage.getItem(spaceLogSessionKey) || void 0);
|
|
13
|
+
return searchParam.has(`log-${name}`) || sessionParam.has(`log-${name}`);
|
|
7
14
|
};
|
|
8
|
-
window.
|
|
15
|
+
window.heycarMapAvailableLogKeys = availableLogKeys;
|
|
16
|
+
window.heycarMapEnableSessionLogKey = enableSessionLogKey;
|
|
9
17
|
const spaceLog = (logKey, ...args) => {
|
|
10
18
|
availableLogKeys.add(logKey);
|
|
11
19
|
if (!isEnableLog(logKey))
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type Milliseconds = number;
|
|
2
|
+
export interface TTLCache<K, V> {
|
|
3
|
+
get(key: K): V | undefined;
|
|
4
|
+
set(key: K, value: V): void;
|
|
5
|
+
delete(key: K): boolean;
|
|
6
|
+
clear(): void;
|
|
7
|
+
entries(): IterableIterator<[K, V]>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 高性能 TTL Cache(固定 TTL,不支持动态变更)。
|
|
11
|
+
* - 仅提供最小接口:get/set/delete/clear/entries
|
|
12
|
+
* - 惰性过期:在访问时清理过期项,无额外定时器
|
|
13
|
+
*/
|
|
14
|
+
export declare function createTTLCache<K, V>(ttlMs: Milliseconds): TTLCache<K, V>;
|
|
15
|
+
/**
|
|
16
|
+
* 异步函数的 TTL 记忆化工厂
|
|
17
|
+
*
|
|
18
|
+
* 命中策略(按顺序):
|
|
19
|
+
* 1. 精确命中:用 `computeKey(args)` 查缓存。
|
|
20
|
+
* 2. 近似命中:用 `selectFromCache(args, entries)` 在当前有效条目中挑选。
|
|
21
|
+
* 3. 未命中:执行原函数,结果写入缓存。
|
|
22
|
+
*
|
|
23
|
+
* 过期策略:惰性按 `ttlMs` 过期;`ttlMs <= 0` 表示不缓存;传 `Infinity` 视为永不过期。
|
|
24
|
+
*
|
|
25
|
+
* 参数:
|
|
26
|
+
* - `ttlMs`:缓存有效期(毫秒)。
|
|
27
|
+
* - `selectFromCache`:近似命中选择器,入参为本次 `args` 与有效缓存条目的迭代器,返回命中值或 `undefined`。
|
|
28
|
+
* - `computeKey`:精确命中的 key 生成函数,默认 `JSON.stringify`。
|
|
29
|
+
*
|
|
30
|
+
* 返回:`memoize(fn)`,将异步函数包装为带缓存的版本。
|
|
31
|
+
*
|
|
32
|
+
* 说明:不做并发合并;仅实现 TTL 驱逐(无容量上限);近似匹配会遍历有效条目。
|
|
33
|
+
*/
|
|
34
|
+
export declare function createMemoizeWithTTL<A extends any[], R>(ttlMs: Milliseconds, selectFromCache: (args: A, cacheEntries: IterableIterator<[A, R]>) => R | undefined, computeKey?: (args: A) => string): (fn: (...args: A) => Promise<R>) => (...args: A) => Promise<R>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function createTTLCache(ttlMs) {
|
|
2
|
+
const store = /* @__PURE__ */ new Map();
|
|
3
|
+
const get = (key) => {
|
|
4
|
+
const record = store.get(key);
|
|
5
|
+
if (!record)
|
|
6
|
+
return void 0;
|
|
7
|
+
const now = Date.now();
|
|
8
|
+
if (record.expireAt !== Infinity && record.expireAt <= now) {
|
|
9
|
+
store.delete(key);
|
|
10
|
+
return void 0;
|
|
11
|
+
}
|
|
12
|
+
return record.value;
|
|
13
|
+
};
|
|
14
|
+
const set = (key, value) => {
|
|
15
|
+
const now = Date.now();
|
|
16
|
+
const expireAt = Number.isFinite(ttlMs) ? now + ttlMs : Infinity;
|
|
17
|
+
if (Number.isFinite(ttlMs) && ttlMs <= 0) {
|
|
18
|
+
store.delete(key);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
store.set(key, { value, expireAt });
|
|
22
|
+
};
|
|
23
|
+
const del = (key) => store.delete(key);
|
|
24
|
+
const clear = () => {
|
|
25
|
+
store.clear();
|
|
26
|
+
};
|
|
27
|
+
function* entries() {
|
|
28
|
+
const now = Date.now();
|
|
29
|
+
for (const [key, record] of store) {
|
|
30
|
+
if (record.expireAt !== Infinity && record.expireAt <= now) {
|
|
31
|
+
store.delete(key);
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
yield [key, record.value];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return { get, set, delete: del, clear, entries };
|
|
38
|
+
}
|
|
39
|
+
function createMemoizeWithTTL(ttlMs, selectFromCache, computeKey = JSON.stringify) {
|
|
40
|
+
const cache = createTTLCache(ttlMs);
|
|
41
|
+
function* cacheEntries() {
|
|
42
|
+
for (const [, record] of cache.entries()) {
|
|
43
|
+
yield [record.args, record.value];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return function memoize(fn) {
|
|
47
|
+
return async function memoizedTTLFn(...args) {
|
|
48
|
+
const key = computeKey(args);
|
|
49
|
+
const direct = cache.get(key);
|
|
50
|
+
if (direct !== void 0)
|
|
51
|
+
return direct.value;
|
|
52
|
+
const hit = selectFromCache(args, cacheEntries());
|
|
53
|
+
if (hit !== void 0)
|
|
54
|
+
return hit;
|
|
55
|
+
const result = await fn(...args);
|
|
56
|
+
cache.set(key, { args, value: result });
|
|
57
|
+
return result;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
createMemoizeWithTTL,
|
|
63
|
+
createTTLCache
|
|
64
|
+
};
|
package/dist/v3/api/cdn.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export declare const AMAP_DEFAULT_MARKER_ICON_URL = "https://webapi.amap.com/theme/v1.3/markers/b/mark_bs.png";
|
|
2
|
-
export declare const ICON_FULL_SCREEN_URL = "https://overseas-oss.heycars.cn/heycar-map/png/fullscreen.png";
|
|
3
2
|
export declare const ICON_START_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/start-point-en.svg";
|
|
4
3
|
export declare const ICON_END_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/end-point-en.svg";
|
|
5
4
|
export declare const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/end-point-zh-TW.svg";
|
|
6
5
|
export declare const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
6
|
export declare const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
7
|
export declare const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
|
9
|
-
export declare const ICON_WAYPOINT_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/waypoint.svg";
|
|
8
|
+
export declare const ICON_WAYPOINT_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/waypoint.svg";
|
package/dist/v3/api/cdn.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
const AMAP_DEFAULT_MARKER_ICON_URL = "https://webapi.amap.com/theme/v1.3/markers/b/mark_bs.png";
|
|
2
|
-
const ICON_FULL_SCREEN_URL = "https://overseas-oss.heycars.cn/heycar-map/png/fullscreen.png";
|
|
3
2
|
const ICON_START_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/start-point-en.svg";
|
|
4
3
|
const ICON_END_POINT_EN_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/end-point-en.svg";
|
|
5
4
|
const ICON_END_POINT_ZH_TW_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/end-point-zh-TW.svg";
|
|
6
5
|
const ICON_TAXI_CAR_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/taxi-car.svg";
|
|
7
6
|
const ICON_DOT_LOADING_URL = "https://overseas-oss.heycars.cn/heycar-map/gif/dot-loading.gif";
|
|
8
7
|
const ICON_LOAD_FAILED_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/load-failed.svg";
|
|
9
|
-
const ICON_WAYPOINT_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/waypoint.svg";
|
|
8
|
+
const ICON_WAYPOINT_URL = "https://overseas-oss.heycars.cn/heycar-map/svg/0.12/waypoint.svg";
|
|
10
9
|
export {
|
|
11
10
|
AMAP_DEFAULT_MARKER_ICON_URL,
|
|
12
11
|
ICON_DOT_LOADING_URL,
|
|
13
12
|
ICON_END_POINT_EN_URL,
|
|
14
13
|
ICON_END_POINT_ZH_TW_URL,
|
|
15
|
-
ICON_FULL_SCREEN_URL,
|
|
16
14
|
ICON_LOAD_FAILED_URL,
|
|
17
15
|
ICON_START_POINT_EN_URL,
|
|
18
16
|
ICON_TAXI_CAR_URL,
|
|
@@ -5,7 +5,10 @@ export declare const ANIMATION_DURATION_FOR_100VW = 100;
|
|
|
5
5
|
export declare const ANIMATION_DURATION_PER_ZOOM = 200;
|
|
6
6
|
export declare const BEIJIN_POINT: Point;
|
|
7
7
|
export declare const MAX_DEVIATION_DISTANCE = 30;
|
|
8
|
+
export declare const MAX_DEVIATION_DISTANCE_WALKING = 5;
|
|
8
9
|
export declare const CAR_DISTANCE_MIN = 20;
|
|
10
|
+
export declare const PASSENGER_DISTANCE_MAX = 2000;
|
|
11
|
+
export declare const PASSENGER_DISTANCE_MIN = 20;
|
|
9
12
|
export declare const ZINDEX_BUBBLE_LAYER = 50;
|
|
10
13
|
export declare const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
11
14
|
export declare const ZINDEX_PLACE_LAYER = 30;
|
package/dist/v3/api/contants.js
CHANGED
|
@@ -4,7 +4,10 @@ const ANIMATION_DURATION_FOR_100VW = 100;
|
|
|
4
4
|
const ANIMATION_DURATION_PER_ZOOM = 200;
|
|
5
5
|
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
6
6
|
const MAX_DEVIATION_DISTANCE = 30;
|
|
7
|
+
const MAX_DEVIATION_DISTANCE_WALKING = 5;
|
|
7
8
|
const CAR_DISTANCE_MIN = 20;
|
|
9
|
+
const PASSENGER_DISTANCE_MAX = 2e3;
|
|
10
|
+
const PASSENGER_DISTANCE_MIN = 20;
|
|
8
11
|
const ZINDEX_BUBBLE_LAYER = 50;
|
|
9
12
|
const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
10
13
|
const ZINDEX_PLACE_LAYER = 30;
|
|
@@ -30,7 +33,10 @@ export {
|
|
|
30
33
|
GET_RECOMMEND_PLACE_TIMEOUT,
|
|
31
34
|
MAX_ANIMATION_DISTANCE_VW,
|
|
32
35
|
MAX_DEVIATION_DISTANCE,
|
|
36
|
+
MAX_DEVIATION_DISTANCE_WALKING,
|
|
33
37
|
MIN_ANIMATION_DURATION,
|
|
38
|
+
PASSENGER_DISTANCE_MAX,
|
|
39
|
+
PASSENGER_DISTANCE_MIN,
|
|
34
40
|
REGEO_TIMEOUT,
|
|
35
41
|
TRACKS_MATCH_MAX_LENGTH,
|
|
36
42
|
ZINDEX_AUXILIARY_GRASP,
|
|
@@ -5,6 +5,7 @@ import { ICON_DOT_LOADING_URL } from "../../api/cdn.js";
|
|
|
5
5
|
import { i as imgAddressLocator } from "../../chunks/address-locator.4acf83cd.js";
|
|
6
6
|
import { i as imgArrowRight } from "../../chunks/arrow-right.2c34874e.js";
|
|
7
7
|
import { SvgInlineWebComponentTag } from "../../components/SvgInline/SvgInline.web-component.js";
|
|
8
|
+
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
8
9
|
import { defineSetup } from "../../types/helper.js";
|
|
9
10
|
import { c as createRuntimeFn } from "../../chunks/vanilla-extract-recipes-createRuntimeFn.esm.bd6fc290.js";
|
|
10
11
|
const imgBubbleRightArc = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAxOCAzMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMCAwaDIuMTMxYTEwIDEwIDAgMDE5LjY5NiA3LjU1MkwxOCAzMkguMDQyTDAgMHoiIGZpbGw9InZhcigtLUhFWUNBUl9NQVBfQ1NTX1ZBUl9BYnNvbHV0ZUFkZHJlc3NCb3hfYm94SGVhZGVyX2JhY2tncm91bmQsICMyNTNFN0EpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=";
|
|
@@ -42,8 +43,13 @@ const MultilineTitle = defineSetup("MultilineTitle", function(props, {
|
|
|
42
43
|
const AbsoluteAddressBox = defineSetup("AbsoluteAddressBox", function(props, {
|
|
43
44
|
emit
|
|
44
45
|
}) {
|
|
46
|
+
var _a;
|
|
45
47
|
const handleClickText = () => emit("clickText");
|
|
46
48
|
const handleClickPhoto = () => emit("clickPhoto");
|
|
49
|
+
const {
|
|
50
|
+
themeVariables
|
|
51
|
+
} = useMapSupplier();
|
|
52
|
+
const iconLoading = (_a = themeVariables == null ? void 0 : themeVariables.ICON_DOT_LOADING_URL) != null ? _a : ICON_DOT_LOADING_URL;
|
|
47
53
|
return () => {
|
|
48
54
|
const {
|
|
49
55
|
type,
|
|
@@ -67,7 +73,7 @@ const AbsoluteAddressBox = defineSetup("AbsoluteAddressBox", function(props, {
|
|
|
67
73
|
"onClick": handleClickText
|
|
68
74
|
}, [createVNode("img", {
|
|
69
75
|
"class": imgDotLoading,
|
|
70
|
-
"src":
|
|
76
|
+
"src": iconLoading
|
|
71
77
|
}, null)]), createVNode("i", {
|
|
72
78
|
"class": straightLine
|
|
73
79
|
}, null)]);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DriverStatus, Point } from "../../types/interface";
|
|
2
|
+
export interface AuxiliaryPassangerProps {
|
|
3
|
+
status: DriverStatus;
|
|
4
|
+
passengerPosition?: Point;
|
|
5
|
+
}
|
|
6
|
+
export declare const AuxiliaryPassanger: import("vue-demi").DefineComponent<import("vue-demi").ComponentObjectPropsOptions<AuxiliaryPassangerProps>, 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<AuxiliaryPassangerProps, Required<AuxiliaryPassangerProps>>, never, import("vue-demi").PublicProps, AuxiliaryPassangerProps, AuxiliaryPassangerProps, import("vue-demi").SlotsType<{} & {
|
|
7
|
+
default?: import("../../demi-polyfill").Slot | undefined;
|
|
8
|
+
}>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createVNode } from "vue";
|
|
2
|
+
import { ref } from "vue-demi";
|
|
3
|
+
import { MAX_DEVIATION_DISTANCE_WALKING } from "../../api/contants.js";
|
|
4
|
+
import { defineSetup } from "../../types/helper.js";
|
|
5
|
+
import { watchEffectForDeepOption } from "../../utils/compare.js";
|
|
6
|
+
import { AuxiliaryCircle } from "../AuxiliaryCircle/AuxiliaryCircle.js";
|
|
7
|
+
import { AuxiliaryLine } from "../AuxiliaryLine/AuxiliaryLine.js";
|
|
8
|
+
const usePositionHistory = (source, capacity) => {
|
|
9
|
+
const history = ref([]);
|
|
10
|
+
watchEffectForDeepOption(source, (point) => {
|
|
11
|
+
if (!point)
|
|
12
|
+
return;
|
|
13
|
+
history.value.push([...point]);
|
|
14
|
+
if (history.value.length > capacity) {
|
|
15
|
+
history.value.shift();
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return history;
|
|
19
|
+
};
|
|
20
|
+
const AuxiliaryPassanger = defineSetup("AuxiliaryPassanger", function(props) {
|
|
21
|
+
const passengerPositionHistory = usePositionHistory(() => props.passengerPosition, 20);
|
|
22
|
+
return () => {
|
|
23
|
+
const {
|
|
24
|
+
status,
|
|
25
|
+
passengerPosition
|
|
26
|
+
} = props;
|
|
27
|
+
console.log("passengerPositionHistory = ", passengerPositionHistory.value);
|
|
28
|
+
const prevPositions = passengerPositionHistory.value.slice(0, -1);
|
|
29
|
+
if (status !== "assign" && status !== "confirmed" && status !== "driverStartRelayService" && status !== "dispatched" && status !== "driverStartService" && status !== "book-driverStartService" && status !== "book-dispatched" && status !== "driverArrived")
|
|
30
|
+
return;
|
|
31
|
+
return createVNode("div", null, [!!passengerPosition && createVNode(AuxiliaryCircle, {
|
|
32
|
+
"center": passengerPosition,
|
|
33
|
+
"radius": MAX_DEVIATION_DISTANCE_WALKING,
|
|
34
|
+
"opacity": 0.2
|
|
35
|
+
}, null), prevPositions.length > 0 && createVNode(AuxiliaryLine, {
|
|
36
|
+
"path": prevPositions,
|
|
37
|
+
"type": "circle",
|
|
38
|
+
"color": "purple",
|
|
39
|
+
"scale": MAX_DEVIATION_DISTANCE_WALKING,
|
|
40
|
+
"opacity": 0.2
|
|
41
|
+
}, null)]);
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
AuxiliaryPassanger
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AuxiliaryPassanger";
|
|
@@ -14,6 +14,7 @@ import { createAbortable, assertNotEmptyArray } from "../../utils/helper.js";
|
|
|
14
14
|
import { place2point, pipeDefer, lnglat2point } from "../../utils/transform.js";
|
|
15
15
|
import { toCoordinatePlaceType, toCoordinateTrackPoint } from "../../utils/typeChecking.js";
|
|
16
16
|
import { AuxiliaryGraspRoad } from "../AuxiliaryGraspRoad/AuxiliaryGraspRoad.js";
|
|
17
|
+
import { AuxiliaryPassanger } from "../AuxiliaryPassanger/AuxiliaryPassanger.js";
|
|
17
18
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
18
19
|
import { SectionDispatching, SectionConfirmed, SectionDriverStartRelayService, SectionDriverStartService, SectionBookDispatched, SectionInService, SectionDriverArrived, SectionCanceled, SectionEndService } from "./BusinessTaxiServiceSection.js";
|
|
19
20
|
const STATUS_NEED_CAR_POSITION = ["book-driverStartService", "dispatched", "driverStartService", "driverStartRelayService", "inService", "driverArrived"];
|
|
@@ -210,6 +211,9 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
210
211
|
"trackPoints": carTrackPositions,
|
|
211
212
|
"from": from,
|
|
212
213
|
"to": to
|
|
214
|
+
}, null), IS_ENABLE_AUXILIARY_GRASP_ROAD && createVNode(AuxiliaryPassanger, {
|
|
215
|
+
"status": driverStatus,
|
|
216
|
+
"passengerPosition": passengerPosition
|
|
213
217
|
}, null)]
|
|
214
218
|
});
|
|
215
219
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
2
|
import { apiGetAuxiliaryGrapStatus } from "../../api/browser.js";
|
|
3
|
-
import { MAX_DEVIATION_DISTANCE, CAR_DISTANCE_MIN } from "../../api/contants.js";
|
|
3
|
+
import { PASSENGER_DISTANCE_MAX, MAX_DEVIATION_DISTANCE, PASSENGER_DISTANCE_MIN, CAR_DISTANCE_MIN } from "../../api/contants.js";
|
|
4
4
|
import { useMapGeometry } from "../../hooks/useMapGeometry.js";
|
|
5
5
|
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
6
6
|
import { defineSetup } from "../../types/helper.js";
|
|
@@ -19,8 +19,6 @@ import { WalkingLine } from "../WalkingLine/WalkingLine.js";
|
|
|
19
19
|
import { WalkingRoute } from "../WalkingRoute/WalkingRoute.js";
|
|
20
20
|
import { WaveCircle } from "../WaveCircle/WaveCircle.js";
|
|
21
21
|
const IS_ENABLE_AUXILIARY_GRASP_ROAD = apiGetAuxiliaryGrapStatus();
|
|
22
|
-
const PASSENGER_DISTANCE_MAX = 2e3;
|
|
23
|
-
const PASSENGER_DISTANCE_MIN = 20;
|
|
24
22
|
const AUTO_FIT_VIEW_INTERVAL = IS_ENABLE_AUXILIARY_GRASP_ROAD ? 24 * 3600 * 1e3 : 15e3;
|
|
25
23
|
const carDurationWithinMinDistance = (distance) => Math.floor(distance / 5);
|
|
26
24
|
const SectionDispatching = defineSetup("SectionDispatching", function(props) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverlay";
|
|
2
|
-
import type { Language, Point } from "../../types/interface";
|
|
2
|
+
import type { Language, MapThemeVariables, Point } from "../../types/interface";
|
|
3
|
+
type StartEndPointIcons = Pick<MapThemeVariables, "ICON_START_POINT_EN_URL" | "ICON_END_POINT_EN_URL" | "ICON_END_POINT_ZH_TW_URL" | "ICON_WAYPOINT_URL">;
|
|
3
4
|
export interface StartEndPointProps<T> extends MapRegisterOverlayProps<T> {
|
|
4
5
|
language: Language;
|
|
5
6
|
type: "start" | "end" | "waypoint";
|
|
@@ -7,6 +8,7 @@ export interface StartEndPointProps<T> extends MapRegisterOverlayProps<T> {
|
|
|
7
8
|
title?: string;
|
|
8
9
|
description?: string;
|
|
9
10
|
withArrow?: boolean;
|
|
11
|
+
icons?: StartEndPointIcons;
|
|
10
12
|
onClick?: (value: Point) => void;
|
|
11
13
|
}
|
|
12
14
|
export declare const AStartEndPoint: import("vue-demi").DefineComponent<import("vue-demi").ComponentObjectPropsOptions<StartEndPointProps<{
|
|
@@ -23648,3 +23650,4 @@ export declare const StartEndPoint: import("vue-demi").DefineComponent<import("v
|
|
|
23648
23650
|
}) & GmapOverlay>, import("vue-demi").SlotsType<{} & {
|
|
23649
23651
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
23650
23652
|
}>>;
|
|
23653
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
2
|
import { computed } from "vue-demi";
|
|
3
|
-
import {
|
|
3
|
+
import { ICON_START_POINT_EN_URL, ICON_END_POINT_EN_URL, ICON_END_POINT_ZH_TW_URL, ICON_WAYPOINT_URL } from "../../api/cdn.js";
|
|
4
4
|
import { ZINDEX_START_END_LOGO_LAYER } from "../../api/contants.js";
|
|
5
5
|
import { i as imgArrowRight } from "../../chunks/arrow-right.2c34874e.js";
|
|
6
6
|
import { AmapMarker } from "../../components/AmapMarker/AmapMarker.js";
|
|
@@ -10,10 +10,16 @@ import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
|
10
10
|
import { useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
11
11
|
import { defineSetup } from "../../types/helper.js";
|
|
12
12
|
import { createDom } from "../../utils/dom.js";
|
|
13
|
-
import { decodeAsterisk, vec2lnglat } from "../../utils/transform.js";
|
|
13
|
+
import { mergeDefaultProps, decodeAsterisk, vec2lnglat } from "../../utils/transform.js";
|
|
14
14
|
import { p as pointInfoBoxEmphasize, a as pointIcon, b as pointLayout, c as pointSingleInfoBox, d as pointInfoBoxTitle, t as textLayout, e as arrowRight, f as pointInfoBox, g as pointInfoBoxDescription } from "../../chunks/StartEndPoint.css.4d9c0791.js";
|
|
15
15
|
const imgEndPoint = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzEiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIG1lZXQiIHZpZXdCb3g9IjAgMCAyNCAzMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjcyLjMzOSUiIHkxPSI1MCUiIHgyPSIwJSIgeTI9IjUwJSIgaWQ9ImV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|
17
23
|
const AStartEndPoint = defineSetup("AStartEndPoint", function(props, {
|
|
18
24
|
emit
|
|
19
25
|
}) {
|
|
@@ -25,7 +31,8 @@ const AStartEndPoint = defineSetup("AStartEndPoint", function(props, {
|
|
|
25
31
|
type,
|
|
26
32
|
language
|
|
27
33
|
} = props;
|
|
28
|
-
const
|
|
34
|
+
const icons = mergeDefaultProps(defaultIcons, props.icons);
|
|
35
|
+
const icon = type === "waypoint" ? icons.ICON_WAYPOINT_URL : type === "start" ? language === "zh" || language === "zh-TW" ? imgStartPoint : icons.ICON_START_POINT_EN_URL : language === "zh" ? imgEndPoint : language === "zh-TW" ? icons.ICON_END_POINT_ZH_TW_URL : icons.ICON_END_POINT_EN_URL;
|
|
29
36
|
const titleRow = !title ? "" : decodeAsterisk(title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
30
37
|
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
31
38
|
if (!description && !title)
|
|
@@ -90,7 +97,8 @@ const GStartEndPoint = defineSetup("GStartEndPoint", function(props, {
|
|
|
90
97
|
type,
|
|
91
98
|
language = "zh"
|
|
92
99
|
} = props;
|
|
93
|
-
const
|
|
100
|
+
const icons = mergeDefaultProps(defaultIcons, props.icons);
|
|
101
|
+
const icon = type === "waypoint" ? icons.ICON_WAYPOINT_URL : type === "start" ? language === "zh" || language === "zh-TW" ? imgStartPoint : icons.ICON_START_POINT_EN_URL : language === "zh" || language === "zh-TW" ? imgEndPoint : icons.ICON_END_POINT_EN_URL;
|
|
94
102
|
const titleRow = !title ? "" : decodeAsterisk(title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
95
103
|
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
96
104
|
if (!description && !title)
|
|
@@ -153,8 +161,15 @@ const StartEndPoint = defineSetup("StartEndPoint", function(props, {
|
|
|
153
161
|
}) {
|
|
154
162
|
const payload = useMapSupplier();
|
|
155
163
|
return () => {
|
|
164
|
+
const icons = {
|
|
165
|
+
...payload.themeVariables,
|
|
166
|
+
...props.icons
|
|
167
|
+
};
|
|
156
168
|
return createElement(payload.supplier === "gmap" ? GStartEndPoint : AStartEndPoint, {
|
|
157
|
-
attrs:
|
|
169
|
+
attrs: {
|
|
170
|
+
...props,
|
|
171
|
+
icons
|
|
172
|
+
},
|
|
158
173
|
on: {
|
|
159
174
|
click: (value) => emit("click", value)
|
|
160
175
|
}
|
|
@@ -4,6 +4,7 @@ export interface TaxiCarProps<T> extends MapRegisterOverlayProps<T> {
|
|
|
4
4
|
angle?: number;
|
|
5
5
|
title?: string;
|
|
6
6
|
opacity?: number;
|
|
7
|
+
icon?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const ATaxiCar: import("vue-demi").DefineComponent<import("vue-demi").ComponentObjectPropsOptions<TaxiCarProps<{
|
|
9
10
|
_needUpdate: boolean;
|
|
@@ -19,11 +19,14 @@ var taxiCarTitle = "_65j3sr4";
|
|
|
19
19
|
const ATaxiCar = defineSetup("ATaxiCar", function(props) {
|
|
20
20
|
const contentRef = computed(() => {
|
|
21
21
|
var _a, _b;
|
|
22
|
+
const {
|
|
23
|
+
icon = ICON_TAXI_CAR_URL
|
|
24
|
+
} = props;
|
|
22
25
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
23
26
|
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
24
27
|
if (!props.title)
|
|
25
28
|
return {
|
|
26
|
-
img: `<img class="ATaxiCar ${carIcon}" src="${
|
|
29
|
+
img: `<img class="ATaxiCar ${carIcon}" src="${icon}" style="${carStyle}">`
|
|
27
30
|
};
|
|
28
31
|
const content = (hide$1) => `
|
|
29
32
|
<div class="ATaxiCar ${pointLayout}">
|
|
@@ -32,7 +35,7 @@ const ATaxiCar = defineSetup("ATaxiCar", function(props) {
|
|
|
32
35
|
})}">
|
|
33
36
|
<div class="${taxiCarTitle}">${titleRow}</div>
|
|
34
37
|
</div>
|
|
35
|
-
<img src="${
|
|
38
|
+
<img src="${icon}" class="${carIcon} ${hide({
|
|
36
39
|
hide: hide$1
|
|
37
40
|
})}" style="${carStyle}">
|
|
38
41
|
</div>
|
|
@@ -59,13 +62,16 @@ const ATaxiCar = defineSetup("ATaxiCar", function(props) {
|
|
|
59
62
|
const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
60
63
|
const contentRef = computed(() => {
|
|
61
64
|
var _a, _b;
|
|
65
|
+
const {
|
|
66
|
+
icon = ICON_TAXI_CAR_URL
|
|
67
|
+
} = props;
|
|
62
68
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
63
69
|
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
64
70
|
if (!props.title)
|
|
65
71
|
return {
|
|
66
72
|
img: createDom("img", {
|
|
67
73
|
class: `GTaxiCar ${carIcon}`,
|
|
68
|
-
src:
|
|
74
|
+
src: icon,
|
|
69
75
|
style: carStyle
|
|
70
76
|
})
|
|
71
77
|
};
|
|
@@ -77,7 +83,7 @@ const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
|
77
83
|
})}">
|
|
78
84
|
<div class="${taxiCarTitle}">${titleRow}</div>
|
|
79
85
|
</div>
|
|
80
|
-
<img src="${
|
|
86
|
+
<img src="${icon}" class="${carIcon} ${hide({
|
|
81
87
|
hide: hide$1
|
|
82
88
|
})}" style="${carStyle}">
|
|
83
89
|
`);
|
|
@@ -103,8 +109,13 @@ const GTaxiCar = defineSetup("GTaxiCar", function(props) {
|
|
|
103
109
|
const TaxiCar = defineSetup("TaxiCar", function(props) {
|
|
104
110
|
const payload = useMapSupplier();
|
|
105
111
|
return () => {
|
|
112
|
+
var _a, _b;
|
|
113
|
+
const icon = (_b = (_a = payload.themeVariables) == null ? void 0 : _a.ICON_TAXI_CAR_URL) != null ? _b : props.icon;
|
|
106
114
|
return createElement(payload.supplier === "gmap" ? GTaxiCar : ATaxiCar, {
|
|
107
|
-
attrs:
|
|
115
|
+
attrs: {
|
|
116
|
+
...props,
|
|
117
|
+
icon
|
|
118
|
+
}
|
|
108
119
|
});
|
|
109
120
|
};
|
|
110
121
|
});
|
|
@@ -2,6 +2,7 @@ import "../css/Loading-49e58ced.css";
|
|
|
2
2
|
import { createVNode } from "vue";
|
|
3
3
|
import { ICON_LOAD_FAILED_URL } from "../api/cdn.js";
|
|
4
4
|
import { AbsoluteAddressBox } from "../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
5
|
+
import { useMapSupplier } from "../hooks/useMapSupplier.js";
|
|
5
6
|
import { defineSetup } from "../types/helper.js";
|
|
6
7
|
import { SvgInlineWebComponentTag } from "../components/SvgInline/SvgInline.web-component.js";
|
|
7
8
|
const imgGrid = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzg1IiBoZWlnaHQ9IjgxNyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmlld0JveD0iMCAwIDM4NSA4MTciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgc3Ryb2tlPSIjRDhEQkUyIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1kYXNoYXJyYXk9IjEiPjxwYXRoIGQ9Ik0uNSA4MTdWME0yNC41IDgxN1YwTTQ4LjUgODE3VjBNNzIuNSA4MTdWME05Ni41IDgxN1YwTTEyMC41IDgxN1YwTTE0NC41IDgxN1YwTTE2OC41IDgxN1YwTTE5Mi41IDgxN1YwTTIxNi41IDgxN1YwTTI0MC41IDgxN1YwTTI2NC41IDgxN1YwTTI4OC41IDgxN1YwTTMxMi41IDgxN1YwTTMzNi41IDgxN1YwTTM2MC41IDgxN1YwTTM4NC41IDgxN1YwTTAgLjVoMzg1TTAgMjQuNWgzODVNMCA0OC41aDM4NU0wIDcyLjVoMzg1TTAgOTYuNWgzODVNMCAxMjAuNWgzODVNMCAxNDQuNWgzODVNMCAxNjguNWgzODVNMCAxOTIuNWgzODVNMCAyMTYuNWgzODVNMCAyNDAuNWgzODVNMCAyNjQuNWgzODVNMCAyODguNWgzODVNMCAzMTIuNWgzODVNMCAzMzYuNWgzODVNMCAzNjAuNWgzODVNMCAzODQuNWgzODVNMCA0MDguNWgzODVNMCA0MzIuNWgzODVNMCA0NTYuNWgzODVNMCA0ODAuNWgzODVNMCA1MDQuNWgzODVNMCA1MjguNWgzODVNMCA1NTIuNWgzODVNMCA1NzYuNWgzODVNMCA2MDAuNWgzODVNMCA2MjQuNWgzODVNMCA2NDguNWgzODVNMCA2NzIuNWgzODVNMCA2OTYuNWgzODVNMCA3MjAuNWgzODVNMCA3NDQuNWgzODVNMCA3NjguNWgzODVNMCA3OTIuNWgzODVNMCA4MTYuNWgzODUiLz48L2c+PC9zdmc+";
|
|
@@ -25,6 +26,11 @@ const Loading = defineSetup("Loading", function() {
|
|
|
25
26
|
}, null)]);
|
|
26
27
|
});
|
|
27
28
|
const LoadFailed = defineSetup("LoadFailed", function(props) {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const {
|
|
31
|
+
themeVariables
|
|
32
|
+
} = useMapSupplier();
|
|
33
|
+
const icon = (_b = (_a = props.icon) != null ? _a : themeVariables == null ? void 0 : themeVariables.ICON_LOAD_FAILED_URL) != null ? _b : ICON_LOAD_FAILED_URL;
|
|
28
34
|
return () => createVNode("div", {
|
|
29
35
|
"class": loadingLayout
|
|
30
36
|
}, [createVNode("img", {
|
|
@@ -34,7 +40,7 @@ const LoadFailed = defineSetup("LoadFailed", function(props) {
|
|
|
34
40
|
"class": contentLayout
|
|
35
41
|
}, [createVNode(SvgInlineWebComponentTag, {
|
|
36
42
|
"class": iconLoadFailed,
|
|
37
|
-
"src":
|
|
43
|
+
"src": icon
|
|
38
44
|
}, null), createVNode("span", {
|
|
39
45
|
"class": `${title} ${verticalGap}`
|
|
40
46
|
}, [props.title]), createVNode("span", {
|
|
@@ -4,6 +4,7 @@ export declare const Loading: import("vue").DefineComponent<import("vue").Compon
|
|
|
4
4
|
interface LoadFailedProps {
|
|
5
5
|
title?: string;
|
|
6
6
|
description?: string;
|
|
7
|
+
icon?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const LoadFailed: import("vue").DefineComponent<import("vue").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, import("vue").PublicProps, LoadFailedProps, LoadFailedProps, import("vue").SlotsType<{} & {
|
|
9
10
|
default?: import("../../demi-polyfill").Slot | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import "vue";
|
|
2
2
|
import "../../api/cdn.js";
|
|
3
|
-
import { L, a } from "../../chunks/Loading.
|
|
3
|
+
import { L, a } from "../../chunks/Loading.4c949ec9.js";
|
|
4
4
|
import "../../business-components/AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
5
|
+
import "../../hooks/useMapSupplier.js";
|
|
5
6
|
import "../../types/helper.js";
|
|
6
7
|
import "../SvgInline/SvgInline.web-component.js";
|
|
7
8
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../../css/MapProvider-156bfd53.css";
|
|
2
2
|
import { createVNode, isVNode } from "vue";
|
|
3
3
|
import { reactive, toRefs } from "vue-demi";
|
|
4
|
-
import { L as LoadFailed, a as Loading, i as imgGrid } from "../../chunks/Loading.
|
|
4
|
+
import { L as LoadFailed, a as Loading, i as imgGrid } from "../../chunks/Loading.4c949ec9.js";
|
|
5
5
|
import { useMapLoader, Status } from "../../hooks/useMapLoader.js";
|
|
6
6
|
import { provideMapSupplier, useMapSupplier } from "../../hooks/useMapSupplier.js";
|
|
7
7
|
import { defineLagecySetup } from "../../types/helper.js";
|