@100mslive/react-native-room-kit 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/HMSRoomSetup.js +4 -1
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Chat/assets/chat-on.png +0 -0
- package/lib/commonjs/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/lib/commonjs/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/lib/commonjs/Icons/Chat/index.js +4 -3
- package/lib/commonjs/Icons/Chat/index.js.map +1 -1
- package/lib/commonjs/Icons/NoEntry/assets/no-entry.png +0 -0
- package/lib/commonjs/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/lib/commonjs/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/lib/commonjs/Icons/NoEntry/index.js +33 -0
- package/lib/commonjs/Icons/NoEntry/index.js.map +1 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/lib/commonjs/Icons/PauseCircle/index.js +29 -0
- package/lib/commonjs/Icons/PauseCircle/index.js.map +1 -0
- package/lib/commonjs/Icons/Pin/assets/unpin.png +0 -0
- package/lib/commonjs/Icons/Pin/assets/unpin@2x.png +0 -0
- package/lib/commonjs/Icons/Pin/assets/unpin@3x.png +0 -0
- package/lib/commonjs/Icons/Pin/index.js +2 -1
- package/lib/commonjs/Icons/Pin/index.js.map +1 -1
- package/lib/commonjs/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/commonjs/Icons/Recording/index.js.map +1 -1
- package/lib/commonjs/Icons/index.js +22 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js +36 -0
- package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js +90 -23
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterItem.js +10 -7
- package/lib/commonjs/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterView.js +54 -45
- package/lib/commonjs/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatList.js +13 -6
- package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMessage.js +79 -7
- package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMoreActionsModal.js +61 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsModal.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js +63 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsView.js +83 -0
- package/lib/commonjs/components/Chat/ChatMoreActionsView.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatPaused.js +86 -0
- package/lib/commonjs/components/Chat/ChatPaused.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js +34 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js +66 -0
- package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js.map +1 -0
- package/lib/commonjs/components/Chat/MessageOptionsView.js +188 -0
- package/lib/commonjs/components/Chat/MessageOptionsView.js.map +1 -0
- package/lib/commonjs/components/Chat/PeerBlockedFromChat.js +47 -0
- package/lib/commonjs/components/Chat/PeerBlockedFromChat.js.map +1 -0
- package/lib/commonjs/components/Chat/PinnedMessages.js +297 -0
- package/lib/commonjs/components/Chat/PinnedMessages.js.map +1 -0
- package/lib/commonjs/components/Chat/index.js +4 -4
- package/lib/commonjs/components/Chat/index.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js +21 -2
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js +21 -2
- package/lib/commonjs/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModalContent.js +6 -9
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSView.js +8 -6
- package/lib/commonjs/components/HLSView.js.map +1 -1
- package/lib/commonjs/components/HMSBaseButton.js +10 -2
- package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
- package/lib/commonjs/components/HMSDangerButton.js +4 -2
- package/lib/commonjs/components/HMSDangerButton.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessage.js +86 -1
- package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessageList.js +2 -2
- package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
- package/lib/commonjs/components/HMSHandRaiseNotification.js +6 -3
- package/lib/commonjs/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +5 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveIndicator.js +2 -6
- package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSLiveViewerCount.js +8 -7
- package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -1
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js +2 -1
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js +31 -4
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +9 -2
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js +44 -2
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +2 -6
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSPrimaryButton.js +4 -2
- package/lib/commonjs/components/HMSPrimaryButton.js.map +1 -1
- package/lib/commonjs/components/HMSRecordingIndicator.js +11 -16
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSTerminalErrorNotification.js +6 -2
- package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -1
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/LeaveRoomBottomSheet.js +3 -6
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +3 -0
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/Modals.js +9 -12
- package/lib/commonjs/components/Modals.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +5 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/Preview.js +14 -1
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/PreviewForRoleChangeModal.js +5 -4
- package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +15 -6
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +2 -4
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/hooks-sdk-selectors.js +16 -1
- package/lib/commonjs/hooks-sdk-selectors.js.map +1 -1
- package/lib/commonjs/hooks-sdk.js +27 -1
- package/lib/commonjs/hooks-sdk.js.map +1 -1
- package/lib/commonjs/hooks-util-selectors.js +3 -3
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +408 -61
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +16 -3
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +44 -4
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +41 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/redux/reducers/chatWindow.js +1 -2
- package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -1
- package/lib/commonjs/redux/reducers/message.js +17 -4
- package/lib/commonjs/redux/reducers/message.js.map +1 -1
- package/lib/commonjs/types.js +1 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/types.js +3 -0
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +2 -2
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +5 -2
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Chat/assets/chat-on.png +0 -0
- package/lib/module/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/lib/module/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/lib/module/Icons/Chat/index.js +4 -3
- package/lib/module/Icons/Chat/index.js.map +1 -1
- package/lib/module/Icons/NoEntry/assets/no-entry.png +0 -0
- package/lib/module/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/lib/module/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/lib/module/Icons/NoEntry/index.js +25 -0
- package/lib/module/Icons/NoEntry/index.js.map +1 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/lib/module/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/lib/module/Icons/PauseCircle/index.js +21 -0
- package/lib/module/Icons/PauseCircle/index.js.map +1 -0
- package/lib/module/Icons/Pin/assets/unpin.png +0 -0
- package/lib/module/Icons/Pin/assets/unpin@2x.png +0 -0
- package/lib/module/Icons/Pin/assets/unpin@3x.png +0 -0
- package/lib/module/Icons/Pin/index.js +2 -1
- package/lib/module/Icons/Pin/index.js.map +1 -1
- package/lib/module/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/module/Icons/Recording/index.js.map +1 -1
- package/lib/module/Icons/index.js +2 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheet.js +28 -0
- package/lib/module/components/Chat/ChatFilterBottomSheet.js.map +1 -0
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js +93 -26
- package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterItem.js +11 -8
- package/lib/module/components/Chat/ChatFilterItem.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterView.js +55 -46
- package/lib/module/components/Chat/ChatFilterView.js.map +1 -1
- package/lib/module/components/Chat/ChatList.js +14 -7
- package/lib/module/components/Chat/ChatList.js.map +1 -1
- package/lib/module/components/Chat/ChatMessage.js +81 -9
- package/lib/module/components/Chat/ChatMessage.js.map +1 -1
- package/lib/module/components/Chat/ChatMoreActionsModal.js +53 -0
- package/lib/module/components/Chat/ChatMoreActionsModal.js.map +1 -0
- package/lib/module/components/Chat/ChatMoreActionsSheetView.js +55 -0
- package/lib/module/components/Chat/ChatMoreActionsSheetView.js.map +1 -0
- package/lib/module/components/Chat/ChatMoreActionsView.js +75 -0
- package/lib/module/components/Chat/ChatMoreActionsView.js.map +1 -0
- package/lib/module/components/Chat/ChatPaused.js +77 -0
- package/lib/module/components/Chat/ChatPaused.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheet.js +26 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheet.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheetView.js +58 -0
- package/lib/module/components/Chat/MessageOptionsBottomSheetView.js.map +1 -0
- package/lib/module/components/Chat/MessageOptionsView.js +180 -0
- package/lib/module/components/Chat/MessageOptionsView.js.map +1 -0
- package/lib/module/components/Chat/PeerBlockedFromChat.js +38 -0
- package/lib/module/components/Chat/PeerBlockedFromChat.js.map +1 -0
- package/lib/module/components/Chat/PinnedMessages.js +288 -0
- package/lib/module/components/Chat/PinnedMessages.js.map +1 -0
- package/lib/module/components/Chat/index.js +1 -1
- package/lib/module/components/Chat/index.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js +24 -5
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatView.js +22 -3
- package/lib/module/components/ChatAndParticipants/ChatView.js.map +1 -1
- package/lib/module/components/EndRoomModalContent.js +6 -9
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSView.js +9 -7
- package/lib/module/components/HLSView.js.map +1 -1
- package/lib/module/components/HMSBaseButton.js +10 -2
- package/lib/module/components/HMSBaseButton.js.map +1 -1
- package/lib/module/components/HMSDangerButton.js +4 -2
- package/lib/module/components/HMSDangerButton.js.map +1 -1
- package/lib/module/components/HMSHLSMessage.js +88 -3
- package/lib/module/components/HMSHLSMessage.js.map +1 -1
- package/lib/module/components/HMSHLSMessageList.js +2 -2
- package/lib/module/components/HMSHLSMessageList.js.map +1 -1
- package/lib/module/components/HMSHandRaiseNotification.js +6 -3
- package/lib/module/components/HMSHandRaiseNotification.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js +6 -2
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveIndicator.js +2 -6
- package/lib/module/components/HMSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSLiveViewerCount.js +8 -7
- package/lib/module/components/HMSLiveViewerCount.js.map +1 -1
- package/lib/module/components/HMSLocalScreenshareNotification.js +2 -1
- package/lib/module/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/module/components/HMSNotification.js +32 -5
- package/lib/module/components/HMSNotification.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +9 -2
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSOverlayChatView.js +45 -3
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +2 -6
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSPrimaryButton.js +4 -2
- package/lib/module/components/HMSPrimaryButton.js.map +1 -1
- package/lib/module/components/HMSRecordingIndicator.js +11 -16
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSTerminalErrorNotification.js +6 -2
- package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -1
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/LeaveRoomBottomSheet.js +3 -6
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/module/components/Meeting.js +4 -1
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/Modals.js +10 -13
- package/lib/module/components/Modals.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js +5 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/Preview.js +13 -2
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/PreviewForRoleChangeModal.js +5 -4
- package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +16 -7
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js +3 -5
- package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/hooks-sdk-selectors.js +12 -0
- package/lib/module/hooks-sdk-selectors.js.map +1 -1
- package/lib/module/hooks-sdk.js +23 -1
- package/lib/module/hooks-sdk.js.map +1 -1
- package/lib/module/hooks-util-selectors.js +3 -3
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +398 -62
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +16 -3
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +36 -2
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +41 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/chatWindow.js +1 -2
- package/lib/module/redux/reducers/chatWindow.js.map +1 -1
- package/lib/module/redux/reducers/message.js +17 -4
- package/lib/module/redux/reducers/message.js.map +1 -1
- package/lib/module/types.js +1 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/types.js +3 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js +2 -2
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Chat/index.d.ts +1 -0
- package/lib/typescript/Icons/Chat/index.d.ts.map +1 -1
- package/lib/typescript/Icons/NoEntry/index.d.ts +7 -0
- package/lib/typescript/Icons/NoEntry/index.d.ts.map +1 -0
- package/lib/typescript/Icons/PauseCircle/index.d.ts +7 -0
- package/lib/typescript/Icons/PauseCircle/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Pin/index.d.ts +1 -0
- package/lib/typescript/Icons/Pin/index.d.ts.map +1 -1
- package/lib/typescript/Icons/index.d.ts +2 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheet.d.ts +3 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterItem.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterItem.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterView.d.ts +1 -0
- package/lib/typescript/components/Chat/ChatFilterView.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatList.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatMessage.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatMoreActionsModal.d.ts +7 -0
- package/lib/typescript/components/Chat/ChatMoreActionsModal.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatMoreActionsSheetView.d.ts +6 -0
- package/lib/typescript/components/Chat/ChatMoreActionsSheetView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatMoreActionsView.d.ts +7 -0
- package/lib/typescript/components/Chat/ChatMoreActionsView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatPaused.d.ts +10 -0
- package/lib/typescript/components/Chat/ChatPaused.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheet.d.ts +3 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheetView.d.ts +6 -0
- package/lib/typescript/components/Chat/MessageOptionsBottomSheetView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/MessageOptionsView.d.ts +7 -0
- package/lib/typescript/components/Chat/MessageOptionsView.d.ts.map +1 -0
- package/lib/typescript/components/Chat/PeerBlockedFromChat.d.ts +9 -0
- package/lib/typescript/components/Chat/PeerBlockedFromChat.d.ts.map +1 -0
- package/lib/typescript/components/Chat/PinnedMessages.d.ts +8 -0
- package/lib/typescript/components/Chat/PinnedMessages.d.ts.map +1 -0
- package/lib/typescript/components/Chat/index.d.ts +1 -1
- package/lib/typescript/components/Chat/index.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsHeader.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatView.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HMSBaseButton.d.ts +1 -0
- package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSDangerButton.d.ts +1 -0
- package/lib/typescript/components/HMSDangerButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSMessage.d.ts +1 -1
- package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -1
- package/lib/typescript/components/HMSHandRaiseNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -1
- package/lib/typescript/components/HMSLocalScreenshareNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotification.d.ts +2 -1
- package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSPrimaryButton.d.ts +1 -0
- package/lib/typescript/components/HMSPrimaryButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/HMSTerminalErrorNotification.d.ts.map +1 -1
- package/lib/typescript/components/Header.d.ts.map +1 -1
- package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/Modals.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -1
- package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
- package/lib/typescript/components/Preview.d.ts.map +1 -1
- package/lib/typescript/components/PreviewForRoleChangeModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/hooks-sdk-selectors.d.ts +3 -0
- package/lib/typescript/hooks-sdk-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-sdk.d.ts +4 -0
- package/lib/typescript/hooks-sdk.d.ts.map +1 -1
- package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +35 -3
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +9 -2
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +37 -3
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +7 -2
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +7 -2
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/chatWindow.d.ts +1 -1
- package/lib/typescript/redux/reducers/chatWindow.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +7 -2
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/message.d.ts +3 -2
- package/lib/typescript/redux/reducers/message.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +23 -3
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +3 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +179 -179
- package/src/HMSRoomSetup.tsx +7 -2
- package/src/Icons/Chat/assets/chat-on.png +0 -0
- package/src/Icons/Chat/assets/chat-on@2x.png +0 -0
- package/src/Icons/Chat/assets/chat-on@3x.png +0 -0
- package/src/Icons/Chat/index.tsx +19 -6
- package/src/Icons/NoEntry/assets/no-entry.png +0 -0
- package/src/Icons/NoEntry/assets/no-entry@2x.png +0 -0
- package/src/Icons/NoEntry/assets/no-entry@3x.png +0 -0
- package/src/Icons/NoEntry/index.tsx +33 -0
- package/src/Icons/PauseCircle/assets/pause-circle.png +0 -0
- package/src/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
- package/src/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
- package/src/Icons/PauseCircle/index.tsx +27 -0
- package/src/Icons/Pin/assets/unpin.png +0 -0
- package/src/Icons/Pin/assets/unpin@2x.png +0 -0
- package/src/Icons/Pin/assets/unpin@3x.png +0 -0
- package/src/Icons/Pin/index.tsx +13 -3
- package/src/Icons/Recording/assets/recording-pause.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/src/Icons/Recording/index.tsx +2 -2
- package/src/Icons/index.ts +2 -0
- package/src/components/BottomSheet.tsx +13 -3
- package/src/components/Chat/ChatFilterBottomSheet.tsx +35 -0
- package/src/components/Chat/ChatFilterBottomSheetOpener.tsx +170 -42
- package/src/components/Chat/ChatFilterItem.tsx +8 -4
- package/src/components/Chat/ChatFilterView.tsx +102 -75
- package/src/components/Chat/ChatList.tsx +18 -6
- package/src/components/Chat/ChatMessage.tsx +111 -7
- package/src/components/Chat/ChatMoreActionsModal.tsx +75 -0
- package/src/components/Chat/ChatMoreActionsSheetView.tsx +77 -0
- package/src/components/Chat/ChatMoreActionsView.tsx +84 -0
- package/src/components/Chat/ChatPaused.tsx +103 -0
- package/src/components/Chat/MessageOptionsBottomSheet.tsx +33 -0
- package/src/components/Chat/MessageOptionsBottomSheetView.tsx +82 -0
- package/src/components/Chat/MessageOptionsView.tsx +248 -0
- package/src/components/Chat/PeerBlockedFromChat.tsx +49 -0
- package/src/components/Chat/PinnedMessages.tsx +422 -0
- package/src/components/Chat/index.ts +1 -1
- package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +4 -1
- package/src/components/ChatAndParticipants/ChatAndParticipantsHeader.tsx +48 -12
- package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +9 -1
- package/src/components/ChatAndParticipants/ChatView.tsx +37 -5
- package/src/components/EndRoomModalContent.tsx +11 -14
- package/src/components/Footer.tsx +3 -1
- package/src/components/GridView.tsx +17 -8
- package/src/components/HLSView.tsx +45 -45
- package/src/components/HMSBaseButton.tsx +17 -2
- package/src/components/HMSDangerButton.tsx +3 -0
- package/src/components/HMSHLSMessage.tsx +130 -13
- package/src/components/HMSHLSMessageList.tsx +2 -2
- package/src/components/HMSHandRaiseNotification.tsx +17 -10
- package/src/components/HMSKeyboardAvoidingView.tsx +6 -1
- package/src/components/HMSLiveIndicator.tsx +9 -13
- package/src/components/HMSLiveViewerCount.tsx +21 -20
- package/src/components/HMSLocalScreenshareNotification.tsx +1 -0
- package/src/components/HMSNotification.tsx +56 -13
- package/src/components/HMSNotifications.tsx +12 -2
- package/src/components/HMSOverlayChatView.tsx +74 -17
- package/src/components/HMSPreviewEditName.tsx +3 -1
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +2 -6
- package/src/components/HMSPrimaryButton.tsx +3 -0
- package/src/components/HMSRecordingIndicator.tsx +8 -22
- package/src/components/HMSRoomOptions.tsx +4 -1
- package/src/components/HMSTerminalErrorNotification.tsx +15 -10
- package/src/components/Header.tsx +4 -1
- package/src/components/LeaveRoomBottomSheet.tsx +13 -11
- package/src/components/Meeting.tsx +4 -0
- package/src/components/MeetingScreenContent.tsx +24 -21
- package/src/components/Modals.tsx +23 -25
- package/src/components/Participants/ParticipantsItemOptions.tsx +12 -7
- package/src/components/PeerSettingsModalContent.tsx +3 -1
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +3 -1
- package/src/components/Preview.tsx +15 -2
- package/src/components/PreviewForRoleChangeModal.tsx +4 -3
- package/src/components/RoomSettingsModalContent.tsx +62 -18
- package/src/components/RoomSettingsModalDebugModeContent.tsx +2 -5
- package/src/components/WebrtcView.tsx +6 -2
- package/src/hooks-sdk-selectors.tsx +19 -0
- package/src/hooks-sdk.ts +37 -0
- package/src/hooks-util-selectors.tsx +2 -3
- package/src/hooks-util.ts +578 -87
- package/src/redux/actionTypes.ts +22 -2
- package/src/redux/actions/index.ts +41 -4
- package/src/redux/reducers/appState.ts +54 -5
- package/src/redux/reducers/chatWindow.ts +2 -2
- package/src/redux/reducers/message.ts +20 -6
- package/src/types.ts +35 -6
- package/src/utils/types.ts +3 -0
- package/src/utils.ts +2 -2
- package/lib/commonjs/components/Chat/PinnedMessage.js +0 -81
- package/lib/commonjs/components/Chat/PinnedMessage.js.map +0 -1
- package/lib/module/components/Chat/PinnedMessage.js +0 -72
- package/lib/module/components/Chat/PinnedMessage.js.map +0 -1
- package/lib/typescript/components/Chat/PinnedMessage.d.ts +0 -3
- package/lib/typescript/components/Chat/PinnedMessage.d.ts.map +0 -1
- package/src/components/Chat/PinnedMessage.tsx +0 -89
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactRedux","_reactNativeReanimated","_theme","_hooksUtil","_actions","_MessageOptionsView","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_MessageOptionsBottomSheetView","dispatch","useDispatch","selectedMessageForAction","useSelector","state","app","hmsRoomStyles","useHMSRoomStyleSheet","theme","backdrop","backgroundColor","palette","background_dim","hexToRgbA","contentContainer","surface_default","closeMessageOptionsBottomSheet","setSelectedMessageForAction","createElement","View","style","styles","container","Pressable","onPress","entering","SlideInDown","exiting","SlideOutDown","MessageOptionsView","StyleSheet","create","position","width","height","zIndex","justifyContent","alignSelf","borderTopLeftRadius","borderTopRightRadius","MessageOptionsBottomSheetView","exports","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/MessageOptionsBottomSheetView.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AAA0D,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CA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AAM,CAACZ,QAAQ,EAAEH,aAAa,CAACG,QAAQ;EAAE,CAClD,CAAC,eAEFzC,KAAA,CAAAkD,aAAA,CAAC7C,sBAAA,CAAAW,OAAQ,CAACmC,IAAI;IACZM,QAAQ,EAAEC,kCAAY;IACtBC,OAAO,EAAEC,mCAAa;IACtBR,KAAK,EAAE,CAACC,MAAM,CAACP,gBAAgB,EAAER,aAAa,CAACQ,gBAAgB;EAAE,gBAEjE9C,KAAA,CAAAkD,aAAA,CAACzC,mBAAA,CAAAoD,kBAAkB,MAAE,CACR,CACX,CAAC;AAEX,CAAC;AAED,MAAMR,MAAM,GAAGS,uBAAU,CAACC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,MAAM,EAAE,CAAC;IACTC,cAAc,EAAE,UAAU;IAC1BC,SAAS,EAAE;EACb,CAAC;EACD5B,QAAQ,EAAE;IACRuB,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDpB,gBAAgB,EAAE;IAChBmB,KAAK,EAAE,MAAM;IACbK,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE;EACxB;AACF,CAAC,CAAC;AAEK,MAAMC,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,gBAAGxE,KAAK,CAAC0E,IAAI,CACrD3C,8BACF,CAAC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MessageOptionsView = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactRedux = require("react-redux");
|
|
10
|
+
var _hooksUtil = require("../../hooks-util");
|
|
11
|
+
var _BottomSheet = require("../BottomSheet");
|
|
12
|
+
var _Icons = require("../../Icons");
|
|
13
|
+
var _actions = require("../../redux/actions");
|
|
14
|
+
var _types = require("../../utils/types");
|
|
15
|
+
var _types2 = require("../../types");
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
const _MessageOptionsView = ({
|
|
19
|
+
onDismiss
|
|
20
|
+
}) => {
|
|
21
|
+
const dispatch = (0, _reactRedux.useDispatch)();
|
|
22
|
+
const hmsInstance = (0, _hooksUtil.useHMSInstance)();
|
|
23
|
+
const localPeerPermissions = (0, _reactRedux.useSelector)(state => {
|
|
24
|
+
var _state$hmsStates$loca;
|
|
25
|
+
return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.role) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.permissions;
|
|
26
|
+
});
|
|
27
|
+
const localPeerId = (0, _reactRedux.useSelector)(state => {
|
|
28
|
+
var _state$hmsStates$loca2;
|
|
29
|
+
return (_state$hmsStates$loca2 = state.hmsStates.localPeer) === null || _state$hmsStates$loca2 === void 0 ? void 0 : _state$hmsStates$loca2.peerID;
|
|
30
|
+
});
|
|
31
|
+
const selectedMessageForAction = (0, _reactRedux.useSelector)(state => state.app.selectedMessageForAction);
|
|
32
|
+
const allowPinningMessage = (0, _hooksUtil.useAllowPinningMessage)();
|
|
33
|
+
const isPinned = (0, _hooksUtil.useIsMessagePinned)(selectedMessageForAction);
|
|
34
|
+
const {
|
|
35
|
+
pinMessage,
|
|
36
|
+
unpinMessage
|
|
37
|
+
} = (0, _hooksUtil.useHMSMessagePinningActions)();
|
|
38
|
+
const allowPeerBlocking = (0, _hooksUtil.useAllowBlockingPeerFromChat)();
|
|
39
|
+
const isPeerBlocked = (0, _hooksUtil.useIsPeerBlocked)((selectedMessageForAction === null || selectedMessageForAction === void 0 ? void 0 : selectedMessageForAction.sender) ?? null);
|
|
40
|
+
const {
|
|
41
|
+
blockPeer,
|
|
42
|
+
unblockPeer
|
|
43
|
+
} = (0, _hooksUtil.useBlockPeerActions)();
|
|
44
|
+
const {
|
|
45
|
+
handleModalVisibleType
|
|
46
|
+
} = (0, _hooksUtil.useModalType)();
|
|
47
|
+
const hmsRoomStyle = (0, _hooksUtil.useHMSRoomStyleSheet)(theme => ({
|
|
48
|
+
blockLabel: {
|
|
49
|
+
color: theme.palette.alert_error_default
|
|
50
|
+
},
|
|
51
|
+
blockIcon: {
|
|
52
|
+
tintColor: theme.palette.alert_error_default
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
const closeMessageOptionsBottomSheet = () => {
|
|
56
|
+
if (onDismiss) {
|
|
57
|
+
onDismiss();
|
|
58
|
+
} else {
|
|
59
|
+
dispatch((0, _actions.setSelectedMessageForAction)(null));
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const showError = error => {
|
|
63
|
+
if (!onDismiss) {
|
|
64
|
+
handleModalVisibleType(_types.ModalTypes.DEFAULT);
|
|
65
|
+
}
|
|
66
|
+
dispatch((0, _actions.addNotification)({
|
|
67
|
+
id: Math.random().toString(16).slice(2),
|
|
68
|
+
type: _types2.NotificationTypes.ERROR,
|
|
69
|
+
title: error.message
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
const handleMessagePin = async () => {
|
|
73
|
+
try {
|
|
74
|
+
if (selectedMessageForAction) {
|
|
75
|
+
if (isPinned) {
|
|
76
|
+
await unpinMessage(selectedMessageForAction);
|
|
77
|
+
} else {
|
|
78
|
+
await pinMessage(selectedMessageForAction);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
closeMessageOptionsBottomSheet();
|
|
82
|
+
} catch (error) {
|
|
83
|
+
closeMessageOptionsBottomSheet();
|
|
84
|
+
showError(error);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const handleBlockPeerFromChat = async () => {
|
|
88
|
+
try {
|
|
89
|
+
if (selectedMessageForAction !== null && selectedMessageForAction !== void 0 && selectedMessageForAction.sender) {
|
|
90
|
+
if (isPeerBlocked) {
|
|
91
|
+
await unblockPeer(selectedMessageForAction.sender);
|
|
92
|
+
} else {
|
|
93
|
+
await blockPeer(selectedMessageForAction.sender);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
closeMessageOptionsBottomSheet();
|
|
97
|
+
} catch (error) {
|
|
98
|
+
closeMessageOptionsBottomSheet();
|
|
99
|
+
showError(error);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const handleRemoveParticipant = async () => {
|
|
103
|
+
if (selectedMessageForAction !== null && selectedMessageForAction !== void 0 && selectedMessageForAction.sender) {
|
|
104
|
+
await hmsInstance.removePeer(selectedMessageForAction.sender, 'Removed from chat');
|
|
105
|
+
}
|
|
106
|
+
closeMessageOptionsBottomSheet();
|
|
107
|
+
};
|
|
108
|
+
const hidePinItem = !(selectedMessageForAction && allowPinningMessage);
|
|
109
|
+
const hideBlockItem = !(selectedMessageForAction && selectedMessageForAction.sender && allowPeerBlocking && selectedMessageForAction.sender.peerID !== localPeerId);
|
|
110
|
+
const hideRemoveItem = !(localPeerPermissions !== null && localPeerPermissions !== void 0 && localPeerPermissions.removeOthers && selectedMessageForAction !== null && selectedMessageForAction !== void 0 && selectedMessageForAction.sender && !selectedMessageForAction.sender.isLocal);
|
|
111
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, null, /*#__PURE__*/React.createElement(_BottomSheet.BottomSheet.Header, {
|
|
112
|
+
heading: "Message Options",
|
|
113
|
+
dismissModal: closeMessageOptionsBottomSheet
|
|
114
|
+
}), /*#__PURE__*/React.createElement(_BottomSheet.BottomSheet.Divider, {
|
|
115
|
+
style: styles.headerDivider
|
|
116
|
+
}), hidePinItem ? null : /*#__PURE__*/React.createElement(MessageOptionsItem, {
|
|
117
|
+
label: isPinned ? 'Unpin' : 'Pin',
|
|
118
|
+
icon: /*#__PURE__*/React.createElement(_Icons.PinIcon, {
|
|
119
|
+
type: isPinned ? 'unpin' : 'pin',
|
|
120
|
+
style: styles.icon
|
|
121
|
+
}),
|
|
122
|
+
onPress: handleMessagePin
|
|
123
|
+
}), hideBlockItem ? null : /*#__PURE__*/React.createElement(MessageOptionsItem, {
|
|
124
|
+
label: isPeerBlocked ? 'Unblock from Chat' : 'Block from Chat',
|
|
125
|
+
labelStyle: hmsRoomStyle.blockLabel,
|
|
126
|
+
icon: /*#__PURE__*/React.createElement(_Icons.NoEntryIcon, {
|
|
127
|
+
style: [styles.icon, hmsRoomStyle.blockIcon]
|
|
128
|
+
}),
|
|
129
|
+
onPress: handleBlockPeerFromChat
|
|
130
|
+
}), hideRemoveItem ? null : /*#__PURE__*/React.createElement(MessageOptionsItem, {
|
|
131
|
+
label: "Remove Participant",
|
|
132
|
+
labelStyle: hmsRoomStyle.blockLabel,
|
|
133
|
+
icon: /*#__PURE__*/React.createElement(_Icons.PersonIcon, {
|
|
134
|
+
type: "left",
|
|
135
|
+
style: [styles.icon, hmsRoomStyle.blockIcon]
|
|
136
|
+
}),
|
|
137
|
+
onPress: handleRemoveParticipant
|
|
138
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
139
|
+
style: styles.bottomSpacer
|
|
140
|
+
}));
|
|
141
|
+
};
|
|
142
|
+
const MessageOptionsItem = ({
|
|
143
|
+
label,
|
|
144
|
+
onPress,
|
|
145
|
+
icon = null,
|
|
146
|
+
style,
|
|
147
|
+
labelStyle
|
|
148
|
+
}) => {
|
|
149
|
+
const textStyle = (0, _hooksUtil.useHMSRoomStyle)((theme, typography) => ({
|
|
150
|
+
color: theme.palette.on_surface_high,
|
|
151
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
152
|
+
}));
|
|
153
|
+
return /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
|
|
154
|
+
style: [styles.container, style],
|
|
155
|
+
onPress: onPress
|
|
156
|
+
}, icon, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
157
|
+
style: [styles.text, textStyle, labelStyle]
|
|
158
|
+
}, label));
|
|
159
|
+
};
|
|
160
|
+
const styles = _reactNative.StyleSheet.create({
|
|
161
|
+
// Item styles
|
|
162
|
+
container: {
|
|
163
|
+
paddingHorizontal: 20,
|
|
164
|
+
paddingVertical: 16,
|
|
165
|
+
flexDirection: 'row',
|
|
166
|
+
alignItems: 'center'
|
|
167
|
+
},
|
|
168
|
+
text: {
|
|
169
|
+
fontSize: 14,
|
|
170
|
+
lineHeight: 20,
|
|
171
|
+
letterSpacing: 0.1,
|
|
172
|
+
marginLeft: 8
|
|
173
|
+
},
|
|
174
|
+
// Container styles
|
|
175
|
+
headerDivider: {
|
|
176
|
+
marginVertical: 12
|
|
177
|
+
},
|
|
178
|
+
icon: {
|
|
179
|
+
width: 20,
|
|
180
|
+
height: 20
|
|
181
|
+
},
|
|
182
|
+
bottomSpacer: {
|
|
183
|
+
width: '100%',
|
|
184
|
+
height: 32
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
const MessageOptionsView = exports.MessageOptionsView = /*#__PURE__*/React.memo(_MessageOptionsView);
|
|
188
|
+
//# sourceMappingURL=MessageOptionsView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactRedux","_hooksUtil","_BottomSheet","_Icons","_actions","_types","_types2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_MessageOptionsView","onDismiss","dispatch","useDispatch","hmsInstance","useHMSInstance","localPeerPermissions","useSelector","state","_state$hmsStates$loca","hmsStates","localPeer","role","permissions","localPeerId","_state$hmsStates$loca2","peerID","selectedMessageForAction","app","allowPinningMessage","useAllowPinningMessage","isPinned","useIsMessagePinned","pinMessage","unpinMessage","useHMSMessagePinningActions","allowPeerBlocking","useAllowBlockingPeerFromChat","isPeerBlocked","useIsPeerBlocked","sender","blockPeer","unblockPeer","useBlockPeerActions","handleModalVisibleType","useModalType","hmsRoomStyle","useHMSRoomStyleSheet","theme","blockLabel","color","palette","alert_error_default","blockIcon","tintColor","closeMessageOptionsBottomSheet","setSelectedMessageForAction","showError","error","ModalTypes","DEFAULT","addNotification","id","Math","random","toString","slice","type","NotificationTypes","ERROR","title","message","handleMessagePin","handleBlockPeerFromChat","handleRemoveParticipant","removePeer","hidePinItem","hideBlockItem","hideRemoveItem","removeOthers","isLocal","createElement","View","BottomSheet","Header","heading","dismissModal","Divider","style","styles","headerDivider","MessageOptionsItem","label","icon","PinIcon","onPress","labelStyle","NoEntryIcon","PersonIcon","bottomSpacer","textStyle","useHMSRoomStyle","typography","on_surface_high","fontFamily","font_family","TouchableOpacity","container","Text","text","StyleSheet","create","paddingHorizontal","paddingVertical","flexDirection","alignItems","fontSize","lineHeight","letterSpacing","marginLeft","marginVertical","width","height","MessageOptionsView","exports","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/MessageOptionsView.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAaA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,G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C,CAAC;AAEK,MAAMC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,gBAAGjJ,KAAK,CAACmJ,IAAI,CAACnH,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports._PeerBlockedFromChat = exports.PeerBlockedFromChat = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _hooksUtil = require("../../hooks-util");
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
const _PeerBlockedFromChat = ({
|
|
13
|
+
style
|
|
14
|
+
}) => {
|
|
15
|
+
const hmsRoomStyles = (0, _hooksUtil.useHMSRoomStyleSheet)((theme, typography) => ({
|
|
16
|
+
container: {
|
|
17
|
+
backgroundColor: theme.palette.surface_default
|
|
18
|
+
},
|
|
19
|
+
subtitle: {
|
|
20
|
+
color: theme.palette.on_surface_medium,
|
|
21
|
+
fontFamily: `${typography.font_family}-Regular`
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
25
|
+
style: [styles.container, hmsRoomStyles.container, style]
|
|
26
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
27
|
+
style: [styles.subtitle, hmsRoomStyles.subtitle]
|
|
28
|
+
}, "You've been blocked from sending messages"));
|
|
29
|
+
};
|
|
30
|
+
exports._PeerBlockedFromChat = _PeerBlockedFromChat;
|
|
31
|
+
const styles = _reactNative.StyleSheet.create({
|
|
32
|
+
container: {
|
|
33
|
+
paddingVertical: 8,
|
|
34
|
+
paddingHorizontal: 16,
|
|
35
|
+
borderRadius: 8,
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
justifyContent: 'center'
|
|
38
|
+
},
|
|
39
|
+
subtitle: {
|
|
40
|
+
fontSize: 14,
|
|
41
|
+
lineHeight: 20,
|
|
42
|
+
letterSpacing: 0.25,
|
|
43
|
+
textAlign: 'center'
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const PeerBlockedFromChat = exports.PeerBlockedFromChat = /*#__PURE__*/React.memo(_PeerBlockedFromChat);
|
|
47
|
+
//# sourceMappingURL=PeerBlockedFromChat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_hooksUtil","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_PeerBlockedFromChat","style","hmsRoomStyles","useHMSRoomStyleSheet","theme","typography","container","backgroundColor","palette","surface_default","subtitle","color","on_surface_medium","fontFamily","font_family","createElement","View","styles","Text","exports","StyleSheet","create","paddingVertical","paddingHorizontal","borderRadius","alignItems","justifyContent","fontSize","lineHeight","letterSpacing","textAlign","PeerBlockedFromChat","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/PeerBlockedFromChat.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IA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C,CAACC,KAAK,EAAEC,UAAU,MAAM;IACjEC,SAAS,EAAE;MACTC,eAAe,EAAEH,KAAK,CAACI,OAAO,CAACC;IACjC,CAAC;IACDC,QAAQ,EAAE;MACRC,KAAK,EAAEP,KAAK,CAACI,OAAO,CAACI,iBAAiB;MACtCC,UAAU,EAAG,GAAER,UAAU,CAACS,WAAY;IACxC;EACF,CAAC,CAAC,CAAC;EAEH,oBACExC,KAAA,CAAAyC,aAAA,CAACtC,YAAA,CAAAuC,IAAI;IAACf,KAAK,EAAE,CAACgB,MAAM,CAACX,SAAS,EAAEJ,aAAa,CAACI,SAAS,EAAEL,KAAK;EAAE,gBAC9D3B,KAAA,CAAAyC,aAAA,CAACtC,YAAA,CAAAyC,IAAI;IAACjB,KAAK,EAAE,CAACgB,MAAM,CAACP,QAAQ,EAAER,aAAa,CAACQ,QAAQ;EAAE,GAAC,2CAElD,CACF,CAAC;AAEX,CAAC;AAACS,OAAA,CAAAnB,oBAAA,GAAAA,oBAAA;AAEF,MAAMiB,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/Bf,SAAS,EAAE;IACTgB,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE,EAAE;IACrBC,YAAY,EAAE,CAAC;IACfC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDhB,QAAQ,EAAE;IACRiB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEK,MAAMC,mBAAmB,GAAAZ,OAAA,CAAAY,mBAAA,gBAAGzD,KAAK,CAAC0D,IAAI,CAAChC,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports._PinnedMessages = exports.PinnedMessages = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactRedux = require("react-redux");
|
|
10
|
+
var _flashList = require("@shopify/flash-list");
|
|
11
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
12
|
+
var _hooksUtil = require("../../hooks-util");
|
|
13
|
+
var _Icons = require("../../Icons");
|
|
14
|
+
var _theme = require("../../utils/theme");
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const FLATLIST_VIEWABILITY_CONFIG = {
|
|
18
|
+
waitForInteraction: true,
|
|
19
|
+
itemVisiblePercentThreshold: 90
|
|
20
|
+
};
|
|
21
|
+
const LINE_HEIGHT = 20;
|
|
22
|
+
var NumOfLines = /*#__PURE__*/function (NumOfLines) {
|
|
23
|
+
NumOfLines[NumOfLines["EXPANDED"] = 6] = "EXPANDED";
|
|
24
|
+
NumOfLines[NumOfLines["COLLAPSED"] = 3] = "COLLAPSED";
|
|
25
|
+
return NumOfLines;
|
|
26
|
+
}(NumOfLines || {});
|
|
27
|
+
const Heights = {
|
|
28
|
+
EXAPANDED: NumOfLines.EXPANDED * LINE_HEIGHT + 2,
|
|
29
|
+
COLLAPSED: NumOfLines.COLLAPSED * LINE_HEIGHT + 2
|
|
30
|
+
};
|
|
31
|
+
const _PinnedMessages = ({
|
|
32
|
+
insetMode = false
|
|
33
|
+
}) => {
|
|
34
|
+
const listRef = React.useRef(null);
|
|
35
|
+
const [numOfLinesInText, setNumOfLinesInText] = React.useState({});
|
|
36
|
+
const numOfLinesInTextRef = React.useRef(numOfLinesInText);
|
|
37
|
+
const [listHeight, setListHeight] = React.useState(Heights.COLLAPSED);
|
|
38
|
+
const listHeightRef = React.useRef(Heights.COLLAPSED);
|
|
39
|
+
const [selectedPinnedMessageIndex, setSelectedMessageIndex] = React.useState(0);
|
|
40
|
+
const selectedPinnedMessageIndexRef = React.useRef(0);
|
|
41
|
+
const allowPinningMessage = (0, _hooksUtil.useAllowPinningMessage)();
|
|
42
|
+
const {
|
|
43
|
+
unpinMessage
|
|
44
|
+
} = (0, _hooksUtil.useHMSMessagePinningActions)();
|
|
45
|
+
const pinnedMessages = (0, _reactRedux.useSelector)(state => state.messages.pinnedMessages);
|
|
46
|
+
const hmsRoomStyles = (0, _hooksUtil.useHMSRoomStyleSheet)((theme, typography) => ({
|
|
47
|
+
insetContainer: {
|
|
48
|
+
backgroundColor: theme.palette.background_dim && (0, _theme.hexToRgbA)(theme.palette.background_dim, 0.64)
|
|
49
|
+
},
|
|
50
|
+
pinContainer: {
|
|
51
|
+
backgroundColor: theme.palette.surface_default
|
|
52
|
+
},
|
|
53
|
+
activeMessageContainer: {
|
|
54
|
+
backgroundColor: theme.palette.on_surface_high
|
|
55
|
+
},
|
|
56
|
+
inactiveMessageContainer: {
|
|
57
|
+
backgroundColor: theme.palette.on_surface_low
|
|
58
|
+
},
|
|
59
|
+
closeIcon: {
|
|
60
|
+
tintColor: theme.palette.on_surface_medium
|
|
61
|
+
},
|
|
62
|
+
highlightedText: {
|
|
63
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
64
|
+
color: theme.palette.on_surface_high
|
|
65
|
+
},
|
|
66
|
+
text: {
|
|
67
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
68
|
+
color: theme.palette.on_surface_high
|
|
69
|
+
},
|
|
70
|
+
ellipsis: {
|
|
71
|
+
backgroundColor: theme.palette.background_dim && (0, _theme.hexToRgbA)(theme.palette.background_dim, 0.64)
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
74
|
+
const handleTapOnPinnedMessage = React.useCallback(() => {
|
|
75
|
+
setListHeight(prevListHeight => {
|
|
76
|
+
let updated = prevListHeight > Heights.COLLAPSED ? Heights.COLLAPSED : Heights.EXAPANDED;
|
|
77
|
+
listHeightRef.current = updated;
|
|
78
|
+
return updated;
|
|
79
|
+
});
|
|
80
|
+
}, []);
|
|
81
|
+
const handleUnpinMessagePress = React.useCallback(() => {
|
|
82
|
+
const visiblePinnedMessage = pinnedMessages[selectedPinnedMessageIndexRef.current];
|
|
83
|
+
if (visiblePinnedMessage) {
|
|
84
|
+
if (listHeight > Heights.COLLAPSED) {
|
|
85
|
+
setListHeight(Heights.COLLAPSED);
|
|
86
|
+
listHeightRef.current = Heights.COLLAPSED;
|
|
87
|
+
}
|
|
88
|
+
unpinMessage(visiblePinnedMessage);
|
|
89
|
+
}
|
|
90
|
+
}, [listHeight, pinnedMessages]);
|
|
91
|
+
const _handleViewableItemsChanged = React.useCallback(info => {
|
|
92
|
+
const firstViewable = info.viewableItems[0];
|
|
93
|
+
if (firstViewable !== null && firstViewable !== void 0 && firstViewable.isViewable && typeof firstViewable.index === 'number') {
|
|
94
|
+
let viewableIndexChanged = false;
|
|
95
|
+
setSelectedMessageIndex(currIndex => {
|
|
96
|
+
if (currIndex !== firstViewable.index) {
|
|
97
|
+
viewableIndexChanged = true;
|
|
98
|
+
}
|
|
99
|
+
if (firstViewable.index !== null) {
|
|
100
|
+
return firstViewable.index;
|
|
101
|
+
}
|
|
102
|
+
return currIndex;
|
|
103
|
+
});
|
|
104
|
+
selectedPinnedMessageIndexRef.current = firstViewable.index;
|
|
105
|
+
const visiblePinnedMessage = pinnedMessages[selectedPinnedMessageIndexRef.current];
|
|
106
|
+
if (viewableIndexChanged && listHeightRef.current > Heights.COLLAPSED && visiblePinnedMessage) {
|
|
107
|
+
const visibleMessageExpandable = numOfLinesInTextRef.current[visiblePinnedMessage.id];
|
|
108
|
+
if (!visibleMessageExpandable) {
|
|
109
|
+
setListHeight(Heights.COLLAPSED);
|
|
110
|
+
listHeightRef.current = Heights.COLLAPSED;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}, [pinnedMessages]);
|
|
115
|
+
const _renderItem = React.useCallback(data => {
|
|
116
|
+
const numOfLines = numOfLinesInText[data.item.id];
|
|
117
|
+
const [sender, text] = data.item.text.split(':');
|
|
118
|
+
return /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
|
|
119
|
+
activeOpacity: 0.8,
|
|
120
|
+
disabled: typeof numOfLines !== 'number',
|
|
121
|
+
onPress: typeof numOfLines === 'number' ? handleTapOnPinnedMessage : undefined,
|
|
122
|
+
style: {
|
|
123
|
+
height: listHeight,
|
|
124
|
+
justifyContent: 'center',
|
|
125
|
+
overflow: _reactNative.Platform.OS === 'ios' && typeof numOfLines !== 'number' ? 'scroll' : 'hidden'
|
|
126
|
+
}
|
|
127
|
+
}, listHeight >= Heights.EXAPANDED && typeof numOfLines === 'number' && numOfLines > NumOfLines.EXPANDED ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
128
|
+
nestedScrollEnabled: true,
|
|
129
|
+
contentContainerStyle: {
|
|
130
|
+
paddingBottom: 12
|
|
131
|
+
}
|
|
132
|
+
}, /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
|
|
133
|
+
activeOpacity: 0.8,
|
|
134
|
+
onPress: handleTapOnPinnedMessage
|
|
135
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
136
|
+
onTextLayout: ({
|
|
137
|
+
nativeEvent
|
|
138
|
+
}) => {
|
|
139
|
+
if (nativeEvent.lines.length > NumOfLines.COLLAPSED) {
|
|
140
|
+
setNumOfLinesInText(prev => {
|
|
141
|
+
const currentValue = prev[data.item.id];
|
|
142
|
+
let updated;
|
|
143
|
+
if (typeof currentValue === 'number' && currentValue === nativeEvent.lines.length) {
|
|
144
|
+
updated = prev;
|
|
145
|
+
} else {
|
|
146
|
+
updated = {
|
|
147
|
+
...prev,
|
|
148
|
+
[data.item.id]: nativeEvent.lines.length
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
numOfLinesInTextRef.current = updated;
|
|
152
|
+
return updated;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
style: [styles.text, hmsRoomStyles.text],
|
|
157
|
+
numberOfLines: listHeight === Heights.COLLAPSED && typeof numOfLines === 'number' ? 3 : undefined
|
|
158
|
+
}, text ? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
159
|
+
style: hmsRoomStyles.highlightedText
|
|
160
|
+
}, sender, ":", ' ') : null, text ?? sender))) : /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
161
|
+
onTextLayout: ({
|
|
162
|
+
nativeEvent
|
|
163
|
+
}) => {
|
|
164
|
+
if (nativeEvent.lines.length > NumOfLines.COLLAPSED) {
|
|
165
|
+
setNumOfLinesInText(prev => {
|
|
166
|
+
const currentValue = prev[data.item.id];
|
|
167
|
+
let updated;
|
|
168
|
+
if (typeof currentValue === 'number' && currentValue === nativeEvent.lines.length) {
|
|
169
|
+
updated = prev;
|
|
170
|
+
} else {
|
|
171
|
+
updated = {
|
|
172
|
+
...prev,
|
|
173
|
+
[data.item.id]: nativeEvent.lines.length
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
numOfLinesInTextRef.current = updated;
|
|
177
|
+
return updated;
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
style: [styles.text, hmsRoomStyles.text],
|
|
182
|
+
numberOfLines: listHeight === Heights.COLLAPSED && typeof numOfLines === 'number' ? 3 : undefined
|
|
183
|
+
}, text ? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
184
|
+
style: hmsRoomStyles.highlightedText
|
|
185
|
+
}, sender, ": ") : null, text ?? sender));
|
|
186
|
+
}, [listHeight, numOfLinesInText, handleTapOnPinnedMessage]);
|
|
187
|
+
const _keyExtractor = React.useCallback(item => item.id, []);
|
|
188
|
+
const _onContentSizeChange = React.useCallback((_w, _h) => {
|
|
189
|
+
var _listRef$current;
|
|
190
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.scrollToOffset({
|
|
191
|
+
offset: listHeight * selectedPinnedMessageIndexRef.current,
|
|
192
|
+
animated: false
|
|
193
|
+
});
|
|
194
|
+
}, [listHeight]);
|
|
195
|
+
const tapGesture = React.useMemo(() => _reactNativeGestureHandler.Gesture.Tap(), []);
|
|
196
|
+
const extraData = React.useMemo(() => [listHeight, numOfLinesInText, pinnedMessages], [listHeight, numOfLinesInText, pinnedMessages]);
|
|
197
|
+
if (pinnedMessages.length <= 0) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
return /*#__PURE__*/React.createElement(_reactNativeGestureHandler.GestureDetector, {
|
|
201
|
+
gesture: tapGesture
|
|
202
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
203
|
+
style: [insetMode ? styles.insetContainer : styles.container, insetMode ? hmsRoomStyles.insetContainer : null]
|
|
204
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
205
|
+
style: [styles.pinContainer, insetMode ? {
|
|
206
|
+
paddingRight: 0
|
|
207
|
+
} : hmsRoomStyles.pinContainer, {
|
|
208
|
+
height: listHeight + 16
|
|
209
|
+
}]
|
|
210
|
+
}, pinnedMessages.length > 1 ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
211
|
+
style: {
|
|
212
|
+
marginRight: 8,
|
|
213
|
+
flexDirection: 'column'
|
|
214
|
+
}
|
|
215
|
+
}, pinnedMessages.map((message, idx) => {
|
|
216
|
+
const isFirst = idx === 0;
|
|
217
|
+
const isSelected = selectedPinnedMessageIndex === idx;
|
|
218
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
219
|
+
key: message.id
|
|
220
|
+
}, isFirst ? null : /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
221
|
+
style: [{
|
|
222
|
+
height: 3,
|
|
223
|
+
width: 2
|
|
224
|
+
}]
|
|
225
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
226
|
+
style: [{
|
|
227
|
+
width: 2,
|
|
228
|
+
flexGrow: 1,
|
|
229
|
+
borderRadius: 16
|
|
230
|
+
}, isSelected ? hmsRoomStyles.activeMessageContainer : hmsRoomStyles.inactiveMessageContainer]
|
|
231
|
+
}));
|
|
232
|
+
})) : null, /*#__PURE__*/React.createElement(_flashList.FlashList, {
|
|
233
|
+
ref: listRef,
|
|
234
|
+
data: pinnedMessages,
|
|
235
|
+
extraData: extraData,
|
|
236
|
+
showsVerticalScrollIndicator: false,
|
|
237
|
+
pagingEnabled: true,
|
|
238
|
+
nestedScrollEnabled: true,
|
|
239
|
+
keyboardShouldPersistTaps: "always",
|
|
240
|
+
renderItem: _renderItem,
|
|
241
|
+
keyExtractor: _keyExtractor,
|
|
242
|
+
onContentSizeChange: _onContentSizeChange,
|
|
243
|
+
estimatedItemSize: 40,
|
|
244
|
+
onViewableItemsChanged: _handleViewableItemsChanged,
|
|
245
|
+
viewabilityConfig: FLATLIST_VIEWABILITY_CONFIG
|
|
246
|
+
})), allowPinningMessage ? /*#__PURE__*/React.createElement(_reactNative.TouchableOpacity, {
|
|
247
|
+
style: {
|
|
248
|
+
marginLeft: 8
|
|
249
|
+
},
|
|
250
|
+
onPress: handleUnpinMessagePress
|
|
251
|
+
}, /*#__PURE__*/React.createElement(_Icons.PinIcon, {
|
|
252
|
+
type: "unpin",
|
|
253
|
+
style: [styles.icon, hmsRoomStyles.closeIcon]
|
|
254
|
+
})) : null));
|
|
255
|
+
};
|
|
256
|
+
exports._PinnedMessages = _PinnedMessages;
|
|
257
|
+
const PinnedMessages = exports.PinnedMessages = /*#__PURE__*/React.memo(_PinnedMessages);
|
|
258
|
+
const styles = _reactNative.StyleSheet.create({
|
|
259
|
+
container: {
|
|
260
|
+
flexDirection: 'row',
|
|
261
|
+
alignItems: 'center',
|
|
262
|
+
marginTop: 8
|
|
263
|
+
},
|
|
264
|
+
insetContainer: {
|
|
265
|
+
flexDirection: 'row',
|
|
266
|
+
alignItems: 'center',
|
|
267
|
+
marginTop: 8,
|
|
268
|
+
marginHorizontal: 8,
|
|
269
|
+
marginBottom: 4,
|
|
270
|
+
borderRadius: 8,
|
|
271
|
+
paddingRight: 8
|
|
272
|
+
},
|
|
273
|
+
pinContainer: {
|
|
274
|
+
flexDirection: 'row',
|
|
275
|
+
flexGrow: 1,
|
|
276
|
+
flexShrink: 1,
|
|
277
|
+
borderRadius: 8,
|
|
278
|
+
paddingVertical: 8,
|
|
279
|
+
paddingRight: 8,
|
|
280
|
+
paddingLeft: 8
|
|
281
|
+
},
|
|
282
|
+
textWrapper: {
|
|
283
|
+
maxHeight: 50,
|
|
284
|
+
marginHorizontal: 8
|
|
285
|
+
},
|
|
286
|
+
icon: {
|
|
287
|
+
width: 20,
|
|
288
|
+
height: 20
|
|
289
|
+
// marginTop: 8,
|
|
290
|
+
},
|
|
291
|
+
text: {
|
|
292
|
+
fontSize: 14,
|
|
293
|
+
lineHeight: 20,
|
|
294
|
+
letterSpacing: 0.25
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
//# sourceMappingURL=PinnedMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactRedux","_flashList","_reactNativeGestureHandler","_hooksUtil","_Icons","_theme","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","FLATLIST_VIEWABILITY_CONFIG","waitForInteraction","itemVisiblePercentThreshold","LINE_HEIGHT","NumOfLines","Heights","EXAPANDED","EXPANDED","COLLAPSED","_PinnedMessages","insetMode","listRef","useRef","numOfLinesInText","setNumOfLinesInText","useState","numOfLinesInTextRef","listHeight","setListHeight","listHeightRef","selectedPinnedMessageIndex","setSelectedMessageIndex","selectedPinnedMessageIndexRef","allowPinningMessage","useAllowPinningMessage","unpinMessage","useHMSMessagePinningActions","pinnedMessages","useSelector","state","messages","hmsRoomStyles","useHMSRoomStyleSheet","theme","typography","insetContainer","backgroundColor","palette","background_dim","hexToRgbA","pinContainer","surface_default","activeMessageContainer","on_surface_high","inactiveMessageContainer","on_surface_low","closeIcon","tintColor","on_surface_medium","highlightedText","fontFamily","font_family","color","text","ellipsis","handleTapOnPinnedMessage","useCallback","prevListHeight","updated","current","handleUnpinMessagePress","visiblePinnedMessage","_handleViewableItemsChanged","info","firstViewable","viewableItems","isViewable","index","viewableIndexChanged","currIndex","visibleMessageExpandable","id","_renderItem","data","numOfLines","item","sender","split","createElement","TouchableOpacity","activeOpacity","disabled","onPress","undefined","style","height","justifyContent","overflow","Platform","OS","ScrollView","nestedScrollEnabled","contentContainerStyle","paddingBottom","Text","onTextLayout","nativeEvent","lines","length","prev","currentValue","styles","numberOfLines","_keyExtractor","_onContentSizeChange","_w","_h","_listRef$current","scrollToOffset","offset","animated","tapGesture","useMemo","Gesture","Tap","extraData","GestureDetector","gesture","View","container","paddingRight","marginRight","flexDirection","map","message","idx","isFirst","isSelected","Fragment","key","width","flexGrow","borderRadius","FlashList","ref","showsVerticalScrollIndicator","pagingEnabled","keyboardShouldPersistTaps","renderItem","keyExtractor","onContentSizeChange","estimatedItemSize","onViewableItemsChanged","viewabilityConfig","marginLeft","PinIcon","type","icon","exports","PinnedMessages","memo","StyleSheet","create","alignItems","marginTop","marginHorizontal","marginBottom","flexShrink","paddingVertical","paddingLeft","textWrapper","maxHeight","fontSize","lineHeight","letterSpacing"],"sourceRoot":"../../../../src","sources":["components/Chat/PinnedMessages.tsx"],"mappings":";;;;;;AAAA,IAA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Q,EAAE,CAAC;IACX0B,UAAU,EAAE,CAAC;IACbzB,YAAY,EAAE,CAAC;IACf0B,eAAe,EAAE,CAAC;IAClBtC,YAAY,EAAE,CAAC;IACfuC,WAAW,EAAE;EACf,CAAC;EACDC,WAAW,EAAE;IACXC,SAAS,EAAE,EAAE;IACbN,gBAAgB,EAAE;EACpB,CAAC;EACDR,IAAI,EAAE;IACJjB,KAAK,EAAE,EAAE;IACT7C,MAAM,EAAE;IACR;EACF,CAAC;EACDhC,IAAI,EAAE;IACJ6G,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"}
|
|
@@ -36,14 +36,14 @@ Object.keys(_ChatMessage).forEach(function (key) {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
-
var
|
|
40
|
-
Object.keys(
|
|
39
|
+
var _PinnedMessages = require("./PinnedMessages");
|
|
40
|
+
Object.keys(_PinnedMessages).forEach(function (key) {
|
|
41
41
|
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] ===
|
|
42
|
+
if (key in exports && exports[key] === _PinnedMessages[key]) return;
|
|
43
43
|
Object.defineProperty(exports, key, {
|
|
44
44
|
enumerable: true,
|
|
45
45
|
get: function () {
|
|
46
|
-
return
|
|
46
|
+
return _PinnedMessages[key];
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ChatBanner","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_ChatList","_ChatMessage","
|
|
1
|
+
{"version":3,"names":["_ChatBanner","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_ChatList","_ChatMessage","_PinnedMessages"],"sourceRoot":"../../../../src","sources":["components/Chat/index.ts"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAA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