@100mslive/react-native-room-kit 1.1.2 → 1.1.4
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/lib/commonjs/HMSContainer.js.map +1 -1
- package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
- package/lib/commonjs/HMSPrebuilt.js +3 -0
- package/lib/commonjs/HMSPrebuilt.js.map +1 -1
- package/lib/commonjs/HMSRoomSetup.js +28 -4
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/100ms/index.js.map +1 -1
- package/lib/commonjs/Icons/Add/index.js.map +1 -1
- package/lib/commonjs/Icons/Alert/index.js.map +1 -1
- package/lib/commonjs/Icons/AlertTriangle/index.js.map +1 -1
- package/lib/commonjs/Icons/AnswerPhone/index.js.map +1 -1
- package/lib/commonjs/Icons/BRB/index.js.map +1 -1
- package/lib/commonjs/Icons/Bluetooth/index.js.map +1 -1
- package/lib/commonjs/Icons/Camera/index.js.map +1 -1
- package/lib/commonjs/Icons/Chat/index.js.map +1 -1
- package/lib/commonjs/Icons/Check/index.js.map +1 -1
- package/lib/commonjs/Icons/CheckBox/index.js.map +1 -1
- package/lib/commonjs/Icons/Chevron/index.js.map +1 -1
- package/lib/commonjs/Icons/Clock/assets/clock-vector.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock-vector@2x.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock-vector@3x.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock@2x.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock@3x.png +0 -0
- package/lib/commonjs/Icons/Clock/index.js +7 -2
- package/lib/commonjs/Icons/Clock/index.js.map +1 -1
- package/lib/commonjs/Icons/Close/index.js.map +1 -1
- package/lib/commonjs/Icons/CrossCircle/index.js.map +1 -1
- package/lib/commonjs/Icons/End/index.js.map +1 -1
- package/lib/commonjs/Icons/Eye/index.js.map +1 -1
- package/lib/commonjs/Icons/GenericLogo/index.js.map +1 -1
- package/lib/commonjs/Icons/Hamburger/index.js.map +1 -1
- package/lib/commonjs/Icons/Hand/index.js.map +1 -1
- package/lib/commonjs/Icons/Headphones/index.js.map +1 -1
- package/lib/commonjs/Icons/Leave/index.js.map +1 -1
- package/lib/commonjs/Icons/Maximize/index.js.map +1 -1
- package/lib/commonjs/Icons/Mic/index.js.map +1 -1
- package/lib/commonjs/Icons/Minimize/index.js.map +1 -1
- package/lib/commonjs/Icons/NetworkQuality/index.js.map +1 -1
- package/lib/commonjs/Icons/NoEntry/index.js.map +1 -1
- package/lib/commonjs/Icons/Participants/index.js.map +1 -1
- package/lib/commonjs/Icons/PauseCircle/index.js.map +1 -1
- package/lib/commonjs/Icons/Pencil/index.js.map +1 -1
- package/lib/commonjs/Icons/Person/index.js.map +1 -1
- package/lib/commonjs/Icons/Pin/index.js.map +1 -1
- package/lib/commonjs/Icons/Poll/index.js.map +1 -1
- package/lib/commonjs/Icons/PollVote/index.js.map +1 -1
- package/lib/commonjs/Icons/Quiz/index.js.map +1 -1
- package/lib/commonjs/Icons/Radio/index.js.map +1 -1
- package/lib/commonjs/Icons/Recording/index.js.map +1 -1
- package/lib/commonjs/Icons/RotateCamera/index.js.map +1 -1
- package/lib/commonjs/Icons/ScreenShare/index.js.map +1 -1
- package/lib/commonjs/Icons/Search/index.js.map +1 -1
- package/lib/commonjs/Icons/Send/index.js.map +1 -1
- package/lib/commonjs/Icons/Settings/index.js.map +1 -1
- package/lib/commonjs/Icons/Speaker/index.js.map +1 -1
- package/lib/commonjs/Icons/Star/index.js.map +1 -1
- package/lib/commonjs/Icons/Stop/index.js.map +1 -1
- package/lib/commonjs/Icons/ThreeDots/index.js.map +1 -1
- package/lib/commonjs/Icons/TrashBin/index.js.map +1 -1
- package/lib/commonjs/Icons/Wave/index.js.map +1 -1
- package/lib/commonjs/Icons/WelcomeHand/index.js.map +1 -1
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/AnimatedFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
- package/lib/commonjs/components/AvatarView.js.map +1 -1
- package/lib/commonjs/components/BackButton.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChangeNameModalContent.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMoreActionsModal.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMoreActionsView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatPaused.js.map +1 -1
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js.map +1 -1
- package/lib/commonjs/components/Chat/MessageOptionsView.js.map +1 -1
- package/lib/commonjs/components/Chat/PeerBlockedFromChat.js.map +1 -1
- package/lib/commonjs/components/Chat/PinnedMessages.js.map +1 -1
- package/lib/commonjs/components/Chat/index.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ParticipantsView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/index.js.map +1 -1
- package/lib/commonjs/components/CheckboxInputRow.js.map +1 -1
- package/lib/commonjs/components/CompanyLogo.js.map +1 -1
- package/lib/commonjs/components/CreatePoll.js +3 -2
- package/lib/commonjs/components/CreatePoll.js.map +1 -1
- package/lib/commonjs/components/CustomButton.js.map +1 -1
- package/lib/commonjs/components/CustomHLSPlayerControls.js.map +1 -1
- package/lib/commonjs/components/DefaultModal.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModal.js.map +1 -1
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/FullScreenIndicator.js.map +1 -1
- package/lib/commonjs/components/FullScreenVideoView.js.map +1 -1
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSFooter.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerEmoticons.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerStatsView.js.map +1 -1
- package/lib/commonjs/components/HLSView.js +15 -1
- package/lib/commonjs/components/HLSView.js.map +1 -1
- package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
- package/lib/commonjs/components/HMSChat.js.map +1 -1
- package/lib/commonjs/components/HMSDangerButton.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
- package/lib/commonjs/components/HMSHLSNotStarted.js.map +1 -1
- package/lib/commonjs/components/HMSHLSStreamLoading.js.map +1 -1
- package/lib/commonjs/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -1
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/commonjs/components/HMSLocalVideoView.js.map +1 -1
- package/lib/commonjs/components/HMSManageAudioOutput.js +1 -1
- package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -1
- package/lib/commonjs/components/HMSManageCameraRotation.js.map +1 -1
- package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
- package/lib/commonjs/components/HMSManageLocalAudio.js.map +1 -1
- package/lib/commonjs/components/HMSManageLocalVideo.js.map +1 -1
- package/lib/commonjs/components/HMSManageRaiseHand.js.map +1 -1
- package/lib/commonjs/components/HMSMeetingEnded.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSPollsQuizzesNotification.js +1 -1
- package/lib/commonjs/components/HMSPollsQuizzesNotification.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewNetworkQuality.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTile.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/HMSPrimaryButton.js.map +1 -1
- package/lib/commonjs/components/HMSReconnectingNotification.js.map +1 -1
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRoleChangeDeclinedNotification.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSSecondaryButton.js.map +1 -1
- package/lib/commonjs/components/HMSSendMessageInput.js.map +1 -1
- package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -1
- package/lib/commonjs/components/HMSTextInput.js.map +1 -1
- package/lib/commonjs/components/HMSVideoView.js.map +1 -1
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/LeaderboardEntry.js +140 -0
- package/lib/commonjs/components/LeaderboardEntry.js.map +1 -0
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/commonjs/components/LocalPeerRegularVideoView.js.map +1 -1
- package/lib/commonjs/components/LocalPeerScreenshareView.js.map +1 -1
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/MenuModal/Menu.js.map +1 -1
- package/lib/commonjs/components/MenuModal/MenuDivider.js.map +1 -1
- package/lib/commonjs/components/MenuModal/MenuItem.js.map +1 -1
- package/lib/commonjs/components/MenuModal/index.js.map +1 -1
- package/lib/commonjs/components/MiniView.js.map +1 -1
- package/lib/commonjs/components/Modals.js.map +1 -1
- package/lib/commonjs/components/OverlayContainer.js.map +1 -1
- package/lib/commonjs/components/OverlayedViews.js.map +1 -1
- package/lib/commonjs/components/PIPView.js.map +1 -1
- package/lib/commonjs/components/PaginationDots.js.map +1 -1
- package/lib/commonjs/components/Participants/MultiRoleParticipantsList.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsAccordian.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsAccordianExpanded.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsGroupFooter.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsGroupOptions.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItem.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOption.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsListFooter.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsSeachInput.js.map +1 -1
- package/lib/commonjs/components/Participants/index.js.map +1 -1
- package/lib/commonjs/components/ParticipantsCount.js.map +1 -1
- package/lib/commonjs/components/PeerDisplayView.js.map +1 -1
- package/lib/commonjs/components/PeerMinimizedView.js.map +1 -1
- package/lib/commonjs/components/PeerRTCStatsContainer.js.map +1 -1
- package/lib/commonjs/components/PeerRTCStatsView.js.map +1 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/AvatarView.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/HMSFullScreenButton.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerMetadata.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +16 -6
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/VideoView.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/index.js.map +1 -1
- package/lib/commonjs/components/PollAndQuizQuestionResponseCard.js.map +1 -1
- package/lib/commonjs/components/PollAndQuizQuestionResponseCards.js.map +1 -1
- package/lib/commonjs/components/PollAndQuizSheetScreen.js +69 -0
- package/lib/commonjs/components/PollAndQuizSheetScreen.js.map +1 -0
- package/lib/commonjs/components/PollAndQuizVoting.js +133 -4
- package/lib/commonjs/components/PollAndQuizVoting.js.map +1 -1
- package/lib/commonjs/components/PollAndQuizzStateLabel.js.map +1 -1
- package/lib/commonjs/components/PollQDeleteConfirmationSheetView.js.map +1 -1
- package/lib/commonjs/components/PollQuestion.js.map +1 -1
- package/lib/commonjs/components/PollQuestionDeleteConfirmation.js.map +1 -1
- package/lib/commonjs/components/PollQuestions.js +104 -4
- package/lib/commonjs/components/PollQuestions.js.map +1 -1
- package/lib/commonjs/components/PollResponseProgressView.js.map +1 -1
- package/lib/commonjs/components/PollsAndQuizBottomSheet.js +9 -11
- package/lib/commonjs/components/PollsAndQuizBottomSheet.js.map +1 -1
- package/lib/commonjs/components/PollsAndQuizzesCard.js +1 -1
- package/lib/commonjs/components/PollsAndQuizzesCard.js.map +1 -1
- package/lib/commonjs/components/PollsAndQuizzesModalContent.js +26 -120
- package/lib/commonjs/components/PollsAndQuizzesModalContent.js.map +1 -1
- package/lib/commonjs/components/PollsConfigAndList.js +81 -4
- package/lib/commonjs/components/PollsConfigAndList.js.map +1 -1
- package/lib/commonjs/components/PressableIcon.js.map +1 -1
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/commonjs/components/PreviousPollsAndQuizzesList.js +7 -15
- package/lib/commonjs/components/PreviousPollsAndQuizzesList.js.map +1 -1
- package/lib/commonjs/components/QuizEndOptionsView.js.map +1 -1
- package/lib/commonjs/components/QuizLeaderboardEntriesScreen.js +284 -0
- package/lib/commonjs/components/QuizLeaderboardEntriesScreen.js.map +1 -0
- package/lib/commonjs/components/QuizLeaderboardScreen.js +279 -0
- package/lib/commonjs/components/QuizLeaderboardScreen.js.map +1 -0
- package/lib/commonjs/components/QuizLeaderboardSummary.js +195 -0
- package/lib/commonjs/components/QuizLeaderboardSummary.js.map +1 -0
- package/lib/commonjs/components/RadioInput.js.map +1 -1
- package/lib/commonjs/components/RadioInputRow.js.map +1 -1
- package/lib/commonjs/components/ReconnectionView.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/commonjs/components/StatusBar.js.map +1 -1
- package/lib/commonjs/components/StopRecordingModalContent.js.map +1 -1
- package/lib/commonjs/components/StreamingQualityModalContent.js.map +1 -1
- package/lib/commonjs/components/SwitchRow.js.map +1 -1
- package/lib/commonjs/components/Tile.js.map +1 -1
- package/lib/commonjs/components/TilesContainer.js.map +1 -1
- package/lib/commonjs/components/UnmountAfterDelay.js.map +1 -1
- package/lib/commonjs/components/VoterParticipationSummary.js +46 -0
- package/lib/commonjs/components/VoterParticipationSummary.js.map +1 -0
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/components/WelcomeInMeeting.js.map +1 -1
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/styles.js.map +1 -1
- package/lib/commonjs/hooks/useHmsInstance.js.map +1 -1
- package/lib/commonjs/hooks-sdk-selectors.js.map +1 -1
- package/lib/commonjs/hooks-sdk.js.map +1 -1
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +16 -3
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/HMSManager.js.map +1 -1
- package/lib/commonjs/modules/parser.js.map +1 -1
- package/lib/commonjs/peerTrackNodeUtils.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +7 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +25 -5
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -1
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
- package/lib/commonjs/redux/reducers/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/message.js.map +1 -1
- package/lib/commonjs/redux/reducers/polls.js +65 -5
- package/lib/commonjs/redux/reducers/polls.js.map +1 -1
- package/lib/commonjs/redux/reducers/userState.js +10 -8
- package/lib/commonjs/redux/reducers/userState.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/constants.js.map +1 -1
- package/lib/commonjs/utils/dimension.js.map +1 -1
- package/lib/commonjs/utils/functions.js.map +1 -1
- package/lib/commonjs/utils/hooks.js +107 -2
- package/lib/commonjs/utils/hooks.js.map +1 -1
- package/lib/commonjs/utils/theme.js.map +1 -1
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSContainer.js.map +1 -1
- package/lib/module/HMSInstanceSetup.js.map +1 -1
- package/lib/module/HMSPrebuilt.js +3 -0
- package/lib/module/HMSPrebuilt.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +29 -5
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/100ms/index.js.map +1 -1
- package/lib/module/Icons/Add/index.js.map +1 -1
- package/lib/module/Icons/Alert/index.js.map +1 -1
- package/lib/module/Icons/AlertTriangle/index.js.map +1 -1
- package/lib/module/Icons/AnswerPhone/index.js.map +1 -1
- package/lib/module/Icons/BRB/index.js.map +1 -1
- package/lib/module/Icons/Bluetooth/index.js.map +1 -1
- package/lib/module/Icons/Camera/index.js.map +1 -1
- package/lib/module/Icons/Chat/index.js.map +1 -1
- package/lib/module/Icons/Check/index.js.map +1 -1
- package/lib/module/Icons/CheckBox/index.js.map +1 -1
- package/lib/module/Icons/Chevron/index.js.map +1 -1
- package/lib/module/Icons/Clock/assets/clock-vector.png +0 -0
- package/lib/module/Icons/Clock/assets/clock-vector@2x.png +0 -0
- package/lib/module/Icons/Clock/assets/clock-vector@3x.png +0 -0
- package/lib/module/Icons/Clock/assets/clock.png +0 -0
- package/lib/module/Icons/Clock/assets/clock@2x.png +0 -0
- package/lib/module/Icons/Clock/assets/clock@3x.png +0 -0
- package/lib/module/Icons/Clock/index.js +7 -2
- package/lib/module/Icons/Clock/index.js.map +1 -1
- package/lib/module/Icons/Close/index.js.map +1 -1
- package/lib/module/Icons/CrossCircle/index.js.map +1 -1
- package/lib/module/Icons/End/index.js.map +1 -1
- package/lib/module/Icons/Eye/index.js.map +1 -1
- package/lib/module/Icons/GenericLogo/index.js.map +1 -1
- package/lib/module/Icons/Hamburger/index.js.map +1 -1
- package/lib/module/Icons/Hand/index.js.map +1 -1
- package/lib/module/Icons/Headphones/index.js.map +1 -1
- package/lib/module/Icons/Leave/index.js.map +1 -1
- package/lib/module/Icons/Maximize/index.js.map +1 -1
- package/lib/module/Icons/Mic/index.js.map +1 -1
- package/lib/module/Icons/Minimize/index.js.map +1 -1
- package/lib/module/Icons/NetworkQuality/index.js.map +1 -1
- package/lib/module/Icons/NoEntry/index.js.map +1 -1
- package/lib/module/Icons/Participants/index.js.map +1 -1
- package/lib/module/Icons/PauseCircle/index.js.map +1 -1
- package/lib/module/Icons/Pencil/index.js.map +1 -1
- package/lib/module/Icons/Person/index.js.map +1 -1
- package/lib/module/Icons/Pin/index.js.map +1 -1
- package/lib/module/Icons/Poll/index.js.map +1 -1
- package/lib/module/Icons/PollVote/index.js.map +1 -1
- package/lib/module/Icons/Quiz/index.js.map +1 -1
- package/lib/module/Icons/Radio/index.js.map +1 -1
- package/lib/module/Icons/Recording/index.js.map +1 -1
- package/lib/module/Icons/RotateCamera/index.js.map +1 -1
- package/lib/module/Icons/ScreenShare/index.js.map +1 -1
- package/lib/module/Icons/Search/index.js.map +1 -1
- package/lib/module/Icons/Send/index.js.map +1 -1
- package/lib/module/Icons/Settings/index.js.map +1 -1
- package/lib/module/Icons/Speaker/index.js.map +1 -1
- package/lib/module/Icons/Star/index.js.map +1 -1
- package/lib/module/Icons/Stop/index.js.map +1 -1
- package/lib/module/Icons/ThreeDots/index.js.map +1 -1
- package/lib/module/Icons/TrashBin/index.js.map +1 -1
- package/lib/module/Icons/Wave/index.js.map +1 -1
- package/lib/module/Icons/WelcomeHand/index.js.map +1 -1
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/AnimatedFooter.js.map +1 -1
- package/lib/module/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/module/components/AnimatedHeader.js.map +1 -1
- package/lib/module/components/AvatarView.js.map +1 -1
- package/lib/module/components/BackButton.js.map +1 -1
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/ChangeNameModalContent.js.map +1 -1
- package/lib/module/components/Chat/ChatBanner.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheet.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/module/components/Chat/ChatList.js.map +1 -1
- package/lib/module/components/Chat/ChatMessage.js.map +1 -1
- package/lib/module/components/Chat/ChatMoreActionsModal.js.map +1 -1
- package/lib/module/components/Chat/ChatMoreActionsSheetView.js.map +1 -1
- package/lib/module/components/Chat/ChatMoreActionsView.js.map +1 -1
- package/lib/module/components/Chat/ChatPaused.js.map +1 -1
- package/lib/module/components/Chat/MessageOptionsBottomSheet.js.map +1 -1
- package/lib/module/components/Chat/MessageOptionsBottomSheetView.js.map +1 -1
- package/lib/module/components/Chat/MessageOptionsView.js.map +1 -1
- package/lib/module/components/Chat/PeerBlockedFromChat.js.map +1 -1
- package/lib/module/components/Chat/PinnedMessages.js.map +1 -1
- package/lib/module/components/Chat/index.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ParticipantsView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/index.js.map +1 -1
- package/lib/module/components/CheckboxInputRow.js.map +1 -1
- package/lib/module/components/CompanyLogo.js.map +1 -1
- package/lib/module/components/CreatePoll.js +4 -3
- package/lib/module/components/CreatePoll.js.map +1 -1
- package/lib/module/components/CustomButton.js.map +1 -1
- package/lib/module/components/CustomHLSPlayerControls.js.map +1 -1
- package/lib/module/components/DefaultModal.js.map +1 -1
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/EndRoomModal.js.map +1 -1
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/FullScreenIndicator.js.map +1 -1
- package/lib/module/components/FullScreenVideoView.js.map +1 -1
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSFooter.js.map +1 -1
- package/lib/module/components/HLSPlayerEmoticons.js.map +1 -1
- package/lib/module/components/HLSPlayerStatsView.js.map +1 -1
- package/lib/module/components/HLSView.js +17 -3
- package/lib/module/components/HLSView.js.map +1 -1
- package/lib/module/components/HMSBaseButton.js.map +1 -1
- package/lib/module/components/HMSChat.js.map +1 -1
- package/lib/module/components/HMSDangerButton.js.map +1 -1
- package/lib/module/components/HMSHLSMessage.js.map +1 -1
- package/lib/module/components/HMSHLSMessageList.js.map +1 -1
- package/lib/module/components/HMSHLSNotStarted.js.map +1 -1
- package/lib/module/components/HMSHLSStreamLoading.js.map +1 -1
- package/lib/module/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.android.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSLiveViewerCount.js.map +1 -1
- package/lib/module/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/module/components/HMSLocalVideoView.js.map +1 -1
- package/lib/module/components/HMSManageAudioOutput.js +1 -1
- package/lib/module/components/HMSManageAudioOutput.js.map +1 -1
- package/lib/module/components/HMSManageCameraRotation.js.map +1 -1
- package/lib/module/components/HMSManageLeave.js.map +1 -1
- package/lib/module/components/HMSManageLocalAudio.js.map +1 -1
- package/lib/module/components/HMSManageLocalVideo.js.map +1 -1
- package/lib/module/components/HMSManageRaiseHand.js.map +1 -1
- package/lib/module/components/HMSMeetingEnded.js.map +1 -1
- package/lib/module/components/HMSNotification.js.map +1 -1
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSPollsQuizzesNotification.js +2 -2
- package/lib/module/components/HMSPollsQuizzesNotification.js.map +1 -1
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/module/components/HMSPreviewNetworkQuality.js.map +1 -1
- package/lib/module/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/module/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/module/components/HMSPreviewTile.js.map +1 -1
- package/lib/module/components/HMSPreviewTitle.js.map +1 -1
- package/lib/module/components/HMSPrimaryButton.js.map +1 -1
- package/lib/module/components/HMSReconnectingNotification.js.map +1 -1
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSRoleChangeDeclinedNotification.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSSecondaryButton.js.map +1 -1
- package/lib/module/components/HMSSendMessageInput.js.map +1 -1
- package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -1
- package/lib/module/components/HMSTextInput.js.map +1 -1
- package/lib/module/components/HMSVideoView.js.map +1 -1
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/LeaderboardEntry.js +131 -0
- package/lib/module/components/LeaderboardEntry.js.map +1 -0
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/module/components/LocalPeerRegularVideoView.js.map +1 -1
- package/lib/module/components/LocalPeerScreenshareView.js.map +1 -1
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/MenuModal/Menu.js.map +1 -1
- package/lib/module/components/MenuModal/MenuDivider.js.map +1 -1
- package/lib/module/components/MenuModal/MenuItem.js.map +1 -1
- package/lib/module/components/MenuModal/index.js.map +1 -1
- package/lib/module/components/MiniView.js.map +1 -1
- package/lib/module/components/Modals.js.map +1 -1
- package/lib/module/components/OverlayContainer.js.map +1 -1
- package/lib/module/components/OverlayedViews.js.map +1 -1
- package/lib/module/components/PIPView.js.map +1 -1
- package/lib/module/components/PaginationDots.js.map +1 -1
- package/lib/module/components/Participants/MultiRoleParticipantsList.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsAccordian.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsAccordianExpanded.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsGroupFooter.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsGroupHeader.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsGroupOptions.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItem.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItemOption.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsListFooter.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsSeachInput.js.map +1 -1
- package/lib/module/components/Participants/index.js.map +1 -1
- package/lib/module/components/ParticipantsCount.js.map +1 -1
- package/lib/module/components/PeerDisplayView.js.map +1 -1
- package/lib/module/components/PeerMinimizedView.js.map +1 -1
- package/lib/module/components/PeerRTCStatsContainer.js.map +1 -1
- package/lib/module/components/PeerRTCStatsView.js.map +1 -1
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/PeerVideoTile/AvatarView.js.map +1 -1
- package/lib/module/components/PeerVideoTile/HMSFullScreenButton.js.map +1 -1
- package/lib/module/components/PeerVideoTile/HMSPinchGesture.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerMetadata.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +19 -7
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/PeerVideoTile/VideoView.js.map +1 -1
- package/lib/module/components/PeerVideoTile/index.js.map +1 -1
- package/lib/module/components/PollAndQuizQuestionResponseCard.js.map +1 -1
- package/lib/module/components/PollAndQuizQuestionResponseCards.js.map +1 -1
- package/lib/module/components/PollAndQuizSheetScreen.js +60 -0
- package/lib/module/components/PollAndQuizSheetScreen.js.map +1 -0
- package/lib/module/components/PollAndQuizVoting.js +135 -6
- package/lib/module/components/PollAndQuizVoting.js.map +1 -1
- package/lib/module/components/PollAndQuizzStateLabel.js.map +1 -1
- package/lib/module/components/PollQDeleteConfirmationSheetView.js.map +1 -1
- package/lib/module/components/PollQuestion.js.map +1 -1
- package/lib/module/components/PollQuestionDeleteConfirmation.js.map +1 -1
- package/lib/module/components/PollQuestions.js +107 -7
- package/lib/module/components/PollQuestions.js.map +1 -1
- package/lib/module/components/PollResponseProgressView.js.map +1 -1
- package/lib/module/components/PollsAndQuizBottomSheet.js +11 -13
- package/lib/module/components/PollsAndQuizBottomSheet.js.map +1 -1
- package/lib/module/components/PollsAndQuizzesCard.js +2 -2
- package/lib/module/components/PollsAndQuizzesCard.js.map +1 -1
- package/lib/module/components/PollsAndQuizzesModalContent.js +28 -122
- package/lib/module/components/PollsAndQuizzesModalContent.js.map +1 -1
- package/lib/module/components/PollsConfigAndList.js +82 -5
- package/lib/module/components/PollsConfigAndList.js.map +1 -1
- package/lib/module/components/PressableIcon.js.map +1 -1
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/module/components/PreviousPollsAndQuizzesList.js +7 -15
- package/lib/module/components/PreviousPollsAndQuizzesList.js.map +1 -1
- package/lib/module/components/QuizEndOptionsView.js.map +1 -1
- package/lib/module/components/QuizLeaderboardEntriesScreen.js +275 -0
- package/lib/module/components/QuizLeaderboardEntriesScreen.js.map +1 -0
- package/lib/module/components/QuizLeaderboardScreen.js +270 -0
- package/lib/module/components/QuizLeaderboardScreen.js.map +1 -0
- package/lib/module/components/QuizLeaderboardSummary.js +186 -0
- package/lib/module/components/QuizLeaderboardSummary.js.map +1 -0
- package/lib/module/components/RadioInput.js.map +1 -1
- package/lib/module/components/RadioInputRow.js.map +1 -1
- package/lib/module/components/ReconnectionView.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/module/components/StatusBar.js.map +1 -1
- package/lib/module/components/StopRecordingModalContent.js.map +1 -1
- package/lib/module/components/StreamingQualityModalContent.js.map +1 -1
- package/lib/module/components/SwitchRow.js.map +1 -1
- package/lib/module/components/Tile.js.map +1 -1
- package/lib/module/components/TilesContainer.js.map +1 -1
- package/lib/module/components/UnmountAfterDelay.js.map +1 -1
- package/lib/module/components/VoterParticipationSummary.js +37 -0
- package/lib/module/components/VoterParticipationSummary.js.map +1 -0
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/components/WelcomeInMeeting.js.map +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/styles.js.map +1 -1
- package/lib/module/hooks/useHmsInstance.js.map +1 -1
- package/lib/module/hooks-sdk-selectors.js.map +1 -1
- package/lib/module/hooks-sdk.js.map +1 -1
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +16 -3
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/HMSManager.js.map +1 -1
- package/lib/module/modules/parser.js.map +1 -1
- package/lib/module/peerTrackNodeUtils.js.map +1 -1
- package/lib/module/redux/actionTypes.js +7 -1
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +18 -3
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/chatWindow.js.map +1 -1
- package/lib/module/redux/reducers/hmsStates.js.map +1 -1
- package/lib/module/redux/reducers/index.js.map +1 -1
- package/lib/module/redux/reducers/message.js.map +1 -1
- package/lib/module/redux/reducers/polls.js +65 -5
- package/lib/module/redux/reducers/polls.js.map +1 -1
- package/lib/module/redux/reducers/userState.js +10 -8
- package/lib/module/redux/reducers/userState.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/constants.js.map +1 -1
- package/lib/module/utils/dimension.js.map +1 -1
- package/lib/module/utils/functions.js.map +1 -1
- package/lib/module/utils/hooks.js +105 -2
- package/lib/module/utils/hooks.js.map +1 -1
- package/lib/module/utils/theme.js.map +1 -1
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Clock/index.d.ts +1 -0
- package/lib/typescript/Icons/Clock/index.d.ts.map +1 -1
- package/lib/typescript/components/CreatePoll.d.ts.map +1 -1
- package/lib/typescript/components/HLSView.d.ts.map +1 -1
- package/lib/typescript/components/LeaderboardEntry.d.ts +11 -0
- package/lib/typescript/components/LeaderboardEntry.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizSheetScreen.d.ts +8 -0
- package/lib/typescript/components/PollAndQuizSheetScreen.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizVoting.d.ts +2 -0
- package/lib/typescript/components/PollAndQuizVoting.d.ts.map +1 -1
- package/lib/typescript/components/PollQuestions.d.ts +2 -0
- package/lib/typescript/components/PollQuestions.d.ts.map +1 -1
- package/lib/typescript/components/PollsAndQuizBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts +0 -1
- package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts.map +1 -1
- package/lib/typescript/components/PollsConfigAndList.d.ts +1 -0
- package/lib/typescript/components/PollsConfigAndList.d.ts.map +1 -1
- package/lib/typescript/components/PreviousPollsAndQuizzesList.d.ts.map +1 -1
- package/lib/typescript/components/QuizLeaderboardEntriesScreen.d.ts +8 -0
- package/lib/typescript/components/QuizLeaderboardEntriesScreen.d.ts.map +1 -0
- package/lib/typescript/components/QuizLeaderboardScreen.d.ts +8 -0
- package/lib/typescript/components/QuizLeaderboardScreen.d.ts.map +1 -0
- package/lib/typescript/components/QuizLeaderboardSummary.d.ts +9 -0
- package/lib/typescript/components/QuizLeaderboardSummary.d.ts.map +1 -0
- package/lib/typescript/components/VoterParticipationSummary.d.ts +7 -0
- package/lib/typescript/components/VoterParticipationSummary.d.ts.map +1 -0
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +29 -8
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +10 -10
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +20 -18
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +20 -18
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/polls.d.ts +3 -2
- package/lib/typescript/redux/reducers/polls.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/userState.d.ts +3 -2
- package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +9 -2
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/hooks.d.ts +6 -0
- package/lib/typescript/utils/hooks.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/HMSPrebuilt.tsx +4 -0
- package/src/HMSRoomSetup.tsx +35 -5
- package/src/Icons/Clock/assets/clock-vector.png +0 -0
- package/src/Icons/Clock/assets/clock-vector@2x.png +0 -0
- package/src/Icons/Clock/assets/clock-vector@3x.png +0 -0
- package/src/Icons/Clock/assets/clock.png +0 -0
- package/src/Icons/Clock/assets/clock@2x.png +0 -0
- package/src/Icons/Clock/assets/clock@3x.png +0 -0
- package/src/Icons/Clock/index.tsx +16 -3
- package/src/components/CreatePoll.tsx +7 -2
- package/src/components/HLSView.tsx +27 -1
- package/src/components/HMSManageAudioOutput.tsx +1 -1
- package/src/components/HMSPollsQuizzesNotification.tsx +2 -2
- package/src/components/LeaderboardEntry.tsx +181 -0
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +12 -12
- package/src/components/PollAndQuizSheetScreen.tsx +85 -0
- package/src/components/PollAndQuizVoting.tsx +181 -7
- package/src/components/PollQuestions.tsx +171 -49
- package/src/components/PollsAndQuizBottomSheet.tsx +20 -42
- package/src/components/PollsAndQuizzesCard.tsx +2 -2
- package/src/components/PollsAndQuizzesModalContent.tsx +40 -163
- package/src/components/PollsConfigAndList.tsx +107 -11
- package/src/components/PreviousPollsAndQuizzesList.tsx +33 -40
- package/src/components/QuizLeaderboardEntriesScreen.tsx +323 -0
- package/src/components/QuizLeaderboardScreen.tsx +342 -0
- package/src/components/QuizLeaderboardSummary.tsx +207 -0
- package/src/components/VoterParticipationSummary.tsx +67 -0
- package/src/hooks-util.ts +27 -9
- package/src/redux/actionTypes.ts +35 -5
- package/src/redux/actions/index.ts +36 -10
- package/src/redux/reducers/polls.ts +84 -6
- package/src/redux/reducers/userState.ts +17 -12
- package/src/types.ts +14 -2
- package/src/utils/hooks.ts +190 -3
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Text,
|
|
4
|
+
StyleSheet,
|
|
5
|
+
ScrollView,
|
|
6
|
+
View,
|
|
7
|
+
Keyboard,
|
|
8
|
+
TouchableOpacity,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
11
|
+
|
|
12
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
13
|
+
import type { RootState } from '../redux';
|
|
14
|
+
import {
|
|
15
|
+
popFromNavigationStack,
|
|
16
|
+
pushToNavigationStack,
|
|
17
|
+
} from '../redux/actions';
|
|
18
|
+
import { BottomSheet } from './BottomSheet';
|
|
19
|
+
import { ChevronIcon, CloseIcon } from '../Icons';
|
|
20
|
+
import { PollAndQuizzStateLabel } from './PollAndQuizzStateLabel';
|
|
21
|
+
import { LeaderboardEntry } from './LeaderboardEntry';
|
|
22
|
+
import { CreatePollStages } from '../redux/actionTypes';
|
|
23
|
+
import { QuizLeaderboardSummary } from './QuizLeaderboardSummary';
|
|
24
|
+
import {
|
|
25
|
+
useFetchLeaderboardResponse,
|
|
26
|
+
useLeaderboardSummaryData,
|
|
27
|
+
} from '../utils/hooks';
|
|
28
|
+
|
|
29
|
+
export interface QuizLeaderboardScreenProps {
|
|
30
|
+
currentIdx: number;
|
|
31
|
+
dismissModal(): void;
|
|
32
|
+
unmountScreenWithAnimation?(cb: Function): void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const QuizLeaderboardScreen: React.FC<QuizLeaderboardScreenProps> = ({
|
|
36
|
+
currentIdx,
|
|
37
|
+
dismissModal,
|
|
38
|
+
unmountScreenWithAnimation,
|
|
39
|
+
}) => {
|
|
40
|
+
const dispatch = useDispatch();
|
|
41
|
+
|
|
42
|
+
const selectedPoll = useSelector((state: RootState) => {
|
|
43
|
+
const pollsData = state.polls;
|
|
44
|
+
if (pollsData.selectedPollId !== null) {
|
|
45
|
+
return pollsData.polls[pollsData.selectedPollId] || null;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
});
|
|
49
|
+
const headerTitle = useSelector((state: RootState) => {
|
|
50
|
+
const pollsData = state.polls;
|
|
51
|
+
if (pollsData.selectedPollId !== null) {
|
|
52
|
+
return pollsData.polls[pollsData.selectedPollId]?.title || null;
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
58
|
+
regularHighText: {
|
|
59
|
+
color: theme.palette.on_surface_high,
|
|
60
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
61
|
+
},
|
|
62
|
+
regularMediumText: {
|
|
63
|
+
color: theme.palette.on_surface_medium,
|
|
64
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
65
|
+
},
|
|
66
|
+
semiBoldMediumText: {
|
|
67
|
+
color: theme.palette.on_surface_medium,
|
|
68
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
69
|
+
},
|
|
70
|
+
semiBoldHighText: {
|
|
71
|
+
color: theme.palette.on_surface_high,
|
|
72
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
73
|
+
},
|
|
74
|
+
headerText: {
|
|
75
|
+
color: theme.palette.on_surface_high,
|
|
76
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
77
|
+
},
|
|
78
|
+
container: {
|
|
79
|
+
backgroundColor: theme.palette.surface_dim,
|
|
80
|
+
},
|
|
81
|
+
summaryContainer: {
|
|
82
|
+
backgroundColor: theme.palette.surface_default,
|
|
83
|
+
},
|
|
84
|
+
entriesCard: {
|
|
85
|
+
backgroundColor: theme.palette.surface_default,
|
|
86
|
+
},
|
|
87
|
+
divider: {
|
|
88
|
+
backgroundColor: theme.palette.border_bright,
|
|
89
|
+
},
|
|
90
|
+
}));
|
|
91
|
+
|
|
92
|
+
const handleBackPress = () => {
|
|
93
|
+
Keyboard.dismiss();
|
|
94
|
+
if (typeof unmountScreenWithAnimation === 'function') {
|
|
95
|
+
unmountScreenWithAnimation(() => dispatch(popFromNavigationStack()));
|
|
96
|
+
} else {
|
|
97
|
+
dispatch(popFromNavigationStack());
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const handleClosePress = () => {
|
|
102
|
+
Keyboard.dismiss();
|
|
103
|
+
dismissModal();
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const viewAllLeaderboardEntries = () => {
|
|
107
|
+
dispatch(pushToNavigationStack(CreatePollStages.QUIZ_LEADERBOARD_ENTRIES));
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const leaderboardData = useFetchLeaderboardResponse(selectedPoll?.pollId);
|
|
111
|
+
|
|
112
|
+
const leaderboardEntries = leaderboardData?.entries;
|
|
113
|
+
|
|
114
|
+
const summaryData = useLeaderboardSummaryData(selectedPoll?.pollId);
|
|
115
|
+
|
|
116
|
+
const totalPoints =
|
|
117
|
+
selectedPoll?.questions?.reduce((acc, curr) => {
|
|
118
|
+
acc += curr.weight;
|
|
119
|
+
return acc;
|
|
120
|
+
}, 0) ?? 0;
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<View style={[styles.fullView, hmsRoomStyles.container]}>
|
|
124
|
+
{/* Header */}
|
|
125
|
+
<View style={styles.header}>
|
|
126
|
+
<View style={styles.headerControls}>
|
|
127
|
+
{currentIdx > 0 ? (
|
|
128
|
+
<TouchableOpacity
|
|
129
|
+
onPress={handleBackPress}
|
|
130
|
+
hitSlop={styles.closeIconHitSlop}
|
|
131
|
+
style={styles.backIcon}
|
|
132
|
+
>
|
|
133
|
+
<ChevronIcon direction="left" />
|
|
134
|
+
</TouchableOpacity>
|
|
135
|
+
) : null}
|
|
136
|
+
|
|
137
|
+
<Text
|
|
138
|
+
numberOfLines={2}
|
|
139
|
+
style={[
|
|
140
|
+
styles.headerText,
|
|
141
|
+
{ flexShrink: 1 },
|
|
142
|
+
hmsRoomStyles.headerText,
|
|
143
|
+
]}
|
|
144
|
+
>
|
|
145
|
+
{headerTitle}
|
|
146
|
+
</Text>
|
|
147
|
+
|
|
148
|
+
{selectedPoll?.state ? (
|
|
149
|
+
<PollAndQuizzStateLabel state={selectedPoll?.state} />
|
|
150
|
+
) : null}
|
|
151
|
+
</View>
|
|
152
|
+
|
|
153
|
+
<TouchableOpacity
|
|
154
|
+
onPress={handleClosePress}
|
|
155
|
+
hitSlop={styles.closeIconHitSlop}
|
|
156
|
+
style={{ marginLeft: 16 }}
|
|
157
|
+
>
|
|
158
|
+
<CloseIcon />
|
|
159
|
+
</TouchableOpacity>
|
|
160
|
+
</View>
|
|
161
|
+
|
|
162
|
+
{/* Divider */}
|
|
163
|
+
<BottomSheet.Divider style={styles.halfDivider} />
|
|
164
|
+
|
|
165
|
+
{/* Content */}
|
|
166
|
+
<ScrollView
|
|
167
|
+
style={styles.contentContainer}
|
|
168
|
+
contentContainerStyle={styles.scrollViewContentContainer}
|
|
169
|
+
>
|
|
170
|
+
{summaryData ? <QuizLeaderboardSummary data={summaryData} /> : null}
|
|
171
|
+
|
|
172
|
+
{selectedPoll &&
|
|
173
|
+
Array.isArray(selectedPoll.questions) &&
|
|
174
|
+
Array.isArray(leaderboardEntries) &&
|
|
175
|
+
leaderboardEntries.length > 0 ? (
|
|
176
|
+
<React.Fragment>
|
|
177
|
+
<Text style={[styles.normalText, hmsRoomStyles.semiBoldHighText]}>
|
|
178
|
+
Leaderboard
|
|
179
|
+
</Text>
|
|
180
|
+
<Text
|
|
181
|
+
style={[
|
|
182
|
+
styles.smallerText,
|
|
183
|
+
hmsRoomStyles.regularMediumText,
|
|
184
|
+
styles.marginBottom16,
|
|
185
|
+
]}
|
|
186
|
+
>
|
|
187
|
+
Based on time taken to cast the correct answer
|
|
188
|
+
</Text>
|
|
189
|
+
|
|
190
|
+
<View style={[styles.entriesCard, hmsRoomStyles.entriesCard]}>
|
|
191
|
+
{leaderboardEntries.map((entry, index) => {
|
|
192
|
+
return (
|
|
193
|
+
<LeaderboardEntry
|
|
194
|
+
key={index}
|
|
195
|
+
entry={entry}
|
|
196
|
+
totalPoints={totalPoints}
|
|
197
|
+
totalQuestions={selectedPoll.questions?.length ?? 0}
|
|
198
|
+
style={styles.leaderboardEntry}
|
|
199
|
+
/>
|
|
200
|
+
);
|
|
201
|
+
})}
|
|
202
|
+
|
|
203
|
+
{leaderboardData?.hasNext && leaderboardEntries.length >= 5 ? (
|
|
204
|
+
<React.Fragment>
|
|
205
|
+
<View style={[styles.divider, hmsRoomStyles.divider]} />
|
|
206
|
+
|
|
207
|
+
<TouchableOpacity
|
|
208
|
+
onPress={viewAllLeaderboardEntries}
|
|
209
|
+
style={styles.viewAllBtn}
|
|
210
|
+
>
|
|
211
|
+
<Text
|
|
212
|
+
style={[
|
|
213
|
+
styles.smallText,
|
|
214
|
+
hmsRoomStyles.regularHighText,
|
|
215
|
+
{ marginRight: 4 },
|
|
216
|
+
]}
|
|
217
|
+
>
|
|
218
|
+
View All
|
|
219
|
+
</Text>
|
|
220
|
+
|
|
221
|
+
<ChevronIcon direction="right" />
|
|
222
|
+
</TouchableOpacity>
|
|
223
|
+
</React.Fragment>
|
|
224
|
+
) : null}
|
|
225
|
+
</View>
|
|
226
|
+
</React.Fragment>
|
|
227
|
+
) : null}
|
|
228
|
+
</ScrollView>
|
|
229
|
+
</View>
|
|
230
|
+
);
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const styles = StyleSheet.create({
|
|
234
|
+
tinyText: {
|
|
235
|
+
fontSize: 10,
|
|
236
|
+
lineHeight: 16,
|
|
237
|
+
letterSpacing: 1.5,
|
|
238
|
+
},
|
|
239
|
+
smallerText: {
|
|
240
|
+
fontSize: 12,
|
|
241
|
+
lineHeight: 16,
|
|
242
|
+
},
|
|
243
|
+
smallText: {
|
|
244
|
+
fontSize: 14,
|
|
245
|
+
lineHeight: 20,
|
|
246
|
+
},
|
|
247
|
+
normalText: {
|
|
248
|
+
fontSize: 16,
|
|
249
|
+
lineHeight: 24,
|
|
250
|
+
},
|
|
251
|
+
marginBottom8: {
|
|
252
|
+
marginBottom: 8,
|
|
253
|
+
},
|
|
254
|
+
marginBottom16: {
|
|
255
|
+
marginBottom: 16,
|
|
256
|
+
},
|
|
257
|
+
contentContainer: {
|
|
258
|
+
paddingHorizontal: 24,
|
|
259
|
+
},
|
|
260
|
+
scrollViewContentContainer: {
|
|
261
|
+
flexGrow: 1,
|
|
262
|
+
paddingVertical: 24,
|
|
263
|
+
},
|
|
264
|
+
summaryWrapper: {
|
|
265
|
+
flexBasis: '50%',
|
|
266
|
+
flexGrow: 1,
|
|
267
|
+
flexShrink: 1,
|
|
268
|
+
padding: 16,
|
|
269
|
+
borderRadius: 12,
|
|
270
|
+
},
|
|
271
|
+
position: {
|
|
272
|
+
width: 24,
|
|
273
|
+
height: 24,
|
|
274
|
+
borderRadius: 12,
|
|
275
|
+
textAlign: 'center',
|
|
276
|
+
textAlignVertical: 'center',
|
|
277
|
+
marginRight: 12,
|
|
278
|
+
},
|
|
279
|
+
firstPosition: {
|
|
280
|
+
backgroundColor: '#D69516', // '#FFD700'
|
|
281
|
+
},
|
|
282
|
+
secondPosition: {
|
|
283
|
+
backgroundColor: '#3E3E3E', // '#C0C0C0'
|
|
284
|
+
},
|
|
285
|
+
thirdPosition: {
|
|
286
|
+
backgroundColor: '#583B0F', // '#CD7F32'
|
|
287
|
+
},
|
|
288
|
+
iconWrapper: {
|
|
289
|
+
flexDirection: 'row',
|
|
290
|
+
alignItems: 'center',
|
|
291
|
+
marginLeft: 12,
|
|
292
|
+
},
|
|
293
|
+
// Utilities
|
|
294
|
+
fullView: {
|
|
295
|
+
flex: 1,
|
|
296
|
+
},
|
|
297
|
+
// Header
|
|
298
|
+
header: {
|
|
299
|
+
flexDirection: 'row',
|
|
300
|
+
alignItems: 'center',
|
|
301
|
+
justifyContent: 'space-between',
|
|
302
|
+
marginTop: 24,
|
|
303
|
+
marginHorizontal: 24,
|
|
304
|
+
},
|
|
305
|
+
headerControls: {
|
|
306
|
+
flexDirection: 'row',
|
|
307
|
+
alignItems: 'center',
|
|
308
|
+
flexShrink: 1,
|
|
309
|
+
},
|
|
310
|
+
headerText: {
|
|
311
|
+
fontSize: 20,
|
|
312
|
+
lineHeight: 24,
|
|
313
|
+
letterSpacing: 0.15,
|
|
314
|
+
marginRight: 12,
|
|
315
|
+
},
|
|
316
|
+
closeIconHitSlop: {
|
|
317
|
+
bottom: 16,
|
|
318
|
+
left: 16,
|
|
319
|
+
right: 16,
|
|
320
|
+
top: 16,
|
|
321
|
+
},
|
|
322
|
+
backIcon: {
|
|
323
|
+
marginRight: 8,
|
|
324
|
+
},
|
|
325
|
+
// Divider
|
|
326
|
+
halfDivider: {
|
|
327
|
+
marginHorizontal: 24,
|
|
328
|
+
marginVertical: 0,
|
|
329
|
+
marginTop: 24,
|
|
330
|
+
width: undefined,
|
|
331
|
+
},
|
|
332
|
+
divider: { height: 1, width: '100%' },
|
|
333
|
+
viewAllBtn: {
|
|
334
|
+
flexDirection: 'row',
|
|
335
|
+
alignItems: 'center',
|
|
336
|
+
justifyContent: 'flex-end',
|
|
337
|
+
paddingVertical: 12,
|
|
338
|
+
paddingHorizontal: 16,
|
|
339
|
+
},
|
|
340
|
+
leaderboardEntry: { marginBottom: 16, marginHorizontal: 16 },
|
|
341
|
+
entriesCard: { paddingTop: 12, borderRadius: 8 },
|
|
342
|
+
});
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text, StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
5
|
+
|
|
6
|
+
export interface QuizLeaderboardSummaryProps {
|
|
7
|
+
data: { label: string; value: any }[][];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const QuizLeaderboardSummary: React.FC<QuizLeaderboardSummaryProps> = ({
|
|
11
|
+
data,
|
|
12
|
+
}) => {
|
|
13
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
14
|
+
regularHighText: {
|
|
15
|
+
color: theme.palette.on_surface_high,
|
|
16
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
17
|
+
},
|
|
18
|
+
regularMediumText: {
|
|
19
|
+
color: theme.palette.on_surface_medium,
|
|
20
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
21
|
+
},
|
|
22
|
+
semiBoldMediumText: {
|
|
23
|
+
color: theme.palette.on_surface_medium,
|
|
24
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
25
|
+
},
|
|
26
|
+
semiBoldHighText: {
|
|
27
|
+
color: theme.palette.on_surface_high,
|
|
28
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
29
|
+
},
|
|
30
|
+
headerText: {
|
|
31
|
+
color: theme.palette.on_surface_high,
|
|
32
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
33
|
+
},
|
|
34
|
+
container: {
|
|
35
|
+
backgroundColor: theme.palette.surface_dim,
|
|
36
|
+
},
|
|
37
|
+
summaryContainer: {
|
|
38
|
+
backgroundColor: theme.palette.surface_default,
|
|
39
|
+
},
|
|
40
|
+
entriesCard: {
|
|
41
|
+
backgroundColor: theme.palette.surface_default,
|
|
42
|
+
},
|
|
43
|
+
divider: {
|
|
44
|
+
backgroundColor: theme.palette.border_bright,
|
|
45
|
+
},
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View style={{}}>
|
|
50
|
+
<Text
|
|
51
|
+
style={[
|
|
52
|
+
styles.normalText,
|
|
53
|
+
styles.marginBottom16,
|
|
54
|
+
hmsRoomStyles.semiBoldHighText,
|
|
55
|
+
]}
|
|
56
|
+
>
|
|
57
|
+
Participation Summary
|
|
58
|
+
</Text>
|
|
59
|
+
|
|
60
|
+
<View style={styles.marginBottom16}>
|
|
61
|
+
{data.map((summaryMap, index) => (
|
|
62
|
+
<View key={index} style={{ marginBottom: 8, flexDirection: 'row' }}>
|
|
63
|
+
{summaryMap.map((summary, index) => (
|
|
64
|
+
<React.Fragment key={summary.label}>
|
|
65
|
+
{index > 0 ? <View style={{ width: 8 }} /> : null}
|
|
66
|
+
|
|
67
|
+
<View
|
|
68
|
+
style={[
|
|
69
|
+
styles.summaryWrapper,
|
|
70
|
+
hmsRoomStyles.summaryContainer,
|
|
71
|
+
]}
|
|
72
|
+
>
|
|
73
|
+
<Text
|
|
74
|
+
style={[
|
|
75
|
+
styles.tinyText,
|
|
76
|
+
styles.marginBottom8,
|
|
77
|
+
hmsRoomStyles.semiBoldMediumText,
|
|
78
|
+
]}
|
|
79
|
+
>
|
|
80
|
+
{summary.label}
|
|
81
|
+
</Text>
|
|
82
|
+
|
|
83
|
+
<Text
|
|
84
|
+
style={[styles.normalText, hmsRoomStyles.semiBoldHighText]}
|
|
85
|
+
>
|
|
86
|
+
{summary.value}
|
|
87
|
+
</Text>
|
|
88
|
+
</View>
|
|
89
|
+
</React.Fragment>
|
|
90
|
+
))}
|
|
91
|
+
</View>
|
|
92
|
+
))}
|
|
93
|
+
</View>
|
|
94
|
+
</View>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const styles = StyleSheet.create({
|
|
99
|
+
tinyText: {
|
|
100
|
+
fontSize: 10,
|
|
101
|
+
lineHeight: 16,
|
|
102
|
+
letterSpacing: 1.5,
|
|
103
|
+
},
|
|
104
|
+
smallerText: {
|
|
105
|
+
fontSize: 12,
|
|
106
|
+
lineHeight: 16,
|
|
107
|
+
},
|
|
108
|
+
smallText: {
|
|
109
|
+
fontSize: 14,
|
|
110
|
+
lineHeight: 20,
|
|
111
|
+
},
|
|
112
|
+
normalText: {
|
|
113
|
+
fontSize: 16,
|
|
114
|
+
lineHeight: 24,
|
|
115
|
+
},
|
|
116
|
+
marginBottom8: {
|
|
117
|
+
marginBottom: 8,
|
|
118
|
+
},
|
|
119
|
+
marginBottom16: {
|
|
120
|
+
marginBottom: 16,
|
|
121
|
+
},
|
|
122
|
+
contentContainer: {
|
|
123
|
+
paddingHorizontal: 24,
|
|
124
|
+
},
|
|
125
|
+
scrollViewContentContainer: {
|
|
126
|
+
flexGrow: 1,
|
|
127
|
+
paddingVertical: 24,
|
|
128
|
+
},
|
|
129
|
+
summaryWrapper: {
|
|
130
|
+
flexBasis: '50%',
|
|
131
|
+
flexGrow: 1,
|
|
132
|
+
flexShrink: 1,
|
|
133
|
+
padding: 16,
|
|
134
|
+
borderRadius: 12,
|
|
135
|
+
},
|
|
136
|
+
position: {
|
|
137
|
+
width: 24,
|
|
138
|
+
height: 24,
|
|
139
|
+
borderRadius: 12,
|
|
140
|
+
textAlign: 'center',
|
|
141
|
+
textAlignVertical: 'center',
|
|
142
|
+
marginRight: 12,
|
|
143
|
+
},
|
|
144
|
+
firstPosition: {
|
|
145
|
+
backgroundColor: '#D69516', // '#FFD700'
|
|
146
|
+
},
|
|
147
|
+
secondPosition: {
|
|
148
|
+
backgroundColor: '#3E3E3E', // '#C0C0C0'
|
|
149
|
+
},
|
|
150
|
+
thirdPosition: {
|
|
151
|
+
backgroundColor: '#583B0F', // '#CD7F32'
|
|
152
|
+
},
|
|
153
|
+
iconWrapper: {
|
|
154
|
+
flexDirection: 'row',
|
|
155
|
+
alignItems: 'center',
|
|
156
|
+
marginLeft: 12,
|
|
157
|
+
},
|
|
158
|
+
// Utilities
|
|
159
|
+
fullView: {
|
|
160
|
+
flex: 1,
|
|
161
|
+
},
|
|
162
|
+
// Header
|
|
163
|
+
header: {
|
|
164
|
+
flexDirection: 'row',
|
|
165
|
+
alignItems: 'center',
|
|
166
|
+
justifyContent: 'space-between',
|
|
167
|
+
marginTop: 24,
|
|
168
|
+
marginHorizontal: 24,
|
|
169
|
+
},
|
|
170
|
+
headerControls: {
|
|
171
|
+
flexDirection: 'row',
|
|
172
|
+
alignItems: 'center',
|
|
173
|
+
flexShrink: 1,
|
|
174
|
+
},
|
|
175
|
+
headerText: {
|
|
176
|
+
fontSize: 20,
|
|
177
|
+
lineHeight: 24,
|
|
178
|
+
letterSpacing: 0.15,
|
|
179
|
+
marginRight: 12,
|
|
180
|
+
},
|
|
181
|
+
closeIconHitSlop: {
|
|
182
|
+
bottom: 16,
|
|
183
|
+
left: 16,
|
|
184
|
+
right: 16,
|
|
185
|
+
top: 16,
|
|
186
|
+
},
|
|
187
|
+
backIcon: {
|
|
188
|
+
marginRight: 8,
|
|
189
|
+
},
|
|
190
|
+
// Divider
|
|
191
|
+
halfDivider: {
|
|
192
|
+
marginHorizontal: 24,
|
|
193
|
+
marginVertical: 0,
|
|
194
|
+
marginTop: 24,
|
|
195
|
+
width: undefined,
|
|
196
|
+
},
|
|
197
|
+
divider: { height: 1, width: '100%' },
|
|
198
|
+
viewAllBtn: {
|
|
199
|
+
flexDirection: 'row',
|
|
200
|
+
alignItems: 'center',
|
|
201
|
+
justifyContent: 'flex-end',
|
|
202
|
+
paddingVertical: 12,
|
|
203
|
+
paddingHorizontal: 16,
|
|
204
|
+
},
|
|
205
|
+
leaderboardEntry: { marginBottom: 16, marginHorizontal: 16 },
|
|
206
|
+
entriesCard: { paddingTop: 12, borderRadius: 8 },
|
|
207
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { HMSPoll } from '@100mslive/react-native-hms';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
|
|
5
|
+
import type { RootState } from '../redux';
|
|
6
|
+
import { QuizLeaderboardSummary } from './QuizLeaderboardSummary';
|
|
7
|
+
import { useFetchLeaderboardResponse } from '../utils/hooks';
|
|
8
|
+
|
|
9
|
+
export interface VoterParticipationSummaryProps {
|
|
10
|
+
pollId: HMSPoll['pollId'];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const VoterParticipationSummary: React.FC<
|
|
14
|
+
VoterParticipationSummaryProps
|
|
15
|
+
> = ({ pollId }) => {
|
|
16
|
+
const localPeerUserId = useSelector(
|
|
17
|
+
(state: RootState) => state.hmsStates.localPeer?.customerUserID
|
|
18
|
+
);
|
|
19
|
+
const leaderboardData = useFetchLeaderboardResponse(pollId);
|
|
20
|
+
const totalQuestions = useSelector(
|
|
21
|
+
(state: RootState) => state.polls.polls[pollId]?.questions?.length
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const localLeaderboardEntry =
|
|
25
|
+
localPeerUserId && leaderboardData && Array.isArray(leaderboardData.entries)
|
|
26
|
+
? leaderboardData.entries.find(
|
|
27
|
+
(entry) => entry.peer?.customerUserId === localPeerUserId
|
|
28
|
+
)
|
|
29
|
+
: null;
|
|
30
|
+
|
|
31
|
+
const data = React.useMemo(() => {
|
|
32
|
+
return [
|
|
33
|
+
[
|
|
34
|
+
{
|
|
35
|
+
label: 'ANSWERED',
|
|
36
|
+
value:
|
|
37
|
+
localLeaderboardEntry &&
|
|
38
|
+
typeof localLeaderboardEntry.totalResponses === 'number' &&
|
|
39
|
+
typeof totalQuestions === 'number'
|
|
40
|
+
? `${Math.round((localLeaderboardEntry.totalResponses / totalQuestions) * 100)}% (${localLeaderboardEntry.totalResponses}/${totalQuestions})`
|
|
41
|
+
: '-',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
label: 'CORRECT ANSWERS',
|
|
45
|
+
value:
|
|
46
|
+
localLeaderboardEntry &&
|
|
47
|
+
typeof localLeaderboardEntry.correctResponses === 'number' &&
|
|
48
|
+
typeof totalQuestions === 'number'
|
|
49
|
+
? `${Math.round((localLeaderboardEntry.correctResponses / totalQuestions) * 100)}% (${localLeaderboardEntry.correctResponses}/${totalQuestions})`
|
|
50
|
+
: '-',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
{
|
|
55
|
+
label: 'TIME TAKEN',
|
|
56
|
+
value:
|
|
57
|
+
localLeaderboardEntry &&
|
|
58
|
+
typeof localLeaderboardEntry.duration === 'number'
|
|
59
|
+
? `${(localLeaderboardEntry.duration / 1000).toFixed(2)}s`
|
|
60
|
+
: '-',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
];
|
|
64
|
+
}, [localLeaderboardEntry]);
|
|
65
|
+
|
|
66
|
+
return <QuizLeaderboardSummary data={data} />;
|
|
67
|
+
};
|
package/src/hooks-util.ts
CHANGED
|
@@ -1777,11 +1777,22 @@ export const useHMSConfig = () => {
|
|
|
1777
1777
|
|
|
1778
1778
|
const storeState = store.getState() as RootState;
|
|
1779
1779
|
|
|
1780
|
-
const
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1780
|
+
const givenToken = storeState.user.token;
|
|
1781
|
+
let genToken = null;
|
|
1782
|
+
|
|
1783
|
+
if (!givenToken) {
|
|
1784
|
+
if (storeState.user.roomCode) {
|
|
1785
|
+
genToken = await hmsInstance.getAuthTokenByRoomCode(
|
|
1786
|
+
storeState.user.roomCode,
|
|
1787
|
+
storeState.user.userId,
|
|
1788
|
+
storeState.user.endPoints?.token
|
|
1789
|
+
);
|
|
1790
|
+
} else {
|
|
1791
|
+
throw new Error('`token` or `roomCode` is required to join a HMS Room');
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
const token = (givenToken || genToken) as string;
|
|
1785
1796
|
|
|
1786
1797
|
// TODO: [REMOVE LATER] added trycatch block so that we can join rooms where we are getting error from Layout API
|
|
1787
1798
|
try {
|
|
@@ -2165,6 +2176,7 @@ export const useLeaveMethods = () => {
|
|
|
2165
2176
|
// Otherwise default action is to show "Meeting Ended" screen
|
|
2166
2177
|
dispatch(changeMeetingState(MeetingState.MEETING_ENDED));
|
|
2167
2178
|
}
|
|
2179
|
+
hmsInstance.setAlwaysScreenOn(false);
|
|
2168
2180
|
} catch (e) {
|
|
2169
2181
|
console.log(`Destroy HMS instance Error: ${e}`);
|
|
2170
2182
|
Toast.showWithGravity(
|
|
@@ -2591,17 +2603,23 @@ export const useSavePropsToStore = (
|
|
|
2591
2603
|
props: HMSPrebuiltProps,
|
|
2592
2604
|
dispatch: AppDispatch
|
|
2593
2605
|
) => {
|
|
2594
|
-
const {
|
|
2595
|
-
|
|
2606
|
+
const {
|
|
2607
|
+
roomCode,
|
|
2608
|
+
token,
|
|
2609
|
+
options,
|
|
2610
|
+
onLeave,
|
|
2611
|
+
handleBackButton,
|
|
2612
|
+
autoEnterPipMode,
|
|
2613
|
+
} = props;
|
|
2596
2614
|
|
|
2597
|
-
dispatch(setPrebuiltData({ roomCode, options }));
|
|
2615
|
+
dispatch(setPrebuiltData({ roomCode, token, options }));
|
|
2598
2616
|
|
|
2599
2617
|
useEffect(() => {
|
|
2600
2618
|
const passedUserName = options?.userName;
|
|
2601
2619
|
if (passedUserName && passedUserName.length > 0) {
|
|
2602
2620
|
dispatch(setEditUsernameDisabled(true));
|
|
2603
2621
|
}
|
|
2604
|
-
}, [roomCode, options]);
|
|
2622
|
+
}, [roomCode, token, options]);
|
|
2605
2623
|
|
|
2606
2624
|
useEffect(() => {
|
|
2607
2625
|
dispatch(setOnLeaveHandler(onLeave));
|