@heycar/heycars-map 0.9.8-memory2 → 0.9.8-memory4
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 +26 -10
- package/dist/index.js +26 -10
- package/dist/src/business-components/FitView/FitView.d.ts +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8,11 +8,11 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
9
9
|
const Vue = require("vue");
|
|
10
10
|
const style_css_ts_vanilla = "";
|
|
11
|
-
if (window !==
|
|
11
|
+
if (typeof window !== "undefined" && typeof globalThis === "undefined") {
|
|
12
12
|
window.globalThis = window;
|
|
13
13
|
}
|
|
14
14
|
const name = "@heycar/heycars-map";
|
|
15
|
-
const version = "0.9.8-
|
|
15
|
+
const version = "0.9.8-memory4";
|
|
16
16
|
const type = "module";
|
|
17
17
|
const bin = {
|
|
18
18
|
checkVersion: "./bin/checkVersion.js"
|
|
@@ -1481,6 +1481,7 @@ const AmapMarker = defineSetup(function AmapMarker2(props, { emit }) {
|
|
|
1481
1481
|
referenceCount.add();
|
|
1482
1482
|
markerRef.value = new AMap.Marker({ ...props });
|
|
1483
1483
|
});
|
|
1484
|
+
useMapOverlay({ registerOverlay, overlayRef: markerRef });
|
|
1484
1485
|
Vue.onUnmounted(() => {
|
|
1485
1486
|
var _a, _b;
|
|
1486
1487
|
referenceCount.remove();
|
|
@@ -1488,7 +1489,6 @@ const AmapMarker = defineSetup(function AmapMarker2(props, { emit }) {
|
|
|
1488
1489
|
(_b = markerRef.value) == null ? void 0 : _b.destroy();
|
|
1489
1490
|
markerRef.value = void 0;
|
|
1490
1491
|
});
|
|
1491
|
-
useMapOverlay({ registerOverlay, overlayRef: markerRef });
|
|
1492
1492
|
Vue.watchPostEffect((onCleanup) => {
|
|
1493
1493
|
var _a;
|
|
1494
1494
|
const map = mapRef == null ? void 0 : mapRef.value;
|
|
@@ -3673,7 +3673,11 @@ const FitViewOnce = defineSetup(function FitViewOnce2(props, {
|
|
|
3673
3673
|
return Vue.h("div", [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
3674
3674
|
};
|
|
3675
3675
|
});
|
|
3676
|
-
function createFittableRegisterOverlay(
|
|
3676
|
+
function createFittableRegisterOverlay(props) {
|
|
3677
|
+
const {
|
|
3678
|
+
registerOverlay,
|
|
3679
|
+
immediate = false
|
|
3680
|
+
} = props;
|
|
3677
3681
|
const {
|
|
3678
3682
|
add,
|
|
3679
3683
|
remove,
|
|
@@ -3681,11 +3685,11 @@ function createFittableRegisterOverlay(registerOverlay) {
|
|
|
3681
3685
|
} = registerOverlay;
|
|
3682
3686
|
const fittableAdd = (v) => {
|
|
3683
3687
|
add(v);
|
|
3684
|
-
setFitView();
|
|
3688
|
+
setFitView(immediate);
|
|
3685
3689
|
};
|
|
3686
3690
|
const fittableRemove = (v) => {
|
|
3687
3691
|
remove(v);
|
|
3688
|
-
setFitView();
|
|
3692
|
+
setFitView(immediate);
|
|
3689
3693
|
};
|
|
3690
3694
|
return {
|
|
3691
3695
|
add: fittableAdd,
|
|
@@ -3934,7 +3938,10 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props,
|
|
|
3934
3938
|
const {
|
|
3935
3939
|
language
|
|
3936
3940
|
} = useMapSupplier();
|
|
3937
|
-
const fittableRegistryOverlay = createFittableRegisterOverlay(
|
|
3941
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
3942
|
+
registerOverlay,
|
|
3943
|
+
immediate: true
|
|
3944
|
+
});
|
|
3938
3945
|
const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
|
|
3939
3946
|
return () => {
|
|
3940
3947
|
const {
|
|
@@ -8055,7 +8062,10 @@ const SectionDriverStartService = defineSetup(function SectionDriverStartService
|
|
|
8055
8062
|
const {
|
|
8056
8063
|
registerOverlay
|
|
8057
8064
|
} = props;
|
|
8058
|
-
const fittableRegistryOverlay = createFittableRegisterOverlay(
|
|
8065
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
8066
|
+
registerOverlay,
|
|
8067
|
+
immediate: true
|
|
8068
|
+
});
|
|
8059
8069
|
const {
|
|
8060
8070
|
language
|
|
8061
8071
|
} = useMapSupplier();
|
|
@@ -8250,7 +8260,10 @@ const SectionDriverArrived = defineSetup(function SectionDriverArrived2(props) {
|
|
|
8250
8260
|
const {
|
|
8251
8261
|
registerOverlay
|
|
8252
8262
|
} = props;
|
|
8253
|
-
const fittableRegistryOverlay = createFittableRegisterOverlay(
|
|
8263
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
8264
|
+
registerOverlay,
|
|
8265
|
+
immediate: true
|
|
8266
|
+
});
|
|
8254
8267
|
const {
|
|
8255
8268
|
language
|
|
8256
8269
|
} = useMapSupplier();
|
|
@@ -8324,7 +8337,10 @@ const SectionInService = defineSetup(function SectionInService2(props) {
|
|
|
8324
8337
|
const {
|
|
8325
8338
|
registerOverlay
|
|
8326
8339
|
} = props;
|
|
8327
|
-
const fittableRegistryOverlay = createFittableRegisterOverlay(
|
|
8340
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
8341
|
+
registerOverlay,
|
|
8342
|
+
immediate: true
|
|
8343
|
+
});
|
|
8328
8344
|
return () => {
|
|
8329
8345
|
const {
|
|
8330
8346
|
to: toPlace,
|
package/dist/index.js
CHANGED
|
@@ -6,11 +6,11 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
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_css_ts_vanilla = "";
|
|
9
|
-
if (window !==
|
|
9
|
+
if (typeof window !== "undefined" && typeof globalThis === "undefined") {
|
|
10
10
|
window.globalThis = window;
|
|
11
11
|
}
|
|
12
12
|
const name = "@heycar/heycars-map";
|
|
13
|
-
const version = "0.9.8-
|
|
13
|
+
const version = "0.9.8-memory4";
|
|
14
14
|
const type = "module";
|
|
15
15
|
const bin = {
|
|
16
16
|
checkVersion: "./bin/checkVersion.js"
|
|
@@ -1479,6 +1479,7 @@ const AmapMarker = defineSetup(function AmapMarker2(props, { emit }) {
|
|
|
1479
1479
|
referenceCount.add();
|
|
1480
1480
|
markerRef.value = new AMap.Marker({ ...props });
|
|
1481
1481
|
});
|
|
1482
|
+
useMapOverlay({ registerOverlay, overlayRef: markerRef });
|
|
1482
1483
|
onUnmounted(() => {
|
|
1483
1484
|
var _a, _b;
|
|
1484
1485
|
referenceCount.remove();
|
|
@@ -1486,7 +1487,6 @@ const AmapMarker = defineSetup(function AmapMarker2(props, { emit }) {
|
|
|
1486
1487
|
(_b = markerRef.value) == null ? void 0 : _b.destroy();
|
|
1487
1488
|
markerRef.value = void 0;
|
|
1488
1489
|
});
|
|
1489
|
-
useMapOverlay({ registerOverlay, overlayRef: markerRef });
|
|
1490
1490
|
watchPostEffect((onCleanup) => {
|
|
1491
1491
|
var _a;
|
|
1492
1492
|
const map = mapRef == null ? void 0 : mapRef.value;
|
|
@@ -3671,7 +3671,11 @@ const FitViewOnce = defineSetup(function FitViewOnce2(props, {
|
|
|
3671
3671
|
return h("div", [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
|
|
3672
3672
|
};
|
|
3673
3673
|
});
|
|
3674
|
-
function createFittableRegisterOverlay(
|
|
3674
|
+
function createFittableRegisterOverlay(props) {
|
|
3675
|
+
const {
|
|
3676
|
+
registerOverlay,
|
|
3677
|
+
immediate = false
|
|
3678
|
+
} = props;
|
|
3675
3679
|
const {
|
|
3676
3680
|
add,
|
|
3677
3681
|
remove,
|
|
@@ -3679,11 +3683,11 @@ function createFittableRegisterOverlay(registerOverlay) {
|
|
|
3679
3683
|
} = registerOverlay;
|
|
3680
3684
|
const fittableAdd = (v) => {
|
|
3681
3685
|
add(v);
|
|
3682
|
-
setFitView();
|
|
3686
|
+
setFitView(immediate);
|
|
3683
3687
|
};
|
|
3684
3688
|
const fittableRemove = (v) => {
|
|
3685
3689
|
remove(v);
|
|
3686
|
-
setFitView();
|
|
3690
|
+
setFitView(immediate);
|
|
3687
3691
|
};
|
|
3688
3692
|
return {
|
|
3689
3693
|
add: fittableAdd,
|
|
@@ -3932,7 +3936,10 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props,
|
|
|
3932
3936
|
const {
|
|
3933
3937
|
language
|
|
3934
3938
|
} = useMapSupplier();
|
|
3935
|
-
const fittableRegistryOverlay = createFittableRegisterOverlay(
|
|
3939
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
3940
|
+
registerOverlay,
|
|
3941
|
+
immediate: true
|
|
3942
|
+
});
|
|
3936
3943
|
const deferedSetFitView = pipeDefer(() => registerOverlay.setFitView(true));
|
|
3937
3944
|
return () => {
|
|
3938
3945
|
const {
|
|
@@ -8053,7 +8060,10 @@ const SectionDriverStartService = defineSetup(function SectionDriverStartService
|
|
|
8053
8060
|
const {
|
|
8054
8061
|
registerOverlay
|
|
8055
8062
|
} = props;
|
|
8056
|
-
const fittableRegistryOverlay = createFittableRegisterOverlay(
|
|
8063
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
8064
|
+
registerOverlay,
|
|
8065
|
+
immediate: true
|
|
8066
|
+
});
|
|
8057
8067
|
const {
|
|
8058
8068
|
language
|
|
8059
8069
|
} = useMapSupplier();
|
|
@@ -8248,7 +8258,10 @@ const SectionDriverArrived = defineSetup(function SectionDriverArrived2(props) {
|
|
|
8248
8258
|
const {
|
|
8249
8259
|
registerOverlay
|
|
8250
8260
|
} = props;
|
|
8251
|
-
const fittableRegistryOverlay = createFittableRegisterOverlay(
|
|
8261
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
8262
|
+
registerOverlay,
|
|
8263
|
+
immediate: true
|
|
8264
|
+
});
|
|
8252
8265
|
const {
|
|
8253
8266
|
language
|
|
8254
8267
|
} = useMapSupplier();
|
|
@@ -8322,7 +8335,10 @@ const SectionInService = defineSetup(function SectionInService2(props) {
|
|
|
8322
8335
|
const {
|
|
8323
8336
|
registerOverlay
|
|
8324
8337
|
} = props;
|
|
8325
|
-
const fittableRegistryOverlay = createFittableRegisterOverlay(
|
|
8338
|
+
const fittableRegistryOverlay = createFittableRegisterOverlay({
|
|
8339
|
+
registerOverlay,
|
|
8340
|
+
immediate: true
|
|
8341
|
+
});
|
|
8326
8342
|
return () => {
|
|
8327
8343
|
const {
|
|
8328
8344
|
to: toPlace,
|
|
@@ -12,7 +12,11 @@ export type FitViewOnceProps = Required<MROP> & {
|
|
|
12
12
|
};
|
|
13
13
|
export declare const FitViewOnce: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<FitViewOnceProps>, 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<FitViewOnceProps, Required<FitViewOnceProps>>, never, FitViewOnceProps, {} | {}>;
|
|
14
14
|
type R = RegisterOverlay<AmapOverlay> | RegisterOverlay<GmapOverlay>;
|
|
15
|
-
|
|
15
|
+
interface CreateFittableRegisterOverlayProps {
|
|
16
|
+
registerOverlay: R;
|
|
17
|
+
immediate?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function createFittableRegisterOverlay(props: CreateFittableRegisterOverlayProps): R;
|
|
16
20
|
export type KeyedFitViewProps = Required<MROP> & {
|
|
17
21
|
fitViewKey: string;
|
|
18
22
|
};
|