agora-appbuilder-core 4.0.21 → 4.0.22-beta-2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.21",
3
+ "version": "4.0.22-beta-2",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -35,3 +35,4 @@ export {default as useLocalAudio} from '../src/utils/useLocalAudio';
35
35
  export {default as useLocalVideo} from '../src/utils/useLocalVideo';
36
36
  export type {LanguageType} from '../src/subComponents/caption/utils';
37
37
  export {default as useSpeechToText} from '../src/utils/useSpeechToText';
38
+ export {isMobileUA} from '../src/utils/common';
@@ -10,9 +10,10 @@ interface CarouselItem {
10
10
 
11
11
  interface CarouselProps {
12
12
  data: CarouselItem[];
13
+ isPaginationRequired?: boolean;
13
14
  }
14
15
 
15
- const Carousel: React.FC<CarouselProps> = ({data}) => {
16
+ const Carousel: React.FC<CarouselProps> = ({data, isPaginationRequired}) => {
16
17
  const [activeIndex, setActiveIndex] = useState(0);
17
18
 
18
19
  const flatListRef = React.useRef<FlatList | null>(null);
@@ -36,7 +37,8 @@ const Carousel: React.FC<CarouselProps> = ({data}) => {
36
37
  };
37
38
 
38
39
  return (
39
- <View style={styles.container}>
40
+ <View
41
+ style={[styles.container, !isPaginationRequired ? {paddingTop: 24} : {}]}>
40
42
  <FlatList
41
43
  ref={flatListRef}
42
44
  data={data}
@@ -47,28 +49,32 @@ const Carousel: React.FC<CarouselProps> = ({data}) => {
47
49
  keyExtractor={(_, index) => index.toString()}
48
50
  onScroll={handleScroll}
49
51
  />
50
- <View style={styles.indicatorContainer}>
51
- {data.map((_, index) => (
52
- <Pressable
53
- key={index}
54
- onPress={() => {
55
- scrollToIndex(index);
56
- setActiveIndex(index);
57
- }}
58
- hitSlop={5} // to increase clickable area
59
- >
60
- {({pressed}) => (
61
- <View
62
- style={[
63
- styles.dot,
64
- index === activeIndex && styles.activeDot,
65
- pressed && styles.pressedDot,
66
- ]}
67
- />
68
- )}
69
- </Pressable>
70
- ))}
71
- </View>
52
+ {isPaginationRequired ? (
53
+ <View style={styles.indicatorContainer}>
54
+ {data.map((_, index) => (
55
+ <Pressable
56
+ key={index}
57
+ onPress={() => {
58
+ scrollToIndex(index);
59
+ setActiveIndex(index);
60
+ }}
61
+ hitSlop={5} // to increase clickable area
62
+ >
63
+ {({pressed}) => (
64
+ <View
65
+ style={[
66
+ styles.dot,
67
+ index === activeIndex && styles.activeDot,
68
+ pressed && styles.pressedDot,
69
+ ]}
70
+ />
71
+ )}
72
+ </Pressable>
73
+ ))}
74
+ </View>
75
+ ) : (
76
+ <></>
77
+ )}
72
78
  </View>
73
79
  );
74
80
  };
@@ -7,6 +7,14 @@ 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 ToolbarMoreOptionDefaultItemName =
11
+ | 'virtual-background'
12
+ | 'noise-cancellation'
13
+ | 'caption'
14
+ | 'transcript'
15
+ | 'view-recordings'
16
+ | 'whiteboard';
17
+
10
18
  export type ToolbarDefaultItemName =
11
19
  //bottom bar
12
20
 
@@ -35,9 +43,21 @@ export type ToolbarDefaultItemConfig = {
35
43
  [key in ToolbarDefaultItemName]?: ToolbarDefaultItem;
36
44
  };
37
45
 
46
+ export type ToolbarMoreButton = {
47
+ ['more']?: ToolbarMoreDefaultItem;
48
+ };
49
+
50
+ export type ToolbarMoreButtonConfig = {
51
+ [key in ToolbarMoreOptionDefaultItemName]?: ToolbarDefaultItem;
52
+ };
53
+
38
54
  export type ToolbarItemAlign = 'start' | 'center' | 'end';
39
55
  export type ToolbarItemHide = 'yes' | 'no';
40
56
 
57
+ export interface ToolbarMoreDefaultItem extends ToolbarDefaultItem {
58
+ fields?: ToolbarMoreButtonConfig;
59
+ }
60
+
41
61
  export interface ToolbarDefaultItem {
42
62
  component?: () => JSX.Element;
43
63
  align?: ToolbarItemAlign;
@@ -56,13 +76,13 @@ export type ToolbarPresetAlign = 'top' | 'bottom' | 'right' | 'left';
56
76
  export interface ToolbarBottomPresetProps {
57
77
  align: ToolbarPresetAlign;
58
78
  customItems?: Array<ToolbarCustomItem>;
59
- defaultItemsConfig?: ToolbarDefaultItemConfig;
79
+ defaultItemsConfig?: ToolbarDefaultItemConfig | ToolbarMoreButton;
60
80
  snapPointsMinMax: [number, number];
61
81
  }
62
82
  export interface ToolbarOtherPresetProps {
63
83
  align: ToolbarPresetAlign;
64
84
  customItems?: Array<ToolbarCustomItem>;
65
- defaultItemsConfig?: ToolbarDefaultItemConfig;
85
+ defaultItemsConfig?: ToolbarDefaultItemConfig | ToolbarMoreButton;
66
86
  snapPointsMinMax?: never;
67
87
  }
68
88
 
@@ -70,6 +70,7 @@ import useGetName from '../utils/useGetName';
70
70
  import Toolbar from '../atoms/Toolbar';
71
71
  import ToolbarItem from '../atoms/ToolbarItem';
72
72
  import {
73
+ ToolbarBottomPresetProps,
73
74
  ToolbarCustomItem,
74
75
  ToolbarDefaultItem,
75
76
  ToolbarDefaultItemConfig,
@@ -250,7 +251,11 @@ export const WhiteboardListener = () => {
250
251
  return null;
251
252
  };
252
253
 
253
- const MoreButton = () => {
254
+ const MoreButton = (props: {
255
+ defaultItemsConfig: ToolbarBottomPresetProps['defaultItemsConfig'];
256
+ }) => {
257
+ const defaultItemsConfig = props?.defaultItemsConfig || {};
258
+ const defaultMoreItemsConfig = props?.defaultItemsConfig?.more?.fields || {};
254
259
  const noiseCancellationLabel = useString(toolbarItemNoiseCancellationText)();
255
260
  const whiteboardLabel = useString<boolean>(toolbarItemWhiteboardText);
256
261
  const captionLabel = useString<boolean>(toolbarItemCaptionText);
@@ -316,23 +321,25 @@ const MoreButton = () => {
316
321
 
317
322
  //AINS
318
323
  if ($config.ENABLE_NOISE_CANCELLATION) {
319
- actionMenuitems.push({
320
- toggleStatus: isNoiseSupressionEnabled === ToggleState.enabled,
321
- disabled:
322
- isNoiseSupressionEnabled === ToggleState.disabling ||
323
- isNoiseSupressionEnabled === ToggleState.enabling,
324
- isBase64Icon: true,
325
- //@ts-ignore
326
- icon: 'noise-cancellation',
327
- iconColor: $config.SECONDARY_ACTION_COLOR,
328
- textColor: $config.FONT_COLOR,
329
- title: noiseCancellationLabel,
330
- //isNoiseSupressionEnabled === ToggleState.enabled
331
- callback: () => {
332
- setActionMenuVisible(false);
333
- setNoiseSupression(p => !p);
334
- },
335
- });
324
+ if (!(defaultMoreItemsConfig['noise-cancellation']?.hide === 'yes')) {
325
+ actionMenuitems.push({
326
+ toggleStatus: isNoiseSupressionEnabled === ToggleState.enabled,
327
+ disabled:
328
+ isNoiseSupressionEnabled === ToggleState.disabling ||
329
+ isNoiseSupressionEnabled === ToggleState.enabling,
330
+ isBase64Icon: true,
331
+ //@ts-ignore
332
+ icon: 'noise-cancellation',
333
+ iconColor: $config.SECONDARY_ACTION_COLOR,
334
+ textColor: $config.FONT_COLOR,
335
+ title: noiseCancellationLabel,
336
+ //isNoiseSupressionEnabled === ToggleState.enabled
337
+ callback: () => {
338
+ setActionMenuVisible(false);
339
+ setNoiseSupression(p => !p);
340
+ },
341
+ });
342
+ }
336
343
  }
337
344
  //AINS
338
345
 
@@ -348,19 +355,21 @@ const MoreButton = () => {
348
355
  setIsVBActive(prev => !prev);
349
356
  };
350
357
  if ($config.ENABLE_VIRTUAL_BACKGROUND && !$config.AUDIO_ROOM) {
351
- actionMenuitems.push({
352
- isBase64Icon: true,
353
- //@ts-ignore
354
- icon: 'vb',
355
- iconColor: $config.SECONDARY_ACTION_COLOR,
356
- textColor: $config.FONT_COLOR,
357
- //title: `${isVBActive ? 'Hide' : 'Show'} Virtual Background`,
358
- title: virtualBackgroundLabel,
359
- callback: () => {
360
- setActionMenuVisible(false);
361
- toggleVB();
362
- },
363
- });
358
+ if (!(defaultMoreItemsConfig['virtual-background']?.hide === 'yes')) {
359
+ actionMenuitems.push({
360
+ isBase64Icon: true,
361
+ //@ts-ignore
362
+ icon: 'vb',
363
+ iconColor: $config.SECONDARY_ACTION_COLOR,
364
+ textColor: $config.FONT_COLOR,
365
+ //title: `${isVBActive ? 'Hide' : 'Show'} Virtual Background`,
366
+ title: virtualBackgroundLabel,
367
+ callback: () => {
368
+ setActionMenuVisible(false);
369
+ toggleVB();
370
+ },
371
+ });
372
+ }
364
373
  }
365
374
  //virtual background
366
375
 
@@ -448,76 +457,47 @@ const MoreButton = () => {
448
457
  //whiteboard ends
449
458
 
450
459
  if (isHost && $config.ENABLE_WHITEBOARD && isWebInternal()) {
451
- actionMenuitems.push({
452
- disabled: WhiteboardDisabled,
453
- isBase64Icon: true,
454
- //@ts-ignore
455
- icon: 'whiteboard-new',
456
- iconColor: $config.SECONDARY_ACTION_COLOR,
457
- textColor: $config.FONT_COLOR,
458
- title: whiteboardLabel(whiteboardActive),
459
- callback: () => {
460
- setActionMenuVisible(false);
461
- toggleWhiteboard(whiteboardActive, true);
462
- },
463
- });
460
+ if (!(defaultMoreItemsConfig?.whiteboard?.hide === 'yes')) {
461
+ actionMenuitems.push({
462
+ disabled: WhiteboardDisabled,
463
+ isBase64Icon: true,
464
+ //@ts-ignore
465
+ icon: 'whiteboard-new',
466
+ iconColor: $config.SECONDARY_ACTION_COLOR,
467
+ textColor: $config.FONT_COLOR,
468
+ title: whiteboardLabel(whiteboardActive),
469
+ callback: () => {
470
+ setActionMenuVisible(false);
471
+ toggleWhiteboard(whiteboardActive, true);
472
+ },
473
+ });
474
+ }
464
475
  }
465
476
 
466
477
  // host can see stt options and attendee can view only when stt is enabled by a host in the channel
467
478
 
468
479
  if ($config.ENABLE_STT && $config.ENABLE_CAPTION) {
469
- actionMenuitems.push({
470
- icon: `${isCaptionON ? 'captions-off' : 'captions'}`,
471
- iconColor: $config.SECONDARY_ACTION_COLOR,
472
- textColor: $config.FONT_COLOR,
473
- disabled: !(
474
- $config.ENABLE_STT &&
475
- $config.ENABLE_CAPTION &&
476
- (isHost || (!isHost && isSTTActive))
477
- ),
478
- title: captionLabel(isCaptionON),
479
- callback: () => {
480
- setActionMenuVisible(false);
481
- STT_clicked.current = !isCaptionON ? 'caption' : null;
482
- if (isSTTError) {
483
- setIsCaptionON(prev => !prev);
484
- return;
485
- }
486
- if (isSTTActive) {
487
- setIsCaptionON(prev => !prev);
488
- // is lang popup has been shown once for any user in meeting
489
- } else {
490
- isFirstTimePopupOpen.current = true;
491
- setLanguagePopup(true);
492
- }
493
- },
494
- });
495
-
496
- if ($config.ENABLE_MEETING_TRANSCRIPT) {
480
+ if (!(defaultMoreItemsConfig?.caption?.hide === 'yes')) {
497
481
  actionMenuitems.push({
498
- icon: 'transcript',
482
+ icon: `${isCaptionON ? 'captions-off' : 'captions'}`,
499
483
  iconColor: $config.SECONDARY_ACTION_COLOR,
500
484
  textColor: $config.FONT_COLOR,
501
485
  disabled: !(
502
486
  $config.ENABLE_STT &&
503
487
  $config.ENABLE_CAPTION &&
504
- $config.ENABLE_MEETING_TRANSCRIPT &&
505
488
  (isHost || (!isHost && isSTTActive))
506
489
  ),
507
- title: transcriptLabel(isTranscriptON),
490
+ title: captionLabel(isCaptionON),
508
491
  callback: () => {
509
492
  setActionMenuVisible(false);
510
- STT_clicked.current = !isTranscriptON ? 'transcript' : null;
493
+ STT_clicked.current = !isCaptionON ? 'caption' : null;
511
494
  if (isSTTError) {
512
- !isTranscriptON
513
- ? setSidePanel(SidePanelType.Transcript)
514
- : setSidePanel(SidePanelType.None);
495
+ setIsCaptionON(prev => !prev);
515
496
  return;
516
497
  }
517
498
  if (isSTTActive) {
518
- !isTranscriptON
519
- ? setSidePanel(SidePanelType.Transcript)
520
- : setSidePanel(SidePanelType.None);
499
+ setIsCaptionON(prev => !prev);
500
+ // is lang popup has been shown once for any user in meeting
521
501
  } else {
522
502
  isFirstTimePopupOpen.current = true;
523
503
  setLanguagePopup(true);
@@ -525,45 +505,87 @@ const MoreButton = () => {
525
505
  },
526
506
  });
527
507
  }
508
+ if ($config.ENABLE_MEETING_TRANSCRIPT) {
509
+ if (!(defaultMoreItemsConfig?.transcript?.hide === 'yes')) {
510
+ actionMenuitems.push({
511
+ icon: 'transcript',
512
+ iconColor: $config.SECONDARY_ACTION_COLOR,
513
+ textColor: $config.FONT_COLOR,
514
+ disabled: !(
515
+ $config.ENABLE_STT &&
516
+ $config.ENABLE_CAPTION &&
517
+ $config.ENABLE_MEETING_TRANSCRIPT &&
518
+ (isHost || (!isHost && isSTTActive))
519
+ ),
520
+ title: transcriptLabel(isTranscriptON),
521
+ callback: () => {
522
+ setActionMenuVisible(false);
523
+ STT_clicked.current = !isTranscriptON ? 'transcript' : null;
524
+ if (isSTTError) {
525
+ !isTranscriptON
526
+ ? setSidePanel(SidePanelType.Transcript)
527
+ : setSidePanel(SidePanelType.None);
528
+ return;
529
+ }
530
+ if (isSTTActive) {
531
+ !isTranscriptON
532
+ ? setSidePanel(SidePanelType.Transcript)
533
+ : setSidePanel(SidePanelType.None);
534
+ } else {
535
+ isFirstTimePopupOpen.current = true;
536
+ setLanguagePopup(true);
537
+ }
538
+ },
539
+ });
540
+ }
541
+ }
528
542
  }
529
543
 
530
544
  // view recordings
531
545
 
532
546
  if (isHost && $config.CLOUD_RECORDING && isWeb()) {
533
- actionMenuitems.push({
534
- icon: 'play-circle',
535
- iconColor: $config.SECONDARY_ACTION_COLOR,
536
- textColor: $config.FONT_COLOR,
537
- title: viewRecordingsLabel,
538
- callback: () => {
539
- toggleVRModal();
540
- },
541
- });
547
+ if (!(defaultMoreItemsConfig?.['view-recordings']?.hide === 'yes')) {
548
+ actionMenuitems.push({
549
+ icon: 'play-circle',
550
+ iconColor: $config.SECONDARY_ACTION_COLOR,
551
+ textColor: $config.FONT_COLOR,
552
+ title: viewRecordingsLabel,
553
+ callback: () => {
554
+ toggleVRModal();
555
+ },
556
+ });
557
+ }
542
558
  }
543
559
 
544
- if (globalWidth <= BREAKPOINTS.sm) {
545
- actionMenuitems.push({
546
- icon: 'participants',
547
- iconColor: $config.SECONDARY_ACTION_COLOR,
548
- textColor: $config.FONT_COLOR,
549
- title: peopleLabel,
550
- callback: () => {
551
- setActionMenuVisible(false);
552
- setSidePanel(SidePanelType.Participants);
553
- },
554
- });
555
- actionMenuitems.push({
556
- icon: 'chat-nav',
557
- iconColor: $config.SECONDARY_ACTION_COLOR,
558
- textColor: $config.FONT_COLOR,
559
- title: chatLabel,
560
- callback: () => {
561
- setActionMenuVisible(false);
562
- setChatType(ChatType.Group);
563
- setSidePanel(SidePanelType.Chat);
564
- },
565
- });
560
+ if (globalWidth <= BREAKPOINTS.lg) {
561
+ if (!(defaultItemsConfig?.participant?.hide === 'yes')) {
562
+ actionMenuitems.push({
563
+ icon: 'participants',
564
+ iconColor: $config.SECONDARY_ACTION_COLOR,
565
+ textColor: $config.FONT_COLOR,
566
+ title: peopleLabel,
567
+ callback: () => {
568
+ setActionMenuVisible(false);
569
+ setSidePanel(SidePanelType.Participants);
570
+ },
571
+ });
572
+ }
573
+ if (!(defaultItemsConfig?.chat?.hide === 'yes')) {
574
+ actionMenuitems.push({
575
+ icon: 'chat-nav',
576
+ iconColor: $config.SECONDARY_ACTION_COLOR,
577
+ textColor: $config.FONT_COLOR,
578
+ title: chatLabel,
579
+ callback: () => {
580
+ setActionMenuVisible(false);
581
+ setChatType(ChatType.Group);
582
+ setSidePanel(SidePanelType.Chat);
583
+ },
584
+ });
585
+ }
586
+ }
566
587
 
588
+ if (globalWidth <= BREAKPOINTS.sm) {
567
589
  if ($config.SCREEN_SHARING) {
568
590
  if (
569
591
  !(
@@ -572,102 +594,112 @@ const MoreButton = () => {
572
594
  !$config.RAISE_HAND
573
595
  )
574
596
  ) {
597
+ if (!(defaultItemsConfig?.screenshare?.hide === 'yes')) {
598
+ actionMenuitems.push({
599
+ disabled:
600
+ rtcProps.role == ClientRoleType.ClientRoleAudience &&
601
+ $config.EVENT_MODE &&
602
+ $config.RAISE_HAND &&
603
+ !isHost,
604
+ icon: isScreenshareActive ? 'stop-screen-share' : 'screen-share',
605
+ iconColor: isScreenshareActive
606
+ ? $config.SEMANTIC_ERROR
607
+ : $config.SECONDARY_ACTION_COLOR,
608
+ textColor: isScreenshareActive
609
+ ? $config.SEMANTIC_ERROR
610
+ : $config.FONT_COLOR,
611
+ title: screenShareButton(isScreenshareActive),
612
+ callback: () => {
613
+ setActionMenuVisible(false);
614
+ isScreenshareActive ? stopScreenshare() : startScreenshare();
615
+ },
616
+ });
617
+ }
618
+ }
619
+ }
620
+ if (isHost && $config.CLOUD_RECORDING) {
621
+ if (!(defaultItemsConfig?.recording?.hide === 'yes')) {
575
622
  actionMenuitems.push({
576
- disabled:
577
- rtcProps.role == ClientRoleType.ClientRoleAudience &&
578
- $config.EVENT_MODE &&
579
- $config.RAISE_HAND &&
580
- !isHost,
581
- icon: isScreenshareActive ? 'stop-screen-share' : 'screen-share',
582
- iconColor: isScreenshareActive
623
+ disabled: inProgress,
624
+ icon: isRecordingActive ? 'stop-recording' : 'recording',
625
+ iconColor: isRecordingActive
583
626
  ? $config.SEMANTIC_ERROR
584
627
  : $config.SECONDARY_ACTION_COLOR,
585
- textColor: isScreenshareActive
628
+ textColor: isRecordingActive
586
629
  ? $config.SEMANTIC_ERROR
587
630
  : $config.FONT_COLOR,
588
- title: screenShareButton(isScreenshareActive),
631
+ title: recordingButton(isRecordingActive),
589
632
  callback: () => {
590
633
  setActionMenuVisible(false);
591
- isScreenshareActive ? stopScreenshare() : startScreenshare();
634
+ if (!isRecordingActive) {
635
+ startRecording();
636
+ } else {
637
+ setShowStopRecordingPopup(true);
638
+ }
592
639
  },
593
640
  });
594
641
  }
595
642
  }
596
- if (isHost && $config.CLOUD_RECORDING) {
643
+ }
644
+
645
+ if (globalWidth <= BREAKPOINTS.lg) {
646
+ if (!(defaultItemsConfig?.layout?.hide === 'yes')) {
597
647
  actionMenuitems.push({
598
- disabled: inProgress,
599
- icon: isRecordingActive ? 'stop-recording' : 'recording',
600
- iconColor: isRecordingActive
601
- ? $config.SEMANTIC_ERROR
602
- : $config.SECONDARY_ACTION_COLOR,
603
- textColor: isRecordingActive
604
- ? $config.SEMANTIC_ERROR
605
- : $config.FONT_COLOR,
606
- title: recordingButton(isRecordingActive),
648
+ //below icon key is dummy value
649
+ icon: 'grid',
650
+ externalIconString: layouts[layout]?.icon,
651
+ isExternalIcon: true,
652
+ iconColor: $config.SECONDARY_ACTION_COLOR,
653
+ textColor: $config.FONT_COLOR,
654
+ title: layoutLabel,
655
+ callback: () => {
656
+ //setShowLayoutOption(true);
657
+ },
658
+ onHoverCallback: isHovered => {
659
+ setShowLayoutOption(isHovered);
660
+ },
661
+ onHoverContent: (
662
+ <LayoutIconDropdown
663
+ onHoverPlaceHolder="vertical"
664
+ setShowDropdown={() => {}}
665
+ showDropdown={true}
666
+ modalPosition={
667
+ globalWidth <= BREAKPOINTS.lg
668
+ ? {bottom: 65, left: -150}
669
+ : {bottom: 20, left: -150}
670
+ }
671
+ caretPosition={{bottom: 45, right: -10}}
672
+ />
673
+ ),
674
+ });
675
+ }
676
+ if (!(defaultItemsConfig?.invite?.hide === 'yes')) {
677
+ actionMenuitems.push({
678
+ icon: 'share',
679
+ iconColor: $config.SECONDARY_ACTION_COLOR,
680
+ textColor: $config.FONT_COLOR,
681
+ title: inviteLabel,
607
682
  callback: () => {
608
683
  setActionMenuVisible(false);
609
- if (!isRecordingActive) {
610
- startRecording();
611
- } else {
612
- setShowStopRecordingPopup(true);
613
- }
684
+ setShowInvitePopup(true);
614
685
  },
615
686
  });
616
687
  }
617
688
  }
618
689
 
619
- if (globalWidth <= BREAKPOINTS.md) {
620
- actionMenuitems.push({
621
- //below icon key is dummy value
622
- icon: 'grid',
623
- externalIconString: layouts[layout]?.icon,
624
- isExternalIcon: true,
625
- iconColor: $config.SECONDARY_ACTION_COLOR,
626
- textColor: $config.FONT_COLOR,
627
- title: layoutLabel,
628
- callback: () => {
629
- //setShowLayoutOption(true);
630
- },
631
- onHoverCallback: isHovered => {
632
- setShowLayoutOption(isHovered);
633
- },
634
- onHoverContent: (
635
- <LayoutIconDropdown
636
- onHoverPlaceHolder="vertical"
637
- setShowDropdown={() => {}}
638
- showDropdown={true}
639
- modalPosition={
640
- globalWidth <= BREAKPOINTS.sm
641
- ? {bottom: 65, left: -150}
642
- : {bottom: 20, left: -150}
643
- }
644
- caretPosition={{bottom: 45, right: -10}}
645
- />
646
- ),
647
- });
648
- actionMenuitems.push({
649
- icon: 'share',
650
- iconColor: $config.SECONDARY_ACTION_COLOR,
651
- textColor: $config.FONT_COLOR,
652
- title: inviteLabel,
653
- callback: () => {
654
- setActionMenuVisible(false);
655
- setShowInvitePopup(true);
656
- },
657
- });
658
- }
659
-
660
- if (globalWidth <= BREAKPOINTS.sm) {
661
- actionMenuitems.push({
662
- icon: 'settings',
663
- iconColor: $config.SECONDARY_ACTION_COLOR,
664
- textColor: $config.FONT_COLOR,
665
- title: settingsLabel,
666
- callback: () => {
667
- setActionMenuVisible(false);
668
- setSidePanel(SidePanelType.Settings);
669
- },
670
- });
690
+ if (globalWidth <= BREAKPOINTS.lg) {
691
+ if (!(defaultItemsConfig?.settings?.hide === 'yes')) {
692
+ actionMenuitems.push({
693
+ icon: 'settings',
694
+ iconColor: $config.SECONDARY_ACTION_COLOR,
695
+ textColor: $config.FONT_COLOR,
696
+ title: settingsLabel,
697
+ callback: () => {
698
+ setActionMenuVisible(false);
699
+ setSidePanel(SidePanelType.Settings);
700
+ },
701
+ });
702
+ }
671
703
  }
672
704
 
673
705
  useEffect(() => {
@@ -878,7 +910,9 @@ export const RecordingToolbarItem = () => {
878
910
  );
879
911
  };
880
912
 
881
- export const MoreButtonToolbarItem = () => {
913
+ export const MoreButtonToolbarItem = (props: {
914
+ defaultItemsConfig: ToolbarBottomPresetProps['defaultItemsConfig'];
915
+ }) => {
882
916
  const {width} = useWindowDimensions();
883
917
  const {
884
918
  data: {isHost},
@@ -890,7 +924,7 @@ export const MoreButtonToolbarItem = () => {
890
924
  forceUpdate();
891
925
  }, [isHost]);
892
926
 
893
- return width < BREAKPOINTS.md ||
927
+ return width < BREAKPOINTS.lg ||
894
928
  ($config.ENABLE_STT &&
895
929
  $config.ENABLE_CAPTION &&
896
930
  (isHost || (!isHost && isSTTActive))) ||
@@ -904,7 +938,7 @@ export const MoreButtonToolbarItem = () => {
904
938
  ) : (
905
939
  <></>
906
940
  )}
907
- <MoreButton />
941
+ <MoreButton defaultItemsConfig={props?.defaultItemsConfig} />
908
942
  </ToolbarItem>
909
943
  ) : (
910
944
  <WhiteboardListener />
@@ -1146,7 +1180,12 @@ const Controls = (props: ControlsProps) => {
1146
1180
  return items?.map((item, index) => {
1147
1181
  const ToolbarItem = item?.component;
1148
1182
  if (ToolbarItem) {
1149
- return <ToolbarItem key={`bottom-toolbar-${type}` + index} />;
1183
+ return (
1184
+ <ToolbarItem
1185
+ key={`bottom-toolbar-${type}` + index}
1186
+ defaultItemsConfig={defaultItemsConfig}
1187
+ />
1188
+ );
1150
1189
  } else {
1151
1190
  return null;
1152
1191
  }
@@ -1154,7 +1193,7 @@ const Controls = (props: ControlsProps) => {
1154
1193
  };
1155
1194
  return (
1156
1195
  <Toolbar>
1157
- {width >= BREAKPOINTS.md && (
1196
+ {width >= BREAKPOINTS.lg && (
1158
1197
  <View style={[style.startContent]}>
1159
1198
  {renderContent(customStartItems, 'start')}
1160
1199
  </View>
@@ -1162,7 +1201,7 @@ const Controls = (props: ControlsProps) => {
1162
1201
  <View style={[style.centerContent]}>
1163
1202
  {renderContent(customCenterItems, 'center')}
1164
1203
  </View>
1165
- {width >= BREAKPOINTS.md && (
1204
+ {width >= BREAKPOINTS.lg && (
1166
1205
  <View style={style.endContent}>
1167
1206
  {renderContent(customEndItems, 'end')}
1168
1207
  </View>
@@ -580,7 +580,7 @@ const Navbar = (props: NavbarProps) => {
580
580
  <View style={style.centerContent}>
581
581
  {renderContent(customCenterItems, 'center')}
582
582
  </View>
583
- {width > BREAKPOINTS.sm || isMobileUA() ? (
583
+ {width > BREAKPOINTS.lg || isMobileUA() ? (
584
584
  <View style={style.endContent}>
585
585
  {renderContent(customEndItems, 'end')}
586
586
  </View>
@@ -490,7 +490,12 @@ const ActionSheetContent = props => {
490
490
  componentName: 'recording',
491
491
  component: isHost && $config.CLOUD_RECORDING ? <RecordingIcon /> : null,
492
492
  },
493
- {
493
+ ];
494
+
495
+ if (
496
+ !(defaultItemsConfig?.more?.fields?.['virtual-background']?.hide === 'yes')
497
+ ) {
498
+ defaultItems.push({
494
499
  default: true,
495
500
  order: 7,
496
501
  hide: 'no',
@@ -500,42 +505,45 @@ const ActionSheetContent = props => {
500
505
  $config.ENABLE_VIRTUAL_BACKGROUND && !$config.AUDIO_ROOM ? (
501
506
  <VBIcon />
502
507
  ) : null,
503
- },
504
- {
505
- default: true,
506
- order: 8,
507
- hide: 'no',
508
- align: 'start',
509
- componentName: 'switch-camera',
510
- component:
511
- !isAudioRoom &&
512
- (isAudioVideoControlsDisabled ? null : <SwitchCameraIcon />),
513
- },
514
- {
515
- default: true,
516
- order: 9,
517
- hide: 'no',
518
- align: 'start',
519
- componentName: 'layout',
520
- component: <LayoutIcon />,
521
- },
522
- {
523
- default: true,
524
- order: 10,
525
- hide: 'no',
526
- align: 'start',
527
- componentName: 'settings',
528
- component: <SettingsIcon />,
529
- },
530
- {
531
- default: true,
532
- order: 11,
533
- hide: 'no',
534
- align: 'start',
535
- componentName: 'invite',
536
- component: <ShareIcon />,
537
- },
538
- {
508
+ });
509
+ }
510
+ defaultItems.push({
511
+ default: true,
512
+ order: 8,
513
+ hide: 'no',
514
+ align: 'start',
515
+ componentName: 'switch-camera',
516
+ component:
517
+ !isAudioRoom &&
518
+ (isAudioVideoControlsDisabled ? null : <SwitchCameraIcon />),
519
+ });
520
+ defaultItems.push({
521
+ default: true,
522
+ order: 9,
523
+ hide: 'no',
524
+ align: 'start',
525
+ componentName: 'layout',
526
+ component: <LayoutIcon />,
527
+ });
528
+ defaultItems.push({
529
+ default: true,
530
+ order: 10,
531
+ hide: 'no',
532
+ align: 'start',
533
+ componentName: 'settings',
534
+ component: <SettingsIcon />,
535
+ });
536
+ defaultItems.push({
537
+ default: true,
538
+ order: 11,
539
+ hide: 'no',
540
+ align: 'start',
541
+ componentName: 'invite',
542
+ component: <ShareIcon />,
543
+ });
544
+
545
+ if (!(defaultItemsConfig?.more?.fields?.caption?.hide === 'yes')) {
546
+ defaultItems.push({
539
547
  default: true,
540
548
  order: 12,
541
549
  hide: 'no',
@@ -546,16 +554,18 @@ const ActionSheetContent = props => {
546
554
  onPress={() => handleSheetChanges(isExpanded ? 0 : 1)}
547
555
  />
548
556
  ),
549
- },
550
- {
557
+ });
558
+ }
559
+ if (!(defaultItemsConfig?.more?.fields?.transcript?.hide === 'yes')) {
560
+ defaultItems.push({
551
561
  default: true,
552
562
  order: 13,
553
563
  hide: 'no',
554
564
  align: 'start',
555
565
  componentName: 'transcript',
556
566
  component: <TranscriptIconBtn />,
557
- },
558
- ];
567
+ });
568
+ }
559
569
 
560
570
  const isHidden = i => {
561
571
  return i?.hide === 'yes';
@@ -645,13 +655,11 @@ const CarouselWrapper = ({data}) => {
645
655
 
646
656
  const isPaginationRequired = slides.length > 1;
647
657
 
648
- if (isPaginationRequired)
649
- return (
650
- <View style={{flexDirection: 'row'}}>
651
- <Carousel data={slides} />
652
- </View>
653
- );
654
- return <View style={styles.row}>{slides[0].component}</View>;
658
+ return (
659
+ <View style={{flexDirection: 'row'}}>
660
+ <Carousel data={slides} isPaginationRequired={isPaginationRequired} />
661
+ </View>
662
+ );
655
663
  };
656
664
 
657
665
  export default ActionSheetContent;