@ethora/chat-component 24.11.25 → 24.11.27
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/OperationalModal/OperationalModal.d.ts +9 -0
- package/dist/components/RoomComponents/ChatRoomItem.d.ts +12 -0
- package/dist/components/styled/StyledInputComponents/Composing.d.ts +1 -1
- package/dist/helpers/constants/PLATFORM_CONSTANTS.d.ts +1 -0
- package/dist/main.js +8953 -8206
- package/dist/main.js.map +1 -1
- package/dist/networking/stanzaHandlers.d.ts +3 -2
- package/dist/networking/xmpp/createRoom.xmpp.d.ts +1 -1
- package/dist/networking/xmpp/getHistory.xmpp.d.ts +1 -1
- package/dist/networking/xmpp/getLastMessageArchive.xmpp.d.ts +1 -1
- package/dist/networking/xmppClient.d.ts +3 -2
- package/dist/roomStore/Middleware/unreadMidlleware.d.ts +3 -0
- package/dist/roomStore/roomsSlice.d.ts +2 -0
- package/dist/types/types.d.ts +8 -0
- package/package.json +4 -1
|
@@ -36,9 +36,10 @@ declare const onRealtimeMessage: (stanza: Element) => Promise<any>;
|
|
|
36
36
|
declare const onMessageHistory: (stanza: any) => Promise<void>;
|
|
37
37
|
declare const handleComposing: (stanza: Element, currentUser: string) => Promise<void>;
|
|
38
38
|
declare const onPresenceInRoom: (stanza: Element | any) => void;
|
|
39
|
+
declare const onChatInvite: (stanza: Element, client: any) => Promise<void>;
|
|
39
40
|
declare const onGetMembers: (stanza: Element) => void;
|
|
40
41
|
declare const onGetRoomInfo: (stanza: Element) => void;
|
|
41
|
-
declare const onGetLastMessageArchive: (stanza: Element, xmpp: any) =>
|
|
42
|
+
declare const onGetLastMessageArchive: (stanza: Element, xmpp: any) => void;
|
|
42
43
|
declare const onNewRoomCreated: (stanza: Element, xmpp: any) => void;
|
|
43
44
|
declare const onGetChatRooms: (stanza: Element, xmpp: any) => void;
|
|
44
|
-
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, };
|
|
45
|
+
export { onRealtimeMessage, onMessageHistory, onPresenceInRoom, onGetLastMessageArchive, handleComposing, onGetChatRooms, onNewRoomCreated, onGetMembers, onGetRoomInfo, onChatInvite, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
2
|
|
|
3
|
-
export declare const getHistory: (client: Client, chatJID: string, max: number, before?: number) => Promise<unknown>;
|
|
3
|
+
export declare const getHistory: (client: Client, chatJID: string, max: number, before?: number, otherId?: string) => Promise<unknown>;
|
|
@@ -26,10 +26,11 @@ export declare class XmppClient {
|
|
|
26
26
|
close(): void;
|
|
27
27
|
unsubscribe(address: string): void;
|
|
28
28
|
getRooms: () => Promise<unknown>;
|
|
29
|
-
createRoomStanza(title: string, description: string): Promise<string>;
|
|
29
|
+
createRoomStanza(title: string, description: string, to?: string): Promise<string>;
|
|
30
|
+
inviteRoomRequest(to: string, roomJid: string): Promise<void>;
|
|
30
31
|
leaveTheRoomStanza: (roomJID: string) => void;
|
|
31
32
|
presenceInRoomStanza: (roomJID: string) => void;
|
|
32
|
-
getHistoryStanza: (chatJID: string, max: number, before?: number) => Promise<void>;
|
|
33
|
+
getHistoryStanza: (chatJID: string, max: number, before?: number, id?: string) => Promise<void>;
|
|
33
34
|
getLastMessageArchiveStanza(roomJID: string): void;
|
|
34
35
|
setRoomImageStanza: (roomJid: string, roomThumbnail: string, type: string, roomBackground?: string) => void;
|
|
35
36
|
getRoomInfoStanza: (roomJID: string) => void;
|
|
@@ -36,6 +36,7 @@ export declare const roomsStore: import('@reduxjs/toolkit').Slice<RoomMessagesSt
|
|
|
36
36
|
setComposing(state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
|
|
37
37
|
chatJID: string;
|
|
38
38
|
composing: boolean;
|
|
39
|
+
composingList?: string[];
|
|
39
40
|
}>): void;
|
|
40
41
|
setIsLoading: (state: import('immer').WritableDraft<RoomMessagesState>, action: PayloadAction<{
|
|
41
42
|
chatJID?: string;
|
|
@@ -73,6 +74,7 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
|
|
|
73
74
|
}, "roomMessages/deleteRoomMessage">, setComposing: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
74
75
|
chatJID: string;
|
|
75
76
|
composing: boolean;
|
|
77
|
+
composingList?: string[];
|
|
76
78
|
}, "roomMessages/setComposing">, setIsLoading: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
77
79
|
chatJID?: string;
|
|
78
80
|
loading: boolean;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -144,6 +144,13 @@ export interface IConfig {
|
|
|
144
144
|
chatRoomStyles?: React.CSSProperties;
|
|
145
145
|
setRoomJidInPath?: boolean;
|
|
146
146
|
disableRoomMenu?: boolean;
|
|
147
|
+
defaultRooms?: string[] | ConfigRoom[];
|
|
148
|
+
disableRefresh?: boolean;
|
|
149
|
+
}
|
|
150
|
+
interface ConfigRoom {
|
|
151
|
+
jid: string;
|
|
152
|
+
pinned: boolean;
|
|
153
|
+
_id?: string;
|
|
147
154
|
}
|
|
148
155
|
export interface StorageUser {
|
|
149
156
|
appId: string;
|
|
@@ -169,3 +176,4 @@ export interface MessageProps {
|
|
|
169
176
|
export interface MediaMessageType {
|
|
170
177
|
}
|
|
171
178
|
export type ModalType = (typeof MODAL_TYPES)[keyof typeof MODAL_TYPES];
|
|
179
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethora/chat-component",
|
|
3
|
-
"version": "24.11.
|
|
3
|
+
"version": "24.11.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -23,10 +23,13 @@
|
|
|
23
23
|
"@xmpp/client": "^0.13.1",
|
|
24
24
|
"axios": "^1.7.2",
|
|
25
25
|
"firebase": "^10.13.2",
|
|
26
|
+
"i": "^0.3.7",
|
|
26
27
|
"js-sha256": "^0.11.0",
|
|
27
28
|
"ltx": "^3.0.0",
|
|
29
|
+
"npm": "^10.9.1",
|
|
28
30
|
"react": "^18.3.1",
|
|
29
31
|
"react-dom": "^18.3.1",
|
|
32
|
+
"react-qr-code": "^2.0.15",
|
|
30
33
|
"react-redux": "^9.1.0",
|
|
31
34
|
"redux": "^5.0.1",
|
|
32
35
|
"redux-saga": "^1.3.0",
|