@100mslive/react-native-room-kit 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (526) hide show
  1. package/lib/commonjs/HMSContainer.js +26 -5
  2. package/lib/commonjs/HMSContainer.js.map +1 -1
  3. package/lib/commonjs/HMSRoomSetup.js +6 -8
  4. package/lib/commonjs/HMSRoomSetup.js.map +1 -1
  5. package/lib/commonjs/Icons/Chat/assets/chat-on.png +0 -0
  6. package/lib/commonjs/Icons/Chat/assets/chat-on@2x.png +0 -0
  7. package/lib/commonjs/Icons/Chat/assets/chat-on@3x.png +0 -0
  8. package/lib/commonjs/Icons/Chat/index.js +4 -3
  9. package/lib/commonjs/Icons/Chat/index.js.map +1 -1
  10. package/lib/commonjs/Icons/NoEntry/assets/no-entry.png +0 -0
  11. package/lib/commonjs/Icons/NoEntry/assets/no-entry@2x.png +0 -0
  12. package/lib/commonjs/Icons/NoEntry/assets/no-entry@3x.png +0 -0
  13. package/lib/commonjs/Icons/NoEntry/index.js +33 -0
  14. package/lib/commonjs/Icons/NoEntry/index.js.map +1 -0
  15. package/lib/commonjs/Icons/PauseCircle/assets/pause-circle.png +0 -0
  16. package/lib/commonjs/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
  17. package/lib/commonjs/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
  18. package/lib/commonjs/Icons/PauseCircle/index.js +29 -0
  19. package/lib/commonjs/Icons/PauseCircle/index.js.map +1 -0
  20. package/lib/commonjs/Icons/Pin/assets/unpin.png +0 -0
  21. package/lib/commonjs/Icons/Pin/assets/unpin@2x.png +0 -0
  22. package/lib/commonjs/Icons/Pin/assets/unpin@3x.png +0 -0
  23. package/lib/commonjs/Icons/Pin/index.js +2 -1
  24. package/lib/commonjs/Icons/Pin/index.js.map +1 -1
  25. package/lib/commonjs/Icons/Recording/assets/recording-pause.png +0 -0
  26. package/lib/commonjs/Icons/Recording/assets/recording-pause@2x.png +0 -0
  27. package/lib/commonjs/Icons/Recording/assets/recording-pause@3x.png +0 -0
  28. package/lib/commonjs/Icons/Recording/index.js.map +1 -1
  29. package/lib/commonjs/Icons/index.js +22 -0
  30. package/lib/commonjs/Icons/index.js.map +1 -1
  31. package/lib/commonjs/components/BottomSheet.js.map +1 -1
  32. package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js +36 -0
  33. package/lib/commonjs/components/Chat/ChatFilterBottomSheet.js.map +1 -0
  34. package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js +90 -23
  35. package/lib/commonjs/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
  36. package/lib/commonjs/components/Chat/ChatFilterItem.js +10 -7
  37. package/lib/commonjs/components/Chat/ChatFilterItem.js.map +1 -1
  38. package/lib/commonjs/components/Chat/ChatFilterView.js +54 -45
  39. package/lib/commonjs/components/Chat/ChatFilterView.js.map +1 -1
  40. package/lib/commonjs/components/Chat/ChatList.js +13 -6
  41. package/lib/commonjs/components/Chat/ChatList.js.map +1 -1
  42. package/lib/commonjs/components/Chat/ChatMessage.js +79 -7
  43. package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
  44. package/lib/commonjs/components/Chat/ChatMoreActionsModal.js +61 -0
  45. package/lib/commonjs/components/Chat/ChatMoreActionsModal.js.map +1 -0
  46. package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js +63 -0
  47. package/lib/commonjs/components/Chat/ChatMoreActionsSheetView.js.map +1 -0
  48. package/lib/commonjs/components/Chat/ChatMoreActionsView.js +83 -0
  49. package/lib/commonjs/components/Chat/ChatMoreActionsView.js.map +1 -0
  50. package/lib/commonjs/components/Chat/ChatPaused.js +86 -0
  51. package/lib/commonjs/components/Chat/ChatPaused.js.map +1 -0
  52. package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js +34 -0
  53. package/lib/commonjs/components/Chat/MessageOptionsBottomSheet.js.map +1 -0
  54. package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js +66 -0
  55. package/lib/commonjs/components/Chat/MessageOptionsBottomSheetView.js.map +1 -0
  56. package/lib/commonjs/components/Chat/MessageOptionsView.js +188 -0
  57. package/lib/commonjs/components/Chat/MessageOptionsView.js.map +1 -0
  58. package/lib/commonjs/components/Chat/PeerBlockedFromChat.js +47 -0
  59. package/lib/commonjs/components/Chat/PeerBlockedFromChat.js.map +1 -0
  60. package/lib/commonjs/components/Chat/PinnedMessages.js +297 -0
  61. package/lib/commonjs/components/Chat/PinnedMessages.js.map +1 -0
  62. package/lib/commonjs/components/Chat/index.js +4 -4
  63. package/lib/commonjs/components/Chat/index.js.map +1 -1
  64. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
  65. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js +21 -2
  66. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
  67. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -1
  68. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
  69. package/lib/commonjs/components/ChatAndParticipants/ChatView.js +21 -2
  70. package/lib/commonjs/components/ChatAndParticipants/ChatView.js.map +1 -1
  71. package/lib/commonjs/components/EndRoomModalContent.js +6 -9
  72. package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
  73. package/lib/commonjs/components/Footer.js.map +1 -1
  74. package/lib/commonjs/components/GridView.js.map +1 -1
  75. package/lib/commonjs/components/HLSView.js +8 -6
  76. package/lib/commonjs/components/HLSView.js.map +1 -1
  77. package/lib/commonjs/components/HMSBaseButton.js +10 -2
  78. package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
  79. package/lib/commonjs/components/HMSDangerButton.js +4 -2
  80. package/lib/commonjs/components/HMSDangerButton.js.map +1 -1
  81. package/lib/commonjs/components/HMSHLSMessage.js +86 -1
  82. package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
  83. package/lib/commonjs/components/HMSHLSMessageList.js +2 -2
  84. package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
  85. package/lib/commonjs/components/HMSHandRaiseNotification.js +6 -3
  86. package/lib/commonjs/components/HMSHandRaiseNotification.js.map +1 -1
  87. package/lib/commonjs/components/HMSKeyboardAvoidingView.js +5 -1
  88. package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
  89. package/lib/commonjs/components/HMSLiveIndicator.js +2 -6
  90. package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
  91. package/lib/commonjs/components/HMSLiveViewerCount.js +8 -7
  92. package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -1
  93. package/lib/commonjs/components/HMSLocalScreenshareNotification.js +2 -1
  94. package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
  95. package/lib/commonjs/components/HMSNotification.js +31 -4
  96. package/lib/commonjs/components/HMSNotification.js.map +1 -1
  97. package/lib/commonjs/components/HMSNotifications.js +9 -2
  98. package/lib/commonjs/components/HMSNotifications.js.map +1 -1
  99. package/lib/commonjs/components/HMSOverlayChatView.js +44 -2
  100. package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
  101. package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
  102. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +2 -6
  103. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
  104. package/lib/commonjs/components/HMSPrimaryButton.js +4 -2
  105. package/lib/commonjs/components/HMSPrimaryButton.js.map +1 -1
  106. package/lib/commonjs/components/HMSRecordingIndicator.js +11 -16
  107. package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
  108. package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
  109. package/lib/commonjs/components/HMSTerminalErrorNotification.js +6 -2
  110. package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -1
  111. package/lib/commonjs/components/Header.js.map +1 -1
  112. package/lib/commonjs/components/LeaveRoomBottomSheet.js +3 -6
  113. package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
  114. package/lib/commonjs/components/Meeting.js +3 -0
  115. package/lib/commonjs/components/Meeting.js.map +1 -1
  116. package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
  117. package/lib/commonjs/components/Modals.js +9 -12
  118. package/lib/commonjs/components/Modals.js.map +1 -1
  119. package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +5 -1
  120. package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
  121. package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
  122. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  123. package/lib/commonjs/components/Preview.js +14 -1
  124. package/lib/commonjs/components/Preview.js.map +1 -1
  125. package/lib/commonjs/components/PreviewForRoleChangeModal.js +5 -4
  126. package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
  127. package/lib/commonjs/components/RoomSettingsModalContent.js +15 -6
  128. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  129. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +2 -4
  130. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
  131. package/lib/commonjs/components/WebrtcView.js.map +1 -1
  132. package/lib/commonjs/hooks-sdk-selectors.js +16 -1
  133. package/lib/commonjs/hooks-sdk-selectors.js.map +1 -1
  134. package/lib/commonjs/hooks-sdk.js +27 -1
  135. package/lib/commonjs/hooks-sdk.js.map +1 -1
  136. package/lib/commonjs/hooks-util-selectors.js +3 -3
  137. package/lib/commonjs/hooks-util-selectors.js.map +1 -1
  138. package/lib/commonjs/hooks-util.js +410 -64
  139. package/lib/commonjs/hooks-util.js.map +1 -1
  140. package/lib/commonjs/redux/actionTypes.js +16 -3
  141. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  142. package/lib/commonjs/redux/actions/index.js +44 -4
  143. package/lib/commonjs/redux/actions/index.js.map +1 -1
  144. package/lib/commonjs/redux/reducers/appState.js +41 -1
  145. package/lib/commonjs/redux/reducers/appState.js.map +1 -1
  146. package/lib/commonjs/redux/reducers/chatWindow.js +1 -2
  147. package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -1
  148. package/lib/commonjs/redux/reducers/hmsStates.js +21 -8
  149. package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
  150. package/lib/commonjs/redux/reducers/message.js +17 -4
  151. package/lib/commonjs/redux/reducers/message.js.map +1 -1
  152. package/lib/commonjs/types.js +4 -2
  153. package/lib/commonjs/types.js.map +1 -1
  154. package/lib/commonjs/utils/types.js +3 -0
  155. package/lib/commonjs/utils/types.js.map +1 -1
  156. package/lib/commonjs/utils.js +2 -2
  157. package/lib/commonjs/utils.js.map +1 -1
  158. package/lib/module/HMSContainer.js +23 -3
  159. package/lib/module/HMSContainer.js.map +1 -1
  160. package/lib/module/HMSRoomSetup.js +7 -9
  161. package/lib/module/HMSRoomSetup.js.map +1 -1
  162. package/lib/module/Icons/Chat/assets/chat-on.png +0 -0
  163. package/lib/module/Icons/Chat/assets/chat-on@2x.png +0 -0
  164. package/lib/module/Icons/Chat/assets/chat-on@3x.png +0 -0
  165. package/lib/module/Icons/Chat/index.js +4 -3
  166. package/lib/module/Icons/Chat/index.js.map +1 -1
  167. package/lib/module/Icons/NoEntry/assets/no-entry.png +0 -0
  168. package/lib/module/Icons/NoEntry/assets/no-entry@2x.png +0 -0
  169. package/lib/module/Icons/NoEntry/assets/no-entry@3x.png +0 -0
  170. package/lib/module/Icons/NoEntry/index.js +25 -0
  171. package/lib/module/Icons/NoEntry/index.js.map +1 -0
  172. package/lib/module/Icons/PauseCircle/assets/pause-circle.png +0 -0
  173. package/lib/module/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
  174. package/lib/module/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
  175. package/lib/module/Icons/PauseCircle/index.js +21 -0
  176. package/lib/module/Icons/PauseCircle/index.js.map +1 -0
  177. package/lib/module/Icons/Pin/assets/unpin.png +0 -0
  178. package/lib/module/Icons/Pin/assets/unpin@2x.png +0 -0
  179. package/lib/module/Icons/Pin/assets/unpin@3x.png +0 -0
  180. package/lib/module/Icons/Pin/index.js +2 -1
  181. package/lib/module/Icons/Pin/index.js.map +1 -1
  182. package/lib/module/Icons/Recording/assets/recording-pause.png +0 -0
  183. package/lib/module/Icons/Recording/assets/recording-pause@2x.png +0 -0
  184. package/lib/module/Icons/Recording/assets/recording-pause@3x.png +0 -0
  185. package/lib/module/Icons/Recording/index.js.map +1 -1
  186. package/lib/module/Icons/index.js +2 -0
  187. package/lib/module/Icons/index.js.map +1 -1
  188. package/lib/module/components/BottomSheet.js.map +1 -1
  189. package/lib/module/components/Chat/ChatFilterBottomSheet.js +28 -0
  190. package/lib/module/components/Chat/ChatFilterBottomSheet.js.map +1 -0
  191. package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js +93 -26
  192. package/lib/module/components/Chat/ChatFilterBottomSheetOpener.js.map +1 -1
  193. package/lib/module/components/Chat/ChatFilterItem.js +11 -8
  194. package/lib/module/components/Chat/ChatFilterItem.js.map +1 -1
  195. package/lib/module/components/Chat/ChatFilterView.js +55 -46
  196. package/lib/module/components/Chat/ChatFilterView.js.map +1 -1
  197. package/lib/module/components/Chat/ChatList.js +14 -7
  198. package/lib/module/components/Chat/ChatList.js.map +1 -1
  199. package/lib/module/components/Chat/ChatMessage.js +81 -9
  200. package/lib/module/components/Chat/ChatMessage.js.map +1 -1
  201. package/lib/module/components/Chat/ChatMoreActionsModal.js +53 -0
  202. package/lib/module/components/Chat/ChatMoreActionsModal.js.map +1 -0
  203. package/lib/module/components/Chat/ChatMoreActionsSheetView.js +55 -0
  204. package/lib/module/components/Chat/ChatMoreActionsSheetView.js.map +1 -0
  205. package/lib/module/components/Chat/ChatMoreActionsView.js +75 -0
  206. package/lib/module/components/Chat/ChatMoreActionsView.js.map +1 -0
  207. package/lib/module/components/Chat/ChatPaused.js +77 -0
  208. package/lib/module/components/Chat/ChatPaused.js.map +1 -0
  209. package/lib/module/components/Chat/MessageOptionsBottomSheet.js +26 -0
  210. package/lib/module/components/Chat/MessageOptionsBottomSheet.js.map +1 -0
  211. package/lib/module/components/Chat/MessageOptionsBottomSheetView.js +58 -0
  212. package/lib/module/components/Chat/MessageOptionsBottomSheetView.js.map +1 -0
  213. package/lib/module/components/Chat/MessageOptionsView.js +180 -0
  214. package/lib/module/components/Chat/MessageOptionsView.js.map +1 -0
  215. package/lib/module/components/Chat/PeerBlockedFromChat.js +38 -0
  216. package/lib/module/components/Chat/PeerBlockedFromChat.js.map +1 -0
  217. package/lib/module/components/Chat/PinnedMessages.js +288 -0
  218. package/lib/module/components/Chat/PinnedMessages.js.map +1 -0
  219. package/lib/module/components/Chat/index.js +1 -1
  220. package/lib/module/components/Chat/index.js.map +1 -1
  221. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
  222. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js +24 -5
  223. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsHeader.js.map +1 -1
  224. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +3 -1
  225. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
  226. package/lib/module/components/ChatAndParticipants/ChatView.js +22 -3
  227. package/lib/module/components/ChatAndParticipants/ChatView.js.map +1 -1
  228. package/lib/module/components/EndRoomModalContent.js +6 -9
  229. package/lib/module/components/EndRoomModalContent.js.map +1 -1
  230. package/lib/module/components/Footer.js.map +1 -1
  231. package/lib/module/components/GridView.js.map +1 -1
  232. package/lib/module/components/HLSView.js +9 -7
  233. package/lib/module/components/HLSView.js.map +1 -1
  234. package/lib/module/components/HMSBaseButton.js +10 -2
  235. package/lib/module/components/HMSBaseButton.js.map +1 -1
  236. package/lib/module/components/HMSDangerButton.js +4 -2
  237. package/lib/module/components/HMSDangerButton.js.map +1 -1
  238. package/lib/module/components/HMSHLSMessage.js +88 -3
  239. package/lib/module/components/HMSHLSMessage.js.map +1 -1
  240. package/lib/module/components/HMSHLSMessageList.js +2 -2
  241. package/lib/module/components/HMSHLSMessageList.js.map +1 -1
  242. package/lib/module/components/HMSHandRaiseNotification.js +6 -3
  243. package/lib/module/components/HMSHandRaiseNotification.js.map +1 -1
  244. package/lib/module/components/HMSKeyboardAvoidingView.js +6 -2
  245. package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
  246. package/lib/module/components/HMSLiveIndicator.js +2 -6
  247. package/lib/module/components/HMSLiveIndicator.js.map +1 -1
  248. package/lib/module/components/HMSLiveViewerCount.js +8 -7
  249. package/lib/module/components/HMSLiveViewerCount.js.map +1 -1
  250. package/lib/module/components/HMSLocalScreenshareNotification.js +2 -1
  251. package/lib/module/components/HMSLocalScreenshareNotification.js.map +1 -1
  252. package/lib/module/components/HMSNotification.js +32 -5
  253. package/lib/module/components/HMSNotification.js.map +1 -1
  254. package/lib/module/components/HMSNotifications.js +9 -2
  255. package/lib/module/components/HMSNotifications.js.map +1 -1
  256. package/lib/module/components/HMSOverlayChatView.js +45 -3
  257. package/lib/module/components/HMSOverlayChatView.js.map +1 -1
  258. package/lib/module/components/HMSPreviewEditName.js.map +1 -1
  259. package/lib/module/components/HMSPreviewHLSLiveIndicator.js +2 -6
  260. package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
  261. package/lib/module/components/HMSPrimaryButton.js +4 -2
  262. package/lib/module/components/HMSPrimaryButton.js.map +1 -1
  263. package/lib/module/components/HMSRecordingIndicator.js +11 -16
  264. package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
  265. package/lib/module/components/HMSRoomOptions.js.map +1 -1
  266. package/lib/module/components/HMSTerminalErrorNotification.js +6 -2
  267. package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -1
  268. package/lib/module/components/Header.js.map +1 -1
  269. package/lib/module/components/LeaveRoomBottomSheet.js +3 -6
  270. package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
  271. package/lib/module/components/Meeting.js +4 -1
  272. package/lib/module/components/Meeting.js.map +1 -1
  273. package/lib/module/components/MeetingScreenContent.js.map +1 -1
  274. package/lib/module/components/Modals.js +10 -13
  275. package/lib/module/components/Modals.js.map +1 -1
  276. package/lib/module/components/Participants/ParticipantsItemOptions.js +5 -1
  277. package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
  278. package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
  279. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  280. package/lib/module/components/Preview.js +13 -2
  281. package/lib/module/components/Preview.js.map +1 -1
  282. package/lib/module/components/PreviewForRoleChangeModal.js +5 -4
  283. package/lib/module/components/PreviewForRoleChangeModal.js.map +1 -1
  284. package/lib/module/components/RoomSettingsModalContent.js +16 -7
  285. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  286. package/lib/module/components/RoomSettingsModalDebugModeContent.js +3 -5
  287. package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
  288. package/lib/module/components/WebrtcView.js.map +1 -1
  289. package/lib/module/hooks-sdk-selectors.js +12 -0
  290. package/lib/module/hooks-sdk-selectors.js.map +1 -1
  291. package/lib/module/hooks-sdk.js +23 -1
  292. package/lib/module/hooks-sdk.js.map +1 -1
  293. package/lib/module/hooks-util-selectors.js +3 -3
  294. package/lib/module/hooks-util-selectors.js.map +1 -1
  295. package/lib/module/hooks-util.js +400 -65
  296. package/lib/module/hooks-util.js.map +1 -1
  297. package/lib/module/redux/actionTypes.js +16 -3
  298. package/lib/module/redux/actionTypes.js.map +1 -1
  299. package/lib/module/redux/actions/index.js +36 -2
  300. package/lib/module/redux/actions/index.js.map +1 -1
  301. package/lib/module/redux/reducers/appState.js +41 -1
  302. package/lib/module/redux/reducers/appState.js.map +1 -1
  303. package/lib/module/redux/reducers/chatWindow.js +1 -2
  304. package/lib/module/redux/reducers/chatWindow.js.map +1 -1
  305. package/lib/module/redux/reducers/hmsStates.js +21 -8
  306. package/lib/module/redux/reducers/hmsStates.js.map +1 -1
  307. package/lib/module/redux/reducers/message.js +17 -4
  308. package/lib/module/redux/reducers/message.js.map +1 -1
  309. package/lib/module/types.js +4 -2
  310. package/lib/module/types.js.map +1 -1
  311. package/lib/module/utils/types.js +3 -0
  312. package/lib/module/utils/types.js.map +1 -1
  313. package/lib/module/utils.js +2 -2
  314. package/lib/module/utils.js.map +1 -1
  315. package/lib/typescript/HMSContainer.d.ts +1 -1
  316. package/lib/typescript/HMSContainer.d.ts.map +1 -1
  317. package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
  318. package/lib/typescript/Icons/Chat/index.d.ts +1 -0
  319. package/lib/typescript/Icons/Chat/index.d.ts.map +1 -1
  320. package/lib/typescript/Icons/NoEntry/index.d.ts +7 -0
  321. package/lib/typescript/Icons/NoEntry/index.d.ts.map +1 -0
  322. package/lib/typescript/Icons/PauseCircle/index.d.ts +7 -0
  323. package/lib/typescript/Icons/PauseCircle/index.d.ts.map +1 -0
  324. package/lib/typescript/Icons/Pin/index.d.ts +1 -0
  325. package/lib/typescript/Icons/Pin/index.d.ts.map +1 -1
  326. package/lib/typescript/Icons/index.d.ts +2 -0
  327. package/lib/typescript/Icons/index.d.ts.map +1 -1
  328. package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
  329. package/lib/typescript/components/Chat/ChatFilterBottomSheet.d.ts +3 -0
  330. package/lib/typescript/components/Chat/ChatFilterBottomSheet.d.ts.map +1 -0
  331. package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts +1 -0
  332. package/lib/typescript/components/Chat/ChatFilterBottomSheetOpener.d.ts.map +1 -1
  333. package/lib/typescript/components/Chat/ChatFilterItem.d.ts +1 -0
  334. package/lib/typescript/components/Chat/ChatFilterItem.d.ts.map +1 -1
  335. package/lib/typescript/components/Chat/ChatFilterView.d.ts +1 -0
  336. package/lib/typescript/components/Chat/ChatFilterView.d.ts.map +1 -1
  337. package/lib/typescript/components/Chat/ChatList.d.ts.map +1 -1
  338. package/lib/typescript/components/Chat/ChatMessage.d.ts.map +1 -1
  339. package/lib/typescript/components/Chat/ChatMoreActionsModal.d.ts +7 -0
  340. package/lib/typescript/components/Chat/ChatMoreActionsModal.d.ts.map +1 -0
  341. package/lib/typescript/components/Chat/ChatMoreActionsSheetView.d.ts +6 -0
  342. package/lib/typescript/components/Chat/ChatMoreActionsSheetView.d.ts.map +1 -0
  343. package/lib/typescript/components/Chat/ChatMoreActionsView.d.ts +7 -0
  344. package/lib/typescript/components/Chat/ChatMoreActionsView.d.ts.map +1 -0
  345. package/lib/typescript/components/Chat/ChatPaused.d.ts +10 -0
  346. package/lib/typescript/components/Chat/ChatPaused.d.ts.map +1 -0
  347. package/lib/typescript/components/Chat/MessageOptionsBottomSheet.d.ts +3 -0
  348. package/lib/typescript/components/Chat/MessageOptionsBottomSheet.d.ts.map +1 -0
  349. package/lib/typescript/components/Chat/MessageOptionsBottomSheetView.d.ts +6 -0
  350. package/lib/typescript/components/Chat/MessageOptionsBottomSheetView.d.ts.map +1 -0
  351. package/lib/typescript/components/Chat/MessageOptionsView.d.ts +7 -0
  352. package/lib/typescript/components/Chat/MessageOptionsView.d.ts.map +1 -0
  353. package/lib/typescript/components/Chat/PeerBlockedFromChat.d.ts +9 -0
  354. package/lib/typescript/components/Chat/PeerBlockedFromChat.d.ts.map +1 -0
  355. package/lib/typescript/components/Chat/PinnedMessages.d.ts +8 -0
  356. package/lib/typescript/components/Chat/PinnedMessages.d.ts.map +1 -0
  357. package/lib/typescript/components/Chat/index.d.ts +1 -1
  358. package/lib/typescript/components/Chat/index.d.ts.map +1 -1
  359. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -1
  360. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsHeader.d.ts.map +1 -1
  361. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -1
  362. package/lib/typescript/components/ChatAndParticipants/ChatView.d.ts.map +1 -1
  363. package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
  364. package/lib/typescript/components/Footer.d.ts.map +1 -1
  365. package/lib/typescript/components/GridView.d.ts.map +1 -1
  366. package/lib/typescript/components/HMSBaseButton.d.ts +1 -0
  367. package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -1
  368. package/lib/typescript/components/HMSDangerButton.d.ts +1 -0
  369. package/lib/typescript/components/HMSDangerButton.d.ts.map +1 -1
  370. package/lib/typescript/components/HMSHLSMessage.d.ts +1 -1
  371. package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -1
  372. package/lib/typescript/components/HMSHandRaiseNotification.d.ts.map +1 -1
  373. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
  374. package/lib/typescript/components/HMSLiveIndicator.d.ts.map +1 -1
  375. package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -1
  376. package/lib/typescript/components/HMSLocalScreenshareNotification.d.ts.map +1 -1
  377. package/lib/typescript/components/HMSNotification.d.ts +2 -1
  378. package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
  379. package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
  380. package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
  381. package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -1
  382. package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
  383. package/lib/typescript/components/HMSPrimaryButton.d.ts +1 -0
  384. package/lib/typescript/components/HMSPrimaryButton.d.ts.map +1 -1
  385. package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
  386. package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
  387. package/lib/typescript/components/HMSTerminalErrorNotification.d.ts.map +1 -1
  388. package/lib/typescript/components/Header.d.ts.map +1 -1
  389. package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -1
  390. package/lib/typescript/components/Meeting.d.ts.map +1 -1
  391. package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
  392. package/lib/typescript/components/Modals.d.ts.map +1 -1
  393. package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -1
  394. package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
  395. package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
  396. package/lib/typescript/components/Preview.d.ts.map +1 -1
  397. package/lib/typescript/components/PreviewForRoleChangeModal.d.ts.map +1 -1
  398. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  399. package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts.map +1 -1
  400. package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
  401. package/lib/typescript/hooks-sdk-selectors.d.ts +3 -0
  402. package/lib/typescript/hooks-sdk-selectors.d.ts.map +1 -1
  403. package/lib/typescript/hooks-sdk.d.ts +4 -0
  404. package/lib/typescript/hooks-sdk.d.ts.map +1 -1
  405. package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
  406. package/lib/typescript/hooks-util.d.ts +35 -3
  407. package/lib/typescript/hooks-util.d.ts.map +1 -1
  408. package/lib/typescript/redux/actionTypes.d.ts +9 -2
  409. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  410. package/lib/typescript/redux/actions/index.d.ts +37 -3
  411. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  412. package/lib/typescript/redux/index.d.ts +7 -2
  413. package/lib/typescript/redux/index.d.ts.map +1 -1
  414. package/lib/typescript/redux/reducers/appState.d.ts +7 -2
  415. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
  416. package/lib/typescript/redux/reducers/chatWindow.d.ts +1 -1
  417. package/lib/typescript/redux/reducers/chatWindow.d.ts.map +1 -1
  418. package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
  419. package/lib/typescript/redux/reducers/index.d.ts +7 -2
  420. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  421. package/lib/typescript/redux/reducers/message.d.ts +3 -2
  422. package/lib/typescript/redux/reducers/message.d.ts.map +1 -1
  423. package/lib/typescript/types.d.ts +26 -5
  424. package/lib/typescript/types.d.ts.map +1 -1
  425. package/lib/typescript/utils/types.d.ts +3 -0
  426. package/lib/typescript/utils/types.d.ts.map +1 -1
  427. package/package.json +179 -179
  428. package/src/HMSContainer.tsx +26 -5
  429. package/src/HMSRoomSetup.tsx +9 -9
  430. package/src/Icons/Chat/assets/chat-on.png +0 -0
  431. package/src/Icons/Chat/assets/chat-on@2x.png +0 -0
  432. package/src/Icons/Chat/assets/chat-on@3x.png +0 -0
  433. package/src/Icons/Chat/index.tsx +19 -6
  434. package/src/Icons/NoEntry/assets/no-entry.png +0 -0
  435. package/src/Icons/NoEntry/assets/no-entry@2x.png +0 -0
  436. package/src/Icons/NoEntry/assets/no-entry@3x.png +0 -0
  437. package/src/Icons/NoEntry/index.tsx +33 -0
  438. package/src/Icons/PauseCircle/assets/pause-circle.png +0 -0
  439. package/src/Icons/PauseCircle/assets/pause-circle@2x.png +0 -0
  440. package/src/Icons/PauseCircle/assets/pause-circle@3x.png +0 -0
  441. package/src/Icons/PauseCircle/index.tsx +27 -0
  442. package/src/Icons/Pin/assets/unpin.png +0 -0
  443. package/src/Icons/Pin/assets/unpin@2x.png +0 -0
  444. package/src/Icons/Pin/assets/unpin@3x.png +0 -0
  445. package/src/Icons/Pin/index.tsx +13 -3
  446. package/src/Icons/Recording/assets/recording-pause.png +0 -0
  447. package/src/Icons/Recording/assets/recording-pause@2x.png +0 -0
  448. package/src/Icons/Recording/assets/recording-pause@3x.png +0 -0
  449. package/src/Icons/Recording/index.tsx +2 -2
  450. package/src/Icons/index.ts +2 -0
  451. package/src/components/BottomSheet.tsx +13 -3
  452. package/src/components/Chat/ChatFilterBottomSheet.tsx +35 -0
  453. package/src/components/Chat/ChatFilterBottomSheetOpener.tsx +170 -42
  454. package/src/components/Chat/ChatFilterItem.tsx +8 -4
  455. package/src/components/Chat/ChatFilterView.tsx +102 -75
  456. package/src/components/Chat/ChatList.tsx +18 -6
  457. package/src/components/Chat/ChatMessage.tsx +111 -7
  458. package/src/components/Chat/ChatMoreActionsModal.tsx +75 -0
  459. package/src/components/Chat/ChatMoreActionsSheetView.tsx +77 -0
  460. package/src/components/Chat/ChatMoreActionsView.tsx +84 -0
  461. package/src/components/Chat/ChatPaused.tsx +103 -0
  462. package/src/components/Chat/MessageOptionsBottomSheet.tsx +33 -0
  463. package/src/components/Chat/MessageOptionsBottomSheetView.tsx +82 -0
  464. package/src/components/Chat/MessageOptionsView.tsx +248 -0
  465. package/src/components/Chat/PeerBlockedFromChat.tsx +49 -0
  466. package/src/components/Chat/PinnedMessages.tsx +422 -0
  467. package/src/components/Chat/index.ts +1 -1
  468. package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +4 -1
  469. package/src/components/ChatAndParticipants/ChatAndParticipantsHeader.tsx +48 -12
  470. package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +9 -1
  471. package/src/components/ChatAndParticipants/ChatView.tsx +37 -5
  472. package/src/components/EndRoomModalContent.tsx +11 -14
  473. package/src/components/Footer.tsx +3 -1
  474. package/src/components/GridView.tsx +17 -8
  475. package/src/components/HLSView.tsx +45 -45
  476. package/src/components/HMSBaseButton.tsx +17 -2
  477. package/src/components/HMSDangerButton.tsx +3 -0
  478. package/src/components/HMSHLSMessage.tsx +130 -13
  479. package/src/components/HMSHLSMessageList.tsx +2 -2
  480. package/src/components/HMSHandRaiseNotification.tsx +17 -10
  481. package/src/components/HMSKeyboardAvoidingView.tsx +6 -1
  482. package/src/components/HMSLiveIndicator.tsx +9 -13
  483. package/src/components/HMSLiveViewerCount.tsx +21 -20
  484. package/src/components/HMSLocalScreenshareNotification.tsx +1 -0
  485. package/src/components/HMSNotification.tsx +56 -13
  486. package/src/components/HMSNotifications.tsx +12 -2
  487. package/src/components/HMSOverlayChatView.tsx +74 -17
  488. package/src/components/HMSPreviewEditName.tsx +3 -1
  489. package/src/components/HMSPreviewHLSLiveIndicator.tsx +2 -6
  490. package/src/components/HMSPrimaryButton.tsx +3 -0
  491. package/src/components/HMSRecordingIndicator.tsx +8 -22
  492. package/src/components/HMSRoomOptions.tsx +4 -1
  493. package/src/components/HMSTerminalErrorNotification.tsx +15 -10
  494. package/src/components/Header.tsx +4 -1
  495. package/src/components/LeaveRoomBottomSheet.tsx +13 -11
  496. package/src/components/Meeting.tsx +4 -0
  497. package/src/components/MeetingScreenContent.tsx +24 -21
  498. package/src/components/Modals.tsx +23 -25
  499. package/src/components/Participants/ParticipantsItemOptions.tsx +12 -7
  500. package/src/components/PeerSettingsModalContent.tsx +3 -1
  501. package/src/components/PeerVideoTile/PeerVideoTileView.tsx +3 -1
  502. package/src/components/Preview.tsx +15 -2
  503. package/src/components/PreviewForRoleChangeModal.tsx +4 -3
  504. package/src/components/RoomSettingsModalContent.tsx +62 -18
  505. package/src/components/RoomSettingsModalDebugModeContent.tsx +2 -5
  506. package/src/components/WebrtcView.tsx +6 -2
  507. package/src/hooks-sdk-selectors.tsx +19 -0
  508. package/src/hooks-sdk.ts +37 -0
  509. package/src/hooks-util-selectors.tsx +2 -3
  510. package/src/hooks-util.ts +580 -90
  511. package/src/redux/actionTypes.ts +22 -2
  512. package/src/redux/actions/index.ts +41 -4
  513. package/src/redux/reducers/appState.ts +54 -5
  514. package/src/redux/reducers/chatWindow.ts +2 -2
  515. package/src/redux/reducers/hmsStates.ts +36 -13
  516. package/src/redux/reducers/message.ts +20 -6
  517. package/src/types.ts +36 -6
  518. package/src/utils/types.ts +3 -0
  519. package/src/utils.ts +2 -2
  520. package/lib/commonjs/components/Chat/PinnedMessage.js +0 -81
  521. package/lib/commonjs/components/Chat/PinnedMessage.js.map +0 -1
  522. package/lib/module/components/Chat/PinnedMessage.js +0 -72
  523. package/lib/module/components/Chat/PinnedMessage.js.map +0 -1
  524. package/lib/typescript/components/Chat/PinnedMessage.d.ts +0 -3
  525. package/lib/typescript/components/Chat/PinnedMessage.d.ts.map +0 -1
  526. package/src/components/Chat/PinnedMessage.tsx +0 -89
@@ -2,21 +2,27 @@ import * as React from 'react';
2
2
  import { FlashList } from '@shopify/flash-list';
3
3
  import { StyleSheet, Text, View } from 'react-native';
4
4
  import { useDispatch, useSelector } from 'react-redux';
5
- import { useHMSInstance, useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../../hooks-util';
5
+ import { useHMSChatRecipientSelector, useHMSInstance, useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../../hooks-util';
6
6
  import { BottomSheet } from '../BottomSheet';
7
7
  import { HMSTextInput } from '../HMSTextInput';
8
8
  import { ParticipantsIcon, SearchIcon } from '../../Icons';
9
9
  import { ChatFilterItem } from './ChatFilterItem';
10
10
  import { setChatFilterSheetVisible } from '../../redux/actions';
11
11
  import { ChatBroadcastFilter } from '../../utils/types';
12
- const _ChatFilterView = () => {
12
+ const _ChatFilterView = ({
13
+ onDismiss
14
+ }) => {
13
15
  const hmsInstance = useHMSInstance();
14
16
  const dispatch = useDispatch();
15
17
  const filter = useSelector(state => state.chatWindow.sendTo);
16
- const roles = useSelector(state => state.hmsStates.roles);
17
18
  const [loadingPeersList, setLoadingPeersList] = React.useState(false);
18
19
  const [remotePeers, setRemotePeers] = React.useState([]);
19
20
  const [filterText, setFilterText] = React.useState('');
21
+ const {
22
+ privateChat,
23
+ publicChat,
24
+ roles: rolesSpecificChat
25
+ } = useHMSChatRecipientSelector();
20
26
  const {
21
27
  on_surface_medium: onSurfaceMediumColor
22
28
  } = useHMSRoomColorPalette();
@@ -35,31 +41,38 @@ const _ChatFilterView = () => {
35
41
  }
36
42
  }));
37
43
  React.useEffect(() => {
38
- let mounted = true;
39
- const fetchRemotePeers = async () => {
40
- setLoadingPeersList(true);
41
- const fetchedRemotePeers = await hmsInstance.getRemotePeers();
42
- if (mounted) {
43
- setLoadingPeersList(false);
44
- setRemotePeers(fetchedRemotePeers);
45
- }
46
- };
47
- fetchRemotePeers();
48
- return () => {
49
- mounted = false;
50
- };
51
- }, [hmsInstance]);
44
+ if (privateChat) {
45
+ let mounted = true;
46
+ const fetchRemotePeers = async () => {
47
+ setLoadingPeersList(true);
48
+ const fetchedRemotePeers = await hmsInstance.getRemotePeers();
49
+ if (mounted) {
50
+ setLoadingPeersList(false);
51
+ setRemotePeers(fetchedRemotePeers);
52
+ }
53
+ };
54
+ fetchRemotePeers();
55
+ return () => {
56
+ mounted = false;
57
+ };
58
+ }
59
+ }, [privateChat, hmsInstance]);
52
60
  const _keyExtractor = React.useCallback(item => item.peerID, []);
53
61
  const _renderItem = React.useCallback(({
54
62
  item,
55
63
  extraData
56
64
  }) => /*#__PURE__*/React.createElement(ChatFilterItem, {
57
65
  item: item,
58
- active: extraData.name === item.name,
59
- disabled: extraData.name === item.name
60
- }), []);
66
+ active: extraData && extraData.name === item.name,
67
+ disabled: extraData && extraData.name === item.name,
68
+ onDismiss: onDismiss
69
+ }), [onDismiss]);
61
70
  const closeFiltersBottomSheet = () => {
62
- dispatch(setChatFilterSheetVisible(false));
71
+ if (onDismiss) {
72
+ onDismiss();
73
+ } else {
74
+ dispatch(setChatFilterSheetVisible(false));
75
+ }
63
76
  };
64
77
  const formattedFilterText = filterText.trim().toLowerCase();
65
78
 
@@ -72,16 +85,8 @@ const _ChatFilterView = () => {
72
85
  }, [formattedFilterText, remotePeers]);
73
86
 
74
87
  // Filtering Broadcast option
75
- const showBroadcastOption = formattedFilterText.length > 0 ? ChatBroadcastFilter.name.includes(formattedFilterText) : true;
76
-
77
- // Filtering Roles
78
- const foundRoles = roles.filter(role => {
79
- if (!role.name || role.name.startsWith('_')) {
80
- return false;
81
- }
82
- return formattedFilterText.length > 0 ? role.name.toLowerCase().includes(formattedFilterText) : true;
83
- });
84
- const isBroadcastFilterSelected = !('publishSettings' in filter || 'peerId' in filter) &&
88
+ const showBroadcastOption = publicChat ? formattedFilterText.length > 0 ? ChatBroadcastFilter.name.includes(formattedFilterText) : true : false;
89
+ const isBroadcastFilterSelected = filter !== null && !('publishSettings' in filter || 'peerId' in filter) &&
85
90
  // filter is not HMSRole and HMSRemotePeer
86
91
  filter.name === ChatBroadcastFilter.name;
87
92
  return /*#__PURE__*/React.createElement(View, {
@@ -93,7 +98,7 @@ const _ChatFilterView = () => {
93
98
  dismissModal: closeFiltersBottomSheet
94
99
  }), /*#__PURE__*/React.createElement(BottomSheet.Divider, {
95
100
  style: styles.headerDivider
96
- }), /*#__PURE__*/React.createElement(HMSTextInput, {
101
+ }), privateChat ? /*#__PURE__*/React.createElement(HMSTextInput, {
97
102
  value: filterText,
98
103
  onChangeText: setFilterText,
99
104
  placeholder: "Search for participants",
@@ -103,7 +108,7 @@ const _ChatFilterView = () => {
103
108
  leftIcon: /*#__PURE__*/React.createElement(SearchIcon, {
104
109
  style: styles.textInputSearchIcon
105
110
  })
106
- }), /*#__PURE__*/React.createElement(FlashList, {
111
+ }) : null, /*#__PURE__*/React.createElement(FlashList, {
107
112
  data: filteredRemotePeers,
108
113
  extraData: filter,
109
114
  estimatedItemSize: 104,
@@ -111,34 +116,38 @@ const _ChatFilterView = () => {
111
116
  keyboardShouldPersistTaps: "always",
112
117
  keyExtractor: _keyExtractor,
113
118
  renderItem: _renderItem,
114
- ListEmptyComponent: /*#__PURE__*/React.createElement(View, {
119
+ ListEmptyComponent: privateChat ? /*#__PURE__*/React.createElement(View, {
115
120
  style: styles.placeholderContainer
116
121
  }, /*#__PURE__*/React.createElement(Text, {
117
122
  style: [styles.placeholderText, hmsRoomStyles.placeholderText]
118
- }, loadingPeersList ? 'Loading Participants...' : formattedFilterText.length > 0 ? 'No participants found!' : 'There is no one in the session!')),
119
- ListHeaderComponent: /*#__PURE__*/React.createElement(View, null, showBroadcastOption ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ChatFilterItem, {
123
+ }, loadingPeersList ? 'Loading Participants...' : formattedFilterText.length > 0 ? 'No participants found!' : 'There is no one in the session!')) : null,
124
+ ListHeaderComponent: /*#__PURE__*/React.createElement(View, null, showBroadcastOption ? /*#__PURE__*/React.createElement(ChatFilterItem, {
120
125
  item: ChatBroadcastFilter,
121
126
  active: isBroadcastFilterSelected,
122
127
  disabled: isBroadcastFilterSelected,
123
- icon: /*#__PURE__*/React.createElement(ParticipantsIcon, null)
124
- }), /*#__PURE__*/React.createElement(BottomSheet.Divider, {
128
+ icon: /*#__PURE__*/React.createElement(ParticipantsIcon, null),
129
+ onDismiss: onDismiss
130
+ }) : null, showBroadcastOption && rolesSpecificChat.length > 0 ? /*#__PURE__*/React.createElement(BottomSheet.Divider, {
125
131
  style: styles.divider
126
- })) : null, foundRoles.length > 0 ? /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
132
+ }) : null, rolesSpecificChat.length > 0 ? /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, {
127
133
  style: [styles.label, hmsRoomStyles.label]
128
- }, "ROLES"), foundRoles.map(role => {
129
- const isRoleSelected = ('publishSettings' in filter);
130
- const isActive = isRoleSelected && filter.name === role.name;
134
+ }, "ROLES"), rolesSpecificChat.map(role => {
135
+ const isRoleSelected = filter !== null && 'publishSettings' in filter;
136
+ const isActive = filter !== null && isRoleSelected && filter.name === role.name;
131
137
  return /*#__PURE__*/React.createElement(ChatFilterItem, {
132
138
  key: role.name,
133
139
  item: role,
134
140
  active: isActive,
135
- disabled: isActive
141
+ disabled: isActive,
142
+ onDismiss: onDismiss
136
143
  });
137
- }), /*#__PURE__*/React.createElement(BottomSheet.Divider, {
144
+ })) : null, rolesSpecificChat.length > 0 && privateChat ? /*#__PURE__*/React.createElement(BottomSheet.Divider, {
145
+ style: styles.divider
146
+ }) : null, rolesSpecificChat.length <= 0 && privateChat && showBroadcastOption ? /*#__PURE__*/React.createElement(BottomSheet.Divider, {
138
147
  style: styles.divider
139
- })) : null, /*#__PURE__*/React.createElement(Text, {
148
+ }) : null, privateChat ? /*#__PURE__*/React.createElement(Text, {
140
149
  style: [styles.label, hmsRoomStyles.label]
141
- }, "PARTICIPANTS"))
150
+ }, "PARTICIPANTS") : null)
142
151
  }));
143
152
  };
144
153
  const styles = StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"names":["React","FlashList","StyleSheet","Text","View","useDispatch","useSelector","useHMSInstance","useHMSRoomColorPalette","useHMSRoomStyleSheet","BottomSheet","HMSTextInput","ParticipantsIcon","SearchIcon","ChatFilterItem","setChatFilterSheetVisible","ChatBroadcastFilter","_ChatFilterView","hmsInstance","dispatch","filter","state","chatWindow","sendTo","roles","hmsStates","loadingPeersList","setLoadingPeersList","useState","remotePeers","setRemotePeers","filterText","setFilterText","on_surface_medium","onSurfaceMediumColor","hmsRoomStyles","theme","typography","textInputContainer","backgroundColor","palette","surface_dim","borderColor","border_bright","placeholderText","color","on_surface_high","fontFamily","font_family","label","useEffect","mounted","fetchRemotePeers","fetchedRemotePeers","getRemotePeers","_keyExtractor","useCallback","item","peerID","_renderItem","extraData","createElement","active","name","disabled","closeFiltersBottomSheet","formattedFilterText","trim","toLowerCase","filteredRemotePeers","useMemo","length","remotePeer","includes","showBroadcastOption","foundRoles","role","startsWith","isBroadcastFilterSelected","style","flex","Header","heading","dismissModal","Divider","styles","headerDivider","value","onChangeText","placeholder","containerStyle","focusedContainerStyle","textInputFocusedContainer","placeholderTextColor","leftIcon","textInputSearchIcon","data","estimatedItemSize","contentContainerStyle","list","keyboardShouldPersistTaps","keyExtractor","renderItem","ListEmptyComponent","placeholderContainer","ListHeaderComponent","Fragment","icon","divider","map","isRoleSelected","isActive","key","create","marginVertical","borderWidth","marginHorizontal","height","paddingHorizontal","marginRight","alignSelf","paddingBottom","marginTop","fontSize","lineHeight","letterSpacing","textAlign","ChatFilterView","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatFilterView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,SAAS,QAA6B,qBAAqB;AACpE,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,WAAW,EAA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EAAEd,aAAa,CAACc,KAAK;IAAE,GAAC,cAE5C,CACF;EACP,CACF,CACG,CAAC;AAEX,CAAC;AAED,MAAMoC,MAAM,GAAGnF,UAAU,CAAC+G,MAAM,CAAC;EAC/B3B,aAAa,EAAE;IACb4B,cAAc,EAAE;EAClB,CAAC;EACD5E,kBAAkB,EAAE;IAClB6E,WAAW,EAAE,CAAC;IACdnC,IAAI,EAAE,CAAC;IACPoC,gBAAgB,EAAE,EAAE;IACpBC,MAAM,EAAE,EAAE;IACVC,iBAAiB,EAAE;EACrB,CAAC;EACD1B,yBAAyB,EAAE;IACzBuB,WAAW,EAAE;EACf,CAAC;EACDpB,mBAAmB,EAAE;IACnBwB,WAAW,EAAE,CAAC;IACdC,SAAS,EAAE;EACb,CAAC;EACDrB,IAAI,EAAE;IACJsB,aAAa,EAAE;EACjB,CAAC;EACDjB,oBAAoB,EAAE;IACpBkB,SAAS,EAAE;EACb,CAAC;EACD9E,eAAe,EAAE;IACf+E,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,GAAG;IAClBC,SAAS,EAAE;EACb,CAAC;EACDlB,OAAO,EAAE;IACPM,cAAc,EAAE;EAClB,CAAC;EACDjE,KAAK,EAAE;IACL0E,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,GAAG;IAClBT,gBAAgB,EAAE,EAAE;IACpBM,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,OAAO,MAAMK,cAAc,gBAAG/H,KAAK,CAACgI,IAAI,CAAC/G,eAAe,CAAC"}
1
+ {"version":3,"names":["React","FlashList","StyleSheet","Text","View","useDispatch","useSelector","useHMSChatRecipientSelector","useHMSInstance","useHMSRoomColorPalette","useHMSRoomStyleSheet","BottomSheet","HMSTextInput","ParticipantsIcon","SearchIcon","ChatFilterItem","setChatFilterSheetVisible","ChatBroadcastFilter","_ChatFilterView","onDismiss","hmsInstance","dispatch","filter","state","chatWindow","sendTo","loadingPeersList","setLoadingPeersList","useState","remotePeers","setRemotePeers","filterText","setFilterText","privateChat","publicChat","roles","rolesSpecificChat","on_surface_medium","onSurfaceMediumColor","hmsRoomStyles","theme","typography","textInputContainer","backgroundColor","palette","surface_dim","borderColor","border_bright","placeholderText","color","on_surface_high","fontFamily","font_family","label","useEffect","mounted","fetchRemotePeers","fetchedRemotePeers","getRemotePeers","_keyExtractor","useCallback","item","peerID","_renderItem","extraData","createElement","active","name","disabled","closeFiltersBottomSheet","formattedFilterText","trim","toLowerCase","filteredRemotePeers","useMemo","length","remotePeer","includes","showBroadcastOption","isBroadcastFilterSelected","style","flex","Header","heading","dismissModal","Divider","styles","headerDivider","value","onChangeText","placeholder","containerStyle","focusedContainerStyle","textInputFocusedContainer","placeholderTextColor","leftIcon","textInputSearchIcon","data","estimatedItemSize","contentContainerStyle","list","keyboardShouldPersistTaps","keyExtractor","renderItem","ListEmptyComponent","placeholderContainer","ListHeaderComponent","icon","divider","map","role","isRoleSelected","isActive","key","create","marginVertical","borderWidth","marginHorizontal","height","paddingHorizontal","marginRight","alignSelf","paddingBottom","marginTop","fontSize","lineHeight","letterSpacing","textAlign","ChatFilterView","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatFilterView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,SAAS,QAA6B,qBAAqB;AACpE,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAEtD,SACEC,2BAA2B,EAC3BC,cAAc,EACdC,sBAAsB,EACtBC,oBAAoB,QACf,kBAAkB;AAEzB,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,gBAAgB,EAAEC,UAAU,QAAQ,aAAa;AAC1D,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,yBAAyB,QAAQ,qBAAqB;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WAAW,gBACVjC,KAAA,CAAAiE,aAAA,CAAC9D,IAAI;MAAC6E,KAAK,EAAE,CAACM,MAAM,CAACjC,KAAK,EAAEd,aAAa,CAACc,KAAK;IAAE,GAAC,cAE5C,CAAC,GACL,IACA;EACP,CACF,CACG,CAAC;AAEX,CAAC;AAED,MAAMiC,MAAM,GAAGpF,UAAU,CAACgH,MAAM,CAAC;EAC/B3B,aAAa,EAAE;IACb4B,cAAc,EAAE;EAClB,CAAC;EACDzE,kBAAkB,EAAE;IAClB0E,WAAW,EAAE,CAAC;IACdnC,IAAI,EAAE,CAAC;IACPoC,gBAAgB,EAAE,EAAE;IACpBC,MAAM,EAAE,EAAE;IACVC,iBAAiB,EAAE;EACrB,CAAC;EACD1B,yBAAyB,EAAE;IACzBuB,WAAW,EAAE;EACf,CAAC;EACDpB,mBAAmB,EAAE;IACnBwB,WAAW,EAAE,CAAC;IACdC,SAAS,EAAE;EACb,CAAC;EACDrB,IAAI,EAAE;IACJsB,aAAa,EAAE;EACjB,CAAC;EACDjB,oBAAoB,EAAE;IACpBkB,SAAS,EAAE;EACb,CAAC;EACD3E,eAAe,EAAE;IACf4E,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,GAAG;IAClBC,SAAS,EAAE;EACb,CAAC;EACDnB,OAAO,EAAE;IACPO,cAAc,EAAE;EAClB,CAAC;EACD9D,KAAK,EAAE;IACLuE,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,GAAG;IAClBT,gBAAgB,EAAE,EAAE;IACpBM,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,OAAO,MAAMK,cAAc,gBAAGhI,KAAK,CAACiI,IAAI,CAAC/G,eAAe,CAAC"}
@@ -2,12 +2,15 @@ import * as React from 'react';
2
2
  import { FlashList
3
3
  // FlashListProps
4
4
  } from '@shopify/flash-list';
5
- import { StyleSheet, View } from 'react-native';
5
+ import { Platform, StyleSheet, View } from 'react-native';
6
6
  import { useSelector } from 'react-redux';
7
7
  import { ChatMessage } from './ChatMessage';
8
8
  import { ChatBanner } from './ChatBanner';
9
- import { PinnedMessage } from './PinnedMessage';
9
+ import { PinnedMessages } from './PinnedMessages';
10
+ import { useIsAllowedToSendMessage } from '../../hooks-util';
10
11
  const _ChatList = () => {
12
+ const flashlistRef = React.useRef(null);
13
+ const isAllowedToSendMessage = useIsAllowedToSendMessage();
11
14
  const messages = useSelector(state => state.messages.messages);
12
15
  const _keyExtractor = React.useCallback(item => item.messageId, []);
13
16
  const _renderItem = React.useCallback(data => {
@@ -16,12 +19,14 @@ const _ChatList = () => {
16
19
  });
17
20
  }, []);
18
21
  return /*#__PURE__*/React.createElement(View, {
19
- style: chatListStyle.list
20
- }, /*#__PURE__*/React.createElement(PinnedMessage, null), messages.length > 0 ? /*#__PURE__*/React.createElement(FlashList, {
22
+ style: [chatListStyle.list, isAllowedToSendMessage ? chatListStyle.bottomSpace : null]
23
+ }, /*#__PURE__*/React.createElement(PinnedMessages, null), messages.length > 0 ? /*#__PURE__*/React.createElement(FlashList, {
24
+ ref: flashlistRef,
21
25
  data: messages,
22
26
  inverted: true,
23
27
  estimatedItemSize: 75,
24
- contentContainerStyle: chatListStyle.listContentContainer // Bug: Android inverted flashlist will apply padding on left when `paddingRight: 12` is applied
28
+ showsVerticalScrollIndicator: Platform.OS !== 'android'
29
+ // contentContainerStyle={chatListStyle.listContentContainer} // Bug: Android inverted flashlist will apply padding on left when `paddingRight: 12` is applied
25
30
  ,
26
31
  keyboardShouldPersistTaps: "always"
27
32
  // ItemSeparatorComponent={() => <View style={{ height: 16 }} />} // TODO: There is a bug related to this: https://github.com/Shopify/flash-list/issues/638
@@ -33,11 +38,13 @@ const _ChatList = () => {
33
38
  const chatListStyle = StyleSheet.create({
34
39
  list: {
35
40
  flex: 1,
36
- marginTop: 8,
41
+ marginTop: 8
42
+ },
43
+ bottomSpace: {
37
44
  marginBottom: 16
38
45
  },
39
46
  listContentContainer: {
40
- paddingRight: 12
47
+ paddingRight: 8
41
48
  }
42
49
  });
43
50
  export const ChatList = /*#__PURE__*/React.memo(_ChatList);
@@ -1 +1 @@
1
- {"version":3,"names":["React","FlashList","StyleSheet","View","useSelector","ChatMessage","ChatBanner","PinnedMessage","_ChatList","messages","state","_keyExtractor","useCallback","item","messageId","_renderItem","data","createElement","message","style","chatListStyle","list","length","inverted","estimatedItemSize","contentContainerStyle","listContentContainer","keyboardShouldPersistTaps","renderItem","keyExtractor","create","flex","marginTop","marginBottom","paddingRight","ChatList","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatList.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SACEC;AACA;AAAA,OACK,qBAAqB;AAC5B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,WAAW,QAAQ,aAAa;AAGzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,QAAQ,iBAAiB;AAM/C,MAAMC,SAAkC,GAAGA,CAAA,KAAM;EAC/C,MAAMC,QAAQ,GAAGL,WAAW,CAAEM,KAAgB,IAAKA,KAAK,CAACD,QAAQ,CAACA,QAAQ,CAAC;EAE3E,MAAME,aAAa,GAAGX,KAAK,CAACY,WAAW,CACpCC,IAAgB,IAAKA,IAAI,CAACC,SAAS,EACpC,EACF,CAAC;EAED,MAAMC,WAAW,GAAGf,KAAK,CAACY,WAAW,CAAEI,IAA0B,IAAK;IACpE,oBAAOhB,KAAA,CAAAiB,aAAA,CAACZ,WAAW;MAACa,OAAO,EAAEF,IAAI,CAACH;IAAK,CAAE,CAAC;EAC5C,CAAC,EAAE,EAAE,CAAC;EAEN,oBACEb,KAAA,CAAAiB,aAAA,CAACd,IAAI;IAACgB,KAAK,EAAEC,aAAa,CAACC;EAAK,gBAC9BrB,KAAA,CAAAiB,aAAA,CAACV,aAAa,MAAE,CAAC,EAEhBE,QAAQ,CAACa,MAAM,GAAG,CAAC,gBAClBtB,KAAA,CAAAiB,aAAA,CAAChB,SAAS;IACRe,IAAI,EAAEP,QAAS;IACfc,QAAQ,EAAE,IAAK;IACfC,iBAAiB,EAAE,EAAG;IACtBC,qBAAqB,EAAEL,aAAa,CAACM,oBAAqB,CAAC;IAAA;IAC3DC,yBAAyB,EAAC;IAC1B;IAAA;IACAC,UAAU,EAAEb,WAAY;IACxBc,YAAY,EAAElB;EAAc,CAC7B,CAAC,gBAEFX,KAAA,CAAAiB,aAAA,CAACX,UAAU,MAAE,CAEX,CAAC;AAEX,CAAC;AAED,MAAMc,aAAa,GAAGlB,UAAU,CAAC4B,MAAM,CAAC;EACtCT,IAAI,EAAE;IACJU,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE;EAChB,CAAC;EACDP,oBAAoB,EAAE;IACpBQ,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,QAAQ,gBAAGnC,KAAK,CAACoC,IAAI,CAAC5B,SAAS,CAAC"}
1
+ {"version":3,"names":["React","FlashList","Platform","StyleSheet","View","useSelector","ChatMessage","ChatBanner","PinnedMessages","useIsAllowedToSendMessage","_ChatList","flashlistRef","useRef","isAllowedToSendMessage","messages","state","_keyExtractor","useCallback","item","messageId","_renderItem","data","createElement","message","style","chatListStyle","list","bottomSpace","length","ref","inverted","estimatedItemSize","showsVerticalScrollIndicator","OS","keyboardShouldPersistTaps","renderItem","keyExtractor","create","flex","marginTop","marginBottom","listContentContainer","paddingRight","ChatList","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatList.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SACEC;AACA;AAAA,OACK,qBAAqB;AAC5B,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACzD,SAASC,WAAW,QAAQ,aAAa;AAGzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,S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A,CAACf,UAAU,MAAE,CAEX,CAAC;AAEX,CAAC;AAED,MAAMkB,aAAa,GAAGtB,UAAU,CAACkC,MAAM,CAAC;EACtCX,IAAI,EAAE;IACJY,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE;EACb,CAAC;EACDZ,WAAW,EAAE;IACXa,YAAY,EAAE;EAChB,CAAC;EACDC,oBAAoB,EAAE;IACpBC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,QAAQ,gBAAG3C,KAAK,CAAC4C,IAAI,CAAClC,SAAS,CAAC"}
@@ -1,11 +1,25 @@
1
1
  import * as React from 'react';
2
- import { View, Text, StyleSheet, Platform } from 'react-native';
3
- import { useHMSRoomStyleSheet } from '../../hooks-util';
2
+ import { View, Text, StyleSheet, Platform, TouchableOpacity } from 'react-native';
3
+ import { useDispatch, useSelector } from 'react-redux';
4
+ import { useAllowBlockingPeerFromChat, useAllowPinningMessage, useHMSRoomStyleSheet } from '../../hooks-util';
4
5
  import { getTimeStringin12HourFormat } from '../../utils/functions';
6
+ import { PinIcon, ThreeDotsIcon } from '../../Icons';
7
+ import { setSelectedMessageForAction } from '../../redux/actions';
5
8
  const _ChatMessage = ({
6
9
  message
7
10
  }) => {
8
- const messageSender = message.sender;
11
+ const dispatch = useDispatch();
12
+ const isPinned = useSelector(state => state.messages.pinnedMessages.findIndex(pinnedMessage => pinnedMessage.id === message.messageId) >= 0);
13
+ const localPeerId = useSelector(state => {
14
+ var _state$hmsStates$loca;
15
+ return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.peerID;
16
+ });
17
+ const allowPinningMessage = useAllowPinningMessage();
18
+ const allowPeerBlocking = useAllowBlockingPeerFromChat();
19
+ const canRemoveOthers = useSelector(state => {
20
+ var _state$hmsStates$loca2;
21
+ return !!((_state$hmsStates$loca2 = state.hmsStates.localPeer) !== null && _state$hmsStates$loca2 !== void 0 && (_state$hmsStates$loca2 = _state$hmsStates$loca2.role) !== null && _state$hmsStates$loca2 !== void 0 && (_state$hmsStates$loca2 = _state$hmsStates$loca2.permissions) !== null && _state$hmsStates$loca2 !== void 0 && _state$hmsStates$loca2.removeOthers);
22
+ });
9
23
  const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
10
24
  senderName: {
11
25
  color: theme.palette.on_surface_high,
@@ -16,35 +30,66 @@ const _ChatMessage = ({
16
30
  fontFamily: `${typography.font_family}-Regular`
17
31
  },
18
32
  time: {
19
- color: theme.palette.on_surface_medium,
33
+ color: theme.palette.on_surface_low,
20
34
  fontFamily: `${typography.font_family}-Regular`
35
+ },
36
+ threeDots: {
37
+ tintColor: theme.palette.on_surface_low
38
+ },
39
+ pinnedLabel: {
40
+ color: theme.palette.on_surface_low,
41
+ fontFamily: `${typography.font_family}-SemiBold`
21
42
  }
22
43
  }), []);
44
+ const onThreeDotsPress = () => {
45
+ dispatch(setSelectedMessageForAction(message));
46
+ };
47
+ const messageSender = message.sender;
48
+ const canTakeAction = allowPinningMessage ||
49
+ // can pin message, OR
50
+ allowPeerBlocking && message.sender && message.sender.peerID !== localPeerId ||
51
+ // can block peers, OR
52
+ canRemoveOthers && message.sender && message.sender.peerID !== localPeerId; // can remove participants
53
+
23
54
  return /*#__PURE__*/React.createElement(View, {
24
55
  style: styles.container
25
- }, /*#__PURE__*/React.createElement(View, {
56
+ }, isPinned ? /*#__PURE__*/React.createElement(View, {
57
+ style: styles.pinLabelContainer
58
+ }, /*#__PURE__*/React.createElement(PinIcon, {
59
+ type: "pin",
60
+ style: [styles.pinIcon, hmsRoomStyles.threeDots]
61
+ }), /*#__PURE__*/React.createElement(Text, {
62
+ style: [styles.pinnedLabel, hmsRoomStyles.pinnedLabel]
63
+ }, "PINNED")) : null, /*#__PURE__*/React.createElement(View, {
26
64
  style: [styles.nameWrapper]
27
65
  }, /*#__PURE__*/React.createElement(Text, {
28
66
  style: [styles.senderName, hmsRoomStyles.senderName],
29
67
  numberOfLines: 1
30
68
  }, messageSender ? messageSender.isLocal ? 'You' : messageSender.name : 'Anonymous'), /*#__PURE__*/React.createElement(Text, {
31
69
  style: [styles.time, hmsRoomStyles.time]
32
- }, getTimeStringin12HourFormat(message.time))), /*#__PURE__*/React.createElement(Text, {
70
+ }, getTimeStringin12HourFormat(message.time)), canTakeAction ? /*#__PURE__*/React.createElement(TouchableOpacity, {
71
+ hitSlop: styles.threeDotsHitSlop,
72
+ onPress: onThreeDotsPress
73
+ }, /*#__PURE__*/React.createElement(ThreeDotsIcon, {
74
+ stack: "vertical",
75
+ style: [styles.threeDots, hmsRoomStyles.threeDots]
76
+ })) : null), /*#__PURE__*/React.createElement(Text, {
33
77
  style: [styles.message, hmsRoomStyles.message]
34
78
  }, message.message));
35
79
  };
36
80
  export const ChatMessage = /*#__PURE__*/React.memo(_ChatMessage);
37
81
  const styles = StyleSheet.create({
38
82
  container: {
39
- marginTop: 16,
83
+ marginTop: 4,
40
84
  padding: 8,
41
85
  width: '100%'
42
86
  },
43
87
  nameWrapper: {
44
88
  flexDirection: 'row',
45
- alignItems: 'flex-end'
89
+ alignItems: 'center'
46
90
  },
47
91
  senderName: {
92
+ flexGrow: 1,
48
93
  fontSize: 14,
49
94
  lineHeight: Platform.OS === 'android' ? 20 : undefined,
50
95
  letterSpacing: 0.1
@@ -59,7 +104,34 @@ const styles = StyleSheet.create({
59
104
  fontSize: 14,
60
105
  lineHeight: Platform.OS === 'android' ? 20 : undefined,
61
106
  letterSpacing: 0.25,
62
- marginTop: 8
107
+ marginTop: 4
108
+ },
109
+ threeDots: {
110
+ width: 20,
111
+ height: 20,
112
+ marginLeft: 4
113
+ },
114
+ threeDotsHitSlop: {
115
+ left: 12,
116
+ right: 12,
117
+ top: 12,
118
+ bottom: 12
119
+ },
120
+ pinLabelContainer: {
121
+ flexDirection: 'row',
122
+ alignItems: 'center',
123
+ marginBottom: 4
124
+ },
125
+ pinIcon: {
126
+ width: 12,
127
+ height: 12,
128
+ marginRight: 4
129
+ },
130
+ pinnedLabel: {
131
+ fontSize: 10,
132
+ textTransform: 'uppercase',
133
+ lineHeight: 16,
134
+ letterSpacing: 1.5
63
135
  }
64
136
  });
65
137
  //# sourceMappingURL=ChatMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","StyleSheet","Platform","useHMSRoomStyleSheet","getTimeStringin12HourFormat","_ChatMessage","message","messageSender","sender","hmsRoomStyles","theme","typography","senderName","color","palette","on_surface_high","fontFamily","font_family","time","on_surface_medium","createElement","style","styles","container","nameWrapper","numberOfLines","isLocal","name","ChatMessage","memo","create","marginTop","padding","width","flexDirection","alignItems","fontSize","lineHeight","OS","undefined","letterSpacing","marginLeft"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatMessage.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AAG/D,SAASC,oBAAoB,QAAQ,kBAAkB;AACvD,SAASC,2BAA2B,QAAQ,uBAAuB;AAMnE,MAAMC,YAA0C,GAAGA,CAAC;EAAEC;AAAQ,CAAC,KAAK;EAClE,MAAMC,aAAa,GAAGD,OAAO,CAACE,MAAM;EAEpC,MAAMC,aAAa,GAAGN,oBAAoB,CACxC,CAACO,KAAK,EAAEC,UAAU,MAAM;IACtBC,UAAU,EAAE;MACVC,KAAK,EAAEH,KAAK,CAACI,OAAO,CAACC,eAAe;MACpCC,UAAU,EAAG,GAAEL,UAAU,CAACM,WAAY;IACxC,CAAC;IACDX,OAAO,EAAE;MACPO,KAAK,EAAEH,KAAK,CAACI,OAAO,CAACC,eAAe;MACpCC,UAAU,EAAG,GAAEL,UAAU,CAACM,WAAY;IACxC,CAAC;IACDC,IAAI,EAAE;MACJL,KAAK,EAAEH,KAAK,CAACI,OAAO,CAACK,iBAAiB;MACtCH,UAAU,EAAG,GAAEL,UAAU,CAACM,WAAY;IACxC;EACF,CAAC,CAAC,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EACDtB,IAAI,EAAE;IACJkB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdG,aAAa,EAAE,GAAG;IAClBC,UAAU,EAAE;EACd,CAAC;EACDnC,OAAO,EAAE;IACP8B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEnC,QAAQ,CAACoC,EAAE,KAAK,SAAS,GAAG,EAAE,GAAGC,SAAS;IACtDC,aAAa,EAAE,IAAI;IACnBT,SAAS,EAAE;EACb;AACF,CAAC,CAAC"}
1
+ {"version":3,"names":["React","View","Text","StyleSheet","Platform","TouchableOpacity","useDispatch","useSelector","useAllowBlockingPeerFromChat","useAllowPinningMessage","useHMSRoomStyleSheet","getTimeStringin12HourFormat","PinIcon","ThreeDotsIcon","setSelectedMessageForAction","_ChatMessage","message","dispatch","isPinned","state","messages","pinnedMessages","findIndex","pinnedMessage","id","messageId","localPeerId","_state$hmsStates$loca","hmsStates","localPeer","peerID","allowPinningMessage","allowPeerBlocking","canRemoveOthers","_state$hmsStates$loca2","role","permissions","removeOthers","hmsRoomStyles","theme","typography","senderName","color","palette","on_surface_high","fontFamily","font_family","time","on_surface_low","threeDots","tintColor","pinnedLabel","onThreeDotsPress","messageSender","sender","canTakeAction","createElement","style","styles","container","pinLabelContainer","type","pinIcon","nameWrapper","numberOfLines","isLocal","name","hitSlop","threeDotsHitSlop","onPress","stack","ChatMessage","memo","create","marginTop","padding","width","flexDirection","alignItems","flexGrow","fontSize","lineHeight","OS","undefined","letterSpacing","marginLeft","height","left","right","top","bottom","marginBottom","marginRight","textTransform"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatMessage.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRC,gBAAgB,QACX,cAAc;AACrB,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAGtD,SACEC,4BAA4B,EAC5BC,sBAAsB,EACtBC,oBAA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AAC,CAAC"}
@@ -0,0 +1,53 @@
1
+ import * as React from 'react';
2
+ import { StyleSheet } from 'react-native';
3
+ import { useSelector } from 'react-redux';
4
+ import { interpolate } from 'react-native-reanimated';
5
+ import { BottomSheet } from '../BottomSheet';
6
+ import { useIsAllowedToSendMessage, useModalType } from '../../hooks-util';
7
+ import { ModalTypes } from '../../utils/types';
8
+ import { ChatMoreActionsView } from './ChatMoreActionsView';
9
+ import { useFooterHeight } from '../Footer';
10
+ import { useHMSNotificationsHeight } from '../HMSNotifications';
11
+ const _ChatMoreActionsModal = ({
12
+ offset
13
+ }) => {
14
+ const {
15
+ modalVisibleType,
16
+ handleModalVisibleType
17
+ } = useModalType();
18
+ const footerHeight = useFooterHeight();
19
+ const notificationsHeight = useHMSNotificationsHeight();
20
+ const isAllowedToSendMessage = useIsAllowedToSendMessage();
21
+ const isMessageInputVisible = useSelector(state => state.chatWindow.sendTo !== null && isAllowedToSendMessage);
22
+ const dismissModal = () => handleModalVisibleType(ModalTypes.DEFAULT);
23
+ return /*#__PURE__*/React.createElement(BottomSheet, {
24
+ dismissModal: dismissModal,
25
+ isVisible: modalVisibleType === ModalTypes.CHAT_MORE_ACTIONS,
26
+ backdropOpacity: 0.1,
27
+ animationIn: 'fadeIn',
28
+ animationOut: 'fadeOut',
29
+ style: styles.modal,
30
+ containerStyle: [styles.contentContainer, {
31
+ bottom: (offset ? interpolate(offset.value, [0, 1], [0, footerHeight]) : footerHeight) + notificationsHeight + (isMessageInputVisible ? 58 : 8)
32
+ }]
33
+ }, /*#__PURE__*/React.createElement(ChatMoreActionsView, {
34
+ onDismiss: dismissModal
35
+ }));
36
+ };
37
+ const styles = StyleSheet.create({
38
+ modal: {
39
+ justifyContent: undefined,
40
+ position: 'relative'
41
+ },
42
+ contentContainer: {
43
+ width: undefined,
44
+ paddingBottom: 0,
45
+ borderTopRightRadius: 0,
46
+ borderTopLeftRadius: 0,
47
+ backgroundColor: 'transparent',
48
+ position: 'absolute',
49
+ right: 8
50
+ }
51
+ });
52
+ export const ChatMoreActionsModal = /*#__PURE__*/React.memo(_ChatMoreActionsModal);
53
+ //# sourceMappingURL=ChatMoreActionsModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","useSelector","interpolate","BottomSheet","useIsAllowedToSendMessage","useModalType","ModalTypes","ChatMoreActionsView","useFooterHeight","useHMSNotificationsHeight","_ChatMoreActionsModal","offset","modalVisibleType","handleModalVisibleType","footerHeight","notificationsHeight","isAllowedToSendMessage","isMessageInputVisible","state","chatWindow","sendTo","dismissModal","DEFAULT","createElement","isVisible","CHAT_MORE_ACTIONS","backdropOpacity","animationIn","animationOut","style","styles","modal","containerStyle","contentContainer","bottom","value","onDismiss","create","justifyContent","undefined","position","width","paddingBottom","borderTopRightRadius","borderTopLeftRadius","backgroundColor","right","ChatMoreActionsModal","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatMoreActionsModal.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,QAAQ,yBAAyB;AAGrD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,yBAAyB,EAAEC,YAAY,QAAQ,kBAAkB;AAC1E,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,eAAe,QAAQ,WAAW;AAC3C,SAASC,yBAAyB,QAAQ,qBAAqB;AAO/D,MAAMC,qBAA0D,GAAGA,CAAC;EAClEC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC,gBAAgB;IAAEC;EAAuB,CAAC,GAAGR,YAAY,CAAC,CAAC;EAEnE,MAAMS,YAAY,GAAGN,eAAe,CAAC,CAAC;EACtC,MAAMO,mBAAmB,GAAGN,yBAAyB,CAAC,CAAC;EACvD,MAAMO,sBAAsB,GAAGZ,yBAAyB,CAAC,CAAC;EAC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CAACiD,IAAI,CAACtC,qBAAqB,CAAC"}
@@ -0,0 +1,55 @@
1
+ import * as React from 'react';
2
+ import { Pressable, StyleSheet, View } from 'react-native';
3
+ import { useDispatch, useSelector } from 'react-redux';
4
+ import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
5
+ import { hexToRgbA } from '../../utils/theme';
6
+ import { useHMSRoomStyleSheet } from '../../hooks-util';
7
+ import { setChatMoreActionsSheetVisible } from '../../redux/actions';
8
+ import { ChatMoreActionsView } from './ChatMoreActionsView';
9
+ const _ChatMoreActionsSheetView = ({}) => {
10
+ const dispatch = useDispatch();
11
+ const chatMoreActionsSheetVisible = useSelector(state => state.app.chatMoreActionsSheetVisible);
12
+ const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
13
+ backdrop: {
14
+ backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.05)
15
+ }
16
+ }));
17
+ const closeFiltersBottomSheet = () => {
18
+ dispatch(setChatMoreActionsSheetVisible(false));
19
+ };
20
+ if (!chatMoreActionsSheetVisible) {
21
+ return null;
22
+ }
23
+ return /*#__PURE__*/React.createElement(View, {
24
+ style: styles.container
25
+ }, /*#__PURE__*/React.createElement(Pressable, {
26
+ onPress: closeFiltersBottomSheet,
27
+ style: [styles.backdrop, hmsRoomStyles.backdrop]
28
+ }), /*#__PURE__*/React.createElement(Animated.View, {
29
+ entering: FadeIn.duration(150),
30
+ exiting: FadeOut.duration(150),
31
+ style: styles.contentContainer
32
+ }, /*#__PURE__*/React.createElement(ChatMoreActionsView, null)));
33
+ };
34
+ const styles = StyleSheet.create({
35
+ container: {
36
+ position: 'absolute',
37
+ width: '100%',
38
+ height: '100%',
39
+ zIndex: 1,
40
+ justifyContent: 'flex-end'
41
+ },
42
+ backdrop: {
43
+ position: 'absolute',
44
+ width: '100%',
45
+ height: '100%'
46
+ },
47
+ contentContainer: {
48
+ position: 'absolute',
49
+ top: 60,
50
+ right: 48,
51
+ overflow: 'hidden'
52
+ }
53
+ });
54
+ export const ChatMoreActionsSheetView = /*#__PURE__*/React.memo(_ChatMoreActionsSheetView);
55
+ //# sourceMappingURL=ChatMoreActionsSheetView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Pressable","StyleSheet","View","useDispatch","useSelector","Animated","FadeIn","FadeOut","hexToRgbA","useHMSRoomStyleSheet","setChatMoreActionsSheetVisible","ChatMoreActionsView","_ChatMoreActionsSheetView","dispatch","chatMoreActionsSheetVisible","state","app","hmsRoomStyles","theme","backdrop","backgroundColor","palette","background_dim","closeFiltersBottomSheet","createElement","style","styles","container","onPress","entering","duration","exiting","contentContainer","create","position","width","height","zIndex","justifyContent","top","right","overflow","ChatMoreActionsSheetView","memo"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatMoreActionsSheetView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC1D,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AACtD,OAAOC,QAAQ,IAAIC,MAAM,EAAEC,OAAO,QAAQ,yBAAyB;AAEnE,SAASC,SAAS,QAAQ,mBAAmB;AAC7C,SAASC,oBAAoB,QAAQ,kBAAkB;AAEvD,SAASC,8BAA8B,QAAQ,qBAAqB;AACpE,SAASC,mBAAmB,QAAQ,uBAAuB;AAI3D,MAAMC,yBAEL,GAAGA,CAAC,CAAC,CAAC,KAAK;EACV,MAAMC,QAAQ,GAAGV,WAAW,CAAC,CAAC;EAC9B,MAAMW,2BAA2B,GAAGV,WAAW,CAC5CW,KAAgB,IAAKA,KAAK,CAACC,GAAG,CAACF,2BAClC,CAAC;EAED,MAAMG,aAAa,GAAGR,oBAAoB,CAAES,KAAK,KAAM;IACrDC,QAAQ,EAAE;MACRC,eAAe,EACbF,KAAK,CAACG,OAAO,CAACC,cAAc,IAC5Bd,SAAS,CAACU,KAAK,CAACG,OAAO,CAACC,cAAc,EAAE,IAAI;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