@cometchat/chat-uikit-react 6.0.4 → 6.0.6

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 (40) hide show
  1. package/dist/index.d.ts +171 -174
  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/controller.d.ts +0 -1
  23. package/dist/types/components/CometChatMessageComposer/useCometChatMessageComposer.d.ts +1 -0
  24. package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +6 -0
  25. package/dist/types/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +10 -0
  26. package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +1 -1
  27. package/dist/types/components/CometChatThreadHeader/CometChatThreadHeader.d.ts +11 -1
  28. package/dist/types/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +1 -1
  29. package/dist/types/components/CometChatUsers/controller.d.ts +0 -1
  30. package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +0 -1
  31. package/dist/types/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +2 -3
  32. package/dist/types/events/CometChatUIEvents.d.ts +1 -0
  33. package/dist/types/modals/CometChatActionsView.d.ts +1 -1
  34. package/dist/types/modals/CometChatMessageTemplate.d.ts +4 -3
  35. package/dist/types/utils/DataSource.d.ts +2 -2
  36. package/dist/types/utils/DataSourceDecorator.d.ts +2 -2
  37. package/dist/types/utils/MessageReceiptUtils.d.ts +3 -30
  38. package/dist/types/utils/MessageUtils.d.ts +4 -3
  39. package/dist/types/utils/MessagesDataSource.d.ts +9 -10
  40. package/package.json +2 -2
@@ -319,4 +319,11 @@ height: 58px;
319
319
  }
320
320
  .cometchat-message-composer__secondary-button-view-attachment-button-5 .cometchat-popover__content{
321
321
  height: 285px;
322
+ }
323
+ .cometchat-message-composer .cometchat-edit-preview__subtitle{
324
+ height: fit-content;
325
+ max-height: 100px;
326
+ overflow: hidden;
327
+ text-overflow: ellipsis;
328
+ white-space: nowrap;
322
329
  }
@@ -176,10 +176,4 @@ padding: 0;
176
176
  .cometchat-message-header .cometchat-list-item .cometchat-list-item__body-title {
177
177
  display: initial;
178
178
  }
179
- }
180
-
181
- @media (min-width: 769px) {
182
- .cometchat-message-header__back-button {
183
- display: none;
184
- }
185
179
  }
@@ -119,7 +119,7 @@
119
119
  .cometchat-reaction-list__shimmer {
120
120
  display: flex;
121
121
  width: 280px;
122
- max-height: 300px;
122
+ height: 200px;
123
123
  flex-direction: column;
124
124
  align-items: flex-start;
125
125
  align-self: stretch;
@@ -36,18 +36,16 @@
36
36
  text-align: left;
37
37
  white-space: pre-line;
38
38
  overflow: auto;
39
+ width: 100%;
40
+ display: block;
39
41
  }
40
42
 
41
43
  .cometchat-tanslation-bubble-incoming .cometchat-tanslation-bubble__translated-text {
42
- width: 100%;
43
- display: flex;
44
44
  color: var(--cometchat-neutral-color-900, #141414);
45
45
  }
46
46
 
47
47
 
48
48
  .cometchat-tanslation-bubble-outgoing .cometchat-tanslation-bubble__translated-text {
49
- width: 100%;
50
- display: flex;
51
49
  color: var(--cometchat-static-white, #FFF);
52
50
  }
53
51
 
@@ -319,4 +319,11 @@ height: 58px;
319
319
  }
320
320
  .cometchat-message-composer__secondary-button-view-attachment-button-5 .cometchat-popover__content{
321
321
  height: 285px;
322
+ }
323
+ .cometchat-message-composer .cometchat-edit-preview__subtitle{
324
+ height: fit-content;
325
+ max-height: 100px;
326
+ overflow: hidden;
327
+ text-overflow: ellipsis;
328
+ white-space: nowrap;
322
329
  }
@@ -176,10 +176,4 @@ padding: 0;
176
176
  .cometchat-message-header .cometchat-list-item .cometchat-list-item__body-title {
177
177
  display: initial;
178
178
  }
179
- }
180
-
181
- @media (min-width: 769px) {
182
- .cometchat-message-header__back-button {
183
- display: none;
184
- }
185
179
  }
@@ -119,7 +119,7 @@
119
119
  .cometchat-reaction-list__shimmer {
120
120
  display: flex;
121
121
  width: 280px;
122
- max-height: 300px;
122
+ height: 200px;
123
123
  flex-direction: column;
124
124
  align-items: flex-start;
125
125
  align-self: stretch;
@@ -36,18 +36,16 @@
36
36
  text-align: left;
37
37
  white-space: pre-line;
38
38
  overflow: auto;
39
+ width: 100%;
40
+ display: block;
39
41
  }
40
42
 
41
43
  .cometchat-tanslation-bubble-incoming .cometchat-tanslation-bubble__translated-text {
42
- width: 100%;
43
- display: flex;
44
44
  color: var(--cometchat-neutral-color-900, #141414);
45
45
  }
46
46
 
47
47
 
48
48
  .cometchat-tanslation-bubble-outgoing .cometchat-tanslation-bubble__translated-text {
49
- width: 100%;
50
- display: flex;
51
49
  color: var(--cometchat-static-white, #FFF);
52
50
  }
53
51
 
@@ -1,4 +1,3 @@
1
- import { BaseMessage, CometChat } from "@cometchat/chat-sdk-javascript";
2
1
  interface MessageExtensionType {
3
2
  hasXSS?: string;
4
3
  sanitized_text?: string;
@@ -67,7 +67,8 @@ export declare enum TabAlignment {
67
67
  export declare enum MessageStatus {
68
68
  inprogress = 0,
69
69
  success = 1,
70
- error = 2
70
+ error = 2,
71
+ cancelled = 3
71
72
  }
72
73
  /**
73
74
  * This is used to specify the types of the read receipts for the message.
@@ -31,8 +31,8 @@ declare class WebAudioPlayer extends EventEmitter<WebAudioPlayerEvents> {
31
31
  constructor(audioContext?: AudioContext);
32
32
  /** Subscribe to an event. Returns an unsubscribe function. */
33
33
  addEventListener: <EventName extends keyof WebAudioPlayerEvents>(event: EventName, listener: (...args: WebAudioPlayerEvents[EventName]) => void, options?: {
34
- once?: boolean | undefined;
35
- } | undefined) => () => void;
34
+ once?: boolean;
35
+ }) => () => void;
36
36
  /** Unsubscribe from an event */
37
37
  removeEventListener: <EventName extends keyof WebAudioPlayerEvents>(event: EventName, listener: (...args: WebAudioPlayerEvents[EventName]) => void) => void;
38
38
  load(): Promise<void>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChatEmoji, CometChatEmojiCategory } from "./CometChatEmoji";
3
2
  export declare const useCometChatEmojiKeyboard: ({ emojiData, }: {
4
3
  emojiData: CometChatEmojiCategory[];
@@ -4,7 +4,7 @@ interface ICometChatListItem {
4
4
  onListItemClicked?: (input: {
5
5
  id: string;
6
6
  }) => void;
7
- menuRef: React.RefObject<HTMLDivElement>;
7
+ menuRef: React.RefObject<HTMLDivElement | null>;
8
8
  }
9
9
  export declare const useCometChatListItem: ({ id, onListItemClicked, menuRef, }: ICometChatListItem) => {
10
10
  listItemClick: (event: MouseEvent<HTMLDivElement>) => void;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { CometChatActionsIcon, CometChatActionsView } from "../../../modals";
3
2
  import { MessageBubbleAlignment } from "../../../Enums/Enums";
3
+ import { JSX } from 'react';
4
4
  /**Interface defining the structure for MessageBubbleProps */
5
5
  interface MessageBubbleProps {
6
6
  id: string | number;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { CalendarObject } from "../../../utils/CalendarObject";
2
+ import { JSX } from 'react';
3
3
  interface CallLogsProps {
4
4
  /**
5
5
  * Object representing the active call that is currently selected.
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { CometChatUIKitCalls } from "../../../CometChatUIKit/CometChatCalls";
2
+ import { JSX } from 'react';
3
3
  interface IncomingCallProps {
4
4
  /**
5
5
  * The CometChat call object used to initialize and display the incoming call component.
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { JSX } from 'react';
2
2
  /**
3
3
  * Props interface for the outgoing call component
4
4
  */
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { JSX } from 'react';
2
2
  export declare class OutgoingCallConfiguration {
3
3
  disableSoundForCalls?: boolean;
4
4
  customSoundForCalls?: string;
@@ -1,4 +1,3 @@
1
- import { CometChat } from '@cometchat/chat-sdk-javascript';
2
1
  type Args = {
3
2
  conversationsRequestBuilder: CometChat.ConversationsRequestBuilder | null;
4
3
  errorHandler: (error: unknown, source?: string) => void;
@@ -37,6 +37,7 @@ type Args = {
37
37
  text: string;
38
38
  getCurrentInput: Function;
39
39
  isPartOfCurrentChatForUIEvent: (message: CometChat.BaseMessage) => boolean | undefined;
40
+ textMessageToEdit: CometChat.TextMessage | null;
40
41
  };
41
42
  export declare function useCometChatMessageComposer(args: Args): void;
42
43
  export {};
@@ -11,9 +11,15 @@ interface MessageHeaderProps {
11
11
  showConversationSummaryButton?: boolean;
12
12
  /**
13
13
  * Hides the back button in the header in mobile view.
14
+ * @deprecated Use 'showBackButton' prop instead. This prop is deprecated and will be removed in future versions.
14
15
  * @default false
15
16
  */
16
17
  hideBackButton?: boolean;
18
+ /**
19
+ * Hides the back button in the header in mobile view.
20
+ * @default false
21
+ */
22
+ showBackButton?: boolean;
17
23
  /**
18
24
  * Hides the video call button.
19
25
  * @default false
@@ -1,5 +1,6 @@
1
1
  import { CometChatMessageTemplate } from "../../modals";
2
2
  import { CalendarObject } from "../../utils/CalendarObject";
3
+ import { CometChatTextFormatter } from "../../formatters";
3
4
  interface MessageInformationProps {
4
5
  message: CometChat.BaseMessage;
5
6
  onClose?: () => void;
@@ -20,6 +21,15 @@ interface MessageInformationProps {
20
21
  * Template for customizing the appearance of the message.
21
22
  */
22
23
  template?: CometChatMessageTemplate;
24
+ /**
25
+ * Hides the visibility of receipt in the Message Information.
26
+ * @default false
27
+ */
28
+ hideReceipts?: boolean;
29
+ /**
30
+ * Array of text formatters for custom styling or formatting of message text bubbles.
31
+ */
32
+ textFormatters?: CometChatTextFormatter[];
23
33
  }
24
34
  declare const CometChatMessageInformation: (props: MessageInformationProps) => import("react/jsx-runtime").JSX.Element;
25
35
  export { CometChatMessageInformation };
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { CometChatMessageTemplate } from "../../modals";
3
2
  import { MessageListAlignment } from "../../Enums/Enums";
4
3
  import { CometChatTextFormatter } from "../../formatters/CometChatFormatters/CometChatTextFormatter";
5
4
  import { CalendarObject } from "../../utils/CalendarObject";
5
+ import { JSX } from 'react';
6
6
  /**
7
7
  * Props for the MessageList component.
8
8
  */
@@ -1,6 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { CometChatMessageTemplate } from "../../modals";
3
2
  import { CalendarObject } from "../../utils/CalendarObject";
3
+ import { CometChatTextFormatter } from "../../formatters";
4
+ import { JSX } from 'react';
4
5
  interface CometChatThreadHeaderProps {
5
6
  /**
6
7
  * Hides the visibility of the date header.
@@ -47,6 +48,15 @@ interface CometChatThreadHeaderProps {
47
48
  * Format for the timestamp displayed next to messages.
48
49
  */
49
50
  messageSentAtDateTimeFormat?: CalendarObject;
51
+ /**
52
+ * Hides the visibility of receipt in the Thread Header.
53
+ * @default false
54
+ */
55
+ hideReceipts?: boolean;
56
+ /**
57
+ * Array of text formatters for custom styling or formatting of message text bubbles.
58
+ */
59
+ textFormatters?: CometChatTextFormatter[];
50
60
  }
51
61
  declare const CometChatThreadHeader: (props: CometChatThreadHeaderProps) => import("react/jsx-runtime").JSX.Element;
52
62
  export { CometChatThreadHeader };
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { UserMemberListType } from '../../Enums/Enums';
2
+ import { JSX } from 'react';
3
3
  export interface MentionsProps {
4
4
  userMemberListType?: UserMemberListType;
5
5
  onItemClick?: (user: CometChat.User | CometChat.GroupMember) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type Args = {
3
2
  searchText: string;
4
3
  usersRequestBuilder: CometChat.UsersRequestBuilder | null;
@@ -1,4 +1,3 @@
1
- import { CometChat } from "@cometchat/chat-sdk-javascript";
2
1
  import { DataSource } from "../../../utils/DataSource";
3
2
  import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
4
3
  import { ComposerId } from "../../../utils/MessagesDataSource";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
3
2
  /**
4
3
  * Class representing a Thumbnail Generation extension decorator.
@@ -25,7 +24,7 @@ export declare class ThumbnailGenerationExtensionDecorator extends DataSourceDec
25
24
  * @param {ImageBubbleStyle} [style] - Optional style for the image bubble.
26
25
  * @returns {React.ReactNode} The rendered image message bubble.
27
26
  */
28
- getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, onClick?: Function): JSX.Element | Element;
27
+ getImageMessageBubble(imageUrl: string, placeholderImage: string, message: CometChat.MediaMessage, onClick?: Function): import("react").JSX.Element | Element;
29
28
  /**
30
29
  * Provides the video message bubble with support for thumbnail generation.
31
30
  * It checks for a thumbnail URL in the message metadata and uses it if available.
@@ -36,5 +35,5 @@ export declare class ThumbnailGenerationExtensionDecorator extends DataSourceDec
36
35
  * @param {Function} [onClick] - Optional click event handler.
37
36
  * @returns {React.ReactNode} The rendered video message bubble.
38
37
  */
39
- getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, thumbnailUrl?: string, onClick?: Function): JSX.Element | Element;
38
+ getVideoMessageBubble(videoUrl: string, message: CometChat.MediaMessage, thumbnailUrl?: string, onClick?: Function): import("react").JSX.Element | Element;
40
39
  }
@@ -29,6 +29,7 @@ export interface IOpenChat {
29
29
  }
30
30
  export interface IShowOngoingCall {
31
31
  child: any;
32
+ message?: CometChat.CustomMessage;
32
33
  }
33
34
  export interface IPanel {
34
35
  child?: any;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { CometChatActions } from "./CometChatActions";
2
+ import { JSX } from 'react';
3
3
  /**
4
4
  * CometChatActionsView is a pre-defined structure for creating actions
5
5
  * that the user can perform on a message with a customized UI view representation.
@@ -1,7 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { CometChatMessageOption } from "./CometChatMessageOption";
3
2
  import { MessageBubbleAlignment } from "../Enums/Enums";
4
3
  import { CalendarObject } from "../utils/CalendarObject";
4
+ import { CometChatTextFormatter } from "../formatters";
5
+ import { JSX } from 'react';
5
6
  /**
6
7
  * CometChatMessageTemplate is a pre-defined structure for creating message views
7
8
  * that can be used as a starting point or blueprint for creating message views,
@@ -20,7 +21,7 @@ declare class CometChatMessageTemplate {
20
21
  * and Video bubble based on the type of the message.
21
22
  * @type {(message:CometChat.BaseMessage,alignment:MessageBubbleAlignment)=> Element | JSX.Element | null}
22
23
  */
23
- contentView: ((message: CometChat.BaseMessage, alignment: MessageBubbleAlignment) => Element | JSX.Element | null) | null;
24
+ contentView: ((message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, textFormatters?: CometChatTextFormatter[]) => Element | JSX.Element | null) | null;
24
25
  /**
25
26
  * Custom component to customize the complete message bubble.
26
27
  * By default, headerView, contentView and footerView collectively form a message bubble.
@@ -49,7 +50,7 @@ declare class CometChatMessageTemplate {
49
50
  * By default, it displays the receipt and the timestamp.
50
51
  * @type {(message:CometChat.BaseMessage,alignment:MessageBubbleAlignment)=> Element | JSX.Element | null}
51
52
  */
52
- statusInfoView: ((message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipt?: boolean, messageSentAtDateTimeFormat?: CalendarObject) => Element | JSX.Element | null) | null;
53
+ statusInfoView: ((message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipts?: boolean, messageSentAtDateTimeFormat?: CalendarObject) => Element | JSX.Element | null) | null;
53
54
  /**
54
55
  * List of available actions that any user can perform on a message, like reacting,
55
56
  * editing or deleting a message.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChatMentionsFormatter } from "../formatters/CometChatFormatters/CometChatMentionsFormatter/CometChatMentionsFormatter";
3
2
  import { CometChatTextFormatter } from "../formatters/CometChatFormatters/CometChatTextFormatter";
4
3
  import { CometChatUrlsFormatter } from "../formatters/CometChatFormatters/CometChatUrlsFormatter/CometChatUrlsFormatter";
@@ -7,6 +6,7 @@ import { CometChatActionsIcon, CometChatActionsView, CometChatMessageComposerAct
7
6
  import { MessageBubbleAlignment } from "../Enums/Enums";
8
7
  import { ComposerId } from "./MessagesDataSource";
9
8
  import { CalendarObject } from "./CalendarObject";
9
+ import { JSX } from 'react';
10
10
  /**
11
11
  * Class for providing message options and views.
12
12
  * It is used in AI and calling module and utils related to messages.
@@ -18,7 +18,7 @@ export declare abstract class DataSource {
18
18
  abstract getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
19
19
  abstract getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
20
20
  abstract getBottomView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment): Element | JSX.Element | null;
21
- abstract getStatusInfoView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipt?: boolean, messageSentAtDateTimeFormat?: CalendarObject): Element | JSX.Element | null;
21
+ abstract getStatusInfoView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipts?: boolean, messageSentAtDateTimeFormat?: CalendarObject): Element | JSX.Element | null;
22
22
  abstract getTextMessageContentView(message: CometChat.TextMessage, alignment: MessageBubbleAlignment, otherParams: Object | undefined): Element | JSX.Element;
23
23
  abstract getImageMessageContentView(message: CometChat.MediaMessage, alignment: MessageBubbleAlignment): Element | JSX.Element;
24
24
  abstract getVideoMessageContentView(message: CometChat.MediaMessage, alignment: MessageBubbleAlignment): Element | JSX.Element;
@@ -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";
@@ -8,6 +7,7 @@ import { additionalParams } from "./ConversationUtils";
8
7
  import { CometChatActionsIcon, CometChatActionsView, CometChatMessageComposerAction, CometChatMessageTemplate } from "../modals";
9
8
  import { MessageBubbleAlignment } from "../Enums/Enums";
10
9
  import { CalendarObject } from "./CalendarObject";
10
+ import { JSX } from 'react';
11
11
  /**
12
12
  * This class is used in AI, calling and Extension modules.
13
13
  */
@@ -19,7 +19,7 @@ export declare abstract class DataSourceDecorator implements DataSource {
19
19
  getVideoMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
20
20
  getAudioMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
21
21
  getFileMessageOptions(loggedInUser: CometChat.User, messageObject: CometChat.BaseMessage, group?: CometChat.Group, additionalParams?: Object | undefined): Array<CometChatActionsIcon | CometChatActionsView>;
22
- getStatusInfoView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipt?: boolean, messageSentAtDateTimeFormat?: CalendarObject): JSX.Element | Element | null;
22
+ getStatusInfoView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipts?: boolean, messageSentAtDateTimeFormat?: CalendarObject): JSX.Element | Element | null;
23
23
  getBottomView(message: CometChat.BaseMessage, alignment: MessageBubbleAlignment): JSX.Element | Element | null;
24
24
  getTextMessageContentView(message: CometChat.TextMessage, alignment: MessageBubbleAlignment, additionalConfigurations?: Object | undefined): JSX.Element | Element;
25
25
  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,6 +1,7 @@
1
1
  import { MessageBubbleAlignment } from "../Enums/Enums";
2
2
  import { CometChatMessageTemplate } from "../modals";
3
3
  import { CalendarObject } from "./CalendarObject";
4
+ import { CometChatTextFormatter } from "../formatters";
4
5
  /**
5
6
  * Utility class for handling message display and styling.
6
7
  * It is used in CometChatMessageInformation component.
@@ -13,7 +14,7 @@ export declare class MessageUtils {
13
14
  * @param {CometChatMessageTemplate} template - The message template to use for rendering the content view.
14
15
  * @returns {object | null} - The content view for the message, or null if not found.
15
16
  */
16
- getContentView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment): any;
17
+ getContentView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment, textFormatters?: CometChatTextFormatter[]): any;
17
18
  /**
18
19
  * Retrieves the content view for a message based on the provided template.
19
20
  *
@@ -21,7 +22,7 @@ export declare class MessageUtils {
21
22
  * @param {CometChatMessageTemplate} template - The message template to use for rendering the content view.
22
23
  * @returns {object | null} - The content view for the message, or null if not found.
23
24
  */
24
- getStatusInfoView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment, messageSentAtDateTimeFormat?: CalendarObject): any;
25
+ getStatusInfoView(message: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment?: MessageBubbleAlignment, messageSentAtDateTimeFormat?: CalendarObject, hideReceipts?: boolean): any;
25
26
  /**
26
27
  * Retrieves the bubble wrapper for a message based on the provided template.
27
28
  *
@@ -39,7 +40,7 @@ export declare class MessageUtils {
39
40
  * @param {MessageBubbleAlignment} alignment - The alignment of the message bubble (left or right).
40
41
  * @returns {JSX.Element} - The message bubble component.
41
42
  */
42
- getMessageBubble(baseMessage: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment: MessageBubbleAlignment, messageSentAtDateTimeFormat?: CalendarObject): any;
43
+ getMessageBubble(baseMessage: CometChat.BaseMessage, template: CometChatMessageTemplate, alignment: MessageBubbleAlignment, messageSentAtDateTimeFormat?: CalendarObject, hideReceipts?: boolean, textFormatters?: CometChatTextFormatter[]): any;
43
44
  /**
44
45
  *
45
46
  * @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";
@@ -48,7 +47,7 @@ export declare class MessagesDataSource implements DataSource {
48
47
  * @param {CometChat.BaseMessage} item - The message bubble for which the receipt needs to be fetched
49
48
  * @returns {JSX.Element | null} Returns JSX.Element for receipt of a message bubble or null
50
49
  */
51
- getBubbleStatusInfoReceipt: (item: CometChat.BaseMessage, hideReceipt?: boolean) => JSX.Element | null;
50
+ getBubbleStatusInfoReceipt: (item: CometChat.BaseMessage, hideReceipts?: boolean) => JSX.Element | null;
52
51
  /**
53
52
  * Function for displaying the timestamp next to messages.
54
53
  * @returns CalendarObject
@@ -56,14 +55,14 @@ export declare class MessagesDataSource implements DataSource {
56
55
  getMessageSentAtDateFormat(messageSentAtDateTimeFormat?: CalendarObject): {
57
56
  today: string;
58
57
  yesterday: string;
59
- lastWeek?: string | undefined;
58
+ lastWeek?: string;
60
59
  otherDays: string;
61
60
  relativeTime?: {
62
- minute?: string | undefined;
63
- minutes?: string | undefined;
64
- hour?: string | undefined;
65
- hours?: string | undefined;
66
- } | undefined;
61
+ minute?: string;
62
+ minutes?: string;
63
+ hour?: string;
64
+ hours?: string;
65
+ };
67
66
  };
68
67
  /**
69
68
  * Function to get status and date for message bubble
@@ -71,7 +70,7 @@ export declare class MessagesDataSource implements DataSource {
71
70
  * @returns {JSX.Element | null} Returns JSX.Element for status and date of a message bubble or null
72
71
  */
73
72
  getBubbleStatusInfoDate: (item: CometChat.BaseMessage, messageSentAtDateTimeFormat?: CalendarObject) => JSX.Element | null;
74
- getStatusInfoView: (_messageObject: CometChat.BaseMessage, _alignment: MessageBubbleAlignment, hideReceipt?: boolean, messageSentAtDateTimeFormat?: CalendarObject) => import("react/jsx-runtime").JSX.Element | null;
73
+ getStatusInfoView: (_messageObject: CometChat.BaseMessage, _alignment: MessageBubbleAlignment, hideReceipts?: boolean, messageSentAtDateTimeFormat?: CalendarObject) => import("react/jsx-runtime").JSX.Element | null;
75
74
  getBottomView(_messageObject: CometChat.BaseMessage, _alignment: MessageBubbleAlignment): null;
76
75
  getTextMessageTemplate(additionalConfigurations?: additionalParams): CometChatMessageTemplate;
77
76
  getAudioMessageTemplate(): CometChatMessageTemplate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-react",
3
- "version": "6.0.4",
3
+ "version": "6.0.6",
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
  },