@daeryun/dr_components 1.2.13 → 1.2.15
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/components/Daeryuntalk/ChatButton.jsx +2 -2
- package/dist/components/Daeryuntalk/ChatButton.tsx +2 -2
- package/dist/components/Daeryuntalk/ChatConversation.d.ts +2 -0
- package/dist/components/Daeryuntalk/ChatConversation.jsx +23 -35
- package/dist/components/Daeryuntalk/ChatConversation.tsx +43 -51
- package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.jsx +12 -9
- package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.tsx +18 -8
- package/dist/components/Daeryuntalk/ChatHomeView.d.ts +5 -1
- package/dist/components/Daeryuntalk/ChatHomeView.jsx +5 -6
- package/dist/components/Daeryuntalk/ChatHomeView.tsx +28 -13
- package/dist/components/Daeryuntalk/ChatInput.jsx +12 -7
- package/dist/components/Daeryuntalk/ChatInput.tsx +14 -7
- package/dist/components/Daeryuntalk/ChatItem/AgeCheckBox.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/AgeCheckBox.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/ChatFile.jsx +11 -6
- package/dist/components/Daeryuntalk/ChatItem/ChatFile.tsx +19 -5
- package/dist/components/Daeryuntalk/ChatItem/ChatLoading.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/ChatLoading.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/RichText.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/RichText.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/TimeWrapper.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/TimeWrapper.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/TypingComp.jsx +7 -2
- package/dist/components/Daeryuntalk/ChatItem/TypingComp.tsx +7 -3
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatMessage.jsx +9 -5
- package/dist/components/Daeryuntalk/ChatMessage.tsx +11 -4
- package/dist/components/Daeryuntalk/ChatObject/FieldWorkObject.jsx +8 -3
- package/dist/components/Daeryuntalk/ChatObject/FieldWorkObject.tsx +12 -3
- package/dist/components/Daeryuntalk/ChatObject/ObjectBack.jsx +7 -4
- package/dist/components/Daeryuntalk/ChatObject/ObjectBack.tsx +13 -3
- package/dist/components/Daeryuntalk/ChatObject/ObjectButton.jsx +1 -0
- package/dist/components/Daeryuntalk/ChatObject/ObjectButton.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatWidget.d.ts +2 -0
- package/dist/components/Daeryuntalk/ChatWidget.jsx +50 -5
- package/dist/components/Daeryuntalk/ChatWidget.tsx +71 -5
- package/dist/components/Daeryuntalk/DateSeparator.jsx +1 -0
- package/dist/components/Daeryuntalk/DateSeparator.tsx +1 -0
- package/dist/components/Daeryuntalk/History/AuthForm.jsx +1 -0
- package/dist/components/Daeryuntalk/History/AuthForm.tsx +1 -0
- package/dist/components/Daeryuntalk/HistoryView.jsx +18 -12
- package/dist/components/Daeryuntalk/HistoryView.tsx +29 -11
- package/dist/components/Daeryuntalk/HomeView.jsx +17 -12
- package/dist/components/Daeryuntalk/HomeView.tsx +29 -12
- package/dist/components/Daeryuntalk/NavigationFooter.jsx +8 -5
- package/dist/components/Daeryuntalk/NavigationFooter.tsx +10 -4
- package/dist/components/Daeryuntalk/NoticeMessage.jsx +10 -4
- package/dist/components/Daeryuntalk/NoticeMessage.tsx +10 -4
- package/dist/components/Daeryuntalk/Tiptap/Tiptap.jsx +1 -0
- package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +1 -0
- package/dist/components/Daeryuntalk/Toast/Toast.jsx +1 -0
- package/dist/components/Daeryuntalk/Toast/Toast.tsx +1 -0
- package/dist/components/Daeryuntalk/Viewer/MobileViewer.jsx +10 -7
- package/dist/components/Daeryuntalk/Viewer/MobileViewer.tsx +19 -6
- package/dist/components/Daeryuntalk/Viewer/TbPcViewer.jsx +22 -14
- package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +59 -13
- package/dist/components/Daeryuntalk/ViewportHandler.jsx +2 -0
- package/dist/components/Daeryuntalk/ViewportHandler.tsx +1 -0
- package/dist/components/Daeryuntalk/_lib/utils.d.ts +1 -1
- package/dist/components/Daeryuntalk/_lib/utils.js +1 -1
- package/dist/components/Daeryuntalk/_lib/utils.ts +1 -1
- package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox2.jsx +3 -2
- package/dist/components/Daeryuntalk/_ui/checkboxs/CheckBox2.tsx +5 -2
- package/dist/components/Daeryuntalk/index.jsx +61 -34
- package/dist/components/Daeryuntalk/index.tsx +71 -40
- package/dist/components/common/types/map/index.d.ts +1 -0
- package/dist/components/common/types/map/index.ts +4 -3
- package/dist/components/page/MapPage/MapPage.jsx +1 -1
- package/dist/components/page/MapPage/MapPage.stories.jsx +2 -1
- package/dist/components/page/MapPage/MapPage.stories.tsx +2 -1
- package/dist/components/page/MapPage/MapPage.tsx +1 -1
- package/dist/components/page/MapPage/MobileMapKeyDetail.jsx +1 -13
- package/dist/components/page/MapPage/MobileMapKeyDetail.tsx +2 -18
- package/dist/components/page/MapPage/PcMapKeyDetail.jsx +1 -13
- package/dist/components/page/MapPage/PcMapKeyDetail.tsx +2 -19
- package/dist/styles/daeryuntalk.css +4 -4
- package/dist/styles/globals.css +6 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
2
3
|
import { useDaeryuntalk } from './DaeryuntalkContext';
|
|
3
4
|
import Tiptap, { TiptapEditorRef } from './Tiptap/Tiptap';
|
|
4
5
|
import { stripHtmlTags } from './_lib/utils';
|
|
5
6
|
import DisabledInput from './Tiptap/DisabledInput';
|
|
7
|
+
import Image from 'next/image';
|
|
6
8
|
|
|
7
9
|
// 이미지
|
|
8
|
-
import SendIcon from '../../asset/images/daeryuntalk/send.svg';
|
|
10
|
+
// import SendIcon from '../../asset/images/daeryuntalk/send.svg';
|
|
9
11
|
|
|
10
12
|
interface props {
|
|
11
13
|
isMobile: boolean;
|
|
@@ -14,14 +16,18 @@ interface props {
|
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
const ChatInput: React.FC<props> = ({ isMobile, isNotAgeCheck, chatInquiryNumber }) => {
|
|
19
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
20
|
+
const SendIcon = `${s3Url}/daeryuntalk/send.svg`;
|
|
17
21
|
const [message, setMessage] = useState('');
|
|
18
22
|
const { sendMessage, isLoading } = useDaeryuntalk();
|
|
19
23
|
const tiptapRef = useRef<TiptapEditorRef | null>(null);
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
setIsEmpty(!stripHtmlTags(message));
|
|
24
|
+
const isEmpty = useMemo(() => {
|
|
25
|
+
return !stripHtmlTags(message);
|
|
24
26
|
}, [message]);
|
|
27
|
+
|
|
28
|
+
// useEffect(() => {
|
|
29
|
+
// setIsEmpty(!stripHtmlTags(message));
|
|
30
|
+
// }, [message]);
|
|
25
31
|
const handleSubmit = (e: React.FormEvent) => {
|
|
26
32
|
e.preventDefault();
|
|
27
33
|
if (message.trim() && !isLoading) {
|
|
@@ -79,7 +85,8 @@ const ChatInput: React.FC<props> = ({ isMobile, isNotAgeCheck, chatInquiryNumber
|
|
|
79
85
|
disabled={isLoading || isNotAgeCheck}
|
|
80
86
|
>
|
|
81
87
|
<div className="flex h-9 w-9 items-center justify-center">
|
|
82
|
-
<SendIcon width={24} height={24} />
|
|
88
|
+
<Image src={SendIcon} alt="전송" width={24} height={24} />
|
|
89
|
+
{/* <SendIcon width={24} height={24} /> */}
|
|
83
90
|
</div>
|
|
84
91
|
</button>
|
|
85
92
|
</div>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -13,8 +14,8 @@ import { formatFileSize } from '../_lib/utils';
|
|
|
13
14
|
import { useDaeryuntalk } from '../DaeryuntalkContext';
|
|
14
15
|
import { getMessageFileDownloadUrl } from '../_api';
|
|
15
16
|
import TimeWrapper from './TimeWrapper';
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
18
|
+
const FileDownLoadIcon = `${s3Url}/daeryuntalk/viewer/gray-download.svg`;
|
|
18
19
|
const ChatFile = ({ message, isOperator, isHovered, time }) => {
|
|
19
20
|
const { openImageViewer } = useDaeryuntalk();
|
|
20
21
|
const handleDownload = (file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -72,7 +73,8 @@ const ChatFile = ({ message, isOperator, isHovered, time }) => {
|
|
|
72
73
|
e.stopPropagation();
|
|
73
74
|
yield handleDownload(file);
|
|
74
75
|
})} className="absolute bottom-[10px] right-[10px] z-10 flex h-[24px] w-[24px] items-center justify-center bg-transparent opacity-0 transition-opacity group-hover/image:opacity-100">
|
|
75
|
-
<FileDownLoadIcon
|
|
76
|
+
<Image src={FileDownLoadIcon} alt="다운로드" width={25} height={24}/>
|
|
77
|
+
{/* <FileDownLoadIcon className="h-[25px] w-[24px]" /> */}
|
|
76
78
|
</button>
|
|
77
79
|
</div>);
|
|
78
80
|
})}
|
|
@@ -92,7 +94,8 @@ const ChatFile = ({ message, isOperator, isHovered, time }) => {
|
|
|
92
94
|
yield handleDownload(media.images[media.images.length - 1]);
|
|
93
95
|
}
|
|
94
96
|
})} className="absolute bottom-[10px] right-[10px] z-10 flex h-[24px] w-[24px] items-center justify-center opacity-0 transition-opacity group-hover/image:opacity-100">
|
|
95
|
-
<FileDownLoadIcon
|
|
97
|
+
<Image src={FileDownLoadIcon} alt="다운로드" width={25} height={24}/>
|
|
98
|
+
{/* <FileDownLoadIcon className="h-[25px] w-[24px]" /> */}
|
|
96
99
|
</button>
|
|
97
100
|
</div>
|
|
98
101
|
</div>)}
|
|
@@ -111,7 +114,8 @@ const ChatFile = ({ message, isOperator, isHovered, time }) => {
|
|
|
111
114
|
yield handleDownload(media.images[0]);
|
|
112
115
|
}
|
|
113
116
|
})} className="absolute bottom-[10px] right-[10px] z-10 flex h-[24px] w-[24px] items-center justify-center opacity-0 transition-opacity group-hover/image:opacity-100">
|
|
114
|
-
<FileDownLoadIcon
|
|
117
|
+
<Image src={FileDownLoadIcon} alt="다운로드" width={25} height={24}/>
|
|
118
|
+
{/* <FileDownLoadIcon className="h-[25px] w-[24px]" /> */}
|
|
115
119
|
</button>
|
|
116
120
|
</div>
|
|
117
121
|
</div>)}
|
|
@@ -142,7 +146,8 @@ const ChatFile = ({ message, isOperator, isHovered, time }) => {
|
|
|
142
146
|
e.stopPropagation();
|
|
143
147
|
yield handleDownload(file);
|
|
144
148
|
})} className="flex h-[24px] w-[24px] items-center justify-center ">
|
|
145
|
-
<FileDownLoadIcon
|
|
149
|
+
<Image src={FileDownLoadIcon} alt="다운로드" width={25} height={24} className="bg-white"/>
|
|
150
|
+
{/* <FileDownLoadIcon className="h-[25px] w-[24px] bg-white" /> */}
|
|
146
151
|
</button>
|
|
147
152
|
</div>
|
|
148
153
|
</div>);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { FileInfo, Message } from '../_types/message';
|
|
3
4
|
import Image from 'next/image';
|
|
@@ -6,7 +7,7 @@ import { useDaeryuntalk } from '../DaeryuntalkContext';
|
|
|
6
7
|
import { getMessageFileDownloadUrl } from '../_api';
|
|
7
8
|
import TimeWrapper from './TimeWrapper';
|
|
8
9
|
//이미지
|
|
9
|
-
import FileDownLoadIcon from '../../../asset/images/daeryuntalk/viewer/gray-download.svg';
|
|
10
|
+
// import FileDownLoadIcon from '../../../asset/images/daeryuntalk/viewer/gray-download.svg';
|
|
10
11
|
|
|
11
12
|
interface props {
|
|
12
13
|
message: Message;
|
|
@@ -15,6 +16,9 @@ interface props {
|
|
|
15
16
|
time: string;
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
20
|
+
const FileDownLoadIcon = `${s3Url}/daeryuntalk/viewer/gray-download.svg`;
|
|
21
|
+
|
|
18
22
|
const ChatFile = ({ message, isOperator, isHovered, time }: props) => {
|
|
19
23
|
const { openImageViewer } = useDaeryuntalk();
|
|
20
24
|
|
|
@@ -96,7 +100,8 @@ const ChatFile = ({ message, isOperator, isHovered, time }: props) => {
|
|
|
96
100
|
}}
|
|
97
101
|
className="absolute bottom-[10px] right-[10px] z-10 flex h-[24px] w-[24px] items-center justify-center bg-transparent opacity-0 transition-opacity group-hover/image:opacity-100"
|
|
98
102
|
>
|
|
99
|
-
<FileDownLoadIcon
|
|
103
|
+
<Image src={FileDownLoadIcon} alt="다운로드" width={25} height={24} />
|
|
104
|
+
{/* <FileDownLoadIcon className="h-[25px] w-[24px]" /> */}
|
|
100
105
|
</button>
|
|
101
106
|
</div>
|
|
102
107
|
);
|
|
@@ -131,7 +136,8 @@ const ChatFile = ({ message, isOperator, isHovered, time }: props) => {
|
|
|
131
136
|
}}
|
|
132
137
|
className="absolute bottom-[10px] right-[10px] z-10 flex h-[24px] w-[24px] items-center justify-center opacity-0 transition-opacity group-hover/image:opacity-100"
|
|
133
138
|
>
|
|
134
|
-
<FileDownLoadIcon
|
|
139
|
+
<Image src={FileDownLoadIcon} alt="다운로드" width={25} height={24} />
|
|
140
|
+
{/* <FileDownLoadIcon className="h-[25px] w-[24px]" /> */}
|
|
135
141
|
</button>
|
|
136
142
|
</div>
|
|
137
143
|
</div>
|
|
@@ -165,7 +171,8 @@ const ChatFile = ({ message, isOperator, isHovered, time }: props) => {
|
|
|
165
171
|
}}
|
|
166
172
|
className="absolute bottom-[10px] right-[10px] z-10 flex h-[24px] w-[24px] items-center justify-center opacity-0 transition-opacity group-hover/image:opacity-100"
|
|
167
173
|
>
|
|
168
|
-
<FileDownLoadIcon
|
|
174
|
+
<Image src={FileDownLoadIcon} alt="다운로드" width={25} height={24} />
|
|
175
|
+
{/* <FileDownLoadIcon className="h-[25px] w-[24px]" /> */}
|
|
169
176
|
</button>
|
|
170
177
|
</div>
|
|
171
178
|
</div>
|
|
@@ -208,7 +215,14 @@ const ChatFile = ({ message, isOperator, isHovered, time }: props) => {
|
|
|
208
215
|
}}
|
|
209
216
|
className="flex h-[24px] w-[24px] items-center justify-center "
|
|
210
217
|
>
|
|
211
|
-
<
|
|
218
|
+
<Image
|
|
219
|
+
src={FileDownLoadIcon}
|
|
220
|
+
alt="다운로드"
|
|
221
|
+
width={25}
|
|
222
|
+
height={24}
|
|
223
|
+
className="bg-white"
|
|
224
|
+
/>
|
|
225
|
+
{/* <FileDownLoadIcon className="h-[25px] w-[24px] bg-white" /> */}
|
|
212
226
|
</button>
|
|
213
227
|
</div>
|
|
214
228
|
</div>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import ChatWrapper from './ChatWrapper';
|
|
4
|
+
import Image from 'next/image';
|
|
3
5
|
// 이미지
|
|
4
|
-
import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
6
|
+
// import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
5
7
|
const TypingComp = () => {
|
|
8
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
9
|
+
const DaeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
|
|
6
10
|
return (<div className="flex flex-col">
|
|
7
11
|
<div className="flex items-center gap-[10px]">
|
|
8
12
|
<div className="flex-shrink-0 rounded-full">
|
|
9
13
|
<div className="relative h-full w-full">
|
|
10
|
-
<DaeryunLogoIcon width={24} height={24}/>
|
|
14
|
+
<Image src={DaeryunLogoIcon} alt="대륜 로고" width={24} height={24}/>
|
|
15
|
+
{/* <DaeryunLogoIcon width={24} height={24} /> */}
|
|
11
16
|
</div>
|
|
12
17
|
</div>
|
|
13
18
|
<span className="dr_talk_subtitle_medium text-drTalkBlack">법무법인(유한)대륜</span>
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import ChatWrapper from './ChatWrapper';
|
|
3
|
-
|
|
4
|
+
import Image from 'next/image';
|
|
4
5
|
// 이미지
|
|
5
|
-
import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
6
|
+
// import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
6
7
|
const TypingComp = () => {
|
|
8
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
9
|
+
const DaeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
|
|
7
10
|
return (
|
|
8
11
|
<div className="flex flex-col">
|
|
9
12
|
<div className="flex items-center gap-[10px]">
|
|
10
13
|
<div className="flex-shrink-0 rounded-full">
|
|
11
14
|
<div className="relative h-full w-full">
|
|
12
|
-
<DaeryunLogoIcon width={24} height={24} />
|
|
15
|
+
<Image src={DaeryunLogoIcon} alt="대륜 로고" width={24} height={24} />
|
|
16
|
+
{/* <DaeryunLogoIcon width={24} height={24} /> */}
|
|
13
17
|
</div>
|
|
14
18
|
</div>
|
|
15
19
|
<span className="dr_talk_subtitle_medium text-drTalkBlack">법무법인(유한)대륜</span>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
10
|
};
|
|
10
11
|
import React from 'react';
|
|
11
12
|
import { hasBlocks, hasCustomerWorkFlowClickData, hasFileArray, hasForm, hasRichForm, hasWorkFlow } from './_types/message';
|
|
13
|
+
import Image from 'next/image';
|
|
12
14
|
import { ObjectNumber, WorkFlowBackOrInit, WorkFlowButtonUiCode } from './_enums/work_flow_object_expose';
|
|
13
15
|
import { MessageSenderType } from './_enums/sender_type';
|
|
14
16
|
import ObjectButton from './ChatObject/ObjectButton';
|
|
@@ -22,12 +24,12 @@ import ChatFile from './ChatItem/ChatFile';
|
|
|
22
24
|
import FieldWorkObject from './ChatObject/FieldWorkObject';
|
|
23
25
|
import TimeWrapper from './ChatItem/TimeWrapper';
|
|
24
26
|
import { InquiryStatusEnum } from './_enums/ask-status';
|
|
25
|
-
// 이미지
|
|
26
|
-
import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
27
|
-
import ResendIcon from '../../asset/images/daeryuntalk/re_send.svg';
|
|
28
27
|
const ChatMessage = ({ message, object, handelObjectBack, chatInquiryNumber, workFlowStack, isHovered, scrollEnd, inquiryStatus, isMobile }) => {
|
|
29
28
|
// 고객 , 오퍼레이터 분리
|
|
30
29
|
const isOperator = message.senderType !== MessageSenderType.CUSTOMER;
|
|
30
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
31
|
+
const DaeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
|
|
32
|
+
const ResendIcon = `${s3Url}/daeryuntalk/re_send.svg`;
|
|
31
33
|
const formatTime = (date) => {
|
|
32
34
|
const hours = date.getHours().toString().padStart(2, '0');
|
|
33
35
|
const minutes = date.getMinutes().toString().padStart(2, '0');
|
|
@@ -115,7 +117,8 @@ const ChatMessage = ({ message, object, handelObjectBack, chatInquiryNumber, wor
|
|
|
115
117
|
</ChatWrapper>
|
|
116
118
|
</TimeWrapper>) : (<div className={`flex w-full flex-row items-end gap-[8px] `}>
|
|
117
119
|
<button type={'button'} onClick={() => { }} className={`cursor-pointer`}>
|
|
118
|
-
<ResendIcon width={18} height={18}/>
|
|
120
|
+
<Image src={ResendIcon} alt="재전송" width={18} height={18}/>
|
|
121
|
+
{/* <ResendIcon width={18} height={18} /> */}
|
|
119
122
|
</button>
|
|
120
123
|
<ChatWrapper isOperator={isOperator} className={`w-[calc(100%-31.25px)]`}>
|
|
121
124
|
<RichText message={message}/>
|
|
@@ -177,7 +180,8 @@ const ChatMessage = ({ message, object, handelObjectBack, chatInquiryNumber, wor
|
|
|
177
180
|
<div className="flex items-center gap-[10px]">
|
|
178
181
|
<div className="flex-shrink-0 rounded-full">
|
|
179
182
|
<div className="relative h-full w-full">
|
|
180
|
-
<DaeryunLogoIcon width={24} height={24}/>
|
|
183
|
+
<Image src={DaeryunLogoIcon} alt="대륜 로고" width={24} height={24}/>
|
|
184
|
+
{/* <DaeryunLogoIcon width={24} height={24} /> */}
|
|
181
185
|
</div>
|
|
182
186
|
</div>
|
|
183
187
|
<span className="dr_talk_subtitle_medium text-drTalkBlack">법무법인(유한)대륜</span>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import {
|
|
3
4
|
hasBlocks,
|
|
@@ -8,6 +9,7 @@ import {
|
|
|
8
9
|
hasWorkFlow,
|
|
9
10
|
Message
|
|
10
11
|
} from './_types/message';
|
|
12
|
+
import Image from 'next/image';
|
|
11
13
|
import { MessageObject } from './_types/message_object';
|
|
12
14
|
import { ObjectNumber, WorkFlowBackOrInit, WorkFlowButtonUiCode } from './_enums/work_flow_object_expose';
|
|
13
15
|
import { MessageSenderType } from './_enums/sender_type';
|
|
@@ -23,8 +25,8 @@ import FieldWorkObject from './ChatObject/FieldWorkObject';
|
|
|
23
25
|
import TimeWrapper from './ChatItem/TimeWrapper';
|
|
24
26
|
import { InquiryStatusEnum } from './_enums/ask-status';
|
|
25
27
|
// 이미지
|
|
26
|
-
import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
27
|
-
import ResendIcon from '../../asset/images/daeryuntalk/re_send.svg';
|
|
28
|
+
// import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
29
|
+
// import ResendIcon from '../../asset/images/daeryuntalk/re_send.svg';
|
|
28
30
|
|
|
29
31
|
type ChatMessageProps = {
|
|
30
32
|
message: Message;
|
|
@@ -55,6 +57,9 @@ const ChatMessage: React.FC<ChatMessageProps> = ({
|
|
|
55
57
|
}) => {
|
|
56
58
|
// 고객 , 오퍼레이터 분리
|
|
57
59
|
const isOperator = message.senderType !== MessageSenderType.CUSTOMER;
|
|
60
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
61
|
+
const DaeryunLogoIcon = `${s3Url}/daeryuntalk/daeryun-logo.svg`;
|
|
62
|
+
const ResendIcon = `${s3Url}/daeryuntalk/re_send.svg`;
|
|
58
63
|
|
|
59
64
|
const formatTime = (date: Date): string => {
|
|
60
65
|
const hours = date.getHours().toString().padStart(2, '0');
|
|
@@ -161,7 +166,8 @@ const ChatMessage: React.FC<ChatMessageProps> = ({
|
|
|
161
166
|
) : (
|
|
162
167
|
<div className={`flex w-full flex-row items-end gap-[8px] `}>
|
|
163
168
|
<button type={'button'} onClick={() => {}} className={`cursor-pointer`}>
|
|
164
|
-
<ResendIcon width={18} height={18} />
|
|
169
|
+
<Image src={ResendIcon} alt="재전송" width={18} height={18} />
|
|
170
|
+
{/* <ResendIcon width={18} height={18} /> */}
|
|
165
171
|
</button>
|
|
166
172
|
<ChatWrapper isOperator={isOperator} className={`w-[calc(100%-31.25px)]`}>
|
|
167
173
|
<RichText message={message} />
|
|
@@ -267,7 +273,8 @@ const ChatMessage: React.FC<ChatMessageProps> = ({
|
|
|
267
273
|
<div className="flex items-center gap-[10px]">
|
|
268
274
|
<div className="flex-shrink-0 rounded-full">
|
|
269
275
|
<div className="relative h-full w-full">
|
|
270
|
-
<DaeryunLogoIcon width={24} height={24} />
|
|
276
|
+
<Image src={DaeryunLogoIcon} alt="대륜 로고" width={24} height={24} />
|
|
277
|
+
{/* <DaeryunLogoIcon width={24} height={24} /> */}
|
|
271
278
|
</div>
|
|
272
279
|
</div>
|
|
273
280
|
<span className="dr_talk_subtitle_medium text-drTalkBlack">법무법인(유한)대륜</span>
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import ObjectButton from './ObjectButton';
|
|
3
|
+
import Image from 'next/image';
|
|
3
4
|
// 이미지
|
|
4
|
-
import PlusIcon from '../../../asset/images/daeryuntalk/plus.svg';
|
|
5
|
-
import MinusIcon from '../../../asset/images/daeryuntalk/minus.svg';
|
|
5
|
+
// import PlusIcon from '../../../asset/images/daeryuntalk/plus.svg';
|
|
6
|
+
// import MinusIcon from '../../../asset/images/daeryuntalk/minus.svg';
|
|
6
7
|
const FieldWorkObject = ({ object, message, isFirstObject, scrollEnd }) => {
|
|
7
8
|
var _a, _b;
|
|
9
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
10
|
+
const PlusIcon = `${s3Url}/daeryuntalk/plus.svg`;
|
|
11
|
+
const MinusIcon = `${s3Url}/daeryuntalk/minus.svg`;
|
|
8
12
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
9
13
|
const objectList = (_b = (_a = object === null || object === void 0 ? void 0 : object.objectList) === null || _a === void 0 ? void 0 : _a.sort((a, b) => a.sequence - b.sequence)) !== null && _b !== void 0 ? _b : [];
|
|
10
14
|
const MAX_VISIBLE = 10;
|
|
@@ -24,7 +28,8 @@ const FieldWorkObject = ({ object, message, isFirstObject, scrollEnd }) => {
|
|
|
24
28
|
{hasMoreThanMax && (<button type="button" onClick={() => {
|
|
25
29
|
setIsExpanded(prev => !prev);
|
|
26
30
|
}} className={`flex h-[36px] w-full items-center justify-center gap-[4px] rounded-[20px] bg-drTalkGrayscale5 `}>
|
|
27
|
-
{isExpanded ? <MinusIcon /> : <PlusIcon />}
|
|
31
|
+
{/* {isExpanded ? <MinusIcon /> : <PlusIcon />} */}
|
|
32
|
+
{isExpanded ? (<Image src={MinusIcon} alt="접기" width={18} height={18}/>) : (<Image src={PlusIcon} alt="더보기" width={13} height={12}/>)}
|
|
28
33
|
<span className={`dr_talk_subtitle_medium2 text-drTalkGrayscale2 `}>
|
|
29
34
|
{isExpanded ? '접기' : '더보기'}
|
|
30
35
|
</span>
|
|
@@ -2,9 +2,10 @@ import { useEffect, useState } from 'react';
|
|
|
2
2
|
import ObjectButton from './ObjectButton';
|
|
3
3
|
import { MessageObject, MessageObjectExpose } from '../_types/message_object';
|
|
4
4
|
import { Message } from '../_types/message'; // 실제 경로에 맞게 수정하세요
|
|
5
|
+
import Image from 'next/image';
|
|
5
6
|
// 이미지
|
|
6
|
-
import PlusIcon from '../../../asset/images/daeryuntalk/plus.svg';
|
|
7
|
-
import MinusIcon from '../../../asset/images/daeryuntalk/minus.svg';
|
|
7
|
+
// import PlusIcon from '../../../asset/images/daeryuntalk/plus.svg';
|
|
8
|
+
// import MinusIcon from '../../../asset/images/daeryuntalk/minus.svg';
|
|
8
9
|
|
|
9
10
|
const FieldWorkObject = ({
|
|
10
11
|
object,
|
|
@@ -17,6 +18,9 @@ const FieldWorkObject = ({
|
|
|
17
18
|
isFirstObject: boolean;
|
|
18
19
|
scrollEnd: () => void;
|
|
19
20
|
}) => {
|
|
21
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
22
|
+
const PlusIcon = `${s3Url}/daeryuntalk/plus.svg`;
|
|
23
|
+
const MinusIcon = `${s3Url}/daeryuntalk/minus.svg`;
|
|
20
24
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
21
25
|
|
|
22
26
|
const objectList: MessageObjectExpose[] = object?.objectList?.sort((a, b) => a.sequence - b.sequence) ?? [];
|
|
@@ -53,7 +57,12 @@ const FieldWorkObject = ({
|
|
|
53
57
|
}}
|
|
54
58
|
className={`flex h-[36px] w-full items-center justify-center gap-[4px] rounded-[20px] bg-drTalkGrayscale5 `}
|
|
55
59
|
>
|
|
56
|
-
{isExpanded ? <MinusIcon /> : <PlusIcon />}
|
|
60
|
+
{/* {isExpanded ? <MinusIcon /> : <PlusIcon />} */}
|
|
61
|
+
{isExpanded ? (
|
|
62
|
+
<Image src={MinusIcon} alt="접기" width={18} height={18} />
|
|
63
|
+
) : (
|
|
64
|
+
<Image src={PlusIcon} alt="더보기" width={13} height={12} />
|
|
65
|
+
)}
|
|
57
66
|
<span className={`dr_talk_subtitle_medium2 text-drTalkGrayscale2 `}>
|
|
58
67
|
{isExpanded ? '접기' : '더보기'}
|
|
59
68
|
</span>
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import BackIcon from '../../../asset/images/daeryuntalk/objectBack.svg';
|
|
4
|
-
import FirstGoICon from '../../../asset/images/daeryuntalk/firstGo.svg';
|
|
3
|
+
import Image from 'next/image';
|
|
5
4
|
const ObjectBack = ({ isBack, handleBtn }) => {
|
|
5
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
6
|
+
const BackIcon = `${s3Url}/daeryuntalk/objectBack.svg`;
|
|
7
|
+
const FirstGoICon = `${s3Url}/daeryuntalk/firstGo.svg`;
|
|
6
8
|
return (<button type={'button'} onClick={() => {
|
|
7
9
|
if (handleBtn) {
|
|
8
10
|
handleBtn();
|
|
9
11
|
}
|
|
10
12
|
}} className={`flex flex-row items-center gap-[4px] `}>
|
|
11
|
-
{isBack ? <BackIcon /> : <FirstGoICon />}
|
|
13
|
+
{/* {isBack ? <BackIcon /> : <FirstGoICon />} */}
|
|
14
|
+
{isBack ? (<Image src={BackIcon} alt="이전" width={16} height={16}/>) : (<Image src={FirstGoICon} alt="처음" width={16} height={16}/>)}
|
|
12
15
|
<p className={` dr_talk_body_medium2 text-[14px] text-drTalkGrayscale1 `}>
|
|
13
16
|
{isBack ? '이전으로' : '처음으로'}
|
|
14
17
|
</p>
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import Image from 'next/image';
|
|
2
4
|
// 이미지
|
|
3
|
-
import BackIcon from '../../../asset/images/daeryuntalk/objectBack.svg';
|
|
4
|
-
import FirstGoICon from '../../../asset/images/daeryuntalk/firstGo.svg';
|
|
5
|
+
// import BackIcon from '../../../asset/images/daeryuntalk/objectBack.svg';
|
|
6
|
+
// import FirstGoICon from '../../../asset/images/daeryuntalk/firstGo.svg';
|
|
5
7
|
|
|
6
8
|
interface props {
|
|
7
9
|
isBack: boolean;
|
|
8
10
|
handleBtn?: () => void;
|
|
9
11
|
}
|
|
10
12
|
const ObjectBack = ({ isBack, handleBtn }: props) => {
|
|
13
|
+
const s3Url = process.env.NEXT_PUBLIC_S3_URL;
|
|
14
|
+
const BackIcon = `${s3Url}/daeryuntalk/objectBack.svg`;
|
|
15
|
+
const FirstGoICon = `${s3Url}/daeryuntalk/firstGo.svg`;
|
|
11
16
|
return (
|
|
12
17
|
<button
|
|
13
18
|
type={'button'}
|
|
@@ -18,7 +23,12 @@ const ObjectBack = ({ isBack, handleBtn }: props) => {
|
|
|
18
23
|
}}
|
|
19
24
|
className={`flex flex-row items-center gap-[4px] `}
|
|
20
25
|
>
|
|
21
|
-
{isBack ? <BackIcon /> : <FirstGoICon />}
|
|
26
|
+
{/* {isBack ? <BackIcon /> : <FirstGoICon />} */}
|
|
27
|
+
{isBack ? (
|
|
28
|
+
<Image src={BackIcon} alt="이전" width={16} height={16} />
|
|
29
|
+
) : (
|
|
30
|
+
<Image src={FirstGoICon} alt="처음" width={16} height={16} />
|
|
31
|
+
)}
|
|
22
32
|
<p className={` dr_talk_body_medium2 text-[14px] text-drTalkGrayscale1 `}>
|
|
23
33
|
{isBack ? '이전으로' : '처음으로'}
|
|
24
34
|
</p>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -6,6 +6,8 @@ interface ChatWidgetProps {
|
|
|
6
6
|
hashValue: string | null;
|
|
7
7
|
setHashValue: Dispatch<SetStateAction<string | null>>;
|
|
8
8
|
animationState: string;
|
|
9
|
+
isMobileSafari?: boolean;
|
|
10
|
+
androidViewportHeight?: number;
|
|
9
11
|
}
|
|
10
12
|
declare const ChatWidget: React.FC<ChatWidgetProps>;
|
|
11
13
|
export default ChatWidget;
|