@cometchat/chat-uikit-react 5.0.2 → 6.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 (53) hide show
  1. package/README.md +3 -3
  2. package/SUPPORT.md +1 -1
  3. package/dist/index.d.ts +212 -5618
  4. package/dist/index.js +2 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/styles/CometChatFullScreenViewer.css +1 -1
  7. package/dist/styles/{CometChatThreadedMessagePreview.css → CometChatThreadHeader.css} +23 -23
  8. package/dist/styles/CometChatUsers.css +1 -1
  9. package/dist/styles/components/CometChatFullScreenViewer.css +1 -1
  10. package/dist/styles/components/{CometChatThreadedMessagePreview.css → CometChatThreadHeader.css} +23 -23
  11. package/dist/styles/components/CometChatUsers.css +1 -1
  12. package/dist/styles/components/index.css +1 -1
  13. package/dist/styles/index.css +1 -1
  14. package/dist/types/CometChatUIKit/CometChatUIKitUtility.d.ts +1 -0
  15. package/dist/types/Enums/Enums.d.ts +0 -10
  16. package/dist/types/components/BaseComponents/CometChatAudioBubble/src/webaudio.d.ts +2 -2
  17. package/dist/types/components/BaseComponents/CometChatDate/CometChatDate.d.ts +2 -3
  18. package/dist/types/components/BaseComponents/CometChatEmojiKeyboard/emojis.d.ts +8 -8
  19. package/dist/types/components/BaseComponents/CometChatEmojiKeyboard/useCometChatEmojiKeyboard.d.ts +1 -0
  20. package/dist/types/components/BaseComponents/CometChatFullScreenViewer/CometChatFullScreenViewer.d.ts +5 -5
  21. package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +1 -0
  22. package/dist/types/components/Calling/CallingConfiguration.d.ts +2 -0
  23. package/dist/types/components/Calling/CallingExtensionDecorator.d.ts +6 -0
  24. package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +5 -4
  25. package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +1 -0
  26. package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +1 -0
  27. package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +1 -0
  28. package/dist/types/components/Calling/Utils/utils.d.ts +0 -1
  29. package/dist/types/components/CometChatConversations/CometChatConversations.d.ts +4 -3
  30. package/dist/types/components/CometChatConversations/controller.d.ts +1 -0
  31. package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +5 -0
  32. package/dist/types/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +9 -0
  33. package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +19 -9
  34. package/dist/types/components/{CometChatThreadedMessagePreview/CometChatThreadedMessagePreview.d.ts → CometChatThreadHeader/CometChatThreadHeader.d.ts} +14 -4
  35. package/dist/types/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +1 -0
  36. package/dist/types/components/CometChatUsers/controller.d.ts +1 -0
  37. package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +1 -0
  38. package/dist/types/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +1 -0
  39. package/dist/types/events/CometChatMessageEvents.d.ts +0 -2
  40. package/dist/types/index.d.ts +4 -1
  41. package/dist/types/modals/CometChatActionsView.d.ts +1 -0
  42. package/dist/types/modals/CometChatMessageTemplate.d.ts +4 -2
  43. package/dist/types/resources/CometChatLocalize/cometchat-localize.d.ts +46 -5541
  44. package/dist/types/utils/CalendarObject.d.ts +2 -2
  45. package/dist/types/utils/DataSource.d.ts +4 -2
  46. package/dist/types/utils/DataSourceDecorator.d.ts +4 -2
  47. package/dist/types/utils/Interface.d.ts +3 -16
  48. package/dist/types/utils/MessageUtils.d.ts +3 -2
  49. package/dist/types/utils/MessagesDataSource.d.ts +22 -3
  50. package/dist/types/utils/util.d.ts +4 -0
  51. package/package.json +2 -2
  52. package/screenshots/sample_app_overview.png +0 -0
  53. package/dist/types/components/BaseComponents/CometChatDate/useCometChatDate.d.ts +0 -8
@@ -1,3 +1,4 @@
1
+ import { CalendarObject } from "../../utils/CalendarObject";
1
2
  interface MessageInformationProps {
2
3
  message: CometChat.BaseMessage;
3
4
  onClose?: () => void;
@@ -6,6 +7,14 @@ interface MessageInformationProps {
6
7
  * @param error - CometChatException object representing the error.
7
8
  */
8
9
  onError?: ((error: CometChat.CometChatException) => void) | null;
10
+ /**
11
+ * Format for timestamps displayed in message details (e.g., delivery or read time).
12
+ */
13
+ messageInfoDateTimeFormat?: CalendarObject;
14
+ /**
15
+ * Format for the timestamp displayed next to messages.
16
+ */
17
+ messageSentAtDateTimeFormat?: CalendarObject;
9
18
  }
10
19
  declare const CometChatMessageInformation: (props: MessageInformationProps) => import("react/jsx-runtime").JSX.Element;
11
20
  export { CometChatMessageInformation };
@@ -1,6 +1,8 @@
1
+ /// <reference types="react" />
1
2
  import { CometChatMessageTemplate } from "../../modals";
2
- import { DatePatterns, MessageListAlignment } from "../../Enums/Enums";
3
+ import { MessageListAlignment } from "../../Enums/Enums";
3
4
  import { CometChatTextFormatter } from "../../formatters/CometChatFormatters/CometChatTextFormatter";
5
+ import { CalendarObject } from "../../utils/CalendarObject";
4
6
  /**
5
7
  * Props for the MessageList component.
6
8
  */
@@ -118,14 +120,6 @@ interface MessageListProps {
118
120
  * @default MessageListAlignment.standard
119
121
  */
120
122
  messageAlignment?: MessageListAlignment;
121
- /**
122
- * User-defined time format for displaying message timestamps.
123
- */
124
- timePattern?: DatePatterns;
125
- /**
126
- * User-defined date format for displaying message timestamps.
127
- */
128
- datePattern?: DatePatterns;
129
123
  /**
130
124
  * Automatically scrolls the message list to the bottom when a new message arrives.
131
125
  * @default false
@@ -204,6 +198,22 @@ interface MessageListProps {
204
198
  * A custom footer view component for the message list.
205
199
  */
206
200
  footerView?: JSX.Element;
201
+ /**
202
+ * Format for the date separators in the message list.
203
+ */
204
+ separatorDateTimeFormat?: CalendarObject;
205
+ /**
206
+ * Format for sticky date headers displayed in the message list.
207
+ */
208
+ stickyDateTimeFormat?: CalendarObject;
209
+ /**
210
+ * Format for the timestamp displayed next to messages.
211
+ */
212
+ messageSentAtDateTimeFormat?: CalendarObject;
213
+ /**
214
+ * Format for timestamps displayed in message details (e.g., delivery or read time).
215
+ */
216
+ messageInfoDateTimeFormat?: CalendarObject;
207
217
  }
208
218
  declare const CometChatMessageList: (props: MessageListProps) => import("react/jsx-runtime").JSX.Element;
209
219
  export { CometChatMessageList };
@@ -1,5 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import { CometChatMessageTemplate } from "../../modals";
2
- interface ThreadedMessagePreviewProps {
3
+ import { CalendarObject } from "../../utils/CalendarObject";
4
+ interface CometChatThreadHeaderProps {
3
5
  /**
4
6
  * Hides the visibility of the date header.
5
7
  * @default false
@@ -29,7 +31,7 @@ interface ThreadedMessagePreviewProps {
29
31
  * @param messageObject - The message to be rendered.
30
32
  * @returns A JSX Element to be rendered as message bubble view.
31
33
  */
32
- messageBubbleView?: (messageObject: CometChat.BaseMessage) => JSX.Element;
34
+ messageBubbleView?: JSX.Element;
33
35
  /**
34
36
  * Callback function triggered when an error occurs.
35
37
  *
@@ -37,6 +39,14 @@ interface ThreadedMessagePreviewProps {
37
39
  * @returns void
38
40
  */
39
41
  onError?: ((error: CometChat.CometChatException) => void) | null;
42
+ /**
43
+ * Format for the date separators in threaded message preview.
44
+ */
45
+ separatorDateTimeFormat?: CalendarObject;
46
+ /**
47
+ * Format for the timestamp displayed next to messages.
48
+ */
49
+ messageSentAtDateTimeFormat?: CalendarObject;
40
50
  }
41
- declare const CometChatThreadedMessagePreview: (props: ThreadedMessagePreviewProps) => import("react/jsx-runtime").JSX.Element;
42
- export { CometChatThreadedMessagePreview };
51
+ declare const CometChatThreadHeader: (props: CometChatThreadHeaderProps) => import("react/jsx-runtime").JSX.Element;
52
+ export { CometChatThreadHeader };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { UserMemberListType } from '../../Enums/Enums';
2
3
  export interface MentionsProps {
3
4
  userMemberListType?: UserMemberListType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Args = {
2
3
  searchText: string;
3
4
  usersRequestBuilder: CometChat.UsersRequestBuilder | null;
@@ -1,3 +1,4 @@
1
+ import { CometChat } from "@cometchat/chat-sdk-javascript";
1
2
  import { DataSource } from "../../../utils/DataSource";
2
3
  import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
3
4
  import { ComposerId } from "../../../utils/MessagesDataSource";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DataSourceDecorator } from "../../../utils/DataSourceDecorator";
2
3
  /**
3
4
  * Class representing a Thumbnail Generation extension decorator.
@@ -7,7 +7,6 @@ export declare class CometChatMessageEvents {
7
7
  static ccMessageSent: Subject<IMessages>;
8
8
  static ccMessageEdited: Subject<IMessages>;
9
9
  static ccMessageTranslated: Subject<IMessages>;
10
- static ccLiveReaction: Subject<string>;
11
10
  static ccMessageRead: Subject<CometChat.BaseMessage>;
12
11
  static ccMessageDeleted: Subject<CometChat.BaseMessage>;
13
12
  /**
@@ -30,7 +29,6 @@ export declare class CometChatMessageEvents {
30
29
  static onMessagesReadByAll: Subject<CometChat.MessageReceipt>;
31
30
  static onMessageEdited: Subject<CometChat.BaseMessage>;
32
31
  static onMessageDeleted: Subject<CometChat.BaseMessage>;
33
- static onTransientMessageReceived: Subject<CometChat.TransientMessage>;
34
32
  static onMessageReactionAdded: Subject<CometChat.ReactionEvent>;
35
33
  static onMessageReactionRemoved: Subject<CometChat.ReactionEvent>;
36
34
  }
@@ -67,6 +67,8 @@ export { CallingConfiguration } from './components/Calling/CallingConfiguration'
67
67
  export { CometChatCallButtons } from './components/Calling/CometChatCallButtons/CometChatCallButtons';
68
68
  export { OutgoingCallConfiguration } from './components/Calling/OutgoingCallConfiguration';
69
69
  export * from './components/Calling/Utils/utils';
70
+ export * from './utils/Interface';
71
+ export { CalendarObject } from './utils/CalendarObject';
70
72
  export { CometChatAudioBubble } from './components/BaseComponents/CometChatAudioBubble/CometChatAudioBubble';
71
73
  export { CometChatAvatar } from './components/BaseComponents/CometChatAvatar/CometChatAvatar';
72
74
  export { CometChatButton } from './components/BaseComponents/CometChatButton/CometChatButton';
@@ -102,7 +104,8 @@ export { MessageReceiptUtils } from './utils/MessageReceiptUtils';
102
104
  export { MessageUtils } from './utils/MessageUtils';
103
105
  export * from './utils/util';
104
106
  export * from './utils/Storage';
105
- export { CometChatThreadedMessagePreview } from './components/CometChatThreadedMessagePreview/CometChatThreadedMessagePreview';
107
+ export * from './utils/Interface';
108
+ export { CometChatThreadHeader } from './components/CometChatThreadHeader/CometChatThreadHeader';
106
109
  export * from "./components/Calling/Utils/utils";
107
110
  export { CometChatUIKitLoginListener } from './CometChatUIKit/CometChatUIKitLoginListener';
108
111
  export { CometChatUIKitUtility } from './CometChatUIKit/CometChatUIKitUtility';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CometChatActions } from "./CometChatActions";
2
3
  /**
3
4
  * CometChatActionsView is a pre-defined structure for creating actions
@@ -1,5 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import { CometChatMessageOption } from "./CometChatMessageOption";
2
- import { DatePatterns, MessageBubbleAlignment } from "../Enums/Enums";
3
+ import { MessageBubbleAlignment } from "../Enums/Enums";
4
+ import { CalendarObject } from "../utils/CalendarObject";
3
5
  /**
4
6
  * CometChatMessageTemplate is a pre-defined structure for creating message views
5
7
  * that can be used as a starting point or blueprint for creating message views,
@@ -47,7 +49,7 @@ declare class CometChatMessageTemplate {
47
49
  * By default, it displays the receipt and the timestamp.
48
50
  * @type {(message:CometChat.BaseMessage,alignment:MessageBubbleAlignment)=> Element | JSX.Element | null}
49
51
  */
50
- statusInfoView: ((message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipt?: boolean, datePattern?: DatePatterns) => Element | JSX.Element | null) | null;
52
+ statusInfoView: ((message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, hideReceipt?: boolean, messageSentAtDateTimeFormat?: CalendarObject) => Element | JSX.Element | null) | null;
51
53
  /**
52
54
  * List of available actions that any user can perform on a message, like reacting,
53
55
  * editing or deleting a message.