agora-appbuilder-core 3.0.10 → 3.0.12
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 +0 -6
- package/package.json +2 -2
- package/template/_package-lock.json +4979 -7086
- package/template/agora-rn-uikit/src/Contexts/LocalUserContext.tsx +0 -4
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +0 -18
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +0 -2
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +26 -30
- package/template/agora-rn-uikit/src/Controls/Icons.ts +83 -30
- package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +6 -6
- package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +0 -2
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/index.ts +0 -3
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +1 -89
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +2 -39
- package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +5 -15
- package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +9 -15
- package/template/agora-rn-uikit/src/index.ts +1 -3
- package/template/android/app/build.gradle +0 -1
- package/template/android/app/src/main/AndroidManifest.xml +15 -22
- package/template/android/app/src/main/java/com/helloworld/MainActivity.java +0 -50
- package/template/android/build.gradle +3 -3
- package/template/babel.config.js +0 -1
- package/template/bridge/rtc/webNg/RtcEngine.ts +17 -110
- package/template/customization-api/sub-components.ts +1 -1
- package/template/customization-api/typeDefinition.ts +1 -2
- package/template/electron/index.html +27 -27
- package/template/electron/renderer/index.js +0 -1
- package/template/global.d.ts +4 -26
- package/template/index.js +0 -4
- package/template/index.rsdk.tsx +0 -1
- package/template/index.web.js +1 -7
- package/template/index.wsdk.tsx +1 -1
- package/template/ios/HelloWorld/Info.plist +1 -14
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +0 -17
- package/template/metro.config.js +1 -1
- package/template/package.json +7 -21
- package/template/react-native-toast-message/index.d.ts +43 -43
- package/template/react-native-toast-message/src/colors/index.js +2 -3
- package/template/react-native-toast-message/src/components/base/index.js +59 -46
- package/template/react-native-toast-message/src/components/base/styles.js +32 -16
- package/template/react-native-toast-message/src/components/error.js +2 -3
- package/template/react-native-toast-message/src/components/info.js +2 -3
- package/template/react-native-toast-message/src/components/success.js +2 -3
- package/template/react-native-toast-message/src/index.js +31 -122
- package/template/react-native-toast-message/src/index.sdk.tsx +35 -125
- package/template/react-native-toast-message/src/styles.js +4 -3
- package/template/react-native-toast-message/src/styles.sdk.ts +4 -3
- package/template/src/App.tsx +0 -6
- package/template/src/AppWrapper.tsx +28 -63
- package/template/src/assets/icons.ts +102 -0
- package/template/src/atoms/HorizontalRule.tsx +1 -3
- package/template/src/atoms/PrimaryButton.tsx +26 -51
- package/template/src/atoms/SecondaryButton.tsx +5 -8
- package/template/src/atoms/TextInput.tsx +14 -12
- package/template/src/components/Chat.tsx +214 -86
- package/template/src/components/ChatContext.ts +1 -8
- package/template/src/components/ColorConfigure.tsx +1 -1
- package/template/src/components/ColorContext.ts +1 -1
- package/template/src/components/{Controls1.native.tsx → Controls.native.tsx} +4 -6
- package/template/src/components/Controls.tsx +42 -342
- package/template/src/components/DeviceConfigure.tsx +101 -461
- package/template/src/components/DeviceContext.tsx +4 -8
- package/template/src/components/EventsConfigure.tsx +7 -144
- package/template/src/components/GraphQLProvider.tsx +1 -1
- package/template/src/components/GridVideo.tsx +44 -59
- package/template/src/components/HostControlView.tsx +35 -114
- package/template/src/components/Navbar.tsx +398 -216
- package/template/src/components/NetworkQualityContext.tsx +20 -20
- package/template/src/components/ParticipantsView.tsx +154 -177
- package/template/src/components/PinnedVideo.tsx +120 -207
- package/template/src/components/Precall.native.tsx +119 -358
- package/template/src/components/Precall.tsx +135 -269
- package/template/src/components/RTMConfigure.tsx +4 -27
- package/template/src/components/Router.electron.ts +0 -1
- package/template/src/components/Router.native.ts +0 -1
- package/template/src/components/Router.sdk.ts +0 -1
- package/template/src/components/Router.ts +0 -1
- package/template/src/components/Settings.tsx +95 -26
- package/template/src/components/SettingsView.tsx +56 -251
- package/template/src/components/Share.tsx +273 -302
- package/template/src/components/StorageContext.tsx +3 -30
- package/template/src/components/chat-messages/useChatMessages.tsx +23 -69
- package/template/src/components/chat-ui/useChatUIControl.tsx +0 -7
- package/template/src/components/common/Error.tsx +6 -20
- package/template/src/components/common/Logo.tsx +15 -16
- package/template/src/components/contexts/LiveStreamDataContext.tsx +5 -10
- package/template/src/components/contexts/VideoMeetingDataContext.tsx +7 -37
- package/template/src/components/livestream/LiveStreamContext.tsx +36 -270
- package/template/src/components/livestream/Types.ts +14 -39
- package/template/src/components/livestream/index.ts +0 -1
- package/template/src/components/livestream/views/LiveStreamControls.tsx +4 -12
- package/template/src/components/participants/AllAudienceParticipants.tsx +30 -101
- package/template/src/components/participants/AllHostParticipants.tsx +34 -103
- package/template/src/components/participants/MeParticipant.tsx +38 -0
- package/template/src/components/participants/ParticipantName.tsx +7 -13
- package/template/src/components/participants/ParticipantSectionTitle.tsx +10 -35
- package/template/src/components/participants/RemoteParticipants.tsx +71 -0
- package/template/src/components/participants/ScreenshareParticipants.tsx +12 -144
- package/template/src/components/precall/{LocalMute1.native.tsx → LocalMute.native.tsx} +5 -21
- package/template/src/components/precall/LocalMute.tsx +14 -84
- package/template/src/components/precall/VideoPreview.native.tsx +3 -48
- package/template/src/components/precall/VideoPreview.tsx +7 -163
- package/template/src/components/precall/joinCallBtn.tsx +2 -15
- package/template/src/components/precall/meetingTitle.tsx +12 -15
- package/template/src/components/precall/selectDevice.tsx +21 -1
- package/template/src/components/precall/textInput.tsx +4 -32
- package/template/src/components/precall/usePreCall.tsx +0 -16
- package/template/src/components/styles.ts +21 -42
- package/template/src/components/useShareLink.tsx +14 -12
- package/template/src/language/default-labels/precallScreenLabels.ts +3 -3
- package/template/src/pages/Authenticate.tsx +15 -5
- package/template/src/pages/Create.tsx +165 -293
- package/template/src/pages/Join.tsx +67 -93
- package/template/src/pages/VideoCall.tsx +64 -89
- package/template/src/pages/video-call/DefaultLayouts.ts +4 -4
- package/template/src/pages/video-call/NameWithMicIcon.tsx +44 -120
- package/template/src/pages/video-call/RenderComponent.tsx +2 -3
- package/template/src/pages/video-call/VideoCallScreen.tsx +9 -45
- package/template/src/pages/video-call/VideoComponent.tsx +3 -18
- package/template/src/pages/video-call/VideoRenderer.tsx +60 -218
- package/template/src/rtm-events/constants.ts +0 -2
- package/template/src/subComponents/ChatBubble.tsx +83 -123
- package/template/src/subComponents/ChatContainer.tsx +84 -257
- package/template/src/subComponents/ChatInput.tsx +46 -61
- package/template/src/subComponents/Checkbox.native.tsx +5 -16
- package/template/src/subComponents/Checkbox.tsx +2 -2
- package/template/src/subComponents/CopyJoinInfo.tsx +58 -36
- package/template/src/subComponents/FallbackLogo.tsx +40 -122
- package/template/src/subComponents/LanguageSelector.tsx +1 -1
- package/template/src/subComponents/{LayoutIconDropdown1.native.tsx → LayoutIconDropdown.native.tsx} +18 -4
- package/template/src/subComponents/LayoutIconDropdown.tsx +134 -131
- package/template/src/subComponents/LocalAudioMute.tsx +27 -119
- package/template/src/subComponents/LocalEndCall.tsx +33 -71
- package/template/src/subComponents/LocalSwitchCamera.tsx +30 -17
- package/template/src/subComponents/LocalVideoMute.tsx +27 -117
- package/template/src/subComponents/Logo.tsx +4 -3
- package/template/src/subComponents/LogoutButton.tsx +1 -1
- package/template/src/subComponents/NetworkQualityPill.tsx +63 -60
- package/template/src/subComponents/OpenInNativeButton.tsx +3 -3
- package/template/src/subComponents/Recording.tsx +29 -28
- package/template/src/subComponents/RemoteAudioMute.tsx +29 -83
- package/template/src/subComponents/RemoteEndCall.tsx +5 -8
- package/template/src/subComponents/RemoteVideoMute.tsx +21 -74
- package/template/src/subComponents/ScreenShareNotice.tsx +8 -83
- package/template/src/subComponents/SelectDevice.tsx +61 -404
- package/template/src/subComponents/SelectOAuth.tsx +8 -9
- package/template/src/subComponents/ToastConfig.tsx +10 -150
- package/template/src/subComponents/chat/ChatParticipants.tsx +78 -187
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +32 -95
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +33 -29
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +6 -6
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +11 -24
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +10 -17
- package/template/src/subComponents/recording/useRecording.tsx +27 -79
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +70 -52
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +2 -11
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +4 -26
- package/template/src/utils/common.tsx +1 -155
- package/template/src/utils/index.tsx +0 -19
- package/template/src/utils/isMobileOrTablet.ts +2 -7
- package/template/src/utils/useButtonTemplate.tsx +0 -1
- package/template/src/utils/useMuteToggleLocal.ts +3 -54
- package/template/web/index.html +0 -5
- package/template/webpack.commons.js +8 -13
- package/template/webpack.web.config.js +0 -1
- package/template/agora-rn-uikit/src/Reducer/ActiveSpeakerDetected.ts +0 -11
- package/template/agora-rn-uikit/src/Reducer/LocalPermissionState.ts +0 -24
- package/template/agora-rn-uikit/src/Reducer/UserPin.ts +0 -11
- package/template/android/app/src/main/assets/fonts/SourceSansPro-Regular.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
- package/template/android/app/src/main/res/values/colors.xml +0 -7
- package/template/react-native-toast-message/src/components/checkbox.js +0 -178
- package/template/react-native.config.js +0 -7
- package/template/src/assets/font-styles.css +0 -329
- package/template/src/assets/fonts/SourceSansPro-Regular.ttf +0 -0
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/permission.png +0 -0
- package/template/src/assets/selection.json +0 -1
- package/template/src/atoms/ActionMenu.tsx +0 -236
- package/template/src/atoms/AnimatedActiveSpeaker.native.tsx +0 -71
- package/template/src/atoms/AnimatedActiveSpeaker.tsx +0 -84
- package/template/src/atoms/AnimatedRings.native.tsx +0 -68
- package/template/src/atoms/AnimatedRings.tsx +0 -70
- package/template/src/atoms/Card.tsx +0 -61
- package/template/src/atoms/CircularProgress.native.tsx +0 -121
- package/template/src/atoms/CircularProgress.tsx +0 -102
- package/template/src/atoms/CustomIcon.tsx +0 -88
- package/template/src/atoms/CustomSwitch.tsx +0 -287
- package/template/src/atoms/Dropdown.tsx +0 -306
- package/template/src/atoms/IconButton.tsx +0 -162
- package/template/src/atoms/ImageIcon.tsx +0 -98
- package/template/src/atoms/InfoBubble.tsx +0 -291
- package/template/src/atoms/Input.tsx +0 -87
- package/template/src/atoms/InviteInfo.tsx +0 -166
- package/template/src/atoms/LinkButton.tsx +0 -28
- package/template/src/atoms/OutlineButton.tsx +0 -61
- package/template/src/atoms/ParticipantsCount.tsx +0 -73
- package/template/src/atoms/Popup.tsx +0 -147
- package/template/src/atoms/RecordingInfo.tsx +0 -49
- package/template/src/atoms/Spacer.tsx +0 -22
- package/template/src/atoms/TertiaryButton.tsx +0 -78
- package/template/src/atoms/Toggle.tsx +0 -47
- package/template/src/atoms/Tooltip.native.tsx +0 -65
- package/template/src/atoms/Tooltip.tsx +0 -94
- package/template/src/atoms/UserAvatar.tsx +0 -60
- package/template/src/components/CommonStyles.ts +0 -44
- package/template/src/components/ToastComponent.tsx +0 -8
- package/template/src/components/participants/Participant.tsx +0 -302
- package/template/src/components/participants/UserActionMenuOptions.tsx +0 -398
- package/template/src/components/popups/InvitePopup.tsx +0 -115
- package/template/src/components/popups/StopRecordingPopup.tsx +0 -114
- package/template/src/components/precall/PermissionHelper.native.tsx +0 -5
- package/template/src/components/precall/PermissionHelper.tsx +0 -126
- package/template/src/components/precall/PreCallSettings.tsx +0 -52
- package/template/src/components/useToast.tsx +0 -41
- package/template/src/components/useVideoCall.tsx +0 -65
- package/template/src/pages/Endcall.tsx +0 -148
- package/template/src/pages/video-call/ActionSheet.native.tsx +0 -215
- package/template/src/pages/video-call/ActionSheet.tsx +0 -226
- package/template/src/pages/video-call/ActionSheetContent.tsx +0 -479
- package/template/src/pages/video-call/ActionSheetHandle.tsx +0 -38
- package/template/src/pages/video-call/ActionSheetStyles.css +0 -138
- package/template/src/pages/video-call/SidePanelHeader.tsx +0 -190
- package/template/src/pages/video-call/VideoCallMobileView.tsx +0 -139
- package/template/src/pages/video-call/VideoCallScreen.native.tsx +0 -37
- package/template/src/subComponents/ChatInput.ios.tsx +0 -237
- package/template/src/subComponents/EndcallPopup.tsx +0 -107
- package/template/src/subComponents/LayoutIconButton.tsx +0 -201
- package/template/src/subComponents/RemoteMutePopup.tsx +0 -193
- package/template/src/subComponents/RemoveMeetingPopup.tsx +0 -109
- package/template/src/subComponents/RemoveScreensharePopup.tsx +0 -109
- package/template/src/subComponents/SelectDeviceSettings.backup.tsx +0 -207
- package/template/src/subComponents/SidePanelHeader.tsx +0 -112
- package/template/src/theme/index.ts +0 -46
- package/template/src/utils/PlatformWrapper.tsx +0 -21
- package/template/src/utils/hexadecimalTransparency.ts +0 -108
- package/template/src/utils/pendingStateUpdateHelper.ts +0 -19
- package/template/src/utils/useFocus.tsx +0 -46
- package/template/src/utils/useIsActiveSpeaker.ts +0 -27
- package/template/src/utils/useIsHandRaised.ts +0 -13
- package/template/src/utils/useRemoteEndScreenshare.ts +0 -26
- package/template/src/utils/useRemoteRequest.ts +0 -84
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import React, {useState, useRef} from 'react';
|
|
2
|
-
|
|
3
|
-
import LayoutIconDropdown from './LayoutIconDropdown';
|
|
4
|
-
import useLayoutsData from '../pages/video-call/useLayoutsData';
|
|
5
|
-
import {useChangeDefaultLayout} from '../pages/video-call/DefaultLayouts';
|
|
6
|
-
import {useLayout} from '../utils/useLayout';
|
|
7
|
-
import IconButton, {IconButtonProps} from '../atoms/IconButton';
|
|
8
|
-
import {isMobileUA} from '../utils/common';
|
|
9
|
-
import isMobileOrTablet from '../utils/isMobileOrTablet';
|
|
10
|
-
import {useWindowDimensions} from 'react-native';
|
|
11
|
-
import {useRender} from 'customization-api';
|
|
12
|
-
|
|
13
|
-
interface LayoutIconButtonInterface {
|
|
14
|
-
render?: (onPress: () => void) => JSX.Element;
|
|
15
|
-
showLabel?: boolean;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const LayoutIconButton = (props: LayoutIconButtonInterface) => {
|
|
19
|
-
const {activeUids} = useRender();
|
|
20
|
-
const {height: windowHeight} = useWindowDimensions();
|
|
21
|
-
const [modalPosition, setModalPosition] = useState(null);
|
|
22
|
-
const layoutBtnRef = useRef();
|
|
23
|
-
const [isHovered, setIsHoveredLocal] = useState(false);
|
|
24
|
-
const [isHoveredOnModal, setIsHoveredOnModal] = useState(false);
|
|
25
|
-
const isMobileView = isMobileUA();
|
|
26
|
-
const {showLabel = $config.ICON_TEXT} = props;
|
|
27
|
-
const setIsHovered = (hovered: boolean) => {
|
|
28
|
-
if (layoutBtnRef && layoutBtnRef.current) {
|
|
29
|
-
layoutBtnRef?.current?.measure((_fx, _fy, _w, h, _px, _py) => {
|
|
30
|
-
setModalPosition({
|
|
31
|
-
bottom: isMobileOrTablet()
|
|
32
|
-
? windowHeight - _py + 10
|
|
33
|
-
: windowHeight - _py - 10,
|
|
34
|
-
left: isMobileOrTablet() ? _px - 10 : -10,
|
|
35
|
-
});
|
|
36
|
-
setIsHoveredLocal(hovered);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
//commented for v1 release
|
|
41
|
-
//const layoutLabel = useString('layoutLabel')('');
|
|
42
|
-
const layoutLabel = 'Layout';
|
|
43
|
-
const layouts = useLayoutsData();
|
|
44
|
-
const changeLayout = useChangeDefaultLayout();
|
|
45
|
-
const {currentLayout, setLayout} = useLayout();
|
|
46
|
-
|
|
47
|
-
const layout = layouts.findIndex((item) => item.name === currentLayout);
|
|
48
|
-
const renderLayoutIcon = (showDropdown?: boolean) => {
|
|
49
|
-
let onPress = () => {};
|
|
50
|
-
let renderContent = [];
|
|
51
|
-
if (!showDropdown) {
|
|
52
|
-
onPress = () => {
|
|
53
|
-
changeLayout();
|
|
54
|
-
};
|
|
55
|
-
} else {
|
|
56
|
-
onPress = () => {
|
|
57
|
-
//desktop web don't need onpress
|
|
58
|
-
if (isMobileUA()) {
|
|
59
|
-
setIsHovered(!isHovered);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
let iconButtonProps: Partial<IconButtonProps> = {
|
|
64
|
-
onPress: onPress,
|
|
65
|
-
btnTextProps: {
|
|
66
|
-
text: showLabel ? layoutLabel : '',
|
|
67
|
-
textColor: $config.FONT_COLOR,
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
const iconName =
|
|
71
|
-
layouts[layout]?.iconName === 'pinned' && isMobileView
|
|
72
|
-
? 'list-view'
|
|
73
|
-
: layouts[layout]?.iconName;
|
|
74
|
-
|
|
75
|
-
renderContent.push(
|
|
76
|
-
props?.render ? (
|
|
77
|
-
props.render(onPress)
|
|
78
|
-
) : (
|
|
79
|
-
<PlatformWrapper
|
|
80
|
-
key={'layout-icon-btn'}
|
|
81
|
-
//showDropdown={isHovered}
|
|
82
|
-
setIsHovered={
|
|
83
|
-
setIsHovered
|
|
84
|
-
// (flag) => {
|
|
85
|
-
// if (flag) {
|
|
86
|
-
// setIsHovered(true);
|
|
87
|
-
// } else {
|
|
88
|
-
// if (isMobileOrTablet()) {
|
|
89
|
-
// setIsHovered(false);
|
|
90
|
-
// } else {
|
|
91
|
-
// setTimeout(() => {
|
|
92
|
-
// setIsHovered(false);
|
|
93
|
-
// }, 100);
|
|
94
|
-
// }
|
|
95
|
-
// }
|
|
96
|
-
// }
|
|
97
|
-
}>
|
|
98
|
-
<IconButton
|
|
99
|
-
disabled={!activeUids || activeUids.length === 0}
|
|
100
|
-
containerStyle={{
|
|
101
|
-
opacity: !activeUids || activeUids.length === 0 ? 0.6 : 1,
|
|
102
|
-
}}
|
|
103
|
-
setRef={(ref) => {
|
|
104
|
-
layoutBtnRef.current = ref;
|
|
105
|
-
}}
|
|
106
|
-
key={'defaultLayoutIconWithName'}
|
|
107
|
-
iconProps={{
|
|
108
|
-
name: iconName,
|
|
109
|
-
tintColor: $config.SECONDARY_ACTION_COLOR,
|
|
110
|
-
}}
|
|
111
|
-
{...iconButtonProps}
|
|
112
|
-
/>
|
|
113
|
-
</PlatformWrapper>
|
|
114
|
-
),
|
|
115
|
-
);
|
|
116
|
-
return renderContent;
|
|
117
|
-
};
|
|
118
|
-
return (
|
|
119
|
-
<>
|
|
120
|
-
{/**
|
|
121
|
-
* Based on the flag. it will render the dropdown
|
|
122
|
-
*/}
|
|
123
|
-
{activeUids && activeUids.length ? (
|
|
124
|
-
<PlatformWrapperPopup
|
|
125
|
-
setIsHovered={
|
|
126
|
-
isMobileOrTablet()
|
|
127
|
-
? setIsHovered
|
|
128
|
-
: (isHoveredOnPopup: boolean) => {
|
|
129
|
-
if (isHoveredOnPopup) {
|
|
130
|
-
setIsHoveredOnModal(isHoveredOnPopup);
|
|
131
|
-
} else {
|
|
132
|
-
if (isMobileUA()) {
|
|
133
|
-
setIsHoveredOnModal(isHoveredOnPopup);
|
|
134
|
-
} else {
|
|
135
|
-
setTimeout(() => {
|
|
136
|
-
if (!isHovered) {
|
|
137
|
-
setIsHoveredOnModal(isHoveredOnPopup);
|
|
138
|
-
}
|
|
139
|
-
}, 100);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}>
|
|
144
|
-
<LayoutIconDropdown
|
|
145
|
-
caretPosition={{
|
|
146
|
-
bottom: isMobileOrTablet() ? -8 : -10,
|
|
147
|
-
left: isMobileOrTablet() ? 26 : 26,
|
|
148
|
-
}}
|
|
149
|
-
modalPosition={modalPosition}
|
|
150
|
-
showDropdown={
|
|
151
|
-
isMobileOrTablet() ? isHovered : isHovered || isHoveredOnModal
|
|
152
|
-
}
|
|
153
|
-
setShowDropdown={
|
|
154
|
-
isMobileOrTablet() ? setIsHovered : setIsHoveredOnModal
|
|
155
|
-
}
|
|
156
|
-
/>
|
|
157
|
-
</PlatformWrapperPopup>
|
|
158
|
-
) : (
|
|
159
|
-
<></>
|
|
160
|
-
)}
|
|
161
|
-
{/**
|
|
162
|
-
* If layout contains more than 2 data. it will render the dropdown.
|
|
163
|
-
*/}
|
|
164
|
-
{layouts && Array.isArray(layouts) && layouts.length > 1
|
|
165
|
-
? renderLayoutIcon(true)
|
|
166
|
-
: renderLayoutIcon(false)}
|
|
167
|
-
</>
|
|
168
|
-
);
|
|
169
|
-
};
|
|
170
|
-
const PlatformWrapper = ({children, ...props}) => {
|
|
171
|
-
return !isMobileOrTablet() ? (
|
|
172
|
-
<div
|
|
173
|
-
onMouseEnter={() => {
|
|
174
|
-
props?.setIsHovered(true);
|
|
175
|
-
}}
|
|
176
|
-
onMouseLeave={() => {
|
|
177
|
-
props?.setIsHovered(false);
|
|
178
|
-
}}>
|
|
179
|
-
{children}
|
|
180
|
-
</div>
|
|
181
|
-
) : (
|
|
182
|
-
children
|
|
183
|
-
);
|
|
184
|
-
};
|
|
185
|
-
const PlatformWrapperPopup = ({children, ...props}) => {
|
|
186
|
-
return !isMobileOrTablet() ? (
|
|
187
|
-
<div
|
|
188
|
-
onMouseEnter={() => {
|
|
189
|
-
props?.setIsHovered(true);
|
|
190
|
-
}}
|
|
191
|
-
onMouseLeave={() => {
|
|
192
|
-
props?.setIsHovered(false);
|
|
193
|
-
}}>
|
|
194
|
-
{children}
|
|
195
|
-
</div>
|
|
196
|
-
) : (
|
|
197
|
-
children
|
|
198
|
-
);
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
export default LayoutIconButton;
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Modal,
|
|
3
|
-
StyleSheet,
|
|
4
|
-
Text,
|
|
5
|
-
TouchableOpacity,
|
|
6
|
-
TouchableWithoutFeedback,
|
|
7
|
-
useWindowDimensions,
|
|
8
|
-
View,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
import React, {SetStateAction} from 'react';
|
|
11
|
-
import ThemeConfig from '../theme';
|
|
12
|
-
import Spacer from '../atoms/Spacer';
|
|
13
|
-
import PlatformWrapper from '../utils/PlatformWrapper';
|
|
14
|
-
import {isMobileOrTablet} from 'customization-api';
|
|
15
|
-
import hexadecimalTransparency from '../utils/hexadecimalTransparency';
|
|
16
|
-
|
|
17
|
-
export interface ActionMenuProps {
|
|
18
|
-
actionMenuVisible: boolean;
|
|
19
|
-
setActionMenuVisible: React.Dispatch<SetStateAction<boolean>>;
|
|
20
|
-
modalPosition?: {
|
|
21
|
-
top?: number;
|
|
22
|
-
right?: number;
|
|
23
|
-
left?: number;
|
|
24
|
-
bottom?: number;
|
|
25
|
-
};
|
|
26
|
-
name: string;
|
|
27
|
-
onMutePress: () => void;
|
|
28
|
-
type: 'video' | 'audio';
|
|
29
|
-
action?: 'mute' | 'request';
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const RemoteMutePopup = (props: ActionMenuProps) => {
|
|
33
|
-
const {height} = useWindowDimensions();
|
|
34
|
-
const {
|
|
35
|
-
actionMenuVisible,
|
|
36
|
-
setActionMenuVisible,
|
|
37
|
-
modalPosition,
|
|
38
|
-
action = 'mute',
|
|
39
|
-
} = props;
|
|
40
|
-
let message = '';
|
|
41
|
-
|
|
42
|
-
if (props.name) {
|
|
43
|
-
//mute action
|
|
44
|
-
if (action === 'mute') {
|
|
45
|
-
message = `Mute ${props.name}'s ${props.type} for everyone on the call? Only ${props.name} can unmute themselves.`;
|
|
46
|
-
}
|
|
47
|
-
//request action
|
|
48
|
-
else {
|
|
49
|
-
if (props?.type === 'audio') {
|
|
50
|
-
message = `Request ${props.name} to turn on their microphone?`;
|
|
51
|
-
} else {
|
|
52
|
-
message = `Request ${props.name} to turn on their camera?`;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
} else {
|
|
56
|
-
message = `Mute everyone's ${props.type} on the call?`;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<View>
|
|
61
|
-
<Modal
|
|
62
|
-
testID="action-menu"
|
|
63
|
-
animationType="none"
|
|
64
|
-
transparent={true}
|
|
65
|
-
visible={actionMenuVisible}>
|
|
66
|
-
<TouchableWithoutFeedback
|
|
67
|
-
onPress={() => {
|
|
68
|
-
setActionMenuVisible(false);
|
|
69
|
-
}}>
|
|
70
|
-
<View
|
|
71
|
-
style={[
|
|
72
|
-
styles.backDrop,
|
|
73
|
-
isMobileOrTablet()
|
|
74
|
-
? {
|
|
75
|
-
backgroundColor:
|
|
76
|
-
$config.HARD_CODED_BLACK_COLOR +
|
|
77
|
-
hexadecimalTransparency['50%'],
|
|
78
|
-
}
|
|
79
|
-
: {},
|
|
80
|
-
]}
|
|
81
|
-
/>
|
|
82
|
-
</TouchableWithoutFeedback>
|
|
83
|
-
<View
|
|
84
|
-
style={
|
|
85
|
-
isMobileOrTablet()
|
|
86
|
-
? [styles.modalViewUA, {marginTop: height / 3}]
|
|
87
|
-
: [styles.modalView, modalPosition]
|
|
88
|
-
}>
|
|
89
|
-
<View style={styles.container}>
|
|
90
|
-
<Text style={styles.messageStyle}>{message}</Text>
|
|
91
|
-
<View style={styles.btnContainer}>
|
|
92
|
-
<PlatformWrapper>
|
|
93
|
-
{(isHovered: boolean) => {
|
|
94
|
-
return (
|
|
95
|
-
<TouchableOpacity
|
|
96
|
-
style={isHovered ? styles.onHoverBtnStyle : {}}
|
|
97
|
-
onPress={() => props.setActionMenuVisible(false)}>
|
|
98
|
-
<Text style={styles.btnText}>Cancel</Text>
|
|
99
|
-
</TouchableOpacity>
|
|
100
|
-
);
|
|
101
|
-
}}
|
|
102
|
-
</PlatformWrapper>
|
|
103
|
-
<Spacer size={8} horizontal={true} />
|
|
104
|
-
<PlatformWrapper>
|
|
105
|
-
{(isHovered: boolean) => {
|
|
106
|
-
return (
|
|
107
|
-
<TouchableOpacity
|
|
108
|
-
style={isHovered ? styles.onHoverBtnStyle : {}}
|
|
109
|
-
onPress={() => props.onMutePress()}>
|
|
110
|
-
<Text style={styles.btnText}>
|
|
111
|
-
{action === 'mute' ? 'Mute' : 'Request'}
|
|
112
|
-
</Text>
|
|
113
|
-
</TouchableOpacity>
|
|
114
|
-
);
|
|
115
|
-
}}
|
|
116
|
-
</PlatformWrapper>
|
|
117
|
-
</View>
|
|
118
|
-
</View>
|
|
119
|
-
</View>
|
|
120
|
-
</Modal>
|
|
121
|
-
</View>
|
|
122
|
-
);
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export default RemoteMutePopup;
|
|
126
|
-
|
|
127
|
-
const styles = StyleSheet.create({
|
|
128
|
-
onHoverBtnStyle: {
|
|
129
|
-
backgroundColor: $config.CARD_LAYER_3_COLOR,
|
|
130
|
-
borderRadius: 8,
|
|
131
|
-
},
|
|
132
|
-
container: {
|
|
133
|
-
paddingHorizontal: 12,
|
|
134
|
-
paddingTop: 24,
|
|
135
|
-
paddingBottom: 14,
|
|
136
|
-
},
|
|
137
|
-
messageStyle: {
|
|
138
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
139
|
-
fontWeight: '400',
|
|
140
|
-
fontSize: ThemeConfig.FontSize.normal,
|
|
141
|
-
color: $config.FONT_COLOR,
|
|
142
|
-
paddingBottom: 18,
|
|
143
|
-
},
|
|
144
|
-
btnText: {
|
|
145
|
-
paddingHorizontal: 12,
|
|
146
|
-
paddingVertical: 10,
|
|
147
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
148
|
-
fontWeight: '400',
|
|
149
|
-
fontSize: ThemeConfig.FontSize.normal,
|
|
150
|
-
color: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
151
|
-
},
|
|
152
|
-
btnContainer: {
|
|
153
|
-
flexDirection: 'row',
|
|
154
|
-
justifyContent: 'flex-end',
|
|
155
|
-
},
|
|
156
|
-
modalView: {
|
|
157
|
-
position: 'absolute',
|
|
158
|
-
width: 290,
|
|
159
|
-
backgroundColor: $config.CARD_LAYER_4_COLOR,
|
|
160
|
-
borderRadius: 4,
|
|
161
|
-
shadowColor: $config.HARD_CODED_BLACK_COLOR,
|
|
162
|
-
shadowOffset: {
|
|
163
|
-
width: 0,
|
|
164
|
-
height: 4,
|
|
165
|
-
},
|
|
166
|
-
shadowOpacity: 0.1,
|
|
167
|
-
shadowRadius: 8,
|
|
168
|
-
zIndex: 1,
|
|
169
|
-
elevation: 1,
|
|
170
|
-
},
|
|
171
|
-
modalViewUA: {
|
|
172
|
-
alignSelf: 'center',
|
|
173
|
-
maxWidth: '80%',
|
|
174
|
-
backgroundColor: $config.CARD_LAYER_4_COLOR,
|
|
175
|
-
borderRadius: 4,
|
|
176
|
-
shadowColor: $config.HARD_CODED_BLACK_COLOR,
|
|
177
|
-
shadowOffset: {
|
|
178
|
-
width: 0,
|
|
179
|
-
height: 4,
|
|
180
|
-
},
|
|
181
|
-
shadowOpacity: 0.1,
|
|
182
|
-
shadowRadius: 8,
|
|
183
|
-
zIndex: 1,
|
|
184
|
-
elevation: 1,
|
|
185
|
-
},
|
|
186
|
-
backDrop: {
|
|
187
|
-
position: 'absolute',
|
|
188
|
-
top: 0,
|
|
189
|
-
bottom: 0,
|
|
190
|
-
left: 0,
|
|
191
|
-
right: 0,
|
|
192
|
-
},
|
|
193
|
-
});
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import React, {SetStateAction, useContext} from 'react';
|
|
2
|
-
import {StyleSheet, Text, View} from 'react-native';
|
|
3
|
-
import Spacer from '../atoms/Spacer';
|
|
4
|
-
import Popup from '../atoms/Popup';
|
|
5
|
-
import TertiaryButton from '../atoms/TertiaryButton';
|
|
6
|
-
import PrimaryButton from '../atoms/PrimaryButton';
|
|
7
|
-
import ThemeConfig from '../theme';
|
|
8
|
-
import {useIsDesktop} from '../utils/common';
|
|
9
|
-
|
|
10
|
-
interface RemoveMeetingPopupProps {
|
|
11
|
-
modalVisible: boolean;
|
|
12
|
-
setModalVisible: React.Dispatch<SetStateAction<boolean>>;
|
|
13
|
-
removeUserFromMeeting: () => void;
|
|
14
|
-
username: string;
|
|
15
|
-
}
|
|
16
|
-
const RemoveMeetingPopup = (props: RemoveMeetingPopupProps) => {
|
|
17
|
-
const isDesktop = useIsDesktop()('popup');
|
|
18
|
-
const removeMeetingLabelHeading = 'Remove ' + props.username + '?';
|
|
19
|
-
const removeMeetingLabelSubHeading = `Once removed, ${props.username} will still be able to rejoin the meeting later.`;
|
|
20
|
-
|
|
21
|
-
const cancelBtnLabel = 'CANCEL';
|
|
22
|
-
const removeBtnLabel = 'REMOVE';
|
|
23
|
-
return (
|
|
24
|
-
<Popup
|
|
25
|
-
modalVisible={props.modalVisible}
|
|
26
|
-
setModalVisible={props.setModalVisible}
|
|
27
|
-
showCloseIcon={false}
|
|
28
|
-
contentContainerStyle={styles.contentContainer}>
|
|
29
|
-
<Text style={styles.heading}>{removeMeetingLabelHeading}</Text>
|
|
30
|
-
<Spacer size={8} />
|
|
31
|
-
<Text style={styles.subHeading}>{removeMeetingLabelSubHeading}</Text>
|
|
32
|
-
<Spacer size={32} />
|
|
33
|
-
<View style={isDesktop ? styles.btnContainer : styles.btnContainerMobile}>
|
|
34
|
-
<View style={isDesktop && {flex: 1}}>
|
|
35
|
-
<TertiaryButton
|
|
36
|
-
containerStyle={{
|
|
37
|
-
width: '100%',
|
|
38
|
-
height: 48,
|
|
39
|
-
paddingVertical: 12,
|
|
40
|
-
paddingHorizontal: 12,
|
|
41
|
-
borderRadius: ThemeConfig.BorderRadius.medium,
|
|
42
|
-
}}
|
|
43
|
-
textStyle={styles.btnText}
|
|
44
|
-
text={cancelBtnLabel}
|
|
45
|
-
onPress={() => props.setModalVisible(false)}
|
|
46
|
-
/>
|
|
47
|
-
</View>
|
|
48
|
-
<Spacer
|
|
49
|
-
size={isDesktop ? 10 : 20}
|
|
50
|
-
horizontal={isDesktop ? true : false}
|
|
51
|
-
/>
|
|
52
|
-
<View style={isDesktop && {flex: 1}}>
|
|
53
|
-
<PrimaryButton
|
|
54
|
-
containerStyle={{
|
|
55
|
-
minWidth: 'auto',
|
|
56
|
-
width: '100%',
|
|
57
|
-
borderRadius: ThemeConfig.BorderRadius.medium,
|
|
58
|
-
height: 48,
|
|
59
|
-
backgroundColor: $config.SEMANTIC_ERROR,
|
|
60
|
-
paddingVertical: 12,
|
|
61
|
-
paddingHorizontal: 12,
|
|
62
|
-
}}
|
|
63
|
-
textStyle={styles.btnText}
|
|
64
|
-
text={removeBtnLabel}
|
|
65
|
-
onPress={() => {
|
|
66
|
-
props.removeUserFromMeeting();
|
|
67
|
-
props.setModalVisible(false);
|
|
68
|
-
}}
|
|
69
|
-
/>
|
|
70
|
-
</View>
|
|
71
|
-
</View>
|
|
72
|
-
</Popup>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default RemoveMeetingPopup;
|
|
77
|
-
|
|
78
|
-
const styles = StyleSheet.create({
|
|
79
|
-
btnContainer: {
|
|
80
|
-
flex: 1,
|
|
81
|
-
flexDirection: 'row',
|
|
82
|
-
justifyContent: 'center',
|
|
83
|
-
alignItems: 'center',
|
|
84
|
-
},
|
|
85
|
-
contentContainer: {
|
|
86
|
-
padding: 24,
|
|
87
|
-
maxWidth: 342,
|
|
88
|
-
},
|
|
89
|
-
btnText: {
|
|
90
|
-
fontWeight: '600',
|
|
91
|
-
fontSize: 16,
|
|
92
|
-
lineHeight: 24,
|
|
93
|
-
},
|
|
94
|
-
btnContainerMobile: {
|
|
95
|
-
flexDirection: 'column-reverse',
|
|
96
|
-
},
|
|
97
|
-
heading: {
|
|
98
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
99
|
-
fontWeight: '600',
|
|
100
|
-
fontSize: 22,
|
|
101
|
-
color: $config.SEMANTIC_ERROR,
|
|
102
|
-
},
|
|
103
|
-
subHeading: {
|
|
104
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
105
|
-
fontWeight: '400',
|
|
106
|
-
fontSize: 14,
|
|
107
|
-
color: $config.FONT_COLOR,
|
|
108
|
-
},
|
|
109
|
-
});
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import React, {SetStateAction, useContext} from 'react';
|
|
2
|
-
import {StyleSheet, Text, View} from 'react-native';
|
|
3
|
-
import Spacer from '../atoms/Spacer';
|
|
4
|
-
import Popup from '../atoms/Popup';
|
|
5
|
-
import TertiaryButton from '../atoms/TertiaryButton';
|
|
6
|
-
import PrimaryButton from '../atoms/PrimaryButton';
|
|
7
|
-
import ThemeConfig from '../theme';
|
|
8
|
-
import {useIsDesktop} from '../utils/common';
|
|
9
|
-
|
|
10
|
-
interface RemoveScreensharePopupProps {
|
|
11
|
-
modalVisible: boolean;
|
|
12
|
-
setModalVisible: React.Dispatch<SetStateAction<boolean>>;
|
|
13
|
-
removeScreenShareFromMeeting: () => void;
|
|
14
|
-
username: string;
|
|
15
|
-
}
|
|
16
|
-
const RemoveScreensharePopup = (props: RemoveScreensharePopupProps) => {
|
|
17
|
-
const isDesktop = useIsDesktop()('popup');
|
|
18
|
-
const removeMeetingLabelHeading = 'Remove Screenshare?';
|
|
19
|
-
const removeMeetingLabelSubHeading = `Once removed, ${props.username} will still be able to screen share later.`;
|
|
20
|
-
|
|
21
|
-
const cancelBtnLabel = 'CANCEL';
|
|
22
|
-
const removeBtnLabel = 'REMOVE';
|
|
23
|
-
return (
|
|
24
|
-
<Popup
|
|
25
|
-
modalVisible={props.modalVisible}
|
|
26
|
-
setModalVisible={props.setModalVisible}
|
|
27
|
-
showCloseIcon={false}
|
|
28
|
-
contentContainerStyle={styles.contentContainer}>
|
|
29
|
-
<Text style={styles.heading}>{removeMeetingLabelHeading}</Text>
|
|
30
|
-
<Spacer size={8} />
|
|
31
|
-
<Text style={styles.subHeading}>{removeMeetingLabelSubHeading}</Text>
|
|
32
|
-
<Spacer size={32} />
|
|
33
|
-
<View style={isDesktop ? styles.btnContainer : styles.btnContainerMobile}>
|
|
34
|
-
<View style={isDesktop && {flex: 1}}>
|
|
35
|
-
<TertiaryButton
|
|
36
|
-
containerStyle={{
|
|
37
|
-
width: '100%',
|
|
38
|
-
height: 48,
|
|
39
|
-
paddingVertical: 12,
|
|
40
|
-
paddingHorizontal: 12,
|
|
41
|
-
borderRadius: ThemeConfig.BorderRadius.medium,
|
|
42
|
-
}}
|
|
43
|
-
textStyle={styles.btnText}
|
|
44
|
-
text={cancelBtnLabel}
|
|
45
|
-
onPress={() => props.setModalVisible(false)}
|
|
46
|
-
/>
|
|
47
|
-
</View>
|
|
48
|
-
<Spacer
|
|
49
|
-
size={isDesktop ? 10 : 20}
|
|
50
|
-
horizontal={isDesktop ? true : false}
|
|
51
|
-
/>
|
|
52
|
-
<View style={isDesktop && {flex: 1}}>
|
|
53
|
-
<PrimaryButton
|
|
54
|
-
containerStyle={{
|
|
55
|
-
minWidth: 'auto',
|
|
56
|
-
width: '100%',
|
|
57
|
-
borderRadius: ThemeConfig.BorderRadius.medium,
|
|
58
|
-
height: 48,
|
|
59
|
-
backgroundColor: $config.SEMANTIC_ERROR,
|
|
60
|
-
paddingVertical: 12,
|
|
61
|
-
paddingHorizontal: 12,
|
|
62
|
-
}}
|
|
63
|
-
textStyle={styles.btnText}
|
|
64
|
-
text={removeBtnLabel}
|
|
65
|
-
onPress={() => {
|
|
66
|
-
props.removeScreenShareFromMeeting();
|
|
67
|
-
props.setModalVisible(false);
|
|
68
|
-
}}
|
|
69
|
-
/>
|
|
70
|
-
</View>
|
|
71
|
-
</View>
|
|
72
|
-
</Popup>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export default RemoveScreensharePopup;
|
|
77
|
-
|
|
78
|
-
const styles = StyleSheet.create({
|
|
79
|
-
btnContainer: {
|
|
80
|
-
flex: 1,
|
|
81
|
-
flexDirection: 'row',
|
|
82
|
-
justifyContent: 'center',
|
|
83
|
-
alignItems: 'center',
|
|
84
|
-
},
|
|
85
|
-
contentContainer: {
|
|
86
|
-
padding: 24,
|
|
87
|
-
maxWidth: 342,
|
|
88
|
-
},
|
|
89
|
-
btnText: {
|
|
90
|
-
fontWeight: '600',
|
|
91
|
-
fontSize: 16,
|
|
92
|
-
lineHeight: 24,
|
|
93
|
-
},
|
|
94
|
-
btnContainerMobile: {
|
|
95
|
-
flexDirection: 'column-reverse',
|
|
96
|
-
},
|
|
97
|
-
heading: {
|
|
98
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
99
|
-
fontWeight: '600',
|
|
100
|
-
fontSize: 22,
|
|
101
|
-
color: $config.SEMANTIC_ERROR,
|
|
102
|
-
},
|
|
103
|
-
subHeading: {
|
|
104
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
105
|
-
fontWeight: '400',
|
|
106
|
-
fontSize: 14,
|
|
107
|
-
color: $config.FONT_COLOR,
|
|
108
|
-
},
|
|
109
|
-
});
|