@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.
- package/README.md +2 -2
- package/dist/assets/Send.svg +3 -0
- package/dist/assets/loading.svg +5 -16
- package/dist/index.d.ts +1155 -950
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/CometChatCallButtons.css +1 -1
- package/dist/styles/CometChatCallLogs.css +3 -3
- package/dist/styles/{components/AIConversationStarter.css → CometChatConversationStarter.css} +2 -2
- package/dist/styles/{components/AIConversationSummary.css → CometChatConversationSummary.css} +12 -12
- package/dist/styles/CometChatConversations.css +10 -10
- package/dist/styles/CometChatGroupMembers.css +5 -5
- package/dist/styles/CometChatIncomingCall.css +1 -1
- package/dist/styles/CometChatList.css +15 -22
- package/dist/styles/CometChatListItem.css +2 -2
- package/dist/styles/CometChatMessageComposer.css +44 -41
- package/dist/styles/CometChatMessageHeader.css +22 -5
- package/dist/styles/CometChatMessageInformation.css +3 -2
- package/dist/styles/CometChatMessageList.css +6 -5
- package/dist/styles/CometChatOutgoingCall.css +5 -0
- package/dist/styles/{AISmartReplies.css → CometChatSmartReplies.css} +72 -79
- package/dist/styles/PollsBubble.css +7 -1
- package/dist/styles/components/CometChatCallButtons.css +1 -1
- package/dist/styles/components/CometChatCallLogs.css +3 -3
- package/dist/styles/{AIConversationStarter.css → components/CometChatConversationStarter.css} +2 -2
- package/dist/styles/{AIConversationSummary.css → components/CometChatConversationSummary.css} +12 -12
- package/dist/styles/components/CometChatConversations.css +10 -10
- package/dist/styles/components/CometChatGroupMembers.css +5 -5
- package/dist/styles/components/CometChatIncomingCall.css +1 -1
- package/dist/styles/components/CometChatList.css +15 -22
- package/dist/styles/components/CometChatListItem.css +2 -2
- package/dist/styles/components/CometChatMessageComposer.css +44 -41
- package/dist/styles/components/CometChatMessageHeader.css +22 -5
- package/dist/styles/components/CometChatMessageInformation.css +3 -2
- package/dist/styles/components/CometChatMessageList.css +6 -5
- package/dist/styles/components/CometChatOutgoingCall.css +5 -0
- package/dist/styles/components/{AISmartReplies.css → CometChatSmartReplies.css} +72 -79
- package/dist/styles/components/PollsBubble.css +7 -1
- package/dist/styles/components/index.css +3 -3
- package/dist/styles/index.css +3 -3
- package/dist/types/CometChatCustomHooks.d.ts +1 -1
- package/dist/types/CometChatUIKit/CometChatUIKit.d.ts +0 -6
- package/dist/types/CometChatUIKit/UIKitSettings.d.ts +0 -22
- package/dist/types/Enums/Enums.d.ts +9 -0
- package/dist/types/components/BaseComponents/CometChatConversationStarter/CometChatConversationStarter.d.ts +6 -0
- package/dist/types/components/BaseComponents/CometChatConversationSummary/CometChatConversationSummary.d.ts +6 -0
- package/dist/types/components/BaseComponents/CometChatList/CometChatList.d.ts +12 -12
- package/dist/types/components/BaseComponents/CometChatListItem/CometChatListItem.d.ts +3 -1
- package/dist/types/components/BaseComponents/CometChatSmartReplies/CometChatSmartReplies.d.ts +7 -0
- package/dist/types/components/Calling/CallButtonConfiguration.d.ts +1 -1
- package/dist/types/components/Calling/CallingExtensionDecorator.d.ts +2 -2
- package/dist/types/components/Calling/CometChatCallButtons/CometChatCallButtons.d.ts +30 -12
- package/dist/types/components/Calling/CometChatCallButtons/useCallButtons.d.ts +1 -1
- package/dist/types/components/Calling/CometChatCallLogs/CometChatCallLogs.d.ts +50 -38
- package/dist/types/components/Calling/CometChatCallLogs/useCometChatCallLogs.d.ts +1 -1
- package/dist/types/components/Calling/CometChatIncomingCall/CometChatIncomingCall.d.ts +48 -26
- package/dist/types/components/Calling/CometChatIncomingCall/useCometChatIncomingCall.d.ts +1 -1
- package/dist/types/components/Calling/CometChatOutgoingCall/CometChatOutgoingCall.d.ts +31 -15
- package/dist/types/components/Calling/CometChatOutgoingCall/useCometChatOutgoingCall.d.ts +1 -1
- package/dist/types/components/Calling/OutgoingCallConfiguration.d.ts +7 -3
- package/dist/types/components/CometChatConversations/CometChatConversations.d.ts +88 -87
- package/dist/types/components/CometChatConversations/controller.d.ts +10 -8
- package/dist/types/components/CometChatConversations/useCometChatConversations.d.ts +2 -5
- package/dist/types/components/CometChatGroupMembers/CometChatGroupMembers.d.ts +94 -76
- package/dist/types/components/CometChatGroupMembers/useCometChatGroupMembers.d.ts +2 -2
- package/dist/types/components/CometChatGroups/CometChatGroups.d.ts +74 -62
- package/dist/types/components/CometChatGroups/useCometChatGroups.d.ts +1 -0
- package/dist/types/components/CometChatMessageComposer/CometChatMessageComposer.d.ts +107 -49
- package/dist/types/components/CometChatMessageComposer/useCometChatMessageComposer.d.ts +1 -1
- package/dist/types/components/CometChatMessageHeader/CometChatMessageHeader.d.ts +77 -16
- package/dist/types/components/CometChatMessageHeader/useCometChatMessageHeader.d.ts +1 -1
- package/dist/types/components/CometChatMessageInformation/CometChatMessageInformation.d.ts +5 -0
- package/dist/types/components/CometChatMessageList/CometChatMessageList.d.ts +133 -55
- package/dist/types/components/CometChatMessageList/CometChatMessageListController.d.ts +3 -1
- package/dist/types/components/CometChatMessageList/useCometChatMessageList.d.ts +1 -1
- package/dist/types/components/CometChatThreadedMessagePreview/CometChatThreadedMessagePreview.d.ts +34 -2
- package/dist/types/components/CometChatUsers/CometChatUsers.d.ts +88 -89
- package/dist/types/components/CometChatUsers/useCometChatUsers.d.ts +2 -1
- package/dist/types/components/Extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.d.ts +4 -3
- package/dist/types/components/Extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.d.ts +4 -3
- package/dist/types/components/Extensions/MessageTranslation/MessageTranslationExtensionDecorator.d.ts +3 -1
- package/dist/types/components/Extensions/Polls/PollsBubble.d.ts +5 -0
- package/dist/types/components/Extensions/Polls/PollsExtensionDecorator.d.ts +4 -3
- package/dist/types/components/Extensions/Stickers/StickersExtensionDecorator.d.ts +2 -3
- package/dist/types/components/Reactions/CometChatReactionInfo/CometChatReactionInfo.d.ts +3 -2
- package/dist/types/components/Reactions/CometChatReactionList/CometChatReactionList.d.ts +3 -2
- package/dist/types/components/Reactions/CometChatReactions/CometChatReactions.d.ts +3 -2
- package/dist/types/index.d.ts +8 -7
- package/dist/types/resources/CometChatLocalize/cometchat-localize.d.ts +129 -115
- package/dist/types/utils/DataSource.d.ts +17 -18
- package/dist/types/utils/DataSourceDecorator.d.ts +17 -18
- package/dist/types/utils/GroupMemberUtils.d.ts +1 -1
- package/dist/types/utils/MessageUtils.d.ts +1 -1
- package/dist/types/utils/MessagesDataSource.d.ts +29 -16
- package/dist/types/utils/util.d.ts +5 -0
- package/package.json +1 -1
- package/dist/assets/ai-empty.svg +0 -22
- package/dist/assets/ai-error.svg +0 -3
- package/dist/assets/heart-reaction.png +0 -0
- package/dist/assets/send.svg +0 -12
- package/dist/styles/AICard.css +0 -30
- package/dist/styles/components/AICard.css +0 -30
- package/dist/types/components/AI/AIBaseConfiguration.d.ts +0 -51
- package/dist/types/components/AI/AIConversationStarter/AIConversationStarterConfiguration.d.ts +0 -20
- package/dist/types/components/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +0 -18
- package/dist/types/components/AI/AIConversationStarter/AIConversationStarterExtension.d.ts +0 -8
- package/dist/types/components/AI/AIConversationStarter/AIConversationStarterView.d.ts +0 -8
- package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryConfiguration.d.ts +0 -31
- package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryDecorator.d.ts +0 -22
- package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryExtension.d.ts +0 -8
- package/dist/types/components/AI/AIConversationSummary/AIConversationSummaryView.d.ts +0 -9
- package/dist/types/components/AI/AIExtensionDataSource.d.ts +0 -6
- package/dist/types/components/AI/AISmartReplies/AISmartRepliesConfiguration.d.ts +0 -28
- package/dist/types/components/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +0 -21
- package/dist/types/components/AI/AISmartReplies/AISmartRepliesExtension.d.ts +0 -8
- package/dist/types/components/AI/AISmartReplies/AISmartRepliesView.d.ts +0 -11
- package/dist/types/components/BaseComponents/CometChatLiveReaction/CometChatLiveReaction.d.ts +0 -5
- package/dist/types/components/BaseComponents/CometChatLiveReaction/useLiveReactionHook.d.ts +0 -19
- /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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
user
|
|
32
|
+
* A CometChat.User object representing the user in which the call will be initiated.
|
|
33
|
+
*/
|
|
34
|
+
user?: CometChat.User;
|
|
15
35
|
/**
|
|
16
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
48
|
+
* A CometChat.Group object representing the group in which the call will be initiated.
|
|
31
49
|
*/
|
|
32
|
-
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,
|
|
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
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @defaultValue `localize("CALLS")`
|
|
5
|
+
* Object representing the active call that is currently selected.
|
|
8
6
|
*/
|
|
9
|
-
|
|
7
|
+
activeCall?: any;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* Allows filtering and customizing call logs using available parameters.
|
|
10
|
+
* @defaultValue Default request builder having the limit set to 30.
|
|
12
11
|
*/
|
|
13
|
-
|
|
12
|
+
callLogRequestBuilder?: any;
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
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
|
-
|
|
16
|
+
datePattern?: DatePatterns;
|
|
21
17
|
/**
|
|
22
|
-
*
|
|
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
|
-
|
|
21
|
+
onItemClick?: (call: any) => void;
|
|
28
22
|
/**
|
|
29
|
-
*
|
|
23
|
+
* Callback function triggered when the call button in the trailing view is clicked.
|
|
24
|
+
* @returns void
|
|
30
25
|
*/
|
|
31
|
-
|
|
26
|
+
onCallButtonClicked?: (call: any) => void;
|
|
32
27
|
/**
|
|
33
|
-
*
|
|
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
|
-
|
|
33
|
+
onError?: ((error: CometChat.CometChatException) => void) | null;
|
|
36
34
|
/**
|
|
37
|
-
*
|
|
35
|
+
* A custom view to display when call logs are being loaded.
|
|
38
36
|
*/
|
|
39
|
-
|
|
37
|
+
loadingView?: JSX.Element;
|
|
40
38
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* A custom view to display when no call logs are available.
|
|
43
40
|
*/
|
|
44
|
-
|
|
41
|
+
emptyView?: JSX.Element;
|
|
45
42
|
/**
|
|
46
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
59
|
+
leadingView?: (call: any) => JSX.Element;
|
|
54
60
|
/**
|
|
55
|
-
*
|
|
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
|
-
|
|
66
|
+
titleView?: (call: any) => JSX.Element;
|
|
58
67
|
/**
|
|
59
|
-
*
|
|
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
|
-
|
|
73
|
+
subtitleView?: (call: any) => JSX.Element;
|
|
62
74
|
/**
|
|
63
|
-
*
|
|
75
|
+
* A function that renders a JSX element to display the trailing view.
|
|
64
76
|
*
|
|
65
|
-
* @
|
|
66
|
-
*
|
|
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
|
-
|
|
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:
|
|
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
|
|
5
|
+
* The CometChat call object used to initialize and display the incoming call component.
|
|
6
6
|
*/
|
|
7
7
|
call?: any;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* A builder function for configuring or updating call settings dynamically.
|
|
10
10
|
*
|
|
11
|
-
* @
|
|
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
|
-
*
|
|
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
|
-
*
|
|
22
|
-
*
|
|
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?:
|
|
30
|
+
onAccept?: (call: CometChat.Call) => void;
|
|
25
31
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
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?:
|
|
37
|
+
onDecline?: (call: CometChat.Call) => void;
|
|
30
38
|
/**
|
|
31
|
-
*
|
|
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
|
-
* @
|
|
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
|
-
|
|
50
|
+
itemView?: (call: CometChat.Call) => JSX.Element;
|
|
36
51
|
/**
|
|
37
|
-
*
|
|
52
|
+
* A function that renders a JSX element to display the leading view.
|
|
38
53
|
*
|
|
39
|
-
* @
|
|
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
|
-
|
|
57
|
+
leadingView?: (call: CometChat.Call) => JSX.Element;
|
|
42
58
|
/**
|
|
43
|
-
*
|
|
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
|
-
|
|
64
|
+
titleView?: (call: CometChat.Call) => JSX.Element;
|
|
46
65
|
/**
|
|
47
|
-
*
|
|
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
|
-
|
|
71
|
+
subtitleView?: (call: CometChat.Call) => JSX.Element;
|
|
50
72
|
/**
|
|
51
|
-
*
|
|
73
|
+
* A function that renders a JSX element to display the trailing view.
|
|
52
74
|
*
|
|
53
|
-
* @param call -
|
|
54
|
-
* @returns
|
|
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
|
-
|
|
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
|
-
*
|
|
7
|
+
* The CometChat call object used to set up and launch the outgoing call.
|
|
7
8
|
*/
|
|
8
|
-
call
|
|
9
|
+
call?: CometChat.Call;
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
24
|
+
onError?: ((error: CometChat.CometChatException) => void) | null;
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
26
|
+
* Callback function triggered when the cancel button is clicked in the outgoing call component.
|
|
27
|
+
* @return void
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
onCallCanceled?: Function;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
}
|