@daeryun/dr_components 0.8.78 → 0.8.80
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/asset/images/daeryuntalk/firstGo.svg +1 -1
- package/dist/asset/images/daeryuntalk/re_send.svg +11 -0
- package/dist/asset/images/daeryuntalk/viewer/gray-download.svg +1 -1
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/Daeryuntalk/ChatButton.jsx +1 -1
- package/dist/components/Daeryuntalk/ChatButton.tsx +1 -1
- package/dist/components/Daeryuntalk/ChatConversation.jsx +59 -94
- package/dist/components/Daeryuntalk/ChatConversation.tsx +58 -112
- package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.jsx +2 -2
- package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.tsx +2 -2
- package/dist/components/Daeryuntalk/ChatHomeView.jsx +11 -7
- package/dist/components/Daeryuntalk/ChatHomeView.tsx +13 -9
- package/dist/components/Daeryuntalk/ChatItem/ChatFile.jsx +8 -8
- package/dist/components/Daeryuntalk/ChatItem/ChatFile.tsx +8 -8
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.jsx +10 -0
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.tsx +15 -0
- package/dist/components/Daeryuntalk/ChatMessage.jsx +8 -3
- package/dist/components/Daeryuntalk/ChatMessage.tsx +11 -12
- package/dist/components/Daeryuntalk/ChatWidget.jsx +13 -12
- package/dist/components/Daeryuntalk/ChatWidget.tsx +15 -12
- package/dist/components/Daeryuntalk/DaeryuntalkContext.jsx +2 -1
- package/dist/components/Daeryuntalk/DaeryuntalkContext.tsx +2 -1
- package/dist/components/Daeryuntalk/HistoryView.jsx +3 -3
- package/dist/components/Daeryuntalk/HistoryView.tsx +3 -3
- package/dist/components/Daeryuntalk/HomeView.jsx +36 -21
- package/dist/components/Daeryuntalk/HomeView.tsx +37 -21
- package/dist/components/Daeryuntalk/NoticeMessage.jsx +5 -5
- package/dist/components/Daeryuntalk/NoticeMessage.tsx +10 -9
- package/dist/components/Daeryuntalk/Tiptap/Tiptap.jsx +4 -4
- package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +6 -4
- package/dist/components/Daeryuntalk/Viewer/TbPcViewer.jsx +9 -6
- package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +17 -16
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.d.ts +2 -1
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.js +10 -5
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.ts +9 -1
- package/dist/components/Daeryuntalk/_types/message.d.ts +1 -1
- package/dist/components/Daeryuntalk/_types/message.js +6 -1
- package/dist/components/Daeryuntalk/_types/message.ts +7 -1
- package/dist/components/Daeryuntalk/index.jsx +12 -0
- package/dist/components/Daeryuntalk/index.tsx +13 -0
- package/dist/styles/globals.css +81 -27
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -12,31 +12,32 @@ const NoticeMessage: React.FC<NoticeMessageProps> = ({ content, isMobile }) => {
|
|
|
12
12
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<
|
|
15
|
+
<button
|
|
16
|
+
type={'button'}
|
|
17
|
+
onClick={() => setIsExpanded(!isExpanded)}
|
|
18
|
+
className={`bg-[#F7F7F7]/90 px-[20px] pb-[12px] pt-[8px] backdrop-blur-[4px]`}
|
|
19
|
+
aria-label={isExpanded ? '접기' : '펼치기'}
|
|
20
|
+
>
|
|
16
21
|
<div className="flex items-start gap-[8px]">
|
|
17
22
|
<div className="flex-shrink-0">
|
|
18
23
|
<NoticeIcon width={24} height={24} />
|
|
19
24
|
</div>
|
|
20
25
|
<div className="">
|
|
21
26
|
<div
|
|
22
|
-
className={`dr_talk_body_medium2 overflow-hidden pt-[0.5px] ${isExpanded ? '' : 'line-clamp-2'}`}
|
|
27
|
+
className={`dr_talk_body_medium2 overflow-hidden whitespace-pre-line break-words pt-[0.5px] text-left ${isExpanded ? '' : 'line-clamp-2'}`}
|
|
23
28
|
>
|
|
24
29
|
{content}
|
|
25
30
|
</div>
|
|
26
31
|
</div>
|
|
27
|
-
<
|
|
28
|
-
onClick={() => setIsExpanded(!isExpanded)}
|
|
29
|
-
className="ml-1 flex-shrink-0 transform transition-transform duration-200"
|
|
30
|
-
aria-label={isExpanded ? '접기' : '펼치기'}
|
|
31
|
-
>
|
|
32
|
+
<div className="ml-1 flex-shrink-0 transform transition-transform duration-200">
|
|
32
33
|
<div
|
|
33
34
|
className={`transform transition-transform duration-200 ${isExpanded ? 'rotate-90' : '-rotate-90'}`}
|
|
34
35
|
>
|
|
35
36
|
<PrevIcon width={24} height={24} />
|
|
36
37
|
</div>
|
|
37
|
-
</
|
|
38
|
+
</div>
|
|
38
39
|
</div>
|
|
39
|
-
</
|
|
40
|
+
</button>
|
|
40
41
|
);
|
|
41
42
|
};
|
|
42
43
|
|
|
@@ -39,12 +39,12 @@ const Tiptap = forwardRef(({ onChange, placeholder = '메시지를 입력하세
|
|
|
39
39
|
class: `dr_talk_body_medium2 focus:outline-none min-h-[36px] max-h-[72px] overflow-y-auto resize-none pt-[6px] pb-[4px] break-words whitespace-pre-wrap word-wrap break-word overflow-wrap-anywhere no-scrollbar `
|
|
40
40
|
},
|
|
41
41
|
handleKeyDown: (view, event) => {
|
|
42
|
+
const isMobile = /Mobi|Android/i.test(navigator.userAgent); // 모바일 여부 판별
|
|
42
43
|
if (event.key === 'Enter') {
|
|
43
|
-
if (event.shiftKey) {
|
|
44
|
-
// Shift+Enter
|
|
44
|
+
if (event.shiftKey || isMobile) {
|
|
45
|
+
// Shift+Enter 또는 모바일 Enter는 줄바꿈
|
|
45
46
|
if (editor) {
|
|
46
47
|
editor.commands.setHardBreak();
|
|
47
|
-
// 줄바꿈 이후 스크롤 이동 보장
|
|
48
48
|
requestAnimationFrame(() => {
|
|
49
49
|
if (view && view.dom) {
|
|
50
50
|
view.dom.scrollTop = view.dom.scrollHeight;
|
|
@@ -54,7 +54,7 @@ const Tiptap = forwardRef(({ onChange, placeholder = '메시지를 입력하세
|
|
|
54
54
|
return true; // 기본 동작 방지
|
|
55
55
|
}
|
|
56
56
|
else {
|
|
57
|
-
// Enter
|
|
57
|
+
// 데스크탑에서의 일반 Enter는 메시지 전송
|
|
58
58
|
event.preventDefault();
|
|
59
59
|
const content = editor === null || editor === void 0 ? void 0 : editor.getText();
|
|
60
60
|
if (content && content.trim() && onEnterKeyPress) {
|
|
@@ -60,12 +60,14 @@ const Tiptap = forwardRef<TiptapEditorRef, TiptapProps>(
|
|
|
60
60
|
class: `dr_talk_body_medium2 focus:outline-none min-h-[36px] max-h-[72px] overflow-y-auto resize-none pt-[6px] pb-[4px] break-words whitespace-pre-wrap word-wrap break-word overflow-wrap-anywhere no-scrollbar `
|
|
61
61
|
},
|
|
62
62
|
handleKeyDown: (view, event) => {
|
|
63
|
+
const isMobile = /Mobi|Android/i.test(navigator.userAgent); // 모바일 여부 판별
|
|
64
|
+
|
|
63
65
|
if (event.key === 'Enter') {
|
|
64
|
-
if (event.shiftKey) {
|
|
65
|
-
// Shift+Enter
|
|
66
|
+
if (event.shiftKey || isMobile) {
|
|
67
|
+
// Shift+Enter 또는 모바일 Enter는 줄바꿈
|
|
66
68
|
if (editor) {
|
|
67
69
|
editor.commands.setHardBreak();
|
|
68
|
-
|
|
70
|
+
|
|
69
71
|
requestAnimationFrame(() => {
|
|
70
72
|
if (view && view.dom) {
|
|
71
73
|
view.dom.scrollTop = view.dom.scrollHeight;
|
|
@@ -74,7 +76,7 @@ const Tiptap = forwardRef<TiptapEditorRef, TiptapProps>(
|
|
|
74
76
|
}
|
|
75
77
|
return true; // 기본 동작 방지
|
|
76
78
|
} else {
|
|
77
|
-
// Enter
|
|
79
|
+
// 데스크탑에서의 일반 Enter는 메시지 전송
|
|
78
80
|
event.preventDefault();
|
|
79
81
|
const content = editor?.getText();
|
|
80
82
|
if (content && content.trim() && onEnterKeyPress) {
|
|
@@ -15,14 +15,17 @@ const TbPcViewer = ({ imageViewerMessage, handleDownload, currentIndex, setCurre
|
|
|
15
15
|
{/* Main Image + Toolbar */}
|
|
16
16
|
<div className="group relative flex max-h-[80vh] max-w-[90vw] items-center justify-center md2:w-[800px] ">
|
|
17
17
|
{/* 고정된 위치의 좌측 네비게이션 버튼 */}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
<button onClick={() => setCurrentIndex(prev => prev - 1)} disabled={currentIndex < 1} className={`${currentIndex < 1 ? ' disabled:pointer-events-none disabled:opacity-30 ' : ' hover:scale-110 '} absolute top-1/2 z-20 -translate-y-1/2 rotate-180 text-white transition-transform md2:-left-[48px] lg:-left-[68px]`}>
|
|
19
|
+
<MoveSwipingIcon />
|
|
20
|
+
</button>
|
|
21
21
|
|
|
22
22
|
{/* 고정된 위치의 우측 네비게이션 버튼 */}
|
|
23
|
-
{currentIndex
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
<button disabled={currentIndex >= previewImages.length - 1} onClick={() => setCurrentIndex(prev => prev + 1)} className={`
|
|
24
|
+
${currentIndex >= previewImages.length - 1 ? ' disabled:opacity-30 ' : ' hover:scale-110 '}
|
|
25
|
+
absolute top-1/2 z-20 -translate-y-1/2 text-white transition-transform md2:-right-[48px] lg:-right-[68px]
|
|
26
|
+
`}>
|
|
27
|
+
<MoveSwipingIcon />
|
|
28
|
+
</button>
|
|
26
29
|
|
|
27
30
|
{/* 고정된 위치의 닫기 버튼 */}
|
|
28
31
|
<button onClick={closeImageViewer} className="absolute right-[20px] top-[20px] z-20 transition-transform hover:scale-110">
|
|
@@ -52,24 +52,25 @@ const TbPcViewer = ({
|
|
|
52
52
|
{/* Main Image + Toolbar */}
|
|
53
53
|
<div className="group relative flex max-h-[80vh] max-w-[90vw] items-center justify-center md2:w-[800px] ">
|
|
54
54
|
{/* 고정된 위치의 좌측 네비게이션 버튼 */}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
)}
|
|
55
|
+
<button
|
|
56
|
+
onClick={() => setCurrentIndex(prev => prev - 1)}
|
|
57
|
+
disabled={currentIndex < 1}
|
|
58
|
+
className={`${currentIndex < 1 ? ' disabled:pointer-events-none disabled:opacity-30 ' : ' hover:scale-110 '} absolute top-1/2 z-20 -translate-y-1/2 rotate-180 text-white transition-transform md2:-left-[48px] lg:-left-[68px]`}
|
|
59
|
+
>
|
|
60
|
+
<MoveSwipingIcon />
|
|
61
|
+
</button>
|
|
63
62
|
|
|
64
63
|
{/* 고정된 위치의 우측 네비게이션 버튼 */}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
<button
|
|
65
|
+
disabled={currentIndex >= previewImages.length - 1}
|
|
66
|
+
onClick={() => setCurrentIndex(prev => prev + 1)}
|
|
67
|
+
className={`
|
|
68
|
+
${currentIndex >= previewImages.length - 1 ? ' disabled:opacity-30 ' : ' hover:scale-110 '}
|
|
69
|
+
absolute top-1/2 z-20 -translate-y-1/2 text-white transition-transform md2:-right-[48px] lg:-right-[68px]
|
|
70
|
+
`}
|
|
71
|
+
>
|
|
72
|
+
<MoveSwipingIcon />
|
|
73
|
+
</button>
|
|
73
74
|
|
|
74
75
|
{/* 고정된 위치의 닫기 버튼 */}
|
|
75
76
|
<button
|
|
@@ -15,8 +15,9 @@ interface props {
|
|
|
15
15
|
historyList: History[];
|
|
16
16
|
inquiryMainData: IChatInquiryMainDataResponse | null;
|
|
17
17
|
isMobile: boolean;
|
|
18
|
+
setIsAuthenticated: Dispatch<SetStateAction<boolean>>;
|
|
18
19
|
}
|
|
19
|
-
export declare const useSocketEventHandler: ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile }: props) => {
|
|
20
|
+
export declare const useSocketEventHandler: ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile, setIsAuthenticated }: props) => {
|
|
20
21
|
initializeDaeryuntalk: (hashValue: string | null, isOpen: boolean, version?: string) => Promise<import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<IChatInquiryMainDataResponse> | null | undefined>;
|
|
21
22
|
sendHeartbeat: () => void;
|
|
22
23
|
sendInquiryJoined: (chatInquiryNumber: string) => void;
|
|
@@ -8,13 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { useCallback } from 'react';
|
|
11
|
-
import { getChatInquiryMain, initializeDaeryuntalk as apiInitializeDaeryuntalk } from '../../_api/daeryuntalk';
|
|
11
|
+
import { getChatInquiryMain, getHistoryList, initializeDaeryuntalk as apiInitializeDaeryuntalk } from '../../_api/daeryuntalk';
|
|
12
12
|
import { convertApiMessageToUiMessage, convertSocketObjectToUiMessage } from '../../_lib';
|
|
13
13
|
import { MessageSocketType } from '../../_enums/socket_type';
|
|
14
14
|
import { InquiryStatus } from '../../_enums/ask-status';
|
|
15
15
|
import { useDaeryunTalkToast } from '../../Toast/DaeryuntalkToastProvider';
|
|
16
16
|
import { getErrorMessageMap } from '../../_enums/error';
|
|
17
|
-
export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile }) => {
|
|
17
|
+
export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile, setIsAuthenticated }) => {
|
|
18
18
|
const toast = useDaeryunTalkToast();
|
|
19
19
|
/**
|
|
20
20
|
* 1. heartbeat
|
|
@@ -130,7 +130,7 @@ export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessage
|
|
|
130
130
|
}, []);
|
|
131
131
|
// Daeryuntalk API 초기화 메소드
|
|
132
132
|
const initializeDaeryuntalk = useCallback((hashValue, isOpen, version) => __awaiter(void 0, void 0, void 0, function* () {
|
|
133
|
-
var _a, _b, _c, _d;
|
|
133
|
+
var _a, _b, _c, _d, _e;
|
|
134
134
|
console.log('[DaeryuntalkContext] 초기화 메소드 호출됨', version ? `버전: ${version}` : '기본 버전 사용');
|
|
135
135
|
try {
|
|
136
136
|
setIsLoading(true);
|
|
@@ -216,11 +216,16 @@ export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessage
|
|
|
216
216
|
console.error('[DaeryuntalkContext] 웹소켓 메시지 처리 오류:', error);
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
|
+
const response = yield getHistoryList({ version });
|
|
220
|
+
if (response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK') {
|
|
221
|
+
setIsAuthenticated === null || setIsAuthenticated === void 0 ? void 0 : setIsAuthenticated(true);
|
|
222
|
+
setHistoryList === null || setHistoryList === void 0 ? void 0 : setHistoryList((_a = response.data.chat_inquiry_list) !== null && _a !== void 0 ? _a : []);
|
|
223
|
+
}
|
|
219
224
|
if (errorCode || !inquiryData || !socket) {
|
|
220
225
|
errorCode && toast.error(getErrorMessageMap(errorCode));
|
|
221
226
|
}
|
|
222
227
|
if (hashValue) {
|
|
223
|
-
if (((
|
|
228
|
+
if (((_b = hashAuth === null || hashAuth === void 0 ? void 0 : hashAuth.result_info) === null || _b === void 0 ? void 0 : _b.result_cd) === 'OK' || ((_c = hashAuth === null || hashAuth === void 0 ? void 0 : hashAuth.result_info) === null || _c === void 0 ? void 0 : _c.result_type_cd) === 'OK') {
|
|
224
229
|
console.log('해쉬 인증 완료');
|
|
225
230
|
}
|
|
226
231
|
else {
|
|
@@ -228,7 +233,7 @@ export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessage
|
|
|
228
233
|
window.location.hash = '/';
|
|
229
234
|
}
|
|
230
235
|
}
|
|
231
|
-
if (!(((
|
|
236
|
+
if (!(((_d = inquiryData === null || inquiryData === void 0 ? void 0 : inquiryData.result_info) === null || _d === void 0 ? void 0 : _d.result_cd) === 'OK' || ((_e = inquiryData === null || inquiryData === void 0 ? void 0 : inquiryData.result_info) === null || _e === void 0 ? void 0 : _e.result_type_cd) === 'OK')) {
|
|
232
237
|
inquiryData && toast.error(getErrorMessageMap(inquiryData));
|
|
233
238
|
return inquiryData;
|
|
234
239
|
}
|
|
@@ -3,6 +3,7 @@ import { Dispatch, MutableRefObject, SetStateAction, useCallback, useRef } from
|
|
|
3
3
|
import {
|
|
4
4
|
followupAttend,
|
|
5
5
|
getChatInquiryMain,
|
|
6
|
+
getHistoryList,
|
|
6
7
|
initializeDaeryuntalk as apiInitializeDaeryuntalk
|
|
7
8
|
} from '../../_api/daeryuntalk';
|
|
8
9
|
import { Message } from '../../_types/message';
|
|
@@ -28,6 +29,7 @@ interface props {
|
|
|
28
29
|
historyList: History[];
|
|
29
30
|
inquiryMainData: IChatInquiryMainDataResponse | null;
|
|
30
31
|
isMobile: boolean;
|
|
32
|
+
setIsAuthenticated: Dispatch<SetStateAction<boolean>>;
|
|
31
33
|
}
|
|
32
34
|
export const useSocketEventHandler = ({
|
|
33
35
|
setIsConnected,
|
|
@@ -41,7 +43,8 @@ export const useSocketEventHandler = ({
|
|
|
41
43
|
setHistoryList,
|
|
42
44
|
historyList,
|
|
43
45
|
inquiryMainData,
|
|
44
|
-
isMobile
|
|
46
|
+
isMobile,
|
|
47
|
+
setIsAuthenticated
|
|
45
48
|
}: props) => {
|
|
46
49
|
const toast = useDaeryunTalkToast();
|
|
47
50
|
/**
|
|
@@ -291,6 +294,11 @@ export const useSocketEventHandler = ({
|
|
|
291
294
|
}
|
|
292
295
|
}
|
|
293
296
|
);
|
|
297
|
+
const response = await getHistoryList({ version });
|
|
298
|
+
if (response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK') {
|
|
299
|
+
setIsAuthenticated?.(true);
|
|
300
|
+
setHistoryList?.(response.data.chat_inquiry_list ?? []);
|
|
301
|
+
}
|
|
294
302
|
|
|
295
303
|
if (errorCode || !inquiryData || !socket) {
|
|
296
304
|
errorCode && toast.error(getErrorMessageMap(errorCode));
|
|
@@ -88,4 +88,4 @@ export declare const hasFileArray: (message: Message) => boolean;
|
|
|
88
88
|
export declare const hasFiles: (message: Message) => boolean;
|
|
89
89
|
export declare const hasImages: (message: Message) => boolean;
|
|
90
90
|
export declare const hasWebPage: (message: Message) => boolean;
|
|
91
|
-
export declare const
|
|
91
|
+
export declare const hasWorkFlow: (message: Message) => boolean;
|
|
@@ -16,4 +16,9 @@ export const hasFiles = (message) => !!message.files && message.files.filter(fil
|
|
|
16
16
|
// 이미지가 있는지
|
|
17
17
|
export const hasImages = (message) => !!message.files && message.files.filter(fil => fil.type === 'image').length > 0;
|
|
18
18
|
export const hasWebPage = (message) => !!message.webPage;
|
|
19
|
-
export const
|
|
19
|
+
export const hasWorkFlow = (message) => [
|
|
20
|
+
String(InquiryMessageTemplateType.WORK_FLOW_TEMPLATE_1),
|
|
21
|
+
String(InquiryMessageTemplateType.WORK_FLOW_TEMPLATE_2),
|
|
22
|
+
String(InquiryMessageTemplateType.WORK_FLOW_TEMPLATE_3),
|
|
23
|
+
String(InquiryMessageTemplateType.WORK_FLOW_TEMPLATE_4)
|
|
24
|
+
].includes((message === null || message === void 0 ? void 0 : message.templateType) || '');
|
|
@@ -146,4 +146,10 @@ export const hasFiles = (message: Message): boolean =>
|
|
|
146
146
|
export const hasImages = (message: Message): boolean =>
|
|
147
147
|
!!message.files && message.files.filter(fil => fil.type === 'image').length > 0;
|
|
148
148
|
export const hasWebPage = (message: Message): boolean => !!message.webPage;
|
|
149
|
-
export const
|
|
149
|
+
export const hasWorkFlow = (message: Message): boolean =>
|
|
150
|
+
[
|
|
151
|
+
String(InquiryMessageTemplateType.WORK_FLOW_TEMPLATE_1),
|
|
152
|
+
String(InquiryMessageTemplateType.WORK_FLOW_TEMPLATE_2),
|
|
153
|
+
String(InquiryMessageTemplateType.WORK_FLOW_TEMPLATE_3),
|
|
154
|
+
String(InquiryMessageTemplateType.WORK_FLOW_TEMPLATE_4)
|
|
155
|
+
].includes(message?.templateType || '');
|
|
@@ -12,6 +12,18 @@ const Daeryuntalk = ({ tel = '1800-7905' }) => {
|
|
|
12
12
|
// const isMobile = mobile();
|
|
13
13
|
const [hashValue, setHashValue] = useState(null);
|
|
14
14
|
const isLocal = process.env.NODE_ENV === 'development';
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (isOpen && isMobile) {
|
|
17
|
+
document.body.style.overflow = 'hidden';
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
document.body.style.overflow = '';
|
|
21
|
+
}
|
|
22
|
+
// 컴포넌트가 unmount 될 때도 원복
|
|
23
|
+
return () => {
|
|
24
|
+
document.body.style.overflow = '';
|
|
25
|
+
};
|
|
26
|
+
}, [isOpen]);
|
|
15
27
|
const toggleChat = () => {
|
|
16
28
|
setIsOpen(prev => !prev);
|
|
17
29
|
};
|
|
@@ -20,6 +20,19 @@ const Daeryuntalk: React.FC<DaeryuntalkProps> = ({ tel = '1800-7905' }) => {
|
|
|
20
20
|
const [hashValue, setHashValue] = useState<string | null>(null);
|
|
21
21
|
const isLocal = process.env.NODE_ENV === 'development';
|
|
22
22
|
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (isOpen && isMobile) {
|
|
25
|
+
document.body.style.overflow = 'hidden';
|
|
26
|
+
} else {
|
|
27
|
+
document.body.style.overflow = '';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 컴포넌트가 unmount 될 때도 원복
|
|
31
|
+
return () => {
|
|
32
|
+
document.body.style.overflow = '';
|
|
33
|
+
};
|
|
34
|
+
}, [isOpen]);
|
|
35
|
+
|
|
23
36
|
const toggleChat = () => {
|
|
24
37
|
setIsOpen(prev => !prev);
|
|
25
38
|
};
|
package/dist/styles/globals.css
CHANGED
|
@@ -1013,6 +1013,10 @@ video {
|
|
|
1013
1013
|
pointer-events: auto !important;
|
|
1014
1014
|
}
|
|
1015
1015
|
|
|
1016
|
+
.pointer-events-auto {
|
|
1017
|
+
pointer-events: auto;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1016
1020
|
.visible {
|
|
1017
1021
|
visibility: visible;
|
|
1018
1022
|
}
|
|
@@ -1033,10 +1037,6 @@ video {
|
|
|
1033
1037
|
position: relative;
|
|
1034
1038
|
}
|
|
1035
1039
|
|
|
1036
|
-
.sticky {
|
|
1037
|
-
position: sticky;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
1040
|
.inset-0 {
|
|
1041
1041
|
inset: 0px;
|
|
1042
1042
|
}
|
|
@@ -1061,10 +1061,6 @@ video {
|
|
|
1061
1061
|
bottom: -2px;
|
|
1062
1062
|
}
|
|
1063
1063
|
|
|
1064
|
-
.-left-\[68px\] {
|
|
1065
|
-
left: -68px;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
1064
|
.-right-0\.5 {
|
|
1069
1065
|
right: -0.125rem;
|
|
1070
1066
|
}
|
|
@@ -1077,10 +1073,6 @@ video {
|
|
|
1077
1073
|
right: -50px;
|
|
1078
1074
|
}
|
|
1079
1075
|
|
|
1080
|
-
.-right-\[68px\] {
|
|
1081
|
-
right: -68px;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
1076
|
.-right-\[8px\] {
|
|
1085
1077
|
right: -8px;
|
|
1086
1078
|
}
|
|
@@ -2323,6 +2315,10 @@ video {
|
|
|
2323
2315
|
height: 0px;
|
|
2324
2316
|
}
|
|
2325
2317
|
|
|
2318
|
+
.h-\[100\%\] {
|
|
2319
|
+
height: 100%;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2326
2322
|
.h-\[1000px\] {
|
|
2327
2323
|
height: 1000px;
|
|
2328
2324
|
}
|
|
@@ -5510,11 +5506,6 @@ video {
|
|
|
5510
5506
|
background-color: rgb(247 247 247 / var(--tw-bg-opacity, 1));
|
|
5511
5507
|
}
|
|
5512
5508
|
|
|
5513
|
-
.bg-drTalkWhite {
|
|
5514
|
-
--tw-bg-opacity: 1;
|
|
5515
|
-
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
5516
|
-
}
|
|
5517
|
-
|
|
5518
5509
|
.bg-gray-100 {
|
|
5519
5510
|
--tw-bg-opacity: 1;
|
|
5520
5511
|
background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
|
|
@@ -6363,6 +6354,10 @@ video {
|
|
|
6363
6354
|
padding-bottom: 30px;
|
|
6364
6355
|
}
|
|
6365
6356
|
|
|
6357
|
+
.pb-\[34px\] {
|
|
6358
|
+
padding-bottom: 34px;
|
|
6359
|
+
}
|
|
6360
|
+
|
|
6366
6361
|
.pb-\[35px\] {
|
|
6367
6362
|
padding-bottom: 35px;
|
|
6368
6363
|
}
|
|
@@ -9194,6 +9189,10 @@ body {
|
|
|
9194
9189
|
outline-offset: 2px;
|
|
9195
9190
|
}
|
|
9196
9191
|
|
|
9192
|
+
.disabled\:pointer-events-none:disabled {
|
|
9193
|
+
pointer-events: none;
|
|
9194
|
+
}
|
|
9195
|
+
|
|
9197
9196
|
.disabled\:cursor-not-allowed:disabled {
|
|
9198
9197
|
cursor: not-allowed;
|
|
9199
9198
|
}
|
|
@@ -9238,6 +9237,10 @@ body {
|
|
|
9238
9237
|
color: rgb(219 219 219 / var(--tw-text-opacity, 1));
|
|
9239
9238
|
}
|
|
9240
9239
|
|
|
9240
|
+
.disabled\:opacity-30:disabled {
|
|
9241
|
+
opacity: 0.3;
|
|
9242
|
+
}
|
|
9243
|
+
|
|
9241
9244
|
.group:hover .group-hover\:visible {
|
|
9242
9245
|
visibility: visible;
|
|
9243
9246
|
}
|
|
@@ -15833,8 +15836,8 @@ body {
|
|
|
15833
15836
|
bottom: 165px;
|
|
15834
15837
|
}
|
|
15835
15838
|
|
|
15836
|
-
.xs\:right-\[
|
|
15837
|
-
right:
|
|
15839
|
+
.xs\:right-\[25px\] {
|
|
15840
|
+
right: 25px;
|
|
15838
15841
|
}
|
|
15839
15842
|
|
|
15840
15843
|
.xs\:top-\[10px\] {
|
|
@@ -15862,6 +15865,10 @@ body {
|
|
|
15862
15865
|
height: 100dvh;
|
|
15863
15866
|
}
|
|
15864
15867
|
|
|
15868
|
+
.xs\:h-\[calc\(100vh-165px\)\] {
|
|
15869
|
+
height: calc(100vh - 165px);
|
|
15870
|
+
}
|
|
15871
|
+
|
|
15865
15872
|
.xs\:h-\[calc\(100vh-165px-64px\)\] {
|
|
15866
15873
|
height: calc(100vh - 165px - 64px);
|
|
15867
15874
|
}
|
|
@@ -15870,6 +15877,11 @@ body {
|
|
|
15870
15877
|
height: auto;
|
|
15871
15878
|
}
|
|
15872
15879
|
|
|
15880
|
+
.xs\:h-fit {
|
|
15881
|
+
height: -moz-fit-content;
|
|
15882
|
+
height: fit-content;
|
|
15883
|
+
}
|
|
15884
|
+
|
|
15873
15885
|
.xs\:max-h-\[626px\] {
|
|
15874
15886
|
max-height: 626px;
|
|
15875
15887
|
}
|
|
@@ -15894,8 +15906,18 @@ body {
|
|
|
15894
15906
|
width: 100vw;
|
|
15895
15907
|
}
|
|
15896
15908
|
|
|
15897
|
-
.xs\:max-w-\[
|
|
15898
|
-
max-width:
|
|
15909
|
+
.xs\:max-w-\[390px\] {
|
|
15910
|
+
max-width: 390px;
|
|
15911
|
+
}
|
|
15912
|
+
|
|
15913
|
+
.xs\:translate-y-0 {
|
|
15914
|
+
--tw-translate-y: 0px;
|
|
15915
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
15916
|
+
}
|
|
15917
|
+
|
|
15918
|
+
.xs\:translate-y-4 {
|
|
15919
|
+
--tw-translate-y: 1rem;
|
|
15920
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
15899
15921
|
}
|
|
15900
15922
|
|
|
15901
15923
|
.xs\:items-center {
|
|
@@ -15910,6 +15932,10 @@ body {
|
|
|
15910
15932
|
justify-content: center;
|
|
15911
15933
|
}
|
|
15912
15934
|
|
|
15935
|
+
.xs\:overflow-auto {
|
|
15936
|
+
overflow: auto;
|
|
15937
|
+
}
|
|
15938
|
+
|
|
15913
15939
|
.xs\:rounded-\[30px\] {
|
|
15914
15940
|
border-radius: 30px;
|
|
15915
15941
|
}
|
|
@@ -15978,6 +16004,14 @@ body {
|
|
|
15978
16004
|
--tw-shadow-colored: 0px 12px 60px 5px var(--tw-shadow-color);
|
|
15979
16005
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
15980
16006
|
}
|
|
16007
|
+
|
|
16008
|
+
.xs\:duration-300 {
|
|
16009
|
+
transition-duration: 300ms;
|
|
16010
|
+
}
|
|
16011
|
+
|
|
16012
|
+
.xs\:duration-500 {
|
|
16013
|
+
transition-duration: 500ms;
|
|
16014
|
+
}
|
|
15981
16015
|
}
|
|
15982
16016
|
|
|
15983
16017
|
@media (min-width: 520px) {
|
|
@@ -17077,6 +17111,14 @@ body {
|
|
|
17077
17111
|
}
|
|
17078
17112
|
|
|
17079
17113
|
@media (min-width: 900px) {
|
|
17114
|
+
.md2\:-left-\[48px\] {
|
|
17115
|
+
left: -48px;
|
|
17116
|
+
}
|
|
17117
|
+
|
|
17118
|
+
.md2\:-right-\[48px\] {
|
|
17119
|
+
right: -48px;
|
|
17120
|
+
}
|
|
17121
|
+
|
|
17080
17122
|
.md2\:mt-\[128px\] {
|
|
17081
17123
|
margin-top: 128px;
|
|
17082
17124
|
}
|
|
@@ -17144,20 +17186,28 @@ body {
|
|
|
17144
17186
|
}
|
|
17145
17187
|
|
|
17146
17188
|
@media (min-width: 1024px) {
|
|
17147
|
-
.lg
|
|
17148
|
-
|
|
17189
|
+
.lg\:-left-\[68px\] {
|
|
17190
|
+
left: -68px;
|
|
17149
17191
|
}
|
|
17150
17192
|
|
|
17151
|
-
.lg
|
|
17152
|
-
|
|
17193
|
+
.lg\:-right-\[68px\] {
|
|
17194
|
+
right: -68px;
|
|
17195
|
+
}
|
|
17196
|
+
|
|
17197
|
+
.lg\:bottom-\[100px\] {
|
|
17198
|
+
bottom: 100px;
|
|
17199
|
+
}
|
|
17200
|
+
|
|
17201
|
+
.lg\:bottom-\[20px\] {
|
|
17202
|
+
bottom: 20px;
|
|
17153
17203
|
}
|
|
17154
17204
|
|
|
17155
17205
|
.lg\:right-\[24\.75px\] {
|
|
17156
17206
|
right: 24.75px;
|
|
17157
17207
|
}
|
|
17158
17208
|
|
|
17159
|
-
.lg\:right-\[
|
|
17160
|
-
right:
|
|
17209
|
+
.lg\:right-\[25px\] {
|
|
17210
|
+
right: 25px;
|
|
17161
17211
|
}
|
|
17162
17212
|
|
|
17163
17213
|
.lg\:right-\[60px\] {
|
|
@@ -17474,6 +17524,10 @@ body {
|
|
|
17474
17524
|
height: calc(100vh - 100px);
|
|
17475
17525
|
}
|
|
17476
17526
|
|
|
17527
|
+
.lg\:h-\[calc\(100vh-110px\)\] {
|
|
17528
|
+
height: calc(100vh - 110px);
|
|
17529
|
+
}
|
|
17530
|
+
|
|
17477
17531
|
.lg\:h-\[calc\(100vh-110px-64px\)\] {
|
|
17478
17532
|
height: calc(100vh - 110px - 64px);
|
|
17479
17533
|
}
|