@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.
@@ -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 { Element } from 'ltx';
1
+ import { IMessage } from '../types/types';
2
2
 
3
- export declare const createMessageFromXml: (data: {
3
+ interface IMessageWithNewData extends IMessage {
4
4
  [x: string]: any;
5
- coinsInMessage?: any;
6
- numberOfReplies?: any;
7
- isSystemMessage?: any;
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 {};
@@ -1,4 +1,3 @@
1
1
  export declare function nameToColor(name: string): {
2
2
  backgroundColor: string;
3
- textColor: string;
4
3
  } | null;
@@ -0,0 +1,6 @@
1
+ import { default as XmppClient } from '../networking/xmppClient';
2
+ import { IRoom } from '../types/types';
3
+
4
+ export declare const initRoomsPresence: (client: XmppClient, rooms: {
5
+ [jid: string]: IRoom;
6
+ }) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { RootState } from '../roomStore';
2
+
3
+ export declare const useStoreConsole: () => RootState;
@@ -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: any;
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
- declare const useMessageLoaderQueue: (roomsList: string[], globalLoading: boolean, loading: boolean, loadMoreMessages: (roomJid: string, max: number) => Promise<any>) => void;
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;