vue-daum-postcode 1.2.1 → 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 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 'vue'
31
- import VueDaumPostcode from 'vue-daum-postcode'
32
-
33
-
34
- const app = createApp(/* */)
29
+ import { createApp } from "vue";
30
+ import VueDaumPostcode from "vue-daum-postcode";
35
31
 
36
- app.use(VueDaumPostcode) // export default is plugin
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 'vue-daum-postcode'
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: 'DaumPostcode',
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: "https://s3.ap-northeast-2.amazonaws.com/YOUR_BUCKET_NAME/postcode.v2.js"
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` | `String` | 검색어 | `""`
82
- `animation` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `animation`. | `false`
83
- `noAutoMapping` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `autoMapping`, 기본값을 `true`에서 `false`로 조정. | `false`
84
- `noShorthand` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `shorthand`, 기본값을 `true`에서 `false`로 조정. | `false`
85
- `pleaseReadGuide` | `Number` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `pleaseReadGuide`. | `0`
86
- `pleaseReadGuideTimer` | `Number` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `pleaseReadGuideTimer`. | `1.5`
87
- `maxSuggestItems` | `Number` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `maxSuggestItems`. | `10`
88
- `showMoreHName` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `showMoreHName`. | `false`
89
- `hideMapBtn` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `hideMapBtn`. | `false`
90
- `hideEngBtn` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `hideEngBtn`. | `false`
91
- `alwaysShowEngAddr` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `alwaysShowEngAddr`. | `false`
92
- `zonecodeOnly` | `Boolean` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `zonecodeOnly`. | `false`
93
- `noSubmitMode` | `Boolean` | Submit Mode 비활성화시 사용. ([관련 이슈 링크](https://github.com/daumPostcode/QnA/issues/286)) | `false`
94
- `theme` | `object` | [Daum 우편번호, 생성자속성](http://postcode.map.daum.net/guide)에서 `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` | [Daum 우편번호, 속성](http://postcode.map.daum.net/guide)에서 `onsearch`.
102
- `complete` | [Daum 우편번호, 속성](http://postcode.map.daum.net/guide)에서 `oncomplete`.
103
- `resize` | [Daum 우편번호, 속성](http://postcode.map.daum.net/guide)에서 `onresize`.
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` | 다음 우편번호가 아직 완전히 불러오기 전에 보여줄 내용이 있는 경우 해당 슬롯에 넣습니다. (ex. spinner)
106
+ | 이름 | 설명 |
107
+ | --------- | ----------------------------------------------------------------------------------------------------- |
108
+ | `loading` | 다음 우편번호가 아직 완전히 불러오기 전에 보여줄 내용이 있는 경우 해당 슬롯에 넣습니다. (ex. spinner) |
@@ -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
- }, unknown, {
58
+ }>, {}, {
59
59
  styleHeight: string | number;
60
60
  isLoaded: boolean;
61
- }, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
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
- }, unknown, {
63
+ }>, {}, {
64
64
  styleHeight: string | number;
65
65
  isLoaded: boolean;
66
- }, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
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,4 +1,4 @@
1
- import { defineComponent as r, h as s } from "vue";
1
+ import { defineComponent as r, h as n } from "vue";
2
2
  function l(a) {
3
3
  let t = null;
4
4
  return () => {
@@ -12,14 +12,17 @@ function l(a) {
12
12
  };
13
13
  }
14
14
  var i = (a, t) => new Promise((o, e) => {
15
- (document.head || document.body).appendChild(Object.assign(document.createElement("script"), t, { src: a, async: !0, onload: o, onerror: () => e(new Error(`Failed to load script: ${a}`)) }));
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.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js", o = l(
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.daum.postcode.load(e)
25
+ (e) => window.kakao.postcode.load(e)
23
26
  )
24
27
  )
25
28
  );
@@ -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.daum.Postcode({
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 n = new Error(`Load ${t} failed.`);
124
- n.cause = e, this.$emit("error", n);
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 s(
131
+ return n(
129
132
  "div",
130
133
  {
131
134
  class: ["vue-daum-postcode"]
132
135
  },
133
136
  this.isLoaded || !this.$slots.loading ? [
134
- s("div", {
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
- s(
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 u = d();
155
- function h(a, { name: t, ...o } = {}) {
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) : u
161
+ Object.keys(o).length > 0 ? d(o) : h
159
162
  );
160
163
  }
161
164
  const m = {
162
- install: h
165
+ install: u
163
166
  };
164
167
  export {
165
- u as VueDaumPostcode,
168
+ h as VueDaumPostcode,
166
169
  d as createVueDaumPostcode,
167
170
  m as default,
168
- h as install
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 n(o){let e=null;return()=>{try{return e||(e=Promise.resolve(o()).catch(r=>{throw e=null,r}))}catch(r){return Promise.reject(r)}}}var s=n,i=(o,e)=>new Promise((r,t)=>{(document.head||document.body).appendChild(Object.assign(document.createElement(\"script\"),e,{src:o,async:!0,onload:r,onerror:()=>t(new Error(`Failed to load script: ${o}`))}))});typeof document>\"u\"&&(i=()=>Promise.reject(new Error(\"load is not supported in nodejs\")));export{s as defer,i as load,n 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.daumcdn.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).daum.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).daum.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\n 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":["n","o","e","r","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,EAAC,CAAE,EAAE,MAAM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,cAAc,GAAGA,EAAK,YACtB,KAAA,MAAM,UAAUA,CAAI;AAAA,UAC3B;AAAA,QACD,CAAA,EAAE,MAAM,KAAK,MAAM,WAAW;AAAA,UAC7B,GAAG,KAAK;AAAA,UACR,WAAW;AAAA,QAAA,CACZ,GACD,KAAK,MAAM,MAAM;AAAA,MAAA,CAClB,EACA,MAAM,CAAC,MAAM;AACZ,cAAMC,IAAQ,IAAI,MAAM,QAAQP,WAAmB;AACnD,QAAAO,EAAM,QAAQ,GACT,KAAA,MAAM,SAASA,CAAK;AAAA,MAAA,CAC1B;AAAA,IACL;AAAA,IACA,SAAS;AACA,aAAAC;AAAA,QACL;AAAA,QACA;AAAA,UACE,OAAO,CAAC,mBAAmB;AAAA,QAC7B;AAAA,QACA,KAAK,YAAY,CAAC,KAAK,OAAO,UAC1B;AAAA,UACEA,EAAE,OAAO;AAAA,YACP,OAAO,CAAC,6BAA6B;AAAA,YACrC,KAAK;AAAA,YACL,OAAO;AAAA,cACL,QAAQ,KAAK;AAAA,YACf;AAAA,UAAA,CACD;AAAA,QAAA,IAEH;AAAA,UACEA;AAAA,YACE;AAAA,YACA;AAAA,cACE,OAAO,CAAC,2BAA2B;AAAA,YACrC;AAAA,YACA,CAAC,KAAK,OAAO,SAAS;AAAA,UACxB;AAAA,QACF;AAAA,MAAA;AAAA,IAER;AAAA,EAAA,CACD;AACH;ACrKA,MAAMC,IAAkBX,EAAsB;ACe9B,SAAAY,EACdC,GACA,EAAE,MAAAC,GAAM,GAAGb,EAAQ,IAAmC,CAAA,GACtD;AACI,EAAAY,EAAA;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
+ {"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,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AAC,MAAM;AACZ,cAAMC,IAAQ,IAAI,MAAM,QAAQP,CAAS,UAAU;AACnD,QAAAO,EAAM,QAAQ,GACd,KAAK,MAAM,SAASA,CAAK;AAAA,MAC3B,CAAC;AAAA,IACL;AAAA,IACA,SAAS;AACP,aAAOC;AAAA,QACL;AAAA,QACA;AAAA,UACE,OAAO,CAAC,mBAAmB;AAAA,QAAA;AAAA,QAE7B,KAAK,YAAY,CAAC,KAAK,OAAO,UAC1B;AAAA,UACEA,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,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(t=typeof globalThis<"u"?globalThis:t||self,s(t.VueDaumPostcode={},t.Vue))})(this,function(t,s){"use strict";function h(a){let o=null;return()=>{try{return o||(o=Promise.resolve(a()).catch(n=>{throw o=null,n}))}catch(n){return Promise.reject(n)}}}var d=(a,o)=>new Promise((n,e)=>{(document.head||document.body).appendChild(Object.assign(document.createElement("script"),o,{src:a,async:!0,onload:n,onerror:()=>e(new Error(`Failed to load script: ${a}`))}))});typeof document>"u"&&(d=()=>Promise.reject(new Error("load is not supported in nodejs")));function i(a={}){const o=a.scriptUrl||"//t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js",n=h(()=>d(o).then(()=>new Promise(e=>window.daum.postcode.load(e))));return s.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(){n().then(()=>(this.isLoaded=!0,this.$nextTick())).then(()=>{new window.daum.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 r=new Error(`Load ${o} failed.`);r.cause=e,this.$emit("error",r)})},render(){return s.h("div",{class:["vue-daum-postcode"]},this.isLoaded||!this.$slots.loading?[s.h("div",{class:["vue-daum-postcode-container"],ref:"container",style:{height:this.styleHeight}})]:[s.h("div",{class:["vue-daum-postcode-loading"]},[this.$slots.loading()])])}})}const l=i();function u(a,{name:o,...n}={}){a.component(o??"VueDaumPostcode",Object.keys(n).length>0?i(n):l)}const c={install:u};t.VueDaumPostcode=l,t.createVueDaumPostcode=i,t.default=c,t.install=u,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
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 n(o){let e=null;return()=>{try{return e||(e=Promise.resolve(o()).catch(r=>{throw e=null,r}))}catch(r){return Promise.reject(r)}}}var s=n,i=(o,e)=>new Promise((r,t)=>{(document.head||document.body).appendChild(Object.assign(document.createElement(\"script\"),e,{src:o,async:!0,onload:r,onerror:()=>t(new Error(`Failed to load script: ${o}`))}))});typeof document>\"u\"&&(i=()=>Promise.reject(new Error(\"load is not supported in nodejs\")));export{s as defer,i as load,n 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.daumcdn.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).daum.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).daum.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\n 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":["n","o","e","r","i","t","createVueDaumPostcode","options","scriptUrl","loadDaumPostcode","once","load","resolve","defineComponent","data","error","h","VueDaumPostcode","install","app","name","plugin"],"mappings":"oQAAA,SAASA,EAAEC,EAAE,CAAC,IAAIC,EAAE,KAAK,MAAM,IAAI,CAAC,GAAG,CAAC,OAAOA,IAAIA,EAAE,QAAQ,QAAQD,EAAC,CAAE,EAAE,MAAME,GAAG,CAAC,MAAMD,EAAE,KAAKC,CAAC,CAAC,EAAE,OAAOA,EAAN,CAAS,OAAO,QAAQ,OAAOA,CAAC,CAAC,CAAC,CAAC,CAAI,IAAKC,EAAE,CAACH,EAAEC,IAAI,IAAI,QAAQ,CAACC,EAAEE,IAAI,EAAE,SAAS,MAAM,SAAS,MAAM,YAAY,OAAO,OAAO,SAAS,cAAc,QAAQ,EAAEH,EAAE,CAAC,IAAID,EAAE,MAAM,GAAG,OAAOE,EAAE,QAAQ,IAAIE,EAAE,IAAI,MAAM,0BAA0BJ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,SAAS,MAAMG,EAAE,IAAI,QAAQ,OAAO,IAAI,MAAM,iCAAiC,CAAC,GCcxa,SAAAE,EACdC,EAAwC,GACxC,CACM,MAAAC,EACJD,EAAQ,WACR,gEACIE,EAAmBC,EAAK,IAC5BC,EAAKH,CAAS,EAA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AYA,CAAI,CAC7B,EACA,SAAWA,GAAsC,CAC1C,KAAA,YAAc,GAAGA,EAAK,WACtB,KAAA,MAAM,SAAUA,CAAI,CAC3B,CACD,CAAA,EAAE,MAAM,KAAK,MAAM,UAAW,CAC7B,EAAG,KAAK,EACR,UAAW,EAAA,CACZ,EACD,KAAK,MAAM,MAAM,CAAA,CAClB,EACA,MAAO,GAAM,CACZ,MAAMC,EAAQ,IAAI,MAAM,QAAQP,WAAmB,EACnDO,EAAM,MAAQ,EACT,KAAA,MAAM,QAASA,CAAK,CAAA,CAC1B,CACL,EACA,QAAS,CACA,OAAAC,EAAA,EACL,MACA,CACE,MAAO,CAAC,mBAAmB,CAC7B,EACA,KAAK,UAAY,CAAC,KAAK,OAAO,QAC1B,CACEA,EAAAA,EAAE,MAAO,CACP,MAAO,CAAC,6BAA6B,EACrC,IAAK,YACL,MAAO,CACL,OAAQ,KAAK,WACf,CAAA,CACD,CAAA,EAEH,CACEA,EAAA,EACE,MACA,CACE,MAAO,CAAC,2BAA2B,CACrC,EACA,CAAC,KAAK,OAAO,SAAS,CACxB,CACF,CAAA,CAER,CAAA,CACD,CACH,CCrKM,MAAAC,EAAkBX,EAAsB,ECe9B,SAAAY,EACdC,EACA,CAAE,KAAAC,EAAM,GAAGb,CAAQ,EAAmC,CAAA,EACtD,CACIY,EAAA,UACFC,GAAQ,kBACR,OAAO,KAAKb,CAAO,EAAE,OAAS,EAC1BD,EAAsBC,CAAO,EAC7BU,CAAA,CAER,CAEA,MAAMI,EAAiB,CACrB,QAAAH,CACF","x_google_ignoreList":[0]}
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,GAAG,CAAC,MAAMD,EAAE,KAAKC,CAAC,CAAC,EAAE,OAAOA,EAAE,CAAC,OAAO,QAAQ,OAAOA,CAAC,CAAC,CAAC,CAAC,CAAI,IAAKC,EAAE,CAACH,EAAEC,IAAI,IAAI,QAAQ,CAACC,EAAEE,IAAI,CAAC,IAAIC,EAAE,SAAS,cAAc,QAAQ,GAAG,SAAS,MAAM,SAAS,MAAM,YAAY,OAAO,OAAOA,EAAEJ,EAAE,CAAC,IAAID,EAAE,MAAM,GAAG,OAAOE,EAAE,QAAQ,IAAI,CAACG,EAAE,OAAM,EAAGD,EAAE,IAAI,MAAM,0BAA0BJ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,SAAS,MAAMG,EAAE,IAAI,QA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vue-daum-postcode",
3
- "version": "1.2.1",
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,32 +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
- "@babel/types": "^7.20.7",
35
- "@commitlint/cli": "17.6.5",
36
- "@commitlint/config-conventional": "17.6.5",
37
- "@rushstack/eslint-patch": "^1.2.0",
38
- "@types/node": "^18.16.16",
39
- "@typescript-eslint/eslint-plugin": "^5.50.0",
40
- "@typescript-eslint/parser": "^5.50.0",
41
- "@vitejs/plugin-vue": "4.2.3",
42
- "@vue/compiler-sfc": "3.3.4",
43
- "@vue/eslint-config-prettier": "^7.0.0",
44
- "@vue/eslint-config-typescript": "^11.0.2",
45
- "eslint": "^8.33.0",
46
- "eslint-config-prettier": "^8.6.0",
47
- "eslint-import-resolver-typescript": "^3.5.3",
48
- "eslint-plugin-import": "^2.27.5",
49
- "eslint-plugin-prettier": "^4.2.1",
50
- "eslint-plugin-simple-import-sort": "^10.0.0",
51
- "eslint-plugin-vue": "^9.9.0",
52
- "gh-pages": "^5.0.0",
53
- "husky": "8.0.3",
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",
54
55
  "nano-loader": "^1.1.2",
55
- "prettier": "^2.8.3",
56
- "simple-icons": "^9.0.0",
57
- "typescript": "4.9.5",
58
- "vite": "4.3.9",
59
- "vue": "3.3.4"
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"
60
62
  }
61
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.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
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).daum.postcode.load(resolve)
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).daum.Postcode({
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