@apt.today/react-seoul-icons 1.1.0 → 1.2.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/README.md +126 -362
- package/dist/index.d.mts +111 -112
- package/dist/index.d.ts +111 -112
- package/dist/index.js +515 -186
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +510 -167
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -83,14 +83,24 @@ declare const GimpoSi: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runti
|
|
|
83
83
|
|
|
84
84
|
declare const PajuSi: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
85
85
|
|
|
86
|
+
declare const UijeongbuSi: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
87
|
+
|
|
86
88
|
declare const Busan: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
87
89
|
|
|
88
90
|
declare const HaeundaeGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
89
91
|
|
|
90
92
|
declare const Ulsan: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
91
93
|
|
|
94
|
+
declare const UlsanJungGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
95
|
+
|
|
92
96
|
declare const UlsanNamGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
93
97
|
|
|
98
|
+
declare const UlsanDongGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
declare const UlsanBukGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
101
|
+
|
|
102
|
+
declare const UlsanUljuGun: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
103
|
+
|
|
94
104
|
declare const Daegu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
95
105
|
|
|
96
106
|
declare const SuseongGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
@@ -100,130 +110,119 @@ declare const Incheon: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runti
|
|
|
100
110
|
declare const YeonsuGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
101
111
|
|
|
102
112
|
/**
|
|
103
|
-
*
|
|
113
|
+
* 아이콘 컴포넌트 타입
|
|
104
114
|
*/
|
|
105
|
-
type
|
|
106
|
-
/**
|
|
107
|
-
* 시도 단축명 (하위 호환성)
|
|
108
|
-
*/
|
|
109
|
-
type RegionCode = "서울" | "부산" | "대구" | "인천" | "광주" | "대전" | "울산" | "세종" | "경기" | "강원" | "충북" | "충남" | "전북" | "전남" | "경북" | "경남" | "제주";
|
|
115
|
+
type IconComponent = React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
110
116
|
/**
|
|
111
|
-
*
|
|
117
|
+
* 시도(광역자치단체) 정보
|
|
112
118
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
type SeoulGuIconComponent = IconComponent;
|
|
116
|
-
interface SidoInfo {
|
|
117
|
-
code: SidoCode;
|
|
118
|
-
name: string;
|
|
119
|
-
shortName: RegionCode;
|
|
120
|
-
englishName: string;
|
|
121
|
-
component: IconComponent | null;
|
|
122
|
-
}
|
|
123
|
-
interface SigunguInfo {
|
|
119
|
+
interface RegionInfo {
|
|
120
|
+
/** 시도 코드 (2자리, 예: 11 = 서울특별시) */
|
|
124
121
|
code: number;
|
|
125
|
-
|
|
122
|
+
/** 전체 이름 (예: "서울특별시") */
|
|
126
123
|
name: string;
|
|
124
|
+
/** 단축명 (예: "서울") */
|
|
127
125
|
shortName: string;
|
|
128
|
-
|
|
126
|
+
/** 영문명 (예: "Seoul") */
|
|
127
|
+
englishName: string;
|
|
128
|
+
/** 아이콘 컴포넌트 (없으면 null) */
|
|
129
|
+
component: IconComponent | null;
|
|
129
130
|
}
|
|
130
|
-
|
|
131
|
+
/**
|
|
132
|
+
* 시군구(기초자치단체) 아이콘 정보
|
|
133
|
+
*/
|
|
134
|
+
interface IconInfo {
|
|
135
|
+
/** 시군구 코드 (5자리, 예: 11680 = 강남구) */
|
|
131
136
|
code: number;
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
/** 소속 시도 코드 (2자리) */
|
|
138
|
+
regionCode: number;
|
|
139
|
+
/** 소속 시도명 (예: "서울특별시") */
|
|
140
|
+
regionName: string;
|
|
141
|
+
/** 이름 (예: "강남구") */
|
|
134
142
|
name: string;
|
|
143
|
+
/** 단축명 (예: "강남") */
|
|
135
144
|
shortName: string;
|
|
145
|
+
/** 컴포넌트 영문명 (예: "GangnamGu") */
|
|
146
|
+
componentName: string;
|
|
147
|
+
/** 아이콘 컴포넌트 */
|
|
136
148
|
component: IconComponent;
|
|
137
149
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
* @param code - 시도 코드 (예: 11 = 서울특별시)
|
|
141
|
-
*/
|
|
142
|
-
declare function getSidoIcon(code: SidoCode): IconComponent | null;
|
|
143
|
-
/**
|
|
144
|
-
* 시도 코드로 정보를 가져옵니다.
|
|
145
|
-
*/
|
|
146
|
-
declare function getSidoInfo(code: SidoCode): SidoInfo | undefined;
|
|
147
|
-
/**
|
|
148
|
-
* 시도 단축명으로 정보를 가져옵니다.
|
|
149
|
-
* @param shortName - 시도 단축명 (예: "서울", "부산")
|
|
150
|
-
*/
|
|
151
|
-
declare function getSidoByShortName(shortName: RegionCode): SidoInfo | undefined;
|
|
152
|
-
/**
|
|
153
|
-
* 모든 시도 정보를 반환합니다.
|
|
154
|
-
*/
|
|
155
|
-
declare function getAllSidoInfo(): readonly SidoInfo[];
|
|
156
|
-
/**
|
|
157
|
-
* 아이콘이 있는 시도 정보만 반환합니다.
|
|
158
|
-
*/
|
|
159
|
-
declare function getAvailableSidoInfo(): SidoInfo[];
|
|
160
|
-
/**
|
|
161
|
-
* 시군구 코드로 아이콘을 가져옵니다.
|
|
162
|
-
* @param code - 시군구 코드 (예: 11680 = 강남구)
|
|
163
|
-
*/
|
|
164
|
-
declare function getSigunguIcon(code: number): IconComponent | undefined;
|
|
165
|
-
/**
|
|
166
|
-
* 시군구 코드로 정보를 가져옵니다.
|
|
167
|
-
*/
|
|
168
|
-
declare function getSigunguInfo(code: number): SigunguInfo | undefined;
|
|
169
|
-
/**
|
|
170
|
-
* 특정 시도의 모든 시군구 정보를 반환합니다.
|
|
171
|
-
*/
|
|
172
|
-
declare function getSigunguBySido(sidoCode: SidoCode): SigunguInfo[];
|
|
173
|
-
/**
|
|
174
|
-
* 모든 시군구 정보를 반환합니다.
|
|
175
|
-
*/
|
|
176
|
-
declare function getAllSigunguInfo(): readonly SigunguInfo[];
|
|
177
|
-
interface GetIconByNameOptions {
|
|
150
|
+
|
|
151
|
+
declare const utils: {
|
|
178
152
|
/**
|
|
179
|
-
*
|
|
153
|
+
* 코드로 아이콘 컴포넌트를 가져옵니다.
|
|
154
|
+
* 시도 코드(2자리)와 시군구 코드(5자리)를 자동으로 판별합니다.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* utils.getIcon(11) // 서울특별시
|
|
158
|
+
* utils.getIcon(11680) // 강남구
|
|
180
159
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
160
|
+
getIcon(code: number): IconComponent | null;
|
|
161
|
+
/**
|
|
162
|
+
* 이름으로 아이콘 컴포넌트를 검색합니다.
|
|
163
|
+
* 다양한 형식을 지원합니다.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* utils.findByName("강남구") // OK
|
|
167
|
+
* utils.findByName("강남") // OK
|
|
168
|
+
* utils.findByName("서울특별시 강남구") // OK
|
|
169
|
+
* utils.findByName("서울 강남구") // OK
|
|
170
|
+
* utils.findByName("중구", { region: "서울" }) // 중복 이름 해소
|
|
171
|
+
*/
|
|
172
|
+
findByName(name: string, options?: {
|
|
173
|
+
region?: string;
|
|
174
|
+
}): IconComponent | null;
|
|
175
|
+
/**
|
|
176
|
+
* 코드로 아이콘 상세 정보를 가져옵니다.
|
|
177
|
+
* 시도 코드(2자리)는 RegionInfo를, 시군구 코드(5자리)는 IconInfo를 반환합니다.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* utils.getInfo(11680) // { code: 11680, name: "강남구", regionName: "서울특별시", ... }
|
|
181
|
+
*/
|
|
182
|
+
getInfo(code: number): IconInfo | RegionInfo | null;
|
|
183
|
+
/**
|
|
184
|
+
* 특정 시도에 속한 모든 시군구 아이콘 정보를 반환합니다.
|
|
185
|
+
* 시도 코드(숫자) 또는 단축명(문자열) 모두 사용 가능합니다.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* utils.getByRegion(11) // 서울시 모든 구
|
|
189
|
+
* utils.getByRegion("서울") // 서울시 모든 구
|
|
190
|
+
* utils.getByRegion("경기") // 경기도 모든 시
|
|
191
|
+
*/
|
|
192
|
+
getByRegion(regionCodeOrName: number | string): IconInfo[];
|
|
193
|
+
/**
|
|
194
|
+
* 모든 시도(광역자치단체) 정보를 반환합니다.
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* const regions = utils.getAllRegions()
|
|
198
|
+
* // [{ code: 11, name: "서울특별시", ... }, ...]
|
|
199
|
+
*/
|
|
200
|
+
getAllRegions(): readonly RegionInfo[];
|
|
201
|
+
/**
|
|
202
|
+
* 아이콘이 있는 시도 정보만 반환합니다.
|
|
203
|
+
*/
|
|
204
|
+
getAvailableRegions(): RegionInfo[];
|
|
205
|
+
/**
|
|
206
|
+
* 시군구가 있는 시도 정보만 반환합니다.
|
|
207
|
+
*/
|
|
208
|
+
getRegionsWithIcons(): RegionInfo[];
|
|
209
|
+
/**
|
|
210
|
+
* 모든 시군구 아이콘 정보를 반환합니다.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* const all = utils.getAll()
|
|
214
|
+
* all.map(icon => <icon.component key={icon.code} width={48} />)
|
|
215
|
+
*/
|
|
216
|
+
getAll(): readonly IconInfo[];
|
|
217
|
+
/**
|
|
218
|
+
* 유효한 시도 또는 시군구 코드인지 확인합니다.
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* utils.isValid(11680) // true (강남구)
|
|
222
|
+
* utils.isValid(11) // true (서울특별시)
|
|
223
|
+
* utils.isValid(99999) // false
|
|
224
|
+
*/
|
|
225
|
+
isValid(code: number): boolean;
|
|
226
|
+
};
|
|
228
227
|
|
|
229
|
-
export { AnyangSi, Busan, Daegu,
|
|
228
|
+
export { AnyangSi, Busan, Daegu, DobongGu, DongdaemunGu, DongjakGu, EunpyeongGu, GangbukGu, GangdongGu, GangnamGu, GangseoGu, GeumcheonGu, GimpoSi, GoyangSi, GuriSi, GuroGu, GwacheonSi, GwanakGu, GwangjinGu, GwangmyeongSi, Gyeonggi, HaeundaeGu, HanamSi, HwaseongSi, type IconComponent, type IconInfo, Incheon, JongnoGu, JungGu, JungnangGu, MapoGu, NamyangjuSi, NowonGu, PajuSi, type RegionInfo, SeochoGu, SeodaemunGu, SeongbukGu, SeongdongGu, SeongnamSi, Seoul, SongpaGu, SuseongGu, SuwonSi, UijeongbuSi, UiwangSi, Ulsan, UlsanBukGu, UlsanDongGu, UlsanJungGu, UlsanNamGu, UlsanUljuGun, YangcheonGu, YeongdeungpoGu, YeonsuGu, YonginSi, YongsanGu, utils };
|
package/dist/index.d.ts
CHANGED
|
@@ -83,14 +83,24 @@ declare const GimpoSi: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runti
|
|
|
83
83
|
|
|
84
84
|
declare const PajuSi: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
85
85
|
|
|
86
|
+
declare const UijeongbuSi: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
87
|
+
|
|
86
88
|
declare const Busan: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
87
89
|
|
|
88
90
|
declare const HaeundaeGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
89
91
|
|
|
90
92
|
declare const Ulsan: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
91
93
|
|
|
94
|
+
declare const UlsanJungGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
95
|
+
|
|
92
96
|
declare const UlsanNamGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
93
97
|
|
|
98
|
+
declare const UlsanDongGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
declare const UlsanBukGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
101
|
+
|
|
102
|
+
declare const UlsanUljuGun: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
103
|
+
|
|
94
104
|
declare const Daegu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
95
105
|
|
|
96
106
|
declare const SuseongGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
@@ -100,130 +110,119 @@ declare const Incheon: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runti
|
|
|
100
110
|
declare const YeonsuGu: (props: React.SVGProps<SVGSVGElement>) => react_jsx_runtime.JSX.Element;
|
|
101
111
|
|
|
102
112
|
/**
|
|
103
|
-
*
|
|
113
|
+
* 아이콘 컴포넌트 타입
|
|
104
114
|
*/
|
|
105
|
-
type
|
|
106
|
-
/**
|
|
107
|
-
* 시도 단축명 (하위 호환성)
|
|
108
|
-
*/
|
|
109
|
-
type RegionCode = "서울" | "부산" | "대구" | "인천" | "광주" | "대전" | "울산" | "세종" | "경기" | "강원" | "충북" | "충남" | "전북" | "전남" | "경북" | "경남" | "제주";
|
|
115
|
+
type IconComponent = React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
110
116
|
/**
|
|
111
|
-
*
|
|
117
|
+
* 시도(광역자치단체) 정보
|
|
112
118
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
type SeoulGuIconComponent = IconComponent;
|
|
116
|
-
interface SidoInfo {
|
|
117
|
-
code: SidoCode;
|
|
118
|
-
name: string;
|
|
119
|
-
shortName: RegionCode;
|
|
120
|
-
englishName: string;
|
|
121
|
-
component: IconComponent | null;
|
|
122
|
-
}
|
|
123
|
-
interface SigunguInfo {
|
|
119
|
+
interface RegionInfo {
|
|
120
|
+
/** 시도 코드 (2자리, 예: 11 = 서울특별시) */
|
|
124
121
|
code: number;
|
|
125
|
-
|
|
122
|
+
/** 전체 이름 (예: "서울특별시") */
|
|
126
123
|
name: string;
|
|
124
|
+
/** 단축명 (예: "서울") */
|
|
127
125
|
shortName: string;
|
|
128
|
-
|
|
126
|
+
/** 영문명 (예: "Seoul") */
|
|
127
|
+
englishName: string;
|
|
128
|
+
/** 아이콘 컴포넌트 (없으면 null) */
|
|
129
|
+
component: IconComponent | null;
|
|
129
130
|
}
|
|
130
|
-
|
|
131
|
+
/**
|
|
132
|
+
* 시군구(기초자치단체) 아이콘 정보
|
|
133
|
+
*/
|
|
134
|
+
interface IconInfo {
|
|
135
|
+
/** 시군구 코드 (5자리, 예: 11680 = 강남구) */
|
|
131
136
|
code: number;
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
/** 소속 시도 코드 (2자리) */
|
|
138
|
+
regionCode: number;
|
|
139
|
+
/** 소속 시도명 (예: "서울특별시") */
|
|
140
|
+
regionName: string;
|
|
141
|
+
/** 이름 (예: "강남구") */
|
|
134
142
|
name: string;
|
|
143
|
+
/** 단축명 (예: "강남") */
|
|
135
144
|
shortName: string;
|
|
145
|
+
/** 컴포넌트 영문명 (예: "GangnamGu") */
|
|
146
|
+
componentName: string;
|
|
147
|
+
/** 아이콘 컴포넌트 */
|
|
136
148
|
component: IconComponent;
|
|
137
149
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
* @param code - 시도 코드 (예: 11 = 서울특별시)
|
|
141
|
-
*/
|
|
142
|
-
declare function getSidoIcon(code: SidoCode): IconComponent | null;
|
|
143
|
-
/**
|
|
144
|
-
* 시도 코드로 정보를 가져옵니다.
|
|
145
|
-
*/
|
|
146
|
-
declare function getSidoInfo(code: SidoCode): SidoInfo | undefined;
|
|
147
|
-
/**
|
|
148
|
-
* 시도 단축명으로 정보를 가져옵니다.
|
|
149
|
-
* @param shortName - 시도 단축명 (예: "서울", "부산")
|
|
150
|
-
*/
|
|
151
|
-
declare function getSidoByShortName(shortName: RegionCode): SidoInfo | undefined;
|
|
152
|
-
/**
|
|
153
|
-
* 모든 시도 정보를 반환합니다.
|
|
154
|
-
*/
|
|
155
|
-
declare function getAllSidoInfo(): readonly SidoInfo[];
|
|
156
|
-
/**
|
|
157
|
-
* 아이콘이 있는 시도 정보만 반환합니다.
|
|
158
|
-
*/
|
|
159
|
-
declare function getAvailableSidoInfo(): SidoInfo[];
|
|
160
|
-
/**
|
|
161
|
-
* 시군구 코드로 아이콘을 가져옵니다.
|
|
162
|
-
* @param code - 시군구 코드 (예: 11680 = 강남구)
|
|
163
|
-
*/
|
|
164
|
-
declare function getSigunguIcon(code: number): IconComponent | undefined;
|
|
165
|
-
/**
|
|
166
|
-
* 시군구 코드로 정보를 가져옵니다.
|
|
167
|
-
*/
|
|
168
|
-
declare function getSigunguInfo(code: number): SigunguInfo | undefined;
|
|
169
|
-
/**
|
|
170
|
-
* 특정 시도의 모든 시군구 정보를 반환합니다.
|
|
171
|
-
*/
|
|
172
|
-
declare function getSigunguBySido(sidoCode: SidoCode): SigunguInfo[];
|
|
173
|
-
/**
|
|
174
|
-
* 모든 시군구 정보를 반환합니다.
|
|
175
|
-
*/
|
|
176
|
-
declare function getAllSigunguInfo(): readonly SigunguInfo[];
|
|
177
|
-
interface GetIconByNameOptions {
|
|
150
|
+
|
|
151
|
+
declare const utils: {
|
|
178
152
|
/**
|
|
179
|
-
*
|
|
153
|
+
* 코드로 아이콘 컴포넌트를 가져옵니다.
|
|
154
|
+
* 시도 코드(2자리)와 시군구 코드(5자리)를 자동으로 판별합니다.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* utils.getIcon(11) // 서울특별시
|
|
158
|
+
* utils.getIcon(11680) // 강남구
|
|
180
159
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
160
|
+
getIcon(code: number): IconComponent | null;
|
|
161
|
+
/**
|
|
162
|
+
* 이름으로 아이콘 컴포넌트를 검색합니다.
|
|
163
|
+
* 다양한 형식을 지원합니다.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* utils.findByName("강남구") // OK
|
|
167
|
+
* utils.findByName("강남") // OK
|
|
168
|
+
* utils.findByName("서울특별시 강남구") // OK
|
|
169
|
+
* utils.findByName("서울 강남구") // OK
|
|
170
|
+
* utils.findByName("중구", { region: "서울" }) // 중복 이름 해소
|
|
171
|
+
*/
|
|
172
|
+
findByName(name: string, options?: {
|
|
173
|
+
region?: string;
|
|
174
|
+
}): IconComponent | null;
|
|
175
|
+
/**
|
|
176
|
+
* 코드로 아이콘 상세 정보를 가져옵니다.
|
|
177
|
+
* 시도 코드(2자리)는 RegionInfo를, 시군구 코드(5자리)는 IconInfo를 반환합니다.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* utils.getInfo(11680) // { code: 11680, name: "강남구", regionName: "서울특별시", ... }
|
|
181
|
+
*/
|
|
182
|
+
getInfo(code: number): IconInfo | RegionInfo | null;
|
|
183
|
+
/**
|
|
184
|
+
* 특정 시도에 속한 모든 시군구 아이콘 정보를 반환합니다.
|
|
185
|
+
* 시도 코드(숫자) 또는 단축명(문자열) 모두 사용 가능합니다.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* utils.getByRegion(11) // 서울시 모든 구
|
|
189
|
+
* utils.getByRegion("서울") // 서울시 모든 구
|
|
190
|
+
* utils.getByRegion("경기") // 경기도 모든 시
|
|
191
|
+
*/
|
|
192
|
+
getByRegion(regionCodeOrName: number | string): IconInfo[];
|
|
193
|
+
/**
|
|
194
|
+
* 모든 시도(광역자치단체) 정보를 반환합니다.
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* const regions = utils.getAllRegions()
|
|
198
|
+
* // [{ code: 11, name: "서울특별시", ... }, ...]
|
|
199
|
+
*/
|
|
200
|
+
getAllRegions(): readonly RegionInfo[];
|
|
201
|
+
/**
|
|
202
|
+
* 아이콘이 있는 시도 정보만 반환합니다.
|
|
203
|
+
*/
|
|
204
|
+
getAvailableRegions(): RegionInfo[];
|
|
205
|
+
/**
|
|
206
|
+
* 시군구가 있는 시도 정보만 반환합니다.
|
|
207
|
+
*/
|
|
208
|
+
getRegionsWithIcons(): RegionInfo[];
|
|
209
|
+
/**
|
|
210
|
+
* 모든 시군구 아이콘 정보를 반환합니다.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* const all = utils.getAll()
|
|
214
|
+
* all.map(icon => <icon.component key={icon.code} width={48} />)
|
|
215
|
+
*/
|
|
216
|
+
getAll(): readonly IconInfo[];
|
|
217
|
+
/**
|
|
218
|
+
* 유효한 시도 또는 시군구 코드인지 확인합니다.
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* utils.isValid(11680) // true (강남구)
|
|
222
|
+
* utils.isValid(11) // true (서울특별시)
|
|
223
|
+
* utils.isValid(99999) // false
|
|
224
|
+
*/
|
|
225
|
+
isValid(code: number): boolean;
|
|
226
|
+
};
|
|
228
227
|
|
|
229
|
-
export { AnyangSi, Busan, Daegu,
|
|
228
|
+
export { AnyangSi, Busan, Daegu, DobongGu, DongdaemunGu, DongjakGu, EunpyeongGu, GangbukGu, GangdongGu, GangnamGu, GangseoGu, GeumcheonGu, GimpoSi, GoyangSi, GuriSi, GuroGu, GwacheonSi, GwanakGu, GwangjinGu, GwangmyeongSi, Gyeonggi, HaeundaeGu, HanamSi, HwaseongSi, type IconComponent, type IconInfo, Incheon, JongnoGu, JungGu, JungnangGu, MapoGu, NamyangjuSi, NowonGu, PajuSi, type RegionInfo, SeochoGu, SeodaemunGu, SeongbukGu, SeongdongGu, SeongnamSi, Seoul, SongpaGu, SuseongGu, SuwonSi, UijeongbuSi, UiwangSi, Ulsan, UlsanBukGu, UlsanDongGu, UlsanJungGu, UlsanNamGu, UlsanUljuGun, YangcheonGu, YeongdeungpoGu, YeonsuGu, YonginSi, YongsanGu, utils };
|