agora-appbuilder-core 4.0.11 → 4.0.13
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/package.json +1 -1
- package/template/_package-lock.json +1576 -1364
- package/template/agora-rn-uikit/package-lock.json +25024 -0
- package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
- package/template/android/link-assets-manifest.json +13 -0
- package/template/customization-api/sub-components.ts +4 -0
- package/template/customization-api/types.ts +6 -0
- package/template/defaultConfig.js +3 -0
- package/template/global.d.ts +3 -0
- package/template/ios/Podfile.lock +10 -0
- package/template/ios/link-assets-manifest.json +13 -0
- package/template/package-lock.json +57732 -0
- package/template/package.json +4 -0
- package/template/react-native-toast-message/package-lock.json +10553 -0
- package/template/src/app-state/useMessages.ts +49 -9
- package/template/src/assets/font-styles.css +289 -125
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/selection.json +1 -1
- package/template/src/atoms/ActionMenu.tsx +5 -2
- package/template/src/atoms/CustomIcon.tsx +17 -1
- package/template/src/atoms/ImageIcon.tsx +19 -3
- package/template/src/atoms/InlinePopup.tsx +185 -0
- package/template/src/atoms/Popup.tsx +13 -4
- package/template/src/auth/AuthProvider.tsx +5 -0
- package/template/src/auth/config.ts +12 -3
- package/template/src/components/Chat.tsx +7 -1
- package/template/src/components/ChatContext.ts +12 -0
- package/template/src/components/CommonStyles.ts +2 -2
- package/template/src/components/RTMConfigure.tsx +1 -0
- package/template/src/components/chat/chatConfigure.native.tsx +488 -0
- package/template/src/components/chat/chatConfigure.tsx +473 -0
- package/template/src/components/chat-messages/useChatMessages.tsx +411 -607
- package/template/src/components/chat-ui/useChatUIControls.tsx +53 -0
- package/template/src/components/meeting-info-invite/MeetingInfoGridTile.tsx +4 -1
- package/template/src/components/participants/Participant.tsx +0 -1
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +6 -1
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +6 -1
- package/template/src/components/room-info/useRoomInfo.tsx +5 -0
- package/template/src/language/default-labels/videoCallScreenLabels.ts +86 -6
- package/template/src/pages/VideoCall.tsx +2 -1
- package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +22 -12
- package/template/src/pages/video-call/index.ts +8 -0
- package/template/src/subComponents/ChatBubble.tsx +252 -32
- package/template/src/subComponents/ChatContainer.tsx +14 -4
- package/template/src/subComponents/ChatInput.native.tsx +269 -0
- package/template/src/subComponents/ChatInput.tsx +276 -100
- package/template/src/subComponents/RemoteMutePopup.tsx +12 -131
- package/template/src/subComponents/caption/CaptionContainer.tsx +6 -2
- package/template/src/subComponents/chat/ChatActionMenu.tsx +224 -0
- package/template/src/subComponents/chat/ChatAttachment.native.tsx +234 -0
- package/template/src/subComponents/chat/ChatAttachment.tsx +145 -0
- package/template/src/subComponents/chat/ChatEmoji.native.tsx +75 -0
- package/template/src/subComponents/chat/ChatEmoji.tsx +181 -0
- package/template/src/subComponents/chat/ChatSendButton.tsx +141 -0
- package/template/src/subComponents/chat/ChatUploadStatus.tsx +65 -0
- package/template/src/subComponents/chat/ImagePopup.tsx +400 -0
- package/template/src/subComponents/recording/useRecording.tsx +3 -1
- package/template/src/utils/index.tsx +30 -0
- package/template/src/utils/useEndCall.ts +7 -0
- package/template/src/utils/useJoinRoom.ts +32 -0
- package/template/src/subComponents/ChatInput.ios.tsx +0 -184
|
@@ -3,24 +3,39 @@ import {
|
|
|
3
3
|
useChatNotification,
|
|
4
4
|
} from '../components/chat-notification/useChatNotification';
|
|
5
5
|
import {
|
|
6
|
+
ChatOption,
|
|
7
|
+
MessageStatusCallback,
|
|
6
8
|
messageStoreInterface,
|
|
7
9
|
useChatMessages,
|
|
10
|
+
SDKChatType,
|
|
8
11
|
} from '../components/chat-messages/useChatMessages';
|
|
12
|
+
import {useChatConfigure} from '../components/chat/chatConfigure';
|
|
13
|
+
import {isWeb} from '../utils/common';
|
|
14
|
+
import type {UidType} from '../../agora-rn-uikit';
|
|
9
15
|
|
|
10
16
|
export interface messageInterface {
|
|
11
17
|
groupMessages: messageStoreInterface[];
|
|
12
18
|
privateMessages: {
|
|
13
19
|
[key: string]: messageStoreInterface[];
|
|
14
20
|
};
|
|
15
|
-
sendMessage: (
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
sendMessage: (
|
|
22
|
+
option: ChatOption,
|
|
23
|
+
messageStatusCallback?: MessageStatusCallback,
|
|
24
|
+
) => void;
|
|
25
|
+
// editMessage: (msgId: string, msg: string, toUid?: number) => void;
|
|
26
|
+
deleteMessage: (msgId: string, to?: string, chatType?: SDKChatType) => void;
|
|
18
27
|
groupUnreadCount: number;
|
|
19
28
|
individualUnreadCount: individualUnreadMessageCount;
|
|
20
29
|
setGroupUnreadCount: React.Dispatch<React.SetStateAction<number>>;
|
|
21
30
|
setIndividualUnreadCount: React.Dispatch<
|
|
22
31
|
React.SetStateAction<individualUnreadMessageCount>
|
|
23
32
|
>;
|
|
33
|
+
|
|
34
|
+
removeMessageFromStore: (msgId: string, isMsgRecalled: boolean) => void;
|
|
35
|
+
removeMessageFromPrivateStore: (
|
|
36
|
+
msgId: string,
|
|
37
|
+
isMsgRecalled: boolean,
|
|
38
|
+
) => void;
|
|
24
39
|
}
|
|
25
40
|
|
|
26
41
|
/**
|
|
@@ -28,12 +43,12 @@ export interface messageInterface {
|
|
|
28
43
|
*/
|
|
29
44
|
export const useMessages: () => messageInterface = () => {
|
|
30
45
|
const {
|
|
31
|
-
deleteChatMessage: deleteMessage,
|
|
32
|
-
editChatMessage: editMessage,
|
|
33
46
|
messageStore: groupMessages,
|
|
34
47
|
privateMessageStore: privateMessages,
|
|
35
|
-
|
|
48
|
+
removeMessageFromPrivateStore,
|
|
49
|
+
removeMessageFromStore,
|
|
36
50
|
} = useChatMessages();
|
|
51
|
+
const {sendChatSDKMessage, deleteAttachment} = useChatConfigure();
|
|
37
52
|
const {
|
|
38
53
|
setUnreadIndividualMessageCount: setIndividualUnreadCount,
|
|
39
54
|
setUnreadGroupMessageCount: setGroupUnreadCount,
|
|
@@ -41,15 +56,40 @@ export const useMessages: () => messageInterface = () => {
|
|
|
41
56
|
unreadIndividualMessageCount: individualUnreadCount,
|
|
42
57
|
} = useChatNotification();
|
|
43
58
|
|
|
59
|
+
const sendMessageWrapper = (
|
|
60
|
+
option: ChatOption,
|
|
61
|
+
messageStatusCallback?: MessageStatusCallback,
|
|
62
|
+
) => {
|
|
63
|
+
if (isWeb()) {
|
|
64
|
+
sendChatSDKMessage(option);
|
|
65
|
+
} else {
|
|
66
|
+
sendChatSDKMessage(option, messageStatusCallback);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const deleteMessageWrapper = (
|
|
71
|
+
msgId: string,
|
|
72
|
+
to?: string,
|
|
73
|
+
chatType?: SDKChatType,
|
|
74
|
+
) => {
|
|
75
|
+
if (isWeb()) {
|
|
76
|
+
deleteAttachment(msgId, to, chatType);
|
|
77
|
+
} else {
|
|
78
|
+
deleteAttachment(msgId);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
44
82
|
return {
|
|
45
83
|
groupMessages,
|
|
46
84
|
privateMessages,
|
|
47
|
-
sendMessage,
|
|
48
|
-
editMessage,
|
|
49
|
-
deleteMessage,
|
|
85
|
+
sendMessage: sendMessageWrapper,
|
|
86
|
+
//editMessage,
|
|
87
|
+
deleteMessage: deleteMessageWrapper,
|
|
50
88
|
groupUnreadCount,
|
|
51
89
|
individualUnreadCount,
|
|
52
90
|
setGroupUnreadCount,
|
|
53
91
|
setIndividualUnreadCount,
|
|
92
|
+
removeMessageFromStore,
|
|
93
|
+
removeMessageFromPrivateStore,
|
|
54
94
|
};
|
|
55
95
|
};
|