agora-appbuilder-core 3.0.8 → 4.0.0-api.0

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 (341) hide show
  1. package/Readme.md +6 -0
  2. package/package.json +2 -2
  3. package/template/_package-lock.json +32828 -2777
  4. package/template/agora-rn-uikit/src/AgoraUIKit.tsx +6 -6
  5. package/template/agora-rn-uikit/src/Contexts/ContentContext.tsx +10 -0
  6. package/template/agora-rn-uikit/src/Contexts/DispatchContext.tsx +22 -0
  7. package/template/agora-rn-uikit/src/Contexts/LocalUserContext.tsx +10 -6
  8. package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +28 -8
  9. package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +7 -15
  10. package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +30 -26
  11. package/template/agora-rn-uikit/src/Controls/Icons.ts +30 -83
  12. package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +6 -6
  13. package/template/agora-rn-uikit/src/Controls/Local/LocalAudioMute.tsx +4 -2
  14. package/template/agora-rn-uikit/src/Controls/Local/LocalVideoMute.tsx +4 -2
  15. package/template/agora-rn-uikit/src/Controls/Local/Recording.tsx +0 -2
  16. package/template/agora-rn-uikit/src/Controls/Local/SwitchCamera.tsx +6 -6
  17. package/template/agora-rn-uikit/src/Controls/LocalControls.tsx +5 -5
  18. package/template/agora-rn-uikit/src/Controls/Remote/RemoteAudioMute.tsx +4 -4
  19. package/template/agora-rn-uikit/src/Controls/Remote/RemoteVideoMute.tsx +4 -4
  20. package/template/agora-rn-uikit/src/Controls/RemoteControls.tsx +2 -2
  21. package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +6 -6
  22. package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +6 -6
  23. package/template/agora-rn-uikit/src/Reducer/LocalPermissionState.ts +23 -0
  24. package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +6 -6
  25. package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +7 -7
  26. package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +7 -7
  27. package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +10 -10
  28. package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +6 -6
  29. package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +6 -6
  30. package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +5 -5
  31. package/template/agora-rn-uikit/src/Reducer/UserPin.ts +11 -0
  32. package/template/agora-rn-uikit/src/Reducer/index.ts +2 -0
  33. package/template/agora-rn-uikit/src/Rtc/Create.tsx +74 -7
  34. package/template/agora-rn-uikit/src/Rtc/Join.tsx +5 -4
  35. package/template/agora-rn-uikit/src/RtcConfigure.tsx +76 -49
  36. package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +17 -7
  37. package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +17 -11
  38. package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +2 -2
  39. package/template/agora-rn-uikit/src/index.ts +17 -9
  40. package/template/android/app/build.gradle +1 -0
  41. package/template/android/app/src/main/AndroidManifest.xml +22 -15
  42. package/template/android/app/src/main/assets/fonts/SourceSansPro-Regular.ttf +0 -0
  43. package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
  44. package/template/android/app/src/main/java/com/helloworld/MainActivity.java +50 -0
  45. package/template/android/app/src/main/res/values/colors.xml +7 -0
  46. package/template/android/build.gradle +3 -3
  47. package/template/babel.config.js +1 -0
  48. package/template/bridge/rtc/webNg/RtcEngine.ts +110 -17
  49. package/template/customization-api/action-library.ts +10 -14
  50. package/template/customization-api/app-state.ts +4 -6
  51. package/template/customization-api/customEvents.ts +2 -2
  52. package/template/customization-api/customize.ts +1 -1
  53. package/template/customization-api/sub-components.ts +4 -12
  54. package/template/customization-api/typeDefinition.ts +15 -38
  55. package/template/customization-implementation/createHook.ts +24 -6
  56. package/template/customization-implementation/index.ts +1 -1
  57. package/template/customization-implementation/useCustomization.tsx +5 -7
  58. package/template/electron/index.html +27 -27
  59. package/template/electron/renderer/index.js +1 -0
  60. package/template/global.d.ts +26 -4
  61. package/template/index.rsdk.tsx +1 -0
  62. package/template/index.web.js +2 -1
  63. package/template/index.wsdk.tsx +9 -2
  64. package/template/ios/HelloWorld/Info.plist +14 -1
  65. package/template/ios/HelloWorld.xcodeproj/project.pbxproj +17 -0
  66. package/template/metro.config.js +1 -1
  67. package/template/package.json +18 -7
  68. package/template/react-native-toast-message/index.d.ts +43 -43
  69. package/template/react-native-toast-message/src/colors/index.js +3 -2
  70. package/template/react-native-toast-message/src/components/base/index.js +46 -59
  71. package/template/react-native-toast-message/src/components/base/styles.js +16 -32
  72. package/template/react-native-toast-message/src/components/checkbox.js +178 -0
  73. package/template/react-native-toast-message/src/components/error.js +3 -2
  74. package/template/react-native-toast-message/src/components/info.js +3 -2
  75. package/template/react-native-toast-message/src/components/success.js +3 -2
  76. package/template/react-native-toast-message/src/index.js +122 -31
  77. package/template/react-native-toast-message/src/index.sdk.tsx +125 -35
  78. package/template/react-native-toast-message/src/styles.js +3 -4
  79. package/template/react-native-toast-message/src/styles.sdk.ts +3 -4
  80. package/template/react-native.config.js +7 -0
  81. package/template/src/App.tsx +19 -14
  82. package/template/src/AppWrapper.tsx +74 -29
  83. package/template/src/SDKAppWrapper.tsx +60 -64
  84. package/template/src/app-state/useLocalUserInfo.ts +3 -3
  85. package/template/src/assets/font-styles.css +329 -0
  86. package/template/src/assets/fonts/SourceSansPro-Regular.ttf +0 -0
  87. package/template/src/assets/fonts/icomoon.ttf +0 -0
  88. package/template/src/assets/permission.png +0 -0
  89. package/template/src/assets/selection.json +1 -0
  90. package/template/src/atoms/ActionMenu.tsx +236 -0
  91. package/template/src/atoms/AnimatedActiveSpeaker.native.tsx +71 -0
  92. package/template/src/atoms/AnimatedActiveSpeaker.tsx +84 -0
  93. package/template/src/atoms/AnimatedRings.native.tsx +68 -0
  94. package/template/src/atoms/AnimatedRings.tsx +70 -0
  95. package/template/src/atoms/Card.tsx +61 -0
  96. package/template/src/atoms/CircularProgress.native.tsx +121 -0
  97. package/template/src/atoms/CircularProgress.tsx +102 -0
  98. package/template/src/atoms/CustomIcon.tsx +88 -0
  99. package/template/src/atoms/CustomSwitch.tsx +287 -0
  100. package/template/src/atoms/Dropdown.tsx +306 -0
  101. package/template/src/atoms/HorizontalRule.tsx +3 -1
  102. package/template/src/atoms/IconButton.tsx +162 -0
  103. package/template/src/atoms/ImageIcon.tsx +98 -0
  104. package/template/src/atoms/InfoBubble.tsx +291 -0
  105. package/template/src/atoms/Input.tsx +87 -0
  106. package/template/src/atoms/InviteInfo.tsx +166 -0
  107. package/template/src/atoms/LinkButton.tsx +28 -0
  108. package/template/src/atoms/OutlineButton.tsx +61 -0
  109. package/template/src/atoms/ParticipantsCount.tsx +74 -0
  110. package/template/src/atoms/Popup.tsx +147 -0
  111. package/template/src/atoms/PrimaryButton.tsx +51 -26
  112. package/template/src/atoms/RecordingInfo.tsx +52 -0
  113. package/template/src/atoms/SecondaryButton.tsx +8 -5
  114. package/template/src/atoms/Spacer.tsx +22 -0
  115. package/template/src/atoms/TertiaryButton.tsx +78 -0
  116. package/template/src/atoms/TextInput.tsx +12 -14
  117. package/template/src/atoms/Toggle.tsx +47 -0
  118. package/template/src/atoms/Toolbar.tsx +68 -0
  119. package/template/src/atoms/ToolbarItem.tsx +63 -0
  120. package/template/src/atoms/Tooltip.native.tsx +65 -0
  121. package/template/src/atoms/Tooltip.tsx +94 -0
  122. package/template/src/atoms/UserAvatar.tsx +60 -0
  123. package/template/src/components/Chat.tsx +164 -278
  124. package/template/src/components/ChatContext.ts +8 -1
  125. package/template/src/components/ColorConfigure.tsx +1 -1
  126. package/template/src/components/ColorContext.ts +1 -1
  127. package/template/src/components/CommonStyles.ts +44 -0
  128. package/template/src/components/Controls.tsx +331 -73
  129. package/template/src/components/{Controls.native.tsx → Controls1.native.tsx} +8 -6
  130. package/template/src/components/DeviceConfigure.tsx +511 -102
  131. package/template/src/components/DeviceContext.tsx +8 -4
  132. package/template/src/components/EventsConfigure.tsx +192 -10
  133. package/template/src/components/GraphQLProvider.tsx +1 -1
  134. package/template/src/components/GridVideo.tsx +60 -45
  135. package/template/src/components/HostControlView.tsx +114 -35
  136. package/template/src/components/Navbar.tsx +219 -437
  137. package/template/src/components/Navigation.tsx +15 -1
  138. package/template/src/components/NetworkQualityContext.tsx +22 -22
  139. package/template/src/components/ParticipantsView.tsx +178 -156
  140. package/template/src/components/PinnedVideo.tsx +206 -121
  141. package/template/src/components/Precall.native.tsx +358 -119
  142. package/template/src/components/Precall.tsx +272 -138
  143. package/template/src/components/RTMConfigure.tsx +66 -19
  144. package/template/src/components/Router.electron.ts +1 -0
  145. package/template/src/components/Router.native.ts +1 -0
  146. package/template/src/components/Router.sdk.ts +1 -0
  147. package/template/src/components/Router.ts +1 -0
  148. package/template/src/components/SdkApiContext.tsx +161 -0
  149. package/template/src/components/Settings.tsx +26 -95
  150. package/template/src/components/SettingsView.tsx +251 -56
  151. package/template/src/components/Share.tsx +305 -276
  152. package/template/src/components/StorageContext.tsx +30 -3
  153. package/template/src/components/ToastComponent.tsx +8 -0
  154. package/template/src/components/chat-messages/useChatMessages.tsx +97 -50
  155. package/template/src/components/chat-ui/useChatUIControls.tsx +76 -0
  156. package/template/src/components/common/Error.tsx +20 -6
  157. package/template/src/components/common/Logo.tsx +16 -15
  158. package/template/src/components/contexts/LiveStreamDataContext.tsx +16 -11
  159. package/template/src/components/contexts/VideoMeetingDataContext.tsx +41 -11
  160. package/template/src/components/contexts/WhiteboardContext.tsx +3 -3
  161. package/template/src/components/livestream/LiveStreamContext.tsx +284 -50
  162. package/template/src/components/livestream/Types.ts +39 -14
  163. package/template/src/components/livestream/index.ts +1 -0
  164. package/template/src/components/livestream/views/LiveStreamControls.tsx +9 -4
  165. package/template/src/components/participants/AllAudienceParticipants.tsx +102 -31
  166. package/template/src/components/participants/AllHostParticipants.tsx +106 -35
  167. package/template/src/components/participants/Participant.tsx +300 -0
  168. package/template/src/components/participants/ParticipantName.tsx +13 -7
  169. package/template/src/components/participants/ParticipantSectionTitle.tsx +35 -10
  170. package/template/src/components/participants/ScreenshareParticipants.tsx +144 -12
  171. package/template/src/components/participants/UserActionMenuOptions.tsx +396 -0
  172. package/template/src/components/popups/InvitePopup.tsx +115 -0
  173. package/template/src/components/popups/StopRecordingPopup.tsx +114 -0
  174. package/template/src/components/precall/LocalMute.tsx +84 -14
  175. package/template/src/components/precall/{LocalMute.native.tsx → LocalMute1.native.tsx} +21 -5
  176. package/template/src/components/precall/PermissionHelper.native.tsx +5 -0
  177. package/template/src/components/precall/PermissionHelper.tsx +126 -0
  178. package/template/src/components/precall/PreCallSettings.tsx +52 -0
  179. package/template/src/components/precall/VideoPreview.native.tsx +51 -6
  180. package/template/src/components/precall/VideoPreview.tsx +164 -8
  181. package/template/src/components/precall/joinCallBtn.native.tsx +2 -2
  182. package/template/src/components/precall/joinCallBtn.tsx +17 -4
  183. package/template/src/components/precall/meetingTitle.tsx +17 -14
  184. package/template/src/components/precall/selectDevice.tsx +1 -21
  185. package/template/src/components/precall/textInput.tsx +34 -6
  186. package/template/src/components/precall/usePreCall.tsx +39 -1
  187. package/template/src/components/{meeting-info/useMeetingInfo.tsx → room-info/useRoomInfo.tsx} +34 -10
  188. package/template/src/components/{meeting-info/useSetMeetingInfo.tsx → room-info/useSetRoomInfo.tsx} +12 -12
  189. package/template/src/components/styles.ts +42 -21
  190. package/template/src/components/useShareLink.tsx +19 -21
  191. package/template/src/components/useToast.tsx +41 -0
  192. package/template/src/components/useUserPreference.tsx +9 -6
  193. package/template/src/components/useVideoCall.tsx +84 -0
  194. package/template/src/language/default-labels/createScreenLabels.ts +3 -3
  195. package/template/src/language/default-labels/joinScreenLabels.ts +2 -2
  196. package/template/src/language/default-labels/precallScreenLabels.ts +3 -3
  197. package/template/src/language/default-labels/shareLinkScreenLabels.ts +5 -5
  198. package/template/src/language/default-labels/videoCallScreenLabels.ts +5 -5
  199. package/template/src/pages/Authenticate.tsx +5 -15
  200. package/template/src/pages/Create.tsx +304 -191
  201. package/template/src/pages/Endcall.tsx +148 -0
  202. package/template/src/pages/Join.tsx +96 -70
  203. package/template/src/pages/VideoCall.tsx +179 -69
  204. package/template/src/pages/video-call/ActionSheet.native.tsx +215 -0
  205. package/template/src/pages/video-call/ActionSheet.tsx +226 -0
  206. package/template/src/pages/video-call/ActionSheetContent.tsx +479 -0
  207. package/template/src/pages/video-call/ActionSheetHandle.tsx +38 -0
  208. package/template/src/pages/video-call/ActionSheetStyles.css +138 -0
  209. package/template/src/pages/video-call/DefaultLayouts.ts +6 -6
  210. package/template/src/pages/video-call/NameWithMicIcon.tsx +93 -49
  211. package/template/src/pages/video-call/RenderComponent.tsx +6 -30
  212. package/template/src/pages/video-call/SidePanelHeader.tsx +186 -0
  213. package/template/src/pages/video-call/VideoCallMobileView.tsx +138 -0
  214. package/template/src/pages/video-call/VideoCallScreen.native.tsx +37 -0
  215. package/template/src/pages/video-call/VideoCallScreen.tsx +109 -66
  216. package/template/src/pages/video-call/VideoComponent.tsx +20 -4
  217. package/template/src/pages/video-call/VideoRenderer.tsx +227 -61
  218. package/template/src/pages/video-call/index.ts +35 -7
  219. package/template/src/rtm/RTMEngine.ts +8 -0
  220. package/template/src/rtm-events/constants.ts +3 -1
  221. package/template/src/rtm-events-api/Events.ts +5 -4
  222. package/template/src/rtm-events-api/LocalEvents.ts +6 -0
  223. package/template/src/rtm-events-api/types.ts +5 -5
  224. package/template/src/subComponents/ChatBubble.tsx +125 -84
  225. package/template/src/subComponents/ChatContainer.tsx +280 -93
  226. package/template/src/subComponents/ChatInput.ios.tsx +175 -0
  227. package/template/src/subComponents/ChatInput.tsx +72 -115
  228. package/template/src/subComponents/Checkbox.native.tsx +16 -5
  229. package/template/src/subComponents/Checkbox.tsx +2 -2
  230. package/template/src/subComponents/CopyJoinInfo.tsx +36 -58
  231. package/template/src/subComponents/EndcallPopup.tsx +107 -0
  232. package/template/src/subComponents/FallbackLogo.tsx +122 -40
  233. package/template/src/subComponents/LanguageSelector.tsx +1 -1
  234. package/template/src/subComponents/LayoutIconButton.tsx +201 -0
  235. package/template/src/subComponents/LayoutIconDropdown.tsx +131 -134
  236. package/template/src/subComponents/{LayoutIconDropdown.native.tsx → LayoutIconDropdown1.native.tsx} +4 -18
  237. package/template/src/subComponents/LocalAudioMute.tsx +119 -27
  238. package/template/src/subComponents/LocalEndCall.tsx +73 -35
  239. package/template/src/subComponents/LocalSwitchCamera.tsx +19 -32
  240. package/template/src/subComponents/LocalVideoMute.tsx +117 -27
  241. package/template/src/subComponents/Logo.tsx +3 -4
  242. package/template/src/subComponents/LogoutButton.tsx +1 -1
  243. package/template/src/subComponents/NetworkQualityPill.tsx +66 -68
  244. package/template/src/subComponents/OpenInNativeButton.tsx +3 -3
  245. package/template/src/subComponents/Recording.tsx +28 -29
  246. package/template/src/subComponents/RemoteAudioMute.tsx +83 -29
  247. package/template/src/subComponents/RemoteEndCall.tsx +8 -5
  248. package/template/src/subComponents/RemoteMutePopup.tsx +193 -0
  249. package/template/src/subComponents/RemoteVideoMute.tsx +74 -21
  250. package/template/src/subComponents/RemoveMeetingPopup.tsx +109 -0
  251. package/template/src/subComponents/RemoveScreensharePopup.tsx +109 -0
  252. package/template/src/subComponents/ScreenShareNotice.tsx +83 -8
  253. package/template/src/subComponents/SelectDevice.tsx +404 -61
  254. package/template/src/subComponents/SelectDeviceSettings.backup.tsx +207 -0
  255. package/template/src/subComponents/SelectOAuth.tsx +9 -8
  256. package/template/src/subComponents/SidePanelButtons.ts +0 -3
  257. package/template/src/subComponents/SidePanelHeader.tsx +112 -0
  258. package/template/src/subComponents/ToastConfig.tsx +150 -10
  259. package/template/src/subComponents/chat/ChatParticipants.tsx +188 -79
  260. package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +97 -34
  261. package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +29 -33
  262. package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +8 -8
  263. package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +24 -11
  264. package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +17 -10
  265. package/template/src/subComponents/recording/useRecording.tsx +81 -29
  266. package/template/src/subComponents/screenshare/ScreenshareButton.tsx +52 -70
  267. package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +23 -12
  268. package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +44 -19
  269. package/template/src/theme/index.ts +46 -0
  270. package/template/src/utils/PlatformWrapper.tsx +21 -0
  271. package/template/src/utils/SdkEvents.ts +23 -14
  272. package/template/src/utils/SdkMethodEvents.ts +81 -0
  273. package/template/src/utils/common.tsx +155 -1
  274. package/template/src/utils/hexadecimalTransparency.ts +108 -0
  275. package/template/src/utils/index.tsx +19 -0
  276. package/template/src/utils/isMobileOrTablet.ts +7 -2
  277. package/template/src/utils/pendingStateUpdateHelper.ts +19 -0
  278. package/template/src/utils/useActiveSpeaker.ts +42 -0
  279. package/template/src/utils/{useCreateMeeting.ts → useCreateRoom.ts} +19 -14
  280. package/template/src/utils/{useButtonTemplate.tsx → useFocus.tsx} +19 -16
  281. package/template/src/utils/useGetMeetingPhrase.ts +10 -10
  282. package/template/src/utils/useIsAudioEnabled.ts +3 -3
  283. package/template/src/utils/useIsHandRaised.ts +13 -0
  284. package/template/src/utils/useIsPSTN.ts +3 -3
  285. package/template/src/utils/useIsVideoEnabled.ts +3 -3
  286. package/template/src/utils/{useJoinMeeting.ts → useJoinRoom.ts} +27 -21
  287. package/template/src/utils/useMutePSTN.ts +2 -2
  288. package/template/src/utils/useMuteToggleLocal.ts +58 -5
  289. package/template/src/utils/useRemoteEndCall.ts +4 -4
  290. package/template/src/utils/useRemoteEndScreenshare.ts +26 -0
  291. package/template/src/utils/useRemoteMute.ts +7 -7
  292. package/template/src/utils/useRemoteRequest.ts +84 -0
  293. package/template/src/utils/useSwitchCamera.native.tsx +25 -0
  294. package/template/src/utils/useSwitchCamera.tsx +19 -0
  295. package/template/src/utils/useToolbar.tsx +59 -0
  296. package/template/web/index.html +5 -0
  297. package/template/webpack.commons.js +13 -8
  298. package/template/webpack.rsdk.config.js +1 -2
  299. package/template/webpack.web.config.js +1 -0
  300. package/template/agora-rn-uikit/.git/HEAD +0 -1
  301. package/template/agora-rn-uikit/.git/config +0 -16
  302. package/template/agora-rn-uikit/.git/description +0 -1
  303. package/template/agora-rn-uikit/.git/hooks/applypatch-msg.sample +0 -15
  304. package/template/agora-rn-uikit/.git/hooks/commit-msg.sample +0 -24
  305. package/template/agora-rn-uikit/.git/hooks/fsmonitor-watchman.sample +0 -174
  306. package/template/agora-rn-uikit/.git/hooks/post-update.sample +0 -8
  307. package/template/agora-rn-uikit/.git/hooks/pre-applypatch.sample +0 -14
  308. package/template/agora-rn-uikit/.git/hooks/pre-commit.sample +0 -49
  309. package/template/agora-rn-uikit/.git/hooks/pre-merge-commit.sample +0 -13
  310. package/template/agora-rn-uikit/.git/hooks/pre-push.sample +0 -53
  311. package/template/agora-rn-uikit/.git/hooks/pre-rebase.sample +0 -169
  312. package/template/agora-rn-uikit/.git/hooks/pre-receive.sample +0 -24
  313. package/template/agora-rn-uikit/.git/hooks/prepare-commit-msg.sample +0 -42
  314. package/template/agora-rn-uikit/.git/hooks/push-to-checkout.sample +0 -78
  315. package/template/agora-rn-uikit/.git/hooks/update.sample +0 -128
  316. package/template/agora-rn-uikit/.git/index +0 -0
  317. package/template/agora-rn-uikit/.git/info/exclude +0 -6
  318. package/template/agora-rn-uikit/.git/logs/HEAD +0 -2
  319. package/template/agora-rn-uikit/.git/logs/refs/heads/master +0 -1
  320. package/template/agora-rn-uikit/.git/logs/refs/heads/release/fpe-1.0.1 +0 -1
  321. package/template/agora-rn-uikit/.git/logs/refs/remotes/origin/HEAD +0 -1
  322. package/template/agora-rn-uikit/.git/objects/pack/pack-baa9cf4109c3e8528f39535764621cee252b2b77.idx +0 -0
  323. package/template/agora-rn-uikit/.git/objects/pack/pack-baa9cf4109c3e8528f39535764621cee252b2b77.pack +0 -0
  324. package/template/agora-rn-uikit/.git/packed-refs +0 -49
  325. package/template/agora-rn-uikit/.git/refs/heads/master +0 -1
  326. package/template/agora-rn-uikit/.git/refs/heads/release/fpe-1.0.1 +0 -1
  327. package/template/agora-rn-uikit/.git/refs/remotes/origin/HEAD +0 -1
  328. package/template/agora-rn-uikit/.gitignore +0 -63
  329. package/template/agora-rn-uikit/package-lock.json +0 -7612
  330. package/template/agora-rn-uikit/src/Contexts/RenderContext.tsx +0 -10
  331. package/template/package-lock.json +0 -22543
  332. package/template/react-native-toast-message/.gitignore +0 -5
  333. package/template/react-native-toast-message/.npmignore +0 -5
  334. package/template/react-native-toast-message/package-lock.json +0 -10553
  335. package/template/src/.DS_Store +0 -0
  336. package/template/src/assets/icons.ts +0 -102
  337. package/template/src/components/chat-ui/useChatUIControl.tsx +0 -69
  338. package/template/src/components/participants/MeParticipant.tsx +0 -38
  339. package/template/src/components/participants/RemoteParticipants.tsx +0 -71
  340. package/template/src/pages/video-call/CustomUserContextHolder.tsx +0 -20
  341. package/template/src/subComponents/.DS_Store +0 -0
@@ -10,66 +10,71 @@
10
10
  *********************************************
11
11
  */
12
12
  import React, {useContext, useState} from 'react';
13
- import {View, Text, StyleSheet, ViewStyle, TextStyle} from 'react-native';
14
- import icons from '../assets/icons';
13
+ import {
14
+ View,
15
+ Text,
16
+ StyleSheet,
17
+ TextStyle,
18
+ useWindowDimensions,
19
+ } from 'react-native';
15
20
  import Settings, {
16
21
  SettingsWithViewWrapper,
17
22
  SettingsIconButtonProps,
18
23
  } from './Settings';
19
24
  import CopyJoinInfo, {CopyJoinInfoProps} from '../subComponents/CopyJoinInfo';
20
25
  import {SidePanelType} from '../subComponents/SidePanelEnum';
21
- import {navHolder} from '../../theme.json';
22
26
  import ChatContext from '../components/ChatContext';
23
27
  import isMobileOrTablet from '../utils/isMobileOrTablet';
24
- import {
25
- BtnTemplate,
26
- BtnTemplateInterface,
27
- ImageIcon,
28
- } from '../../agora-rn-uikit';
29
28
  import LiveStreamContext from './livestream';
30
29
  import {numFormatter} from '../utils/index';
31
30
  import {useLayout} from '../utils/useLayout';
32
31
  import {useChatNotification} from '../components/chat-notification/useChatNotification';
33
32
  import useLayoutsData from '../pages/video-call/useLayoutsData';
34
33
  import {
34
+ BREAKPOINTS,
35
35
  isAndroid,
36
36
  isIOS,
37
+ isMobileUA,
37
38
  isValidReactComponent,
38
39
  isWebInternal,
40
+ trimText,
41
+ useIsDesktop,
39
42
  } from '../utils/common';
40
43
  import {useChangeDefaultLayout} from '../pages/video-call/DefaultLayouts';
41
44
  import {useRecording} from '../subComponents/recording/useRecording';
42
45
  import LayoutIconDropdown from '../subComponents/LayoutIconDropdown';
43
- import DimensionContext from './dimension/DimensionContext';
44
46
  import {useString} from '../utils/useString';
45
- import {useMeetingInfo} from './meeting-info/useMeetingInfo';
47
+ import {useRoomInfo} from './room-info/useRoomInfo';
46
48
  import {useSidePanel} from '../utils/useSidePanel';
47
- import {useChatUIControl} from './chat-ui/useChatUIControl';
48
- import {
49
- ButtonTemplateName,
50
- useButtonTemplate,
51
- } from '../utils/useButtonTemplate';
49
+ import {ChatType, useChatUIControls} from './chat-ui/useChatUIControls';
50
+ import LayoutIconButton from '../subComponents/LayoutIconButton';
51
+ import {ToolbarPosition, useToolbar} from '../utils/useToolbar';
52
52
  import Styles from './styles';
53
+ import IconButton, {IconButtonProps} from '../atoms/IconButton';
54
+ import ThemeConfig from '../theme';
55
+ import hexadecimalTransparency from '../utils/hexadecimalTransparency';
56
+ import Spacer from '../atoms/Spacer';
57
+ import {useLiveStreamDataContext} from './contexts/LiveStreamDataContext';
58
+ import ParticipantsCount from '../atoms/ParticipantsCount';
59
+ import styles from 'react-native-toast-message/src/styles';
60
+ import RecordingInfo from '../atoms/RecordingInfo';
61
+ import Toolbar from '../atoms/Toolbar';
62
+ import ToolbarItem from '../atoms/ToolbarItem';
53
63
 
54
- const RenderSeparator = () => {
55
- const {getDimensionData} = useContext(DimensionContext);
56
- const {isDesktop} = getDimensionData();
57
- return isWebInternal() && isDesktop ? (
58
- <View style={style.navItem}>
59
- <View style={style.navItemSeparator}></View>
60
- </View>
61
- ) : (
62
- <View style={{marginHorizontal: 2}}></View>
63
- );
64
- };
65
-
66
- const ParticipantsCountView = () => {
64
+ export const ParticipantsCountView = ({
65
+ isMobileView = false,
66
+ }: {
67
+ isMobileView?: boolean;
68
+ }) => {
67
69
  const {onlineUsersCount} = useContext(ChatContext);
68
-
69
- return (
70
+ return isMobileView ? (
71
+ <Text>
72
+ People {'\n'} ({numFormatter(onlineUsersCount)})
73
+ </Text>
74
+ ) : (
70
75
  <>
71
76
  {onlineUsersCount !== 0 && (
72
- <View style={[style.navItem, {justifyContent: 'center'}]}>
77
+ <View style={[{justifyContent: 'center'}]}>
73
78
  <View style={style.chip}>
74
79
  {onlineUsersCount > 0 && (
75
80
  <Text style={style.chipText}>
@@ -83,61 +88,68 @@ const ParticipantsCountView = () => {
83
88
  );
84
89
  };
85
90
 
86
- interface ParticipantsIconButtonProps {
91
+ export interface ParticipantsIconButtonProps {
87
92
  liveStreamingRequestAlertIconPosition?: {
88
93
  top?: number;
89
94
  right?: number;
90
95
  left?: number;
91
96
  bottom?: number;
92
97
  };
93
- buttonTemplateName?: ButtonTemplateName;
94
- render?: (
95
- onPress: () => void,
96
- isPanelActive: boolean,
97
- buttonTemplateName?: ButtonTemplateName,
98
- ) => JSX.Element;
98
+ isOnActionSheet?: boolean;
99
+ render?: (onPress: () => void, isPanelActive: boolean) => JSX.Element;
99
100
  }
100
- const ParticipantsIconButton = (props: ParticipantsIconButtonProps) => {
101
+ export const ParticipantsIconButton = (props: ParticipantsIconButtonProps) => {
101
102
  const {
102
103
  liveStreamingRequestAlertIconPosition = {
103
- top: isWebInternal() ? -10 : 2,
104
+ top: 0,
105
+ right: 0,
104
106
  left: undefined,
105
- right: undefined,
106
107
  bottom: undefined,
107
108
  },
109
+ isOnActionSheet = false,
108
110
  } = props;
109
111
  const {sidePanel, setSidePanel} = useSidePanel();
110
112
  const {isPendingRequestToReview, setLastCheckedRequestTimestamp} =
111
113
  useContext(LiveStreamContext);
112
114
  //commented for v1 release
113
115
  //const participantsLabel = useString('participantsLabel')();
114
- const participantsLabel = 'Participants';
115
- const defaultTemplateValue = useButtonTemplate().buttonTemplateName;
116
- const {buttonTemplateName = defaultTemplateValue} = props;
116
+ const {onlineUsersCount} = useContext(ChatContext);
117
+ //const participantsLabel = `Participants (${numFormatter(onlineUsersCount)})`;
118
+ const participantsLabel = `People`;
117
119
  const isPanelActive = sidePanel === SidePanelType.Participants;
120
+
118
121
  const onPress = () => {
119
122
  isPanelActive
120
123
  ? setSidePanel(SidePanelType.None)
121
124
  : setSidePanel(SidePanelType.Participants);
122
- $config.EVENT_MODE && $config.RAISE_HAND;
123
- setLastCheckedRequestTimestamp(new Date().getTime());
125
+ // $config.EVENT_MODE && $config.RAISE_HAND;
126
+ //setLastCheckedRequestTimestamp(new Date().getTime());
124
127
  };
125
- let btnTemplateProps: BtnTemplateInterface = {
128
+ let iconButtonProps: IconButtonProps = {
126
129
  onPress: onPress,
127
- name: isPanelActive ? 'participantFilledIcon' : 'participantIcon',
130
+ iconProps: {
131
+ name: 'participants',
132
+ tintColor: isPanelActive
133
+ ? $config.PRIMARY_ACTION_TEXT_COLOR
134
+ : $config.SECONDARY_ACTION_COLOR,
135
+ iconBackgroundColor: isPanelActive
136
+ ? $config.PRIMARY_ACTION_BRAND_COLOR
137
+ : '',
138
+ },
139
+ btnTextProps: {
140
+ text: isOnActionSheet || !$config.ICON_TEXT ? '' : participantsLabel,
141
+ textColor: $config.FONT_COLOR,
142
+ },
128
143
  };
144
+ iconButtonProps.isOnActionSheet = isOnActionSheet;
129
145
 
130
- if (buttonTemplateName === ButtonTemplateName.bottomBar) {
131
- btnTemplateProps.btnText = participantsLabel;
132
- btnTemplateProps.style = Styles.localButtonWithoutBG as Object;
133
- } else {
134
- btnTemplateProps.style = style.btnHolder;
135
- }
136
146
  return props?.render ? (
137
- props.render(onPress, isPanelActive, buttonTemplateName)
147
+ props.render(onPress, isPanelActive)
138
148
  ) : (
139
149
  <>
140
- <BtnTemplate {...btnTemplateProps} />
150
+ <View>
151
+ <IconButton {...iconButtonProps} />
152
+ </View>
141
153
  {$config.EVENT_MODE && $config.RAISE_HAND && isPendingRequestToReview && (
142
154
  <View
143
155
  style={{
@@ -146,20 +158,17 @@ const ParticipantsIconButton = (props: ParticipantsIconButtonProps) => {
146
158
  bottom: liveStreamingRequestAlertIconPosition.bottom,
147
159
  right: liveStreamingRequestAlertIconPosition.right,
148
160
  left: liveStreamingRequestAlertIconPosition.left,
149
- }}>
150
- <View style={[style.badge, {paddingHorizontal: 3}]}>
151
- <ImageIcon
152
- icon={icons['exclamationIcon']}
153
- color={$config.SECONDARY_FONT_COLOR}
154
- />
155
- </View>
156
- </View>
161
+ backgroundColor: $config.SEMANTIC_ERROR,
162
+ width: 12,
163
+ height: 12,
164
+ borderRadius: 10,
165
+ }}></View>
157
166
  )}
158
167
  </>
159
168
  );
160
169
  };
161
170
 
162
- interface ChatIconButtonProps {
171
+ export interface ChatIconButtonProps {
163
172
  badgeContainerPosition?: {
164
173
  top?: number;
165
174
  right?: number;
@@ -167,61 +176,97 @@ interface ChatIconButtonProps {
167
176
  bottom?: number;
168
177
  };
169
178
  badgeTextStyle?: TextStyle;
170
- buttonTemplateName?: ButtonTemplateName;
171
179
  render?: (
172
180
  onPress: () => void,
173
181
  isPanelActive: boolean,
174
182
  totalUnreadCount: number,
175
- buttonTemplateName?: ButtonTemplateName,
176
183
  ) => JSX.Element;
184
+ isMobileView?: boolean;
185
+ isOnActionSheet?: boolean;
177
186
  }
178
187
 
179
- const ChatIconButton = (props: ChatIconButtonProps) => {
188
+ export const ChatIconButton = (props: ChatIconButtonProps) => {
189
+ const {sidePanel, setSidePanel} = useSidePanel();
180
190
  const {
181
191
  badgeContainerPosition = {
182
- top: isWebInternal() ? -10 : 2,
192
+ top: 0,
193
+ right: 0,
183
194
  left: undefined,
184
- right: undefined,
185
195
  bottom: undefined,
196
+ zIndex: 999,
186
197
  },
187
198
  badgeTextStyle = {
188
- color: $config.SECONDARY_FONT_COLOR,
199
+ color: $config.PRIMARY_ACTION_TEXT_COLOR,
189
200
  fontSize: 12,
201
+ textAlign: 'center',
190
202
  },
203
+ isOnActionSheet = false,
191
204
  } = props;
192
205
  const {setUnreadGroupMessageCount, totalUnreadCount} = useChatNotification();
193
- const {setGroupActive, setPrivateActive, setSelectedChatUserId} =
194
- useChatUIControl();
195
- const {sidePanel, setSidePanel} = useSidePanel();
206
+ const {setChatType, setPrivateChatUser} = useChatUIControls();
207
+
196
208
  //commented for v1 release
197
209
  //const chatLabel = useString('chatLabel')();
198
210
  const chatLabel = 'Chat';
199
- const defaultTemplateValue = useButtonTemplate().buttonTemplateName;
200
- const {buttonTemplateName = defaultTemplateValue} = props;
201
211
  const isPanelActive = sidePanel === SidePanelType.Chat;
202
212
  const onPress = () => {
203
- if (isPanelActive) {
204
- setSidePanel(SidePanelType.None);
205
- setGroupActive(false);
206
- setPrivateActive(false);
207
- setSelectedChatUserId(0);
208
- } else {
209
- setUnreadGroupMessageCount(0);
210
- setGroupActive(true);
211
- setSidePanel(SidePanelType.Chat);
213
+ {
214
+ if (isPanelActive) {
215
+ setSidePanel(SidePanelType.None);
216
+ setChatType(ChatType.Group);
217
+ setPrivateChatUser(0);
218
+ } else {
219
+ //move this logic into ChatContainer
220
+ //setUnreadGroupMessageCount(0);
221
+ setChatType(ChatType.Group);
222
+ setSidePanel(SidePanelType.Chat);
223
+ }
212
224
  }
213
225
  };
214
- let btnTemplateProps: BtnTemplateInterface = {
226
+ let iconButtonProps: IconButtonProps = {
215
227
  onPress: onPress,
216
- name: isPanelActive ? 'chatIconFilled' : 'chatIcon',
228
+ iconProps: {
229
+ name: 'chat-nav',
230
+ tintColor: isPanelActive
231
+ ? $config.PRIMARY_ACTION_TEXT_COLOR
232
+ : $config.SECONDARY_ACTION_COLOR,
233
+ iconBackgroundColor: isPanelActive
234
+ ? $config.PRIMARY_ACTION_BRAND_COLOR
235
+ : '',
236
+ },
237
+ btnTextProps: {
238
+ text: isOnActionSheet || !$config.ICON_TEXT ? '' : chatLabel,
239
+ textColor: $config.FONT_COLOR,
240
+ },
217
241
  };
218
- if (buttonTemplateName === ButtonTemplateName.bottomBar) {
219
- btnTemplateProps.btnText = chatLabel;
220
- btnTemplateProps.style = Styles.localButtonWithoutBG as Object;
221
- } else {
222
- btnTemplateProps.style = style.btnHolder;
223
- }
224
- const renderBadge = (badgeCount: any) => {
242
+
243
+ iconButtonProps.isOnActionSheet = isOnActionSheet;
244
+
245
+ // const renderBadgeOld = (badgeCount: any) => {
246
+ // return (
247
+ // <View
248
+ // style={{
249
+ // position: 'absolute',
250
+ // top: badgeContainerPosition?.top,
251
+ // bottom: badgeContainerPosition?.bottom,
252
+ // left: badgeContainerPosition?.left,
253
+ // right: badgeContainerPosition?.right,
254
+ // borderRadius: 10,
255
+ // width: 20,
256
+ // height: 20,
257
+ // backgroundColor: $config.PRIMARY_ACTION_BRAND_COLOR,
258
+ // justifyContent: 'center',
259
+ // }}>
260
+ // <Text
261
+ // style={{
262
+ // ...badgeTextStyle,
263
+ // }}>
264
+ // {numFormatter(badgeCount)}
265
+ // </Text>
266
+ // </View>
267
+ // );
268
+ // };
269
+ const renderUnreadMessageIndicator = () => {
225
270
  return (
226
271
  <View
227
272
  style={{
@@ -230,26 +275,21 @@ const ChatIconButton = (props: ChatIconButtonProps) => {
230
275
  bottom: badgeContainerPosition?.bottom,
231
276
  left: badgeContainerPosition?.left,
232
277
  right: badgeContainerPosition?.right,
233
- }}>
234
- <View style={style.badge}>
235
- <Text
236
- style={{
237
- ...badgeTextStyle,
238
- }}>
239
- {numFormatter(badgeCount)}
240
- </Text>
241
- </View>
242
- </View>
278
+ borderRadius: 10,
279
+ width: 12,
280
+ height: 12,
281
+ backgroundColor: $config.SEMANTIC_ERROR,
282
+ }}></View>
243
283
  );
244
284
  };
245
285
  return props?.render ? (
246
- props.render(onPress, isPanelActive, totalUnreadCount, buttonTemplateName)
286
+ props.render(onPress, isPanelActive, totalUnreadCount)
247
287
  ) : (
248
288
  <>
249
- <BtnTemplate {...btnTemplateProps} />
250
- {sidePanel !== SidePanelType.Chat &&
251
- totalUnreadCount !== 0 &&
252
- renderBadge(totalUnreadCount)}
289
+ <View>
290
+ <IconButton {...iconButtonProps} />
291
+ {totalUnreadCount !== 0 && renderUnreadMessageIndicator()}
292
+ </View>
253
293
  </>
254
294
  );
255
295
  };
@@ -261,90 +301,11 @@ interface LayoutIconButtonProps {
261
301
  left?: number;
262
302
  bottom?: number;
263
303
  };
264
- buttonTemplateName?: ButtonTemplateName;
265
- render?: (
266
- onPress: () => void,
267
- buttonTemplateName?: ButtonTemplateName,
268
- ) => JSX.Element;
269
- }
270
304
 
271
- const LayoutIconButton = (props: LayoutIconButtonProps) => {
272
- const {modalPosition} = props;
273
-
274
- //commented for v1 release
275
- //const layoutLabel = useString('layoutLabel')('');
276
- const layoutLabel = 'Layouts';
277
- const defaultTemplateValue = useButtonTemplate().buttonTemplateName;
278
- const {buttonTemplateName = defaultTemplateValue} = props;
279
- const [showDropdown, setShowDropdown] = useState(false);
280
- const layouts = useLayoutsData();
281
- const changeLayout = useChangeDefaultLayout();
282
- const {currentLayout} = useLayout();
283
- const layout = layouts.findIndex((item) => item.name === currentLayout);
284
- const renderLayoutIcon = (showDropdown?: boolean) => {
285
- let onPress = () => {};
286
- let renderContent = [];
287
- if (!showDropdown) {
288
- onPress = () => {
289
- changeLayout();
290
- };
291
- } else {
292
- onPress = () => {
293
- setShowDropdown(true);
294
- };
295
- }
296
- let btnTemplateProps = {
297
- onPress: onPress,
298
- style: {},
299
- btnText: '',
300
- };
301
- if (buttonTemplateName === ButtonTemplateName.bottomBar) {
302
- btnTemplateProps.style = Styles.localButtonWithoutBG as Object;
303
- btnTemplateProps.btnText = layoutLabel;
304
- } else {
305
- btnTemplateProps.style = style.btnHolder;
306
- delete btnTemplateProps['btnText'];
307
- }
308
- renderContent.push(
309
- props?.render ? (
310
- props.render(onPress, buttonTemplateName)
311
- ) : layouts[layout]?.iconName ? (
312
- <BtnTemplate
313
- key={'defaultLayoutIconWithName'}
314
- name={layouts[layout]?.iconName}
315
- {...btnTemplateProps}
316
- />
317
- ) : (
318
- <BtnTemplate
319
- key={'defaultLayoutIconWithIcon'}
320
- icon={layouts[layout]?.icon}
321
- {...btnTemplateProps}
322
- />
323
- ),
324
- );
325
- return renderContent;
326
- };
327
- return (
328
- <>
329
- {/**
330
- * Based on the flag. it will render the dropdown
331
- */}
332
- <LayoutIconDropdown
333
- showDropdown={showDropdown}
334
- setShowDropdown={setShowDropdown}
335
- modalPosition={modalPosition}
336
- />
337
- {/**
338
- * If layout contains more than 2 data. it will render the dropdown.
339
- */}
340
- {layouts && Array.isArray(layouts) && layouts.length > 2
341
- ? renderLayoutIcon(true)
342
- : renderLayoutIcon(false)}
343
- </>
344
- );
345
- };
305
+ render?: (onPress: () => void) => JSX.Element;
306
+ }
346
307
 
347
- const SettingsIconButton = (props: SettingsIconButtonProps) => {
308
+ export const SettingsIconButton = (props: SettingsIconButtonProps) => {
348
309
  return <Settings {...props} />;
349
310
  };
350
311
  const SettingsIconButtonWithWrapper = (props: SettingsIconButtonProps) => {
@@ -354,216 +315,89 @@ const SettingsIconButtonWithWrapper = (props: SettingsIconButtonProps) => {
354
315
  const Navbar = () => {
355
316
  //commented for v1 release
356
317
  //const recordingLabel = useString('recordingLabel')();
318
+ const {isHorizontal} = useToolbar();
357
319
  const recordingLabel = 'Recording';
320
+ const {audienceUids, hostUids} = useLiveStreamDataContext();
358
321
  const {
359
322
  data: {meetingTitle},
360
- } = useMeetingInfo();
323
+ } = useRoomInfo();
361
324
 
362
325
  const {isRecordingActive} = useRecording();
363
- const {getDimensionData} = useContext(DimensionContext);
364
- const {isDesktop} = getDimensionData();
365
- const layoutsData = useLayoutsData();
366
- const isNative = isIOS() || isAndroid();
367
-
326
+ const {onlineUsersCount} = useContext(ChatContext);
327
+ const {width} = useWindowDimensions();
368
328
  return (
369
- <View
370
- style={[
371
- isWebInternal() ? style.navHolder : style.navHolderNative,
372
- {backgroundColor: $config.SECONDARY_FONT_COLOR + 80},
373
- isWebInternal()
374
- ? {
375
- justifyContent: isMobileOrTablet() ? 'space-between' : 'flex-end',
376
- }
377
- : {},
378
- ]}>
379
- {isRecordingActive ? (
380
- <View
381
- style={[
382
- style.recordingView,
383
- {backgroundColor: $config.SECONDARY_FONT_COLOR},
384
- ]}>
385
- <ImageIcon
386
- name={'recordingActiveIcon'}
387
- style={{
388
- width: 20,
389
- height: 20,
390
- margin: 1,
391
- }}
392
- color="#FD0845"
393
- />
394
- {!isMobileOrTablet() && (
395
- <Text
396
- style={{
397
- fontSize: isWebInternal() ? 16 : 12,
398
- color: '#FD0845',
399
- fontWeight: '400',
400
- alignSelf: 'center',
401
- textAlign: 'center',
402
- flex: 1,
403
- }}>
404
- {recordingLabel}
405
- </Text>
406
- )}
407
- </View>
408
- ) : (
409
- <></>
410
- )}
329
+ <Toolbar>
411
330
  <View
412
331
  style={[
413
- style.roomNameContainer,
414
- // @ts-ignore
415
- isWebInternal() && !isMobileOrTablet()
416
- ? {transform: [{translateX: '50%'}]}
417
- : {},
332
+ isHorizontal
333
+ ? {flexDirection: 'row'}
334
+ : {flexDirection: 'column', justifyContent: 'center'},
418
335
  ]}>
419
- {isWebInternal() ? (
420
- <View
421
- style={{
422
- flexDirection: 'row',
423
- justifyContent: 'flex-start',
424
- paddingLeft: 5,
425
- }}>
426
- <View>
427
- <Text style={style.roomNameText}>
428
- {isMobileOrTablet()
429
- ? meetingTitle.length > 13
430
- ? meetingTitle.slice(0, 13) + '..'
431
- : meetingTitle
432
- : meetingTitle}
433
- </Text>
434
- </View>
435
- <View />
436
- <View
437
- style={{
438
- backgroundColor: $config.PRIMARY_FONT_COLOR + '80',
439
- width: 1,
440
- height: 'auto',
441
- marginHorizontal: 10,
442
- }}
336
+ <ToolbarItem>
337
+ <Text
338
+ style={style.roomNameText}
339
+ testID="videocall-meetingName"
340
+ numberOfLines={1}
341
+ ellipsizeMode="tail">
342
+ {trimText(meetingTitle)}
343
+ </Text>
344
+ </ToolbarItem>
345
+ {/* <Spacer size={8} horizontal={isHorizontal ? true : false} /> */}
346
+ <ToolbarItem>
347
+ <ParticipantsCount />
348
+ </ToolbarItem>
349
+ {!isRecordingActive ? (
350
+ <ToolbarItem>
351
+ <RecordingInfo
352
+ recordingLabel={isHorizontal ? recordingLabel : ''}
443
353
  />
444
- <View style={{width: 30}}>
445
- <CopyJoinInfo />
446
- </View>
447
- </View>
354
+ </ToolbarItem>
448
355
  ) : (
449
- <View>
450
- <Text style={style.roomNameText}>
451
- {meetingTitle.length > 13
452
- ? meetingTitle.slice(0, 13) + '..'
453
- : meetingTitle}
454
- </Text>
455
- </View>
356
+ <></>
456
357
  )}
457
358
  </View>
458
- <View style={style.navControlBar}>
359
+ {width > BREAKPOINTS.sm || isMobileUA() ? (
459
360
  <View
460
361
  style={[
461
- style.navContainer,
462
- {
463
- minWidth:
464
- isWebInternal() && isDesktop
465
- ? 300
466
- : isMobileOrTablet()
467
- ? //In native - if only one layout is provided then we are hiding the layout icon. so we need less space. otherwise there will empty space around the icon
468
- layoutsData && layoutsData.length === 1 && isNative
469
- ? 130
470
- : 160
471
- : 200,
472
- },
473
- ]}>
474
- <ParticipantsCountView />
475
- <View style={[style.navItem, style.navSmItem]}>
362
+ style.navControlBar,
363
+ isHorizontal
364
+ ? {flexDirection: 'row', width: '50%'}
365
+ : {flexDirection: 'column'},
366
+ ]}
367
+ testID="videocall-navcontrols">
368
+ <ToolbarItem testID="videocall-participantsicon">
476
369
  <ParticipantsIconButton />
477
- </View>
478
- {$config.CHAT ? (
370
+ </ToolbarItem>
371
+ {$config.CHAT && (
479
372
  <>
480
- <RenderSeparator />
481
- <View style={[style.navItem, style.navSmItem]}>
373
+ <ToolbarItem testID="videocall-chaticon">
482
374
  <ChatIconButton />
483
- </View>
484
- </>
485
- ) : (
486
- <></>
487
- )}
488
- {/**
489
- * In custom-layout - show the layout icon if more than 1 layout provided otherwise hide it from the ui
490
- */}
491
- {layoutsData && layoutsData.length > 1 && (
492
- <>
493
- <RenderSeparator />
494
- <View
495
- style={[style.navItem, style.navSmItem]}
496
- /**
497
- * .measure returns undefined on Android unless collapsable=false or onLayout are specified
498
- * so added collapsable property
499
- * https://github.com/facebook/react-native/issues/29712
500
- * */
501
- collapsable={false}>
502
- <LayoutIconButton />
503
- </View>
375
+ </ToolbarItem>
504
376
  </>
505
377
  )}
506
- <RenderSeparator />
507
- <SettingsIconButtonWithWrapper />
378
+ <ToolbarItem testID="videocall-settingsicon">
379
+ <SettingsIconButtonWithWrapper />
380
+ </ToolbarItem>
508
381
  </View>
509
- </View>
510
- </View>
382
+ ) : (
383
+ <></>
384
+ )}
385
+ </Toolbar>
511
386
  );
512
387
  };
513
- type NavBarComponentsArrayProps = [
514
- (props: CopyJoinInfoProps) => JSX.Element,
515
- () => JSX.Element,
516
- (props: ParticipantsIconButtonProps) => JSX.Element,
517
- (props: ChatIconButtonProps) => JSX.Element,
518
- (props: LayoutIconButtonProps) => JSX.Element,
519
- (props: SettingsIconButtonProps) => JSX.Element,
520
- ];
521
- export const NavBarComponentsArray: NavBarComponentsArrayProps = [
522
- CopyJoinInfo,
523
- ParticipantsCountView,
524
- ParticipantsIconButton,
525
- ChatIconButton,
526
- LayoutIconButton,
527
- SettingsIconButton,
528
- ];
529
388
 
530
389
  const style = StyleSheet.create({
531
- backDrop: {
532
- position: 'absolute',
533
- top: 0,
534
- bottom: 0,
535
- left: 0,
536
- right: 0,
537
- backgroundColor: 'rgba(0,0,0,0.3)',
538
- },
539
- navHolder: navHolder as ViewStyle,
540
- navHolderNative: {
541
- position: 'relative',
542
- width: '100%',
543
- height: '8%',
544
- backgroundColor: $config.SECONDARY_FONT_COLOR + '80',
545
- flexDirection: 'row',
546
- alignItems: 'center',
547
- paddingHorizontal: 10,
548
- justifyContent: 'space-between',
549
- },
550
- recordingView: {
551
- height: 35,
552
- maxHeight: 30,
553
- position: 'absolute',
554
- left: isMobileOrTablet() ? '48%' : 10,
555
- paddingHorizontal: 5,
390
+ participantCountView: {
556
391
  flexDirection: 'row',
557
- alignItems: 'center',
558
- alignContent: 'center',
559
- justifyContent: 'center',
560
- borderRadius: 10,
561
- },
562
- recordingIcon: {
563
- width: 20,
564
- height: 20,
565
- margin: 1,
566
- resizeMode: 'contain',
392
+ padding: 12,
393
+ backgroundColor: $config.ICON_BG_COLOR,
394
+ borderRadius: 25,
395
+ borderWidth: 1,
396
+ borderColor: $config.CARD_LAYER_3_COLOR,
397
+ shadowColor: $config.HARD_CODED_BLACK_COLOR,
398
+ shadowOffset: {width: 0, height: 4},
399
+ shadowOpacity: 0.1,
400
+ shadowRadius: 20,
567
401
  },
568
402
  btnHolder: {
569
403
  marginHorizontal: isMobileOrTablet() ? 2 : 0,
@@ -577,38 +411,21 @@ const style = StyleSheet.create({
577
411
  resizeMode: 'contain',
578
412
  },
579
413
  roomNameContainer: {
580
- paddingHorizontal: 1,
581
- marginHorizontal: 1,
582
- height: 35,
583
- maxHeight: 30,
414
+ zIndex: 10,
415
+ flex: 1,
584
416
  flexDirection: 'row',
585
- justifyContent: 'flex-end',
586
417
  alignItems: 'center',
587
- zIndex: 10,
588
418
  },
419
+
589
420
  roomNameText: {
590
- fontSize: 18,
591
- color: $config.PRIMARY_FONT_COLOR,
592
- fontWeight: '500',
593
- },
594
- badge: {
595
- lineHeight: 1,
596
- height: 20,
597
- minWidth: 20,
598
- display: 'flex',
599
- alignItems: 'center',
600
- justifyContent: 'center',
601
- backgroundColor: $config.PRIMARY_COLOR,
602
- color: $config.SECONDARY_FONT_COLOR,
603
- fontFamily: isIOS() ? 'Helvetica' : 'sans-serif',
604
- borderRadius: 10,
605
- position: 'absolute',
606
- paddingHorizontal: 5,
607
- top: 0,
608
- left: -2,
421
+ alignSelf: 'center',
422
+ fontSize: ThemeConfig.FontSize.normal,
423
+ color: $config.FONT_COLOR,
424
+ fontWeight: '600',
425
+ fontFamily: ThemeConfig.FontFamily.sansPro,
609
426
  },
610
427
  chip: {
611
- backgroundColor: $config.PRIMARY_COLOR,
428
+ backgroundColor: $config.PRIMARY_ACTION_BRAND_COLOR,
612
429
  borderRadius: 2.5,
613
430
  paddingHorizontal: 5,
614
431
  marginLeft: 5,
@@ -621,52 +438,17 @@ const style = StyleSheet.create({
621
438
  chipText: {
622
439
  fontFamily: isIOS() ? 'Helvetica' : 'sans-serif',
623
440
  fontSize: 12,
624
- color: $config.SECONDARY_FONT_COLOR,
441
+ color: $config.SECONDARY_ACTION_COLOR,
625
442
  },
626
443
  navControlBar: {
627
- width: '50%',
628
- flexDirection: 'row',
629
444
  justifyContent: 'flex-end',
630
445
  zIndex: 9,
631
446
  },
632
- navContainer: {
633
- display: 'flex',
634
- flexDirection: 'row',
635
- justifyContent: 'space-around',
636
- backgroundColor: isWebInternal()
637
- ? $config.SECONDARY_FONT_COLOR
638
- : $config.SECONDARY_FONT_COLOR + '00',
639
- paddingVertical: 4,
640
- paddingHorizontal: isMobileOrTablet() ? 0 : 10,
641
- minHeight: 35,
642
- borderRadius: 10,
643
- },
644
- navItem: {
645
- height: '100%',
646
- alignItems: 'center',
647
- position: 'relative',
648
- },
649
447
  navSmItem: {
650
448
  flexGrow: 0,
651
449
  flexShrink: 0,
652
450
  flexBasis: '15%',
653
451
  },
654
- navItemSeparator: {
655
- backgroundColor: $config.PRIMARY_FONT_COLOR + '80',
656
- width: 1,
657
- height: '100%',
658
- marginHorizontal: 10,
659
- alignSelf: 'center',
660
- opacity: 0.8,
661
- },
662
- navItemSeparatorHorizontal: {
663
- backgroundColor: $config.PRIMARY_FONT_COLOR + '80',
664
- width: '100%',
665
- height: 1,
666
- marginVertical: 10,
667
- alignSelf: 'center',
668
- opacity: 0.8,
669
- },
670
452
  dropdownIconContainer: {
671
453
  flex: 1,
672
454
  paddingHorizontal: 5,