react-daumpost-hook 1.1.8 → 1.1.9

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
@@ -100,7 +100,7 @@ import ReactDaumPost from 'react-daumpost-hook';
100
100
  1. **`ref (?ref)`** : 다음 우편번호 찾기 검색창을 삽입시킬 컴포넌트입니다. useRef를 통해서 셀렉한 ref를 넘깁니다., **해당 속성을 비워두시면 자동으로 우편코드 검색 창을 팝업 방식**으로 띄웁니다.
101
101
 
102
102
  2. **`apiUrl (?string)`** : 다음 API 스크립트 경로입니다. 선택사항이며 제공되는 API 경로가 변경된 경우 해당 값으로 변경해주시면 됩니다.
103
- **`기본값은 "t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"`** 입니다.
103
+ **`기본값은 "t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"`** 입니다.
104
104
 
105
105
  3. **`method (?object)`** : 다음 API에서 제공되는 **생성자들을 사용하실 경우 제공되는 인터페이스**입니다. 아래와 같이 객체를 생성하여서 method 인수로 넘겨주시면됩니다.
106
106
 
package/package.json CHANGED
@@ -1,43 +1,43 @@
1
- {
2
- "name": "react-daumpost-hook",
3
- "version": "1.1.8",
4
- "description": "다음 카카오에서 무료로 제공하는 우편번호(주소찾기) API를 쉽게 기존 코드에 연결 할 수 있는 hook 패키지 입니다.",
5
- "main": "src/index.js",
6
- "types": "src/index.d.ts",
7
- "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/yoonjonglyu/react-daumpost-hook.git"
13
- },
14
- "keywords": [
15
- "react",
16
- "daum",
17
- "postcode",
18
- "hook",
19
- "kakao",
20
- "우편번호",
21
- "주소찾기",
22
- "커스텀훅",
23
- "daum address",
24
- "address",
25
- "korea",
26
- "daum postcode",
27
- "kakao postcode",
28
- "kakao address"
29
- ],
30
- "files": [
31
- "src",
32
- "index.js"
33
- ],
34
- "author": "ISA",
35
- "license": "MIT",
36
- "bugs": {
37
- "url": "https://github.com/yoonjonglyu/react-daumpost-hook/issues"
38
- },
39
- "homepage": "https://github.com/yoonjonglyu/react-daumpost-hook#readme",
40
- "dependencies": {
41
- "isa-util": "^1.0.7"
42
- }
43
- }
1
+ {
2
+ "name": "react-daumpost-hook",
3
+ "version": "1.1.9",
4
+ "description": "다음 카카오에서 무료로 제공하는 우편번호(주소찾기) API를 쉽게 기존 코드에 연결 할 수 있는 hook 패키지 입니다.",
5
+ "main": "src/index.js",
6
+ "types": "src/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/yoonjonglyu/react-daumpost-hook.git"
10
+ },
11
+ "keywords": [
12
+ "react",
13
+ "daum",
14
+ "postcode",
15
+ "hook",
16
+ "kakao",
17
+ "우편번호",
18
+ "주소찾기",
19
+ "커스텀훅",
20
+ "daum address",
21
+ "address",
22
+ "korea",
23
+ "daum postcode",
24
+ "kakao postcode",
25
+ "kakao address"
26
+ ],
27
+ "files": [
28
+ "src",
29
+ "index.js"
30
+ ],
31
+ "author": "ISA",
32
+ "license": "MIT",
33
+ "bugs": {
34
+ "url": "https://github.com/yoonjonglyu/react-daumpost-hook/issues"
35
+ },
36
+ "homepage": "https://github.com/yoonjonglyu/react-daumpost-hook#readme",
37
+ "dependencies": {
38
+ "isa-util": "^1.0.7"
39
+ },
40
+ "scripts": {
41
+ "test": "echo \"Error: no test specified\" && exit 1"
42
+ }
43
+ }
package/src/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type {RefObject} from 'react';
2
2
 
3
3
  export {};
4
4
  declare global {
@@ -15,7 +15,7 @@ declare module 'react-daumpost-hook' {
15
15
  }
16
16
 
17
17
  interface ReactDaumPostProps {
18
- ref?: React.MutableRefObject<any>;
18
+ ref?: RefObject<any>;
19
19
  onComplete: (state: PostStateProps) => void;
20
20
  apiUrl?: string;
21
21
  method?: {
@@ -7,7 +7,7 @@ function daumPostCodeHook(props) {
7
7
  const __postcodeUrl =
8
8
  apiUrl !== undefined
9
9
  ? apiUrl
10
- : '//t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js';
10
+ : '//t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js';
11
11
  const __scriptId = 'daumpostcodemapv2';
12
12
  const __method = { ...method };
13
13
  const __onComplete =
@@ -22,7 +22,7 @@ function daumPostCodeHook(props) {
22
22
  };
23
23
 
24
24
  const getPostCodeEmbed = () => {
25
- new window.daum.Postcode({
25
+ new window.kakao.Postcode({
26
26
  oncomplete: __onComplete,
27
27
  onresize: function (size) {
28
28
  ref.current.style.height = size.height + 'px';