vue-daum-postcode 1.2.0 → 1.2.2
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 +37 -39
- package/lib/VueDaumPostcode.d.ts +5 -5
- package/lib/createVueDaumPostcode.d.ts +5 -5
- package/lib/vue-daum-postcode.mjs +21 -18
- package/lib/vue-daum-postcode.mjs.map +1 -1
- package/lib/vue-daum-postcode.umd.js +1 -1
- package/lib/vue-daum-postcode.umd.js.map +1 -1
- package/package.json +29 -28
- package/src/createVueDaumPostcode.ts +8 -8
- package/src/index.ts +3 -4
package/README.md
CHANGED
|
@@ -21,20 +21,17 @@ Vue 2.x를 사용하다면 [v0.x branch](https://github.com/wan2land/vue-daum-po
|
|
|
21
21
|
npm i vue-daum-postcode
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
25
24
|
**Global Registration**
|
|
26
25
|
|
|
27
26
|
[Vue3 Global Registration Guide](https://v3.vuejs.org/guide/component-registration.html#global-registration)
|
|
28
27
|
|
|
29
28
|
```js
|
|
30
|
-
import { createApp } from
|
|
31
|
-
import VueDaumPostcode from
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const app = createApp(/* */)
|
|
29
|
+
import { createApp } from "vue";
|
|
30
|
+
import VueDaumPostcode from "vue-daum-postcode";
|
|
35
31
|
|
|
36
|
-
app
|
|
32
|
+
const app = createApp(/* */);
|
|
37
33
|
|
|
34
|
+
app.use(VueDaumPostcode); // export default is plugin
|
|
38
35
|
```
|
|
39
36
|
|
|
40
37
|
**Local Registration**
|
|
@@ -46,13 +43,13 @@ app.use(VueDaumPostcode) // export default is plugin
|
|
|
46
43
|
<VueDaumPostcode :options="options" />
|
|
47
44
|
</template>
|
|
48
45
|
<script>
|
|
49
|
-
import { VueDaumPostcode } from
|
|
46
|
+
import { VueDaumPostcode } from "vue-daum-postcode";
|
|
50
47
|
|
|
51
48
|
export default {
|
|
52
49
|
components: {
|
|
53
50
|
VueDaumPostcode, // export VueDaumPostcode is component
|
|
54
51
|
},
|
|
55
|
-
}
|
|
52
|
+
};
|
|
56
53
|
</script>
|
|
57
54
|
```
|
|
58
55
|
|
|
@@ -60,8 +57,8 @@ export default {
|
|
|
60
57
|
|
|
61
58
|
```js
|
|
62
59
|
app.use(VueDaumPostcode, {
|
|
63
|
-
name:
|
|
64
|
-
})
|
|
60
|
+
name: "DaumPostcode",
|
|
61
|
+
});
|
|
65
62
|
```
|
|
66
63
|
|
|
67
64
|
**Postcode Js 경로 변경 (Global Registration)**
|
|
@@ -70,41 +67,42 @@ app.use(VueDaumPostcode, {
|
|
|
70
67
|
|
|
71
68
|
```js
|
|
72
69
|
app.use(VueDaumPostcode, {
|
|
73
|
-
scriptUrl:
|
|
74
|
-
|
|
70
|
+
scriptUrl:
|
|
71
|
+
"https://s3.ap-northeast-2.amazonaws.com/YOUR_BUCKET_NAME/postcode.v2.js",
|
|
72
|
+
});
|
|
75
73
|
```
|
|
76
74
|
|
|
77
75
|
## Props
|
|
78
76
|
|
|
79
|
-
이름
|
|
80
|
-
|
|
81
|
-
`q`
|
|
82
|
-
`animation`
|
|
83
|
-
`noAutoMapping`
|
|
84
|
-
`noShorthand`
|
|
85
|
-
`pleaseReadGuide`
|
|
86
|
-
`pleaseReadGuideTimer`
|
|
87
|
-
`maxSuggestItems`
|
|
88
|
-
`showMoreHName`
|
|
89
|
-
`hideMapBtn`
|
|
90
|
-
`hideEngBtn`
|
|
91
|
-
`alwaysShowEngAddr`
|
|
92
|
-
`zonecodeOnly`
|
|
93
|
-
`noSubmitMode`
|
|
94
|
-
`theme`
|
|
77
|
+
| 이름 | 타입 | 설명 | 기본값 |
|
|
78
|
+
| ---------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
79
|
+
| `q` | `String` | 검색어 | `""` |
|
|
80
|
+
| `animation` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `animation`. | `false` |
|
|
81
|
+
| `noAutoMapping` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `autoMapping`, 기본값을 `true`에서 `false`로 조정. | `false` |
|
|
82
|
+
| `noShorthand` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `shorthand`, 기본값을 `true`에서 `false`로 조정. | `false` |
|
|
83
|
+
| `pleaseReadGuide` | `Number` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `pleaseReadGuide`. | `0` |
|
|
84
|
+
| `pleaseReadGuideTimer` | `Number` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `pleaseReadGuideTimer`. | `1.5` |
|
|
85
|
+
| `maxSuggestItems` | `Number` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `maxSuggestItems`. | `10` |
|
|
86
|
+
| `showMoreHName` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `showMoreHName`. | `false` |
|
|
87
|
+
| `hideMapBtn` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `hideMapBtn`. | `false` |
|
|
88
|
+
| `hideEngBtn` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `hideEngBtn`. | `false` |
|
|
89
|
+
| `alwaysShowEngAddr` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `alwaysShowEngAddr`. | `false` |
|
|
90
|
+
| `zonecodeOnly` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `zonecodeOnly`. | `false` |
|
|
91
|
+
| `noSubmitMode` | `Boolean` | Submit Mode 비활성화시 사용. ([관련 이슈 링크](https://github.com/daumPostcode/QnA/issues/286)) | `false` |
|
|
92
|
+
| `theme` | `object` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `theme`. | `{}` |
|
|
95
93
|
|
|
96
94
|
## Events
|
|
97
95
|
|
|
98
|
-
이름
|
|
99
|
-
|
|
100
|
-
`load`
|
|
101
|
-
`search`
|
|
102
|
-
`complete`
|
|
103
|
-
`resize`
|
|
104
|
-
`error`
|
|
96
|
+
| 이름 | 설명 |
|
|
97
|
+
| ---------- | --------------------------------------------------------------------------- |
|
|
98
|
+
| `load` | 다음 우편번호가 로딩 되었을 때 발생 |
|
|
99
|
+
| `search` | [Daum 우편번호, 속성](http://postcode.map.daum.net/guide)에서 `onsearch`. |
|
|
100
|
+
| `complete` | [Daum 우편번호, 속성](http://postcode.map.daum.net/guide)에서 `oncomplete`. |
|
|
101
|
+
| `resize` | [Daum 우편번호, 속성](http://postcode.map.daum.net/guide)에서 `onresize`. |
|
|
102
|
+
| `error` | 스크립트 로딩 실패시 발생 |
|
|
105
103
|
|
|
106
104
|
## Slots
|
|
107
105
|
|
|
108
|
-
이름
|
|
109
|
-
|
|
110
|
-
`loading`
|
|
106
|
+
| 이름 | 설명 |
|
|
107
|
+
| --------- | ----------------------------------------------------------------------------------------------------- |
|
|
108
|
+
| `loading` | 다음 우편번호가 아직 완전히 불러오기 전에 보여줄 내용이 있는 경우 해당 슬롯에 넣습니다. (ex. spinner) |
|
package/lib/VueDaumPostcode.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const VueDaumPostcode: import("vue").DefineComponent<{
|
|
1
|
+
declare const VueDaumPostcode: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
2
|
q: {
|
|
3
3
|
type: StringConstructor;
|
|
4
4
|
default: string;
|
|
@@ -55,10 +55,10 @@ declare const VueDaumPostcode: import("vue").DefineComponent<{
|
|
|
55
55
|
type: import("vue").PropType<import("./interfaces").VueDaumPostcodeTheme>;
|
|
56
56
|
default: () => {};
|
|
57
57
|
};
|
|
58
|
-
}
|
|
58
|
+
}>, {}, {
|
|
59
59
|
styleHeight: string | number;
|
|
60
60
|
isLoaded: boolean;
|
|
61
|
-
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
61
|
+
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
62
|
q: {
|
|
63
63
|
type: StringConstructor;
|
|
64
64
|
default: string;
|
|
@@ -115,7 +115,7 @@ declare const VueDaumPostcode: import("vue").DefineComponent<{
|
|
|
115
115
|
type: import("vue").PropType<import("./interfaces").VueDaumPostcodeTheme>;
|
|
116
116
|
default: () => {};
|
|
117
117
|
};
|
|
118
|
-
}
|
|
118
|
+
}>> & Readonly<{}>, {
|
|
119
119
|
animation: boolean;
|
|
120
120
|
q: string;
|
|
121
121
|
noAutoMapping: boolean;
|
|
@@ -130,5 +130,5 @@ declare const VueDaumPostcode: import("vue").DefineComponent<{
|
|
|
130
130
|
alwaysShowEngAddr: boolean;
|
|
131
131
|
zonecodeOnly: boolean;
|
|
132
132
|
theme: import("./interfaces").VueDaumPostcodeTheme;
|
|
133
|
-
}>;
|
|
133
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
134
134
|
export default VueDaumPostcode;
|
|
@@ -3,7 +3,7 @@ import type { VueDaumPostcodeTheme } from "./interfaces";
|
|
|
3
3
|
export interface CreateVueDaumPostcodeOptions {
|
|
4
4
|
scriptUrl?: string | null;
|
|
5
5
|
}
|
|
6
|
-
export declare function createVueDaumPostcode(options?: CreateVueDaumPostcodeOptions): import("vue").DefineComponent<{
|
|
6
|
+
export declare function createVueDaumPostcode(options?: CreateVueDaumPostcodeOptions): import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
7
|
q: {
|
|
8
8
|
type: StringConstructor;
|
|
9
9
|
default: string;
|
|
@@ -60,10 +60,10 @@ export declare function createVueDaumPostcode(options?: CreateVueDaumPostcodeOpt
|
|
|
60
60
|
type: PropType<VueDaumPostcodeTheme>;
|
|
61
61
|
default: () => {};
|
|
62
62
|
};
|
|
63
|
-
}
|
|
63
|
+
}>, {}, {
|
|
64
64
|
styleHeight: string | number;
|
|
65
65
|
isLoaded: boolean;
|
|
66
|
-
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin,
|
|
66
|
+
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
67
67
|
q: {
|
|
68
68
|
type: StringConstructor;
|
|
69
69
|
default: string;
|
|
@@ -120,7 +120,7 @@ export declare function createVueDaumPostcode(options?: CreateVueDaumPostcodeOpt
|
|
|
120
120
|
type: PropType<VueDaumPostcodeTheme>;
|
|
121
121
|
default: () => {};
|
|
122
122
|
};
|
|
123
|
-
}
|
|
123
|
+
}>> & Readonly<{}>, {
|
|
124
124
|
animation: boolean;
|
|
125
125
|
q: string;
|
|
126
126
|
noAutoMapping: boolean;
|
|
@@ -135,4 +135,4 @@ export declare function createVueDaumPostcode(options?: CreateVueDaumPostcodeOpt
|
|
|
135
135
|
alwaysShowEngAddr: boolean;
|
|
136
136
|
zonecodeOnly: boolean;
|
|
137
137
|
theme: VueDaumPostcodeTheme;
|
|
138
|
-
}>;
|
|
138
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
function
|
|
1
|
+
import { defineComponent as r, h as n } from "vue";
|
|
2
|
+
function l(a) {
|
|
3
3
|
let t = null;
|
|
4
4
|
return () => {
|
|
5
5
|
try {
|
|
@@ -12,18 +12,21 @@ function r(a) {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
var i = (a, t) => new Promise((o, e) => {
|
|
15
|
-
|
|
15
|
+
let s = document.createElement("script");
|
|
16
|
+
(document.head || document.body).appendChild(Object.assign(s, t, { src: a, async: !0, onload: o, onerror: () => {
|
|
17
|
+
s.remove(), e(new Error(`Failed to load script: ${a}`));
|
|
18
|
+
} }));
|
|
16
19
|
});
|
|
17
20
|
typeof document > "u" && (i = () => Promise.reject(new Error("load is not supported in nodejs")));
|
|
18
21
|
function d(a = {}) {
|
|
19
|
-
const t = a.scriptUrl || "//t1.
|
|
22
|
+
const t = a.scriptUrl || "//t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js", o = l(
|
|
20
23
|
() => i(t).then(
|
|
21
24
|
() => new Promise(
|
|
22
|
-
(e) => window.
|
|
25
|
+
(e) => window.kakao.postcode.load(e)
|
|
23
26
|
)
|
|
24
27
|
)
|
|
25
28
|
);
|
|
26
|
-
return
|
|
29
|
+
return r({
|
|
27
30
|
props: {
|
|
28
31
|
q: {
|
|
29
32
|
type: String,
|
|
@@ -90,7 +93,7 @@ function d(a = {}) {
|
|
|
90
93
|
},
|
|
91
94
|
mounted() {
|
|
92
95
|
o().then(() => (this.isLoaded = !0, this.$nextTick())).then(() => {
|
|
93
|
-
new window.
|
|
96
|
+
new window.kakao.Postcode({
|
|
94
97
|
width: "100%",
|
|
95
98
|
height: "100%",
|
|
96
99
|
animation: this.animation,
|
|
@@ -120,18 +123,18 @@ function d(a = {}) {
|
|
|
120
123
|
autoClose: !1
|
|
121
124
|
}), this.$emit("load");
|
|
122
125
|
}).catch((e) => {
|
|
123
|
-
const
|
|
124
|
-
|
|
126
|
+
const s = new Error(`Load ${t} failed.`);
|
|
127
|
+
s.cause = e, this.$emit("error", s);
|
|
125
128
|
});
|
|
126
129
|
},
|
|
127
130
|
render() {
|
|
128
|
-
return
|
|
131
|
+
return n(
|
|
129
132
|
"div",
|
|
130
133
|
{
|
|
131
134
|
class: ["vue-daum-postcode"]
|
|
132
135
|
},
|
|
133
136
|
this.isLoaded || !this.$slots.loading ? [
|
|
134
|
-
|
|
137
|
+
n("div", {
|
|
135
138
|
class: ["vue-daum-postcode-container"],
|
|
136
139
|
ref: "container",
|
|
137
140
|
style: {
|
|
@@ -139,7 +142,7 @@ function d(a = {}) {
|
|
|
139
142
|
}
|
|
140
143
|
})
|
|
141
144
|
] : [
|
|
142
|
-
|
|
145
|
+
n(
|
|
143
146
|
"div",
|
|
144
147
|
{
|
|
145
148
|
class: ["vue-daum-postcode-loading"]
|
|
@@ -151,20 +154,20 @@ function d(a = {}) {
|
|
|
151
154
|
}
|
|
152
155
|
});
|
|
153
156
|
}
|
|
154
|
-
const
|
|
155
|
-
function
|
|
157
|
+
const h = d();
|
|
158
|
+
function u(a, { name: t, ...o } = {}) {
|
|
156
159
|
a.component(
|
|
157
160
|
t ?? "VueDaumPostcode",
|
|
158
|
-
Object.keys(o).length > 0 ? d(o) :
|
|
161
|
+
Object.keys(o).length > 0 ? d(o) : h
|
|
159
162
|
);
|
|
160
163
|
}
|
|
161
164
|
const m = {
|
|
162
|
-
install:
|
|
165
|
+
install: u
|
|
163
166
|
};
|
|
164
167
|
export {
|
|
165
|
-
|
|
168
|
+
h as VueDaumPostcode,
|
|
166
169
|
d as createVueDaumPostcode,
|
|
167
170
|
m as default,
|
|
168
|
-
|
|
171
|
+
u as install
|
|
169
172
|
};
|
|
170
173
|
//# sourceMappingURL=vue-daum-postcode.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-daum-postcode.mjs","sources":["../node_modules/nano-loader/index.mjs","../src/createVueDaumPostcode.ts","../src/VueDaumPostcode.ts","../src/index.ts"],"sourcesContent":["function
|
|
1
|
+
{"version":3,"file":"vue-daum-postcode.mjs","sources":["../node_modules/nano-loader/index.mjs","../src/createVueDaumPostcode.ts","../src/VueDaumPostcode.ts","../src/index.ts"],"sourcesContent":["function i(r){let e=null;return()=>{try{return e||(e=Promise.resolve(r()).catch(o=>{throw e=null,o}))}catch(o){return Promise.reject(o)}}}var c=i,s=(r,e)=>new Promise((o,n)=>{let t=document.createElement(\"script\");(document.head||document.body).appendChild(Object.assign(t,e,{src:r,async:!0,onload:o,onerror:()=>{t.remove(),n(new Error(`Failed to load script: ${r}`))}}))});typeof document>\"u\"&&(s=()=>Promise.reject(new Error(\"load is not supported in nodejs\")));export{c as defer,s as load,i as once};\n","import { once, load } from \"nano-loader\";\nimport { defineComponent, PropType, h } from \"vue\";\n\nimport type {\n VueDaumPostcodeCompleteResult,\n VueDaumPostcodeResizeResult,\n VueDaumPostcodeSearchResult,\n VueDaumPostcodeTheme,\n} from \"./interfaces\";\n\nexport interface CreateVueDaumPostcodeOptions {\n scriptUrl?: string | null;\n}\n\nexport function createVueDaumPostcode(\n options: CreateVueDaumPostcodeOptions = {},\n) {\n const scriptUrl =\n options.scriptUrl ||\n \"//t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js\";\n const loadDaumPostcode = once(() =>\n load(scriptUrl).then(\n () =>\n new Promise<void>((resolve) =>\n (window as any).kakao.postcode.load(resolve),\n ),\n ),\n );\n\n return defineComponent({\n props: {\n q: {\n type: String,\n default: \"\",\n },\n animation: {\n type: Boolean,\n default: false,\n },\n noAutoMapping: {\n type: Boolean,\n default: false,\n },\n noShorthand: {\n type: Boolean,\n default: false,\n },\n noSubmitMode: {\n type: Boolean,\n default: false,\n },\n pleaseReadGuide: {\n type: Number,\n default: 0,\n },\n pleaseReadGuideTimer: {\n type: Number,\n default: 1.5,\n },\n maxSuggestItems: {\n type: Number,\n default: 10,\n },\n showMoreHName: {\n type: Boolean,\n default: false,\n },\n hideMapBtn: {\n type: Boolean,\n default: false,\n },\n hideEngBtn: {\n type: Boolean,\n default: false,\n },\n alwaysShowEngAddr: {\n type: Boolean,\n default: false,\n },\n zonecodeOnly: {\n type: Boolean,\n default: false,\n },\n theme: {\n type: Object as PropType<VueDaumPostcodeTheme>,\n default: () => ({}),\n },\n },\n data() {\n return {\n styleHeight: 0 as string | number,\n isLoaded: false,\n };\n },\n mounted() {\n loadDaumPostcode()\n .then(() => {\n this.isLoaded = true;\n return this.$nextTick();\n })\n .then(() => {\n new (window as any).kakao.Postcode({\n width: \"100%\",\n height: \"100%\",\n animation: this.animation,\n autoMapping: !this.noAutoMapping,\n shorthand: !this.noShorthand,\n pleaseReadGuide: this.pleaseReadGuide,\n pleaseReadGuideTimer: this.pleaseReadGuideTimer,\n maxSuggestItems: this.maxSuggestItems,\n showMoreHName: this.showMoreHName,\n hideMapBtn: this.hideMapBtn,\n hideEngBtn: this.hideEngBtn,\n alwaysShowEngAddr: this.alwaysShowEngAddr,\n zonecodeOnly: this.zonecodeOnly,\n theme: this.theme,\n submitMode: !this.noSubmitMode,\n onsearch: (data: VueDaumPostcodeSearchResult) => {\n this.$emit(\"search\", data);\n },\n oncomplete: (data: VueDaumPostcodeCompleteResult) => {\n this.$emit(\"complete\", data);\n },\n onresize: (data: VueDaumPostcodeResizeResult) => {\n this.styleHeight = `${data.height}px`;\n this.$emit(\"resize\", data);\n },\n }).embed(this.$refs.container, {\n q: this.q,\n autoClose: false,\n });\n this.$emit(\"load\");\n })\n .catch((e) => {\n const error = new Error(`Load ${scriptUrl} failed.`);\n error.cause = e;\n this.$emit(\"error\", error);\n });\n },\n render() {\n return h(\n \"div\",\n {\n class: [\"vue-daum-postcode\"],\n },\n this.isLoaded || !this.$slots.loading\n ? [\n h(\"div\", {\n class: [\"vue-daum-postcode-container\"],\n ref: \"container\",\n style: {\n height: this.styleHeight,\n },\n }),\n ]\n : [\n h(\n \"div\",\n {\n class: [\"vue-daum-postcode-loading\"],\n },\n [this.$slots.loading()],\n ),\n ],\n );\n },\n });\n}\n","import { createVueDaumPostcode } from \"./createVueDaumPostcode\";\n\nconst VueDaumPostcode = createVueDaumPostcode();\n\nexport default VueDaumPostcode;\n","import { App, Plugin } from \"vue\";\n\nimport VueDaumPostcode from \"./VueDaumPostcode\";\nimport { createVueDaumPostcode } from \"./createVueDaumPostcode\";\nimport type { CreateVueDaumPostcodeOptions } from \"./createVueDaumPostcode\";\nimport type {\n VueDaumPostcodeTheme,\n VueDaumPostcodeCompleteResult,\n VueDaumPostcodeSearchResult,\n VueDaumPostcodeResizeResult,\n} from \"./interfaces\";\n\nexport interface VueDaumPostcodeInstallOptions extends CreateVueDaumPostcodeOptions {\n name?: string | null;\n}\n\nexport function install(\n app: App,\n { name, ...options }: VueDaumPostcodeInstallOptions = {},\n) {\n app.component(\n name ?? \"VueDaumPostcode\",\n Object.keys(options).length > 0\n ? createVueDaumPostcode(options)\n : VueDaumPostcode,\n );\n}\n\nconst plugin: Plugin = {\n install,\n};\n\nexport {\n plugin as default,\n createVueDaumPostcode,\n CreateVueDaumPostcodeOptions,\n VueDaumPostcodeTheme,\n VueDaumPostcode,\n VueDaumPostcodeCompleteResult,\n VueDaumPostcodeSearchResult,\n VueDaumPostcodeResizeResult,\n};\n"],"names":["i","r","e","s","n","t","createVueDaumPostcode","options","scriptUrl","loadDaumPostcode","once","load","resolve","defineComponent","data","error","h","VueDaumPostcode","install","app","name","plugin"],"mappings":";AAAA,SAASA,EAAEC,GAAE;AAAC,MAAIC,IAAE;AAAK,SAAM,MAAI;AAAC,QAAG;AAAC,aAAOA,MAAIA,IAAE,QAAQ,QAAQD,GAAG,EAAE,MAAM,OAAG;AAAC,cAAMC,IAAE,MAAK;AAAA,MAAC,CAAC;AAAA,IAAE,SAAO,GAAE;AAAC,aAAO,QAAQ,OAAO,CAAC;AAAA,IAAC;AAAA,EAAC;AAAC;AAAI,IAAKC,IAAE,CAACF,GAAEC,MAAI,IAAI,QAAQ,CAAC,GAAEE,MAAI;AAAC,MAAIC,IAAE,SAAS,cAAc,QAAQ;AAAE,GAAC,SAAS,QAAM,SAAS,MAAM,YAAY,OAAO,OAAOA,GAAEH,GAAE,EAAC,KAAID,GAAE,OAAM,IAAG,QAAO,GAAE,SAAQ,MAAI;AAAC,IAAAI,EAAE,OAAM,GAAGD,EAAE,IAAI,MAAM,0BAA0BH,CAAC,EAAE,CAAC;AAAA,EAAC,EAAC,CAAC,CAAC;AAAC,CAAC;AAAE,OAAO,WAAS,QAAME,IAAE,MAAI,QAAQ,OAAO,IAAI,MAAM,iCAAiC,CAAC;ACctc,SAASG,EACdC,IAAwC,IACxC;AACA,QAAMC,IACJD,EAAQ,aACR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ACEA,EAAE,OAAO;AAAA,YACP,OAAO,CAAC,6BAA6B;AAAA,YACrC,KAAK;AAAA,YACL,OAAO;AAAA,cACL,QAAQ,KAAK;AAAA,YAAA;AAAA,UACf,CACD;AAAA,QAAA,IAEH;AAAA,UACEA;AAAA,YACE;AAAA,YACA;AAAA,cACE,OAAO,CAAC,2BAA2B;AAAA,YAAA;AAAA,YAErC,CAAC,KAAK,OAAO,QAAA,CAAS;AAAA,UAAA;AAAA,QACxB;AAAA,MACF;AAAA,IAER;AAAA,EAAA,CACD;AACH;ACrKA,MAAMC,IAAkBX,EAAA;ACcjB,SAASY,EACdC,GACA,EAAE,MAAAC,GAAM,GAAGb,EAAA,IAA2C,CAAA,GACtD;AACA,EAAAY,EAAI;AAAA,IACFC,KAAQ;AAAA,IACR,OAAO,KAAKb,CAAO,EAAE,SAAS,IAC1BD,EAAsBC,CAAO,IAC7BU;AAAA,EAAA;AAER;AAEA,MAAMI,IAAiB;AAAA,EACrB,SAAAH;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(t,
|
|
1
|
+
(function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t.VueDaumPostcode={},t.Vue))})(this,(function(t,n){"use strict";function h(s){let o=null;return()=>{try{return o||(o=Promise.resolve(s()).catch(a=>{throw o=null,a}))}catch(a){return Promise.reject(a)}}}var l=(s,o)=>new Promise((a,e)=>{let i=document.createElement("script");(document.head||document.body).appendChild(Object.assign(i,o,{src:s,async:!0,onload:a,onerror:()=>{i.remove(),e(new Error(`Failed to load script: ${s}`))}}))});typeof document>"u"&&(l=()=>Promise.reject(new Error("load is not supported in nodejs")));function d(s={}){const o=s.scriptUrl||"//t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",a=h(()=>l(o).then(()=>new Promise(e=>window.kakao.postcode.load(e))));return n.defineComponent({props:{q:{type:String,default:""},animation:{type:Boolean,default:!1},noAutoMapping:{type:Boolean,default:!1},noShorthand:{type:Boolean,default:!1},noSubmitMode:{type:Boolean,default:!1},pleaseReadGuide:{type:Number,default:0},pleaseReadGuideTimer:{type:Number,default:1.5},maxSuggestItems:{type:Number,default:10},showMoreHName:{type:Boolean,default:!1},hideMapBtn:{type:Boolean,default:!1},hideEngBtn:{type:Boolean,default:!1},alwaysShowEngAddr:{type:Boolean,default:!1},zonecodeOnly:{type:Boolean,default:!1},theme:{type:Object,default:()=>({})}},data(){return{styleHeight:0,isLoaded:!1}},mounted(){a().then(()=>(this.isLoaded=!0,this.$nextTick())).then(()=>{new window.kakao.Postcode({width:"100%",height:"100%",animation:this.animation,autoMapping:!this.noAutoMapping,shorthand:!this.noShorthand,pleaseReadGuide:this.pleaseReadGuide,pleaseReadGuideTimer:this.pleaseReadGuideTimer,maxSuggestItems:this.maxSuggestItems,showMoreHName:this.showMoreHName,hideMapBtn:this.hideMapBtn,hideEngBtn:this.hideEngBtn,alwaysShowEngAddr:this.alwaysShowEngAddr,zonecodeOnly:this.zonecodeOnly,theme:this.theme,submitMode:!this.noSubmitMode,onsearch:e=>{this.$emit("search",e)},oncomplete:e=>{this.$emit("complete",e)},onresize:e=>{this.styleHeight=`${e.height}px`,this.$emit("resize",e)}}).embed(this.$refs.container,{q:this.q,autoClose:!1}),this.$emit("load")}).catch(e=>{const i=new Error(`Load ${o} failed.`);i.cause=e,this.$emit("error",i)})},render(){return n.h("div",{class:["vue-daum-postcode"]},this.isLoaded||!this.$slots.loading?[n.h("div",{class:["vue-daum-postcode-container"],ref:"container",style:{height:this.styleHeight}})]:[n.h("div",{class:["vue-daum-postcode-loading"]},[this.$slots.loading()])])}})}const u=d();function r(s,{name:o,...a}={}){s.component(o??"VueDaumPostcode",Object.keys(a).length>0?d(a):u)}const c={install:r};t.VueDaumPostcode=u,t.createVueDaumPostcode=d,t.default=c,t.install=r,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
2
2
|
//# sourceMappingURL=vue-daum-postcode.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-daum-postcode.umd.js","sources":["../node_modules/nano-loader/index.mjs","../src/createVueDaumPostcode.ts","../src/VueDaumPostcode.ts","../src/index.ts"],"sourcesContent":["function
|
|
1
|
+
{"version":3,"file":"vue-daum-postcode.umd.js","sources":["../node_modules/nano-loader/index.mjs","../src/createVueDaumPostcode.ts","../src/VueDaumPostcode.ts","../src/index.ts"],"sourcesContent":["function i(r){let e=null;return()=>{try{return e||(e=Promise.resolve(r()).catch(o=>{throw e=null,o}))}catch(o){return Promise.reject(o)}}}var c=i,s=(r,e)=>new Promise((o,n)=>{let t=document.createElement(\"script\");(document.head||document.body).appendChild(Object.assign(t,e,{src:r,async:!0,onload:o,onerror:()=>{t.remove(),n(new Error(`Failed to load script: ${r}`))}}))});typeof document>\"u\"&&(s=()=>Promise.reject(new Error(\"load is not supported in nodejs\")));export{c as defer,s as load,i as once};\n","import { once, load } from \"nano-loader\";\nimport { defineComponent, PropType, h } from \"vue\";\n\nimport type {\n VueDaumPostcodeCompleteResult,\n VueDaumPostcodeResizeResult,\n VueDaumPostcodeSearchResult,\n VueDaumPostcodeTheme,\n} from \"./interfaces\";\n\nexport interface CreateVueDaumPostcodeOptions {\n scriptUrl?: string | null;\n}\n\nexport function createVueDaumPostcode(\n options: CreateVueDaumPostcodeOptions = {},\n) {\n const scriptUrl =\n options.scriptUrl ||\n \"//t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js\";\n const loadDaumPostcode = once(() =>\n load(scriptUrl).then(\n () =>\n new Promise<void>((resolve) =>\n (window as any).kakao.postcode.load(resolve),\n ),\n ),\n );\n\n return defineComponent({\n props: {\n q: {\n type: String,\n default: \"\",\n },\n animation: {\n type: Boolean,\n default: false,\n },\n noAutoMapping: {\n type: Boolean,\n default: false,\n },\n noShorthand: {\n type: Boolean,\n default: false,\n },\n noSubmitMode: {\n type: Boolean,\n default: false,\n },\n pleaseReadGuide: {\n type: Number,\n default: 0,\n },\n pleaseReadGuideTimer: {\n type: Number,\n default: 1.5,\n },\n maxSuggestItems: {\n type: Number,\n default: 10,\n },\n showMoreHName: {\n type: Boolean,\n default: false,\n },\n hideMapBtn: {\n type: Boolean,\n default: false,\n },\n hideEngBtn: {\n type: Boolean,\n default: false,\n },\n alwaysShowEngAddr: {\n type: Boolean,\n default: false,\n },\n zonecodeOnly: {\n type: Boolean,\n default: false,\n },\n theme: {\n type: Object as PropType<VueDaumPostcodeTheme>,\n default: () => ({}),\n },\n },\n data() {\n return {\n styleHeight: 0 as string | number,\n isLoaded: false,\n };\n },\n mounted() {\n loadDaumPostcode()\n .then(() => {\n this.isLoaded = true;\n return this.$nextTick();\n })\n .then(() => {\n new (window as any).kakao.Postcode({\n width: \"100%\",\n height: \"100%\",\n animation: this.animation,\n autoMapping: !this.noAutoMapping,\n shorthand: !this.noShorthand,\n pleaseReadGuide: this.pleaseReadGuide,\n pleaseReadGuideTimer: this.pleaseReadGuideTimer,\n maxSuggestItems: this.maxSuggestItems,\n showMoreHName: this.showMoreHName,\n hideMapBtn: this.hideMapBtn,\n hideEngBtn: this.hideEngBtn,\n alwaysShowEngAddr: this.alwaysShowEngAddr,\n zonecodeOnly: this.zonecodeOnly,\n theme: this.theme,\n submitMode: !this.noSubmitMode,\n onsearch: (data: VueDaumPostcodeSearchResult) => {\n this.$emit(\"search\", data);\n },\n oncomplete: (data: VueDaumPostcodeCompleteResult) => {\n this.$emit(\"complete\", data);\n },\n onresize: (data: VueDaumPostcodeResizeResult) => {\n this.styleHeight = `${data.height}px`;\n this.$emit(\"resize\", data);\n },\n }).embed(this.$refs.container, {\n q: this.q,\n autoClose: false,\n });\n this.$emit(\"load\");\n })\n .catch((e) => {\n const error = new Error(`Load ${scriptUrl} failed.`);\n error.cause = e;\n this.$emit(\"error\", error);\n });\n },\n render() {\n return h(\n \"div\",\n {\n class: [\"vue-daum-postcode\"],\n },\n this.isLoaded || !this.$slots.loading\n ? [\n h(\"div\", {\n class: [\"vue-daum-postcode-container\"],\n ref: \"container\",\n style: {\n height: this.styleHeight,\n },\n }),\n ]\n : [\n h(\n \"div\",\n {\n class: [\"vue-daum-postcode-loading\"],\n },\n [this.$slots.loading()],\n ),\n ],\n );\n },\n });\n}\n","import { createVueDaumPostcode } from \"./createVueDaumPostcode\";\n\nconst VueDaumPostcode = createVueDaumPostcode();\n\nexport default VueDaumPostcode;\n","import { App, Plugin } from \"vue\";\n\nimport VueDaumPostcode from \"./VueDaumPostcode\";\nimport { createVueDaumPostcode } from \"./createVueDaumPostcode\";\nimport type { CreateVueDaumPostcodeOptions } from \"./createVueDaumPostcode\";\nimport type {\n VueDaumPostcodeTheme,\n VueDaumPostcodeCompleteResult,\n VueDaumPostcodeSearchResult,\n VueDaumPostcodeResizeResult,\n} from \"./interfaces\";\n\nexport interface VueDaumPostcodeInstallOptions extends CreateVueDaumPostcodeOptions {\n name?: string | null;\n}\n\nexport function install(\n app: App,\n { name, ...options }: VueDaumPostcodeInstallOptions = {},\n) {\n app.component(\n name ?? \"VueDaumPostcode\",\n Object.keys(options).length > 0\n ? createVueDaumPostcode(options)\n : VueDaumPostcode,\n );\n}\n\nconst plugin: Plugin = {\n install,\n};\n\nexport {\n plugin as default,\n createVueDaumPostcode,\n CreateVueDaumPostcodeOptions,\n VueDaumPostcodeTheme,\n VueDaumPostcode,\n VueDaumPostcodeCompleteResult,\n VueDaumPostcodeSearchResult,\n VueDaumPostcodeResizeResult,\n};\n"],"names":["i","r","e","o","s","n","t","createVueDaumPostcode","options","scriptUrl","loadDaumPostcode","once","load","resolve","defineComponent","data","error","h","VueDaumPostcode","install","app","name","plugin"],"mappings":"qQAAA,SAASA,EAAEC,EAAE,CAAC,IAAIC,EAAE,KAAK,MAAM,IAAI,CAAC,GAAG,CAAC,OAAOA,IAAIA,EAAE,QAAQ,QAAQD,GAAG,EAAE,MAAME,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,CACL,OAAQ,KAAK,WAAA,CACf,CACD,CAAA,EAEH,CACEA,EAAAA,EACE,MACA,CACE,MAAO,CAAC,2BAA2B,CAAA,EAErC,CAAC,KAAK,OAAO,QAAA,CAAS,CAAA,CACxB,CACF,CAER,CAAA,CACD,CACH,CCrKA,MAAMC,EAAkBX,EAAA,ECcjB,SAASY,EACdC,EACA,CAAE,KAAAC,EAAM,GAAGb,CAAA,EAA2C,CAAA,EACtD,CACAY,EAAI,UACFC,GAAQ,kBACR,OAAO,KAAKb,CAAO,EAAE,OAAS,EAC1BD,EAAsBC,CAAO,EAC7BU,CAAA,CAER,CAEA,MAAMI,EAAiB,CACrB,QAAAH,CACF","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-daum-postcode",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"title": "Daum Postcode Component",
|
|
5
5
|
"description": "Daum(Kakao) Postcode Component for Vue 3.",
|
|
6
6
|
"author": "Changwan Jun",
|
|
@@ -17,7 +17,11 @@
|
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "git://github.com/wan2land/vue-daum-postcode.git"
|
|
19
19
|
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18"
|
|
22
|
+
},
|
|
20
23
|
"scripts": {
|
|
24
|
+
"prepare": "husky",
|
|
21
25
|
"prepack": "npm run build",
|
|
22
26
|
"test": "npm run test:lint",
|
|
23
27
|
"test:lint": "eslint 'src/**/*.ts'",
|
|
@@ -30,33 +34,30 @@
|
|
|
30
34
|
"main": "lib/vue-daum-postcode.umd.js",
|
|
31
35
|
"module": "lib/vue-daum-postcode.mjs",
|
|
32
36
|
"types": "lib/index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"types": "./lib/index.d.ts",
|
|
40
|
+
"import": "./lib/vue-daum-postcode.mjs",
|
|
41
|
+
"require": "./lib/vue-daum-postcode.umd.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
33
44
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@commitlint/
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"eslint
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
52
|
-
"eslint-plugin-vue": "^9.9.0",
|
|
53
|
-
"gh-pages": "3.2.3",
|
|
54
|
-
"husky": "8.0.3",
|
|
55
|
-
"nano-loader": "^1.1.0",
|
|
56
|
-
"prettier": "^2.8.3",
|
|
57
|
-
"simple-icons": "5.24.0",
|
|
58
|
-
"typescript": "4.9.5",
|
|
59
|
-
"vite": "4.0.4",
|
|
60
|
-
"vue": "3.2.46"
|
|
45
|
+
"@commitlint/cli": "^19.0.0",
|
|
46
|
+
"@commitlint/config-conventional": "^19.0.0",
|
|
47
|
+
"@types/node": "^22.0.0",
|
|
48
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
49
|
+
"eslint": "^9.0.0",
|
|
50
|
+
"eslint-config-prettier": "^10.0.0",
|
|
51
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
52
|
+
"eslint-plugin-vue": "^9.30.0",
|
|
53
|
+
"gh-pages": "^6.0.0",
|
|
54
|
+
"husky": "^9.0.0",
|
|
55
|
+
"nano-loader": "^1.1.2",
|
|
56
|
+
"prettier": "^3.5.0",
|
|
57
|
+
"simple-icons": "^13.0.0",
|
|
58
|
+
"typescript": "~5.8.0",
|
|
59
|
+
"typescript-eslint": "^8.0.0",
|
|
60
|
+
"vite": "^6.0.0",
|
|
61
|
+
"vue": "3.5.24"
|
|
61
62
|
}
|
|
62
63
|
}
|
|
@@ -13,18 +13,18 @@ export interface CreateVueDaumPostcodeOptions {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export function createVueDaumPostcode(
|
|
16
|
-
options: CreateVueDaumPostcodeOptions = {}
|
|
16
|
+
options: CreateVueDaumPostcodeOptions = {},
|
|
17
17
|
) {
|
|
18
18
|
const scriptUrl =
|
|
19
19
|
options.scriptUrl ||
|
|
20
|
-
"//t1.
|
|
20
|
+
"//t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
|
|
21
21
|
const loadDaumPostcode = once(() =>
|
|
22
22
|
load(scriptUrl).then(
|
|
23
23
|
() =>
|
|
24
24
|
new Promise<void>((resolve) =>
|
|
25
|
-
(window as any).
|
|
26
|
-
)
|
|
27
|
-
)
|
|
25
|
+
(window as any).kakao.postcode.load(resolve),
|
|
26
|
+
),
|
|
27
|
+
),
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
return defineComponent({
|
|
@@ -99,7 +99,7 @@ export function createVueDaumPostcode(
|
|
|
99
99
|
return this.$nextTick();
|
|
100
100
|
})
|
|
101
101
|
.then(() => {
|
|
102
|
-
new (window as any).
|
|
102
|
+
new (window as any).kakao.Postcode({
|
|
103
103
|
width: "100%",
|
|
104
104
|
height: "100%",
|
|
105
105
|
animation: this.animation,
|
|
@@ -159,9 +159,9 @@ export function createVueDaumPostcode(
|
|
|
159
159
|
{
|
|
160
160
|
class: ["vue-daum-postcode-loading"],
|
|
161
161
|
},
|
|
162
|
-
[this.$slots.loading()]
|
|
162
|
+
[this.$slots.loading()],
|
|
163
163
|
),
|
|
164
|
-
]
|
|
164
|
+
],
|
|
165
165
|
);
|
|
166
166
|
},
|
|
167
167
|
});
|
package/src/index.ts
CHANGED
|
@@ -10,20 +10,19 @@ import type {
|
|
|
10
10
|
VueDaumPostcodeResizeResult,
|
|
11
11
|
} from "./interfaces";
|
|
12
12
|
|
|
13
|
-
export interface VueDaumPostcodeInstallOptions
|
|
14
|
-
extends CreateVueDaumPostcodeOptions {
|
|
13
|
+
export interface VueDaumPostcodeInstallOptions extends CreateVueDaumPostcodeOptions {
|
|
15
14
|
name?: string | null;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export function install(
|
|
19
18
|
app: App,
|
|
20
|
-
{ name, ...options }: VueDaumPostcodeInstallOptions = {}
|
|
19
|
+
{ name, ...options }: VueDaumPostcodeInstallOptions = {},
|
|
21
20
|
) {
|
|
22
21
|
app.component(
|
|
23
22
|
name ?? "VueDaumPostcode",
|
|
24
23
|
Object.keys(options).length > 0
|
|
25
24
|
? createVueDaumPostcode(options)
|
|
26
|
-
: VueDaumPostcode
|
|
25
|
+
: VueDaumPostcode,
|
|
27
26
|
);
|
|
28
27
|
}
|
|
29
28
|
|