agora-appbuilder-core 4.0.0-beta.56 → 4.0.0-beta.58

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 (92) hide show
  1. package/package.json +1 -1
  2. package/template/customization-api/types.ts +4 -1
  3. package/template/src/atoms/ClipboardIconButton.tsx +4 -2
  4. package/template/src/components/Controls.tsx +31 -24
  5. package/template/src/components/HostControlView.tsx +9 -4
  6. package/template/src/components/Navbar.tsx +8 -7
  7. package/template/src/components/ParticipantsView.tsx +14 -6
  8. package/template/src/components/Precall.tsx +6 -2
  9. package/template/src/components/RTMConfigure.tsx +1 -8
  10. package/template/src/components/Settings.tsx +2 -1
  11. package/template/src/components/SettingsView.tsx +6 -2
  12. package/template/src/components/Share.tsx +48 -42
  13. package/template/src/components/chat-messages/useChatMessages.tsx +26 -17
  14. package/template/src/components/livestream/LiveStreamContext.tsx +10 -3
  15. package/template/src/components/livestream/Types.ts +24 -11
  16. package/template/src/components/livestream/views/LiveStreamAttendeeLandingTile.tsx +31 -11
  17. package/template/src/components/meeting-info-invite/MeetingInfoGridTile.tsx +10 -13
  18. package/template/src/components/meeting-info-invite/MeetingInfoLinks.tsx +32 -33
  19. package/template/src/components/participants/AllAudienceParticipants.tsx +4 -5
  20. package/template/src/components/participants/AllHostParticipants.tsx +5 -6
  21. package/template/src/components/participants/Participant.tsx +9 -2
  22. package/template/src/components/participants/UserActionMenuOptions.tsx +38 -24
  23. package/template/src/components/participants/WaitingRoomParticipants.tsx +10 -3
  24. package/template/src/components/popups/InvitePopup.tsx +8 -3
  25. package/template/src/components/popups/StartScreenSharePopup.native.tsx +22 -25
  26. package/template/src/components/popups/StopRecordingPopup.tsx +10 -4
  27. package/template/src/components/popups/StopScreenSharePopup.native.tsx +14 -4
  28. package/template/src/components/popups/WhiteboardClearAllPopup.tsx +12 -4
  29. package/template/src/components/precall/PermissionHelper.tsx +15 -27
  30. package/template/src/components/precall/VideoFallback.tsx +8 -2
  31. package/template/src/components/precall/joinCallBtn.native.tsx +7 -2
  32. package/template/src/components/precall/joinCallBtn.tsx +7 -2
  33. package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +7 -2
  34. package/template/src/components/precall/joinWaitingRoomBtn.tsx +7 -2
  35. package/template/src/components/precall/textInput.tsx +10 -21
  36. package/template/src/components/useShareLink.tsx +12 -5
  37. package/template/src/components/useUserPreference.tsx +9 -9
  38. package/template/src/components/virtual-background/VBButton.tsx +3 -1
  39. package/template/src/components/virtual-background/VBCard.native.tsx +26 -6
  40. package/template/src/components/virtual-background/VBCard.tsx +26 -6
  41. package/template/src/components/virtual-background/VBPanel.tsx +13 -5
  42. package/template/src/components/virtual-background/VideoPreview.native.tsx +2 -1
  43. package/template/src/components/virtual-background/VideoPreview.tsx +2 -1
  44. package/template/src/components/virtual-background/imagePaths.ts +8 -3
  45. package/template/src/components/whiteboard/StrokeWidthTool.tsx +4 -2
  46. package/template/src/components/whiteboard/WhiteboardToolBox.tsx +60 -22
  47. package/template/src/components/whiteboard/WhiteboardView.tsx +2 -1
  48. package/template/src/components/whiteboard/WhiteboardWidget.tsx +50 -15
  49. package/template/src/language/default-labels/commonLabels.ts +5 -17
  50. package/template/src/language/default-labels/createScreenLabels.ts +93 -43
  51. package/template/src/language/default-labels/joinScreenLabels.ts +38 -18
  52. package/template/src/language/default-labels/precallScreenLabels.ts +135 -87
  53. package/template/src/language/default-labels/shareLinkScreenLabels.ts +86 -30
  54. package/template/src/language/default-labels/videoCallScreenLabels.ts +771 -470
  55. package/template/src/pages/Create.tsx +65 -81
  56. package/template/src/pages/Join.tsx +41 -27
  57. package/template/src/pages/video-call/DefaultLayouts.ts +6 -2
  58. package/template/src/pages/video-call/NameWithMicIcon.tsx +3 -3
  59. package/template/src/pages/video-call/SidePanelHeader.tsx +21 -9
  60. package/template/src/subComponents/ChatBubble.tsx +2 -3
  61. package/template/src/subComponents/ChatContainer.tsx +4 -8
  62. package/template/src/subComponents/ChatInput.ios.tsx +8 -2
  63. package/template/src/subComponents/ChatInput.tsx +8 -2
  64. package/template/src/subComponents/CopyJoinInfo.tsx +2 -1
  65. package/template/src/subComponents/EndcallPopup.tsx +15 -14
  66. package/template/src/subComponents/LanguageSelector.tsx +2 -1
  67. package/template/src/subComponents/LayoutIconButton.tsx +2 -1
  68. package/template/src/subComponents/LayoutIconDropdown.tsx +8 -4
  69. package/template/src/subComponents/LocalAudioMute.tsx +9 -3
  70. package/template/src/subComponents/LocalEndCall.tsx +2 -1
  71. package/template/src/subComponents/LocalSwitchCamera.tsx +2 -1
  72. package/template/src/subComponents/LocalVideoMute.tsx +9 -3
  73. package/template/src/subComponents/NetworkQualityPill.tsx +5 -2
  74. package/template/src/subComponents/Recording.tsx +2 -1
  75. package/template/src/subComponents/RemoteAudioMute.tsx +3 -3
  76. package/template/src/subComponents/RemoteMutePopup.tsx +23 -9
  77. package/template/src/subComponents/RemoteVideoMute.tsx +3 -3
  78. package/template/src/subComponents/RemoveMeetingPopup.tsx +10 -6
  79. package/template/src/subComponents/RemoveScreensharePopup.tsx +10 -4
  80. package/template/src/subComponents/SelectDevice.tsx +34 -13
  81. package/template/src/subComponents/caption/Caption.tsx +2 -1
  82. package/template/src/subComponents/caption/CaptionContainer.tsx +7 -3
  83. package/template/src/subComponents/caption/CaptionIcon.tsx +3 -3
  84. package/template/src/subComponents/caption/DownloadTranscriptBtn.tsx +2 -1
  85. package/template/src/subComponents/caption/LanguageSelectorPopup.tsx +16 -7
  86. package/template/src/subComponents/caption/Transcript.tsx +2 -1
  87. package/template/src/subComponents/chat/ChatParticipants.tsx +6 -4
  88. package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +0 -9
  89. package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +2 -1
  90. package/template/src/subComponents/screenshare/ScreenshareButton.tsx +2 -1
  91. package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +0 -5
  92. package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +1 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.0-beta.56",
3
+ "version": "4.0.0-beta.58",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1,5 +1,8 @@
1
1
  //audio/video toggle state
2
- export {ToggleState} from '../agora-rn-uikit/src/Contexts/PropsContext';
2
+ export {
3
+ ToggleState,
4
+ ClientRole,
5
+ } from '../agora-rn-uikit/src/Contexts/PropsContext';
3
6
  export type {
4
7
  ContentInterface,
5
8
  ContentStateInterface,
@@ -8,6 +8,8 @@ import Spacer from './Spacer';
8
8
  import ImageIcon from './ImageIcon';
9
9
  import Tooltip from './Tooltip';
10
10
  import ThemeConfig from '../theme';
11
+ import {shareRoomCopyBtnTooltipText} from '../language/default-labels/shareLinkScreenLabels';
12
+ import {useString} from '../utils/useString';
11
13
 
12
14
  interface Props {
13
15
  text: SHARE_LINK_CONTENT_TYPE;
@@ -17,7 +19,7 @@ interface Props {
17
19
 
18
20
  const ClipboardIconButton = (props: Props) => {
19
21
  const {copyShareLinkToClipboard} = useShareLink();
20
-
22
+ const copiedToClipboard = useString(shareRoomCopyBtnTooltipText)();
21
23
  const {text, variant = 'primary', size = 26} = props;
22
24
 
23
25
  const getTintColor = () => {
@@ -43,7 +45,7 @@ const ClipboardIconButton = (props: Props) => {
43
45
  <Spacer size={8} horizontal={true} />
44
46
  </>
45
47
  }
46
- toolTipMessage="Copied to clipboard"
48
+ toolTipMessage={copiedToClipboard}
47
49
  renderContent={(isToolTipVisible, setToolTipVisible) => {
48
50
  return (
49
51
  <TouchableOpacity
@@ -82,6 +82,21 @@ import LocalEventEmitter, {
82
82
  } from '../rtm-events-api/LocalEvents';
83
83
  import {useSetRoomInfo} from './room-info/useSetRoomInfo';
84
84
  import {useString} from '../utils/useString';
85
+ import {
86
+ toolbarItemCaptionText,
87
+ toolbarItemChatText,
88
+ toolbarItemInviteText,
89
+ toolbarItemLayoutText,
90
+ toolbarItemMoreText,
91
+ toolbarItemNoiseCancellationText,
92
+ toolbarItemPeopleText,
93
+ toolbarItemRecordingText,
94
+ toolbarItemSettingText,
95
+ toolbarItemShareText,
96
+ toolbarItemTranscriptText,
97
+ toolbarItemVitrualBackgroundText,
98
+ toolbarItemWhiteboardText,
99
+ } from '../language/default-labels/videoCallScreenLabels';
85
100
 
86
101
  export const useToggleWhiteboard = () => {
87
102
  const {
@@ -225,23 +240,19 @@ export const WhiteboardListener = () => {
225
240
  };
226
241
 
227
242
  const MoreButton = () => {
228
- const noiseCancellationLabel = useString('noiseCancellation')();
229
- const startWhiteboardLabel = useString('startWhiteboard')();
230
- const hideWhiteboardLabel = useString('hideWhiteboard')();
231
- const showWhiteboardLabel = useString('showWhiteboard')();
232
- const hideCaptionLabel = useString('hideCaption')();
233
- const showCaptionLabel = useString('showCaption')();
234
- const hideTranscriptLabel = useString('hideTranscript')();
235
- const showTranscriptLabel = useString('showTranscript')();
236
- const settingsLabel = useString('settings')();
237
- const screenShareButton = useString<boolean>('screenShareButton');
238
- const recordingButton = useString<boolean>('recordingButton');
239
- const moreButtonLabel = useString('moreButton')();
240
- const virtualBackgroundLabel = useString('virtualBackground')();
241
- const chatLabel = useString('chat')();
242
- const inviteLabel = useString('invite')();
243
- const peopleLabel = useString('people')();
244
- const layoutLabel = useString('layout')();
243
+ const noiseCancellationLabel = useString(toolbarItemNoiseCancellationText)();
244
+ const whiteboardLabel = useString<boolean>(toolbarItemWhiteboardText);
245
+ const captionLabel = useString<boolean>(toolbarItemCaptionText);
246
+ const transcriptLabel = useString<boolean>(toolbarItemTranscriptText);
247
+ const settingsLabel = useString(toolbarItemSettingText)();
248
+ const screenShareButton = useString<boolean>(toolbarItemShareText);
249
+ const recordingButton = useString<boolean>(toolbarItemRecordingText);
250
+ const moreButtonLabel = useString(toolbarItemMoreText)();
251
+ const virtualBackgroundLabel = useString(toolbarItemVitrualBackgroundText)();
252
+ const chatLabel = useString(toolbarItemChatText)();
253
+ const inviteLabel = useString(toolbarItemInviteText)();
254
+ const peopleLabel = useString(toolbarItemPeopleText)();
255
+ const layoutLabel = useString(toolbarItemLayoutText)();
245
256
  const {dispatch} = useContext(DispatchContext);
246
257
  const {rtcProps} = useContext(PropsContext);
247
258
  const {setCustomContent} = useContent();
@@ -425,11 +436,7 @@ const MoreButton = () => {
425
436
  icon: 'whiteboard-new',
426
437
  iconColor: $config.SECONDARY_ACTION_COLOR,
427
438
  textColor: $config.FONT_COLOR,
428
- title: whiteboardActive
429
- ? hideWhiteboardLabel
430
- : whiteboardStartedFirst
431
- ? showWhiteboardLabel
432
- : startWhiteboardLabel,
439
+ title: whiteboardLabel(whiteboardActive),
433
440
  callback: () => {
434
441
  setActionMenuVisible(false);
435
442
  toggleWhiteboard(whiteboardActive, true);
@@ -445,7 +452,7 @@ const MoreButton = () => {
445
452
  iconColor: $config.SECONDARY_ACTION_COLOR,
446
453
  textColor: $config.FONT_COLOR,
447
454
  disabled: !($config.ENABLE_STT && (isHost || (!isHost && isSTTActive))),
448
- title: `${isCaptionON ? hideCaptionLabel : showCaptionLabel}`,
455
+ title: captionLabel(isCaptionON),
449
456
  callback: () => {
450
457
  setActionMenuVisible(false);
451
458
  STT_clicked.current = !isCaptionON ? 'caption' : null;
@@ -468,7 +475,7 @@ const MoreButton = () => {
468
475
  iconColor: $config.SECONDARY_ACTION_COLOR,
469
476
  textColor: $config.FONT_COLOR,
470
477
  disabled: !($config.ENABLE_STT && (isHost || (!isHost && isSTTActive))),
471
- title: `${isTranscriptON ? hideTranscriptLabel : showTranscriptLabel}`,
478
+ title: transcriptLabel(isTranscriptON),
472
479
  callback: () => {
473
480
  setActionMenuVisible(false);
474
481
  STT_clicked.current = !isTranscriptON ? 'transcript' : null;
@@ -17,6 +17,11 @@ import TertiaryButton from '../atoms/TertiaryButton';
17
17
  import Spacer from '../atoms/Spacer';
18
18
  import RemoteMutePopup from '../subComponents/RemoteMutePopup';
19
19
  import {calculatePosition} from '../utils/common';
20
+ import {
21
+ I18nMuteType,
22
+ peoplePanelMuteAllMicBtnText,
23
+ peoplePanelTurnoffAllCameraBtnText,
24
+ } from '../language/default-labels/videoCallScreenLabels';
20
25
 
21
26
  export interface MuteAllAudioButtonProps {
22
27
  render?: (onPress: () => void) => JSX.Element;
@@ -27,7 +32,7 @@ export const MuteAllAudioButton = (props: MuteAllAudioButtonProps) => {
27
32
  const audioBtnRef = useRef(null);
28
33
  const [modalPosition, setModalPosition] = useState({});
29
34
  const muteRemoteAudio = useRemoteMute();
30
- const muteAllAudioButton = useString('muteAllMicrophone')();
35
+ const muteAllAudioButton = useString(peoplePanelMuteAllMicBtnText)();
31
36
  const onPressAction = () => muteRemoteAudio(MUTE_REMOTE_TYPE.audio);
32
37
  const {width: globalWidth, height: globalHeight} = useWindowDimensions();
33
38
  const showAudioModal = () => {
@@ -60,7 +65,7 @@ export const MuteAllAudioButton = (props: MuteAllAudioButtonProps) => {
60
65
  ) : (
61
66
  <>
62
67
  <RemoteMutePopup
63
- type="audio"
68
+ type={I18nMuteType.audio}
64
69
  actionMenuVisible={showAudioMuteModal}
65
70
  setActionMenuVisible={setShowAudioMuteModal}
66
71
  name={null}
@@ -88,7 +93,7 @@ export const MuteAllVideoButton = (props: MuteAllVideoButtonProps) => {
88
93
  const [modalPosition, setModalPosition] = useState({});
89
94
  const muteRemoteVideo = useRemoteMute();
90
95
  const {width: globalWidth, height: globalHeight} = useWindowDimensions();
91
- const muteAllVideoButton = useString('turnoffAllCameras')();
96
+ const muteAllVideoButton = useString(peoplePanelTurnoffAllCameraBtnText)();
92
97
  const onPressAction = () => muteRemoteVideo(MUTE_REMOTE_TYPE.video);
93
98
  const showVideoModal = () => {
94
99
  videoBtnRef?.current?.measure(
@@ -120,7 +125,7 @@ export const MuteAllVideoButton = (props: MuteAllVideoButtonProps) => {
120
125
  ) : (
121
126
  <>
122
127
  <RemoteMutePopup
123
- type="video"
128
+ type={I18nMuteType.video}
124
129
  actionMenuVisible={showVideoMuteModal}
125
130
  setActionMenuVisible={setShowVideoMuteModal}
126
131
  name={null}
@@ -66,6 +66,10 @@ import {useToolbarMenu} from '../utils/useMenu';
66
66
  import ToolbarMenuItem from '../atoms/ToolbarMenuItem';
67
67
  import {useActionSheet} from '../utils/useActionSheet';
68
68
  import {useWaitingRoomContext} from './contexts/WaitingRoomContext';
69
+ import {
70
+ toolbarItemChatText,
71
+ toolbarItemPeopleText,
72
+ } from '../language/default-labels/videoCallScreenLabels';
69
73
 
70
74
  export const ParticipantsCountView = ({
71
75
  isMobileView = false,
@@ -73,7 +77,7 @@ export const ParticipantsCountView = ({
73
77
  isMobileView?: boolean;
74
78
  }) => {
75
79
  const {onlineUsersCount} = useContext(ChatContext);
76
- const peopleLabel = useString('people')();
80
+ const peopleLabel = useString(toolbarItemPeopleText)();
77
81
  return isMobileView ? (
78
82
  <Text>
79
83
  {peopleLabel} {'\n'} ({numFormatter(onlineUsersCount)})
@@ -118,9 +122,9 @@ export const ParticipantsIconButton = (props: ParticipantsIconButtonProps) => {
118
122
  const {sidePanel, setSidePanel} = useSidePanel();
119
123
  const {isPendingRequestToReview, setLastCheckedRequestTimestamp} =
120
124
  useContext(LiveStreamContext);
121
- //commented for v1 release
125
+
122
126
  const {waitingRoomUids} = useWaitingRoomContext();
123
- const participantsLabel = useString('people')();
127
+ const participantsLabel = useString(toolbarItemPeopleText)();
124
128
  const isPanelActive = sidePanel === SidePanelType.Participants;
125
129
  const {
126
130
  data: {isHost},
@@ -243,8 +247,7 @@ export const ChatIconButton = (props: ChatIconButtonProps) => {
243
247
  const {setUnreadGroupMessageCount, totalUnreadCount} = useChatNotification();
244
248
  const {setChatType, setPrivateChatUser} = useChatUIControls();
245
249
 
246
- //commented for v1 release
247
- const chatLabel = useString('chat')();
250
+ const chatLabel = useString(toolbarItemChatText)();
248
251
 
249
252
  const isPanelActive = sidePanel === SidePanelType.Chat;
250
253
 
@@ -506,8 +509,6 @@ export interface NavbarProps {
506
509
  includeDefaultItems?: boolean;
507
510
  }
508
511
  const Navbar = (props: NavbarProps) => {
509
- //commented for v1 release
510
- //const recordingLabel = useString('recordingLabel')();
511
512
  const {customItems = [], includeDefaultItems = true} = props;
512
513
  const {width} = useWindowDimensions();
513
514
 
@@ -41,6 +41,14 @@ import {getGridLayoutName} from '../pages/video-call/DefaultLayouts';
41
41
  import {PeopleHeader} from '../pages/video-call/SidePanelHeader';
42
42
  import useCaptionWidth from '../../src/subComponents/caption/useCaptionWidth';
43
43
  import WaitingRoomParticipants from './participants/WaitingRoomParticipants';
44
+ import {
45
+ peoplePanelAudienceSectionHeaderText,
46
+ peoplePanelHostSectionHeaderText,
47
+ peoplePanelInThisMeetingLabel,
48
+ peoplePanelNoAudienceJoinedContent,
49
+ peoplePanelNoHostJoinedContent,
50
+ peoplePanelNoUsersJoinedContent,
51
+ } from '../../src/language/default-labels/videoCallScreenLabels';
44
52
 
45
53
  const ParticipantView = props => {
46
54
  const {activeUids, customContent, defaultContent} = useContent();
@@ -53,12 +61,12 @@ const ParticipantView = props => {
53
61
  const {sidePanel, setSidePanel} = useSidePanel();
54
62
  const {rtcProps} = useContext(PropsContext);
55
63
  const {showHeader = true} = props;
56
- const hostLabel = useString('host')();
57
- const audienceLabel = useString('audience')();
58
- const meetingParticpantsLabel = useString('inThisMeeting')();
59
- const noHostJoinedYet = useString('noHostJoinedYet')();
60
- const noAudienceJoinedYet = useString('noAudienceJoinedYet')();
61
- const noUsersJoinedYet = useString('noUsersJoinedYet')();
64
+ const hostLabel = useString(peoplePanelHostSectionHeaderText)();
65
+ const audienceLabel = useString(peoplePanelAudienceSectionHeaderText)();
66
+ const meetingParticpantsLabel = useString(peoplePanelInThisMeetingLabel)();
67
+ const noHostJoinedYet = useString(peoplePanelNoHostJoinedContent)();
68
+ const noAudienceJoinedYet = useString(peoplePanelNoAudienceJoinedContent)();
69
+ const noUsersJoinedYet = useString(peoplePanelNoUsersJoinedContent)();
62
70
  const {
63
71
  data: {isHost},
64
72
  } = useRoomInfo();
@@ -54,6 +54,10 @@ import Logo from '../components/common/Logo';
54
54
  import ImageIcon from '../atoms/ImageIcon';
55
55
  import {DeviceSelectProps} from './precall/selectDevice';
56
56
  import {useString} from '../utils/useString';
57
+ import {
58
+ precallYouAreJoiningAsHeading,
59
+ settingsPanelHeading,
60
+ } from '../language/default-labels/precallScreenLabels';
57
61
 
58
62
  const JoinRoomInputView = ({isDesktop}) => {
59
63
  const {rtcProps} = useContext(PropsContext);
@@ -221,8 +225,8 @@ const JoinRoomButton = () => {
221
225
  };
222
226
 
223
227
  const Precall = () => {
224
- const settingsLabel = useString('settings')();
225
- const youAreJoiningAs = useString('youAreJoiningAs')();
228
+ const settingsLabel = useString(settingsPanelHeading)();
229
+ const youAreJoiningAs = useString(precallYouAreJoiningAsHeading)();
226
230
  const {rtcProps} = useContext(PropsContext);
227
231
  const {height} = useWindowDimensions();
228
232
  // const {isVBActive, setIsVBActive} = useVB();
@@ -42,6 +42,7 @@ import {useRoomInfo} from '../components/room-info/useRoomInfo';
42
42
  import LocalEventEmitter, {
43
43
  LocalEventsEnum,
44
44
  } from '../rtm-events-api/LocalEvents';
45
+ import {PSTNUserLabel} from '../language/default-labels/videoCallScreenLabels';
45
46
  export enum UserType {
46
47
  ScreenShare = 'screenshare',
47
48
  }
@@ -75,14 +76,6 @@ const RtmConfigure = (props: any) => {
75
76
  const [hasUserJoinedRTM, setHasUserJoinedRTM] = useState<boolean>(false);
76
77
  const [onlineUsersCount, setTotalOnlineUsers] = useState<number>(0);
77
78
 
78
- //commented for v1 release
79
- // const userText = useString('remoteUserDefaultLabel')();
80
- const userText = 'User';
81
- const pstnUserLabel = useString('pstnUserLabel')();
82
- //commented for v1 release
83
- //const getScreenShareName = useString('screenshareUserName');
84
- const getScreenShareName = (name: string) => `${name}'s screenshare`;
85
-
86
79
  let engine = useRef<RtmEngine>(null!);
87
80
  const timerValueRef: any = useRef(5);
88
81
 
@@ -19,6 +19,7 @@ import IconButton, {IconButtonProps} from '../atoms/IconButton';
19
19
  import {useToolbarMenu} from '../utils/useMenu';
20
20
  import ToolbarMenuItem from '../atoms/ToolbarMenuItem';
21
21
  import {useActionSheet} from '../utils/useActionSheet';
22
+ import {toolbarItemSettingText} from '../language/default-labels/videoCallScreenLabels';
22
23
 
23
24
  export interface SettingsIconButtonProps {
24
25
  render?: (onPress: () => void, isPanelActive: boolean) => JSX.Element;
@@ -28,7 +29,7 @@ const Settings = (props: SettingsIconButtonProps) => {
28
29
  const {sidePanel, setSidePanel} = useSidePanel();
29
30
  const {isToolbarMenuItem} = useToolbarMenu();
30
31
  //commented for v1 release
31
- const settingsLabel = useString('settings')();
32
+ const settingsLabel = useString(toolbarItemSettingText)();
32
33
 
33
34
  const isPanelActive = sidePanel === SidePanelType.Settings;
34
35
  const onPress = () => {
@@ -49,11 +49,15 @@ import {whiteboardContext} from './whiteboard/WhiteboardConfigure';
49
49
  import InlineNotification from '../../src/atoms/InlineNotification';
50
50
  import {useRoomInfo} from './room-info/useRoomInfo';
51
51
  import {useString} from '../../src/utils/useString';
52
+ import {
53
+ settingPanelNameCantbeChangedInfo,
54
+ settingPanelNameInputLabel,
55
+ } from '../../src/language/default-labels/videoCallScreenLabels';
52
56
 
53
57
  interface EditNameProps {}
54
58
  const EditName: React.FC = (props?: EditNameProps) => {
55
- const yournameLabel = useString('yourName')();
56
- const nameCantbeChangedInfo = useString('nameCantbeChangedInfo')();
59
+ const yournameLabel = useString(settingPanelNameInputLabel)();
60
+ const nameCantbeChangedInfo = useString(settingPanelNameCantbeChangedInfo)();
57
61
  const {
58
62
  data: {isHost},
59
63
  } = useRoomInfo();
@@ -38,8 +38,19 @@ import ThemeConfig from '../theme';
38
38
  import Tooltip from '../atoms/Tooltip';
39
39
  import IDPLogoutComponent from '../auth/IDPLogoutComponent';
40
40
  import Clipboard from '../subComponents/Clipboard';
41
-
42
- const isLiveStream = $config.EVENT_MODE;
41
+ import {
42
+ shareRoomAttendeeLinkLabel,
43
+ shareRoomAttendeeLinkSubText,
44
+ shareRoomCopyBtnText,
45
+ shareRoomCopyBtnTooltipText,
46
+ shareRoomHostLinkLabel,
47
+ shareRoomHostLinkSubText,
48
+ shareRoomPSTNLabel,
49
+ shareRoomPSTNNumberLabel,
50
+ shareRoomPSTNPinLabel,
51
+ shareRoomPSTNSubText,
52
+ shareRoomStartBtnText,
53
+ } from '../language/default-labels/shareLinkScreenLabels';
43
54
 
44
55
  export interface CopyMeetingInfoProps {
45
56
  showSubLabel?: boolean;
@@ -51,39 +62,30 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
51
62
  } = useRoomInfo();
52
63
  const {showSubLabel = true} = props;
53
64
 
54
- const meetingUrlText = useString('roomLink')();
55
- const meetingIdText = useString('roomId')();
56
- const hostIdText = useString('hostId')();
57
- const attendeeUrlLabel = useString('attendeeLink')();
58
- const attendeeIdLabel = useString('attendeeId')();
59
- const hostUrlLabel = useString('hostLink')();
60
- const pstnLabel = useString('PSTN')();
61
- const pstnNumberLabel = useString('number')();
62
- const pinLabel = useString('pin')();
63
- const copiedToClipboard = useString('copiedToClipboard')();
64
- const sharePhoneNumber = useString('sharePhoneNumber')();
65
- const shareWithAttendee = useString('shareWithAttendee')();
66
- const shareWithCoHost = useString('shareWithCoHost')();
67
65
  const isSDK = isSDKCheck();
68
66
  const isWebCheck =
69
67
  $config.FRONTEND_ENDPOINT || (platform === 'web' && !isSDK);
70
68
 
71
- const getAttendeeLabel = () =>
72
- isWebCheck ? attendeeUrlLabel : attendeeIdLabel;
69
+ const shareRoomHostLink = useString<any>(shareRoomHostLinkLabel)(isWebCheck);
70
+ const shareRoomHostLinkSubTextLocal = useString<any>(
71
+ shareRoomHostLinkSubText,
72
+ )();
73
+ const shareRoomAttendeeLink = useString<any>(shareRoomAttendeeLinkLabel)(
74
+ isWebCheck,
75
+ );
76
+ const shareRoomAttendeeLinkSubTextLocal = useString<any>(
77
+ shareRoomAttendeeLinkSubText,
78
+ )();
79
+ const shareRoomPSTN = useString<any>(shareRoomPSTNLabel)();
80
+ const shareRoomPSTNNumber = useString<any>(shareRoomPSTNNumberLabel)();
81
+ const shareRoomPSTNPin = useString<any>(shareRoomPSTNPinLabel)();
82
+ const shareRoomPSTNSubTextLocal = useString<any>(shareRoomPSTNSubText)();
73
83
 
74
- const getHostLabel = () => {
75
- if (isSeparateHostLink) {
76
- if (isWebCheck) {
77
- return hostUrlLabel;
78
- }
79
- return hostIdText;
80
- } else {
81
- if (isWebCheck) {
82
- return meetingUrlText;
83
- }
84
- return meetingIdText;
85
- }
86
- };
84
+ const copiedToClipboard = useString(shareRoomCopyBtnTooltipText)();
85
+
86
+ const getAttendeeLabel = () => shareRoomAttendeeLink;
87
+
88
+ const getHostLabel = () => shareRoomHostLink;
87
89
 
88
90
  const clipboardIconButton = (type: SHARE_LINK_CONTENT_TYPE) => {
89
91
  return (
@@ -151,7 +153,9 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
151
153
  {showSubLabel && (
152
154
  <>
153
155
  <Spacer size={14} />
154
- <Text style={style.helpText}>{shareWithAttendee}</Text>
156
+ <Text style={style.helpText}>
157
+ {shareRoomAttendeeLinkSubTextLocal}
158
+ </Text>
155
159
  </>
156
160
  )}
157
161
  <Spacer size={25} />
@@ -183,7 +187,9 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
183
187
  {showSubLabel && (
184
188
  <>
185
189
  <Spacer size={14} />
186
- <Text style={style.helpText}>{shareWithCoHost}</Text>
190
+ <Text style={style.helpText}>
191
+ {shareRoomHostLinkSubTextLocal}
192
+ </Text>
187
193
  </>
188
194
  )}
189
195
  <Spacer size={25} />
@@ -193,7 +199,7 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
193
199
  )}
194
200
  {$config.PSTN && pstn && pstn?.number && pstn?.pin ? (
195
201
  <>
196
- <Text style={style.urlTitle}>{pstnLabel}</Text>
202
+ <Text style={style.urlTitle}>{shareRoomPSTN}</Text>
197
203
  <Spacer size={11} />
198
204
  <View style={style.container}>
199
205
  <View style={[style.urlContainer, style.urlPadding]}>
@@ -204,8 +210,8 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
204
210
  //@ts-ignore
205
211
  isWebCheck ? urlWeb : {opacity: 1},
206
212
  ]}>
207
- {pstnNumberLabel} - {pstn?.number} {' | '} {pinLabel} -{' '}
208
- {pstn?.pin}
213
+ {shareRoomPSTNNumber} - {pstn?.number} {' | '}{' '}
214
+ {shareRoomPSTNPin} - {pstn?.pin}
209
215
  </Text>
210
216
  </View>
211
217
  </View>
@@ -215,7 +221,7 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
215
221
  {showSubLabel && (
216
222
  <>
217
223
  <Spacer size={14} />
218
- <Text style={style.helpText}>{sharePhoneNumber}</Text>
224
+ <Text style={style.helpText}>{shareRoomPSTNSubTextLocal}</Text>
219
225
  </>
220
226
  )}
221
227
  {/* <Spacer size={25} /> */}
@@ -228,7 +234,7 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
228
234
  };
229
235
 
230
236
  const ClipboardIconButtonURL = ({url}) => {
231
- const copiedToClipboard = useString('copiedToClipboard')();
237
+ const copiedToClipboard = useString(shareRoomCopyBtnTooltipText)();
232
238
  return (
233
239
  <View style={style.iconContainer}>
234
240
  <Tooltip
@@ -329,11 +335,11 @@ const Share = () => {
329
335
  data: {roomId, meetingTitle},
330
336
  } = useRoomInfo();
331
337
 
332
- const startRoom = useString('startRoom')();
333
- const startStream = useString('startStream')();
338
+ const shareRoomStartBtnTextLocal = useString<any>(shareRoomStartBtnText)({
339
+ eventMode: $config.EVENT_MODE,
340
+ });
334
341
 
335
- const enterMeetingAfterCreateButton = isLiveStream ? startStream : startRoom;
336
- const copyInviteButton = useString('copyInviteButton')();
342
+ const copyInviteButton = useString(shareRoomCopyBtnText)();
337
343
  const history = useHistory();
338
344
  const enterMeeting = () => {
339
345
  if (roomId?.host) {
@@ -381,7 +387,7 @@ const Share = () => {
381
387
  iconName="video-on"
382
388
  onPress={() => enterMeeting()}
383
389
  containerStyle={isMobileUA() && {width: '100%'}}
384
- text={enterMeetingAfterCreateButton.toUpperCase()}
390
+ text={shareRoomStartBtnTextLocal}
385
391
  />
386
392
  <Spacer size={16} />
387
393
  <LinkButton
@@ -29,6 +29,15 @@ import {useSidePanel} from '../../utils/useSidePanel';
29
29
  import getUniqueID from '../../utils/getUniqueID';
30
30
  import {trimText} from '../../utils/common';
31
31
  import {useString} from '../../utils/useString';
32
+ import {
33
+ publicChatToastHeading,
34
+ multiplePublicChatToastHeading,
35
+ multiplePrivateChatToastHeading,
36
+ privateChatToastHeading,
37
+ multiplePublicAndPrivateChatToastHeading,
38
+ multiplePublicAndPrivateChatToastSubHeading,
39
+ multiplePublicChatToastSubHeading,
40
+ } from '../../language/default-labels/videoCallScreenLabels';
32
41
 
33
42
  enum ChatMessageActionEnum {
34
43
  Create = 'Create_Chat_Message',
@@ -99,34 +108,34 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
99
108
  const individualActiveRef = useRef<string | number>();
100
109
 
101
110
  //public single
102
- const fromText = useString('publicChatToastHeading');
111
+ const fromText = useString(publicChatToastHeading);
103
112
 
104
113
  //public multple
105
- const multiplePublicChatToastHeading = useString(
106
- 'multiplePublicChatToastHeading',
114
+ const multiplePublicChatToastHeadingTT = useString(
115
+ multiplePublicChatToastHeading,
107
116
  )();
108
- const multiplePublicChatToastSubHeading = useString<{
117
+ const multiplePublicChatToastSubHeadingTT = useString<{
109
118
  count: number;
110
119
  from: string;
111
- }>('multiplePublicChatToastSubHeading');
120
+ }>(multiplePublicChatToastSubHeading);
112
121
 
113
122
  //private single
114
- const privateMessageLabel = useString('privateChatToastHeading')();
123
+ const privateMessageLabel = useString(privateChatToastHeading)();
115
124
 
116
125
  //private multiple
117
- const multiplePrivateChatToastHeading = useString<{count: number}>(
118
- 'multiplePrivateChatToastHeading',
126
+ const multiplePrivateChatToastHeadingTT = useString<{count: number}>(
127
+ multiplePrivateChatToastHeading,
119
128
  );
120
129
 
121
130
  //multiple private and public toast
122
- const multiplePublicAndPrivateChatToastHeading = useString(
123
- 'multiplePublicAndPrivateChatToastHeading',
131
+ const multiplePublicAndPrivateChatToastHeadingTT = useString(
132
+ multiplePublicAndPrivateChatToastHeading,
124
133
  )();
125
- const multiplePublicAndPrivateChatToastSubHeading = useString<{
134
+ const multiplePublicAndPrivateChatToastSubHeadingTT = useString<{
126
135
  publicChatCount: number;
127
136
  privateChatCount: number;
128
137
  from: string;
129
- }>('multiplePublicAndPrivateChatToastSubHeading');
138
+ }>(multiplePublicAndPrivateChatToastSubHeading);
130
139
 
131
140
  useEffect(() => {
132
141
  callActiveRef.current.callActive = callActive;
@@ -252,16 +261,16 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
252
261
  leadingIconName: 'chat-nav',
253
262
  text1:
254
263
  privateMessages && privateMessages.length
255
- ? multiplePublicAndPrivateChatToastHeading
256
- : multiplePublicChatToastHeading,
264
+ ? multiplePublicAndPrivateChatToastHeadingTT
265
+ : multiplePublicChatToastHeadingTT,
257
266
  text2:
258
267
  privateMessages && privateMessages.length
259
- ? multiplePublicAndPrivateChatToastSubHeading({
268
+ ? multiplePublicAndPrivateChatToastSubHeadingTT({
260
269
  publicChatCount: publicMessages.length,
261
270
  privateChatCount: privateMessages.length,
262
271
  from: fromNames,
263
272
  })
264
- : multiplePublicChatToastSubHeading({
273
+ : multiplePublicChatToastSubHeadingTT({
265
274
  count: publicMessages.length,
266
275
  from: fromNames,
267
276
  }),
@@ -288,7 +297,7 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
288
297
  secondaryBtn: null,
289
298
  type: 'info',
290
299
  leadingIconName: 'chat-nav',
291
- text1: multiplePrivateChatToastHeading({
300
+ text1: multiplePrivateChatToastHeadingTT({
292
301
  count: privateMessages.length,
293
302
  }),
294
303
  text2: ``,
@@ -22,6 +22,11 @@ import TertiaryButton from '../../atoms/TertiaryButton';
22
22
  import PrimaryButton from '../../atoms/PrimaryButton';
23
23
  import {trimText} from '../../utils/common';
24
24
  import {useString} from '../../utils/useString';
25
+ import {
26
+ livestreamRequestAlreadyProcessed,
27
+ livestreamToastApprovalBtnText,
28
+ livestreamToastDenyBtnText,
29
+ } from '../../language/default-labels/videoCallScreenLabels';
25
30
 
26
31
  const LiveStreamContext = createContext(null as unknown as liveStreamContext);
27
32
 
@@ -30,7 +35,9 @@ export const LiveStreamContextConsumer = LiveStreamContext.Consumer;
30
35
  export const LiveStreamContextProvider: React.FC<
31
36
  liveStreamPropsInterface
32
37
  > = props => {
33
- const requestAlreadyProcessed = useString('requestAlreadyProcessed')();
38
+ const requestAlreadyProcessed = useString(
39
+ livestreamRequestAlreadyProcessed,
40
+ )();
34
41
 
35
42
  const raiseHandRequestReceivedToastHeading = useString(
36
43
  LSNotificationObject.RAISE_HAND_RECEIVED.text1TranslationKey,
@@ -157,8 +164,8 @@ export const LiveStreamContextProvider: React.FC<
157
164
 
158
165
  const [isPendingRequestToReview, setPendingRequestToReview] = useState(false);
159
166
 
160
- const allowToBePresenter = useString('allowToBePresenter')();
161
- const deny = useString('deny')();
167
+ const allowToBePresenter = useString(livestreamToastApprovalBtnText)();
168
+ const deny = useString(livestreamToastDenyBtnText)();
162
169
  const showToast = (
163
170
  text: string,
164
171
  text2: string,