@cometchat/chat-uikit-react 5.0.7 → 5.0.9

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 (42) hide show
  1. package/dist/index.d.ts +162 -225
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/styles/CometChatMessageComposer.css +7 -0
  5. package/dist/styles/CometChatMessageHeader.css +0 -6
  6. package/dist/styles/CometChatReactionList.css +1 -1
  7. package/dist/styles/MessageTranslationBubble.css +2 -4
  8. package/dist/styles/components/CometChatMessageComposer.css +7 -0
  9. package/dist/styles/components/CometChatMessageHeader.css +0 -6
  10. package/dist/styles/components/CometChatReactionList.css +1 -1
  11. package/dist/styles/components/MessageTranslationBubble.css +2 -4
  12. package/dist/types/CometChatUIKit/CometChatUIKitUtility.d.ts +0 -1
  13. package/dist/types/Enums/Enums.d.ts +2 -1
  14. package/dist/types/components/BaseComponents/CometChatAudioBubble/src/webaudio.d.ts +2 -2
  15. package/dist/types/components/BaseComponents/CometChatEmojiKeyboard/useCometChatEmojiKeyboard.d.ts +0 -1
  16. package/dist/types/components/BaseComponents/CometChatListItem/useCometChatListItem.d.ts +1 -1
  17. package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +1 -1
  18. package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +1 -1
  19. package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +1 -1
  20. package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +1 -1
  21. package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +1 -1
  22. package/dist/types/components/CometChatConversations/CometChatConversations.d.ts +1 -1
  23. package/dist/types/components/CometChatConversations/controller.d.ts +0 -1
  24. package/dist/types/components/CometChatMessageComposer/useCometChatMessageComposer.d.ts +1 -0
  25. package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +6 -0
  26. package/dist/types/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +10 -0
  27. package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +1 -1
  28. package/dist/types/components/CometChatThreadedMessagePreview/CometChatThreadedMessagePreview.d.ts +11 -1
  29. package/dist/types/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +1 -1
  30. package/dist/types/components/CometChatUsers/controller.d.ts +0 -1
  31. package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +0 -1
  32. package/dist/types/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +2 -3
  33. package/dist/types/events/CometChatUIEvents.d.ts +1 -0
  34. package/dist/types/modals/CometChatActionsView.d.ts +1 -1
  35. package/dist/types/modals/CometChatMessageTemplate.d.ts +4 -3
  36. package/dist/types/resources/CometChatLocalize/cometchat-localize.d.ts +16 -76
  37. package/dist/types/utils/DataSource.d.ts +2 -2
  38. package/dist/types/utils/DataSourceDecorator.d.ts +2 -2
  39. package/dist/types/utils/MessageReceiptUtils.d.ts +3 -30
  40. package/dist/types/utils/MessageUtils.d.ts +4 -3
  41. package/dist/types/utils/MessagesDataSource.d.ts +3 -4
  42. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DataSource } from "./DataSource";
3
2
  import { ComposerId } from "./MessagesDataSource";
4
3
  import { CometChatUrlsFormatter } from "../formatters/CometChatFormatters/CometChatUrlsFormatter/CometChatUrlsFormatter";
@@ -7,6 +6,7 @@ import { CometChatTextFormatter } from "../formatters/CometChatFormatters/CometC
7
6
  import { additionalParams } from "./ConversationUtils";
8
7
  import { CometChatActionsIcon, CometChatActionsView, CometChatMessageComposerAction, CometChatMessageTemplate } from "../modals";
9
8
  import { DatePatterns, MessageBubbleAlignment } from "../Enums/Enums";
9
+ import { JSX } from "react";
10
10
  /**
11
11
  * This class is used in AI, calling and Extension modules.
12
12
  */
@@ -18,7 +18,7 @@ export declare abstract class DataSourceDecorator implements DataSource {
18
18
  getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
19
19
  getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
20
20
  getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
21
- getStatusInfoView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipt?: boolean, datePattern?: DatePatterns): JSX.Element | Element | null;
21
+ getStatusInfoView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipts?: 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;
24
24
  getImageMessageContentView(message: CometChat.MediaMessage, alignment: MessageBubbleAlignment): JSX.Element | Element;
@@ -1,3 +1,4 @@
1
+ import { Receipts } from "../Enums/Enums";
1
2
  /**
2
3
  * Utility class for handling message receipt statuses.
3
4
  * It is used in CometChatConversations and CometChatMessageList components.
@@ -10,35 +11,7 @@ export declare class MessageReceiptUtils {
10
11
  * the corresponding receipt icon.
11
12
  *
12
13
  * @param {CometChat.BaseMessage} messageObject - The message object for which to get the receipt status.
13
- * @returns {receipts} - The receipt status icon.
14
+ * @returns {Receipts} - The receipt status icon.
14
15
  */
15
- static getReceiptStatus: (messageObject: CometChat.BaseMessage) => receipts;
16
- }
17
- /**
18
- * Enum representing different receipt statuses for a message.
19
- *
20
- * @readonly
21
- * @enum {number}
22
- */
23
- export declare enum receipts {
24
- /**
25
- * Status indicating that the message is waiting to be processed.
26
- */
27
- wait = 0,
28
- /**
29
- * Status indicating that the message has been sent.
30
- */
31
- sent = 1,
32
- /**
33
- * Status indicating that the message has been delivered.
34
- */
35
- delivered = 2,
36
- /**
37
- * Status indicating that the message has been read.
38
- */
39
- read = 3,
40
- /**
41
- * Status indicating that an error occurred with the message.
42
- */
43
- error = 4
16
+ static getReceiptStatus: (messageObject: CometChat.BaseMessage) => Receipts;
44
17
  }
@@ -1,5 +1,6 @@
1
1
  import { MessageBubbleAlignment } from "../Enums/Enums";
2
2
  import { CometChatMessageTemplate } from "../modals";
3
+ import { CometChatTextFormatter } from "../formatters";
3
4
  /**
4
5
  * Utility class for handling message display and styling.
5
6
  * It is used in CometChatMessageInformation component.
@@ -12,7 +13,7 @@ export declare class MessageUtils {
12
13
  * @param {CometChatMessageTemplate} template - The message template to use for rendering the content view.
13
14
  * @returns {object | null} - The content view for the message, or null if not found.
14
15
  */
15
- getContentView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment): any;
16
+ getContentView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment, textFormatters?: CometChatTextFormatter[]): any;
16
17
  /**
17
18
  * Retrieves the content view for a message based on the provided template.
18
19
  *
@@ -20,7 +21,7 @@ export declare class MessageUtils {
20
21
  * @param {CometChatMessageTemplate} template - The message template to use for rendering the content view.
21
22
  * @returns {object | null} - The content view for the message, or null if not found.
22
23
  */
23
- getStatusInfoView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment): any;
24
+ getStatusInfoView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment, hideReceipts?: boolean): any;
24
25
  /**
25
26
  * Retrieves the bubble wrapper for a message based on the provided template.
26
27
  *
@@ -38,7 +39,7 @@ export declare class MessageUtils {
38
39
  * @param {MessageBubbleAlignment} alignment - The alignment of the message bubble (left or right).
39
40
  * @returns {JSX.Element} - The message bubble component.
40
41
  */
41
- getMessageBubble(baseMessage: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment: MessageBubbleAlignment): any;
42
+ getMessageBubble(baseMessage: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment: MessageBubbleAlignment, hideReceipts?: boolean, textFormatters?: CometChatTextFormatter[]): any;
42
43
  /**
43
44
  *
44
45
  * @param {(CometChat.User | CometChat.GroupMember | any)} user
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
- import { CometChat } from "@cometchat/chat-sdk-javascript";
3
1
  import { DataSource } from "./DataSource";
2
+ import { JSX } from "react";
4
3
  import { additionalParams } from "./ConversationUtils";
5
4
  import { CometChatMentionsFormatter } from "../formatters/CometChatFormatters/CometChatMentionsFormatter/CometChatMentionsFormatter";
6
5
  import { CometChatUrlsFormatter } from "../formatters/CometChatFormatters/CometChatUrlsFormatter/CometChatUrlsFormatter";
@@ -47,14 +46,14 @@ export declare class MessagesDataSource implements DataSource {
47
46
  * @param {CometChat.BaseMessage} item - The message bubble for which the receipt needs to be fetched
48
47
  * @returns {JSX.Element | null} Returns JSX.Element for receipt of a message bubble or null
49
48
  */
50
- getBubbleStatusInfoReceipt: (item: CometChat.BaseMessage, hideReceipt?: boolean) => JSX.Element | null;
49
+ getBubbleStatusInfoReceipt: (item: CometChat.BaseMessage, hideReceipts?: boolean) => JSX.Element | null;
51
50
  /**
52
51
  * Function to get status and date for message bubble
53
52
  * @param {CometChat.BaseMessage} item - The message bubble for which the information needs to be fetched
54
53
  * @returns {JSX.Element | null} Returns JSX.Element for status and date of a message bubble or null
55
54
  */
56
55
  getBubbleStatusInfoDate: (item: CometChat.BaseMessage, datePattern?: DatePatterns) => JSX.Element | null;
57
- getStatusInfoView: (_messageObject: CometChat.BaseMessage, _alignment: MessageBubbleAlignment, hideReceipt?: boolean, datePattern?: DatePatterns) => import("react/jsx-runtime").JSX.Element | null;
56
+ getStatusInfoView: (_messageObject: CometChat.BaseMessage, _alignment: MessageBubbleAlignment, hideReceipts?: boolean, datePattern?: DatePatterns) => import("react/jsx-runtime").JSX.Element | null;
58
57
  getBottomView(_messageObject: CometChat.BaseMessage, _alignment: MessageBubbleAlignment): null;
59
58
  getTextMessageTemplate(additionalConfigurations?: additionalParams): CometChatMessageTemplate;
60
59
  getAudioMessageTemplate(): CometChatMessageTemplate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-react",
3
- "version": "5.0.7",
3
+ "version": "5.0.9",
4
4
  "description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
5
5
  "author": "CometChat",
6
6
  "exports": {
@@ -8,7 +8,7 @@
8
8
  "./css-variables.css": "./dist/styles/css-variables.css"
9
9
  },
10
10
  "dependencies": {
11
- "@cometchat/chat-sdk-javascript": "^4.0.11",
11
+ "@cometchat/chat-sdk-javascript": "^4.0.12",
12
12
  "@rollup/plugin-json": "^6.1.0",
13
13
  "rxjs": "^7.8.1"
14
14
  },