@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.
Files changed (49) hide show
  1. package/dist/components/Daeryuntalk/ChatConversation.tsx +0 -1
  2. package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.tsx +1 -0
  3. package/dist/components/Daeryuntalk/ChatHomeView.tsx +1 -12
  4. package/dist/components/Daeryuntalk/ChatInput.tsx +1 -2
  5. package/dist/components/Daeryuntalk/ChatItem/ChatFile.tsx +2 -1
  6. package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.tsx +1 -0
  7. package/dist/components/Daeryuntalk/ChatItem/RichText.tsx +1 -1
  8. package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.tsx +1 -0
  9. package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.tsx +1 -0
  10. package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.tsx +1 -1
  11. package/dist/components/Daeryuntalk/ChatObject/ObjectBack.tsx +1 -0
  12. package/dist/components/Daeryuntalk/ChatObject/ObjectButton.tsx +2 -9
  13. package/dist/components/Daeryuntalk/ChatWidget.tsx +1 -2
  14. package/dist/components/Daeryuntalk/DaeryuntalkContext.tsx +1 -1
  15. package/dist/components/Daeryuntalk/FixedErrorBox.tsx +1 -0
  16. package/dist/components/Daeryuntalk/History/AuthForm.tsx +1 -0
  17. package/dist/components/Daeryuntalk/HomeView.tsx +1 -2
  18. package/dist/components/Daeryuntalk/NoticeMessage.tsx +0 -1
  19. package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +0 -3
  20. package/dist/components/Daeryuntalk/Toast/DaeryuntalkToastProvider.tsx +1 -1
  21. package/dist/components/Daeryuntalk/Toast/Toast.tsx +1 -0
  22. package/dist/components/Daeryuntalk/Viewer/ImageViewer.jsx +1 -1
  23. package/dist/components/Daeryuntalk/Viewer/ImageViewer.tsx +1 -10
  24. package/dist/components/Daeryuntalk/Viewer/MobileViewer.tsx +2 -0
  25. package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +0 -1
  26. package/dist/components/Daeryuntalk/_api/daeryuntalk/index.d.ts +1 -1
  27. package/dist/components/Daeryuntalk/_api/daeryuntalk/index.ts +7 -8
  28. package/dist/components/Daeryuntalk/_api/daeryuntalk/type/response.ts +1 -0
  29. package/dist/components/Daeryuntalk/_enums/ask-status.ts +1 -0
  30. package/dist/components/Daeryuntalk/_enums/work_flow_object_expose.ts +2 -0
  31. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.ts +1 -3
  32. package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.ts +1 -1
  33. package/dist/components/Daeryuntalk/_hooks/talkprovider/useWorkFlow.ts +0 -1
  34. package/dist/components/Daeryuntalk/_hooks/useHoverScrollbar.d.ts +1 -1
  35. package/dist/components/Daeryuntalk/_hooks/useHoverScrollbar.js +1 -1
  36. package/dist/components/Daeryuntalk/_hooks/useHoverScrollbar.ts +1 -1
  37. package/dist/components/Daeryuntalk/_hooks/view/useHomeView.ts +1 -0
  38. package/dist/components/Daeryuntalk/_lib/index.ts +2 -6
  39. package/dist/components/Daeryuntalk/_lib/utils.ts +1 -1
  40. package/dist/components/Daeryuntalk/_types/message.js +1 -0
  41. package/dist/components/Daeryuntalk/_types/message.ts +0 -2
  42. package/dist/components/Daeryuntalk/_types/message_object.ts +0 -3
  43. package/dist/components/Daeryuntalk/_ui/ShadowBox.tsx +1 -0
  44. package/dist/components/Daeryuntalk/_ui/buttons/Button2.tsx +1 -0
  45. package/dist/components/Daeryuntalk/index.tsx +1 -1
  46. package/dist/components/common/data/index.js +17 -17
  47. package/dist/components/common/data/index.ts +17 -17
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. 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 = {
@@ -12,6 +12,7 @@ interface IChatConversationHeaderProps {
12
12
  isHash: boolean;
13
13
  onBackClick?: () => void;
14
14
  }
15
+
15
16
  const ChatConversationHeader = ({
16
17
  inquiryMainData,
17
18
  isMobile,
@@ -1,21 +1,10 @@
1
- import React, { Dispatch, SetStateAction, useCallback, useEffect, useRef, useState } from '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, { useState } from '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: [
@@ -7,6 +7,7 @@ interface props {
7
7
  message: Message;
8
8
  isOperator: boolean;
9
9
  }
10
+
10
11
  const WorkFlowAuthForm = ({ message, isOperator }: props) => {
11
12
  const formData = message?.form ?? null;
12
13
  if (!formData) {
@@ -5,6 +5,7 @@ import Image from 'next/image';
5
5
  interface props {
6
6
  message: Message;
7
7
  }
8
+
8
9
  const WorkFlowClickData = ({ message }: props) => {
9
10
  const iconBlock = message?.blocks?.[0] ?? null;
10
11
  if (!iconBlock) {
@@ -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 || '';
@@ -6,6 +6,7 @@ interface props {
6
6
  isBack: boolean;
7
7
  handleBtn?: () => void;
8
8
  }
9
+
9
10
  const ObjectBack = ({ isBack, handleBtn }: props) => {
10
11
  return (
11
12
  <button
@@ -1,17 +1,10 @@
1
- import React, { useEffect, useState } from '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, useState } from 'react';
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, useCallback, useContext, useRef, useState } from 'react';
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';
@@ -4,6 +4,7 @@ interface IFixedErrorBoxProps {
4
4
  isError?: boolean;
5
5
  message?: string;
6
6
  }
7
+
7
8
  const FixedErrorBox = ({ isError = false, message = '네트워크 연결이 원활하지 않습니다.' }: IFixedErrorBoxProps) => {
8
9
  const WarningIcon = ({ className = '' }: { className?: string }) => {
9
10
  return (
@@ -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, { useCallback, useEffect, useRef, useState } from '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';
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from 'react';
2
- import Image from 'next/image';
3
2
  import NoticeIcon from '../../asset/images/daeryuntalk/notice.svg';
4
3
  import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
5
4
 
@@ -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, ReactNode } from 'react';
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';
@@ -1,4 +1,5 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
+
2
3
  type ToastType = 'success' | 'warning' | 'error';
3
4
 
4
5
  interface ToastProps {
@@ -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, { useState, useEffect } from '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, { useState, useEffect } from '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 { IDaeryunTalkResponseWrapper, WebSocketInitDataResponse, IChatInquiryMainDataResponse, ChatInquiryCreateDataResponse, ChatInquiryDetailDataResponse, SendMessageResponse, ChatInquiryMessageListDataResponse, HistoryListResponse, RequestConfirmNumberResponse } from './type/response';
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
- RequestConfirmNumberResponse
15
+ IAuthConnectionDataResponse,
16
+ IChatInquiryMainDataResponse,
17
+ IDaeryunTalkResponseWrapper,
18
+ RequestConfirmNumberResponse,
19
+ SendMessageResponse,
20
+ WebSocketInitDataResponse
22
21
  } from './type/response';
23
- import { Dispatch, SetStateAction, use } from 'react';
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';
@@ -53,6 +53,7 @@ export interface FormInputType {
53
53
  read_only: boolean;
54
54
  binding_key: string;
55
55
  }
56
+
56
57
  export interface FormType {
57
58
  type: string;
58
59
  inputs: FormInputType[];
@@ -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,7 +1,6 @@
1
1
  import { insert, savePowerLinkConversion } from '../../../../lib';
2
2
  import * as gtag from '../../../../lib/gtag';
3
3
  import { useEffect, useState } from 'react';
4
- import mobile from 'is-mobile';
5
4
 
6
5
  export const useWorkFlow = (props: {
7
6
  tel: string;
@@ -1,4 +1,4 @@
1
- import { RefObject, CSSProperties } from 'react';
1
+ import { CSSProperties, RefObject } from 'react';
2
2
  /**
3
3
  * useHoverScrollbar (scrollbar-gutter 완전 해결)
4
4
  * - scrollbar-gutter: stable로 항상 스크롤바 공간 확보
@@ -1,4 +1,4 @@
1
- import { useRef, useState, useEffect } from 'react';
1
+ import { useEffect, useRef, useState } from 'react';
2
2
  export function useHoverScrollbar(refParam) {
3
3
  const localRef = useRef(null);
4
4
  const ref = refParam || localRef;
@@ -1,4 +1,4 @@
1
- import { useRef, useState, useEffect, RefObject, CSSProperties } from 'react';
1
+ import { CSSProperties, RefObject, useEffect, useRef, useState } from 'react';
2
2
 
3
3
  /**
4
4
  * useHoverScrollbar (scrollbar-gutter 완전 해결)
@@ -13,6 +13,7 @@ interface IHomeProps {
13
13
  viewState: ViewState;
14
14
  setPreviewState: (state: ViewState) => void;
15
15
  }
16
+
16
17
  export const useHomeView = ({
17
18
  setIsLoading,
18
19
  setViewState,
@@ -1,9 +1,5 @@
1
- import {
2
- ChatInquiryDetailDataResponse,
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
  };
@@ -1,4 +1,5 @@
1
1
  // todo 올바른 타입 정의 필요
2
+ // 텍스트 블록 타입
2
3
  import { InquiryMessageTemplateType } from '../_enums/template';
3
4
  // 메시지에 특정 컨텐츠가 있는지 확인하는 헬퍼 함수들
4
5
  export const hasBlocks = (message) => !!message.blocks && message.blocks.length > 0;
@@ -1,9 +1,7 @@
1
1
  // todo 올바른 타입 정의 필요
2
2
 
3
3
  // 텍스트 블록 타입
4
- import exp from 'constants';
5
4
  import { InquiryMessageTemplateType } from '../_enums/template';
6
- import { isEmptyHtml } from '../_lib/utils';
7
5
 
8
6
  export interface TextBlock {
9
7
  type: string;
@@ -1,6 +1,3 @@
1
- import { useState } from 'react';
2
- import { Message } from './message';
3
-
4
1
  export interface MessageObject {
5
2
  exposeObjectListYn?: boolean; // 오브젝트 목록 노출 여부
6
3
  messageNumber?: string; // 연결된 메시지 번호
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  interface IShadowBox {
4
4
  className?: string;
5
5
  }
6
+
6
7
  const ShadowBox = ({ className = '' }: IShadowBox) => {
7
8
  return (
8
9
  <div
@@ -7,6 +7,7 @@ interface Button2Props {
7
7
  children: React.ReactNode;
8
8
  isDisabled?: boolean;
9
9
  }
10
+
10
11
  const Button2 = ({ onClick, type = 'button', className = '', children, isDisabled = false }: Button2Props) => {
11
12
  return (
12
13
  <button
@@ -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, useDaeryuntalk } from './DaeryuntalkContext';
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';