@cometchat/chat-uikit-react 5.0.0-beta2 → 5.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 (119) hide show
  1. package/README.md +2 -2
  2. package/dist/assets/Send.svg +3 -0
  3. package/dist/assets/loading.svg +5 -16
  4. package/dist/index.d.ts +1155 -950
  5. package/dist/index.js +1 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/styles/CometChatCallButtons.css +1 -1
  8. package/dist/styles/CometChatCallLogs.css +3 -3
  9. package/dist/styles/{components/AIConversationStarter.css → CometChatConversationStarter.css} +2 -2
  10. package/dist/styles/{components/AIConversationSummary.css → CometChatConversationSummary.css} +12 -12
  11. package/dist/styles/CometChatConversations.css +10 -10
  12. package/dist/styles/CometChatGroupMembers.css +5 -5
  13. package/dist/styles/CometChatIncomingCall.css +1 -1
  14. package/dist/styles/CometChatList.css +15 -22
  15. package/dist/styles/CometChatListItem.css +2 -2
  16. package/dist/styles/CometChatMessageComposer.css +44 -41
  17. package/dist/styles/CometChatMessageHeader.css +22 -5
  18. package/dist/styles/CometChatMessageInformation.css +3 -2
  19. package/dist/styles/CometChatMessageList.css +6 -5
  20. package/dist/styles/CometChatOutgoingCall.css +5 -0
  21. package/dist/styles/{AISmartReplies.css → CometChatSmartReplies.css} +72 -79
  22. package/dist/styles/PollsBubble.css +7 -1
  23. package/dist/styles/components/CometChatCallButtons.css +1 -1
  24. package/dist/styles/components/CometChatCallLogs.css +3 -3
  25. package/dist/styles/{AIConversationStarter.css → components/CometChatConversationStarter.css} +2 -2
  26. package/dist/styles/{AIConversationSummary.css → components/CometChatConversationSummary.css} +12 -12
  27. package/dist/styles/components/CometChatConversations.css +10 -10
  28. package/dist/styles/components/CometChatGroupMembers.css +5 -5
  29. package/dist/styles/components/CometChatIncomingCall.css +1 -1
  30. package/dist/styles/components/CometChatList.css +15 -22
  31. package/dist/styles/components/CometChatListItem.css +2 -2
  32. package/dist/styles/components/CometChatMessageComposer.css +44 -41
  33. package/dist/styles/components/CometChatMessageHeader.css +22 -5
  34. package/dist/styles/components/CometChatMessageInformation.css +3 -2
  35. package/dist/styles/components/CometChatMessageList.css +6 -5
  36. package/dist/styles/components/CometChatOutgoingCall.css +5 -0
  37. package/dist/styles/components/{AISmartReplies.css → CometChatSmartReplies.css} +72 -79
  38. package/dist/styles/components/PollsBubble.css +7 -1
  39. package/dist/styles/components/index.css +3 -3
  40. package/dist/styles/index.css +3 -3
  41. package/dist/types/CometChatCustomHooks.d.ts +1 -1
  42. package/dist/types/CometChatUIKit/CometChatUIKit.d.ts +0 -6
  43. package/dist/types/CometChatUIKit/UIKitSettings.d.ts +0 -22
  44. package/dist/types/Enums/Enums.d.ts +9 -0
  45. package/dist/types/components/BaseComponents/CometChatConversationStarter/CometChatConversationStarter.d.ts +6 -0
  46. package/dist/types/components/BaseComponents/CometChatConversationSummary/CometChatConversationSummary.d.ts +6 -0
  47. package/dist/types/components/BaseComponents/CometChatList/CometChatList.d.ts +12 -12
  48. package/dist/types/components/BaseComponents/CometChatListItem/CometChatListItem.d.ts +3 -1
  49. package/dist/types/components/BaseComponents/CometChatSmartReplies/CometChatSmartReplies.d.ts +7 -0
  50. package/dist/types/components/Calling/CallButtonConfiguration.d.ts +1 -1
  51. package/dist/types/components/Calling/CallingExtensionDecorator.d.ts +2 -2
  52. package/dist/types/components/Calling/CometChatCallButtons/CometChatCallButtons.d.ts +30 -12
  53. package/dist/types/components/Calling/CometChatCallButtons/useCallButtons.d.ts +1 -1
  54. package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +50 -38
  55. package/dist/types/components/Calling/CometChatCallLogs/useCometChatCallLogs.d.ts +1 -1
  56. package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +48 -26
  57. package/dist/types/components/Calling/CometChatIncomingCall/useCometChatIncomingCall.d.ts +1 -1
  58. package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +31 -15
  59. package/dist/types/components/Calling/CometChatOutgoingCall/useCometChatOutgoingCall.d.ts +1 -1
  60. package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +7 -3
  61. package/dist/types/components/CometChatConversations/CometChatConversations.d.ts +88 -87
  62. package/dist/types/components/CometChatConversations/controller.d.ts +10 -8
  63. package/dist/types/components/CometChatConversations/useCometChatConversations.d.ts +2 -5
  64. package/dist/types/components/CometChatGroupMembers/CometChatGroupMembers.d.ts +94 -76
  65. package/dist/types/components/CometChatGroupMembers/useCometChatGroupMembers.d.ts +2 -2
  66. package/dist/types/components/CometChatGroups/CometChatGroups.d.ts +74 -62
  67. package/dist/types/components/CometChatGroups/useCometChatGroups.d.ts +1 -0
  68. package/dist/types/components/CometChatMessageComposer/CometChatMessageComposer.d.ts +107 -49
  69. package/dist/types/components/CometChatMessageComposer/useCometChatMessageComposer.d.ts +1 -1
  70. package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +77 -16
  71. package/dist/types/components/CometChatMessageHeader/useCometChatMessageHeader.d.ts +1 -1
  72. package/dist/types/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +5 -0
  73. package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +133 -55
  74. package/dist/types/components/CometChatMessageList/CometChatMessageListController.d.ts +3 -1
  75. package/dist/types/components/CometChatMessageList/useCometChatMessageList.d.ts +1 -1
  76. package/dist/types/components/CometChatThreadedMessagePreview/CometChatThreadedMessagePreview.d.ts +34 -2
  77. package/dist/types/components/CometChatUsers/CometChatUsers.d.ts +88 -89
  78. package/dist/types/components/CometChatUsers/useCometChatUsers.d.ts +2 -1
  79. package/dist/types/components/Extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.d.ts +4 -3
  80. package/dist/types/components/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.d.ts +4 -3
  81. package/dist/types/components/Extensions/MessageTranslation/MessageTranslationExtensionDecorator.d.ts +3 -1
  82. package/dist/types/components/Extensions/Polls/PollsBubble.d.ts +5 -0
  83. package/dist/types/components/Extensions/Polls/PollsExtensionDecorator.d.ts +4 -3
  84. package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +2 -3
  85. package/dist/types/components/Reactions/CometChatReactionInfo/CometChatReactionInfo.d.ts +3 -2
  86. package/dist/types/components/Reactions/CometChatReactionList/CometChatReactionList.d.ts +3 -2
  87. package/dist/types/components/Reactions/CometChatReactions/CometChatReactions.d.ts +3 -2
  88. package/dist/types/index.d.ts +8 -7
  89. package/dist/types/resources/CometChatLocalize/cometchat-localize.d.ts +129 -115
  90. package/dist/types/utils/DataSource.d.ts +17 -18
  91. package/dist/types/utils/DataSourceDecorator.d.ts +17 -18
  92. package/dist/types/utils/GroupMemberUtils.d.ts +1 -1
  93. package/dist/types/utils/MessageUtils.d.ts +1 -1
  94. package/dist/types/utils/MessagesDataSource.d.ts +29 -16
  95. package/dist/types/utils/util.d.ts +5 -0
  96. package/package.json +1 -1
  97. package/dist/assets/ai-empty.svg +0 -22
  98. package/dist/assets/ai-error.svg +0 -3
  99. package/dist/assets/heart-reaction.png +0 -0
  100. package/dist/assets/send.svg +0 -12
  101. package/dist/styles/AICard.css +0 -30
  102. package/dist/styles/components/AICard.css +0 -30
  103. package/dist/types/components/AI/AIBaseConfiguration.d.ts +0 -51
  104. package/dist/types/components/AI/AIConversationStarter/AIConversationStarterConfiguration.d.ts +0 -20
  105. package/dist/types/components/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +0 -18
  106. package/dist/types/components/AI/AIConversationStarter/AIConversationStarterExtension.d.ts +0 -8
  107. package/dist/types/components/AI/AIConversationStarter/AIConversationStarterView.d.ts +0 -8
  108. package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryConfiguration.d.ts +0 -31
  109. package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryDecorator.d.ts +0 -22
  110. package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryExtension.d.ts +0 -8
  111. package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryView.d.ts +0 -9
  112. package/dist/types/components/AI/AIExtensionDataSource.d.ts +0 -6
  113. package/dist/types/components/AI/AISmartReplies/AISmartRepliesConfiguration.d.ts +0 -28
  114. package/dist/types/components/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +0 -21
  115. package/dist/types/components/AI/AISmartReplies/AISmartRepliesExtension.d.ts +0 -8
  116. package/dist/types/components/AI/AISmartReplies/AISmartRepliesView.d.ts +0 -11
  117. package/dist/types/components/BaseComponents/CometChatLiveReaction/CometChatLiveReaction.d.ts +0 -5
  118. package/dist/types/components/BaseComponents/CometChatLiveReaction/useLiveReactionHook.d.ts +0 -19
  119. /package/dist/assets/{ai.svg → conversation_summary.svg} +0 -0
@@ -1,35 +1,53 @@
1
1
  import { CometChatUIKitCalls } from "../../../CometChatUIKit/CometChatCalls";
2
2
  import { OutgoingCallConfiguration } from "../OutgoingCallConfiguration";
3
3
  interface CallButtonsProps {
4
- onVoiceCallClick?: () => void;
5
- onVideoCallClick?: () => void;
6
- onError?: (error: CometChat.CometChatException) => void;
4
+ /**
5
+ * Boolean flag to hide the video call button.
6
+ */
7
+ hideVideoCallButton?: boolean;
8
+ /**
9
+ * Boolean flag to hide the voice call button.
10
+ */
11
+ hideVoiceCallButton?: boolean;
12
+ /**
13
+ * Builder for checking and updating call settings.
14
+ * @param isAudioOnlyCall - Whether it's an audio-only call.
15
+ * @param user - The user object for the call (optional).
16
+ * @param group - The group object for the call (optional).
17
+ */
7
18
  callSettingsBuilder?: (isAudioOnlyCall: boolean, user?: CometChat.User, group?: CometChat.Group) => typeof CometChatUIKitCalls.CallSettingsBuilder;
19
+ /**
20
+ * Configuration object for managing outgoing call settings, such as call parameters, UI behaviors, or any pre-call settings.
21
+ */
8
22
  outgoingCallConfiguration?: OutgoingCallConfiguration;
23
+ /**
24
+ * Callback function triggered when an error occurs in the call buttons component.
25
+ * @param error - An instance of `CometChat.CometChatException` representing the error.
26
+ * @returns void
27
+ */
28
+ onError?: ((error: CometChat.CometChatException) => void) | null;
9
29
  }
10
30
  interface CallButtonsUserProps extends CallButtonsProps {
11
31
  /**
12
- * Sets the user object for Call Buttons.
13
- */
14
- user: CometChat.User;
32
+ * A CometChat.User object representing the user in which the call will be initiated.
33
+ */
34
+ user?: CometChat.User;
15
35
  /**
16
- * Used to set the group object for Call Buttons.
17
- *
36
+ * A CometChat.Group object representing the group in which the call will be initiated.
18
37
  * @default null
19
38
  */
20
39
  group?: CometChat.Group | null;
21
40
  }
22
41
  interface CallButtonsGroupProps extends CallButtonsProps {
23
42
  /**
24
- * Sets the user object for Call Buttons, or null if no user is involved.
25
- *
43
+ * A CometChat.User object representing the user in which the call will be initiated.
26
44
  * @default null
27
45
  */
28
46
  user?: CometChat.User | null;
29
47
  /**
30
- * Used to set the group object for Call Buttons.
48
+ * A CometChat.Group object representing the group in which the call will be initiated.
31
49
  */
32
- group: CometChat.Group;
50
+ group?: CometChat.Group;
33
51
  }
34
52
  type CallButtonsPropsType = CallButtonsUserProps | CallButtonsGroupProps;
35
53
  declare const CometChatCallButtons: (props: CallButtonsPropsType) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- declare function useCallButtons(loggedInUser: any, setLoggedInUser: Function, user: any, group: any, onErrorCallback: Function, attachListeners: Function, removeListener: Function, setActiveUser: any, setActiveGroup: any, initiateAudioCall: Function, initiateVideoCall: Function, onVoiceCallClickRef: React.MutableRefObject<Function | undefined>, onVideoCallClickRef: React.MutableRefObject<Function | undefined>, subscribeToEvents: Function): {
2
+ declare function useCallButtons(loggedInUser: any, setLoggedInUser: Function, user: any, group: any, errorHandler: Function, attachListeners: Function, removeListener: Function, setActiveUser: any, setActiveGroup: any, initiateAudioCall: Function, initiateVideoCall: Function, onVoiceCallClickRef: React.MutableRefObject<Function | undefined>, onVideoCallClickRef: React.MutableRefObject<Function | undefined>, subscribeToEvents: Function): {
3
3
  audioCallButtonClicked: () => void;
4
4
  videoCallButtonClicked: () => void;
5
5
  };
@@ -2,70 +2,82 @@
2
2
  import { DatePatterns } from "../../../Enums/Enums";
3
3
  interface CallLogsProps {
4
4
  /**
5
- * Title of the component
6
- *
7
- * @defaultValue `localize("CALLS")`
5
+ * Object representing the active call that is currently selected.
8
6
  */
9
- title?: string;
7
+ activeCall?: any;
10
8
  /**
11
- * Custom list item view to be rendered for each user in the fetched list
9
+ * Allows filtering and customizing call logs using available parameters.
10
+ * @defaultValue Default request builder having the limit set to 30.
12
11
  */
13
- listItemView?: (call: any) => JSX.Element;
12
+ callLogRequestBuilder?: any;
14
13
  /**
15
- * Custom subtitle view to be rendered for each user in the fetched list
16
- *
17
- * @remarks
18
- * This prop is used if `listItemView` prop is not provided
14
+ * Specifies the date format for rendering dates in the call logs.
19
15
  */
20
- subtitleView?: (call: any) => JSX.Element;
16
+ datePattern?: DatePatterns;
21
17
  /**
22
- * View to be placed in the tail view
23
- *
24
- * @remarks
25
- * This prop will be used if `listItemView` is not provided
18
+ * Callback function triggered when a call log list item is clicked.
19
+ * @returns void
26
20
  */
27
- tailView?: (call: any) => JSX.Element;
21
+ onItemClick?: (call: any) => void;
28
22
  /**
29
- * Custom view for the empty state of the component
23
+ * Callback function triggered when the call button in the trailing view is clicked.
24
+ * @returns void
30
25
  */
31
- emptyStateView?: JSX.Element;
26
+ onCallButtonClicked?: (call: any) => void;
32
27
  /**
33
- * Custom view for the error state of the component
28
+ * Callback function triggered when the component encounters an error.
29
+ *
30
+ * @param error - An instance of CometChat.CometChatException representing the error.
31
+ * @returns void
34
32
  */
35
- errorStateView?: JSX.Element;
33
+ onError?: ((error: CometChat.CometChatException) => void) | null;
36
34
  /**
37
- * Custom view for the loading state of the component
35
+ * A custom view to display when call logs are being loaded.
38
36
  */
39
- loadingStateView?: JSX.Element;
37
+ loadingView?: JSX.Element;
40
38
  /**
41
- * Object representing the active call that is currently selected.
42
- *
39
+ * A custom view to display when no call logs are available.
43
40
  */
44
- activeCall?: any;
41
+ emptyView?: JSX.Element;
45
42
  /**
46
- * Allows filtering and customizing call logs using available parameters
47
- * @defaultValue Default request builder having the limit set to 30
43
+ * A custom view to display when an error occurs while fetching the call logs.
48
44
  */
49
- callLogRequestBuilder?: any;
45
+ errorView?: JSX.Element;
46
+ /**
47
+ * A function that renders a JSX element to display the item view.
48
+ *
49
+ * @param call - An instance of `any` representing the CallLog.
50
+ * @returns A JSX element to be rendered as the item view.
51
+ */
52
+ itemView?: (call: any) => JSX.Element;
50
53
  /**
51
- * Function to call on click of the default list item view of a user
54
+ * A function that renders a JSX element to display the leading view.
55
+ *
56
+ * @param call - An instance of `any` representing the callLog.
57
+ * @returns A JSX element to be rendered as the leading view.
52
58
  */
53
- onItemClick?: Function;
59
+ leadingView?: (call: any) => JSX.Element;
54
60
  /**
55
- * Function to call on click of the tail view of a user
61
+ * A function that renders a JSX element to display the title view.
62
+ *
63
+ * @param call - An instance of `any` representing the callLog.
64
+ * @returns A JSX element to be rendered as the title view.
56
65
  */
57
- onCallButtonClicked?: Function;
66
+ titleView?: (call: any) => JSX.Element;
58
67
  /**
59
- * Function to call whenever the component encounters an error
68
+ * A function that renders a JSX element to display the subtitle view.
69
+ *
70
+ * @param call - An instance of `any` representing the callLog.
71
+ * @returns A JSX element to be rendered as the subtitle view.
60
72
  */
61
- onError?: Function;
73
+ subtitleView?: (call: any) => JSX.Element;
62
74
  /**
63
- * Date format for the date component
75
+ * A function that renders a JSX element to display the trailing view.
64
76
  *
65
- * @remarks
66
- * The date component is inside the tail view of the default list item view when `selectionMode` prop is set to `SelectionMode.none`
77
+ * @param call - An instance of `any` representing the callLog.
78
+ * @returns A JSX element to be rendered as the trailing view.
67
79
  */
68
- datePattern?: DatePatterns;
80
+ trailingView?: (call: any) => JSX.Element;
69
81
  }
70
82
  declare const CometChatCallLogs: (props: CallLogsProps) => import("react/jsx-runtime").JSX.Element;
71
83
  export { CometChatCallLogs };
@@ -1,2 +1,2 @@
1
- declare function useCometChatCallLogs(loggedInUser: CometChat.User | null, setLoggedInUser: Function, requestBuilder: any, setCallBuilder: Function, getCallList: Function, attachListeners: Function, subscribeToEvents: Function, detachListeners: Function, onErrorCallback: Function): void;
1
+ declare function useCometChatCallLogs(loggedInUser: CometChat.User | null, setLoggedInUser: Function, requestBuilder: any, setCallBuilder: Function, getCallList: Function, attachListeners: Function, subscribeToEvents: Function, detachListeners: Function, onErrorCallback: (error: unknown, source?: string | undefined) => void): void;
2
2
  export { useCometChatCallLogs };
@@ -2,58 +2,80 @@
2
2
  import { CometChatUIKitCalls } from "../../../CometChatUIKit/CometChatCalls";
3
3
  interface IncomingCallProps {
4
4
  /**
5
- * CometChat call object consumed by the component to launch itself.
5
+ * The CometChat call object used to initialize and display the incoming call component.
6
6
  */
7
7
  call?: any;
8
8
  /**
9
- * Used to disable/enable the sound of incoming calls.
9
+ * A builder function for configuring or updating call settings dynamically.
10
10
  *
11
- * @default false
11
+ * @param call - The current CometChat call object.
12
+ * @returns An instance of CallSettingsBuilder.
13
+ */
14
+ callSettingsBuilder?: (call: CometChat.Call) => typeof CometChatUIKitCalls.CallSettingsBuilder;
15
+ /**
16
+ * Disables the sound for incoming calls.
17
+ * @defaultValue false
12
18
  */
13
19
  disableSoundForCalls?: boolean;
14
20
  /**
15
- * Used to set a custom sound for incoming calls.
16
- *
17
- * @example customSoundForCalls='Your Custom Sound For Calls'
21
+ * Specifies a custom sound to play for incoming calls.
18
22
  */
19
23
  customSoundForCalls?: string;
20
24
  /**
21
- * Triggered when you click the accept button of the Incoming Call component.
22
- * You can override this action.
25
+ * Callback function triggered when the accept button is clicked. Allows overriding the default behavior.
26
+ *
27
+ * @param call - An instance of `CometChat.Call` representing the Call.
28
+ * @returns void
23
29
  */
24
- onAccept?: Function;
30
+ onAccept?: (call: CometChat.Call) => void;
25
31
  /**
26
- * Triggered when you click the decline button of the Incoming Call component.
27
- * You can override this action.
32
+ * Callback function triggered when the decline button is clicked. Allows overriding the default behavior.
33
+ *
34
+ * @param call - An instance of `CometChat.Call` representing the Call.
35
+ * @returns void
28
36
  */
29
- onDecline?: Function;
37
+ onDecline?: (call: CometChat.Call) => void;
30
38
  /**
31
- * Used to set custom accept button text.
39
+ * Callback function triggered when an error occurs in the incoming call component.
40
+ * @param error - An instance of `CometChat.CometChatException` representing the error.
41
+ * @return void
42
+ */
43
+ onError?: ((error: CometChat.CometChatException) => void) | null;
44
+ /**
45
+ * A function that renders a JSX element to display the item view.
32
46
  *
33
- * @example acceptButtonText='Your Custom Accept Button Text'
47
+ * @param call - An instance of `CometChat.Call` representing the call.
48
+ * @returns A JSX element to be rendered as the item view.
34
49
  */
35
- acceptButtonText?: string;
50
+ itemView?: (call: CometChat.Call) => JSX.Element;
36
51
  /**
37
- * Used to set custom decline button text.
52
+ * A function that renders a JSX element to display the leading view.
38
53
  *
39
- * @example declineButtonText='Your Decline Button Text'
54
+ * @param call - An instance of `CometChat.Call` representing the call.
55
+ * @returns A JSX element to be rendered as the leading view.
40
56
  */
41
- declineButtonText?: string;
57
+ leadingView?: (call: CometChat.Call) => JSX.Element;
42
58
  /**
43
- * Custom subtitle view for the incoming call component.
59
+ * A function that renders a JSX element to display the title view.
60
+ *
61
+ * @param call - An instance of `CometChat.Call` representing the call.
62
+ * @returns A JSX element to be rendered as the title view.
44
63
  */
45
- subtitleView?: (call: CometChat.Call) => JSX.Element;
64
+ titleView?: (call: CometChat.Call) => JSX.Element;
46
65
  /**
47
- * Triggered when an error occurs in the Incoming Call component.
66
+ * A function that renders a JSX element to display the subtitle view.
67
+ *
68
+ * @param call - An instance of `CometChat.Call` representing the call.
69
+ * @returns A JSX element to be rendered as the subtitle view.
48
70
  */
49
- onError?: Function;
71
+ subtitleView?: (call: CometChat.Call) => JSX.Element;
50
72
  /**
51
- * Builder function for configuring and updating call settings.
73
+ * A function that renders a JSX element to display the trailing view.
52
74
  *
53
- * @param call - The current CometChat call object.
54
- * @returns An instance of CallSettingsBuilder.
75
+ * @param call - An instance of `CometChat.Call` representing the call.
76
+ * @returns A JSX element to be rendered as the trailing view.
55
77
  */
56
- callSettingsBuilder?: (call: CometChat.Call) => typeof CometChatUIKitCalls.CallSettingsBuilder;
78
+ trailingView?: (call: CometChat.Call) => JSX.Element;
57
79
  }
58
80
  declare const CometChatIncomingCall: (props: IncomingCallProps) => import("react/jsx-runtime").JSX.Element;
59
81
  export { CometChatIncomingCall };
@@ -1,2 +1,2 @@
1
- declare function useCometChatIncomingCall(loggedInUser: any, setLoggedInUser: any, call: CometChat.Call, attachListeners: Function, removeListener: Function, acceptCallButtonRef: any, rejectCallButtonRef: any, showCall: any, callRef: any, acceptIncomingCall: Function, rejectIncomingCall: Function, showIncomingCallScreen: boolean, subscribeToEvents: Function): void;
1
+ declare function useCometChatIncomingCall(loggedInUser: any, setLoggedInUser: any, call: CometChat.Call, attachListeners: Function, removeListener: Function, acceptCallButtonRef: any, rejectCallButtonRef: any, showCall: any, callRef: any, acceptIncomingCall: Function, rejectIncomingCall: Function, showIncomingCallScreen: boolean, subscribeToEvents: Function, errorHandler: (error: unknown, source?: string) => void): void;
2
2
  export { useCometChatIncomingCall };
@@ -1,36 +1,52 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * Props interface for the outgoing call component
3
4
  */
4
5
  interface OutgoingCallProps {
5
6
  /**
6
- * Sets the call object for CometChatOutgoingCall.
7
+ * The CometChat call object used to set up and launch the outgoing call.
7
8
  */
8
- call: CometChat.Call;
9
+ call?: CometChat.Call;
9
10
  /**
10
- * Used to disable/enable the sound of outgoing calls.
11
- *
12
- * @default false
13
- * @example disableSoundForCalls={false}
11
+ * Disables the sound of outgoing calls.
12
+ * @defaultValue false
14
13
  */
15
14
  disableSoundForCalls?: boolean;
16
15
  /**
17
- * Used to set a custom sound for outgoing calls.
18
- *
19
- * @example customSoundForCalls='Your Custom Sound For Calls'
16
+ * Specifies a custom sound to play for outgoing calls.
20
17
  */
21
18
  customSoundForCalls?: string;
22
19
  /**
23
- * Custom view for the outgoing call component.
20
+ * Callback function triggered when an error occurs in the outgoing call component.
21
+ * @param error - An instance of `CometChat.CometChatException` representing the error.
22
+ * @return void
24
23
  */
25
- customView?: any;
24
+ onError?: ((error: CometChat.CometChatException) => void) | null;
26
25
  /**
27
- * Triggered when an error occurs in the outgoing call component.
26
+ * Callback function triggered when the cancel button is clicked in the outgoing call component.
27
+ * @return void
28
28
  */
29
- onError?: Function;
29
+ onCallCanceled?: Function;
30
30
  /**
31
- * Triggered when the close button is clicked in the outgoing call component.
31
+ * This prop renders the custom title view for the outgoing call.
32
+ * Use this to override the existing title of user name from the outgoing call.
32
33
  */
33
- onCloseClicked?: Function;
34
+ titleView?: JSX.Element;
35
+ /**
36
+ * This prop renders the custom sub title view for the outgoing call.
37
+ * Use this to override the existing sub title text from the outgoing call.
38
+ */
39
+ subtitleView?: JSX.Element;
40
+ /**
41
+ * This prop renders the custom avatar view for the outgoing call.
42
+ * Use this to override the existing avatar image from the outgoing call.
43
+ */
44
+ avatarView?: JSX.Element;
45
+ /**
46
+ * This prop renders the custom cancel-call button view for the outgoing call.
47
+ * Use this to override the existing cancel call button view from the outgoing call.
48
+ */
49
+ cancelButtonView?: JSX.Element;
34
50
  }
35
51
  declare const CometChatOutgoingCall: (props: OutgoingCallProps) => import("react/jsx-runtime").JSX.Element;
36
52
  export { CometChatOutgoingCall };
@@ -3,5 +3,5 @@
3
3
  * @param playAudio - Function to play audio during the outgoing call.
4
4
  * @param call - Optional CometChat.Call object representing the outgoing call.
5
5
  */
6
- declare function useCometChatOutgoingCall(playAudio: Function, call?: CometChat.Call): void;
6
+ declare function useCometChatOutgoingCall(errorHandler: (error: unknown, source?: string) => void, playAudio: Function, call?: CometChat.Call): void;
7
7
  export { useCometChatOutgoingCall };
@@ -1,8 +1,12 @@
1
+ /// <reference types="react" />
1
2
  export declare class OutgoingCallConfiguration {
2
3
  disableSoundForCalls?: boolean;
3
4
  customSoundForCalls?: string;
4
- customView?: any;
5
- onError?: Function;
6
- onCloseClicked?: Function;
5
+ titleView?: (call: CometChat.Call) => JSX.Element;
6
+ subtitleView?: (call: CometChat.Call) => JSX.Element;
7
+ avatarView?: (call: CometChat.Call) => JSX.Element;
8
+ cancelButtonView?: (call: CometChat.Call) => JSX.Element;
9
+ onError?: (error: CometChat.CometChatException) => void;
10
+ onCallCanceled?: Function;
7
11
  constructor(configuration: OutgoingCallConfiguration);
8
12
  }