agora-appbuilder-core 4.0.13 → 4.0.15
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 +1364 -1576
- package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
- package/template/customization-api/sub-components.ts +6 -4
- package/template/customization-api/types.ts +0 -6
- package/template/defaultConfig.js +0 -3
- package/template/global.d.ts +0 -3
- package/template/ios/Podfile.lock +0 -10
- package/template/package-lock.json +1364 -1576
- package/template/package.json +0 -4
- package/template/src/SDKAppWrapper.tsx +8 -2
- package/template/src/app-state/useMessages.ts +9 -49
- package/template/src/assets/font-styles.css +125 -289
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/selection.json +1 -1
- package/template/src/atoms/ActionMenu.tsx +2 -5
- package/template/src/atoms/CustomIcon.tsx +1 -17
- package/template/src/atoms/ImageIcon.tsx +3 -19
- package/template/src/atoms/Popup.tsx +4 -13
- package/template/src/atoms/ToolbarPreset.tsx +57 -6
- package/template/src/auth/AuthProvider.tsx +0 -5
- package/template/src/auth/config.ts +3 -12
- package/template/src/components/Chat.tsx +1 -7
- package/template/src/components/ChatContext.ts +0 -12
- package/template/src/components/CommonStyles.ts +2 -2
- package/template/src/components/Controls.tsx +57 -29
- package/template/src/components/Leftbar.tsx +4 -4
- package/template/src/components/Navbar.tsx +54 -29
- package/template/src/components/NavbarMobile.tsx +23 -33
- package/template/src/components/PinnedVideo.tsx +1 -1
- package/template/src/components/RTMConfigure.tsx +0 -1
- package/template/src/components/SdkApiContext.tsx +4 -1
- package/template/src/components/chat-messages/useChatMessages.tsx +607 -411
- package/template/src/components/chat-ui/useChatUIControls.tsx +0 -53
- package/template/src/components/meeting-info-invite/MeetingInfoGridTile.tsx +1 -4
- package/template/src/components/participants/Participant.tsx +1 -0
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +1 -6
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +1 -6
- package/template/src/components/room-info/useRoomInfo.tsx +5 -5
- package/template/src/language/default-labels/videoCallScreenLabels.ts +6 -86
- package/template/src/pages/VideoCall.tsx +4 -3
- package/template/src/pages/video-call/ActionSheetContent.tsx +32 -3
- package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +12 -22
- package/template/src/pages/video-call/VideoComponent.tsx +11 -5
- package/template/src/pages/video-call/index.ts +0 -8
- package/template/src/subComponents/ChatBubble.tsx +32 -252
- package/template/src/subComponents/ChatContainer.tsx +4 -14
- package/template/src/subComponents/ChatInput.ios.tsx +184 -0
- package/template/src/subComponents/ChatInput.tsx +100 -276
- package/template/src/subComponents/RemoteMutePopup.tsx +131 -12
- package/template/src/subComponents/caption/CaptionContainer.tsx +2 -6
- package/template/src/subComponents/recording/useRecording.tsx +1 -3
- package/template/src/utils/SdkMethodEvents.ts +1 -0
- package/template/src/utils/common.tsx +17 -0
- package/template/src/utils/index.tsx +0 -30
- package/template/src/utils/useEndCall.ts +0 -7
- package/template/src/utils/useJoinRoom.ts +7 -33
- package/template/android/link-assets-manifest.json +0 -13
- package/template/ios/link-assets-manifest.json +0 -13
- package/template/src/atoms/InlinePopup.tsx +0 -185
- package/template/src/components/chat/chatConfigure.native.tsx +0 -488
- package/template/src/components/chat/chatConfigure.tsx +0 -473
- package/template/src/subComponents/ChatInput.native.tsx +0 -269
- package/template/src/subComponents/chat/ChatActionMenu.tsx +0 -224
- package/template/src/subComponents/chat/ChatAttachment.native.tsx +0 -234
- package/template/src/subComponents/chat/ChatAttachment.tsx +0 -145
- package/template/src/subComponents/chat/ChatEmoji.native.tsx +0 -75
- package/template/src/subComponents/chat/ChatEmoji.tsx +0 -181
- package/template/src/subComponents/chat/ChatSendButton.tsx +0 -141
- package/template/src/subComponents/chat/ChatUploadStatus.tsx +0 -65
- package/template/src/subComponents/chat/ImagePopup.tsx +0 -400
|
@@ -9,59 +9,61 @@
|
|
|
9
9
|
information visit https://appbuilder.agora.io.
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
|
-
import React, {useEffect, useRef} from 'react';
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
StyleSheet,
|
|
16
|
-
ActivityIndicator,
|
|
17
|
-
Text,
|
|
18
|
-
TouchableOpacity,
|
|
19
|
-
} from 'react-native';
|
|
12
|
+
import React, {useContext, useEffect, useRef} from 'react';
|
|
13
|
+
import {View, TouchableOpacity, StyleSheet, Image} from 'react-native';
|
|
14
|
+
import ColorContext from '../components/ColorContext';
|
|
20
15
|
import TextInput from '../atoms/TextInput';
|
|
21
16
|
import {useString} from '../utils/useString';
|
|
22
|
-
import {
|
|
17
|
+
import {useChatMessages} from '../components/chat-messages/useChatMessages';
|
|
18
|
+
import {isValidReactComponent, isWebInternal} from '../utils/common';
|
|
19
|
+
import {useCustomization} from 'customization-implementation';
|
|
23
20
|
import {
|
|
24
21
|
ChatType,
|
|
25
|
-
UploadStatus,
|
|
26
22
|
useChatUIControls,
|
|
27
|
-
MIN_HEIGHT,
|
|
28
|
-
MAX_HEIGHT,
|
|
29
|
-
LINE_HEIGHT,
|
|
30
|
-
MAX_TEXT_MESSAGE_SIZE,
|
|
31
23
|
} from '../components/chat-ui/useChatUIControls';
|
|
32
|
-
import {useContent,
|
|
24
|
+
import {useContent, useUserName} from 'customization-api';
|
|
33
25
|
import ImageIcon from '../atoms/ImageIcon';
|
|
34
26
|
import ThemeConfig from '../theme';
|
|
35
|
-
import {ChatEmojiPicker, ChatEmojiButton} from './chat/ChatEmoji';
|
|
36
|
-
import {useChatConfigure} from '../components/chat/chatConfigure';
|
|
37
|
-
import hexadecimalTransparency from '../utils/hexadecimalTransparency';
|
|
38
|
-
import {ChatAttachmentButton} from './chat/ChatAttachment';
|
|
39
|
-
import ChatSendButton from './chat/ChatSendButton';
|
|
40
|
-
import {
|
|
41
|
-
ChatMessageType,
|
|
42
|
-
SDKChatType,
|
|
43
|
-
} from '../components/chat-messages/useChatMessages';
|
|
44
27
|
import {
|
|
45
|
-
|
|
46
|
-
groupChatMeetingInputPlaceHolderText,
|
|
28
|
+
groupChatInputPlaceHolderText,
|
|
47
29
|
privateChatInputPlaceHolderText,
|
|
48
|
-
chatSendErrorTextSizeToastHeading,
|
|
49
|
-
chatSendErrorTextSizeToastSubHeading,
|
|
50
30
|
} from '../language/default-labels/videoCallScreenLabels';
|
|
51
|
-
import ChatUploadStatus from './chat/ChatUploadStatus';
|
|
52
|
-
import {AttachmentBubble} from './ChatBubble';
|
|
53
|
-
import IconButton from '../atoms/IconButton';
|
|
54
|
-
import Toast from '../../react-native-toast-message';
|
|
55
31
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
32
|
+
export interface ChatSendButtonProps {
|
|
33
|
+
render?: (onPress: () => void) => JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const ChatSendButton = (props: ChatSendButtonProps) => {
|
|
37
|
+
const {
|
|
38
|
+
privateChatUser: selectedUserId,
|
|
39
|
+
message,
|
|
40
|
+
setMessage,
|
|
41
|
+
inputActive,
|
|
42
|
+
} = useChatUIControls();
|
|
43
|
+
const {sendChatMessage} = useChatMessages();
|
|
44
|
+
const onPress = () => {
|
|
45
|
+
if (!selectedUserId) {
|
|
46
|
+
sendChatMessage(message);
|
|
47
|
+
setMessage && setMessage('');
|
|
48
|
+
} else {
|
|
49
|
+
sendChatMessage(message, selectedUserId);
|
|
50
|
+
setMessage && setMessage('');
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return props?.render ? (
|
|
54
|
+
props.render(onPress)
|
|
55
|
+
) : (
|
|
56
|
+
<TouchableOpacity style={[style.chatInputButton]} onPress={onPress}>
|
|
57
|
+
<ImageIcon
|
|
58
|
+
iconType="plain"
|
|
59
|
+
tintColor={
|
|
60
|
+
inputActive
|
|
61
|
+
? $config.PRIMARY_ACTION_BRAND_COLOR
|
|
62
|
+
: $config.SEMANTIC_NEUTRAL
|
|
63
|
+
}
|
|
64
|
+
name={'send'}
|
|
65
|
+
/>
|
|
66
|
+
</TouchableOpacity>
|
|
65
67
|
);
|
|
66
68
|
};
|
|
67
69
|
export interface ChatTextInputProps {
|
|
@@ -74,48 +76,16 @@ export interface ChatTextInputProps {
|
|
|
74
76
|
}
|
|
75
77
|
export const ChatTextInput = (props: ChatTextInputProps) => {
|
|
76
78
|
let chatInputRef = useRef(null);
|
|
77
|
-
const {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
setMessage,
|
|
81
|
-
inputActive,
|
|
82
|
-
setInputActive,
|
|
83
|
-
chatType,
|
|
84
|
-
uploadStatus,
|
|
85
|
-
uploadedFiles,
|
|
86
|
-
setUploadedFiles,
|
|
87
|
-
inputHeight,
|
|
88
|
-
setInputHeight,
|
|
89
|
-
} = useChatUIControls();
|
|
79
|
+
const {privateChatUser, message, setMessage, inputActive, chatType} =
|
|
80
|
+
useChatUIControls();
|
|
81
|
+
const {sendChatMessage} = useChatMessages();
|
|
90
82
|
const {defaultContent} = useContent();
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
setInputHeight(MIN_HEIGHT);
|
|
96
|
-
}
|
|
97
|
-
}, [message]);
|
|
98
|
-
|
|
99
|
-
useEffect(() => {
|
|
100
|
-
setTimeout(() => {
|
|
101
|
-
if (isWebInternal()) {
|
|
102
|
-
chatInputRef?.current?.focus();
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}, []);
|
|
106
|
-
|
|
107
|
-
const {data} = useRoomInfo();
|
|
83
|
+
//commented for v1 release
|
|
84
|
+
// const chatMessageInputPlaceholder = useString(
|
|
85
|
+
// 'chatMessageInputPlaceholder',
|
|
86
|
+
// )();
|
|
108
87
|
const [name] = useUserName();
|
|
109
|
-
const
|
|
110
|
-
const errorSubHeadingSize = useString(chatSendErrorTextSizeToastSubHeading);
|
|
111
|
-
|
|
112
|
-
const isUploadStatusShown =
|
|
113
|
-
uploadStatus === UploadStatus.IN_PROGRESS ||
|
|
114
|
-
uploadStatus === UploadStatus.FAILURE;
|
|
115
|
-
|
|
116
|
-
const groupChatInputPlaceHolder = $config.EVENT_MODE
|
|
117
|
-
? useString(groupChatLiveInputPlaceHolderText)
|
|
118
|
-
: useString(groupChatMeetingInputPlaceHolderText);
|
|
88
|
+
const groupChatInputPlaceHolder = useString(groupChatInputPlaceHolderText);
|
|
119
89
|
const privateChatInputPlaceHolder = useString(
|
|
120
90
|
privateChatInputPlaceHolderText,
|
|
121
91
|
);
|
|
@@ -124,59 +94,25 @@ export const ChatTextInput = (props: ChatTextInputProps) => {
|
|
|
124
94
|
chatType === ChatType.Private
|
|
125
95
|
? privateChatInputPlaceHolder(defaultContent[privateChatUser]?.name)
|
|
126
96
|
: groupChatInputPlaceHolder(name);
|
|
127
|
-
|
|
128
|
-
const onChangeText = (text: string) => {
|
|
129
|
-
setMessage(text);
|
|
130
|
-
};
|
|
97
|
+
const onChangeText = (text: string) => setMessage(text);
|
|
131
98
|
const onSubmitEditing = () => {
|
|
132
|
-
if (
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
type: 'error',
|
|
139
|
-
text1: toastHeadingSize,
|
|
140
|
-
text2: errorSubHeadingSize(MAX_TEXT_MESSAGE_SIZE.toString()),
|
|
141
|
-
visibilityTime: 3000,
|
|
142
|
-
primaryBtn: null,
|
|
143
|
-
secondaryBtn: null,
|
|
144
|
-
});
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const option = {
|
|
149
|
-
chatType: privateChatUser
|
|
150
|
-
? SDKChatType.SINGLE_CHAT
|
|
151
|
-
: SDKChatType.GROUP_CHAT,
|
|
152
|
-
type: ChatMessageType.TXT,
|
|
153
|
-
from: data.uid.toString(),
|
|
154
|
-
to: privateChatUser ? privateChatUser.toString() : groupID,
|
|
155
|
-
msg: message,
|
|
156
|
-
};
|
|
157
|
-
sendChatSDKMessage(option);
|
|
158
|
-
setInputHeight(MIN_HEIGHT);
|
|
159
|
-
setMessage('');
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
// with multiline textinput enter prints /n
|
|
163
|
-
const handleKeyPress = ({nativeEvent}) => {
|
|
164
|
-
if (nativeEvent.key === 'Enter' && !nativeEvent.shiftKey) {
|
|
165
|
-
onSubmitEditing();
|
|
166
|
-
nativeEvent.preventDefault();
|
|
99
|
+
if (!privateChatUser) {
|
|
100
|
+
sendChatMessage(message);
|
|
101
|
+
setMessage('');
|
|
102
|
+
} else {
|
|
103
|
+
sendChatMessage(message, privateChatUser);
|
|
104
|
+
setMessage('');
|
|
167
105
|
}
|
|
168
106
|
};
|
|
107
|
+
const {setInputActive} = useChatUIControls();
|
|
169
108
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const handleUploadRetry = () => {
|
|
178
|
-
uploadAttachment(uploadedFiles[0]);
|
|
179
|
-
};
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
setTimeout(() => {
|
|
111
|
+
if (isWebInternal()) {
|
|
112
|
+
chatInputRef?.current?.focus();
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}, []);
|
|
180
116
|
|
|
181
117
|
return props?.render ? (
|
|
182
118
|
props.render(
|
|
@@ -186,104 +122,34 @@ export const ChatTextInput = (props: ChatTextInputProps) => {
|
|
|
186
122
|
chatMessageInputPlaceholder,
|
|
187
123
|
)
|
|
188
124
|
) : (
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
<View>
|
|
218
|
-
<IconButton
|
|
219
|
-
hoverEffect={true}
|
|
220
|
-
hoverEffectStyle={{
|
|
221
|
-
backgroundColor:
|
|
222
|
-
$config.CARD_LAYER_5_COLOR +
|
|
223
|
-
hexadecimalTransparency['20%'],
|
|
224
|
-
borderRadius: 20,
|
|
225
|
-
}}
|
|
226
|
-
iconProps={{
|
|
227
|
-
iconType: 'plain',
|
|
228
|
-
iconSize: 20,
|
|
229
|
-
iconContainerStyle: {
|
|
230
|
-
padding: 2,
|
|
231
|
-
},
|
|
232
|
-
name: 'close',
|
|
233
|
-
tintColor: $config.SECONDARY_ACTION_COLOR,
|
|
234
|
-
}}
|
|
235
|
-
onPress={() => {
|
|
236
|
-
setUploadedFiles(prev => []);
|
|
237
|
-
}}
|
|
238
|
-
/>
|
|
239
|
-
</View>
|
|
240
|
-
) : null
|
|
241
|
-
}
|
|
242
|
-
/>
|
|
243
|
-
))}
|
|
244
|
-
</View>
|
|
245
|
-
) : (
|
|
246
|
-
<TextInput
|
|
247
|
-
setRef={ref => (chatInputRef.current = ref)}
|
|
248
|
-
onFocus={() => setInputActive(true)}
|
|
249
|
-
onBlur={() => setInputActive(false)}
|
|
250
|
-
value={message}
|
|
251
|
-
multiline={true}
|
|
252
|
-
onChangeText={onChangeText}
|
|
253
|
-
textAlignVertical="top"
|
|
254
|
-
scrollEnabled={true}
|
|
255
|
-
style={{
|
|
256
|
-
color: $config.FONT_COLOR,
|
|
257
|
-
textAlign: 'left',
|
|
258
|
-
width: '100%',
|
|
259
|
-
alignSelf: 'center',
|
|
260
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
261
|
-
fontWeight: '400',
|
|
262
|
-
height: inputHeight,
|
|
263
|
-
padding: 12,
|
|
264
|
-
fontSize: ThemeConfig.FontSize.small,
|
|
265
|
-
lineHeight: LINE_HEIGHT,
|
|
266
|
-
borderWidth: 1,
|
|
267
|
-
borderColor:
|
|
268
|
-
$config.CARD_LAYER_5_COLOR + hexadecimalTransparency['40%'],
|
|
269
|
-
backgroundColor: $config.CARD_LAYER_2_COLOR,
|
|
270
|
-
borderRadius: 8,
|
|
271
|
-
borderTopRightRadius: isUploadStatusShown ? 0 : 8,
|
|
272
|
-
borderTopLeftRadius: isUploadStatusShown ? 0 : 8,
|
|
273
|
-
maxHeight: MAX_HEIGHT,
|
|
274
|
-
}}
|
|
275
|
-
blurOnSubmit={false}
|
|
276
|
-
onSubmitEditing={onSubmitEditing}
|
|
277
|
-
placeholder={chatMessageInputPlaceholder}
|
|
278
|
-
placeholderTextColor={
|
|
279
|
-
$config.FONT_COLOR + hexadecimalTransparency['40%']
|
|
280
|
-
}
|
|
281
|
-
autoCorrect={false}
|
|
282
|
-
onKeyPress={handleKeyPress}
|
|
283
|
-
onContentSizeChange={handleContentSizeChange}
|
|
284
|
-
/>
|
|
285
|
-
)}
|
|
286
|
-
</>
|
|
125
|
+
<TextInput
|
|
126
|
+
setRef={ref => (chatInputRef.current = ref)}
|
|
127
|
+
onFocus={() => setInputActive(true)}
|
|
128
|
+
onBlur={() => setInputActive(false)}
|
|
129
|
+
value={message}
|
|
130
|
+
onChangeText={onChangeText}
|
|
131
|
+
style={{
|
|
132
|
+
minHeight: 56,
|
|
133
|
+
borderRadius: 0,
|
|
134
|
+
borderBottomLeftRadius: 12,
|
|
135
|
+
borderWidth: 0,
|
|
136
|
+
color: $config.FONT_COLOR,
|
|
137
|
+
textAlign: 'left',
|
|
138
|
+
paddingVertical: 21,
|
|
139
|
+
paddingLeft: 20,
|
|
140
|
+
flex: 1,
|
|
141
|
+
alignSelf: 'center',
|
|
142
|
+
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
143
|
+
fontWeight: '400',
|
|
144
|
+
}}
|
|
145
|
+
blurOnSubmit={false}
|
|
146
|
+
onSubmitEditing={onSubmitEditing}
|
|
147
|
+
placeholder={chatMessageInputPlaceholder}
|
|
148
|
+
placeholderTextColor={
|
|
149
|
+
$config.FONT_COLOR + ThemeConfig.EmphasisPlus.disabled
|
|
150
|
+
}
|
|
151
|
+
autoCorrect={false}
|
|
152
|
+
/>
|
|
287
153
|
);
|
|
288
154
|
};
|
|
289
155
|
|
|
@@ -291,23 +157,11 @@ export const ChatTextInput = (props: ChatTextInputProps) => {
|
|
|
291
157
|
* Input component for the Chat interface
|
|
292
158
|
*/
|
|
293
159
|
export const ChatInput = () => {
|
|
294
|
-
const {inputActive
|
|
295
|
-
|
|
160
|
+
const {inputActive} = useChatUIControls();
|
|
296
161
|
return (
|
|
297
|
-
<View
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
showEmojiPicker
|
|
301
|
-
? {backgroundColor: 'transparent'}
|
|
302
|
-
: {backgroundColor: $config.CARD_LAYER_1_COLOR},
|
|
303
|
-
// inputActive ? style.inputActiveView : {},
|
|
304
|
-
]}>
|
|
305
|
-
{showEmojiPicker && <ChatEmojiPicker />}
|
|
306
|
-
<View style={style.inputView}>
|
|
307
|
-
<ChatUploadStatus />
|
|
308
|
-
<ChatTextInput />
|
|
309
|
-
<ChatPanel />
|
|
310
|
-
</View>
|
|
162
|
+
<View style={[style.inputView, inputActive ? style.inputActiveView : {}]}>
|
|
163
|
+
<ChatTextInput />
|
|
164
|
+
<ChatSendButton />
|
|
311
165
|
</View>
|
|
312
166
|
);
|
|
313
167
|
};
|
|
@@ -317,22 +171,12 @@ const style = StyleSheet.create({
|
|
|
317
171
|
borderTopWidth: 1,
|
|
318
172
|
borderTopColor: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
319
173
|
},
|
|
320
|
-
attachmentContainer: {
|
|
321
|
-
paddingHorizontal: 12,
|
|
322
|
-
paddingTop: 12,
|
|
323
|
-
paddingBottom: 40,
|
|
324
|
-
backgroundColor: $config.CARD_LAYER_2_COLOR,
|
|
325
|
-
borderWidth: 1,
|
|
326
|
-
borderColor: $config.CARD_LAYER_5_COLOR + hexadecimalTransparency['40%'],
|
|
327
|
-
borderRadius: 8,
|
|
328
|
-
},
|
|
329
174
|
inputView: {
|
|
330
175
|
flex: 1,
|
|
331
|
-
flexDirection: '
|
|
176
|
+
flexDirection: 'row',
|
|
177
|
+
backgroundColor: $config.CARD_LAYER_2_COLOR,
|
|
332
178
|
borderTopWidth: 1,
|
|
333
179
|
borderTopColor: 'transparent',
|
|
334
|
-
paddingHorizontal: 12,
|
|
335
|
-
paddingBottom: 8,
|
|
336
180
|
},
|
|
337
181
|
chatInputButton: {
|
|
338
182
|
flex: 0.1,
|
|
@@ -340,25 +184,5 @@ const style = StyleSheet.create({
|
|
|
340
184
|
alignSelf: 'center',
|
|
341
185
|
marginRight: 16,
|
|
342
186
|
},
|
|
343
|
-
emojiPicker: {
|
|
344
|
-
width: '100%',
|
|
345
|
-
},
|
|
346
|
-
chatPanelContainer: {
|
|
347
|
-
flex: 1,
|
|
348
|
-
flexDirection: 'row',
|
|
349
|
-
justifyContent: 'space-between',
|
|
350
|
-
paddingHorizontal: 12,
|
|
351
|
-
paddingTop: 4,
|
|
352
|
-
backgroundColor: $config.CARD_LAYER_1_COLOR,
|
|
353
|
-
},
|
|
354
|
-
chatPanel: {
|
|
355
|
-
flexDirection: 'row',
|
|
356
|
-
},
|
|
357
|
-
btnRetry: {
|
|
358
|
-
color: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
359
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
360
|
-
fontSize: 12,
|
|
361
|
-
fontWeight: '600',
|
|
362
|
-
},
|
|
363
187
|
});
|
|
364
188
|
export default ChatInput;
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
requestConfirmationPopoverPrimaryBtnText,
|
|
27
27
|
} from '../language/default-labels/videoCallScreenLabels';
|
|
28
28
|
import {cancelText} from '../language/default-labels/commonLabels';
|
|
29
|
-
import InlinePopup from '../../src/atoms/InlinePopup';
|
|
30
29
|
|
|
31
30
|
export interface RemoteMutePopupProps {
|
|
32
31
|
actionMenuVisible: boolean;
|
|
@@ -59,6 +58,7 @@ const RemoteMutePopup = (props: RemoteMutePopupProps) => {
|
|
|
59
58
|
muteConfirmationPopoverContent,
|
|
60
59
|
);
|
|
61
60
|
|
|
61
|
+
const {height} = useWindowDimensions();
|
|
62
62
|
const {
|
|
63
63
|
actionMenuVisible,
|
|
64
64
|
setActionMenuVisible,
|
|
@@ -96,20 +96,139 @@ const RemoteMutePopup = (props: RemoteMutePopupProps) => {
|
|
|
96
96
|
btnLabel = muteAllLabel;
|
|
97
97
|
//message = `Mute everyone's ${props.type} on the call?`;
|
|
98
98
|
}
|
|
99
|
-
const cancelTxt =
|
|
100
|
-
cancelLabel.charAt(0).toUpperCase() + cancelLabel.slice(1).toLowerCase();
|
|
101
99
|
|
|
102
100
|
return (
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
101
|
+
<View>
|
|
102
|
+
<Modal
|
|
103
|
+
testID="action-menu"
|
|
104
|
+
animationType="none"
|
|
105
|
+
transparent={true}
|
|
106
|
+
visible={actionMenuVisible}>
|
|
107
|
+
<TouchableWithoutFeedback
|
|
108
|
+
onPress={() => {
|
|
109
|
+
setActionMenuVisible(false);
|
|
110
|
+
}}>
|
|
111
|
+
<View
|
|
112
|
+
style={[
|
|
113
|
+
styles.backDrop,
|
|
114
|
+
isMobileOrTablet()
|
|
115
|
+
? {
|
|
116
|
+
backgroundColor:
|
|
117
|
+
$config.HARD_CODED_BLACK_COLOR +
|
|
118
|
+
hexadecimalTransparency['50%'],
|
|
119
|
+
}
|
|
120
|
+
: {},
|
|
121
|
+
]}
|
|
122
|
+
/>
|
|
123
|
+
</TouchableWithoutFeedback>
|
|
124
|
+
<View
|
|
125
|
+
style={
|
|
126
|
+
isMobileOrTablet()
|
|
127
|
+
? [styles.modalViewUA, {marginTop: height / 3}]
|
|
128
|
+
: [styles.modalView, modalPosition]
|
|
129
|
+
}>
|
|
130
|
+
<View style={styles.container}>
|
|
131
|
+
<Text style={styles.messageStyle}>{message}</Text>
|
|
132
|
+
<View style={styles.btnContainer}>
|
|
133
|
+
<PlatformWrapper>
|
|
134
|
+
{(isHovered: boolean) => {
|
|
135
|
+
return (
|
|
136
|
+
<TouchableOpacity
|
|
137
|
+
style={isHovered ? styles.onHoverBtnStyle : {}}
|
|
138
|
+
onPress={() => props.setActionMenuVisible(false)}>
|
|
139
|
+
<Text style={styles.btnText}>
|
|
140
|
+
{cancelLabel?.toLowerCase()}
|
|
141
|
+
</Text>
|
|
142
|
+
</TouchableOpacity>
|
|
143
|
+
);
|
|
144
|
+
}}
|
|
145
|
+
</PlatformWrapper>
|
|
146
|
+
<Spacer size={8} horizontal={true} />
|
|
147
|
+
<PlatformWrapper>
|
|
148
|
+
{(isHovered: boolean) => {
|
|
149
|
+
return (
|
|
150
|
+
<TouchableOpacity
|
|
151
|
+
style={isHovered ? styles.onHoverBtnStyle : {}}
|
|
152
|
+
onPress={() => props.onMutePress()}>
|
|
153
|
+
<Text style={styles.btnText}>{btnLabel}</Text>
|
|
154
|
+
</TouchableOpacity>
|
|
155
|
+
);
|
|
156
|
+
}}
|
|
157
|
+
</PlatformWrapper>
|
|
158
|
+
</View>
|
|
159
|
+
</View>
|
|
160
|
+
</View>
|
|
161
|
+
</Modal>
|
|
162
|
+
</View>
|
|
112
163
|
);
|
|
113
164
|
};
|
|
114
165
|
|
|
115
166
|
export default RemoteMutePopup;
|
|
167
|
+
|
|
168
|
+
const styles = StyleSheet.create({
|
|
169
|
+
onHoverBtnStyle: {
|
|
170
|
+
backgroundColor: $config.CARD_LAYER_3_COLOR,
|
|
171
|
+
borderRadius: 8,
|
|
172
|
+
},
|
|
173
|
+
container: {
|
|
174
|
+
paddingHorizontal: 12,
|
|
175
|
+
paddingTop: 24,
|
|
176
|
+
paddingBottom: 14,
|
|
177
|
+
},
|
|
178
|
+
messageStyle: {
|
|
179
|
+
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
180
|
+
fontWeight: '400',
|
|
181
|
+
fontSize: ThemeConfig.FontSize.normal,
|
|
182
|
+
color: $config.FONT_COLOR,
|
|
183
|
+
paddingBottom: 18,
|
|
184
|
+
},
|
|
185
|
+
btnText: {
|
|
186
|
+
paddingHorizontal: 12,
|
|
187
|
+
paddingVertical: 10,
|
|
188
|
+
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
189
|
+
fontWeight: '400',
|
|
190
|
+
fontSize: ThemeConfig.FontSize.normal,
|
|
191
|
+
color: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
192
|
+
},
|
|
193
|
+
btnContainer: {
|
|
194
|
+
flexDirection: 'row',
|
|
195
|
+
justifyContent: 'flex-end',
|
|
196
|
+
},
|
|
197
|
+
modalView: {
|
|
198
|
+
position: 'absolute',
|
|
199
|
+
width: 290,
|
|
200
|
+
backgroundColor: $config.CARD_LAYER_4_COLOR,
|
|
201
|
+
borderRadius: 4,
|
|
202
|
+
shadowColor: $config.HARD_CODED_BLACK_COLOR,
|
|
203
|
+
shadowOffset: {
|
|
204
|
+
width: 0,
|
|
205
|
+
height: 4,
|
|
206
|
+
},
|
|
207
|
+
shadowOpacity: 0.1,
|
|
208
|
+
shadowRadius: 8,
|
|
209
|
+
zIndex: 1,
|
|
210
|
+
elevation: 1,
|
|
211
|
+
},
|
|
212
|
+
modalViewUA: {
|
|
213
|
+
alignSelf: 'center',
|
|
214
|
+
maxWidth: '80%',
|
|
215
|
+
backgroundColor: $config.CARD_LAYER_4_COLOR,
|
|
216
|
+
borderRadius: 4,
|
|
217
|
+
shadowColor: $config.HARD_CODED_BLACK_COLOR,
|
|
218
|
+
shadowOffset: {
|
|
219
|
+
width: 0,
|
|
220
|
+
height: 4,
|
|
221
|
+
},
|
|
222
|
+
shadowOpacity: 0.1,
|
|
223
|
+
shadowRadius: 8,
|
|
224
|
+
zIndex: 1,
|
|
225
|
+
elevation: 1,
|
|
226
|
+
},
|
|
227
|
+
backDrop: {
|
|
228
|
+
position: 'absolute',
|
|
229
|
+
top: 0,
|
|
230
|
+
bottom: 0,
|
|
231
|
+
left: 0,
|
|
232
|
+
right: 0,
|
|
233
|
+
},
|
|
234
|
+
});
|
|
@@ -67,12 +67,8 @@ const CaptionContainer = () => {
|
|
|
67
67
|
},
|
|
68
68
|
//@ts-ignore
|
|
69
69
|
isCaptionNotFullWidth && {
|
|
70
|
-
maxWidth: `calc(100% - ${SIDE_PANEL_MAX_WIDTH} - ${
|
|
71
|
-
|
|
72
|
-
}px )`,
|
|
73
|
-
width: `calc(100% - ${SIDE_PANEL_MIN_WIDTH}px - ${
|
|
74
|
-
SIDE_PANEL_GAP + 1
|
|
75
|
-
}px )`,
|
|
70
|
+
maxWidth: `calc(100% - ${SIDE_PANEL_MAX_WIDTH} - ${SIDE_PANEL_GAP}px )`,
|
|
71
|
+
width: `calc(100% - ${SIDE_PANEL_MIN_WIDTH}px - ${SIDE_PANEL_GAP}px )`,
|
|
76
72
|
},
|
|
77
73
|
]}>
|
|
78
74
|
<View
|
|
@@ -238,7 +238,6 @@ const RecordingProvider = (props: RecordingProviderProps) => {
|
|
|
238
238
|
url: `${recordinghostURL}/${passphrase}`,
|
|
239
239
|
webpage_ready_timeout: 10,
|
|
240
240
|
encryption: $config.ENCRYPTION_ENABLED,
|
|
241
|
-
mode: 'web',
|
|
242
241
|
}),
|
|
243
242
|
})
|
|
244
243
|
.then((res: any) => {
|
|
@@ -247,7 +246,7 @@ const RecordingProvider = (props: RecordingProviderProps) => {
|
|
|
247
246
|
logger.debug(
|
|
248
247
|
LogSource.NetworkRest,
|
|
249
248
|
'recording_start',
|
|
250
|
-
'start recording
|
|
249
|
+
'start recording successfull',
|
|
251
250
|
res,
|
|
252
251
|
);
|
|
253
252
|
/**
|
|
@@ -322,7 +321,6 @@ const RecordingProvider = (props: RecordingProviderProps) => {
|
|
|
322
321
|
},
|
|
323
322
|
body: JSON.stringify({
|
|
324
323
|
passphrase: roomId.host,
|
|
325
|
-
mode: 'web',
|
|
326
324
|
}),
|
|
327
325
|
})
|
|
328
326
|
.then(res => {
|
|
@@ -11,6 +11,7 @@ export interface SdkMethodEvents {
|
|
|
11
11
|
roomid: string | Partial<RoomInfoContextInterface['data']>,
|
|
12
12
|
skipPrecall?: boolean,
|
|
13
13
|
username?: string,
|
|
14
|
+
preference?: {disableShareTile: boolean},
|
|
14
15
|
): RoomInfoContextInterface['data'];
|
|
15
16
|
microphoneDevice: (deviceId: deviceId) => void;
|
|
16
17
|
speakerDevice: (deviceId: deviceId) => void;
|
|
@@ -306,8 +306,25 @@ function hexToRgb(hex: string): [number, number, number] {
|
|
|
306
306
|
]
|
|
307
307
|
: [0, 0, 0];
|
|
308
308
|
}
|
|
309
|
+
const updateToolbarDefaultConfig = (data, defaultItemsConfig) => {
|
|
310
|
+
return data?.map(i => {
|
|
311
|
+
if (
|
|
312
|
+
i?.componentName &&
|
|
313
|
+
defaultItemsConfig &&
|
|
314
|
+
defaultItemsConfig[i?.componentName]
|
|
315
|
+
) {
|
|
316
|
+
return {
|
|
317
|
+
...i,
|
|
318
|
+
...defaultItemsConfig[i?.componentName],
|
|
319
|
+
};
|
|
320
|
+
} else {
|
|
321
|
+
return i;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
};
|
|
309
325
|
|
|
310
326
|
export {
|
|
327
|
+
updateToolbarDefaultConfig,
|
|
311
328
|
useIsDesktop,
|
|
312
329
|
useIsSmall,
|
|
313
330
|
BREAKPOINTS,
|