@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
|
@@ -2,12 +2,15 @@ import * as React from '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,CAACY,MAAM,CAA+B,IAAI,CAAC;EACrE,MAAMC,sBAAsB,GAAGJ,yBAAyB,CAAC,CAAC;EAC1D,MAAMK,QAAQ,GAAGT,WAAW,CAAEU,KAAgB,IAAKA,KAAK,CAACD,QAAQ,CAACA,QAAQ,CAAC;EAE3E,MAAME,aAAa,GAAGhB,KAAK,CAACiB,WAAW,CACpCC,IAAgB,IAAKA,IAAI,CAACC,SAAS,EACpC,EACF,CAAC;EAED,MAAMC,WAAW,GAAGpB,KAAK,CAACiB,WAAW,CAAEI,IAA0B,IAAK;IACpE,oBAAOrB,KAAA,CAAAsB,aAAA,CAAChB,WAAW;MAACiB,OAAO,EAAEF,IAAI,CAACH;IAAK,CAAE,CAAC;EAC5C,CAAC,EAAE,EAAE,CAAC;EAEN,oBACElB,KAAA,CAAAsB,aAAA,CAAClB,IAAI;IACHoB,KAAK,EAAE,CACLC,aAAa,CAACC,IAAI,EAClBb,sBAAsB,GAAGY,aAAa,CAACE,WAAW,GAAG,IAAI;EACzD,gBAEF3B,KAAA,CAAAsB,aAAA,CAACd,cAAc,MAAE,CAAC,EAEjBM,QAAQ,CAACc,MAAM,GAAG,CAAC,gBAClB5B,KAAA,CAAAsB,aAAA,CAACrB,SAAS;IACR4B,GAAG,EAAElB,YAAa;IAClBU,IAAI,EAAEP,QAAS;IACfgB,QAAQ,EAAE,IAAK;IACfC,iBAAiB,EAAE,EAAG;IACtBC,4BAA4B,EAAE9B,QAAQ,CAAC+B,EAAE,KAAK;IAC9C;IAAA;IACAC,yBAAyB,EAAC;IAC1B;IAAA;IACAC,UAAU,EAAEf,WAAY;IACxBgB,YAAY,EAAEpB;EAAc,CAC7B,CAAC,gBAEFhB,KAAA,CAAAsB,aAAA,CAACf,UAAU,MAAE,CAEX,CAAC;AAEX,CAAC;AAED,MAAMkB,aAAa,GAAGtB,UAAU,CAACkC,MAAM,CAAC;EACtCX,IAAI,EAAE;IACJY,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE;EACb,CAAC;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"],"m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B,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,KA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,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,IAAKA,KAAK,CAACC,GAAG,CAACF,2BAClC,CAAC;EAED,MAAMG,aAAa,GAAGR,oBAAoB,CAAES,KAAK,KAAM;IACrDC,QAAQ,EAAE;MACRC,eAAe,EACbF,KAAK,CAACG,OAAO,CAACC,cAAc,IAC5Bd,SAAS,CAACU,KAAK,CAACG,OAAO,CAACC,cAAc,EAAE,IAAI;IAChD;EACF,CAAC,CAAC,CAAC;EAEH,MAAMC,uBAAuB,GAAGA,CAAA,KAAM;IACpCV,QAAQ,CAACH,8BAA8B,CAAC,KAAK,CAAC,CAAC;EACjD,CAAC;EAED,IAAI,CAACI,2BAA2B,EAAE;IAChC,OAAO,IAAI;EACb;EAEA,oBACEf,KAAA,CAAAyB,aAAA,CAACtB,IAAI;IAACuB,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAC5B5B,KAAA,CAAAyB,aAAA,CAACxB,SAAS;IACR4B,OAAO,EAAEL,uBAAwB;IACjCE,KAAK,EAAE,CAACC,MAAM,CAACP,QAAQ,EAAEF,aAAa,CAACE,QAAQ;EAAE,CAClD,CAAC,eAEFpB,KAAA,CAAAyB,aAAA,CAACnB,QAAQ,CAACH,IAAI;IACZ2B,QAAQ,EAAEvB,MAAM,CAACwB,QAAQ,CAAC,GAAG,CAAE;IAC/BC,OAAO,EAAExB,OAAO,CAACuB,QAAQ,CAAC,GAAG,CAAE;IAC/BL,KAAK,EAAEC,MAAM,CAACM;EAAiB,gBAE/BjC,KAAA,CAAAyB,aAAA,CAACb,mBAAmB,MAAE,CACT,CACX,CAAC;AAEX,CAAC;AAED,MAAMe,MAAM,GAAGzB,UAAU,CAACgC,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,MAAM,EAAE,CAAC;IACTC,cAAc,EAAE;EAClB,CAAC;EACDnB,QAAQ,EAAE;IACRe,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDJ,gBAAgB,EAAE;IAChBE,QAAQ,EAAE,UAAU;IACpBK,GAAG,EAAE,EAAE;IACPC,KAAK,EAAE,EAAE;IACTC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,wBAAwB,gBAAG3C,KAAK,CAAC4C,IAAI,CAAC/B,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useDispatch } from 'react-redux';
|
|
3
|
+
import { StyleSheet, TouchableOpacity, View, Text } from 'react-native';
|
|
4
|
+
import { PauseCircleIcon } from '../../Icons';
|
|
5
|
+
import { useHMSChatState, useHMSRoomStyleSheet } from '../../hooks-util';
|
|
6
|
+
import { setChatMoreActionsSheetVisible } from '../../redux/actions';
|
|
7
|
+
const _ChatMoreActionsView = ({
|
|
8
|
+
onDismiss
|
|
9
|
+
}) => {
|
|
10
|
+
const dispatch = useDispatch();
|
|
11
|
+
const {
|
|
12
|
+
chatState,
|
|
13
|
+
setChatState
|
|
14
|
+
} = useHMSChatState();
|
|
15
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
16
|
+
container: {
|
|
17
|
+
backgroundColor: theme.palette.surface_default,
|
|
18
|
+
borderColor: theme.palette.border_default
|
|
19
|
+
},
|
|
20
|
+
// --- Button Item Styles ---
|
|
21
|
+
buttonText: {
|
|
22
|
+
color: theme.palette.on_surface_high,
|
|
23
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
24
|
+
}
|
|
25
|
+
}));
|
|
26
|
+
const pauseChatHandler = () => {
|
|
27
|
+
setChatState(!chatState.enabled);
|
|
28
|
+
if (onDismiss) {
|
|
29
|
+
onDismiss();
|
|
30
|
+
} else {
|
|
31
|
+
dispatch(setChatMoreActionsSheetVisible(false));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
35
|
+
style: [styles.container, hmsRoomStyles.container]
|
|
36
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
37
|
+
onPress: pauseChatHandler,
|
|
38
|
+
style: styles.button
|
|
39
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
40
|
+
style: styles.buttonWrapper
|
|
41
|
+
}, chatState.enabled ? /*#__PURE__*/React.createElement(PauseCircleIcon, {
|
|
42
|
+
style: styles.buttonIcon
|
|
43
|
+
}) : null, /*#__PURE__*/React.createElement(Text, {
|
|
44
|
+
style: [styles.buttonText, hmsRoomStyles.buttonText]
|
|
45
|
+
}, chatState.enabled ? 'Pause Chat' : 'Resume Chat'))));
|
|
46
|
+
};
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
container: {
|
|
49
|
+
borderWidth: 1,
|
|
50
|
+
borderRadius: 8,
|
|
51
|
+
overflow: 'hidden'
|
|
52
|
+
},
|
|
53
|
+
// --- Button Item Styles ---
|
|
54
|
+
button: {
|
|
55
|
+
paddingHorizontal: 8,
|
|
56
|
+
paddingVertical: 16
|
|
57
|
+
},
|
|
58
|
+
buttonWrapper: {
|
|
59
|
+
paddingHorizontal: 8,
|
|
60
|
+
flexDirection: 'row',
|
|
61
|
+
alignItems: 'center'
|
|
62
|
+
},
|
|
63
|
+
buttonIcon: {
|
|
64
|
+
width: 20,
|
|
65
|
+
height: 20,
|
|
66
|
+
marginRight: 8
|
|
67
|
+
},
|
|
68
|
+
buttonText: {
|
|
69
|
+
fontSize: 14,
|
|
70
|
+
lineHeight: 20,
|
|
71
|
+
letterSpacing: 0.1
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export const ChatMoreActionsView = /*#__PURE__*/React.memo(_ChatMoreActionsView);
|
|
75
|
+
//# sourceMappingURL=ChatMoreActionsView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useDispatch","StyleSheet","TouchableOpacity","View","Text","PauseCircleIcon","useHMSChatState","useHMSRoomStyleSheet","setChatMoreActionsSheetVisible","_ChatMoreActionsView","onDismiss","dispatch","chatState","setChatState","hmsRoomStyles","theme","typography","container","backgroundColor","palette","surface_default","borderColor","border_default","buttonText","color","on_surface_high","fontFamily","font_family","pauseChatHandler","enabled","createElement","style","styles","onPress","button","buttonWrapper","buttonIcon","create","borderWidth","borderRadius","overflow","paddingHorizontal","paddingVertical","flexDirection","alignItems","width","height","marginRight","fontSize","lineHeight","letterSpacing","ChatMoreActionsView","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatMoreActionsView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,QAAQ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;IAAC4B,KAAK,EAAEC,MAAM,CAACG;EAAc,GAC/BvB,SAAS,CAACiB,OAAO,gBAChB9B,KAAA,CAAA+B,aAAA,CAACzB,eAAe;IAAC0B,KAAK,EAAEC,MAAM,CAACI;EAAW,CAAE,CAAC,GAC3C,IAAI,eACRrC,KAAA,CAAA+B,aAAA,CAAC1B,IAAI;IAAC2B,KAAK,EAAE,CAACC,MAAM,CAACT,UAAU,EAAET,aAAa,CAACS,UAAU;EAAE,GACxDX,SAAS,CAACiB,OAAO,GAAG,YAAY,GAAG,aAChC,CACF,CACU,CACd,CAAC;AAEX,CAAC;AAED,MAAMG,MAAM,GAAG/B,UAAU,CAACoC,MAAM,CAAC;EAC/BpB,SAAS,EAAE;IACTqB,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE,CAAC;IACfC,QAAQ,EAAE;EACZ,CAAC;EACD;EACAN,MAAM,EAAE;IACNO,iBAAiB,EAAE,CAAC;IACpBC,eAAe,EAAE;EACnB,CAAC;EACDP,aAAa,EAAE;IACbM,iBAAiB,EAAE,CAAC;IACpBE,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDR,UAAU,EAAE;IACVS,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,WAAW,EAAE;EACf,CAAC;EACDxB,UAAU,EAAE;IACVyB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,mBAAmB,gBAAGpD,KAAK,CAACqD,IAAI,CAAC3C,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View, StyleSheet, Text } from 'react-native';
|
|
3
|
+
import { useHMSCanDisableChat, useHMSChatState, useHMSRoomStyleSheet } from '../../hooks-util';
|
|
4
|
+
import { HMSPrimaryButton } from '../HMSPrimaryButton';
|
|
5
|
+
import { hexToRgbA } from '../../utils/theme';
|
|
6
|
+
export const _ChatPaused = ({
|
|
7
|
+
insetMode = false,
|
|
8
|
+
style
|
|
9
|
+
}) => {
|
|
10
|
+
const canDisableChat = useHMSCanDisableChat();
|
|
11
|
+
const {
|
|
12
|
+
chatState,
|
|
13
|
+
setChatState
|
|
14
|
+
} = useHMSChatState();
|
|
15
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
16
|
+
container: {
|
|
17
|
+
backgroundColor: insetMode ? theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.64) : theme.palette.surface_default
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
color: theme.palette.on_surface_high,
|
|
21
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
22
|
+
},
|
|
23
|
+
subtitle: {
|
|
24
|
+
color: theme.palette.on_surface_medium,
|
|
25
|
+
fontFamily: `${typography.font_family}-Regular`
|
|
26
|
+
}
|
|
27
|
+
}), [insetMode]);
|
|
28
|
+
const resumeChatHandler = () => {
|
|
29
|
+
setChatState(true);
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
32
|
+
style: [styles.container, hmsRoomStyles.container, style]
|
|
33
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
34
|
+
style: styles.textContainer
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
36
|
+
style: [styles.title, hmsRoomStyles.title]
|
|
37
|
+
}, "Chat Paused"), /*#__PURE__*/React.createElement(Text, {
|
|
38
|
+
numberOfLines: 1,
|
|
39
|
+
style: [styles.subtitle, hmsRoomStyles.subtitle]
|
|
40
|
+
}, "Chat has been paused by", ' ', !chatState.enabled ? chatState.updatedBy.userName : null)), canDisableChat ? /*#__PURE__*/React.createElement(HMSPrimaryButton, {
|
|
41
|
+
title: "Resume",
|
|
42
|
+
loading: false,
|
|
43
|
+
onPress: resumeChatHandler,
|
|
44
|
+
style: styles.resumeBtn,
|
|
45
|
+
wrapWithGestureDetector: true
|
|
46
|
+
}) : null);
|
|
47
|
+
};
|
|
48
|
+
const styles = StyleSheet.create({
|
|
49
|
+
container: {
|
|
50
|
+
flexDirection: 'row',
|
|
51
|
+
paddingVertical: 8,
|
|
52
|
+
paddingRight: 8,
|
|
53
|
+
paddingLeft: 16,
|
|
54
|
+
borderRadius: 8,
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
justifyContent: 'space-between'
|
|
57
|
+
},
|
|
58
|
+
textContainer: {
|
|
59
|
+
flexGrow: 1,
|
|
60
|
+
flexShrink: 1
|
|
61
|
+
},
|
|
62
|
+
title: {
|
|
63
|
+
fontSize: 14,
|
|
64
|
+
lineHeight: 20,
|
|
65
|
+
letterSpacing: 0.1
|
|
66
|
+
},
|
|
67
|
+
subtitle: {
|
|
68
|
+
fontSize: 12,
|
|
69
|
+
lineHeight: 16,
|
|
70
|
+
letterSpacing: 0.4
|
|
71
|
+
},
|
|
72
|
+
resumeBtn: {
|
|
73
|
+
marginLeft: 16
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export const ChatPaused = /*#__PURE__*/React.memo(_ChatPaused);
|
|
77
|
+
//# sourceMappingURL=ChatPaused.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Text","useHMSCanDisableChat","useHMSChatState","useHMSRoomStyleSheet","HMSPrimaryButton","hexToRgbA","_ChatPaused","insetMode","style","canDisableChat","chatState","setChatState","hmsRoomStyles","theme","typography","container","backgroundColor","palette","background_dim","surface_default","title","color","on_surface_high","fontFamily","font_family","subtitle","on_surface_medium","resumeChatHandler","createElement","styles","textContainer","numberOfLines","enabled","updatedBy","userName","loading","onPress","resumeBtn","wrapWithGestureDetector","create","flexDirection","paddingVertical","paddingRight","paddingLeft","borderRadius","alignItems","justifyContent","flexGrow","flexShrink","fontSize","lineHeight","letterSpacing","marginLeft","ChatPaused","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatPaused.tsx"],"mappings":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a,EAAE;EACjB,CAAC;EACDd,SAAS,EAAE;IAAEe,UAAU,EAAE;EAAG;AAC9B,CAAC,CAAC;AAEF,OAAO,MAAMC,UAAU,gBAAGxD,KAAK,CAACyD,IAAI,CAAChD,WAAW,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BottomSheet } from '../BottomSheet';
|
|
3
|
+
import { useHMSRoomStyleSheet, useModalType } from '../../hooks-util';
|
|
4
|
+
import { ModalTypes } from '../../utils/types';
|
|
5
|
+
import { MessageOptionsView } from './MessageOptionsView';
|
|
6
|
+
const _MessageOptionsBottomSheet = () => {
|
|
7
|
+
const {
|
|
8
|
+
modalVisibleType,
|
|
9
|
+
handleModalVisibleType
|
|
10
|
+
} = useModalType();
|
|
11
|
+
const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
|
|
12
|
+
contentContainer: {
|
|
13
|
+
backgroundColor: theme.palette.surface_default
|
|
14
|
+
}
|
|
15
|
+
}));
|
|
16
|
+
const dismissModal = React.useCallback(() => handleModalVisibleType(ModalTypes.DEFAULT), [handleModalVisibleType]);
|
|
17
|
+
return /*#__PURE__*/React.createElement(BottomSheet, {
|
|
18
|
+
dismissModal: dismissModal,
|
|
19
|
+
isVisible: modalVisibleType === ModalTypes.MESSAGE_OPTIONS,
|
|
20
|
+
containerStyle: hmsRoomStyles.contentContainer
|
|
21
|
+
}, /*#__PURE__*/React.createElement(MessageOptionsView, {
|
|
22
|
+
onDismiss: dismissModal
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
export const MessageOptionsBottomSheet = /*#__PURE__*/React.memo(_MessageOptionsBottomSheet);
|
|
26
|
+
//# sourceMappingURL=MessageOptionsBottomSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","BottomSheet","useHMSRoomStyleSheet","useModalType","ModalTypes","MessageOptionsView","_MessageOptionsBottomSheet","modalVisibleType","handleModalVisibleType","hmsRoomStyles","theme","contentContainer","backgroundColor","palette","surface_default","dismissModal","useCallback","DEFAULT","createElement","isVisible","MESSAGE_OPTIONS","containerStyle","onDismiss","MessageOptionsBottomSheet","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/MessageOptionsBottomSheet.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,oBAAoB,EAAEC,YAAY,QAAQ,kBAAkB;AACrE,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,MAAMC,0BAA0B,GAAGA,CAAA,KAAM;EACvC,MAAM;IAAEC,gBAAgB;IAAEC;EAAuB,CAAC,GAAGL,YAAY,CAAC,CAAC;EAEnE,MAAMM,aAAa,GAAGP,oBAAoB,CAAEQ,KAAK,KAAM;IACrDC,gBAAgB,EAAE;MAChBC,eAAe,EAAEF,KAAK,CAACG,OAAO,CAACC;IACjC;EACF,CAAC,CAAC,CAAC;EAEH,MAAMC,YAAY,GAAGf,KAAK,CAACgB,WAAW,CACpC,MAAMR,sBAAsB,CAACJ,UAAU,CAACa,OAAO,CAAC,EAChD,CAACT,sBAAsB,CACzB,CAAC;EAED,oBACER,KAAA,CAAAkB,aAAA,CAACjB,WAAW;IACVc,YAAY,EAAEA,YAAa;IAC3BI,SAAS,EAAEZ,gBAAgB,KAAKH,UAAU,CAACgB,eAAgB;IAC3DC,cAAc,EAAEZ,aAAa,CAACE;EAAiB,gBAE/CX,KAAA,CAAAkB,aAAA,CAACb,kBAAkB;IAACiB,SAAS,EAAEP;EAAa,CAAE,CACnC,CAAC;AAElB,CAAC;AAED,OAAO,MAAMQ,yBAAyB,gBAAGvB,KAAK,CAACwB,IAAI,CAAClB,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Pressable, StyleSheet, View } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
import Animated, { SlideInDown, SlideOutDown } from 'react-native-reanimated';
|
|
5
|
+
import { hexToRgbA } from '../../utils/theme';
|
|
6
|
+
import { useHMSRoomStyleSheet } from '../../hooks-util';
|
|
7
|
+
import { setSelectedMessageForAction } from '../../redux/actions';
|
|
8
|
+
import { MessageOptionsView } from './MessageOptionsView';
|
|
9
|
+
const _MessageOptionsBottomSheetView = ({}) => {
|
|
10
|
+
const dispatch = useDispatch();
|
|
11
|
+
const selectedMessageForAction = useSelector(state => state.app.selectedMessageForAction);
|
|
12
|
+
const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
|
|
13
|
+
backdrop: {
|
|
14
|
+
backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.1)
|
|
15
|
+
},
|
|
16
|
+
contentContainer: {
|
|
17
|
+
backgroundColor: theme.palette.surface_default
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
const closeMessageOptionsBottomSheet = () => {
|
|
21
|
+
dispatch(setSelectedMessageForAction(null));
|
|
22
|
+
};
|
|
23
|
+
if (!selectedMessageForAction) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
27
|
+
style: styles.container
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
29
|
+
onPress: closeMessageOptionsBottomSheet,
|
|
30
|
+
style: [styles.backdrop, hmsRoomStyles.backdrop]
|
|
31
|
+
}), /*#__PURE__*/React.createElement(Animated.View, {
|
|
32
|
+
entering: SlideInDown,
|
|
33
|
+
exiting: SlideOutDown,
|
|
34
|
+
style: [styles.contentContainer, hmsRoomStyles.contentContainer]
|
|
35
|
+
}, /*#__PURE__*/React.createElement(MessageOptionsView, null)));
|
|
36
|
+
};
|
|
37
|
+
const styles = StyleSheet.create({
|
|
38
|
+
container: {
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
width: '100%',
|
|
41
|
+
height: '100%',
|
|
42
|
+
zIndex: 1,
|
|
43
|
+
justifyContent: 'flex-end',
|
|
44
|
+
alignSelf: 'center'
|
|
45
|
+
},
|
|
46
|
+
backdrop: {
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
width: '100%',
|
|
49
|
+
height: '100%'
|
|
50
|
+
},
|
|
51
|
+
contentContainer: {
|
|
52
|
+
width: '100%',
|
|
53
|
+
borderTopLeftRadius: 16,
|
|
54
|
+
borderTopRightRadius: 16
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export const MessageOptionsBottomSheetView = /*#__PURE__*/React.memo(_MessageOptionsBottomSheetView);
|
|
58
|
+
//# sourceMappingURL=MessageOptionsBottomSheetView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Pressable","StyleSheet","View","useDispatch","useSelector","Animated","SlideInDown","SlideOutDown","hexToRgbA","useHMSRoomStyleSheet","setSelectedMessageForAction","MessageOptionsView","_MessageOptionsBottomSheetView","dispatch","selectedMessageForAction","state","app","hmsRoomStyles","theme","backdrop","backgroundColor","palette","background_dim","contentContainer","surface_default","closeMessageOptionsBottomSheet","createElement","style","styles","container","onPress","entering","exiting","create","position","width","height","zIndex","justifyContent","alignSelf","borderTopLeftRadius","borderTopRightRadius","MessageOptionsBottomSheetView","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/MessageOptionsBottomSheetView.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,WAAW,EAAEC,YAAY,QAAQ,yBAAyB;AAE7E,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,oBAAoB,QAAQ,kBAAkB;AAEvD,SAASC,2BAA2B,QAAQ,qBAAqB;AACjE,SAASC,kBAAkB,QAAQ,sBAAsB;A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