@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
@@ -1,6 +1,7 @@
1
1
  import { DataSource } from "../../../utils/DataSource";
2
2
  import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
3
3
  import { CollaborativeWhiteboardConfiguration } from "./CollaborativeWhiteboardConfiguration";
4
+ import { MessageBubbleAlignment } from "../../../Enums/Enums";
4
5
  import { CometChatMessageComposerAction, CometChatMessageTemplate } from "../../../modals";
5
6
  /**
6
7
  * Decorator class for extending functionality related to collaborative whiteboard.
@@ -37,7 +38,7 @@ export declare class CollaborativeWhiteBoardExtensionDecorator extends DataSourc
37
38
  * Gets the unique identifier for the collaborative whiteboard extension.
38
39
  * @returns {string} The extension ID.
39
40
  */
40
- getAllMessageCategories(): string[];
41
+ getAllMessageCategories(additionalConfigurations?: Object | undefined): string[];
41
42
  /**
42
43
  * Checks if a message template of a given type exists.
43
44
  * @param {CometChatMessageTemplate[]} template - Array of message templates.
@@ -61,7 +62,7 @@ export declare class CollaborativeWhiteBoardExtensionDecorator extends DataSourc
61
62
  * @param {CometChat.CustomMessage} whiteboardMessage - The whiteboard message.
62
63
  * @returns {JSX.Element} The content view for the whiteboard message.
63
64
  */
64
- getWhiteboardContentView(whiteboardMessage: CometChat.CustomMessage): import("react/jsx-runtime").JSX.Element;
65
+ getWhiteboardContentView(whiteboardMessage: CometChat.CustomMessage, alignment?: MessageBubbleAlignment): import("react/jsx-runtime").JSX.Element;
65
66
  /**
66
67
  * Opens the collaborative whiteboard document in a new fullscreen window.
67
68
  * @param {string} whiteboardURL - The URL of the whiteboard document.
@@ -80,7 +81,7 @@ export declare class CollaborativeWhiteBoardExtensionDecorator extends DataSourc
80
81
  * @param {any} id - The ID object containing user or group information.
81
82
  * @returns {CometChatMessageComposerAction[]} An array of message composer actions.
82
83
  */
83
- getAttachmentOptions(id: any): CometChatMessageComposerAction[];
84
+ getAttachmentOptions(id: any, additionalConfigurations?: any): CometChatMessageComposerAction[];
84
85
  /**
85
86
  * Overrides the method to get the last message from a conversation.
86
87
  * Checks if the last message is related to the collaborative whiteboard extension
@@ -25,7 +25,9 @@ export declare class MessageTranslationExtensionDecorator extends DataSourceDeco
25
25
  * @param {CometChat.Group} [group] - Optional group associated with the message.
26
26
  * @returns {(CometChatActionsIcon | CometChatActionsView)[]} The array of action options for the message.
27
27
  */
28
- getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group): (CometChatActionsIcon | CometChatActionsView)[];
28
+ getTextMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: {
29
+ hideTranslateMessageOption: boolean;
30
+ }): (CometChatActionsIcon | CometChatActionsView)[];
29
31
  /**
30
32
  * Retrieves the content view for a text message, including translated content if available.
31
33
  *
@@ -1,3 +1,4 @@
1
+ import { MessageBubbleAlignment } from "../../../Enums/Enums";
1
2
  interface PollsBubbleProps {
2
3
  /**
3
4
  * Array of options for the poll.
@@ -24,6 +25,10 @@ interface PollsBubbleProps {
24
25
  * Optional metadata associated with the poll.
25
26
  */
26
27
  metadata?: any;
28
+ /**
29
+ * ALignemtn of the message bubble
30
+ */
31
+ alignment?: MessageBubbleAlignment;
27
32
  }
28
33
  /**
29
34
  * PollsBubble component that displays a poll question and options.
@@ -1,6 +1,7 @@
1
1
  import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
2
2
  import { DataSource } from "../../../utils/DataSource";
3
3
  import { PollsConfiguration } from "./PollsConfiguration";
4
+ import { MessageBubbleAlignment } from "../../../Enums/Enums";
4
5
  import { CometChatMessageComposerAction, CometChatMessageTemplate } from "../../../modals";
5
6
  /**
6
7
  * The PollsExtensionDecorator class extends the DataSourceDecorator to
@@ -37,7 +38,7 @@ export declare class PollsExtensionDecorator extends DataSourceDecorator {
37
38
  * Retrieves all message categories, including the custom message category if not already present.
38
39
  * @returns An array of message categories.
39
40
  */
40
- getAllMessageCategories(): string[];
41
+ getAllMessageCategories(additionalConfigurations?: Object | undefined): string[];
41
42
  /**
42
43
  * Checks if a template of a specific type exists.
43
44
  * @param template - The array of message templates.
@@ -64,7 +65,7 @@ export declare class PollsExtensionDecorator extends DataSourceDecorator {
64
65
  * @param _theme - The theme to apply.
65
66
  * @returns The content view for the poll message.
66
67
  */
67
- getPollsContentView(message: CometChat.CustomMessage): import("react/jsx-runtime").JSX.Element;
68
+ getPollsContentView(message: CometChat.CustomMessage, alignment?: MessageBubbleAlignment): import("react/jsx-runtime").JSX.Element;
68
69
  /**
69
70
  * Retrieves specific data from a poll message.
70
71
  * @param message - The poll message.
@@ -78,7 +79,7 @@ export declare class PollsExtensionDecorator extends DataSourceDecorator {
78
79
  * @param id - The ID for the attachment options.
79
80
  * @returns An array of message composer actions.
80
81
  */
81
- getAttachmentOptions(id: any): CometChatMessageComposerAction[];
82
+ getAttachmentOptions(id: any, additionalConfigurations?: any): CometChatMessageComposerAction[];
82
83
  /**
83
84
  * Handles the click event for the polls button in the message composer.
84
85
  * Opens the poll creation modal with pre-defined styles.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChat } from "@cometchat/chat-sdk-javascript";
3
2
  import { DataSource } from "../../../utils/DataSource";
4
3
  import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
@@ -46,7 +45,7 @@ export declare class StickersExtensionDecorator extends DataSourceDecorator {
46
45
  * @param group - Optional group object.
47
46
  * @returns An array of auxiliary options.
48
47
  */
49
- getAuxiliaryOptions(id: ComposerId, user?: CometChat.User, group?: CometChat.Group): JSX.Element[];
48
+ getStickerButton(id: ComposerId, user?: CometChat.User, group?: CometChat.Group): import("react/jsx-runtime").JSX.Element;
50
49
  /**
51
50
  * Creates the sticker auxiliary button component.
52
51
  * @param id - A map containing relevant IDs.
@@ -90,7 +89,7 @@ export declare class StickersExtensionDecorator extends DataSourceDecorator {
90
89
  * Retrieves all message categories, including custom categories.
91
90
  * @returns An array of message categories.
92
91
  */
93
- getAllMessageCategories(): string[];
92
+ getAllMessageCategories(additionalConfigurations?: Object | undefined): string[];
94
93
  /**
95
94
  * Retrieves all message types, including sticker types.
96
95
  * @returns An array of message types.
@@ -4,6 +4,7 @@ interface ReactionInfoProps {
4
4
  messageObject: CometChat.BaseMessage;
5
5
  reaction: string;
6
6
  placement?: Placement;
7
+ onError?: ((error: CometChat.CometChatException) => void) | null;
7
8
  }
8
- declare const CometChatReactionInfo: React.FC<ReactionInfoProps>;
9
- export default CometChatReactionInfo;
9
+ export declare const CometChatReactionInfo: React.FC<ReactionInfoProps>;
10
+ export {};
@@ -3,6 +3,7 @@ interface ReactionListProps {
3
3
  messageObject: CometChat.BaseMessage;
4
4
  reactionsRequestBuilder?: CometChat.ReactionsRequestBuilder;
5
5
  reactionItemClicked?: (reaction: CometChat.Reaction, message: CometChat.BaseMessage) => void;
6
+ onError?: ((error: CometChat.CometChatException) => void) | null;
6
7
  }
7
- declare const CometChatReactionList: React.FC<ReactionListProps>;
8
- export default CometChatReactionList;
8
+ export declare const CometChatReactionList: React.FC<ReactionListProps>;
9
+ export {};
@@ -7,6 +7,7 @@ interface ReactionsProps {
7
7
  onReactionListItemClick?: (reaction: CometChat.Reaction, message: CometChat.BaseMessage) => void;
8
8
  hoverDebounceTime?: number;
9
9
  onReactionClick?: (reaction: CometChat.ReactionCount, message: CometChat.BaseMessage) => void;
10
+ onError?: ((error: CometChat.CometChatException) => void) | null;
10
11
  }
11
- declare const CometChatReactions: React.FC<ReactionsProps>;
12
- export default CometChatReactions;
12
+ export declare const CometChatReactions: React.FC<ReactionsProps>;
13
+ export {};
@@ -40,13 +40,6 @@ export { CometChatMessageHeader } from './components/CometChatMessageHeader/Come
40
40
  export { CometChatMessageList } from './components/CometChatMessageList/CometChatMessageList';
41
41
  export { CometChatUsers } from './components/CometChatUsers/CometChatUsers';
42
42
  export { CometChatMessageInformation } from './components/CometChatMessageInformation/CometChatMessageInformation';
43
- export { AIConversationStarterExtension } from './components/AI/AIConversationStarter/AIConversationStarterExtension';
44
- export { AIConversationStarterDecorator } from './components/AI/AIConversationStarter/AIConversationStarterDecorator';
45
- export { AISmartRepliesExtension } from './components/AI/AISmartReplies/AISmartRepliesExtension';
46
- export { AISmartRepliesDecorator } from './components/AI/AISmartReplies/AISmartRepliesDecorator';
47
- export { AIConversationSummaryExtension } from './components/AI/AIConversationSummary/AIConversationSummaryExtension';
48
- export { AIConversationSummaryDecorator } from './components/AI/AIConversationSummary/AIConversationSummaryDecorator';
49
- export { AIExtensionDataSource } from './components/AI/AIExtensionDataSource';
50
43
  export { CometChatUIKitCalls } from './CometChatUIKit/CometChatCalls';
51
44
  export { CometChatUIKitConstants } from "./constants/CometChatUIKitConstants";
52
45
  export { CometChatUtilityConstants } from "./constants/CometChatUtilityConstants";
@@ -68,6 +61,11 @@ export { CometChatUserEvents } from "./events/CometChatUserEvents";
68
61
  export { ChatSdkEventInitializer } from "./utils/ChatSdkEventInitializer";
69
62
  export { CometChatActionBubble } from './components/BaseComponents/CometChatActionBubble/CometChatActionBubble';
70
63
  export { CometChatActionSheet } from './components/BaseComponents/CometChatActionSheet/CometChatActionSheet';
64
+ export { CallButtonConfiguration } from './components/Calling/CallButtonConfiguration';
65
+ export { CallingConfiguration } from './components/Calling/CallingConfiguration';
66
+ export { CometChatCallButtons } from './components/Calling/CometChatCallButtons/CometChatCallButtons';
67
+ export { OutgoingCallConfiguration } from './components/Calling/OutgoingCallConfiguration';
68
+ export * from './components/Calling/Utils/utils';
71
69
  export { CometChatAudioBubble } from './components/BaseComponents/CometChatAudioBubble/CometChatAudioBubble';
72
70
  export { CometChatAvatar } from './components/BaseComponents/CometChatAvatar/CometChatAvatar';
73
71
  export { CometChatButton } from './components/BaseComponents/CometChatButton/CometChatButton';
@@ -93,6 +91,9 @@ export { CometChatDropDown } from './components/BaseComponents/CometChatDropDown
93
91
  export { CometChatDocumentBubble } from './components/BaseComponents/CometChatDocumentBubble/CometChatDocumentBubble';
94
92
  export { CometChatDate } from './components/BaseComponents/CometChatDate/CometChatDate';
95
93
  export { CometChatDeleteBubble } from './components/BaseComponents/CometChatDeleteBubble/CometChatDeleteBubble';
94
+ export { CometChatReactionInfo } from './components/Reactions/CometChatReactionInfo/CometChatReactionInfo';
95
+ export { CometChatReactionList } from './components/Reactions/CometChatReactionList/CometChatReactionList';
96
+ export { CometChatReactions } from './components/Reactions/CometChatReactions/CometChatReactions';
96
97
  export { CallingDetailsUtils } from './utils/CallingDetailsUtils';
97
98
  export { ConversationUtils } from './utils/ConversationUtils';
98
99
  export { GroupMemberUtils } from './utils/GroupMemberUtils';