@100mslive/react-native-room-kit 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/HMSContainer.js +26 -5
- package/lib/commonjs/HMSContainer.js.map +1 -1
- package/lib/commonjs/HMSRoomSetup.js +6 -8
- 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 +410 -64
- 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/hmsStates.js +21 -8
- package/lib/commonjs/redux/reducers/hmsStates.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 +4 -2
- 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/HMSContainer.js +23 -3
- package/lib/module/HMSContainer.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +7 -9
- 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 +400 -65
- 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/hmsStates.js +21 -8
- package/lib/module/redux/reducers/hmsStates.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 +4 -2
- 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/HMSContainer.d.ts +1 -1
- package/lib/typescript/HMSContainer.d.ts.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/hmsStates.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 +26 -5
- 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/HMSContainer.tsx +26 -5
- package/src/HMSRoomSetup.tsx +9 -9
- 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 +580 -90
- 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/hmsStates.ts +36 -13
- package/src/redux/reducers/message.ts +20 -6
- package/src/types.ts +36 -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
|
@@ -2,21 +2,27 @@ import * as React from 'react';
|
|
|
2
2
|
import { FlashList } from '@shopify/flash-list';
|
|
3
3
|
import { StyleSheet, Text, View } from 'react-native';
|
|
4
4
|
import { useDispatch, useSelector } from 'react-redux';
|
|
5
|
-
import { useHMSInstance, useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../../hooks-util';
|
|
5
|
+
import { useHMSChatRecipientSelector, useHMSInstance, useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../../hooks-util';
|
|
6
6
|
import { BottomSheet } from '../BottomSheet';
|
|
7
7
|
import { HMSTextInput } from '../HMSTextInput';
|
|
8
8
|
import { ParticipantsIcon, SearchIcon } from '../../Icons';
|
|
9
9
|
import { ChatFilterItem } from './ChatFilterItem';
|
|
10
10
|
import { setChatFilterSheetVisible } from '../../redux/actions';
|
|
11
11
|
import { ChatBroadcastFilter } from '../../utils/types';
|
|
12
|
-
const _ChatFilterView = (
|
|
12
|
+
const _ChatFilterView = ({
|
|
13
|
+
onDismiss
|
|
14
|
+
}) => {
|
|
13
15
|
const hmsInstance = useHMSInstance();
|
|
14
16
|
const dispatch = useDispatch();
|
|
15
17
|
const filter = useSelector(state => state.chatWindow.sendTo);
|
|
16
|
-
const roles = useSelector(state => state.hmsStates.roles);
|
|
17
18
|
const [loadingPeersList, setLoadingPeersList] = React.useState(false);
|
|
18
19
|
const [remotePeers, setRemotePeers] = React.useState([]);
|
|
19
20
|
const [filterText, setFilterText] = React.useState('');
|
|
21
|
+
const {
|
|
22
|
+
privateChat,
|
|
23
|
+
publicChat,
|
|
24
|
+
roles: rolesSpecificChat
|
|
25
|
+
} = useHMSChatRecipientSelector();
|
|
20
26
|
const {
|
|
21
27
|
on_surface_medium: onSurfaceMediumColor
|
|
22
28
|
} = useHMSRoomColorPalette();
|
|
@@ -35,31 +41,38 @@ const _ChatFilterView = () => {
|
|
|
35
41
|
}
|
|
36
42
|
}));
|
|
37
43
|
React.useEffect(() => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
if (privateChat) {
|
|
45
|
+
let mounted = true;
|
|
46
|
+
const fetchRemotePeers = async () => {
|
|
47
|
+
setLoadingPeersList(true);
|
|
48
|
+
const fetchedRemotePeers = await hmsInstance.getRemotePeers();
|
|
49
|
+
if (mounted) {
|
|
50
|
+
setLoadingPeersList(false);
|
|
51
|
+
setRemotePeers(fetchedRemotePeers);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
fetchRemotePeers();
|
|
55
|
+
return () => {
|
|
56
|
+
mounted = false;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}, [privateChat, hmsInstance]);
|
|
52
60
|
const _keyExtractor = React.useCallback(item => item.peerID, []);
|
|
53
61
|
const _renderItem = React.useCallback(({
|
|
54
62
|
item,
|
|
55
63
|
extraData
|
|
56
64
|
}) => /*#__PURE__*/React.createElement(ChatFilterItem, {
|
|
57
65
|
item: item,
|
|
58
|
-
active: extraData.name === item.name,
|
|
59
|
-
disabled: extraData.name === item.name
|
|
60
|
-
|
|
66
|
+
active: extraData && extraData.name === item.name,
|
|
67
|
+
disabled: extraData && extraData.name === item.name,
|
|
68
|
+
onDismiss: onDismiss
|
|
69
|
+
}), [onDismiss]);
|
|
61
70
|
const closeFiltersBottomSheet = () => {
|
|
62
|
-
|
|
71
|
+
if (onDismiss) {
|
|
72
|
+
onDismiss();
|
|
73
|
+
} else {
|
|
74
|
+
dispatch(setChatFilterSheetVisible(false));
|
|
75
|
+
}
|
|
63
76
|
};
|
|
64
77
|
const formattedFilterText = filterText.trim().toLowerCase();
|
|
65
78
|
|
|
@@ -72,16 +85,8 @@ const _ChatFilterView = () => {
|
|
|
72
85
|
}, [formattedFilterText, remotePeers]);
|
|
73
86
|
|
|
74
87
|
// Filtering Broadcast option
|
|
75
|
-
const showBroadcastOption = formattedFilterText.length > 0 ? ChatBroadcastFilter.name.includes(formattedFilterText) : true;
|
|
76
|
-
|
|
77
|
-
// Filtering Roles
|
|
78
|
-
const foundRoles = roles.filter(role => {
|
|
79
|
-
if (!role.name || role.name.startsWith('_')) {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
return formattedFilterText.length > 0 ? role.name.toLowerCase().includes(formattedFilterText) : true;
|
|
83
|
-
});
|
|
84
|
-
const isBroadcastFilterSelected = !('publishSettings' in filter || 'peerId' in filter) &&
|
|
88
|
+
const showBroadcastOption = publicChat ? formattedFilterText.length > 0 ? ChatBroadcastFilter.name.includes(formattedFilterText) : true : false;
|
|
89
|
+
const isBroadcastFilterSelected = filter !== null && !('publishSettings' in filter || 'peerId' in filter) &&
|
|
85
90
|
// filter is not HMSRole and HMSRemotePeer
|
|
86
91
|
filter.name === ChatBroadcastFilter.name;
|
|
87
92
|
return /*#__PURE__*/React.createElement(View, {
|
|
@@ -93,7 +98,7 @@ const _ChatFilterView = () => {
|
|
|
93
98
|
dismissModal: closeFiltersBottomSheet
|
|
94
99
|
}), /*#__PURE__*/React.createElement(BottomSheet.Divider, {
|
|
95
100
|
style: styles.headerDivider
|
|
96
|
-
}), /*#__PURE__*/React.createElement(HMSTextInput, {
|
|
101
|
+
}), privateChat ? /*#__PURE__*/React.createElement(HMSTextInput, {
|
|
97
102
|
value: filterText,
|
|
98
103
|
onChangeText: setFilterText,
|
|
99
104
|
placeholder: "Search for participants",
|
|
@@ -103,7 +108,7 @@ const _ChatFilterView = () => {
|
|
|
103
108
|
leftIcon: /*#__PURE__*/React.createElement(SearchIcon, {
|
|
104
109
|
style: styles.textInputSearchIcon
|
|
105
110
|
})
|
|
106
|
-
}), /*#__PURE__*/React.createElement(FlashList, {
|
|
111
|
+
}) : null, /*#__PURE__*/React.createElement(FlashList, {
|
|
107
112
|
data: filteredRemotePeers,
|
|
108
113
|
extraData: filter,
|
|
109
114
|
estimatedItemSize: 104,
|
|
@@ -111,34 +116,38 @@ const _ChatFilterView = () => {
|
|
|
111
116
|
keyboardShouldPersistTaps: "always",
|
|
112
117
|
keyExtractor: _keyExtractor,
|
|
113
118
|
renderItem: _renderItem,
|
|
114
|
-
ListEmptyComponent: /*#__PURE__*/React.createElement(View, {
|
|
119
|
+
ListEmptyComponent: privateChat ? /*#__PURE__*/React.createElement(View, {
|
|
115
120
|
style: styles.placeholderContainer
|
|
116
121
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
117
122
|
style: [styles.placeholderText, hmsRoomStyles.placeholderText]
|
|
118
|
-
}, loadingPeersList ? 'Loading Participants...' : formattedFilterText.length > 0 ? 'No participants found!' : 'There is no one in the session!')),
|
|
119
|
-
ListHeaderComponent: /*#__PURE__*/React.createElement(View, null, showBroadcastOption ? /*#__PURE__*/React.createElement(
|
|
123
|
+
}, loadingPeersList ? 'Loading Participants...' : formattedFilterText.length > 0 ? 'No participants found!' : 'There is no one in the session!')) : null,
|
|
124
|
+
ListHeaderComponent: /*#__PURE__*/React.createElement(View, null, showBroadcastOption ? /*#__PURE__*/React.createElement(ChatFilterItem, {
|
|
120
125
|
item: ChatBroadcastFilter,
|
|
121
126
|
active: isBroadcastFilterSelected,
|
|
122
127
|
disabled: isBroadcastFilterSelected,
|
|
123
|
-
icon: /*#__PURE__*/React.createElement(ParticipantsIcon, null)
|
|
124
|
-
|
|
128
|
+
icon: /*#__PURE__*/React.createElement(ParticipantsIcon, null),
|
|
129
|
+
onDismiss: onDismiss
|
|
130
|
+
}) : null, showBroadcastOption && rolesSpecificChat.length > 0 ? /*#__PURE__*/React.createElement(BottomSheet.Divider, {
|
|
125
131
|
style: styles.divider
|
|
126
|
-
})
|
|
132
|
+
}) : null, rolesSpecificChat.length > 0 ? /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
|
|
127
133
|
style: [styles.label, hmsRoomStyles.label]
|
|
128
|
-
}, "ROLES"),
|
|
129
|
-
const isRoleSelected =
|
|
130
|
-
const isActive = isRoleSelected && filter.name === role.name;
|
|
134
|
+
}, "ROLES"), rolesSpecificChat.map(role => {
|
|
135
|
+
const isRoleSelected = filter !== null && 'publishSettings' in filter;
|
|
136
|
+
const isActive = filter !== null && isRoleSelected && filter.name === role.name;
|
|
131
137
|
return /*#__PURE__*/React.createElement(ChatFilterItem, {
|
|
132
138
|
key: role.name,
|
|
133
139
|
item: role,
|
|
134
140
|
active: isActive,
|
|
135
|
-
disabled: isActive
|
|
141
|
+
disabled: isActive,
|
|
142
|
+
onDismiss: onDismiss
|
|
136
143
|
});
|
|
137
|
-
}), /*#__PURE__*/React.createElement(BottomSheet.Divider, {
|
|
144
|
+
})) : null, rolesSpecificChat.length > 0 && privateChat ? /*#__PURE__*/React.createElement(BottomSheet.Divider, {
|
|
145
|
+
style: styles.divider
|
|
146
|
+
}) : null, rolesSpecificChat.length <= 0 && privateChat && showBroadcastOption ? /*#__PURE__*/React.createElement(BottomSheet.Divider, {
|
|
138
147
|
style: styles.divider
|
|
139
|
-
})
|
|
148
|
+
}) : null, privateChat ? /*#__PURE__*/React.createElement(Text, {
|
|
140
149
|
style: [styles.label, hmsRoomStyles.label]
|
|
141
|
-
}, "PARTICIPANTS"))
|
|
150
|
+
}, "PARTICIPANTS") : null)
|
|
142
151
|
}));
|
|
143
152
|
};
|
|
144
153
|
const styles = StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","FlashList","StyleSheet","Text","View","useDispatch","useSelector","useHMSInstance","useHMSRoomColorPalette","useHMSRoomStyleSheet","BottomSheet","HMSTextInput","ParticipantsIcon","SearchIcon","ChatFilterItem","setChatFilterSheetVisible","ChatBroadcastFilter","_ChatFilterView","hmsInstance","dispatch","filter","state","chatWindow","sendTo","
|
|
1
|
+
{"version":3,"names":["React","FlashList","StyleSheet","Text","View","useDispatch","useSelector","useHMSChatRecipientSelector","useHMSInstance","useHMSRoomColorPalette","useHMSRoomStyleSheet","BottomSheet","HMSTextInput","ParticipantsIcon","SearchIcon","ChatFilterItem","setChatFilterSheetVisible","ChatBroadcastFilter","_ChatFilterView","onDismiss","hmsInstance","dispatch","filter","state","chatWindow","sendTo","loadingPeersList","setLoadingPeersList","useState","remotePeers","setRemotePeers","filterText","setFilterText","privateChat","publicChat","roles","rolesSpecificChat","on_surface_medium","onSurfaceMediumColor","hmsRoomStyles","theme","typography","textInputContainer","backgroundColor","palette","surface_dim","borderColor","border_bright","placeholderText","color","on_surface_high","fontFamily","font_family","label","useEffect","mounted","fetchRemotePeers","fetchedRemotePeers","getRemotePeers","_keyExtractor","useCallback","item","peerID","_renderItem","extraData","createElement","active","name","disabled","closeFiltersBottomSheet","formattedFilterText","trim","toLowerCase","filteredRemotePeers","useMemo","length","remotePeer","includes","showBroadcastOption","isBroadcastFilterSelected","style","flex","Header","heading","dismissModal","Divider","styles","headerDivider","value","onChangeText","placeholder","containerStyle","focusedContainerStyle","textInputFocusedContainer","placeholderTextColor","leftIcon","textInputSearchIcon","data","estimatedItemSize","contentContainerStyle","list","keyboardShouldPersistTaps","keyExtractor","renderItem","ListEmptyComponent","placeholderContainer","ListHeaderComponent","icon","divider","map","role","isRoleSelected","isActive","key","create","marginVertical","borderWidth","marginHorizontal","height","paddingHorizontal","marginRight","alignSelf","paddingBottom","marginTop","fontSize","lineHeight","letterSpacing","textAlign","ChatFilterView","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatFilterView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,SAAS,QAA6B,qBAAqB;AACpE,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAEtD,SACEC,2BAA2B,EAC3BC,cAAc,EACdC,sBAAsB,EACtBC,oBAAoB,QACf,kBAAkB;AAEzB,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,gB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 'react';
|
|
|
2
2
|
import { FlashList
|
|
3
3
|
// FlashListProps
|
|
4
4
|
} from '@shopify/flash-list';
|
|
5
|
-
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
6
6
|
import { useSelector } from 'react-redux';
|
|
7
7
|
import { ChatMessage } from './ChatMessage';
|
|
8
8
|
import { ChatBanner } from './ChatBanner';
|
|
9
|
-
import {
|
|
9
|
+
import { PinnedMessages } from './PinnedMessages';
|
|
10
|
+
import { useIsAllowedToSendMessage } from '../../hooks-util';
|
|
10
11
|
const _ChatList = () => {
|
|
12
|
+
const flashlistRef = React.useRef(null);
|
|
13
|
+
const isAllowedToSendMessage = useIsAllowedToSendMessage();
|
|
11
14
|
const messages = useSelector(state => state.messages.messages);
|
|
12
15
|
const _keyExtractor = React.useCallback(item => item.messageId, []);
|
|
13
16
|
const _renderItem = React.useCallback(data => {
|
|
@@ -16,12 +19,14 @@ const _ChatList = () => {
|
|
|
16
19
|
});
|
|
17
20
|
}, []);
|
|
18
21
|
return /*#__PURE__*/React.createElement(View, {
|
|
19
|
-
style: chatListStyle.list
|
|
20
|
-
}, /*#__PURE__*/React.createElement(
|
|
22
|
+
style: [chatListStyle.list, isAllowedToSendMessage ? chatListStyle.bottomSpace : null]
|
|
23
|
+
}, /*#__PURE__*/React.createElement(PinnedMessages, null), messages.length > 0 ? /*#__PURE__*/React.createElement(FlashList, {
|
|
24
|
+
ref: flashlistRef,
|
|
21
25
|
data: messages,
|
|
22
26
|
inverted: true,
|
|
23
27
|
estimatedItemSize: 75,
|
|
24
|
-
|
|
28
|
+
showsVerticalScrollIndicator: Platform.OS !== 'android'
|
|
29
|
+
// contentContainerStyle={chatListStyle.listContentContainer} // Bug: Android inverted flashlist will apply padding on left when `paddingRight: 12` is applied
|
|
25
30
|
,
|
|
26
31
|
keyboardShouldPersistTaps: "always"
|
|
27
32
|
// ItemSeparatorComponent={() => <View style={{ height: 16 }} />} // TODO: There is a bug related to this: https://github.com/Shopify/flash-list/issues/638
|
|
@@ -33,11 +38,13 @@ const _ChatList = () => {
|
|
|
33
38
|
const chatListStyle = StyleSheet.create({
|
|
34
39
|
list: {
|
|
35
40
|
flex: 1,
|
|
36
|
-
marginTop: 8
|
|
41
|
+
marginTop: 8
|
|
42
|
+
},
|
|
43
|
+
bottomSpace: {
|
|
37
44
|
marginBottom: 16
|
|
38
45
|
},
|
|
39
46
|
listContentContainer: {
|
|
40
|
-
paddingRight:
|
|
47
|
+
paddingRight: 8
|
|
41
48
|
}
|
|
42
49
|
});
|
|
43
50
|
export const ChatList = /*#__PURE__*/React.memo(_ChatList);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","FlashList","StyleSheet","View","useSelector","ChatMessage","ChatBanner","
|
|
1
|
+
{"version":3,"names":["React","FlashList","Platform","StyleSheet","View","useSelector","ChatMessage","ChatBanner","PinnedMessages","useIsAllowedToSendMessage","_ChatList","flashlistRef","useRef","isAllowedToSendMessage","messages","state","_keyExtractor","useCallback","item","messageId","_renderItem","data","createElement","message","style","chatListStyle","list","bottomSpace","length","ref","inverted","estimatedItemSize","showsVerticalScrollIndicator","OS","keyboardShouldPersistTaps","renderItem","keyExtractor","create","flex","marginTop","marginBottom","listContentContainer","paddingRight","ChatList","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatList.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SACEC;AACA;AAAA,OACK,qBAAqB;AAC5B,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,WAAW,QAAQ,aAAa;AAGzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,yBAAyB,QAAQ,kBAAkB;AAM5D,MAAMC,SAAkC,GAAGA,CAAA,KAAM;EAC/C,MAAMC,YAAY,GAAGX,KAAK,C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EACDZ,WAAW,EAAE;IACXa,YAAY,EAAE;EAChB,CAAC;EACDC,oBAAoB,EAAE;IACpBC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,QAAQ,gBAAG3C,KAAK,CAAC4C,IAAI,CAAClC,SAAS,CAAC"}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, Platform } from 'react-native';
|
|
3
|
-
import {
|
|
2
|
+
import { View, Text, StyleSheet, Platform, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
import { useAllowBlockingPeerFromChat, useAllowPinningMessage, useHMSRoomStyleSheet } from '../../hooks-util';
|
|
4
5
|
import { getTimeStringin12HourFormat } from '../../utils/functions';
|
|
6
|
+
import { PinIcon, ThreeDotsIcon } from '../../Icons';
|
|
7
|
+
import { setSelectedMessageForAction } from '../../redux/actions';
|
|
5
8
|
const _ChatMessage = ({
|
|
6
9
|
message
|
|
7
10
|
}) => {
|
|
8
|
-
const
|
|
11
|
+
const dispatch = useDispatch();
|
|
12
|
+
const isPinned = useSelector(state => state.messages.pinnedMessages.findIndex(pinnedMessage => pinnedMessage.id === message.messageId) >= 0);
|
|
13
|
+
const localPeerId = useSelector(state => {
|
|
14
|
+
var _state$hmsStates$loca;
|
|
15
|
+
return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.peerID;
|
|
16
|
+
});
|
|
17
|
+
const allowPinningMessage = useAllowPinningMessage();
|
|
18
|
+
const allowPeerBlocking = useAllowBlockingPeerFromChat();
|
|
19
|
+
const canRemoveOthers = useSelector(state => {
|
|
20
|
+
var _state$hmsStates$loca2;
|
|
21
|
+
return !!((_state$hmsStates$loca2 = state.hmsStates.localPeer) !== null && _state$hmsStates$loca2 !== void 0 && (_state$hmsStates$loca2 = _state$hmsStates$loca2.role) !== null && _state$hmsStates$loca2 !== void 0 && (_state$hmsStates$loca2 = _state$hmsStates$loca2.permissions) !== null && _state$hmsStates$loca2 !== void 0 && _state$hmsStates$loca2.removeOthers);
|
|
22
|
+
});
|
|
9
23
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
10
24
|
senderName: {
|
|
11
25
|
color: theme.palette.on_surface_high,
|
|
@@ -16,35 +30,66 @@ const _ChatMessage = ({
|
|
|
16
30
|
fontFamily: `${typography.font_family}-Regular`
|
|
17
31
|
},
|
|
18
32
|
time: {
|
|
19
|
-
color: theme.palette.
|
|
33
|
+
color: theme.palette.on_surface_low,
|
|
20
34
|
fontFamily: `${typography.font_family}-Regular`
|
|
35
|
+
},
|
|
36
|
+
threeDots: {
|
|
37
|
+
tintColor: theme.palette.on_surface_low
|
|
38
|
+
},
|
|
39
|
+
pinnedLabel: {
|
|
40
|
+
color: theme.palette.on_surface_low,
|
|
41
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
21
42
|
}
|
|
22
43
|
}), []);
|
|
44
|
+
const onThreeDotsPress = () => {
|
|
45
|
+
dispatch(setSelectedMessageForAction(message));
|
|
46
|
+
};
|
|
47
|
+
const messageSender = message.sender;
|
|
48
|
+
const canTakeAction = allowPinningMessage ||
|
|
49
|
+
// can pin message, OR
|
|
50
|
+
allowPeerBlocking && message.sender && message.sender.peerID !== localPeerId ||
|
|
51
|
+
// can block peers, OR
|
|
52
|
+
canRemoveOthers && message.sender && message.sender.peerID !== localPeerId; // can remove participants
|
|
53
|
+
|
|
23
54
|
return /*#__PURE__*/React.createElement(View, {
|
|
24
55
|
style: styles.container
|
|
25
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
56
|
+
}, isPinned ? /*#__PURE__*/React.createElement(View, {
|
|
57
|
+
style: styles.pinLabelContainer
|
|
58
|
+
}, /*#__PURE__*/React.createElement(PinIcon, {
|
|
59
|
+
type: "pin",
|
|
60
|
+
style: [styles.pinIcon, hmsRoomStyles.threeDots]
|
|
61
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
62
|
+
style: [styles.pinnedLabel, hmsRoomStyles.pinnedLabel]
|
|
63
|
+
}, "PINNED")) : null, /*#__PURE__*/React.createElement(View, {
|
|
26
64
|
style: [styles.nameWrapper]
|
|
27
65
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
28
66
|
style: [styles.senderName, hmsRoomStyles.senderName],
|
|
29
67
|
numberOfLines: 1
|
|
30
68
|
}, messageSender ? messageSender.isLocal ? 'You' : messageSender.name : 'Anonymous'), /*#__PURE__*/React.createElement(Text, {
|
|
31
69
|
style: [styles.time, hmsRoomStyles.time]
|
|
32
|
-
}, getTimeStringin12HourFormat(message.time))
|
|
70
|
+
}, getTimeStringin12HourFormat(message.time)), canTakeAction ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
71
|
+
hitSlop: styles.threeDotsHitSlop,
|
|
72
|
+
onPress: onThreeDotsPress
|
|
73
|
+
}, /*#__PURE__*/React.createElement(ThreeDotsIcon, {
|
|
74
|
+
stack: "vertical",
|
|
75
|
+
style: [styles.threeDots, hmsRoomStyles.threeDots]
|
|
76
|
+
})) : null), /*#__PURE__*/React.createElement(Text, {
|
|
33
77
|
style: [styles.message, hmsRoomStyles.message]
|
|
34
78
|
}, message.message));
|
|
35
79
|
};
|
|
36
80
|
export const ChatMessage = /*#__PURE__*/React.memo(_ChatMessage);
|
|
37
81
|
const styles = StyleSheet.create({
|
|
38
82
|
container: {
|
|
39
|
-
marginTop:
|
|
83
|
+
marginTop: 4,
|
|
40
84
|
padding: 8,
|
|
41
85
|
width: '100%'
|
|
42
86
|
},
|
|
43
87
|
nameWrapper: {
|
|
44
88
|
flexDirection: 'row',
|
|
45
|
-
alignItems: '
|
|
89
|
+
alignItems: 'center'
|
|
46
90
|
},
|
|
47
91
|
senderName: {
|
|
92
|
+
flexGrow: 1,
|
|
48
93
|
fontSize: 14,
|
|
49
94
|
lineHeight: Platform.OS === 'android' ? 20 : undefined,
|
|
50
95
|
letterSpacing: 0.1
|
|
@@ -59,7 +104,34 @@ const styles = StyleSheet.create({
|
|
|
59
104
|
fontSize: 14,
|
|
60
105
|
lineHeight: Platform.OS === 'android' ? 20 : undefined,
|
|
61
106
|
letterSpacing: 0.25,
|
|
62
|
-
marginTop:
|
|
107
|
+
marginTop: 4
|
|
108
|
+
},
|
|
109
|
+
threeDots: {
|
|
110
|
+
width: 20,
|
|
111
|
+
height: 20,
|
|
112
|
+
marginLeft: 4
|
|
113
|
+
},
|
|
114
|
+
threeDotsHitSlop: {
|
|
115
|
+
left: 12,
|
|
116
|
+
right: 12,
|
|
117
|
+
top: 12,
|
|
118
|
+
bottom: 12
|
|
119
|
+
},
|
|
120
|
+
pinLabelContainer: {
|
|
121
|
+
flexDirection: 'row',
|
|
122
|
+
alignItems: 'center',
|
|
123
|
+
marginBottom: 4
|
|
124
|
+
},
|
|
125
|
+
pinIcon: {
|
|
126
|
+
width: 12,
|
|
127
|
+
height: 12,
|
|
128
|
+
marginRight: 4
|
|
129
|
+
},
|
|
130
|
+
pinnedLabel: {
|
|
131
|
+
fontSize: 10,
|
|
132
|
+
textTransform: 'uppercase',
|
|
133
|
+
lineHeight: 16,
|
|
134
|
+
letterSpacing: 1.5
|
|
63
135
|
}
|
|
64
136
|
});
|
|
65
137
|
//# sourceMappingURL=ChatMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","Platform","useHMSRoomStyleSheet","getTimeStringin12HourFormat","_ChatMessage","message","
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","Platform","TouchableOpacity","useDispatch","useSelector","useAllowBlockingPeerFromChat","useAllowPinningMessage","useHMSRoomStyleSheet","getTimeStringin12HourFormat","PinIcon","ThreeDotsIcon","setSelectedMessageForAction","_ChatMessage","message","dispatch","isPinned","state","messages","pinnedMessages","findIndex","pinnedMessage","id","messageId","localPeerId","_state$hmsStates$loca","hmsStates","localPeer","peerID","allowPinningMessage","allowPeerBlocking","canRemoveOthers","_state$hmsStates$loca2","role","permissions","removeOthers","hmsRoomStyles","theme","typography","senderName","color","palette","on_surface_high","fontFamily","font_family","time","on_surface_low","threeDots","tintColor","pinnedLabel","onThreeDotsPress","messageSender","sender","canTakeAction","createElement","style","styles","container","pinLabelContainer","type","pinIcon","nameWrapper","numberOfLines","isLocal","name","hitSlop","threeDotsHitSlop","onPress","stack","ChatMessage","memo","create","marginTop","padding","width","flexDirection","alignItems","flexGrow","fontSize","lineHeight","OS","undefined","letterSpacing","marginLeft","height","left","right","top","bottom","marginBottom","marginRight","textTransform"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatMessage.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRC,gBAAgB,QACX,cAAc;AACrB,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAGtD,SACEC,4BAA4B,EAC5BC,sBAAsB,EACtBC,oBAAoB,QACf,kBAAkB;AACzB,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,OAAO,EAAEC,aAAa,QAAQ,aAAa;AAEpD,SAASC,2BAA2B,QAAQ,qBAAqB;AAMjE,MAAMC,YAA0C,GAAGA,CAAC;EAAEC;AAAQ,CAAC,KAAK;EAClE,MAAMC,QAAQ,GAAGX,WAAW,CAAC,CAAC;EAC9B,MAAMY,QAAQ,GAAGX,WAAW,CACzBY,KAAgB,IACfA,KAAK,CAACC,QAAQ,CAACC,cAAc,CAACC,SAAS,CACpCC,aAAa,IAAKA,aAAa,CAACC,EAAE,KAAKR,OAAO,CAACS,SAClD,CAAC,IAAI,CACT,CAAC;EACD,MAAMC,WAAW,GAAGnB,WAAW,CAC5BY,KAAgB;IAAA,IAAAQ,qBAAA;IAAA,QAAAA,qBAAA,GAAKR,KAAK,CAACS,SAAS,CAACC,SAAS,cAAAF,qBAAA,uBAAzBA,qBAAA,CAA2BG,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AAS,GAAG,EAAE,GAAGC,SAAS;IACtDC,aAAa,EAAE,IAAI;IACnBV,SAAS,EAAE;EACb,CAAC;EACDzB,SAAS,EAAE;IACT2B,KAAK,EAAE,EAAE;IACTU,MAAM,EAAE,EAAE;IACVD,UAAU,EAAE;EACd,CAAC;EACDjB,gBAAgB,EAAE;IAChBmB,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,GAAG,EAAE,EAAE;IACPC,MAAM,EAAE;EACV,CAAC;EACD9B,iBAAiB,EAAE;IACjBiB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBa,YAAY,EAAE;EAChB,CAAC;EACD7B,OAAO,EAAE;IACPc,KAAK,EAAE,EAAE;IACTU,MAAM,EAAE,EAAE;IACVM,WAAW,EAAE;EACf,CAAC;EACDzC,WAAW,EAAE;IACX6B,QAAQ,EAAE,EAAE;IACZa,aAAa,EAAE,WAAW;IAC1BZ,UAAU,EAAE,EAAE;IACdG,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { interpolate } from 'react-native-reanimated';
|
|
5
|
+
import { BottomSheet } from '../BottomSheet';
|
|
6
|
+
import { useIsAllowedToSendMessage, useModalType } from '../../hooks-util';
|
|
7
|
+
import { ModalTypes } from '../../utils/types';
|
|
8
|
+
import { ChatMoreActionsView } from './ChatMoreActionsView';
|
|
9
|
+
import { useFooterHeight } from '../Footer';
|
|
10
|
+
import { useHMSNotificationsHeight } from '../HMSNotifications';
|
|
11
|
+
const _ChatMoreActionsModal = ({
|
|
12
|
+
offset
|
|
13
|
+
}) => {
|
|
14
|
+
const {
|
|
15
|
+
modalVisibleType,
|
|
16
|
+
handleModalVisibleType
|
|
17
|
+
} = useModalType();
|
|
18
|
+
const footerHeight = useFooterHeight();
|
|
19
|
+
const notificationsHeight = useHMSNotificationsHeight();
|
|
20
|
+
const isAllowedToSendMessage = useIsAllowedToSendMessage();
|
|
21
|
+
const isMessageInputVisible = useSelector(state => state.chatWindow.sendTo !== null && isAllowedToSendMessage);
|
|
22
|
+
const dismissModal = () => handleModalVisibleType(ModalTypes.DEFAULT);
|
|
23
|
+
return /*#__PURE__*/React.createElement(BottomSheet, {
|
|
24
|
+
dismissModal: dismissModal,
|
|
25
|
+
isVisible: modalVisibleType === ModalTypes.CHAT_MORE_ACTIONS,
|
|
26
|
+
backdropOpacity: 0.1,
|
|
27
|
+
animationIn: 'fadeIn',
|
|
28
|
+
animationOut: 'fadeOut',
|
|
29
|
+
style: styles.modal,
|
|
30
|
+
containerStyle: [styles.contentContainer, {
|
|
31
|
+
bottom: (offset ? interpolate(offset.value, [0, 1], [0, footerHeight]) : footerHeight) + notificationsHeight + (isMessageInputVisible ? 58 : 8)
|
|
32
|
+
}]
|
|
33
|
+
}, /*#__PURE__*/React.createElement(ChatMoreActionsView, {
|
|
34
|
+
onDismiss: dismissModal
|
|
35
|
+
}));
|
|
36
|
+
};
|
|
37
|
+
const styles = StyleSheet.create({
|
|
38
|
+
modal: {
|
|
39
|
+
justifyContent: undefined,
|
|
40
|
+
position: 'relative'
|
|
41
|
+
},
|
|
42
|
+
contentContainer: {
|
|
43
|
+
width: undefined,
|
|
44
|
+
paddingBottom: 0,
|
|
45
|
+
borderTopRightRadius: 0,
|
|
46
|
+
borderTopLeftRadius: 0,
|
|
47
|
+
backgroundColor: 'transparent',
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
right: 8
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export const ChatMoreActionsModal = /*#__PURE__*/React.memo(_ChatMoreActionsModal);
|
|
53
|
+
//# sourceMappingURL=ChatMoreActionsModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","useSelector","interpolate","BottomSheet","useIsAllowedToSendMessage","useModalType","ModalTypes","ChatMoreActionsView","useFooterHeight","useHMSNotificationsHeight","_ChatMoreActionsModal","offset","modalVisibleType","handleModalVisibleType","footerHeight","notificationsHeight","isAllowedToSendMessage","isMessageInputVisible","state","chatWindow","sendTo","dismissModal","DEFAULT","createElement","isVisible","CHAT_MORE_ACTIONS","backdropOpacity","animationIn","animationOut","style","styles","modal","containerStyle","contentContainer","bottom","value","onDismiss","create","justifyContent","undefined","position","width","paddingBottom","borderTopRightRadius","borderTopLeftRadius","backgroundColor","right","ChatMoreActionsModal","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatMoreActionsModal.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,QAAQ,yBAAyB;AAGrD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,yBAAyB,EAAEC,YAAY,QAAQ,kBAAkB;AAC1E,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,eAAe,QAAQ,WAAW;AAC3C,SAASC,yBAAyB,QAAQ,qBAAqB;AAO/D,MAAMC,qBAA0D,GAAGA,CAAC;EAClEC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC,gBAAgB;IAAEC;EAAuB,CAAC,GAAGR,YAAY,CAAC,CAAC;EAEnE,MAAMS,YAAY,GAAGN,eAAe,CAAC,CAAC;EACtC,MAAMO,mBAAmB,GAAGN,yBAAyB,CAAC,CAAC;EACvD,MAAMO,sBAAsB,GAAGZ,yBAAyB,CAAC,CAAC;EAC1D,MAAMa,qBAAqB,GAAGhB,WAAW,CACtCiB,KAAgB,IACfA,KAAK,CAACC,UAAU,CAACC,MAAM,KAAK,IAAI,IAAIJ,sBACxC,CAAC;EAED,MAAMK,YAAY,GAAGA,CAAA,KAAMR,sBAAsB,CAACP,UAAU,CAACgB,OAAO,CAAC;EAErE,oBACEvB,KAAA,CAAAwB,aAAA,CAACpB,WAAW;IACVkB,YAAY,EAAEA,YAAa;IAC3BG,SAAS,EAAEZ,gBAAgB,KAAKN,UAAU,CAACmB,iBAAkB;IAC7DC,eAAe,EAAE,GAAI;IACrBC,WAAW,EAAE,QAAS;IACtBC,YAAY,EAAE,SAAU;IACxBC,KAAK,EAAEC,MAAM,CAACC,KAAM;IACpBC,cAAc,EAAE,CACdF,MAAM,CAACG,gBAAgB,EACvB;MACEC,MAAM,EACJ,CAACvB,MAAM,GACHT,WAAW,CAACS,MAAM,CAACwB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAErB,YAAY,CAAC,CAAC,GACpDA,YAAY,IAChBC,mBAAmB,IAClBE,qBAAqB,GAAG,EAAE,GAAG,CAAC;IACnC,CAAC;EACD,gBAEFlB,KAAA,CAAAwB,aAAA,CAAChB,mBAAmB;IAAC6B,SAAS,EAAEf;EAAa,CAAE,CACpC,CAAC;AAElB,CAAC;AAED,MAAMS,MAAM,GAAG9B,UAAU,CAACqC,MAAM,CAAC;EAC/BN,KAAK,EAAE;IACLO,cAAc,EAAEC,SAAS;IACzBC,QAAQ,EAAE;EACZ,CAAC;EACDP,gBAAgB,EAAE;IAChBQ,KAAK,EAAEF,SAAS;IAChBG,aAAa,EAAE,CAAC;IAChBC,oBAAoB,EAAE,CAAC;IACvBC,mBAAmB,EAAE,CAAC;IACtBC,eAAe,EAAE,aAAa;IAC9BL,QAAQ,EAAE,UAAU;IACpBM,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,oBAAoB,gBAAGhD,KAAK,CAACiD,IAAI,CAACtC,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Pressable, StyleSheet, View } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
|
|
5
|
+
import { hexToRgbA } from '../../utils/theme';
|
|
6
|
+
import { useHMSRoomStyleSheet } from '../../hooks-util';
|
|
7
|
+
import { setChatMoreActionsSheetVisible } from '../../redux/actions';
|
|
8
|
+
import { ChatMoreActionsView } from './ChatMoreActionsView';
|
|
9
|
+
const _ChatMoreActionsSheetView = ({}) => {
|
|
10
|
+
const dispatch = useDispatch();
|
|
11
|
+
const chatMoreActionsSheetVisible = useSelector(state => state.app.chatMoreActionsSheetVisible);
|
|
12
|
+
const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
|
|
13
|
+
backdrop: {
|
|
14
|
+
backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.05)
|
|
15
|
+
}
|
|
16
|
+
}));
|
|
17
|
+
const closeFiltersBottomSheet = () => {
|
|
18
|
+
dispatch(setChatMoreActionsSheetVisible(false));
|
|
19
|
+
};
|
|
20
|
+
if (!chatMoreActionsSheetVisible) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
24
|
+
style: styles.container
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
26
|
+
onPress: closeFiltersBottomSheet,
|
|
27
|
+
style: [styles.backdrop, hmsRoomStyles.backdrop]
|
|
28
|
+
}), /*#__PURE__*/React.createElement(Animated.View, {
|
|
29
|
+
entering: FadeIn.duration(150),
|
|
30
|
+
exiting: FadeOut.duration(150),
|
|
31
|
+
style: styles.contentContainer
|
|
32
|
+
}, /*#__PURE__*/React.createElement(ChatMoreActionsView, null)));
|
|
33
|
+
};
|
|
34
|
+
const styles = StyleSheet.create({
|
|
35
|
+
container: {
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
width: '100%',
|
|
38
|
+
height: '100%',
|
|
39
|
+
zIndex: 1,
|
|
40
|
+
justifyContent: 'flex-end'
|
|
41
|
+
},
|
|
42
|
+
backdrop: {
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
width: '100%',
|
|
45
|
+
height: '100%'
|
|
46
|
+
},
|
|
47
|
+
contentContainer: {
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
top: 60,
|
|
50
|
+
right: 48,
|
|
51
|
+
overflow: 'hidden'
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export const ChatMoreActionsSheetView = /*#__PURE__*/React.memo(_ChatMoreActionsSheetView);
|
|
55
|
+
//# sourceMappingURL=ChatMoreActionsSheetView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Pressable","StyleSheet","View","useDispatch","useSelector","Animated","FadeIn","FadeOut","hexToRgbA","useHMSRoomStyleSheet","setChatMoreActionsSheetVisible","ChatMoreActionsView","_ChatMoreActionsSheetView","dispatch","chatMoreActionsSheetVisible","state","app","hmsRoomStyles","theme","backdrop","backgroundColor","palette","background_dim","closeFiltersBottomSheet","createElement","style","styles","container","onPress","entering","duration","exiting","contentContainer","create","position","width","height","zIndex","justifyContent","top","right","overflow","ChatMoreActionsSheetView","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatMoreActionsSheetView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC1D,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AACtD,OAAOC,QAAQ,IAAIC,MAAM,EAAEC,OAAO,QAAQ,yBAAyB;AAEnE,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,oBAAoB,QAAQ,kBAAkB;AAEvD,SAASC,8BAA8B,QAAQ,qBAAqB;AACpE,SAASC,mBAAmB,QAAQ,uBAAuB;AAI3D,MAAMC,yBAEL,GAAGA,CAAC,CAAC,CAAC,KAAK;EACV,MAAMC,QAAQ,GAAGV,WAAW,CAAC,CAAC;EAC9B,MAAMW,2BAA2B,GAAGV,WAAW,CAC5CW,KAAgB,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