@ethora/chat-component 24.12.33 → 24.12.35
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/MainComponents/ChooseChatMessage.d.ts +5 -0
- package/dist/components/MainComponents/MessageContainer.d.ts +18 -0
- package/dist/components/MainComponents/MessageList.d.ts +2 -2
- package/dist/components/MainComponents/ProfileImagePlaceholder.d.ts +2 -0
- package/dist/components/MainComponents/Switch.d.ts +10 -0
- package/dist/components/MenuRoom/MenuRoom.d.ts +7 -0
- package/dist/components/MessageBubble/MessageReply.d.ts +2 -0
- package/dist/components/Thread/ThreadWrapper.d.ts +1 -0
- package/dist/components/styled/MessageImage.d.ts +3 -2
- package/dist/components/styled/StyledComponents.d.ts +19 -0
- package/dist/components/styled/UnsupportedType.d.ts +2 -3
- package/dist/components/styled/VideoMessage.d.ts +3 -1
- package/dist/helpers/constants/PLATFORM_CONSTANTS.d.ts +1 -0
- package/dist/helpers/createMainMessageForThread.d.ts +3 -0
- package/dist/helpers/hashcolor.d.ts +4 -0
- package/dist/hooks/useChatSettingState.d.ts +9 -0
- package/dist/hooks/useComposing.d.ts +5 -0
- package/dist/hooks/useMessageLoaderQueue.d.ts +1 -1
- package/dist/hooks/useRoomInitialization.d.ts +3 -0
- package/dist/hooks/useRoomState.d.ts +11 -0
- package/dist/hooks/useRoomUrl.d.ts +3 -0
- package/dist/hooks/useSendMessage.d.ts +4 -0
- package/dist/main.js +6536 -6453
- package/dist/main.js.map +1 -1
- package/dist/networking/xmpp/actionSetTimestampToPrivateStore.xmpp.d.ts +1 -1
- package/dist/networking/xmpp/getRooms.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/handleStanzas.xmpp.d.ts +1 -0
- package/dist/networking/xmpp/inviteRoomRequest.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/setVCard.xmpp.d.ts +1 -0
- package/dist/networking/xmppClient.d.ts +6 -11
- package/dist/roomStore/chatSettingsSlice.d.ts +4 -4
- package/dist/types/types.d.ts +44 -1
- package/package.json +1 -1
- package/dist/components/Thread/ThreadRoom.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function actionSetTimestampToPrivateStore(client: any, chatId: string, timestamp: number): Promise<boolean>;
|
|
1
|
+
export declare function actionSetTimestampToPrivateStore(client: any, chatId: string, timestamp: number, chats?: string[]): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handleStanza(stanza: any, xmppWs: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setVcard(fullname: string, client: any): void;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
|
+
import { XmppClientInterface } from '../types/types';
|
|
2
3
|
|
|
3
|
-
export declare class XmppClient {
|
|
4
|
+
export declare class XmppClient implements XmppClientInterface {
|
|
4
5
|
client: Client;
|
|
5
6
|
devServer: string | undefined;
|
|
6
7
|
host: string;
|
|
7
8
|
service: string;
|
|
8
9
|
conference: string;
|
|
9
10
|
username: string;
|
|
10
|
-
onclose: () => void;
|
|
11
|
-
onmessage: (data: any) => void;
|
|
12
11
|
status: string;
|
|
13
|
-
activeChat: string;
|
|
14
12
|
password: string;
|
|
15
|
-
resource: string;
|
|
16
13
|
reconnectAttempts: number;
|
|
17
14
|
maxReconnectAttempts: number;
|
|
18
15
|
reconnectDelay: number;
|
|
@@ -20,14 +17,12 @@ export declare class XmppClient {
|
|
|
20
17
|
constructor(username: string, password: string, devServer?: string);
|
|
21
18
|
initializeClient(): void;
|
|
22
19
|
attachEventListeners(): void;
|
|
23
|
-
handleStanza(stanza: any): void;
|
|
24
20
|
scheduleReconnect(): void;
|
|
25
21
|
reconnect(): void;
|
|
26
22
|
close(): Promise<void>;
|
|
27
|
-
|
|
28
|
-
getRooms: () => Promise<unknown>;
|
|
23
|
+
getRoomsStanza: () => Promise<void>;
|
|
29
24
|
createRoomStanza(title: string, description: string, to?: string): Promise<string>;
|
|
30
|
-
|
|
25
|
+
inviteRoomRequestStanza(to: string, roomJid: string): Promise<void>;
|
|
31
26
|
leaveTheRoomStanza: (roomJID: string) => void;
|
|
32
27
|
presenceInRoomStanza: (roomJID: string) => void;
|
|
33
28
|
getHistoryStanza: (chatJID: string, max: number, before?: number, id?: string) => Promise<any>;
|
|
@@ -35,13 +30,13 @@ export declare class XmppClient {
|
|
|
35
30
|
setRoomImageStanza: (roomJid: string, roomThumbnail: string, type: string, roomBackground?: string) => void;
|
|
36
31
|
getRoomInfoStanza: (roomJID: string) => void;
|
|
37
32
|
getRoomMembersStanza: (roomJID: string) => void;
|
|
33
|
+
setVCardStanza(xmppUsername: string): void;
|
|
38
34
|
sendMessage: (roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string) => void;
|
|
39
35
|
deleteMessageStanza(room: string, msgId: string): void;
|
|
40
36
|
editMessageStanza(room: string, msgId: string, text: string): void;
|
|
41
37
|
sendTypingRequestStanza(chatId: string, fullName: string, start: boolean): void;
|
|
42
38
|
getChatsPrivateStoreRequestStanza: () => Promise<unknown>;
|
|
43
|
-
|
|
44
|
-
actionSetTimestampToPrivateStoreStanza(chatId: string, timestamp: number): Promise<void>;
|
|
39
|
+
actionSetTimestampToPrivateStoreStanza(chatId: string, timestamp: number, chats?: string[]): Promise<void>;
|
|
45
40
|
sendMediaMessageStanza(roomJID: string, data: any): void;
|
|
46
41
|
}
|
|
47
42
|
export default XmppClient;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import { DeleteModal, IConfig, IUser, ModalType, User } from '../types/types';
|
|
2
|
+
import { DeleteModal, IConfig, IUser, ModalFile, ModalType, User } from '../types/types';
|
|
3
3
|
|
|
4
4
|
interface ChatState {
|
|
5
5
|
user: User;
|
|
@@ -7,7 +7,7 @@ interface ChatState {
|
|
|
7
7
|
activeModal?: ModalType;
|
|
8
8
|
deleteModal?: DeleteModal;
|
|
9
9
|
selectedUser?: IUser;
|
|
10
|
-
activeFile?:
|
|
10
|
+
activeFile?: ModalFile;
|
|
11
11
|
client?: any;
|
|
12
12
|
}
|
|
13
13
|
export declare const chatSlice: import('@reduxjs/toolkit').Slice<ChatState, {
|
|
@@ -17,7 +17,7 @@ export declare const chatSlice: import('@reduxjs/toolkit').Slice<ChatState, {
|
|
|
17
17
|
}>): void;
|
|
18
18
|
setConfig: (state: import('immer').WritableDraft<ChatState>, action: PayloadAction<IConfig | undefined>) => void;
|
|
19
19
|
setActiveModal: (state: import('immer').WritableDraft<ChatState>, action: PayloadAction<ModalType | undefined>) => void;
|
|
20
|
-
setActiveFile: (state: import('immer').WritableDraft<ChatState>, action: PayloadAction<
|
|
20
|
+
setActiveFile: (state: import('immer').WritableDraft<ChatState>, action: PayloadAction<ModalFile>) => void;
|
|
21
21
|
setDeleteModal: (state: import('immer').WritableDraft<ChatState>, action: PayloadAction<DeleteModal | undefined>) => void;
|
|
22
22
|
setStoreClient: (state: import('immer').WritableDraft<ChatState>, action: PayloadAction<any>) => void;
|
|
23
23
|
setSelectedUser: (state: import('immer').WritableDraft<ChatState>, action: PayloadAction<IUser | undefined>) => void;
|
|
@@ -32,6 +32,6 @@ export declare const setUser: import('@reduxjs/toolkit').ActionCreatorWithOption
|
|
|
32
32
|
refreshToken: string;
|
|
33
33
|
}, "chat/refreshTokens">, logout: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"chat/logout">, setActiveModal: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "chat/setActiveModal">, setDeleteModal: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<DeleteModal, "chat/setDeleteModal">, setSelectedUser: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<IUser, "chat/setSelectedUser">, updateUser: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
34
34
|
updates: Partial<User>;
|
|
35
|
-
}, "chat/updateUser">, setActiveFile: import('@reduxjs/toolkit').
|
|
35
|
+
}, "chat/updateUser">, setActiveFile: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<ModalFile, "chat/setActiveFile">, setStoreClient: import('@reduxjs/toolkit').ActionCreatorWithPayload<any, "chat/setStoreClient">;
|
|
36
36
|
declare const _default: import('redux').Reducer<ChatState>;
|
|
37
37
|
export default _default;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Client } from '@xmpp/client';
|
|
1
2
|
import { MODAL_TYPES } from '../helpers/constants/MODAL_TYPES';
|
|
2
3
|
|
|
3
4
|
export interface IUser extends Partial<User> {
|
|
@@ -183,7 +184,7 @@ export interface StorageUser {
|
|
|
183
184
|
export interface MessageProps {
|
|
184
185
|
message: IMessage;
|
|
185
186
|
isUser: boolean;
|
|
186
|
-
isReply
|
|
187
|
+
isReply: boolean;
|
|
187
188
|
}
|
|
188
189
|
export interface MediaMessageType {
|
|
189
190
|
}
|
|
@@ -199,4 +200,46 @@ export interface EditAction {
|
|
|
199
200
|
text?: string;
|
|
200
201
|
}
|
|
201
202
|
export type ModalType = (typeof MODAL_TYPES)[keyof typeof MODAL_TYPES];
|
|
203
|
+
export interface ModalFile {
|
|
204
|
+
fileName: string;
|
|
205
|
+
fileURL: string;
|
|
206
|
+
mimetype: string;
|
|
207
|
+
}
|
|
208
|
+
export interface XmppClientInterface {
|
|
209
|
+
client: Client;
|
|
210
|
+
devServer?: string;
|
|
211
|
+
host: string;
|
|
212
|
+
service: string;
|
|
213
|
+
conference: string;
|
|
214
|
+
username: string;
|
|
215
|
+
status: string;
|
|
216
|
+
password: string;
|
|
217
|
+
reconnectAttempts: number;
|
|
218
|
+
maxReconnectAttempts: number;
|
|
219
|
+
reconnectDelay: number;
|
|
220
|
+
checkOnline(): boolean;
|
|
221
|
+
initializeClient(): void;
|
|
222
|
+
attachEventListeners(): void;
|
|
223
|
+
scheduleReconnect(): void;
|
|
224
|
+
reconnect(): void;
|
|
225
|
+
close(): Promise<void>;
|
|
226
|
+
getRoomsStanza(): Promise<void>;
|
|
227
|
+
createRoomStanza(title: string, description: string, to?: string): Promise<any>;
|
|
228
|
+
inviteRoomRequestStanza(to: string, roomJid: string): Promise<void>;
|
|
229
|
+
leaveTheRoomStanza(roomJID: string): void;
|
|
230
|
+
presenceInRoomStanza(roomJID: string): void;
|
|
231
|
+
getHistoryStanza(chatJID: string, max: number, before?: number, id?: string): Promise<any>;
|
|
232
|
+
getLastMessageArchiveStanza(roomJID: string): void;
|
|
233
|
+
setRoomImageStanza(roomJid: string, roomThumbnail: string, type: string, roomBackground?: string): void;
|
|
234
|
+
getRoomInfoStanza(roomJID: string): void;
|
|
235
|
+
getRoomMembersStanza(roomJID: string): void;
|
|
236
|
+
setVCardStanza(xmppUsername: string): void;
|
|
237
|
+
sendMessage(roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string): void;
|
|
238
|
+
deleteMessageStanza(room: string, msgId: string): void;
|
|
239
|
+
editMessageStanza(room: string, msgId: string, text: string): void;
|
|
240
|
+
sendTypingRequestStanza(chatId: string, fullName: string, start: boolean): void;
|
|
241
|
+
getChatsPrivateStoreRequestStanza(): Promise<any>;
|
|
242
|
+
actionSetTimestampToPrivateStoreStanza(chatId: string, timestamp: number, chats?: string[]): Promise<void>;
|
|
243
|
+
sendMediaMessageStanza(roomJID: string, data: any): void;
|
|
244
|
+
}
|
|
202
245
|
export {};
|
package/package.json
CHANGED
|
File without changes
|