@daeryun/dr_components 0.7.88 → 0.7.90

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 (27) hide show
  1. package/dist/components/Daeryuntalk/ChatHomeView.jsx +2 -0
  2. package/dist/components/Daeryuntalk/ChatHomeView.tsx +2 -0
  3. package/dist/components/Daeryuntalk/ChatInput.tsx +1 -1
  4. package/dist/components/Daeryuntalk/ChatMessage.jsx +22 -24
  5. package/dist/components/Daeryuntalk/ChatMessage.tsx +33 -29
  6. package/dist/components/Daeryuntalk/ChatWidget.jsx +5 -2
  7. package/dist/components/Daeryuntalk/ChatWidget.tsx +5 -2
  8. package/dist/components/Daeryuntalk/History/AuthForm.jsx +54 -11
  9. package/dist/components/Daeryuntalk/History/AuthForm.tsx +57 -11
  10. package/dist/components/Daeryuntalk/HistoryView.jsx +7 -1
  11. package/dist/components/Daeryuntalk/HistoryView.tsx +9 -1
  12. package/dist/components/Daeryuntalk/Tiptap/Tiptap.jsx +29 -9
  13. package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +29 -10
  14. package/dist/components/Daeryuntalk/Toast/DaeryuntalkToastProvider.d.ts +12 -0
  15. package/dist/components/Daeryuntalk/Toast/DaeryuntalkToastProvider.jsx +33 -0
  16. package/dist/components/Daeryuntalk/Toast/DaeryuntalkToastProvider.tsx +67 -0
  17. package/dist/components/Daeryuntalk/Toast/Toast.d.ts +11 -0
  18. package/dist/components/Daeryuntalk/Toast/Toast.jsx +61 -0
  19. package/dist/components/Daeryuntalk/Toast/Toast.tsx +94 -0
  20. package/dist/components/Daeryuntalk/_enums/error_code.d.ts +21 -0
  21. package/dist/components/Daeryuntalk/_enums/error_code.js +23 -0
  22. package/dist/components/Daeryuntalk/_enums/error_code.ts +22 -0
  23. package/dist/components/Daeryuntalk/_enums/template.js +27 -0
  24. package/dist/components/Daeryuntalk/_enums/template.ts +28 -0
  25. package/dist/styles/globals.css +50 -4
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +1 -1
@@ -48,9 +48,15 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
48
48
  <div className="flex-1 overflow-y-auto px-[20px] pb-[20px] pt-[24px]">
49
49
  {hasHistories ? (historyLit.map(history => (<div key={history.chat_inquiry_number} className="cursor-pointer border-b border-gray-100 px-[12px] py-[18px] hover:bg-gray-50" onClick={() => onChatHistoryClick(history.chat_inquiry_number)}>
50
50
  <div className="flex items-center justify-between">
51
- <span className="font-medium">{history.customer_name}</span>
51
+ <div className={`flex flex-row items-center gap-[10px]`}>
52
+ <span className="font-medium">{history.customer_name}</span>
53
+ {history.unread_message_count && history.unread_message_count > 0 ? (<span className="flex h-[18px] w-[18px] items-center justify-center rounded-full bg-[#AA1D36] px-[5.5px] py-[3px] text-[12px] font-medium leading-[100%] tracking-[-4%] text-white">
54
+ {history.unread_message_count}
55
+ </span>) : null}
56
+ </div>
52
57
  <span className="text-xs text-gray-500">
53
58
  {formatTimestamp(history.recent_message_date_time)}
59
+ {/*{history.unread_message_count}*/}
54
60
  </span>
55
61
  </div>
56
62
  <div className="mt-1 flex items-center justify-between">
@@ -85,9 +85,17 @@ const HistoryView: React.FC<HistoryViewProps> = ({
85
85
  onClick={() => onChatHistoryClick(history.chat_inquiry_number)}
86
86
  >
87
87
  <div className="flex items-center justify-between">
88
- <span className="font-medium">{history.customer_name}</span>
88
+ <div className={`flex flex-row items-center gap-[10px]`}>
89
+ <span className="font-medium">{history.customer_name}</span>
90
+ {history.unread_message_count && history.unread_message_count > 0 ? (
91
+ <span className="flex h-[18px] w-[18px] items-center justify-center rounded-full bg-[#AA1D36] px-[5.5px] py-[3px] text-[12px] font-medium leading-[100%] tracking-[-4%] text-white">
92
+ {history.unread_message_count}
93
+ </span>
94
+ ) : null}
95
+ </div>
89
96
  <span className="text-xs text-gray-500">
90
97
  {formatTimestamp(history.recent_message_date_time)}
98
+ {/*{history.unread_message_count}*/}
91
99
  </span>
92
100
  </div>
93
101
  <div className="mt-1 flex items-center justify-between">
@@ -1,6 +1,6 @@
1
- import { useEditor, EditorContent } from '@tiptap/react';
1
+ import { EditorContent, useEditor } from '@tiptap/react';
2
2
  import Placeholder from '@tiptap/extension-placeholder';
3
- import { useImperativeHandle, forwardRef } from 'react';
3
+ import { forwardRef, useEffect, useImperativeHandle } from 'react';
4
4
  import Document from '@tiptap/extension-document';
5
5
  import Paragraph from '@tiptap/extension-paragraph';
6
6
  import Text from '@tiptap/extension-text';
@@ -24,22 +24,42 @@ const Tiptap = forwardRef(({ onChange, placeholder = '메시지를 입력하세
24
24
  },
25
25
  editorProps: {
26
26
  attributes: {
27
- class: 'focus:outline-none min-h-[44px] max-h-[72px] overflow-y-auto resize-none px-[10px] py-[4px] flex items-center'
27
+ class: 'focus:outline-none min-h-[34px] max-h-[72px] overflow-y-auto resize-none px-[10px] mt-[4px] pt-[4px] pb-[4px] break-words whitespace-pre-wrap'
28
28
  },
29
29
  handleKeyDown: (view, event) => {
30
- if (event.key === 'Enter' && !event.shiftKey) {
31
- event.preventDefault();
32
- const content = editor === null || editor === void 0 ? void 0 : editor.getText();
33
- if (content && content.trim() && onEnterKeyPress) {
34
- onEnterKeyPress();
30
+ if (event.key === 'Enter') {
31
+ if (event.shiftKey) {
32
+ // 줄바꿈 이후 스크롤 이동 보장
33
+ requestAnimationFrame(() => {
34
+ if (view && view.dom) {
35
+ // 가장 아래에 스크롤되도록 처리
36
+ view.dom.scrollTop = view.dom.scrollHeight;
37
+ }
38
+ });
39
+ return false;
40
+ }
41
+ else {
42
+ event.preventDefault();
43
+ const content = editor === null || editor === void 0 ? void 0 : editor.getText();
44
+ if (content && content.trim() && onEnterKeyPress) {
45
+ onEnterKeyPress();
46
+ }
47
+ return true;
35
48
  }
36
- return true;
37
49
  }
38
50
  onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
39
51
  return false;
40
52
  }
41
53
  }
42
54
  });
55
+ // 최초 렌더시 포커스 설정
56
+ useEffect(() => {
57
+ if (editor) {
58
+ editor === null || editor === void 0 ? void 0 : editor.commands.clearContent(true);
59
+ // 내용을 지운 후 포커스 유지
60
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
61
+ }
62
+ }, [editor]);
43
63
  useImperativeHandle(ref, () => ({
44
64
  clearContent: () => {
45
65
  editor === null || editor === void 0 ? void 0 : editor.commands.clearContent(true);
@@ -1,7 +1,6 @@
1
- import { useEditor, EditorContent } from '@tiptap/react';
2
- import StarterKit from '@tiptap/starter-kit';
1
+ import { EditorContent, useEditor } from '@tiptap/react';
3
2
  import Placeholder from '@tiptap/extension-placeholder';
4
- import { useImperativeHandle, forwardRef } from 'react';
3
+ import { forwardRef, useEffect, useImperativeHandle } from 'react';
5
4
  import { JSONContent } from '@tiptap/core'; // 추가 필요
6
5
  import Document from '@tiptap/extension-document';
7
6
  import Paragraph from '@tiptap/extension-paragraph';
@@ -44,16 +43,27 @@ const Tiptap = forwardRef<TiptapEditorRef, TiptapProps>(
44
43
  },
45
44
  editorProps: {
46
45
  attributes: {
47
- class: 'focus:outline-none min-h-[44px] max-h-[72px] overflow-y-auto resize-none px-[10px] py-[4px] flex items-center'
46
+ class: 'focus:outline-none min-h-[34px] max-h-[72px] overflow-y-auto resize-none px-[10px] mt-[4px] pt-[4px] pb-[4px] break-words whitespace-pre-wrap'
48
47
  },
49
48
  handleKeyDown: (view, event) => {
50
- if (event.key === 'Enter' && !event.shiftKey) {
51
- event.preventDefault();
52
- const content = editor?.getText();
53
- if (content && content.trim() && onEnterKeyPress) {
54
- onEnterKeyPress();
49
+ if (event.key === 'Enter') {
50
+ if (event.shiftKey) {
51
+ // 줄바꿈 이후 스크롤 이동 보장
52
+ requestAnimationFrame(() => {
53
+ if (view && view.dom) {
54
+ // 가장 아래에 스크롤되도록 처리
55
+ view.dom.scrollTop = view.dom.scrollHeight;
56
+ }
57
+ });
58
+ return false;
59
+ } else {
60
+ event.preventDefault();
61
+ const content = editor?.getText();
62
+ if (content && content.trim() && onEnterKeyPress) {
63
+ onEnterKeyPress();
64
+ }
65
+ return true;
55
66
  }
56
- return true;
57
67
  }
58
68
 
59
69
  onKeyDown?.(event as unknown as React.KeyboardEvent);
@@ -62,6 +72,15 @@ const Tiptap = forwardRef<TiptapEditorRef, TiptapProps>(
62
72
  }
63
73
  });
64
74
 
75
+ // 최초 렌더시 포커스 설정
76
+ useEffect(() => {
77
+ if (editor) {
78
+ editor?.commands.clearContent(true);
79
+ // 내용을 지운 후 포커스 유지
80
+ editor?.commands.focus();
81
+ }
82
+ }, [editor]);
83
+
65
84
  useImperativeHandle(ref, () => ({
66
85
  clearContent: () => {
67
86
  editor?.commands.clearContent(true);
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ interface ToastContextProps {
3
+ success: (title: string, description?: string, duration?: number) => void;
4
+ warning: (title: string, description?: string, duration?: number) => void;
5
+ error: (title: string, description?: string, duration?: number) => void;
6
+ }
7
+ export declare const useDearyunTalkToast: () => ToastContextProps;
8
+ interface ToastProviderProps {
9
+ children: ReactNode;
10
+ }
11
+ export declare const DaeryuntalkToastProvider: ({ children }: ToastProviderProps) => import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,33 @@
1
+ import { createContext, useContext, useState } from 'react';
2
+ import DaeryunTalkToast from './Toast';
3
+ export const useDearyunTalkToast = () => {
4
+ const context = useContext(ToastContext);
5
+ if (!context) {
6
+ throw new Error('토스트 프로바이더 설정이 필요합니다.');
7
+ }
8
+ return context;
9
+ };
10
+ const ToastContext = createContext(undefined);
11
+ export const DaeryuntalkToastProvider = ({ children }) => {
12
+ const [toast, setToast] = useState(null);
13
+ const [isVisible, setIsVisible] = useState(false);
14
+ const showToast = (type, title, description, duration = 3000) => {
15
+ setToast({ type, title, description, duration });
16
+ setIsVisible(true);
17
+ setTimeout(() => {
18
+ setIsVisible(false);
19
+ setTimeout(() => setToast(null), 300); // exit transition
20
+ }, duration);
21
+ };
22
+ const success = (title, description, duration) => showToast('success', title, description, duration);
23
+ const warning = (title, description, duration) => showToast('warning', title, description, duration);
24
+ const error = (title, description, duration) => showToast('error', title, description, duration);
25
+ return (<ToastContext.Provider value={{ success, warning, error }}>
26
+ {children}
27
+ <div className="absolute bottom-0 left-1/2 z-50 w-[90%] -translate-x-1/2 rounded-[25px]">
28
+ <div className={`transition-all duration-300 ${isVisible ? '-translate-y-[96px] opacity-100' : 'pointer-events-none translate-y-0 opacity-0'}`}>
29
+ {toast && <DaeryunTalkToast {...toast} onClose={() => setIsVisible(false)}/>}
30
+ </div>
31
+ </div>
32
+ </ToastContext.Provider>);
33
+ };
@@ -0,0 +1,67 @@
1
+ import { createContext, ReactNode, useContext, useState } from 'react';
2
+ import DaeryunTalkToast from './Toast';
3
+
4
+ type ToastType = 'success' | 'warning' | 'error';
5
+
6
+ interface ToastItem {
7
+ type: ToastType;
8
+ title: string;
9
+ description?: string;
10
+ duration?: number;
11
+ }
12
+
13
+ interface ToastContextProps {
14
+ success: (title: string, description?: string, duration?: number) => void;
15
+ warning: (title: string, description?: string, duration?: number) => void;
16
+ error: (title: string, description?: string, duration?: number) => void;
17
+ }
18
+
19
+ export const useDearyunTalkToast = () => {
20
+ const context = useContext(ToastContext);
21
+ if (!context) {
22
+ throw new Error('토스트 프로바이더 설정이 필요합니다.');
23
+ }
24
+ return context;
25
+ };
26
+
27
+ const ToastContext = createContext<ToastContextProps | undefined>(undefined);
28
+
29
+ interface ToastProviderProps {
30
+ children: ReactNode;
31
+ }
32
+
33
+ export const DaeryuntalkToastProvider = ({ children }: ToastProviderProps) => {
34
+ const [toast, setToast] = useState<ToastItem | null>(null);
35
+ const [isVisible, setIsVisible] = useState(false);
36
+
37
+ const showToast = (type: ToastType, title: string, description?: string, duration: number = 3000) => {
38
+ setToast({ type, title, description, duration });
39
+ setIsVisible(true);
40
+ setTimeout(() => {
41
+ setIsVisible(false);
42
+ setTimeout(() => setToast(null), 300); // exit transition
43
+ }, duration);
44
+ };
45
+
46
+ const success = (title: string, description?: string, duration?: number) =>
47
+ showToast('success', title, description, duration);
48
+ const warning = (title: string, description?: string, duration?: number) =>
49
+ showToast('warning', title, description, duration);
50
+ const error = (title: string, description?: string, duration?: number) =>
51
+ showToast('error', title, description, duration);
52
+
53
+ return (
54
+ <ToastContext.Provider value={{ success, warning, error }}>
55
+ {children}
56
+ <div className="absolute bottom-0 left-1/2 z-50 w-[90%] -translate-x-1/2 rounded-[25px]">
57
+ <div
58
+ className={`transition-all duration-300 ${
59
+ isVisible ? '-translate-y-[96px] opacity-100' : 'pointer-events-none translate-y-0 opacity-0'
60
+ }`}
61
+ >
62
+ {toast && <DaeryunTalkToast {...toast} onClose={() => setIsVisible(false)} />}
63
+ </div>
64
+ </div>
65
+ </ToastContext.Provider>
66
+ );
67
+ };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ type ToastType = 'success' | 'warning' | 'error';
3
+ interface ToastProps {
4
+ type: ToastType;
5
+ title: string;
6
+ description?: string;
7
+ duration?: number;
8
+ onClose: () => void;
9
+ }
10
+ declare const _default: React.MemoExoticComponent<({ type, title, description, duration, onClose }: ToastProps) => React.JSX.Element>;
11
+ export default _default;
@@ -0,0 +1,61 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ // 1. 함수 이름을 PascalCase로 변경
3
+ const WarningIcon = ({ className = '' }) => {
4
+ return (<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" className={className}>
5
+ <g clipPath="url(#clip0_1775_25245)">
6
+ <path d="M3 12C3 13.1819 3.23279 14.3522 3.68508 15.4442C4.13738 16.5361 4.80031 17.5282 5.63604 18.364C6.47177 19.1997 7.46392 19.8626 8.55585 20.3149C9.64778 20.7672 10.8181 21 12 21C13.1819 21 14.3522 20.7672 15.4442 20.3149C16.5361 19.8626 17.5282 19.1997 18.364 18.364C19.1997 17.5282 19.8626 16.5361 20.3149 15.4442C20.7672 14.3522 21 13.1819 21 12C21 9.61305 20.0518 7.32387 18.364 5.63604C16.6761 3.94821 14.3869 3 12 3C9.61305 3 7.32387 3.94821 5.63604 5.63604C3.94821 7.32387 3 9.61305 3 12Z" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
7
+ <path d="M12 16V16.01" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
8
+ <path d="M12 8.5L12 13" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
9
+ </g>
10
+ <defs>
11
+ <clipPath id="clip0_1775_25245">
12
+ <rect width="24" height="24" fill="white"/>
13
+ </clipPath>
14
+ </defs>
15
+ </svg>);
16
+ };
17
+ const ICONS = {
18
+ success: <WarningIcon className="h-6 w-6 text-white"/>,
19
+ warning: <WarningIcon className="h-6 w-6 text-white"/>,
20
+ error: <WarningIcon className="h-6 w-6 text-white"/>
21
+ };
22
+ const DaeryunTalkToast = ({ type, title, description, duration = 3000, onClose }) => {
23
+ const timerRef = useRef(null);
24
+ useEffect(() => {
25
+ if (timerRef.current) {
26
+ clearTimeout(timerRef === null || timerRef === void 0 ? void 0 : timerRef.current);
27
+ }
28
+ const timer = setTimeout(() => {
29
+ onClose();
30
+ }, duration || 3000);
31
+ timerRef.current = timer;
32
+ return () => {
33
+ clearTimeout(timer);
34
+ };
35
+ }, [duration, onClose]);
36
+ const closeToast = () => {
37
+ if (timerRef.current) {
38
+ clearTimeout(timerRef.current);
39
+ timerRef.current = null;
40
+ }
41
+ onClose();
42
+ };
43
+ return (<>
44
+ <div className=" flex h-[48px] w-full items-center justify-center space-x-[6px] rounded-[25px] bg-[#505050] text-white">
45
+ <div className="mt-0.5 flex-shrink-0">{ICONS[type]}</div>
46
+ <div className="flex">
47
+ <h3 className="text-[14px] font-[400] leading-[130%] tracking-[-4%]">{title}</h3>
48
+ {/*{description && <p className="mt-0.5 text-sm text-white text-opacity-90">{description}</p>}*/}
49
+ </div>
50
+ </div>
51
+ {/*<button*/}
52
+ {/* onClick={closeToast}*/}
53
+ {/* className="ml-3 flex-shrink-0 rounded-full bg-white bg-opacity-10 p-1 hover:bg-opacity-20"*/}
54
+ {/*>*/}
55
+ {/* <svg className="h-4 w-4 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">*/}
56
+ {/* <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />*/}
57
+ {/* </svg>*/}
58
+ {/*</button>*/}
59
+ </>);
60
+ };
61
+ export default React.memo(DaeryunTalkToast);
@@ -0,0 +1,94 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ type ToastType = 'success' | 'warning' | 'error';
3
+
4
+ interface ToastProps {
5
+ type: ToastType;
6
+ title: string;
7
+ description?: string;
8
+ duration?: number;
9
+ onClose: () => void;
10
+ }
11
+
12
+ // 1. 함수 이름을 PascalCase로 변경
13
+ const WarningIcon = ({ className = '' }: { className?: string }) => {
14
+ return (
15
+ <svg
16
+ width="24"
17
+ height="24"
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ className={className}
22
+ >
23
+ <g clipPath="url(#clip0_1775_25245)">
24
+ <path
25
+ d="M3 12C3 13.1819 3.23279 14.3522 3.68508 15.4442C4.13738 16.5361 4.80031 17.5282 5.63604 18.364C6.47177 19.1997 7.46392 19.8626 8.55585 20.3149C9.64778 20.7672 10.8181 21 12 21C13.1819 21 14.3522 20.7672 15.4442 20.3149C16.5361 19.8626 17.5282 19.1997 18.364 18.364C19.1997 17.5282 19.8626 16.5361 20.3149 15.4442C20.7672 14.3522 21 13.1819 21 12C21 9.61305 20.0518 7.32387 18.364 5.63604C16.6761 3.94821 14.3869 3 12 3C9.61305 3 7.32387 3.94821 5.63604 5.63604C3.94821 7.32387 3 9.61305 3 12Z"
26
+ stroke="white"
27
+ strokeWidth="2"
28
+ strokeLinecap="round"
29
+ strokeLinejoin="round"
30
+ />
31
+ <path d="M12 16V16.01" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
32
+ <path d="M12 8.5L12 13" stroke="white" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
33
+ </g>
34
+ <defs>
35
+ <clipPath id="clip0_1775_25245">
36
+ <rect width="24" height="24" fill="white" />
37
+ </clipPath>
38
+ </defs>
39
+ </svg>
40
+ );
41
+ };
42
+
43
+ const ICONS = {
44
+ success: <WarningIcon className="h-6 w-6 text-white" />,
45
+ warning: <WarningIcon className="h-6 w-6 text-white" />,
46
+ error: <WarningIcon className="h-6 w-6 text-white" />
47
+ };
48
+
49
+ const DaeryunTalkToast = ({ type, title, description, duration = 3000, onClose }: ToastProps) => {
50
+ const timerRef = useRef<NodeJS.Timeout | null>(null);
51
+
52
+ useEffect(() => {
53
+ if (timerRef.current) {
54
+ clearTimeout(timerRef?.current!);
55
+ }
56
+ const timer = setTimeout(() => {
57
+ onClose();
58
+ }, duration || 3000);
59
+ timerRef.current = timer;
60
+ return () => {
61
+ clearTimeout(timer);
62
+ };
63
+ }, [duration, onClose]);
64
+
65
+ const closeToast = () => {
66
+ if (timerRef.current) {
67
+ clearTimeout(timerRef.current!);
68
+ timerRef.current = null;
69
+ }
70
+ onClose();
71
+ };
72
+
73
+ return (
74
+ <>
75
+ <div className=" flex h-[48px] w-full items-center justify-center space-x-[6px] rounded-[25px] bg-[#505050] text-white">
76
+ <div className="mt-0.5 flex-shrink-0">{ICONS[type]}</div>
77
+ <div className="flex">
78
+ <h3 className="text-[14px] font-[400] leading-[130%] tracking-[-4%]">{title}</h3>
79
+ {/*{description && <p className="mt-0.5 text-sm text-white text-opacity-90">{description}</p>}*/}
80
+ </div>
81
+ </div>
82
+ {/*<button*/}
83
+ {/* onClick={closeToast}*/}
84
+ {/* className="ml-3 flex-shrink-0 rounded-full bg-white bg-opacity-10 p-1 hover:bg-opacity-20"*/}
85
+ {/*>*/}
86
+ {/* <svg className="h-4 w-4 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">*/}
87
+ {/* <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />*/}
88
+ {/* </svg>*/}
89
+ {/*</button>*/}
90
+ </>
91
+ );
92
+ };
93
+
94
+ export default React.memo(DaeryunTalkToast);
@@ -0,0 +1,21 @@
1
+ export declare enum AuthErrorCode {
2
+ REDIS_SESSION_FETCH_ERROR = "CE000300001",// 인가 오류 - 레디스 세션 조회 실패
3
+ TOKEN_DECODE_ERROR = "CE000300002",// 인가 오류 - 토큰 정보 디코딩 실패
4
+ REDIS_TTL_REFRESH_ERROR = "CE000300003",// 인가 오류 - 레디스 TTL 갱신 실패
5
+ WEBSOCKET_AUTH_ERROR = "CE000300004",// 웹소켓 인증 오류
6
+ GUEST_AUTH_ERROR = "CE000300005",// 비회원 인증 오류
7
+ OWNERSHIP_INFO_NOT_FOUND = "CE000300006",// 점유인증 정보 없음
8
+ OWNERSHIP_CODE_MISMATCH = "CE000300007",// 점유인증 번호 불일치
9
+ OWNERSHIP_EXPIRED = "CE000300008",// 점유인증 만료
10
+ OWNERSHIP_DUPLICATE_REQUEST_ERROR = "CE000300009"
11
+ }
12
+ export declare enum HistoryErrorCode {
13
+ AUTH_STATUS_FETCH_ERROR = "CE010200001",// 히스토리 인증상태 조회 오류
14
+ AUTH_NUMBER_SEND_ERROR = "CE010200002",// 히스토리 인증번호 발송 오류
15
+ AUTH_NUMBER_FETCH_ERROR = "CE010200003",// 히스토리 인증번호 조회 오류
16
+ AUTH_NUMBER_VERIFY_ERROR = "CE010200004",// 히스토리 인증번호 검증 실패 오류
17
+ AUTH_ERROR = "CE010200005",// 히스토리 인증 오류
18
+ HISTORY_LIST_FETCH_ERROR = "CE010200006",// 히스토리 목록 조회 오류
19
+ AUTH_REQUIRED_ERROR = "CE010200007",// 히스토리 인증 필요 오류
20
+ INQUIRY_DETAIL_FETCH_ERROR = "CE010200008"
21
+ }
@@ -0,0 +1,23 @@
1
+ export var AuthErrorCode;
2
+ (function (AuthErrorCode) {
3
+ AuthErrorCode["REDIS_SESSION_FETCH_ERROR"] = "CE000300001";
4
+ AuthErrorCode["TOKEN_DECODE_ERROR"] = "CE000300002";
5
+ AuthErrorCode["REDIS_TTL_REFRESH_ERROR"] = "CE000300003";
6
+ AuthErrorCode["WEBSOCKET_AUTH_ERROR"] = "CE000300004";
7
+ AuthErrorCode["GUEST_AUTH_ERROR"] = "CE000300005";
8
+ AuthErrorCode["OWNERSHIP_INFO_NOT_FOUND"] = "CE000300006";
9
+ AuthErrorCode["OWNERSHIP_CODE_MISMATCH"] = "CE000300007";
10
+ AuthErrorCode["OWNERSHIP_EXPIRED"] = "CE000300008";
11
+ AuthErrorCode["OWNERSHIP_DUPLICATE_REQUEST_ERROR"] = "CE000300009"; // 점유인증 번호 중복 요청 오류
12
+ })(AuthErrorCode || (AuthErrorCode = {}));
13
+ export var HistoryErrorCode;
14
+ (function (HistoryErrorCode) {
15
+ HistoryErrorCode["AUTH_STATUS_FETCH_ERROR"] = "CE010200001";
16
+ HistoryErrorCode["AUTH_NUMBER_SEND_ERROR"] = "CE010200002";
17
+ HistoryErrorCode["AUTH_NUMBER_FETCH_ERROR"] = "CE010200003";
18
+ HistoryErrorCode["AUTH_NUMBER_VERIFY_ERROR"] = "CE010200004";
19
+ HistoryErrorCode["AUTH_ERROR"] = "CE010200005";
20
+ HistoryErrorCode["HISTORY_LIST_FETCH_ERROR"] = "CE010200006";
21
+ HistoryErrorCode["AUTH_REQUIRED_ERROR"] = "CE010200007";
22
+ HistoryErrorCode["INQUIRY_DETAIL_FETCH_ERROR"] = "CE010200008"; // 히스토리 문의 상세 조회 오류
23
+ })(HistoryErrorCode || (HistoryErrorCode = {}));
@@ -0,0 +1,22 @@
1
+ export enum AuthErrorCode {
2
+ REDIS_SESSION_FETCH_ERROR = 'CE000300001', // 인가 오류 - 레디스 세션 조회 실패
3
+ TOKEN_DECODE_ERROR = 'CE000300002', // 인가 오류 - 토큰 정보 디코딩 실패
4
+ REDIS_TTL_REFRESH_ERROR = 'CE000300003', // 인가 오류 - 레디스 TTL 갱신 실패
5
+ WEBSOCKET_AUTH_ERROR = 'CE000300004', // 웹소켓 인증 오류
6
+ GUEST_AUTH_ERROR = 'CE000300005', // 비회원 인증 오류
7
+ OWNERSHIP_INFO_NOT_FOUND = 'CE000300006', // 점유인증 정보 없음
8
+ OWNERSHIP_CODE_MISMATCH = 'CE000300007', // 점유인증 번호 불일치
9
+ OWNERSHIP_EXPIRED = 'CE000300008', // 점유인증 만료
10
+ OWNERSHIP_DUPLICATE_REQUEST_ERROR = 'CE000300009' // 점유인증 번호 중복 요청 오류
11
+ }
12
+
13
+ export enum HistoryErrorCode {
14
+ AUTH_STATUS_FETCH_ERROR = 'CE010200001', // 히스토리 인증상태 조회 오류
15
+ AUTH_NUMBER_SEND_ERROR = 'CE010200002', // 히스토리 인증번호 발송 오류
16
+ AUTH_NUMBER_FETCH_ERROR = 'CE010200003', // 히스토리 인증번호 조회 오류
17
+ AUTH_NUMBER_VERIFY_ERROR = 'CE010200004', // 히스토리 인증번호 검증 실패 오류
18
+ AUTH_ERROR = 'CE010200005', // 히스토리 인증 오류
19
+ HISTORY_LIST_FETCH_ERROR = 'CE010200006', // 히스토리 목록 조회 오류
20
+ AUTH_REQUIRED_ERROR = 'CE010200007', // 히스토리 인증 필요 오류
21
+ INQUIRY_DETAIL_FETCH_ERROR = 'CE010200008' // 히스토리 문의 상세 조회 오류
22
+ }
@@ -47,3 +47,30 @@ export const InquiryMessageTemplateTypeTextMap = {
47
47
  * "submitted_at": null
48
48
  * }
49
49
  */
50
+ // const a = {
51
+ // messageNumber: 'MSG66001562355944269',
52
+ // plainText: '처음으로',
53
+ // senderType: 'MSP00100003', //고객
54
+ // messageType: 'MSP00200003', // 워크플로우 메시지
55
+ // messageStatus: 'CREATED',
56
+ // userKey: '042047.145_293-130eaa95-9090-4b57-bdc1-039aa87250ad',
57
+ // inquiryNumber: 'C4025066717411937562',
58
+ // templateType: 'MSP00300201', // 워크플로우 메시지 템플릿 1
59
+ // createdAt: '2025-07-02T04:43:54.030Z',
60
+ // updatedAt: '2025-07-02T04:43:54.030Z',
61
+ // language: 'ko',
62
+ // timestamp: 1751431434030270,
63
+ // richText: {
64
+ // version: 0,
65
+ // htmlContent: '',
66
+ // structuredData: null
67
+ // },
68
+ // blocks: [
69
+ // {
70
+ // type: 'icon-text',
71
+ // value: '처음으로',
72
+ // iconUrl:
73
+ // 'https://daeryun-chat-inquiry-pub-dev.s3.ap-northeast-2.amazonaws.com/COM00300003/COM00400006/firstpage2_small.png'
74
+ // }
75
+ // ]
76
+ // };
@@ -51,3 +51,31 @@ export const InquiryMessageTemplateTypeTextMap: Record<InquiryMessageTemplateTyp
51
51
  * "submitted_at": null
52
52
  * }
53
53
  */
54
+
55
+ // const a = {
56
+ // messageNumber: 'MSG66001562355944269',
57
+ // plainText: '처음으로',
58
+ // senderType: 'MSP00100003', //고객
59
+ // messageType: 'MSP00200003', // 워크플로우 메시지
60
+ // messageStatus: 'CREATED',
61
+ // userKey: '042047.145_293-130eaa95-9090-4b57-bdc1-039aa87250ad',
62
+ // inquiryNumber: 'C4025066717411937562',
63
+ // templateType: 'MSP00300201', // 워크플로우 메시지 템플릿 1
64
+ // createdAt: '2025-07-02T04:43:54.030Z',
65
+ // updatedAt: '2025-07-02T04:43:54.030Z',
66
+ // language: 'ko',
67
+ // timestamp: 1751431434030270,
68
+ // richText: {
69
+ // version: 0,
70
+ // htmlContent: '',
71
+ // structuredData: null
72
+ // },
73
+ // blocks: [
74
+ // {
75
+ // type: 'icon-text',
76
+ // value: '처음으로',
77
+ // iconUrl:
78
+ // 'https://daeryun-chat-inquiry-pub-dev.s3.ap-northeast-2.amazonaws.com/COM00300003/COM00400006/firstpage2_small.png'
79
+ // }
80
+ // ]
81
+ // };