@cometchat/chat-uikit-react 6.0.5 → 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 (31) hide show
  1. package/dist/index.d.ts +132 -126
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/styles/CometChatMessageHeader.css +0 -6
  5. package/dist/styles/MessageTranslationBubble.css +2 -4
  6. package/dist/styles/components/CometChatMessageHeader.css +0 -6
  7. package/dist/styles/components/MessageTranslationBubble.css +2 -4
  8. package/dist/types/CometChatUIKit/CometChatUIKitUtility.d.ts +0 -1
  9. package/dist/types/Enums/Enums.d.ts +2 -1
  10. package/dist/types/components/BaseComponents/CometChatAudioBubble/src/webaudio.d.ts +2 -2
  11. package/dist/types/components/BaseComponents/CometChatEmojiKeyboard/useCometChatEmojiKeyboard.d.ts +0 -1
  12. package/dist/types/components/BaseComponents/CometChatListItem/useCometChatListItem.d.ts +1 -1
  13. package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +1 -1
  14. package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +1 -1
  15. package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +1 -1
  16. package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +1 -1
  17. package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +1 -1
  18. package/dist/types/components/CometChatConversations/controller.d.ts +0 -1
  19. package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +6 -0
  20. package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +1 -1
  21. package/dist/types/components/CometChatThreadHeader/CometChatThreadHeader.d.ts +1 -1
  22. package/dist/types/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +1 -1
  23. package/dist/types/components/CometChatUsers/controller.d.ts +0 -1
  24. package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +0 -1
  25. package/dist/types/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +2 -3
  26. package/dist/types/modals/CometChatActionsView.d.ts +1 -1
  27. package/dist/types/modals/CometChatMessageTemplate.d.ts +1 -1
  28. package/dist/types/utils/DataSource.d.ts +1 -1
  29. package/dist/types/utils/DataSourceDecorator.d.ts +1 -1
  30. package/dist/types/utils/MessagesDataSource.d.ts +7 -8
  31. package/package.json +1 -1
@@ -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
  }
@@ -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
 
@@ -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
  }
@@ -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;
@@ -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,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,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.
@@ -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
  }
@@ -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.6",
4
4
  "description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
5
5
  "author": "CometChat",
6
6
  "exports": {