@uniai-fe/uds-templates 0.5.29 → 0.6.1

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.
Files changed (54) hide show
  1. package/README.md +3 -6
  2. package/package.json +1 -1
  3. package/src/weather/_legacy/apis/index.ts +4 -0
  4. package/src/weather/_legacy/data/response.ts +36 -0
  5. package/src/weather/_legacy/hooks/index.ts +5 -0
  6. package/src/weather/{hooks → _legacy/hooks}/useOpenWeatherMap.ts +1 -1
  7. package/src/weather/{hooks → _legacy/hooks}/useWeatherKorea.ts +4 -7
  8. package/src/weather/{hooks → _legacy/hooks}/useWeatherKoreaAlert.ts +2 -4
  9. package/src/weather/_legacy/types/api.ts +221 -0
  10. package/src/weather/_legacy/types/base.ts +70 -0
  11. package/src/weather/_legacy/types/index.ts +4 -0
  12. package/src/weather/_legacy/utils/index.ts +5 -0
  13. package/src/weather/_legacy/utils/locale.ts +28 -0
  14. package/src/weather/_legacy/utils/location.ts +139 -0
  15. package/src/weather/_legacy/utils/weather.ts +460 -0
  16. package/src/weather/apis/client.ts +459 -0
  17. package/src/weather/apis/index.ts +2 -4
  18. package/src/weather/apis/server.ts +373 -0
  19. package/src/weather/components/icon/Address.tsx +7 -0
  20. package/src/weather/components/icon/Weather.tsx +7 -6
  21. package/src/weather/components/page-header/Address.tsx +14 -0
  22. package/src/weather/components/page-header/Alert.tsx +17 -13
  23. package/src/weather/components/page-header/Container.tsx +12 -19
  24. package/src/weather/components/page-header/Forecast.tsx +21 -28
  25. package/src/weather/components/page-header/NextDays.tsx +10 -0
  26. package/src/weather/components/page-header/Today.tsx +86 -158
  27. package/src/weather/components/page-header/index.ts +5 -0
  28. package/src/weather/data/response.ts +4 -23
  29. package/src/weather/hooks/index.ts +3 -3
  30. package/src/weather/hooks/useWeather.ts +52 -0
  31. package/src/weather/hooks/useWeatherAlert.ts +35 -0
  32. package/src/weather/index.tsx +2 -2
  33. package/src/weather/jotai/coordinate.ts +4 -0
  34. package/src/weather/jotai/farm-idx.ts +4 -0
  35. package/src/weather/types/api.ts +442 -114
  36. package/src/weather/types/base.ts +31 -32
  37. package/src/weather/types/index.ts +0 -3
  38. package/src/weather/types/page-header.ts +118 -68
  39. package/src/weather/utils/index.ts +6 -4
  40. package/src/weather/utils/locale.ts +7 -69
  41. package/src/weather/utils/location.ts +47 -102
  42. package/src/weather/utils/weather.ts +53 -456
  43. package/src/weather/data/alert-regions-meta.json +0 -1286
  44. package/src/weather/data/weather-regions-meta.json +0 -9833
  45. package/src/weather/types/provider.ts +0 -34
  46. package/src/weather/utils/alert.ts +0 -30
  47. /package/src/weather/{apis → _legacy/apis}/korea/client.ts +0 -0
  48. /package/src/weather/{apis → _legacy/apis}/korea/server.ts +0 -0
  49. /package/src/weather/{apis → _legacy/apis}/open-weather-map/client.ts +0 -0
  50. /package/src/weather/{apis → _legacy/apis}/open-weather-map/server.ts +0 -0
  51. /package/src/weather/{types → _legacy/types}/korea.ts +0 -0
  52. /package/src/weather/{types → _legacy/types}/open-weather-map.ts +0 -0
  53. /package/src/weather/{utils → _legacy/utils}/date-time.ts +0 -0
  54. /package/src/weather/{utils → _legacy/utils}/validate.ts +0 -0
@@ -4,9 +4,13 @@
4
4
  * @property {number | null} longitude 경도
5
5
  */
6
6
  export type GeoCoordinate = {
7
- /** 위도 */
7
+ /**
8
+ * 위도
9
+ */
8
10
  latitude: number | null;
9
- /** 경도 */
11
+ /**
12
+ * 경도
13
+ */
10
14
  longitude: number | null;
11
15
  };
12
16
 
@@ -16,12 +20,32 @@ export type GeoCoordinate = {
16
20
  * @property {number | null} lng 경도
17
21
  */
18
22
  export type WeatherGeoCoordinate = {
19
- /** 위도 */
23
+ /**
24
+ * 위도
25
+ */
20
26
  lat: number | null;
21
- /** 경도 */
27
+ /**
28
+ * 경도
29
+ */
22
30
  lng: number | null;
23
31
  };
24
32
 
33
+ /**
34
+ * 날씨 backend에서 사용하는 격자 좌표.
35
+ * @property {number | null} nx 격자 X
36
+ * @property {number | null} ny 격자 Y
37
+ */
38
+ export type WeatherGridCoordinate = {
39
+ /**
40
+ * 격자 X
41
+ */
42
+ nx: number | null;
43
+ /**
44
+ * 격자 Y
45
+ */
46
+ ny: number | null;
47
+ };
48
+
25
49
  /**
26
50
  * 날씨 API locale 요청 옵션.
27
51
  * @property {string} [locale] 요청 언어 코드. 기본 지원값은 ko, en, ja이며 타입은 확장 가능한 string으로 유지한다.
@@ -33,38 +57,13 @@ export interface WeatherApiLocaleOptions {
33
57
  locale?: string;
34
58
  }
35
59
 
36
- /**
37
- * OpenWeatherMap 요청 파라미터.
38
- * @property {number | null} lat 위도
39
- * @property {number | null} lng 경도
40
- * @property {string} [locale] 요청 언어 코드
41
- */
42
- export type WeatherOpenWeatherMapParams = WeatherGeoCoordinate &
43
- WeatherApiLocaleOptions;
44
-
45
60
  /**
46
61
  * 좌표와 주소 정보를 함께 담는 구조.
47
62
  * @property {string | null} address 좌표 주소
48
63
  */
49
64
  export type WeatherCoordinate = {
50
- /** 좌표 주소 */
65
+ /**
66
+ * 좌표 주소
67
+ */
51
68
  address: string | null;
52
69
  } & WeatherGeoCoordinate;
53
-
54
- /**
55
- * 날씨 로직에서 사용하는 날짜 기준값 모음.
56
- * @property {Date} now 현재 시각
57
- * @property {string} today 오늘 날짜(yyyymmdd)
58
- * @property {string} tomorrow 내일 날짜(yyyymmdd)
59
- * @property {string} dayAfterTomorrow 모레 날짜(yyyymmdd)
60
- */
61
- export type WeatherUtilDateTimeMoments = {
62
- /** 현재 시각 */
63
- now: Date;
64
- /** 오늘 날짜(yyyymmdd) */
65
- today: string;
66
- /** 내일 날짜(yyyymmdd) */
67
- tomorrow: string;
68
- /** 모레 날짜(yyyymmdd) */
69
- dayAfterTomorrow: string;
70
- };
@@ -1,6 +1,3 @@
1
1
  export type * from "./base";
2
2
  export type * from "./api";
3
- export type * from "./korea";
4
- export type * from "./open-weather-map";
5
3
  export type * from "./page-header";
6
- export type * from "./provider";
@@ -1,15 +1,12 @@
1
1
  import type {
2
- API_Res_WeatherKoreaForecast,
3
- API_Res_WeatherKoreaNextDays,
4
- API_Res_WeatherKoreaNow,
2
+ API_Res_WeatherAlertItem,
3
+ API_Res_WeatherForecast,
4
+ API_Res_WeatherNextDays,
5
+ API_Res_WeatherNow,
5
6
  } from "./api";
6
- import type {
7
- OWM_Res_Weather_Forecast,
8
- OWM_Res_Weather_Now,
9
- } from "./open-weather-map";
10
7
 
11
8
  /**
12
- * Weather Page Header; locale 옵션
9
+ * Weather Page Header; locale 옵션.
13
10
  * @property {string} [locale] 표시 언어 코드. 기본 지원값은 ko, en, ja이며 타입은 확장 가능한 string으로 유지한다.
14
11
  */
15
12
  export interface WeatherLocaleOptions {
@@ -20,7 +17,7 @@ export interface WeatherLocaleOptions {
20
17
  }
21
18
 
22
19
  /**
23
- * Weather Page Header; 텍스트 옵션
20
+ * Weather Page Header; 텍스트 옵션.
24
21
  * @property {string} currentWeatherLoading 현재 날씨 로딩 문구
25
22
  * @property {string} forecastWeatherLoading 예보 날씨 로딩 문구
26
23
  * @property {string} alertLoading 특보 로딩 문구
@@ -106,11 +103,15 @@ export interface WeatherPageHeaderTexts {
106
103
  }
107
104
 
108
105
  /**
109
- * Weather Page Header; locale과 텍스트 override 조합 옵션
106
+ * Weather Page Header; locale과 텍스트 override 조합 옵션.
110
107
  * @property {string} [locale] 표시 언어 코드
111
108
  * @property {Partial<WeatherPageHeaderTexts>} [texts] 서비스에서 주입한 표시 문구
112
109
  */
113
110
  export interface WeatherPageHeaderLocaleOptions extends WeatherLocaleOptions {
111
+ /**
112
+ * 표시 언어 코드
113
+ */
114
+ locale?: string;
114
115
  /**
115
116
  * 서비스에서 주입한 표시 문구
116
117
  */
@@ -118,47 +119,32 @@ export interface WeatherPageHeaderLocaleOptions extends WeatherLocaleOptions {
118
119
  }
119
120
 
120
121
  /**
121
- * Weather Page Header; KMA weather query 결과
122
- * @property {API_Res_WeatherKoreaNow} [now] 현재 날씨 응답
123
- * @property {API_Res_WeatherKoreaForecast} [forecast] 예보 날씨 응답
122
+ * Weather Page Header; 통합 weather query 결과.
123
+ * @property {API_Res_WeatherNow} [now] 현재 날씨 응답
124
+ * @property {API_Res_WeatherForecast} [forecast] 예보 날씨 응답
125
+ * @property {API_Res_WeatherAlertItem[]} alert 특보 목록
126
+ * @property {boolean} isFetching 현재/예보/특보 조회 상태
124
127
  * @property {boolean} isFetchingNow 현재 날씨 조회 상태
125
128
  * @property {boolean} isFetchingForecast 예보 날씨 조회 상태
129
+ * @property {boolean} isFetchingAlert 특보 조회 상태
126
130
  */
127
- export interface WeatherPageHeaderKoreaWeather {
131
+ export interface WeatherPageHeaderWeather {
128
132
  /**
129
133
  * 현재 날씨 응답
130
134
  */
131
- now?: API_Res_WeatherKoreaNow;
135
+ now?: API_Res_WeatherNow;
132
136
  /**
133
137
  * 예보 날씨 응답
134
138
  */
135
- forecast?: API_Res_WeatherKoreaForecast;
136
- /**
137
- * 현재 날씨 조회 상태
138
- */
139
- isFetchingNow: boolean;
140
- /**
141
- * 예보 날씨 조회 상태
142
- */
143
- isFetchingForecast: boolean;
144
- }
145
-
146
- /**
147
- * Weather Page Header; OpenWeatherMap query 결과
148
- * @property {OWM_Res_Weather_Now} [now] 현재 날씨 응답
149
- * @property {OWM_Res_Weather_Forecast} [forecast] 예보 날씨 응답
150
- * @property {boolean} isFetchingNow 현재 날씨 조회 상태
151
- * @property {boolean} isFetchingForecast 예보 날씨 조회 상태
152
- */
153
- export interface WeatherPageHeaderOpenWeatherMapWeather {
139
+ forecast?: API_Res_WeatherForecast;
154
140
  /**
155
- * 현재 날씨 응답
141
+ * 특보 목록
156
142
  */
157
- now?: OWM_Res_Weather_Now;
143
+ alert: API_Res_WeatherAlertItem[];
158
144
  /**
159
- * 예보 날씨 응답
145
+ * 현재/예보/특보 조회 상태
160
146
  */
161
- forecast?: OWM_Res_Weather_Forecast;
147
+ isFetching: boolean;
162
148
  /**
163
149
  * 현재 날씨 조회 상태
164
150
  */
@@ -167,73 +153,137 @@ export interface WeatherPageHeaderOpenWeatherMapWeather {
167
153
  * 예보 날씨 조회 상태
168
154
  */
169
155
  isFetchingForecast: boolean;
156
+ /**
157
+ * 특보 조회 상태
158
+ */
159
+ isFetchingAlert: boolean;
170
160
  }
171
161
 
172
162
  /**
173
- * Weather Page Header; 상위 container에서 준비한 weather query 결과
174
- * @property {WeatherPageHeaderKoreaWeather} [koreaWeather] KMA weather query 결과
175
- * @property {WeatherPageHeaderOpenWeatherMapWeather} [openWeatherMapWeather] OpenWeatherMap query 결과
163
+ * Weather Page Header; 상위 container에서 준비한 weather query 결과.
164
+ * @property {WeatherPageHeaderWeather} [weather] 통합 weather query 결과
176
165
  */
177
166
  export interface WeatherPageHeaderDataOptions {
178
167
  /**
179
- * KMA weather query 결과
168
+ * 통합 weather query 결과
180
169
  */
181
- koreaWeather?: WeatherPageHeaderKoreaWeather;
182
- /**
183
- * OpenWeatherMap query 결과
184
- */
185
- openWeatherMapWeather?: WeatherPageHeaderOpenWeatherMapWeather;
170
+ weather?: WeatherPageHeaderWeather;
186
171
  }
187
172
 
188
173
  /**
189
- * Weather Page Header; container props
174
+ * Weather Page Header; container props.
190
175
  * @property {string} [locale] 표시 언어 코드
191
176
  * @property {Partial<WeatherPageHeaderTexts>} [texts] 서비스에서 주입한 표시 문구
192
177
  */
193
- export type WeatherPageHeaderContainerProps = WeatherPageHeaderLocaleOptions;
178
+ export interface WeatherPageHeaderContainerProps extends WeatherPageHeaderLocaleOptions {
179
+ /**
180
+ * 표시 언어 코드
181
+ */
182
+ locale?: string;
183
+ /**
184
+ * 서비스에서 주입한 표시 문구
185
+ */
186
+ texts?: Partial<WeatherPageHeaderTexts>;
187
+ }
194
188
 
195
189
  /**
196
- * Weather Page Header; address props
190
+ * Weather Page Header; address props.
197
191
  * @property {string} [locale] 표시 언어 코드
198
192
  * @property {Partial<WeatherPageHeaderTexts>} [texts] 서비스에서 주입한 표시 문구
199
193
  */
200
- export type WeatherPageHeaderAddressProps = WeatherPageHeaderLocaleOptions;
194
+ export interface WeatherPageHeaderAddressProps extends WeatherPageHeaderLocaleOptions {
195
+ /**
196
+ * 표시 언어 코드
197
+ */
198
+ locale?: string;
199
+ /**
200
+ * 서비스에서 주입한 표시 문구
201
+ */
202
+ texts?: Partial<WeatherPageHeaderTexts>;
203
+ }
201
204
 
202
205
  /**
203
- * Weather Page Header; today props
206
+ * Weather Page Header; today props.
204
207
  * @property {string} [locale] 표시 언어 코드
205
208
  * @property {Partial<WeatherPageHeaderTexts>} [texts] 서비스에서 주입한 표시 문구
206
- * @property {WeatherPageHeaderKoreaWeather} [koreaWeather] KMA weather query 결과
207
- * @property {WeatherPageHeaderOpenWeatherMapWeather} [openWeatherMapWeather] OpenWeatherMap query 결과
209
+ * @property {WeatherPageHeaderWeather} [weather] 상위 container에서 준비한 통합 weather query 결과
208
210
  */
209
- export type WeatherPageHeaderTodayProps = WeatherPageHeaderLocaleOptions &
210
- WeatherPageHeaderDataOptions;
211
+ export interface WeatherPageHeaderTodayProps
212
+ extends WeatherPageHeaderLocaleOptions, WeatherPageHeaderDataOptions {
213
+ /**
214
+ * 표시 언어 코드
215
+ */
216
+ locale?: string;
217
+ /**
218
+ * 서비스에서 주입한 표시 문구
219
+ */
220
+ texts?: Partial<WeatherPageHeaderTexts>;
221
+ /**
222
+ * 통합 weather query 결과
223
+ */
224
+ weather?: WeatherPageHeaderWeather;
225
+ }
211
226
 
212
227
  /**
213
- * Weather Page Header; forecast props
228
+ * Weather Page Header; forecast props.
214
229
  * @property {string} [locale] 표시 언어 코드
215
230
  * @property {Partial<WeatherPageHeaderTexts>} [texts] 서비스에서 주입한 표시 문구
216
- * @property {WeatherPageHeaderKoreaWeather} [koreaWeather] KMA weather query 결과
217
- * @property {WeatherPageHeaderOpenWeatherMapWeather} [openWeatherMapWeather] OpenWeatherMap query 결과
231
+ * @property {WeatherPageHeaderWeather} [weather] 상위 container에서 준비한 통합 weather query 결과
218
232
  */
219
- export type WeatherPageHeaderForecastProps = WeatherPageHeaderLocaleOptions &
220
- WeatherPageHeaderDataOptions;
233
+ export interface WeatherPageHeaderForecastProps
234
+ extends WeatherPageHeaderLocaleOptions, WeatherPageHeaderDataOptions {
235
+ /**
236
+ * 표시 언어 코드
237
+ */
238
+ locale?: string;
239
+ /**
240
+ * 서비스에서 주입한 표시 문구
241
+ */
242
+ texts?: Partial<WeatherPageHeaderTexts>;
243
+ /**
244
+ * 통합 weather query 결과
245
+ */
246
+ weather?: WeatherPageHeaderWeather;
247
+ }
221
248
 
222
249
  /**
223
- * Weather Page Header; alert props
250
+ * Weather Page Header; alert props.
224
251
  * @property {string} [locale] 표시 언어 코드
225
252
  * @property {Partial<WeatherPageHeaderTexts>} [texts] 서비스에서 주입한 표시 문구
253
+ * @property {WeatherPageHeaderWeather} [weather] 상위 container에서 준비한 통합 weather query 결과
226
254
  */
227
- export type WeatherPageHeaderAlertProps = WeatherPageHeaderLocaleOptions;
255
+ export interface WeatherPageHeaderAlertProps
256
+ extends WeatherPageHeaderLocaleOptions, WeatherPageHeaderDataOptions {
257
+ /**
258
+ * 표시 언어 코드
259
+ */
260
+ locale?: string;
261
+ /**
262
+ * 서비스에서 주입한 표시 문구
263
+ */
264
+ texts?: Partial<WeatherPageHeaderTexts>;
265
+ /**
266
+ * 통합 weather query 결과
267
+ */
268
+ weather?: WeatherPageHeaderWeather;
269
+ }
228
270
 
229
271
  /**
230
- * Weather Page Header; next days props
272
+ * Weather Page Header; next days props.
231
273
  * @property {string} title 날짜 라벨
232
- * @property {API_Res_WeatherKoreaNextDays} [data] 예보 데이터
274
+ * @property {API_Res_WeatherNextDays} [data] 예보 데이터
233
275
  * @property {string} [locale] 표시 언어 코드
234
276
  * @property {Partial<WeatherPageHeaderTexts>} [texts] 서비스에서 주입한 표시 문구
235
277
  */
236
278
  export interface WeatherPageHeaderNextDaysProps extends WeatherPageHeaderLocaleOptions {
279
+ /**
280
+ * 표시 언어 코드
281
+ */
282
+ locale?: string;
283
+ /**
284
+ * 서비스에서 주입한 표시 문구
285
+ */
286
+ texts?: Partial<WeatherPageHeaderTexts>;
237
287
  /**
238
288
  * 날짜 라벨
239
289
  */
@@ -241,11 +291,11 @@ export interface WeatherPageHeaderNextDaysProps extends WeatherPageHeaderLocaleO
241
291
  /**
242
292
  * 예보 데이터
243
293
  */
244
- data?: API_Res_WeatherKoreaNextDays;
294
+ data?: API_Res_WeatherNextDays;
245
295
  }
246
296
 
247
297
  /**
248
- * Weather Icon; 날씨 아이콘 props
298
+ * Weather Icon; 날씨 아이콘 props.
249
299
  * @property {string | null} [code] 날씨 아이콘 코드
250
300
  * @property {string | null} [name] 날씨 상태 이름
251
301
  * @property {string} [alt] 아이콘 대체 텍스트 fallback
@@ -266,7 +316,7 @@ export interface WeatherIconProps {
266
316
  }
267
317
 
268
318
  /**
269
- * Weather Address Icon; 위치 아이콘 props
319
+ * Weather Address Icon; 위치 아이콘 props.
270
320
  * @property {string} [alt] 아이콘 대체 텍스트
271
321
  */
272
322
  export interface WeatherAddressIconProps {
@@ -1,5 +1,7 @@
1
1
  export * from "./location";
2
- export * from "./date-time";
3
- export * from "./weather";
4
- export * from "./alert";
5
- export * from "./locale";
2
+ export {
3
+ isWeatherForecastResponse,
4
+ isWeatherNowResponse,
5
+ isWeatherSummaryResponse,
6
+ } from "./weather";
7
+ export { getWeatherLocaleKey, resolveWeatherPageHeaderTexts } from "./locale";
@@ -1,8 +1,4 @@
1
- import type {
2
- WeatherPageHeaderTexts,
3
- WeatherProviderCapabilityRegistry,
4
- WeatherProviderKey,
5
- } from "../types";
1
+ import type { WeatherPageHeaderTexts } from "../types";
6
2
 
7
3
  const WEATHER_PAGE_HEADER_DEFAULT_TEXTS: WeatherPageHeaderTexts = {
8
4
  currentWeatherLoading: "현재 날씨 불러오는 중...",
@@ -23,34 +19,10 @@ const WEATHER_PAGE_HEADER_DEFAULT_TEXTS: WeatherPageHeaderTexts = {
23
19
  alertIssueCommandLabel: "발령",
24
20
  };
25
21
 
26
- const OPEN_WEATHER_MAP_LANG_BY_LOCALE: Record<string, string> = {
27
- ko: "kr",
28
- en: "en",
29
- ja: "ja",
30
- };
31
-
32
- const WEATHER_DEFAULT_PROVIDER: WeatherProviderKey = "openWeatherMap";
33
-
34
- const WEATHER_PROVIDER_BY_LOCALE_KEY: Record<string, WeatherProviderKey> = {
35
- ko: "kma",
36
- };
37
-
38
- export const WEATHER_PROVIDER_CAPABILITIES: WeatherProviderCapabilityRegistry =
39
- {
40
- kma: {
41
- now: true,
42
- forecast: true,
43
- alert: true,
44
- },
45
- openWeatherMap: {
46
- now: true,
47
- forecast: true,
48
- alert: false,
49
- },
50
- };
51
-
52
22
  /**
53
- * Weather Locale; locale 기준 키 정규화
23
+ * Weather Locale; locale 기준 키 정규화.
24
+ * @util
25
+ * @desc service locale 문자열에서 weather API/표시 로직에 사용할 기본 언어 키를 추출한다.
54
26
  * @param {string} [locale] locale 코드
55
27
  * @return {string} 전달된 locale의 기본 언어 코드
56
28
  * @example
@@ -60,30 +32,9 @@ export const getWeatherLocaleKey = (locale?: string): string =>
60
32
  locale?.trim().toLowerCase().split(/[-_]/)[0] || "ko";
61
33
 
62
34
  /**
63
- * Weather Locale; locale 기준 provider 선택
64
- * @param {string} [locale] locale 코드
65
- * @return {WeatherProviderKey} 현재 locale에 사용할 weather provider
66
- * @example
67
- * resolveWeatherProvider("ko-KR")
68
- */
69
- export const resolveWeatherProvider = (locale?: string): WeatherProviderKey => {
70
- const localeKey = getWeatherLocaleKey(locale);
71
-
72
- return WEATHER_PROVIDER_BY_LOCALE_KEY[localeKey] ?? WEATHER_DEFAULT_PROVIDER;
73
- };
74
-
75
- /**
76
- * Weather Locale; KMA provider 사용 여부
77
- * @param {string} [locale] locale 코드
78
- * @return {boolean} KMA provider 대상 locale 여부
79
- * @example
80
- * isKoreaWeatherLocale("ko-KR")
81
- */
82
- export const isKoreaWeatherLocale = (locale?: string): boolean =>
83
- resolveWeatherProvider(locale) === "kma";
84
-
85
- /**
86
- * Weather Locale; page-header 텍스트 병합
35
+ * Weather Locale; page-header 텍스트 병합.
36
+ * @util
37
+ * @desc service가 주입한 일부 표시 문구를 weather page-header 기본 문구와 병합한다.
87
38
  * @param {Partial<WeatherPageHeaderTexts>} [texts] 서비스에서 주입한 텍스트
88
39
  * @return {WeatherPageHeaderTexts} 기본 fallback과 서비스 주입 텍스트를 병합한 텍스트
89
40
  * @example
@@ -95,16 +46,3 @@ export const resolveWeatherPageHeaderTexts = (
95
46
  ...WEATHER_PAGE_HEADER_DEFAULT_TEXTS,
96
47
  ...texts,
97
48
  });
98
-
99
- /**
100
- * Weather Locale; OpenWeatherMap API lang 값 변환
101
- * @param {string} [locale] locale 코드
102
- * @return {string} OpenWeatherMap lang 파라미터
103
- * @example
104
- * getOpenWeatherMapLang("ko")
105
- */
106
- export const getOpenWeatherMapLang = (locale?: string): string => {
107
- const localeKey = getWeatherLocaleKey(locale);
108
-
109
- return OPEN_WEATHER_MAP_LANG_BY_LOCALE[localeKey] ?? localeKey;
110
- };