@cometchat/chat-uikit-react 5.0.3 → 5.0.5

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 (48) hide show
  1. package/dist/assets/missedCallIcon.svg +10 -0
  2. package/dist/index.d.ts +330 -309
  3. package/dist/index.js +2 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/styles/CometChatAudioBubble.css +1 -0
  6. package/dist/styles/CometChatCallLogs.css +2 -2
  7. package/dist/styles/CometChatMessageInformation.css +3 -1
  8. package/dist/styles/CometChatMessageList.css +5 -2
  9. package/dist/styles/CometChatOutgoingCall.css +1 -1
  10. package/dist/styles/PollsBubble.css +5 -0
  11. package/dist/styles/StickersKeyboard.css +0 -6
  12. package/dist/styles/components/CometChatAudioBubble.css +1 -0
  13. package/dist/styles/components/CometChatCallLogs.css +2 -2
  14. package/dist/styles/components/CometChatMessageInformation.css +3 -1
  15. package/dist/styles/components/CometChatMessageList.css +5 -2
  16. package/dist/styles/components/CometChatOutgoingCall.css +1 -1
  17. package/dist/styles/components/PollsBubble.css +5 -0
  18. package/dist/styles/components/StickersKeyboard.css +0 -6
  19. package/dist/styles/components/index.css +3 -0
  20. package/dist/styles/index.css +3 -0
  21. package/dist/types/CometChatUIKit/CometChatUIKitUtility.d.ts +0 -1
  22. package/dist/types/components/BaseComponents/CometChatAudioBubble/src/webaudio.d.ts +2 -2
  23. package/dist/types/components/BaseComponents/CometChatContextMenu/CometChatContextMenu.d.ts +2 -0
  24. package/dist/types/components/BaseComponents/CometChatEmojiKeyboard/useCometChatEmojiKeyboard.d.ts +0 -1
  25. package/dist/types/components/BaseComponents/CometChatListItem/useCometChatListItem.d.ts +9 -6
  26. package/dist/types/components/BaseComponents/CometChatMessageBubble/CometChatMessageBubble.d.ts +0 -1
  27. package/dist/types/components/BaseComponents/CometChatPopover/CometChatPopover.d.ts +2 -0
  28. package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +0 -1
  29. package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +0 -1
  30. package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +0 -1
  31. package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +0 -1
  32. package/dist/types/components/CometChatConversations/controller.d.ts +0 -1
  33. package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +0 -1
  34. package/dist/types/components/CometChatThreadedMessagePreview/CometChatThreadedMessagePreview.d.ts +0 -1
  35. package/dist/types/components/CometChatUserMemberWrapper/CometChatUserMemberWrapper.d.ts +0 -1
  36. package/dist/types/components/CometChatUsers/controller.d.ts +0 -1
  37. package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +0 -1
  38. package/dist/types/components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtensionDecorator.d.ts +0 -1
  39. package/dist/types/constants/CometChatUIKitConstants.d.ts +5 -1
  40. package/dist/types/events/CometChatMessageEvents.d.ts +4 -0
  41. package/dist/types/modals/CometChatActionsView.d.ts +0 -1
  42. package/dist/types/modals/CometChatMessageTemplate.d.ts +0 -1
  43. package/dist/types/resources/CometChatLocalize/cometchat-localize.d.ts +251 -269
  44. package/dist/types/utils/DataSource.d.ts +9 -1
  45. package/dist/types/utils/DataSourceDecorator.d.ts +9 -1
  46. package/dist/types/utils/MessagesDataSource.d.ts +10 -3
  47. package/dist/types/utils/util.d.ts +1 -0
  48. package/package.json +8 -4
@@ -35,6 +35,7 @@
35
35
  display: flex;
36
36
  align-items: center;
37
37
  justify-content: center;
38
+ z-index: 1;
38
39
  }
39
40
 
40
41
  /* Container for download progress circle (24x24 size) */
@@ -78,8 +78,8 @@
78
78
  }
79
79
 
80
80
  .cometchat-call-logs__list-item-subtitle-icon-missed-call {
81
- -webkit-mask: url("../../assets/call_received.svg") center center no-repeat;
82
- mask: url("../../assets/call_received.svg") center center no-repeat;
81
+ -webkit-mask: url("../../assets/missedCallIcon.svg") center center no-repeat;
82
+ mask: url("../../assets/missedCallIcon.svg") center center no-repeat;
83
83
  background-color: var(--cometchat-error-color,#F44649);
84
84
  }
85
85
 
@@ -1,6 +1,8 @@
1
1
  .cometchat-message-information {
2
- width: 420px;
2
+ max-width: 420px;
3
+ width: 100%;
3
4
  height: fit-content;
5
+ max-height: 100%;
4
6
  flex-shrink: 0;
5
7
  border-radius: var(--cometchat-radius-5, 20px);
6
8
  border: 1px solid var(--cometchat-border-color-light, #F5F5F5);
@@ -173,7 +173,7 @@ width: fit-content;
173
173
  .cometchat-message-list__date-header {
174
174
  position: absolute;
175
175
  top: 12px;
176
- z-index: 1;
176
+ z-index: 2;
177
177
  }
178
178
  .cometchat-message-list__bubble-date-header{
179
179
  margin: auto;
@@ -490,7 +490,10 @@ width: fit-content;
490
490
  align-items: center;
491
491
  align-self: center;
492
492
  border-radius: var(--cometchat-radius-2, 8px);
493
+ margin: auto;
493
494
  margin-top: 10px;
495
+ z-index: 1;
496
+ position: relative;
494
497
 
495
498
 
496
499
  }
@@ -707,5 +710,5 @@ width: fit-content;
707
710
  justify-content: center;
708
711
  align-items: center;
709
712
  overflow: auto;
710
- background-color: rgba(0, 0, 0, 0.4);
713
+ background-color: rgba(0, 0, 0, 0.6);
711
714
  }
@@ -89,7 +89,7 @@
89
89
  }
90
90
 
91
91
  /* Avatar size adjustment for smaller screens */
92
- .cometchat-outgoing-call__avatar .cometchat-avatar {
92
+ .cometchat-outgoing-call .cometchat-outgoing-call__avatar .cometchat .cometchat-avatar {
93
93
  width: 120px;
94
94
  height: 120px;
95
95
  }
@@ -8,6 +8,11 @@
8
8
  width: 240px;
9
9
  max-width: 240px;
10
10
  }
11
+ .cometchat-polls-bubble * {
12
+ box-sizing: border-box;
13
+ margin: 0;
14
+ padding: 0;
15
+ }
11
16
 
12
17
  .cometchat-polls-bubble-incoming {
13
18
  background: var(--cometchat-neutral-color-300, #E8E8E8);
@@ -1,9 +1,3 @@
1
- * {
2
- box-sizing: border-box;
3
- margin: 0;
4
- padding: 0;
5
- }
6
-
7
1
  .cometchat-sticker-keyboard {
8
2
  display: flex;
9
3
  width: 100%;
@@ -35,6 +35,7 @@
35
35
  display: flex;
36
36
  align-items: center;
37
37
  justify-content: center;
38
+ z-index: 1;
38
39
  }
39
40
 
40
41
  /* Container for download progress circle (24x24 size) */
@@ -78,8 +78,8 @@
78
78
  }
79
79
 
80
80
  .cometchat-call-logs__list-item-subtitle-icon-missed-call {
81
- -webkit-mask: url("../../assets/call_received.svg") center center no-repeat;
82
- mask: url("../../assets/call_received.svg") center center no-repeat;
81
+ -webkit-mask: url("../../assets/missedCallIcon.svg") center center no-repeat;
82
+ mask: url("../../assets/missedCallIcon.svg") center center no-repeat;
83
83
  background-color: var(--cometchat-error-color,#F44649);
84
84
  }
85
85
 
@@ -1,6 +1,8 @@
1
1
  .cometchat-message-information {
2
- width: 420px;
2
+ max-width: 420px;
3
+ width: 100%;
3
4
  height: fit-content;
5
+ max-height: 100%;
4
6
  flex-shrink: 0;
5
7
  border-radius: var(--cometchat-radius-5, 20px);
6
8
  border: 1px solid var(--cometchat-border-color-light, #F5F5F5);
@@ -173,7 +173,7 @@ width: fit-content;
173
173
  .cometchat-message-list__date-header {
174
174
  position: absolute;
175
175
  top: 12px;
176
- z-index: 1;
176
+ z-index: 2;
177
177
  }
178
178
  .cometchat-message-list__bubble-date-header{
179
179
  margin: auto;
@@ -490,7 +490,10 @@ width: fit-content;
490
490
  align-items: center;
491
491
  align-self: center;
492
492
  border-radius: var(--cometchat-radius-2, 8px);
493
+ margin: auto;
493
494
  margin-top: 10px;
495
+ z-index: 1;
496
+ position: relative;
494
497
 
495
498
 
496
499
  }
@@ -707,5 +710,5 @@ width: fit-content;
707
710
  justify-content: center;
708
711
  align-items: center;
709
712
  overflow: auto;
710
- background-color: rgba(0, 0, 0, 0.4);
713
+ background-color: rgba(0, 0, 0, 0.6);
711
714
  }
@@ -89,7 +89,7 @@
89
89
  }
90
90
 
91
91
  /* Avatar size adjustment for smaller screens */
92
- .cometchat-outgoing-call__avatar .cometchat-avatar {
92
+ .cometchat-outgoing-call .cometchat-outgoing-call__avatar .cometchat .cometchat-avatar {
93
93
  width: 120px;
94
94
  height: 120px;
95
95
  }
@@ -8,6 +8,11 @@
8
8
  width: 240px;
9
9
  max-width: 240px;
10
10
  }
11
+ .cometchat-polls-bubble * {
12
+ box-sizing: border-box;
13
+ margin: 0;
14
+ padding: 0;
15
+ }
11
16
 
12
17
  .cometchat-polls-bubble-incoming {
13
18
  background: var(--cometchat-neutral-color-300, #E8E8E8);
@@ -1,9 +1,3 @@
1
- * {
2
- box-sizing: border-box;
3
- margin: 0;
4
- padding: 0;
5
- }
6
-
7
1
  .cometchat-sticker-keyboard {
8
2
  display: flex;
9
3
  width: 100%;
@@ -55,6 +55,9 @@
55
55
  @import url('./CometChatThreadedMessagePreview.css');
56
56
  @import url('./CometChatToast.css');
57
57
 
58
+ .cometchat * {
59
+ box-sizing: border-box;
60
+ }
58
61
 
59
62
 
60
63
 
@@ -55,6 +55,9 @@
55
55
  @import url('./CometChatThreadedMessagePreview.css');
56
56
  @import url('./CometChatToast.css');
57
57
 
58
+ .cometchat * {
59
+ box-sizing: border-box;
60
+ }
58
61
 
59
62
 
60
63
 
@@ -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;
@@ -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>;
@@ -7,6 +7,8 @@ interface ContextMenuProps {
7
7
  onOptionClicked?: (option: CometChatActionsIcon | CometChatActionsView | CometChatOption) => void;
8
8
  placement?: Placement;
9
9
  closeOnOutsideClick?: boolean;
10
+ disableBackgroundInteraction?: boolean;
11
+ useParentContainer?: boolean;
10
12
  }
11
13
  /**
12
14
  * CometChatContextMenu is a composite component used to display menu data in required format.
@@ -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[];
@@ -1,12 +1,15 @@
1
1
  import { MouseEvent } from "react";
2
- export declare const useCometChatListItem: ({ id, onListItemClicked }: {
3
- id?: string | undefined;
4
- onListItemClicked?: (({ id: string }: {
5
- id?: string | undefined;
6
- }) => void) | undefined;
7
- }) => {
2
+ interface ICometChatListItem {
3
+ id?: string;
4
+ onListItemClicked?: (input: {
5
+ id: string;
6
+ }) => void;
7
+ menuRef: React.RefObject<HTMLDivElement>;
8
+ }
9
+ export declare const useCometChatListItem: ({ id, onListItemClicked, menuRef, }: ICometChatListItem) => {
8
10
  listItemClick: (event: MouseEvent<HTMLDivElement>) => void;
9
11
  isHovering: boolean;
10
12
  showTail: () => void;
11
13
  hideTail: () => void;
12
14
  };
15
+ export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChatActionsIcon, CometChatActionsView } from "../../../modals";
3
2
  import { MessageBubbleAlignment } from "../../../Enums/Enums";
4
3
  /**Interface defining the structure for MessageBubbleProps */
@@ -14,6 +14,8 @@ interface PopoverProps {
14
14
  content: ReactNode;
15
15
  childClickHandler?: (openContent: Function, event: Event) => void;
16
16
  onOutsideClick?: () => void;
17
+ disableBackgroundInteraction?: boolean;
18
+ useParentContainer?: boolean;
17
19
  }
18
20
  declare const CometChatPopover: import("react").ForwardRefExoticComponent<PopoverProps & import("react").RefAttributes<{
19
21
  openPopover: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DatePatterns } from "../../../Enums/Enums";
3
2
  interface CallLogsProps {
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChatUIKitCalls } from "../../../CometChatUIKit/CometChatCalls";
3
2
  interface IncomingCallProps {
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Props interface for the outgoing call component
4
3
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare class OutgoingCallConfiguration {
3
2
  disableSoundForCalls?: boolean;
4
3
  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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChatMessageTemplate } from "../../modals";
3
2
  import { DatePatterns, MessageListAlignment } from "../../Enums/Enums";
4
3
  import { CometChatTextFormatter } from "../../formatters/CometChatFormatters/CometChatTextFormatter";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChatMessageTemplate } from "../../modals";
3
2
  interface ThreadedMessagePreviewProps {
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { UserMemberListType } from '../../Enums/Enums';
3
2
  export interface MentionsProps {
4
3
  userMemberListType?: UserMemberListType;
@@ -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.
@@ -4,6 +4,7 @@ export declare class CometChatUIKitConstants {
4
4
  custom: string;
5
5
  action: string;
6
6
  call: string;
7
+ interactive: string;
7
8
  }>;
8
9
  static MessageTypes: Readonly<{
9
10
  text: string;
@@ -14,6 +15,10 @@ export declare class CometChatUIKitConstants {
14
15
  delete: "delete";
15
16
  edited: "edited";
16
17
  groupMember: "groupMember";
18
+ form: "form";
19
+ card: "card";
20
+ customInteractive: "customInteractive";
21
+ scheduler: "scheduler";
17
22
  }>;
18
23
  static groupMemberAction: Readonly<{
19
24
  ROLE: "role";
@@ -96,7 +101,6 @@ export declare class CometChatUIKitConstants {
96
101
  CUSTOM_MESSAGE_RECEIVED: "onCustomMessageReceived";
97
102
  TRANSIENT_MESSAGE_RECEIVED: "onTransientMessageReceived";
98
103
  INTERACTIVE_MESSAGE_RECEIVED: "onInteractiveMessageReceived";
99
- INTERACTION_GOAL_COMPLETED: "onInteractionGoalCompleted";
100
104
  DELIVERY: "delivery";
101
105
  READ: "read";
102
106
  APP_SYSTEM: "app_system";
@@ -33,6 +33,10 @@ export declare class CometChatMessageEvents {
33
33
  static onTransientMessageReceived: Subject<CometChat.TransientMessage>;
34
34
  static onMessageReactionAdded: Subject<CometChat.ReactionEvent>;
35
35
  static onMessageReactionRemoved: Subject<CometChat.ReactionEvent>;
36
+ static onCustomInteractiveMessageReceived: Subject<CometChat.InteractiveMessage>;
37
+ static onFormMessageReceived: Subject<CometChat.InteractiveMessage>;
38
+ static onCardMessageReceived: Subject<CometChat.InteractiveMessage>;
39
+ static onSchedulerMessageReceived: Subject<CometChat.InteractiveMessage>;
36
40
  }
37
41
  /**
38
42
  * Interface for message-related events
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChatActions } from "./CometChatActions";
3
2
  /**
4
3
  * CometChatActionsView is a pre-defined structure for creating actions
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CometChatMessageOption } from "./CometChatMessageOption";
3
2
  import { DatePatterns, MessageBubbleAlignment } from "../Enums/Enums";
4
3
  /**