@cometchat/chat-uikit-react 4.3.30 → 4.3.32
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/assets/Audio-Call.svg +11 -0
- package/dist/assets/Audio-Call2x.svg +11 -0
- package/dist/assets/Copy.svg +17 -0
- package/dist/assets/IncomingAudio.svg +5 -0
- package/dist/assets/IncomingVideo.svg +6 -0
- package/dist/assets/Info.svg +13 -0
- package/dist/assets/InfoSimpleIcon.svg +4 -0
- package/dist/assets/LoadingIcon.svg +15 -0
- package/dist/assets/Locked.svg +10 -0
- package/dist/assets/MissedAudio.svg +5 -0
- package/dist/assets/MissedVideo.svg +6 -0
- package/dist/assets/More.svg +9 -0
- package/dist/assets/More@2x.svg +9 -0
- package/dist/assets/OutgoingAudio.svg +5 -0
- package/dist/assets/OutgoingVideo.svg +6 -0
- package/dist/assets/Plus-1.svg +12 -0
- package/dist/assets/Private.svg +10 -0
- package/dist/assets/StartConversation.svg +13 -0
- package/dist/assets/Stickers.svg +16 -0
- package/dist/assets/Video-call.svg +12 -0
- package/dist/assets/Video-call2x.svg +12 -0
- package/dist/assets/VideoCall2xIcon.svg +12 -0
- package/dist/assets/addreaction.svg +9 -0
- package/dist/assets/ai-bot.svg +3 -0
- package/dist/assets/ai-empty.svg +22 -0
- package/dist/assets/ai-error.svg +3 -0
- package/dist/assets/attachment-file.svg +14 -0
- package/dist/assets/audio-file.svg +12 -0
- package/dist/assets/backbutton.svg +12 -0
- package/dist/assets/close.svg +12 -0
- package/dist/assets/close2x.svg +12 -0
- package/dist/assets/collaborativedocument.svg +13 -0
- package/dist/assets/collaborativewhiteboard.svg +12 -0
- package/dist/assets/create-button.svg +12 -0
- package/dist/assets/delete.svg +15 -0
- package/dist/assets/deleteicon.svg +15 -0
- package/dist/assets/down-arrow.svg +1 -0
- package/dist/assets/download.svg +13 -0
- package/dist/assets/editicon.svg +14 -0
- package/dist/assets/heart-reaction.png +0 -0
- package/dist/assets/heart.svg +11 -0
- package/dist/assets/increase-size.svg +6 -0
- package/dist/assets/loading.svg +16 -0
- package/dist/assets/mention-icon.svg +11 -0
- package/dist/assets/message-delivered.svg +5 -0
- package/dist/assets/message-read.svg +5 -0
- package/dist/assets/message-sent.svg +9 -0
- package/dist/assets/mic.svg +11 -0
- package/dist/assets/more-icon.svg +9 -0
- package/dist/assets/photolibrary.svg +11 -0
- package/dist/assets/placeholder.png +0 -0
- package/dist/assets/plus-rotated.svg +13 -0
- package/dist/assets/plus.svg +13 -0
- package/dist/assets/polls.svg +14 -0
- package/dist/assets/reduce-size.svg +6 -0
- package/dist/assets/search.svg +4 -0
- package/dist/assets/send-message-in-private.svg +6 -0
- package/dist/assets/send.svg +12 -0
- package/dist/assets/side-arrow.svg +1 -0
- package/dist/assets/smileys.svg +16 -0
- package/dist/assets/spinner.svg +15 -0
- package/dist/assets/stipop.svg +9 -0
- package/dist/assets/stop.svg +1 -0
- package/dist/assets/thread-arrow.svg +1 -0
- package/dist/assets/threadIndicatorIcon.svg +11 -0
- package/dist/assets/threadicon.svg +14 -0
- package/dist/assets/translation.svg +16 -0
- package/dist/assets/video.svg +12 -0
- package/dist/assets/wait.svg +4 -0
- package/dist/assets/warning-small.svg +5 -0
- package/dist/index.d.ts +3366 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/types/AI/AIAssistBot/AIAssistBotChatView.d.ts +10 -0
- package/dist/types/AI/AIAssistBot/AIAssistBotDecorator.d.ts +22 -0
- package/dist/types/AI/AIAssistBot/AIAssistBotExtension.d.ts +8 -0
- package/dist/types/AI/AIAssistBot/AIAssistBotOptionsView.d.ts +11 -0
- package/dist/types/AI/AIAssistBot/style.d.ts +37 -0
- package/dist/types/AI/AIAssistBot/utils.d.ts +5 -0
- package/dist/types/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +20 -0
- package/dist/types/AI/AIConversationStarter/AIConversationStarterExtension.d.ts +8 -0
- package/dist/types/AI/AIConversationStarter/AIConversationStarterView.d.ts +9 -0
- package/dist/types/AI/AIConversationStarter/style.d.ts +26 -0
- package/dist/types/AI/AIConversationSummary/AIConversationSummaryDecorator.d.ts +22 -0
- package/dist/types/AI/AIConversationSummary/AIConversationSummaryExtension.d.ts +8 -0
- package/dist/types/AI/AIConversationSummary/AIConversationSummaryView.d.ts +10 -0
- package/dist/types/AI/AIConversationSummary/style.d.ts +28 -0
- package/dist/types/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +25 -0
- package/dist/types/AI/AISmartReplies/AISmartRepliesExtension.d.ts +8 -0
- package/dist/types/AI/AISmartReplies/AISmartRepliesView.d.ts +12 -0
- package/dist/types/AI/AISmartReplies/style.d.ts +28 -0
- package/dist/types/Calling/CallingExtension.d.ts +8 -0
- package/dist/types/Calling/CallingExtensionDecorator.d.ts +75 -0
- package/dist/types/Calling/CometChatCallButtons/hooks.d.ts +3 -0
- package/dist/types/Calling/CometChatCallButtons/index.d.ts +19 -0
- package/dist/types/Calling/CometChatCallButtons/style.d.ts +28 -0
- package/dist/types/Calling/CometChatCallLogDetails/hooks.d.ts +2 -0
- package/dist/types/Calling/CometChatCallLogDetails/index.d.ts +17 -0
- package/dist/types/Calling/CometChatCallLogDetails/style.d.ts +21 -0
- package/dist/types/Calling/CometChatCallLogHistory/hooks.d.ts +2 -0
- package/dist/types/Calling/CometChatCallLogHistory/index.d.ts +27 -0
- package/dist/types/Calling/CometChatCallLogHistory/style.d.ts +41 -0
- package/dist/types/Calling/CometChatCallLogParticipants/index.d.ts +19 -0
- package/dist/types/Calling/CometChatCallLogParticipants/style.d.ts +31 -0
- package/dist/types/Calling/CometChatCallLogRecordings/index.d.ts +21 -0
- package/dist/types/Calling/CometChatCallLogRecordings/style.d.ts +35 -0
- package/dist/types/Calling/CometChatCallLogs/hooks.d.ts +2 -0
- package/dist/types/Calling/CometChatCallLogs/index.d.ts +37 -0
- package/dist/types/Calling/CometChatCallLogs/style.d.ts +37 -0
- package/dist/types/Calling/CometChatCallLogsWithDetails/hooks.d.ts +4 -0
- package/dist/types/Calling/CometChatCallLogsWithDetails/index.d.ts +10 -0
- package/dist/types/Calling/CometChatCallLogsWithDetails/style.d.ts +13 -0
- package/dist/types/Calling/CometChatIncomingCall/hooks.d.ts +2 -0
- package/dist/types/Calling/CometChatIncomingCall/index.d.ts +19 -0
- package/dist/types/Calling/CometChatIncomingCall/style.d.ts +72 -0
- package/dist/types/Calling/CometChatOngoingCall/hooks.d.ts +2 -0
- package/dist/types/Calling/CometChatOngoingCall/index.d.ts +15 -0
- package/dist/types/Calling/CometChatOngoingCall/style.d.ts +2 -0
- package/dist/types/Calling/CometChatOutgoingCall/hooks.d.ts +2 -0
- package/dist/types/Calling/CometChatOutgoingCall/index.d.ts +16 -0
- package/dist/types/Calling/CometChatOutgoingCall/style.d.ts +39 -0
- package/dist/types/Calling/Utils/CallDetailsUtils.d.ts +11 -0
- package/dist/types/Calling/Utils/CallingDetailsUtils.d.ts +7 -0
- package/dist/types/Calling/Utils/utils.d.ts +7 -0
- package/dist/types/CometChatAddMembers/hooks.d.ts +11 -0
- package/dist/types/CometChatAddMembers/index.d.ts +229 -0
- package/dist/types/CometChatAddMembers/style.d.ts +13 -0
- package/dist/types/CometChatBannedMembers/controller.d.ts +37 -0
- package/dist/types/CometChatBannedMembers/hooks.d.ts +17 -0
- package/dist/types/CometChatBannedMembers/index.d.ts +228 -0
- package/dist/types/CometChatBannedMembers/style.d.ts +19 -0
- package/dist/types/CometChatContacts/index.d.ts +22 -0
- package/dist/types/CometChatContacts/style.d.ts +20 -0
- package/dist/types/CometChatConversations/controller.d.ts +74 -0
- package/dist/types/CometChatConversations/hooks.d.ts +22 -0
- package/dist/types/CometChatConversations/index.d.ts +344 -0
- package/dist/types/CometChatConversations/style.d.ts +29 -0
- package/dist/types/CometChatConversationsWithMessages/hooks.d.ts +2 -0
- package/dist/types/CometChatConversationsWithMessages/index.d.ts +15 -0
- package/dist/types/CometChatConversationsWithMessages/style.d.ts +87 -0
- package/dist/types/CometChatCustomHooks.d.ts +27 -0
- package/dist/types/CometChatDetails/hooks.d.ts +17 -0
- package/dist/types/CometChatDetails/index.d.ts +186 -0
- package/dist/types/CometChatDetails/style.d.ts +40 -0
- package/dist/types/CometChatGroupMembers/controller.d.ts +38 -0
- package/dist/types/CometChatGroupMembers/hooks.d.ts +22 -0
- package/dist/types/CometChatGroupMembers/index.d.ts +281 -0
- package/dist/types/CometChatGroupMembers/style.d.ts +24 -0
- package/dist/types/CometChatGroups/controller.d.ts +44 -0
- package/dist/types/CometChatGroups/hooks.d.ts +15 -0
- package/dist/types/CometChatGroups/index.d.ts +215 -0
- package/dist/types/CometChatGroups/style.d.ts +11 -0
- package/dist/types/CometChatGroupsWithMessages/hooks.d.ts +3 -0
- package/dist/types/CometChatGroupsWithMessages/index.d.ts +14 -0
- package/dist/types/CometChatGroupsWithMessages/style.d.ts +874 -0
- package/dist/types/CometChatMessageComposer/hooks.d.ts +66 -0
- package/dist/types/CometChatMessageComposer/index.d.ts +221 -0
- package/dist/types/CometChatMessageComposer/style.d.ts +92 -0
- package/dist/types/CometChatMessageHeader/hooks.d.ts +3 -0
- package/dist/types/CometChatMessageHeader/index.d.ts +29 -0
- package/dist/types/CometChatMessageHeader/style.d.ts +56 -0
- package/dist/types/CometChatMessageInformation/index.d.ts +29 -0
- package/dist/types/CometChatMessageInformation/style.d.ts +48 -0
- package/dist/types/CometChatMessageList/CometChatMessageList.d.ts +58 -0
- package/dist/types/CometChatMessageList/controller.d.ts +48 -0
- package/dist/types/CometChatMessageList/style.d.ts +237 -0
- package/dist/types/CometChatMessageList/useCometChatMessageList.d.ts +6 -0
- package/dist/types/CometChatMessages/hooks.d.ts +2 -0
- package/dist/types/CometChatMessages/index.d.ts +25 -0
- package/dist/types/CometChatMessages/style.d.ts +26 -0
- package/dist/types/CometChatThemeContext.d.ts +5 -0
- package/dist/types/CometChatThreadedMessages/hooks.d.ts +2 -0
- package/dist/types/CometChatThreadedMessages/index.d.ts +19 -0
- package/dist/types/CometChatThreadedMessages/style.d.ts +21 -0
- package/dist/types/CometChatTransferOwnership/hooks.d.ts +7 -0
- package/dist/types/CometChatTransferOwnership/index.d.ts +163 -0
- package/dist/types/CometChatTransferOwnership/style.d.ts +17 -0
- package/dist/types/CometChatUserMemberWrapper/index.d.ts +25 -0
- package/dist/types/CometChatUsers/controller.d.ts +34 -0
- package/dist/types/CometChatUsers/hooks.d.ts +18 -0
- package/dist/types/CometChatUsers/index.d.ts +260 -0
- package/dist/types/CometChatUsers/style.d.ts +11 -0
- package/dist/types/CometChatUsersWithMessages/hooks.d.ts +2 -0
- package/dist/types/CometChatUsersWithMessages/index.d.ts +12 -0
- package/dist/types/CometChatUsersWithMessages/style.d.ts +70 -0
- package/dist/types/Extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.d.ts +18 -0
- package/dist/types/Extensions/CollaborativeDocument/CollaborativeDocumentExtension.d.ts +8 -0
- package/dist/types/Extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.d.ts +21 -0
- package/dist/types/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.d.ts +18 -0
- package/dist/types/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtension.d.ts +8 -0
- package/dist/types/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.d.ts +21 -0
- package/dist/types/Extensions/ImageModeration/ImageModerationConfiguration.d.ts +15 -0
- package/dist/types/Extensions/ImageModeration/ImageModerationExtension.d.ts +8 -0
- package/dist/types/Extensions/ImageModeration/ImageModerationExtensionDecorator.d.ts +26 -0
- package/dist/types/Extensions/LinkPreview/LinkPreviewConfiguration.d.ts +8 -0
- package/dist/types/Extensions/LinkPreview/LinkPreviewExtension.d.ts +8 -0
- package/dist/types/Extensions/LinkPreview/LinkPreviewExtensionDecorator.d.ts +24 -0
- package/dist/types/Extensions/MessageTranslation/MessageTranslationConfiguration.d.ts +14 -0
- package/dist/types/Extensions/MessageTranslation/MessageTranslationExtension.d.ts +8 -0
- package/dist/types/Extensions/MessageTranslation/MessageTranslationExtensionDecorator.d.ts +19 -0
- package/dist/types/Extensions/Polls/PollsConfiguration.d.ts +29 -0
- package/dist/types/Extensions/Polls/PollsExtension.d.ts +8 -0
- package/dist/types/Extensions/Polls/PollsExtensionDecorator.d.ts +26 -0
- package/dist/types/Extensions/SmartReplies/SmartRepliesConfiguration.d.ts +8 -0
- package/dist/types/Extensions/SmartReplies/SmartRepliesExtension.d.ts +9 -0
- package/dist/types/Extensions/SmartReplies/SmartRepliesExtensionDecorator.d.ts +35 -0
- package/dist/types/Extensions/Stickers/StickersConfiguration.d.ts +14 -0
- package/dist/types/Extensions/Stickers/StickersExtension.d.ts +8 -0
- package/dist/types/Extensions/Stickers/StickersExtensionDecorator.d.ts +27 -0
- package/dist/types/Extensions/TextModerator/TextModeratorExtension.d.ts +6 -0
- package/dist/types/Extensions/TextModerator/TextModeratorExtensionDecorator.d.ts +8 -0
- package/dist/types/Extensions/ThumbnailGeneration/ThumbnailGenerationExtension.d.ts +5 -0
- package/dist/types/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +8 -0
- package/dist/types/Shared/CometChatUIKit/CometChatUIKit.d.ts +42 -0
- package/dist/types/Shared/Framework/AIExtensionDataSource.d.ts +6 -0
- package/dist/types/Shared/Framework/ChatConfigurator.d.ts +8 -0
- package/dist/types/Shared/Framework/DataSource.d.ts +56 -0
- package/dist/types/Shared/Framework/DataSourceDecorator.d.ts +59 -0
- package/dist/types/Shared/Framework/ExtensionsDataSource.d.ts +6 -0
- package/dist/types/Shared/Utils/MessageUtils.d.ts +16 -0
- package/dist/types/Shared/Utils/MessagesDataSource.d.ts +92 -0
- package/dist/types/Shared/Views/CometChatButton/hooks.d.ts +11 -0
- package/dist/types/Shared/Views/CometChatButton/index.d.ts +19 -0
- package/dist/types/Shared/Views/CometChatCheckbox/hooks.d.ts +9 -0
- package/dist/types/Shared/Views/CometChatCheckbox/index.d.ts +13 -0
- package/dist/types/Shared/Views/CometChatContextMenu/index.d.ts +14 -0
- package/dist/types/Shared/Views/CometChatContextMenu/style.d.ts +28 -0
- package/dist/types/Shared/Views/CometChatList/hooks.d.ts +20 -0
- package/dist/types/Shared/Views/CometChatList/index.d.ts +151 -0
- package/dist/types/Shared/Views/CometChatList/style.d.ts +18 -0
- package/dist/types/Shared/Views/CometChatListItem/hooks.d.ts +9 -0
- package/dist/types/Shared/Views/CometChatListItem/index.d.ts +29 -0
- package/dist/types/Shared/Views/CometChatMenuList/hooks.d.ts +12 -0
- package/dist/types/Shared/Views/CometChatMenuList/index.d.ts +13 -0
- package/dist/types/Shared/Views/CometChatMessageBubble/index.d.ts +22 -0
- package/dist/types/Shared/Views/CometChatMessageBubble/style.d.ts +22 -0
- package/dist/types/Shared/Views/CometChatRadioButton/hooks.d.ts +9 -0
- package/dist/types/Shared/Views/CometChatRadioButton/index.d.ts +13 -0
- package/dist/types/Shared/Views/CometChatTabs/TabsStyle.d.ts +31 -0
- package/dist/types/Shared/Views/CometChatTabs/index.d.ts +11 -0
- package/dist/types/Shared/Views/CometChatTabs/style.d.ts +42 -0
- package/dist/types/Shared/Views/LitElementsWrapper/LitElementsWrapper.d.ts +49 -0
- package/dist/types/index.d.ts +84 -0
- package/package.json +4 -4
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { AvatarStyle, BadgeStyle, BaseStyle, ConfirmDialogStyle, DateStyle, ListItemStyle, ReceiptStyle } from "@cometchat/uikit-elements";
|
|
2
|
+
import { CSSProperties, JSX } from "react";
|
|
3
|
+
import { CometChatTextFormatter, ConversationsStyle } from "@cometchat/uikit-shared";
|
|
4
|
+
import { CometChatOption, DatePatterns, SelectionMode, States, TitleAlignment } from "@cometchat/uikit-resources";
|
|
5
|
+
interface IConversationsProps {
|
|
6
|
+
/**
|
|
7
|
+
* Custom view to render on the top-right of the component
|
|
8
|
+
*/
|
|
9
|
+
menus?: JSX.Element;
|
|
10
|
+
/**
|
|
11
|
+
* Title of the component
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue `localize("CHATS")`
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Alignment of the `title` text
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue `TitleAlignment.left`
|
|
20
|
+
*/
|
|
21
|
+
titleAlignment?: TitleAlignment;
|
|
22
|
+
/**
|
|
23
|
+
* Request builder to fetch conversations
|
|
24
|
+
* @defaultValue Default request builder having the limit set to 30
|
|
25
|
+
*/
|
|
26
|
+
conversationsRequestBuilder?: CometChat.ConversationsRequestBuilder;
|
|
27
|
+
/**
|
|
28
|
+
* Function to call whenever the component encounters an error
|
|
29
|
+
*/
|
|
30
|
+
onError?: (error: CometChat.CometChatException) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Custom list item view to be rendered for each conversation in the fetched list
|
|
33
|
+
*/
|
|
34
|
+
listItemView?: (conversation: CometChat.Conversation) => JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Custom subtitle view to be rendered for each conversation in the fetched list
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* This prop is used if `listItemView` prop is not provided
|
|
40
|
+
*/
|
|
41
|
+
subtitleView?: (conversation: CometChat.Conversation) => JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Hide user presence
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* If set to true, the status indicator of the default list item view is not displayed for conversation objects related to users
|
|
47
|
+
*
|
|
48
|
+
* @defaultValue `false`
|
|
49
|
+
*/
|
|
50
|
+
disableUsersPresence?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Hide the separator at the bottom of the default list item view
|
|
53
|
+
*
|
|
54
|
+
* @defaultValue `false`
|
|
55
|
+
*/
|
|
56
|
+
hideSeparator?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Conversation to highlight
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* This prop is used if `listItemView` prop is not provided
|
|
62
|
+
*/
|
|
63
|
+
activeConversation?: CometChat.Conversation;
|
|
64
|
+
/**
|
|
65
|
+
* Selection mode to use for the default tail view
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* This prop is used if `listItemView` prop is not provided.
|
|
69
|
+
*
|
|
70
|
+
* @defaultValue `SelectionMode.none`
|
|
71
|
+
*/
|
|
72
|
+
selectionMode?: SelectionMode;
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated
|
|
75
|
+
*
|
|
76
|
+
* This property is deprecated as of version 4.3.19 due to newer property 'hideReceipt'. It will be removed in subsequent versions.
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* Disable receipt status
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* If set to true, the receipt status of the sent message won't be displayed, and received messages won't be marked as delivered
|
|
83
|
+
*
|
|
84
|
+
* @defaultValue `false`
|
|
85
|
+
*/
|
|
86
|
+
disableReceipt?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* hide receipt status
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* If set to true, the receipt status of the message won't be displayed
|
|
92
|
+
*
|
|
93
|
+
* @defaultValue `false`
|
|
94
|
+
*/
|
|
95
|
+
hideReceipt?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* List of actions available on mouse over on the default list item component
|
|
98
|
+
*/
|
|
99
|
+
options?: ((conversation: CometChat.Conversation) => CometChatOption[]) | null;
|
|
100
|
+
/**
|
|
101
|
+
* Date format for the date component
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* The date component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`
|
|
105
|
+
*/
|
|
106
|
+
datePattern?: DatePatterns;
|
|
107
|
+
/**
|
|
108
|
+
* @deprecated
|
|
109
|
+
*
|
|
110
|
+
* This property is deprecated as of version 4.3.8 due to newer property 'passwordGroupIcon'. It will be removed in subsequent versions.
|
|
111
|
+
*/
|
|
112
|
+
/**
|
|
113
|
+
* Image URL for the status indicator icon in the default list item view of a conversation related to a password-protected group
|
|
114
|
+
*
|
|
115
|
+
* @defaultValue `./assets/locked.svg`
|
|
116
|
+
*/
|
|
117
|
+
protectedGroupIcon?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Image URL for the status indicator icon in the default list item view of a conversation related to a password-protected group
|
|
120
|
+
*
|
|
121
|
+
* @defaultValue {undefined}
|
|
122
|
+
*/
|
|
123
|
+
passwordGroupIcon?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Image URL for the status indicator icon in the default list item view of a conversation related to a private group
|
|
126
|
+
*
|
|
127
|
+
* @defaultValue `./assets/private.svg`
|
|
128
|
+
*/
|
|
129
|
+
privateGroupIcon?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Image URL for the read status of the sent message
|
|
132
|
+
*
|
|
133
|
+
* @defaultValue `./assets/message-read.svg`
|
|
134
|
+
*/
|
|
135
|
+
readIcon?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Image URL for the delivered status of the sent message
|
|
138
|
+
*
|
|
139
|
+
* @defaultValue `./assets/message-delivered.svg`
|
|
140
|
+
*/
|
|
141
|
+
deliveredIcon?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Image URL for the wait status of the sent message
|
|
144
|
+
*
|
|
145
|
+
* @defaultValue `./assets/wait.svg`
|
|
146
|
+
*/
|
|
147
|
+
waitIcon?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Image URL for the error status of the sent message
|
|
150
|
+
*
|
|
151
|
+
* @defaultValue `./assets/warning-small.svg`
|
|
152
|
+
*/
|
|
153
|
+
errorIcon?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Image URL for the sent status of the sent message
|
|
156
|
+
*
|
|
157
|
+
* @defaultValue `./assets/message-sent.svg`
|
|
158
|
+
*/
|
|
159
|
+
sentIcon?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Image URL for the default loading view
|
|
162
|
+
*
|
|
163
|
+
* @defaultValue `./assets/spinner.svg`
|
|
164
|
+
*/
|
|
165
|
+
loadingIconURL?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Custom view for the loading state of the component
|
|
168
|
+
*/
|
|
169
|
+
loadingStateView?: JSX.Element;
|
|
170
|
+
/**
|
|
171
|
+
* Text to display in the default empty view
|
|
172
|
+
*
|
|
173
|
+
* @defaultValue `localize("NO_CHATS_FOUND")`
|
|
174
|
+
*/
|
|
175
|
+
emptyStateText?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Custom view for the empty state of the component
|
|
178
|
+
*/
|
|
179
|
+
emptyStateView?: JSX.Element;
|
|
180
|
+
/**
|
|
181
|
+
* Text to display in the default error view
|
|
182
|
+
*
|
|
183
|
+
* @defaultValue `localize("SOMETHING_WRONG")`
|
|
184
|
+
*/
|
|
185
|
+
errorStateText?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Custom view for the error state of the component
|
|
188
|
+
*/
|
|
189
|
+
errorStateView?: JSX.Element;
|
|
190
|
+
/**
|
|
191
|
+
* Hide error view
|
|
192
|
+
*
|
|
193
|
+
* @remarks
|
|
194
|
+
* If set to true, hides the default and the custom error view
|
|
195
|
+
*
|
|
196
|
+
* @defaultValue `false`
|
|
197
|
+
*/
|
|
198
|
+
hideError?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Function to call on click of the default list item view of a conversation
|
|
201
|
+
*/
|
|
202
|
+
onItemClick?: (conversation: CometChat.Conversation) => void;
|
|
203
|
+
/**
|
|
204
|
+
* Function to call when a conversation from the fetched list is selected
|
|
205
|
+
*
|
|
206
|
+
* @remarks
|
|
207
|
+
* This prop is used if `selectionMode` prop is not `SelectionMode.none`
|
|
208
|
+
*/
|
|
209
|
+
onSelect?: (conversation: CometChat.Conversation, selected: boolean) => void;
|
|
210
|
+
/**
|
|
211
|
+
* Disable sound for incoming messages
|
|
212
|
+
*
|
|
213
|
+
* @defaulValue `false`
|
|
214
|
+
*/
|
|
215
|
+
disableSoundForMessages?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Disable typing indicator display
|
|
218
|
+
*
|
|
219
|
+
* @defaultValue `false`
|
|
220
|
+
*/
|
|
221
|
+
disableTyping?: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Custom audio sound for incoming messages
|
|
224
|
+
*/
|
|
225
|
+
customSoundForMessages?: string;
|
|
226
|
+
/**
|
|
227
|
+
* Styles to apply to this component
|
|
228
|
+
*/
|
|
229
|
+
conversationsStyle?: ConversationsStyle;
|
|
230
|
+
/**
|
|
231
|
+
* Styles to apply to the delete conversation dialog component
|
|
232
|
+
*/
|
|
233
|
+
deleteConversationDialogStyle?: ConfirmDialogStyle;
|
|
234
|
+
/**
|
|
235
|
+
* Styles to apply to the avatar component of the default list item view
|
|
236
|
+
*/
|
|
237
|
+
avatarStyle?: AvatarStyle;
|
|
238
|
+
/**
|
|
239
|
+
* Styles to apply to the status indicator component of the default list item view
|
|
240
|
+
*/
|
|
241
|
+
statusIndicatorStyle?: CSSProperties;
|
|
242
|
+
/**
|
|
243
|
+
* Styles to apply to the default list item view
|
|
244
|
+
*/
|
|
245
|
+
listItemStyle?: ListItemStyle;
|
|
246
|
+
/**
|
|
247
|
+
* Styles to apply to the badge component
|
|
248
|
+
*
|
|
249
|
+
* @remarks
|
|
250
|
+
* The badge component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`
|
|
251
|
+
*/
|
|
252
|
+
badgeStyle?: BadgeStyle;
|
|
253
|
+
/**
|
|
254
|
+
* Styles to apply to the receipt component
|
|
255
|
+
*
|
|
256
|
+
* @remarks
|
|
257
|
+
* The receipt component is rendered conditionally inside the subtitle view of the default list item view
|
|
258
|
+
*/
|
|
259
|
+
receiptStyle?: ReceiptStyle;
|
|
260
|
+
/**
|
|
261
|
+
* Styles to apply to the date component
|
|
262
|
+
*
|
|
263
|
+
* @remarks
|
|
264
|
+
* The date component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`
|
|
265
|
+
*/
|
|
266
|
+
dateStyle?: DateStyle;
|
|
267
|
+
/**
|
|
268
|
+
* Styles to apply to the backdrop component
|
|
269
|
+
*/
|
|
270
|
+
backdropStyle?: BaseStyle;
|
|
271
|
+
confirmDialogTitle?: string;
|
|
272
|
+
confirmDialogMessage?: string;
|
|
273
|
+
cancelButtonText?: string;
|
|
274
|
+
confirmButtonText?: string;
|
|
275
|
+
disableMentions?: boolean;
|
|
276
|
+
textFormatters?: CometChatTextFormatter[];
|
|
277
|
+
}
|
|
278
|
+
export type Action = {
|
|
279
|
+
type: "appendConversations";
|
|
280
|
+
conversations: CometChat.Conversation[];
|
|
281
|
+
removeOldConversation?: boolean;
|
|
282
|
+
} | {
|
|
283
|
+
type: "setConversationList";
|
|
284
|
+
conversationList: CometChat.Conversation[];
|
|
285
|
+
} | {
|
|
286
|
+
type: "setFetchState";
|
|
287
|
+
fetchState: States;
|
|
288
|
+
} | {
|
|
289
|
+
type: "setConversationToBeDeleted";
|
|
290
|
+
conversation: CometChat.Conversation | null;
|
|
291
|
+
} | {
|
|
292
|
+
type: "removeConversation";
|
|
293
|
+
conversation: CometChat.Conversation;
|
|
294
|
+
} | {
|
|
295
|
+
type: "updateConversationWithUser";
|
|
296
|
+
user: CometChat.User;
|
|
297
|
+
} | {
|
|
298
|
+
type: "fromUpdateConversationListFn";
|
|
299
|
+
conversation: CometChat.Conversation;
|
|
300
|
+
} | {
|
|
301
|
+
type: "addTypingIndicator";
|
|
302
|
+
typingIndicator: CometChat.TypingIndicator;
|
|
303
|
+
} | {
|
|
304
|
+
type: "removeTypingIndicator";
|
|
305
|
+
typingIndicator: CometChat.TypingIndicator;
|
|
306
|
+
} | {
|
|
307
|
+
type: "updateConversationLastMessage";
|
|
308
|
+
message: CometChat.BaseMessage;
|
|
309
|
+
} | {
|
|
310
|
+
type: "updateConversationLastMessageAndPlaceAtTheTop";
|
|
311
|
+
message: CometChat.BaseMessage;
|
|
312
|
+
} | {
|
|
313
|
+
type: "updateConversationLastMessageAndGroupAndPlaceAtTheTop";
|
|
314
|
+
group: CometChat.Group;
|
|
315
|
+
message: CometChat.Action;
|
|
316
|
+
} | {
|
|
317
|
+
type: "removeConversationOfTheGroup";
|
|
318
|
+
group: CometChat.Group;
|
|
319
|
+
} | {
|
|
320
|
+
type: "removeConversationOfTheUser";
|
|
321
|
+
user: CometChat.User;
|
|
322
|
+
} | {
|
|
323
|
+
type: "updateConversationLastMessageResetUnreadCountAndPlaceAtTheTop";
|
|
324
|
+
message: CometChat.BaseMessage;
|
|
325
|
+
conversation: CometChat.Conversation;
|
|
326
|
+
} | {
|
|
327
|
+
type: "resetUnreadCountAndSetReadAtIfLastMessage";
|
|
328
|
+
message: CometChat.BaseMessage;
|
|
329
|
+
} | {
|
|
330
|
+
type: "setLastMessageReadOrDeliveredAt";
|
|
331
|
+
updateReadAt: boolean;
|
|
332
|
+
messageReceipt: CometChat.MessageReceipt;
|
|
333
|
+
} | {
|
|
334
|
+
type: "setLoggedInUser";
|
|
335
|
+
loggedInUser: CometChat.User | null;
|
|
336
|
+
} | {
|
|
337
|
+
type: "setIsFirstReload";
|
|
338
|
+
isFirstReload: boolean;
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Renders a scrollable list of conversations that has been created in a CometChat app
|
|
342
|
+
*/
|
|
343
|
+
export declare function CometChatConversations(props: IConversationsProps): import("react/jsx-runtime").JSX.Element;
|
|
344
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AvatarStyle, BackdropStyle, BadgeStyle, BaseStyle, ConfirmDialogStyle, DateStyle, IconStyle, LabelStyle, ListItemStyle, MenuListStyle, ReceiptStyle } from "@cometchat/uikit-elements";
|
|
2
|
+
import { CSSProperties } from "react";
|
|
3
|
+
import { CometChatTheme } from "@cometchat/uikit-resources";
|
|
4
|
+
import { ConversationsStyle, ListStyle } from "@cometchat/uikit-shared";
|
|
5
|
+
export declare function conversationsWrapperStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): CSSProperties;
|
|
6
|
+
export declare function menusStyle(): CSSProperties;
|
|
7
|
+
export declare function confirmDialogStyle(deleteConversationDialogStyle: ConfirmDialogStyle | null, theme: CometChatTheme): ConfirmDialogStyle;
|
|
8
|
+
export declare function listStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): ListStyle;
|
|
9
|
+
export declare function avatarStyle(avatarStyleObject: AvatarStyle | null, theme: CometChatTheme): AvatarStyle;
|
|
10
|
+
export declare function statusIndicatorStyle(statusIndicatorStyleObject: CSSProperties | null): CSSProperties;
|
|
11
|
+
export declare function listItemStyle(listItemStyleObject: ListItemStyle | null, conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): ListItemStyle;
|
|
12
|
+
export declare function badgeStyle(badgeStyleObject: BadgeStyle | null, theme: CometChatTheme): BadgeStyle;
|
|
13
|
+
export declare function itemThreadIndicatorStyle(conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): LabelStyle;
|
|
14
|
+
export declare function iconStyle(theme: CometChatTheme): IconStyle;
|
|
15
|
+
export declare function receiptStyle(receiptStyleObject: ReceiptStyle | null, theme: CometChatTheme): ReceiptStyle;
|
|
16
|
+
export declare function subtitleTextStyle(conversation: CometChat.Conversation, typingIndicatorMap: Map<string, CometChat.TypingIndicator>, conversationsStyleObject: ConversationsStyle | null, theme: CometChatTheme): {
|
|
17
|
+
font: string;
|
|
18
|
+
color: string;
|
|
19
|
+
width?: string;
|
|
20
|
+
overflow?: string;
|
|
21
|
+
textOverflow?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function menuListStyle(theme: CometChatTheme): MenuListStyle;
|
|
24
|
+
export declare function dateStyle(dateStyleObject: DateStyle | null, theme: CometChatTheme): DateStyle;
|
|
25
|
+
export declare function subtitleReceiptAndTextContainerStyle(): CSSProperties;
|
|
26
|
+
export declare function getBackdropStyle(backdropStyleObject: BaseStyle | null, conversationsStyle: ConversationsStyle | null): BackdropStyle;
|
|
27
|
+
export declare function defaultSelectionModeNoneTailViewContainerStyle(): CSSProperties;
|
|
28
|
+
export declare function getUnreadBadgeStyle(): CSSProperties;
|
|
29
|
+
export declare function threadViewStyle(): CSSProperties;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare function Hooks(loggedInUser: any, setLoggedInUser: Function, subscribeToEvents: Function, onErrorCallback: Function, setActiveChat: any, user: any, group: any, startConversationBtnElement: JSX.IntrinsicElements["cometchat-button"] | null, showCometChatContactsView: Function, showCometChatContacts: any, hideCometChatContactsView: Function, setActiveUser: any, setActiveGroup: any, attachGroupListener: any): void;
|
|
2
|
+
export { Hooks };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ContactsConfiguration, ConversationsConfiguration, MessagesConfiguration, WithMessagesStyle } from "@cometchat/uikit-shared";
|
|
2
|
+
interface IConversationsWithMessagesProps {
|
|
3
|
+
user?: CometChat.User;
|
|
4
|
+
group?: CometChat.Group;
|
|
5
|
+
isMobileView?: boolean;
|
|
6
|
+
messageText?: string;
|
|
7
|
+
conversationsWithMessagesStyle?: WithMessagesStyle;
|
|
8
|
+
messagesConfiguration?: MessagesConfiguration;
|
|
9
|
+
conversationsConfiguration?: ConversationsConfiguration;
|
|
10
|
+
onError?: ((error: CometChat.CometChatException) => void) | null;
|
|
11
|
+
startConversationConfiguration?: ContactsConfiguration;
|
|
12
|
+
startConversationIconURL?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const CometChatConversationsWithMessages: (props: IConversationsWithMessagesProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { CometChatConversationsWithMessages };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { CometChatTheme } from "@cometchat/uikit-resources";
|
|
2
|
+
import { ConversationsConfiguration, MessageHeaderStyle, MessagesConfiguration, MessagesStyle, WithMessagesStyle } from "@cometchat/uikit-shared";
|
|
3
|
+
import { CSSProperties } from "react";
|
|
4
|
+
import { CometChat } from "@cometchat/chat-sdk-javascript";
|
|
5
|
+
import { LabelStyle } from "@cometchat/uikit-elements";
|
|
6
|
+
export declare const getConversationsWrapperStyles: (conversationsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => CSSProperties;
|
|
7
|
+
export declare const getWithMessagesSidebarStyle: (conversationsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme, isMobileView: boolean | undefined, activeUser: CometChat.User | null, activeGroup: CometChat.Group | null) => CSSProperties;
|
|
8
|
+
export declare const getWithMessagesMainStyle: (conversationsWithMessagesStyle: WithMessagesStyle | undefined, isMobileView: boolean | undefined, activeUser: CometChat.User | null, activeGroup: CometChat.Group | null) => CSSProperties;
|
|
9
|
+
export declare const getLabelStyle: (conversationsWithMessagesStyle: WithMessagesStyle | undefined, theme: CometChatTheme) => LabelStyle;
|
|
10
|
+
export declare const getConversationsStyle: (conversationsConfiguration: ConversationsConfiguration | undefined) => {
|
|
11
|
+
titleTextFont?: string | undefined;
|
|
12
|
+
titleTextColor?: string | undefined;
|
|
13
|
+
emptyStateTextFont?: string | undefined;
|
|
14
|
+
emptyStateTextColor?: string | undefined;
|
|
15
|
+
errorStateTextFont?: string | undefined;
|
|
16
|
+
errorStateTextColor?: string | undefined;
|
|
17
|
+
loadingIconTint?: string | undefined;
|
|
18
|
+
onlineStatusColor?: string | undefined;
|
|
19
|
+
separatorColor?: string | undefined;
|
|
20
|
+
boxShadow?: string | undefined;
|
|
21
|
+
privateGroupIconBackground?: string | undefined;
|
|
22
|
+
passwordGroupIconBackground?: string | undefined;
|
|
23
|
+
lastMessageTextColor?: string | undefined;
|
|
24
|
+
lastMessageTextFont?: string | undefined;
|
|
25
|
+
typingIndictorTextColor?: string | undefined;
|
|
26
|
+
typingIndictorTextFont?: string | undefined;
|
|
27
|
+
threadIndicatorTextFont?: string | undefined;
|
|
28
|
+
threadIndicatorTextColor?: string | undefined;
|
|
29
|
+
height: string;
|
|
30
|
+
width: string;
|
|
31
|
+
border: string;
|
|
32
|
+
borderRadius: string;
|
|
33
|
+
background: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const getMessageHeaderStyle: (conversationsWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => MessageHeaderStyle;
|
|
36
|
+
export declare const getMessageComposerStyle: (conversationsWithMessagesStyle: WithMessagesStyle | undefined, messagesConfiguration: MessagesConfiguration | undefined, isMobileView: boolean | undefined) => {
|
|
37
|
+
attachIcontint?: string | undefined;
|
|
38
|
+
liveReactionIconTint?: string | undefined;
|
|
39
|
+
sendIconTint?: string | undefined;
|
|
40
|
+
emojiIconTint?: string | undefined;
|
|
41
|
+
AIIconTint?: string | undefined;
|
|
42
|
+
voiceRecordingIconTint?: string | undefined;
|
|
43
|
+
inputBackground?: string | undefined;
|
|
44
|
+
inputBorder?: string | undefined;
|
|
45
|
+
inputBorderRadius?: string | undefined;
|
|
46
|
+
dividerTint?: string | undefined;
|
|
47
|
+
textFont?: string | undefined;
|
|
48
|
+
textColor?: string | undefined;
|
|
49
|
+
placeHolderTextColor?: string | undefined;
|
|
50
|
+
placeHolderTextFont?: string | undefined;
|
|
51
|
+
emojiKeyboardTextFont?: string | undefined;
|
|
52
|
+
emojiKeyboardTextColor?: string | undefined;
|
|
53
|
+
previewTitleFont?: string | undefined;
|
|
54
|
+
previewTitleColor?: string | undefined;
|
|
55
|
+
previewSubtitleColor?: string | undefined;
|
|
56
|
+
previewSubtitleFont?: string | undefined;
|
|
57
|
+
closePreviewTint?: string | undefined;
|
|
58
|
+
maxInputHeight?: string | undefined;
|
|
59
|
+
height?: string | undefined;
|
|
60
|
+
width?: string | undefined;
|
|
61
|
+
border?: string | undefined;
|
|
62
|
+
borderRadius: string;
|
|
63
|
+
background?: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
export declare const getMessagesStyle: (messagesStyle?: MessagesStyle, conversationsWithMessagesStyle?: WithMessagesStyle | undefined) => {
|
|
66
|
+
height?: string | undefined;
|
|
67
|
+
width?: string | undefined;
|
|
68
|
+
border?: string | undefined;
|
|
69
|
+
borderRadius?: string | undefined;
|
|
70
|
+
background: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
export declare const getEmptyMessageLayoutStyle: (isMobileView: boolean | undefined, activeUser: CometChat.User | null, activeGroup: CometChat.Group | null) => CSSProperties;
|
|
73
|
+
export declare const getBackdropStyle: (conversationsWithMessagesStyle: WithMessagesStyle | undefined, conversationsConfiguration: ConversationsConfiguration | undefined) => {
|
|
74
|
+
height: string | undefined;
|
|
75
|
+
width: string | undefined;
|
|
76
|
+
background: string;
|
|
77
|
+
border: string;
|
|
78
|
+
borderRadius: string;
|
|
79
|
+
};
|
|
80
|
+
export declare const getButtonStyle: (showCometChatContacts: boolean, theme: CometChatTheme) => {
|
|
81
|
+
height: string;
|
|
82
|
+
width: string;
|
|
83
|
+
border: string;
|
|
84
|
+
borderRadius: string;
|
|
85
|
+
background: string;
|
|
86
|
+
buttonIconTint: string | undefined;
|
|
87
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Sets the created ref to the `value` passed
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* After the initial call of this hook, the internal ref is set to the `value` passed to this hook after the component has rendered completely.
|
|
7
|
+
* So the returned ref will not have the updated value while the component renders
|
|
8
|
+
*/
|
|
9
|
+
export declare function useRefSync<T>(value: T): React.MutableRefObject<T>;
|
|
10
|
+
/**
|
|
11
|
+
* Custom hook to make refs stateful
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Making refs stateful opens up the possibility of using the element the ref is pointing to as a dependency for a `useEffect` call
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* Here's a simple example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // At the top most level of the functional component
|
|
20
|
+
* const [inputElement, setInputRef] = useStateRef<HTMLInputElement | null>(null);
|
|
21
|
+
*
|
|
22
|
+
* // Inside the JSX
|
|
23
|
+
* <input type = "text" ref = {setInputRef} />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function useStateRef<T>(initialValue: T): [T, (node: T) => void];
|
|
27
|
+
export declare function useCometChatErrorHandler(onError?: ((error: CometChat.CometChatException) => void) | null): (error: unknown) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { JSX } from "react";
|
|
2
|
+
import { ModalInfo } from ".";
|
|
3
|
+
type Args = {
|
|
4
|
+
setLoggedInUser: React.Dispatch<React.SetStateAction<CometChat.User | null>>;
|
|
5
|
+
errorHandler: (error: unknown) => void;
|
|
6
|
+
leaveOrTransferConfirmDialogElement: JSX.IntrinsicElements["cometchat-confirm-dialog"] | null;
|
|
7
|
+
setModalInfo: React.Dispatch<React.SetStateAction<ModalInfo>>;
|
|
8
|
+
handleLeaveOrTransferConfirmClick: (userOrGroup: CometChat.User | CometChat.Group) => Promise<void>;
|
|
9
|
+
deleteConfirmDialogElement: JSX.IntrinsicElements["cometchat-confirm-dialog"] | null;
|
|
10
|
+
handleDeleteConfirmClick: (userOrGroup: CometChat.User | CometChat.Group) => Promise<void>;
|
|
11
|
+
userOrGroup: CometChat.User | CometChat.Group | undefined;
|
|
12
|
+
user: CometChat.User | undefined;
|
|
13
|
+
group: CometChat.Group | undefined;
|
|
14
|
+
setUserOrGroup: React.Dispatch<React.SetStateAction<CometChat.User | CometChat.Group | undefined>>;
|
|
15
|
+
};
|
|
16
|
+
export declare function Hooks(args: Args): void;
|
|
17
|
+
export {};
|