@daeryun/dr_components 1.2.17 → 1.2.19

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 (241) hide show
  1. package/dist/components/Daeryuntalk/ChatButton.jsx +1 -1
  2. package/dist/components/Daeryuntalk/ChatButton.tsx +1 -1
  3. package/dist/components/Daeryuntalk/ChatWidget.d.ts +1 -0
  4. package/dist/components/Daeryuntalk/ChatWidget.jsx +114 -31
  5. package/dist/components/Daeryuntalk/ChatWidget.tsx +120 -37
  6. package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +0 -9
  7. package/dist/components/Daeryuntalk/index.jsx +17 -1
  8. package/dist/components/Daeryuntalk/index.tsx +26 -2
  9. package/dist/components/DaeryuntalkBackup/ChatButton.d.ts +11 -0
  10. package/dist/components/DaeryuntalkBackup/ChatButton.jsx +123 -0
  11. package/dist/components/DaeryuntalkBackup/ChatButton.tsx +157 -0
  12. package/dist/components/DaeryuntalkBackup/ChatConversation.d.ts +21 -0
  13. package/dist/components/DaeryuntalkBackup/ChatConversation.jsx +259 -0
  14. package/dist/components/DaeryuntalkBackup/ChatConversation.tsx +390 -0
  15. package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.d.ts +16 -0
  16. package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.jsx +50 -0
  17. package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.tsx +108 -0
  18. package/dist/components/DaeryuntalkBackup/ChatHomeView.d.ts +14 -0
  19. package/dist/components/DaeryuntalkBackup/ChatHomeView.jsx +147 -0
  20. package/dist/components/DaeryuntalkBackup/ChatHomeView.tsx +262 -0
  21. package/dist/components/DaeryuntalkBackup/ChatInput.d.ts +8 -0
  22. package/dist/components/DaeryuntalkBackup/ChatInput.jsx +64 -0
  23. package/dist/components/DaeryuntalkBackup/ChatInput.tsx +98 -0
  24. package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.d.ts +6 -0
  25. package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.jsx +19 -0
  26. package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.tsx +27 -0
  27. package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.d.ts +10 -0
  28. package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.jsx +165 -0
  29. package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.tsx +244 -0
  30. package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.d.ts +6 -0
  31. package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.jsx +12 -0
  32. package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.tsx +25 -0
  33. package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.d.ts +8 -0
  34. package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.jsx +100 -0
  35. package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.tsx +135 -0
  36. package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.d.ts +8 -0
  37. package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.jsx +14 -0
  38. package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.tsx +26 -0
  39. package/dist/components/DaeryuntalkBackup/ChatItem/RichText.d.ts +7 -0
  40. package/dist/components/DaeryuntalkBackup/ChatItem/RichText.jsx +37 -0
  41. package/dist/components/DaeryuntalkBackup/ChatItem/RichText.tsx +45 -0
  42. package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.d.ts +9 -0
  43. package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.jsx +10 -0
  44. package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.tsx +21 -0
  45. package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.d.ts +3 -0
  46. package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.jsx +34 -0
  47. package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.tsx +43 -0
  48. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.d.ts +8 -0
  49. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.jsx +20 -0
  50. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.tsx +32 -0
  51. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.d.ts +7 -0
  52. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.jsx +21 -0
  53. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.tsx +37 -0
  54. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.d.ts +9 -0
  55. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.jsx +178 -0
  56. package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.tsx +233 -0
  57. package/dist/components/DaeryuntalkBackup/ChatMessage.d.ts +20 -0
  58. package/dist/components/DaeryuntalkBackup/ChatMessage.jsx +198 -0
  59. package/dist/components/DaeryuntalkBackup/ChatMessage.tsx +295 -0
  60. package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.d.ts +9 -0
  61. package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.jsx +39 -0
  62. package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.tsx +75 -0
  63. package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.d.ts +7 -0
  64. package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.jsx +20 -0
  65. package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.tsx +39 -0
  66. package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.d.ts +10 -0
  67. package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.jsx +138 -0
  68. package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.tsx +177 -0
  69. package/dist/components/DaeryuntalkBackup/ChatWidget.d.ts +13 -0
  70. package/dist/components/DaeryuntalkBackup/ChatWidget.jsx +154 -0
  71. package/dist/components/DaeryuntalkBackup/ChatWidget.tsx +221 -0
  72. package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.d.ts +103 -0
  73. package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.jsx +207 -0
  74. package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.tsx +350 -0
  75. package/dist/components/DaeryuntalkBackup/DateSeparator.d.ts +6 -0
  76. package/dist/components/DaeryuntalkBackup/DateSeparator.jsx +14 -0
  77. package/dist/components/DaeryuntalkBackup/DateSeparator.tsx +24 -0
  78. package/dist/components/DaeryuntalkBackup/FixedErrorBox.d.ts +7 -0
  79. package/dist/components/DaeryuntalkBackup/FixedErrorBox.jsx +34 -0
  80. package/dist/components/DaeryuntalkBackup/FixedErrorBox.tsx +73 -0
  81. package/dist/components/DaeryuntalkBackup/History/AuthForm.d.ts +10 -0
  82. package/dist/components/DaeryuntalkBackup/History/AuthForm.jsx +157 -0
  83. package/dist/components/DaeryuntalkBackup/History/AuthForm.tsx +206 -0
  84. package/dist/components/DaeryuntalkBackup/HistoryView.d.ts +19 -0
  85. package/dist/components/DaeryuntalkBackup/HistoryView.jsx +94 -0
  86. package/dist/components/DaeryuntalkBackup/HistoryView.tsx +182 -0
  87. package/dist/components/DaeryuntalkBackup/HomeView.d.ts +12 -0
  88. package/dist/components/DaeryuntalkBackup/HomeView.jsx +178 -0
  89. package/dist/components/DaeryuntalkBackup/HomeView.tsx +261 -0
  90. package/dist/components/DaeryuntalkBackup/NavigationFooter.d.ts +11 -0
  91. package/dist/components/DaeryuntalkBackup/NavigationFooter.jsx +44 -0
  92. package/dist/components/DaeryuntalkBackup/NavigationFooter.tsx +98 -0
  93. package/dist/components/DaeryuntalkBackup/NoticeMessage.d.ts +7 -0
  94. package/dist/components/DaeryuntalkBackup/NoticeMessage.jsx +40 -0
  95. package/dist/components/DaeryuntalkBackup/NoticeMessage.tsx +60 -0
  96. package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.d.ts +6 -0
  97. package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.jsx +17 -0
  98. package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.tsx +28 -0
  99. package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.d.ts +20 -0
  100. package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.jsx +130 -0
  101. package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.tsx +181 -0
  102. package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.d.ts +23 -0
  103. package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.jsx +40 -0
  104. package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.tsx +70 -0
  105. package/dist/components/DaeryuntalkBackup/Toast/Toast.d.ts +11 -0
  106. package/dist/components/DaeryuntalkBackup/Toast/Toast.jsx +64 -0
  107. package/dist/components/DaeryuntalkBackup/Toast/Toast.tsx +98 -0
  108. package/dist/components/DaeryuntalkBackup/Toast/ToastRender.d.ts +1 -0
  109. package/dist/components/DaeryuntalkBackup/Toast/ToastRender.jsx +22 -0
  110. package/dist/components/DaeryuntalkBackup/Toast/ToastRender.tsx +30 -0
  111. package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.d.ts +9 -0
  112. package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.jsx +98 -0
  113. package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.tsx +138 -0
  114. package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.d.ts +18 -0
  115. package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.jsx +104 -0
  116. package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.tsx +182 -0
  117. package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.d.ts +24 -0
  118. package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.jsx +141 -0
  119. package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.tsx +278 -0
  120. package/dist/components/DaeryuntalkBackup/ViewportHandler.d.ts +6 -0
  121. package/dist/components/DaeryuntalkBackup/ViewportHandler.jsx +25 -0
  122. package/dist/components/DaeryuntalkBackup/ViewportHandler.tsx +32 -0
  123. package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.d.ts +177 -0
  124. package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.js +801 -0
  125. package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.ts +1097 -0
  126. package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.d.ts +131 -0
  127. package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.js +1 -0
  128. package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.ts +159 -0
  129. package/dist/components/DaeryuntalkBackup/_api/index.d.ts +6 -0
  130. package/dist/components/DaeryuntalkBackup/_api/index.js +6 -0
  131. package/dist/components/DaeryuntalkBackup/_api/index.ts +7 -0
  132. package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.d.ts +5 -0
  133. package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.js +9 -0
  134. package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.ts +9 -0
  135. package/dist/components/DaeryuntalkBackup/_enums/ask-status.d.ts +13 -0
  136. package/dist/components/DaeryuntalkBackup/_enums/ask-status.js +25 -0
  137. package/dist/components/DaeryuntalkBackup/_enums/ask-status.ts +26 -0
  138. package/dist/components/DaeryuntalkBackup/_enums/error.d.ts +109 -0
  139. package/dist/components/DaeryuntalkBackup/_enums/error.js +254 -0
  140. package/dist/components/DaeryuntalkBackup/_enums/error.ts +289 -0
  141. package/dist/components/DaeryuntalkBackup/_enums/message_type.d.ts +6 -0
  142. package/dist/components/DaeryuntalkBackup/_enums/message_type.js +13 -0
  143. package/dist/components/DaeryuntalkBackup/_enums/message_type.ts +13 -0
  144. package/dist/components/DaeryuntalkBackup/_enums/sender_type.d.ts +8 -0
  145. package/dist/components/DaeryuntalkBackup/_enums/sender_type.js +16 -0
  146. package/dist/components/DaeryuntalkBackup/_enums/sender_type.ts +16 -0
  147. package/dist/components/DaeryuntalkBackup/_enums/socket_type.d.ts +34 -0
  148. package/dist/components/DaeryuntalkBackup/_enums/socket_type.js +46 -0
  149. package/dist/components/DaeryuntalkBackup/_enums/socket_type.ts +56 -0
  150. package/dist/components/DaeryuntalkBackup/_enums/template.d.ts +32 -0
  151. package/dist/components/DaeryuntalkBackup/_enums/template.js +76 -0
  152. package/dist/components/DaeryuntalkBackup/_enums/template.ts +81 -0
  153. package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.d.ts +33 -0
  154. package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.js +66 -0
  155. package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.ts +71 -0
  156. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.d.ts +48 -0
  157. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.js +465 -0
  158. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.ts +595 -0
  159. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.d.ts +1 -0
  160. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.jsx +15 -0
  161. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.tsx +17 -0
  162. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.d.ts +24 -0
  163. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.js +112 -0
  164. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.ts +144 -0
  165. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.d.ts +44 -0
  166. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.js +534 -0
  167. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.ts +706 -0
  168. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.d.ts +8 -0
  169. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.js +18 -0
  170. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.ts +23 -0
  171. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.d.ts +9 -0
  172. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.js +109 -0
  173. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.ts +121 -0
  174. package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.d.ts +12 -0
  175. package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.js +48 -0
  176. package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.ts +73 -0
  177. package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.d.ts +7 -0
  178. package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.js +42 -0
  179. package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.ts +52 -0
  180. package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.d.ts +6 -0
  181. package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.js +20 -0
  182. package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.ts +30 -0
  183. package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.d.ts +2 -0
  184. package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.js +26 -0
  185. package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.ts +43 -0
  186. package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.d.ts +27 -0
  187. package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.js +80 -0
  188. package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.ts +101 -0
  189. package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.d.ts +18 -0
  190. package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.js +66 -0
  191. package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.ts +75 -0
  192. package/dist/components/DaeryuntalkBackup/_lib/index.d.ts +7 -0
  193. package/dist/components/DaeryuntalkBackup/_lib/index.js +103 -0
  194. package/dist/components/DaeryuntalkBackup/_lib/index.ts +136 -0
  195. package/dist/components/DaeryuntalkBackup/_lib/utils.d.ts +17 -0
  196. package/dist/components/DaeryuntalkBackup/_lib/utils.js +94 -0
  197. package/dist/components/DaeryuntalkBackup/_lib/utils.ts +119 -0
  198. package/dist/components/DaeryuntalkBackup/_types/message.d.ts +92 -0
  199. package/dist/components/DaeryuntalkBackup/_types/message.js +25 -0
  200. package/dist/components/DaeryuntalkBackup/_types/message.ts +156 -0
  201. package/dist/components/DaeryuntalkBackup/_types/message_object.d.ts +17 -0
  202. package/dist/components/DaeryuntalkBackup/_types/message_object.js +1 -0
  203. package/dist/components/DaeryuntalkBackup/_types/message_object.ts +18 -0
  204. package/dist/components/DaeryuntalkBackup/_types/socket/workflow.d.ts +15 -0
  205. package/dist/components/DaeryuntalkBackup/_types/socket/workflow.js +1 -0
  206. package/dist/components/DaeryuntalkBackup/_types/socket/workflow.ts +15 -0
  207. package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.d.ts +6 -0
  208. package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.jsx +5 -0
  209. package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.tsx +15 -0
  210. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.d.ts +10 -0
  211. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.jsx +12 -0
  212. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.tsx +29 -0
  213. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.d.ts +10 -0
  214. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.jsx +12 -0
  215. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.tsx +29 -0
  216. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.d.ts +10 -0
  217. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.jsx +12 -0
  218. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.tsx +29 -0
  219. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.d.ts +10 -0
  220. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.jsx +12 -0
  221. package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.tsx +29 -0
  222. package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.d.ts +8 -0
  223. package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.jsx +15 -0
  224. package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.tsx +38 -0
  225. package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.d.ts +8 -0
  226. package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.jsx +21 -0
  227. package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.tsx +50 -0
  228. package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.d.ts +12 -0
  229. package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.jsx +9 -0
  230. package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.tsx +39 -0
  231. package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.d.ts +13 -0
  232. package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.jsx +10 -0
  233. package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.tsx +43 -0
  234. package/dist/components/DaeryuntalkBackup/index.d.ts +8 -0
  235. package/dist/components/DaeryuntalkBackup/index.jsx +190 -0
  236. package/dist/components/DaeryuntalkBackup/index.tsx +261 -0
  237. package/dist/components/banner/TopBanner.jsx +2 -2
  238. package/dist/components/banner/TopBanner.tsx +4 -2
  239. package/dist/styles/globals.css +5 -0
  240. package/dist/tsconfig.tsbuildinfo +1 -1
  241. package/package.json +1 -1
@@ -0,0 +1,147 @@
1
+ 'use client';
2
+ import React, { useEffect } from 'react';
3
+ import { useDaeryuntalk } from './DaeryuntalkContext';
4
+ import ChatConversation from './ChatConversation';
5
+ import HistoryView from './HistoryView';
6
+ import { useChatSocketState } from './_hooks/view/useChatSocketState';
7
+ import ToastRenderer from './Toast/ToastRender';
8
+ import { useHistoryView } from './_hooks/view/useHistoryView';
9
+ import FixedErrorBox from './FixedErrorBox';
10
+ const ChatHomeView = ({ hashValue, onClose, isMobile, isHash, isMobileSafari = false, androidViewportHeight = 0, viewState, setViewState }) => {
11
+ const { isUserExpired, isConnected, isAuthenticated, historyList, ageCheckStatus,
12
+ // inquiryMainData,
13
+ chatInquiryNumber,
14
+ // startChat,
15
+ // retryInitData,
16
+ setIsTyping,
17
+ // setPreviewState,
18
+ // preViewState,
19
+ initialLoading } = useDaeryuntalk();
20
+ // 소켓 이벤트
21
+ const { sendInquiryJoined, sendHeartbeat, sendInquiryWatching, sendInquiryLeft, sendHistoryEntered } = useDaeryuntalk();
22
+ // 홈
23
+ // const { retryInquiryMain } = useDaeryuntalk();
24
+ // 히스토리
25
+ const { startSelectedChat, attendRoomByHistory, createNewChat, goRequestPhone, goGetHistoryList, goHistoryPhoneAuth } = useDaeryuntalk();
26
+ // 소켓 클라 -> 서버 관리
27
+ useChatSocketState(chatInquiryNumber, viewState, sendInquiryWatching, sendInquiryJoined, sendHeartbeat, sendInquiryLeft, isConnected, isAuthenticated, sendHistoryEntered, historyList);
28
+ // 홈 뷰 훅스
29
+ // const { handleStartChat, handleHashStartChat } = useHomeView({
30
+ // setIsLoading,
31
+ // setViewState,
32
+ // retryInquiryMain,
33
+ // inquiryMainData: inquiryMainData ?? null,
34
+ // startChat,
35
+ // preViewState,
36
+ // viewState,
37
+ // setPreviewState
38
+ // });
39
+ // 히스토리 뷰 hooks
40
+ const { handleChatHistoryClick, handleNewStartChat, handleHistoryClick, handleGoRequestPhone, handleGoHistoryPhoneAuth, handleBackClick } = useHistoryView({
41
+ attendRoomByHistory,
42
+ startSelectedChat,
43
+ setViewState,
44
+ // setIsLoading,
45
+ createNewChat,
46
+ goRequestPhone,
47
+ goHistoryPhoneAuth,
48
+ chatInquiryNumber
49
+ // setPreviewState
50
+ });
51
+ // useEffect(() => {
52
+ // if (hashValue && isConnected && inquiryMainData && inquiryMainData.channel_number) {
53
+ // handleHashStartChat();
54
+ // } else {
55
+ // }
56
+ // }, [hashValue, isConnected, inquiryMainData]);
57
+ // viewState 진입
58
+ useEffect(() => {
59
+ if (isAuthenticated && viewState === 'history') {
60
+ goGetHistoryList({});
61
+ }
62
+ if (isAuthenticated && viewState === 'conversation') {
63
+ setIsTyping(false);
64
+ }
65
+ }, [viewState, isAuthenticated]);
66
+ // useEffect(() => {
67
+ // if (inquiryMainData !== null) {
68
+ // if (!inquiryMainData?.channel_number) {
69
+ // retryInitData();
70
+ // }
71
+ // }
72
+ // }, [inquiryMainData, inquiryMainData?.channel_number]);
73
+ const renderWithNavigation = (content, activeView) => {
74
+ return (
75
+ //
76
+ <main className={`
77
+ relative flex justify-end bg-white
78
+ ${isMobile ? 'h-full w-full' : 'h-[100dvh] xs:h-auto xs:rounded-[30px] '}
79
+ `} style={{
80
+ boxShadow: '0px 0px 20px 0px #00000040'
81
+ }}>
82
+ <div className={`
83
+ relative overflow-hidden
84
+ ${isMobile
85
+ ? `h-full w-screen rounded-[0px]`
86
+ : `
87
+ ${isHash
88
+ ? `
89
+ h-[100dvh] w-full rounded-[0px]
90
+ xs:max-h-[690px] xs:w-[390px] xs:rounded-[30px]
91
+ xs:shadow-[0px_12px_60px_5px_rgba(0,0,0,0.3)]
92
+ `
93
+ : `
94
+ w-screen rounded-[0px]
95
+ xs:w-[390px] xs:rounded-[30px]
96
+ `}
97
+ `}
98
+
99
+ `}>
100
+ <div className=' flex h-full flex-col justify-between border-[0px] border-solid xs:justify-start xs:rounded-[30px]'>
101
+ <div className={`
102
+ no-scrollbar ${isMobile ? 'h-full' : ` overflow-hidden xs:overflow-auto `}
103
+ `}>
104
+ {content}
105
+ </div>
106
+ {/* 얘는 아래 64px로 고정 */}
107
+ {/* <div className={`!z-[50]`}>
108
+ <NavigationFooter
109
+ activeView={activeView}
110
+ onHomeClick={handleHomeClick}
111
+ onHistoryClick={handleHistoryClick}
112
+ historyList={historyList}
113
+ isAuthenticated={isAuthenticated}
114
+ />
115
+ </div> */}
116
+ </div>
117
+ </div>
118
+ {/*얘는 abolute라서 고려 X*/}
119
+ <ToastRenderer />
120
+ <FixedErrorBox isError={isUserExpired || (isConnected === null ? false : !isConnected)} message={isUserExpired
121
+ ? `다른 기기에서 채팅 중입니다.\n새로고침 후 이 기기에서 다시 이용할 수 있습니다.`
122
+ : undefined}/>
123
+ </main>);
124
+ };
125
+ if (viewState === 'history') {
126
+ return renderWithNavigation(<HistoryView onBackClick={handleBackClick} onChatHistoryClick={handleChatHistoryClick} onNewChatClick={handleNewStartChat} isAuthenticated={isAuthenticated !== null && isAuthenticated !== void 0 ? isAuthenticated : false} historyLit={historyList !== null && historyList !== void 0 ? historyList : []} goGetHistoryList={goGetHistoryList} isMobile={isMobile} onClose={onClose} isHash={isHash} handleGoRequestPhone={handleGoRequestPhone} handleGoHistoryPhoneAuth={handleGoHistoryPhoneAuth}/>, 'history');
127
+ }
128
+ // 채팅 문의 창
129
+ // if (viewState === 'conversation') {
130
+ return renderWithNavigation(<ChatConversation
131
+ // onBackClick={handleBackToHome}
132
+ isActive={viewState === 'conversation'} initialLoading={initialLoading} onChatNew={handleNewStartChat} isMobile={isMobile} onClose={onClose} isHash={isHash} viewState={viewState} handleHistoryClick={handleHistoryClick} isAuthenticated={isAuthenticated !== null && isAuthenticated !== void 0 ? isAuthenticated : false} historyList={historyList !== null && historyList !== void 0 ? historyList : []} ageCheckStatus={ageCheckStatus} isMobileSafari={isMobileSafari} androidViewportHeight={androidViewportHeight}/>, 'conversation');
133
+ // }
134
+ // // 홈
135
+ // return renderWithNavigation(
136
+ // <HomeView
137
+ // inquiryMainData={inquiryMainData ?? null}
138
+ // isLoading={isLoading}
139
+ // handleStartChat={handleStartChat}
140
+ // isMobile={isMobile}
141
+ // onClose={onClose}
142
+ // isHash={isHash}
143
+ // />,
144
+ // 'home'
145
+ // );
146
+ };
147
+ export default ChatHomeView;
@@ -0,0 +1,262 @@
1
+ 'use client';
2
+ import React, { Dispatch, SetStateAction, useEffect, useState } from 'react';
3
+ import { useDaeryuntalk } from './DaeryuntalkContext';
4
+ import ChatConversation from './ChatConversation';
5
+ import HistoryView from './HistoryView';
6
+ import { useChatSocketState } from './_hooks/view/useChatSocketState';
7
+ import ToastRenderer from './Toast/ToastRender';
8
+ import { useHistoryView } from './_hooks/view/useHistoryView';
9
+ import FixedErrorBox from './FixedErrorBox';
10
+
11
+ export type ViewState = 'conversation' | 'history';
12
+
13
+ type ChatHomeViewProps = {
14
+ hashValue: string | null;
15
+ isMobile: boolean;
16
+ isHash: boolean;
17
+ onClose: () => void;
18
+ androidViewportHeight?: number;
19
+ isMobileSafari?: boolean;
20
+ viewState:ViewState
21
+ setViewState:Dispatch<SetStateAction<ViewState>>;
22
+ };
23
+ const ChatHomeView: React.FC<ChatHomeViewProps> = ({
24
+ hashValue,
25
+ onClose,
26
+ isMobile,
27
+ isHash,
28
+ isMobileSafari = false,
29
+ androidViewportHeight = 0,
30
+ viewState,
31
+ setViewState
32
+ }) => {
33
+
34
+ const {
35
+ isUserExpired,
36
+ isConnected,
37
+ isAuthenticated,
38
+ historyList,
39
+ ageCheckStatus,
40
+ // inquiryMainData,
41
+ chatInquiryNumber,
42
+ // startChat,
43
+ // retryInitData,
44
+ setIsTyping,
45
+ // setPreviewState,
46
+ // preViewState,
47
+ initialLoading
48
+ } = useDaeryuntalk();
49
+
50
+ // 소켓 이벤트
51
+ const { sendInquiryJoined, sendHeartbeat, sendInquiryWatching, sendInquiryLeft, sendHistoryEntered } =
52
+ useDaeryuntalk();
53
+ // 홈
54
+ // const { retryInquiryMain } = useDaeryuntalk();
55
+ // 히스토리
56
+ const {
57
+ startSelectedChat,
58
+ attendRoomByHistory,
59
+ createNewChat,
60
+ goRequestPhone,
61
+ goGetHistoryList,
62
+ goHistoryPhoneAuth
63
+ } = useDaeryuntalk();
64
+
65
+ // 소켓 클라 -> 서버 관리
66
+ useChatSocketState(
67
+ chatInquiryNumber,
68
+ viewState,
69
+ sendInquiryWatching,
70
+ sendInquiryJoined,
71
+ sendHeartbeat,
72
+ sendInquiryLeft,
73
+ isConnected,
74
+ isAuthenticated,
75
+ sendHistoryEntered,
76
+ historyList
77
+ );
78
+
79
+ // 홈 뷰 훅스
80
+ // const { handleStartChat, handleHashStartChat } = useHomeView({
81
+ // setIsLoading,
82
+ // setViewState,
83
+ // retryInquiryMain,
84
+ // inquiryMainData: inquiryMainData ?? null,
85
+ // startChat,
86
+ // preViewState,
87
+ // viewState,
88
+ // setPreviewState
89
+ // });
90
+
91
+ // 히스토리 뷰 hooks
92
+ const {
93
+ handleChatHistoryClick,
94
+ handleNewStartChat,
95
+ handleHistoryClick,
96
+ handleGoRequestPhone,
97
+ handleGoHistoryPhoneAuth,
98
+ handleBackClick
99
+ } = useHistoryView({
100
+ attendRoomByHistory,
101
+ startSelectedChat,
102
+ setViewState,
103
+ // setIsLoading,
104
+ createNewChat,
105
+ goRequestPhone,
106
+ goHistoryPhoneAuth,
107
+ chatInquiryNumber
108
+ // setPreviewState
109
+ });
110
+
111
+ // useEffect(() => {
112
+ // if (hashValue && isConnected && inquiryMainData && inquiryMainData.channel_number) {
113
+ // handleHashStartChat();
114
+ // } else {
115
+ // }
116
+ // }, [hashValue, isConnected, inquiryMainData]);
117
+
118
+ // viewState 진입
119
+ useEffect(() => {
120
+ if (isAuthenticated && viewState === 'history') {
121
+ goGetHistoryList({});
122
+ }
123
+ if (isAuthenticated && viewState === 'conversation') {
124
+ setIsTyping(false);
125
+ }
126
+ }, [viewState, isAuthenticated]);
127
+
128
+ // useEffect(() => {
129
+ // if (inquiryMainData !== null) {
130
+ // if (!inquiryMainData?.channel_number) {
131
+ // retryInitData();
132
+ // }
133
+ // }
134
+ // }, [inquiryMainData, inquiryMainData?.channel_number]);
135
+
136
+ const renderWithNavigation = (content: React.ReactNode, activeView: 'history' | 'conversation') => {
137
+ return (
138
+ //
139
+ <main
140
+ className={`
141
+ relative flex justify-end bg-white
142
+ ${isMobile ? 'h-full w-full' : 'h-[100dvh] xs:h-auto xs:rounded-[30px] '}
143
+ `}
144
+ style={{
145
+ boxShadow: '0px 0px 20px 0px #00000040'
146
+ }}
147
+ >
148
+ <div
149
+ className={`
150
+ relative overflow-hidden
151
+ ${
152
+ isMobile
153
+ ? `h-full w-screen rounded-[0px]`
154
+ : `
155
+ ${
156
+ isHash
157
+ ? `
158
+ h-[100dvh] w-full rounded-[0px]
159
+ xs:max-h-[690px] xs:w-[390px] xs:rounded-[30px]
160
+ xs:shadow-[0px_12px_60px_5px_rgba(0,0,0,0.3)]
161
+ `
162
+ : `
163
+ w-screen rounded-[0px]
164
+ xs:w-[390px] xs:rounded-[30px]
165
+ `
166
+ }
167
+ `
168
+ }
169
+
170
+ `}
171
+ >
172
+ <div
173
+ className=' flex h-full flex-col justify-between border-[0px] border-solid xs:justify-start xs:rounded-[30px]'>
174
+ <div
175
+ className={`
176
+ no-scrollbar ${isMobile ? 'h-full' : ` overflow-hidden xs:overflow-auto `}
177
+ `}
178
+ >
179
+ {content}
180
+ </div>
181
+ {/* 얘는 아래 64px로 고정 */}
182
+ {/* <div className={`!z-[50]`}>
183
+ <NavigationFooter
184
+ activeView={activeView}
185
+ onHomeClick={handleHomeClick}
186
+ onHistoryClick={handleHistoryClick}
187
+ historyList={historyList}
188
+ isAuthenticated={isAuthenticated}
189
+ />
190
+ </div> */}
191
+ </div>
192
+ </div>
193
+ {/*얘는 abolute라서 고려 X*/}
194
+ <ToastRenderer />
195
+ <FixedErrorBox
196
+ isError={isUserExpired || (isConnected === null ? false : !isConnected)}
197
+ message={
198
+ isUserExpired
199
+ ? `다른 기기에서 채팅 중입니다.\n새로고침 후 이 기기에서 다시 이용할 수 있습니다.`
200
+ : undefined
201
+ }
202
+ />
203
+ </main>
204
+ );
205
+ };
206
+
207
+ if (viewState === 'history') {
208
+ return renderWithNavigation(
209
+ <HistoryView
210
+ onBackClick={handleBackClick}
211
+ onChatHistoryClick={handleChatHistoryClick}
212
+ onNewChatClick={handleNewStartChat}
213
+ isAuthenticated={isAuthenticated ?? false}
214
+ historyLit={historyList ?? []}
215
+ goGetHistoryList={goGetHistoryList}
216
+ isMobile={isMobile}
217
+ onClose={onClose}
218
+ isHash={isHash}
219
+ handleGoRequestPhone={handleGoRequestPhone}
220
+ handleGoHistoryPhoneAuth={handleGoHistoryPhoneAuth}
221
+ />,
222
+ 'history'
223
+ );
224
+ }
225
+ // 채팅 문의 창
226
+ // if (viewState === 'conversation') {
227
+ return renderWithNavigation(
228
+ <ChatConversation
229
+ // onBackClick={handleBackToHome}
230
+ isActive={viewState === 'conversation'}
231
+ initialLoading={initialLoading}
232
+ onChatNew={handleNewStartChat}
233
+ isMobile={isMobile}
234
+ onClose={onClose}
235
+ isHash={isHash}
236
+ viewState={viewState}
237
+ handleHistoryClick={handleHistoryClick}
238
+ isAuthenticated={isAuthenticated ?? false}
239
+ historyList={historyList ?? []}
240
+ ageCheckStatus={ageCheckStatus}
241
+ isMobileSafari={isMobileSafari}
242
+ androidViewportHeight={androidViewportHeight}
243
+ />,
244
+ 'conversation'
245
+ );
246
+ // }
247
+
248
+ // // 홈
249
+ // return renderWithNavigation(
250
+ // <HomeView
251
+ // inquiryMainData={inquiryMainData ?? null}
252
+ // isLoading={isLoading}
253
+ // handleStartChat={handleStartChat}
254
+ // isMobile={isMobile}
255
+ // onClose={onClose}
256
+ // isHash={isHash}
257
+ // />,
258
+ // 'home'
259
+ // );
260
+ };
261
+
262
+ export default ChatHomeView;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface props {
3
+ isMobile: boolean;
4
+ isNotAgeCheck: boolean;
5
+ chatInquiryNumber: string;
6
+ }
7
+ declare const ChatInput: React.FC<props>;
8
+ export default ChatInput;
@@ -0,0 +1,64 @@
1
+ 'use client';
2
+ import React, { useMemo, useRef, useState } from 'react';
3
+ import { useDaeryuntalk } from './DaeryuntalkContext';
4
+ import Tiptap from './Tiptap/Tiptap';
5
+ import { stripHtmlTags } from './_lib/utils';
6
+ import DisabledInput from './Tiptap/DisabledInput';
7
+ import Image from 'next/image';
8
+ const ChatInput = ({ isMobile, isNotAgeCheck, chatInquiryNumber }) => {
9
+ const s3Url = process.env.NEXT_PUBLIC_S3_URL;
10
+ const SendIcon = `${s3Url}/daeryuntalk/send.svg`;
11
+ const [message, setMessage] = useState('');
12
+ const { sendMessage, isLoading } = useDaeryuntalk();
13
+ const tiptapRef = useRef(null);
14
+ const isEmpty = useMemo(() => {
15
+ return !stripHtmlTags(message);
16
+ }, [message]);
17
+ // useEffect(() => {
18
+ // setIsEmpty(!stripHtmlTags(message));
19
+ // }, [message]);
20
+ const handleSubmit = (e) => {
21
+ var _a, _b, _c;
22
+ e.preventDefault();
23
+ if (message.trim() && !isLoading) {
24
+ const html = ((_a = tiptapRef.current) === null || _a === void 0 ? void 0 : _a.getHTML()) || ''; // HTML 형태
25
+ const json = ((_b = tiptapRef.current) === null || _b === void 0 ? void 0 : _b.getJSON()) || {}; // JSON 형태
26
+ setMessage('');
27
+ sendMessage(html, json);
28
+ (_c = tiptapRef.current) === null || _c === void 0 ? void 0 : _c.clearContent(); // 입력창 초기화
29
+ }
30
+ };
31
+ const handleEnter = () => {
32
+ var _a, _b, _c;
33
+ if (message.trim() && !isLoading) {
34
+ const html = ((_a = tiptapRef.current) === null || _a === void 0 ? void 0 : _a.getHTML()) || ''; // HTML 형태
35
+ const json = ((_b = tiptapRef.current) === null || _b === void 0 ? void 0 : _b.getJSON()) || {}; // JSON 형태
36
+ sendMessage(html, json);
37
+ setMessage('');
38
+ (_c = tiptapRef.current) === null || _c === void 0 ? void 0 : _c.clearContent(); // 입력창 초기화
39
+ }
40
+ };
41
+ return (<form onSubmit={handleSubmit} className="flex w-full items-center gap-2">
42
+ <div className={`${isNotAgeCheck ? 'bg-drTalkGrayscale4' : 'bg-drTalkGrayscale5'} flex flex-1 justify-center gap-[10px] rounded-[10px] border-[1px] border-solid border-drTalkGrayscale5 p-[4px]`}>
43
+ {/* 최초 높이 44 */}
44
+ {/*내용이 2줄 이상되면 입력창 높이도 키워져야합니다. 최대한 4줄까지만 보이도록 해주시고, 그 이상은 스크롤 될 수 있도록 해주시는 게 좋을 것 같습니다. max height 값을 72로 지정 부탁드립니다*/}
45
+
46
+ {isNotAgeCheck ? (<DisabledInput placeholder="만 14세 이상 확인 후 이용 가능합니다."/>) : (<Tiptap key={`${chatInquiryNumber}-${isNotAgeCheck}`} ref={tiptapRef} onChange={setMessage} onEnterKeyPress={handleEnter} placeholder={'상담내용을 입력해 주세요.'} contentClassName="!outline-none !border-[0px] !pt-[4px] !pl-[4px]" isMobile={isMobile}/>)}
47
+
48
+ <div className={`flex flex-col justify-end`}>
49
+ <button type="submit" className={`flex h-10 w-10 items-center justify-center rounded-[8px] bg-drTalkBtnActive2 text-white
50
+ ${isLoading || isNotAgeCheck
51
+ ? 'cursor-not-allowed opacity-50'
52
+ : isEmpty
53
+ ? ' bg-drTalkBtnActive2 '
54
+ : ' bg-drTalkCrimson '}`} disabled={isLoading || isNotAgeCheck}>
55
+ <div className="flex h-9 w-9 items-center justify-center">
56
+ <Image src={SendIcon} alt="전송" width={24} height={24}/>
57
+ {/* <SendIcon width={24} height={24} /> */}
58
+ </div>
59
+ </button>
60
+ </div>
61
+ </div>
62
+ </form>);
63
+ };
64
+ export default ChatInput;
@@ -0,0 +1,98 @@
1
+ 'use client';
2
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
3
+ import { useDaeryuntalk } from './DaeryuntalkContext';
4
+ import Tiptap, { TiptapEditorRef } from './Tiptap/Tiptap';
5
+ import { stripHtmlTags } from './_lib/utils';
6
+ import DisabledInput from './Tiptap/DisabledInput';
7
+ import Image from 'next/image';
8
+
9
+ // 이미지
10
+ // import SendIcon from '../../asset/images/daeryuntalk/send.svg';
11
+
12
+ interface props {
13
+ isMobile: boolean;
14
+ isNotAgeCheck: boolean;
15
+ chatInquiryNumber: string;
16
+ }
17
+
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`;
21
+ const [message, setMessage] = useState('');
22
+ const { sendMessage, isLoading } = useDaeryuntalk();
23
+ const tiptapRef = useRef<TiptapEditorRef | null>(null);
24
+ const isEmpty = useMemo(() => {
25
+ return !stripHtmlTags(message);
26
+ }, [message]);
27
+
28
+ // useEffect(() => {
29
+ // setIsEmpty(!stripHtmlTags(message));
30
+ // }, [message]);
31
+ const handleSubmit = (e: React.FormEvent) => {
32
+ e.preventDefault();
33
+ if (message.trim() && !isLoading) {
34
+ const html = tiptapRef.current?.getHTML() || ''; // HTML 형태
35
+ const json = tiptapRef.current?.getJSON() || {}; // JSON 형태
36
+ setMessage('');
37
+ sendMessage(html, json);
38
+ tiptapRef.current?.clearContent(); // 입력창 초기화
39
+ }
40
+ };
41
+
42
+ const handleEnter = () => {
43
+ if (message.trim() && !isLoading) {
44
+ const html = tiptapRef.current?.getHTML() || ''; // HTML 형태
45
+ const json = tiptapRef.current?.getJSON() || {}; // JSON 형태
46
+ sendMessage(html, json);
47
+ setMessage('');
48
+ tiptapRef.current?.clearContent(); // 입력창 초기화
49
+ }
50
+ };
51
+
52
+ return (
53
+ <form onSubmit={handleSubmit} className="flex w-full items-center gap-2">
54
+ <div
55
+ className={`${isNotAgeCheck ? 'bg-drTalkGrayscale4' : 'bg-drTalkGrayscale5'} flex flex-1 justify-center gap-[10px] rounded-[10px] border-[1px] border-solid border-drTalkGrayscale5 p-[4px]`}
56
+ >
57
+ {/* 최초 높이 44 */}
58
+ {/*내용이 2줄 이상되면 입력창 높이도 키워져야합니다. 최대한 4줄까지만 보이도록 해주시고, 그 이상은 스크롤 될 수 있도록 해주시는 게 좋을 것 같습니다. max height 값을 72로 지정 부탁드립니다*/}
59
+
60
+ {isNotAgeCheck ? (
61
+ <DisabledInput placeholder="만 14세 이상 확인 후 이용 가능합니다." />
62
+ ) : (
63
+ <Tiptap
64
+ key={`${chatInquiryNumber}-${isNotAgeCheck}`}
65
+ ref={tiptapRef}
66
+ onChange={setMessage}
67
+ onEnterKeyPress={handleEnter}
68
+ placeholder={'상담내용을 입력해 주세요.'}
69
+ contentClassName="!outline-none !border-[0px] !pt-[4px] !pl-[4px]"
70
+ isMobile={isMobile}
71
+ />
72
+ )}
73
+
74
+ <div className={`flex flex-col justify-end`}>
75
+ <button
76
+ type="submit"
77
+ className={`flex h-10 w-10 items-center justify-center rounded-[8px] bg-drTalkBtnActive2 text-white
78
+ ${
79
+ isLoading || isNotAgeCheck
80
+ ? 'cursor-not-allowed opacity-50'
81
+ : isEmpty
82
+ ? ' bg-drTalkBtnActive2 '
83
+ : ' bg-drTalkCrimson '
84
+ }`}
85
+ disabled={isLoading || isNotAgeCheck}
86
+ >
87
+ <div className="flex h-9 w-9 items-center justify-center">
88
+ <Image src={SendIcon} alt="전송" width={24} height={24} />
89
+ {/* <SendIcon width={24} height={24} /> */}
90
+ </div>
91
+ </button>
92
+ </div>
93
+ </div>
94
+ </form>
95
+ );
96
+ };
97
+
98
+ export default ChatInput;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface AgeCheckBoxProps {
3
+ onAgree: () => void;
4
+ }
5
+ declare const AgeCheckBox: ({ onAgree }: AgeCheckBoxProps) => React.JSX.Element;
6
+ export default AgeCheckBox;
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+ import React, { useState } from 'react';
3
+ import CheckBox2 from '../_ui/checkboxs/CheckBox2';
4
+ import Button4 from '../_ui/buttons/Button4';
5
+ const AgeCheckBox = ({ onAgree }) => {
6
+ const [checked, setChecked] = useState(false);
7
+ const onChange = (e) => {
8
+ setChecked(e.target.checked);
9
+ };
10
+ return (<div className={`z-10 h-[42px] w-full px-[20px] py-[8px]`}>
11
+ <div className={`flex items-center justify-between`}>
12
+ <CheckBox2 title={'(필수)만 14세 이상입니다.'} checked={checked} onChange={onChange}/>
13
+ <Button4 onClick={onAgree} isDisabled={!checked} className={`min-w-[18px]`}>
14
+ 동의
15
+ </Button4>
16
+ </div>
17
+ </div>);
18
+ };
19
+ export default AgeCheckBox;
@@ -0,0 +1,27 @@
1
+ 'use client';
2
+ import React, { useState } from 'react';
3
+ import CheckBox2 from '../_ui/checkboxs/CheckBox2';
4
+ import Button4 from '../_ui/buttons/Button4';
5
+
6
+ interface AgeCheckBoxProps {
7
+ onAgree: () => void;
8
+ }
9
+
10
+ const AgeCheckBox = ({ onAgree }: AgeCheckBoxProps) => {
11
+ const [checked, setChecked] = useState(false);
12
+ const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
13
+ setChecked(e.target.checked);
14
+ };
15
+ return (
16
+ <div className={`z-10 h-[42px] w-full px-[20px] py-[8px]`}>
17
+ <div className={`flex items-center justify-between`}>
18
+ <CheckBox2 title={'(필수)만 14세 이상입니다.'} checked={checked} onChange={onChange} />
19
+ <Button4 onClick={onAgree} isDisabled={!checked} className={`min-w-[18px]`}>
20
+ 동의
21
+ </Button4>
22
+ </div>
23
+ </div>
24
+ );
25
+ };
26
+
27
+ export default AgeCheckBox;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { Message } from '../_types/message';
3
+ interface props {
4
+ message: Message;
5
+ isOperator: boolean;
6
+ isHovered: boolean;
7
+ time: string;
8
+ }
9
+ declare const ChatFile: ({ message, isOperator, isHovered, time }: props) => React.JSX.Element | undefined;
10
+ export default ChatFile;