@daeryun/dr_components 0.7.79 → 0.7.81

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 (134) hide show
  1. package/dist/asset/images/daeryuntalk/download.svg +5 -0
  2. package/dist/asset/images/daeryuntalk/firstGo.svg +5 -0
  3. package/dist/asset/images/daeryuntalk/objectBack.svg +4 -0
  4. package/dist/asset/images/daeryuntalk/viewer/close.svg +4 -0
  5. package/dist/asset/images/daeryuntalk/viewer/gray-download.svg +7 -0
  6. package/dist/asset/images/daeryuntalk/viewer/move-button.svg +4 -0
  7. package/dist/asset/images/daeryuntalk/viewer/rotate.svg +17 -0
  8. package/dist/asset/images/daeryuntalk/viewer/zoom-in.svg +5 -0
  9. package/dist/asset/images/daeryuntalk/viewer/zoom-out.svg +6 -0
  10. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  11. package/dist/components/Daeryuntalk/ChatButton.jsx +1 -0
  12. package/dist/components/Daeryuntalk/ChatButton.tsx +1 -0
  13. package/dist/components/Daeryuntalk/ChatConversation.d.ts +1 -0
  14. package/dist/components/Daeryuntalk/ChatConversation.jsx +19 -12
  15. package/dist/components/Daeryuntalk/ChatConversation.tsx +48 -11
  16. package/dist/components/Daeryuntalk/ChatHomeView.jsx +27 -6
  17. package/dist/components/Daeryuntalk/ChatHomeView.tsx +39 -8
  18. package/dist/components/Daeryuntalk/ChatInput.jsx +23 -3
  19. package/dist/components/Daeryuntalk/ChatInput.tsx +26 -10
  20. package/dist/components/Daeryuntalk/ChatItem/ChatFile.d.ts +10 -0
  21. package/dist/components/Daeryuntalk/ChatItem/ChatFile.jsx +186 -0
  22. package/dist/components/Daeryuntalk/ChatItem/ChatFile.tsx +252 -0
  23. package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.d.ts +8 -0
  24. package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.jsx +87 -0
  25. package/dist/components/Daeryuntalk/ChatItem/ChatPrivacyAuth.tsx +115 -0
  26. package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.d.ts +8 -0
  27. package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.jsx +13 -0
  28. package/dist/components/Daeryuntalk/ChatItem/ChatWrapper.tsx +25 -0
  29. package/dist/components/Daeryuntalk/ChatItem/RichText.d.ts +7 -0
  30. package/dist/components/Daeryuntalk/ChatItem/RichText.jsx +25 -0
  31. package/dist/components/Daeryuntalk/ChatItem/RichText.tsx +32 -0
  32. package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.d.ts +8 -0
  33. package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.jsx +19 -0
  34. package/dist/components/Daeryuntalk/ChatItem/WorkFlowAuthForm.tsx +31 -0
  35. package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.d.ts +7 -0
  36. package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.jsx +20 -0
  37. package/dist/components/Daeryuntalk/ChatItem/WorkFlowClickData.tsx +36 -0
  38. package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.d.ts +7 -0
  39. package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.jsx +9 -0
  40. package/dist/components/Daeryuntalk/ChatItem/WorkFlowImg.tsx +16 -0
  41. package/dist/components/Daeryuntalk/ChatMessage.d.ts +11 -1
  42. package/dist/components/Daeryuntalk/ChatMessage.jsx +116 -14
  43. package/dist/components/Daeryuntalk/ChatMessage.tsx +175 -20
  44. package/dist/components/Daeryuntalk/ChatObject/ObjectBack.d.ts +7 -0
  45. package/dist/components/Daeryuntalk/ChatObject/ObjectBack.jsx +16 -0
  46. package/dist/components/Daeryuntalk/ChatObject/ObjectBack.tsx +28 -0
  47. package/dist/components/Daeryuntalk/ChatObject/ObjectButton.d.ts +10 -0
  48. package/dist/components/Daeryuntalk/ChatObject/ObjectButton.jsx +118 -0
  49. package/dist/components/Daeryuntalk/ChatObject/ObjectButton.tsx +162 -0
  50. package/dist/components/Daeryuntalk/ChatWidget.jsx +7 -3
  51. package/dist/components/Daeryuntalk/ChatWidget.tsx +9 -5
  52. package/dist/components/Daeryuntalk/DaeryuntalkContext.d.ts +37 -5
  53. package/dist/components/Daeryuntalk/DaeryuntalkContext.jsx +71 -157
  54. package/dist/components/Daeryuntalk/DaeryuntalkContext.tsx +128 -189
  55. package/dist/components/Daeryuntalk/Tiptap/Tiptap.d.ts +17 -0
  56. package/dist/components/Daeryuntalk/Tiptap/Tiptap.jsx +57 -0
  57. package/dist/components/Daeryuntalk/Tiptap/Tiptap.tsx +82 -0
  58. package/dist/components/Daeryuntalk/Viewer/ImageViewer.d.ts +3 -0
  59. package/dist/components/Daeryuntalk/Viewer/ImageViewer.jsx +172 -0
  60. package/dist/components/Daeryuntalk/Viewer/ImageViewer.tsx +236 -0
  61. package/dist/components/Daeryuntalk/_api/daeryuntalk/index.d.ts +133 -0
  62. package/dist/{lib/api → components/Daeryuntalk/_api}/daeryuntalk/index.js +251 -46
  63. package/dist/{lib/api → components/Daeryuntalk/_api}/daeryuntalk/index.ts +353 -129
  64. package/dist/components/Daeryuntalk/_api/daeryuntalk/type/response.d.ts +115 -0
  65. package/dist/components/Daeryuntalk/_api/daeryuntalk/type/response.js +1 -0
  66. package/dist/components/Daeryuntalk/_api/daeryuntalk/type/response.ts +135 -0
  67. package/dist/components/Daeryuntalk/_enums/ask-status.d.ts +6 -0
  68. package/dist/components/Daeryuntalk/_enums/ask-status.js +11 -0
  69. package/dist/components/Daeryuntalk/_enums/ask-status.ts +11 -0
  70. package/dist/components/Daeryuntalk/_enums/message_type.d.ts +6 -0
  71. package/dist/components/Daeryuntalk/_enums/message_type.js +13 -0
  72. package/dist/components/Daeryuntalk/_enums/message_type.ts +13 -0
  73. package/dist/components/Daeryuntalk/_enums/sender_type.d.ts +8 -0
  74. package/dist/components/Daeryuntalk/_enums/sender_type.js +16 -0
  75. package/dist/components/Daeryuntalk/_enums/sender_type.ts +16 -0
  76. package/dist/components/Daeryuntalk/_enums/socket_type.d.ts +22 -0
  77. package/dist/components/Daeryuntalk/_enums/socket_type.js +23 -0
  78. package/dist/components/Daeryuntalk/_enums/socket_type.ts +31 -0
  79. package/dist/components/Daeryuntalk/_enums/template.d.ts +32 -0
  80. package/dist/components/Daeryuntalk/_enums/template.js +49 -0
  81. package/dist/components/Daeryuntalk/_enums/template.ts +53 -0
  82. package/dist/components/Daeryuntalk/_enums/work_flow_object_expose.d.ts +34 -0
  83. package/dist/components/Daeryuntalk/_enums/work_flow_object_expose.js +66 -0
  84. package/dist/components/Daeryuntalk/_enums/work_flow_object_expose.ts +69 -0
  85. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.d.ts +46 -0
  86. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.js +296 -0
  87. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHandler.ts +364 -0
  88. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHistory.d.ts +1 -0
  89. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHistory.js +1 -0
  90. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatHistory.ts +1 -0
  91. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatSocketState.d.ts +1 -0
  92. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatSocketState.js +22 -0
  93. package/dist/components/Daeryuntalk/_hooks/talkprovider/useChatSocketState.ts +30 -0
  94. package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.d.ts +21 -0
  95. package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.js +205 -0
  96. package/dist/components/Daeryuntalk/_hooks/talkprovider/useSocketEventHandler.ts +240 -0
  97. package/dist/components/Daeryuntalk/_hooks/talkprovider/useViewerHook.d.ts +8 -0
  98. package/dist/components/Daeryuntalk/_hooks/talkprovider/useViewerHook.js +18 -0
  99. package/dist/components/Daeryuntalk/_hooks/talkprovider/useViewerHook.ts +23 -0
  100. package/dist/components/Daeryuntalk/_lib/index.d.ts +7 -0
  101. package/dist/components/Daeryuntalk/_lib/index.js +101 -0
  102. package/dist/components/Daeryuntalk/_lib/index.ts +137 -0
  103. package/dist/components/Daeryuntalk/_lib/utils.d.ts +2 -0
  104. package/dist/components/Daeryuntalk/_lib/utils.js +16 -0
  105. package/dist/components/Daeryuntalk/_lib/utils.ts +17 -0
  106. package/dist/components/Daeryuntalk/{types.d.ts → _types/message.d.ts} +33 -17
  107. package/dist/components/Daeryuntalk/_types/message.js +19 -0
  108. package/dist/components/Daeryuntalk/{types.ts → _types/message.ts} +64 -19
  109. package/dist/components/Daeryuntalk/_types/message_object.d.ts +16 -0
  110. package/dist/components/Daeryuntalk/_types/message_object.js +1 -0
  111. package/dist/components/Daeryuntalk/_types/message_object.ts +20 -0
  112. package/dist/components/Daeryuntalk/_types/socket/message.d.ts +0 -0
  113. package/dist/components/Daeryuntalk/_types/socket/message.js +1 -0
  114. package/dist/components/Daeryuntalk/_types/socket/message.ts +0 -0
  115. package/dist/components/Daeryuntalk/_types/socket/workflow.d.ts +15 -0
  116. package/dist/components/Daeryuntalk/_types/socket/workflow.js +1 -0
  117. package/dist/components/Daeryuntalk/_types/socket/workflow.ts +15 -0
  118. package/dist/components/Daeryuntalk/_ui/buttons/Button1.d.ts +10 -0
  119. package/dist/components/Daeryuntalk/_ui/buttons/Button1.jsx +11 -0
  120. package/dist/components/Daeryuntalk/_ui/buttons/Button1.tsx +28 -0
  121. package/dist/components/Daeryuntalk/_ui/inputs/Input1.d.ts +12 -0
  122. package/dist/components/Daeryuntalk/_ui/inputs/Input1.jsx +9 -0
  123. package/dist/components/Daeryuntalk/_ui/inputs/Input1.tsx +39 -0
  124. package/dist/components/Daeryuntalk/index.tsx +1 -0
  125. package/dist/lib/index.js +1 -1
  126. package/dist/lib/index.ts +1 -1
  127. package/dist/styles/globals.css +161 -8
  128. package/dist/tsconfig.tsbuildinfo +1 -1
  129. package/package.json +8 -2
  130. package/dist/components/Daeryuntalk/types.js +0 -8
  131. package/dist/lib/api/daeryuntalk/index.d.ts +0 -143
  132. /package/dist/{lib/api → components/Daeryuntalk/_api}/index.d.ts +0 -0
  133. /package/dist/{lib/api → components/Daeryuntalk/_api}/index.js +0 -0
  134. /package/dist/{lib/api → components/Daeryuntalk/_api}/index.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daeryun/dr_components",
3
- "version": "0.7.79",
3
+ "version": "0.7.81",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,6 +28,12 @@
28
28
  "dependencies": {
29
29
  "@prisma/client": "^6.8.2",
30
30
  "@tanstack/react-query": "^5.66.9",
31
+ "@tiptap/extension-color": "^2.14.0",
32
+ "@tiptap/extension-image": "^2.14.0",
33
+ "@tiptap/extension-link": "^2.14.0",
34
+ "@tiptap/extension-placeholder": "^2.14.0",
35
+ "@tiptap/react": "^2.11.7",
36
+ "@tiptap/starter-kit": "^2.11.7",
31
37
  "axios": "^1.6.8",
32
38
  "classnames": "^2.5.1",
33
39
  "dayjs": "^1.11.13",
@@ -80,12 +86,12 @@
80
86
  "husky": "^8.0.3",
81
87
  "is-mobile": "^4.0.0",
82
88
  "isomorphic-dompurify": "^1.12.0",
83
- "prisma": "^5.12.1",
84
89
  "next": "13.5.6",
85
90
  "next-i18next": "^15.0.0",
86
91
  "postcss": "^8",
87
92
  "postcss-loader": "^8.1.1",
88
93
  "prettier": "^3.1.1",
94
+ "prisma": "^5.12.1",
89
95
  "react": "^18.2.0",
90
96
  "react-dom": "^18.2.0",
91
97
  "style-loader": "^4.0.0",
@@ -1,8 +0,0 @@
1
- // todo 올바른 타입 정의 필요
2
- // 메시지에 특정 컨텐츠가 있는지 확인하는 헬퍼 함수들
3
- export const hasBlocks = (message) => !!message.blocks && message.blocks.length > 0;
4
- export const hasButtons = (message) => !!message.buttons && message.buttons.length > 0;
5
- export const hasForm = (message) => !!message.form;
6
- export const hasFiles = (message) => !!message.files && message.files.length > 0;
7
- export const hasImages = (message) => !!message.images && message.images.length > 0;
8
- export const hasWebPage = (message) => !!message.webPage;
@@ -1,143 +0,0 @@
1
- /**
2
- * Daeryuntalk API 클라이언트 모듈 2025-04-23
3
- *
4
- * 이 모듈은 Daeryuntalk 채팅 API와 상호작용하기 위한 함수를 제공
5
- * 1. 고객 인증
6
- * 2. 웹소켓 연결 초기화
7
- * 3. 웹소켓 연결
8
- * 4. 채팅 문의 관리
9
- */
10
- export interface WebSocketInitResponse {
11
- data: {
12
- cnnc_url: string;
13
- cnnc_token: string;
14
- };
15
- }
16
- export interface ChatInquiryMainData {
17
- channel_name: string;
18
- channel_logo_image_url: string;
19
- sleeve_image_url: string;
20
- salutation: string;
21
- answer_speed_message: string;
22
- progress_inquiry_number: string;
23
- }
24
- export interface ResultInfo {
25
- result_type_cd: string;
26
- result_cd: string;
27
- result_msg: string;
28
- }
29
- export interface ChatInquiryMainResponse {
30
- result_info: ResultInfo;
31
- data: ChatInquiryMainData;
32
- }
33
- export interface ChatInquiryCreateResponse {
34
- result_info: ResultInfo;
35
- data: {
36
- chat_inquiry_number: string;
37
- };
38
- }
39
- export interface ChatInquiryDetailData {
40
- inquiry_number?: string;
41
- status?: string;
42
- created_at?: string;
43
- updated_at?: string;
44
- description?: string;
45
- messages?: ChatMessage[];
46
- }
47
- export interface ChatInquiryDetailResponse {
48
- result_info?: ResultInfo;
49
- data?: ChatInquiryDetailData;
50
- success?: boolean;
51
- error_code?: string;
52
- error_message?: string;
53
- }
54
- export declare const MESSAGE_TYPES: {
55
- SYSTEM: string;
56
- BOT: string;
57
- CUSTOMER: string;
58
- OPERATOR: string;
59
- MACRO: string;
60
- };
61
- export interface MessageBlock {
62
- type: string;
63
- value: string;
64
- }
65
- export interface ChatMessage {
66
- msg_no: string;
67
- msg_type: string;
68
- msg_status: string;
69
- user_key: string;
70
- inquiry_no: string;
71
- created_at: string;
72
- updated_at: string;
73
- language: string;
74
- plain_text: string;
75
- blocks: MessageBlock[];
76
- }
77
- /**
78
- * 사용자 인증
79
- * @param version API 버전 (기본값: 1.0.0)
80
- * @returns 인증 응답
81
- */
82
- export declare function authenticateUser(version?: string): Promise<any>;
83
- /**
84
- * 웹소켓 연결 초기화
85
- * @param version API 버전 (기본값: 1.0.0)
86
- * @returns 연결 URL과 토큰이 포함된 웹소켓 초기화 데이터
87
- */
88
- export declare function initializeWebSocket(version?: string): Promise<WebSocketInitResponse>;
89
- /**
90
- * 웹소켓 연결
91
- * @param wsUrl 웹소켓 URL
92
- * @param token 연결 토큰
93
- * @param onMessage 메시지 핸들러
94
- * @param onOpen 연결 열림 핸들러
95
- * @param onClose 연결 닫힘 핸들러
96
- * @param onError 오류 핸들러
97
- * @returns 웹소켓 인스턴스
98
- */
99
- export declare function connectWebSocket(wsUrl: string, token: string, onMessage?: (event: MessageEvent) => void, onOpen?: (event: Event) => void, onClose?: (event: CloseEvent) => void, onError?: (event: Event) => void): WebSocket;
100
- /**
101
- * 채팅 문의 메인 조회
102
- * @param version API 버전 (기본값: 1.0.0)
103
- * @returns 채팅 문의 메인 데이터
104
- */
105
- export declare function getChatInquiryMain(version?: string): Promise<ChatInquiryMainResponse>;
106
- /**
107
- * 새 채팅 문의 생성 (개선된 API)
108
- * @param version API 버전 (기본값: 1.0.0)
109
- * @returns 문의 번호가 포함된 생성된 채팅 문의 데이터
110
- */
111
- export declare function generateChatInquiry(version?: string): Promise<ChatInquiryCreateResponse>;
112
- /**
113
- * 채팅 문의 상세 조회 (개선된 API)
114
- * @param chatInquiryNumber 채팅 문의 번호
115
- * @param version API 버전 (기본값: 1.0.0)
116
- * @returns 채팅 문의 상세 정보
117
- */
118
- export declare function getChatInquiryDetailNew(chatInquiryNumber: string, version?: string): Promise<ChatInquiryDetailResponse>;
119
- /**
120
- * Daeryuntalk 초기화 완료 흐름
121
- * 이 함수는 인증부터 웹소켓 연결까지 완전한 흐름을 처리
122
- * @param onWebSocketConnected 웹소켓 연결 시 콜백
123
- * @param onWebSocketMessage 메시지 핸들러
124
- * @param version API 버전 (기본값: 1.0.0)
125
- * @returns 웹소켓 인스턴스 및 문의 데이터
126
- */
127
- export declare function initializeDaeryuntalk(onWebSocketConnected?: (socket: WebSocket) => void, onWebSocketMessage?: (event: MessageEvent) => void, version?: string): Promise<{
128
- inquiryData?: any;
129
- }>;
130
- /**
131
- * 채팅 메시지 전송
132
- * @param chatInquiryNumber 채팅 문의 번호
133
- * @param messageText 메시지 내용
134
- * @param version API 버전 (기본값: 1.0.0)
135
- * @returns 전송된 메시지 데이터
136
- */
137
- export interface SendMessageResponse {
138
- result_info: ResultInfo;
139
- data?: {
140
- message: ChatMessage;
141
- };
142
- }
143
- export declare function sendChatMessage(chatInquiryNumber: string, messageText: string, version?: string): Promise<SendMessageResponse>;