@heycar/heycars-map 2.0.0-switchMap6 → 2.0.0-switchMap7
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.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/v2/hooks/useMapLoader.js +10 -2
- package/dist/v2/utils/log.js +1 -1
- package/dist/v3/hooks/useMapLoader.js +10 -2
- package/dist/v3/utils/log.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./v3"
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./v3"
|
|
@@ -602,6 +602,14 @@ const useAmapLoader = (props) => {
|
|
|
602
602
|
);
|
|
603
603
|
});
|
|
604
604
|
const keepRetry = createOneConcurrent(async () => {
|
|
605
|
+
if (!(disableRef == null ? void 0 : disableRef.value) && statusRef.value === "SUCCESS") {
|
|
606
|
+
pingStatusRef.value = "pending";
|
|
607
|
+
while (!(disableRef == null ? void 0 : disableRef.value) && pingStatusRef.value !== "connected") {
|
|
608
|
+
if (pingStatusRef.value === "unconnected")
|
|
609
|
+
await sleep(MIN_MAP_RELOAD_INTERVAL);
|
|
610
|
+
pingStatusRef.value = await apiPingAmap();
|
|
611
|
+
}
|
|
612
|
+
}
|
|
605
613
|
const options = optionsRef.value;
|
|
606
614
|
while (!(disableRef == null ? void 0 : disableRef.value) && statusRef.value !== "SUCCESS") {
|
|
607
615
|
if (statusRef.value === "LOADING") {
|
|
@@ -662,9 +670,9 @@ const useGmapLoader = (props) => {
|
|
|
662
670
|
return Promise.race([abortPromise, loadPromise]);
|
|
663
671
|
});
|
|
664
672
|
const keepRetry = createOneConcurrent(async () => {
|
|
665
|
-
if (statusRef.value === "SUCCESS") {
|
|
673
|
+
if (!(disableRef == null ? void 0 : disableRef.value) && statusRef.value === "SUCCESS") {
|
|
666
674
|
pingStatusRef.value = "pending";
|
|
667
|
-
while (pingStatusRef.value !== "connected") {
|
|
675
|
+
while (!(disableRef == null ? void 0 : disableRef.value) && pingStatusRef.value !== "connected") {
|
|
668
676
|
if (pingStatusRef.value === "unconnected")
|
|
669
677
|
await sleep(MIN_MAP_RELOAD_INTERVAL);
|
|
670
678
|
pingStatusRef.value = await apiPingGmap();
|
package/dist/v2/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.0.0-
|
|
3
|
+
const pkgVersion = "2.0.0-switchMap7";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|
|
@@ -602,6 +602,14 @@ const useAmapLoader = (props) => {
|
|
|
602
602
|
);
|
|
603
603
|
});
|
|
604
604
|
const keepRetry = createOneConcurrent(async () => {
|
|
605
|
+
if (!(disableRef == null ? void 0 : disableRef.value) && statusRef.value === "SUCCESS") {
|
|
606
|
+
pingStatusRef.value = "pending";
|
|
607
|
+
while (!(disableRef == null ? void 0 : disableRef.value) && pingStatusRef.value !== "connected") {
|
|
608
|
+
if (pingStatusRef.value === "unconnected")
|
|
609
|
+
await sleep(MIN_MAP_RELOAD_INTERVAL);
|
|
610
|
+
pingStatusRef.value = await apiPingAmap();
|
|
611
|
+
}
|
|
612
|
+
}
|
|
605
613
|
const options = optionsRef.value;
|
|
606
614
|
while (!(disableRef == null ? void 0 : disableRef.value) && statusRef.value !== "SUCCESS") {
|
|
607
615
|
if (statusRef.value === "LOADING") {
|
|
@@ -662,9 +670,9 @@ const useGmapLoader = (props) => {
|
|
|
662
670
|
return Promise.race([abortPromise, loadPromise]);
|
|
663
671
|
});
|
|
664
672
|
const keepRetry = createOneConcurrent(async () => {
|
|
665
|
-
if (statusRef.value === "SUCCESS") {
|
|
673
|
+
if (!(disableRef == null ? void 0 : disableRef.value) && statusRef.value === "SUCCESS") {
|
|
666
674
|
pingStatusRef.value = "pending";
|
|
667
|
-
while (pingStatusRef.value !== "connected") {
|
|
675
|
+
while (!(disableRef == null ? void 0 : disableRef.value) && pingStatusRef.value !== "connected") {
|
|
668
676
|
if (pingStatusRef.value === "unconnected")
|
|
669
677
|
await sleep(MIN_MAP_RELOAD_INTERVAL);
|
|
670
678
|
pingStatusRef.value = await apiPingGmap();
|
package/dist/v3/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.0.0-
|
|
3
|
+
const pkgVersion = "2.0.0-switchMap7";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|