@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.
- package/dist/components/Daeryuntalk/ChatButton.jsx +1 -1
- package/dist/components/Daeryuntalk/ChatButton.tsx +1 -1
- package/dist/components/Daeryuntalk/ChatWidget.d.ts +1 -0
- package/dist/components/Daeryuntalk/ChatWidget.jsx +114 -31
- package/dist/components/Daeryuntalk/ChatWidget.tsx +120 -37
- package/dist/components/Daeryuntalk/Viewer/TbPcViewer.tsx +0 -9
- package/dist/components/Daeryuntalk/index.jsx +17 -1
- package/dist/components/Daeryuntalk/index.tsx +26 -2
- package/dist/components/DaeryuntalkBackup/ChatButton.d.ts +11 -0
- package/dist/components/DaeryuntalkBackup/ChatButton.jsx +123 -0
- package/dist/components/DaeryuntalkBackup/ChatButton.tsx +157 -0
- package/dist/components/DaeryuntalkBackup/ChatConversation.d.ts +21 -0
- package/dist/components/DaeryuntalkBackup/ChatConversation.jsx +259 -0
- package/dist/components/DaeryuntalkBackup/ChatConversation.tsx +390 -0
- package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.d.ts +16 -0
- package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.jsx +50 -0
- package/dist/components/DaeryuntalkBackup/ChatConversationItem/ChatConversationHeader.tsx +108 -0
- package/dist/components/DaeryuntalkBackup/ChatHomeView.d.ts +14 -0
- package/dist/components/DaeryuntalkBackup/ChatHomeView.jsx +147 -0
- package/dist/components/DaeryuntalkBackup/ChatHomeView.tsx +262 -0
- package/dist/components/DaeryuntalkBackup/ChatInput.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/ChatInput.jsx +64 -0
- package/dist/components/DaeryuntalkBackup/ChatInput.tsx +98 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.jsx +19 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/AgeCheckBox.tsx +27 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.jsx +165 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatFile.tsx +244 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatLoading.tsx +25 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.jsx +100 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatPrivacyAuth.tsx +135 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.jsx +14 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/ChatWrapper.tsx +26 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/RichText.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/RichText.jsx +37 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/RichText.tsx +45 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.jsx +10 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TimeWrapper.tsx +21 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.d.ts +3 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.jsx +34 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/TypingComp.tsx +43 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.jsx +20 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowAuthForm.tsx +32 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.jsx +21 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowClickData.tsx +37 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.jsx +178 -0
- package/dist/components/DaeryuntalkBackup/ChatItem/WorkFlowImg.tsx +233 -0
- package/dist/components/DaeryuntalkBackup/ChatMessage.d.ts +20 -0
- package/dist/components/DaeryuntalkBackup/ChatMessage.jsx +198 -0
- package/dist/components/DaeryuntalkBackup/ChatMessage.tsx +295 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.jsx +39 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/FieldWorkObject.tsx +75 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.jsx +20 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectBack.tsx +39 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.jsx +138 -0
- package/dist/components/DaeryuntalkBackup/ChatObject/ObjectButton.tsx +177 -0
- package/dist/components/DaeryuntalkBackup/ChatWidget.d.ts +13 -0
- package/dist/components/DaeryuntalkBackup/ChatWidget.jsx +154 -0
- package/dist/components/DaeryuntalkBackup/ChatWidget.tsx +221 -0
- package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.d.ts +103 -0
- package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.jsx +207 -0
- package/dist/components/DaeryuntalkBackup/DaeryuntalkContext.tsx +350 -0
- package/dist/components/DaeryuntalkBackup/DateSeparator.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/DateSeparator.jsx +14 -0
- package/dist/components/DaeryuntalkBackup/DateSeparator.tsx +24 -0
- package/dist/components/DaeryuntalkBackup/FixedErrorBox.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/FixedErrorBox.jsx +34 -0
- package/dist/components/DaeryuntalkBackup/FixedErrorBox.tsx +73 -0
- package/dist/components/DaeryuntalkBackup/History/AuthForm.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/History/AuthForm.jsx +157 -0
- package/dist/components/DaeryuntalkBackup/History/AuthForm.tsx +206 -0
- package/dist/components/DaeryuntalkBackup/HistoryView.d.ts +19 -0
- package/dist/components/DaeryuntalkBackup/HistoryView.jsx +94 -0
- package/dist/components/DaeryuntalkBackup/HistoryView.tsx +182 -0
- package/dist/components/DaeryuntalkBackup/HomeView.d.ts +12 -0
- package/dist/components/DaeryuntalkBackup/HomeView.jsx +178 -0
- package/dist/components/DaeryuntalkBackup/HomeView.tsx +261 -0
- package/dist/components/DaeryuntalkBackup/NavigationFooter.d.ts +11 -0
- package/dist/components/DaeryuntalkBackup/NavigationFooter.jsx +44 -0
- package/dist/components/DaeryuntalkBackup/NavigationFooter.tsx +98 -0
- package/dist/components/DaeryuntalkBackup/NoticeMessage.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/NoticeMessage.jsx +40 -0
- package/dist/components/DaeryuntalkBackup/NoticeMessage.tsx +60 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.jsx +17 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/DisabledInput.tsx +28 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.d.ts +20 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.jsx +130 -0
- package/dist/components/DaeryuntalkBackup/Tiptap/Tiptap.tsx +181 -0
- package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.d.ts +23 -0
- package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.jsx +40 -0
- package/dist/components/DaeryuntalkBackup/Toast/DaeryuntalkToastProvider.tsx +70 -0
- package/dist/components/DaeryuntalkBackup/Toast/Toast.d.ts +11 -0
- package/dist/components/DaeryuntalkBackup/Toast/Toast.jsx +64 -0
- package/dist/components/DaeryuntalkBackup/Toast/Toast.tsx +98 -0
- package/dist/components/DaeryuntalkBackup/Toast/ToastRender.d.ts +1 -0
- package/dist/components/DaeryuntalkBackup/Toast/ToastRender.jsx +22 -0
- package/dist/components/DaeryuntalkBackup/Toast/ToastRender.tsx +30 -0
- package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.jsx +98 -0
- package/dist/components/DaeryuntalkBackup/Viewer/ImageViewer.tsx +138 -0
- package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.d.ts +18 -0
- package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.jsx +104 -0
- package/dist/components/DaeryuntalkBackup/Viewer/MobileViewer.tsx +182 -0
- package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.d.ts +24 -0
- package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.jsx +141 -0
- package/dist/components/DaeryuntalkBackup/Viewer/TbPcViewer.tsx +278 -0
- package/dist/components/DaeryuntalkBackup/ViewportHandler.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/ViewportHandler.jsx +25 -0
- package/dist/components/DaeryuntalkBackup/ViewportHandler.tsx +32 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.d.ts +177 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.js +801 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/index.ts +1097 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.d.ts +131 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.js +1 -0
- package/dist/components/DaeryuntalkBackup/_api/daeryuntalk/type/response.ts +159 -0
- package/dist/components/DaeryuntalkBackup/_api/index.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/_api/index.js +6 -0
- package/dist/components/DaeryuntalkBackup/_api/index.ts +7 -0
- package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.d.ts +5 -0
- package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.js +9 -0
- package/dist/components/DaeryuntalkBackup/_enums/ags_check_status.ts +9 -0
- package/dist/components/DaeryuntalkBackup/_enums/ask-status.d.ts +13 -0
- package/dist/components/DaeryuntalkBackup/_enums/ask-status.js +25 -0
- package/dist/components/DaeryuntalkBackup/_enums/ask-status.ts +26 -0
- package/dist/components/DaeryuntalkBackup/_enums/error.d.ts +109 -0
- package/dist/components/DaeryuntalkBackup/_enums/error.js +254 -0
- package/dist/components/DaeryuntalkBackup/_enums/error.ts +289 -0
- package/dist/components/DaeryuntalkBackup/_enums/message_type.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/_enums/message_type.js +13 -0
- package/dist/components/DaeryuntalkBackup/_enums/message_type.ts +13 -0
- package/dist/components/DaeryuntalkBackup/_enums/sender_type.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/_enums/sender_type.js +16 -0
- package/dist/components/DaeryuntalkBackup/_enums/sender_type.ts +16 -0
- package/dist/components/DaeryuntalkBackup/_enums/socket_type.d.ts +34 -0
- package/dist/components/DaeryuntalkBackup/_enums/socket_type.js +46 -0
- package/dist/components/DaeryuntalkBackup/_enums/socket_type.ts +56 -0
- package/dist/components/DaeryuntalkBackup/_enums/template.d.ts +32 -0
- package/dist/components/DaeryuntalkBackup/_enums/template.js +76 -0
- package/dist/components/DaeryuntalkBackup/_enums/template.ts +81 -0
- package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.d.ts +33 -0
- package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.js +66 -0
- package/dist/components/DaeryuntalkBackup/_enums/work_flow_object_expose.ts +71 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.d.ts +48 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.js +465 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useChatHandler.ts +595 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.d.ts +1 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.jsx +15 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useFullURL.tsx +17 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.d.ts +24 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.js +112 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useHistoryHandler.ts +144 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.d.ts +44 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.js +534 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useSocketEventHandler.ts +706 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.js +18 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useViewerHook.ts +23 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.d.ts +9 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.js +109 -0
- package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.ts +121 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.d.ts +12 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.js +48 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useHoverScrollbar.ts +73 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.js +42 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useScrollShadow.ts +52 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.js +20 -0
- package/dist/components/DaeryuntalkBackup/_hooks/useWindowSize.ts +30 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.d.ts +2 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.js +26 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useChatSocketState.ts +43 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.d.ts +27 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.js +80 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHistoryView.ts +101 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.d.ts +18 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.js +66 -0
- package/dist/components/DaeryuntalkBackup/_hooks/view/useHomeView.ts +75 -0
- package/dist/components/DaeryuntalkBackup/_lib/index.d.ts +7 -0
- package/dist/components/DaeryuntalkBackup/_lib/index.js +103 -0
- package/dist/components/DaeryuntalkBackup/_lib/index.ts +136 -0
- package/dist/components/DaeryuntalkBackup/_lib/utils.d.ts +17 -0
- package/dist/components/DaeryuntalkBackup/_lib/utils.js +94 -0
- package/dist/components/DaeryuntalkBackup/_lib/utils.ts +119 -0
- package/dist/components/DaeryuntalkBackup/_types/message.d.ts +92 -0
- package/dist/components/DaeryuntalkBackup/_types/message.js +25 -0
- package/dist/components/DaeryuntalkBackup/_types/message.ts +156 -0
- package/dist/components/DaeryuntalkBackup/_types/message_object.d.ts +17 -0
- package/dist/components/DaeryuntalkBackup/_types/message_object.js +1 -0
- package/dist/components/DaeryuntalkBackup/_types/message_object.ts +18 -0
- package/dist/components/DaeryuntalkBackup/_types/socket/workflow.d.ts +15 -0
- package/dist/components/DaeryuntalkBackup/_types/socket/workflow.js +1 -0
- package/dist/components/DaeryuntalkBackup/_types/socket/workflow.ts +15 -0
- package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.d.ts +6 -0
- package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.jsx +5 -0
- package/dist/components/DaeryuntalkBackup/_ui/ShadowBox.tsx +15 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button1.tsx +29 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button2.tsx +29 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button3.tsx +29 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.d.ts +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.jsx +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/buttons/Button4.tsx +29 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.jsx +15 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox1.tsx +38 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.jsx +21 -0
- package/dist/components/DaeryuntalkBackup/_ui/checkboxs/CheckBox2.tsx +50 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.d.ts +12 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.jsx +9 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input1.tsx +39 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.d.ts +13 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.jsx +10 -0
- package/dist/components/DaeryuntalkBackup/_ui/inputs/Input2.tsx +43 -0
- package/dist/components/DaeryuntalkBackup/index.d.ts +8 -0
- package/dist/components/DaeryuntalkBackup/index.jsx +190 -0
- package/dist/components/DaeryuntalkBackup/index.tsx +261 -0
- package/dist/components/banner/TopBanner.jsx +2 -2
- package/dist/components/banner/TopBanner.tsx +4 -2
- package/dist/styles/globals.css +5 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { useCallback } from 'react';
|
|
11
|
+
import { DEFAULT_API_VERSION, getHistoryList, historyPhoneAuth, requestPhone } from '../../_api';
|
|
12
|
+
import { useDaeryunTalkToast } from '../../Toast/DaeryuntalkToastProvider';
|
|
13
|
+
import { getErrorMessageMap } from '../../_enums/error';
|
|
14
|
+
export const useHistoryHandler = ({ setLoading, setIsAuthenticated, setHistoryList }) => {
|
|
15
|
+
const toast = useDaeryunTalkToast();
|
|
16
|
+
const goRequestPhone = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ name, cellPhoneNumber, version = DEFAULT_API_VERSION }) {
|
|
17
|
+
const consoleName = '점유 인증 번호 요청';
|
|
18
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
|
|
19
|
+
if (!name) {
|
|
20
|
+
toast.error('이름이 없습니다.');
|
|
21
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (!cellPhoneNumber) {
|
|
25
|
+
toast.error('번호가 없습니다.');
|
|
26
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
const response = yield requestPhone({ name, cellPhoneNumber, version });
|
|
31
|
+
// console.log('response', response);
|
|
32
|
+
if (!(response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK')) {
|
|
33
|
+
toast.error(getErrorMessageMap(response), '잠시 후 다시 시도해주세요.');
|
|
34
|
+
}
|
|
35
|
+
return response;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error(`[${consoleName} 실패]:`, error);
|
|
39
|
+
// toast.error(error?.message || '오류가 발생했습니다.');
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
43
|
+
}
|
|
44
|
+
}), []);
|
|
45
|
+
const goHistoryPhoneAuth = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ name, cellPhoneNumber, certificationNumber, version = DEFAULT_API_VERSION }) {
|
|
46
|
+
const consoleName = '점유 인증 번호 검증';
|
|
47
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
|
|
48
|
+
if (!name) {
|
|
49
|
+
toast.error('이름이 없습니다.');
|
|
50
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (!cellPhoneNumber) {
|
|
54
|
+
toast.error('번호가 없습니다.');
|
|
55
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (!certificationNumber) {
|
|
59
|
+
toast.error('인증번호가 없습니다.');
|
|
60
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
const response = yield historyPhoneAuth({
|
|
65
|
+
name,
|
|
66
|
+
cellPhoneNumber,
|
|
67
|
+
certificationNumber,
|
|
68
|
+
version
|
|
69
|
+
});
|
|
70
|
+
if (!(response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK')) {
|
|
71
|
+
toast.error(getErrorMessageMap(response));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
return response;
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
console.error(`[${consoleName} 실패]:`, error);
|
|
78
|
+
// toast.error(error?.message || '오류가 발생했습니다.');
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
82
|
+
}
|
|
83
|
+
}), []);
|
|
84
|
+
const goGetHistoryList = useCallback((_a) => __awaiter(void 0, [_a], void 0, function* ({ version = DEFAULT_API_VERSION }) {
|
|
85
|
+
var _b;
|
|
86
|
+
const consoleName = '인증 이력 조회';
|
|
87
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
|
|
88
|
+
try {
|
|
89
|
+
const response = yield getHistoryList({ version });
|
|
90
|
+
if (!(response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK')) {
|
|
91
|
+
// toast.error(getErrorMessageMap(response));
|
|
92
|
+
setIsAuthenticated === null || setIsAuthenticated === void 0 ? void 0 : setIsAuthenticated(false);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
setHistoryList === null || setHistoryList === void 0 ? void 0 : setHistoryList((_b = response.data.chat_inquiry_list) !== null && _b !== void 0 ? _b : []);
|
|
96
|
+
setIsAuthenticated === null || setIsAuthenticated === void 0 ? void 0 : setIsAuthenticated(true);
|
|
97
|
+
return response;
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
console.error(`[${consoleName} 실패]:`, error);
|
|
101
|
+
// toast.error(error?.message || '오류가 발생했습니다.');
|
|
102
|
+
}
|
|
103
|
+
finally {
|
|
104
|
+
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
105
|
+
}
|
|
106
|
+
}), []);
|
|
107
|
+
return {
|
|
108
|
+
goRequestPhone,
|
|
109
|
+
goHistoryPhoneAuth,
|
|
110
|
+
goGetHistoryList
|
|
111
|
+
};
|
|
112
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction, useCallback } from 'react';
|
|
2
|
+
import { DEFAULT_API_VERSION, getHistoryList, historyPhoneAuth, requestPhone } from '../../_api';
|
|
3
|
+
import { History } from '../../_api/daeryuntalk/type/response';
|
|
4
|
+
import { useDaeryunTalkToast } from '../../Toast/DaeryuntalkToastProvider';
|
|
5
|
+
import { getErrorMessageMap } from '../../_enums/error';
|
|
6
|
+
|
|
7
|
+
interface props {
|
|
8
|
+
setLoading?: (loading: boolean) => void;
|
|
9
|
+
setIsAuthenticated?: Dispatch<SetStateAction<boolean>>;
|
|
10
|
+
setHistoryList?: Dispatch<SetStateAction<History[]>>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const useHistoryHandler = ({ setLoading, setIsAuthenticated, setHistoryList }: props) => {
|
|
14
|
+
const toast = useDaeryunTalkToast();
|
|
15
|
+
|
|
16
|
+
const goRequestPhone = useCallback(
|
|
17
|
+
async ({
|
|
18
|
+
name,
|
|
19
|
+
cellPhoneNumber,
|
|
20
|
+
version = DEFAULT_API_VERSION
|
|
21
|
+
}: {
|
|
22
|
+
name: string;
|
|
23
|
+
cellPhoneNumber: string;
|
|
24
|
+
version?: string;
|
|
25
|
+
}) => {
|
|
26
|
+
const consoleName = '점유 인증 번호 요청';
|
|
27
|
+
setLoading?.(true);
|
|
28
|
+
|
|
29
|
+
if (!name) {
|
|
30
|
+
toast.error('이름이 없습니다.');
|
|
31
|
+
setLoading?.(false);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!cellPhoneNumber) {
|
|
36
|
+
toast.error('번호가 없습니다.');
|
|
37
|
+
setLoading?.(false);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
const response = await requestPhone({ name, cellPhoneNumber, version });
|
|
43
|
+
// console.log('response', response);
|
|
44
|
+
if (!(response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK')) {
|
|
45
|
+
toast.error(getErrorMessageMap(response), '잠시 후 다시 시도해주세요.');
|
|
46
|
+
}
|
|
47
|
+
return response;
|
|
48
|
+
} catch (error: any) {
|
|
49
|
+
console.error(`[${consoleName} 실패]:`, error);
|
|
50
|
+
// toast.error(error?.message || '오류가 발생했습니다.');
|
|
51
|
+
} finally {
|
|
52
|
+
setLoading?.(false);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
[]
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const goHistoryPhoneAuth = useCallback(
|
|
59
|
+
async ({
|
|
60
|
+
name,
|
|
61
|
+
cellPhoneNumber,
|
|
62
|
+
certificationNumber,
|
|
63
|
+
version = DEFAULT_API_VERSION
|
|
64
|
+
}: {
|
|
65
|
+
name: string;
|
|
66
|
+
cellPhoneNumber: string;
|
|
67
|
+
certificationNumber: string;
|
|
68
|
+
version?: string;
|
|
69
|
+
}) => {
|
|
70
|
+
const consoleName = '점유 인증 번호 검증';
|
|
71
|
+
setLoading?.(true);
|
|
72
|
+
|
|
73
|
+
if (!name) {
|
|
74
|
+
toast.error('이름이 없습니다.');
|
|
75
|
+
setLoading?.(false);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!cellPhoneNumber) {
|
|
80
|
+
toast.error('번호가 없습니다.');
|
|
81
|
+
setLoading?.(false);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (!certificationNumber) {
|
|
86
|
+
toast.error('인증번호가 없습니다.');
|
|
87
|
+
setLoading?.(false);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
const response = await historyPhoneAuth({
|
|
93
|
+
name,
|
|
94
|
+
cellPhoneNumber,
|
|
95
|
+
certificationNumber,
|
|
96
|
+
version
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
if (!(response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK')) {
|
|
100
|
+
toast.error(getErrorMessageMap(response));
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return response;
|
|
105
|
+
} catch (error: any) {
|
|
106
|
+
console.error(`[${consoleName} 실패]:`, error);
|
|
107
|
+
// toast.error(error?.message || '오류가 발생했습니다.');
|
|
108
|
+
} finally {
|
|
109
|
+
setLoading?.(false);
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
[]
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const goGetHistoryList = useCallback(async ({ version = DEFAULT_API_VERSION }: { version?: string }) => {
|
|
116
|
+
const consoleName = '인증 이력 조회';
|
|
117
|
+
setLoading?.(true);
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
const response = await getHistoryList({ version });
|
|
121
|
+
|
|
122
|
+
if (!(response.result_info.result_cd === 'OK' || response.result_info.result_type_cd === 'OK')) {
|
|
123
|
+
// toast.error(getErrorMessageMap(response));
|
|
124
|
+
setIsAuthenticated?.(false);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
setHistoryList?.(response.data.chat_inquiry_list ?? []);
|
|
129
|
+
setIsAuthenticated?.(true);
|
|
130
|
+
return response;
|
|
131
|
+
} catch (error: any) {
|
|
132
|
+
console.error(`[${consoleName} 실패]:`, error);
|
|
133
|
+
// toast.error(error?.message || '오류가 발생했습니다.');
|
|
134
|
+
} finally {
|
|
135
|
+
setLoading?.(false);
|
|
136
|
+
}
|
|
137
|
+
}, []);
|
|
138
|
+
|
|
139
|
+
return {
|
|
140
|
+
goRequestPhone,
|
|
141
|
+
goHistoryPhoneAuth,
|
|
142
|
+
goGetHistoryList
|
|
143
|
+
};
|
|
144
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
|
+
import { Message } from '../../_types/message';
|
|
3
|
+
import { History, IChatInquiryMainDataResponse } from '../../_api/daeryuntalk/type/response';
|
|
4
|
+
import { MessageObject } from '../../_types/message_object';
|
|
5
|
+
import { ViewState } from '../../ChatHomeView';
|
|
6
|
+
import { AgeCheckStatusEnums } from '../../_enums/ags_check_status';
|
|
7
|
+
interface props {
|
|
8
|
+
setIsConnected: Dispatch<SetStateAction<boolean | null>>;
|
|
9
|
+
setIsLoading: Dispatch<SetStateAction<boolean>>;
|
|
10
|
+
setMessages: Dispatch<SetStateAction<Message[]>>;
|
|
11
|
+
setWorkFlowStack: Dispatch<SetStateAction<string[]>>;
|
|
12
|
+
setMessageObject: Dispatch<SetStateAction<MessageObject | null>>;
|
|
13
|
+
setInquiryMainData: Dispatch<SetStateAction<IChatInquiryMainDataResponse | null>>;
|
|
14
|
+
socketRef: MutableRefObject<WebSocket | null>;
|
|
15
|
+
setInquiryStatus: Dispatch<SetStateAction<string>>;
|
|
16
|
+
setHistoryList: Dispatch<SetStateAction<History[]>>;
|
|
17
|
+
historyList: History[];
|
|
18
|
+
inquiryMainData: IChatInquiryMainDataResponse | null;
|
|
19
|
+
isMobile: boolean;
|
|
20
|
+
setIsAuthenticated: Dispatch<SetStateAction<boolean>>;
|
|
21
|
+
setIsTyping: Dispatch<SetStateAction<boolean>>;
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
centerCode: string;
|
|
24
|
+
setPreviewState: Dispatch<SetStateAction<ViewState>>;
|
|
25
|
+
setIsUserExpried: Dispatch<SetStateAction<boolean>>;
|
|
26
|
+
chatInquiryNumber: string | null;
|
|
27
|
+
setIsNextPage: Dispatch<SetStateAction<boolean | null>>;
|
|
28
|
+
setInitialLoading: Dispatch<SetStateAction<boolean | null>>;
|
|
29
|
+
setChatInquiryNumber: Dispatch<SetStateAction<string | null>>;
|
|
30
|
+
setAgeCheckStatus: Dispatch<SetStateAction<AgeCheckStatusEnums | null>>;
|
|
31
|
+
isOpen: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare const useSocketEventHandler: ({ setIsConnected, setIsLoading, setMessages, setInquiryMainData, socketRef, setWorkFlowStack, setMessageObject, setInquiryStatus, setHistoryList, historyList, inquiryMainData, isMobile, setIsAuthenticated, setIsTyping, onClose, centerCode, setPreviewState, setIsUserExpried, chatInquiryNumber, setIsNextPage, setInitialLoading, setChatInquiryNumber, setAgeCheckStatus, isOpen }: props) => {
|
|
34
|
+
initializeDaeryuntalk: (hashValue: string | null, isOpen: boolean, centerCode: string, version?: string) => Promise<import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<IChatInquiryMainDataResponse> | import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<import("../../_api/daeryuntalk/type/response").ChatInquiryCreateDataResponse> | import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<import("../../_api/daeryuntalk/type/response").ChatInquiryDetailDataResponse> | import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<import("../../_api/daeryuntalk/type/response").ChatInquiryMessageListDataResponse> | null | undefined>;
|
|
35
|
+
sendInquiryWatching: (chatInquiryNumber: string) => void;
|
|
36
|
+
retryInquiryMain: (channelNumber: string) => Promise<import("../../_api/daeryuntalk/type/response").IDaeryunTalkResponseWrapper<IChatInquiryMainDataResponse>>;
|
|
37
|
+
retryInitData: () => Promise<void>;
|
|
38
|
+
sendHeartbeat: () => void;
|
|
39
|
+
sendInquiryJoined: (chatInquiryNumber: string) => void;
|
|
40
|
+
sendInquiryLeft: (chatInquiryNumber: string) => void;
|
|
41
|
+
sendHistoryEntered: (chatInquiryNumbers: string[]) => void;
|
|
42
|
+
sendHistoryLeft: (chatInquiryNumbers: string[]) => void;
|
|
43
|
+
};
|
|
44
|
+
export {};
|