@100mslive/react-native-room-kit 1.0.7 → 1.0.8
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/HMSRoomSetup.js +4 -1
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Chat/assets/chat-on.png +0 -0
- package/lib/commonjs/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/lib/commonjs/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/lib/commonjs/Icons/Chat/index.js +4 -3
- package/lib/commonjs/Icons/Chat/index.js.map +1 -1
- package/lib/commonjs/Icons/NoEntry/assets/no-entry.png +0 -0
- package/lib/commonjs/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/lib/commonjs/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/lib/commonjs/Icons/NoEntry/index.js +33 -0
- package/lib/commonjs/Icons/NoEntry/index.js.map +1 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/index.js +29 -0
- package/lib/commonjs/Icons/PauseCircle/index.js.map +1 -0
- package/lib/commonjs/Icons/Pin/assets/unpin.png +0 -0
- package/lib/commonjs/Icons/Pin/assets/unpin@2x.png +0 -0
- package/lib/commonjs/Icons/Pin/assets/unpin@3x.png +0 -0
- package/lib/commonjs/Icons/Pin/index.js +2 -1
- package/lib/commonjs/Icons/Pin/index.js.map +1 -1
- package/lib/commonjs/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/commonjs/Icons/Recording/index.js.map +1 -1
- package/lib/commonjs/Icons/index.js +22 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js +36 -0
- package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js +90 -23
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterItem.js +10 -7
- package/lib/commonjs/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterView.js +54 -45
- package/lib/commonjs/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatList.js +13 -6
- package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMessage.js +79 -7
- package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMoreActionsModal.js +61 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsModal.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js +63 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsView.js +83 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsView.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatPaused.js +86 -0
- package/lib/commonjs/components/Chat/ChatPaused.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js +34 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js +66 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsView.js +188 -0
- package/lib/commonjs/components/Chat/MessageOptionsView.js.map +1 -0
- package/lib/commonjs/components/Chat/PeerBlockedFromChat.js +47 -0
- package/lib/commonjs/components/Chat/PeerBlockedFromChat.js.map +1 -0
- package/lib/commonjs/components/Chat/PinnedMessages.js +297 -0
- package/lib/commonjs/components/Chat/PinnedMessages.js.map +1 -0
- package/lib/commonjs/components/Chat/index.js +4 -4
- 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 +21 -2
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js +21 -2
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModalContent.js +6 -9
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSView.js +8 -6
- package/lib/commonjs/components/HLSView.js.map +1 -1
- package/lib/commonjs/components/HMSBaseButton.js +10 -2
- package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
- package/lib/commonjs/components/HMSDangerButton.js +4 -2
- package/lib/commonjs/components/HMSDangerButton.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessage.js +86 -1
- package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessageList.js +2 -2
- package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
- package/lib/commonjs/components/HMSHandRaiseNotification.js +6 -3
- package/lib/commonjs/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +5 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveIndicator.js +2 -6
- package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSLiveViewerCount.js +8 -7
- package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -1
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js +2 -1
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js +31 -4
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +9 -2
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js +44 -2
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +2 -6
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSPrimaryButton.js +4 -2
- package/lib/commonjs/components/HMSPrimaryButton.js.map +1 -1
- package/lib/commonjs/components/HMSRecordingIndicator.js +11 -16
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSTerminalErrorNotification.js +6 -2
- package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -1
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/LeaveRoomBottomSheet.js +3 -6
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +3 -0
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/Modals.js +9 -12
- package/lib/commonjs/components/Modals.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +5 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/Preview.js +14 -1
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/PreviewForRoleChangeModal.js +5 -4
- package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +15 -6
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +2 -4
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/hooks-sdk-selectors.js +16 -1
- package/lib/commonjs/hooks-sdk-selectors.js.map +1 -1
- package/lib/commonjs/hooks-sdk.js +27 -1
- package/lib/commonjs/hooks-sdk.js.map +1 -1
- package/lib/commonjs/hooks-util-selectors.js +3 -3
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +408 -61
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +16 -3
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +44 -4
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +41 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/redux/reducers/chatWindow.js +1 -2
- package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -1
- package/lib/commonjs/redux/reducers/message.js +17 -4
- package/lib/commonjs/redux/reducers/message.js.map +1 -1
- package/lib/commonjs/types.js +1 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/types.js +3 -0
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +2 -2
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +5 -2
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Chat/assets/chat-on.png +0 -0
- package/lib/module/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/lib/module/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/lib/module/Icons/Chat/index.js +4 -3
- package/lib/module/Icons/Chat/index.js.map +1 -1
- package/lib/module/Icons/NoEntry/assets/no-entry.png +0 -0
- package/lib/module/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/lib/module/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/lib/module/Icons/NoEntry/index.js +25 -0
- package/lib/module/Icons/NoEntry/index.js.map +1 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/lib/module/Icons/PauseCircle/index.js +21 -0
- package/lib/module/Icons/PauseCircle/index.js.map +1 -0
- package/lib/module/Icons/Pin/assets/unpin.png +0 -0
- package/lib/module/Icons/Pin/assets/unpin@2x.png +0 -0
- package/lib/module/Icons/Pin/assets/unpin@3x.png +0 -0
- package/lib/module/Icons/Pin/index.js +2 -1
- package/lib/module/Icons/Pin/index.js.map +1 -1
- package/lib/module/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/module/Icons/Recording/index.js.map +1 -1
- package/lib/module/Icons/index.js +2 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheet.js +28 -0
- package/lib/module/components/Chat/ChatFilterBottomSheet.js.map +1 -0
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js +93 -26
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterItem.js +11 -8
- package/lib/module/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterView.js +55 -46
- package/lib/module/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/module/components/Chat/ChatList.js +14 -7
- package/lib/module/components/Chat/ChatList.js.map +1 -1
- package/lib/module/components/Chat/ChatMessage.js +81 -9
- package/lib/module/components/Chat/ChatMessage.js.map +1 -1
- package/lib/module/components/Chat/ChatMoreActionsModal.js +53 -0
- package/lib/module/components/Chat/ChatMoreActionsModal.js.map +1 -0
- package/lib/module/components/Chat/ChatMoreActionsSheetView.js +55 -0
- package/lib/module/components/Chat/ChatMoreActionsSheetView.js.map +1 -0
- package/lib/module/components/Chat/ChatMoreActionsView.js +75 -0
- package/lib/module/components/Chat/ChatMoreActionsView.js.map +1 -0
- package/lib/module/components/Chat/ChatPaused.js +77 -0
- package/lib/module/components/Chat/ChatPaused.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheet.js +26 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheet.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheetView.js +58 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheetView.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsView.js +180 -0
- package/lib/module/components/Chat/MessageOptionsView.js.map +1 -0
- package/lib/module/components/Chat/PeerBlockedFromChat.js +38 -0
- package/lib/module/components/Chat/PeerBlockedFromChat.js.map +1 -0
- package/lib/module/components/Chat/PinnedMessages.js +288 -0
- package/lib/module/components/Chat/PinnedMessages.js.map +1 -0
- package/lib/module/components/Chat/index.js +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 +24 -5
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatView.js +22 -3
- package/lib/module/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/module/components/EndRoomModalContent.js +6 -9
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSView.js +9 -7
- package/lib/module/components/HLSView.js.map +1 -1
- package/lib/module/components/HMSBaseButton.js +10 -2
- package/lib/module/components/HMSBaseButton.js.map +1 -1
- package/lib/module/components/HMSDangerButton.js +4 -2
- package/lib/module/components/HMSDangerButton.js.map +1 -1
- package/lib/module/components/HMSHLSMessage.js +88 -3
- package/lib/module/components/HMSHLSMessage.js.map +1 -1
- package/lib/module/components/HMSHLSMessageList.js +2 -2
- package/lib/module/components/HMSHLSMessageList.js.map +1 -1
- package/lib/module/components/HMSHandRaiseNotification.js +6 -3
- package/lib/module/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js +6 -2
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveIndicator.js +2 -6
- package/lib/module/components/HMSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSLiveViewerCount.js +8 -7
- package/lib/module/components/HMSLiveViewerCount.js.map +1 -1
- package/lib/module/components/HMSLocalScreenshareNotification.js +2 -1
- package/lib/module/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/module/components/HMSNotification.js +32 -5
- package/lib/module/components/HMSNotification.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +9 -2
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSOverlayChatView.js +45 -3
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +2 -6
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSPrimaryButton.js +4 -2
- package/lib/module/components/HMSPrimaryButton.js.map +1 -1
- package/lib/module/components/HMSRecordingIndicator.js +11 -16
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSTerminalErrorNotification.js +6 -2
- package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -1
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/LeaveRoomBottomSheet.js +3 -6
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/module/components/Meeting.js +4 -1
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/Modals.js +10 -13
- package/lib/module/components/Modals.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js +5 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/Preview.js +13 -2
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/PreviewForRoleChangeModal.js +5 -4
- package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +16 -7
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js +3 -5
- package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/hooks-sdk-selectors.js +12 -0
- package/lib/module/hooks-sdk-selectors.js.map +1 -1
- package/lib/module/hooks-sdk.js +23 -1
- package/lib/module/hooks-sdk.js.map +1 -1
- package/lib/module/hooks-util-selectors.js +3 -3
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +398 -62
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +16 -3
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +36 -2
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +41 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/chatWindow.js +1 -2
- package/lib/module/redux/reducers/chatWindow.js.map +1 -1
- package/lib/module/redux/reducers/message.js +17 -4
- package/lib/module/redux/reducers/message.js.map +1 -1
- package/lib/module/types.js +1 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/types.js +3 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js +2 -2
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Chat/index.d.ts +1 -0
- package/lib/typescript/Icons/Chat/index.d.ts.map +1 -1
- package/lib/typescript/Icons/NoEntry/index.d.ts +7 -0
- package/lib/typescript/Icons/NoEntry/index.d.ts.map +1 -0
- package/lib/typescript/Icons/PauseCircle/index.d.ts +7 -0
- package/lib/typescript/Icons/PauseCircle/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Pin/index.d.ts +1 -0
- package/lib/typescript/Icons/Pin/index.d.ts.map +1 -1
- package/lib/typescript/Icons/index.d.ts +2 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheet.d.ts +3 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterItem.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterItem.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterView.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterView.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatList.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatMessage.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatMoreActionsModal.d.ts +7 -0
- package/lib/typescript/components/Chat/ChatMoreActionsModal.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatMoreActionsSheetView.d.ts +6 -0
- package/lib/typescript/components/Chat/ChatMoreActionsSheetView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatMoreActionsView.d.ts +7 -0
- package/lib/typescript/components/Chat/ChatMoreActionsView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatPaused.d.ts +10 -0
- package/lib/typescript/components/Chat/ChatPaused.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheet.d.ts +3 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheetView.d.ts +6 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheetView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsView.d.ts +7 -0
- package/lib/typescript/components/Chat/MessageOptionsView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/PeerBlockedFromChat.d.ts +9 -0
- package/lib/typescript/components/Chat/PeerBlockedFromChat.d.ts.map +1 -0
- package/lib/typescript/components/Chat/PinnedMessages.d.ts +8 -0
- package/lib/typescript/components/Chat/PinnedMessages.d.ts.map +1 -0
- package/lib/typescript/components/Chat/index.d.ts +1 -1
- package/lib/typescript/components/Chat/index.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsHeader.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatView.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HMSBaseButton.d.ts +1 -0
- package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSDangerButton.d.ts +1 -0
- package/lib/typescript/components/HMSDangerButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSMessage.d.ts +1 -1
- package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -1
- package/lib/typescript/components/HMSHandRaiseNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -1
- package/lib/typescript/components/HMSLocalScreenshareNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotification.d.ts +2 -1
- package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSPrimaryButton.d.ts +1 -0
- package/lib/typescript/components/HMSPrimaryButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/HMSTerminalErrorNotification.d.ts.map +1 -1
- package/lib/typescript/components/Header.d.ts.map +1 -1
- package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/Modals.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -1
- package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
- package/lib/typescript/components/Preview.d.ts.map +1 -1
- package/lib/typescript/components/PreviewForRoleChangeModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/hooks-sdk-selectors.d.ts +3 -0
- package/lib/typescript/hooks-sdk-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-sdk.d.ts +4 -0
- package/lib/typescript/hooks-sdk.d.ts.map +1 -1
- package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +35 -3
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +9 -2
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +37 -3
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +7 -2
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +7 -2
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/chatWindow.d.ts +1 -1
- package/lib/typescript/redux/reducers/chatWindow.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +7 -2
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/message.d.ts +3 -2
- package/lib/typescript/redux/reducers/message.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +23 -3
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +3 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +179 -179
- package/src/HMSRoomSetup.tsx +7 -2
- package/src/Icons/Chat/assets/chat-on.png +0 -0
- package/src/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/src/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/src/Icons/Chat/index.tsx +19 -6
- package/src/Icons/NoEntry/assets/no-entry.png +0 -0
- package/src/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/src/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/src/Icons/NoEntry/index.tsx +33 -0
- package/src/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/src/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/src/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/src/Icons/PauseCircle/index.tsx +27 -0
- package/src/Icons/Pin/assets/unpin.png +0 -0
- package/src/Icons/Pin/assets/unpin@2x.png +0 -0
- package/src/Icons/Pin/assets/unpin@3x.png +0 -0
- package/src/Icons/Pin/index.tsx +13 -3
- package/src/Icons/Recording/assets/recording-pause.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/src/Icons/Recording/index.tsx +2 -2
- package/src/Icons/index.ts +2 -0
- package/src/components/BottomSheet.tsx +13 -3
- package/src/components/Chat/ChatFilterBottomSheet.tsx +35 -0
- package/src/components/Chat/ChatFilterBottomSheetOpener.tsx +170 -42
- package/src/components/Chat/ChatFilterItem.tsx +8 -4
- package/src/components/Chat/ChatFilterView.tsx +102 -75
- package/src/components/Chat/ChatList.tsx +18 -6
- package/src/components/Chat/ChatMessage.tsx +111 -7
- package/src/components/Chat/ChatMoreActionsModal.tsx +75 -0
- package/src/components/Chat/ChatMoreActionsSheetView.tsx +77 -0
- package/src/components/Chat/ChatMoreActionsView.tsx +84 -0
- package/src/components/Chat/ChatPaused.tsx +103 -0
- package/src/components/Chat/MessageOptionsBottomSheet.tsx +33 -0
- package/src/components/Chat/MessageOptionsBottomSheetView.tsx +82 -0
- package/src/components/Chat/MessageOptionsView.tsx +248 -0
- package/src/components/Chat/PeerBlockedFromChat.tsx +49 -0
- package/src/components/Chat/PinnedMessages.tsx +422 -0
- package/src/components/Chat/index.ts +1 -1
- package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +4 -1
- package/src/components/ChatAndParticipants/ChatAndParticipantsHeader.tsx +48 -12
- package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +9 -1
- package/src/components/ChatAndParticipants/ChatView.tsx +37 -5
- package/src/components/EndRoomModalContent.tsx +11 -14
- package/src/components/Footer.tsx +3 -1
- package/src/components/GridView.tsx +17 -8
- package/src/components/HLSView.tsx +45 -45
- package/src/components/HMSBaseButton.tsx +17 -2
- package/src/components/HMSDangerButton.tsx +3 -0
- package/src/components/HMSHLSMessage.tsx +130 -13
- package/src/components/HMSHLSMessageList.tsx +2 -2
- package/src/components/HMSHandRaiseNotification.tsx +17 -10
- package/src/components/HMSKeyboardAvoidingView.tsx +6 -1
- package/src/components/HMSLiveIndicator.tsx +9 -13
- package/src/components/HMSLiveViewerCount.tsx +21 -20
- package/src/components/HMSLocalScreenshareNotification.tsx +1 -0
- package/src/components/HMSNotification.tsx +56 -13
- package/src/components/HMSNotifications.tsx +12 -2
- package/src/components/HMSOverlayChatView.tsx +74 -17
- package/src/components/HMSPreviewEditName.tsx +3 -1
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +2 -6
- package/src/components/HMSPrimaryButton.tsx +3 -0
- package/src/components/HMSRecordingIndicator.tsx +8 -22
- package/src/components/HMSRoomOptions.tsx +4 -1
- package/src/components/HMSTerminalErrorNotification.tsx +15 -10
- package/src/components/Header.tsx +4 -1
- package/src/components/LeaveRoomBottomSheet.tsx +13 -11
- package/src/components/Meeting.tsx +4 -0
- package/src/components/MeetingScreenContent.tsx +24 -21
- package/src/components/Modals.tsx +23 -25
- package/src/components/Participants/ParticipantsItemOptions.tsx +12 -7
- package/src/components/PeerSettingsModalContent.tsx +3 -1
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +3 -1
- package/src/components/Preview.tsx +15 -2
- package/src/components/PreviewForRoleChangeModal.tsx +4 -3
- package/src/components/RoomSettingsModalContent.tsx +62 -18
- package/src/components/RoomSettingsModalDebugModeContent.tsx +2 -5
- package/src/components/WebrtcView.tsx +6 -2
- package/src/hooks-sdk-selectors.tsx +19 -0
- package/src/hooks-sdk.ts +37 -0
- package/src/hooks-util-selectors.tsx +2 -3
- package/src/hooks-util.ts +578 -87
- package/src/redux/actionTypes.ts +22 -2
- package/src/redux/actions/index.ts +41 -4
- package/src/redux/reducers/appState.ts +54 -5
- package/src/redux/reducers/chatWindow.ts +2 -2
- package/src/redux/reducers/message.ts +20 -6
- package/src/types.ts +35 -6
- package/src/utils/types.ts +3 -0
- package/src/utils.ts +2 -2
- package/lib/commonjs/components/Chat/PinnedMessage.js +0 -81
- package/lib/commonjs/components/Chat/PinnedMessage.js.map +0 -1
- package/lib/module/components/Chat/PinnedMessage.js +0 -72
- package/lib/module/components/Chat/PinnedMessage.js.map +0 -1
- package/lib/typescript/components/Chat/PinnedMessage.d.ts +0 -3
- package/lib/typescript/components/Chat/PinnedMessage.d.ts.map +0 -1
- package/src/components/Chat/PinnedMessage.tsx +0 -89
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
import { useAllowBlockingPeerFromChat, useAllowPinningMessage, useBlockPeerActions, useHMSInstance, useHMSMessagePinningActions, useHMSRoomStyle, useHMSRoomStyleSheet, useIsMessagePinned, useIsPeerBlocked, useModalType } from '../../hooks-util';
|
|
5
|
+
import { BottomSheet } from '../BottomSheet';
|
|
6
|
+
import { NoEntryIcon, PersonIcon, PinIcon } from '../../Icons';
|
|
7
|
+
import { addNotification, setSelectedMessageForAction } from '../../redux/actions';
|
|
8
|
+
import { ModalTypes } from '../../utils/types';
|
|
9
|
+
import { NotificationTypes } from '../../types';
|
|
10
|
+
const _MessageOptionsView = ({
|
|
11
|
+
onDismiss
|
|
12
|
+
}) => {
|
|
13
|
+
const dispatch = useDispatch();
|
|
14
|
+
const hmsInstance = useHMSInstance();
|
|
15
|
+
const localPeerPermissions = useSelector(state => {
|
|
16
|
+
var _state$hmsStates$loca;
|
|
17
|
+
return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.role) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.permissions;
|
|
18
|
+
});
|
|
19
|
+
const localPeerId = useSelector(state => {
|
|
20
|
+
var _state$hmsStates$loca2;
|
|
21
|
+
return (_state$hmsStates$loca2 = state.hmsStates.localPeer) === null || _state$hmsStates$loca2 === void 0 ? void 0 : _state$hmsStates$loca2.peerID;
|
|
22
|
+
});
|
|
23
|
+
const selectedMessageForAction = useSelector(state => state.app.selectedMessageForAction);
|
|
24
|
+
const allowPinningMessage = useAllowPinningMessage();
|
|
25
|
+
const isPinned = useIsMessagePinned(selectedMessageForAction);
|
|
26
|
+
const {
|
|
27
|
+
pinMessage,
|
|
28
|
+
unpinMessage
|
|
29
|
+
} = useHMSMessagePinningActions();
|
|
30
|
+
const allowPeerBlocking = useAllowBlockingPeerFromChat();
|
|
31
|
+
const isPeerBlocked = useIsPeerBlocked((selectedMessageForAction === null || selectedMessageForAction === void 0 ? void 0 : selectedMessageForAction.sender) ?? null);
|
|
32
|
+
const {
|
|
33
|
+
blockPeer,
|
|
34
|
+
unblockPeer
|
|
35
|
+
} = useBlockPeerActions();
|
|
36
|
+
const {
|
|
37
|
+
handleModalVisibleType
|
|
38
|
+
} = useModalType();
|
|
39
|
+
const hmsRoomStyle = useHMSRoomStyleSheet(theme => ({
|
|
40
|
+
blockLabel: {
|
|
41
|
+
color: theme.palette.alert_error_default
|
|
42
|
+
},
|
|
43
|
+
blockIcon: {
|
|
44
|
+
tintColor: theme.palette.alert_error_default
|
|
45
|
+
}
|
|
46
|
+
}));
|
|
47
|
+
const closeMessageOptionsBottomSheet = () => {
|
|
48
|
+
if (onDismiss) {
|
|
49
|
+
onDismiss();
|
|
50
|
+
} else {
|
|
51
|
+
dispatch(setSelectedMessageForAction(null));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const showError = error => {
|
|
55
|
+
if (!onDismiss) {
|
|
56
|
+
handleModalVisibleType(ModalTypes.DEFAULT);
|
|
57
|
+
}
|
|
58
|
+
dispatch(addNotification({
|
|
59
|
+
id: Math.random().toString(16).slice(2),
|
|
60
|
+
type: NotificationTypes.ERROR,
|
|
61
|
+
title: error.message
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
const handleMessagePin = async () => {
|
|
65
|
+
try {
|
|
66
|
+
if (selectedMessageForAction) {
|
|
67
|
+
if (isPinned) {
|
|
68
|
+
await unpinMessage(selectedMessageForAction);
|
|
69
|
+
} else {
|
|
70
|
+
await pinMessage(selectedMessageForAction);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
closeMessageOptionsBottomSheet();
|
|
74
|
+
} catch (error) {
|
|
75
|
+
closeMessageOptionsBottomSheet();
|
|
76
|
+
showError(error);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const handleBlockPeerFromChat = async () => {
|
|
80
|
+
try {
|
|
81
|
+
if (selectedMessageForAction !== null && selectedMessageForAction !== void 0 && selectedMessageForAction.sender) {
|
|
82
|
+
if (isPeerBlocked) {
|
|
83
|
+
await unblockPeer(selectedMessageForAction.sender);
|
|
84
|
+
} else {
|
|
85
|
+
await blockPeer(selectedMessageForAction.sender);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
closeMessageOptionsBottomSheet();
|
|
89
|
+
} catch (error) {
|
|
90
|
+
closeMessageOptionsBottomSheet();
|
|
91
|
+
showError(error);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const handleRemoveParticipant = async () => {
|
|
95
|
+
if (selectedMessageForAction !== null && selectedMessageForAction !== void 0 && selectedMessageForAction.sender) {
|
|
96
|
+
await hmsInstance.removePeer(selectedMessageForAction.sender, 'Removed from chat');
|
|
97
|
+
}
|
|
98
|
+
closeMessageOptionsBottomSheet();
|
|
99
|
+
};
|
|
100
|
+
const hidePinItem = !(selectedMessageForAction && allowPinningMessage);
|
|
101
|
+
const hideBlockItem = !(selectedMessageForAction && selectedMessageForAction.sender && allowPeerBlocking && selectedMessageForAction.sender.peerID !== localPeerId);
|
|
102
|
+
const hideRemoveItem = !(localPeerPermissions !== null && localPeerPermissions !== void 0 && localPeerPermissions.removeOthers && selectedMessageForAction !== null && selectedMessageForAction !== void 0 && selectedMessageForAction.sender && !selectedMessageForAction.sender.isLocal);
|
|
103
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(BottomSheet.Header, {
|
|
104
|
+
heading: "Message Options",
|
|
105
|
+
dismissModal: closeMessageOptionsBottomSheet
|
|
106
|
+
}), /*#__PURE__*/React.createElement(BottomSheet.Divider, {
|
|
107
|
+
style: styles.headerDivider
|
|
108
|
+
}), hidePinItem ? null : /*#__PURE__*/React.createElement(MessageOptionsItem, {
|
|
109
|
+
label: isPinned ? 'Unpin' : 'Pin',
|
|
110
|
+
icon: /*#__PURE__*/React.createElement(PinIcon, {
|
|
111
|
+
type: isPinned ? 'unpin' : 'pin',
|
|
112
|
+
style: styles.icon
|
|
113
|
+
}),
|
|
114
|
+
onPress: handleMessagePin
|
|
115
|
+
}), hideBlockItem ? null : /*#__PURE__*/React.createElement(MessageOptionsItem, {
|
|
116
|
+
label: isPeerBlocked ? 'Unblock from Chat' : 'Block from Chat',
|
|
117
|
+
labelStyle: hmsRoomStyle.blockLabel,
|
|
118
|
+
icon: /*#__PURE__*/React.createElement(NoEntryIcon, {
|
|
119
|
+
style: [styles.icon, hmsRoomStyle.blockIcon]
|
|
120
|
+
}),
|
|
121
|
+
onPress: handleBlockPeerFromChat
|
|
122
|
+
}), hideRemoveItem ? null : /*#__PURE__*/React.createElement(MessageOptionsItem, {
|
|
123
|
+
label: "Remove Participant",
|
|
124
|
+
labelStyle: hmsRoomStyle.blockLabel,
|
|
125
|
+
icon: /*#__PURE__*/React.createElement(PersonIcon, {
|
|
126
|
+
type: "left",
|
|
127
|
+
style: [styles.icon, hmsRoomStyle.blockIcon]
|
|
128
|
+
}),
|
|
129
|
+
onPress: handleRemoveParticipant
|
|
130
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
131
|
+
style: styles.bottomSpacer
|
|
132
|
+
}));
|
|
133
|
+
};
|
|
134
|
+
const MessageOptionsItem = ({
|
|
135
|
+
label,
|
|
136
|
+
onPress,
|
|
137
|
+
icon = null,
|
|
138
|
+
style,
|
|
139
|
+
labelStyle
|
|
140
|
+
}) => {
|
|
141
|
+
const textStyle = useHMSRoomStyle((theme, typography) => ({
|
|
142
|
+
color: theme.palette.on_surface_high,
|
|
143
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
144
|
+
}));
|
|
145
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
146
|
+
style: [styles.container, style],
|
|
147
|
+
onPress: onPress
|
|
148
|
+
}, icon, /*#__PURE__*/React.createElement(Text, {
|
|
149
|
+
style: [styles.text, textStyle, labelStyle]
|
|
150
|
+
}, label));
|
|
151
|
+
};
|
|
152
|
+
const styles = StyleSheet.create({
|
|
153
|
+
// Item styles
|
|
154
|
+
container: {
|
|
155
|
+
paddingHorizontal: 20,
|
|
156
|
+
paddingVertical: 16,
|
|
157
|
+
flexDirection: 'row',
|
|
158
|
+
alignItems: 'center'
|
|
159
|
+
},
|
|
160
|
+
text: {
|
|
161
|
+
fontSize: 14,
|
|
162
|
+
lineHeight: 20,
|
|
163
|
+
letterSpacing: 0.1,
|
|
164
|
+
marginLeft: 8
|
|
165
|
+
},
|
|
166
|
+
// Container styles
|
|
167
|
+
headerDivider: {
|
|
168
|
+
marginVertical: 12
|
|
169
|
+
},
|
|
170
|
+
icon: {
|
|
171
|
+
width: 20,
|
|
172
|
+
height: 20
|
|
173
|
+
},
|
|
174
|
+
bottomSpacer: {
|
|
175
|
+
width: '100%',
|
|
176
|
+
height: 32
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
export const MessageOptionsView = /*#__PURE__*/React.memo(_MessageOptionsView);
|
|
180
|
+
//# sourceMappingURL=MessageOptionsView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","TouchableOpacity","View","useDispatch","useSelector","useAllowBlockingPeerFromChat","useAllowPinningMessage","useBlockPeerActions","useHMSInstance","useHMSMessagePinningActions","useHMSRoomStyle","useHMSRoomStyleSheet","useIsMessagePinned","useIsPeerBlocked","useModalType","BottomSheet","NoEntryIcon","PersonIcon","PinIcon","addNotification","setSelectedMessageForAction","ModalTypes","NotificationTypes","_MessageOptionsView","onDismiss","dispatch","hmsInstance","localPeerPermissions","state","_state$hmsStates$loca","hmsStates","localPeer","role","permissions","localPeerId","_state$hmsStates$loca2","peerID","selectedMessageForAction","app","allowPinningMessage","isPinned","pinMessage","unpinMessage","allowPeerBlocking","isPeerBlocked","sender","blockPeer","unblockPeer","handleModalVisibleType","hmsRoomStyle","theme","blockLabel","color","palette","alert_error_default","blockIcon","tintColor","closeMessageOptionsBottomSheet","showError","error","DEFAULT","id","Math","random","toString","slice","type","ERROR","title","message","handleMessagePin","handleBlockPeerFromChat","handleRemoveParticipant","removePeer","hidePinItem","hideBlockItem","hideRemoveItem","removeOthers","isLocal","createElement","Header","heading","dismissModal","Divider","style","styles","headerDivider","MessageOptionsItem","label","icon","onPress","labelStyle","bottomSpacer","textStyle","typography","on_surface_high","fontFamily","font_family","container","text","create","paddingHorizontal","paddingVertical","flexDirection","alignItems","fontSize","lineHeight","letterSpacing","marginLeft","marginVertical","width","height","MessageOptionsView","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/MessageOptionsView.ts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ACnBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDL,IAAI,EAAE;IACJM,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,GAAG;IAClBC,UAAU,EAAE;EACd,CAAC;EACD;EACAtB,aAAa,EAAE;IACbuB,cAAc,EAAE;EAClB,CAAC;EACDpB,IAAI,EAAE;IACJqB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV,CAAC;EACDnB,YAAY,EAAE;IACZkB,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,kBAAkB,gBAAGlH,KAAK,CAACmH,IAAI,CAAC1F,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View, StyleSheet, Text } from 'react-native';
|
|
3
|
+
import { useHMSRoomStyleSheet } from '../../hooks-util';
|
|
4
|
+
export const _PeerBlockedFromChat = ({
|
|
5
|
+
style
|
|
6
|
+
}) => {
|
|
7
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
8
|
+
container: {
|
|
9
|
+
backgroundColor: theme.palette.surface_default
|
|
10
|
+
},
|
|
11
|
+
subtitle: {
|
|
12
|
+
color: theme.palette.on_surface_medium,
|
|
13
|
+
fontFamily: `${typography.font_family}-Regular`
|
|
14
|
+
}
|
|
15
|
+
}));
|
|
16
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
17
|
+
style: [styles.container, hmsRoomStyles.container, style]
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
19
|
+
style: [styles.subtitle, hmsRoomStyles.subtitle]
|
|
20
|
+
}, "You've been blocked from sending messages"));
|
|
21
|
+
};
|
|
22
|
+
const styles = StyleSheet.create({
|
|
23
|
+
container: {
|
|
24
|
+
paddingVertical: 8,
|
|
25
|
+
paddingHorizontal: 16,
|
|
26
|
+
borderRadius: 8,
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'center'
|
|
29
|
+
},
|
|
30
|
+
subtitle: {
|
|
31
|
+
fontSize: 14,
|
|
32
|
+
lineHeight: 20,
|
|
33
|
+
letterSpacing: 0.25,
|
|
34
|
+
textAlign: 'center'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export const PeerBlockedFromChat = /*#__PURE__*/React.memo(_PeerBlockedFromChat);
|
|
38
|
+
//# sourceMappingURL=PeerBlockedFromChat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Text","useHMSRoomStyleSheet","_PeerBlockedFromChat","style","hmsRoomStyles","theme","typography","container","backgroundColor","palette","surface_default","subtitle","color","on_surface_medium","fontFamily","font_family","createElement","styles","create","paddingVertical","paddingHorizontal","borderRadius","alignItems","justifyContent","fontSize","lineHeight","letterSpacing","textAlign","PeerBlockedFromChat","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/PeerBlockedFromChat.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAGrD,SAASC,oBAAoB,QAAQ,kBAAkB;AAMvD,OAAO,MAAMC,oBAAwD,GAAGA,CAAC;EACvEC;AACF,CAAC,KAAK;EACJ,MAAMC,aAAa,GAAGH,oBAAoB,CAAC,CAACI,KAAK,EAAEC,UAAU,MAAM;IACjEC,SAAS,EAAE;MACTC,eAAe,EAAEH,KAAK,CAACI,OAAO,CAACC;IACjC,CAAC;IACDC,QAAQ,EAAE;MACRC,KAAK,EAAEP,KAAK,CAACI,OAAO,CAACI,iBAAiB;MACtCC,UAAU,EAAG,GAAER,UAAU,CAACS,WAAY;IACxC;EACF,CAAC,CAAC,CAAC;EAEH,oBACElB,KAAA,CAAAmB,aAAA,CAAClB,IAAI;IAACK,KAAK,EAAE,CAACc,MAAM,CAACV,SAAS,EAAEH,aAAa,CAACG,SAAS,EAAEJ,KAAK;EAAE,gBAC9DN,KAAA,CAAAmB,aAAA,CAAChB,IAAI;IAACG,KAAK,EAAE,CAACc,MAAM,CAACN,QAAQ,EAAEP,aAAa,CAACO,QAAQ;EAAE,GAAC,2CAElD,CACF,CAAC;AAEX,CAAC;AAED,MAAMM,MAAM,GAAGlB,UAAU,CAACmB,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE,EAAE;IACrBC,YAAY,EAAE,CAAC;IACfC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDZ,QAAQ,EAAE;IACRa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,mBAAmB,gBAAG/B,KAAK,CAACgC,IAAI,CAAC3B,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View, StyleSheet, Text, TouchableOpacity, ScrollView, Platform } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { FlashList } from '@shopify/flash-list';
|
|
5
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
6
|
+
import { useAllowPinningMessage, useHMSMessagePinningActions, useHMSRoomStyleSheet } from '../../hooks-util';
|
|
7
|
+
import { PinIcon } from '../../Icons';
|
|
8
|
+
import { hexToRgbA } from '../../utils/theme';
|
|
9
|
+
const FLATLIST_VIEWABILITY_CONFIG = {
|
|
10
|
+
waitForInteraction: true,
|
|
11
|
+
itemVisiblePercentThreshold: 90
|
|
12
|
+
};
|
|
13
|
+
const LINE_HEIGHT = 20;
|
|
14
|
+
var NumOfLines = /*#__PURE__*/function (NumOfLines) {
|
|
15
|
+
NumOfLines[NumOfLines["EXPANDED"] = 6] = "EXPANDED";
|
|
16
|
+
NumOfLines[NumOfLines["COLLAPSED"] = 3] = "COLLAPSED";
|
|
17
|
+
return NumOfLines;
|
|
18
|
+
}(NumOfLines || {});
|
|
19
|
+
const Heights = {
|
|
20
|
+
EXAPANDED: NumOfLines.EXPANDED * LINE_HEIGHT + 2,
|
|
21
|
+
COLLAPSED: NumOfLines.COLLAPSED * LINE_HEIGHT + 2
|
|
22
|
+
};
|
|
23
|
+
export const _PinnedMessages = ({
|
|
24
|
+
insetMode = false
|
|
25
|
+
}) => {
|
|
26
|
+
const listRef = React.useRef(null);
|
|
27
|
+
const [numOfLinesInText, setNumOfLinesInText] = React.useState({});
|
|
28
|
+
const numOfLinesInTextRef = React.useRef(numOfLinesInText);
|
|
29
|
+
const [listHeight, setListHeight] = React.useState(Heights.COLLAPSED);
|
|
30
|
+
const listHeightRef = React.useRef(Heights.COLLAPSED);
|
|
31
|
+
const [selectedPinnedMessageIndex, setSelectedMessageIndex] = React.useState(0);
|
|
32
|
+
const selectedPinnedMessageIndexRef = React.useRef(0);
|
|
33
|
+
const allowPinningMessage = useAllowPinningMessage();
|
|
34
|
+
const {
|
|
35
|
+
unpinMessage
|
|
36
|
+
} = useHMSMessagePinningActions();
|
|
37
|
+
const pinnedMessages = useSelector(state => state.messages.pinnedMessages);
|
|
38
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
39
|
+
insetContainer: {
|
|
40
|
+
backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.64)
|
|
41
|
+
},
|
|
42
|
+
pinContainer: {
|
|
43
|
+
backgroundColor: theme.palette.surface_default
|
|
44
|
+
},
|
|
45
|
+
activeMessageContainer: {
|
|
46
|
+
backgroundColor: theme.palette.on_surface_high
|
|
47
|
+
},
|
|
48
|
+
inactiveMessageContainer: {
|
|
49
|
+
backgroundColor: theme.palette.on_surface_low
|
|
50
|
+
},
|
|
51
|
+
closeIcon: {
|
|
52
|
+
tintColor: theme.palette.on_surface_medium
|
|
53
|
+
},
|
|
54
|
+
highlightedText: {
|
|
55
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
56
|
+
color: theme.palette.on_surface_high
|
|
57
|
+
},
|
|
58
|
+
text: {
|
|
59
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
60
|
+
color: theme.palette.on_surface_high
|
|
61
|
+
},
|
|
62
|
+
ellipsis: {
|
|
63
|
+
backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.64)
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
const handleTapOnPinnedMessage = React.useCallback(() => {
|
|
67
|
+
setListHeight(prevListHeight => {
|
|
68
|
+
let updated = prevListHeight > Heights.COLLAPSED ? Heights.COLLAPSED : Heights.EXAPANDED;
|
|
69
|
+
listHeightRef.current = updated;
|
|
70
|
+
return updated;
|
|
71
|
+
});
|
|
72
|
+
}, []);
|
|
73
|
+
const handleUnpinMessagePress = React.useCallback(() => {
|
|
74
|
+
const visiblePinnedMessage = pinnedMessages[selectedPinnedMessageIndexRef.current];
|
|
75
|
+
if (visiblePinnedMessage) {
|
|
76
|
+
if (listHeight > Heights.COLLAPSED) {
|
|
77
|
+
setListHeight(Heights.COLLAPSED);
|
|
78
|
+
listHeightRef.current = Heights.COLLAPSED;
|
|
79
|
+
}
|
|
80
|
+
unpinMessage(visiblePinnedMessage);
|
|
81
|
+
}
|
|
82
|
+
}, [listHeight, pinnedMessages]);
|
|
83
|
+
const _handleViewableItemsChanged = React.useCallback(info => {
|
|
84
|
+
const firstViewable = info.viewableItems[0];
|
|
85
|
+
if (firstViewable !== null && firstViewable !== void 0 && firstViewable.isViewable && typeof firstViewable.index === 'number') {
|
|
86
|
+
let viewableIndexChanged = false;
|
|
87
|
+
setSelectedMessageIndex(currIndex => {
|
|
88
|
+
if (currIndex !== firstViewable.index) {
|
|
89
|
+
viewableIndexChanged = true;
|
|
90
|
+
}
|
|
91
|
+
if (firstViewable.index !== null) {
|
|
92
|
+
return firstViewable.index;
|
|
93
|
+
}
|
|
94
|
+
return currIndex;
|
|
95
|
+
});
|
|
96
|
+
selectedPinnedMessageIndexRef.current = firstViewable.index;
|
|
97
|
+
const visiblePinnedMessage = pinnedMessages[selectedPinnedMessageIndexRef.current];
|
|
98
|
+
if (viewableIndexChanged && listHeightRef.current > Heights.COLLAPSED && visiblePinnedMessage) {
|
|
99
|
+
const visibleMessageExpandable = numOfLinesInTextRef.current[visiblePinnedMessage.id];
|
|
100
|
+
if (!visibleMessageExpandable) {
|
|
101
|
+
setListHeight(Heights.COLLAPSED);
|
|
102
|
+
listHeightRef.current = Heights.COLLAPSED;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}, [pinnedMessages]);
|
|
107
|
+
const _renderItem = React.useCallback(data => {
|
|
108
|
+
const numOfLines = numOfLinesInText[data.item.id];
|
|
109
|
+
const [sender, text] = data.item.text.split(':');
|
|
110
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
111
|
+
activeOpacity: 0.8,
|
|
112
|
+
disabled: typeof numOfLines !== 'number',
|
|
113
|
+
onPress: typeof numOfLines === 'number' ? handleTapOnPinnedMessage : undefined,
|
|
114
|
+
style: {
|
|
115
|
+
height: listHeight,
|
|
116
|
+
justifyContent: 'center',
|
|
117
|
+
overflow: Platform.OS === 'ios' && typeof numOfLines !== 'number' ? 'scroll' : 'hidden'
|
|
118
|
+
}
|
|
119
|
+
}, listHeight >= Heights.EXAPANDED && typeof numOfLines === 'number' && numOfLines > NumOfLines.EXPANDED ? /*#__PURE__*/React.createElement(ScrollView, {
|
|
120
|
+
nestedScrollEnabled: true,
|
|
121
|
+
contentContainerStyle: {
|
|
122
|
+
paddingBottom: 12
|
|
123
|
+
}
|
|
124
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
125
|
+
activeOpacity: 0.8,
|
|
126
|
+
onPress: handleTapOnPinnedMessage
|
|
127
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
128
|
+
onTextLayout: ({
|
|
129
|
+
nativeEvent
|
|
130
|
+
}) => {
|
|
131
|
+
if (nativeEvent.lines.length > NumOfLines.COLLAPSED) {
|
|
132
|
+
setNumOfLinesInText(prev => {
|
|
133
|
+
const currentValue = prev[data.item.id];
|
|
134
|
+
let updated;
|
|
135
|
+
if (typeof currentValue === 'number' && currentValue === nativeEvent.lines.length) {
|
|
136
|
+
updated = prev;
|
|
137
|
+
} else {
|
|
138
|
+
updated = {
|
|
139
|
+
...prev,
|
|
140
|
+
[data.item.id]: nativeEvent.lines.length
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
numOfLinesInTextRef.current = updated;
|
|
144
|
+
return updated;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
style: [styles.text, hmsRoomStyles.text],
|
|
149
|
+
numberOfLines: listHeight === Heights.COLLAPSED && typeof numOfLines === 'number' ? 3 : undefined
|
|
150
|
+
}, text ? /*#__PURE__*/React.createElement(Text, {
|
|
151
|
+
style: hmsRoomStyles.highlightedText
|
|
152
|
+
}, sender, ":", ' ') : null, text ?? sender))) : /*#__PURE__*/React.createElement(Text, {
|
|
153
|
+
onTextLayout: ({
|
|
154
|
+
nativeEvent
|
|
155
|
+
}) => {
|
|
156
|
+
if (nativeEvent.lines.length > NumOfLines.COLLAPSED) {
|
|
157
|
+
setNumOfLinesInText(prev => {
|
|
158
|
+
const currentValue = prev[data.item.id];
|
|
159
|
+
let updated;
|
|
160
|
+
if (typeof currentValue === 'number' && currentValue === nativeEvent.lines.length) {
|
|
161
|
+
updated = prev;
|
|
162
|
+
} else {
|
|
163
|
+
updated = {
|
|
164
|
+
...prev,
|
|
165
|
+
[data.item.id]: nativeEvent.lines.length
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
numOfLinesInTextRef.current = updated;
|
|
169
|
+
return updated;
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
style: [styles.text, hmsRoomStyles.text],
|
|
174
|
+
numberOfLines: listHeight === Heights.COLLAPSED && typeof numOfLines === 'number' ? 3 : undefined
|
|
175
|
+
}, text ? /*#__PURE__*/React.createElement(Text, {
|
|
176
|
+
style: hmsRoomStyles.highlightedText
|
|
177
|
+
}, sender, ": ") : null, text ?? sender));
|
|
178
|
+
}, [listHeight, numOfLinesInText, handleTapOnPinnedMessage]);
|
|
179
|
+
const _keyExtractor = React.useCallback(item => item.id, []);
|
|
180
|
+
const _onContentSizeChange = React.useCallback((_w, _h) => {
|
|
181
|
+
var _listRef$current;
|
|
182
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.scrollToOffset({
|
|
183
|
+
offset: listHeight * selectedPinnedMessageIndexRef.current,
|
|
184
|
+
animated: false
|
|
185
|
+
});
|
|
186
|
+
}, [listHeight]);
|
|
187
|
+
const tapGesture = React.useMemo(() => Gesture.Tap(), []);
|
|
188
|
+
const extraData = React.useMemo(() => [listHeight, numOfLinesInText, pinnedMessages], [listHeight, numOfLinesInText, pinnedMessages]);
|
|
189
|
+
if (pinnedMessages.length <= 0) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
return /*#__PURE__*/React.createElement(GestureDetector, {
|
|
193
|
+
gesture: tapGesture
|
|
194
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
195
|
+
style: [insetMode ? styles.insetContainer : styles.container, insetMode ? hmsRoomStyles.insetContainer : null]
|
|
196
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
197
|
+
style: [styles.pinContainer, insetMode ? {
|
|
198
|
+
paddingRight: 0
|
|
199
|
+
} : hmsRoomStyles.pinContainer, {
|
|
200
|
+
height: listHeight + 16
|
|
201
|
+
}]
|
|
202
|
+
}, pinnedMessages.length > 1 ? /*#__PURE__*/React.createElement(View, {
|
|
203
|
+
style: {
|
|
204
|
+
marginRight: 8,
|
|
205
|
+
flexDirection: 'column'
|
|
206
|
+
}
|
|
207
|
+
}, pinnedMessages.map((message, idx) => {
|
|
208
|
+
const isFirst = idx === 0;
|
|
209
|
+
const isSelected = selectedPinnedMessageIndex === idx;
|
|
210
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
211
|
+
key: message.id
|
|
212
|
+
}, isFirst ? null : /*#__PURE__*/React.createElement(View, {
|
|
213
|
+
style: [{
|
|
214
|
+
height: 3,
|
|
215
|
+
width: 2
|
|
216
|
+
}]
|
|
217
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
218
|
+
style: [{
|
|
219
|
+
width: 2,
|
|
220
|
+
flexGrow: 1,
|
|
221
|
+
borderRadius: 16
|
|
222
|
+
}, isSelected ? hmsRoomStyles.activeMessageContainer : hmsRoomStyles.inactiveMessageContainer]
|
|
223
|
+
}));
|
|
224
|
+
})) : null, /*#__PURE__*/React.createElement(FlashList, {
|
|
225
|
+
ref: listRef,
|
|
226
|
+
data: pinnedMessages,
|
|
227
|
+
extraData: extraData,
|
|
228
|
+
showsVerticalScrollIndicator: false,
|
|
229
|
+
pagingEnabled: true,
|
|
230
|
+
nestedScrollEnabled: true,
|
|
231
|
+
keyboardShouldPersistTaps: "always",
|
|
232
|
+
renderItem: _renderItem,
|
|
233
|
+
keyExtractor: _keyExtractor,
|
|
234
|
+
onContentSizeChange: _onContentSizeChange,
|
|
235
|
+
estimatedItemSize: 40,
|
|
236
|
+
onViewableItemsChanged: _handleViewableItemsChanged,
|
|
237
|
+
viewabilityConfig: FLATLIST_VIEWABILITY_CONFIG
|
|
238
|
+
})), allowPinningMessage ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
239
|
+
style: {
|
|
240
|
+
marginLeft: 8
|
|
241
|
+
},
|
|
242
|
+
onPress: handleUnpinMessagePress
|
|
243
|
+
}, /*#__PURE__*/React.createElement(PinIcon, {
|
|
244
|
+
type: "unpin",
|
|
245
|
+
style: [styles.icon, hmsRoomStyles.closeIcon]
|
|
246
|
+
})) : null));
|
|
247
|
+
};
|
|
248
|
+
export const PinnedMessages = /*#__PURE__*/React.memo(_PinnedMessages);
|
|
249
|
+
const styles = StyleSheet.create({
|
|
250
|
+
container: {
|
|
251
|
+
flexDirection: 'row',
|
|
252
|
+
alignItems: 'center',
|
|
253
|
+
marginTop: 8
|
|
254
|
+
},
|
|
255
|
+
insetContainer: {
|
|
256
|
+
flexDirection: 'row',
|
|
257
|
+
alignItems: 'center',
|
|
258
|
+
marginTop: 8,
|
|
259
|
+
marginHorizontal: 8,
|
|
260
|
+
marginBottom: 4,
|
|
261
|
+
borderRadius: 8,
|
|
262
|
+
paddingRight: 8
|
|
263
|
+
},
|
|
264
|
+
pinContainer: {
|
|
265
|
+
flexDirection: 'row',
|
|
266
|
+
flexGrow: 1,
|
|
267
|
+
flexShrink: 1,
|
|
268
|
+
borderRadius: 8,
|
|
269
|
+
paddingVertical: 8,
|
|
270
|
+
paddingRight: 8,
|
|
271
|
+
paddingLeft: 8
|
|
272
|
+
},
|
|
273
|
+
textWrapper: {
|
|
274
|
+
maxHeight: 50,
|
|
275
|
+
marginHorizontal: 8
|
|
276
|
+
},
|
|
277
|
+
icon: {
|
|
278
|
+
width: 20,
|
|
279
|
+
height: 20
|
|
280
|
+
// marginTop: 8,
|
|
281
|
+
},
|
|
282
|
+
text: {
|
|
283
|
+
fontSize: 14,
|
|
284
|
+
lineHeight: 20,
|
|
285
|
+
letterSpacing: 0.25
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
//# sourceMappingURL=PinnedMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Text","TouchableOpacity","ScrollView","Platform","useSelector","FlashList","GestureDetector","Gesture","useAllowPinningMessage","useHMSMessagePinningActions","useHMSRoomStyleSheet","PinIcon","hexToRgbA","FLATLIST_VIEWABILITY_CONFIG","waitForInteraction","itemVisiblePercentThreshold","LINE_HEIGHT","NumOfLines","Heights","EXAPANDED","EXPANDED","COLLAPSED","_PinnedMessages","insetMode","listRef","useRef","numOfLinesInText","setNumOfLinesInText","useState","numOfLinesInTextRef","listHeight","setListHeight","listHeightRef","selectedPinnedMessageIndex","setSelectedMessageIndex","selectedPinnedMessageIndexRef","allowPinningMessage","unpinMessage","pinnedMessages","state","messages","hmsRoomStyles","theme","typography","insetContainer","backgroundColor","palette","background_dim","pinContainer","surface_default","activeMessageContainer","on_surface_high","inactiveMessageContainer","on_surface_low","closeIcon","tintColor","on_surface_medium","highlightedText","fontFamily","font_family","color","text","ellipsis","handleTapOnPinnedMessage","useCallback","prevListHeight","updated","current","handleUnpinMessagePress","visiblePinnedMessage","_handleViewableItemsChanged","info","firstViewable","viewableItems","isViewable","index","viewableIndexChanged","currIndex","visibleMessageExpandable","id","_renderItem","data","numOfLines","item","sender","split","createElement","activeOpacity","disabled","onPress","undefined","style","height","justifyContent","overflow","OS","nestedScrollEnabled","contentContainerStyle","paddingBottom","onTextLayout","nativeEvent","lines","length","prev","currentValue","styles","numberOfLines","_keyExtractor","_onContentSizeChange","_w","_h","_listRef$current","scrollToOffset","offset","animated","tapGesture","useMemo","Tap","extraData","gesture","container","paddingRight","marginRight","flexDirection","map","message","idx","isFirst","isSelected","Fragment","key","width","flexGrow","borderRadius","ref","showsVerticalScrollIndicator","pagingEnabled","keyboardShouldPersistTaps","renderItem","keyExtractor","onContentSizeChange","estimatedItemSize","onViewableItemsChanged","viewabilityConfig","marginLeft","type","icon","PinnedMessages","memo","create","alignItems","marginTop","marginHorizontal","marginBottom","flexShrink","paddingVertical","paddingLeft","textWrapper","maxHeight","fontSize","lineHeight","letterSpacing"],"sourceRoot":"../../../../src","sources":["components/Chat/PinnedMessages.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,IAAI,EACJC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,QAAQ,QACH,cAAc;AAErB,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SAASC,eAAe,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AAE;IACJkG,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Chat/index.ts"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Chat/index.ts"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","BottomSheet","useHMSRoomStyleSheet","useShowChatAndParticipants","ChatAndParticipantsView","useHeaderHeight","useIsLandscapeOrientation","ChatAndParticipantsBottomSheet","headerHeight","isLandscapeOrientation","modalVisible","hide","hmsRoomStyles","theme","contentContainer","backgroundColor","palette","surface_dim","closeChatWindow","createElement","fullWidth","dismissModal","isVisible","avoidKeyboard","containerStyle","styles","bottomSheet","marginTop","bottomOffsetSpace","create","flex"],"sourceRoot":"../../../../src","sources":["components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","BottomSheet","useHMSRoomStyleSheet","useShowChatAndParticipants","ChatAndParticipantsView","useHeaderHeight","useIsLandscapeOrientation","ChatAndParticipantsBottomSheet","headerHeight","isLandscapeOrientation","modalVisible","hide","hmsRoomStyles","theme","contentContainer","backgroundColor","palette","surface_dim","closeChatWindow","createElement","fullWidth","dismissModal","isVisible","avoidKeyboard","containerStyle","styles","bottomSheet","marginTop","bottomOffsetSpace","create","flex"],"sourceRoot":"../../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AI,EAAE;EACR;AACF,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
-
import { CloseIcon } from '../../Icons';
|
|
5
|
-
import { useHMSRoomStyleSheet, useShowChatAndParticipants } from '../../hooks-util';
|
|
4
|
+
import { CloseIcon, SettingsIcon } from '../../Icons';
|
|
5
|
+
import { useHMSCanDisableChat, useHMSRoomStyleSheet, useShowChatAndParticipants } from '../../hooks-util';
|
|
6
6
|
import { ChatBottomSheetTabs } from '../../utils/types';
|
|
7
|
-
import { setActiveChatBottomSheetTab } from '../../redux/actions';
|
|
7
|
+
import { setActiveChatBottomSheetTab, setChatMoreActionsSheetVisible } from '../../redux/actions';
|
|
8
8
|
import { TestIds } from '../../utils/constants';
|
|
9
9
|
const _ChatAndParticipantsHeader = ({
|
|
10
10
|
onClosePress
|
|
@@ -14,6 +14,7 @@ const _ChatAndParticipantsHeader = ({
|
|
|
14
14
|
var _state$hmsStates$room;
|
|
15
15
|
return (_state$hmsStates$room = state.hmsStates.room) === null || _state$hmsStates$room === void 0 ? void 0 : _state$hmsStates$room.peerCount;
|
|
16
16
|
});
|
|
17
|
+
const canDisableChat = useHMSCanDisableChat();
|
|
17
18
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
18
19
|
headerTitleWrapper: {
|
|
19
20
|
backgroundColor: theme.palette.surface_default
|
|
@@ -41,6 +42,13 @@ const _ChatAndParticipantsHeader = ({
|
|
|
41
42
|
if (tab === 'Chat') return canShowChat && !overlayChatLayout;
|
|
42
43
|
return true;
|
|
43
44
|
});
|
|
45
|
+
const onSettingsPress = () => {
|
|
46
|
+
dispatch(setChatMoreActionsSheetVisible(true));
|
|
47
|
+
};
|
|
48
|
+
const hideSettigsButton = !canDisableChat ||
|
|
49
|
+
// can't disable chat, OR
|
|
50
|
+
visibleChatBottomSheetTabs.length === 1 && visibleChatBottomSheetTabs[0] === 'Participants'; // Only Participants Header is visible
|
|
51
|
+
|
|
44
52
|
return /*#__PURE__*/React.createElement(View, {
|
|
45
53
|
style: visibleChatBottomSheetTabs.length > 1 ? styles.tabsHeader : styles.header
|
|
46
54
|
}, visibleChatBottomSheetTabs.length === 1 ? /*#__PURE__*/React.createElement(Text, {
|
|
@@ -59,10 +67,21 @@ const _ChatAndParticipantsHeader = ({
|
|
|
59
67
|
testID: tab === 'Participants' ? isActive ? TestIds.participants_heading_active : TestIds.participants_heading : tab === 'Chat' ? isActive ? TestIds.chat_heading_active : TestIds.chat_heading : undefined,
|
|
60
68
|
style: [styles.headerTitle, hmsRoomStyles.headerTitle, isActive ? hmsRoomStyles.activeHeaderTitle : null]
|
|
61
69
|
}, tab, tab === 'Participants' && typeof peersCount === 'number' ? ` (${peersCount})` : null));
|
|
62
|
-
})), /*#__PURE__*/React.createElement(
|
|
70
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
71
|
+
style: {
|
|
72
|
+
flexDirection: 'row'
|
|
73
|
+
}
|
|
74
|
+
}, hideSettigsButton ? null : /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
75
|
+
disabled: activeChatBottomSheetTab === 'Participants',
|
|
76
|
+
onPress: onSettingsPress,
|
|
77
|
+
style: {
|
|
78
|
+
marginRight: 16,
|
|
79
|
+
opacity: activeChatBottomSheetTab === 'Participants' ? 0.5 : 1
|
|
80
|
+
}
|
|
81
|
+
}, /*#__PURE__*/React.createElement(SettingsIcon, null)), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
63
82
|
testID: TestIds.participants_close_btn,
|
|
64
83
|
onPress: onClosePress
|
|
65
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null)));
|
|
84
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null))));
|
|
66
85
|
};
|
|
67
86
|
const styles = StyleSheet.create({
|
|
68
87
|
tabsHeader: {
|