@uniai-fe/uds-templates 0.6.4 → 0.6.6
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/dist/styles.css
CHANGED
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
--cctv-live-state-dot-off: var(--color-border-strong);
|
|
111
111
|
--cctv-live-state-text-off: var(--color-label-disabled);
|
|
112
112
|
/* Error */
|
|
113
|
+
--cctv-status-text-color: var(--color-common-99);
|
|
113
114
|
--cctv-error-text-color: var(--color-label-disabled);
|
|
114
115
|
--cctv-error-icon-color: var(--color-label-disabled);
|
|
115
116
|
/* Pagination */
|
|
@@ -1798,14 +1799,23 @@
|
|
|
1798
1799
|
}
|
|
1799
1800
|
|
|
1800
1801
|
.cctv-video-error-icon {
|
|
1802
|
+
display: none;
|
|
1801
1803
|
margin-bottom: 2px;
|
|
1802
1804
|
fill: var(--cctv-error-icon-color);
|
|
1803
1805
|
}
|
|
1804
1806
|
|
|
1805
1807
|
.cctv-video-error-message {
|
|
1806
1808
|
font-size: 13px;
|
|
1807
|
-
color: var(--cctv-
|
|
1809
|
+
color: var(--cctv-status-text-color);
|
|
1808
1810
|
line-height: 1.5em;
|
|
1811
|
+
font-weight: 500;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
.cctv-video-overlay-body.is-error .cctv-video-error-icon {
|
|
1815
|
+
display: block;
|
|
1816
|
+
}
|
|
1817
|
+
.cctv-video-overlay-body.is-error .cctv-video-error-message {
|
|
1818
|
+
color: var(--cctv-error-text-color);
|
|
1809
1819
|
font-weight: 600;
|
|
1810
1820
|
}
|
|
1811
1821
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniai-fe/uds-templates",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "UNIAI Design System; UI Templates Package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"clsx": "^2.1.1",
|
|
70
|
-
"dayjs": "^1.11.
|
|
70
|
+
"dayjs": "^1.11.21"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@svgr/webpack": "^8.1.0",
|
|
74
|
-
"@tanstack/react-query": "^5.
|
|
74
|
+
"@tanstack/react-query": "^5.101.0",
|
|
75
75
|
"@types/node": "^24.12.3",
|
|
76
|
-
"@types/react": "^19.2.
|
|
76
|
+
"@types/react": "^19.2.16",
|
|
77
77
|
"@types/react-dom": "^19.2.3",
|
|
78
78
|
"@uniai-fe/eslint-config": "workspace:*",
|
|
79
79
|
"@uniai-fe/next-devkit": "workspace:*",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"jotai": "^2.20.0",
|
|
91
91
|
"next": "^15.5.18",
|
|
92
92
|
"prettier": "^3.8.3",
|
|
93
|
-
"react-hook-form": "^7.
|
|
94
|
-
"sass": "^1.
|
|
93
|
+
"react-hook-form": "^7.77.0",
|
|
94
|
+
"sass": "^1.100.0",
|
|
95
95
|
"typescript": "5.9.3"
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -139,14 +139,26 @@
|
|
|
139
139
|
justify-content: center;
|
|
140
140
|
}
|
|
141
141
|
.cctv-video-error-icon {
|
|
142
|
+
display: none;
|
|
142
143
|
margin-bottom: 2px;
|
|
143
144
|
fill: var(--cctv-error-icon-color);
|
|
144
145
|
}
|
|
145
146
|
.cctv-video-error-message {
|
|
146
147
|
font-size: 13px;
|
|
147
|
-
color: var(--cctv-
|
|
148
|
+
color: var(--cctv-status-text-color);
|
|
148
149
|
line-height: 1.5em;
|
|
149
|
-
font-weight:
|
|
150
|
+
font-weight: 500;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.cctv-video-overlay-body.is-error {
|
|
154
|
+
.cctv-video-error-icon {
|
|
155
|
+
display: block;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.cctv-video-error-message {
|
|
159
|
+
color: var(--cctv-error-text-color);
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
}
|
|
150
162
|
}
|
|
151
163
|
|
|
152
164
|
.cctv-video-status-text {
|
package/src/cctv/types/api.ts
CHANGED
|
@@ -168,6 +168,7 @@ export interface API_Res_CctvCompanyCameraList extends API_Res_CctvCameraData {
|
|
|
168
168
|
* @property {string} cam_id 카메라 id코드
|
|
169
169
|
* @property {string} stream_path 카메라 스트림 path
|
|
170
170
|
* @property {boolean} is_public 카메라 외부공유 여부
|
|
171
|
+
* @property {boolean} [farm_cctv_is_public] farm 단위 CCTV 공개 동의 여부
|
|
171
172
|
* @property {boolean} is_watching 외부시청 중 여부
|
|
172
173
|
* @property {number} viewer_count 현재 외부시청 세션 수
|
|
173
174
|
*/
|
|
@@ -185,6 +186,10 @@ export interface API_Res_CctvViewerStatusData
|
|
|
185
186
|
* 스트림 path
|
|
186
187
|
*/
|
|
187
188
|
stream_path: string;
|
|
189
|
+
/**
|
|
190
|
+
* farm 단위 CCTV 공개 동의 여부
|
|
191
|
+
*/
|
|
192
|
+
farm_cctv_is_public?: boolean;
|
|
188
193
|
/**
|
|
189
194
|
* 외부시청 중 여부
|
|
190
195
|
*/
|
|
@@ -195,12 +200,23 @@ export interface API_Res_CctvViewerStatusData
|
|
|
195
200
|
viewer_count: number;
|
|
196
201
|
}
|
|
197
202
|
|
|
203
|
+
/**
|
|
204
|
+
* CCTV; 카메라 외부시청 상태 목록 응답 데이터
|
|
205
|
+
* @property {API_Res_CctvViewerStatusData[]} items 카메라 외부시청 상태 목록
|
|
206
|
+
*/
|
|
207
|
+
export interface API_Res_CctvViewerStatusBodyData {
|
|
208
|
+
/**
|
|
209
|
+
* 카메라 외부시청 상태 목록
|
|
210
|
+
*/
|
|
211
|
+
items: API_Res_CctvViewerStatusData[];
|
|
212
|
+
}
|
|
213
|
+
|
|
198
214
|
/**
|
|
199
215
|
* CCTV; 카메라 외부시청 상태 응답
|
|
200
|
-
* @typedef {API_Res_Base<
|
|
216
|
+
* @typedef {API_Res_Base<API_Res_CctvViewerStatusBodyData>} API_Res_CctvViewerStatus
|
|
201
217
|
*/
|
|
202
218
|
export type API_Res_CctvViewerStatus =
|
|
203
|
-
API_Res_Base<
|
|
219
|
+
API_Res_Base<API_Res_CctvViewerStatusBodyData>;
|
|
204
220
|
|
|
205
221
|
/**
|
|
206
222
|
* CCTV; 각 분야그룹의 업체목록
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
export const CCTV_MESSAGE = {
|
|
8
8
|
selectCam: "카메라를 선택하세요.",
|
|
9
9
|
fetching: "CCTV 데이터를 불러오는 중입니다.",
|
|
10
|
-
preparing: "
|
|
10
|
+
preparing: "CCTV 영상을 연결하고 있습니다.",
|
|
11
11
|
sessionEnded:
|
|
12
12
|
"장시간 미사용으로 연결이 종료되었습니다. 계속 확인하시려면 다시 연결해 주세요.",
|
|
13
13
|
tokenError: "토큰을 발급하지 못했습니다.",
|
|
@@ -21,6 +21,10 @@ const RTC_PREPARING_STATES = new Set<RTCPeerConnectionState>([
|
|
|
21
21
|
"closed",
|
|
22
22
|
]);
|
|
23
23
|
|
|
24
|
+
const RTC_SESSION_ENDED_RECONNECT_STATES = new Set<RTCPeerConnectionState>([
|
|
25
|
+
"closed",
|
|
26
|
+
]);
|
|
27
|
+
|
|
24
28
|
/**
|
|
25
29
|
* CCTV; 스트리밍 상태에 따른 메시지 추출
|
|
26
30
|
* @param {CctvVideoOverlayMessageParams} params 상태 파라미터
|
|
@@ -51,12 +55,14 @@ export function getOverlayMessage({
|
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
if (!cam.cam_online) return CCTV_MESSAGE.offline;
|
|
54
|
-
if (canReconnect) return CCTV_MESSAGE.sessionEnded;
|
|
55
58
|
// 에러 상태가 준비 상태와 겹칠 때는 에러 문구가 최종 표시 계약을 우선한다.
|
|
56
59
|
if (isTokenError) return CCTV_MESSAGE.tokenError;
|
|
57
60
|
if (streamError) return streamError;
|
|
58
|
-
if (isTokenLoading || isStreaming) return CCTV_MESSAGE.preparing;
|
|
59
61
|
if (connectionState === "failed") return CCTV_MESSAGE.offline;
|
|
62
|
+
if (canReconnect && RTC_SESSION_ENDED_RECONNECT_STATES.has(connectionState)) {
|
|
63
|
+
return CCTV_MESSAGE.sessionEnded;
|
|
64
|
+
}
|
|
65
|
+
if (isTokenLoading || isStreaming) return CCTV_MESSAGE.preparing;
|
|
60
66
|
if (RTC_PREPARING_STATES.has(connectionState)) return CCTV_MESSAGE.preparing;
|
|
61
67
|
return null;
|
|
62
68
|
}
|