@100mslive/roomkit-react 0.4.3-alpha.2 → 0.4.3-alpha.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/dist/Prebuilt/App.d.ts +0 -1
- package/dist/Prebuilt/AppContext.d.ts +0 -1
- package/dist/index.cjs.css +194 -219
- package/dist/index.cjs.css.map +3 -3
- package/dist/index.cjs.js +8 -56
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.css +194 -219
- package/dist/index.css.map +3 -3
- package/dist/index.js +8 -56
- package/dist/index.js.map +3 -3
- package/dist/meta.cjs.json +23 -41
- package/dist/meta.esbuild.json +23 -41
- package/package.json +8 -9
- package/src/Accordion/Accordion.tsx +0 -88
- package/src/Accordion/index.ts +0 -8
- package/src/AudioLevel/AudioLevel.tsx +0 -84
- package/src/AudioLevel/audio-level.png +0 -0
- package/src/AudioLevel/index.ts +0 -2
- package/src/AudioLevel/useBorderAudioLevel.tsx +0 -34
- package/src/Avatar/Avatar.tsx +0 -60
- package/src/Avatar/getAvatarBg.ts +0 -50
- package/src/Avatar/index.ts +0 -1
- package/src/Button/Button.tsx +0 -210
- package/src/Button/index.tsx +0 -1
- package/src/Checkbox/Checkbox.tsx +0 -35
- package/src/Checkbox/index.tsx +0 -1
- package/src/Collapsible/Collapsible.tsx +0 -34
- package/src/Collapsible/index.tsx +0 -1
- package/src/Diagnostics/AudioTest.tsx +0 -188
- package/src/Diagnostics/BrowserTest.tsx +0 -141
- package/src/Diagnostics/ConnectivityTest.tsx +0 -383
- package/src/Diagnostics/DeviceSelector.jsx +0 -71
- package/src/Diagnostics/Diagnostics.tsx +0 -190
- package/src/Diagnostics/DiagnosticsContext.ts +0 -46
- package/src/Diagnostics/VideoTest.tsx +0 -72
- package/src/Diagnostics/components.tsx +0 -70
- package/src/Diagnostics/index.ts +0 -1
- package/src/Divider/Divider.tsx +0 -45
- package/src/Divider/index.ts +0 -1
- package/src/Dropdown/Dropdown.tsx +0 -145
- package/src/Dropdown/index.tsx +0 -1
- package/src/Fieldset/Fieldset.tsx +0 -11
- package/src/Fieldset/index.tsx +0 -1
- package/src/Footer/Footer.tsx +0 -47
- package/src/Footer/index.tsx +0 -1
- package/src/IconButton/IconButton.tsx +0 -43
- package/src/IconButton/index.tsx +0 -1
- package/src/Input/Input.tsx +0 -109
- package/src/Input/index.tsx +0 -1
- package/src/Label/Label.tsx +0 -8
- package/src/Label/index.ts +0 -1
- package/src/Layout/Box.tsx +0 -3
- package/src/Layout/Flex.tsx +0 -76
- package/src/Layout/index.tsx +0 -2
- package/src/Link/Link.tsx +0 -54
- package/src/Link/index.tsx +0 -2
- package/src/Loading/Loading.tsx +0 -30
- package/src/Loading/index.ts +0 -1
- package/src/Modal/Dialog.tsx +0 -57
- package/src/Modal/DialogContent.tsx +0 -65
- package/src/Modal/index.ts +0 -1
- package/src/Pagination/StyledPagination.tsx +0 -70
- package/src/Pagination/index.tsx +0 -1
- package/src/Popover/index.tsx +0 -34
- package/src/Prebuilt/App.tsx +0 -323
- package/src/Prebuilt/AppContext.tsx +0 -34
- package/src/Prebuilt/AppStateContext.tsx +0 -95
- package/src/Prebuilt/IconButton.tsx +0 -26
- package/src/Prebuilt/common/PeersSorter.ts +0 -111
- package/src/Prebuilt/common/constants.ts +0 -151
- package/src/Prebuilt/common/hooks.ts +0 -257
- package/src/Prebuilt/common/utils.js +0 -185
- package/src/Prebuilt/components/AppData/AppData.tsx +0 -208
- package/src/Prebuilt/components/AppData/useChatState.js +0 -18
- package/src/Prebuilt/components/AppData/useSheet.ts +0 -33
- package/src/Prebuilt/components/AppData/useSidepane.js +0 -99
- package/src/Prebuilt/components/AppData/useSidepaneResetOnLayoutUpdate.tsx +0 -22
- package/src/Prebuilt/components/AppData/useUISettings.js +0 -212
- package/src/Prebuilt/components/AudioVideoToggle.tsx +0 -411
- package/src/Prebuilt/components/AuthToken.tsx +0 -148
- package/src/Prebuilt/components/CaptionIcon.tsx +0 -27
- package/src/Prebuilt/components/Chat/ArrowNavigation.tsx +0 -44
- package/src/Prebuilt/components/Chat/Chat.tsx +0 -190
- package/src/Prebuilt/components/Chat/ChatActions.tsx +0 -314
- package/src/Prebuilt/components/Chat/ChatBody.tsx +0 -493
- package/src/Prebuilt/components/Chat/ChatFooter.tsx +0 -316
- package/src/Prebuilt/components/Chat/ChatSelector.tsx +0 -228
- package/src/Prebuilt/components/Chat/ChatSelectorContainer.tsx +0 -158
- package/src/Prebuilt/components/Chat/ChatStates.tsx +0 -73
- package/src/Prebuilt/components/Chat/EmptyChat.tsx +0 -58
- package/src/Prebuilt/components/Chat/MwebChatOption.tsx +0 -24
- package/src/Prebuilt/components/Chat/PinnedMessage.tsx +0 -140
- package/src/Prebuilt/components/Chat/StickIndicator.tsx +0 -24
- package/src/Prebuilt/components/Chat/useEmojiPickerStyles.js +0 -32
- package/src/Prebuilt/components/Chat/useUnreadCount.ts +0 -19
- package/src/Prebuilt/components/Chat/utils.ts +0 -11
- package/src/Prebuilt/components/ChatSettings.tsx +0 -68
- package/src/Prebuilt/components/Chip.tsx +0 -40
- package/src/Prebuilt/components/ConferenceScreen.tsx +0 -205
- package/src/Prebuilt/components/Connection/ConnectionIndicator.tsx +0 -89
- package/src/Prebuilt/components/Connection/TileConnection.tsx +0 -93
- package/src/Prebuilt/components/Connection/connectionQualityUtils.js +0 -37
- package/src/Prebuilt/components/EmojiReaction.jsx +0 -100
- package/src/Prebuilt/components/EndCallFeedback/Feedback.tsx +0 -71
- package/src/Prebuilt/components/EndCallFeedback/FeedbackForm.tsx +0 -381
- package/src/Prebuilt/components/EndCallFeedback/ThankyouView.tsx +0 -64
- package/src/Prebuilt/components/ErrorBoundary.jsx +0 -102
- package/src/Prebuilt/components/Footer/ChatToggle.tsx +0 -53
- package/src/Prebuilt/components/Footer/EmojiCard.jsx +0 -34
- package/src/Prebuilt/components/Footer/Footer.tsx +0 -115
- package/src/Prebuilt/components/Footer/PaginatedParticipants.tsx +0 -124
- package/src/Prebuilt/components/Footer/ParticipantList.tsx +0 -478
- package/src/Prebuilt/components/Footer/PollsToggle.tsx +0 -37
- package/src/Prebuilt/components/Footer/RoleAccordion.tsx +0 -183
- package/src/Prebuilt/components/Footer/RoleOptions.tsx +0 -215
- package/src/Prebuilt/components/Footer/WhiteboardToggle.tsx +0 -52
- package/src/Prebuilt/components/FullPageProgress.tsx +0 -22
- package/src/Prebuilt/components/HMSVideo/Controls.jsx +0 -22
- package/src/Prebuilt/components/HMSVideo/FullscreenButton.tsx +0 -13
- package/src/Prebuilt/components/HMSVideo/HLSAutoplayBlockedPrompt.tsx +0 -72
- package/src/Prebuilt/components/HMSVideo/HLSCaptionSelector.tsx +0 -15
- package/src/Prebuilt/components/HMSVideo/HLSQualitySelector.tsx +0 -248
- package/src/Prebuilt/components/HMSVideo/HMSVideo.jsx +0 -75
- package/src/Prebuilt/components/HMSVideo/MwebHLSViewTitle.tsx +0 -86
- package/src/Prebuilt/components/HMSVideo/PlayPauseButton.tsx +0 -27
- package/src/Prebuilt/components/HMSVideo/PlayPauseSeekControls.tsx +0 -158
- package/src/Prebuilt/components/HMSVideo/PlayerContext.tsx +0 -15
- package/src/Prebuilt/components/HMSVideo/SeekControl.tsx +0 -22
- package/src/Prebuilt/components/HMSVideo/VideoProgress.tsx +0 -100
- package/src/Prebuilt/components/HMSVideo/VideoTime.tsx +0 -52
- package/src/Prebuilt/components/HMSVideo/VolumeControl.tsx +0 -70
- package/src/Prebuilt/components/HMSVideo/index.ts +0 -24
- package/src/Prebuilt/components/HMSVideo/utils.ts +0 -37
- package/src/Prebuilt/components/Header/Header.tsx +0 -52
- package/src/Prebuilt/components/Header/HeaderComponents.jsx +0 -57
- package/src/Prebuilt/components/Header/ParticipantFilter.jsx +0 -89
- package/src/Prebuilt/components/Header/RoomDetailsHeader.tsx +0 -51
- package/src/Prebuilt/components/Header/StreamActions.tsx +0 -297
- package/src/Prebuilt/components/Header/common.jsx +0 -196
- package/src/Prebuilt/components/Header/index.tsx +0 -1
- package/src/Prebuilt/components/HlsStatsOverlay.jsx +0 -89
- package/src/Prebuilt/components/IconButtonWithOptions/IconButtonWithOptions.tsx +0 -167
- package/src/Prebuilt/components/Input/KeyboardInputManager.js +0 -107
- package/src/Prebuilt/components/InsetTile.tsx +0 -136
- package/src/Prebuilt/components/LayoutModeSelector.tsx +0 -112
- package/src/Prebuilt/components/Leave/DesktopLeaveRoom.tsx +0 -166
- package/src/Prebuilt/components/Leave/EndSessionContent.tsx +0 -64
- package/src/Prebuilt/components/Leave/LeaveAtoms.tsx +0 -26
- package/src/Prebuilt/components/Leave/LeaveCard.tsx +0 -36
- package/src/Prebuilt/components/Leave/LeaveRoom.tsx +0 -82
- package/src/Prebuilt/components/Leave/LeaveSessionContent.tsx +0 -61
- package/src/Prebuilt/components/Leave/MwebLeaveRoom.tsx +0 -135
- package/src/Prebuilt/components/LeaveScreen.tsx +0 -71
- package/src/Prebuilt/components/MoreSettings/ActionTile.jsx +0 -60
- package/src/Prebuilt/components/MoreSettings/BulkRoleChangeModal.jsx +0 -139
- package/src/Prebuilt/components/MoreSettings/CaptionContent.tsx +0 -143
- package/src/Prebuilt/components/MoreSettings/CaptionModal.tsx +0 -37
- package/src/Prebuilt/components/MoreSettings/ChangeNameContent.tsx +0 -123
- package/src/Prebuilt/components/MoreSettings/ChangeNameModal.tsx +0 -78
- package/src/Prebuilt/components/MoreSettings/EmbedUrl.jsx +0 -81
- package/src/Prebuilt/components/MoreSettings/FullScreenItem.tsx +0 -26
- package/src/Prebuilt/components/MoreSettings/MoreSettings.tsx +0 -29
- package/src/Prebuilt/components/MoreSettings/MuteAllContent.tsx +0 -81
- package/src/Prebuilt/components/MoreSettings/MuteAllModal.tsx +0 -72
- package/src/Prebuilt/components/MoreSettings/SplitComponents/DesktopOptions.tsx +0 -282
- package/src/Prebuilt/components/MoreSettings/SplitComponents/MwebOptions.tsx +0 -387
- package/src/Prebuilt/components/MoreSettings/constants.ts +0 -14
- package/src/Prebuilt/components/MwebLandscapePrompt.tsx +0 -81
- package/src/Prebuilt/components/Notifications/AutoplayBlockedModal.tsx +0 -39
- package/src/Prebuilt/components/Notifications/ChatNotifications.tsx +0 -34
- package/src/Prebuilt/components/Notifications/DeviceChangeNotifications.tsx +0 -18
- package/src/Prebuilt/components/Notifications/DeviceInUseError.tsx +0 -86
- package/src/Prebuilt/components/Notifications/ErrorNotifications.tsx +0 -56
- package/src/Prebuilt/components/Notifications/HLSFailureModal.tsx +0 -71
- package/src/Prebuilt/components/Notifications/HandRaisedNotifications.tsx +0 -78
- package/src/Prebuilt/components/Notifications/InitErrorModal.tsx +0 -42
- package/src/Prebuilt/components/Notifications/MessageNotifications.tsx +0 -24
- package/src/Prebuilt/components/Notifications/Notifications.tsx +0 -65
- package/src/Prebuilt/components/Notifications/PeerNotifications.tsx +0 -52
- package/src/Prebuilt/components/Notifications/PermissionErrorModal.tsx +0 -144
- package/src/Prebuilt/components/Notifications/PollNotificationModal.tsx +0 -71
- package/src/Prebuilt/components/Notifications/ReconnectNotifications.tsx +0 -33
- package/src/Prebuilt/components/Notifications/RoleChangeNotification.tsx +0 -24
- package/src/Prebuilt/components/Notifications/TrackBulkUnmuteModal.tsx +0 -61
- package/src/Prebuilt/components/Notifications/TrackNotifications.tsx +0 -41
- package/src/Prebuilt/components/Notifications/TrackUnmuteModal.tsx +0 -63
- package/src/Prebuilt/components/Notifications/TranscriptionNotifications.tsx +0 -58
- package/src/Prebuilt/components/Notifications/index.tsx +0 -1
- package/src/Prebuilt/components/PIP/PIPChat.tsx +0 -292
- package/src/Prebuilt/components/PIP/PIPChatOption.tsx +0 -18
- package/src/Prebuilt/components/PIP/PIPComponent.tsx +0 -90
- package/src/Prebuilt/components/PIP/PIPManager.ts +0 -335
- package/src/Prebuilt/components/PIP/PIPProvider.tsx +0 -56
- package/src/Prebuilt/components/PIP/PIPWindow.tsx +0 -13
- package/src/Prebuilt/components/PIP/SetupMediaSession.js +0 -60
- package/src/Prebuilt/components/PIP/context.ts +0 -10
- package/src/Prebuilt/components/PIP/index.jsx +0 -6
- package/src/Prebuilt/components/PIP/pip.test.js +0 -72
- package/src/Prebuilt/components/PIP/pipUtils.js +0 -183
- package/src/Prebuilt/components/PIP/usePIPChat.tsx +0 -105
- package/src/Prebuilt/components/PIP/usePIPWindow.tsx +0 -12
- package/src/Prebuilt/components/Pagination.tsx +0 -60
- package/src/Prebuilt/components/Polls/CreatePollQuiz/PollsQuizMenu.tsx +0 -248
- package/src/Prebuilt/components/Polls/CreateQuestions/CreateQuestions.jsx +0 -142
- package/src/Prebuilt/components/Polls/CreateQuestions/DeleteQuestionModal.tsx +0 -74
- package/src/Prebuilt/components/Polls/CreateQuestions/QuestionForm.tsx +0 -324
- package/src/Prebuilt/components/Polls/CreateQuestions/SavedQuestion.tsx +0 -64
- package/src/Prebuilt/components/Polls/Polls.tsx +0 -31
- package/src/Prebuilt/components/Polls/Voting/LeaderboardEntry.tsx +0 -76
- package/src/Prebuilt/components/Polls/Voting/LeaderboardSummary.tsx +0 -116
- package/src/Prebuilt/components/Polls/Voting/PeerParticipationSummary.tsx +0 -60
- package/src/Prebuilt/components/Polls/Voting/QuestionCard.jsx +0 -221
- package/src/Prebuilt/components/Polls/Voting/StandardVoting.tsx +0 -47
- package/src/Prebuilt/components/Polls/Voting/StatisticBox.tsx +0 -20
- package/src/Prebuilt/components/Polls/Voting/TimedVoting.tsx +0 -55
- package/src/Prebuilt/components/Polls/Voting/Voting.tsx +0 -143
- package/src/Prebuilt/components/Polls/Voting/useQuizSummary.tsx +0 -50
- package/src/Prebuilt/components/Polls/common/Line.tsx +0 -4
- package/src/Prebuilt/components/Polls/common/MultipleChoiceOptions.jsx +0 -115
- package/src/Prebuilt/components/Polls/common/OptionInputWithDelete.tsx +0 -38
- package/src/Prebuilt/components/Polls/common/SingleChoiceOptions.jsx +0 -140
- package/src/Prebuilt/components/Polls/common/StatusIndicator.tsx +0 -35
- package/src/Prebuilt/components/Polls/common/VoteCount.tsx +0 -15
- package/src/Prebuilt/components/Polls/common/VoteProgress.tsx +0 -18
- package/src/Prebuilt/components/Polls/common/constants.ts +0 -5
- package/src/Prebuilt/components/Polls/common/utils.ts +0 -22
- package/src/Prebuilt/components/Preview/PreviewForm.tsx +0 -94
- package/src/Prebuilt/components/Preview/PreviewJoin.tsx +0 -292
- package/src/Prebuilt/components/Preview/PreviewScreen.tsx +0 -38
- package/src/Prebuilt/components/PreviousRoleInMetadata.tsx +0 -20
- package/src/Prebuilt/components/RaiseHand.tsx +0 -30
- package/src/Prebuilt/components/RemoveParticipant.tsx +0 -35
- package/src/Prebuilt/components/RoleChangeModal.tsx +0 -188
- package/src/Prebuilt/components/RoleChangeRequest/RequestPrompt.tsx +0 -75
- package/src/Prebuilt/components/RoleChangeRequest/RoleChangeRequestModal.tsx +0 -94
- package/src/Prebuilt/components/RoomDetails/Duration.tsx +0 -26
- package/src/Prebuilt/components/RoomDetails/RoomDetailsPane.tsx +0 -63
- package/src/Prebuilt/components/RoomDetails/RoomDetailsRow.tsx +0 -23
- package/src/Prebuilt/components/RoomDetails/RoomDetailsSheet.tsx +0 -45
- package/src/Prebuilt/components/ScreenShareToggle.jsx +0 -58
- package/src/Prebuilt/components/ScreenshareDisplay.tsx +0 -39
- package/src/Prebuilt/components/ScreenshareTile.tsx +0 -134
- package/src/Prebuilt/components/SecondaryTiles.tsx +0 -81
- package/src/Prebuilt/components/Settings/DeviceSettings.jsx +0 -208
- package/src/Prebuilt/components/Settings/LayoutSettings.tsx +0 -74
- package/src/Prebuilt/components/Settings/NotificationSettings.tsx +0 -66
- package/src/Prebuilt/components/Settings/SettingsModal.jsx +0 -301
- package/src/Prebuilt/components/Settings/StartRecording.jsx +0 -101
- package/src/Prebuilt/components/Settings/SwitchWithLabel.tsx +0 -53
- package/src/Prebuilt/components/Settings/common.ts +0 -16
- package/src/Prebuilt/components/ShareMenuIcon.jsx +0 -27
- package/src/Prebuilt/components/SidePaneTabs.tsx +0 -214
- package/src/Prebuilt/components/StatsForNerds.jsx +0 -373
- package/src/Prebuilt/components/Streaming/Common.jsx +0 -143
- package/src/Prebuilt/components/Streaming/ResolutionInput.jsx +0 -88
- package/src/Prebuilt/components/TileMenu/TileMenu.tsx +0 -148
- package/src/Prebuilt/components/TileMenu/TileMenuContent.tsx +0 -393
- package/src/Prebuilt/components/TileMenu/utils.ts +0 -7
- package/src/Prebuilt/components/Toast/Toast.jsx +0 -17
- package/src/Prebuilt/components/Toast/ToastBatcher.js +0 -64
- package/src/Prebuilt/components/Toast/ToastConfig.jsx +0 -177
- package/src/Prebuilt/components/Toast/ToastContainer.jsx +0 -30
- package/src/Prebuilt/components/Toast/ToastManager.js +0 -44
- package/src/Prebuilt/components/VideoLayouts/EqualProminence.tsx +0 -62
- package/src/Prebuilt/components/VideoLayouts/Grid.tsx +0 -43
- package/src/Prebuilt/components/VideoLayouts/GridLayout.tsx +0 -155
- package/src/Prebuilt/components/VideoLayouts/ProminenceLayout.tsx +0 -91
- package/src/Prebuilt/components/VideoLayouts/RoleProminence.tsx +0 -66
- package/src/Prebuilt/components/VideoLayouts/ScreenshareLayout.tsx +0 -74
- package/src/Prebuilt/components/VideoLayouts/WhiteboardLayout.tsx +0 -93
- package/src/Prebuilt/components/VideoLayouts/interface.ts +0 -11
- package/src/Prebuilt/components/VideoTile.tsx +0 -203
- package/src/Prebuilt/components/VirtualBackground/VBCollection.tsx +0 -52
- package/src/Prebuilt/components/VirtualBackground/VBHandler.tsx +0 -130
- package/src/Prebuilt/components/VirtualBackground/VBOption.tsx +0 -57
- package/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +0 -252
- package/src/Prebuilt/components/VirtualBackground/VBToggle.tsx +0 -50
- package/src/Prebuilt/components/hooks/useAudioOutputTest.tsx +0 -20
- package/src/Prebuilt/components/hooks/useAutoStartStreaming.tsx +0 -70
- package/src/Prebuilt/components/hooks/useChatBlacklist.ts +0 -29
- package/src/Prebuilt/components/hooks/useCloseScreenshareWhiteboard.tsx +0 -17
- package/src/Prebuilt/components/hooks/useDropdownList.ts +0 -24
- package/src/Prebuilt/components/hooks/useDropdownSelection.jsx +0 -3
- package/src/Prebuilt/components/hooks/useFullscreen.ts +0 -46
- package/src/Prebuilt/components/hooks/useGroupOnStageActions.tsx +0 -54
- package/src/Prebuilt/components/hooks/useMetadata.tsx +0 -56
- package/src/Prebuilt/components/hooks/usePeerOnStageActions.tsx +0 -49
- package/src/Prebuilt/components/hooks/usePinnedBy.tsx +0 -22
- package/src/Prebuilt/components/hooks/usePinnedMessages.ts +0 -78
- package/src/Prebuilt/components/hooks/usePlaylist.js +0 -25
- package/src/Prebuilt/components/hooks/usePlaylistMusic.js +0 -35
- package/src/Prebuilt/components/hooks/useRedirectToLeave.tsx +0 -23
- package/src/Prebuilt/components/hooks/useRoleProminencePeers.tsx +0 -39
- package/src/Prebuilt/components/hooks/useScreenshareAudio.js +0 -28
- package/src/Prebuilt/components/hooks/useTileLayout.tsx +0 -128
- package/src/Prebuilt/components/hooks/useUnreadPollQuizPresent.tsx +0 -17
- package/src/Prebuilt/components/hooks/useUserPreferences.jsx +0 -26
- package/src/Prebuilt/components/hooks/useVideoTileLayout.ts +0 -26
- package/src/Prebuilt/components/init/Init.jsx +0 -31
- package/src/Prebuilt/components/pdfAnnotator/pdfFileOptions.jsx +0 -42
- package/src/Prebuilt/components/pdfAnnotator/pdfHeader.jsx +0 -31
- package/src/Prebuilt/components/pdfAnnotator/pdfInfo.jsx +0 -32
- package/src/Prebuilt/components/pdfAnnotator/shareScreenOptions.jsx +0 -211
- package/src/Prebuilt/components/pdfAnnotator/submitPdf.jsx +0 -48
- package/src/Prebuilt/components/pdfAnnotator/uploadedFile.jsx +0 -71
- package/src/Prebuilt/components/peerTileUtils.tsx +0 -42
- package/src/Prebuilt/images/android-perm-1.png +0 -0
- package/src/Prebuilt/images/empty-chat.svg +0 -12
- package/src/Prebuilt/images/ios-perm-0.png +0 -0
- package/src/Prebuilt/images/pdf-share.png +0 -0
- package/src/Prebuilt/images/rtmp.png +0 -0
- package/src/Prebuilt/images/screen-share.png +0 -0
- package/src/Prebuilt/images/transaction_error.svg +0 -12
- package/src/Prebuilt/index.ts +0 -1
- package/src/Prebuilt/layouts/EmbedView.jsx +0 -94
- package/src/Prebuilt/layouts/HLSView.jsx +0 -794
- package/src/Prebuilt/layouts/PDFView.jsx +0 -67
- package/src/Prebuilt/layouts/Sheet.tsx +0 -14
- package/src/Prebuilt/layouts/SidePane.tsx +0 -241
- package/src/Prebuilt/layouts/VideoStreamingSection.tsx +0 -164
- package/src/Prebuilt/layouts/WaitingView.tsx +0 -52
- package/src/Prebuilt/plugins/CaptionsViewer.tsx +0 -261
- package/src/Prebuilt/plugins/FlyingEmoji.jsx +0 -154
- package/src/Prebuilt/plugins/RemoteStopScreenshare.jsx +0 -18
- package/src/Prebuilt/plugins/transcription/Transcriber.js +0 -216
- package/src/Prebuilt/plugins/transcription/TranscriptionButton.jsx +0 -138
- package/src/Prebuilt/plugins/transcription/index.jsx +0 -1
- package/src/Prebuilt/primitives/DialogContent.jsx +0 -285
- package/src/Prebuilt/primitives/DropdownTrigger.jsx +0 -46
- package/src/Prebuilt/provider/roomLayoutProvider/constants/index.ts +0 -60
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useFetchRoomLayout.ts +0 -88
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useInsetEnabled.ts +0 -10
- package/src/Prebuilt/provider/roomLayoutProvider/hooks/useRoomLayoutScreen.ts +0 -112
- package/src/Prebuilt/provider/roomLayoutProvider/index.tsx +0 -53
- package/src/Prebuilt/services/FeatureFlags.jsx +0 -46
- package/src/Progress/index.tsx +0 -17
- package/src/QRCode/QRCode.tsx +0 -6
- package/src/QRCode/index.tsx +0 -1
- package/src/RadioGroup/RadioGroup.tsx +0 -33
- package/src/RadioGroup/index.tsx +0 -1
- package/src/ReactSelect/ReactSelect.tsx +0 -97
- package/src/ReactSelect/index.ts +0 -1
- package/src/Select/Select.tsx +0 -63
- package/src/Select/index.ts +0 -1
- package/src/Sheet/Sheet.tsx +0 -122
- package/src/Sheet/index.ts +0 -1
- package/src/Slider/Slider.tsx +0 -70
- package/src/Slider/index.ts +0 -1
- package/src/Stats/Stats.tsx +0 -243
- package/src/Stats/StyledStats.tsx +0 -57
- package/src/Stats/formatBytes.ts +0 -19
- package/src/Stats/index.tsx +0 -2
- package/src/Stats/useQoE.ts +0 -79
- package/src/Switch/Switch.tsx +0 -52
- package/src/Switch/index.ts +0 -1
- package/src/Tabs/Tabs.tsx +0 -41
- package/src/Tabs/index.tsx +0 -1
- package/src/Text/Text.tsx +0 -149
- package/src/Text/index.tsx +0 -1
- package/src/TextArea/TextArea.tsx +0 -30
- package/src/TextArea/index.tsx +0 -1
- package/src/Theme/ThemeProvider.tsx +0 -98
- package/src/Theme/base.config.ts +0 -236
- package/src/Theme/index.tsx +0 -2
- package/src/Theme/stitches.config.ts +0 -88
- package/src/Theme/useSSR.tsx +0 -24
- package/src/TileMenu/StyledMenuTile.tsx +0 -105
- package/src/TileMenu/TileMenu.tsx +0 -98
- package/src/TileMenu/index.tsx +0 -1
- package/src/Toast/Toast.tsx +0 -170
- package/src/Toast/index.tsx +0 -1
- package/src/Tooltip/Tooltip.tsx +0 -79
- package/src/Tooltip/index.ts +0 -1
- package/src/Video/Video.tsx +0 -61
- package/src/Video/index.tsx +0 -1
- package/src/VideoList/StyledVideoList.tsx +0 -39
- package/src/VideoList/index.tsx +0 -2
- package/src/VideoList/videoListUtils.tsx +0 -20
- package/src/VideoTile/StyledVideoTile.tsx +0 -146
- package/src/VideoTile/index.tsx +0 -1
- package/src/context/DialogContext.tsx +0 -13
- package/src/fixtures/chats.ts +0 -25
- package/src/fixtures/peers.ts +0 -27
- package/src/fixtures/tracks.ts +0 -11
- package/src/hooks/useDialogContainerSelector.tsx +0 -7
- package/src/index.ts +0 -41
- package/src/store/SetupFakeStore.ts +0 -33
- package/src/store/StorybookSDK.ts +0 -231
- package/src/utils/animations.ts +0 -114
- package/src/utils/index.ts +0 -2
- package/src/utils/styles.ts +0 -22
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
import { selectLocalPeer, selectSessionStore, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
|
|
3
|
-
import { Button } from '../../../Button';
|
|
4
|
-
import { Box, Flex } from '../../../Layout';
|
|
5
|
-
import { Text } from '../../../Text';
|
|
6
|
-
import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
7
|
-
import { useIsPeerBlacklisted } from '../hooks/useChatBlacklist';
|
|
8
|
-
import { SESSION_STORE_KEY } from '../../common/constants';
|
|
9
|
-
|
|
10
|
-
export const ChatPaused = () => {
|
|
11
|
-
const hmsActions = useHMSActions();
|
|
12
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
|
13
|
-
const can_disable_chat = !!elements?.chat?.real_time_controls?.can_disable_chat;
|
|
14
|
-
const { enabled: isChatEnabled = true, updatedBy: chatStateUpdatedBy = '' } =
|
|
15
|
-
useHMSStore(selectSessionStore(SESSION_STORE_KEY.CHAT_STATE)) || {};
|
|
16
|
-
|
|
17
|
-
const localPeer = useHMSStore(selectLocalPeer);
|
|
18
|
-
|
|
19
|
-
const unPauseChat = useCallback(
|
|
20
|
-
async () =>
|
|
21
|
-
await hmsActions.sessionStore.set(SESSION_STORE_KEY.CHAT_STATE, {
|
|
22
|
-
enabled: true,
|
|
23
|
-
updatedBy: { userName: localPeer?.name, userId: localPeer?.customerUserId, peerId: localPeer?.id },
|
|
24
|
-
updatedAt: Date.now(),
|
|
25
|
-
}),
|
|
26
|
-
[hmsActions, localPeer],
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
return isChatEnabled ? null : (
|
|
30
|
-
<Flex
|
|
31
|
-
align="center"
|
|
32
|
-
justify="between"
|
|
33
|
-
css={{ borderRadius: '$1', bg: '$surface_default', p: '$2 $4 $2 $8', w: '100%' }}
|
|
34
|
-
>
|
|
35
|
-
<Box>
|
|
36
|
-
<Text variant="sm" css={{ fontWeight: '$semiBold', color: '$on_surface_high' }}>
|
|
37
|
-
Chat paused
|
|
38
|
-
</Text>
|
|
39
|
-
<Text
|
|
40
|
-
variant="xs"
|
|
41
|
-
css={{ color: '$on_surface_medium', maxWidth: '100%', overflow: 'hidden', textOverflow: 'ellipsis' }}
|
|
42
|
-
>
|
|
43
|
-
Chat has been paused by {chatStateUpdatedBy?.peerId === localPeer?.id ? 'you' : chatStateUpdatedBy?.userName}
|
|
44
|
-
</Text>
|
|
45
|
-
</Box>
|
|
46
|
-
{can_disable_chat ? (
|
|
47
|
-
<Button css={{ fontWeight: '$semiBold', fontSize: '$sm', borderRadius: '$2' }} onClick={unPauseChat}>
|
|
48
|
-
Resume
|
|
49
|
-
</Button>
|
|
50
|
-
) : (
|
|
51
|
-
<></>
|
|
52
|
-
)}
|
|
53
|
-
</Flex>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const ChatBlocked = () => {
|
|
58
|
-
const isLocalPeerBlacklisted = useIsPeerBlacklisted({ local: true });
|
|
59
|
-
if (!isLocalPeerBlacklisted) {
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
return (
|
|
63
|
-
<Flex
|
|
64
|
-
align="center"
|
|
65
|
-
justify="between"
|
|
66
|
-
css={{ borderRadius: '$1', bg: '$surface_default', p: '$4 $4 $4 $8', w: '100%' }}
|
|
67
|
-
>
|
|
68
|
-
<Text variant="sm" css={{ color: '$on_surface_medium', textAlign: 'center', w: '100%' }}>
|
|
69
|
-
You've been blocked from sending messages
|
|
70
|
-
</Text>
|
|
71
|
-
</Flex>
|
|
72
|
-
);
|
|
73
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useMedia } from 'react-use';
|
|
3
|
-
import { Box, Flex } from '../../../Layout';
|
|
4
|
-
import { Text } from '../../../Text';
|
|
5
|
-
import { config as cssConfig } from '../../../Theme';
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
import emptyChat from '../../images/empty-chat.svg';
|
|
8
|
-
import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
9
|
-
import { useIsPeerBlacklisted } from '../hooks/useChatBlacklist';
|
|
10
|
-
import { useLandscapeHLSStream, useMobileHLSStream } from '../../common/hooks';
|
|
11
|
-
|
|
12
|
-
export const EmptyChat = () => {
|
|
13
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
|
14
|
-
const isLocalPeerBlacklisted = useIsPeerBlacklisted({ local: true });
|
|
15
|
-
const isMobile = useMedia(cssConfig.media.md);
|
|
16
|
-
const canSendMessages =
|
|
17
|
-
elements.chat &&
|
|
18
|
-
(elements.chat.public_chat_enabled ||
|
|
19
|
-
elements.chat.private_chat_enabled ||
|
|
20
|
-
(elements.chat.roles_whitelist && elements.chat.roles_whitelist.length)) &&
|
|
21
|
-
!isLocalPeerBlacklisted;
|
|
22
|
-
const isMobileHLSStream = useMobileHLSStream();
|
|
23
|
-
const isLandscapeStream = useLandscapeHLSStream();
|
|
24
|
-
const streaming = isMobileHLSStream || isLandscapeStream;
|
|
25
|
-
|
|
26
|
-
if (isMobile && elements?.chat?.is_overlay && !streaming) return <></>;
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<Flex
|
|
30
|
-
css={{
|
|
31
|
-
width: '100%',
|
|
32
|
-
flex: '1 1 0',
|
|
33
|
-
textAlign: 'center',
|
|
34
|
-
px: '$4',
|
|
35
|
-
}}
|
|
36
|
-
align="center"
|
|
37
|
-
justify="center"
|
|
38
|
-
>
|
|
39
|
-
<Box>
|
|
40
|
-
<Box css={{ m: '0 auto', mt: '$4', '@media (max-height: 575px)': { display: 'none' } }}>
|
|
41
|
-
<img src={emptyChat} style={{ display: 'inline' }} alt="Empty Chat" height={132} width={185} />
|
|
42
|
-
</Box>
|
|
43
|
-
|
|
44
|
-
<Text variant="h5" css={{ mt: '$8', c: '$on_surface_high' }}>
|
|
45
|
-
{canSendMessages ? 'Start a conversation' : 'No messages yet'}
|
|
46
|
-
</Text>
|
|
47
|
-
{canSendMessages ? (
|
|
48
|
-
<Text
|
|
49
|
-
variant="sm"
|
|
50
|
-
css={{ mt: '$4', maxWidth: '80%', textAlign: 'center', mx: 'auto', c: '$on_surface_medium' }}
|
|
51
|
-
>
|
|
52
|
-
There are no messages here yet. Start a conversation by sending a message.
|
|
53
|
-
</Text>
|
|
54
|
-
) : null}
|
|
55
|
-
</Box>
|
|
56
|
-
</Flex>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Flex } from '../../../Layout';
|
|
3
|
-
import { Text } from '../../../Text';
|
|
4
|
-
|
|
5
|
-
export const MwebChatOption = ({
|
|
6
|
-
icon,
|
|
7
|
-
text,
|
|
8
|
-
onClick,
|
|
9
|
-
color = '$on_surface_high',
|
|
10
|
-
}: {
|
|
11
|
-
icon: React.ReactNode;
|
|
12
|
-
text: string;
|
|
13
|
-
onClick: () => void | Promise<void>;
|
|
14
|
-
color?: string;
|
|
15
|
-
}) => {
|
|
16
|
-
return (
|
|
17
|
-
<Flex align="center" css={{ w: '100%', color, cursor: 'pointer', gap: '$4', p: '$8' }} onClick={onClick}>
|
|
18
|
-
{icon}
|
|
19
|
-
<Text variant="sm" css={{ color, fontWeight: '$semiBold' }}>
|
|
20
|
-
{text}
|
|
21
|
-
</Text>
|
|
22
|
-
</Flex>
|
|
23
|
-
);
|
|
24
|
-
};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useSwipeable } from 'react-swipeable';
|
|
3
|
-
import { useMedia } from 'react-use';
|
|
4
|
-
import { selectSessionStore, useHMSStore } from '@100mslive/react-sdk';
|
|
5
|
-
import { PinIcon, UnpinIcon } from '@100mslive/react-icons';
|
|
6
|
-
import { Box, Flex } from '../../../Layout';
|
|
7
|
-
import { Text } from '../../../Text';
|
|
8
|
-
import { config as cssConfig } from '../../../Theme';
|
|
9
|
-
import { ArrowNavigation } from './ArrowNavigation';
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
import { AnnotisedMessage } from './ChatBody';
|
|
12
|
-
import { StickIndicator } from './StickIndicator';
|
|
13
|
-
import { useRoomLayoutConferencingScreen } from '../../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
14
|
-
import { usePinnedMessages } from '../hooks/usePinnedMessages';
|
|
15
|
-
import { SESSION_STORE_KEY } from '../../common/constants';
|
|
16
|
-
|
|
17
|
-
const PINNED_MESSAGE_LENGTH = 75;
|
|
18
|
-
|
|
19
|
-
export const PinnedMessage = () => {
|
|
20
|
-
const pinnedMessages = useHMSStore(selectSessionStore(SESSION_STORE_KEY.PINNED_MESSAGES));
|
|
21
|
-
const [pinnedMessageIndex, setPinnedMessageIndex] = useState(0);
|
|
22
|
-
const { removePinnedMessage } = usePinnedMessages();
|
|
23
|
-
const isMobile = useMedia(cssConfig.media.md);
|
|
24
|
-
|
|
25
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
|
26
|
-
const canUnpinMessage = !!elements?.chat?.allow_pinning_messages;
|
|
27
|
-
|
|
28
|
-
const [hideOverflow, setHideOverflow] = useState(true);
|
|
29
|
-
const currentPinnedMessage = pinnedMessages?.[pinnedMessageIndex]?.text || '';
|
|
30
|
-
const canOverflow = currentPinnedMessage.length > PINNED_MESSAGE_LENGTH;
|
|
31
|
-
|
|
32
|
-
const showPreviousPinnedMessage = () => {
|
|
33
|
-
const previousIndex = Math.max(pinnedMessageIndex - 1, 0);
|
|
34
|
-
setHideOverflow(pinnedMessages[previousIndex].text.length > PINNED_MESSAGE_LENGTH);
|
|
35
|
-
setPinnedMessageIndex(previousIndex);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const showNextPinnedMessage = () => {
|
|
39
|
-
const nextIndex = Math.min(pinnedMessageIndex + 1, pinnedMessages.length - 1);
|
|
40
|
-
setHideOverflow(pinnedMessages[nextIndex].text.length > PINNED_MESSAGE_LENGTH);
|
|
41
|
-
setPinnedMessageIndex(nextIndex);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const swipeHandlers = useSwipeable({
|
|
45
|
-
onSwipedUp: () => showNextPinnedMessage(),
|
|
46
|
-
onSwipedDown: () => showPreviousPinnedMessage(),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Scenario: User is on a particular index but an earlier message is removed by another peer
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
const count = pinnedMessages?.length || 1;
|
|
52
|
-
if (pinnedMessageIndex >= count) {
|
|
53
|
-
setPinnedMessageIndex(count - 1);
|
|
54
|
-
}
|
|
55
|
-
}, [pinnedMessageIndex, pinnedMessages]);
|
|
56
|
-
|
|
57
|
-
if (!pinnedMessages || pinnedMessages.length === 0) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<Flex align="center" css={{ w: '100%', gap: '$4' }}>
|
|
63
|
-
{!isMobile ? (
|
|
64
|
-
<ArrowNavigation
|
|
65
|
-
index={pinnedMessageIndex}
|
|
66
|
-
total={pinnedMessages.length}
|
|
67
|
-
showPrevious={showPreviousPinnedMessage}
|
|
68
|
-
showNext={showNextPinnedMessage}
|
|
69
|
-
/>
|
|
70
|
-
) : null}
|
|
71
|
-
<Flex
|
|
72
|
-
css={{
|
|
73
|
-
p: '$4',
|
|
74
|
-
color: '$on_surface_high',
|
|
75
|
-
bg: isMobile && elements?.chat?.is_overlay ? 'rgba(0, 0, 0, 0.64)' : '$surface_brighter',
|
|
76
|
-
r: '$1',
|
|
77
|
-
gap: '$4',
|
|
78
|
-
mb: '$8',
|
|
79
|
-
mt: '$8',
|
|
80
|
-
flexGrow: 1,
|
|
81
|
-
border: '1px solid $border_bright',
|
|
82
|
-
}}
|
|
83
|
-
align="center"
|
|
84
|
-
justify="between"
|
|
85
|
-
>
|
|
86
|
-
{isMobile ? <StickIndicator index={pinnedMessageIndex} total={pinnedMessages.length} /> : null}
|
|
87
|
-
|
|
88
|
-
<Box
|
|
89
|
-
css={{
|
|
90
|
-
w: '100%',
|
|
91
|
-
maxHeight: '$18',
|
|
92
|
-
overflowY: 'auto',
|
|
93
|
-
overflowX: 'hidden',
|
|
94
|
-
wordBreak: 'break-word',
|
|
95
|
-
'& p span': {
|
|
96
|
-
color: '$primary_default',
|
|
97
|
-
},
|
|
98
|
-
}}
|
|
99
|
-
>
|
|
100
|
-
<Text
|
|
101
|
-
variant="sm"
|
|
102
|
-
css={{ color: '$on_surface_high' }}
|
|
103
|
-
{...swipeHandlers}
|
|
104
|
-
title={pinnedMessages[pinnedMessageIndex]?.text}
|
|
105
|
-
>
|
|
106
|
-
<AnnotisedMessage
|
|
107
|
-
message={currentPinnedMessage}
|
|
108
|
-
length={hideOverflow ? PINNED_MESSAGE_LENGTH : currentPinnedMessage.length}
|
|
109
|
-
/>
|
|
110
|
-
{canOverflow ? (
|
|
111
|
-
<span style={{ cursor: 'pointer' }} onClick={() => setHideOverflow(prev => !prev)}>
|
|
112
|
-
{hideOverflow ? '... See more' : 'Collapse'}
|
|
113
|
-
</span>
|
|
114
|
-
) : null}
|
|
115
|
-
</Text>
|
|
116
|
-
</Box>
|
|
117
|
-
|
|
118
|
-
{canUnpinMessage ? (
|
|
119
|
-
<Flex
|
|
120
|
-
onClick={() => {
|
|
121
|
-
removePinnedMessage(pinnedMessageIndex);
|
|
122
|
-
setPinnedMessageIndex(Math.max(0, pinnedMessageIndex - 1));
|
|
123
|
-
}}
|
|
124
|
-
css={{
|
|
125
|
-
cursor: 'pointer',
|
|
126
|
-
color: '$on_surface_medium',
|
|
127
|
-
'&:hover': { color: '$on_surface_high' },
|
|
128
|
-
'&:hover .hide-on-hover': { display: 'none !important' },
|
|
129
|
-
'&:hover .show-on-hover': { display: 'block !important' },
|
|
130
|
-
}}
|
|
131
|
-
title="Unpin Message"
|
|
132
|
-
>
|
|
133
|
-
<UnpinIcon className="show-on-hover" style={{ display: 'none' }} height={20} width={20} />
|
|
134
|
-
<PinIcon className="hide-on-hover" style={{ display: 'block' }} height={20} width={20} />
|
|
135
|
-
</Flex>
|
|
136
|
-
) : null}
|
|
137
|
-
</Flex>
|
|
138
|
-
</Flex>
|
|
139
|
-
);
|
|
140
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Box, Flex } from '../../../Layout';
|
|
3
|
-
|
|
4
|
-
export const StickIndicator = ({ total, index }: { total: number; index: number }) => {
|
|
5
|
-
const sticksCount = Math.min(3, total);
|
|
6
|
-
|
|
7
|
-
if (total < 2) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<Flex direction="column" css={{ gap: '$1' }}>
|
|
13
|
-
{[...Array(sticksCount)].map((_, i) => (
|
|
14
|
-
<Box
|
|
15
|
-
css={{
|
|
16
|
-
borderLeft: '2px solid',
|
|
17
|
-
height: '$4',
|
|
18
|
-
borderColor: i === index ? '$on_surface_high' : '$on_surface_low',
|
|
19
|
-
}}
|
|
20
|
-
/>
|
|
21
|
-
))}
|
|
22
|
-
</Flex>
|
|
23
|
-
);
|
|
24
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export const useEmojiPickerStyles = showing => {
|
|
4
|
-
const ref = useRef(null);
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
if (showing) {
|
|
7
|
-
setTimeout(() => {
|
|
8
|
-
const root = ref.current?.querySelector('em-emoji-picker')?.shadowRoot;
|
|
9
|
-
const style = document.createElement('style');
|
|
10
|
-
style.textContent = `
|
|
11
|
-
#root {
|
|
12
|
-
--em-rgb-color: var(--hms-ui-colors-on_surface_high);
|
|
13
|
-
--em-rgb-input: var(--hms-ui-colors-on_primary_high);
|
|
14
|
-
--em-color-border: var(--hms-ui-colors-surface_bright);
|
|
15
|
-
--color-b: var(--hms-ui-colors-on_surface_high);
|
|
16
|
-
--rgb-background: transparent;
|
|
17
|
-
color: var(--hms-ui-colors-on_surface_high);
|
|
18
|
-
font-family: var(--hms-ui-fonts-sans);
|
|
19
|
-
}
|
|
20
|
-
.sticky {
|
|
21
|
-
top: 0.25rem;
|
|
22
|
-
background-color: var(--hms-ui-colors-surface_bright);
|
|
23
|
-
margin-top: 0.5rem;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
root?.appendChild(style);
|
|
27
|
-
}, 0);
|
|
28
|
-
}
|
|
29
|
-
}, [showing]);
|
|
30
|
-
|
|
31
|
-
return ref;
|
|
32
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
selectMessagesUnreadCountByPeerID,
|
|
3
|
-
selectMessagesUnreadCountByRole,
|
|
4
|
-
selectUnreadHMSMessagesCount,
|
|
5
|
-
useHMSStore,
|
|
6
|
-
} from '@100mslive/react-sdk';
|
|
7
|
-
|
|
8
|
-
export const useUnreadCount = ({ role, peerId }: { role?: string; peerId?: string }) => {
|
|
9
|
-
let unreadCountSelector;
|
|
10
|
-
if (role) {
|
|
11
|
-
unreadCountSelector = selectMessagesUnreadCountByRole(role);
|
|
12
|
-
} else if (peerId) {
|
|
13
|
-
unreadCountSelector = selectMessagesUnreadCountByPeerID(peerId);
|
|
14
|
-
} else {
|
|
15
|
-
unreadCountSelector = selectUnreadHMSMessagesCount;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return useHMSStore(unreadCountSelector);
|
|
19
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export const formatTime = (date: Date) => {
|
|
2
|
-
if (!(date instanceof Date)) {
|
|
3
|
-
return '';
|
|
4
|
-
}
|
|
5
|
-
const hours = date.getHours();
|
|
6
|
-
const minutes = date.getMinutes();
|
|
7
|
-
const suffix = hours > 11 ? 'PM' : 'AM';
|
|
8
|
-
return `${hours < 10 ? '0' : ''}${hours}:${minutes < 10 ? '0' : ''}${minutes} ${suffix}`;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const CHAT_MESSAGE_LIMIT = 2000;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { selectLocalPeer, selectSessionStore, useHMSActions, useHMSStore } from '@100mslive/react-sdk';
|
|
3
|
-
import { PauseCircleIcon, SettingsIcon } from '@100mslive/react-icons';
|
|
4
|
-
import { Flex } from '../../Layout';
|
|
5
|
-
import { Popover } from '../../Popover';
|
|
6
|
-
import { Text } from '../../Text';
|
|
7
|
-
import { useRoomLayoutConferencingScreen } from '../provider/roomLayoutProvider/hooks/useRoomLayoutScreen';
|
|
8
|
-
import { SESSION_STORE_KEY } from '../common/constants';
|
|
9
|
-
|
|
10
|
-
export const ChatSettings = () => {
|
|
11
|
-
const hmsActions = useHMSActions();
|
|
12
|
-
const localPeer = useHMSStore(selectLocalPeer);
|
|
13
|
-
const { elements } = useRoomLayoutConferencingScreen();
|
|
14
|
-
const canPauseChat = !!elements?.chat?.real_time_controls?.can_disable_chat;
|
|
15
|
-
const { enabled: isChatEnabled = true } = useHMSStore(selectSessionStore(SESSION_STORE_KEY.CHAT_STATE)) || {};
|
|
16
|
-
const showPause = canPauseChat && isChatEnabled;
|
|
17
|
-
|
|
18
|
-
if (!showPause) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<Popover.Root>
|
|
24
|
-
<Popover.Trigger asChild css={{ px: '$4' }}>
|
|
25
|
-
<Flex
|
|
26
|
-
align="center"
|
|
27
|
-
css={{ color: '$on_surface_medium', '&:hover': { color: '$on_surface_high' }, cursor: 'pointer' }}
|
|
28
|
-
>
|
|
29
|
-
<SettingsIcon />
|
|
30
|
-
</Flex>
|
|
31
|
-
</Popover.Trigger>
|
|
32
|
-
<Popover.Portal>
|
|
33
|
-
<Popover.Content
|
|
34
|
-
align="end"
|
|
35
|
-
side="bottom"
|
|
36
|
-
sideOffset={2}
|
|
37
|
-
onClick={() => {
|
|
38
|
-
const chatState = {
|
|
39
|
-
enabled: false,
|
|
40
|
-
updatedBy: {
|
|
41
|
-
peerId: localPeer?.id,
|
|
42
|
-
userId: localPeer?.customerUserId,
|
|
43
|
-
userName: localPeer?.name,
|
|
44
|
-
},
|
|
45
|
-
updatedAt: Date.now(),
|
|
46
|
-
};
|
|
47
|
-
hmsActions.sessionStore.set(SESSION_STORE_KEY.CHAT_STATE, chatState);
|
|
48
|
-
}}
|
|
49
|
-
css={{
|
|
50
|
-
backgroundColor: '$surface_default',
|
|
51
|
-
display: 'flex',
|
|
52
|
-
alignItems: 'center',
|
|
53
|
-
gap: '$4',
|
|
54
|
-
borderRadius: '$1',
|
|
55
|
-
color: '$on_surface_high',
|
|
56
|
-
cursor: 'pointer',
|
|
57
|
-
'&:hover': { backgroundColor: '$surface_dim' },
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
60
|
-
<PauseCircleIcon />
|
|
61
|
-
<Text variant="sm" css={{ fontWeight: '$semiBold' }}>
|
|
62
|
-
Pause Chat
|
|
63
|
-
</Text>
|
|
64
|
-
</Popover.Content>
|
|
65
|
-
</Popover.Portal>
|
|
66
|
-
</Popover.Root>
|
|
67
|
-
);
|
|
68
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Flex } from '../../Layout';
|
|
3
|
-
import { Text } from '../../Text';
|
|
4
|
-
import { CSS } from '../../Theme';
|
|
5
|
-
|
|
6
|
-
const Chip = ({
|
|
7
|
-
icon = <></>,
|
|
8
|
-
content = '',
|
|
9
|
-
backgroundColor = '$surface_default',
|
|
10
|
-
textColor = '$on_surface_high',
|
|
11
|
-
hideIfNoContent = false,
|
|
12
|
-
onClick,
|
|
13
|
-
css = {},
|
|
14
|
-
}: {
|
|
15
|
-
icon?: React.JSX.Element;
|
|
16
|
-
content: string;
|
|
17
|
-
backgroundColor?: string;
|
|
18
|
-
textColor?: string;
|
|
19
|
-
hideIfNoContent?: boolean;
|
|
20
|
-
onClick?: () => void | Promise<void>;
|
|
21
|
-
css?: CSS;
|
|
22
|
-
}) => {
|
|
23
|
-
if (hideIfNoContent && !content) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
return (
|
|
27
|
-
<Flex
|
|
28
|
-
align="center"
|
|
29
|
-
css={{ backgroundColor, p: '$4 $6', gap: '$2', borderRadius: '$4', ...css }}
|
|
30
|
-
onClick={() => onClick?.()}
|
|
31
|
-
>
|
|
32
|
-
{icon}
|
|
33
|
-
<Text variant="sm" css={{ fontWeight: '$semiBold', color: textColor }}>
|
|
34
|
-
{content}
|
|
35
|
-
</Text>
|
|
36
|
-
</Flex>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default Chip;
|