@ethora/chat-component 25.1.2 → 25.1.10
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/Select.d.ts +16 -0
- package/dist/components/MessageBubble/CustomDivider.d.ts +3 -0
- package/dist/components/MessageBubble/MessageTranslations.d.ts +13 -0
- package/dist/helpers/createMessageFromXml.d.ts +5 -32
- package/dist/helpers/getDataFromXml.d.ts +18 -0
- package/dist/helpers/hashcolor.d.ts +0 -1
- package/dist/helpers/initRoomsPresence.d.ts +6 -0
- package/dist/helpers/storeConsole.d.ts +3 -0
- package/dist/helpers/transformTranslatations.d.ts +10 -0
- package/dist/helpers/updateMessagesTillLast.d.ts +6 -0
- package/dist/helpers/updatedChatLastTimestamps.d.ts +1 -0
- package/dist/hooks/useChatSettingState.d.ts +2 -1
- package/dist/hooks/useMessageLoaderQueue.d.ts +5 -1
- package/dist/main.js +8534 -6263
- package/dist/main.js.map +1 -1
- package/dist/networking/stanzaHandlers.d.ts +1 -1
- package/dist/networking/xmpp/handleStanzas.xmpp.d.ts +4 -1
- package/dist/networking/xmpp/sendTextMessageWithTranslateTag.xmpp.d.ts +16 -0
- package/dist/networking/xmppClient.d.ts +2 -1
- package/dist/roomStore/chatSettingsSlice.d.ts +8 -5
- package/dist/roomStore/index.d.ts +15 -0
- package/dist/roomStore/roomsSlice.d.ts +1 -0
- package/dist/types/types.d.ts +14 -1
- package/package.json +3 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SelectProps {
|
|
4
|
+
options: {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
}[];
|
|
8
|
+
placeholder: string;
|
|
9
|
+
onSelect: (selected: {
|
|
10
|
+
name: string;
|
|
11
|
+
id: string;
|
|
12
|
+
}) => void;
|
|
13
|
+
accentColor?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const Select: React.FC<SelectProps>;
|
|
16
|
+
export default Select;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const CustomDivider: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
+
configColor: string;
|
|
3
|
+
}>> & string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IConfig, IMessage } from '../../types/types';
|
|
2
|
+
|
|
3
|
+
interface MessageTranslations {
|
|
4
|
+
message: IMessage;
|
|
5
|
+
langSource: string;
|
|
6
|
+
config?: IConfig;
|
|
7
|
+
}
|
|
8
|
+
declare const MessageTranslations: ({ message, langSource, config }: {
|
|
9
|
+
message: any;
|
|
10
|
+
langSource: any;
|
|
11
|
+
config: any;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default MessageTranslations;
|
|
@@ -1,34 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMessage } from '../types/types';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface IMessageWithNewData extends IMessage {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
isMediafile?: any;
|
|
9
|
-
locationPreview?: any;
|
|
10
|
-
mimetype?: any;
|
|
11
|
-
location?: any;
|
|
12
|
-
senderWalletAddress?: any;
|
|
13
|
-
senderFirstName?: any;
|
|
14
|
-
senderLastName?: any;
|
|
15
|
-
photoURL?: any;
|
|
16
|
-
senderJID?: any;
|
|
17
|
-
token?: any;
|
|
18
|
-
refreshToken?: any;
|
|
19
|
-
roomJid?: any;
|
|
20
|
-
tokenAmount?: any;
|
|
21
|
-
quickReplie?: any;
|
|
22
|
-
notDisplayedValue?: any;
|
|
23
|
-
showInChannel?: any;
|
|
24
|
-
attachmentId?: any;
|
|
25
|
-
createdAt?: any;
|
|
26
|
-
expiresAt?: any;
|
|
27
|
-
fileName?: any;
|
|
28
|
-
originalName?: any;
|
|
29
|
-
ownerKey?: any;
|
|
30
|
-
receiverMessageId?: any;
|
|
31
|
-
size?: any;
|
|
32
|
-
updatedAt?: any;
|
|
33
|
-
userId?: any;
|
|
34
|
-
}, body: Element | undefined, id: string, from: any, deleted?: boolean) => Promise<any>;
|
|
5
|
+
}
|
|
6
|
+
export declare const createMessageFromXml: (data: IMessageWithNewData) => Promise<IMessage>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Element } from 'ltx';
|
|
2
|
+
import { IUser } from '../types/types';
|
|
3
|
+
|
|
4
|
+
interface DataXml {
|
|
5
|
+
id: string;
|
|
6
|
+
body: string;
|
|
7
|
+
roomJid: string;
|
|
8
|
+
date: string;
|
|
9
|
+
user: IUser;
|
|
10
|
+
deleted?: boolean;
|
|
11
|
+
translations?: any;
|
|
12
|
+
langSource?: string;
|
|
13
|
+
data: {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const getDataFromXml: (stanza: Element) => Promise<DataXml>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Translation {
|
|
2
|
+
translatedText: string;
|
|
3
|
+
language: string;
|
|
4
|
+
languageName: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TranslationObject {
|
|
7
|
+
[language: string]: Translation;
|
|
8
|
+
}
|
|
9
|
+
export declare const transformArrayToObject: (array: Translation[]) => TranslationObject;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as XmppClient } from '../networking/xmppClient';
|
|
2
|
+
import { IRoom } from '../types/types';
|
|
3
|
+
|
|
4
|
+
export declare const updateMessagesTillLast: (rooms: {
|
|
5
|
+
[jid: string]: IRoom;
|
|
6
|
+
}, client: XmppClient, batchSize?: number, maxFetchAttempts?: number, messagesPerFetch?: number) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const updatedChatLastTimestamps: (roomTimestampObject: [jid: string, timestamp: string], dispatch: any) => void;
|
|
@@ -2,8 +2,9 @@ export declare const useChatSettingState: () => {
|
|
|
2
2
|
user: import('../types/types').User;
|
|
3
3
|
activeFile: import('../types/types').ModalFile;
|
|
4
4
|
activeModal: string;
|
|
5
|
-
client:
|
|
5
|
+
client: import('../networking/xmppClient').XmppClient;
|
|
6
6
|
config: import('../types/types').IConfig;
|
|
7
7
|
deleteModal: import('../types/types').DeleteModal;
|
|
8
8
|
selectedUser: import('../types/types').IUser;
|
|
9
|
+
langSource: string;
|
|
9
10
|
};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { IRoom } from '../types/types';
|
|
2
|
+
|
|
3
|
+
declare const useMessageLoaderQueue: (roomsList: string[], rooms: {
|
|
4
|
+
[jid: string]: IRoom;
|
|
5
|
+
}, globalLoading: boolean, loading: boolean, loadMoreMessages: (roomJid: string, max: number) => Promise<any>) => void;
|
|
2
6
|
export default useMessageLoaderQueue;
|