@ethora/chat-component-rn 26.7.5 → 26.7.7

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 (340) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +31 -8
  3. package/lib/commonjs/assets/icons.js +7 -2
  4. package/lib/commonjs/assets/icons.js.map +1 -1
  5. package/lib/commonjs/components/Header/HeaderRoomList.js +26 -7
  6. package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
  7. package/lib/commonjs/components/MainComponents/ChatHeader.js +5 -2
  8. package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
  9. package/lib/commonjs/components/MainComponents/ChatRoom.js +36 -14
  10. package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
  11. package/lib/commonjs/components/MainComponents/ChatWrapper.js +2 -0
  12. package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
  13. package/lib/commonjs/components/MainComponents/MessageList.js +7 -23
  14. package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
  15. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +14 -13
  16. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  17. package/lib/commonjs/components/MainComponents/RoomList.js +208 -35
  18. package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
  19. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +317 -98
  20. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
  21. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +320 -110
  22. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  23. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +552 -213
  24. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  25. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +226 -0
  26. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
  27. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
  28. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  29. package/lib/commonjs/components/Modals/Modal/Modal.js +8 -0
  30. package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
  31. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +2 -1
  32. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  33. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +202 -104
  34. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  35. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
  36. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  37. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +556 -0
  38. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
  39. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +210 -0
  40. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
  41. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
  42. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  43. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +7 -21
  44. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  45. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +507 -244
  46. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  47. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +74 -46
  48. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  49. package/lib/commonjs/components/Modals/styledModalComponents.js +9 -2
  50. package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
  51. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +17 -7
  52. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
  53. package/lib/commonjs/components/styled/SendInput.js +80 -11
  54. package/lib/commonjs/components/styled/SendInput.js.map +1 -1
  55. package/lib/commonjs/components/styled/StyledComponents.js +9 -3
  56. package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
  57. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
  58. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  59. package/lib/commonjs/context/xmppProvider.js +32 -39
  60. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  61. package/lib/commonjs/helpers/getChatBackground.js +23 -0
  62. package/lib/commonjs/helpers/getChatBackground.js.map +1 -0
  63. package/lib/commonjs/helpers/mediaLibraryRuntime.js +31 -0
  64. package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +1 -0
  65. package/lib/commonjs/helpers/pickImageAsset.js +68 -0
  66. package/lib/commonjs/helpers/pickImageAsset.js.map +1 -0
  67. package/lib/commonjs/helpers/pushPayload.js +71 -0
  68. package/lib/commonjs/helpers/pushPayload.js.map +1 -0
  69. package/lib/commonjs/helpers/sheetGestures.js +32 -0
  70. package/lib/commonjs/helpers/sheetGestures.js.map +1 -0
  71. package/lib/commonjs/helpers/updateMessagesTillLast.js +12 -40
  72. package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
  73. package/lib/commonjs/hooks/useChatRoomFocus.js +3 -9
  74. package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
  75. package/lib/commonjs/hooks/useLogout.js +0 -5
  76. package/lib/commonjs/hooks/useLogout.js.map +1 -1
  77. package/lib/commonjs/hooks/usePendingNotification.js +8 -11
  78. package/lib/commonjs/hooks/usePendingNotification.js.map +1 -1
  79. package/lib/commonjs/hooks/useSendMessage.js +23 -50
  80. package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
  81. package/lib/commonjs/i18n/strings.js +121 -1
  82. package/lib/commonjs/i18n/strings.js.map +1 -1
  83. package/lib/commonjs/main.js +19 -0
  84. package/lib/commonjs/main.js.map +1 -1
  85. package/lib/commonjs/networking/api-requests/user.api.js +59 -0
  86. package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
  87. package/lib/commonjs/networking/authRefresh.js +12 -2
  88. package/lib/commonjs/networking/authRefresh.js.map +1 -1
  89. package/lib/commonjs/networking/outboundQueue.js +0 -18
  90. package/lib/commonjs/networking/outboundQueue.js.map +1 -1
  91. package/lib/commonjs/networking/stanzaHandlers.js +1 -10
  92. package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
  93. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +8 -1
  94. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  95. package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
  96. package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
  97. package/lib/commonjs/networking/xmppClient.js +62 -108
  98. package/lib/commonjs/networking/xmppClient.js.map +1 -1
  99. package/lib/commonjs/roomStore/chatSettingsSlice.js +3 -1
  100. package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
  101. package/lib/commonjs/roomStore/roomsSlice.js +3 -22
  102. package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
  103. package/lib/commonjs/services/pushSubscriptionService.js +15 -13
  104. package/lib/commonjs/services/pushSubscriptionService.js.map +1 -1
  105. package/lib/module/assets/icons.js +6 -1
  106. package/lib/module/assets/icons.js.map +1 -1
  107. package/lib/module/components/Header/HeaderRoomList.js +26 -7
  108. package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
  109. package/lib/module/components/MainComponents/ChatHeader.js +5 -2
  110. package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
  111. package/lib/module/components/MainComponents/ChatRoom.js +36 -14
  112. package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
  113. package/lib/module/components/MainComponents/ChatWrapper.js +2 -0
  114. package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
  115. package/lib/module/components/MainComponents/MessageList.js +8 -24
  116. package/lib/module/components/MainComponents/MessageList.js.map +1 -1
  117. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +14 -13
  118. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  119. package/lib/module/components/MainComponents/RoomList.js +207 -35
  120. package/lib/module/components/MainComponents/RoomList.js.map +1 -1
  121. package/lib/module/components/Menu/HeaderRoomListMenu.js +319 -101
  122. package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
  123. package/lib/module/components/Modals/AttachSheet/AttachSheet.js +311 -113
  124. package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  125. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +555 -217
  126. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  127. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +223 -0
  128. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
  129. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +6 -2
  130. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  131. package/lib/module/components/Modals/Modal/Modal.js +9 -1
  132. package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
  133. package/lib/module/components/Modals/NewChatModal/ModalContent.js +2 -1
  134. package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  135. package/lib/module/components/Modals/NewChatModal/NewChatModal.js +205 -106
  136. package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  137. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
  138. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  139. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +548 -0
  140. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
  141. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +205 -0
  142. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
  143. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
  144. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  145. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +9 -23
  146. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  147. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +509 -248
  148. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  149. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +76 -48
  150. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  151. package/lib/module/components/Modals/styledModalComponents.js +9 -2
  152. package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
  153. package/lib/module/components/RoomComponents/ChatRoomItem.js +17 -7
  154. package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
  155. package/lib/module/components/styled/SendInput.js +81 -12
  156. package/lib/module/components/styled/SendInput.js.map +1 -1
  157. package/lib/module/components/styled/StyledComponents.js +9 -3
  158. package/lib/module/components/styled/StyledComponents.js.map +1 -1
  159. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
  160. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  161. package/lib/module/context/xmppProvider.js +32 -39
  162. package/lib/module/context/xmppProvider.js.map +1 -1
  163. package/lib/module/helpers/getChatBackground.js +18 -0
  164. package/lib/module/helpers/getChatBackground.js.map +1 -0
  165. package/lib/module/helpers/mediaLibraryRuntime.js +25 -0
  166. package/lib/module/helpers/mediaLibraryRuntime.js.map +1 -0
  167. package/lib/module/helpers/pickImageAsset.js +63 -0
  168. package/lib/module/helpers/pickImageAsset.js.map +1 -0
  169. package/lib/module/helpers/pushPayload.js +63 -0
  170. package/lib/module/helpers/pushPayload.js.map +1 -0
  171. package/lib/module/helpers/sheetGestures.js +26 -0
  172. package/lib/module/helpers/sheetGestures.js.map +1 -0
  173. package/lib/module/helpers/updateMessagesTillLast.js +13 -41
  174. package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
  175. package/lib/module/hooks/useChatRoomFocus.js +3 -9
  176. package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
  177. package/lib/module/hooks/useLogout.js +0 -5
  178. package/lib/module/hooks/useLogout.js.map +1 -1
  179. package/lib/module/hooks/usePendingNotification.js +8 -11
  180. package/lib/module/hooks/usePendingNotification.js.map +1 -1
  181. package/lib/module/hooks/useSendMessage.js +24 -51
  182. package/lib/module/hooks/useSendMessage.js.map +1 -1
  183. package/lib/module/i18n/strings.js +121 -1
  184. package/lib/module/i18n/strings.js.map +1 -1
  185. package/lib/module/main.js +2 -1
  186. package/lib/module/main.js.map +1 -1
  187. package/lib/module/networking/api-requests/user.api.js +56 -0
  188. package/lib/module/networking/api-requests/user.api.js.map +1 -1
  189. package/lib/module/networking/authRefresh.js +12 -2
  190. package/lib/module/networking/authRefresh.js.map +1 -1
  191. package/lib/module/networking/outboundQueue.js +0 -17
  192. package/lib/module/networking/outboundQueue.js.map +1 -1
  193. package/lib/module/networking/stanzaHandlers.js +1 -10
  194. package/lib/module/networking/stanzaHandlers.js.map +1 -1
  195. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +8 -1
  196. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  197. package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
  198. package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
  199. package/lib/module/networking/xmppClient.js +62 -108
  200. package/lib/module/networking/xmppClient.js.map +1 -1
  201. package/lib/module/roomStore/chatSettingsSlice.js +3 -1
  202. package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
  203. package/lib/module/roomStore/roomsSlice.js +2 -20
  204. package/lib/module/roomStore/roomsSlice.js.map +1 -1
  205. package/lib/module/services/pushSubscriptionService.js +15 -13
  206. package/lib/module/services/pushSubscriptionService.js.map +1 -1
  207. package/lib/typescript/assets/icons.d.ts +16 -0
  208. package/lib/typescript/assets/icons.d.ts.map +1 -1
  209. package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
  210. package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
  211. package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
  212. package/lib/typescript/components/MainComponents/ChatWrapper.d.ts.map +1 -1
  213. package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
  214. package/lib/typescript/components/MainComponents/ProfileImagePlaceholder.d.ts.map +1 -1
  215. package/lib/typescript/components/MainComponents/RoomList.d.ts +7 -0
  216. package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
  217. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +3 -0
  218. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
  219. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +9 -0
  220. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
  221. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +10 -0
  222. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
  223. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +9 -0
  224. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -0
  225. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  226. package/lib/typescript/components/Modals/Modal/Modal.d.ts.map +1 -1
  227. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts +4 -2
  228. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
  229. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts +1 -1
  230. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
  231. package/lib/typescript/components/Modals/NewChatModal/UpdNewChatModal.d.ts.map +1 -1
  232. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +75 -0
  233. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +1 -0
  234. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +25 -0
  235. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +1 -0
  236. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +6 -1
  237. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
  238. package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
  239. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts +16 -0
  240. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
  241. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +1 -0
  242. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
  243. package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
  244. package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
  245. package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
  246. package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
  247. package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
  248. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  249. package/lib/typescript/helpers/getChatBackground.d.ts +15 -0
  250. package/lib/typescript/helpers/getChatBackground.d.ts.map +1 -0
  251. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +3 -0
  252. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +1 -0
  253. package/lib/typescript/helpers/pickImageAsset.d.ts +27 -0
  254. package/lib/typescript/helpers/pickImageAsset.d.ts.map +1 -0
  255. package/lib/typescript/helpers/pushPayload.d.ts +7 -0
  256. package/lib/typescript/helpers/pushPayload.d.ts.map +1 -0
  257. package/lib/typescript/helpers/sheetGestures.d.ts +20 -0
  258. package/lib/typescript/helpers/sheetGestures.d.ts.map +1 -0
  259. package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
  260. package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
  261. package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
  262. package/lib/typescript/hooks/usePendingNotification.d.ts.map +1 -1
  263. package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
  264. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  265. package/lib/typescript/main.d.ts +3 -1
  266. package/lib/typescript/main.d.ts.map +1 -1
  267. package/lib/typescript/networking/api-requests/user.api.d.ts +27 -0
  268. package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
  269. package/lib/typescript/networking/authRefresh.d.ts +4 -1
  270. package/lib/typescript/networking/authRefresh.d.ts.map +1 -1
  271. package/lib/typescript/networking/outboundQueue.d.ts +0 -16
  272. package/lib/typescript/networking/outboundQueue.d.ts.map +1 -1
  273. package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
  274. package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
  275. package/lib/typescript/networking/xmpp/subscribeToRoomMessages.xmpp.d.ts.map +1 -1
  276. package/lib/typescript/networking/xmppClient.d.ts +8 -33
  277. package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
  278. package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
  279. package/lib/typescript/roomStore/roomsSlice.d.ts +1 -18
  280. package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
  281. package/lib/typescript/services/pushSubscriptionService.d.ts +1 -1
  282. package/lib/typescript/services/pushSubscriptionService.d.ts.map +1 -1
  283. package/lib/typescript/types/models/room.model.d.ts +0 -15
  284. package/lib/typescript/types/models/room.model.d.ts.map +1 -1
  285. package/lib/typescript/types/types.d.ts +31 -20
  286. package/lib/typescript/types/types.d.ts.map +1 -1
  287. package/package.json +6 -1
  288. package/src/assets/icons.tsx +48 -9
  289. package/src/components/Header/HeaderRoomList.tsx +24 -6
  290. package/src/components/MainComponents/ChatHeader.tsx +5 -2
  291. package/src/components/MainComponents/ChatRoom.tsx +38 -20
  292. package/src/components/MainComponents/ChatWrapper.tsx +3 -0
  293. package/src/components/MainComponents/MessageList.tsx +8 -24
  294. package/src/components/MainComponents/ProfileImagePlaceholder.tsx +21 -14
  295. package/src/components/MainComponents/RoomList.tsx +236 -39
  296. package/src/components/Menu/HeaderRoomListMenu.tsx +328 -75
  297. package/src/components/Modals/AttachSheet/AttachSheet.tsx +331 -97
  298. package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +598 -279
  299. package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +244 -0
  300. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +4 -2
  301. package/src/components/Modals/Modal/Modal.tsx +7 -0
  302. package/src/components/Modals/NewChatModal/ModalContent.tsx +6 -3
  303. package/src/components/Modals/NewChatModal/NewChatModal.tsx +219 -117
  304. package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +12 -1
  305. package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +615 -0
  306. package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +217 -0
  307. package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +14 -4
  308. package/src/components/Modals/UserProfileModal/EditUserModal.tsx +9 -25
  309. package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +617 -307
  310. package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +75 -58
  311. package/src/components/Modals/styledModalComponents.tsx +9 -2
  312. package/src/components/RoomComponents/ChatRoomItem.tsx +14 -7
  313. package/src/components/styled/SendInput.tsx +83 -12
  314. package/src/components/styled/StyledComponents.ts +9 -3
  315. package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +11 -4
  316. package/src/context/xmppProvider.tsx +36 -47
  317. package/src/helpers/getChatBackground.ts +18 -0
  318. package/src/helpers/mediaLibraryRuntime.ts +25 -0
  319. package/src/helpers/pickImageAsset.ts +68 -0
  320. package/src/helpers/pushPayload.ts +62 -0
  321. package/src/helpers/sheetGestures.ts +25 -0
  322. package/src/helpers/updateMessagesTillLast.tsx +17 -42
  323. package/src/hooks/useChatRoomFocus.ts +3 -11
  324. package/src/hooks/useLogout.tsx +0 -7
  325. package/src/hooks/usePendingNotification.ts +5 -11
  326. package/src/hooks/useSendMessage.tsx +24 -60
  327. package/src/i18n/strings.ts +121 -1
  328. package/src/main.ts +4 -1
  329. package/src/networking/api-requests/user.api.ts +71 -0
  330. package/src/networking/authRefresh.ts +25 -4
  331. package/src/networking/outboundQueue.ts +0 -29
  332. package/src/networking/stanzaHandlers.ts +1 -9
  333. package/src/networking/xmpp/presenceInRoom.xmpp.ts +6 -1
  334. package/src/networking/xmpp/subscribeToRoomMessages.xmpp.ts +12 -1
  335. package/src/networking/xmppClient.ts +65 -119
  336. package/src/roomStore/chatSettingsSlice.ts +3 -1
  337. package/src/roomStore/roomsSlice.ts +2 -20
  338. package/src/services/pushSubscriptionService.ts +18 -13
  339. package/src/types/models/room.model.ts +0 -15
  340. package/src/types/types.ts +33 -20
@@ -0,0 +1,217 @@
1
+ /** @format */
2
+
3
+ import React, { useRef, useState } from 'react';
4
+ import {
5
+ Animated,
6
+ Dimensions,
7
+ Easing,
8
+ Modal,
9
+ Pressable,
10
+ StyleSheet,
11
+ Text,
12
+ TouchableOpacity,
13
+ View,
14
+ } from 'react-native';
15
+ import { MoreIcon } from '../../../assets/icons';
16
+
17
+ export interface ProfileMenuItem {
18
+ key: string;
19
+ label: string;
20
+ icon: React.ReactNode;
21
+ destructive?: boolean;
22
+ onPress: () => void;
23
+ }
24
+
25
+ /** Fallbacks used for the very first frame, before the card is measured. */
26
+ const ESTIMATED_WIDTH = 220;
27
+ const ESTIMATED_HEIGHT = 160;
28
+ const GAP = 8;
29
+ /** Roughly a notch inset + the header band, used until measured. */
30
+ const DEFAULT_TOP = 104;
31
+ const EDGE = 12;
32
+
33
+ /**
34
+ * The "…" overflow menu shared by the chat and user profile screens.
35
+ *
36
+ * The shared `DropdownMenu` pins its card at a hard-coded `top: 95`, which
37
+ * on this screen landed it over the host's own tab bar, unanchored to the
38
+ * button. This one measures the button and grows the card out of it: the
39
+ * card scales up from its top-right corner (translate → scale → translate
40
+ * back, which is how you fake a transform-origin in React Native) so the
41
+ * menu visibly unfolds from the three dots.
42
+ */
43
+ const ProfileMenu: React.FC<{
44
+ items: ProfileMenuItem[];
45
+ testIDPrefix?: string;
46
+ }> = ({ items, testIDPrefix = 'chat-profile' }) => {
47
+ const buttonRef = useRef<View>(null);
48
+ const [open, setOpen] = useState(false);
49
+ const [anchor, setAnchor] = useState({ top: DEFAULT_TOP, right: EDGE });
50
+ const [size, setSize] = useState({
51
+ width: ESTIMATED_WIDTH,
52
+ height: ESTIMATED_HEIGHT,
53
+ });
54
+ const progress = useRef(new Animated.Value(0)).current;
55
+
56
+ const animate = (to: number, done?: () => void) =>
57
+ Animated.timing(progress, {
58
+ toValue: to,
59
+ duration: to ? 180 : 140,
60
+ easing: to ? Easing.out(Easing.back(1.3)) : Easing.in(Easing.quad),
61
+ useNativeDriver: true,
62
+ }).start(({ finished }) => finished && done?.());
63
+
64
+ // Anchor to the button's window frame — that is the same coordinate
65
+ // space the <Modal> lays out in, so no insets to subtract. Measured on
66
+ // layout (and again on open) rather than *before* opening: on some hosts
67
+ // the measure callback never fires, and gating the open on it would mean
68
+ // a menu that simply doesn't appear.
69
+ const measure = () =>
70
+ buttonRef.current?.measureInWindow?.((x, y, width, height) => {
71
+ if (typeof y !== 'number' || typeof x !== 'number') {return;}
72
+ const screenWidth = Dimensions.get('window').width;
73
+ setAnchor({
74
+ top: y + height + GAP,
75
+ right: Math.max(screenWidth - (x + width), EDGE),
76
+ });
77
+ });
78
+
79
+ const openMenu = () => {
80
+ measure();
81
+ progress.setValue(0);
82
+ setOpen(true);
83
+ animate(1);
84
+ };
85
+
86
+ const closeMenu = (then?: () => void) =>
87
+ animate(0, () => {
88
+ setOpen(false);
89
+ then?.();
90
+ });
91
+
92
+ const scale = progress.interpolate({
93
+ inputRange: [0, 1],
94
+ outputRange: [0.2, 1],
95
+ });
96
+
97
+ if (items.length === 0) {
98
+ return null;
99
+ }
100
+
101
+ return (
102
+ <>
103
+ <View ref={buttonRef} collapsable={false} onLayout={measure}>
104
+ <TouchableOpacity
105
+ testID={`${testIDPrefix}-menu`}
106
+ activeOpacity={0.7}
107
+ onPress={openMenu}
108
+ style={styles.button}
109
+ >
110
+ <MoreIcon color="#FFFFFF" />
111
+ </TouchableOpacity>
112
+ </View>
113
+
114
+ <Modal
115
+ transparent
116
+ visible={open}
117
+ animationType="none"
118
+ onRequestClose={() => closeMenu()}
119
+ >
120
+ <Pressable
121
+ testID={`${testIDPrefix}-menu-backdrop`}
122
+ style={StyleSheet.absoluteFill}
123
+ onPress={() => closeMenu()}
124
+ />
125
+ <Animated.View
126
+ testID={`${testIDPrefix}-menu-card`}
127
+ onLayout={(e) => {
128
+ const { width, height } = e.nativeEvent.layout;
129
+ if (width && height) {setSize({ width, height });}
130
+ }}
131
+ style={[
132
+ styles.card,
133
+ {
134
+ top: anchor.top,
135
+ right: anchor.right,
136
+ opacity: progress,
137
+ transform: [
138
+ // Move the origin to the card's top-right corner, scale
139
+ // there, then move back — RN has no transform-origin.
140
+ { translateX: size.width / 2 },
141
+ { translateY: -size.height / 2 },
142
+ { scale },
143
+ { translateX: -size.width / 2 },
144
+ { translateY: size.height / 2 },
145
+ ],
146
+ },
147
+ ]}
148
+ >
149
+ {items.map((item, index) => (
150
+ <TouchableOpacity
151
+ key={item.key}
152
+ testID={`${testIDPrefix}-menu-${item.key}`}
153
+ activeOpacity={0.6}
154
+ style={[styles.row, index > 0 && styles.rowDivider]}
155
+ onPress={() => closeMenu(item.onPress)}
156
+ >
157
+ <Text
158
+ style={[styles.label, item.destructive && styles.destructive]}
159
+ >
160
+ {item.label}
161
+ </Text>
162
+ <View style={styles.icon}>{item.icon}</View>
163
+ </TouchableOpacity>
164
+ ))}
165
+ </Animated.View>
166
+ </Modal>
167
+ </>
168
+ );
169
+ };
170
+
171
+ const styles = StyleSheet.create({
172
+ button: {
173
+ width: 40,
174
+ height: 40,
175
+ borderRadius: 20,
176
+ backgroundColor: 'rgba(0,0,0,0.28)',
177
+ alignItems: 'center',
178
+ justifyContent: 'center',
179
+ },
180
+ card: {
181
+ position: 'absolute',
182
+ minWidth: 200,
183
+ backgroundColor: '#FFFFFF',
184
+ borderRadius: 14,
185
+ paddingVertical: 4,
186
+ shadowColor: '#121219',
187
+ shadowOffset: { width: 0, height: 6 },
188
+ shadowOpacity: 0.18,
189
+ shadowRadius: 16,
190
+ elevation: 12,
191
+ },
192
+ row: {
193
+ flexDirection: 'row',
194
+ alignItems: 'center',
195
+ justifyContent: 'space-between',
196
+ gap: 24,
197
+ paddingHorizontal: 16,
198
+ paddingVertical: 13,
199
+ },
200
+ rowDivider: {
201
+ borderTopWidth: StyleSheet.hairlineWidth,
202
+ borderTopColor: '#EFEFF2',
203
+ },
204
+ label: {
205
+ fontSize: 16,
206
+ color: '#141414',
207
+ },
208
+ destructive: {
209
+ color: '#E53935',
210
+ },
211
+ icon: {
212
+ width: 22,
213
+ alignItems: 'center',
214
+ },
215
+ });
216
+
217
+ export default ProfileMenu;
@@ -17,7 +17,13 @@ import { useToast } from '../../../context/ToastContext';
17
17
  import { updateRoom } from '../../../roomStore/roomsSlice';
18
18
  import { Text } from 'react-native';
19
19
 
20
- const SelectUsersModal: React.FC = () => {
20
+ interface SelectUsersModalProps {
21
+ /** Render the opener yourself (the chat profile uses an "Add Members"
22
+ * row). Falls back to the plain "Add more Users" button. */
23
+ trigger?: (open: () => void) => React.ReactNode;
24
+ }
25
+
26
+ const SelectUsersModal: React.FC<SelectUsersModalProps> = ({ trigger }) => {
21
27
  const { showToast } = useToast();
22
28
  const dispatch = useDispatch();
23
29
 
@@ -74,9 +80,13 @@ const SelectUsersModal: React.FC = () => {
74
80
 
75
81
  return (
76
82
  <>
77
- <ActionButton variant="filled" unstyled onPress={handleOpenModal}>
78
- Add more Users
79
- </ActionButton>
83
+ {trigger ? (
84
+ trigger(handleOpenModal)
85
+ ) : (
86
+ <ActionButton variant="filled" unstyled onPress={handleOpenModal}>
87
+ Add more Users
88
+ </ActionButton>
89
+ )}
80
90
 
81
91
  {isModalOpen && (
82
92
  <ModalBackground>
@@ -8,23 +8,10 @@ import { updateProfile } from '../../../networking/api-requests/user.api';
8
8
  import { useDispatch } from 'react-redux';
9
9
  import { updateUser } from '../../../roomStore/chatSettingsSlice';
10
10
  import { View } from 'react-native';
11
+ import { pickImageAsset, PickedImage } from '../../../helpers/pickImageAsset';
11
12
  import { AddPhotoIcon } from '../../../assets/icons';
12
13
  // import { actionUpdateUser } from '../actions';
13
14
 
14
- const base64ToFile = (base64String: string, fileName: string) => {
15
- const byteString = atob(base64String.split(',')[1]);
16
- const arrayBuffer = new ArrayBuffer(byteString.length);
17
- const uintArray = new Uint8Array(arrayBuffer);
18
- for (let i = 0; i < byteString.length; i++) {
19
- uintArray[i] = byteString.charCodeAt(i);
20
- }
21
- const blob = new Blob([uintArray], { type: 'image/jpeg' });
22
- return new File([blob], fileName, {
23
- type: 'image/jpeg',
24
- lastModified: Date.now(),
25
- });
26
- };
27
-
28
15
  interface EditUserModalProps {
29
16
  setIsEditing: React.Dispatch<React.SetStateAction<boolean>>;
30
17
  modalUser: any;
@@ -41,7 +28,7 @@ const EditUserModal: React.FC<EditUserModalProps> = ({
41
28
  const [firstName, setFirstName] = useState(modalUser?.firstName || '');
42
29
  const [lastName, setLastName] = useState(modalUser?.lastName || '');
43
30
  const [description, setDescription] = useState(modalUser?.description || '');
44
- const [profileImage, setProfileImage] = useState<string | File>(
31
+ const [profileImage, setProfileImage] = useState<string | PickedImage>(
45
32
  modalUser?.profileImage
46
33
  );
47
34
 
@@ -49,14 +36,8 @@ const EditUserModal: React.FC<EditUserModalProps> = ({
49
36
  try {
50
37
  let fd = new FormData();
51
38
 
52
- if (
53
- typeof profileImage === 'string' &&
54
- profileImage.startsWith('data:image/')
55
- ) {
56
- const file = base64ToFile(profileImage, 'profileImage.jpg');
57
- fd.append('file', file);
58
- } else if (profileImage instanceof File) {
59
- fd.append('file', profileImage);
39
+ if (profileImage && typeof profileImage !== 'string') {
40
+ fd.append('file', profileImage as any);
60
41
  }
61
42
 
62
43
  fd.append('firstName', firstName);
@@ -82,8 +63,11 @@ const EditUserModal: React.FC<EditUserModalProps> = ({
82
63
  }
83
64
  };
84
65
 
85
- const handleProfileImageChange = (image: File) => {
86
- setProfileImage(image);
66
+ const handleProfileImageChange = async () => {
67
+ const picked = await pickImageAsset();
68
+ if (picked) {
69
+ setProfileImage(picked);
70
+ }
87
71
  };
88
72
 
89
73
  return (