pukaad-ui-lib 1.222.0 → 1.223.0
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/module.json +1 -1
- package/dist/runtime/components/drawer/drawer-suggest-place/suggest-place-map.vue +19 -9
- package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-password.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-password.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-slider.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-slider.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-password-confirmed.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-password-confirmed.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-password-verify.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-password-verify.vue.d.ts +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -21,10 +21,12 @@ const mapContainer = ref(null);
|
|
|
21
21
|
let map = null;
|
|
22
22
|
let polygonLayer = null;
|
|
23
23
|
let marker = null;
|
|
24
|
+
let L = null;
|
|
25
|
+
let drawDebounceTimer = null;
|
|
24
26
|
const { getProvinceById } = useThaiAddress();
|
|
25
27
|
onMounted(async () => {
|
|
26
28
|
const leafletModule = await import("leaflet");
|
|
27
|
-
|
|
29
|
+
L = leafletModule.default ?? leafletModule;
|
|
28
30
|
if (mapContainer.value) {
|
|
29
31
|
map = L.map(mapContainer.value, {
|
|
30
32
|
zoomControl: false,
|
|
@@ -48,21 +50,29 @@ onMounted(async () => {
|
|
|
48
50
|
setTimeout(() => {
|
|
49
51
|
if (map) map.invalidateSize();
|
|
50
52
|
}, 550);
|
|
51
|
-
drawPolygon(
|
|
53
|
+
drawPolygon();
|
|
52
54
|
}
|
|
53
55
|
});
|
|
54
56
|
watch(
|
|
55
57
|
() => [props.provinceId, props.amphurId, props.tambonId],
|
|
56
58
|
async () => {
|
|
57
|
-
if (typeof window
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
if (typeof window === "undefined") return;
|
|
60
|
+
if (!map) {
|
|
61
|
+
await new Promise((resolve) => {
|
|
62
|
+
const timer = setInterval(() => {
|
|
63
|
+
if (map) {
|
|
64
|
+
clearInterval(timer);
|
|
65
|
+
resolve();
|
|
66
|
+
}
|
|
67
|
+
}, 50);
|
|
68
|
+
});
|
|
61
69
|
}
|
|
70
|
+
if (drawDebounceTimer) clearTimeout(drawDebounceTimer);
|
|
71
|
+
drawDebounceTimer = setTimeout(() => drawPolygon(), 80);
|
|
62
72
|
}
|
|
63
73
|
);
|
|
64
|
-
const drawPolygon = async (
|
|
65
|
-
if (!map) return;
|
|
74
|
+
const drawPolygon = async () => {
|
|
75
|
+
if (!map || !L) return;
|
|
66
76
|
if (polygonLayer) {
|
|
67
77
|
map.removeLayer(polygonLayer);
|
|
68
78
|
polygonLayer = null;
|
|
@@ -105,7 +115,7 @@ const drawPolygon = async (L) => {
|
|
|
105
115
|
// handled by rgba
|
|
106
116
|
}
|
|
107
117
|
}).addTo(map);
|
|
108
|
-
map.
|
|
118
|
+
map.flyToBounds(polygonLayer.getBounds(), { padding: [20, 20], duration: 0.5 });
|
|
109
119
|
const center = polygonLayer.getBounds().getCenter();
|
|
110
120
|
const divIcon = L.divIcon({
|
|
111
121
|
html: mapPinSvg,
|
|
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
35
35
|
fullHeight: boolean;
|
|
36
36
|
name: string;
|
|
37
37
|
limit: number;
|
|
38
|
-
disabledErrorMessage: boolean;
|
|
39
38
|
accept: string;
|
|
39
|
+
disabledErrorMessage: boolean;
|
|
40
40
|
labelIcon: string;
|
|
41
41
|
disabledDrop: boolean;
|
|
42
42
|
column: boolean;
|
|
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
35
35
|
fullHeight: boolean;
|
|
36
36
|
name: string;
|
|
37
37
|
limit: number;
|
|
38
|
-
disabledErrorMessage: boolean;
|
|
39
38
|
accept: string;
|
|
39
|
+
disabledErrorMessage: boolean;
|
|
40
40
|
labelIcon: string;
|
|
41
41
|
disabledDrop: boolean;
|
|
42
42
|
column: boolean;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
}>, {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
new: boolean;
|
|
26
25
|
disabledForgotPassword: boolean;
|
|
26
|
+
new: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
}>, {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
new: boolean;
|
|
26
25
|
disabledForgotPassword: boolean;
|
|
26
|
+
new: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
12
12
|
label: string;
|
|
13
13
|
color: InputSliderColor;
|
|
14
14
|
fullWidth: boolean;
|
|
15
|
+
step: number;
|
|
15
16
|
max: number;
|
|
16
17
|
min: number;
|
|
17
|
-
step: number;
|
|
18
18
|
lineHeight: number | string;
|
|
19
19
|
appearance: boolean;
|
|
20
20
|
thumbSize: number | string;
|
|
@@ -12,9 +12,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
12
12
|
label: string;
|
|
13
13
|
color: InputSliderColor;
|
|
14
14
|
fullWidth: boolean;
|
|
15
|
+
step: number;
|
|
15
16
|
max: number;
|
|
16
17
|
min: number;
|
|
17
|
-
step: number;
|
|
18
18
|
lineHeight: number | string;
|
|
19
19
|
appearance: boolean;
|
|
20
20
|
thumbSize: number | string;
|
|
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
24
24
|
}) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
title: string;
|
|
27
|
-
disabledForgotPassword: boolean;
|
|
28
27
|
confirmText: string;
|
|
28
|
+
disabledForgotPassword: boolean;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
31
31
|
export default _default;
|
|
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
24
24
|
}) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
title: string;
|
|
27
|
-
disabledForgotPassword: boolean;
|
|
28
27
|
confirmText: string;
|
|
28
|
+
disabledForgotPassword: boolean;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
31
31
|
export default _default;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
28
28
|
}>, {
|
|
29
29
|
title: string;
|
|
30
30
|
mode: "login" | "secure";
|
|
31
|
-
disabledForgotPassword: boolean;
|
|
32
31
|
confirmText: string;
|
|
32
|
+
disabledForgotPassword: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
35
35
|
export default _default;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
28
28
|
}>, {
|
|
29
29
|
title: string;
|
|
30
30
|
mode: "login" | "secure";
|
|
31
|
-
disabledForgotPassword: boolean;
|
|
32
31
|
confirmText: string;
|
|
32
|
+
disabledForgotPassword: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
35
35
|
export default _default;
|