@ethora/chat-component 25.1.14 → 25.1.16
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/assets/icons.d.ts +5 -0
- package/dist/components/ContextMenu/ContextMenuComponents.d.ts +9 -0
- package/dist/components/MessageBubble/BottomReplyContainer.d.ts +1 -0
- package/dist/components/MessageBubble/MessageInteractions.d.ts +1 -0
- package/dist/components/MessageBubble/MessageReaction.d.ts +10 -0
- package/dist/components/styled/StyledComponents.d.ts +5 -1
- package/dist/main.js +54939 -11468
- package/dist/main.js.map +1 -1
- package/dist/networking/stanzaHandlers.d.ts +3 -1
- package/dist/networking/xmpp/sendMessageReaction.xmpp.d.ts +3 -0
- package/dist/networking/xmppClient.d.ts +1 -0
- package/dist/roomStore/roomsSlice.d.ts +3 -2
- package/dist/style.css +1 -1
- package/dist/types/types.d.ts +19 -0
- package/package.json +4 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Element } from 'ltx';
|
|
2
2
|
|
|
3
3
|
declare const onRealtimeMessage: (stanza: Element) => Promise<import('../types/types').IMessage>;
|
|
4
|
+
declare const onReactionMessage: (stanza: Element) => Promise<void>;
|
|
4
5
|
declare const onDeleteMessage: (stanza: Element) => Promise<void>;
|
|
5
6
|
declare const onEditMessage: (stanza: Element) => Promise<void>;
|
|
7
|
+
declare const onReactionHistory: (stanza: any) => Promise<void>;
|
|
6
8
|
declare const onMessageHistory: (stanza: any) => Promise<void>;
|
|
7
9
|
declare const handleComposing: (stanza: Element, currentUser: string) => Promise<void>;
|
|
8
10
|
declare const onPresenceInRoom: (stanza: Element | any) => void;
|
|
@@ -12,4 +14,4 @@ declare const onGetRoomInfo: (stanza: Element) => void;
|
|
|
12
14
|
declare const onGetLastMessageArchive: (stanza: Element, xmpp: any) => void;
|
|
13
15
|
declare const onNewRoomCreated: (stanza: Element, xmpp: any) => void;
|
|
14
16
|
declare const onGetChatRooms: (stanza: Element, xmpp: any) => void;
|
|
15
|
-
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, onDeleteMessage, onEditMessage, onChatInvite, };
|
|
17
|
+
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onReactionHistory, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, onDeleteMessage, onEditMessage, onReactionMessage, onChatInvite, };
|
|
@@ -35,6 +35,7 @@ export declare class XmppClient implements XmppClientInterface {
|
|
|
35
35
|
sendTextMessageWithTranslateTagStanza: (roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string) => void;
|
|
36
36
|
deleteMessageStanza(room: string, msgId: string): void;
|
|
37
37
|
editMessageStanza(room: string, msgId: string, text: string): void;
|
|
38
|
+
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], reactionSymbol?: any): void;
|
|
38
39
|
sendTypingRequestStanza(chatId: string, fullName: string, start: boolean): void;
|
|
39
40
|
getChatsPrivateStoreRequestStanza: () => Promise<unknown>;
|
|
40
41
|
actionSetTimestampToPrivateStoreStanza(chatId: string, timestamp: number, chats?: string[]): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import { EditAction, IMessage, IRoom } from '../types/types';
|
|
2
|
+
import { EditAction, IMessage, IRoom, ReactionAction } from '../types/types';
|
|
3
3
|
|
|
4
4
|
interface RoomMessagesState {
|
|
5
5
|
rooms: {
|
|
@@ -28,6 +28,7 @@ export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesSt
|
|
|
28
28
|
roomJID: string;
|
|
29
29
|
messageId: string;
|
|
30
30
|
}>): void;
|
|
31
|
+
setReactions: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<ReactionAction | undefined>) => void;
|
|
31
32
|
setEditAction: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<EditAction | undefined>) => void;
|
|
32
33
|
editRoomMessage(state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
|
|
33
34
|
roomJID: string;
|
|
@@ -108,7 +109,7 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
|
|
|
108
109
|
}, "roomMessages/setCurrentRoom">, setRoomRole: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
109
110
|
chatJID: string;
|
|
110
111
|
role: string;
|
|
111
|
-
}, "roomMessages/setRoomRole">, setLogoutState: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"roomMessages/setLogoutState">, setActiveMessage: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
112
|
+
}, "roomMessages/setRoomRole">, setReactions: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<ReactionAction, "roomMessages/setReactions">, setLogoutState: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"roomMessages/setLogoutState">, setActiveMessage: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
112
113
|
id: string;
|
|
113
114
|
chatJID: string;
|
|
114
115
|
}, "roomMessages/setActiveMessage">, setCloseActiveMessage: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}html,body,#root{height:100%;margin:0;padding:0}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-thumb{background-color:#5e3fde;border-radius:6px}::-webkit-scrollbar-track{background-color:#f0f0f0}*{scrollbar-width:thin;scrollbar-color:#5e3fde #f0f0f0}
|
|
1
|
+
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}html,body,#root{height:100%;margin:0;padding:0}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-thumb{background-color:#5e3fde;border-radius:6px}::-webkit-scrollbar-track{background-color:#f0f0f0}*{scrollbar-width:thin;scrollbar-color:#5e3fde #f0f0f0}.apple-emoji{font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}.emoji-mart{max-width:320px;max-height:360px;overflow-y:auto;border-radius:12px;box-shadow:0 4px 12px #0000001a}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -31,9 +31,14 @@ export interface IMessage {
|
|
|
31
31
|
isDeleted?: boolean;
|
|
32
32
|
mainMessage?: string;
|
|
33
33
|
reply?: IReply[];
|
|
34
|
+
reaction?: Record<string, ReactionMessage>;
|
|
34
35
|
translations?: TranslationObject;
|
|
35
36
|
langSource?: string;
|
|
36
37
|
}
|
|
38
|
+
export interface ReactionMessage {
|
|
39
|
+
emoji: string[];
|
|
40
|
+
data: Record<string, string>;
|
|
41
|
+
}
|
|
37
42
|
export interface IReply extends IMessage {
|
|
38
43
|
}
|
|
39
44
|
export interface IRoom {
|
|
@@ -205,12 +210,24 @@ export interface EditAction {
|
|
|
205
210
|
messageId?: string;
|
|
206
211
|
text?: string;
|
|
207
212
|
}
|
|
213
|
+
export interface ReactionAction {
|
|
214
|
+
roomJID: string;
|
|
215
|
+
messageId: string;
|
|
216
|
+
from: string;
|
|
217
|
+
reactions: string[];
|
|
218
|
+
data?: Record<string, string>;
|
|
219
|
+
}
|
|
208
220
|
export type ModalType = (typeof MODAL_TYPES)[keyof typeof MODAL_TYPES];
|
|
209
221
|
export interface ModalFile {
|
|
210
222
|
fileName: string;
|
|
211
223
|
fileURL: string;
|
|
212
224
|
mimetype: string;
|
|
213
225
|
}
|
|
226
|
+
export interface ReactionAction {
|
|
227
|
+
roomJID: string;
|
|
228
|
+
messageId: string;
|
|
229
|
+
reactions: string[];
|
|
230
|
+
}
|
|
214
231
|
export interface XmppClientInterface {
|
|
215
232
|
client: Client;
|
|
216
233
|
devServer?: string;
|
|
@@ -241,6 +258,7 @@ export interface XmppClientInterface {
|
|
|
241
258
|
getRoomMembersStanza(roomJID: string): void;
|
|
242
259
|
setVCardStanza(xmppUsername: string): void;
|
|
243
260
|
sendMessage(roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string): void;
|
|
261
|
+
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], data: any, reactionSymbol?: any): void;
|
|
244
262
|
deleteMessageStanza(room: string, msgId: string): void;
|
|
245
263
|
editMessageStanza(room: string, msgId: string, text: string): void;
|
|
246
264
|
sendTypingRequestStanza(chatId: string, fullName: string, start: boolean): void;
|
|
@@ -248,6 +266,7 @@ export interface XmppClientInterface {
|
|
|
248
266
|
actionSetTimestampToPrivateStoreStanza(chatId: string, timestamp: number, chats?: string[]): Promise<void>;
|
|
249
267
|
sendMediaMessageStanza(roomJID: string, data: any): void;
|
|
250
268
|
createPrivateRoomStanza(title: string, description: string, to: string): Promise<string>;
|
|
269
|
+
sendMessageReactionStanza(messageId: string, roomJid: string, reactionsList: string[], reactionSymbol?: any): void;
|
|
251
270
|
}
|
|
252
271
|
export type Iso639_1Codes = 'en' | 'es' | 'pt' | 'ht' | 'zh';
|
|
253
272
|
export interface Language {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethora/chat-component",
|
|
3
|
-
"version": "25.01.
|
|
3
|
+
"version": "25.01.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -16,12 +16,15 @@
|
|
|
16
16
|
"lint:fix": "npx eslint --fix && prettier . --write"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@emoji-mart/data": "^1.2.1",
|
|
20
|
+
"@emoji-mart/react": "^1.1.1",
|
|
19
21
|
"@reduxjs/toolkit": "^2.2.1",
|
|
20
22
|
"@types/react": "^18.2.65",
|
|
21
23
|
"@types/react-dom": "^18.2.22",
|
|
22
24
|
"@types/styled-components": "^5.1.34",
|
|
23
25
|
"@xmpp/client": "^0.13.1",
|
|
24
26
|
"axios": "^1.7.2",
|
|
27
|
+
"emoji-mart": "^5.6.0",
|
|
25
28
|
"firebase": "^10.13.2",
|
|
26
29
|
"i": "^0.3.7",
|
|
27
30
|
"js-sha256": "^0.11.0",
|