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
|
@@ -32,7 +32,6 @@ export interface ActionMenuItem {
|
|
|
32
32
|
onHoverCallback?: (isHovered: boolean) => void;
|
|
33
33
|
onHoverContent?: JSX.Element;
|
|
34
34
|
disabled?: boolean;
|
|
35
|
-
iconSize?: number;
|
|
36
35
|
}
|
|
37
36
|
export interface ActionMenuProps {
|
|
38
37
|
from: string;
|
|
@@ -76,7 +75,6 @@ const ActionMenu = (props: ActionMenuProps) => {
|
|
|
76
75
|
disabled = false,
|
|
77
76
|
onHoverCallback = undefined,
|
|
78
77
|
onHoverContent = undefined,
|
|
79
|
-
iconSize = 20,
|
|
80
78
|
},
|
|
81
79
|
index,
|
|
82
80
|
) => (
|
|
@@ -112,7 +110,7 @@ const ActionMenu = (props: ActionMenuProps) => {
|
|
|
112
110
|
base64={isBase64Icon}
|
|
113
111
|
base64TintColor={iconColor}
|
|
114
112
|
iconType="plain"
|
|
115
|
-
iconSize={
|
|
113
|
+
iconSize={20}
|
|
116
114
|
icon={externalIconString}
|
|
117
115
|
tintColor={iconColor}
|
|
118
116
|
/>
|
|
@@ -121,7 +119,7 @@ const ActionMenu = (props: ActionMenuProps) => {
|
|
|
121
119
|
base64={isBase64Icon}
|
|
122
120
|
base64TintColor={iconColor}
|
|
123
121
|
iconType="plain"
|
|
124
|
-
iconSize={
|
|
122
|
+
iconSize={20}
|
|
125
123
|
name={
|
|
126
124
|
isHovered && onHoverIcon && !disabled
|
|
127
125
|
? onHoverIcon
|
|
@@ -224,7 +222,6 @@ const styles = StyleSheet.create({
|
|
|
224
222
|
shadowRadius: 8,
|
|
225
223
|
zIndex: 1,
|
|
226
224
|
elevation: 1,
|
|
227
|
-
minWidth: 180,
|
|
228
225
|
},
|
|
229
226
|
rowHoveredMiddleItems: {
|
|
230
227
|
backgroundColor:
|
|
@@ -6,8 +6,7 @@ Steps to add/remove icons:
|
|
|
6
6
|
4. Generate a new Font File
|
|
7
7
|
5. Download Zip folder , replace iconmoon.ttf file in ./src/assets/font/iconmoon.ttf with downloded
|
|
8
8
|
6. Replace selection.json and font-styles.css content
|
|
9
|
-
7.
|
|
10
|
-
8. Run npx react-native-asset to add icons to android / ios
|
|
9
|
+
7. Run npx react-native link react-native-vector-icons to copy in the android/app/src/main/assets/fonts directory and in Info.plist (for Android and iOS respectively).
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
import {createIconSetFromIcoMoon} from 'react-native-vector-icons';
|
|
@@ -131,20 +130,5 @@ export interface IconsInterface {
|
|
|
131
130
|
'fit-to-screen': string;
|
|
132
131
|
warning: string;
|
|
133
132
|
'view-only': string;
|
|
134
|
-
chat_send: string;
|
|
135
|
-
chat_send_fill: string;
|
|
136
|
-
chat_emoji: string;
|
|
137
|
-
chat_emoji_fill: string;
|
|
138
|
-
chat_attachment_pdf: string;
|
|
139
|
-
chat_attachment_doc: string;
|
|
140
|
-
chat_attachment_image: string;
|
|
141
|
-
chat_attachment_unknown: string;
|
|
142
|
-
chat_gif: string;
|
|
143
|
-
chat_gif_fill: string;
|
|
144
|
-
chat_attachment: string;
|
|
145
|
-
reply: string;
|
|
146
|
-
delete: string;
|
|
147
|
-
reply_all: string;
|
|
148
|
-
block_user: string;
|
|
149
133
|
'play-circle': string;
|
|
150
134
|
}
|
|
@@ -18,13 +18,11 @@ import hexadecimalTransparency from '../utils/hexadecimalTransparency';
|
|
|
18
18
|
export interface ImageIconProps {
|
|
19
19
|
tintColor?: string;
|
|
20
20
|
name?: keyof IconsInterface;
|
|
21
|
-
hoverIconName?: keyof IconsInterface;
|
|
22
21
|
icon?: string;
|
|
23
22
|
iconSize?: number;
|
|
24
23
|
iconContainerStyle?: ViewStyle;
|
|
25
24
|
iconBackgroundColor?: string;
|
|
26
25
|
base64?: boolean;
|
|
27
|
-
hoverBase64?: boolean;
|
|
28
26
|
base64TintColor?: string;
|
|
29
27
|
iconType?: 'round' | 'plain';
|
|
30
28
|
isHovered?: boolean;
|
|
@@ -37,16 +35,13 @@ const ImageIcon = (props: ImageIconProps) => {
|
|
|
37
35
|
let defaultSize = $config.ICON_TEXT ? 26 : 24;
|
|
38
36
|
const {
|
|
39
37
|
name,
|
|
40
|
-
hoverIconName = name,
|
|
41
38
|
icon = undefined,
|
|
42
39
|
iconSize = defaultSize,
|
|
43
40
|
tintColor,
|
|
44
41
|
base64 = false,
|
|
45
|
-
hoverBase64 = false,
|
|
46
42
|
base64TintColor = '',
|
|
47
43
|
iconType = 'round',
|
|
48
44
|
iconContainerStyle,
|
|
49
|
-
isHovered,
|
|
50
45
|
} = props;
|
|
51
46
|
return (
|
|
52
47
|
<View
|
|
@@ -83,18 +78,11 @@ const ImageIcon = (props: ImageIconProps) => {
|
|
|
83
78
|
) : (
|
|
84
79
|
<></>
|
|
85
80
|
)}
|
|
86
|
-
{
|
|
81
|
+
{base64 ? (
|
|
87
82
|
<UIKitImageIcon
|
|
88
83
|
tintColor={base64TintColor}
|
|
89
84
|
//@ts-ignore
|
|
90
|
-
name={
|
|
91
|
-
style={{width: iconSize, height: iconSize}}
|
|
92
|
-
/>
|
|
93
|
-
) : base64 ? (
|
|
94
|
-
<UIKitImageIcon
|
|
95
|
-
tintColor={base64TintColor}
|
|
96
|
-
//@ts-ignore
|
|
97
|
-
name={isHovered ? hoverIconName : name}
|
|
85
|
+
name={name}
|
|
98
86
|
style={{width: iconSize, height: iconSize}}
|
|
99
87
|
/>
|
|
100
88
|
) : icon ? (
|
|
@@ -104,11 +92,7 @@ const ImageIcon = (props: ImageIconProps) => {
|
|
|
104
92
|
style={{width: iconSize, height: iconSize}}
|
|
105
93
|
/>
|
|
106
94
|
) : name ? (
|
|
107
|
-
<CustomIcon
|
|
108
|
-
name={isHovered ? hoverIconName : name}
|
|
109
|
-
color={tintColor}
|
|
110
|
-
size={iconSize}
|
|
111
|
-
/>
|
|
95
|
+
<CustomIcon name={name} color={tintColor} size={iconSize} />
|
|
112
96
|
) : (
|
|
113
97
|
<></>
|
|
114
98
|
)}
|
|
@@ -22,11 +22,8 @@ interface PopupProps extends ModalProps {
|
|
|
22
22
|
showCloseIcon?: boolean;
|
|
23
23
|
children: React.ReactNode;
|
|
24
24
|
contentContainerStyle?: ViewStyle;
|
|
25
|
-
bodyContainerStyle?: ViewStyle;
|
|
26
|
-
closeBtnStyle?: ViewStyle;
|
|
27
25
|
containerStyle?: ViewStyle;
|
|
28
26
|
cancelable?: boolean;
|
|
29
|
-
headerComponent?: React.ReactNode;
|
|
30
27
|
}
|
|
31
28
|
const Popup = (props: PopupProps) => {
|
|
32
29
|
const {
|
|
@@ -37,9 +34,6 @@ const Popup = (props: PopupProps) => {
|
|
|
37
34
|
children,
|
|
38
35
|
showCloseIcon,
|
|
39
36
|
cancelable = true,
|
|
40
|
-
bodyContainerStyle = {},
|
|
41
|
-
closeBtnStyle = {},
|
|
42
|
-
headerComponent = null,
|
|
43
37
|
...otherProps
|
|
44
38
|
} = props;
|
|
45
39
|
|
|
@@ -68,12 +62,10 @@ const Popup = (props: PopupProps) => {
|
|
|
68
62
|
</TouchableWithoutFeedback>
|
|
69
63
|
|
|
70
64
|
<View style={[styles.modalView, props?.contentContainerStyle]}>
|
|
71
|
-
{title || showCloseIcon
|
|
65
|
+
{title || showCloseIcon ? (
|
|
72
66
|
<>
|
|
73
67
|
<View style={styles.header}>
|
|
74
|
-
|
|
75
|
-
{headerComponent}
|
|
76
|
-
|
|
68
|
+
<Text style={styles.title}>{title}</Text>
|
|
77
69
|
{showCloseIcon ? (
|
|
78
70
|
<View>
|
|
79
71
|
<IconButton
|
|
@@ -86,7 +78,6 @@ const Popup = (props: PopupProps) => {
|
|
|
86
78
|
iconType: 'plain',
|
|
87
79
|
iconContainerStyle: {
|
|
88
80
|
padding: isMobileUA() ? 0 : 5,
|
|
89
|
-
...closeBtnStyle,
|
|
90
81
|
},
|
|
91
82
|
name: 'close',
|
|
92
83
|
tintColor: $config.SECONDARY_ACTION_COLOR,
|
|
@@ -106,12 +97,12 @@ const Popup = (props: PopupProps) => {
|
|
|
106
97
|
<></>
|
|
107
98
|
)}
|
|
108
99
|
|
|
109
|
-
|
|
100
|
+
<Spacer size={32} />
|
|
110
101
|
</>
|
|
111
102
|
) : (
|
|
112
103
|
<></>
|
|
113
104
|
)}
|
|
114
|
-
|
|
105
|
+
{children}
|
|
115
106
|
</View>
|
|
116
107
|
</View>
|
|
117
108
|
</Modal>
|
|
@@ -7,21 +7,62 @@ import {isMobileUA} from '../utils/common';
|
|
|
7
7
|
import NavbarMobile from '../components/NavbarMobile';
|
|
8
8
|
import ActionSheet from '../pages/video-call/ActionSheet';
|
|
9
9
|
|
|
10
|
+
export type ToolbarDefaultItemName =
|
|
11
|
+
//bottom bar
|
|
12
|
+
|
|
13
|
+
//left
|
|
14
|
+
| 'layout'
|
|
15
|
+
| 'invite'
|
|
16
|
+
//center
|
|
17
|
+
| 'local-audio'
|
|
18
|
+
| 'local-video'
|
|
19
|
+
| 'screenshare'
|
|
20
|
+
| 'recording'
|
|
21
|
+
| 'switch-camera'
|
|
22
|
+
| 'end-call'
|
|
23
|
+
| 'raise-hand'
|
|
24
|
+
| 'more'
|
|
25
|
+
|
|
26
|
+
//topbar
|
|
27
|
+
| 'meeting-title'
|
|
28
|
+
| 'participant-count'
|
|
29
|
+
| 'recording-status'
|
|
30
|
+
| 'chat'
|
|
31
|
+
| 'participant'
|
|
32
|
+
| 'settings';
|
|
33
|
+
|
|
34
|
+
export type ToolbarDefaultItemConfig = {
|
|
35
|
+
[key in ToolbarDefaultItemName]?: ToolbarDefaultItem;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type ToolbarItemAlign = 'start' | 'center' | 'end';
|
|
39
|
+
export type ToolbarItemHide = 'yes' | 'no';
|
|
40
|
+
|
|
41
|
+
export interface ToolbarDefaultItem {
|
|
42
|
+
component?: () => JSX.Element;
|
|
43
|
+
align?: ToolbarItemAlign;
|
|
44
|
+
hide?: ToolbarItemHide;
|
|
45
|
+
order?: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
10
48
|
export interface ToolbarCustomItem {
|
|
11
49
|
component: () => JSX.Element;
|
|
12
|
-
align:
|
|
13
|
-
hide:
|
|
50
|
+
align: ToolbarItemAlign;
|
|
51
|
+
hide: ToolbarItemHide;
|
|
14
52
|
order?: number;
|
|
15
53
|
}
|
|
54
|
+
export type ToolbarPresetAlign = 'top' | 'bottom' | 'right' | 'left';
|
|
16
55
|
|
|
17
56
|
export interface ToolbarBottomPresetProps {
|
|
18
|
-
align:
|
|
57
|
+
align: ToolbarPresetAlign;
|
|
19
58
|
customItems?: Array<ToolbarCustomItem>;
|
|
59
|
+
defaultItemsConfig?: ToolbarDefaultItemConfig;
|
|
20
60
|
snapPointsMinMax: [number, number];
|
|
21
61
|
}
|
|
22
62
|
export interface ToolbarOtherPresetProps {
|
|
23
|
-
align:
|
|
63
|
+
align: ToolbarPresetAlign;
|
|
24
64
|
customItems?: Array<ToolbarCustomItem>;
|
|
65
|
+
defaultItemsConfig?: ToolbarDefaultItemConfig;
|
|
25
66
|
snapPointsMinMax?: never;
|
|
26
67
|
}
|
|
27
68
|
|
|
@@ -50,9 +91,14 @@ const ToolbarPreset = (props: ToolbarPresetProps) => {
|
|
|
50
91
|
<NavbarMobile
|
|
51
92
|
customItems={props?.customItems}
|
|
52
93
|
includeDefaultItems={true}
|
|
94
|
+
defaultItemsConfig={props?.defaultItemsConfig}
|
|
53
95
|
/>
|
|
54
96
|
) : (
|
|
55
|
-
<Navbar
|
|
97
|
+
<Navbar
|
|
98
|
+
customItems={props?.customItems}
|
|
99
|
+
includeDefaultItems={true}
|
|
100
|
+
defaultItemsConfig={props?.defaultItemsConfig}
|
|
101
|
+
/>
|
|
56
102
|
);
|
|
57
103
|
} else if (align === 'bottom') {
|
|
58
104
|
return isMobileUA() ? (
|
|
@@ -60,9 +106,14 @@ const ToolbarPreset = (props: ToolbarPresetProps) => {
|
|
|
60
106
|
customItems={props?.customItems}
|
|
61
107
|
includeDefaultItems={true}
|
|
62
108
|
snapPointsMinMax={props?.snapPointsMinMax}
|
|
109
|
+
defaultItemsConfig={props?.defaultItemsConfig}
|
|
63
110
|
/>
|
|
64
111
|
) : (
|
|
65
|
-
<Controls
|
|
112
|
+
<Controls
|
|
113
|
+
customItems={props?.customItems}
|
|
114
|
+
includeDefaultItems={true}
|
|
115
|
+
defaultItemsConfig={props?.defaultItemsConfig}
|
|
116
|
+
/>
|
|
66
117
|
);
|
|
67
118
|
} else {
|
|
68
119
|
return null;
|
|
@@ -493,11 +493,6 @@ const AuthProvider = (props: AuthProviderProps) => {
|
|
|
493
493
|
);
|
|
494
494
|
throw new Error('Token not received');
|
|
495
495
|
} else {
|
|
496
|
-
isWeb() &&
|
|
497
|
-
sessionStorage.setItem(
|
|
498
|
-
'user_id',
|
|
499
|
-
JSON.parse(atob(response.token?.split('.')[1]))?.user_id,
|
|
500
|
-
);
|
|
501
496
|
enableTokenAuth(response.token)
|
|
502
497
|
.then(() => {
|
|
503
498
|
//set auth enabled on useEffect
|
|
@@ -24,12 +24,6 @@ export const getPlatformId = (): string => {
|
|
|
24
24
|
return platformID;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export const getUserId = (): string => {
|
|
28
|
-
if (!isWeb()) return null;
|
|
29
|
-
const userId = sessionStorage.getItem('user_id');
|
|
30
|
-
return userId;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
27
|
export const getRequestHeaders = () => {
|
|
34
28
|
return {
|
|
35
29
|
'X-Project-ID': $config.PROJECT_ID,
|
|
@@ -52,10 +46,7 @@ export const getOriginURL = () => {
|
|
|
52
46
|
return isWeb() ? `${window.location.origin}` : `${$config.FRONTEND_ENDPOINT}`;
|
|
53
47
|
};
|
|
54
48
|
|
|
55
|
-
export const GET_UNAUTH_FLOW_API_ENDPOINT = () =>
|
|
56
|
-
|
|
57
|
-
const userIdParam = userId ? `&user_id=${userId}` : '';
|
|
58
|
-
return `${$config.BACKEND_ENDPOINT}/v1/login?project_id=${
|
|
49
|
+
export const GET_UNAUTH_FLOW_API_ENDPOINT = () =>
|
|
50
|
+
`${$config.BACKEND_ENDPOINT}/v1/login?project_id=${
|
|
59
51
|
$config.PROJECT_ID
|
|
60
|
-
}&platform_id=${getPlatformId()}
|
|
61
|
-
};
|
|
52
|
+
}&platform_id=${getPlatformId()}`;
|
|
@@ -53,8 +53,7 @@ const Chat = (props?: ChatProps) => {
|
|
|
53
53
|
const {setSidePanel} = useSidePanel();
|
|
54
54
|
const {showHeader = true} = props;
|
|
55
55
|
const {isRecordingBot} = useIsRecordingBot();
|
|
56
|
-
const {chatType, setChatType, setPrivateChatUser
|
|
57
|
-
useChatUIControls();
|
|
56
|
+
const {chatType, setChatType, setPrivateChatUser} = useChatUIControls();
|
|
58
57
|
|
|
59
58
|
const {
|
|
60
59
|
unreadGroupMessageCount,
|
|
@@ -163,11 +162,6 @@ const Chat = (props?: ChatProps) => {
|
|
|
163
162
|
: {},
|
|
164
163
|
// @ts-ignore
|
|
165
164
|
transcriptHeight && !isMobileUA() && {height: transcriptHeight},
|
|
166
|
-
showEmojiPicker && {
|
|
167
|
-
backgroundColor:
|
|
168
|
-
$config.HARD_CODED_BLACK_COLOR + hexadecimalTransparency['60'],
|
|
169
|
-
},
|
|
170
|
-
,
|
|
171
165
|
]}>
|
|
172
166
|
{/**
|
|
173
167
|
* In Native device we are setting absolute view. so placed ChatBeforeView and ChatAfterView inside the main view
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
import RtmEngine from 'agora-react-native-rtm';
|
|
13
13
|
import {UidType} from '../../agora-rn-uikit';
|
|
14
14
|
import {createContext, SetStateAction} from 'react';
|
|
15
|
-
import {ChatMessageType} from './chat-messages/useChatMessages';
|
|
16
15
|
|
|
17
16
|
export interface ChatBubbleProps {
|
|
18
17
|
isLocal: boolean;
|
|
@@ -23,13 +22,7 @@ export interface ChatBubbleProps {
|
|
|
23
22
|
msgId: string;
|
|
24
23
|
isDeleted: boolean;
|
|
25
24
|
isSameUser: boolean;
|
|
26
|
-
type: ChatMessageType;
|
|
27
|
-
thumb?: string;
|
|
28
|
-
url?: string;
|
|
29
|
-
fileName?: string;
|
|
30
|
-
ext?: string;
|
|
31
25
|
previousMessageCreatedTimestamp?: string;
|
|
32
|
-
|
|
33
26
|
render?: (
|
|
34
27
|
isLocal: boolean,
|
|
35
28
|
message: string,
|
|
@@ -39,11 +32,6 @@ export interface ChatBubbleProps {
|
|
|
39
32
|
isDeleted: boolean,
|
|
40
33
|
updatedTimestamp: string,
|
|
41
34
|
isSameUser: boolean,
|
|
42
|
-
type: ChatMessageType,
|
|
43
|
-
thumb?: string,
|
|
44
|
-
url?: string,
|
|
45
|
-
fileName?: string,
|
|
46
|
-
ext?: string,
|
|
47
35
|
previousMessageCreatedTimestamp?: string,
|
|
48
36
|
) => JSX.Element;
|
|
49
37
|
}
|
|
@@ -2,7 +2,7 @@ import {StyleSheet} from 'react-native';
|
|
|
2
2
|
import ThemeConfig from '../theme';
|
|
3
3
|
|
|
4
4
|
export const SIDE_PANEL_MAX_WIDTH = '20%';
|
|
5
|
-
export const SIDE_PANEL_MIN_WIDTH =
|
|
5
|
+
export const SIDE_PANEL_MIN_WIDTH = 338;
|
|
6
6
|
export const SIDE_PANEL_GAP = 8;
|
|
7
7
|
export const CAPTION_CONTAINER_HEIGHT = 144;
|
|
8
8
|
export const MOBILE_CAPTION_CONTAINER_HEIGHT = 115;
|
|
@@ -11,7 +11,7 @@ const CommonStyles = StyleSheet.create({
|
|
|
11
11
|
sidePanelContainerWeb: {
|
|
12
12
|
flex: 1,
|
|
13
13
|
maxWidth: SIDE_PANEL_MAX_WIDTH,
|
|
14
|
-
minWidth:
|
|
14
|
+
minWidth: 338,
|
|
15
15
|
borderRadius: ThemeConfig.BorderRadius.small,
|
|
16
16
|
marginLeft: SIDE_PANEL_GAP,
|
|
17
17
|
backgroundColor: $config.CARD_LAYER_1_COLOR,
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
isWeb,
|
|
38
38
|
isWebInternal,
|
|
39
39
|
useIsDesktop,
|
|
40
|
+
updateToolbarDefaultConfig,
|
|
40
41
|
} from '../utils/common';
|
|
41
42
|
import {RoomInfoContextInterface, useRoomInfo} from './room-info/useRoomInfo';
|
|
42
43
|
import LocalEndcall from '../subComponents/LocalEndCall';
|
|
@@ -68,7 +69,11 @@ import ImageIcon from '../atoms/ImageIcon';
|
|
|
68
69
|
import useGetName from '../utils/useGetName';
|
|
69
70
|
import Toolbar from '../atoms/Toolbar';
|
|
70
71
|
import ToolbarItem from '../atoms/ToolbarItem';
|
|
71
|
-
import {
|
|
72
|
+
import {
|
|
73
|
+
ToolbarCustomItem,
|
|
74
|
+
ToolbarDefaultItem,
|
|
75
|
+
ToolbarDefaultItemConfig,
|
|
76
|
+
} from '../atoms/ToolbarPreset';
|
|
72
77
|
|
|
73
78
|
import {BoardColor, whiteboardContext} from './whiteboard/WhiteboardConfigure';
|
|
74
79
|
import {RoomPhase} from 'white-web-sdk';
|
|
@@ -780,20 +785,6 @@ export const InviteToolbarItem = () => {
|
|
|
780
785
|
</ToolbarItem>
|
|
781
786
|
);
|
|
782
787
|
};
|
|
783
|
-
const defaultStartItems: Array<ToolbarCustomItem> = [
|
|
784
|
-
{
|
|
785
|
-
align: 'start',
|
|
786
|
-
component: LayoutToolbarItem,
|
|
787
|
-
order: 0,
|
|
788
|
-
hide: 'no',
|
|
789
|
-
},
|
|
790
|
-
{
|
|
791
|
-
align: 'start',
|
|
792
|
-
component: InviteToolbarItem,
|
|
793
|
-
order: 1,
|
|
794
|
-
hide: 'no',
|
|
795
|
-
},
|
|
796
|
-
];
|
|
797
788
|
|
|
798
789
|
export const RaiseHandToolbarItem = () => {
|
|
799
790
|
const {rtcProps} = useContext(PropsContext);
|
|
@@ -919,65 +910,90 @@ export const LocalEndcallToolbarItem = (
|
|
|
919
910
|
);
|
|
920
911
|
};
|
|
921
912
|
|
|
922
|
-
const
|
|
913
|
+
const defaultItems: ToolbarDefaultItem[] = [
|
|
923
914
|
{
|
|
924
915
|
align: 'start',
|
|
925
|
-
component:
|
|
916
|
+
component: LayoutToolbarItem,
|
|
917
|
+
componentName: 'layout',
|
|
926
918
|
order: 0,
|
|
927
919
|
hide: 'no',
|
|
928
920
|
},
|
|
929
921
|
{
|
|
930
922
|
align: 'start',
|
|
931
|
-
component:
|
|
923
|
+
component: InviteToolbarItem,
|
|
924
|
+
componentName: 'invite',
|
|
932
925
|
order: 1,
|
|
933
926
|
hide: 'no',
|
|
934
927
|
},
|
|
935
928
|
{
|
|
936
929
|
align: 'start',
|
|
930
|
+
component: RaiseHandToolbarItem,
|
|
931
|
+
componentName: 'raise-hand',
|
|
932
|
+
order: 0,
|
|
933
|
+
hide: 'no',
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
align: 'center',
|
|
937
|
+
component: LocalAudioToolbarItem,
|
|
938
|
+
componentName: 'local-audio',
|
|
939
|
+
order: 1,
|
|
940
|
+
hide: 'no',
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
align: 'center',
|
|
937
944
|
component: LocalVideoToolbarItem,
|
|
945
|
+
componentName: 'local-video',
|
|
938
946
|
order: 2,
|
|
939
947
|
hide: 'no',
|
|
940
948
|
},
|
|
941
949
|
{
|
|
942
|
-
align: '
|
|
950
|
+
align: 'center',
|
|
943
951
|
component: SwitchCameraToolbarItem,
|
|
952
|
+
componentName: 'switch-camera',
|
|
944
953
|
order: 3,
|
|
945
954
|
hide: 'no',
|
|
946
955
|
},
|
|
947
956
|
{
|
|
948
|
-
align: '
|
|
957
|
+
align: 'center',
|
|
949
958
|
component: ScreenShareToolbarItem,
|
|
959
|
+
componentName: 'screenshare',
|
|
950
960
|
order: 4,
|
|
951
961
|
hide: 'no',
|
|
952
962
|
},
|
|
953
963
|
{
|
|
954
|
-
align: '
|
|
964
|
+
align: 'center',
|
|
955
965
|
component: RecordingToolbarItem,
|
|
966
|
+
componentName: 'recording',
|
|
956
967
|
order: 5,
|
|
957
968
|
hide: 'no',
|
|
958
969
|
},
|
|
959
970
|
{
|
|
960
|
-
align: '
|
|
971
|
+
align: 'center',
|
|
961
972
|
component: MoreButtonToolbarItem,
|
|
973
|
+
componentName: 'more',
|
|
962
974
|
order: 6,
|
|
963
975
|
hide: 'no',
|
|
964
976
|
},
|
|
965
977
|
{
|
|
966
|
-
align: '
|
|
978
|
+
align: 'center',
|
|
979
|
+
componentName: 'end-call',
|
|
967
980
|
component: LocalEndcallToolbarItem,
|
|
968
981
|
order: 7,
|
|
969
982
|
hide: 'no',
|
|
970
983
|
},
|
|
971
984
|
];
|
|
972
985
|
|
|
973
|
-
const defaultEndItems: ToolbarCustomItem[] = [];
|
|
974
|
-
|
|
975
986
|
export interface ControlsProps {
|
|
976
987
|
customItems?: ToolbarCustomItem[];
|
|
977
988
|
includeDefaultItems?: boolean;
|
|
989
|
+
defaultItemsConfig?: ToolbarDefaultItemConfig;
|
|
978
990
|
}
|
|
979
991
|
const Controls = (props: ControlsProps) => {
|
|
980
|
-
const {
|
|
992
|
+
const {
|
|
993
|
+
customItems = [],
|
|
994
|
+
includeDefaultItems = true,
|
|
995
|
+
defaultItemsConfig = {},
|
|
996
|
+
} = props;
|
|
981
997
|
const {width} = useWindowDimensions();
|
|
982
998
|
const {defaultContent} = useContent();
|
|
983
999
|
const {setLanguage, setMeetingTranscript, setIsSTTActive} = useCaption();
|
|
@@ -1083,18 +1099,30 @@ const Controls = (props: ControlsProps) => {
|
|
|
1083
1099
|
return i?.hide === 'yes';
|
|
1084
1100
|
};
|
|
1085
1101
|
const customStartItems = customItems
|
|
1102
|
+
?.concat(
|
|
1103
|
+
includeDefaultItems
|
|
1104
|
+
? updateToolbarDefaultConfig(defaultItems, defaultItemsConfig)
|
|
1105
|
+
: [],
|
|
1106
|
+
)
|
|
1086
1107
|
?.filter(i => i?.align === 'start' && !isHidden(i))
|
|
1087
|
-
?.concat(includeDefaultItems ? defaultStartItems : [])
|
|
1088
1108
|
?.sort(CustomToolbarSort);
|
|
1089
1109
|
|
|
1090
1110
|
const customCenterItems = customItems
|
|
1111
|
+
?.concat(
|
|
1112
|
+
includeDefaultItems
|
|
1113
|
+
? updateToolbarDefaultConfig(defaultItems, defaultItemsConfig)
|
|
1114
|
+
: [],
|
|
1115
|
+
)
|
|
1091
1116
|
?.filter(i => i?.align === 'center' && !isHidden(i))
|
|
1092
|
-
?.concat(includeDefaultItems ? defaultCenterItems : [])
|
|
1093
1117
|
?.sort(CustomToolbarSort);
|
|
1094
1118
|
|
|
1095
1119
|
const customEndItems = customItems
|
|
1120
|
+
?.concat(
|
|
1121
|
+
includeDefaultItems
|
|
1122
|
+
? updateToolbarDefaultConfig(defaultItems, defaultItemsConfig)
|
|
1123
|
+
: [],
|
|
1124
|
+
)
|
|
1096
1125
|
?.filter(i => i?.align === 'end' && !isHidden(i))
|
|
1097
|
-
?.concat(includeDefaultItems ? defaultEndItems : [])
|
|
1098
1126
|
?.sort(CustomToolbarSort);
|
|
1099
1127
|
|
|
1100
1128
|
const renderContent = (
|
|
@@ -25,21 +25,21 @@ export interface LeftbarProps {
|
|
|
25
25
|
}
|
|
26
26
|
const Leftbar = (props: LeftbarProps) => {
|
|
27
27
|
const {customItems = [], includeDefaultItems = true} = props;
|
|
28
|
-
const isHidden =
|
|
28
|
+
const isHidden = i => {
|
|
29
29
|
return i?.hide === 'yes';
|
|
30
30
|
};
|
|
31
31
|
const customStartItems = customItems
|
|
32
|
-
?.filter(
|
|
32
|
+
?.filter(i => i?.align === 'start' && !isHidden(i))
|
|
33
33
|
?.concat(includeDefaultItems ? defaultStartItems : [])
|
|
34
34
|
?.sort(CustomToolbarSort);
|
|
35
35
|
|
|
36
36
|
const customCenterItems = customItems
|
|
37
|
-
?.filter(
|
|
37
|
+
?.filter(i => i?.align === 'center' && !isHidden(i))
|
|
38
38
|
?.concat(includeDefaultItems ? defaultCenterItems : [])
|
|
39
39
|
?.sort(CustomToolbarSort);
|
|
40
40
|
|
|
41
41
|
const customEndItems = customItems
|
|
42
|
-
?.filter(
|
|
42
|
+
?.filter(i => i?.align === 'end' && !isHidden(i))
|
|
43
43
|
?.concat(includeDefaultItems ? defaultEndItems : [])
|
|
44
44
|
?.sort(CustomToolbarSort);
|
|
45
45
|
|