agora-appbuilder-core 4.1.10-beta.1 → 4.1.11
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 +2 -2
- package/template/agora-rn-uikit/src/Utils/isBotUser.ts +1 -1
- package/template/android/app/build.gradle +0 -7
- package/template/bridge/rtc/webNg/RtcEngine.ts +2 -2
- package/template/bridge/rtm/web/Types.ts +0 -183
- package/template/bridge/rtm/web/index.ts +488 -450
- package/template/customization-api/typeDefinition.ts +0 -1
- package/template/defaultConfig.js +3 -4
- package/template/global.d.ts +0 -1
- package/template/ios/Podfile +0 -41
- package/template/package.json +5 -5
- package/template/src/AppRoutes.tsx +3 -3
- package/template/src/ai-agent/components/ControlButtons.tsx +1 -1
- package/template/src/assets/font-styles.css +1 -33
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/selection.json +1 -1
- package/template/src/atoms/ActionMenu.tsx +93 -13
- package/template/src/atoms/CustomIcon.tsx +1 -8
- package/template/src/atoms/DropDownMulti.tsx +80 -29
- package/template/src/atoms/Dropdown.tsx +0 -5
- package/template/src/atoms/Input.tsx +2 -1
- package/template/src/atoms/TertiaryButton.tsx +1 -1
- package/template/src/atoms/UserAvatar.tsx +1 -1
- package/template/src/components/ChatContext.ts +3 -5
- package/template/src/components/Controls.tsx +167 -208
- package/template/src/components/DeviceConfigure.tsx +1 -1
- package/template/src/components/EventsConfigure.tsx +168 -118
- package/template/src/components/Navbar.tsx +11 -14
- package/template/src/components/RTMConfigure.tsx +819 -32
- package/template/src/components/beauty-effect/useBeautyEffects.tsx +13 -50
- package/template/src/components/chat/chatConfigure.tsx +1 -7
- package/template/src/components/chat-messages/useChatMessages.tsx +11 -43
- package/template/src/components/controls/useControlPermissionMatrix.tsx +4 -32
- package/template/src/components/participants/AllHostParticipants.tsx +2 -10
- package/template/src/components/participants/Participant.tsx +1 -7
- package/template/src/components/participants/UserActionMenuOptions.tsx +2 -12
- package/template/src/components/precall/joinCallBtn.native.tsx +7 -2
- package/template/src/components/precall/joinCallBtn.tsx +7 -2
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +16 -15
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +31 -17
- package/template/src/components/precall/textInput.tsx +45 -22
- package/template/src/components/precall/usePreCall.tsx +7 -0
- package/template/src/components/recordings/RecordingsDateTable.tsx +2 -3
- package/template/src/components/room-info/useRoomInfo.tsx +5 -0
- package/template/src/components/useUserPreference.tsx +12 -39
- package/template/src/components/virtual-background/useVB.tsx +0 -18
- package/template/src/components/whiteboard/WhiteboardConfigure.tsx +0 -27
- package/template/src/language/default-labels/videoCallScreenLabels.ts +27 -11
- package/template/src/logger/AppBuilderLogger.tsx +3 -11
- package/template/src/pages/VideoCall.tsx +518 -171
- package/template/src/pages/video-call/ActionSheetContent.tsx +77 -77
- package/template/src/pages/video-call/SidePanelHeader.tsx +81 -53
- package/template/src/pages/video-call/VideoCallScreen.tsx +0 -18
- package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +1 -0
- package/template/src/rtm/RTMEngine.ts +37 -262
- package/template/src/rtm/utils.ts +1 -68
- package/template/src/rtm-events/constants.ts +7 -40
- package/template/src/rtm-events-api/Events.ts +39 -158
- package/template/src/subComponents/ChatBubble.tsx +3 -3
- package/template/src/subComponents/ChatContainer.tsx +9 -19
- package/template/src/subComponents/LocalAudioMute.tsx +2 -2
- package/template/src/subComponents/LocalVideoMute.tsx +2 -2
- package/template/src/subComponents/SidePanelEnum.tsx +0 -1
- package/template/src/subComponents/caption/Caption.tsx +48 -7
- package/template/src/subComponents/caption/CaptionContainer.tsx +324 -51
- package/template/src/subComponents/caption/CaptionIcon.tsx +35 -34
- package/template/src/subComponents/caption/CaptionText.tsx +103 -2
- package/template/src/subComponents/caption/LanguageSelectorPopup.tsx +179 -69
- package/template/src/subComponents/caption/Transcript.tsx +46 -11
- package/template/src/subComponents/caption/TranscriptIcon.tsx +27 -35
- package/template/src/subComponents/caption/TranscriptText.tsx +78 -3
- package/template/src/subComponents/caption/proto/ptoto.js +38 -4
- package/template/src/subComponents/caption/proto/test.proto +34 -19
- package/template/src/subComponents/caption/useCaption.tsx +754 -11
- package/template/src/subComponents/caption/useSTTAPI.tsx +118 -205
- package/template/src/subComponents/caption/useStreamMessageUtils.native.ts +152 -33
- package/template/src/subComponents/caption/useStreamMessageUtils.ts +165 -34
- package/template/src/subComponents/caption/utils.ts +171 -3
- package/template/src/subComponents/chat/ChatSendButton.tsx +0 -1
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +0 -16
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +1 -1
- package/template/src/subComponents/waiting-rooms/WaitingRoomControls.tsx +4 -7
- package/template/src/utils/SdkEvents.ts +3 -0
- package/template/src/utils/useEndCall.ts +4 -4
- package/template/src/utils/useMuteToggleLocal.ts +10 -14
- package/template/src/utils/useSpeechToText.ts +31 -20
- package/template/bridge/rtm/web/index-legacy.ts +0 -540
- package/template/src/components/RTMConfigure-legacy.tsx +0 -848
- package/template/src/components/UserGlobalPreferenceProvider.tsx +0 -227
- package/template/src/components/breakout-room/BreakoutRoomPanel.tsx +0 -58
- package/template/src/components/breakout-room/context/BreakoutRoomContext.tsx +0 -2508
- package/template/src/components/breakout-room/events/BreakoutRoomEventsConfigure.tsx +0 -272
- package/template/src/components/breakout-room/events/constants.ts +0 -17
- package/template/src/components/breakout-room/hoc/BreakoutRoomNameRenderer.tsx +0 -68
- package/template/src/components/breakout-room/hooks/useBreakoutRoomExit.ts +0 -49
- package/template/src/components/breakout-room/state/reducer.ts +0 -522
- package/template/src/components/breakout-room/state/types.ts +0 -54
- package/template/src/components/breakout-room/ui/BreakoutMeetingTitle.tsx +0 -60
- package/template/src/components/breakout-room/ui/BreakoutRoomActionMenu.tsx +0 -136
- package/template/src/components/breakout-room/ui/BreakoutRoomAnnouncementModal.tsx +0 -135
- package/template/src/components/breakout-room/ui/BreakoutRoomGroupSettings.tsx +0 -588
- package/template/src/components/breakout-room/ui/BreakoutRoomMainRoomUsers.tsx +0 -142
- package/template/src/components/breakout-room/ui/BreakoutRoomMemberActionMenu.tsx +0 -122
- package/template/src/components/breakout-room/ui/BreakoutRoomParticipants.tsx +0 -124
- package/template/src/components/breakout-room/ui/BreakoutRoomRaiseHand.tsx +0 -65
- package/template/src/components/breakout-room/ui/BreakoutRoomRenameModal.tsx +0 -227
- package/template/src/components/breakout-room/ui/BreakoutRoomSettings.tsx +0 -140
- package/template/src/components/breakout-room/ui/BreakoutRoomTransition.tsx +0 -52
- package/template/src/components/breakout-room/ui/BreakoutRoomView.tsx +0 -193
- package/template/src/components/breakout-room/ui/ExitBreakoutRoomIconButton.tsx +0 -79
- package/template/src/components/breakout-room/ui/ParticipantManualAssignmentModal.tsx +0 -638
- package/template/src/components/breakout-room/ui/SelectParticipantAssignmentStrategy.tsx +0 -57
- package/template/src/components/common/Dividers.tsx +0 -53
- package/template/src/components/controls/toolbar-items/ExitBreakoutRoomToolbarItem.tsx +0 -13
- package/template/src/components/raise-hand/RaiseHandButton.tsx +0 -50
- package/template/src/components/raise-hand/RaiseHandProvider.tsx +0 -308
- package/template/src/components/raise-hand/index.ts +0 -14
- package/template/src/components/room-info/useCurrentRoomInfo.tsx +0 -42
- package/template/src/components/room-info/useSetBreakoutRoomInfo.tsx +0 -64
- package/template/src/pages/video-call/BreakoutVideoCall.tsx +0 -213
- package/template/src/pages/video-call/VideoCallContent.tsx +0 -211
- package/template/src/pages/video-call/VideoCallStateWrapper.tsx +0 -495
- package/template/src/rtm/RTMConfigureBreakoutRoomProvider.tsx +0 -882
- package/template/src/rtm/RTMConfigureMainRoomProvider.tsx +0 -757
- package/template/src/rtm/RTMCoreProvider.tsx +0 -419
- package/template/src/rtm/RTMGlobalStateProvider.tsx +0 -706
- package/template/src/rtm/RTMStatusBanner.tsx +0 -99
- package/template/src/rtm/constants.ts +0 -12
- package/template/src/rtm/hooks/useMainRoomUserDisplayName.ts +0 -45
- package/template/src/rtm/rtm-presence-utils.ts +0 -344
- package/template/src/subComponents/chat/ChatAnnouncementView.tsx +0 -65
- package/template/src/utils/useDebouncedCallback.tsx +0 -20
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
********************************************
|
|
3
|
-
Copyright © 2021 Agora Lab, Inc., all rights reserved.
|
|
4
|
-
AppBuilder and all associated components, source code, APIs, services, and documentation
|
|
5
|
-
(the "Materials") are owned by Agora Lab, Inc. and its licensors. The Materials may not be
|
|
6
|
-
accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
|
|
7
|
-
Use without a license or in violation of any license terms and conditions (including use for
|
|
8
|
-
any purpose competitive to Agora Lab, Inc.'s business) is strictly prohibited. For more
|
|
9
|
-
information visit https://appbuilder.agora.io.
|
|
10
|
-
*********************************************
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import React, {useState, useRef, useEffect} from 'react';
|
|
14
|
-
import {View, useWindowDimensions} from 'react-native';
|
|
15
|
-
import ActionMenu, {ActionMenuItem} from '../../../atoms/ActionMenu';
|
|
16
|
-
import IconButton from '../../../atoms/IconButton';
|
|
17
|
-
import {calculatePosition} from '../../../utils/common';
|
|
18
|
-
import {useRoomInfo} from 'customization-api';
|
|
19
|
-
|
|
20
|
-
interface RoomActionMenuProps {
|
|
21
|
-
onDeleteRoom: () => void;
|
|
22
|
-
onRenameRoom: () => void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const BreakoutRoomActionMenu: React.FC<RoomActionMenuProps> = ({
|
|
26
|
-
onDeleteRoom,
|
|
27
|
-
onRenameRoom,
|
|
28
|
-
}) => {
|
|
29
|
-
const [actionMenuVisible, setActionMenuVisible] = useState(false);
|
|
30
|
-
const [isPosCalculated, setIsPosCalculated] = useState(false);
|
|
31
|
-
const [modalPosition, setModalPosition] = useState({});
|
|
32
|
-
const {width: globalWidth, height: globalHeight} = useWindowDimensions();
|
|
33
|
-
const moreIconRef = useRef(null);
|
|
34
|
-
|
|
35
|
-
const {
|
|
36
|
-
data: {isHost},
|
|
37
|
-
} = useRoomInfo();
|
|
38
|
-
|
|
39
|
-
// Build action menu items based on context
|
|
40
|
-
const actionMenuItems: ActionMenuItem[] = [];
|
|
41
|
-
|
|
42
|
-
// ACTION - Only show for hosts
|
|
43
|
-
if (isHost) {
|
|
44
|
-
actionMenuItems.push({
|
|
45
|
-
order: 1,
|
|
46
|
-
icon: 'pencil-filled',
|
|
47
|
-
iconColor: $config.SECONDARY_ACTION_COLOR,
|
|
48
|
-
textColor: $config.SECONDARY_ACTION_COLOR,
|
|
49
|
-
title: 'Rename Room',
|
|
50
|
-
onPress: () => {
|
|
51
|
-
onRenameRoom();
|
|
52
|
-
setActionMenuVisible(false);
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
actionMenuItems.push({
|
|
56
|
-
order: 2,
|
|
57
|
-
icon: 'delete',
|
|
58
|
-
iconColor: $config.SEMANTIC_ERROR,
|
|
59
|
-
textColor: $config.SEMANTIC_ERROR,
|
|
60
|
-
title: 'Delete Room',
|
|
61
|
-
onPress: () => {
|
|
62
|
-
onDeleteRoom();
|
|
63
|
-
setActionMenuVisible(false);
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Calculate position when menu becomes visible
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
if (actionMenuVisible) {
|
|
71
|
-
moreIconRef?.current?.measure(
|
|
72
|
-
(
|
|
73
|
-
_fx: number,
|
|
74
|
-
_fy: number,
|
|
75
|
-
localWidth: number,
|
|
76
|
-
localHeight: number,
|
|
77
|
-
px: number,
|
|
78
|
-
py: number,
|
|
79
|
-
) => {
|
|
80
|
-
const data = calculatePosition({
|
|
81
|
-
px,
|
|
82
|
-
py,
|
|
83
|
-
localWidth,
|
|
84
|
-
localHeight,
|
|
85
|
-
globalHeight,
|
|
86
|
-
globalWidth,
|
|
87
|
-
});
|
|
88
|
-
setModalPosition(data);
|
|
89
|
-
setIsPosCalculated(true);
|
|
90
|
-
},
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
}, [actionMenuVisible]);
|
|
94
|
-
|
|
95
|
-
// Don't render if no actions available
|
|
96
|
-
if (actionMenuItems.length === 0) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<>
|
|
102
|
-
<ActionMenu
|
|
103
|
-
from={'breakout-room-header-actions'}
|
|
104
|
-
actionMenuVisible={actionMenuVisible && isPosCalculated}
|
|
105
|
-
setActionMenuVisible={setActionMenuVisible}
|
|
106
|
-
modalPosition={modalPosition}
|
|
107
|
-
items={actionMenuItems}
|
|
108
|
-
/>
|
|
109
|
-
<View
|
|
110
|
-
ref={moreIconRef}
|
|
111
|
-
collapsable={false}
|
|
112
|
-
style={{
|
|
113
|
-
width: 24,
|
|
114
|
-
height: 24,
|
|
115
|
-
alignSelf: 'center',
|
|
116
|
-
justifyContent: 'center',
|
|
117
|
-
alignItems: 'center',
|
|
118
|
-
}}>
|
|
119
|
-
<IconButton
|
|
120
|
-
hoverEffect={false}
|
|
121
|
-
iconProps={{
|
|
122
|
-
iconType: 'plain',
|
|
123
|
-
name: 'more-menu',
|
|
124
|
-
iconSize: 20,
|
|
125
|
-
tintColor: $config.SECONDARY_ACTION_COLOR,
|
|
126
|
-
}}
|
|
127
|
-
onPress={() => {
|
|
128
|
-
setActionMenuVisible(true);
|
|
129
|
-
}}
|
|
130
|
-
/>
|
|
131
|
-
</View>
|
|
132
|
-
</>
|
|
133
|
-
);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export default BreakoutRoomActionMenu;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import React, {SetStateAction, Dispatch} from 'react';
|
|
2
|
-
import {View, StyleSheet, TextInput} from 'react-native';
|
|
3
|
-
import GenericModal from '../../common/GenericModal';
|
|
4
|
-
import ThemeConfig from '../../../theme';
|
|
5
|
-
import TertiaryButton from '../../../atoms/TertiaryButton';
|
|
6
|
-
|
|
7
|
-
interface BreakoutRoomAnnouncementModalProps {
|
|
8
|
-
setModalOpen: Dispatch<SetStateAction<boolean>>;
|
|
9
|
-
onAnnouncement: (text: string) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default function BreakoutRoomAnnouncementModal(
|
|
13
|
-
props: BreakoutRoomAnnouncementModalProps,
|
|
14
|
-
) {
|
|
15
|
-
const {setModalOpen, onAnnouncement} = props;
|
|
16
|
-
const [announcement, setAnnouncement] = React.useState('');
|
|
17
|
-
|
|
18
|
-
const disabled = announcement.trim() === '';
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<GenericModal
|
|
22
|
-
visible={true}
|
|
23
|
-
onRequestClose={() => setModalOpen(false)}
|
|
24
|
-
showCloseIcon={true}
|
|
25
|
-
title={'Announcement'}
|
|
26
|
-
cancelable={true}
|
|
27
|
-
contentContainerStyle={style.contentContainer}>
|
|
28
|
-
<View style={style.fullBody}>
|
|
29
|
-
<View style={style.mbody}>
|
|
30
|
-
<TextInput
|
|
31
|
-
id="annoucement-text"
|
|
32
|
-
style={style.inputBox}
|
|
33
|
-
value={announcement}
|
|
34
|
-
onChangeText={setAnnouncement}
|
|
35
|
-
placeholder="Make an announcement..."
|
|
36
|
-
placeholderTextColor={
|
|
37
|
-
$config.FONT_COLOR + ThemeConfig.EmphasisPlus.low
|
|
38
|
-
}
|
|
39
|
-
underlineColorAndroid="transparent"
|
|
40
|
-
numberOfLines={6}
|
|
41
|
-
multiline={true}
|
|
42
|
-
/>
|
|
43
|
-
</View>
|
|
44
|
-
<View style={style.mfooter}>
|
|
45
|
-
<View>
|
|
46
|
-
<TertiaryButton
|
|
47
|
-
containerStyle={style.cancelBtn}
|
|
48
|
-
textStyle={style.actionBtnText}
|
|
49
|
-
text={'Cancel'}
|
|
50
|
-
onPress={() => {
|
|
51
|
-
setModalOpen(false);
|
|
52
|
-
}}
|
|
53
|
-
/>
|
|
54
|
-
</View>
|
|
55
|
-
<View>
|
|
56
|
-
<TertiaryButton
|
|
57
|
-
containerStyle={disabled ? style.disabledSendBtn : style.sendBtn}
|
|
58
|
-
textStyle={style.actionBtnText}
|
|
59
|
-
text={'Send'}
|
|
60
|
-
disabled={disabled}
|
|
61
|
-
onPress={() => {
|
|
62
|
-
onAnnouncement(announcement);
|
|
63
|
-
}}
|
|
64
|
-
/>
|
|
65
|
-
</View>
|
|
66
|
-
</View>
|
|
67
|
-
</View>
|
|
68
|
-
</GenericModal>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const style = StyleSheet.create({
|
|
73
|
-
contentContainer: {
|
|
74
|
-
display: 'flex',
|
|
75
|
-
flexDirection: 'column',
|
|
76
|
-
alignItems: 'flex-start',
|
|
77
|
-
flexShrink: 0,
|
|
78
|
-
width: '100%',
|
|
79
|
-
maxWidth: 500,
|
|
80
|
-
height: 314,
|
|
81
|
-
},
|
|
82
|
-
fullBody: {
|
|
83
|
-
width: '100%',
|
|
84
|
-
height: '100%',
|
|
85
|
-
flex: 1,
|
|
86
|
-
},
|
|
87
|
-
mbody: {
|
|
88
|
-
padding: 12,
|
|
89
|
-
borderTopColor: $config.CARD_LAYER_3_COLOR,
|
|
90
|
-
borderTopWidth: 1,
|
|
91
|
-
borderBottomColor: $config.CARD_LAYER_3_COLOR,
|
|
92
|
-
borderBottomWidth: 1,
|
|
93
|
-
},
|
|
94
|
-
mfooter: {
|
|
95
|
-
padding: 12,
|
|
96
|
-
gap: 12,
|
|
97
|
-
display: 'flex',
|
|
98
|
-
flexDirection: 'row',
|
|
99
|
-
alignItems: 'center',
|
|
100
|
-
justifyContent: 'flex-end',
|
|
101
|
-
},
|
|
102
|
-
inputBox: {
|
|
103
|
-
fontSize: ThemeConfig.FontSize.normal,
|
|
104
|
-
fontWeight: '400',
|
|
105
|
-
color: $config.FONT_COLOR,
|
|
106
|
-
padding: 20,
|
|
107
|
-
lineHeight: 20,
|
|
108
|
-
borderRadius: 8,
|
|
109
|
-
borderWidth: 1,
|
|
110
|
-
borderColor: $config.INPUT_FIELD_BORDER_COLOR,
|
|
111
|
-
backgroundColor: $config.INPUT_FIELD_BACKGROUND_COLOR,
|
|
112
|
-
},
|
|
113
|
-
actionBtnText: {
|
|
114
|
-
color: $config.SECONDARY_ACTION_COLOR,
|
|
115
|
-
fontSize: ThemeConfig.FontSize.small,
|
|
116
|
-
lineHeight: 16,
|
|
117
|
-
},
|
|
118
|
-
cancelBtn: {
|
|
119
|
-
borderRadius: 4,
|
|
120
|
-
minWidth: 140,
|
|
121
|
-
borderColor: $config.SECONDARY_ACTION_COLOR,
|
|
122
|
-
backgroundColor: 'transparent',
|
|
123
|
-
},
|
|
124
|
-
sendBtn: {
|
|
125
|
-
borderRadius: 4,
|
|
126
|
-
minWidth: 140,
|
|
127
|
-
borderColor: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
128
|
-
backgroundColor: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
129
|
-
},
|
|
130
|
-
disabledSendBtn: {
|
|
131
|
-
borderRadius: 4,
|
|
132
|
-
minWidth: 140,
|
|
133
|
-
backgroundColor: $config.SEMANTIC_NEUTRAL,
|
|
134
|
-
},
|
|
135
|
-
});
|