@cometchat/chat-uikit-react 5.0.0-beta2 → 5.0.0

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.
Files changed (119) hide show
  1. package/README.md +2 -2
  2. package/dist/assets/Send.svg +3 -0
  3. package/dist/assets/loading.svg +5 -16
  4. package/dist/index.d.ts +1155 -950
  5. package/dist/index.js +1 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/styles/CometChatCallButtons.css +1 -1
  8. package/dist/styles/CometChatCallLogs.css +3 -3
  9. package/dist/styles/{components/AIConversationStarter.css → CometChatConversationStarter.css} +2 -2
  10. package/dist/styles/{components/AIConversationSummary.css → CometChatConversationSummary.css} +12 -12
  11. package/dist/styles/CometChatConversations.css +10 -10
  12. package/dist/styles/CometChatGroupMembers.css +5 -5
  13. package/dist/styles/CometChatIncomingCall.css +1 -1
  14. package/dist/styles/CometChatList.css +15 -22
  15. package/dist/styles/CometChatListItem.css +2 -2
  16. package/dist/styles/CometChatMessageComposer.css +44 -41
  17. package/dist/styles/CometChatMessageHeader.css +22 -5
  18. package/dist/styles/CometChatMessageInformation.css +3 -2
  19. package/dist/styles/CometChatMessageList.css +6 -5
  20. package/dist/styles/CometChatOutgoingCall.css +5 -0
  21. package/dist/styles/{AISmartReplies.css → CometChatSmartReplies.css} +72 -79
  22. package/dist/styles/PollsBubble.css +7 -1
  23. package/dist/styles/components/CometChatCallButtons.css +1 -1
  24. package/dist/styles/components/CometChatCallLogs.css +3 -3
  25. package/dist/styles/{AIConversationStarter.css → components/CometChatConversationStarter.css} +2 -2
  26. package/dist/styles/{AIConversationSummary.css → components/CometChatConversationSummary.css} +12 -12
  27. package/dist/styles/components/CometChatConversations.css +10 -10
  28. package/dist/styles/components/CometChatGroupMembers.css +5 -5
  29. package/dist/styles/components/CometChatIncomingCall.css +1 -1
  30. package/dist/styles/components/CometChatList.css +15 -22
  31. package/dist/styles/components/CometChatListItem.css +2 -2
  32. package/dist/styles/components/CometChatMessageComposer.css +44 -41
  33. package/dist/styles/components/CometChatMessageHeader.css +22 -5
  34. package/dist/styles/components/CometChatMessageInformation.css +3 -2
  35. package/dist/styles/components/CometChatMessageList.css +6 -5
  36. package/dist/styles/components/CometChatOutgoingCall.css +5 -0
  37. package/dist/styles/components/{AISmartReplies.css → CometChatSmartReplies.css} +72 -79
  38. package/dist/styles/components/PollsBubble.css +7 -1
  39. package/dist/styles/components/index.css +3 -3
  40. package/dist/styles/index.css +3 -3
  41. package/dist/types/CometChatCustomHooks.d.ts +1 -1
  42. package/dist/types/CometChatUIKit/CometChatUIKit.d.ts +0 -6
  43. package/dist/types/CometChatUIKit/UIKitSettings.d.ts +0 -22
  44. package/dist/types/Enums/Enums.d.ts +9 -0
  45. package/dist/types/components/BaseComponents/CometChatConversationStarter/CometChatConversationStarter.d.ts +6 -0
  46. package/dist/types/components/BaseComponents/CometChatConversationSummary/CometChatConversationSummary.d.ts +6 -0
  47. package/dist/types/components/BaseComponents/CometChatList/CometChatList.d.ts +12 -12
  48. package/dist/types/components/BaseComponents/CometChatListItem/CometChatListItem.d.ts +3 -1
  49. package/dist/types/components/BaseComponents/CometChatSmartReplies/CometChatSmartReplies.d.ts +7 -0
  50. package/dist/types/components/Calling/CallButtonConfiguration.d.ts +1 -1
  51. package/dist/types/components/Calling/CallingExtensionDecorator.d.ts +2 -2
  52. package/dist/types/components/Calling/CometChatCallButtons/CometChatCallButtons.d.ts +30 -12
  53. package/dist/types/components/Calling/CometChatCallButtons/useCallButtons.d.ts +1 -1
  54. package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +50 -38
  55. package/dist/types/components/Calling/CometChatCallLogs/useCometChatCallLogs.d.ts +1 -1
  56. package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +48 -26
  57. package/dist/types/components/Calling/CometChatIncomingCall/useCometChatIncomingCall.d.ts +1 -1
  58. package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +31 -15
  59. package/dist/types/components/Calling/CometChatOutgoingCall/useCometChatOutgoingCall.d.ts +1 -1
  60. package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +7 -3
  61. package/dist/types/components/CometChatConversations/CometChatConversations.d.ts +88 -87
  62. package/dist/types/components/CometChatConversations/controller.d.ts +10 -8
  63. package/dist/types/components/CometChatConversations/useCometChatConversations.d.ts +2 -5
  64. package/dist/types/components/CometChatGroupMembers/CometChatGroupMembers.d.ts +94 -76
  65. package/dist/types/components/CometChatGroupMembers/useCometChatGroupMembers.d.ts +2 -2
  66. package/dist/types/components/CometChatGroups/CometChatGroups.d.ts +74 -62
  67. package/dist/types/components/CometChatGroups/useCometChatGroups.d.ts +1 -0
  68. package/dist/types/components/CometChatMessageComposer/CometChatMessageComposer.d.ts +107 -49
  69. package/dist/types/components/CometChatMessageComposer/useCometChatMessageComposer.d.ts +1 -1
  70. package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +77 -16
  71. package/dist/types/components/CometChatMessageHeader/useCometChatMessageHeader.d.ts +1 -1
  72. package/dist/types/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +5 -0
  73. package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +133 -55
  74. package/dist/types/components/CometChatMessageList/CometChatMessageListController.d.ts +3 -1
  75. package/dist/types/components/CometChatMessageList/useCometChatMessageList.d.ts +1 -1
  76. package/dist/types/components/CometChatThreadedMessagePreview/CometChatThreadedMessagePreview.d.ts +34 -2
  77. package/dist/types/components/CometChatUsers/CometChatUsers.d.ts +88 -89
  78. package/dist/types/components/CometChatUsers/useCometChatUsers.d.ts +2 -1
  79. package/dist/types/components/Extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.d.ts +4 -3
  80. package/dist/types/components/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.d.ts +4 -3
  81. package/dist/types/components/Extensions/MessageTranslation/MessageTranslationExtensionDecorator.d.ts +3 -1
  82. package/dist/types/components/Extensions/Polls/PollsBubble.d.ts +5 -0
  83. package/dist/types/components/Extensions/Polls/PollsExtensionDecorator.d.ts +4 -3
  84. package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +2 -3
  85. package/dist/types/components/Reactions/CometChatReactionInfo/CometChatReactionInfo.d.ts +3 -2
  86. package/dist/types/components/Reactions/CometChatReactionList/CometChatReactionList.d.ts +3 -2
  87. package/dist/types/components/Reactions/CometChatReactions/CometChatReactions.d.ts +3 -2
  88. package/dist/types/index.d.ts +8 -7
  89. package/dist/types/resources/CometChatLocalize/cometchat-localize.d.ts +129 -115
  90. package/dist/types/utils/DataSource.d.ts +17 -18
  91. package/dist/types/utils/DataSourceDecorator.d.ts +17 -18
  92. package/dist/types/utils/GroupMemberUtils.d.ts +1 -1
  93. package/dist/types/utils/MessageUtils.d.ts +1 -1
  94. package/dist/types/utils/MessagesDataSource.d.ts +29 -16
  95. package/dist/types/utils/util.d.ts +5 -0
  96. package/package.json +1 -1
  97. package/dist/assets/ai-empty.svg +0 -22
  98. package/dist/assets/ai-error.svg +0 -3
  99. package/dist/assets/heart-reaction.png +0 -0
  100. package/dist/assets/send.svg +0 -12
  101. package/dist/styles/AICard.css +0 -30
  102. package/dist/styles/components/AICard.css +0 -30
  103. package/dist/types/components/AI/AIBaseConfiguration.d.ts +0 -51
  104. package/dist/types/components/AI/AIConversationStarter/AIConversationStarterConfiguration.d.ts +0 -20
  105. package/dist/types/components/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +0 -18
  106. package/dist/types/components/AI/AIConversationStarter/AIConversationStarterExtension.d.ts +0 -8
  107. package/dist/types/components/AI/AIConversationStarter/AIConversationStarterView.d.ts +0 -8
  108. package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryConfiguration.d.ts +0 -31
  109. package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryDecorator.d.ts +0 -22
  110. package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryExtension.d.ts +0 -8
  111. package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryView.d.ts +0 -9
  112. package/dist/types/components/AI/AIExtensionDataSource.d.ts +0 -6
  113. package/dist/types/components/AI/AISmartReplies/AISmartRepliesConfiguration.d.ts +0 -28
  114. package/dist/types/components/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +0 -21
  115. package/dist/types/components/AI/AISmartReplies/AISmartRepliesExtension.d.ts +0 -8
  116. package/dist/types/components/AI/AISmartReplies/AISmartRepliesView.d.ts +0 -11
  117. package/dist/types/components/BaseComponents/CometChatLiveReaction/CometChatLiveReaction.d.ts +0 -5
  118. package/dist/types/components/BaseComponents/CometChatLiveReaction/useLiveReactionHook.d.ts +0 -19
  119. /package/dist/assets/{ai.svg → conversation_summary.svg} +0 -0
@@ -11,11 +11,11 @@ import { ComposerId } from "./MessagesDataSource";
11
11
  * It is used in AI and calling module and utils related to messages.
12
12
  */
13
13
  export declare abstract class DataSource {
14
- abstract getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
15
- abstract getImageMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
16
- abstract getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
17
- abstract getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
18
- abstract getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
14
+ abstract getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
15
+ abstract getImageMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
16
+ abstract getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
17
+ abstract getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
18
+ abstract getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
19
19
  abstract getBottomView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment): Element | JSX.Element | null;
20
20
  abstract getStatusInfoView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipt?: boolean, datePattern?: DatePatterns): Element | JSX.Element | null;
21
21
  abstract getTextMessageContentView(message: CometChat.TextMessage, alignment: MessageBubbleAlignment, otherParams: Object | undefined): Element | JSX.Element;
@@ -28,26 +28,25 @@ export declare abstract class DataSource {
28
28
  abstract getVideoMessageTemplate(): CometChatMessageTemplate;
29
29
  abstract getAudioMessageTemplate(): CometChatMessageTemplate;
30
30
  abstract getFileMessageTemplate(): CometChatMessageTemplate;
31
- abstract getGroupActionTemplate(): CometChatMessageTemplate;
31
+ abstract getGroupActionTemplate(additionalConfigurations?: Object | undefined): CometChatMessageTemplate;
32
32
  abstract getAllMessageTemplates(additionalConfigurations?: Object | undefined): Array<CometChatMessageTemplate>;
33
33
  abstract getMessageTemplate(messageType: string, messageCategory: string): CometChatMessageTemplate | null;
34
- abstract getMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
35
- abstract getCommonOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
36
- abstract getAttachmentOptions(id: ComposerId): CometChatMessageComposerAction[];
34
+ abstract getMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
35
+ abstract getCommonOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
36
+ abstract getAttachmentOptions(id: ComposerId, additionalConfigurations?: any): CometChatMessageComposerAction[];
37
37
  abstract getAllMessageTypes(): Array<string>;
38
- abstract getAllMessageCategories(): Array<string>;
39
- abstract getAuxiliaryOptions(id: ComposerId, user?: CometChat.User, group?: CometChat.Group): JSX.Element[];
38
+ abstract getAllMessageCategories(additionalConfigurations?: Object | undefined): Array<string>;
39
+ abstract getStickerButton(id: ComposerId, user?: CometChat.User, group?: CometChat.Group): JSX.Element | undefined;
40
40
  abstract getId(): string;
41
- abstract getDeleteMessageBubble(messageObject: CometChat.BaseMessage): Element | JSX.Element;
41
+ abstract getDeleteMessageBubble(messageObject: CometChat.BaseMessage, text?: string, alignment?: MessageBubbleAlignment): Element | JSX.Element;
42
42
  abstract getGroupActionBubble(message: CometChat.BaseMessage): Element | JSX.Element;
43
43
  abstract getTextMessageBubble(messageText: string, message: CometChat.TextMessage, alignment: MessageBubbleAlignment, additionalConfigurations?: Object | undefined): Element | JSX.Element;
44
- abstract getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, thumbnailUrl?: string, onClick?: Function): Element | JSX.Element;
45
- abstract getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, onClick?: Function): Element | JSX.Element;
46
- abstract getAudioMessageBubble(audioUrl: string, message: CometChat.MediaMessage, title?: string): Element | JSX.Element;
47
- abstract getFileMessageBubble(fileUrl: string, message: CometChat.MediaMessage, title?: string): Element | JSX.Element;
44
+ abstract getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, thumbnailUrl?: string, onClick?: Function, alignment?: MessageBubbleAlignment): Element | JSX.Element;
45
+ abstract getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, onClick?: Function, alignment?: MessageBubbleAlignment): Element | JSX.Element;
46
+ abstract getAudioMessageBubble(audioUrl: string, message: CometChat.MediaMessage, title?: string, alignment?: MessageBubbleAlignment): Element | JSX.Element;
47
+ abstract getFileMessageBubble(fileUrl: string, message: CometChat.MediaMessage, title?: string, alignment?: MessageBubbleAlignment): Element | JSX.Element;
48
48
  abstract getLastConversationMessage(conversation: CometChat.Conversation, loggedInUser: CometChat.User, additionalConfigurations?: additionalParams): string;
49
- abstract getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group): Element[] | JSX.Element[];
50
- abstract getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, id?: ComposerId): (CometChatMessageComposerAction | CometChatActionsView)[];
49
+ abstract getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group, additionalConfigurations?: any): Element[] | JSX.Element[];
51
50
  abstract getAllTextFormatters(formatterParams: additionalParams): CometChatTextFormatter[];
52
51
  abstract getMentionsTextFormatter(params: Object): CometChatMentionsFormatter;
53
52
  abstract getUrlTextFormatter(params: Object): CometChatUrlsFormatter;
@@ -13,11 +13,11 @@ import { DatePatterns, MessageBubbleAlignment } from "../Enums/Enums";
13
13
  export declare abstract class DataSourceDecorator implements DataSource {
14
14
  dataSource: DataSource;
15
15
  constructor(dataSource: DataSource);
16
- getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
17
- getImageMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
18
- getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
19
- getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
20
- getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
16
+ getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
17
+ getImageMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
18
+ getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
19
+ getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
20
+ getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
21
21
  getStatusInfoView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipt?: boolean, datePattern?: DatePatterns): JSX.Element | Element | null;
22
22
  getBottomView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment): JSX.Element | Element | null;
23
23
  getTextMessageContentView(message: CometChat.TextMessage, alignment: MessageBubbleAlignment, additionalConfigurations?: Object | undefined): JSX.Element | Element;
@@ -30,26 +30,25 @@ export declare abstract class DataSourceDecorator implements DataSource {
30
30
  getVideoMessageTemplate(): CometChatMessageTemplate;
31
31
  getAudioMessageTemplate(): CometChatMessageTemplate;
32
32
  getFileMessageTemplate(): CometChatMessageTemplate;
33
- getGroupActionTemplate(): CometChatMessageTemplate;
33
+ getGroupActionTemplate(additionalConfigurations?: Object | undefined): CometChatMessageTemplate;
34
34
  getAllMessageTemplates(additionalConfigurations?: Object | undefined): CometChatMessageTemplate[];
35
35
  getMessageTemplate(messageType: string, messageCategory: string): CometChatMessageTemplate | null;
36
- getMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
37
- getCommonOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
38
- getAttachmentOptions(id: ComposerId): CometChatMessageComposerAction[];
36
+ getMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
37
+ getCommonOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
38
+ getAttachmentOptions(id: ComposerId, additionalConfigurations?: any): CometChatMessageComposerAction[];
39
39
  getAllMessageTypes(): string[];
40
- getAllMessageCategories(): string[];
41
- getAuxiliaryOptions(id: ComposerId, user?: CometChat.User, group?: CometChat.Group): JSX.Element[];
40
+ getAllMessageCategories(additionalConfigurations?: Object | undefined): string[];
41
+ getStickerButton(id: ComposerId, user?: CometChat.User, group?: CometChat.Group): JSX.Element | undefined;
42
42
  getId(): string;
43
- getDeleteMessageBubble(messageObject: CometChat.BaseMessage): JSX.Element | Element;
43
+ getDeleteMessageBubble(messageObject: CometChat.BaseMessage, text?: string, alignment?: MessageBubbleAlignment): JSX.Element | Element;
44
44
  getGroupActionBubble(message: CometChat.BaseMessage): JSX.Element | Element;
45
45
  getTextMessageBubble(messageText: string, message: CometChat.TextMessage, alignment: MessageBubbleAlignment, additionalConfigurations?: Object | undefined): JSX.Element | Element;
46
- getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, thumbnailUrl?: string, onClick?: Function): JSX.Element | Element;
47
- getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, onClick?: Function): JSX.Element | Element;
48
- getAudioMessageBubble(audioUrl: string, message: CometChat.MediaMessage, title?: string): JSX.Element | Element;
49
- getFileMessageBubble(fileUrl: string, message: CometChat.MediaMessage, title?: string): JSX.Element | Element;
46
+ getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, thumbnailUrl?: string, onClick?: Function, alignment?: MessageBubbleAlignment): JSX.Element | Element;
47
+ getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, onClick?: Function, alignment?: MessageBubbleAlignment): JSX.Element | Element;
48
+ getAudioMessageBubble(audioUrl: string, message: CometChat.MediaMessage, title?: string, alignment?: MessageBubbleAlignment): JSX.Element | Element;
49
+ getFileMessageBubble(fileUrl: string, message: CometChat.MediaMessage, title?: string, alignment?: MessageBubbleAlignment): JSX.Element | Element;
50
50
  getLastConversationMessage(conversation: CometChat.Conversation, loggedInUser: CometChat.User, additionalConfigurations?: additionalParams): string;
51
- getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group): Element[] | JSX.Element[];
52
- getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, id?: ComposerId): (CometChatMessageComposerAction | CometChatActionsView)[];
51
+ getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group, additionalConfigurations?: any): Element[] | JSX.Element[];
53
52
  getAllTextFormatters(formatterParams: additionalParams): CometChatTextFormatter[];
54
53
  getMentionsTextFormatter(params?: Object): CometChatMentionsFormatter;
55
54
  getUrlTextFormatter(params?: Object): CometChatUrlsFormatter;
@@ -12,7 +12,7 @@ export declare class GroupMemberUtils {
12
12
  * @param {string} [loggedInUser=""] - The UID of the logged-in user.
13
13
  * @returns {CometChatOption[] | string} - An array of options or the member's scope as a string.
14
14
  */
15
- static getViewMemberOptions(groupMember: CometChat.GroupMember, group: CometChat.Group, loggedInUser?: string): string | CometChatOption[];
15
+ static getViewMemberOptions(groupMember: CometChat.GroupMember, group: CometChat.Group, loggedInUser?: string, additionalConfigurations?: any): string | CometChatOption[];
16
16
  /**
17
17
  * Retrieves the available options for a banned group member.
18
18
  *
@@ -12,7 +12,7 @@ export declare class MessageUtils {
12
12
  * @param {CometChatMessageTemplate} template - The message template to use for rendering the content view.
13
13
  * @returns {object | null} - The content view for the message, or null if not found.
14
14
  */
15
- getContentView(message: CometChat.BaseMessage, template: CometChatMessageTemplate): any;
15
+ getContentView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment): any;
16
16
  /**
17
17
  * Retrieves the content view for a message based on the provided template.
18
18
  *
@@ -16,6 +16,16 @@ export type ComposerId = {
16
16
  * Utility class that extends DataSource and provides getters for message options.
17
17
  * It is used in message and dataSource utils.
18
18
  */
19
+ export interface additionalParamsOptions {
20
+ hideReplyInThreadOption?: boolean;
21
+ hideTranslateMessageOption?: boolean;
22
+ hideReactionOption?: boolean;
23
+ hideEditMessageOption?: boolean;
24
+ hideDeleteMessageOption?: boolean;
25
+ hideMessagePrivatelyOption?: boolean;
26
+ hideCopyMessageOption?: boolean;
27
+ hideMessageInfoOption?: boolean;
28
+ }
19
29
  export declare class MessagesDataSource implements DataSource {
20
30
  getEditOption(): CometChatActionsIcon;
21
31
  getDeleteOption(): CometChatActionsIcon;
@@ -25,12 +35,12 @@ export declare class MessagesDataSource implements DataSource {
25
35
  getCopyOption(): CometChatActionsIcon;
26
36
  getMessageInfoOption(): CometChatActionsIcon;
27
37
  isSentByMe(loggedInUser: CometChat.User, message: CometChat.BaseMessage): boolean;
28
- getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
38
+ getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: additionalParamsOptions): Array<CometChatActionsIcon | CometChatActionsView>;
29
39
  getIsSentByMe(message: CometChat.BaseMessage): boolean;
30
- getImageMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
31
- getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
32
- getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
33
- getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
40
+ getImageMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
41
+ getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
42
+ getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
43
+ getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
34
44
  getReceiptClass(status?: number): "wait" | "read" | "error" | "delivered" | "sent" | undefined;
35
45
  /**
36
46
  * Function to get receipt for message bubble
@@ -50,16 +60,20 @@ export declare class MessagesDataSource implements DataSource {
50
60
  getAudioMessageTemplate(): CometChatMessageTemplate;
51
61
  getVideoMessageTemplate(): CometChatMessageTemplate;
52
62
  getImageMessageTemplate(): CometChatMessageTemplate;
53
- getGroupActionTemplate(): CometChatMessageTemplate;
63
+ getGroupActionTemplate(additionalConfigurations?: {
64
+ hideGroupActionMessages?: boolean;
65
+ }): CometChatMessageTemplate;
54
66
  getFileMessageTemplate(): CometChatMessageTemplate;
55
67
  getAllMessageTemplates(additionalConfigurations?: additionalParams): Array<CometChatMessageTemplate>;
56
68
  getMessageTemplate(messageType: string, messageCategory: string, additionalConfigurations?: additionalParams): CometChatMessageTemplate | null;
57
- getMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
58
- getCommonOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): Array<CometChatActionsIcon | CometChatActionsView>;
69
+ getMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: additionalParamsOptions): Array<CometChatActionsIcon | CometChatActionsView>;
70
+ getCommonOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: additionalParamsOptions): Array<CometChatActionsIcon | CometChatActionsView>;
59
71
  getAllMessageTypes(): Array<string>;
60
72
  addList(): string;
61
- getAllMessageCategories(): Array<string>;
62
- getAuxiliaryOptions(id: ComposerId, user?: CometChat.User, group?: CometChat.Group): JSX.Element[];
73
+ getAllMessageCategories(additionalConfigurations?: {
74
+ hideGroupActionMessages?: boolean;
75
+ }): Array<string>;
76
+ getStickerButton(id: ComposerId, user?: CometChat.User, group?: CometChat.Group): JSX.Element | undefined;
63
77
  getId(): string;
64
78
  getTextMessageContentView(message: CometChat.TextMessage, _alignment: MessageBubbleAlignment, additionalConfigurations?: additionalParams): JSX.Element | Element;
65
79
  getAudioMessageContentView(message: CometChat.MediaMessage, _alignment: MessageBubbleAlignment): Element | JSX.Element;
@@ -67,10 +81,10 @@ export declare class MessagesDataSource implements DataSource {
67
81
  getImageMessageContentView(message: CometChat.MediaMessage, _alignment: MessageBubbleAlignment): Element | JSX.Element;
68
82
  getVideoMessageContentView(message: CometChat.MediaMessage, _alignment: MessageBubbleAlignment): Element | JSX.Element;
69
83
  getActionMessage(message: any): string;
70
- getDeleteMessageBubble(message: CometChat.BaseMessage, text?: string): import("react/jsx-runtime").JSX.Element;
84
+ getDeleteMessageBubble(message: CometChat.BaseMessage, text?: string, alignment?: MessageBubbleAlignment): import("react/jsx-runtime").JSX.Element;
71
85
  getGroupActionBubble(message: CometChat.BaseMessage): import("react/jsx-runtime").JSX.Element;
72
86
  getTextMessageBubble(messageText: string, message: CometChat.TextMessage, alignment: MessageBubbleAlignment, additionalConfigurations?: additionalParams): Element | JSX.Element;
73
- getAudioMessageBubble(audioUrl: string, message: CometChat.MediaMessage, title?: string): Element | JSX.Element;
87
+ getAudioMessageBubble(audioUrl: string, message: CometChat.MediaMessage, title?: string, alignment?: MessageBubbleAlignment): Element | JSX.Element;
74
88
  /**
75
89
  * Function to check mimeType and return the iconUrl of that type
76
90
  * @param mimeType
@@ -83,17 +97,16 @@ export declare class MessagesDataSource implements DataSource {
83
97
  * @returns
84
98
  */
85
99
  getFileSize: (sizeInBytes: number) => string;
86
- getFileMessageBubble(fileUrl: string, message: CometChat.MediaMessage, title?: string): Element | JSX.Element;
100
+ getFileMessageBubble(fileUrl: string, message: CometChat.MediaMessage, title?: string, alignment?: MessageBubbleAlignment): Element | JSX.Element;
87
101
  getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, onClick?: Function): import("react/jsx-runtime").JSX.Element;
88
102
  getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, thumbnailUrl?: string, onClick?: Function): Element | JSX.Element;
89
103
  imageAttachmentOption(): CometChatMessageComposerAction;
90
104
  videoAttachmentOption(): CometChatMessageComposerAction;
91
105
  audioAttachmentOption(): CometChatMessageComposerAction;
92
106
  fileAttachmentOption(): CometChatMessageComposerAction;
93
- getAttachmentOptions(id: ComposerId): Array<CometChatMessageComposerAction>;
107
+ getAttachmentOptions(id: ComposerId, additionalConfigurations?: any): Array<CometChatMessageComposerAction>;
94
108
  getLastConversationMessage(conversation: CometChat.Conversation, loggedInUser: CometChat.User, additionalConfigurations: additionalParams): string;
95
- getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group): Element[] | JSX.Element[];
96
- getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, id?: ComposerId): Array<CometChatMessageComposerAction | CometChatActionsView>;
109
+ getAuxiliaryHeaderMenu(user?: CometChat.User, group?: CometChat.Group, additionalConfigurations?: any): Element[] | JSX.Element[];
97
110
  /**
98
111
  * Adds styled @ for every mention in the text by matching uid
99
112
  *
@@ -1,5 +1,10 @@
1
1
  export declare function sanitizeHtml(htmlString: string, whitelistRegExes: RegExp[]): string;
2
2
  export declare function isMessageSentByMe(message: CometChat.BaseMessage, loggedInUser: CometChat.User): boolean;
3
+ /**
4
+ * Function to check if the current browser is safari.
5
+ * @returns boolean
6
+ */
7
+ export declare function isSafari(): boolean;
3
8
  /**
4
9
  * Checks if a given text is a URL.
5
10
  * A valid URL should start with either "http", "https", or "www" and must not contain spaces.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-react",
3
- "version": "5.0.0-beta2",
3
+ "version": "5.0.0",
4
4
  "description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
5
5
  "author": "CometChat",
6
6
  "dependencies": {
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
- "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
- <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
- width="100.000000pt" height="100.000000pt" viewBox="0 0 100.000000 100.000000"
6
- preserveAspectRatio="xMidYMid meet">
7
-
8
- <g transform="translate(0.000000,100.000000) scale(0.100000,-0.100000)"
9
- fill="#000000" stroke="none">
10
- <path d="M375 847 c-221 -73 -326 -269 -254 -472 l22 -62 -25 -74 c-14 -41
11
- -23 -80 -21 -86 6 -17 42 -15 138 6 77 17 82 17 138 -1 72 -22 199 -25 216 -4
12
- 6 7 9 21 5 30 -5 13 -21 16 -79 16 -44 0 -98 8 -136 19 -58 18 -67 19 -123 6
13
- -89 -21 -88 -23 -65 42 l20 58 -26 56 c-52 116 -25 240 69 327 77 71 123 87
14
- 246 87 123 0 169 -16 245 -86 64 -59 88 -108 94 -199 5 -68 8 -75 28 -78 36
15
- -5 48 38 33 118 -22 125 -94 215 -218 273 -59 28 -79 32 -167 34 -63 2 -115
16
- -2 -140 -10z"/>
17
- <path d="M687 313 c-16 -15 -4 -42 38 -83 l45 -44 -45 -46 c-47 -48 -56 -74
18
- -28 -84 11 -5 31 8 64 40 l48 47 50 -46 c54 -50 61 -53 79 -35 18 18 15 25
19
- -35 79 l-46 50 48 49 c41 42 46 51 35 65 -19 23 -30 19 -80 -30 l-46 -45 -44
20
- 45 c-41 42 -68 54 -83 38z"/>
21
- </g>
22
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100" xml:space="preserve" version="1.1" viewBox="0 0 100 100">
2
- <image width="100" height="100" xlink:href="data:image/png;base64,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"/>
3
- </svg>
Binary file
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <title>Icons/24/Send</title>
4
- <g id="Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
5
- <g id="Icons/24/Send" stroke="#000000" stroke-width="1.5">
6
- <g id="Group" transform="translate(3.000000, 3.000000)">
7
- <path d="M0.158865921,1.85985859 C-0.108182698,1.38202197 -0.0332622567,0.786017075 0.343741637,0.389140701 C0.72074553,-0.00773567366 1.31211969,-0.113146836 1.80303259,0.129025252 L17.6480326,8.17819192 C17.857662,8.28481329 17.9896898,8.50008892 17.9896898,8.73527525 C17.9896898,8.97046158 17.857662,9.18573721 17.6480326,9.29235859 L1.80303259,17.3523586 C1.31211969,17.5945307 0.72074553,17.4891195 0.343741637,17.0922431 C-0.0332622567,16.6953668 -0.108182698,16.0993619 0.158865921,15.6215253 L4.37386592,8.73485859 L0.158865921,1.85985859 Z" id="Path"></path>
8
- <line x1="17.9896993" y1="8.73485859" x2="4.36969925" y2="8.73485859" id="Path"></line>
9
- </g>
10
- </g>
11
- </g>
12
- </svg>
@@ -1,30 +0,0 @@
1
- .cometchat-ai-card__container {
2
- height:fit-content;
3
- max-height: 30px;
4
- width: 100%;
5
- border:none;
6
- border-radius: 0;
7
- background: none;
8
- }
9
-
10
- .cometchat-ai-card__loading-state,
11
- .cometchat-ai-card__empty-state,
12
- .cometchat-ai-card__error-state
13
- {
14
- height:fit-content;
15
- display: flex;
16
- width: 100%;
17
- gap: 8px;
18
- align-items: center;
19
- justify-content: center;
20
- flex-wrap: wrap;
21
- text-align: center;
22
- }
23
-
24
- .cometchat-ai-card__loading-icon-url,
25
- .cometchat-ai-card__error-icon-url,
26
- .cometchat-ai-card__empty-icon-url
27
- {
28
- width: 24px;
29
- height: 24px;
30
- }
@@ -1,30 +0,0 @@
1
- .cometchat-ai-card__container {
2
- height:fit-content;
3
- max-height: 30px;
4
- width: 100%;
5
- border:none;
6
- border-radius: 0;
7
- background: none;
8
- }
9
-
10
- .cometchat-ai-card__loading-state,
11
- .cometchat-ai-card__empty-state,
12
- .cometchat-ai-card__error-state
13
- {
14
- height:fit-content;
15
- display: flex;
16
- width: 100%;
17
- gap: 8px;
18
- align-items: center;
19
- justify-content: center;
20
- flex-wrap: wrap;
21
- text-align: center;
22
- }
23
-
24
- .cometchat-ai-card__loading-icon-url,
25
- .cometchat-ai-card__error-icon-url,
26
- .cometchat-ai-card__empty-icon-url
27
- {
28
- width: 24px;
29
- height: 24px;
30
- }
@@ -1,51 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * AIBaseConfiguration is a base configuration class that provides options for customizing the appearance and behavior of AI-related components.
4
- */
5
- export declare class AIBaseConfiguration {
6
- /**
7
- * Overrides the default API configuration for fetching data.
8
- * @param {CometChat.User} [user] - The user object.
9
- * @param {CometChat.Group} [group] - The group object.
10
- * @returns {Promise<Object>} A promise resolving to a custom configuration object.
11
- */
12
- apiConfiguration?: (user?: CometChat.User, group?: CometChat.Group) => Promise<Object>;
13
- /**
14
- * Custom view component for displaying the error state.
15
- * @type {any}
16
- */
17
- errorStateView?: JSX.Element;
18
- /**
19
- * Custom view component for displaying the empty state.
20
- * @type {any}
21
- */
22
- emptyStateView?: JSX.Element;
23
- /**
24
- * Custom view component for displaying the loading state.
25
- * @type {any}
26
- */
27
- loadingStateView?: JSX.Element;
28
- /**
29
- * URL for the loading icon.
30
- * @type {string}
31
- * @default loadingIcon
32
- */
33
- loadingIconURL?: string;
34
- /**
35
- * URL for the error icon.
36
- * @type {string}
37
- * @default errorIcon
38
- */
39
- errorIconURL?: string;
40
- /**
41
- * URL for the empty state icon.
42
- * @type {string}
43
- * @default emptyIcon
44
- */
45
- emptyIconURL?: string;
46
- /**
47
- * Constructs a new AIBaseConfiguration instance.
48
- * @param {Partial<AIBaseConfiguration>} props - Partial properties to customize the base configuration.
49
- */
50
- constructor(props: Partial<AIBaseConfiguration>);
51
- }
@@ -1,20 +0,0 @@
1
- /// <reference types="react" />
2
- import { AIBaseConfiguration } from "../AIBaseConfiguration";
3
- /**
4
- * AIConversationStarterConfiguration provides customization options for the AI conversation starter view.
5
- * Extends the base configuration with additional properties specific to conversation starters.
6
- */
7
- export declare class AIConversationStarterConfiguration extends AIBaseConfiguration {
8
- /**
9
- * Custom callback to display a custom UI for conversation starters.
10
- * @param {string[]} response - The list of conversation starters.
11
- * @param {() => void} [closeCallBack] - Optional callback to close the custom view.
12
- * @returns {Promise<JSX.Element>} A promise resolving to a custom view component.
13
- */
14
- customView?: (response: string[], closeCallBack?: () => void) => Promise<JSX.Element>;
15
- /**
16
- * Constructs a new AIConversationStarterConfiguration instance.
17
- * @param {Partial<AIConversationStarterConfiguration>} props - Partial properties to customize the conversation starter configuration.
18
- */
19
- constructor(props: Partial<AIConversationStarterConfiguration>);
20
- }
@@ -1,18 +0,0 @@
1
- import { DataSource } from "../../../utils/DataSource";
2
- import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
3
- import { AIConversationStarterConfiguration } from "./AIConversationStarterConfiguration";
4
- export declare class AIConversationStarterDecorator extends DataSourceDecorator {
5
- configuration?: AIConversationStarterConfiguration;
6
- newDataSource: DataSource;
7
- currentMessage: CometChat.BaseMessage | null;
8
- loggedInUser: CometChat.User | null;
9
- user: CometChat.User;
10
- group: CometChat.Group;
11
- constructor(dataSource: DataSource, configuration?: AIConversationStarterConfiguration);
12
- getId(): string;
13
- editReply(reply: string): void;
14
- closeIfMessageReceived(message: CometChat.BaseMessage): void;
15
- getConversationStarter: () => Promise<string[]>;
16
- private loadConversationStarter;
17
- private addMessageListener;
18
- }
@@ -1,8 +0,0 @@
1
- import { AIExtensionDataSource } from "../AIExtensionDataSource";
2
- import { AIConversationStarterConfiguration } from "./AIConversationStarterConfiguration";
3
- export declare class AIConversationStarterExtension extends AIExtensionDataSource {
4
- private configuration?;
5
- constructor(configuration?: AIConversationStarterConfiguration);
6
- addExtension(): void;
7
- getExtensionId(): string;
8
- }
@@ -1,8 +0,0 @@
1
- import { AIConversationStarterConfiguration } from './AIConversationStarterConfiguration';
2
- interface IAIConversationStarterProps {
3
- getConversationStarterCallback?: () => Promise<string[]>;
4
- editReplyCallback?: (reply: string) => void;
5
- configuration?: AIConversationStarterConfiguration;
6
- }
7
- declare const AIConversationStarterView: (props: IAIConversationStarterProps) => import("react/jsx-runtime").JSX.Element;
8
- export { AIConversationStarterView };
@@ -1,31 +0,0 @@
1
- import { AIBaseConfiguration } from "../AIBaseConfiguration";
2
- /**
3
- * AIConversationSummaryConfiguration provides customization options for the AI conversation summary view.
4
- * Extends the base configuration with additional properties specific to conversation summaries.
5
- */
6
- export declare class AIConversationSummaryConfiguration extends AIBaseConfiguration {
7
- /**
8
- * Custom callback to display a custom UI for conversation summaries.
9
- * @param {string} response - The conversation summary response.
10
- * @param {() => void} [closeCallBack] - Optional callback to close the custom view.
11
- * @returns {Promise<any>} A promise resolving to a custom view component.
12
- */
13
- customView?: (response: string, closeCallBack?: () => void) => Promise<any>;
14
- /**
15
- * The threshold for the number of unread messages required to generate a conversation summary.
16
- * @type {number}
17
- * @default 30
18
- */
19
- unreadMessageThreshold?: number;
20
- /**
21
- * URL for the custom close button icon.
22
- * @type {string}
23
- * @default closeIcon
24
- */
25
- closeIconURL?: string;
26
- /**
27
- * Constructs a new AIConversationSummaryConfiguration instance.
28
- * @param {Partial<AIConversationSummaryConfiguration>} props - Partial properties to customize the conversation summary configuration.
29
- */
30
- constructor(props: Partial<AIConversationSummaryConfiguration>);
31
- }
@@ -1,22 +0,0 @@
1
- import { DataSource } from "../../../utils/DataSource";
2
- import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
3
- import { AIConversationSummaryConfiguration } from "./AIConversationSummaryConfiguration";
4
- import { CometChatActionsView } from "../../../modals/CometChatActionsView";
5
- import { CometChatMessageComposerAction } from "../../../modals";
6
- export declare class AIConversationSummaryDecorator extends DataSourceDecorator {
7
- configuration?: AIConversationSummaryConfiguration;
8
- newDataSource: DataSource;
9
- currentMessage: CometChat.BaseMessage | null;
10
- unreadMessageCount: number;
11
- loggedInUser: CometChat.User | null;
12
- user: CometChat.User;
13
- group: CometChat.Group;
14
- private LISTENER_ID;
15
- constructor(dataSource: DataSource, configuration?: AIConversationSummaryConfiguration);
16
- getId(): string;
17
- closePanel: () => void;
18
- getConversationSummary: () => Promise<string>;
19
- private loadConversationSummary;
20
- getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, id?: any): (CometChatMessageComposerAction | CometChatActionsView)[];
21
- private addMessageListener;
22
- }
@@ -1,8 +0,0 @@
1
- import { AIExtensionDataSource } from "../AIExtensionDataSource";
2
- import { AIConversationSummaryConfiguration } from "./AIConversationSummaryConfiguration";
3
- export declare class AIConversationSummaryExtension extends AIExtensionDataSource {
4
- private configuration?;
5
- constructor(configuration?: AIConversationSummaryConfiguration);
6
- addExtension(): void;
7
- getExtensionId(): string;
8
- }
@@ -1,9 +0,0 @@
1
- import { AIConversationSummaryConfiguration } from './AIConversationSummaryConfiguration';
2
- interface IAIConversationSummaryProps {
3
- getConversationSummaryCallback?: () => Promise<string>;
4
- editReplyCallback?: (reply: string) => void;
5
- closeCallback?: () => void;
6
- configuration?: AIConversationSummaryConfiguration;
7
- }
8
- declare const AIConversationSummaryView: (props: IAIConversationSummaryProps) => import("react/jsx-runtime").JSX.Element;
9
- export { AIConversationSummaryView };
@@ -1,6 +0,0 @@
1
- declare abstract class AIExtensionDataSource {
2
- abstract addExtension(): void;
3
- abstract getExtensionId(): string;
4
- enable(): void;
5
- }
6
- export { AIExtensionDataSource };
@@ -1,28 +0,0 @@
1
- import { AIBaseConfiguration } from "../AIBaseConfiguration";
2
- /**
3
- * Represents the configuration for the AISmartReplies component.
4
- *
5
- * This class allows customization of various aspects of the AISmartReplies component,
6
- * including styles, icons, custom views, and API configurations.
7
- */
8
- export declare class AISmartRepliesConfiguration extends AIBaseConfiguration {
9
- /**
10
- * The customView callback allows you to display a custom UI for conversation starters.
11
- * It receives the list of conversation starters and optional close and back callbacks.
12
- *
13
- * @type {(response: Object, closeCallBack?: () => void, backCallBack?: () => void) => Promise<any>}
14
- */
15
- customView?: (response: Object, closeCallBack?: () => void, backCallBack?: () => void) => Promise<any>;
16
- /**
17
- * The URL for the custom back button icon. Defaults to an embedded back button icon.
18
- *
19
- * @type {string}
20
- */
21
- backIconURL?: string;
22
- /**
23
- * Creates an instance of AISmartRepliesConfiguration.
24
- *
25
- * @param {Partial<AISmartRepliesConfiguration>} props - The properties to initialize the configuration.
26
- */
27
- constructor(props: Partial<AISmartRepliesConfiguration>);
28
- }
@@ -1,21 +0,0 @@
1
- import { DataSource } from "../../../utils/DataSource";
2
- import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
3
- import { AISmartRepliesConfiguration } from "./AISmartRepliesConfiguration";
4
- import { CometChatActionsView, CometChatMessageComposerAction } from "../../../modals";
5
- export declare class AISmartRepliesDecorator extends DataSourceDecorator {
6
- configuration?: AISmartRepliesConfiguration;
7
- newDataSource: DataSource;
8
- loggedInUser: CometChat.User | null;
9
- user: CometChat.User;
10
- group: CometChat.Group;
11
- buttonRef: any;
12
- isModalClosed: boolean;
13
- private closeCallback?;
14
- constructor(dataSource: DataSource, configuration?: AISmartRepliesConfiguration);
15
- getId(): string;
16
- editReply(reply: string): void;
17
- closeIfMessageReceived(message: CometChat.BaseMessage): void;
18
- getSmartReplies: () => Promise<string[]>;
19
- getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, id?: any): (CometChatMessageComposerAction | CometChatActionsView)[];
20
- private addMessageListener;
21
- }