@100mslive/react-native-room-kit 1.0.6 → 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 +1 -1
- 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/AnimatedFooter.js +5 -3
- package/lib/commonjs/components/AnimatedFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHLSFooter.js +4 -9
- package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHeader.js +17 -5
- package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js +11 -5
- 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/ChatFilterBottomSheetView.js +2 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.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 +11 -10
- 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 +8 -4
- 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/DisplayView.js +4 -11
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModal.js +1 -2
- package/lib/commonjs/components/EndRoomModal.js.map +1 -1
- package/lib/commonjs/components/EndRoomModalContent.js +6 -8
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js +12 -18
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/GridView.js +31 -1
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSFooter.js +3 -1
- package/lib/commonjs/components/HLSFooter.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.android.js +2 -0
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +8 -2
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveIndicator.js +5 -60
- package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSLiveViewerCount.js +79 -0
- package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -0
- 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 +55 -4
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js +6 -1
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +2 -5
- 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 +12 -7
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js +3 -6
- 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 +11 -3
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/LeaveRoomBottomSheet.js +5 -11
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +5 -13
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +46 -48
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/MiniView.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/OverlayedViews.js +6 -2
- package/lib/commonjs/components/OverlayedViews.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 +2 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +2 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/PressableIcon.js +6 -2
- package/lib/commonjs/components/PressableIcon.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 +34 -9
- 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 +37 -2
- 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 -2
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +466 -89
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +18 -3
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +51 -4
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +49 -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 +6 -3
- 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 +1 -1
- 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/AnimatedFooter.js +5 -3
- package/lib/module/components/AnimatedFooter.js.map +1 -1
- package/lib/module/components/AnimatedHLSFooter.js +5 -10
- package/lib/module/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/module/components/AnimatedHeader.js +18 -6
- package/lib/module/components/AnimatedHeader.js.map +1 -1
- package/lib/module/components/BottomSheet.js +12 -6
- 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/ChatFilterBottomSheetView.js +2 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.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 +13 -12
- 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 +9 -5
- 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/DisplayView.js +5 -12
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/EndRoomModal.js +1 -2
- package/lib/module/components/EndRoomModal.js.map +1 -1
- package/lib/module/components/EndRoomModalContent.js +6 -8
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js +12 -18
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/GridView.js +32 -2
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSFooter.js +3 -1
- package/lib/module/components/HLSFooter.js.map +1 -1
- package/lib/module/components/HLSView.js +8 -6
- 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.android.js +2 -3
- package/lib/module/components/HMSKeyboardAvoidingView.android.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js +9 -3
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveIndicator.js +8 -63
- package/lib/module/components/HMSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSLiveViewerCount.js +71 -0
- package/lib/module/components/HMSLiveViewerCount.js.map +1 -0
- 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 +56 -5
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSPreviewEditName.js +6 -1
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +2 -5
- 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 +12 -7
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js +3 -6
- 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 +10 -3
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/LeaveRoomBottomSheet.js +5 -11
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/module/components/Meeting.js +6 -14
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +51 -53
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/MiniView.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/OverlayedViews.js +6 -2
- package/lib/module/components/OverlayedViews.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 +2 -1
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +2 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/PressableIcon.js +6 -2
- package/lib/module/components/PressableIcon.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 +36 -11
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js +2 -4
- package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/module/components/WebrtcView.js +37 -2
- 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 -2
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +455 -90
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +18 -3
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +42 -2
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +49 -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 +5 -2
- 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/Recording/index.d.ts +1 -1
- package/lib/typescript/Icons/Recording/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/AnimatedFooter.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHLSFooter.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHeader.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet.d.ts +1 -0
- 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/ChatFilterBottomSheetView.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/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModal.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts +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/HLSView.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.android.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +2 -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 +3 -0
- package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -0
- 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 +5 -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/HMSTerminalErrorNotification.d.ts.map +1 -1
- package/lib/typescript/components/Header.d.ts +1 -0
- 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/OverlayedViews.d.ts +4 -1
- package/lib/typescript/components/OverlayedViews.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/PressableIcon.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 +2 -0
- 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 +39 -3
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +10 -2
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +43 -3
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +8 -2
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +8 -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 +8 -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 +4 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/HMSRoomSetup.tsx +8 -3
- 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 +4 -2
- package/src/Icons/index.ts +2 -0
- package/src/components/AnimatedFooter.tsx +9 -3
- package/src/components/AnimatedHLSFooter.tsx +8 -17
- package/src/components/AnimatedHeader.tsx +16 -5
- package/src/components/BottomSheet.tsx +21 -5
- package/src/components/Chat/ChatFilterBottomSheet.tsx +35 -0
- package/src/components/Chat/ChatFilterBottomSheetOpener.tsx +170 -42
- package/src/components/Chat/ChatFilterBottomSheetView.tsx +1 -0
- 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 +15 -7
- package/src/components/ChatAndParticipants/ChatAndParticipantsHeader.tsx +48 -12
- package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +14 -5
- package/src/components/ChatAndParticipants/ChatView.tsx +37 -5
- package/src/components/DisplayView.tsx +4 -13
- package/src/components/EndRoomModal.tsx +0 -1
- package/src/components/EndRoomModalContent.tsx +11 -13
- package/src/components/Footer.tsx +20 -23
- package/src/components/GridView.tsx +44 -8
- package/src/components/HLSFooter.tsx +1 -1
- package/src/components/HLSView.tsx +45 -44
- 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.android.tsx +1 -5
- package/src/components/HMSKeyboardAvoidingView.tsx +12 -4
- package/src/components/HMSLiveIndicator.tsx +14 -83
- package/src/components/HMSLiveViewerCount.tsx +91 -0
- 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 +91 -18
- package/src/components/HMSPreviewEditName.tsx +12 -1
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +2 -5
- package/src/components/HMSPrimaryButton.tsx +3 -0
- package/src/components/HMSRecordingIndicator.tsx +10 -7
- package/src/components/HMSRoomOptions.tsx +4 -4
- package/src/components/HMSTerminalErrorNotification.tsx +15 -10
- package/src/components/Header.tsx +17 -3
- package/src/components/LeaveRoomBottomSheet.tsx +14 -15
- package/src/components/Meeting.tsx +6 -19
- package/src/components/MeetingScreenContent.tsx +70 -64
- package/src/components/MiniView.tsx +4 -4
- package/src/components/Modals.tsx +23 -25
- package/src/components/OverlayedViews.tsx +6 -3
- package/src/components/Participants/ParticipantsItemOptions.tsx +12 -7
- package/src/components/PeerSettingsModalContent.tsx +4 -1
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +4 -1
- package/src/components/PressableIcon.tsx +22 -17
- package/src/components/Preview.tsx +15 -2
- package/src/components/PreviewForRoleChangeModal.tsx +4 -3
- package/src/components/RoomSettingsModalContent.tsx +74 -14
- package/src/components/RoomSettingsModalDebugModeContent.tsx +2 -4
- package/src/components/WebrtcView.tsx +63 -22
- package/src/hooks-sdk-selectors.tsx +19 -0
- package/src/hooks-sdk.ts +37 -0
- package/src/hooks-util-selectors.tsx +2 -2
- package/src/hooks-util.ts +639 -131
- package/src/redux/actionTypes.ts +25 -2
- package/src/redux/actions/index.ts +46 -4
- package/src/redux/reducers/appState.ts +60 -3
- 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 +15 -3
- 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,288 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View, StyleSheet, Text, TouchableOpacity, ScrollView, Platform } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { FlashList } from '@shopify/flash-list';
|
|
5
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
6
|
+
import { useAllowPinningMessage, useHMSMessagePinningActions, useHMSRoomStyleSheet } from '../../hooks-util';
|
|
7
|
+
import { PinIcon } from '../../Icons';
|
|
8
|
+
import { hexToRgbA } from '../../utils/theme';
|
|
9
|
+
const FLATLIST_VIEWABILITY_CONFIG = {
|
|
10
|
+
waitForInteraction: true,
|
|
11
|
+
itemVisiblePercentThreshold: 90
|
|
12
|
+
};
|
|
13
|
+
const LINE_HEIGHT = 20;
|
|
14
|
+
var NumOfLines = /*#__PURE__*/function (NumOfLines) {
|
|
15
|
+
NumOfLines[NumOfLines["EXPANDED"] = 6] = "EXPANDED";
|
|
16
|
+
NumOfLines[NumOfLines["COLLAPSED"] = 3] = "COLLAPSED";
|
|
17
|
+
return NumOfLines;
|
|
18
|
+
}(NumOfLines || {});
|
|
19
|
+
const Heights = {
|
|
20
|
+
EXAPANDED: NumOfLines.EXPANDED * LINE_HEIGHT + 2,
|
|
21
|
+
COLLAPSED: NumOfLines.COLLAPSED * LINE_HEIGHT + 2
|
|
22
|
+
};
|
|
23
|
+
export const _PinnedMessages = ({
|
|
24
|
+
insetMode = false
|
|
25
|
+
}) => {
|
|
26
|
+
const listRef = React.useRef(null);
|
|
27
|
+
const [numOfLinesInText, setNumOfLinesInText] = React.useState({});
|
|
28
|
+
const numOfLinesInTextRef = React.useRef(numOfLinesInText);
|
|
29
|
+
const [listHeight, setListHeight] = React.useState(Heights.COLLAPSED);
|
|
30
|
+
const listHeightRef = React.useRef(Heights.COLLAPSED);
|
|
31
|
+
const [selectedPinnedMessageIndex, setSelectedMessageIndex] = React.useState(0);
|
|
32
|
+
const selectedPinnedMessageIndexRef = React.useRef(0);
|
|
33
|
+
const allowPinningMessage = useAllowPinningMessage();
|
|
34
|
+
const {
|
|
35
|
+
unpinMessage
|
|
36
|
+
} = useHMSMessagePinningActions();
|
|
37
|
+
const pinnedMessages = useSelector(state => state.messages.pinnedMessages);
|
|
38
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
39
|
+
insetContainer: {
|
|
40
|
+
backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.64)
|
|
41
|
+
},
|
|
42
|
+
pinContainer: {
|
|
43
|
+
backgroundColor: theme.palette.surface_default
|
|
44
|
+
},
|
|
45
|
+
activeMessageContainer: {
|
|
46
|
+
backgroundColor: theme.palette.on_surface_high
|
|
47
|
+
},
|
|
48
|
+
inactiveMessageContainer: {
|
|
49
|
+
backgroundColor: theme.palette.on_surface_low
|
|
50
|
+
},
|
|
51
|
+
closeIcon: {
|
|
52
|
+
tintColor: theme.palette.on_surface_medium
|
|
53
|
+
},
|
|
54
|
+
highlightedText: {
|
|
55
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
56
|
+
color: theme.palette.on_surface_high
|
|
57
|
+
},
|
|
58
|
+
text: {
|
|
59
|
+
fontFamily: `${typography.font_family}-Regular`,
|
|
60
|
+
color: theme.palette.on_surface_high
|
|
61
|
+
},
|
|
62
|
+
ellipsis: {
|
|
63
|
+
backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.64)
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
const handleTapOnPinnedMessage = React.useCallback(() => {
|
|
67
|
+
setListHeight(prevListHeight => {
|
|
68
|
+
let updated = prevListHeight > Heights.COLLAPSED ? Heights.COLLAPSED : Heights.EXAPANDED;
|
|
69
|
+
listHeightRef.current = updated;
|
|
70
|
+
return updated;
|
|
71
|
+
});
|
|
72
|
+
}, []);
|
|
73
|
+
const handleUnpinMessagePress = React.useCallback(() => {
|
|
74
|
+
const visiblePinnedMessage = pinnedMessages[selectedPinnedMessageIndexRef.current];
|
|
75
|
+
if (visiblePinnedMessage) {
|
|
76
|
+
if (listHeight > Heights.COLLAPSED) {
|
|
77
|
+
setListHeight(Heights.COLLAPSED);
|
|
78
|
+
listHeightRef.current = Heights.COLLAPSED;
|
|
79
|
+
}
|
|
80
|
+
unpinMessage(visiblePinnedMessage);
|
|
81
|
+
}
|
|
82
|
+
}, [listHeight, pinnedMessages]);
|
|
83
|
+
const _handleViewableItemsChanged = React.useCallback(info => {
|
|
84
|
+
const firstViewable = info.viewableItems[0];
|
|
85
|
+
if (firstViewable !== null && firstViewable !== void 0 && firstViewable.isViewable && typeof firstViewable.index === 'number') {
|
|
86
|
+
let viewableIndexChanged = false;
|
|
87
|
+
setSelectedMessageIndex(currIndex => {
|
|
88
|
+
if (currIndex !== firstViewable.index) {
|
|
89
|
+
viewableIndexChanged = true;
|
|
90
|
+
}
|
|
91
|
+
if (firstViewable.index !== null) {
|
|
92
|
+
return firstViewable.index;
|
|
93
|
+
}
|
|
94
|
+
return currIndex;
|
|
95
|
+
});
|
|
96
|
+
selectedPinnedMessageIndexRef.current = firstViewable.index;
|
|
97
|
+
const visiblePinnedMessage = pinnedMessages[selectedPinnedMessageIndexRef.current];
|
|
98
|
+
if (viewableIndexChanged && listHeightRef.current > Heights.COLLAPSED && visiblePinnedMessage) {
|
|
99
|
+
const visibleMessageExpandable = numOfLinesInTextRef.current[visiblePinnedMessage.id];
|
|
100
|
+
if (!visibleMessageExpandable) {
|
|
101
|
+
setListHeight(Heights.COLLAPSED);
|
|
102
|
+
listHeightRef.current = Heights.COLLAPSED;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}, [pinnedMessages]);
|
|
107
|
+
const _renderItem = React.useCallback(data => {
|
|
108
|
+
const numOfLines = numOfLinesInText[data.item.id];
|
|
109
|
+
const [sender, text] = data.item.text.split(':');
|
|
110
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
111
|
+
activeOpacity: 0.8,
|
|
112
|
+
disabled: typeof numOfLines !== 'number',
|
|
113
|
+
onPress: typeof numOfLines === 'number' ? handleTapOnPinnedMessage : undefined,
|
|
114
|
+
style: {
|
|
115
|
+
height: listHeight,
|
|
116
|
+
justifyContent: 'center',
|
|
117
|
+
overflow: Platform.OS === 'ios' && typeof numOfLines !== 'number' ? 'scroll' : 'hidden'
|
|
118
|
+
}
|
|
119
|
+
}, listHeight >= Heights.EXAPANDED && typeof numOfLines === 'number' && numOfLines > NumOfLines.EXPANDED ? /*#__PURE__*/React.createElement(ScrollView, {
|
|
120
|
+
nestedScrollEnabled: true,
|
|
121
|
+
contentContainerStyle: {
|
|
122
|
+
paddingBottom: 12
|
|
123
|
+
}
|
|
124
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
125
|
+
activeOpacity: 0.8,
|
|
126
|
+
onPress: handleTapOnPinnedMessage
|
|
127
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
128
|
+
onTextLayout: ({
|
|
129
|
+
nativeEvent
|
|
130
|
+
}) => {
|
|
131
|
+
if (nativeEvent.lines.length > NumOfLines.COLLAPSED) {
|
|
132
|
+
setNumOfLinesInText(prev => {
|
|
133
|
+
const currentValue = prev[data.item.id];
|
|
134
|
+
let updated;
|
|
135
|
+
if (typeof currentValue === 'number' && currentValue === nativeEvent.lines.length) {
|
|
136
|
+
updated = prev;
|
|
137
|
+
} else {
|
|
138
|
+
updated = {
|
|
139
|
+
...prev,
|
|
140
|
+
[data.item.id]: nativeEvent.lines.length
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
numOfLinesInTextRef.current = updated;
|
|
144
|
+
return updated;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
style: [styles.text, hmsRoomStyles.text],
|
|
149
|
+
numberOfLines: listHeight === Heights.COLLAPSED && typeof numOfLines === 'number' ? 3 : undefined
|
|
150
|
+
}, text ? /*#__PURE__*/React.createElement(Text, {
|
|
151
|
+
style: hmsRoomStyles.highlightedText
|
|
152
|
+
}, sender, ":", ' ') : null, text ?? sender))) : /*#__PURE__*/React.createElement(Text, {
|
|
153
|
+
onTextLayout: ({
|
|
154
|
+
nativeEvent
|
|
155
|
+
}) => {
|
|
156
|
+
if (nativeEvent.lines.length > NumOfLines.COLLAPSED) {
|
|
157
|
+
setNumOfLinesInText(prev => {
|
|
158
|
+
const currentValue = prev[data.item.id];
|
|
159
|
+
let updated;
|
|
160
|
+
if (typeof currentValue === 'number' && currentValue === nativeEvent.lines.length) {
|
|
161
|
+
updated = prev;
|
|
162
|
+
} else {
|
|
163
|
+
updated = {
|
|
164
|
+
...prev,
|
|
165
|
+
[data.item.id]: nativeEvent.lines.length
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
numOfLinesInTextRef.current = updated;
|
|
169
|
+
return updated;
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
style: [styles.text, hmsRoomStyles.text],
|
|
174
|
+
numberOfLines: listHeight === Heights.COLLAPSED && typeof numOfLines === 'number' ? 3 : undefined
|
|
175
|
+
}, text ? /*#__PURE__*/React.createElement(Text, {
|
|
176
|
+
style: hmsRoomStyles.highlightedText
|
|
177
|
+
}, sender, ": ") : null, text ?? sender));
|
|
178
|
+
}, [listHeight, numOfLinesInText, handleTapOnPinnedMessage]);
|
|
179
|
+
const _keyExtractor = React.useCallback(item => item.id, []);
|
|
180
|
+
const _onContentSizeChange = React.useCallback((_w, _h) => {
|
|
181
|
+
var _listRef$current;
|
|
182
|
+
(_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.scrollToOffset({
|
|
183
|
+
offset: listHeight * selectedPinnedMessageIndexRef.current,
|
|
184
|
+
animated: false
|
|
185
|
+
});
|
|
186
|
+
}, [listHeight]);
|
|
187
|
+
const tapGesture = React.useMemo(() => Gesture.Tap(), []);
|
|
188
|
+
const extraData = React.useMemo(() => [listHeight, numOfLinesInText, pinnedMessages], [listHeight, numOfLinesInText, pinnedMessages]);
|
|
189
|
+
if (pinnedMessages.length <= 0) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
return /*#__PURE__*/React.createElement(GestureDetector, {
|
|
193
|
+
gesture: tapGesture
|
|
194
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
195
|
+
style: [insetMode ? styles.insetContainer : styles.container, insetMode ? hmsRoomStyles.insetContainer : null]
|
|
196
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
197
|
+
style: [styles.pinContainer, insetMode ? {
|
|
198
|
+
paddingRight: 0
|
|
199
|
+
} : hmsRoomStyles.pinContainer, {
|
|
200
|
+
height: listHeight + 16
|
|
201
|
+
}]
|
|
202
|
+
}, pinnedMessages.length > 1 ? /*#__PURE__*/React.createElement(View, {
|
|
203
|
+
style: {
|
|
204
|
+
marginRight: 8,
|
|
205
|
+
flexDirection: 'column'
|
|
206
|
+
}
|
|
207
|
+
}, pinnedMessages.map((message, idx) => {
|
|
208
|
+
const isFirst = idx === 0;
|
|
209
|
+
const isSelected = selectedPinnedMessageIndex === idx;
|
|
210
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
211
|
+
key: message.id
|
|
212
|
+
}, isFirst ? null : /*#__PURE__*/React.createElement(View, {
|
|
213
|
+
style: [{
|
|
214
|
+
height: 3,
|
|
215
|
+
width: 2
|
|
216
|
+
}]
|
|
217
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
218
|
+
style: [{
|
|
219
|
+
width: 2,
|
|
220
|
+
flexGrow: 1,
|
|
221
|
+
borderRadius: 16
|
|
222
|
+
}, isSelected ? hmsRoomStyles.activeMessageContainer : hmsRoomStyles.inactiveMessageContainer]
|
|
223
|
+
}));
|
|
224
|
+
})) : null, /*#__PURE__*/React.createElement(FlashList, {
|
|
225
|
+
ref: listRef,
|
|
226
|
+
data: pinnedMessages,
|
|
227
|
+
extraData: extraData,
|
|
228
|
+
showsVerticalScrollIndicator: false,
|
|
229
|
+
pagingEnabled: true,
|
|
230
|
+
nestedScrollEnabled: true,
|
|
231
|
+
keyboardShouldPersistTaps: "always",
|
|
232
|
+
renderItem: _renderItem,
|
|
233
|
+
keyExtractor: _keyExtractor,
|
|
234
|
+
onContentSizeChange: _onContentSizeChange,
|
|
235
|
+
estimatedItemSize: 40,
|
|
236
|
+
onViewableItemsChanged: _handleViewableItemsChanged,
|
|
237
|
+
viewabilityConfig: FLATLIST_VIEWABILITY_CONFIG
|
|
238
|
+
})), allowPinningMessage ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
239
|
+
style: {
|
|
240
|
+
marginLeft: 8
|
|
241
|
+
},
|
|
242
|
+
onPress: handleUnpinMessagePress
|
|
243
|
+
}, /*#__PURE__*/React.createElement(PinIcon, {
|
|
244
|
+
type: "unpin",
|
|
245
|
+
style: [styles.icon, hmsRoomStyles.closeIcon]
|
|
246
|
+
})) : null));
|
|
247
|
+
};
|
|
248
|
+
export const PinnedMessages = /*#__PURE__*/React.memo(_PinnedMessages);
|
|
249
|
+
const styles = StyleSheet.create({
|
|
250
|
+
container: {
|
|
251
|
+
flexDirection: 'row',
|
|
252
|
+
alignItems: 'center',
|
|
253
|
+
marginTop: 8
|
|
254
|
+
},
|
|
255
|
+
insetContainer: {
|
|
256
|
+
flexDirection: 'row',
|
|
257
|
+
alignItems: 'center',
|
|
258
|
+
marginTop: 8,
|
|
259
|
+
marginHorizontal: 8,
|
|
260
|
+
marginBottom: 4,
|
|
261
|
+
borderRadius: 8,
|
|
262
|
+
paddingRight: 8
|
|
263
|
+
},
|
|
264
|
+
pinContainer: {
|
|
265
|
+
flexDirection: 'row',
|
|
266
|
+
flexGrow: 1,
|
|
267
|
+
flexShrink: 1,
|
|
268
|
+
borderRadius: 8,
|
|
269
|
+
paddingVertical: 8,
|
|
270
|
+
paddingRight: 8,
|
|
271
|
+
paddingLeft: 8
|
|
272
|
+
},
|
|
273
|
+
textWrapper: {
|
|
274
|
+
maxHeight: 50,
|
|
275
|
+
marginHorizontal: 8
|
|
276
|
+
},
|
|
277
|
+
icon: {
|
|
278
|
+
width: 20,
|
|
279
|
+
height: 20
|
|
280
|
+
// marginTop: 8,
|
|
281
|
+
},
|
|
282
|
+
text: {
|
|
283
|
+
fontSize: 14,
|
|
284
|
+
lineHeight: 20,
|
|
285
|
+
letterSpacing: 0.25
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
//# sourceMappingURL=PinnedMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Text","TouchableOpacity","ScrollView","Platform","useSelector","FlashList","GestureDetector","Gesture","useAllowPinningMessage","useHMSMessagePinningActions","useHMSRoomStyleSheet","PinIcon","hexToRgbA","FLATLIST_VIEWABILITY_CONFIG","waitForInteraction","itemVisiblePercentThreshold","LINE_HEIGHT","NumOfLines","Heights","EXAPANDED","EXPANDED","COLLAPSED","_PinnedMessages","insetMode","listRef","useRef","numOfLinesInText","setNumOfLinesInText","useState","numOfLinesInTextRef","listHeight","setListHeight","listHeightRef","selectedPinnedMessageIndex","setSelectedMessageIndex","selectedPinnedMessageIndexRef","allowPinningMessage","unpinMessage","pinnedMessages","state","messages","hmsRoomStyles","theme","typography","insetContainer","backgroundColor","palette","background_dim","pinContainer","surface_default","activeMessageContainer","on_surface_high","inactiveMessageContainer","on_surface_low","closeIcon","tintColor","on_surface_medium","highlightedText","fontFamily","font_family","color","text","ellipsis","handleTapOnPinnedMessage","useCallback","prevListHeight","updated","current","handleUnpinMessagePress","visiblePinnedMessage","_handleViewableItemsChanged","info","firstViewable","viewableItems","isViewable","index","viewableIndexChanged","currIndex","visibleMessageExpandable","id","_renderItem","data","numOfLines","item","sender","split","createElement","activeOpacity","disabled","onPress","undefined","style","height","justifyContent","overflow","OS","nestedScrollEnabled","contentContainerStyle","paddingBottom","onTextLayout","nativeEvent","lines","length","prev","currentValue","styles","numberOfLines","_keyExtractor","_onContentSizeChange","_w","_h","_listRef$current","scrollToOffset","offset","animated","tapGesture","useMemo","Tap","extraData","gesture","container","paddingRight","marginRight","flexDirection","map","message","idx","isFirst","isSelected","Fragment","key","width","flexGrow","borderRadius","ref","showsVerticalScrollIndicator","pagingEnabled","keyboardShouldPersistTaps","renderItem","keyExtractor","onContentSizeChange","estimatedItemSize","onViewableItemsChanged","viewabilityConfig","marginLeft","type","icon","PinnedMessages","memo","create","alignItems","marginTop","marginHorizontal","marginBottom","flexShrink","paddingVertical","paddingLeft","textWrapper","maxHeight","fontSize","lineHeight","letterSpacing"],"sourceRoot":"../../../../src","sources":["components/Chat/PinnedMessages.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,IAAI,EACJC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,QAAQ,QACH,cAAc;AAErB,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SAASC,eAAe,EAAEC,OAAO,QAAQ,8BAA8B;AAGvE,SACEC,sBAAsB,EACtBC,2BAA2B,EAC3BC,oBAAoB,QACf,kBAAkB;AACzB,SAASC,OAAO,QAAQ,aAAa;AAErC,SAASC,SAAS,QAA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ceRoot":"../../../../src","sources":["components/Chat/index.ts"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/Chat/index.ts"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,kBAAkB"}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
3
|
import { BottomSheet } from '../BottomSheet';
|
|
5
|
-
import { useShowChatAndParticipants } from '../../hooks-util';
|
|
4
|
+
import { useHMSRoomStyleSheet, useShowChatAndParticipants } from '../../hooks-util';
|
|
6
5
|
import { ChatAndParticipantsView } from './ChatAndParticipantsView';
|
|
7
|
-
import {
|
|
6
|
+
import { useHeaderHeight } from '../Header';
|
|
8
7
|
import { useIsLandscapeOrientation } from '../../utils/dimension';
|
|
9
8
|
export const ChatAndParticipantsBottomSheet = () => {
|
|
10
|
-
const
|
|
11
|
-
top: topSafeArea
|
|
12
|
-
} = useSafeAreaInsets();
|
|
9
|
+
const headerHeight = useHeaderHeight();
|
|
13
10
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
14
11
|
const {
|
|
15
12
|
modalVisible,
|
|
16
13
|
hide
|
|
17
14
|
} = useShowChatAndParticipants();
|
|
15
|
+
const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
|
|
16
|
+
contentContainer: {
|
|
17
|
+
backgroundColor: theme.palette.surface_dim
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
18
20
|
const closeChatWindow = () => hide('modal');
|
|
19
21
|
return /*#__PURE__*/React.createElement(BottomSheet, {
|
|
20
22
|
fullWidth: true,
|
|
21
23
|
dismissModal: closeChatWindow,
|
|
22
24
|
isVisible: modalVisible,
|
|
23
25
|
avoidKeyboard: true,
|
|
24
|
-
containerStyle: [styles.bottomSheet, {
|
|
25
|
-
marginTop:
|
|
26
|
-
}]
|
|
26
|
+
containerStyle: [styles.bottomSheet, hmsRoomStyles.contentContainer, {
|
|
27
|
+
marginTop: isLandscapeOrientation ? 0 : headerHeight
|
|
28
|
+
}],
|
|
29
|
+
bottomOffsetSpace: 0
|
|
27
30
|
}, /*#__PURE__*/React.createElement(ChatAndParticipantsView, null));
|
|
28
31
|
};
|
|
29
32
|
const styles = StyleSheet.create({
|
|
30
33
|
bottomSheet: {
|
|
31
|
-
flex: 1
|
|
32
|
-
backgroundColor: undefined,
|
|
33
|
-
paddingBottom: 0
|
|
34
|
+
flex: 1
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
//# sourceMappingURL=ChatAndParticipantsBottomSheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","BottomSheet","useHMSRoomStyleSheet","useShowChatAndParticipants","ChatAndParticipantsView","useHeaderHeight","useIsLandscapeOrientation","ChatAndParticipantsBottomSheet","headerHeight","isLandscapeOrientation","modalVisible","hide","hmsRoomStyles","theme","contentContainer","backgroundColor","palette","surface_dim","closeChatWindow","createElement","fullWidth","dismissModal","isVisible","avoidKeyboard","containerStyle","styles","bottomSheet","marginTop","bottomOffsetSpace","create","flex"],"sourceRoot":"../../../../src","sources":["components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SACEC,oBAAoB,EACpBC,0BAA0B,QACrB,kBAAkB;AACzB,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,eAAe,QAAQ,WAAW;AAC3C,SAASC,yBAAyB,QAAQ,uBAAuB;AAEjE,OAAO,MAAMC,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAMC,YAAY,GAAGH,eAAe,CAAC,CAAC;EACtC,MAAMI,sBAAsB,GAAGH,yBAAyB,CAAC,CAAC;EAE1D,MAAM;IAAEI,YAAY;IAAEC;EAAK,CAAC,GAAGR,0BAA0B,CAAC,CAAC;EAE3D,MAAMS,aAAa,GAAGV,oBAAoB,CAAEW,KAAK,KAAM;IACrDC,gBAAgB,EAAE;MAChBC,eAAe,EAAEF,KAAK,CAACG,OAAO,CAACC;IACjC;EACF,CAAC,CAAC,CAAC;EAEH,MAAMC,eAAe,GAAGA,CAAA,KAAMP,IAAI,CAAC,OAAO,CAAC;EAE3C,oBACEZ,KAAA,CAAAoB,aAAA,CAAClB,WAAW;IACVmB,SAAS,EAAE,IAAK;IAChBC,YAAY,EAAEH,eAAgB;IAC9BI,SAAS,EAAEZ,YAAa;IACxBa,aAAa,EAAE,IAAK;IACpBC,cAAc,EAAE,CACdC,MAAM,CAACC,WAAW,EAClBd,aAAa,CAACE,gBAAgB,EAC9B;MACEa,SAAS,EAAElB,sBAAsB,GAAG,CAAC,GAAGD;IAC1C,CAAC,CACD;IACFoB,iBAAiB,EAAE;EAAE,gBAErB7B,KAAA,CAAAoB,aAAA,CAACf,uBAAuB,MAAE,CACf,CAAC;AAElB,CAAC;AAED,MAAMqB,MAAM,GAAGzB,UAAU,CAAC6B,MAAM,CAAC;EAC/BH,WAAW,EAAE;IACXI,IAAI,EAAE;EACR;AACF,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
-
import { CloseIcon } from '../../Icons';
|
|
5
|
-
import { useHMSRoomStyleSheet, useShowChatAndParticipants } from '../../hooks-util';
|
|
4
|
+
import { CloseIcon, SettingsIcon } from '../../Icons';
|
|
5
|
+
import { useHMSCanDisableChat, useHMSRoomStyleSheet, useShowChatAndParticipants } from '../../hooks-util';
|
|
6
6
|
import { ChatBottomSheetTabs } from '../../utils/types';
|
|
7
|
-
import { setActiveChatBottomSheetTab } from '../../redux/actions';
|
|
7
|
+
import { setActiveChatBottomSheetTab, setChatMoreActionsSheetVisible } from '../../redux/actions';
|
|
8
8
|
import { TestIds } from '../../utils/constants';
|
|
9
9
|
const _ChatAndParticipantsHeader = ({
|
|
10
10
|
onClosePress
|
|
@@ -14,6 +14,7 @@ const _ChatAndParticipantsHeader = ({
|
|
|
14
14
|
var _state$hmsStates$room;
|
|
15
15
|
return (_state$hmsStates$room = state.hmsStates.room) === null || _state$hmsStates$room === void 0 ? void 0 : _state$hmsStates$room.peerCount;
|
|
16
16
|
});
|
|
17
|
+
const canDisableChat = useHMSCanDisableChat();
|
|
17
18
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
18
19
|
headerTitleWrapper: {
|
|
19
20
|
backgroundColor: theme.palette.surface_default
|
|
@@ -41,6 +42,13 @@ const _ChatAndParticipantsHeader = ({
|
|
|
41
42
|
if (tab === 'Chat') return canShowChat && !overlayChatLayout;
|
|
42
43
|
return true;
|
|
43
44
|
});
|
|
45
|
+
const onSettingsPress = () => {
|
|
46
|
+
dispatch(setChatMoreActionsSheetVisible(true));
|
|
47
|
+
};
|
|
48
|
+
const hideSettigsButton = !canDisableChat ||
|
|
49
|
+
// can't disable chat, OR
|
|
50
|
+
visibleChatBottomSheetTabs.length === 1 && visibleChatBottomSheetTabs[0] === 'Participants'; // Only Participants Header is visible
|
|
51
|
+
|
|
44
52
|
return /*#__PURE__*/React.createElement(View, {
|
|
45
53
|
style: visibleChatBottomSheetTabs.length > 1 ? styles.tabsHeader : styles.header
|
|
46
54
|
}, visibleChatBottomSheetTabs.length === 1 ? /*#__PURE__*/React.createElement(Text, {
|
|
@@ -59,10 +67,21 @@ const _ChatAndParticipantsHeader = ({
|
|
|
59
67
|
testID: tab === 'Participants' ? isActive ? TestIds.participants_heading_active : TestIds.participants_heading : tab === 'Chat' ? isActive ? TestIds.chat_heading_active : TestIds.chat_heading : undefined,
|
|
60
68
|
style: [styles.headerTitle, hmsRoomStyles.headerTitle, isActive ? hmsRoomStyles.activeHeaderTitle : null]
|
|
61
69
|
}, tab, tab === 'Participants' && typeof peersCount === 'number' ? ` (${peersCount})` : null));
|
|
62
|
-
})), /*#__PURE__*/React.createElement(
|
|
70
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
71
|
+
style: {
|
|
72
|
+
flexDirection: 'row'
|
|
73
|
+
}
|
|
74
|
+
}, hideSettigsButton ? null : /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
75
|
+
disabled: activeChatBottomSheetTab === 'Participants',
|
|
76
|
+
onPress: onSettingsPress,
|
|
77
|
+
style: {
|
|
78
|
+
marginRight: 16,
|
|
79
|
+
opacity: activeChatBottomSheetTab === 'Participants' ? 0.5 : 1
|
|
80
|
+
}
|
|
81
|
+
}, /*#__PURE__*/React.createElement(SettingsIcon, null)), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
63
82
|
testID: TestIds.participants_close_btn,
|
|
64
83
|
onPress: onClosePress
|
|
65
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null)));
|
|
84
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null))));
|
|
66
85
|
};
|
|
67
86
|
const styles = StyleSheet.create({
|
|
68
87
|
tabsHeader: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","Text","TouchableOpacity","View","useDispatch","useSelector","CloseIcon","useHMSRoomStyleSheet","useShowChatAndParticipants","ChatBottomSheetTabs","setActiveChatBottomSheetTab","TestIds","_ChatAndParticipantsHeader","onClosePress","dispatch","peersCount","state","_state$hmsStates$room","hmsStates","room","peerCount","hmsRoomStyles","theme","typography","headerTitleWrapper","backgroundColor","palette","surface_default","tab","surface_bright","headerTitle","color","on_surface_low","fontFamily","font_family","activeHeaderTitle","on_surface_high","activeChatBottomSheetTab","app","canShowParticipants","canShowChat","overlayChatLayout","visibleChatBottomSheetTabs","filter","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","TouchableOpacity","View","useDispatch","useSelector","CloseIcon","SettingsIcon","useHMSCanDisableChat","useHMSRoomStyleSheet","useShowChatAndParticipants","ChatBottomSheetTabs","setActiveChatBottomSheetTab","setChatMoreActionsSheetVisible","TestIds","_ChatAndParticipantsHeader","onClosePress","dispatch","peersCount","state","_state$hmsStates$room","hmsStates","room","peerCount","canDisableChat","hmsRoomStyles","theme","typography","headerTitleWrapper","backgroundColor","palette","surface_default","tab","surface_bright","headerTitle","color","on_surface_low","fontFamily","font_family","activeHeaderTitle","on_surface_high","activeChatBottomSheetTab","app","canShowParticipants","canShowChat","overlayChatLayout","visibleChatBottomSheetTabs","filter","onSettingsPress","hideSettigsButton","length","createElement","style","styles","tabsHeader","header","testID","participants_heading","chat_heading","undefined","map","isActive","key","participants_heading_btn","chat_heading_btn","onPress","participants_heading_active","chat_heading_active","flexDirection","disabled","marginRight","opacity","participants_close_btn","create","alignItems","justifyContent","marginTop","flex","padding","borderRadius","fontSize","lineHeight","letterSpacing","textAlign","ChatAndParticipantsHeader","memo"],"sourceRoot":"../../../../src","sources":["components/ChatAndParticipants/ChatAndParticipantsHeader.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACvE,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAEtD,SAASC,SAAS,EAAEC,YAAY,QAAQ,aAAa;AACrD,SACEC,oBAAoB,EACpBC,oBAAoB,EACpBC,0BAA0B,QACrB,kBAAkB;AAEzB,SAASC,mBAAmB,QAAQ,mBAAmB;AACvD,SACEC,2BAA2B,EAC3BC,8BAA8B,QACzB,qBAAqB;AAC5B,SAASC,OAAO,QAAQ,uBAAuB;AAM/C,MAAMC,0BAA2D,G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CAAC5C,YAAY,MAAE,CACC,CACnB,eAEDR,KAAA,CAAAoD,aAAA,CAACjD,gBAAgB;IACfsD,MAAM,EAAE1C,OAAO,CAAC0D,sBAAuB;IACvCP,OAAO,EAAEjD;EAAa,gBAEtBjB,KAAA,CAAAoD,aAAA,CAAC7C,SAAS,MAAE,CACI,CACd,CACF,CAAC;AAEX,CAAC;AAED,MAAM+C,MAAM,GAAGrD,UAAU,CAACyE,MAAM,CAAC;EAC/BnB,UAAU,EAAE;IACVc,aAAa,EAAE,KAAK;IACpBM,UAAU,EAAE;EACd,CAAC;EACDnB,MAAM,EAAE;IACNa,aAAa,EAAE,KAAK;IACpBM,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,SAAS,EAAE;EACb,CAAC;EACDhD,kBAAkB,EAAE;IAClBiD,IAAI,EAAE,CAAC;IACPT,aAAa,EAAE,KAAK;IACpBU,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE,CAAC;IACfT,WAAW,EAAE;EACf,CAAC;EACDtC,GAAG,EAAE;IACH6C,IAAI,EAAE,CAAC;IACPT,aAAa,EAAE,KAAK;IACpBM,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBG,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE;EAChB,CAAC;EACD7C,WAAW,EAAE;IACX8C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,yBAAyB,gBAAGrF,KAAK,CAACsF,IAAI,CAACtE,0BAA0B,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
|
-
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
4
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
5
|
import { useHMSRoomStyleSheet, useShowChatAndParticipants } from '../../hooks-util';
|
|
5
6
|
import { ChatAndParticipantsHeader } from './ChatAndParticipantsHeader';
|
|
6
7
|
import { ChatFilterBottomSheetView } from '../Chat/ChatFilterBottomSheetView';
|
|
7
8
|
import { ParticipantsView } from './ParticipantsView';
|
|
8
9
|
import { ChatView } from './ChatView';
|
|
10
|
+
import { ChatMoreActionsSheetView } from '../Chat/ChatMoreActionsSheetView';
|
|
11
|
+
import { MessageOptionsBottomSheetView } from '../Chat/MessageOptionsBottomSheetView';
|
|
9
12
|
const _ChatAndParticipantsView = () => {
|
|
10
13
|
const activeChatBottomSheetTab = useSelector(state => state.app.activeChatBottomSheetTab);
|
|
11
14
|
const {
|
|
@@ -22,15 +25,16 @@ const _ChatAndParticipantsView = () => {
|
|
|
22
25
|
}));
|
|
23
26
|
const showParticipants = activeChatBottomSheetTab === 'Participants' && canShowParticipants;
|
|
24
27
|
const showChat = activeChatBottomSheetTab === 'Chat' && canShowChat && !overlayChatLayout;
|
|
25
|
-
return /*#__PURE__*/React.createElement(
|
|
26
|
-
style: styles.container
|
|
28
|
+
return /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
29
|
+
style: styles.container,
|
|
30
|
+
edges: ['left', 'right']
|
|
27
31
|
}, /*#__PURE__*/React.createElement(View, {
|
|
28
32
|
style: [styles.contentContainer, hmsRoomStyles.contentContainer, showParticipants ? styles.participantsContainer : null]
|
|
29
33
|
}, /*#__PURE__*/React.createElement(ChatAndParticipantsHeader, {
|
|
30
34
|
onClosePress: closeBottomSheet
|
|
31
35
|
}), showParticipants ? /*#__PURE__*/React.createElement(View, {
|
|
32
36
|
style: styles.participantsWrapper
|
|
33
|
-
}, /*#__PURE__*/React.createElement(ParticipantsView, null)) : showChat ? /*#__PURE__*/React.createElement(ChatView, null) : null), /*#__PURE__*/React.createElement(ChatFilterBottomSheetView, null));
|
|
37
|
+
}, /*#__PURE__*/React.createElement(ParticipantsView, null)) : showChat ? /*#__PURE__*/React.createElement(ChatView, null) : null), canShowChat && !overlayChatLayout ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MessageOptionsBottomSheetView, null), /*#__PURE__*/React.createElement(ChatFilterBottomSheetView, null), /*#__PURE__*/React.createElement(ChatMoreActionsSheetView, null)) : null);
|
|
34
38
|
};
|
|
35
39
|
const styles = StyleSheet.create({
|
|
36
40
|
container: {
|
|
@@ -41,7 +45,7 @@ const styles = StyleSheet.create({
|
|
|
41
45
|
flex: 1,
|
|
42
46
|
paddingHorizontal: 16,
|
|
43
47
|
paddingTop: 12,
|
|
44
|
-
paddingBottom: 32,
|
|
48
|
+
paddingBottom: Platform.OS === 'ios' ? 32 : 0,
|
|
45
49
|
borderTopLeftRadius: 16,
|
|
46
50
|
borderTopRightRadius: 16
|
|
47
51
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useSelector","StyleSheet","View","useHMSRoomStyleSheet","useShowChatAndParticipants","ChatAndParticipantsHeader","ChatFilterBottomSheetView","ParticipantsView","ChatView","_ChatAndParticipantsView","activeChatBottomSheetTab","state","app","hide","canShowParticipants","canShowChat","overlayChatLayout","closeBottomSheet","hmsRoomStyles","theme","contentContainer","backgroundColor","palette","surface_dim","showParticipants","showChat","createElement","style","styles","container","participantsContainer","onClosePress","participantsWrapper","create","flex","position","paddingHorizontal","paddingTop","paddingBottom","borderTopLeftRadius","borderTopRightRadius","marginTop","ChatAndParticipantsView","memo"],"sourceRoot":"../../../../src","sources":["components/ChatAndParticipants/ChatAndParticipantsView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["React","useSelector","Platform","StyleSheet","View","SafeAreaView","useHMSRoomStyleSheet","useShowChatAndParticipants","ChatAndParticipantsHeader","ChatFilterBottomSheetView","ParticipantsView","ChatView","ChatMoreActionsSheetView","MessageOptionsBottomSheetView","_ChatAndParticipantsView","activeChatBottomSheetTab","state","app","hide","canShowParticipants","canShowChat","overlayChatLayout","closeBottomSheet","hmsRoomStyles","theme","contentContainer","backgroundColor","palette","surface_dim","showParticipants","showChat","createElement","style","styles","container","edges","participantsContainer","onClosePress","participantsWrapper","Fragment","create","flex","position","paddingHorizontal","paddingTop","paddingBottom","OS","borderTopLeftRadius","borderTopRightRadius","marginTop","ChatAndParticipantsView","memo"],"sourceRoot":"../../../../src","sources":["components/ChatAndParticipants/ChatAndParticipantsView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,YAAY,QAAQ,gCAAgC;AAE7D,SACEC,oBAAoB,EACpBC,0BAA0B,QACrB,kBAAkB;AACzB,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,yBAAyB,QAAQ,mCAAmC;AAE7E,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,QAAQ,QAAQ,YAAY;AACrC,SAASC,wBAAwB,QAAQ,kCAAkC;AAC3E,SAASC,6BAA6B,QAAQ,uCAAuC;AAErF,MAAMC,wBAAkC,GAAGA,CAAA,KAAM;EAC/C,MAAMC,wBAAwB,GAAGd,WAAW,CACzCe,KAAgB,IAAKA,KAAK,CAACC,GAAG,CAACF,wBAClC,CAAC;EAED,MAAM;IAAEG,IAAI;IAAEC,mBAAmB;IAAEC,WAAW;IAAEC;EAAkB,CAAC,GACjEd,0BAA0B,CAAC,CAAC;EAE9B,MAAMe,gBAAgB,GAAGA,CAAA,KAAMJ,IAAI,CAAC,OAAO,CAAC;EAE5C,MAAMK,aAAa,GAAGjB,oBAAoB,CAAEkB,KAAK,KAAM;IACrDC,gBAAgB,EAAE;MAChBC,eAAe,EAAEF,KAAK,CAACG,OAA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IACPC,QAAQ,EAAE;EACZ,CAAC;EACDjB,gBAAgB,EAAE;IAChBgB,IAAI,EAAE,CAAC;IACPE,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE3C,QAAQ,CAAC4C,EAAE,KAAK,KAAK,GAAG,EAAE,GAAG,CAAC;IAC7CC,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE;EACxB,CAAC;EACDZ,qBAAqB,EAAE;IACrBS,aAAa,EAAE;EACjB,CAAC;EACDP,mBAAmB,EAAE;IACnBG,IAAI,EAAE,CAAC;IACPQ,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,uBAAuB,gBAAGlD,KAAK,CAACmD,IAAI,CAACrC,wBAAwB,CAAC"}
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { useHMSChatState, useHMSRoomStyleSheet, useIsAllowedToSendMessage, useIsLocalPeerBlockedFromChat } from '../../hooks-util';
|
|
4
5
|
import { ChatList } from '../Chat/ChatList';
|
|
5
6
|
import { HMSSendMessageInput } from '../HMSSendMessageInput';
|
|
6
7
|
import { ChatFilterBottomSheetOpener } from '../Chat/ChatFilterBottomSheetOpener';
|
|
8
|
+
import { ChatPaused } from '../Chat/ChatPaused';
|
|
9
|
+
import { PeerBlockedFromChat } from '../Chat/PeerBlockedFromChat';
|
|
7
10
|
const _ChatView = () => {
|
|
11
|
+
const {
|
|
12
|
+
chatState
|
|
13
|
+
} = useHMSChatState();
|
|
14
|
+
const isAllowedToSendMessage = useIsAllowedToSendMessage();
|
|
15
|
+
const isChatRecipientSelected = useSelector(state => state.chatWindow.sendTo !== null);
|
|
16
|
+
const isLocalPeerBlockedFromChat = useIsLocalPeerBlockedFromChat();
|
|
8
17
|
const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
|
|
9
18
|
input: {
|
|
10
19
|
backgroundColor: theme.palette.surface_default,
|
|
11
20
|
borderColor: theme.palette.surface_default
|
|
12
21
|
}
|
|
13
22
|
}));
|
|
14
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ChatList, null),
|
|
23
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ChatList, null), isLocalPeerBlockedFromChat ? /*#__PURE__*/React.createElement(PeerBlockedFromChat, {
|
|
24
|
+
style: styles.peerBlocked
|
|
25
|
+
}) : chatState.enabled ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ChatFilterBottomSheetOpener, null), isAllowedToSendMessage && isChatRecipientSelected ? /*#__PURE__*/React.createElement(HMSSendMessageInput, {
|
|
15
26
|
containerStyle: [styles.input, hmsRoomStyles.input]
|
|
16
|
-
}))
|
|
27
|
+
}) : null) : isAllowedToSendMessage ? /*#__PURE__*/React.createElement(ChatPaused, {
|
|
28
|
+
style: styles.chatPaused
|
|
29
|
+
}) : null);
|
|
17
30
|
};
|
|
18
31
|
const styles = StyleSheet.create({
|
|
19
32
|
input: {
|
|
@@ -22,6 +35,12 @@ const styles = StyleSheet.create({
|
|
|
22
35
|
marginHorizontal: 0,
|
|
23
36
|
marginTop: 0,
|
|
24
37
|
marginBottom: 0
|
|
38
|
+
},
|
|
39
|
+
chatPaused: {
|
|
40
|
+
marginTop: 18 // Applied margin so that content does not shift when this component mounts or unmounts
|
|
41
|
+
},
|
|
42
|
+
peerBlocked: {
|
|
43
|
+
marginTop: 18 // Applied margin so that content does not shift when this component mounts or unmounts
|
|
25
44
|
}
|
|
26
45
|
});
|
|
27
46
|
export const ChatView = /*#__PURE__*/React.memo(_ChatView);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","useHMSRoomStyleSheet","ChatList","HMSSendMessageInput","ChatFilterBottomSheetOpener","_ChatView","hmsRoomStyles","theme","input","backgroundColor","palette","surface_default","borderColor","createElement","Fragment","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","useSelector","useHMSChatState","useHMSRoomStyleSheet","useIsAllowedToSendMessage","useIsLocalPeerBlockedFromChat","ChatList","HMSSendMessageInput","ChatFilterBottomSheetOpener","ChatPaused","PeerBlockedFromChat","_ChatView","chatState","isAllowedToSendMessage","isChatRecipientSelected","state","chatWindow","sendTo","isLocalPeerBlockedFromChat","hmsRoomStyles","theme","input","backgroundColor","palette","surface_default","borderColor","createElement","Fragment","style","styles","peerBlocked","enabled","containerStyle","chatPaused","create","flex","height","marginHorizontal","marginTop","marginBottom","ChatView","memo"],"sourceRoot":"../../../../src","sources":["components/ChatAndParticipants/ChatView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,WAAW,QAAQ,aAAa;AAEzC,SACEC,eAAe,EACfC,oBAAoB,EACpBC,yBAAyB,EACzBC,6BAA6B,QACxB,kBAAkB;AACzB,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,mBAAmB,QAAQ,wBAAwB;AAC5D,SAASC,2BAA2B,QAAQ,qCAAqC;AACjF,SAASC,UAAU,QAAQ,oBAAoB;AAE/C,SAASC,mBAAmB,QAAQ,6BAA6B;AAIjE,MAAMC,SAAkC,GAAGA,CAAA,KAAM;EAC/C,MAAM;IAAEC;EAAU,CAAC,GAAGV,eAAe,CAAC,CAAC;EACvC,MAAMW,sBAAsB,GAAGT,yBAAyB,CAAC,CAAC;EAC1D,MAAMU,uBAAuB,GAAGb,WAAW,CACxCc,KAAgB,IAAKA,KAAK,CAACC,UAAU,CAACC,MAAM,KAAK,IACpD,CAAC;EACD,MAAMC,0BAA0B,GAAGb,6BAA6B,CAAC,CAAC;EAElE,MAAMc,aAAa,GAAGhB,oBAAoB,CAAEiB,KAAK,KAAM;IACrDC,KAAK,EAAE;MACLC,eAAe,EAAEF,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