@uniai-fe/uds-templates 0.5.18 → 0.5.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/uds-templates",
3
- "version": "0.5.18",
3
+ "version": "0.5.20",
4
4
  "description": "UNIAI Design System; UI Templates Package",
5
5
  "type": "module",
6
6
  "private": false,
@@ -12,7 +12,7 @@
12
12
  "publishConfig": {
13
13
  "access": "public"
14
14
  },
15
- "packageManager": "pnpm@10.33.2",
15
+ "packageManager": "pnpm@10.33.3",
16
16
  "engines": {
17
17
  "node": ">=24",
18
18
  "pnpm": ">=10"
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "devDependencies": {
72
72
  "@svgr/webpack": "^8.1.0",
73
- "@tanstack/react-query": "^5.100.1",
73
+ "@tanstack/react-query": "^5.100.9",
74
74
  "@types/node": "^24.10.2",
75
75
  "@types/react": "^19.2.14",
76
76
  "@types/react-dom": "^19.2.3",
@@ -86,10 +86,10 @@
86
86
  "@uniai-fe/util-next": "workspace:*",
87
87
  "@uniai-fe/util-rtc": "workspace:*",
88
88
  "eslint": "^9.39.2",
89
- "jotai": "^2.19.1",
89
+ "jotai": "^2.20.0",
90
90
  "next": "^15.5.11",
91
91
  "prettier": "^3.8.3",
92
- "react-hook-form": "^7.73.1",
92
+ "react-hook-form": "^7.75.0",
93
93
  "sass": "^1.99.0",
94
94
  "typescript": "5.9.3"
95
95
  }
@@ -1,63 +1,40 @@
1
1
  import { jotaiStorage } from "@uniai-fe/util-jotai";
2
+ import { atom } from "jotai";
2
3
  import { atomWithStorage } from "jotai/utils";
3
4
  import type { API_Res_LoginData, API_Res_LoginUserFarm } from "../types";
4
5
 
5
6
  /**
6
- * 로그인 사용자 정보 세션스토리지로 관리
7
+ * 로그인 사용자 정보 메모리 상태
7
8
  * @state
8
9
  */
9
- export const userDataAtom = atomWithStorage<API_Res_LoginData | null>(
10
- "userData",
11
- null,
12
- jotaiStorage.session<API_Res_LoginData | null>(),
13
- );
10
+ export const userDataAtom = atom<API_Res_LoginData | null>(null);
14
11
 
15
12
  /**
16
13
  * 로그인 사용자의 계정 아이디
17
14
  * @state
18
15
  */
19
- export const userAccountNameAtom = atomWithStorage<string>(
20
- "userAccountName",
21
- "",
22
- jotaiStorage.session<string>(),
23
- );
16
+ export const userAccountNameAtom = atom<string>("");
24
17
 
25
18
  /**
26
19
  * 로그인 사용자 이름
27
20
  * @state
28
21
  */
29
- export const userOwnerNameAtom = atomWithStorage<string>(
30
- "userOwnerName",
31
- "",
32
- jotaiStorage.session<string>(),
33
- );
22
+ export const userOwnerNameAtom = atom<string>("");
34
23
 
35
24
  /**
36
25
  * 로그인 사용자 접근가능한 농장 목록
37
26
  */
38
- export const userFarmListAtom = atomWithStorage<API_Res_LoginUserFarm[]>(
39
- "userFarmList",
40
- [],
41
- jotaiStorage.session<API_Res_LoginUserFarm[]>(),
42
- );
27
+ export const userFarmListAtom = atom<API_Res_LoginUserFarm[]>([]);
43
28
 
44
29
  /**
45
30
  * 현재 선택된 로그인 사용자 농장 정보
46
31
  */
47
- export const userFarmAtom = atomWithStorage<API_Res_LoginUserFarm | null>(
48
- "userFarm",
49
- null,
50
- jotaiStorage.session<API_Res_LoginUserFarm | null>(),
51
- );
32
+ export const userFarmAtom = atom<API_Res_LoginUserFarm | null>(null);
52
33
 
53
34
  /**
54
35
  * 로그인 사용자 농장 id 코드
55
36
  */
56
- export const farmIdAtom = atomWithStorage<number>(
57
- "farmId",
58
- -1,
59
- jotaiStorage.session<number>(),
60
- );
37
+ export const farmIdAtom = atom<number>(-1);
61
38
 
62
39
  /**
63
40
  * 로그인 사용자 농장 관리번호
@@ -367,6 +367,7 @@ export interface API_Res_LoginRule {
367
367
  menu_id: number;
368
368
  /**
369
369
  * 접근 권한 메뉴 정보
370
+ * @deprecated
370
371
  */
371
372
  menu: API_Res_LoginRuleMenu;
372
373
  flag: number;
@@ -414,6 +415,7 @@ export interface API_Res_LoginRole {
414
415
  created_at: string;
415
416
  /**
416
417
  * 접근권한 정보 목록
418
+ * @deprecated
417
419
  */
418
420
  rules: API_Res_LoginRule[];
419
421
  }
@@ -427,6 +429,8 @@ export interface API_Res_LoginRole {
427
429
  * @property {number} expires_in 토큰 유효기간 (초 단위)
428
430
  * @property {string} refresh_token 리프레시 토큰
429
431
  * @property {number} refresh_expires_in 리프레시 토큰 유효기간 (초 단위)
432
+ * @property {string | null} session_expires_at 세션 만료 일시
433
+ * @property {number | null} session_expires_in 세션 유효기간 (초 단위)
430
434
  */
431
435
  export interface API_Res_LoginToken {
432
436
  /**
@@ -452,6 +456,15 @@ export interface API_Res_LoginToken {
452
456
  * - 초 단위
453
457
  */
454
458
  refresh_expires_in: number;
459
+ /**
460
+ * 세션 만료 일시
461
+ */
462
+ session_expires_at: string | null;
463
+ /**
464
+ * 세션 유효기간
465
+ * - 초 단위
466
+ */
467
+ session_expires_in: number | null;
455
468
  }
456
469
 
457
470
  /**
@@ -462,6 +475,8 @@ export interface API_Res_LoginToken {
462
475
  * @property {number} expires_in 토큰 유효기간 (초 단위)
463
476
  * @property {string} refresh_token 리프레시 토큰
464
477
  * @property {number} refresh_expires_in 리프레시 토큰 유효기간 (초 단위)
478
+ * @property {string | null} session_expires_at 세션 만료 일시
479
+ * @property {number | null} session_expires_in 세션 유효기간 (초 단위)
465
480
  * @property {API_Res_LoginUserInfo} user_info 로그인 유저 정보
466
481
  * @property {API_Res_LoginGroup[]} [groups] 소속 그룹 목록
467
482
  * @property {API_Res_LoginGroup[]} [ancestor_groups] 상위 그룹 목록
@@ -40,10 +40,10 @@ export const getWeatherOpenWeatherMapNow = async (
40
40
  ).json();
41
41
 
42
42
  /**
43
- * 글로벌 날씨 API; 예보 날씨 (4 days) fetch
43
+ * 글로벌 날씨 API; 예보 날씨 (5 days / 3 hour forecast) fetch
44
44
  * @method GET
45
- * @route https://pro.openweathermap.org/data/2.5/weather/forecast/hourly
46
- * @see https://openweathermap.org/api/hourly-forecast
45
+ * @route https://api.openweathermap.org/data/2.5/forecast
46
+ * @see https://openweathermap.org/forecast5
47
47
  * @param {WeatherGeoCoordinate} params - API 요청 파라미터
48
48
  * @param {number} params.lat - 위도
49
49
  * @param {number} params.lon - 경도
@@ -82,7 +82,7 @@ export const useQueryWeatherOpenWeatherMapNow = (
82
82
  };
83
83
 
84
84
  /**
85
- * 글로벌 날씨 API; 예보 날씨 (4 days) react query
85
+ * 글로벌 날씨 API; 예보 날씨 (5 days / 3 hour forecast) react query
86
86
  * @method GET
87
87
  */
88
88
  export const useQueryWeatherOpenWeatherMapForecast = (
@@ -12,10 +12,9 @@ import { getOpenWeatherMapLang } from "../../utils/locale";
12
12
  */
13
13
  const API_BASE_CURRENT = "https://api.openweathermap.org/data/2.5/weather";
14
14
  /**
15
- * 글로벌 날씨 API; 예보 날씨 URL
15
+ * 글로벌 날씨 API; 예보 날씨 URL (5 days / 3 hour forecast)
16
16
  */
17
- const API_BASE_FORECAST =
18
- "https://pro.openweathermap.org/data/2.5/forecast/hourly";
17
+ const API_BASE_FORECAST = "https://api.openweathermap.org/data/2.5/forecast";
19
18
 
20
19
  const COMMON_OPTIONS = {
21
20
  units: "metric", // 섭씨 온도