@droppii-org/chat-sdk 0.0.32 → 0.0.34
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/conversation/ConversationBySessionItem.d.ts.map +1 -1
- package/dist/components/conversation/ConversationBySessionItem.js +3 -68
- package/dist/components/conversation/DeskConversationList.d.ts.map +1 -1
- package/dist/components/conversation/DeskConversationList.js +44 -22
- package/dist/components/mediaCollection/FileCollection.d.ts.map +1 -1
- package/dist/components/mediaCollection/FileCollection.js +7 -6
- package/dist/components/mediaCollection/ImageCollection.d.ts.map +1 -1
- package/dist/components/mediaCollection/ImageCollection.js +7 -6
- package/dist/components/mediaCollection/VideoCollection.d.ts.map +1 -1
- package/dist/components/mediaCollection/VideoCollection.js +7 -6
- package/dist/components/mediaCollection/index.js +5 -5
- package/dist/components/message/MessageList.d.ts +1 -0
- package/dist/components/message/MessageList.d.ts.map +1 -1
- package/dist/components/message/MessageList.js +53 -15
- package/dist/components/message/footer/index.d.ts +1 -5
- package/dist/components/message/footer/index.d.ts.map +1 -1
- package/dist/components/message/footer/index.js +5 -4
- package/dist/components/message/item/index.d.ts +4 -3
- package/dist/components/message/item/index.d.ts.map +1 -1
- package/dist/components/message/item/index.js +24 -30
- package/dist/components/searchConversation/SearchAll.d.ts +6 -1
- package/dist/components/searchConversation/SearchAll.d.ts.map +1 -1
- package/dist/components/searchConversation/SearchAll.js +28 -4
- package/dist/components/searchConversation/SearchConversationAsMessages.d.ts +4 -1
- package/dist/components/searchConversation/SearchConversationAsMessages.d.ts.map +1 -1
- package/dist/components/searchConversation/SearchConversationAsMessages.js +18 -3
- package/dist/components/searchConversation/SearchConversationAsUsers.d.ts +4 -1
- package/dist/components/searchConversation/SearchConversationAsUsers.d.ts.map +1 -1
- package/dist/components/searchConversation/SearchConversationAsUsers.js +14 -3
- package/dist/components/searchConversation/index.d.ts +4 -1
- package/dist/components/searchConversation/index.d.ts.map +1 -1
- package/dist/components/searchConversation/index.js +8 -7
- package/dist/components/searchConversation/item/SearchItemAsMessage.d.ts +8 -0
- package/dist/components/searchConversation/item/SearchItemAsMessage.d.ts.map +1 -0
- package/dist/components/searchConversation/item/SearchItemAsMessage.js +49 -0
- package/dist/components/searchConversation/item/SearchItemAsUser.d.ts +8 -0
- package/dist/components/searchConversation/item/SearchItemAsUser.d.ts.map +1 -0
- package/dist/components/searchConversation/item/SearchItemAsUser.js +13 -0
- package/dist/components/session/DeskAssignedSession.js +5 -5
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +3 -0
- package/dist/context/ChatContext.d.ts.map +1 -1
- package/dist/context/ChatContext.js +1 -0
- package/dist/hooks/message/useMessage.d.ts +8 -5
- package/dist/hooks/message/useMessage.d.ts.map +1 -1
- package/dist/hooks/message/useMessage.js +117 -51
- package/dist/hooks/message/useSendMessage.d.ts +2 -4
- package/dist/hooks/message/useSendMessage.d.ts.map +1 -1
- package/dist/hooks/message/useSendMessage.js +9 -39
- package/dist/hooks/search/useSearchMessage.d.ts +232 -0
- package/dist/hooks/search/useSearchMessage.d.ts.map +1 -0
- package/dist/hooks/search/useSearchMessage.js +71 -0
- package/dist/hooks/session/useGetSession.d.ts +222 -0
- package/dist/hooks/session/useGetSession.d.ts.map +1 -0
- package/dist/hooks/session/useGetSession.js +83 -0
- package/dist/hooks/session/useGetSessionSummary.d.ts.map +1 -1
- package/dist/hooks/session/useGetSessionSummary.js +2 -1
- package/dist/hooks/user/useAuth.d.ts.map +1 -1
- package/dist/hooks/user/useAuth.js +16 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/locales/vi/common.json +4 -1
- package/dist/screens/deskMessage/index.d.ts.map +1 -1
- package/dist/screens/deskMessage/index.js +2 -1
- package/dist/services/query.d.ts +1 -1
- package/dist/services/query.js +1 -1
- package/dist/services/routes.d.ts +1 -1
- package/dist/services/routes.js +1 -1
- package/dist/store/auth.d.ts.map +1 -1
- package/dist/store/auth.js +12 -2
- package/dist/store/conversation.d.ts.map +1 -1
- package/dist/store/conversation.js +19 -1
- package/dist/styles/global.css +1 -1
- package/dist/types/chat.d.ts +7 -8
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/chat.js +4 -0
- package/dist/types/dto.d.ts +14 -23
- package/dist/types/dto.d.ts.map +1 -1
- package/dist/utils/common.d.ts +3 -0
- package/dist/utils/common.d.ts.map +1 -1
- package/dist/utils/common.js +98 -0
- package/dist/utils/events.d.ts +1 -0
- package/dist/utils/events.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -1,75 +1,121 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import { ViewType } from "@openim/wasm-client-sdk";
|
|
2
|
+
import { ViewType, MessageType } from "@openim/wasm-client-sdk";
|
|
3
3
|
import { DChatSDK } from "../../constants/sdk";
|
|
4
|
-
import { v4 as uuidv4 } from "uuid";
|
|
5
4
|
import { useLatest, useRequest } from "ahooks";
|
|
6
5
|
import emitter, { emit } from "../../utils/events";
|
|
6
|
+
import isEmpty from "lodash/isEmpty";
|
|
7
7
|
const PAGE_SIZE = 50;
|
|
8
|
-
export const
|
|
8
|
+
export const visibleTypeMessage = [
|
|
9
|
+
MessageType.TextMessage,
|
|
10
|
+
MessageType.PictureMessage,
|
|
11
|
+
MessageType.VoiceMessage,
|
|
12
|
+
MessageType.VideoMessage,
|
|
13
|
+
MessageType.FileMessage,
|
|
14
|
+
MessageType.AtTextMessage,
|
|
15
|
+
MessageType.MergeMessage,
|
|
16
|
+
MessageType.CardMessage,
|
|
17
|
+
MessageType.LocationMessage,
|
|
18
|
+
MessageType.CustomMessage,
|
|
19
|
+
MessageType.QuoteMessage,
|
|
20
|
+
MessageType.FaceMessage,
|
|
21
|
+
];
|
|
22
|
+
export const useMessage = (conversationId, searchClientMsgID) => {
|
|
9
23
|
const [loadState, setLoadState] = useState({
|
|
10
24
|
initLoading: true,
|
|
11
25
|
hasMoreOld: true,
|
|
26
|
+
hasMoreNew: false,
|
|
12
27
|
messageList: [],
|
|
13
|
-
groupMessageList: [],
|
|
14
28
|
});
|
|
15
29
|
const latestLoadState = useLatest(loadState);
|
|
16
|
-
const parseGroupMessageList = (messageList) => {
|
|
17
|
-
if (!messageList)
|
|
18
|
-
return [];
|
|
19
|
-
const mGroupMessages = messageList === null || messageList === void 0 ? void 0 : messageList.reduce((acc, cur) => {
|
|
20
|
-
const extendMessageInfo = JSON.parse((cur === null || cur === void 0 ? void 0 : cur.ex) || "{}");
|
|
21
|
-
if (extendMessageInfo === null || extendMessageInfo === void 0 ? void 0 : extendMessageInfo.groupMessageID) {
|
|
22
|
-
const findGroupMessageIndex = acc.findIndex((item) => item.groupMessageID === (extendMessageInfo === null || extendMessageInfo === void 0 ? void 0 : extendMessageInfo.groupMessageID));
|
|
23
|
-
if (findGroupMessageIndex === -1) {
|
|
24
|
-
acc.push({
|
|
25
|
-
groupMessageID: extendMessageInfo.groupMessageID,
|
|
26
|
-
messages: [cur],
|
|
27
|
-
sendID: cur.sendID,
|
|
28
|
-
sendTime: cur.sendTime,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
acc[findGroupMessageIndex].messages.push(cur);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
acc.push({
|
|
37
|
-
groupMessageID: uuidv4(),
|
|
38
|
-
messages: [cur],
|
|
39
|
-
sendID: cur.sendID,
|
|
40
|
-
sendTime: cur.sendTime,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return acc;
|
|
44
|
-
}, []);
|
|
45
|
-
return mGroupMessages;
|
|
46
|
-
};
|
|
47
30
|
const { loading: moreOldLoading, runAsync: getMoreOldMessages } = useRequest(async (loadMore = true) => {
|
|
31
|
+
var _a, _b, _c, _d, _e;
|
|
32
|
+
const reqConversationID = conversationId;
|
|
33
|
+
const params = {
|
|
34
|
+
count: PAGE_SIZE,
|
|
35
|
+
startClientMsgID: loadMore
|
|
36
|
+
? ((_e = (_b = (_a = latestLoadState.current) === null || _a === void 0 ? void 0 : _a.messageList) === null || _b === void 0 ? void 0 : _b[((_d = (_c = latestLoadState.current) === null || _c === void 0 ? void 0 : _c.messageList) === null || _d === void 0 ? void 0 : _d.length) - 1]) === null || _e === void 0 ? void 0 : _e.clientMsgID) || ""
|
|
37
|
+
: "",
|
|
38
|
+
conversationID: conversationId !== null && conversationId !== void 0 ? conversationId : "",
|
|
39
|
+
viewType: ViewType.History,
|
|
40
|
+
};
|
|
41
|
+
const { data } = await DChatSDK.getAdvancedHistoryMessageList(params);
|
|
42
|
+
if (conversationId !== reqConversationID)
|
|
43
|
+
return;
|
|
44
|
+
setTimeout(() => setLoadState((preState) => {
|
|
45
|
+
const messageList = [
|
|
46
|
+
...(loadMore ? preState.messageList : []),
|
|
47
|
+
...data.messageList.toReversed(),
|
|
48
|
+
];
|
|
49
|
+
return Object.assign(Object.assign({}, preState), { initLoading: false, hasMoreOld: !data.isEnd, messageList });
|
|
50
|
+
}));
|
|
51
|
+
}, {
|
|
52
|
+
manual: true,
|
|
53
|
+
});
|
|
54
|
+
const { loading: moreNewLoading, runAsync: getMoreNewMessages } = useRequest(async (loadMore = true) => {
|
|
48
55
|
var _a, _b;
|
|
49
56
|
const reqConversationID = conversationId;
|
|
50
|
-
const { data } = await DChatSDK.
|
|
57
|
+
const { data } = await DChatSDK.getAdvancedHistoryMessageListReverse({
|
|
51
58
|
count: PAGE_SIZE,
|
|
52
59
|
startClientMsgID: loadMore
|
|
53
60
|
? ((_b = (_a = latestLoadState.current) === null || _a === void 0 ? void 0 : _a.messageList[0]) === null || _b === void 0 ? void 0 : _b.clientMsgID) || ""
|
|
54
61
|
: "",
|
|
55
62
|
conversationID: conversationId !== null && conversationId !== void 0 ? conversationId : "",
|
|
56
|
-
viewType: ViewType.
|
|
63
|
+
viewType: ViewType.Search,
|
|
57
64
|
});
|
|
58
65
|
if (conversationId !== reqConversationID)
|
|
59
66
|
return;
|
|
60
67
|
setTimeout(() => setLoadState((preState) => {
|
|
61
68
|
const messageList = [
|
|
62
|
-
...data.messageList,
|
|
69
|
+
...data.messageList.toReversed(),
|
|
63
70
|
...(loadMore ? preState.messageList : []),
|
|
64
71
|
];
|
|
65
|
-
|
|
66
|
-
return Object.assign(Object.assign({}, preState), { initLoading: false, hasMoreOld: !data.isEnd, messageList,
|
|
67
|
-
groupMessageList });
|
|
72
|
+
return Object.assign(Object.assign({}, preState), { initLoading: false, hasMoreNew: !data.isEnd, messageList });
|
|
68
73
|
}));
|
|
69
74
|
}, {
|
|
70
75
|
manual: true,
|
|
71
76
|
});
|
|
72
|
-
const
|
|
77
|
+
const { runAsync: searchMessages } = useRequest(async () => {
|
|
78
|
+
var _a, _b;
|
|
79
|
+
if (!searchClientMsgID || !conversationId)
|
|
80
|
+
return;
|
|
81
|
+
const reqConversationID = conversationId;
|
|
82
|
+
const { data: dataPrev } = await DChatSDK.getAdvancedHistoryMessageList({
|
|
83
|
+
count: 10,
|
|
84
|
+
startClientMsgID: searchClientMsgID,
|
|
85
|
+
conversationID: conversationId !== null && conversationId !== void 0 ? conversationId : "",
|
|
86
|
+
viewType: ViewType.History,
|
|
87
|
+
});
|
|
88
|
+
const { data: dataNext } = await DChatSDK.getAdvancedHistoryMessageListReverse({
|
|
89
|
+
count: 10,
|
|
90
|
+
startClientMsgID: searchClientMsgID,
|
|
91
|
+
conversationID: conversationId !== null && conversationId !== void 0 ? conversationId : "",
|
|
92
|
+
viewType: ViewType.Search,
|
|
93
|
+
});
|
|
94
|
+
const { data: dataCurrent } = await DChatSDK.findMessageList([
|
|
95
|
+
{
|
|
96
|
+
conversationID: conversationId !== null && conversationId !== void 0 ? conversationId : "",
|
|
97
|
+
clientMsgIDList: [searchClientMsgID !== null && searchClientMsgID !== void 0 ? searchClientMsgID : ""],
|
|
98
|
+
},
|
|
99
|
+
]);
|
|
100
|
+
const currentMessages = ((_b = (_a = dataCurrent === null || dataCurrent === void 0 ? void 0 : dataCurrent.findResultItems) === null || _a === void 0 ? void 0 : _a.find((item) => item.conversationID === conversationId)) === null || _b === void 0 ? void 0 : _b.messageList) || [];
|
|
101
|
+
if (conversationId !== reqConversationID)
|
|
102
|
+
return;
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
setLoadState((preState) => {
|
|
105
|
+
const messageList = [
|
|
106
|
+
...dataNext.messageList.toReversed(),
|
|
107
|
+
...currentMessages,
|
|
108
|
+
...dataPrev.messageList.toReversed(),
|
|
109
|
+
];
|
|
110
|
+
return Object.assign(Object.assign({}, preState), { initLoading: false, hasMoreOld: !dataPrev.isEnd, hasMoreNew: !dataNext.isEnd, messageList });
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
emit("CHAT_LIST_SCROLL_TO_MESSAGE", searchClientMsgID);
|
|
115
|
+
}, 200);
|
|
116
|
+
}, {
|
|
117
|
+
manual: true,
|
|
118
|
+
});
|
|
73
119
|
useEffect(() => {
|
|
74
120
|
const pushNewMessage = (message) => {
|
|
75
121
|
var _a, _b;
|
|
@@ -77,10 +123,8 @@ export const useMessage = (conversationId) => {
|
|
|
77
123
|
return;
|
|
78
124
|
}
|
|
79
125
|
setLoadState((preState) => {
|
|
80
|
-
const messageList = [...preState.messageList
|
|
81
|
-
|
|
82
|
-
return Object.assign(Object.assign({}, preState), { messageList,
|
|
83
|
-
groupMessageList });
|
|
126
|
+
const messageList = [message, ...preState.messageList];
|
|
127
|
+
return Object.assign(Object.assign({}, preState), { messageList });
|
|
84
128
|
});
|
|
85
129
|
};
|
|
86
130
|
const updateOneMessage = (message) => {
|
|
@@ -91,8 +135,7 @@ export const useMessage = (conversationId) => {
|
|
|
91
135
|
return preState;
|
|
92
136
|
}
|
|
93
137
|
tmpList[idx] = Object.assign(Object.assign({}, tmpList[idx]), message);
|
|
94
|
-
|
|
95
|
-
return Object.assign(Object.assign({}, preState), { messageList: tmpList, groupMessageList });
|
|
138
|
+
return Object.assign(Object.assign({}, preState), { messageList: tmpList });
|
|
96
139
|
});
|
|
97
140
|
};
|
|
98
141
|
emitter.on("PUSH_NEW_MSG", pushNewMessage);
|
|
@@ -103,22 +146,45 @@ export const useMessage = (conversationId) => {
|
|
|
103
146
|
};
|
|
104
147
|
}, []);
|
|
105
148
|
useEffect(() => {
|
|
106
|
-
|
|
149
|
+
if (!conversationId)
|
|
150
|
+
return;
|
|
151
|
+
if (!isEmpty(searchClientMsgID)) {
|
|
152
|
+
searchMessages();
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
getMoreOldMessages(false);
|
|
156
|
+
}
|
|
107
157
|
return () => {
|
|
108
158
|
setLoadState(() => ({
|
|
109
159
|
initLoading: true,
|
|
110
160
|
hasMoreOld: true,
|
|
161
|
+
hasMoreNew: false,
|
|
111
162
|
messageList: [],
|
|
112
|
-
groupMessageList: [],
|
|
113
163
|
}));
|
|
114
164
|
};
|
|
115
|
-
}, [conversationId]);
|
|
165
|
+
}, [conversationId, searchClientMsgID]);
|
|
116
166
|
return {
|
|
117
167
|
loadState,
|
|
118
168
|
latestLoadState,
|
|
119
169
|
moreOldLoading,
|
|
120
170
|
getMoreOldMessages,
|
|
171
|
+
moreNewLoading,
|
|
172
|
+
getMoreNewMessages,
|
|
121
173
|
};
|
|
122
174
|
};
|
|
123
175
|
export const pushNewMessage = (message) => emit("PUSH_NEW_MSG", message);
|
|
124
176
|
export const updateOneMessage = (message) => emit("UPDATE_ONE_MSG", message);
|
|
177
|
+
export const getVisibleNeighbor = (allMessages, current, direction) => {
|
|
178
|
+
const currentIndex = allMessages.findIndex((m) => m.clientMsgID === current.clientMsgID);
|
|
179
|
+
if (currentIndex === -1)
|
|
180
|
+
return undefined;
|
|
181
|
+
let index = direction === "prev" ? currentIndex + 1 : currentIndex - 1;
|
|
182
|
+
while (index >= 0 && index < allMessages.length) {
|
|
183
|
+
const candidate = allMessages[index];
|
|
184
|
+
if (visibleTypeMessage.includes(candidate.contentType)) {
|
|
185
|
+
return candidate;
|
|
186
|
+
}
|
|
187
|
+
index = direction === "prev" ? index - 1 : index + 1;
|
|
188
|
+
}
|
|
189
|
+
return undefined;
|
|
190
|
+
};
|
|
@@ -6,7 +6,7 @@ export declare const createImageMessageByFile: (file: ImageMsgParamsByFile) => P
|
|
|
6
6
|
export declare const createMergerMessage: (mergerMsgParams: MergerMsgParams) => Promise<MessageItem | null>;
|
|
7
7
|
export declare const createVideoMessageByFile: (file: VideoMsgParamsByFile) => Promise<MessageItem | null>;
|
|
8
8
|
export declare const createFileMessageByFile: (file: FileMsgParamsByFile) => Promise<MessageItem | null>;
|
|
9
|
-
export declare const useSendMessage: (
|
|
9
|
+
export declare const useSendMessage: () => {
|
|
10
10
|
sendTextMessage: ({ plainText, richText, }: {
|
|
11
11
|
plainText: string;
|
|
12
12
|
richText: string;
|
|
@@ -17,9 +17,7 @@ export declare const useSendMessage: (lastMessage?: MessageItem) => {
|
|
|
17
17
|
files: UploadFile[];
|
|
18
18
|
}) => Promise<void>;
|
|
19
19
|
};
|
|
20
|
-
export declare const generateExtendMessageInfo: ({ richText,
|
|
20
|
+
export declare const generateExtendMessageInfo: ({ richText, }: {
|
|
21
21
|
richText?: string;
|
|
22
|
-
currentUserID: string;
|
|
23
|
-
lastMessage?: MessageItem;
|
|
24
22
|
}) => ExtendMessageInfo;
|
|
25
23
|
//# sourceMappingURL=useSendMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAO1B,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAKlC,eAAO,MAAM,iBAAiB,GAAU,MAAM,MAAM,gCAanD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,MAAM,oBAAoB,gCAaxE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,iBAAiB,eAAe,gCAazE,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAU,MAAM,oBAAoB,gCAaxE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAU,MAAM,mBAAmB,gCAatE,CAAC;AAEF,eAAO,MAAM,cAAc;gDAiCpB;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;KAClB;wDAsBE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,UAAU,EAAE,CAAC;KACrB;CAyGJ,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,eAEvC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,KAUM,iBACN,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { MessageStatus, } from "@openim/wasm-client-sdk";
|
|
2
2
|
import { DChatSDK } from "../../constants/sdk";
|
|
3
|
-
import dayjs from "dayjs";
|
|
4
3
|
import { v4 as uuidv4 } from "uuid";
|
|
5
4
|
import { useChatContext } from "../../context/ChatContext";
|
|
6
5
|
import { useCallback } from "react";
|
|
7
6
|
import { pushNewMessage, updateOneMessage } from "./useMessage";
|
|
8
7
|
import { emit } from "../../utils/events";
|
|
9
8
|
import useConversationStore from "../../store/conversation";
|
|
9
|
+
import useAuthStore from "../../store/auth";
|
|
10
10
|
export const createTextMessage = async (text) => {
|
|
11
11
|
let textMessage = await DChatSDK.createTextMessage(text, new Date().getTime().toString())
|
|
12
12
|
.then(({ data }) => {
|
|
@@ -62,7 +62,7 @@ export const createFileMessageByFile = async (file) => {
|
|
|
62
62
|
});
|
|
63
63
|
return fileMessage;
|
|
64
64
|
};
|
|
65
|
-
export const useSendMessage = (
|
|
65
|
+
export const useSendMessage = () => {
|
|
66
66
|
const { user } = useChatContext();
|
|
67
67
|
const conversationData = useConversationStore((state) => state.conversationData);
|
|
68
68
|
const { userID: recvID, groupID } = conversationData || {};
|
|
@@ -89,12 +89,10 @@ export const useSendMessage = (lastMessage) => {
|
|
|
89
89
|
return;
|
|
90
90
|
const extendMessageInfo = generateExtendMessageInfo({
|
|
91
91
|
richText,
|
|
92
|
-
currentUserID: (user === null || user === void 0 ? void 0 : user.userID) || "",
|
|
93
|
-
lastMessage,
|
|
94
92
|
});
|
|
95
93
|
const messageItem = Object.assign(Object.assign({}, textMessage), { ex: JSON.stringify(extendMessageInfo) || "{}" });
|
|
96
94
|
sendMessage(messageItem);
|
|
97
|
-
}, [recvID, groupID, user, sendMessage
|
|
95
|
+
}, [recvID, groupID, user, sendMessage]);
|
|
98
96
|
const sendMergeMessage = useCallback(async ({ richText, plainText, files, }) => {
|
|
99
97
|
if (!recvID && !groupID)
|
|
100
98
|
return;
|
|
@@ -127,13 +125,7 @@ export const useSendMessage = (lastMessage) => {
|
|
|
127
125
|
const imageMessage = await createImageMessageByFile(parsedImage);
|
|
128
126
|
if (!imageMessage)
|
|
129
127
|
continue;
|
|
130
|
-
|
|
131
|
-
currentUserID: (user === null || user === void 0 ? void 0 : user.userID) || "",
|
|
132
|
-
lastMessage: messageList.length > 0
|
|
133
|
-
? messageList[messageList.length - 1]
|
|
134
|
-
: lastMessage,
|
|
135
|
-
});
|
|
136
|
-
messageList.push(Object.assign(Object.assign({}, imageMessage), { ex: JSON.stringify(extendMessageInfo) || "{}" }));
|
|
128
|
+
messageList.push(imageMessage);
|
|
137
129
|
}
|
|
138
130
|
else if (isVideo) {
|
|
139
131
|
const videoBaseInfo = await createVideoInfoWithThumbnail(file);
|
|
@@ -159,13 +151,7 @@ export const useSendMessage = (lastMessage) => {
|
|
|
159
151
|
});
|
|
160
152
|
if (!videoMessage)
|
|
161
153
|
continue;
|
|
162
|
-
|
|
163
|
-
currentUserID: (user === null || user === void 0 ? void 0 : user.userID) || "",
|
|
164
|
-
lastMessage: messageList.length > 0
|
|
165
|
-
? messageList[messageList.length - 1]
|
|
166
|
-
: lastMessage,
|
|
167
|
-
});
|
|
168
|
-
messageList.push(Object.assign(Object.assign({}, videoMessage), { ex: JSON.stringify(extendMessageInfo) || "{}" }));
|
|
154
|
+
messageList.push(videoMessage);
|
|
169
155
|
}
|
|
170
156
|
else if (isDocument) {
|
|
171
157
|
const fileMessage = await createFileMessageByFile({
|
|
@@ -179,13 +165,7 @@ export const useSendMessage = (lastMessage) => {
|
|
|
179
165
|
});
|
|
180
166
|
if (!fileMessage)
|
|
181
167
|
continue;
|
|
182
|
-
|
|
183
|
-
currentUserID: (user === null || user === void 0 ? void 0 : user.userID) || "",
|
|
184
|
-
lastMessage: messageList.length > 0
|
|
185
|
-
? messageList[messageList.length - 1]
|
|
186
|
-
: lastMessage,
|
|
187
|
-
});
|
|
188
|
-
messageList.push(Object.assign(Object.assign({}, fileMessage), { ex: JSON.stringify(extendMessageInfo) || "{}" }));
|
|
168
|
+
messageList.push(fileMessage);
|
|
189
169
|
}
|
|
190
170
|
}
|
|
191
171
|
catch (err) {
|
|
@@ -195,10 +175,6 @@ export const useSendMessage = (lastMessage) => {
|
|
|
195
175
|
if (!!plainText && plainText.trim() !== "") {
|
|
196
176
|
const extendMessageInfo = generateExtendMessageInfo({
|
|
197
177
|
richText,
|
|
198
|
-
currentUserID: (user === null || user === void 0 ? void 0 : user.userID) || "",
|
|
199
|
-
lastMessage: messageList.length > 0
|
|
200
|
-
? messageList[messageList.length - 1]
|
|
201
|
-
: lastMessage,
|
|
202
178
|
});
|
|
203
179
|
const textMessage = await createTextMessage(plainText);
|
|
204
180
|
if (!textMessage)
|
|
@@ -209,20 +185,14 @@ export const useSendMessage = (lastMessage) => {
|
|
|
209
185
|
for (const message of messageList) {
|
|
210
186
|
await sendMessage(message);
|
|
211
187
|
}
|
|
212
|
-
}, [recvID, groupID,
|
|
188
|
+
}, [recvID, groupID, sendMessage]);
|
|
213
189
|
return {
|
|
214
190
|
sendTextMessage,
|
|
215
191
|
sendMergeMessage,
|
|
216
192
|
};
|
|
217
193
|
};
|
|
218
|
-
export const generateExtendMessageInfo = ({ richText,
|
|
219
|
-
const diffSendTime = dayjs().diff(lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.sendTime, "minutes");
|
|
220
|
-
const isSameSender = (lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.sendID) === currentUserID;
|
|
221
|
-
const lastMessageExtendMessageInfo = JSON.parse((lastMessage === null || lastMessage === void 0 ? void 0 : lastMessage.ex) || "{}");
|
|
194
|
+
export const generateExtendMessageInfo = ({ richText, }) => {
|
|
222
195
|
return {
|
|
223
|
-
groupMessageID: isSameSender && diffSendTime <= 5
|
|
224
|
-
? (lastMessageExtendMessageInfo === null || lastMessageExtendMessageInfo === void 0 ? void 0 : lastMessageExtendMessageInfo.groupMessageID) || uuidv4()
|
|
225
|
-
: uuidv4(),
|
|
226
196
|
messageInfo: {
|
|
227
197
|
type: "MESSAGE_INFO",
|
|
228
198
|
data: {
|
|
@@ -230,7 +200,7 @@ export const generateExtendMessageInfo = ({ richText, currentUserID, lastMessage
|
|
|
230
200
|
content: richText || "",
|
|
231
201
|
},
|
|
232
202
|
},
|
|
233
|
-
applicationType:
|
|
203
|
+
applicationType: useAuthStore.getState().applicationType,
|
|
234
204
|
};
|
|
235
205
|
};
|
|
236
206
|
const createPicBaseInfoFromFile = (file) => new Promise((resolve, reject) => {
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { SearchMessageItem, SearchMessageRequest, SearchMessageResponse } from "../../types/dto";
|
|
2
|
+
interface UseSearchMessagePayload {
|
|
3
|
+
payload: Pick<SearchMessageRequest, "contentType" | "pageSize" | "recvID" | "searchTerm">;
|
|
4
|
+
options?: {
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare const useSearchMessage: ({ payload, options, }: UseSearchMessagePayload) => {
|
|
9
|
+
error: Error;
|
|
10
|
+
isError: true;
|
|
11
|
+
isPending: false;
|
|
12
|
+
isLoadingError: false;
|
|
13
|
+
isRefetchError: true;
|
|
14
|
+
isSuccess: false;
|
|
15
|
+
isPlaceholderData: false;
|
|
16
|
+
status: "error";
|
|
17
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
18
|
+
hasPreviousPage: boolean;
|
|
19
|
+
isFetchNextPageError: boolean;
|
|
20
|
+
isFetchPreviousPageError: boolean;
|
|
21
|
+
isFetchingPreviousPage: boolean;
|
|
22
|
+
dataUpdatedAt: number;
|
|
23
|
+
errorUpdatedAt: number;
|
|
24
|
+
failureCount: number;
|
|
25
|
+
failureReason: Error | null;
|
|
26
|
+
errorUpdateCount: number;
|
|
27
|
+
isFetched: boolean;
|
|
28
|
+
isFetchedAfterMount: boolean;
|
|
29
|
+
isFetching: boolean;
|
|
30
|
+
isInitialLoading: boolean;
|
|
31
|
+
isPaused: boolean;
|
|
32
|
+
isRefetching: boolean;
|
|
33
|
+
isStale: boolean;
|
|
34
|
+
isEnabled: boolean;
|
|
35
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
36
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
37
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>>;
|
|
38
|
+
data: import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown> | undefined;
|
|
39
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
40
|
+
hasNextPage: boolean;
|
|
41
|
+
isFetchingNextPage: boolean;
|
|
42
|
+
isLoading: boolean;
|
|
43
|
+
groupedData: Record<string, SearchMessageItem[]>;
|
|
44
|
+
dataFlatten: SearchMessageItem[];
|
|
45
|
+
} | {
|
|
46
|
+
error: null;
|
|
47
|
+
isError: false;
|
|
48
|
+
isPending: false;
|
|
49
|
+
isLoadingError: false;
|
|
50
|
+
isRefetchError: false;
|
|
51
|
+
isFetchNextPageError: false;
|
|
52
|
+
isFetchPreviousPageError: false;
|
|
53
|
+
isSuccess: true;
|
|
54
|
+
isPlaceholderData: false;
|
|
55
|
+
status: "success";
|
|
56
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
57
|
+
hasPreviousPage: boolean;
|
|
58
|
+
isFetchingPreviousPage: boolean;
|
|
59
|
+
dataUpdatedAt: number;
|
|
60
|
+
errorUpdatedAt: number;
|
|
61
|
+
failureCount: number;
|
|
62
|
+
failureReason: Error | null;
|
|
63
|
+
errorUpdateCount: number;
|
|
64
|
+
isFetched: boolean;
|
|
65
|
+
isFetchedAfterMount: boolean;
|
|
66
|
+
isFetching: boolean;
|
|
67
|
+
isInitialLoading: boolean;
|
|
68
|
+
isPaused: boolean;
|
|
69
|
+
isRefetching: boolean;
|
|
70
|
+
isStale: boolean;
|
|
71
|
+
isEnabled: boolean;
|
|
72
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
73
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
74
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>>;
|
|
75
|
+
data: import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown> | undefined;
|
|
76
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
77
|
+
hasNextPage: boolean;
|
|
78
|
+
isFetchingNextPage: boolean;
|
|
79
|
+
isLoading: boolean;
|
|
80
|
+
groupedData: Record<string, SearchMessageItem[]>;
|
|
81
|
+
dataFlatten: SearchMessageItem[];
|
|
82
|
+
} | {
|
|
83
|
+
error: Error;
|
|
84
|
+
isError: true;
|
|
85
|
+
isPending: false;
|
|
86
|
+
isLoadingError: true;
|
|
87
|
+
isRefetchError: false;
|
|
88
|
+
isFetchNextPageError: false;
|
|
89
|
+
isFetchPreviousPageError: false;
|
|
90
|
+
isSuccess: false;
|
|
91
|
+
isPlaceholderData: false;
|
|
92
|
+
status: "error";
|
|
93
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
94
|
+
hasPreviousPage: boolean;
|
|
95
|
+
isFetchingPreviousPage: boolean;
|
|
96
|
+
dataUpdatedAt: number;
|
|
97
|
+
errorUpdatedAt: number;
|
|
98
|
+
failureCount: number;
|
|
99
|
+
failureReason: Error | null;
|
|
100
|
+
errorUpdateCount: number;
|
|
101
|
+
isFetched: boolean;
|
|
102
|
+
isFetchedAfterMount: boolean;
|
|
103
|
+
isFetching: boolean;
|
|
104
|
+
isInitialLoading: boolean;
|
|
105
|
+
isPaused: boolean;
|
|
106
|
+
isRefetching: boolean;
|
|
107
|
+
isStale: boolean;
|
|
108
|
+
isEnabled: boolean;
|
|
109
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
110
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
111
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>>;
|
|
112
|
+
data: import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown> | undefined;
|
|
113
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
114
|
+
hasNextPage: boolean;
|
|
115
|
+
isFetchingNextPage: boolean;
|
|
116
|
+
isLoading: boolean;
|
|
117
|
+
groupedData: Record<string, SearchMessageItem[]>;
|
|
118
|
+
dataFlatten: SearchMessageItem[];
|
|
119
|
+
} | {
|
|
120
|
+
error: null;
|
|
121
|
+
isError: false;
|
|
122
|
+
isPending: true;
|
|
123
|
+
isLoadingError: false;
|
|
124
|
+
isRefetchError: false;
|
|
125
|
+
isFetchNextPageError: false;
|
|
126
|
+
isFetchPreviousPageError: false;
|
|
127
|
+
isSuccess: false;
|
|
128
|
+
isPlaceholderData: false;
|
|
129
|
+
status: "pending";
|
|
130
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
131
|
+
hasPreviousPage: boolean;
|
|
132
|
+
isFetchingPreviousPage: boolean;
|
|
133
|
+
dataUpdatedAt: number;
|
|
134
|
+
errorUpdatedAt: number;
|
|
135
|
+
failureCount: number;
|
|
136
|
+
failureReason: Error | null;
|
|
137
|
+
errorUpdateCount: number;
|
|
138
|
+
isFetched: boolean;
|
|
139
|
+
isFetchedAfterMount: boolean;
|
|
140
|
+
isFetching: boolean;
|
|
141
|
+
isInitialLoading: boolean;
|
|
142
|
+
isPaused: boolean;
|
|
143
|
+
isRefetching: boolean;
|
|
144
|
+
isStale: boolean;
|
|
145
|
+
isEnabled: boolean;
|
|
146
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
147
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
148
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>>;
|
|
149
|
+
data: import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown> | undefined;
|
|
150
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
151
|
+
hasNextPage: boolean;
|
|
152
|
+
isFetchingNextPage: boolean;
|
|
153
|
+
isLoading: boolean;
|
|
154
|
+
groupedData: Record<string, SearchMessageItem[]>;
|
|
155
|
+
dataFlatten: SearchMessageItem[];
|
|
156
|
+
} | {
|
|
157
|
+
error: null;
|
|
158
|
+
isError: false;
|
|
159
|
+
isPending: true;
|
|
160
|
+
isLoadingError: false;
|
|
161
|
+
isRefetchError: false;
|
|
162
|
+
isFetchNextPageError: false;
|
|
163
|
+
isFetchPreviousPageError: false;
|
|
164
|
+
isSuccess: false;
|
|
165
|
+
isPlaceholderData: false;
|
|
166
|
+
status: "pending";
|
|
167
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
168
|
+
hasPreviousPage: boolean;
|
|
169
|
+
isFetchingPreviousPage: boolean;
|
|
170
|
+
dataUpdatedAt: number;
|
|
171
|
+
errorUpdatedAt: number;
|
|
172
|
+
failureCount: number;
|
|
173
|
+
failureReason: Error | null;
|
|
174
|
+
errorUpdateCount: number;
|
|
175
|
+
isFetched: boolean;
|
|
176
|
+
isFetchedAfterMount: boolean;
|
|
177
|
+
isFetching: boolean;
|
|
178
|
+
isInitialLoading: boolean;
|
|
179
|
+
isPaused: boolean;
|
|
180
|
+
isRefetching: boolean;
|
|
181
|
+
isStale: boolean;
|
|
182
|
+
isEnabled: boolean;
|
|
183
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
184
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
185
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>>;
|
|
186
|
+
data: import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown> | undefined;
|
|
187
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
188
|
+
hasNextPage: boolean;
|
|
189
|
+
isFetchingNextPage: boolean;
|
|
190
|
+
isLoading: boolean;
|
|
191
|
+
groupedData: Record<string, SearchMessageItem[]>;
|
|
192
|
+
dataFlatten: SearchMessageItem[];
|
|
193
|
+
} | {
|
|
194
|
+
isError: false;
|
|
195
|
+
error: null;
|
|
196
|
+
isPending: false;
|
|
197
|
+
isLoadingError: false;
|
|
198
|
+
isRefetchError: false;
|
|
199
|
+
isSuccess: true;
|
|
200
|
+
isPlaceholderData: true;
|
|
201
|
+
isFetchNextPageError: false;
|
|
202
|
+
isFetchPreviousPageError: false;
|
|
203
|
+
status: "success";
|
|
204
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
205
|
+
hasPreviousPage: boolean;
|
|
206
|
+
isFetchingPreviousPage: boolean;
|
|
207
|
+
dataUpdatedAt: number;
|
|
208
|
+
errorUpdatedAt: number;
|
|
209
|
+
failureCount: number;
|
|
210
|
+
failureReason: Error | null;
|
|
211
|
+
errorUpdateCount: number;
|
|
212
|
+
isFetched: boolean;
|
|
213
|
+
isFetchedAfterMount: boolean;
|
|
214
|
+
isFetching: boolean;
|
|
215
|
+
isInitialLoading: boolean;
|
|
216
|
+
isPaused: boolean;
|
|
217
|
+
isRefetching: boolean;
|
|
218
|
+
isStale: boolean;
|
|
219
|
+
isEnabled: boolean;
|
|
220
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
221
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
222
|
+
promise: Promise<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>>;
|
|
223
|
+
data: import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown> | undefined;
|
|
224
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<SearchMessageResponse, unknown>, Error>>;
|
|
225
|
+
hasNextPage: boolean;
|
|
226
|
+
isFetchingNextPage: boolean;
|
|
227
|
+
isLoading: boolean;
|
|
228
|
+
groupedData: Record<string, SearchMessageItem[]>;
|
|
229
|
+
dataFlatten: SearchMessageItem[];
|
|
230
|
+
};
|
|
231
|
+
export {};
|
|
232
|
+
//# sourceMappingURL=useSearchMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSearchMessage.d.ts","sourceRoot":"","sources":["../../../src/hooks/search/useSearchMessage.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAMzB,UAAU,uBAAuB;IAC/B,OAAO,EAAE,IAAI,CACX,oBAAoB,EACpB,aAAa,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CACrD,CAAC;IACF,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjC;AAED,eAAO,MAAM,gBAAgB,GAAI,uBAG9B,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEzB,CAAC"}
|