@daeryun/dr_components 1.0.20 → 1.0.21
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/ChatConversation.tsx +0 -1
- package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatHomeView.tsx +1 -12
- package/dist/components/Daeryuntalk/ChatInput.tsx +1 -2
- package/dist/components/Daeryuntalk/ChatItem/ChatFile.tsx +2 -1
- package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/RichText.tsx +1 -1
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.tsx +1 -1
- package/dist/components/Daeryuntalk/ChatObject/ObjectBack.tsx +1 -0
- package/dist/components/Daeryuntalk/ChatObject/ObjectButton.tsx +2 -9
- package/dist/components/Daeryuntalk/ChatWidget.tsx +1 -2
- package/dist/components/Daeryuntalk/DaeryuntalkContext.tsx +1 -1
- package/dist/components/Daeryuntalk/FixedErrorBox.tsx +1 -0
- package/dist/components/Daeryuntalk/History/AuthForm.tsx +1 -0
- package/dist/components/Daeryuntalk/HomeView.tsx +1 -2
- package/dist/components/Daeryuntalk/NoticeMessage.tsx +0 -1
- package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +0 -3
- package/dist/components/Daeryuntalk/Toast/DaeryuntalkToastProvider.tsx +1 -1
- package/dist/components/Daeryuntalk/Toast/Toast.tsx +1 -0
- package/dist/components/Daeryuntalk/Viewer/ImageViewer.jsx +1 -1
- package/dist/components/Daeryuntalk/Viewer/ImageViewer.tsx +1 -10
- package/dist/components/Daeryuntalk/Viewer/MobileViewer.tsx +2 -0
- package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +0 -1
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.d.ts +1 -1
- package/dist/components/Daeryuntalk/_api/daeryuntalk/index.ts +7 -8
- package/dist/components/Daeryuntalk/_api/daeryuntalk/type/response.ts +1 -0
- package/dist/components/Daeryuntalk/_enums/ask-status.ts +1 -0
- package/dist/components/Daeryuntalk/_enums/work_flow_object_expose.ts +2 -0
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.ts +1 -3
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.ts +1 -1
- package/dist/components/Daeryuntalk/_hooks/talkprovider/useWorkFlow.ts +0 -1
- package/dist/components/Daeryuntalk/_hooks/useHoverScrollbar.d.ts +1 -1
- package/dist/components/Daeryuntalk/_hooks/useHoverScrollbar.js +1 -1
- package/dist/components/Daeryuntalk/_hooks/useHoverScrollbar.ts +1 -1
- package/dist/components/Daeryuntalk/_hooks/view/useHomeView.ts +1 -0
- package/dist/components/Daeryuntalk/_lib/index.ts +2 -6
- package/dist/components/Daeryuntalk/_lib/utils.ts +1 -1
- package/dist/components/Daeryuntalk/_types/message.js +1 -0
- package/dist/components/Daeryuntalk/_types/message.ts +0 -2
- package/dist/components/Daeryuntalk/_types/message_object.ts +0 -3
- package/dist/components/Daeryuntalk/_ui/ShadowBox.tsx +1 -0
- package/dist/components/Daeryuntalk/_ui/buttons/Button2.tsx +1 -0
- package/dist/components/Daeryuntalk/index.tsx +1 -1
- package/dist/components/common/data/index.js +17 -17
- package/dist/components/common/data/index.ts +17 -17
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,6 @@ import ChatConversationHeader from './ChatConversationItem/ChatConversationHeade
|
|
|
10
10
|
import ChatLoading from './ChatItem/ChatLoading';
|
|
11
11
|
import { useWindowSize } from './_hooks/useWindowSize';
|
|
12
12
|
import TypingComp from './ChatItem/TypingComp';
|
|
13
|
-
import { Message } from './_types/message';
|
|
14
13
|
import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
|
|
15
14
|
|
|
16
15
|
type ChatConversationProps = {
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { useDaeryuntalk } from './DaeryuntalkContext';
|
|
3
3
|
import ChatConversation from './ChatConversation';
|
|
4
4
|
import HistoryView from './HistoryView';
|
|
5
5
|
import NavigationFooter from './NavigationFooter';
|
|
6
|
-
import Image from 'next/image';
|
|
7
|
-
import SendIcon from '../../asset/images/daeryuntalk/send.svg';
|
|
8
|
-
import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
|
|
9
|
-
import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
|
|
10
|
-
import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
11
|
-
|
|
12
|
-
import { IChatInquiryMainDataResponse } from './_api/daeryuntalk/type/response';
|
|
13
6
|
import { useChatSocketState } from './_hooks/view/useChatSocketState';
|
|
14
|
-
import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
15
|
-
import ShadowBox from './_ui/ShadowBox';
|
|
16
|
-
import { useDaeryunTalkToast } from './Toast/DaeryuntalkToastProvider';
|
|
17
7
|
import ToastRenderer from './Toast/ToastRender';
|
|
18
|
-
import { getChatInquiryMain } from './_api';
|
|
19
8
|
import HomeView from './HomeView';
|
|
20
9
|
import { useHistoryView } from './_hooks/view/useHistoryView';
|
|
21
10
|
import { useHomeView } from './_hooks/view/useHomeView';
|
|
@@ -3,12 +3,11 @@ import { useDaeryuntalk } from './DaeryuntalkContext';
|
|
|
3
3
|
import SendIcon from '../../asset/images/daeryuntalk/send.svg';
|
|
4
4
|
import Tiptap, { TiptapEditorRef } from './Tiptap/Tiptap';
|
|
5
5
|
import { stripHtmlTags } from './_lib/utils';
|
|
6
|
-
import ShadowBox from './_ui/ShadowBox';
|
|
7
|
-
import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
8
6
|
|
|
9
7
|
interface props {
|
|
10
8
|
isMobile: boolean;
|
|
11
9
|
}
|
|
10
|
+
|
|
12
11
|
const ChatInput: React.FC<props> = ({ isMobile }) => {
|
|
13
12
|
const [message, setMessage] = useState('');
|
|
14
13
|
const { sendMessage, isLoading } = useDaeryuntalk();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { FileInfo, Message } from '../_types/message';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import { formatFileSize } from '../_lib/utils';
|
|
@@ -6,6 +6,7 @@ import FileDownLoadIcon from '../../../asset/images/daeryuntalk/viewer/gray-down
|
|
|
6
6
|
import { useDaeryuntalk } from '../DaeryuntalkContext';
|
|
7
7
|
import { getMessageFileDownloadUrl } from '../_api';
|
|
8
8
|
import TimeWrapper from './TimeWrapper';
|
|
9
|
+
|
|
9
10
|
interface props {
|
|
10
11
|
message: Message;
|
|
11
12
|
isOperator: boolean;
|
|
@@ -5,6 +5,7 @@ interface props {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
}
|
|
8
|
+
|
|
8
9
|
const ChatWrapper = ({ isOperator, children, className = '' }: props) => {
|
|
9
10
|
const operatorClassName = 'border-drTalkGrayscale4 text-drTalkBlack';
|
|
10
11
|
const customerClassName = 'border-drTalkBtnActive2 text-drTalkHover bg-drTalkGrayscale5';
|
|
@@ -6,11 +6,11 @@ import Image from '@tiptap/extension-image';
|
|
|
6
6
|
import Color from '@tiptap/extension-color';
|
|
7
7
|
import Link from '@tiptap/extension-link';
|
|
8
8
|
import TextStyle from '@tiptap/extension-text-style';
|
|
9
|
-
import ChatWrapper from './ChatWrapper';
|
|
10
9
|
|
|
11
10
|
interface props {
|
|
12
11
|
message: Message;
|
|
13
12
|
}
|
|
13
|
+
|
|
14
14
|
const RichText = ({ message }: props) => {
|
|
15
15
|
const editor = useEditor({
|
|
16
16
|
extensions: [
|
|
@@ -3,7 +3,6 @@ import Image from 'next/image';
|
|
|
3
3
|
import { Message } from '../_types/message';
|
|
4
4
|
import { InquiryMessageTemplateType } from '../_enums/template';
|
|
5
5
|
import DOMPurify from 'dompurify';
|
|
6
|
-
import RichText from './RichText';
|
|
7
6
|
import ChatWrapper from './ChatWrapper';
|
|
8
7
|
import { decodeDoubleEscapedHtml } from '../_lib/utils';
|
|
9
8
|
import { useWindowSize } from '../_hooks/useWindowSize';
|
|
@@ -13,6 +12,7 @@ interface props {
|
|
|
13
12
|
isOperator: boolean;
|
|
14
13
|
isMobile: boolean;
|
|
15
14
|
}
|
|
15
|
+
|
|
16
16
|
const WorkFlowImg = ({ message, isOperator, isMobile }: props) => {
|
|
17
17
|
const workFlowItem = message.workFlow;
|
|
18
18
|
const messageType = message?.templateType || '';
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import Image from 'next/image';
|
|
3
|
-
import {
|
|
4
|
-
ObjectNumber,
|
|
5
|
-
WorkFlowButtonActionType,
|
|
6
|
-
WorkFlowButtonUiCode,
|
|
7
|
-
WorkFlowObjectUICode
|
|
8
|
-
} from '../_enums/work_flow_object_expose';
|
|
3
|
+
import { ObjectNumber, WorkFlowButtonActionType, WorkFlowButtonUiCode } from '../_enums/work_flow_object_expose';
|
|
9
4
|
import { MessageObjectExpose } from '../_types/message_object';
|
|
10
5
|
import { useDaeryuntalk } from '../DaeryuntalkContext';
|
|
11
6
|
import { useRouter } from 'next/navigation';
|
|
12
7
|
import { useWorkFlow } from '../_hooks/talkprovider/useWorkFlow';
|
|
13
|
-
import * as gtag from '../../../lib/gtag';
|
|
14
|
-
import mobile from 'is-mobile';
|
|
15
8
|
|
|
16
9
|
// 길이 fit 형
|
|
17
10
|
// 길이 full 형
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React, { Dispatch, SetStateAction
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import ChatHomeView from './ChatHomeView';
|
|
3
3
|
import ImageViewer from './Viewer/ImageViewer';
|
|
4
4
|
import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
5
|
-
import ShadowBox from './_ui/ShadowBox';
|
|
6
5
|
|
|
7
6
|
interface ChatWidgetProps {
|
|
8
7
|
isOpen: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { createContext, ReactNode,
|
|
1
|
+
import React, { createContext, ReactNode, useContext, useRef, useState } from 'react';
|
|
2
2
|
import { FileInfo, Message } from './_types/message';
|
|
3
3
|
import { ChatInquiryDetailDataResponse, History, IChatInquiryMainDataResponse } from './_api/daeryuntalk/type/response';
|
|
4
4
|
import { MessageObject } from './_types/message_object';
|
|
@@ -10,6 +10,7 @@ interface IProps {
|
|
|
10
10
|
handleGoRequestPhone: (name: string, cellPhoneNumber: string) => any;
|
|
11
11
|
handleGoHistoryPhoneAuth: (name: string, cellPhoneNumber: string, certificationNumber: string) => any;
|
|
12
12
|
}
|
|
13
|
+
|
|
13
14
|
const AuthForm = ({ goGetHistoryList, handleGoRequestPhone, handleGoHistoryPhoneAuth }: IProps) => {
|
|
14
15
|
const [name, setName] = useState<{ value: string; isValid: boolean }>({ value: '', isValid: false });
|
|
15
16
|
const [phone, setPhone] = useState<{ value: string; isValid: boolean }>({ value: '', isValid: false });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import Image from 'next/image';
|
|
5
5
|
import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
|
|
6
6
|
import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
@@ -9,7 +9,6 @@ import SendIcon from '../../asset/images/daeryuntalk/send.svg';
|
|
|
9
9
|
import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
|
|
10
10
|
import { IChatInquiryMainDataResponse } from './_api/daeryuntalk/type/response';
|
|
11
11
|
import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg.png';
|
|
12
|
-
import DaeryuntalkHomeLogo from '../../asset/images/daeryuntalk/home_bg_logo.png';
|
|
13
12
|
import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
|
|
14
13
|
import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
15
14
|
import Button3 from './_ui/buttons/Button3';
|
|
@@ -2,13 +2,10 @@ import { EditorContent, useEditor } from '@tiptap/react';
|
|
|
2
2
|
import Placeholder from '@tiptap/extension-placeholder';
|
|
3
3
|
import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
4
4
|
import HardBreak from '@tiptap/extension-hard-break'; // 추가
|
|
5
|
-
|
|
6
5
|
import { JSONContent } from '@tiptap/core'; // 추가 필요
|
|
7
6
|
import Document from '@tiptap/extension-document';
|
|
8
7
|
import Paragraph from '@tiptap/extension-paragraph';
|
|
9
8
|
import Text from '@tiptap/extension-text';
|
|
10
|
-
import { useScrollShadow } from '../_hooks/useScrollShadow';
|
|
11
|
-
import ShadowBox from '../_ui/ShadowBox';
|
|
12
9
|
|
|
13
10
|
export interface TiptapEditorRef {
|
|
14
11
|
clearContent: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { createContext, useContext, useState
|
|
3
|
+
import { createContext, ReactNode, useContext, useState } from 'react';
|
|
4
4
|
|
|
5
5
|
export type ToastType = 'success' | 'warning' | 'error';
|
|
6
6
|
export type AnimationState = 'hidden' | 'entering' | 'visible' | 'exiting';
|
|
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import React, {
|
|
10
|
+
import React, { useEffect, useState } from 'react';
|
|
11
11
|
import { getMessageFileDownloadUrl } from '../_api';
|
|
12
12
|
import { useDaeryuntalk } from '../DaeryuntalkContext';
|
|
13
13
|
import MobileViewer from './MobileViewer';
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import Image from 'next/image';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
3
2
|
import { getMessageFileDownloadUrl } from '../_api';
|
|
4
3
|
import { useDaeryuntalk } from '../DaeryuntalkContext';
|
|
5
4
|
import { FileInfo } from '../_types/message';
|
|
6
|
-
import RotateCCWIcon from '../../../asset/images/daeryuntalk/viewer/rotate.svg';
|
|
7
|
-
import ZoomOutIcon from '../../../asset/images/daeryuntalk/viewer/zoom-out.svg';
|
|
8
|
-
import ZoomInIcon from '../../../asset/images/daeryuntalk/viewer/zoom-in.svg';
|
|
9
|
-
import DownloadIcon from '../../../asset/images/daeryuntalk/download.svg';
|
|
10
|
-
import CloseIcon from '../../../asset/images/daeryuntalk/viewer/close.svg';
|
|
11
|
-
import MoveSwipingIcon from '../../../asset/images/daeryuntalk/viewer/move-button.svg';
|
|
12
|
-
import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
13
|
-
import { formatDateToKorean } from '../_lib/utils';
|
|
14
5
|
import MobileViewer from './MobileViewer';
|
|
15
6
|
import TbPcViewer from './TbPcViewer';
|
|
16
7
|
|
|
@@ -11,6 +11,7 @@ import { Swiper as SwiperClass } from 'swiper';
|
|
|
11
11
|
|
|
12
12
|
import 'swiper/css';
|
|
13
13
|
import 'swiper/css/navigation';
|
|
14
|
+
|
|
14
15
|
interface IMobileViewerProps {
|
|
15
16
|
imageViewerMessage?: Message | null;
|
|
16
17
|
handleDownload: () => void;
|
|
@@ -22,6 +23,7 @@ interface IMobileViewerProps {
|
|
|
22
23
|
setRotation: Dispatch<SetStateAction<number>>;
|
|
23
24
|
setZoomLevel: Dispatch<SetStateAction<number>>;
|
|
24
25
|
}
|
|
26
|
+
|
|
25
27
|
const MobileViewer = ({
|
|
26
28
|
imageViewerMessage,
|
|
27
29
|
handleDownload,
|
|
@@ -11,7 +11,6 @@ import MoveSwipingIcon from '../../../asset/images/daeryuntalk/viewer/move-butto
|
|
|
11
11
|
import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
|
|
12
12
|
import { formatDateToKorean } from '../_lib/utils';
|
|
13
13
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
14
|
-
import { Swiper as SwiperClass } from 'swiper';
|
|
15
14
|
|
|
16
15
|
import 'swiper/css';
|
|
17
16
|
import 'swiper/css/navigation';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 3. 웹소켓 연결
|
|
8
8
|
* 4. 채팅 문의 관리
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import { ChatInquiryCreateDataResponse, ChatInquiryDetailDataResponse, ChatInquiryMessageListDataResponse, HistoryListResponse, IChatInquiryMainDataResponse, IDaeryunTalkResponseWrapper, RequestConfirmNumberResponse, SendMessageResponse, WebSocketInitDataResponse } from './type/response';
|
|
11
11
|
import { Dispatch, SetStateAction } from 'react';
|
|
12
12
|
export declare const DEFAULT_API_VERSION = "1.0.0";
|
|
13
13
|
export declare const MESSAGE_TYPES: {
|
|
@@ -8,19 +8,18 @@
|
|
|
8
8
|
* 4. 채팅 문의 관리
|
|
9
9
|
*/
|
|
10
10
|
import {
|
|
11
|
-
IDaeryunTalkResponseWrapper,
|
|
12
|
-
IAuthConnectionDataResponse,
|
|
13
|
-
WebSocketInitDataResponse,
|
|
14
|
-
IChatInquiryMainDataResponse,
|
|
15
11
|
ChatInquiryCreateDataResponse,
|
|
16
12
|
ChatInquiryDetailDataResponse,
|
|
17
|
-
ChatMessage,
|
|
18
|
-
SendMessageResponse,
|
|
19
13
|
ChatInquiryMessageListDataResponse,
|
|
20
14
|
HistoryListResponse,
|
|
21
|
-
|
|
15
|
+
IAuthConnectionDataResponse,
|
|
16
|
+
IChatInquiryMainDataResponse,
|
|
17
|
+
IDaeryunTalkResponseWrapper,
|
|
18
|
+
RequestConfirmNumberResponse,
|
|
19
|
+
SendMessageResponse,
|
|
20
|
+
WebSocketInitDataResponse
|
|
22
21
|
} from './type/response';
|
|
23
|
-
import { Dispatch, SetStateAction
|
|
22
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
24
23
|
import { ErrorEnum } from '../../_enums/error';
|
|
25
24
|
import { MessageSocketType } from '../../_enums/socket_type';
|
|
26
25
|
import { consoleFn } from '../../_lib/utils';
|
|
@@ -9,6 +9,7 @@ export const InquiryStatusTextMap: Record<InquiryStatusEnum, string> = {
|
|
|
9
9
|
[InquiryStatusEnum.PERSONAL_INFO]: '개인정보제공문의중',
|
|
10
10
|
[InquiryStatusEnum.CLOSED]: '종료'
|
|
11
11
|
};
|
|
12
|
+
|
|
12
13
|
export enum InquiryInteriorStateCode {
|
|
13
14
|
CREATED = 'CHI00900001',
|
|
14
15
|
IN_PROGRESS = 'CHI00900002',
|
|
@@ -34,6 +34,7 @@ export enum WorkFlowObjectUICode {
|
|
|
34
34
|
TEXTBOX = 'WFL01000002',
|
|
35
35
|
UNKNOWN = 'WFL01000003'
|
|
36
36
|
}
|
|
37
|
+
|
|
37
38
|
export const WorkFlowObjectUICodeMap: Record<WorkFlowObjectUICode, string> = {
|
|
38
39
|
[WorkFlowObjectUICode.BUTTON]: '버튼형',
|
|
39
40
|
[WorkFlowObjectUICode.TEXTBOX]: '텍스트박스형',
|
|
@@ -59,6 +60,7 @@ export enum WorkFlowButtonActionType {
|
|
|
59
60
|
PHONE_CALL = 'WFL00900005', // 전화연결
|
|
60
61
|
KAKAO_CONNECT = 'WFL00900006' // 카카오연동
|
|
61
62
|
}
|
|
63
|
+
|
|
62
64
|
export const WorkFlowButtonActionMap: Record<WorkFlowButtonActionType, string> = {
|
|
63
65
|
[WorkFlowButtonActionType.INTERNAL_LINK]: '내부링크',
|
|
64
66
|
[WorkFlowButtonActionType.EXTERNAL_LINK]: '외부링크',
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
generateChatInquiry,
|
|
8
8
|
getChatInquiryDetailNew,
|
|
9
9
|
getChatInquiryMessageList,
|
|
10
|
-
getMessageFileDownloadUrl,
|
|
11
10
|
sendChatMessage
|
|
12
11
|
} from '../../_api';
|
|
13
12
|
import { convertApiMessageObjectToUiMessageObject, convertApiMessageToUiMessage } from '../../_lib';
|
|
@@ -15,11 +14,10 @@ import { IChatInquiryMainDataResponse } from '../../_api/daeryuntalk/type/respon
|
|
|
15
14
|
import { Message } from '../../_types/message';
|
|
16
15
|
import { MessageObject } from '../../_types/message_object';
|
|
17
16
|
import { useDaeryunTalkToast } from '../../Toast/DaeryuntalkToastProvider';
|
|
18
|
-
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
|
|
19
|
-
import { router } from 'next/client';
|
|
20
17
|
import { useFullURL } from './useFullURL';
|
|
21
18
|
import { getErrorMessageMap } from '../../_enums/error';
|
|
22
19
|
import { consoleFn } from '../../_lib/utils';
|
|
20
|
+
|
|
23
21
|
interface props {
|
|
24
22
|
setIsLoading: Dispatch<SetStateAction<boolean>>;
|
|
25
23
|
inquiryMainData: IChatInquiryMainDataResponse | null;
|
|
@@ -2,7 +2,6 @@ import { Dispatch, MutableRefObject, SetStateAction, useCallback, useRef } from
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
authenticateUser,
|
|
5
|
-
followupAttend,
|
|
6
5
|
getChatInquiryMain,
|
|
7
6
|
getHistoryList,
|
|
8
7
|
initializeDaeryuntalk as apiInitializeDaeryuntalk
|
|
@@ -39,6 +38,7 @@ interface props {
|
|
|
39
38
|
setPreviewState: Dispatch<SetStateAction<ViewState>>;
|
|
40
39
|
setIsUserExpried: Dispatch<SetStateAction<boolean>>;
|
|
41
40
|
}
|
|
41
|
+
|
|
42
42
|
export const useSocketEventHandler = ({
|
|
43
43
|
setIsConnected,
|
|
44
44
|
setIsLoading,
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
ChatMessage as ApiChatMessage,
|
|
4
|
-
ObjectExposeInfo
|
|
5
|
-
} from '../_api/daeryuntalk/type/response';
|
|
6
|
-
import { FormInput, FormInputType, Message } from '../_types/message';
|
|
1
|
+
import { ChatInquiryDetailDataResponse, ChatMessage as ApiChatMessage } from '../_api/daeryuntalk/type/response';
|
|
2
|
+
import { FormInputType, Message } from '../_types/message';
|
|
7
3
|
import { MessageObject } from '../_types/message_object';
|
|
8
4
|
import { IInquiryWorkFlowUpdate } from '../_types/socket/workflow';
|
|
9
5
|
|
|
@@ -113,7 +113,7 @@ export const decodeDoubleEscapedHtml = (escaped: string) => {
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
export const consoleFn = (...args: any[]) => {
|
|
116
|
-
if (process.env.NODE_ENV === 'development' || process.env.DEVELOP_TEST==='true') {
|
|
116
|
+
if (process.env.NODE_ENV === 'development' || process.env.DEVELOP_TEST === 'true') {
|
|
117
117
|
console.log(...args);
|
|
118
118
|
}
|
|
119
119
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import ChatButton from './ChatButton';
|
|
5
5
|
import ChatWidget from './ChatWidget';
|
|
6
|
-
import { DaeryuntalkProvider
|
|
6
|
+
import { DaeryuntalkProvider } from './DaeryuntalkContext';
|
|
7
7
|
import { DaeryuntalkToastProvider } from './Toast/DaeryuntalkToastProvider';
|
|
8
8
|
import mobile from 'is-mobile';
|
|
9
9
|
import ViewportHandler from './ViewportHandler';
|