@cometchat/chat-uikit-react 6.0.5 → 6.0.7

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 (60) hide show
  1. package/dist/index.d.ts +209 -104
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/styles/CometChatActionSheet.css +1 -4
  5. package/dist/styles/CometChatChangeScope.css +1 -4
  6. package/dist/styles/CometChatEmojiKeyboard.css +1 -6
  7. package/dist/styles/CometChatGroupMembers.css +7 -2
  8. package/dist/styles/CometChatList.css +2 -2
  9. package/dist/styles/CometChatMessageComposer.css +34 -1
  10. package/dist/styles/CometChatMessageHeader.css +16 -18
  11. package/dist/styles/CometChatMessageInformation.css +7 -7
  12. package/dist/styles/CometChatMessageList.css +14 -0
  13. package/dist/styles/CometChatReactionList.css +0 -6
  14. package/dist/styles/CometChatThreadHeader.css +2 -2
  15. package/dist/styles/MessageTranslationBubble.css +2 -4
  16. package/dist/styles/StickersKeyboard.css +0 -20
  17. package/dist/styles/components/CometChatActionSheet.css +1 -4
  18. package/dist/styles/components/CometChatChangeScope.css +1 -4
  19. package/dist/styles/components/CometChatEmojiKeyboard.css +1 -6
  20. package/dist/styles/components/CometChatGroupMembers.css +7 -2
  21. package/dist/styles/components/CometChatList.css +2 -2
  22. package/dist/styles/components/CometChatMessageComposer.css +34 -1
  23. package/dist/styles/components/CometChatMessageHeader.css +16 -18
  24. package/dist/styles/components/CometChatMessageInformation.css +7 -7
  25. package/dist/styles/components/CometChatMessageList.css +14 -0
  26. package/dist/styles/components/CometChatReactionList.css +0 -6
  27. package/dist/styles/components/CometChatThreadHeader.css +2 -2
  28. package/dist/styles/components/MessageTranslationBubble.css +2 -4
  29. package/dist/styles/components/StickersKeyboard.css +0 -20
  30. package/dist/types/CometChatUIKit/CometChatUIKitUtility.d.ts +0 -1
  31. package/dist/types/Enums/Enums.d.ts +2 -1
  32. package/dist/types/components/BaseComponents/CometChatAudioBubble/src/webaudio.d.ts +2 -2
  33. package/dist/types/components/BaseComponents/CometChatEmojiKeyboard/useCometChatEmojiKeyboard.d.ts +0 -1
  34. package/dist/types/components/BaseComponents/CometChatList/CometChatList.d.ts +5 -0
  35. package/dist/types/components/BaseComponents/CometChatListItem/useCometChatListItem.d.ts +1 -1
  36. package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +1 -1
  37. package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +6 -1
  38. package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +1 -1
  39. package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +1 -1
  40. package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +1 -1
  41. package/dist/types/components/CometChatConversations/CometChatConversations.d.ts +5 -0
  42. package/dist/types/components/CometChatConversations/controller.d.ts +0 -1
  43. package/dist/types/components/CometChatGroupMembers/CometChatGroupMembers.d.ts +5 -0
  44. package/dist/types/components/CometChatGroups/CometChatGroups.d.ts +5 -0
  45. package/dist/types/components/CometChatMessageComposer/CometChatMessageComposer.d.ts +5 -0
  46. package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +6 -0
  47. package/dist/types/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +5 -0
  48. package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +6 -1
  49. package/dist/types/components/CometChatThreadHeader/CometChatThreadHeader.d.ts +6 -1
  50. package/dist/types/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +49 -1
  51. package/dist/types/components/CometChatUsers/CometChatUsers.d.ts +6 -0
  52. package/dist/types/components/CometChatUsers/controller.d.ts +0 -1
  53. package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +0 -1
  54. package/dist/types/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +2 -3
  55. package/dist/types/modals/CometChatActionsView.d.ts +1 -1
  56. package/dist/types/modals/CometChatMessageTemplate.d.ts +1 -1
  57. package/dist/types/utils/DataSource.d.ts +1 -1
  58. package/dist/types/utils/DataSourceDecorator.d.ts +1 -1
  59. package/dist/types/utils/MessagesDataSource.d.ts +7 -8
  60. package/package.json +1 -1
@@ -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.
@@ -78,6 +78,11 @@ interface CallLogsProps {
78
78
  * @returns A JSX element to be rendered as the trailing view.
79
79
  */
80
80
  trailingView?: (call: any) => JSX.Element;
81
+ /**
82
+ * Controls the visibility of the scrollbar in the list.
83
+ * @defaultValue `false`
84
+ */
85
+ showScrollbar?: boolean;
81
86
  }
82
87
  declare const CometChatCallLogs: (props: CallLogsProps) => import("react/jsx-runtime").JSX.Element;
83
88
  export { CometChatCallLogs };
@@ -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;
@@ -151,6 +151,11 @@ interface ConversationsProps {
151
151
  * @returns A JSX element to be rendered as the trailing view.
152
152
  */
153
153
  trailingView?: (conversation: CometChat.Conversation) => JSX.Element;
154
+ /**
155
+ * Controls the visibility of the scrollbar in the list.
156
+ * @defaultValue `false`
157
+ */
158
+ showScrollbar?: boolean;
154
159
  }
155
160
  export type Action = {
156
161
  type: "appendConversations";
@@ -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;
@@ -156,6 +156,11 @@ interface GroupMembersProps {
156
156
  * @returns A JSX element to be rendered as the trailing view.
157
157
  */
158
158
  trailingView?: (groupMember: CometChat.GroupMember) => JSX.Element;
159
+ /**
160
+ * Controls the visibility of the scrollbar in the list.
161
+ * @defaultValue `false`
162
+ */
163
+ showScrollbar?: boolean;
159
164
  }
160
165
  export type Action = {
161
166
  type: "appendGroupMembers";
@@ -121,6 +121,11 @@ interface GroupsProps {
121
121
  * @returns A JSX element to be rendered as the trailing view.
122
122
  */
123
123
  trailingView?: (group: CometChat.Group) => JSX.Element;
124
+ /**
125
+ * Controls the visibility of the scrollbar in the list.
126
+ * @defaultValue `false`
127
+ */
128
+ showScrollbar?: boolean;
124
129
  }
125
130
  export type Action = {
126
131
  type: "appendGroups";
@@ -149,6 +149,11 @@ interface MessageComposerProps {
149
149
  * A custom header section displayed at the top of the message composer, often used for media previews or additional information.
150
150
  */
151
151
  headerView?: JSX.Element;
152
+ /**
153
+ * Controls the visibility of the scrollbar in the list.
154
+ * @defaultValue `false`
155
+ */
156
+ showScrollbar?: boolean;
152
157
  }
153
158
  /**
154
159
  * Represents the state of the message composer.
@@ -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
@@ -30,6 +30,11 @@ interface MessageInformationProps {
30
30
  * Array of text formatters for custom styling or formatting of message text bubbles.
31
31
  */
32
32
  textFormatters?: CometChatTextFormatter[];
33
+ /**
34
+ * Controls the visibility of the scrollbar in the list.
35
+ * @defaultValue `false`
36
+ */
37
+ showScrollbar?: boolean;
33
38
  }
34
39
  declare const CometChatMessageInformation: (props: MessageInformationProps) => import("react/jsx-runtime").JSX.Element;
35
40
  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
  */
@@ -214,6 +214,11 @@ interface MessageListProps {
214
214
  * Format for timestamps displayed in message details (e.g., delivery or read time).
215
215
  */
216
216
  messageInfoDateTimeFormat?: CalendarObject;
217
+ /**
218
+ * Controls the visibility of the scrollbar in the list.
219
+ * @defaultValue `false`
220
+ */
221
+ showScrollbar?: boolean;
217
222
  }
218
223
  declare const CometChatMessageList: (props: MessageListProps) => import("react/jsx-runtime").JSX.Element;
219
224
  export { CometChatMessageList };
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { CometChatMessageTemplate } from "../../modals";
3
2
  import { CalendarObject } from "../../utils/CalendarObject";
4
3
  import { CometChatTextFormatter } from "../../formatters";
4
+ import { JSX } from 'react';
5
5
  interface CometChatThreadHeaderProps {
6
6
  /**
7
7
  * Hides the visibility of the date header.
@@ -57,6 +57,11 @@ interface CometChatThreadHeaderProps {
57
57
  * Array of text formatters for custom styling or formatting of message text bubbles.
58
58
  */
59
59
  textFormatters?: CometChatTextFormatter[];
60
+ /**
61
+ * Controls the visibility of the scrollbar in the list.
62
+ * @defaultValue `false`
63
+ */
64
+ showScrollbar?: boolean;
60
65
  }
61
66
  declare const CometChatThreadHeader: (props: CometChatThreadHeaderProps) => import("react/jsx-runtime").JSX.Element;
62
67
  export { CometChatThreadHeader };
@@ -1,15 +1,63 @@
1
- /// <reference types="react" />
2
1
  import { UserMemberListType } from '../../Enums/Enums';
2
+ import { JSX } from 'react';
3
3
  export interface MentionsProps {
4
+ /**
5
+ * Determines the type of list to display - either users or group members.
6
+ * @defaultValue `UserMemberListType.users`
7
+ */
4
8
  userMemberListType?: UserMemberListType;
9
+ /**
10
+ * Callback function invoked when a user or group member item is clicked.
11
+ * @param user - The clicked user (CometChat.User) or group member (CometChat.GroupMember)
12
+ * @returns void
13
+ */
5
14
  onItemClick?: (user: CometChat.User | CometChat.GroupMember) => void;
15
+ /**
16
+ * A custom view to render each user or group member item in the list.
17
+ *
18
+ * @param item - An instance of CometChat.User or CometChat.GroupMember to be rendered
19
+ * @returns A JSX element representing the custom item view
20
+ */
6
21
  itemView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;
22
+ /**
23
+ * The search keyword used to filter users or group members.
24
+ */
7
25
  searchKeyword?: string;
26
+ /**
27
+ * The group instance for which to display group members.
28
+ */
8
29
  group?: CometChat.Group;
30
+ /**
31
+ * A custom view to render the subtitle for each user or group member item.
32
+ * @param item - An instance of CometChat.User or CometChat.GroupMember
33
+ * @returns A JSX element representing the custom subtitle view
34
+ */
9
35
  subtitleView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;
36
+ /**
37
+ * A request builder to fetch users with custom parameters.
38
+ */
10
39
  usersRequestBuilder?: CometChat.UsersRequestBuilder;
40
+ /**
41
+ * Callback function invoked when the list is empty (no users or group members found).
42
+ *
43
+ * @returns void
44
+ */
11
45
  onEmpty?: () => void;
46
+ /**
47
+ * A request builder to fetch group members with custom parameters.
48
+ */
12
49
  groupMemberRequestBuilder?: CometChat.GroupMembersRequestBuilder;
50
+ /**
51
+ * Callback function invoked when an error occurs while fetching users or group members.
52
+ *
53
+ * @returns void
54
+ */
13
55
  onError?: () => void;
56
+ /**
57
+ * Controls the visibility of the scrollbar in the list.
58
+ *
59
+ * @defaultValue `false`
60
+ */
61
+ showScrollbar?: boolean;
14
62
  }
15
63
  export declare function CometChatUserMemberWrapper(props: MentionsProps): import("react/jsx-runtime").JSX.Element;
@@ -155,6 +155,12 @@ export interface UsersProps {
155
155
  * @returns A JSX element to be rendered as the trailing view.
156
156
  */
157
157
  trailingView?: (user: CometChat.User) => JSX.Element;
158
+ /**
159
+ * Controls the visibility of the scrollbar in the list list.
160
+ *
161
+ * @defaultValue `false`
162
+ */
163
+ showScrollbar?: boolean;
158
164
  }
159
165
  type State = {
160
166
  searchText: string;
@@ -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
  }
@@ -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,8 +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";
5
4
  import { CometChatTextFormatter } from "../formatters";
5
+ import { JSX } from 'react';
6
6
  /**
7
7
  * CometChatMessageTemplate is a pre-defined structure for creating message views
8
8
  * that can be used as a starting point or blueprint for creating message views,
@@ -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.
@@ -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
  */
@@ -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";
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-react",
3
- "version": "6.0.5",
3
+ "version": "6.0.7",
4
4
  "description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
5
5
  "author": "CometChat",
6
6
  "exports": {