@ethora/chat-component 24.10.22 → 24.11.12
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/README.md +9 -4
- package/dist/assets/icons.d.ts +44 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +16 -0
- package/dist/components/InputComponents/AudioInput.d.ts +9 -0
- package/dist/components/InputComponents/MediaInput.d.ts +11 -0
- package/dist/components/InputComponents/RecordingIndicator.d.ts +2 -0
- package/dist/components/InputComponents/Search.d.ts +1 -1
- package/dist/components/InputComponents/TextInput.d.ts +14 -0
- package/dist/components/MainComponents/ChatRoom.d.ts +0 -2
- package/dist/components/MainComponents/RoomList.d.ts +0 -1
- package/dist/components/{Message.d.ts → MessageBubble/Message.d.ts} +1 -1
- package/dist/components/MessageBubble/MessageInteractions.d.ts +18 -0
- package/dist/components/Modals/Modal/Modal.d.ts +9 -0
- package/dist/components/Modals/NewChatModal/NewChatModal.d.ts +4 -0
- package/dist/components/Modals/UserProfileModal/UserProfileModal.d.ts +7 -0
- package/dist/components/styled/ActionButton.d.ts +7 -0
- package/dist/components/styled/AudioMessage.d.ts +7 -0
- package/dist/components/styled/Button.d.ts +1 -0
- package/dist/components/styled/StyledComponents.d.ts +1 -0
- package/dist/components/styled/StyledInputComponents/StyledInputComponents.d.ts +1 -0
- package/dist/components/styled/UnsupportedType.d.ts +2 -0
- package/dist/helpers/constants/LOCAL_STORAGE.d.ts +3 -0
- package/dist/helpers/constants/MESSAGE_INTERACTIONS.d.ts +34 -0
- package/dist/helpers/insertMessageWithDelimiter.d.ts +6 -0
- package/dist/helpers/localStorageUser.d.ts +3 -0
- package/dist/main.js +11703 -10141
- package/dist/main.js.map +1 -1
- package/dist/networking/api-requests/auth.api.d.ts +22 -0
- package/dist/networking/apiClient.d.ts +2 -22
- package/dist/networking/xmpp/actionSetTimestampToPrivateStore.xmpp.d.ts +1 -0
- package/dist/networking/xmpp/createTimeoutPromise.xmpp.d.ts +4 -0
- package/dist/networking/xmpp/deleteMessage.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/getChatsPrivateStoreRequest.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/getHistory.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/getLastMessageArchive.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/presenceInRoom.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/sendMediaMessage.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/sendTextMessage.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/sendTypingRequest.xmpp.d.ts +3 -0
- package/dist/networking/xmpp/setChatsPrivateStoreRequest.xmpp.d.ts +3 -0
- package/dist/networking/xmppClient.d.ts +9 -10
- package/dist/roomStore/chatSettingsSlice.d.ts +11 -3
- package/dist/roomStore/roomsSlice.d.ts +9 -1
- package/dist/types/types.d.ts +10 -1
- package/package.json +9 -4
- package/dist/roomStore/loginSlice.d.ts +0 -36
package/README.md
CHANGED
|
@@ -84,10 +84,6 @@ with:
|
|
|
84
84
|
firebaseConfig: config, //Ethora app config
|
|
85
85
|
enabled: true,
|
|
86
86
|
},
|
|
87
|
-
googleLogin: {
|
|
88
|
-
firebaseConfig: config, //Ethora app config
|
|
89
|
-
enabled: true,
|
|
90
|
-
},
|
|
91
87
|
}}
|
|
92
88
|
MainComponentStyles={{
|
|
93
89
|
width: "100%",
|
|
@@ -97,6 +93,15 @@ with:
|
|
|
97
93
|
}}
|
|
98
94
|
roomJID=""
|
|
99
95
|
user={{ email: "", password: "" }}
|
|
96
|
+
disableHeader?: boolean;
|
|
97
|
+
|
|
98
|
+
disableRooms: boolean;
|
|
99
|
+
defaultLogin: boolean;
|
|
100
|
+
disableInteractions: boolean; //disable interactions
|
|
101
|
+
chatHeaderBurgerMenu: boolean; // disable burger menu in room header
|
|
102
|
+
roomListStiles: React.CSSProperties; // used to change room List styles (left)
|
|
103
|
+
chatRoomStyles: React.CSSProperties; // used to change room styles (right)
|
|
104
|
+
setRoomJidInPath: boolean; // used to set RoomId to url
|
|
100
105
|
/>
|
|
101
106
|
```
|
|
102
107
|
|
package/dist/assets/icons.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export declare const AddNewIcon: ({ color, ...props }: {
|
|
|
5
5
|
export declare const AttachIcon: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const CloseIcon: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const DownloadIcon: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const PauseIcon: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export declare const RecordIcon: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export declare const RemoveIcon: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export declare const SendIcon: ({ color, ...props }: {
|
|
@@ -27,3 +26,47 @@ export declare const NoMessages: ({ color, ...props }: {
|
|
|
27
26
|
[x: string]: any;
|
|
28
27
|
color?: string;
|
|
29
28
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const ReportIcon: ({ color, ...props }: {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
color?: string;
|
|
32
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const DeleteIcon: ({ color, ...props }: {
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
color?: string;
|
|
36
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare const CopyIcon: ({ color, ...props }: {
|
|
38
|
+
[x: string]: any;
|
|
39
|
+
color?: string;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const ReplyIcon: ({ color, ...props }: {
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
color?: string;
|
|
44
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const SendItemIcon: ({ color, ...props }: {
|
|
46
|
+
[x: string]: any;
|
|
47
|
+
color?: string;
|
|
48
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare const SendCoinIcon: ({ color, ...props }: {
|
|
50
|
+
[x: string]: any;
|
|
51
|
+
color?: string;
|
|
52
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export declare const PlayIcon: ({ color, ...props }: {
|
|
54
|
+
[x: string]: any;
|
|
55
|
+
color?: string;
|
|
56
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare const PauseIcon: ({ color, ...props }: {
|
|
58
|
+
[x: string]: any;
|
|
59
|
+
color?: string;
|
|
60
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export declare const AddPhotoIcon: ({ color, ...props }: {
|
|
62
|
+
[x: string]: any;
|
|
63
|
+
color?: string;
|
|
64
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare const BurgerMenuIcon: ({ color, ...props }: {
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
color?: string;
|
|
68
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare const LeaveIcon: ({ color, ...props }: {
|
|
70
|
+
[x: string]: any;
|
|
71
|
+
color?: string;
|
|
72
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React, ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
interface MenuOption {
|
|
4
|
+
label: string;
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
styles?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
interface DropdownMenuProps {
|
|
10
|
+
options: MenuOption[];
|
|
11
|
+
onClose?: any;
|
|
12
|
+
openButton?: ReactElement;
|
|
13
|
+
position?: 'left' | 'right';
|
|
14
|
+
}
|
|
15
|
+
declare const DropdownMenu: React.FC<DropdownMenuProps>;
|
|
16
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface AudioInputProps {
|
|
4
|
+
isRecording: boolean;
|
|
5
|
+
setIsRecording: (value: boolean) => void;
|
|
6
|
+
handleSendClick: (audioUrl?: string) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const AudioInput: React.FC<AudioInputProps>;
|
|
9
|
+
export default AudioInput;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IConfig } from '../../types/types';
|
|
3
|
+
|
|
4
|
+
interface MediaInputProps {
|
|
5
|
+
filePreviews: File[];
|
|
6
|
+
setFilePreviews: any;
|
|
7
|
+
handleSendClick: () => void;
|
|
8
|
+
config?: IConfig;
|
|
9
|
+
}
|
|
10
|
+
declare const MediaInput: React.FC<MediaInputProps>;
|
|
11
|
+
export default MediaInput;
|
|
@@ -3,7 +3,7 @@ import { default as React } from 'react';
|
|
|
3
3
|
interface SearchInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
icon?: React.ReactNode;
|
|
5
5
|
animated?: boolean;
|
|
6
|
-
direction?:
|
|
6
|
+
direction?: 'left' | 'right';
|
|
7
7
|
}
|
|
8
8
|
declare const SearchInput: React.FC<SearchInputProps>;
|
|
9
9
|
export { SearchInput };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IConfig } from '../../types/types';
|
|
3
|
+
|
|
4
|
+
interface TextInputProps {
|
|
5
|
+
message: string;
|
|
6
|
+
setMessage: (value: string) => void;
|
|
7
|
+
handleSendClick: () => void;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
config?: IConfig;
|
|
10
|
+
onFocus?: () => void;
|
|
11
|
+
onBlur?: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const TextInput: React.FC<TextInputProps>;
|
|
14
|
+
export default TextInput;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IMessage } from '../../types/types';
|
|
3
|
+
|
|
4
|
+
interface MessageInteractionsProps {
|
|
5
|
+
message: IMessage;
|
|
6
|
+
contextMenu: {
|
|
7
|
+
visible: boolean;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
setContextMenu: ({ visible, x, y }: {
|
|
12
|
+
visible: any;
|
|
13
|
+
x: any;
|
|
14
|
+
y: any;
|
|
15
|
+
}) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const MessageInteractions: React.FC<MessageInteractionsProps>;
|
|
18
|
+
export default MessageInteractions;
|
|
@@ -5,6 +5,7 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
5
5
|
EndIcon?: ReactElement;
|
|
6
6
|
loading?: boolean;
|
|
7
7
|
unstyled?: boolean;
|
|
8
|
+
variant?: 'default' | 'filled' | 'outlined';
|
|
8
9
|
}
|
|
9
10
|
declare const Button: React.FC<ButtonProps>;
|
|
10
11
|
export default Button;
|
|
@@ -32,3 +32,4 @@ export declare const CustomSystemMessage: import('styled-components/dist/types')
|
|
|
32
32
|
export declare const CustomSystemMessageText: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
|
|
33
33
|
export declare const IconButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
34
34
|
export declare const Line: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
35
|
+
export declare const StyledLoaderWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -11,3 +11,4 @@ export declare const FilePreviewContainer: import('styled-components/dist/types'
|
|
|
11
11
|
export declare const FilePreview: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
12
|
export declare const FileIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
|
|
13
13
|
export declare const VideoPreview: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, never>> & string;
|
|
14
|
+
export declare const StyledInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { IConfig } from '../../types/types';
|
|
2
3
|
|
|
3
4
|
interface FileDownloadProps {
|
|
4
5
|
fileUrl: string;
|
|
5
6
|
fileName: string;
|
|
7
|
+
config?: IConfig;
|
|
6
8
|
}
|
|
7
9
|
declare const FileDownload: React.FC<FileDownloadProps>;
|
|
8
10
|
export default FileDownload;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const MESSAGE_INTERACTIONS: {
|
|
2
|
+
SEND_COINS: string;
|
|
3
|
+
SEND_ITEM: string;
|
|
4
|
+
REPLY: string;
|
|
5
|
+
COPY: string;
|
|
6
|
+
DELETE: string;
|
|
7
|
+
REPORT: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const MESSAGE_INTERACTIONS_ICONS: {
|
|
10
|
+
SEND_COINS: ({ color, ...props }: {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
color?: string;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
SEND_ITEM: ({ color, ...props }: {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
color?: string;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
REPLY: ({ color, ...props }: {
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
color?: string;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
COPY: ({ color, ...props }: {
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
color?: string;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
DELETE: ({ color, ...props }: {
|
|
27
|
+
[x: string]: any;
|
|
28
|
+
color?: string;
|
|
29
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
REPORT: ({ color, ...props }: {
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
color?: string;
|
|
33
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
};
|