@daeryun/dr_components 1.1.8 → 1.1.10

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 (79) hide show
  1. package/dist/asset/images/daeryuntalk/history-icon.png +0 -0
  2. package/dist/asset/images/daeryuntalk/history-new-badge.png +0 -0
  3. package/dist/asset/images/fix/call_h.webp +0 -0
  4. package/dist/asset/images/fix/callbox_h.webp +0 -0
  5. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  6. package/dist/components/Daeryuntalk/ChatButton.jsx +2 -1
  7. package/dist/components/Daeryuntalk/ChatButton.tsx +2 -1
  8. package/dist/components/Daeryuntalk/ChatConversation.d.ts +7 -1
  9. package/dist/components/Daeryuntalk/ChatConversation.jsx +10 -8
  10. package/dist/components/Daeryuntalk/ChatConversation.tsx +25 -12
  11. package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.d.ts +7 -2
  12. package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.jsx +29 -9
  13. package/dist/components/Daeryuntalk/ChatConversationItem/ChatConversationHeader.tsx +53 -15
  14. package/dist/components/Daeryuntalk/ChatHomeView.d.ts +1 -1
  15. package/dist/components/Daeryuntalk/ChatHomeView.jsx +68 -46
  16. package/dist/components/Daeryuntalk/ChatHomeView.tsx +68 -66
  17. package/dist/components/Daeryuntalk/ChatInput.jsx +2 -1
  18. package/dist/components/Daeryuntalk/ChatInput.tsx +3 -1
  19. package/dist/components/Daeryuntalk/ChatItem/ChatFile.jsx +2 -1
  20. package/dist/components/Daeryuntalk/ChatItem/ChatFile.tsx +2 -1
  21. package/dist/components/Daeryuntalk/ChatItem/ChatLoading.d.ts +4 -1
  22. package/dist/components/Daeryuntalk/ChatItem/ChatLoading.jsx +2 -2
  23. package/dist/components/Daeryuntalk/ChatItem/ChatLoading.tsx +5 -2
  24. package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.tsx +0 -1
  25. package/dist/components/Daeryuntalk/ChatItem/RichText.tsx +0 -1
  26. package/dist/components/Daeryuntalk/ChatItem/TypingComp.jsx +2 -1
  27. package/dist/components/Daeryuntalk/ChatItem/TypingComp.tsx +2 -1
  28. package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.tsx +0 -1
  29. package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.tsx +0 -1
  30. package/dist/components/Daeryuntalk/ChatMessage.jsx +3 -2
  31. package/dist/components/Daeryuntalk/ChatMessage.tsx +3 -2
  32. package/dist/components/Daeryuntalk/ChatObject/FieldWorkObject.jsx +1 -0
  33. package/dist/components/Daeryuntalk/ChatObject/FieldWorkObject.tsx +1 -0
  34. package/dist/components/Daeryuntalk/ChatObject/ObjectBack.jsx +1 -0
  35. package/dist/components/Daeryuntalk/ChatObject/ObjectBack.tsx +1 -1
  36. package/dist/components/Daeryuntalk/ChatWidget.jsx +1 -1
  37. package/dist/components/Daeryuntalk/ChatWidget.tsx +1 -1
  38. package/dist/components/Daeryuntalk/DaeryuntalkContext.d.ts +2 -0
  39. package/dist/components/Daeryuntalk/DaeryuntalkContext.jsx +12 -5
  40. package/dist/components/Daeryuntalk/DaeryuntalkContext.tsx +41 -31
  41. package/dist/components/Daeryuntalk/HistoryView.jsx +12 -9
  42. package/dist/components/Daeryuntalk/HistoryView.tsx +12 -9
  43. package/dist/components/Daeryuntalk/HomeView.jsx +7 -6
  44. package/dist/components/Daeryuntalk/HomeView.tsx +8 -6
  45. package/dist/components/Daeryuntalk/NavigationFooter.d.ts +1 -1
  46. package/dist/components/Daeryuntalk/NavigationFooter.jsx +1 -0
  47. package/dist/components/Daeryuntalk/NavigationFooter.tsx +3 -1
  48. package/dist/components/Daeryuntalk/NoticeMessage.jsx +1 -0
  49. package/dist/components/Daeryuntalk/NoticeMessage.tsx +1 -0
  50. package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +1 -0
  51. package/dist/components/Daeryuntalk/Toast/Toast.jsx +1 -1
  52. package/dist/components/Daeryuntalk/Toast/Toast.tsx +2 -2
  53. package/dist/components/Daeryuntalk/Viewer/MobileViewer.jsx +4 -3
  54. package/dist/components/Daeryuntalk/Viewer/MobileViewer.tsx +4 -5
  55. package/dist/components/Daeryuntalk/Viewer/TbPcViewer.jsx +5 -4
  56. package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +7 -5
  57. package/dist/components/Daeryuntalk/ViewportHandler.d.ts +6 -1
  58. package/dist/components/Daeryuntalk/ViewportHandler.jsx +21 -6
  59. package/dist/components/Daeryuntalk/ViewportHandler.tsx +26 -44
  60. package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.d.ts +4 -2
  61. package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.js +77 -16
  62. package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.ts +100 -17
  63. package/dist/components/Daeryuntalk/_hooks/view/useHistoryView.d.ts +3 -4
  64. package/dist/components/Daeryuntalk/_hooks/view/useHistoryView.js +15 -11
  65. package/dist/components/Daeryuntalk/_hooks/view/useHistoryView.ts +15 -13
  66. package/dist/components/Daeryuntalk/_hooks/view/useHomeView.d.ts +0 -1
  67. package/dist/components/Daeryuntalk/_hooks/view/useHomeView.js +8 -6
  68. package/dist/components/Daeryuntalk/_hooks/view/useHomeView.ts +8 -7
  69. package/dist/components/Daeryuntalk/index.jsx +2 -11
  70. package/dist/components/Daeryuntalk/index.tsx +2 -12
  71. package/dist/components/Fix/index.jsx +2 -2
  72. package/dist/components/Fix/index.tsx +2 -2
  73. package/dist/components/page/Login/LoginShareCheckContainer.jsx +6 -4
  74. package/dist/components/page/Login/LoginShareCheckContainer.tsx +6 -4
  75. package/dist/components/page/Login/_hooks/useAppLoginDetect.js +9 -7
  76. package/dist/components/page/Login/_hooks/useAppLoginDetect.ts +11 -8
  77. package/dist/styles/globals.css +22 -2
  78. package/dist/tsconfig.tsbuildinfo +1 -1
  79. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- const ChatLoading = () => {
3
- return (<div className="flex justify-start pl-8">
2
+ const ChatLoading = ({ outerClass }) => {
3
+ return (<div className={`flex justify-start pl-8 ${outerClass}`}>
4
4
  <div className="flex h-8 animate-pulse space-x-2 rounded-full ">
5
5
  <div className="h-[8px] w-[8px] animate-bounce rounded-full bg-drTalkGrayscale2 "></div>
6
6
  <div className="h-[8px] w-[8px] animate-bounce rounded-full bg-drTalkGrayscale3" style={{ animationDelay: '0.2s' }}></div>
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
2
 
3
- const ChatLoading = () => {
3
+ interface ChatLoadingProsp {
4
+ outerClass?: string;
5
+ }
6
+ const ChatLoading = ({ outerClass }: ChatLoadingProsp) => {
4
7
  return (
5
- <div className="flex justify-start pl-8">
8
+ <div className={`flex justify-start pl-8 ${outerClass}`}>
6
9
  <div className="flex h-8 animate-pulse space-x-2 rounded-full ">
7
10
  <div className="h-[8px] w-[8px] animate-bounce rounded-full bg-drTalkGrayscale2 "></div>
8
11
  <div
@@ -5,7 +5,6 @@ interface props {
5
5
  className?: string;
6
6
  children: ReactNode;
7
7
  }
8
-
9
8
  const ChatWrapper = ({ isOperator, children, className = '' }: props) => {
10
9
  const operatorClassName = 'border-drTalkGrayscale4 text-drTalkBlack';
11
10
  const customerClassName = 'border-drTalkBtnActive2 text-drTalkHover bg-drTalkGrayscale5';
@@ -10,7 +10,6 @@ import TextStyle from '@tiptap/extension-text-style';
10
10
  interface props {
11
11
  message: Message;
12
12
  }
13
-
14
13
  const RichText = ({ message }: props) => {
15
14
  const editor = useEditor({
16
15
  extensions: [
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
3
2
  import ChatWrapper from './ChatWrapper';
3
+ // 이미지
4
+ import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
4
5
  const TypingComp = () => {
5
6
  return (<div className="flex flex-col">
6
7
  <div className="flex items-center gap-[10px]">
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
3
2
  import ChatWrapper from './ChatWrapper';
4
3
 
4
+ // 이미지
5
+ import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
5
6
  const TypingComp = () => {
6
7
  return (
7
8
  <div className="flex flex-col">
@@ -7,7 +7,6 @@ interface props {
7
7
  message: Message;
8
8
  isOperator: boolean;
9
9
  }
10
-
11
10
  const WorkFlowAuthForm = ({ message, isOperator }: props) => {
12
11
  const formData = message?.form ?? null;
13
12
  if (!formData) {
@@ -5,7 +5,6 @@ import Image from 'next/image';
5
5
  interface props {
6
6
  message: Message;
7
7
  }
8
-
9
8
  const WorkFlowClickData = ({ message }: props) => {
10
9
  const iconBlock = message?.blocks?.[0] ?? null;
11
10
  if (!iconBlock) {
@@ -9,8 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import React from 'react';
11
11
  import { hasBlocks, hasCustomerWorkFlowClickData, hasFileArray, hasForm, hasRichForm, hasWorkFlow } from './_types/message';
12
- import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
13
- import ResendIcon from '../../asset/images/daeryuntalk/re_send.svg';
14
12
  import { ObjectNumber, WorkFlowBackOrInit, WorkFlowButtonUiCode } from './_enums/work_flow_object_expose';
15
13
  import { MessageSenderType } from './_enums/sender_type';
16
14
  import ObjectButton from './ChatObject/ObjectButton';
@@ -24,6 +22,9 @@ import ChatFile from './ChatItem/ChatFile';
24
22
  import FieldWorkObject from './ChatObject/FieldWorkObject';
25
23
  import TimeWrapper from './ChatItem/TimeWrapper';
26
24
  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';
27
28
  const ChatMessage = ({ message, object, handelObjectBack, chatInquiryNumber, workFlowStack, isHovered, scrollEnd, inquiryStatus, isMobile }) => {
28
29
  // 고객 , 오퍼레이터 분리
29
30
  const isOperator = message.senderType !== MessageSenderType.CUSTOMER;
@@ -8,8 +8,6 @@ import {
8
8
  hasWorkFlow,
9
9
  Message
10
10
  } from './_types/message';
11
- import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
12
- import ResendIcon from '../../asset/images/daeryuntalk/re_send.svg';
13
11
  import { MessageObject } from './_types/message_object';
14
12
  import { ObjectNumber, WorkFlowBackOrInit, WorkFlowButtonUiCode } from './_enums/work_flow_object_expose';
15
13
  import { MessageSenderType } from './_enums/sender_type';
@@ -24,6 +22,9 @@ import ChatFile from './ChatItem/ChatFile';
24
22
  import FieldWorkObject from './ChatObject/FieldWorkObject';
25
23
  import TimeWrapper from './ChatItem/TimeWrapper';
26
24
  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';
27
28
 
28
29
  type ChatMessageProps = {
29
30
  message: Message;
@@ -1,5 +1,6 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import ObjectButton from './ObjectButton';
3
+ // 이미지
3
4
  import PlusIcon from '../../../asset/images/daeryuntalk/plus.svg';
4
5
  import MinusIcon from '../../../asset/images/daeryuntalk/minus.svg';
5
6
  const FieldWorkObject = ({ object, message, isFirstObject, scrollEnd }) => {
@@ -2,6 +2,7 @@ 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
+ // 이미지
5
6
  import PlusIcon from '../../../asset/images/daeryuntalk/plus.svg';
6
7
  import MinusIcon from '../../../asset/images/daeryuntalk/minus.svg';
7
8
 
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ // 이미지
2
3
  import BackIcon from '../../../asset/images/daeryuntalk/objectBack.svg';
3
4
  import FirstGoICon from '../../../asset/images/daeryuntalk/firstGo.svg';
4
5
  const ObjectBack = ({ isBack, handleBtn }) => {
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ // 이미지
2
3
  import BackIcon from '../../../asset/images/daeryuntalk/objectBack.svg';
3
4
  import FirstGoICon from '../../../asset/images/daeryuntalk/firstGo.svg';
4
5
 
@@ -6,7 +7,6 @@ interface props {
6
7
  isBack: boolean;
7
8
  handleBtn?: () => void;
8
9
  }
9
-
10
10
  const ObjectBack = ({ isBack, handleBtn }: props) => {
11
11
  return (
12
12
  <button
@@ -1,4 +1,4 @@
1
- import React, { useRef, useEffect } from 'react';
1
+ import React, { useEffect, useRef } from 'react';
2
2
  import ChatHomeView from './ChatHomeView';
3
3
  import ImageViewer from './Viewer/ImageViewer';
4
4
  import { useScrollShadow } from './_hooks/useScrollShadow';
@@ -1,4 +1,4 @@
1
- import React, { Dispatch, SetStateAction, useRef, useEffect } from 'react';
1
+ import React, { Dispatch, SetStateAction, useEffect, useRef } from 'react';
2
2
  import ChatHomeView from './ChatHomeView';
3
3
  import ImageViewer from './Viewer/ImageViewer';
4
4
  import { useScrollShadow } from './_hooks/useScrollShadow';
@@ -82,6 +82,8 @@ type DaeryuntalkContextType = {
82
82
  preViewState: ViewState;
83
83
  isUserExpired: boolean;
84
84
  setIsUserExpried: (isUserExpired: boolean) => void;
85
+ initialLoading: boolean | null;
86
+ setInitialLoading: (initialLoading: boolean | null) => void;
85
87
  };
86
88
  declare const DaeryuntalkContext: React.Context<DaeryuntalkContextType>;
87
89
  type DaeryuntalkProviderProps = {
@@ -61,14 +61,17 @@ const DaeryuntalkContext = createContext({
61
61
  centerCode: '',
62
62
  setIsTyping: () => { },
63
63
  setPreviewState: () => { },
64
- preViewState: 'home',
64
+ preViewState: 'conversation',
65
65
  isUserExpired: false,
66
- setIsUserExpried: () => { }
66
+ setIsUserExpried: () => { },
67
+ initialLoading: null,
68
+ setInitialLoading: () => { }
67
69
  });
68
70
  export const DaeryuntalkProvider = ({ children, propsTel, isMobile, onClose, centerCode }) => {
69
71
  const [inquiryStatus, setInquiryStatus] = useState('');
70
72
  // 인증 여부
71
73
  const [isAuthenticated, setIsAuthenticated] = useState(false);
74
+ const [initialLoading, setInitialLoading] = useState(null);
72
75
  // 채팅 진행중에 필요한 state들
73
76
  const [messages, setMessages] = useState([]);
74
77
  const [messageObject, setMessageObject] = useState(null);
@@ -85,7 +88,7 @@ export const DaeryuntalkProvider = ({ children, propsTel, isMobile, onClose, cen
85
88
  // 채팅 입력중 UI여부
86
89
  const [isTyping, setIsTyping] = useState(false);
87
90
  // 이전 뷰 state 관리
88
- const [preViewState, setPreviewState] = useState('home');
91
+ const [preViewState, setPreviewState] = useState('conversation');
89
92
  // 중복 인증 유저
90
93
  const [isUserExpired, setIsUserExpried] = useState(false);
91
94
  // 소켓 관련 API + 채팅 시작
@@ -109,7 +112,9 @@ export const DaeryuntalkProvider = ({ children, propsTel, isMobile, onClose, cen
109
112
  setPreviewState,
110
113
  setIsUserExpried,
111
114
  chatInquiryNumber,
112
- setIsNextPage
115
+ setIsNextPage,
116
+ setInitialLoading,
117
+ setChatInquiryNumber
113
118
  });
114
119
  // MSG15591497825895676
115
120
  // 채팅 관련
@@ -180,7 +185,9 @@ export const DaeryuntalkProvider = ({ children, propsTel, isMobile, onClose, cen
180
185
  setPreviewState,
181
186
  preViewState,
182
187
  isUserExpired,
183
- setIsUserExpried
188
+ setIsUserExpried,
189
+ initialLoading,
190
+ setInitialLoading
184
191
  }}>
185
192
  {children}
186
193
  </DaeryuntalkContext.Provider>);
@@ -87,6 +87,8 @@ type DaeryuntalkContextType = {
87
87
  preViewState: ViewState;
88
88
  isUserExpired: boolean;
89
89
  setIsUserExpried: (isUserExpired: boolean) => void;
90
+ initialLoading: boolean | null;
91
+ setInitialLoading: (initialLoading: boolean | null) => void;
90
92
  };
91
93
 
92
94
  // 기본값으로 컨텍스트 생성
@@ -98,19 +100,19 @@ const DaeryuntalkContext = createContext<DaeryuntalkContextType>({
98
100
  //
99
101
  isConnected: null,
100
102
  isLoading: false,
101
- sendMessage: () => { },
102
- initializeDaeryuntalk: () => { },
103
- startChat: async () => { },
104
- createNewChat: async () => { },
105
- startWorkFlow: async () => { },
106
- workFlowBack: async () => { },
103
+ sendMessage: () => {},
104
+ initializeDaeryuntalk: () => {},
105
+ startChat: async () => {},
106
+ createNewChat: async () => {},
107
+ startWorkFlow: async () => {},
108
+ workFlowBack: async () => {},
107
109
  chatInquiryNumber: '',
108
110
  workFlowStack: [],
109
- sendHeartbeat: () => { },
110
- sendInquiryWatching: () => { },
111
- sendInquiryLeft: () => { },
112
- chatUserUpdate: () => { },
113
- getNextMessageList: () => { },
111
+ sendHeartbeat: () => {},
112
+ sendInquiryWatching: () => {},
113
+ sendInquiryLeft: () => {},
114
+ chatUserUpdate: () => {},
115
+ getNextMessageList: () => {},
114
116
  //
115
117
  isOpen: false,
116
118
  chatData: null,
@@ -119,28 +121,30 @@ const DaeryuntalkContext = createContext<DaeryuntalkContextType>({
119
121
  isSocketInitialized: false,
120
122
  isSocketConnected: false,
121
123
  error: null,
122
- closeDaeryuntalk: () => { },
124
+ closeDaeryuntalk: () => {},
123
125
  tel: '',
124
- goRequestPhone: () => { },
125
- goHistoryPhoneAuth: () => { },
126
- goGetHistoryList: () => { },
126
+ goRequestPhone: () => {},
127
+ goHistoryPhoneAuth: () => {},
128
+ goGetHistoryList: () => {},
127
129
  historyList: [],
128
- sendHistoryEntered: () => { },
129
- sendHistoryLeft: () => { },
130
- startSelectedChat: () => { },
131
- sendInquiryJoined: () => { },
132
- attendRoomByHistory: () => { },
133
- retryInquiryMain: () => { },
134
- setMessageObject: () => { },
135
- setWorkFlowStack: () => { },
136
- retryInitData: () => { },
130
+ sendHistoryEntered: () => {},
131
+ sendHistoryLeft: () => {},
132
+ startSelectedChat: () => {},
133
+ sendInquiryJoined: () => {},
134
+ attendRoomByHistory: () => {},
135
+ retryInquiryMain: () => {},
136
+ setMessageObject: () => {},
137
+ setWorkFlowStack: () => {},
138
+ retryInitData: () => {},
137
139
  isTyping: false,
138
140
  centerCode: '',
139
- setIsTyping: () => { },
140
- setPreviewState: () => { },
141
- preViewState: 'home',
141
+ setIsTyping: () => {},
142
+ setPreviewState: () => {},
143
+ preViewState: 'conversation',
142
144
  isUserExpired: false,
143
- setIsUserExpried: () => { }
145
+ setIsUserExpried: () => {},
146
+ initialLoading: null,
147
+ setInitialLoading: () => {}
144
148
  });
145
149
 
146
150
  // 프로바이더 컴포넌트 생성
@@ -164,6 +168,8 @@ export const DaeryuntalkProvider: React.FC<DaeryuntalkProviderProps> = ({
164
168
  // 인증 여부
165
169
  const [isAuthenticated, setIsAuthenticated] = useState<boolean>(false);
166
170
 
171
+ const [initialLoading, setInitialLoading] = useState<boolean | null>(null);
172
+
167
173
  // 채팅 진행중에 필요한 state들
168
174
  const [messages, setMessages] = useState<Message[]>([]);
169
175
  const [messageObject, setMessageObject] = useState<MessageObject | null>(null);
@@ -185,7 +191,7 @@ export const DaeryuntalkProvider: React.FC<DaeryuntalkProviderProps> = ({
185
191
  const [isTyping, setIsTyping] = useState(false);
186
192
 
187
193
  // 이전 뷰 state 관리
188
- const [preViewState, setPreviewState] = useState<ViewState>('home');
194
+ const [preViewState, setPreviewState] = useState<ViewState>('conversation');
189
195
 
190
196
  // 중복 인증 유저
191
197
  const [isUserExpired, setIsUserExpried] = useState(false);
@@ -221,7 +227,9 @@ export const DaeryuntalkProvider: React.FC<DaeryuntalkProviderProps> = ({
221
227
  setPreviewState,
222
228
  setIsUserExpried,
223
229
  chatInquiryNumber,
224
- setIsNextPage
230
+ setIsNextPage,
231
+ setInitialLoading,
232
+ setChatInquiryNumber
225
233
  });
226
234
 
227
235
  // MSG15591497825895676
@@ -310,7 +318,9 @@ export const DaeryuntalkProvider: React.FC<DaeryuntalkProviderProps> = ({
310
318
  setPreviewState,
311
319
  preViewState,
312
320
  isUserExpired,
313
- setIsUserExpried
321
+ setIsUserExpried,
322
+ initialLoading,
323
+ setInitialLoading
314
324
  }}
315
325
  >
316
326
  {children}
@@ -1,14 +1,15 @@
1
1
  import React, { useEffect } from 'react';
2
- import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
3
- import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
4
- import SendIcon from '../../asset/images/daeryuntalk/send.svg';
5
- import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
6
2
  import AuthForm from './History/AuthForm';
7
3
  import { useScrollShadow } from './_hooks/useScrollShadow';
8
4
  import ShadowBox from './_ui/ShadowBox';
9
- import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
10
5
  import { formatTimestamp } from './_lib/utils';
11
6
  import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
7
+ // 이미지
8
+ import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
9
+ import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
10
+ import SendIcon from '../../asset/images/daeryuntalk/send.svg';
11
+ import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
12
+ import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
12
13
  const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthenticated, historyLit, goGetHistoryList, isMobile, onClose, isHash, handleGoRequestPhone, handleGoHistoryPhoneAuth }) => {
13
14
  const { containerRef, isScroll, isBottom, checkScroll } = useScrollShadow();
14
15
  const { style: hoverStyle } = useHoverScrollbar(containerRef);
@@ -19,9 +20,9 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
19
20
  return (<div className={`
20
21
  no-scrollbar relative w-full rounded-t-[30px]
21
22
  ${isMobile
22
- ? ` flex h-[calc(100%-64px)] flex-col items-center justify-start `
23
- : ' flex h-[calc(100dvh-64px)] flex-col items-center xs:h-[calc(100vh-165px-64px)] lg:h-[calc(100vh-110px-64px)] ' +
24
- ' xs:max-h-[626px] xs:min-h-[320px] '}
23
+ ? ` flex h-[calc(100%)] flex-col items-center justify-start `
24
+ : ' flex h-[calc(100dvh)] flex-col items-center xs:h-[calc(100vh-165px)] lg:h-[calc(100vh-110px)] ' +
25
+ ' xs:max-h-[690px] xs:min-h-[320px] '}
25
26
  `}>
26
27
  {/* 헤더 */}
27
28
  <div className={`sub_title top-0 z-10 flex h-[56px] w-full items-center justify-between border-b border-gray-200 p-[16px]`}>
@@ -31,7 +32,9 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
31
32
  <div className="flex items-center">
32
33
  <p className=" dr_talk_title_small ">히스토리</p>
33
34
  </div>
34
- <div className={`${isHash ? 'pointer-events-none !opacity-0' : ''} ${isMobile ? 'block' : ' xs:pointer-events-none xs:!opacity-0 '} py-[14px] text-drTalkGrayscale2 hover:cursor-pointer`} onClick={onClose}>
35
+ <div
36
+ // className={`${isHash ? 'pointer-events-none !opacity-0' : ''} ${isMobile ? 'block' : ' xs:pointer-events-none xs:!opacity-0 '} py-[14px] text-drTalkGrayscale2 hover:cursor-pointer`}
37
+ className={`py-[14px] text-black hover:cursor-pointer`} onClick={onClose}>
35
38
  <CloseSvgIcon width={28} height={28}/>
36
39
  </div>
37
40
  </div>
@@ -1,16 +1,18 @@
1
1
  import React, { useEffect } from 'react';
2
- import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
3
- import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
4
- import SendIcon from '../../asset/images/daeryuntalk/send.svg';
5
- import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
6
2
  import AuthForm from './History/AuthForm';
7
3
  import { History } from './_api/daeryuntalk/type/response';
8
4
  import { useScrollShadow } from './_hooks/useScrollShadow';
9
5
  import ShadowBox from './_ui/ShadowBox';
10
- import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
11
6
  import { formatTimestamp } from './_lib/utils';
12
7
  import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
13
8
 
9
+ // 이미지
10
+ import LinkRight from '../../asset/images/daeryuntalk/link_right.svg';
11
+ import EmptyMessage from '../../asset/images/daeryuntalk/empty_message.svg';
12
+ import SendIcon from '../../asset/images/daeryuntalk/send.svg';
13
+ import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
14
+ import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
15
+
14
16
  type HistoryViewProps = {
15
17
  onBackClick: () => void;
16
18
  onChatHistoryClick: (historyId: string) => void;
@@ -53,9 +55,9 @@ const HistoryView: React.FC<HistoryViewProps> = ({
53
55
  no-scrollbar relative w-full rounded-t-[30px]
54
56
  ${
55
57
  isMobile
56
- ? ` flex h-[calc(100%-64px)] flex-col items-center justify-start `
57
- : ' flex h-[calc(100dvh-64px)] flex-col items-center xs:h-[calc(100vh-165px-64px)] lg:h-[calc(100vh-110px-64px)] ' +
58
- ' xs:max-h-[626px] xs:min-h-[320px] '
58
+ ? ` flex h-[calc(100%)] flex-col items-center justify-start `
59
+ : ' flex h-[calc(100dvh)] flex-col items-center xs:h-[calc(100vh-165px)] lg:h-[calc(100vh-110px)] ' +
60
+ ' xs:max-h-[690px] xs:min-h-[320px] '
59
61
  }
60
62
  `}
61
63
  >
@@ -70,7 +72,8 @@ const HistoryView: React.FC<HistoryViewProps> = ({
70
72
  <p className=" dr_talk_title_small ">히스토리</p>
71
73
  </div>
72
74
  <div
73
- className={`${isHash ? 'pointer-events-none !opacity-0' : ''} ${isMobile ? 'block' : ' xs:pointer-events-none xs:!opacity-0 '} py-[14px] text-drTalkGrayscale2 hover:cursor-pointer`}
75
+ // className={`${isHash ? 'pointer-events-none !opacity-0' : ''} ${isMobile ? 'block' : ' xs:pointer-events-none xs:!opacity-0 '} py-[14px] text-drTalkGrayscale2 hover:cursor-pointer`}
76
+ className={`py-[14px] text-black hover:cursor-pointer`}
74
77
  onClick={onClose}
75
78
  >
76
79
  <CloseSvgIcon width={28} height={28} />
@@ -1,17 +1,18 @@
1
1
  'use client';
2
2
  import React, { useEffect, useRef, useState } from 'react';
3
3
  import Image from 'next/image';
4
- import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
5
- import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
6
4
  import ShadowBox from './_ui/ShadowBox';
7
- import SendIcon from '../../asset/images/daeryuntalk/send.svg';
8
- import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
9
- import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg.png';
10
- import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
11
5
  import { useScrollShadow } from './_hooks/useScrollShadow';
12
6
  import Button3 from './_ui/buttons/Button3';
13
7
  import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
14
8
  import { useWindowSize } from './_hooks/useWindowSize';
9
+ // 이미지
10
+ import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg.png';
11
+ import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
12
+ import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
13
+ import SendIcon from '../../asset/images/daeryuntalk/send.svg';
14
+ import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
15
+ import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
15
16
  const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClose, isHash }) => {
16
17
  const { containerRef, isScroll, isBottom, checkScroll, isScrolling } = useScrollShadow();
17
18
  const wrapperRef = useRef(null);
@@ -2,19 +2,21 @@
2
2
 
3
3
  import React, { useEffect, useRef, useState } from 'react';
4
4
  import Image from 'next/image';
5
- import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
6
- import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
7
5
  import ShadowBox from './_ui/ShadowBox';
8
- import SendIcon from '../../asset/images/daeryuntalk/send.svg';
9
- import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
10
6
  import { IChatInquiryMainDataResponse } from './_api/daeryuntalk/type/response';
11
- import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg.png';
12
- import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
13
7
  import { useScrollShadow } from './_hooks/useScrollShadow';
14
8
  import Button3 from './_ui/buttons/Button3';
15
9
  import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
16
10
  import { useWindowSize } from './_hooks/useWindowSize';
17
11
 
12
+ // 이미지
13
+ import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg.png';
14
+ import TimeIcon from '../../asset/images/daeryuntalk/time.svg';
15
+ import DaeryunLogoIcon from '../../asset/images/daeryuntalk/daeryun-logo.svg';
16
+ import SendIcon from '../../asset/images/daeryuntalk/send.svg';
17
+ import InfoIcon from '../../asset/images/daeryuntalk/info.svg';
18
+ import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
19
+
18
20
  interface IHomeViewProps {
19
21
  inquiryMainData: IChatInquiryMainDataResponse | null;
20
22
  isLoading: boolean;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { History as HisResType } from '../../components/Daeryuntalk/_api/daeryuntalk/type/response';
2
+ import { History as HisResType } from './_api/daeryuntalk/type/response';
3
3
  type NavigationFooterProps = {
4
4
  activeView: 'home' | 'history' | 'conversation';
5
5
  onHomeClick: () => void;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ // 이미지
2
3
  import Home from '../../asset/images/daeryuntalk/home.svg';
3
4
  import History from '../../asset/images/daeryuntalk/history.svg';
4
5
  const NavigationFooter = ({ activeView, onHomeClick, onHistoryClick, historyList, isAuthenticated }) => {
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
+ import { History as HisResType } from './_api/daeryuntalk/type/response';
3
+
4
+ // 이미지
2
5
  import Home from '../../asset/images/daeryuntalk/home.svg';
3
6
  import History from '../../asset/images/daeryuntalk/history.svg';
4
- import { History as HisResType } from '../../components/Daeryuntalk/_api/daeryuntalk/type/response';
5
7
 
6
8
  type NavigationFooterProps = {
7
9
  activeView: 'home' | 'history' | 'conversation';
@@ -1,4 +1,5 @@
1
1
  import React, { useState } from 'react';
2
+ // 이미지
2
3
  import NoticeIcon from '../../asset/images/daeryuntalk/notice.svg';
3
4
  import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
4
5
  const NoticeMessage = ({ content, isMobile }) => {
@@ -1,4 +1,5 @@
1
1
  import React, { useState } from 'react';
2
+ // 이미지
2
3
  import NoticeIcon from '../../asset/images/daeryuntalk/notice.svg';
3
4
  import PrevIcon from '../../asset/images/daeryuntalk/prev.svg';
4
5
 
@@ -2,6 +2,7 @@ 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
+
5
6
  import { JSONContent } from '@tiptap/core'; // 추가 필요
6
7
  import Document from '@tiptap/extension-document';
7
8
  import Paragraph from '@tiptap/extension-paragraph';
@@ -23,7 +23,7 @@ const DaeryunTalkToast = ({ type, title, description, duration = 3000, onClose }
23
23
  const timerRef = useRef(null);
24
24
  useEffect(() => {
25
25
  if (timerRef.current) {
26
- clearTimeout(timerRef === null || timerRef === void 0 ? void 0 : timerRef.current);
26
+ clearTimeout(timerRef.current);
27
27
  }
28
28
  const timer = setTimeout(() => {
29
29
  onClose();
@@ -52,7 +52,7 @@ const DaeryunTalkToast = ({ type, title, description, duration = 3000, onClose }
52
52
 
53
53
  useEffect(() => {
54
54
  if (timerRef.current) {
55
- clearTimeout(timerRef?.current!);
55
+ clearTimeout(timerRef.current);
56
56
  }
57
57
  const timer = setTimeout(() => {
58
58
  onClose();
@@ -65,7 +65,7 @@ const DaeryunTalkToast = ({ type, title, description, duration = 3000, onClose }
65
65
 
66
66
  const closeToast = () => {
67
67
  if (timerRef.current) {
68
- clearTimeout(timerRef.current!);
68
+ clearTimeout(timerRef.current);
69
69
  timerRef.current = null;
70
70
  }
71
71
  onClose();
@@ -1,12 +1,13 @@
1
1
  import React, { useRef } from 'react';
2
- import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
3
2
  import { formatDateToKorean } from '../_lib/utils';
4
- import DownloadIcon from '../../../asset/images/daeryuntalk/download.svg';
5
3
  import Image from 'next/image';
6
- import CloseIcon from '../../../asset/images/daeryuntalk/viewer/close.svg';
7
4
  import { Swiper, SwiperSlide } from 'swiper/react';
8
5
  import 'swiper/css';
9
6
  import 'swiper/css/navigation';
7
+ // 이미지
8
+ import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
9
+ import DownloadIcon from '../../../asset/images/daeryuntalk/download.svg';
10
+ import CloseIcon from '../../../asset/images/daeryuntalk/viewer/close.svg';
10
11
  const MobileViewer = ({ imageViewerMessage, handleDownload, currentIndex, setCurrentIndex, currentImage, closeImageViewer, previewImages, setRotation, setZoomLevel }) => {
11
12
  const thumbSwiperRef = useRef(null);
12
13
  return (<div className={`md2:hidden`}>
@@ -1,17 +1,16 @@
1
1
  import React, { Dispatch, SetStateAction, useRef } from 'react';
2
- import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
3
2
  import { formatDateToKorean } from '../_lib/utils';
4
- import DownloadIcon from '../../../asset/images/daeryuntalk/download.svg';
5
3
  import { Message } from '../_types/message';
6
4
  import Image from 'next/image';
7
- import CloseIcon from '../../../asset/images/daeryuntalk/viewer/close.svg';
8
5
  import { PreviewImage } from './ImageViewer';
9
6
  import { Swiper, SwiperSlide } from 'swiper/react';
10
7
  import { Swiper as SwiperClass } from 'swiper';
11
-
12
8
  import 'swiper/css';
13
9
  import 'swiper/css/navigation';
14
-
10
+ // 이미지
11
+ import DaeryunLogoIcon from '../../../asset/images/daeryuntalk/daeryun-logo.svg';
12
+ import DownloadIcon from '../../../asset/images/daeryuntalk/download.svg';
13
+ import CloseIcon from '../../../asset/images/daeryuntalk/viewer/close.svg';
15
14
  interface IMobileViewerProps {
16
15
  imageViewerMessage?: Message | null;
17
16
  handleDownload: () => void;