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.
Files changed (132) hide show
  1. package/package.json +2 -2
  2. package/template/agora-rn-uikit/src/Utils/isBotUser.ts +1 -1
  3. package/template/android/app/build.gradle +0 -7
  4. package/template/bridge/rtc/webNg/RtcEngine.ts +2 -2
  5. package/template/bridge/rtm/web/Types.ts +0 -183
  6. package/template/bridge/rtm/web/index.ts +488 -450
  7. package/template/customization-api/typeDefinition.ts +0 -1
  8. package/template/defaultConfig.js +3 -4
  9. package/template/global.d.ts +0 -1
  10. package/template/ios/Podfile +0 -41
  11. package/template/package.json +5 -5
  12. package/template/src/AppRoutes.tsx +3 -3
  13. package/template/src/ai-agent/components/ControlButtons.tsx +1 -1
  14. package/template/src/assets/font-styles.css +1 -33
  15. package/template/src/assets/fonts/icomoon.ttf +0 -0
  16. package/template/src/assets/selection.json +1 -1
  17. package/template/src/atoms/ActionMenu.tsx +93 -13
  18. package/template/src/atoms/CustomIcon.tsx +1 -8
  19. package/template/src/atoms/DropDownMulti.tsx +80 -29
  20. package/template/src/atoms/Dropdown.tsx +0 -5
  21. package/template/src/atoms/Input.tsx +2 -1
  22. package/template/src/atoms/TertiaryButton.tsx +1 -1
  23. package/template/src/atoms/UserAvatar.tsx +1 -1
  24. package/template/src/components/ChatContext.ts +3 -5
  25. package/template/src/components/Controls.tsx +167 -208
  26. package/template/src/components/DeviceConfigure.tsx +1 -1
  27. package/template/src/components/EventsConfigure.tsx +168 -118
  28. package/template/src/components/Navbar.tsx +11 -14
  29. package/template/src/components/RTMConfigure.tsx +819 -32
  30. package/template/src/components/beauty-effect/useBeautyEffects.tsx +13 -50
  31. package/template/src/components/chat/chatConfigure.tsx +1 -7
  32. package/template/src/components/chat-messages/useChatMessages.tsx +11 -43
  33. package/template/src/components/controls/useControlPermissionMatrix.tsx +4 -32
  34. package/template/src/components/participants/AllHostParticipants.tsx +2 -10
  35. package/template/src/components/participants/Participant.tsx +1 -7
  36. package/template/src/components/participants/UserActionMenuOptions.tsx +2 -12
  37. package/template/src/components/precall/joinCallBtn.native.tsx +7 -2
  38. package/template/src/components/precall/joinCallBtn.tsx +7 -2
  39. package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +16 -15
  40. package/template/src/components/precall/joinWaitingRoomBtn.tsx +31 -17
  41. package/template/src/components/precall/textInput.tsx +45 -22
  42. package/template/src/components/precall/usePreCall.tsx +7 -0
  43. package/template/src/components/recordings/RecordingsDateTable.tsx +2 -3
  44. package/template/src/components/room-info/useRoomInfo.tsx +5 -0
  45. package/template/src/components/useUserPreference.tsx +12 -39
  46. package/template/src/components/virtual-background/useVB.tsx +0 -18
  47. package/template/src/components/whiteboard/WhiteboardConfigure.tsx +0 -27
  48. package/template/src/language/default-labels/videoCallScreenLabels.ts +27 -11
  49. package/template/src/logger/AppBuilderLogger.tsx +3 -11
  50. package/template/src/pages/VideoCall.tsx +518 -171
  51. package/template/src/pages/video-call/ActionSheetContent.tsx +77 -77
  52. package/template/src/pages/video-call/SidePanelHeader.tsx +81 -53
  53. package/template/src/pages/video-call/VideoCallScreen.tsx +0 -18
  54. package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +1 -0
  55. package/template/src/rtm/RTMEngine.ts +37 -262
  56. package/template/src/rtm/utils.ts +1 -68
  57. package/template/src/rtm-events/constants.ts +7 -40
  58. package/template/src/rtm-events-api/Events.ts +39 -158
  59. package/template/src/subComponents/ChatBubble.tsx +3 -3
  60. package/template/src/subComponents/ChatContainer.tsx +9 -19
  61. package/template/src/subComponents/LocalAudioMute.tsx +2 -2
  62. package/template/src/subComponents/LocalVideoMute.tsx +2 -2
  63. package/template/src/subComponents/SidePanelEnum.tsx +0 -1
  64. package/template/src/subComponents/caption/Caption.tsx +48 -7
  65. package/template/src/subComponents/caption/CaptionContainer.tsx +324 -51
  66. package/template/src/subComponents/caption/CaptionIcon.tsx +35 -34
  67. package/template/src/subComponents/caption/CaptionText.tsx +103 -2
  68. package/template/src/subComponents/caption/LanguageSelectorPopup.tsx +179 -69
  69. package/template/src/subComponents/caption/Transcript.tsx +46 -11
  70. package/template/src/subComponents/caption/TranscriptIcon.tsx +27 -35
  71. package/template/src/subComponents/caption/TranscriptText.tsx +78 -3
  72. package/template/src/subComponents/caption/proto/ptoto.js +38 -4
  73. package/template/src/subComponents/caption/proto/test.proto +34 -19
  74. package/template/src/subComponents/caption/useCaption.tsx +754 -11
  75. package/template/src/subComponents/caption/useSTTAPI.tsx +118 -205
  76. package/template/src/subComponents/caption/useStreamMessageUtils.native.ts +152 -33
  77. package/template/src/subComponents/caption/useStreamMessageUtils.ts +165 -34
  78. package/template/src/subComponents/caption/utils.ts +171 -3
  79. package/template/src/subComponents/chat/ChatSendButton.tsx +0 -1
  80. package/template/src/subComponents/screenshare/ScreenshareButton.tsx +0 -16
  81. package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +1 -1
  82. package/template/src/subComponents/waiting-rooms/WaitingRoomControls.tsx +4 -7
  83. package/template/src/utils/SdkEvents.ts +3 -0
  84. package/template/src/utils/useEndCall.ts +4 -4
  85. package/template/src/utils/useMuteToggleLocal.ts +10 -14
  86. package/template/src/utils/useSpeechToText.ts +31 -20
  87. package/template/bridge/rtm/web/index-legacy.ts +0 -540
  88. package/template/src/components/RTMConfigure-legacy.tsx +0 -848
  89. package/template/src/components/UserGlobalPreferenceProvider.tsx +0 -227
  90. package/template/src/components/breakout-room/BreakoutRoomPanel.tsx +0 -58
  91. package/template/src/components/breakout-room/context/BreakoutRoomContext.tsx +0 -2508
  92. package/template/src/components/breakout-room/events/BreakoutRoomEventsConfigure.tsx +0 -272
  93. package/template/src/components/breakout-room/events/constants.ts +0 -17
  94. package/template/src/components/breakout-room/hoc/BreakoutRoomNameRenderer.tsx +0 -68
  95. package/template/src/components/breakout-room/hooks/useBreakoutRoomExit.ts +0 -49
  96. package/template/src/components/breakout-room/state/reducer.ts +0 -522
  97. package/template/src/components/breakout-room/state/types.ts +0 -54
  98. package/template/src/components/breakout-room/ui/BreakoutMeetingTitle.tsx +0 -60
  99. package/template/src/components/breakout-room/ui/BreakoutRoomActionMenu.tsx +0 -136
  100. package/template/src/components/breakout-room/ui/BreakoutRoomAnnouncementModal.tsx +0 -135
  101. package/template/src/components/breakout-room/ui/BreakoutRoomGroupSettings.tsx +0 -588
  102. package/template/src/components/breakout-room/ui/BreakoutRoomMainRoomUsers.tsx +0 -142
  103. package/template/src/components/breakout-room/ui/BreakoutRoomMemberActionMenu.tsx +0 -122
  104. package/template/src/components/breakout-room/ui/BreakoutRoomParticipants.tsx +0 -124
  105. package/template/src/components/breakout-room/ui/BreakoutRoomRaiseHand.tsx +0 -65
  106. package/template/src/components/breakout-room/ui/BreakoutRoomRenameModal.tsx +0 -227
  107. package/template/src/components/breakout-room/ui/BreakoutRoomSettings.tsx +0 -140
  108. package/template/src/components/breakout-room/ui/BreakoutRoomTransition.tsx +0 -52
  109. package/template/src/components/breakout-room/ui/BreakoutRoomView.tsx +0 -193
  110. package/template/src/components/breakout-room/ui/ExitBreakoutRoomIconButton.tsx +0 -79
  111. package/template/src/components/breakout-room/ui/ParticipantManualAssignmentModal.tsx +0 -638
  112. package/template/src/components/breakout-room/ui/SelectParticipantAssignmentStrategy.tsx +0 -57
  113. package/template/src/components/common/Dividers.tsx +0 -53
  114. package/template/src/components/controls/toolbar-items/ExitBreakoutRoomToolbarItem.tsx +0 -13
  115. package/template/src/components/raise-hand/RaiseHandButton.tsx +0 -50
  116. package/template/src/components/raise-hand/RaiseHandProvider.tsx +0 -308
  117. package/template/src/components/raise-hand/index.ts +0 -14
  118. package/template/src/components/room-info/useCurrentRoomInfo.tsx +0 -42
  119. package/template/src/components/room-info/useSetBreakoutRoomInfo.tsx +0 -64
  120. package/template/src/pages/video-call/BreakoutVideoCall.tsx +0 -213
  121. package/template/src/pages/video-call/VideoCallContent.tsx +0 -211
  122. package/template/src/pages/video-call/VideoCallStateWrapper.tsx +0 -495
  123. package/template/src/rtm/RTMConfigureBreakoutRoomProvider.tsx +0 -882
  124. package/template/src/rtm/RTMConfigureMainRoomProvider.tsx +0 -757
  125. package/template/src/rtm/RTMCoreProvider.tsx +0 -419
  126. package/template/src/rtm/RTMGlobalStateProvider.tsx +0 -706
  127. package/template/src/rtm/RTMStatusBanner.tsx +0 -99
  128. package/template/src/rtm/constants.ts +0 -12
  129. package/template/src/rtm/hooks/useMainRoomUserDisplayName.ts +0 -45
  130. package/template/src/rtm/rtm-presence-utils.ts +0 -344
  131. package/template/src/subComponents/chat/ChatAnnouncementView.tsx +0 -65
  132. package/template/src/utils/useDebouncedCallback.tsx +0 -20
@@ -1,638 +0,0 @@
1
- import React, {SetStateAction, Dispatch, useState} from 'react';
2
- import {View, StyleSheet, Text, ScrollView, TextInput} from 'react-native';
3
- import GenericModal from '../../common/GenericModal';
4
- import ThemeConfig from '../../../theme';
5
- import ImageIcon from '../../../atoms/ImageIcon';
6
- import Checkbox from '../../../atoms/Checkbox';
7
- import Dropdown from '../../../atoms/Dropdown';
8
- import UserAvatar from '../../../atoms/UserAvatar';
9
- import {useBreakoutRoom} from '../context/BreakoutRoomContext';
10
- import {UidType, useLocalUid} from '../../../../agora-rn-uikit';
11
- import TertiaryButton from '../../../atoms/TertiaryButton';
12
- import {
13
- ManualParticipantAssignment,
14
- RoomAssignmentStrategy,
15
- BreakoutRoomUser,
16
- } from '../state/reducer';
17
-
18
- function EmptyParticipantsState() {
19
- return (
20
- <View style={style.infotextContainer}>
21
- <View>
22
- <ImageIcon
23
- iconType="plain"
24
- name="info"
25
- tintColor={'#777777'}
26
- iconSize={32}
27
- />
28
- </View>
29
- <View>
30
- <Text style={[style.infoText]}>No participants found</Text>
31
- </View>
32
- </View>
33
- );
34
- }
35
-
36
- function ParticipantRow({
37
- participant,
38
- assignment,
39
- rooms,
40
- onAssignmentChange,
41
- onSelectionChange,
42
- localUid,
43
- }: {
44
- participant: {uid: UidType; user: BreakoutRoomUser};
45
- assignment: ManualParticipantAssignment;
46
- rooms: {label: string; value: string}[];
47
- onAssignmentChange: (uid: UidType, roomId: string | null) => void;
48
- onSelectionChange: (uid: UidType) => void;
49
- localUid: UidType;
50
- }) {
51
- const selectedValue = assignment?.roomId || 'unassigned';
52
- const displayName =
53
- participant.uid === localUid
54
- ? `${participant.user.name} (me)`
55
- : participant.user.name;
56
-
57
- return (
58
- <View style={style.participantBodyRow} key={participant.uid}>
59
- <View style={[style.participantBodytRowCell, style.checkboxCell]}>
60
- <Checkbox
61
- disabled={false}
62
- checked={assignment?.isSelected || false}
63
- onChange={() => onSelectionChange(participant.uid)}
64
- label={''}
65
- checkBoxStyle={style.checkboxIcon}
66
- />
67
- </View>
68
- <View style={style.participantBodytRowCell}>
69
- <View style={style.participantInfo}>
70
- <UserAvatar
71
- name={displayName}
72
- containerStyle={style.participantAvatar}
73
- textStyle={style.participantAvatarText}
74
- />
75
- <Text style={style.participantName} numberOfLines={1}>
76
- {displayName}
77
- </Text>
78
- </View>
79
- </View>
80
- <View style={style.participantBodytRowCell}>
81
- <View style={style.participantDropdown}>
82
- <Dropdown
83
- enabled={true}
84
- label={selectedValue}
85
- data={rooms}
86
- onSelect={({_, value}) => {
87
- onAssignmentChange(
88
- participant.uid,
89
- value === 'unassigned' ? null : value,
90
- );
91
- }}
92
- containerStyle={style.dropdownContainer}
93
- selectedValue={selectedValue}
94
- />
95
- </View>
96
- </View>
97
- </View>
98
- );
99
- }
100
-
101
- interface ParticipantManualAssignmentModalProps {
102
- setModalOpen: Dispatch<SetStateAction<boolean>>;
103
- }
104
-
105
- export default function ParticipantManualAssignmentModal(
106
- props: ParticipantManualAssignmentModalProps,
107
- ) {
108
- const {setModalOpen} = props;
109
- const localUid = useLocalUid();
110
- const {
111
- getAllRooms,
112
- unassignedParticipants,
113
- manualAssignments,
114
- setManualAssignments,
115
- handleAssignParticipants,
116
- } = useBreakoutRoom();
117
-
118
- // Local state for assignments
119
- const [searchQuery, setSearchQuery] = useState('');
120
- const [localAssignments, setLocalAssignments] = useState<
121
- ManualParticipantAssignment[]
122
- >(() => {
123
- if (manualAssignments.length > 0) {
124
- // Restore previous manual assignments
125
- return manualAssignments;
126
- }
127
-
128
- // Create new manual assignments for unassigned participants
129
- return unassignedParticipants.map(participant => ({
130
- uid: participant.uid,
131
- roomId: null, // Start unassigned
132
- isHost: participant.user.isHost,
133
- isSelected: false,
134
- }));
135
- });
136
- // Rooms dropdown options
137
- const rooms = [
138
- {label: 'Unassigned', value: 'unassigned'},
139
- ...getAllRooms().map(item => ({label: item.name, value: item.id})),
140
- ];
141
-
142
- // Update room assignment
143
- const updateManualAssignment = (uid: UidType, roomId: string | null) => {
144
- const selectedParticipants = localAssignments.filter(a => a.isSelected);
145
- const clickedParticipant = localAssignments.find(a => a.uid === uid);
146
-
147
- if (selectedParticipants.length > 1 && clickedParticipant?.isSelected) {
148
- // BULK BEHAVIOR: If multiple selected and clicked one is selected,
149
- // assign ALL selected participants to the same room
150
- setLocalAssignments(prev =>
151
- prev.map(assignment =>
152
- assignment.isSelected
153
- ? {
154
- ...assignment,
155
- roomId: roomId === 'unassigned' ? null : roomId,
156
- isSelected: false, // Deselect after assignment
157
- }
158
- : assignment,
159
- ),
160
- );
161
- } else {
162
- // INDIVIDUAL BEHAVIOR: Normal single assignment
163
- setLocalAssignments(prev =>
164
- prev.map(assignment =>
165
- assignment.uid === uid
166
- ? {
167
- ...assignment,
168
- roomId: roomId === 'unassigned' ? null : roomId,
169
- isSelected: false, // Deselect this one too
170
- }
171
- : assignment,
172
- ),
173
- );
174
- }
175
- };
176
- const handleRoomDropdownChange = (uid: UidType, roomId: string | null) => {
177
- const clickedParticipant = localAssignments.find(a => a.uid === uid);
178
- if (!clickedParticipant?.isSelected) {
179
- // User clicked dropdown of non-selected participant
180
- // Deselect everyone first, then assign
181
- setLocalAssignments(prev =>
182
- prev.map(assignment => ({
183
- ...assignment,
184
- isSelected: false, // Deselect all
185
- roomId:
186
- assignment.uid === uid
187
- ? roomId === 'unassigned'
188
- ? null
189
- : roomId
190
- : assignment.roomId,
191
- })),
192
- );
193
- } else {
194
- // Use the bulk/individual logic
195
- updateManualAssignment(uid, roomId);
196
- }
197
- };
198
- // Toggle selection for specific participant
199
- const toggleParticipantSelection = (uid: UidType) => {
200
- setLocalAssignments(prev =>
201
- prev.map(assignment =>
202
- assignment.uid === uid
203
- ? {...assignment, isSelected: !assignment.isSelected}
204
- : assignment,
205
- ),
206
- );
207
- };
208
-
209
- const allSelected =
210
- localAssignments.length > 0 && localAssignments.every(a => a.isSelected);
211
-
212
- // Select/deselect all
213
- const toggleSelectAll = () => {
214
- const areAllSelected = localAssignments.every(a => a.isSelected);
215
- setLocalAssignments(prev =>
216
- prev.map(assignment => ({
217
- ...assignment,
218
- isSelected: !areAllSelected,
219
- })),
220
- );
221
- };
222
-
223
- // More descriptive Select All label
224
- const getSelectAllLabel = () => {
225
- if (selectedCount === 0) {
226
- return 'Select All';
227
- } else if (allSelected) {
228
- return 'Deselect All';
229
- } else {
230
- return `Select All (${selectedCount}/${localAssignments.length})`;
231
- }
232
- };
233
-
234
- const handleCancel = () => {
235
- setModalOpen(false);
236
- };
237
-
238
- const handleSaveManualAssignments = () => {
239
- setManualAssignments(localAssignments);
240
- // Trigger the actual assignment after saving
241
- handleAssignParticipants(RoomAssignmentStrategy.MANUAL_ASSIGN);
242
- setModalOpen(false);
243
- };
244
-
245
- const selectedCount = localAssignments.filter(a => a.isSelected).length;
246
- const unassignedCount = localAssignments.filter(a => !a.roomId).length;
247
-
248
- // Filter participants based on search query
249
- const filteredParticipants = unassignedParticipants.filter(participant => {
250
- const displayName =
251
- participant.uid === localUid
252
- ? `${participant.user.name} (me)`
253
- : participant.user.name;
254
- return displayName.toLowerCase().includes(searchQuery.toLowerCase());
255
- });
256
-
257
- return (
258
- <GenericModal
259
- visible={true}
260
- onRequestClose={() => setModalOpen(false)}
261
- showCloseIcon={true}
262
- title="Assign Participants"
263
- cancelable={false}
264
- contentContainerStyle={style.contentContainer}>
265
- <View style={style.fullBody}>
266
- <View style={style.mbody}>
267
- {/* Search Bar */}
268
- <View style={style.searchContainer}>
269
- <TextInput
270
- style={style.searchInput}
271
- placeholder="Search participants..."
272
- placeholderTextColor={$config.FONT_COLOR + '80'}
273
- value={searchQuery}
274
- onChangeText={setSearchQuery}
275
- />
276
- <View style={style.searchIcon}>
277
- <ImageIcon
278
- iconType="plain"
279
- name="search"
280
- tintColor={$config.FONT_COLOR + '80'}
281
- iconSize={16}
282
- />
283
- </View>
284
- </View>
285
-
286
- {/* Participant Count */}
287
- <View style={style.participantSummaryContainer}>
288
- <View style={style.participantCountContainer}>
289
- <ImageIcon
290
- iconType="plain"
291
- name="people"
292
- tintColor={$config.FONT_COLOR}
293
- iconSize={16}
294
- />
295
- <View style={style.participantCountTextContainer}>
296
- <Text style={style.participantCount}>
297
- {localAssignments.length}
298
- </Text>
299
- <Text
300
- style={[
301
- style.participantCount,
302
- style.participantCountLowOpacity,
303
- ]}>
304
- ({unassignedCount} Unassigned)
305
- </Text>
306
- </View>
307
- </View>
308
- <View>
309
- {selectedCount > 0 && (
310
- <Text style={style.infoText}>
311
- {selectedCount} of {localAssignments.length} participants
312
- selected
313
- </Text>
314
- )}
315
- </View>
316
- </View>
317
-
318
- {/* Select All Controls */}
319
- <View style={style.participantTable}>
320
- <View style={style.participantTableHeader}>
321
- <View style={style.participantTableHeaderRow}>
322
- <View
323
- style={[
324
- style.participantTableHeaderRowCell,
325
- style.checkboxCell,
326
- ]}>
327
- <Checkbox
328
- disabled={localAssignments.length === 0}
329
- checked={allSelected}
330
- onChange={() => toggleSelectAll()}
331
- label={''}
332
- checkBoxStyle={style.checkboxIcon}
333
- // label={getSelectAllLabel()}
334
- />
335
- </View>
336
- <View style={style.participantTableHeaderRowCell}>
337
- <Text style={style.participantTableHeaderRowCellText}>
338
- Name
339
- </Text>
340
- </View>
341
- <View style={style.participantTableHeaderRowCell}>
342
- <Text style={style.participantTableHeaderRowCellText}>
343
- Room
344
- </Text>
345
- </View>
346
- </View>
347
- </View>
348
- {/* Participants List */}
349
- <View style={style.participantsList}>
350
- {filteredParticipants.length === 0 ? (
351
- <EmptyParticipantsState />
352
- ) : (
353
- <ScrollView style={style.participantsScrollView}>
354
- {filteredParticipants.map(participant => {
355
- const assignment = localAssignments.find(
356
- a => a.uid === participant.uid,
357
- );
358
- return (
359
- <ParticipantRow
360
- key={participant.uid}
361
- participant={participant}
362
- assignment={assignment}
363
- rooms={rooms}
364
- onAssignmentChange={handleRoomDropdownChange}
365
- onSelectionChange={toggleParticipantSelection}
366
- localUid={localUid}
367
- />
368
- );
369
- })}
370
- </ScrollView>
371
- )}
372
- </View>
373
- </View>
374
- </View>
375
- <View style={style.mfooter}>
376
- <View>
377
- <TertiaryButton
378
- containerStyle={style.cancelBtn}
379
- textStyle={style.actionBtnText}
380
- text={'Cancel'}
381
- onPress={() => {
382
- handleCancel();
383
- }}
384
- />
385
- </View>
386
- <View>
387
- <TertiaryButton
388
- containerStyle={style.saveBtn}
389
- textStyle={style.actionBtnText}
390
- text={'Save'}
391
- onPress={() => {
392
- handleSaveManualAssignments();
393
- }}
394
- />
395
- </View>
396
- </View>
397
- </View>
398
- </GenericModal>
399
- );
400
- }
401
-
402
- const style = StyleSheet.create({
403
- contentContainer: {
404
- display: 'flex',
405
- flexDirection: 'column',
406
- alignItems: 'flex-start',
407
- flexShrink: 0,
408
- width: '100%',
409
- },
410
- fullBody: {
411
- width: '100%',
412
- height: '100%',
413
- flex: 1,
414
- },
415
- mbody: {
416
- flex: 1,
417
- padding: 20,
418
- gap: 16,
419
- borderTopColor: $config.CARD_LAYER_3_COLOR,
420
- borderTopWidth: 1,
421
- borderBottomColor: $config.CARD_LAYER_3_COLOR,
422
- borderBottomWidth: 1,
423
- },
424
- mfooter: {
425
- padding: 12,
426
- gap: 12,
427
- display: 'flex',
428
- flexDirection: 'row',
429
- alignItems: 'center',
430
- justifyContent: 'flex-end',
431
- marginTop: 'auto',
432
- backgroundColor: $config.CARD_LAYER_2_COLOR,
433
- borderBottomLeftRadius: 8,
434
- borderBottomRightRadius: 8,
435
- },
436
- // Search Container
437
- searchContainer: {
438
- position: 'relative',
439
- width: '100%',
440
- },
441
- searchIcon: {
442
- position: 'absolute',
443
- left: 8,
444
- top: 12,
445
- },
446
- searchInput: {
447
- height: 36,
448
- borderWidth: 1,
449
- borderColor: $config.INPUT_FIELD_BORDER_COLOR,
450
- borderRadius: 4,
451
- paddingHorizontal: 12,
452
- paddingLeft: 30,
453
- fontSize: ThemeConfig.FontSize.small,
454
- color: $config.FONT_COLOR,
455
- backgroundColor: $config.INPUT_FIELD_BACKGROUND_COLOR,
456
- },
457
-
458
- // Participant Count
459
- participantSummaryContainer: {
460
- display: 'flex',
461
- flexDirection: 'row',
462
- alignItems: 'center',
463
- justifyContent: 'space-between',
464
- },
465
- participantCountContainer: {
466
- display: 'flex',
467
- flexDirection: 'row',
468
- gap: 4,
469
- alignItems: 'center',
470
- },
471
- participantCountTextContainer: {
472
- display: 'flex',
473
- flexDirection: 'row',
474
- alignItems: 'center',
475
- gap: 4,
476
- },
477
- participantCount: {
478
- fontSize: ThemeConfig.FontSize.small,
479
- fontWeight: '500',
480
- lineHeight: 16,
481
- color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.high,
482
- },
483
- participantCountLowOpacity: {
484
- color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.low,
485
- },
486
- dropdownContainer: {
487
- paddingHorizontal: 12,
488
- paddingVertical: 8,
489
- backgroundColor: $config.CARD_LAYER_2_COLOR,
490
- borderRadius: 4,
491
- borderLeftWidth: 0,
492
- borderTopWidth: 0,
493
- borderRightWidth: 0,
494
- borderBottomWidth: 0,
495
- },
496
- checkboxIconContainer: {
497
- paddingRight: 24,
498
- },
499
- checkboxIcon: {
500
- borderColor: $config.SECONDARY_ACTION_COLOR,
501
- borderRadius: 2,
502
- width: 17,
503
- height: 17,
504
- },
505
- participantTable: {
506
- flex: 1,
507
- },
508
- participantTableHeader: {
509
- display: 'flex',
510
- flexShrink: 0,
511
- alignItems: 'center',
512
- flexDirection: 'row',
513
- borderTopLeftRadius: 2,
514
- borderTopRightRadius: 2,
515
- backgroundColor: $config.CARD_LAYER_2_COLOR,
516
- paddingHorizontal: 8,
517
- height: 40,
518
- },
519
- participantTableHeaderRow: {
520
- flex: 1,
521
- alignSelf: 'stretch',
522
- flexDirection: 'row',
523
- },
524
- participantTableHeaderRowCell: {
525
- flex: 1,
526
- alignSelf: 'stretch',
527
- justifyContent: 'center',
528
- },
529
- participantTableHeaderRowCellText: {
530
- color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.high,
531
- fontSize: ThemeConfig.FontSize.small,
532
- fontFamily: ThemeConfig.FontFamily.sansPro,
533
- lineHeight: 16,
534
- },
535
- // Participants List
536
- participantsList: {
537
- flex: 1,
538
- padding: 8,
539
- paddingBottom: 0,
540
- backgroundColor: $config.BACKGROUND_COLOR,
541
- },
542
- participantsScrollView: {
543
- flex: 1,
544
- },
545
- // Participant Row
546
- participantRow: {
547
- // display: 'flex',
548
- // flexDirection: 'row',
549
- // alignItems: 'center',
550
- // justifyContent: 'space-between',
551
- // paddingHorizontal: 16,
552
- // paddingVertical: 12,
553
- // borderBottomWidth: 1,
554
- // borderBottomColor: $config.CARD_LAYER_3_COLOR + '40',
555
- // minHeight: 60,
556
- },
557
- participantBodyRow: {
558
- display: 'flex',
559
- alignSelf: 'stretch',
560
- // minHeight: 50,
561
- flexDirection: 'row',
562
- paddingBottom: 8,
563
- // paddingTop: 20,
564
- },
565
- participantBodytRowCell: {
566
- flex: 1,
567
- alignSelf: 'center',
568
- justifyContent: 'center',
569
- gap: 10,
570
- },
571
- checkboxCell: {
572
- maxWidth: 50,
573
- },
574
- participantInfo: {
575
- display: 'flex',
576
- flexDirection: 'row',
577
- alignItems: 'center',
578
- flex: 1,
579
- gap: 12,
580
- },
581
- participantAvatar: {
582
- width: 32,
583
- height: 32,
584
- borderRadius: 16,
585
- display: 'flex',
586
- alignItems: 'center',
587
- justifyContent: 'center',
588
- backgroundColor: $config.VIDEO_AUDIO_TILE_AVATAR_COLOR,
589
- },
590
- participantAvatarText: {
591
- fontSize: ThemeConfig.FontSize.tiny,
592
- lineHeight: 32,
593
- fontWeight: '600',
594
- color: $config.BACKGROUND_COLOR,
595
- },
596
- participantName: {
597
- flex: 1,
598
- fontSize: ThemeConfig.FontSize.small,
599
- fontWeight: '400',
600
- color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.high,
601
- },
602
- participantDropdown: {
603
- minWidth: 120,
604
- },
605
- // Empty State
606
- infotextContainer: {
607
- display: 'flex',
608
- flex: 1,
609
- alignItems: 'center',
610
- justifyContent: 'center',
611
- paddingVertical: 32,
612
- gap: 12,
613
- },
614
- infoText: {
615
- fontSize: ThemeConfig.FontSize.small,
616
- fontWeight: '500',
617
- color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.low,
618
- textAlign: 'center',
619
- },
620
- // Buttons
621
- actionBtnText: {
622
- color: $config.PRIMARY_ACTION_TEXT_COLOR,
623
- fontSize: ThemeConfig.FontSize.small,
624
- lineHeight: 16,
625
- },
626
- cancelBtn: {
627
- borderRadius: 4,
628
- minWidth: 140,
629
- borderColor: $config.SECONDARY_ACTION_COLOR,
630
- backgroundColor: 'transparent',
631
- },
632
- saveBtn: {
633
- borderRadius: 4,
634
- minWidth: 140,
635
- borderColor: $config.PRIMARY_ACTION_BRAND_COLOR,
636
- backgroundColor: $config.PRIMARY_ACTION_BRAND_COLOR,
637
- },
638
- });
@@ -1,57 +0,0 @@
1
- import React from 'react';
2
- import {Text, StyleSheet} from 'react-native';
3
- import {Dropdown} from 'customization-api';
4
- import ThemeConfig from '../../../theme';
5
- import {RoomAssignmentStrategy} from '../state/reducer';
6
-
7
- interface Props {
8
- selectedStrategy: RoomAssignmentStrategy;
9
- onStrategyChange: (strategy: RoomAssignmentStrategy) => void;
10
- disabled: boolean;
11
- }
12
-
13
- const strategyList = [
14
- {
15
- label: 'Auto-assign people to all rooms',
16
- value: RoomAssignmentStrategy.AUTO_ASSIGN,
17
- },
18
- {
19
- label: 'Manually Assign participants',
20
- value: RoomAssignmentStrategy.MANUAL_ASSIGN,
21
- },
22
- {
23
- label: 'Let people choose their rooms',
24
- value: RoomAssignmentStrategy.NO_ASSIGN,
25
- },
26
- ];
27
- const SelectParticipantAssignmentStrategy: React.FC<Props> = ({
28
- selectedStrategy,
29
- onStrategyChange,
30
- disabled = false,
31
- }) => {
32
- return (
33
- <>
34
- <Text style={style.label}>Assign participants to breakout rooms</Text>
35
- <Dropdown
36
- enabled={!disabled}
37
- selectedValue={selectedStrategy}
38
- label={strategyList[0].label}
39
- data={strategyList}
40
- onSelect={async ({label, value}) => {
41
- onStrategyChange(value as RoomAssignmentStrategy);
42
- }}
43
- />
44
- </>
45
- );
46
- };
47
-
48
- const style = StyleSheet.create({
49
- label: {
50
- fontWeight: '400',
51
- fontSize: ThemeConfig.FontSize.small,
52
- lineHeight: 16,
53
- color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.high,
54
- fontFamily: ThemeConfig.FontFamily.sansPro,
55
- },
56
- });
57
- export default SelectParticipantAssignmentStrategy;