@daeryun/dr_components 0.8.92 → 0.8.93
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.
|
@@ -68,6 +68,38 @@ const ChatConversation = ({ onBackClick, onChatNew, isActive, isMobile, onClose,
|
|
|
68
68
|
}, 200);
|
|
69
69
|
return () => clearTimeout(timeout); // cleanup
|
|
70
70
|
}, [messages, messageObject]);
|
|
71
|
+
const failedData = {
|
|
72
|
+
messageNumber: 'MSG76634299447981111',
|
|
73
|
+
plainText: '안녕',
|
|
74
|
+
senderType: 'MSP00100003',
|
|
75
|
+
messageType: 'MSP00200002',
|
|
76
|
+
messageStatus: 'FAILED',
|
|
77
|
+
userKey: '054423.878_933-2ee9fbb1-ce83-4b1d-acea-5c092022b6ff',
|
|
78
|
+
inquiryNumber: 'C9819004143723624194',
|
|
79
|
+
templateType: 'MSP00300101',
|
|
80
|
+
createdAt: new Date(),
|
|
81
|
+
updatedAt: new Date(),
|
|
82
|
+
language: 'ko',
|
|
83
|
+
timestamp: 1752736508878363,
|
|
84
|
+
richText: {
|
|
85
|
+
version: 1,
|
|
86
|
+
htmlContent: '',
|
|
87
|
+
structuredData: {
|
|
88
|
+
content: [
|
|
89
|
+
{
|
|
90
|
+
content: [
|
|
91
|
+
{
|
|
92
|
+
text: '실패 재전송 검수용',
|
|
93
|
+
type: 'text'
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
type: 'paragraph'
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
type: 'doc'
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
71
103
|
useEffect(() => {
|
|
72
104
|
if (!isInitialMount.current)
|
|
73
105
|
return;
|
|
@@ -121,7 +153,7 @@ const ChatConversation = ({ onBackClick, onChatNew, isActive, isMobile, onClose,
|
|
|
121
153
|
};
|
|
122
154
|
const renderedMessages = useMemo(() => {
|
|
123
155
|
const elements = [];
|
|
124
|
-
const sortedMessages = [...messages].sort((a, b) => a.timestamp - b.timestamp);
|
|
156
|
+
const sortedMessages = [failedData, ...messages].sort((a, b) => a.timestamp - b.timestamp);
|
|
125
157
|
sortedMessages.forEach((message, index) => {
|
|
126
158
|
const findObject = message.workFlow &&
|
|
127
159
|
(messageObject === null || messageObject === void 0 ? void 0 : messageObject.exposeObjectListYn) &&
|
|
@@ -10,6 +10,7 @@ import ChatConversationHeader from './ChatConversationItem/ChatConversationHeade
|
|
|
10
10
|
import ChatLoading from './ChatItem/ChatLoading';
|
|
11
11
|
import { useWindowSize } from './_hooks/useWindowSize';
|
|
12
12
|
import TypingComp from './ChatItem/TypingComp';
|
|
13
|
+
import { Message } from './_types/message';
|
|
13
14
|
|
|
14
15
|
type ChatConversationProps = {
|
|
15
16
|
onBackClick?: () => void;
|
|
@@ -106,6 +107,39 @@ const ChatConversation: React.FC<ChatConversationProps> = ({
|
|
|
106
107
|
}, 200);
|
|
107
108
|
return () => clearTimeout(timeout); // cleanup
|
|
108
109
|
}, [messages, messageObject]);
|
|
110
|
+
|
|
111
|
+
const failedData: Message = {
|
|
112
|
+
messageNumber: 'MSG76634299447981111',
|
|
113
|
+
plainText: '안녕',
|
|
114
|
+
senderType: 'MSP00100003',
|
|
115
|
+
messageType: 'MSP00200002',
|
|
116
|
+
messageStatus: 'FAILED',
|
|
117
|
+
userKey: '054423.878_933-2ee9fbb1-ce83-4b1d-acea-5c092022b6ff',
|
|
118
|
+
inquiryNumber: 'C9819004143723624194',
|
|
119
|
+
templateType: 'MSP00300101',
|
|
120
|
+
createdAt: new Date(),
|
|
121
|
+
updatedAt: new Date(),
|
|
122
|
+
language: 'ko',
|
|
123
|
+
timestamp: 1752736508878363,
|
|
124
|
+
richText: {
|
|
125
|
+
version: 1,
|
|
126
|
+
htmlContent: '',
|
|
127
|
+
structuredData: {
|
|
128
|
+
content: [
|
|
129
|
+
{
|
|
130
|
+
content: [
|
|
131
|
+
{
|
|
132
|
+
text: '실패 재전송 검수용',
|
|
133
|
+
type: 'text'
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
type: 'paragraph'
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
type: 'doc'
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
109
143
|
useEffect(() => {
|
|
110
144
|
if (!isInitialMount.current) return;
|
|
111
145
|
|
|
@@ -167,7 +201,7 @@ const ChatConversation: React.FC<ChatConversationProps> = ({
|
|
|
167
201
|
const renderedMessages = useMemo(() => {
|
|
168
202
|
const elements: React.ReactNode[] = [];
|
|
169
203
|
|
|
170
|
-
const sortedMessages = [...messages].sort((a, b) => a.timestamp - b.timestamp);
|
|
204
|
+
const sortedMessages = [failedData, ...messages].sort((a, b) => a.timestamp - b.timestamp);
|
|
171
205
|
|
|
172
206
|
sortedMessages.forEach((message, index) => {
|
|
173
207
|
const findObject =
|