@planningcenter/chat-react-native 3.42.2-qa-821.1 → 3.42.2-qa-staging.4

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 (680) hide show
  1. package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
  2. package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
  3. package/build/components/conversation/attachments/attachment_card.js +7 -3
  4. package/build/components/conversation/attachments/attachment_card.js.map +1 -1
  5. package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +2 -1
  6. package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
  7. package/build/components/conversation/attachments/attachment_deleting_overlay.js +7 -12
  8. package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
  9. package/build/components/conversation/attachments/audio_attachment.d.ts +2 -1
  10. package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
  11. package/build/components/conversation/attachments/audio_attachment.js +23 -6
  12. package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
  13. package/build/components/conversation/attachments/expanded_link.d.ts +2 -1
  14. package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
  15. package/build/components/conversation/attachments/expanded_link.js +8 -2
  16. package/build/components/conversation/attachments/expanded_link.js.map +1 -1
  17. package/build/components/conversation/attachments/generic_file_attachment.d.ts +2 -1
  18. package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
  19. package/build/components/conversation/attachments/generic_file_attachment.js +12 -2
  20. package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
  21. package/build/components/conversation/attachments/giphy_attachment.d.ts +2 -1
  22. package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
  23. package/build/components/conversation/attachments/giphy_attachment.js +7 -2
  24. package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
  25. package/build/components/conversation/attachments/image_attachment.d.ts +2 -1
  26. package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
  27. package/build/components/conversation/attachments/image_attachment.js +53 -16
  28. package/build/components/conversation/attachments/image_attachment.js.map +1 -1
  29. package/build/components/conversation/attachments/video_attachment.d.ts +2 -1
  30. package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
  31. package/build/components/conversation/attachments/video_attachment.js +13 -3
  32. package/build/components/conversation/attachments/video_attachment.js.map +1 -1
  33. package/build/components/conversation/conversation_start_banner.d.ts +2 -1
  34. package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
  35. package/build/components/conversation/conversation_start_banner.js +14 -2
  36. package/build/components/conversation/conversation_start_banner.js.map +1 -1
  37. package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
  38. package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
  39. package/build/components/conversation/empty_conversation_blank_state.js +9 -2
  40. package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
  41. package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
  42. package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
  43. package/build/components/conversation/jump_to_bottom_button.js +10 -2
  44. package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
  45. package/build/components/conversation/message.d.ts +2 -1
  46. package/build/components/conversation/message.d.ts.map +1 -1
  47. package/build/components/conversation/message.js +53 -2
  48. package/build/components/conversation/message.js.map +1 -1
  49. package/build/components/conversation/message_attachments.d.ts +2 -1
  50. package/build/components/conversation/message_attachments.d.ts.map +1 -1
  51. package/build/components/conversation/message_attachments.js +21 -17
  52. package/build/components/conversation/message_attachments.js.map +1 -1
  53. package/build/components/conversation/message_form/message_form_attachment_file.d.ts +2 -1
  54. package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
  55. package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
  56. package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
  57. package/build/components/conversation/message_form/message_form_attachment_image.d.ts +2 -1
  58. package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
  59. package/build/components/conversation/message_form/message_form_attachment_image.js +2 -2
  60. package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
  61. package/build/components/conversation/message_form/message_form_attachment_video.d.ts +2 -1
  62. package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
  63. package/build/components/conversation/message_form/message_form_attachment_video.js +2 -2
  64. package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
  65. package/build/components/conversation/message_form.d.ts +6 -5
  66. package/build/components/conversation/message_form.d.ts.map +1 -1
  67. package/build/components/conversation/message_form.js +82 -20
  68. package/build/components/conversation/message_form.js.map +1 -1
  69. package/build/components/conversation/message_markdown.d.ts +2 -1
  70. package/build/components/conversation/message_markdown.d.ts.map +1 -1
  71. package/build/components/conversation/message_markdown.js +16 -8
  72. package/build/components/conversation/message_markdown.js.map +1 -1
  73. package/build/components/conversation/message_reaction.d.ts +2 -1
  74. package/build/components/conversation/message_reaction.d.ts.map +1 -1
  75. package/build/components/conversation/message_reaction.js +5 -3
  76. package/build/components/conversation/message_reaction.js.map +1 -1
  77. package/build/components/conversation/message_read_receipts.d.ts +2 -1
  78. package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
  79. package/build/components/conversation/message_read_receipts.js +13 -3
  80. package/build/components/conversation/message_read_receipts.js.map +1 -1
  81. package/build/components/conversation/messages_disabled_banners.d.ts +7 -3
  82. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  83. package/build/components/conversation/messages_disabled_banners.js +15 -8
  84. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  85. package/build/components/conversation/reply_connectors.d.ts +2 -2
  86. package/build/components/conversation/reply_connectors.d.ts.map +1 -1
  87. package/build/components/conversation/reply_connectors.js +50 -18
  88. package/build/components/conversation/reply_connectors.js.map +1 -1
  89. package/build/components/conversation/reply_shadow_message.d.ts +2 -1
  90. package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
  91. package/build/components/conversation/reply_shadow_message.js +46 -16
  92. package/build/components/conversation/reply_shadow_message.js.map +1 -1
  93. package/build/components/conversation/system_message.d.ts +2 -1
  94. package/build/components/conversation/system_message.d.ts.map +1 -1
  95. package/build/components/conversation/system_message.js +12 -3
  96. package/build/components/conversation/system_message.js.map +1 -1
  97. package/build/components/conversation/typing_indicator.d.ts +2 -1
  98. package/build/components/conversation/typing_indicator.d.ts.map +1 -1
  99. package/build/components/conversation/typing_indicator.js +13 -3
  100. package/build/components/conversation/typing_indicator.js.map +1 -1
  101. package/build/components/conversations/conversation_actions.d.ts +2 -2
  102. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  103. package/build/components/conversations/conversation_actions.js +10 -4
  104. package/build/components/conversations/conversation_actions.js.map +1 -1
  105. package/build/components/conversations/conversation_preview.d.ts +3 -2
  106. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  107. package/build/components/conversations/conversation_preview.js +76 -12
  108. package/build/components/conversations/conversation_preview.js.map +1 -1
  109. package/build/components/conversations/conversations.d.ts +1 -1
  110. package/build/components/conversations/conversations.d.ts.map +1 -1
  111. package/build/components/conversations/conversations.js +17 -16
  112. package/build/components/conversations/conversations.js.map +1 -1
  113. package/build/components/conversations/conversations_blank_state.d.ts +2 -1
  114. package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
  115. package/build/components/conversations/conversations_blank_state.js +12 -2
  116. package/build/components/conversations/conversations_blank_state.js.map +1 -1
  117. package/build/components/conversations/mute_indicator.d.ts +2 -1
  118. package/build/components/conversations/mute_indicator.d.ts.map +1 -1
  119. package/build/components/conversations/mute_indicator.js +2 -2
  120. package/build/components/conversations/mute_indicator.js.map +1 -1
  121. package/build/components/conversations/swipeable_toggle_button.d.ts +2 -1
  122. package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
  123. package/build/components/conversations/swipeable_toggle_button.js +10 -3
  124. package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
  125. package/build/components/conversations/unread_count_badge.d.ts +4 -2
  126. package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
  127. package/build/components/conversations/unread_count_badge.js +12 -7
  128. package/build/components/conversations/unread_count_badge.js.map +1 -1
  129. package/build/components/display/action_button.d.ts +1 -1
  130. package/build/components/display/action_button.d.ts.map +1 -1
  131. package/build/components/display/action_button.js +13 -3
  132. package/build/components/display/action_button.js.map +1 -1
  133. package/build/components/display/adult_requirement_notice.d.ts +2 -1
  134. package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
  135. package/build/components/display/adult_requirement_notice.js +4 -2
  136. package/build/components/display/adult_requirement_notice.js.map +1 -1
  137. package/build/components/display/avatar.d.ts +2 -1
  138. package/build/components/display/avatar.d.ts.map +1 -1
  139. package/build/components/display/avatar.js +7 -2
  140. package/build/components/display/avatar.js.map +1 -1
  141. package/build/components/display/avatar_group.d.ts +2 -1
  142. package/build/components/display/avatar_group.d.ts.map +1 -1
  143. package/build/components/display/avatar_group.js +9 -2
  144. package/build/components/display/avatar_group.js.map +1 -1
  145. package/build/components/display/badge.d.ts +2 -1
  146. package/build/components/display/badge.d.ts.map +1 -1
  147. package/build/components/display/badge.js +37 -6
  148. package/build/components/display/badge.js.map +1 -1
  149. package/build/components/display/banner.d.ts +3 -3
  150. package/build/components/display/banner.d.ts.map +1 -1
  151. package/build/components/display/banner.js +11 -4
  152. package/build/components/display/banner.js.map +1 -1
  153. package/build/components/display/banner_collapsible.d.ts +2 -2
  154. package/build/components/display/banner_collapsible.d.ts.map +1 -1
  155. package/build/components/display/banner_collapsible.js +10 -2
  156. package/build/components/display/banner_collapsible.js.map +1 -1
  157. package/build/components/display/button.d.ts +2 -1
  158. package/build/components/display/button.d.ts.map +1 -1
  159. package/build/components/display/button.js +14 -3
  160. package/build/components/display/button.js.map +1 -1
  161. package/build/components/display/child_notice.d.ts +2 -1
  162. package/build/components/display/child_notice.d.ts.map +1 -1
  163. package/build/components/display/child_notice.js +15 -3
  164. package/build/components/display/child_notice.js.map +1 -1
  165. package/build/components/display/conversation_avatar.d.ts +2 -1
  166. package/build/components/display/conversation_avatar.d.ts.map +1 -1
  167. package/build/components/display/conversation_avatar.js +9 -5
  168. package/build/components/display/conversation_avatar.js.map +1 -1
  169. package/build/components/display/emoji_avatar.d.ts +2 -1
  170. package/build/components/display/emoji_avatar.d.ts.map +1 -1
  171. package/build/components/display/emoji_avatar.js +12 -2
  172. package/build/components/display/emoji_avatar.js.map +1 -1
  173. package/build/components/display/file_attachment_preview.d.ts +1 -1
  174. package/build/components/display/file_attachment_preview.d.ts.map +1 -1
  175. package/build/components/display/file_attachment_preview.js +17 -3
  176. package/build/components/display/file_attachment_preview.js.map +1 -1
  177. package/build/components/display/heading.d.ts +2 -1
  178. package/build/components/display/heading.d.ts.map +1 -1
  179. package/build/components/display/heading.js +4 -2
  180. package/build/components/display/heading.js.map +1 -1
  181. package/build/components/display/icon.d.ts +2 -1
  182. package/build/components/display/icon.d.ts.map +1 -1
  183. package/build/components/display/icon.js +4 -4
  184. package/build/components/display/icon.js.map +1 -1
  185. package/build/components/display/icon_avatar.d.ts +2 -1
  186. package/build/components/display/icon_avatar.d.ts.map +1 -1
  187. package/build/components/display/icon_avatar.js +12 -2
  188. package/build/components/display/icon_avatar.js.map +1 -1
  189. package/build/components/display/icon_button.d.ts +2 -1
  190. package/build/components/display/icon_button.d.ts.map +1 -1
  191. package/build/components/display/icon_button.js +5 -3
  192. package/build/components/display/icon_button.js.map +1 -1
  193. package/build/components/display/image.d.ts +2 -1
  194. package/build/components/display/image.d.ts.map +1 -1
  195. package/build/components/display/image.js +7 -3
  196. package/build/components/display/image.js.map +1 -1
  197. package/build/components/display/image_attachment_preview.d.ts +1 -1
  198. package/build/components/display/image_attachment_preview.d.ts.map +1 -1
  199. package/build/components/display/image_attachment_preview.js +7 -2
  200. package/build/components/display/image_attachment_preview.js.map +1 -1
  201. package/build/components/display/keyboard_view.d.ts +2 -1
  202. package/build/components/display/keyboard_view.d.ts.map +1 -1
  203. package/build/components/display/keyboard_view.js +9 -4
  204. package/build/components/display/keyboard_view.js.map +1 -1
  205. package/build/components/display/person.d.ts +2 -1
  206. package/build/components/display/person.d.ts.map +1 -1
  207. package/build/components/display/person.js +12 -2
  208. package/build/components/display/person.js.map +1 -1
  209. package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
  210. package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
  211. package/build/components/display/platform_modal_header_buttons.js +10 -5
  212. package/build/components/display/platform_modal_header_buttons.js.map +1 -1
  213. package/build/components/display/pressable_row.d.ts +1 -1
  214. package/build/components/display/pressable_row.d.ts.map +1 -1
  215. package/build/components/display/pressable_row.js +7 -2
  216. package/build/components/display/pressable_row.js.map +1 -1
  217. package/build/components/display/spinner.d.ts +2 -1
  218. package/build/components/display/spinner.d.ts.map +1 -1
  219. package/build/components/display/spinner.js +9 -3
  220. package/build/components/display/spinner.js.map +1 -1
  221. package/build/components/display/switch.d.ts +2 -1
  222. package/build/components/display/switch.d.ts.map +1 -1
  223. package/build/components/display/switch.js +2 -2
  224. package/build/components/display/switch.js.map +1 -1
  225. package/build/components/display/tabs.d.ts +1 -1
  226. package/build/components/display/tabs.d.ts.map +1 -1
  227. package/build/components/display/tabs.js +31 -21
  228. package/build/components/display/tabs.js.map +1 -1
  229. package/build/components/display/text.d.ts +2 -1
  230. package/build/components/display/text.d.ts.map +1 -1
  231. package/build/components/display/text.js +4 -2
  232. package/build/components/display/text.js.map +1 -1
  233. package/build/components/display/text_button.d.ts +2 -1
  234. package/build/components/display/text_button.d.ts.map +1 -1
  235. package/build/components/display/text_button.js +8 -3
  236. package/build/components/display/text_button.js.map +1 -1
  237. package/build/components/display/text_inline_button.d.ts +2 -1
  238. package/build/components/display/text_inline_button.d.ts.map +1 -1
  239. package/build/components/display/text_inline_button.js +5 -4
  240. package/build/components/display/text_inline_button.js.map +1 -1
  241. package/build/components/display/text_input.d.ts +1 -1
  242. package/build/components/display/text_input.d.ts.map +1 -1
  243. package/build/components/display/text_input.js +1 -2
  244. package/build/components/display/text_input.js.map +1 -1
  245. package/build/components/display/toggle_button.d.ts +2 -1
  246. package/build/components/display/toggle_button.d.ts.map +1 -1
  247. package/build/components/display/toggle_button.js +9 -3
  248. package/build/components/display/toggle_button.js.map +1 -1
  249. package/build/components/display/video_attachment_preview.d.ts +1 -1
  250. package/build/components/display/video_attachment_preview.d.ts.map +1 -1
  251. package/build/components/display/video_attachment_preview.js +20 -3
  252. package/build/components/display/video_attachment_preview.js.map +1 -1
  253. package/build/components/group_conversation_list.d.ts +1 -1
  254. package/build/components/group_conversation_list.d.ts.map +1 -1
  255. package/build/components/group_conversation_list.js +14 -4
  256. package/build/components/group_conversation_list.js.map +1 -1
  257. package/build/components/page/component_error_boundary.d.ts +2 -2
  258. package/build/components/page/component_error_boundary.d.ts.map +1 -1
  259. package/build/components/page/component_error_boundary.js +4 -2
  260. package/build/components/page/component_error_boundary.js.map +1 -1
  261. package/build/components/page/loading.d.ts +2 -1
  262. package/build/components/page/loading.d.ts.map +1 -1
  263. package/build/components/page/loading.js +4 -2
  264. package/build/components/page/loading.js.map +1 -1
  265. package/build/components/page/page_error_boundary.d.ts +2 -2
  266. package/build/components/page/page_error_boundary.d.ts.map +1 -1
  267. package/build/components/page/page_error_boundary.js +32 -11
  268. package/build/components/page/page_error_boundary.js.map +1 -1
  269. package/build/components/primitive/avatar_primitive.js +41 -14
  270. package/build/components/primitive/avatar_primitive.js.map +1 -1
  271. package/build/components/primitive/banner_primitive.js +18 -10
  272. package/build/components/primitive/banner_primitive.js.map +1 -1
  273. package/build/components/primitive/blank_state_primitive.js +12 -8
  274. package/build/components/primitive/blank_state_primitive.js.map +1 -1
  275. package/build/components/primitive/form_sheet.d.ts +1 -1
  276. package/build/components/primitive/form_sheet.d.ts.map +1 -1
  277. package/build/components/primitive/form_sheet.js +22 -9
  278. package/build/components/primitive/form_sheet.js.map +1 -1
  279. package/build/components/safe_area_modal.d.ts +1 -1
  280. package/build/components/safe_area_modal.d.ts.map +1 -1
  281. package/build/components/safe_area_modal.js +3 -2
  282. package/build/components/safe_area_modal.js.map +1 -1
  283. package/build/contexts/api_provider.d.ts +2 -1
  284. package/build/contexts/api_provider.d.ts.map +1 -1
  285. package/build/contexts/api_provider.js +5 -3
  286. package/build/contexts/api_provider.js.map +1 -1
  287. package/build/contexts/chat_context.d.ts +1 -1
  288. package/build/contexts/chat_context.d.ts.map +1 -1
  289. package/build/contexts/chat_context.js +1 -2
  290. package/build/contexts/chat_context.js.map +1 -1
  291. package/build/contexts/conversation_context.d.ts +2 -2
  292. package/build/contexts/conversation_context.d.ts.map +1 -1
  293. package/build/contexts/conversation_context.js +2 -3
  294. package/build/contexts/conversation_context.js.map +1 -1
  295. package/build/contexts/conversations_context.d.ts +2 -2
  296. package/build/contexts/conversations_context.d.ts.map +1 -1
  297. package/build/contexts/conversations_context.js +2 -3
  298. package/build/contexts/conversations_context.js.map +1 -1
  299. package/build/contexts/session_context.d.ts +1 -1
  300. package/build/contexts/session_context.d.ts.map +1 -1
  301. package/build/contexts/session_context.js +2 -3
  302. package/build/contexts/session_context.js.map +1 -1
  303. package/build/hooks/direct_messages/find_direct_message_conversation.d.ts +14 -0
  304. package/build/hooks/direct_messages/find_direct_message_conversation.d.ts.map +1 -0
  305. package/build/hooks/direct_messages/find_direct_message_conversation.js +10 -0
  306. package/build/hooks/direct_messages/find_direct_message_conversation.js.map +1 -0
  307. package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts +16 -0
  308. package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts.map +1 -0
  309. package/build/hooks/direct_messages/resolve_message_available_members_link.js +24 -0
  310. package/build/hooks/direct_messages/resolve_message_available_members_link.js.map +1 -0
  311. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.d.ts.map +1 -1
  312. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js +1 -8
  313. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js.map +1 -1
  314. package/build/hooks/direct_messages/use_message_available_members.d.ts +6 -0
  315. package/build/hooks/direct_messages/use_message_available_members.d.ts.map +1 -0
  316. package/build/hooks/direct_messages/use_message_available_members.js +40 -0
  317. package/build/hooks/direct_messages/use_message_available_members.js.map +1 -0
  318. package/build/hooks/direct_messages/use_message_available_members_action.d.ts +6 -0
  319. package/build/hooks/direct_messages/use_message_available_members_action.d.ts.map +1 -0
  320. package/build/hooks/direct_messages/use_message_available_members_action.js +30 -0
  321. package/build/hooks/direct_messages/use_message_available_members_action.js.map +1 -0
  322. package/build/hooks/use_animated_message_background_color.d.ts +2 -2
  323. package/build/hooks/use_conversation.d.ts +1 -1
  324. package/build/hooks/use_conversation.d.ts.map +1 -1
  325. package/build/hooks/use_conversation.js +3 -0
  326. package/build/hooks/use_conversation.js.map +1 -1
  327. package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
  328. package/build/hooks/use_conversation_jolt_events.js +4 -19
  329. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  330. package/build/hooks/use_conversation_membership.d.ts +1 -1
  331. package/build/hooks/use_conversation_membership.d.ts.map +1 -1
  332. package/build/hooks/use_conversation_messages.d.ts +0 -1
  333. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  334. package/build/hooks/use_conversation_messages.js +2 -2
  335. package/build/hooks/use_conversation_messages.js.map +1 -1
  336. package/build/hooks/use_conversations_actions.d.ts +36 -36
  337. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  338. package/build/hooks/use_conversations_actions.js +3 -1
  339. package/build/hooks/use_conversations_actions.js.map +1 -1
  340. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  341. package/build/hooks/use_mark_latest_message_read.js +3 -4
  342. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  343. package/build/hooks/use_person_settings.d.ts +1 -1
  344. package/build/index.d.ts +1 -2
  345. package/build/index.d.ts.map +1 -1
  346. package/build/index.js.map +1 -1
  347. package/build/navigation/chat_access_gate.d.ts +2 -2
  348. package/build/navigation/chat_access_gate.d.ts.map +1 -1
  349. package/build/navigation/chat_access_gate.js +5 -6
  350. package/build/navigation/chat_access_gate.js.map +1 -1
  351. package/build/navigation/index.d.ts +36 -35
  352. package/build/navigation/index.d.ts.map +1 -1
  353. package/build/navigation/index.js +21 -19
  354. package/build/navigation/index.js.map +1 -1
  355. package/build/navigation/screenLayout.d.ts +2 -2
  356. package/build/navigation/screenLayout.d.ts.map +1 -1
  357. package/build/navigation/screenLayout.js +9 -3
  358. package/build/navigation/screenLayout.js.map +1 -1
  359. package/build/polyfills/events/EventTarget.d.ts +1 -1
  360. package/build/polyfills/events/EventTarget.d.ts.map +1 -1
  361. package/build/polyfills/events/EventTarget.js.map +1 -1
  362. package/build/screens/age_check/age_check_required_screen.d.ts +2 -1
  363. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  364. package/build/screens/age_check/age_check_required_screen.js +46 -3
  365. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  366. package/build/screens/age_check/age_check_underage_screen.d.ts +2 -1
  367. package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
  368. package/build/screens/age_check/age_check_underage_screen.js +25 -2
  369. package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
  370. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +2 -1
  371. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
  372. package/build/screens/age_check/components/age_check_select_birthdate_modal.js +25 -6
  373. package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
  374. package/build/screens/attachment_actions/attachment_actions_screen.d.ts +2 -1
  375. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  376. package/build/screens/attachment_actions/attachment_actions_screen.js +5 -3
  377. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  378. package/build/screens/avatar_picker/avatar_picker_screen.d.ts +2 -1
  379. package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
  380. package/build/screens/avatar_picker/avatar_picker_screen.js +36 -9
  381. package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
  382. package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
  383. package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
  384. package/build/screens/avatar_picker/avatar_preview.js +9 -5
  385. package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
  386. package/build/screens/avatar_picker/color_picker.d.ts +2 -1
  387. package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
  388. package/build/screens/avatar_picker/color_picker.js +5 -4
  389. package/build/screens/avatar_picker/color_picker.js.map +1 -1
  390. package/build/screens/avatar_picker/emoji_tab.d.ts +2 -1
  391. package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
  392. package/build/screens/avatar_picker/emoji_tab.js +13 -12
  393. package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
  394. package/build/screens/avatar_picker/icon_grid.d.ts +2 -1
  395. package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
  396. package/build/screens/avatar_picker/icon_grid.js +5 -4
  397. package/build/screens/avatar_picker/icon_grid.js.map +1 -1
  398. package/build/screens/avatar_picker/upload_tab.d.ts +2 -1
  399. package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
  400. package/build/screens/avatar_picker/upload_tab.js +4 -3
  401. package/build/screens/avatar_picker/upload_tab.js.map +1 -1
  402. package/build/screens/bug_report_screen.d.ts +2 -1
  403. package/build/screens/bug_report_screen.d.ts.map +1 -1
  404. package/build/screens/bug_report_screen.js +117 -11
  405. package/build/screens/bug_report_screen.js.map +1 -1
  406. package/build/screens/conversation/message_read_receipts_screen.d.ts +2 -1
  407. package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
  408. package/build/screens/conversation/message_read_receipts_screen.js +20 -4
  409. package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
  410. package/build/screens/conversation_details_screen.d.ts +2 -1
  411. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  412. package/build/screens/conversation_details_screen.js +106 -43
  413. package/build/screens/conversation_details_screen.js.map +1 -1
  414. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
  415. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
  416. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +9 -3
  417. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
  418. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
  419. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
  420. package/build/screens/conversation_filter_recipients/components/header_row.js +12 -2
  421. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
  422. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +2 -1
  423. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  424. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +44 -20
  425. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  426. package/build/screens/conversation_filters/components/conversation_filters.d.ts +2 -1
  427. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  428. package/build/screens/conversation_filters/components/conversation_filters.js +11 -10
  429. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  430. package/build/screens/conversation_filters/components/rows.d.ts +6 -6
  431. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  432. package/build/screens/conversation_filters/components/rows.js +34 -7
  433. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  434. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
  435. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  436. package/build/screens/conversation_filters/context/conversation_filter_context.js +1 -2
  437. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  438. package/build/screens/conversation_filters/group_filters.d.ts +2 -1
  439. package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
  440. package/build/screens/conversation_filters/group_filters.js +2 -2
  441. package/build/screens/conversation_filters/group_filters.js.map +1 -1
  442. package/build/screens/conversation_filters/team_filters.d.ts +2 -1
  443. package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
  444. package/build/screens/conversation_filters/team_filters.js +2 -2
  445. package/build/screens/conversation_filters/team_filters.js.map +1 -1
  446. package/build/screens/conversation_filters_screen.d.ts +2 -1
  447. package/build/screens/conversation_filters_screen.d.ts.map +1 -1
  448. package/build/screens/conversation_filters_screen.js +16 -4
  449. package/build/screens/conversation_filters_screen.js.map +1 -1
  450. package/build/screens/conversation_new/components/avatar_selection_row.d.ts +3 -2
  451. package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
  452. package/build/screens/conversation_new/components/avatar_selection_row.js +16 -6
  453. package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
  454. package/build/screens/conversation_new/components/filter_by_plan.d.ts +4 -3
  455. package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
  456. package/build/screens/conversation_new/components/filter_by_plan.js +46 -22
  457. package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
  458. package/build/screens/conversation_new/components/form_list.d.ts +3 -2
  459. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  460. package/build/screens/conversation_new/components/form_list.js +6 -4
  461. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  462. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +2 -1
  463. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
  464. package/build/screens/conversation_new/components/gender_filter_toggle.js +20 -4
  465. package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
  466. package/build/screens/conversation_new/components/groups_form.d.ts +2 -1
  467. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  468. package/build/screens/conversation_new/components/groups_form.js +30 -4
  469. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  470. package/build/screens/conversation_new/components/services_form.d.ts +2 -1
  471. package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
  472. package/build/screens/conversation_new/components/services_form.js +61 -27
  473. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  474. package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
  475. package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
  476. package/build/screens/conversation_new/components/source_app_error_card.js +3 -2
  477. package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
  478. package/build/screens/conversation_new/conversation_new_screen.d.ts +2 -1
  479. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  480. package/build/screens/conversation_new/conversation_new_screen.js +4 -4
  481. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  482. package/build/screens/conversation_notification_level_select_screen.d.ts +2 -1
  483. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
  484. package/build/screens/conversation_notification_level_select_screen.js +6 -4
  485. package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
  486. package/build/screens/conversation_screen.d.ts +3 -2
  487. package/build/screens/conversation_screen.d.ts.map +1 -1
  488. package/build/screens/conversation_screen.js +68 -25
  489. package/build/screens/conversation_screen.js.map +1 -1
  490. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
  491. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
  492. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -2
  493. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
  494. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +2 -1
  495. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
  496. package/build/screens/conversation_select_recipients/components/recipient_link_row.js +15 -2
  497. package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
  498. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +2 -1
  499. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
  500. package/build/screens/conversation_select_recipients/components/restricted_group_row.js +14 -2
  501. package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
  502. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
  503. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
  504. package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -2
  505. package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
  506. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
  507. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
  508. package/build/screens/conversation_select_recipients/components/view_more_link_row.js +5 -2
  509. package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
  510. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +2 -1
  511. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  512. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +11 -4
  513. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  514. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
  515. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  516. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +96 -13
  517. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  518. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +2 -1
  519. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  520. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +14 -7
  521. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  522. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +2 -1
  523. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  524. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +18 -15
  525. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  526. package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -0
  527. package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -1
  528. package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -1
  529. package/build/screens/conversation_select_type_screen.d.ts +2 -1
  530. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  531. package/build/screens/conversation_select_type_screen.js +10 -3
  532. package/build/screens/conversation_select_type_screen.js.map +1 -1
  533. package/build/screens/conversations/components/chat_group_badge.d.ts +2 -1
  534. package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
  535. package/build/screens/conversations/components/chat_group_badge.js +4 -3
  536. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  537. package/build/screens/conversations/components/list_header_action_button.d.ts +2 -1
  538. package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
  539. package/build/screens/conversations/components/list_header_action_button.js +5 -3
  540. package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
  541. package/build/screens/conversations/components/list_header_component.d.ts +2 -1
  542. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  543. package/build/screens/conversations/components/list_header_component.js +42 -19
  544. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  545. package/build/screens/conversations/conversations_screen.d.ts +2 -1
  546. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  547. package/build/screens/conversations/conversations_screen.js +6 -2
  548. package/build/screens/conversations/conversations_screen.js.map +1 -1
  549. package/build/screens/design_system_screen.d.ts +2 -1
  550. package/build/screens/design_system_screen.d.ts.map +1 -1
  551. package/build/screens/design_system_screen.js +558 -35
  552. package/build/screens/design_system_screen.js.map +1 -1
  553. package/build/screens/get_help_screen.d.ts +1 -1
  554. package/build/screens/get_help_screen.d.ts.map +1 -1
  555. package/build/screens/get_help_screen.js +25 -4
  556. package/build/screens/get_help_screen.js.map +1 -1
  557. package/build/screens/group_notification_level_select_screen.d.ts +2 -1
  558. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
  559. package/build/screens/group_notification_level_select_screen.js +4 -2
  560. package/build/screens/group_notification_level_select_screen.js.map +1 -1
  561. package/build/screens/group_notification_settings_screen.d.ts +2 -1
  562. package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
  563. package/build/screens/group_notification_settings_screen.js +25 -3
  564. package/build/screens/group_notification_settings_screen.js.map +1 -1
  565. package/build/screens/message_actions_screen.d.ts +2 -1
  566. package/build/screens/message_actions_screen.d.ts.map +1 -1
  567. package/build/screens/message_actions_screen.js +28 -12
  568. package/build/screens/message_actions_screen.js.map +1 -1
  569. package/build/screens/message_report/components/message_preview.d.ts +2 -1
  570. package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
  571. package/build/screens/message_report/components/message_preview.js +22 -2
  572. package/build/screens/message_report/components/message_preview.js.map +1 -1
  573. package/build/screens/message_report/components/report_reason_list.d.ts +2 -1
  574. package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
  575. package/build/screens/message_report/components/report_reason_list.js +13 -4
  576. package/build/screens/message_report/components/report_reason_list.js.map +1 -1
  577. package/build/screens/message_report_screen.d.ts +2 -1
  578. package/build/screens/message_report_screen.d.ts.map +1 -1
  579. package/build/screens/message_report_screen.js +61 -9
  580. package/build/screens/message_report_screen.js.map +1 -1
  581. package/build/screens/not_found.d.ts +2 -1
  582. package/build/screens/not_found.d.ts.map +1 -1
  583. package/build/screens/not_found.js +5 -2
  584. package/build/screens/not_found.js.map +1 -1
  585. package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
  586. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  587. package/build/screens/notification_settings_screen.d.ts +2 -1
  588. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  589. package/build/screens/notification_settings_screen.js +66 -28
  590. package/build/screens/notification_settings_screen.js.map +1 -1
  591. package/build/screens/preferred_app_selection_screen.d.ts +2 -1
  592. package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
  593. package/build/screens/preferred_app_selection_screen.js +21 -3
  594. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  595. package/build/screens/reactions_screen.d.ts +2 -1
  596. package/build/screens/reactions_screen.d.ts.map +1 -1
  597. package/build/screens/reactions_screen.js +19 -7
  598. package/build/screens/reactions_screen.js.map +1 -1
  599. package/build/screens/send_giphy_screen.d.ts +2 -1
  600. package/build/screens/send_giphy_screen.d.ts.map +1 -1
  601. package/build/screens/send_giphy_screen.js +31 -5
  602. package/build/screens/send_giphy_screen.js.map +1 -1
  603. package/build/screens/settings_screen.d.ts +2 -1
  604. package/build/screens/settings_screen.d.ts.map +1 -1
  605. package/build/screens/settings_screen.js +26 -4
  606. package/build/screens/settings_screen.js.map +1 -1
  607. package/build/screens/system_message_people_screen.d.ts +2 -1
  608. package/build/screens/system_message_people_screen.d.ts.map +1 -1
  609. package/build/screens/system_message_people_screen.js +10 -4
  610. package/build/screens/system_message_people_screen.js.map +1 -1
  611. package/build/screens/team_conversation_screen.d.ts +1 -1
  612. package/build/screens/team_conversation_screen.d.ts.map +1 -1
  613. package/build/screens/team_conversation_screen.js +12 -4
  614. package/build/screens/team_conversation_screen.js.map +1 -1
  615. package/build/types/resources/conversation.d.ts +10 -1
  616. package/build/types/resources/conversation.d.ts.map +1 -1
  617. package/build/types/resources/conversation.js.map +1 -1
  618. package/build/types/resources/direct_message_candidate.d.ts +1 -0
  619. package/build/types/resources/direct_message_candidate.d.ts.map +1 -1
  620. package/build/types/resources/direct_message_candidate.js.map +1 -1
  621. package/build/types/resources/member.d.ts +1 -0
  622. package/build/types/resources/member.d.ts.map +1 -1
  623. package/build/types/resources/member.js.map +1 -1
  624. package/build/types/resources/member_ability.d.ts +1 -0
  625. package/build/types/resources/member_ability.d.ts.map +1 -1
  626. package/build/types/resources/member_ability.js.map +1 -1
  627. package/build/utils/request/conversation.d.ts.map +1 -1
  628. package/build/utils/request/conversation.js +2 -0
  629. package/build/utils/request/conversation.js.map +1 -1
  630. package/build/utils/response_error.d.ts.map +1 -1
  631. package/build/utils/response_error.js +16 -6
  632. package/build/utils/response_error.js.map +1 -1
  633. package/build/utils/sha_256.js.map +1 -1
  634. package/build/utils/system_messages.d.ts +1 -1
  635. package/build/utils/system_messages.d.ts.map +1 -1
  636. package/build/utils/system_messages.js.map +1 -1
  637. package/build/utils/theme.d.ts +2 -2
  638. package/build/utils/theme.d.ts.map +1 -1
  639. package/build/utils/theme.js.map +1 -1
  640. package/package.json +12 -12
  641. package/src/__tests__/hooks/resolve_message_available_members_link.test.ts +72 -0
  642. package/src/__tests__/hooks/use_attachment_uploader.test.tsx +0 -1
  643. package/src/__tests__/hooks/use_font_scale.test.ts +3 -7
  644. package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
  645. package/src/__tests__/utils/system_messages.ts +1 -1
  646. package/src/__tests__/utils/uri.ts +50 -8
  647. package/src/__utils__/handlers.ts +6 -5
  648. package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +3 -10
  649. package/src/components/conversation/messages_disabled_banners.tsx +31 -4
  650. package/src/components/conversations/conversation_preview.tsx +58 -23
  651. package/src/components/conversations/unread_count_badge.tsx +13 -4
  652. package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
  653. package/src/components/page/__tests__/error_boundary.test.tsx +2 -6
  654. package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
  655. package/src/hooks/direct_messages/find_direct_message_conversation.ts +16 -0
  656. package/src/hooks/direct_messages/resolve_message_available_members_link.ts +42 -0
  657. package/src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts +2 -11
  658. package/src/hooks/direct_messages/use_message_available_members.ts +65 -0
  659. package/src/hooks/direct_messages/use_message_available_members_action.ts +34 -0
  660. package/src/hooks/use_conversation.ts +3 -0
  661. package/src/hooks/use_conversation_jolt_events.ts +3 -19
  662. package/src/hooks/use_conversation_messages.ts +5 -6
  663. package/src/hooks/use_conversations_actions.ts +3 -1
  664. package/src/hooks/use_mark_latest_message_read.ts +3 -4
  665. package/src/index.tsx +1 -2
  666. package/src/polyfills/events/EventTarget.ts +1 -1
  667. package/src/screens/conversation_screen.tsx +11 -5
  668. package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +18 -4
  669. package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -0
  670. package/src/screens/conversations/components/list_header_component.tsx +6 -6
  671. package/src/types/resources/conversation.ts +11 -1
  672. package/src/types/resources/direct_message_candidate.ts +5 -0
  673. package/src/types/resources/member.ts +1 -0
  674. package/src/types/resources/member_ability.ts +1 -0
  675. package/src/utils/__tests__/response_error.test.ts +7 -0
  676. package/src/utils/request/conversation.ts +2 -0
  677. package/src/utils/response_error.ts +18 -7
  678. package/src/utils/sha_256.ts +24 -24
  679. package/src/utils/system_messages.ts +1 -1
  680. package/src/utils/theme.ts +2 -3
@@ -1 +1 @@
1
- {"version":3,"file":"group_notification_level_select_screen.js","sourceRoot":"","sources":["../../src/screens/group_notification_level_select_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAA;AAEzF,MAAM,CAAC,MAAM,yCAAyC,GAAG,yBAAyB,CAAC;IACjF,WAAW,EAAE,oBAAoB;IACjC,mBAAmB,EAAE,CAAC,IAAI,CAAC;CAC5B,CAAC,CAAA;AAMF,MAAM,UAAU,kCAAkC,CAAC,EACjD,KAAK,GACmC;IACxC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,CAAA;IAChC,MAAM,UAAU,GAAG,aAAa,EAA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;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet } from 'react-native'\nimport { PressableRow } from '../components'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useTheme } from '../hooks'\nimport { useGroup, useGroupMembershipUpdate } from './notification_settings/hooks/groups'\n\nexport const GroupNotificationLevelSelectScreenOptions = getFormSheetScreenOptions({\n headerTitle: 'Notification level',\n sheetAllowedDetents: [0.35],\n})\n\nexport type GroupNotificationLevelSelectScreenProps = StaticScreenProps<{\n groupId: number | string\n}>\n\nexport function GroupNotificationLevelSelectScreen({\n route,\n}: GroupNotificationLevelSelectScreenProps) {\n const { groupId } = route.params\n const navigation = useNavigation()\n const styles = useStyles()\n const { colors } = useTheme()\n const { data: group } = useGroup({ groupId })\n const { mutate: updateNotificationLevel } = useGroupMembershipUpdate({ groupId })\n\n const notificationLevelOptions = group.myGroupMembership?.notificationLevelOptions ?? []\n\n const handleSelect = (value: string, isActive: boolean) => {\n if (!isActive) {\n updateNotificationLevel({ notificationLevel: value })\n }\n navigation.goBack()\n }\n\n return (\n <FormSheet.Root contentStyle={styles.content}>\n {notificationLevelOptions.map(option => (\n <PressableRow\n key={option.value}\n text={option.description}\n isActive={option.enabled}\n onPress={() => handleSelect(option.value, option.enabled)}\n iconColor={colors.statusSuccessIcon}\n style={styles.row}\n />\n ))}\n </FormSheet.Root>\n )\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n content: {\n paddingTop: 20,\n },\n row: {\n borderBottomWidth: 0,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"group_notification_level_select_screen.js","sourceRoot":"","sources":["../../src/screens/group_notification_level_select_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cA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,wBAAwB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACtC,CAAC,YAAY,CACX,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAClB,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CACzB,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACzB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAC1D,SAAS,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CACpC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAClB,CACH,CAAC,CACJ;IAAA,EAAE,SAAS,CAAC,IAAI,CAAC,CAClB,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,OAAO,EAAE;YACP,UAAU,EAAE,EAAE;SACf;QACD,GAAG,EAAE;YACH,iBAAiB,EAAE,CAAC;SACrB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet } from 'react-native'\nimport { PressableRow } from '../components'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useTheme } from '../hooks'\nimport { useGroup, useGroupMembershipUpdate } from './notification_settings/hooks/groups'\n\nexport const GroupNotificationLevelSelectScreenOptions = getFormSheetScreenOptions({\n headerTitle: 'Notification level',\n sheetAllowedDetents: [0.35],\n})\n\nexport type GroupNotificationLevelSelectScreenProps = StaticScreenProps<{\n groupId: number | string\n}>\n\nexport function GroupNotificationLevelSelectScreen({\n route,\n}: GroupNotificationLevelSelectScreenProps) {\n const { groupId } = route.params\n const navigation = useNavigation()\n const styles = useStyles()\n const { colors } = useTheme()\n const { data: group } = useGroup({ groupId })\n const { mutate: updateNotificationLevel } = useGroupMembershipUpdate({ groupId })\n\n const notificationLevelOptions = group.myGroupMembership?.notificationLevelOptions ?? []\n\n const handleSelect = (value: string, isActive: boolean) => {\n if (!isActive) {\n updateNotificationLevel({ notificationLevel: value })\n }\n navigation.goBack()\n }\n\n return (\n <FormSheet.Root contentStyle={styles.content}>\n {notificationLevelOptions.map(option => (\n <PressableRow\n key={option.value}\n text={option.description}\n isActive={option.enabled}\n onPress={() => handleSelect(option.value, option.enabled)}\n iconColor={colors.statusSuccessIcon}\n style={styles.row}\n />\n ))}\n </FormSheet.Root>\n )\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n content: {\n paddingTop: 20,\n },\n row: {\n borderBottomWidth: 0,\n },\n })\n}\n"]}
@@ -1,7 +1,8 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
+ import React from 'react';
2
3
  export type GroupNotificationSettingsScreenProps = StaticScreenProps<{
3
4
  groupId: number | string;
4
5
  title: string;
5
6
  }>;
6
- export declare function GroupNotificationSettingsScreen({ route }: GroupNotificationSettingsScreenProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function GroupNotificationSettingsScreen({ route }: GroupNotificationSettingsScreenProps): React.JSX.Element;
7
8
  //# sourceMappingURL=group_notification_settings_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"group_notification_settings_screen.d.ts","sourceRoot":"","sources":["../../src/screens/group_notification_settings_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAc3E,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;IACnE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC,CAAA;AAEF,wBAAgB,+BAA+B,CAAC,EAAE,KAAK,EAAE,EAAE,oCAAoC,2CA4D9F"}
1
+ {"version":3,"file":"group_notification_settings_screen.d.ts","sourceRoot":"","sources":["../../src/screens/group_notification_settings_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAoB,MAAM,OAAO,CAAA;AAYxC,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;IACnE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC,CAAA;AAEF,wBAAgB,+BAA+B,CAAC,EAAE,KAAK,EAAE,EAAE,oCAAoC,qBA4D9F"}
@@ -1,7 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { PlatformPressable } from '@react-navigation/elements';
3
2
  import { useNavigation } from '@react-navigation/native';
4
- import { useEffect } from 'react';
3
+ import React, { useEffect } from 'react';
5
4
  import { Platform, StyleSheet, View } from 'react-native';
6
5
  import { Heading, Icon, Text } from '../components';
7
6
  import { useTheme } from '../hooks';
@@ -21,7 +20,30 @@ export function GroupNotificationSettingsScreen({ route }) {
21
20
  const handleOpenSelector = () => {
22
21
  navigation.navigate('GroupNotificationLevelSelect', { groupId });
23
22
  };
24
- return (_jsxs(View, { style: styles.container, children: [_jsx(View, { style: styles.sectionOuter, children: _jsxs(View, { style: styles.sectionInner, children: [_jsx(Heading, { variant: "h2", style: styles.sectionHeading, children: "Group notification settings" }), _jsxs(Text, { variant: "tertiary", style: styles.sectionSubtitle, children: ["The settings are applied to all conversations in", ' ', _jsx(Text, { variant: "tertiary", style: styles.groupNameBold, children: group.name || title })] })] }) }), _jsx(PlatformPressable, { style: styles.settingRowPressable, onPress: handleOpenSelector, accessibilityRole: "button", accessibilityLabel: "Notify me for", accessibilityHint: `Currently set to ${notificationLevelDescription}. Tap to change.`, children: _jsxs(View, { style: styles.settingRowInner, children: [_jsxs(View, { style: styles.settingRowText, children: [_jsx(Text, { children: "Notify me for" }), Boolean(notificationLevelDescription) && (_jsx(Text, { variant: "tertiary", children: notificationLevelDescription }))] }), Platform.OS === 'ios' && (_jsx(Icon, { name: "general.rightChevron", size: 16, style: styles.chevron, accessibilityElementsHidden: true }))] }) })] }));
23
+ return (<View style={styles.container}>
24
+ <View style={styles.sectionOuter}>
25
+ <View style={styles.sectionInner}>
26
+ <Heading variant="h2" style={styles.sectionHeading}>
27
+ Group notification settings
28
+ </Heading>
29
+ <Text variant="tertiary" style={styles.sectionSubtitle}>
30
+ The settings are applied to all conversations in{' '}
31
+ <Text variant="tertiary" style={styles.groupNameBold}>
32
+ {group.name || title}
33
+ </Text>
34
+ </Text>
35
+ </View>
36
+ </View>
37
+ <PlatformPressable style={styles.settingRowPressable} onPress={handleOpenSelector} accessibilityRole="button" accessibilityLabel="Notify me for" accessibilityHint={`Currently set to ${notificationLevelDescription}. Tap to change.`}>
38
+ <View style={styles.settingRowInner}>
39
+ <View style={styles.settingRowText}>
40
+ <Text>Notify me for</Text>
41
+ {Boolean(notificationLevelDescription) && (<Text variant="tertiary">{notificationLevelDescription}</Text>)}
42
+ </View>
43
+ {Platform.OS === 'ios' && (<Icon name="general.rightChevron" size={16} style={styles.chevron} accessibilityElementsHidden/>)}
44
+ </View>
45
+ </PlatformPressable>
46
+ </View>);
25
47
  }
26
48
  const useStyles = () => {
27
49
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"group_notification_settings_screen.js","sourceRoot":"","sources":["../../src/screens/group_notification_settings_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE3E,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,sBA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,EAAE;YACd,aAAa,EAAE,EAAE;SAClB;QACD,eAAe,EAAE;YACf,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,aAAa,EAAE,CAAC;SACjB;QACD,aAAa,EAAE;YACb,UAAU,EAAE,sBAAsB;SACnC;QACD,mBAAmB,EAAE;YACnB,WAAW,EAAE,EAAE;SAChB;QACD,eAAe,EAAE;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,EAAE;SACpB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport type { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { useEffect } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { useTheme } from '../hooks'\nimport { platformFontWeightBold } from '../utils/styles'\nimport type { GroupNotificationLevelSelectScreenProps } from './group_notification_level_select_screen'\nimport { useGroup } from './notification_settings/hooks/groups'\n\ntype GroupNotificationSettingsStackParamList = {\n GroupNotificationLevelSelect: GroupNotificationLevelSelectScreenProps['route']['params']\n}\n\nexport type GroupNotificationSettingsScreenProps = StaticScreenProps<{\n groupId: number | string\n title: string\n}>\n\nexport function GroupNotificationSettingsScreen({ route }: GroupNotificationSettingsScreenProps) {\n const { groupId, title } = route.params\n const navigation =\n useNavigation<NativeStackNavigationProp<GroupNotificationSettingsStackParamList>>()\n const styles = useStyles()\n const { data: group } = useGroup({ groupId })\n\n const notificationLevelDescription = group.myGroupMembership?.notificationLevelDescription\n\n useEffect(() => {\n if (!group.name || title === group.name) return\n\n navigation.setOptions({ title: group.name })\n }, [group.name, title, navigation])\n\n const handleOpenSelector = () => {\n navigation.navigate('GroupNotificationLevelSelect', { groupId })\n }\n\n return (\n <View style={styles.container}>\n <View style={styles.sectionOuter}>\n <View style={styles.sectionInner}>\n <Heading variant=\"h2\" style={styles.sectionHeading}>\n Group notification settings\n </Heading>\n <Text variant=\"tertiary\" style={styles.sectionSubtitle}>\n The settings are applied to all conversations in{' '}\n <Text variant=\"tertiary\" style={styles.groupNameBold}>\n {group.name || title}\n </Text>\n </Text>\n </View>\n </View>\n <PlatformPressable\n style={styles.settingRowPressable}\n onPress={handleOpenSelector}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Notify me for\"\n accessibilityHint={`Currently set to ${notificationLevelDescription}. Tap to change.`}\n >\n <View style={styles.settingRowInner}>\n <View style={styles.settingRowText}>\n <Text>Notify me for</Text>\n {Boolean(notificationLevelDescription) && (\n <Text variant=\"tertiary\">{notificationLevelDescription}</Text>\n )}\n </View>\n {Platform.OS === 'ios' && (\n <Icon\n name=\"general.rightChevron\"\n size={16}\n style={styles.chevron}\n accessibilityElementsHidden\n />\n )}\n </View>\n </PlatformPressable>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.surfaceColor100,\n },\n sectionOuter: {\n paddingLeft: 16,\n backgroundColor: colors.surfaceColor100,\n },\n sectionInner: {\n paddingRight: 16,\n paddingTop: 24,\n paddingBottom: 12,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n sectionHeading: {\n paddingBottom: 12,\n },\n sectionSubtitle: {\n color: colors.textColorDefaultSecondary,\n paddingBottom: 2,\n },\n groupNameBold: {\n fontWeight: platformFontWeightBold,\n },\n settingRowPressable: {\n paddingLeft: 16,\n },\n settingRowInner: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingRight: 16,\n paddingVertical: 12,\n },\n settingRowText: {\n flex: 1,\n gap: 2,\n },\n chevron: {\n color: colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"group_notification_settings_screen.js","sourceRoot":"","sources":["../../src/screens/group_notification_settings_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAA;AAW/D,MAAM,UAAU,+BAA+B,CAAC,EAAE,KAAK,EAAwC;IAC7F,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,MAAM,CAAA;IACvC,MAAM,UAAU,GACd,aAAa,EAAsE,CAAA;IACrF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IAE7C,MAAM,4BAA4B,GAAG,KAAK,CAAC,iBAAiB,EAAE,4BAA4B,CAAA;IAE1F,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,IAAI;YAAE,OAAM;QAE/C,UAAU,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC,EAAE,CAAC,KAAK,CAAC,IA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,eAAe,EAAE;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,EAAE;SACpB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport type { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { useEffect } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { useTheme } from '../hooks'\nimport { platformFontWeightBold } from '../utils/styles'\nimport type { GroupNotificationLevelSelectScreenProps } from './group_notification_level_select_screen'\nimport { useGroup } from './notification_settings/hooks/groups'\n\ntype GroupNotificationSettingsStackParamList = {\n GroupNotificationLevelSelect: GroupNotificationLevelSelectScreenProps['route']['params']\n}\n\nexport type GroupNotificationSettingsScreenProps = StaticScreenProps<{\n groupId: number | string\n title: string\n}>\n\nexport function GroupNotificationSettingsScreen({ route }: GroupNotificationSettingsScreenProps) {\n const { groupId, title } = route.params\n const navigation =\n useNavigation<NativeStackNavigationProp<GroupNotificationSettingsStackParamList>>()\n const styles = useStyles()\n const { data: group } = useGroup({ groupId })\n\n const notificationLevelDescription = group.myGroupMembership?.notificationLevelDescription\n\n useEffect(() => {\n if (!group.name || title === group.name) return\n\n navigation.setOptions({ title: group.name })\n }, [group.name, title, navigation])\n\n const handleOpenSelector = () => {\n navigation.navigate('GroupNotificationLevelSelect', { groupId })\n }\n\n return (\n <View style={styles.container}>\n <View style={styles.sectionOuter}>\n <View style={styles.sectionInner}>\n <Heading variant=\"h2\" style={styles.sectionHeading}>\n Group notification settings\n </Heading>\n <Text variant=\"tertiary\" style={styles.sectionSubtitle}>\n The settings are applied to all conversations in{' '}\n <Text variant=\"tertiary\" style={styles.groupNameBold}>\n {group.name || title}\n </Text>\n </Text>\n </View>\n </View>\n <PlatformPressable\n style={styles.settingRowPressable}\n onPress={handleOpenSelector}\n accessibilityRole=\"button\"\n accessibilityLabel=\"Notify me for\"\n accessibilityHint={`Currently set to ${notificationLevelDescription}. Tap to change.`}\n >\n <View style={styles.settingRowInner}>\n <View style={styles.settingRowText}>\n <Text>Notify me for</Text>\n {Boolean(notificationLevelDescription) && (\n <Text variant=\"tertiary\">{notificationLevelDescription}</Text>\n )}\n </View>\n {Platform.OS === 'ios' && (\n <Icon\n name=\"general.rightChevron\"\n size={16}\n style={styles.chevron}\n accessibilityElementsHidden\n />\n )}\n </View>\n </PlatformPressable>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: colors.surfaceColor100,\n },\n sectionOuter: {\n paddingLeft: 16,\n backgroundColor: colors.surfaceColor100,\n },\n sectionInner: {\n paddingRight: 16,\n paddingTop: 24,\n paddingBottom: 12,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n sectionHeading: {\n paddingBottom: 12,\n },\n sectionSubtitle: {\n color: colors.textColorDefaultSecondary,\n paddingBottom: 2,\n },\n groupNameBold: {\n fontWeight: platformFontWeightBold,\n },\n settingRowPressable: {\n paddingLeft: 16,\n },\n settingRowInner: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingRight: 16,\n paddingVertical: 12,\n },\n settingRowText: {\n flex: 1,\n gap: 2,\n },\n chevron: {\n color: colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
+ import React from 'react';
2
3
  export declare const MessageActionsScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
3
4
  export type MessageActionsScreenProps = StaticScreenProps<{
4
5
  message_id: string;
@@ -8,5 +9,5 @@ export type MessageActionsScreenProps = StaticScreenProps<{
8
9
  inReplyScreen?: boolean;
9
10
  isSystemMessage?: boolean;
10
11
  }>;
11
- export declare function MessageActionsScreen({ route }: MessageActionsScreenProps): import("react/jsx-runtime").JSX.Element | null;
12
+ export declare function MessageActionsScreen({ route }: MessageActionsScreenProps): React.JSX.Element | null;
12
13
  //# sourceMappingURL=message_actions_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message_actions_screen.d.ts","sourceRoot":"","sources":["../../src/screens/message_actions_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAkBzF,eAAO,MAAM,2BAA2B,uEAGtC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACxD,UAAU,EAAE,MAAM,CAAA;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC,CAAA;AAEF,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,yBAAyB,kDA6BxE"}
1
+ {"version":3,"file":"message_actions_screen.d.ts","sourceRoot":"","sources":["../../src/screens/message_actions_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAGzF,OAAO,KAAsB,MAAM,OAAO,CAAA;AAe1C,eAAO,MAAM,2BAA2B,uEAGtC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;IACxD,UAAU,EAAE,MAAM,CAAA;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC,CAAA;AAEF,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,yBAAyB,4BA6BxE"}
@@ -1,9 +1,8 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { PlatformPressable } from '@react-navigation/elements';
3
2
  import { StackActions, useNavigation } from '@react-navigation/native';
4
3
  import { useMutation } from '@tanstack/react-query';
5
4
  import { isNil, omitBy } from 'lodash';
6
- import { useCallback } from 'react';
5
+ import React, { useCallback } from 'react';
7
6
  import { Alert, Platform, StyleSheet, View } from 'react-native';
8
7
  import { Text } from '../components';
9
8
  import { useReactionStyles } from '../components/conversation/message_reaction';
@@ -25,7 +24,7 @@ export function MessageActionsScreen({ route }) {
25
24
  const message = messages.find(m => m.id === message_id);
26
25
  if (!message)
27
26
  return null;
28
- return (_jsx(MessageActionsScreenContent, { message: message, conversation_id: conversation_id, canDeleteNonAuthoredMessages: canDeleteNonAuthoredMessages || false, refetchMessages: refetch, inReplyScreen: inReplyScreen, replyRootAuthorName: reply_root_author_name, isSystemMessage: isSystemMessage }));
27
+ return (<MessageActionsScreenContent message={message} conversation_id={conversation_id} canDeleteNonAuthoredMessages={canDeleteNonAuthoredMessages || false} refetchMessages={refetch} inReplyScreen={inReplyScreen} replyRootAuthorName={reply_root_author_name} isSystemMessage={isSystemMessage}/>);
29
28
  }
30
29
  function MessageActionsScreenContent({ message, conversation_id, canDeleteNonAuthoredMessages, refetchMessages, inReplyScreen, replyRootAuthorName, isSystemMessage, }) {
31
30
  const navigation = useNavigation();
@@ -148,14 +147,27 @@ function MessageActionsScreenContent({ message, conversation_id, canDeleteNonAut
148
147
  ]);
149
148
  }, [handleRemoveLinkPreview]);
150
149
  const showReportMessageAction = !message?.mine && featureEnabled(availableFeatures.message_reporting);
151
- return (_jsxs(FormSheet.Root, { style: styles.formSheetContent, children: [_jsx(View, { style: styles.reactionList, children: availableReactions.map((reaction, index) => (_jsx(Reaction, { reaction: reaction, onPress: () => {
152
- Haptic.impactLight();
153
- handleReactionToggle({
154
- value: reaction.value,
155
- mine: reaction.mine,
156
- });
157
- navigation.goBack();
158
- } }, index))) }), !isSystemMessage && (_jsxs(View, { style: styles.actions, children: [!inReplyScreen && (_jsx(FormSheet.Action, { onPress: handleReplyPress, title: "Reply to message", iconName: "registrations.undo", accessibilityHint: "Navigates to the reply screen", accessibilityRole: "link" })), _jsx(FormSheet.Action, { onPress: handleCopyPress, title: "Copy text", iconName: "services.fileCopy", accessibilityHint: "Copies text and links to clipboard" }), showReportMessageAction && (_jsx(FormSheet.Action, { onPress: handleReportPress, title: "Report message", iconName: "chat.reportMessageO", accessibilityHint: "Opens a form to report this message" })), message?.mine && (_jsx(FormSheet.Action, { onPress: () => handleEditPress(), title: "Edit message", iconName: "accounts.editor", accessibilityHint: "Opens existing text in the message form input." })), message?.mine && (_jsx(FormSheet.Action, { onPress: () => handleViewReadReceiptsPress(), title: "View read receipts", iconName: "general.checkPerson", accessibilityHint: "Opens a modal with a list of people who read your message." })), message?.mine && hasExpandedLink && (_jsx(FormSheet.Action, { onPress: () => handleRemoveLinkPreviewConfirm(), title: "Remove link preview", iconName: "general.brokenLink", accessibilityHint: "Removes an expanded link preview from the message." })), (message?.mine || canDeleteNonAuthoredMessages) && (_jsx(FormSheet.Action, { onPress: () => handleDeleteConfirm(), title: "Delete message", iconName: "publishing.trash", appearance: "danger", disabled: isPending, accessibilityHint: "Opens a confirmation alert to delete this message permanently." }))] }))] }));
150
+ return (<FormSheet.Root style={styles.formSheetContent}>
151
+ <View style={styles.reactionList}>
152
+ {availableReactions.map((reaction, index) => (<Reaction key={index} reaction={reaction} onPress={() => {
153
+ Haptic.impactLight();
154
+ handleReactionToggle({
155
+ value: reaction.value,
156
+ mine: reaction.mine,
157
+ });
158
+ navigation.goBack();
159
+ }}/>))}
160
+ </View>
161
+ {!isSystemMessage && (<View style={styles.actions}>
162
+ {!inReplyScreen && (<FormSheet.Action onPress={handleReplyPress} title="Reply to message" iconName="registrations.undo" accessibilityHint="Navigates to the reply screen" accessibilityRole="link"/>)}
163
+ <FormSheet.Action onPress={handleCopyPress} title="Copy text" iconName="services.fileCopy" accessibilityHint="Copies text and links to clipboard"/>
164
+ {showReportMessageAction && (<FormSheet.Action onPress={handleReportPress} title="Report message" iconName="chat.reportMessageO" accessibilityHint="Opens a form to report this message"/>)}
165
+ {message?.mine && (<FormSheet.Action onPress={() => handleEditPress()} title="Edit message" iconName="accounts.editor" accessibilityHint="Opens existing text in the message form input."/>)}
166
+ {message?.mine && (<FormSheet.Action onPress={() => handleViewReadReceiptsPress()} title="View read receipts" iconName="general.checkPerson" accessibilityHint="Opens a modal with a list of people who read your message."/>)}
167
+ {message?.mine && hasExpandedLink && (<FormSheet.Action onPress={() => handleRemoveLinkPreviewConfirm()} title="Remove link preview" iconName="general.brokenLink" accessibilityHint="Removes an expanded link preview from the message."/>)}
168
+ {(message?.mine || canDeleteNonAuthoredMessages) && (<FormSheet.Action onPress={() => handleDeleteConfirm()} title="Delete message" iconName="publishing.trash" appearance="danger" disabled={isPending} accessibilityHint="Opens a confirmation alert to delete this message permanently."/>)}
169
+ </View>)}
170
+ </FormSheet.Root>);
159
171
  }
160
172
  const Reaction = ({ reaction, onPress, }) => {
161
173
  const styles = useStyles();
@@ -163,7 +175,11 @@ const Reaction = ({ reaction, onPress, }) => {
163
175
  const { colors } = useTheme();
164
176
  const baseRippleColor = reaction.mine ? colors.interaction : colors.fillColorNeutral060;
165
177
  const androidRippleColor = useCreateAndroidRippleColor({ color: baseRippleColor });
166
- return (_jsx(PlatformPressable, { style: [reactionStyles.reaction, styles.reaction], android_ripple: { color: androidRippleColor, borderless: false, foreground: true }, onPress: onPress, children: _jsx(Text, { style: styles.reactionEmoji, allowFontScaling: false, children: REACTION_EMOJIS[reaction.value] }) }, reaction.value));
178
+ return (<PlatformPressable key={reaction.value} style={[reactionStyles.reaction, styles.reaction]} android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }} onPress={onPress}>
179
+ <Text style={styles.reactionEmoji} allowFontScaling={false}>
180
+ {REACTION_EMOJIS[reaction.value]}
181
+ </Text>
182
+ </PlatformPressable>);
167
183
  };
168
184
  const useStyles = () => {
169
185
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"message_actions_screen.js","sourceRoot":"","sources":["../../src/screens/message_actions_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AAC/E,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AACzF,OAAO,EAAE,2BAA2B,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAA;AAG/E,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,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AC;QACtC,GAAG,EAAE,QAAQ;QACb,OAAO,EAAE,QAAQ,GAAG,cAAc,GAAG,CAAC;KACvC,CAAC,CAAA;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,UAAU,EAAE,EAAE;SACf;QACD,YAAY,EAAE;YACZ,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,CAAC;YACb,aAAa,EAAE,EAAE;YACjB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;YAChD,iBAAiB,EAAE,CAAC;SACrB;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,eAAe;YACvB,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,cAAc;YAC3B,YAAY,EAAE,EAAE;YAChB,cAAc,EAAE,QAAQ;YACxB,QAAQ,EAAE,QAAQ;SACnB;QACD,aAAa,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,QAAQ;SACpB;QACD,OAAO,EAAE;YACP,UAAU,EAAE,CAAC;SACd;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport { useMutation } from '@tanstack/react-query'\nimport { isNil, omitBy } from 'lodash'\nimport React, { useCallback } from 'react'\nimport { Alert, Platform, StyleSheet, View } from 'react-native'\nimport { Text } from '../components'\nimport { useReactionStyles } from '../components/conversation/message_reaction'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useCreateAndroidRippleColor, useFontScale, useTheme } from '../hooks'\nimport { useApiClient } from '../hooks/use_api_client'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { availableFeatures, useFeatures } from '../hooks/use_features'\nimport { useMessageReactionToggle } from '../hooks/use_message_reaction_toggle'\nimport { MessageResource } from '../types'\nimport { ReactionCountResource } from '../types/resources/reaction'\nimport { REACTION_EMOJIS } from '../utils'\nimport { Clipboard, Haptic } from '../utils/native_adapters'\n\nexport const MessageActionsScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: [0.5],\n headerTitle: 'Message actions',\n})\n\nexport type MessageActionsScreenProps = StaticScreenProps<{\n message_id: string\n reply_root_author_name?: string\n conversation_id: number\n canDeleteNonAuthoredMessages?: boolean\n inReplyScreen?: boolean\n isSystemMessage?: boolean\n}>\n\nexport function MessageActionsScreen({ route }: MessageActionsScreenProps) {\n const {\n conversation_id,\n message_id,\n canDeleteNonAuthoredMessages,\n inReplyScreen,\n reply_root_author_name,\n isSystemMessage,\n } = route.params\n\n const { messages, refetch } = useConversationMessages(\n { conversation_id },\n { refetchOnMount: false }\n )\n const message = messages.find(m => m.id === message_id)\n\n if (!message) return null\n\n return (\n <MessageActionsScreenContent\n message={message}\n conversation_id={conversation_id}\n canDeleteNonAuthoredMessages={canDeleteNonAuthoredMessages || false}\n refetchMessages={refetch}\n inReplyScreen={inReplyScreen}\n replyRootAuthorName={reply_root_author_name}\n isSystemMessage={isSystemMessage}\n />\n )\n}\n\nfunction MessageActionsScreenContent({\n message,\n conversation_id,\n canDeleteNonAuthoredMessages,\n refetchMessages,\n inReplyScreen,\n replyRootAuthorName,\n isSystemMessage,\n}: {\n message: MessageResource\n conversation_id: number\n canDeleteNonAuthoredMessages: boolean\n refetchMessages: () => void\n inReplyScreen?: boolean\n replyRootAuthorName?: string\n isSystemMessage?: boolean\n}) {\n const navigation = useNavigation()\n const apiClient = useApiClient()\n const styles = useStyles()\n const { featureEnabled } = useFeatures()\n const expandedLink = message.attachments.find(attachment => attachment.type === 'ExpandedLink')\n const hasExpandedLink = !!expandedLink\n\n const myReactions = message?.reactionCounts\n .filter(reaction => reaction.mine)\n .map(reaction => reaction.value)\n\n const availableReactions = Object.entries(REACTION_EMOJIS).map(([value, emoji]) => {\n return {\n value: value as ReactionCountResource['value'],\n emoji,\n mine: myReactions?.includes(value as ReactionCountResource['value']),\n }\n })\n\n const attachmentForCopy = (): string => {\n const giphyTitleLink = message?.attachments.find(\n attachment => attachment.type === 'giphy'\n )?.titleLink\n\n if (giphyTitleLink) return giphyTitleLink\n return ''\n }\n\n const handleReplyPress = useCallback(() => {\n navigation.goBack()\n // Waits for the modal to be dismissed before pushing the reply screen\n requestAnimationFrame(() => {\n navigation.navigate('ConversationReply', {\n conversation_id,\n reply_root_id: message.replyRootId || message.id,\n reply_root_author_name: replyRootAuthorName,\n })\n })\n }, [navigation, conversation_id, message.id, message.replyRootId, replyRootAuthorName])\n\n const handleCopyPress = () => {\n Clipboard.setStringAsync(message?.text || attachmentForCopy() || '')\n navigation.goBack()\n }\n\n const handleReportPress = useCallback(() => {\n Haptic.impactLight()\n navigation.navigate('MessageReport', {\n conversation_id,\n message_id: message.id,\n })\n }, [navigation, conversation_id, message.id])\n\n const { handleReactionToggle, isPending } = useMessageReactionToggle({\n conversation_id,\n message,\n })\n\n const deleteMessage = useCallback(() => {\n const url = `/me/conversations/${conversation_id}/messages/${message.id}/`\n\n return apiClient.chat.delete({ url })\n }, [apiClient, conversation_id, message.id])\n\n const { mutate: handleDeleteMessage } = useMutation({\n mutationFn: deleteMessage,\n mutationKey: ['deleteMessage', message.id],\n onSuccess: () => {\n refetchMessages()\n Haptic.notificationSuccess()\n },\n onError: () => {\n Alert.alert('Oops', 'We were unable to delete this message. Please try again.')\n },\n })\n\n const handleDeleteConfirm = useCallback(() => {\n Alert.alert('Delete message', 'Are you sure you want to permanently delete this message?', [\n { text: 'Cancel', style: 'cancel' },\n {\n text: 'Delete',\n style: 'destructive',\n onPress: () => {\n handleDeleteMessage()\n navigation.goBack()\n },\n },\n ])\n }, [handleDeleteMessage, navigation])\n\n const handleEditPress = useCallback(() => {\n const state = navigation.getState?.()\n const targetRouteName = inReplyScreen ? 'ConversationReply' : 'Conversation'\n const targetRoute = state?.routes?.find(r => r.name === targetRouteName)\n const params = omitBy(\n {\n ...(targetRoute?.params || {}),\n conversation_id,\n editing_message_id: message.id,\n },\n isNil\n )\n navigation.dispatch(StackActions.popTo(targetRouteName, params))\n }, [navigation, conversation_id, message.id, inReplyScreen])\n\n const handleViewReadReceiptsPress = useCallback(() => {\n Haptic.impactLight()\n const params = omitBy(\n {\n conversation_id,\n message_id: message.id,\n },\n isNil\n )\n navigation.dispatch(StackActions.popTo('MessageReadReceipts', params))\n }, [navigation, conversation_id, message.id])\n\n const removeLinkPreview = useCallback(() => {\n const url = `/me/conversations/${conversation_id}/messages/${message.id}/remove_expanded_link`\n const data = {\n data: { type: 'ExpandedLink', attributes: { expanded_link_id: expandedLink?.id } },\n }\n\n return apiClient.chat.post({ url, data })\n }, [apiClient, conversation_id, message.id, expandedLink])\n\n const { mutate: handleRemoveLinkPreview } = useMutation({\n mutationFn: removeLinkPreview,\n onSuccess: () => {\n refetchMessages()\n Haptic.notificationSuccess()\n navigation.goBack()\n },\n onError: () => {\n Alert.alert('Oops', 'We were unable to remove the preview. Please try again.')\n },\n })\n\n const handleRemoveLinkPreviewConfirm = useCallback(() => {\n Alert.alert('Remove link preview?', 'This will remove the image preview but retain the link', [\n { text: 'Cancel', style: 'cancel' },\n { text: 'Remove', style: 'destructive', onPress: () => handleRemoveLinkPreview() },\n ])\n }, [handleRemoveLinkPreview])\n\n const showReportMessageAction =\n !message?.mine && featureEnabled(availableFeatures.message_reporting)\n\n return (\n <FormSheet.Root style={styles.formSheetContent}>\n <View style={styles.reactionList}>\n {availableReactions.map((reaction, index) => (\n <Reaction\n key={index}\n reaction={reaction}\n onPress={() => {\n Haptic.impactLight()\n handleReactionToggle({\n value: reaction.value,\n mine: reaction.mine,\n })\n navigation.goBack()\n }}\n />\n ))}\n </View>\n {!isSystemMessage && (\n <View style={styles.actions}>\n {!inReplyScreen && (\n <FormSheet.Action\n onPress={handleReplyPress}\n title=\"Reply to message\"\n iconName=\"registrations.undo\"\n accessibilityHint=\"Navigates to the reply screen\"\n accessibilityRole=\"link\"\n />\n )}\n <FormSheet.Action\n onPress={handleCopyPress}\n title=\"Copy text\"\n iconName=\"services.fileCopy\"\n accessibilityHint=\"Copies text and links to clipboard\"\n />\n {showReportMessageAction && (\n <FormSheet.Action\n onPress={handleReportPress}\n title=\"Report message\"\n iconName=\"chat.reportMessageO\"\n accessibilityHint=\"Opens a form to report this message\"\n />\n )}\n {message?.mine && (\n <FormSheet.Action\n onPress={() => handleEditPress()}\n title=\"Edit message\"\n iconName=\"accounts.editor\"\n accessibilityHint=\"Opens existing text in the message form input.\"\n />\n )}\n {message?.mine && (\n <FormSheet.Action\n onPress={() => handleViewReadReceiptsPress()}\n title=\"View read receipts\"\n iconName=\"general.checkPerson\"\n accessibilityHint=\"Opens a modal with a list of people who read your message.\"\n />\n )}\n {message?.mine && hasExpandedLink && (\n <FormSheet.Action\n onPress={() => handleRemoveLinkPreviewConfirm()}\n title=\"Remove link preview\"\n iconName=\"general.brokenLink\"\n accessibilityHint=\"Removes an expanded link preview from the message.\"\n />\n )}\n {(message?.mine || canDeleteNonAuthoredMessages) && (\n <FormSheet.Action\n onPress={() => handleDeleteConfirm()}\n title=\"Delete message\"\n iconName=\"publishing.trash\"\n appearance=\"danger\"\n disabled={isPending}\n accessibilityHint=\"Opens a confirmation alert to delete this message permanently.\"\n />\n )}\n </View>\n )}\n </FormSheet.Root>\n )\n}\n\nconst Reaction = ({\n reaction,\n onPress,\n}: {\n reaction: { value: ReactionCountResource['value']; emoji: string; mine: boolean | undefined }\n onPress: () => void\n}) => {\n const styles = useStyles()\n const reactionStyles = useReactionStyles({ mine: reaction.mine ? 1 : 0 })\n\n const { colors } = useTheme()\n const baseRippleColor = reaction.mine ? colors.interaction : colors.fillColorNeutral060\n const androidRippleColor = useCreateAndroidRippleColor({ color: baseRippleColor })\n\n return (\n <PlatformPressable\n key={reaction.value}\n style={[reactionStyles.reaction, styles.reaction]}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n onPress={onPress}\n >\n <Text style={styles.reactionEmoji} allowFontScaling={false}>\n {REACTION_EMOJIS[reaction.value]}\n </Text>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier: 1.3 })\n\n const btnBorderWidth = 1\n const baseSize = 46 * Math.max(1, fontScale)\n const reactionBtnSize = Platform.select({\n ios: baseSize,\n android: baseSize + btnBorderWidth * 2,\n })\n\n return StyleSheet.create({\n formSheetContent: {\n paddingTop: 16,\n },\n reactionList: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n gap: 16,\n paddingTop: 8,\n paddingBottom: 16,\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: 1,\n },\n reaction: {\n height: reactionBtnSize,\n width: reactionBtnSize,\n borderWidth: btnBorderWidth,\n borderRadius: 32,\n justifyContent: 'center',\n overflow: 'hidden',\n },\n reactionEmoji: {\n fontSize: 24,\n textAlign: 'center',\n },\n actions: {\n paddingTop: 4,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"message_actions_screen.js","sourceRoot":"","sources":["../../src/screens/message_actions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AAC/E,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM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AQ;YACxB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,CAAC;YACb,aAAa,EAAE,EAAE;YACjB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;YAChD,iBAAiB,EAAE,CAAC;SACrB;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,eAAe;YACvB,KAAK,EAAE,eAAe;YACtB,WAAW,EAAE,cAAc;YAC3B,YAAY,EAAE,EAAE;YAChB,cAAc,EAAE,QAAQ;YACxB,QAAQ,EAAE,QAAQ;SACnB;QACD,aAAa,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,QAAQ;SACpB;QACD,OAAO,EAAE;YACP,UAAU,EAAE,CAAC;SACd;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport { useMutation } from '@tanstack/react-query'\nimport { isNil, omitBy } from 'lodash'\nimport React, { useCallback } from 'react'\nimport { Alert, Platform, StyleSheet, View } from 'react-native'\nimport { Text } from '../components'\nimport { useReactionStyles } from '../components/conversation/message_reaction'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useCreateAndroidRippleColor, useFontScale, useTheme } from '../hooks'\nimport { useApiClient } from '../hooks/use_api_client'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { availableFeatures, useFeatures } from '../hooks/use_features'\nimport { useMessageReactionToggle } from '../hooks/use_message_reaction_toggle'\nimport { MessageResource } from '../types'\nimport { ReactionCountResource } from '../types/resources/reaction'\nimport { REACTION_EMOJIS } from '../utils'\nimport { Clipboard, Haptic } from '../utils/native_adapters'\n\nexport const MessageActionsScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: [0.5],\n headerTitle: 'Message actions',\n})\n\nexport type MessageActionsScreenProps = StaticScreenProps<{\n message_id: string\n reply_root_author_name?: string\n conversation_id: number\n canDeleteNonAuthoredMessages?: boolean\n inReplyScreen?: boolean\n isSystemMessage?: boolean\n}>\n\nexport function MessageActionsScreen({ route }: MessageActionsScreenProps) {\n const {\n conversation_id,\n message_id,\n canDeleteNonAuthoredMessages,\n inReplyScreen,\n reply_root_author_name,\n isSystemMessage,\n } = route.params\n\n const { messages, refetch } = useConversationMessages(\n { conversation_id },\n { refetchOnMount: false }\n )\n const message = messages.find(m => m.id === message_id)\n\n if (!message) return null\n\n return (\n <MessageActionsScreenContent\n message={message}\n conversation_id={conversation_id}\n canDeleteNonAuthoredMessages={canDeleteNonAuthoredMessages || false}\n refetchMessages={refetch}\n inReplyScreen={inReplyScreen}\n replyRootAuthorName={reply_root_author_name}\n isSystemMessage={isSystemMessage}\n />\n )\n}\n\nfunction MessageActionsScreenContent({\n message,\n conversation_id,\n canDeleteNonAuthoredMessages,\n refetchMessages,\n inReplyScreen,\n replyRootAuthorName,\n isSystemMessage,\n}: {\n message: MessageResource\n conversation_id: number\n canDeleteNonAuthoredMessages: boolean\n refetchMessages: () => void\n inReplyScreen?: boolean\n replyRootAuthorName?: string\n isSystemMessage?: boolean\n}) {\n const navigation = useNavigation()\n const apiClient = useApiClient()\n const styles = useStyles()\n const { featureEnabled } = useFeatures()\n const expandedLink = message.attachments.find(attachment => attachment.type === 'ExpandedLink')\n const hasExpandedLink = !!expandedLink\n\n const myReactions = message?.reactionCounts\n .filter(reaction => reaction.mine)\n .map(reaction => reaction.value)\n\n const availableReactions = Object.entries(REACTION_EMOJIS).map(([value, emoji]) => {\n return {\n value: value as ReactionCountResource['value'],\n emoji,\n mine: myReactions?.includes(value as ReactionCountResource['value']),\n }\n })\n\n const attachmentForCopy = (): string => {\n const giphyTitleLink = message?.attachments.find(\n attachment => attachment.type === 'giphy'\n )?.titleLink\n\n if (giphyTitleLink) return giphyTitleLink\n return ''\n }\n\n const handleReplyPress = useCallback(() => {\n navigation.goBack()\n // Waits for the modal to be dismissed before pushing the reply screen\n requestAnimationFrame(() => {\n navigation.navigate('ConversationReply', {\n conversation_id,\n reply_root_id: message.replyRootId || message.id,\n reply_root_author_name: replyRootAuthorName,\n })\n })\n }, [navigation, conversation_id, message.id, message.replyRootId, replyRootAuthorName])\n\n const handleCopyPress = () => {\n Clipboard.setStringAsync(message?.text || attachmentForCopy() || '')\n navigation.goBack()\n }\n\n const handleReportPress = useCallback(() => {\n Haptic.impactLight()\n navigation.navigate('MessageReport', {\n conversation_id,\n message_id: message.id,\n })\n }, [navigation, conversation_id, message.id])\n\n const { handleReactionToggle, isPending } = useMessageReactionToggle({\n conversation_id,\n message,\n })\n\n const deleteMessage = useCallback(() => {\n const url = `/me/conversations/${conversation_id}/messages/${message.id}/`\n\n return apiClient.chat.delete({ url })\n }, [apiClient, conversation_id, message.id])\n\n const { mutate: handleDeleteMessage } = useMutation({\n mutationFn: deleteMessage,\n mutationKey: ['deleteMessage', message.id],\n onSuccess: () => {\n refetchMessages()\n Haptic.notificationSuccess()\n },\n onError: () => {\n Alert.alert('Oops', 'We were unable to delete this message. Please try again.')\n },\n })\n\n const handleDeleteConfirm = useCallback(() => {\n Alert.alert('Delete message', 'Are you sure you want to permanently delete this message?', [\n { text: 'Cancel', style: 'cancel' },\n {\n text: 'Delete',\n style: 'destructive',\n onPress: () => {\n handleDeleteMessage()\n navigation.goBack()\n },\n },\n ])\n }, [handleDeleteMessage, navigation])\n\n const handleEditPress = useCallback(() => {\n const state = navigation.getState?.()\n const targetRouteName = inReplyScreen ? 'ConversationReply' : 'Conversation'\n const targetRoute = state?.routes?.find(r => r.name === targetRouteName)\n const params = omitBy(\n {\n ...(targetRoute?.params || {}),\n conversation_id,\n editing_message_id: message.id,\n },\n isNil\n )\n navigation.dispatch(StackActions.popTo(targetRouteName, params))\n }, [navigation, conversation_id, message.id, inReplyScreen])\n\n const handleViewReadReceiptsPress = useCallback(() => {\n Haptic.impactLight()\n const params = omitBy(\n {\n conversation_id,\n message_id: message.id,\n },\n isNil\n )\n navigation.dispatch(StackActions.popTo('MessageReadReceipts', params))\n }, [navigation, conversation_id, message.id])\n\n const removeLinkPreview = useCallback(() => {\n const url = `/me/conversations/${conversation_id}/messages/${message.id}/remove_expanded_link`\n const data = {\n data: { type: 'ExpandedLink', attributes: { expanded_link_id: expandedLink?.id } },\n }\n\n return apiClient.chat.post({ url, data })\n }, [apiClient, conversation_id, message.id, expandedLink])\n\n const { mutate: handleRemoveLinkPreview } = useMutation({\n mutationFn: removeLinkPreview,\n onSuccess: () => {\n refetchMessages()\n Haptic.notificationSuccess()\n navigation.goBack()\n },\n onError: () => {\n Alert.alert('Oops', 'We were unable to remove the preview. Please try again.')\n },\n })\n\n const handleRemoveLinkPreviewConfirm = useCallback(() => {\n Alert.alert('Remove link preview?', 'This will remove the image preview but retain the link', [\n { text: 'Cancel', style: 'cancel' },\n { text: 'Remove', style: 'destructive', onPress: () => handleRemoveLinkPreview() },\n ])\n }, [handleRemoveLinkPreview])\n\n const showReportMessageAction =\n !message?.mine && featureEnabled(availableFeatures.message_reporting)\n\n return (\n <FormSheet.Root style={styles.formSheetContent}>\n <View style={styles.reactionList}>\n {availableReactions.map((reaction, index) => (\n <Reaction\n key={index}\n reaction={reaction}\n onPress={() => {\n Haptic.impactLight()\n handleReactionToggle({\n value: reaction.value,\n mine: reaction.mine,\n })\n navigation.goBack()\n }}\n />\n ))}\n </View>\n {!isSystemMessage && (\n <View style={styles.actions}>\n {!inReplyScreen && (\n <FormSheet.Action\n onPress={handleReplyPress}\n title=\"Reply to message\"\n iconName=\"registrations.undo\"\n accessibilityHint=\"Navigates to the reply screen\"\n accessibilityRole=\"link\"\n />\n )}\n <FormSheet.Action\n onPress={handleCopyPress}\n title=\"Copy text\"\n iconName=\"services.fileCopy\"\n accessibilityHint=\"Copies text and links to clipboard\"\n />\n {showReportMessageAction && (\n <FormSheet.Action\n onPress={handleReportPress}\n title=\"Report message\"\n iconName=\"chat.reportMessageO\"\n accessibilityHint=\"Opens a form to report this message\"\n />\n )}\n {message?.mine && (\n <FormSheet.Action\n onPress={() => handleEditPress()}\n title=\"Edit message\"\n iconName=\"accounts.editor\"\n accessibilityHint=\"Opens existing text in the message form input.\"\n />\n )}\n {message?.mine && (\n <FormSheet.Action\n onPress={() => handleViewReadReceiptsPress()}\n title=\"View read receipts\"\n iconName=\"general.checkPerson\"\n accessibilityHint=\"Opens a modal with a list of people who read your message.\"\n />\n )}\n {message?.mine && hasExpandedLink && (\n <FormSheet.Action\n onPress={() => handleRemoveLinkPreviewConfirm()}\n title=\"Remove link preview\"\n iconName=\"general.brokenLink\"\n accessibilityHint=\"Removes an expanded link preview from the message.\"\n />\n )}\n {(message?.mine || canDeleteNonAuthoredMessages) && (\n <FormSheet.Action\n onPress={() => handleDeleteConfirm()}\n title=\"Delete message\"\n iconName=\"publishing.trash\"\n appearance=\"danger\"\n disabled={isPending}\n accessibilityHint=\"Opens a confirmation alert to delete this message permanently.\"\n />\n )}\n </View>\n )}\n </FormSheet.Root>\n )\n}\n\nconst Reaction = ({\n reaction,\n onPress,\n}: {\n reaction: { value: ReactionCountResource['value']; emoji: string; mine: boolean | undefined }\n onPress: () => void\n}) => {\n const styles = useStyles()\n const reactionStyles = useReactionStyles({ mine: reaction.mine ? 1 : 0 })\n\n const { colors } = useTheme()\n const baseRippleColor = reaction.mine ? colors.interaction : colors.fillColorNeutral060\n const androidRippleColor = useCreateAndroidRippleColor({ color: baseRippleColor })\n\n return (\n <PlatformPressable\n key={reaction.value}\n style={[reactionStyles.reaction, styles.reaction]}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n onPress={onPress}\n >\n <Text style={styles.reactionEmoji} allowFontScaling={false}>\n {REACTION_EMOJIS[reaction.value]}\n </Text>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier: 1.3 })\n\n const btnBorderWidth = 1\n const baseSize = 46 * Math.max(1, fontScale)\n const reactionBtnSize = Platform.select({\n ios: baseSize,\n android: baseSize + btnBorderWidth * 2,\n })\n\n return StyleSheet.create({\n formSheetContent: {\n paddingTop: 16,\n },\n reactionList: {\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n gap: 16,\n paddingTop: 8,\n paddingBottom: 16,\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: 1,\n },\n reaction: {\n height: reactionBtnSize,\n width: reactionBtnSize,\n borderWidth: btnBorderWidth,\n borderRadius: 32,\n justifyContent: 'center',\n overflow: 'hidden',\n },\n reactionEmoji: {\n fontSize: 24,\n textAlign: 'center',\n },\n actions: {\n paddingTop: 4,\n },\n })\n}\n"]}
@@ -1,9 +1,10 @@
1
+ import React from 'react';
1
2
  import { ViewStyle } from 'react-native';
2
3
  import { MessageResource } from '../../../types';
3
4
  interface MessagePreviewProps {
4
5
  message: MessageResource;
5
6
  style?: ViewStyle;
6
7
  }
7
- export declare function MessagePreview({ message, style }: MessagePreviewProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function MessagePreview({ message, style }: MessagePreviewProps): React.JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=message_preview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message_preview.d.ts","sourceRoot":"","sources":["../../../../src/screens/message_report/components/message_preview.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,UAAU,mBAAmB;IAC3B,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAuCrE"}
1
+ {"version":3,"file":"message_preview.d.ts","sourceRoot":"","sources":["../../../../src/screens/message_report/components/message_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,UAAU,mBAAmB;IAC3B,OAAO,EAAE,eAAe,CAAA;IACxB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,mBAAmB,qBAuCrE"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import { View, StyleSheet } from 'react-native';
3
3
  import { Avatar, Text, Icon } from '../../../components';
4
4
  import { useTheme, useFontScale } from '../../../hooks';
@@ -6,7 +6,27 @@ export function MessagePreview({ message, style }) {
6
6
  const hasImages = message.attachments.some(att => att.type === 'MessageAttachment' && att.attributes?.contentType?.startsWith('image/'));
7
7
  const imageOnly = hasImages && !message.text;
8
8
  const styles = useStyles({ imageOnly });
9
- return (_jsxs(View, { style: [styles.previewContainer, style], children: [_jsxs(View, { style: styles.previewHeader, children: [_jsx(Avatar, { sourceUri: message.author.avatar, size: "md" }), _jsx(Text, { style: styles.authorName, maxFontSizeMultiplier: 1.5, numberOfLines: 1, children: message.author.name })] }), _jsxs(View, { style: styles.messageBubble, children: [hasImages && (_jsxs(View, { style: styles.imagePlaceholder, children: [_jsx(Icon, { name: "general.image", style: styles.placeholderIcon, maxFontSizeMultiplier: 1.25 }), _jsx(Text, { variant: "secondary", style: styles.placeholderText, maxFontSizeMultiplier: 1.25, children: "Image hidden" })] })), message.text && (_jsx(Text, { style: styles.messageText, numberOfLines: 5, children: message.text }))] })] }));
9
+ return (<View style={[styles.previewContainer, style]}>
10
+ <View style={styles.previewHeader}>
11
+ <Avatar sourceUri={message.author.avatar} size="md"/>
12
+ <Text style={styles.authorName} maxFontSizeMultiplier={1.5} numberOfLines={1}>
13
+ {message.author.name}
14
+ </Text>
15
+ </View>
16
+
17
+ <View style={styles.messageBubble}>
18
+ {hasImages && (<View style={styles.imagePlaceholder}>
19
+ <Icon name="general.image" style={styles.placeholderIcon} maxFontSizeMultiplier={1.25}/>
20
+ <Text variant="secondary" style={styles.placeholderText} maxFontSizeMultiplier={1.25}>
21
+ Image hidden
22
+ </Text>
23
+ </View>)}
24
+
25
+ {message.text && (<Text style={styles.messageText} numberOfLines={5}>
26
+ {message.text}
27
+ </Text>)}
28
+ </View>
29
+ </View>);
10
30
  }
11
31
  const useStyles = ({ imageOnly }) => {
12
32
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"message_preview.js","sourceRoot":"","sources":["../../../../src/screens/message_report/components/message_preview.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAQvD,MAAM,UAAU,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAuB;IACpE,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CACxC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,mBAAmB,IAAI,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,QAAQ,CAAC,CAC7F,CAAA;IAED,MAAM,SAAS,GAAG,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,CAAA;IAC5C,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,CAAA;IAEvC,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,aAC3C,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,aAAa,aAC/B,KAAC,MAAM,IAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAC,IAAI,GAAG,EAC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AM,CAAC,mBAAmB;YAC3C,YAAY,EAAE,EAAE;YAChB,SAAS,EAAE,YAAY;YACvB,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;SACvC;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,UAAU,EAAE,EAAE;YACd,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;SACpB;QACD,gBAAgB,EAAE;YAChB,iBAAiB,EAAE,EAAE,GAAG,SAAS;YACjC,eAAe,EAAE,EAAE,GAAG,SAAS;YAC/B,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC,GAAG,SAAS;SACnB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { View, StyleSheet, ViewStyle } from 'react-native'\nimport { Avatar, Text, Icon } from '../../../components'\nimport { useTheme, useFontScale } from '../../../hooks'\nimport { MessageResource } from '../../../types'\n\ninterface MessagePreviewProps {\n message: MessageResource\n style?: ViewStyle\n}\n\nexport function MessagePreview({ message, style }: MessagePreviewProps) {\n const hasImages = message.attachments.some(\n att => att.type === 'MessageAttachment' && att.attributes?.contentType?.startsWith('image/')\n )\n\n const imageOnly = hasImages && !message.text\n const styles = useStyles({ imageOnly })\n\n return (\n <View style={[styles.previewContainer, style]}>\n <View style={styles.previewHeader}>\n <Avatar sourceUri={message.author.avatar} size=\"md\" />\n <Text style={styles.authorName} maxFontSizeMultiplier={1.5} numberOfLines={1}>\n {message.author.name}\n </Text>\n </View>\n\n <View style={styles.messageBubble}>\n {hasImages && (\n <View style={styles.imagePlaceholder}>\n <Icon\n name=\"general.image\"\n style={styles.placeholderIcon}\n maxFontSizeMultiplier={1.25}\n />\n <Text variant=\"secondary\" style={styles.placeholderText} maxFontSizeMultiplier={1.25}>\n Image hidden\n </Text>\n </View>\n )}\n\n {message.text && (\n <Text style={styles.messageText} numberOfLines={5}>\n {message.text}\n </Text>\n )}\n </View>\n </View>\n )\n}\n\nconst useStyles = ({ imageOnly }: { imageOnly: boolean }) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier: 1.5 })\n\n return StyleSheet.create({\n previewContainer: {\n gap: 12,\n },\n previewHeader: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n authorName: {\n fontSize: 14,\n fontWeight: '600',\n color: colors.textColorDefaultPrimary,\n flexShrink: 1,\n },\n messageBubble: {\n backgroundColor: colors.fillColorNeutral060,\n borderRadius: 16,\n alignSelf: 'flex-start',\n ...(!imageOnly && { maxWidth: '80%' }),\n },\n messageText: {\n fontSize: 14,\n color: colors.textColorDefaultPrimary,\n lineHeight: 20,\n paddingHorizontal: 16,\n paddingVertical: 12,\n },\n imagePlaceholder: {\n paddingHorizontal: 24 * fontScale,\n paddingVertical: 20 * fontScale,\n justifyContent: 'center',\n alignItems: 'center',\n gap: 8 * fontScale,\n },\n placeholderIcon: {\n fontSize: 32,\n color: colors.iconColorDefaultSecondary,\n },\n placeholderText: {\n fontSize: 14,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"message_preview.js","sourceRoot":"","sources":["../../../../src/screens/message_report/components/message_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAQvD,MAAM,UAAU,cAAc,CAAC,EAAE,OAAO,EAAE,KA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iB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;SACpB;QACD,gBAAgB,EAAE;YAChB,iBAAiB,EAAE,EAAE,GAAG,SAAS;YACjC,eAAe,EAAE,EAAE,GAAG,SAAS;YAC/B,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC,GAAG,SAAS;SACnB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { View, StyleSheet, ViewStyle } from 'react-native'\nimport { Avatar, Text, Icon } from '../../../components'\nimport { useTheme, useFontScale } from '../../../hooks'\nimport { MessageResource } from '../../../types'\n\ninterface MessagePreviewProps {\n message: MessageResource\n style?: ViewStyle\n}\n\nexport function MessagePreview({ message, style }: MessagePreviewProps) {\n const hasImages = message.attachments.some(\n att => att.type === 'MessageAttachment' && att.attributes?.contentType?.startsWith('image/')\n )\n\n const imageOnly = hasImages && !message.text\n const styles = useStyles({ imageOnly })\n\n return (\n <View style={[styles.previewContainer, style]}>\n <View style={styles.previewHeader}>\n <Avatar sourceUri={message.author.avatar} size=\"md\" />\n <Text style={styles.authorName} maxFontSizeMultiplier={1.5} numberOfLines={1}>\n {message.author.name}\n </Text>\n </View>\n\n <View style={styles.messageBubble}>\n {hasImages && (\n <View style={styles.imagePlaceholder}>\n <Icon\n name=\"general.image\"\n style={styles.placeholderIcon}\n maxFontSizeMultiplier={1.25}\n />\n <Text variant=\"secondary\" style={styles.placeholderText} maxFontSizeMultiplier={1.25}>\n Image hidden\n </Text>\n </View>\n )}\n\n {message.text && (\n <Text style={styles.messageText} numberOfLines={5}>\n {message.text}\n </Text>\n )}\n </View>\n </View>\n )\n}\n\nconst useStyles = ({ imageOnly }: { imageOnly: boolean }) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier: 1.5 })\n\n return StyleSheet.create({\n previewContainer: {\n gap: 12,\n },\n previewHeader: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n authorName: {\n fontSize: 14,\n fontWeight: '600',\n color: colors.textColorDefaultPrimary,\n flexShrink: 1,\n },\n messageBubble: {\n backgroundColor: colors.fillColorNeutral060,\n borderRadius: 16,\n alignSelf: 'flex-start',\n ...(!imageOnly && { maxWidth: '80%' }),\n },\n messageText: {\n fontSize: 14,\n color: colors.textColorDefaultPrimary,\n lineHeight: 20,\n paddingHorizontal: 16,\n paddingVertical: 12,\n },\n imagePlaceholder: {\n paddingHorizontal: 24 * fontScale,\n paddingVertical: 20 * fontScale,\n justifyContent: 'center',\n alignItems: 'center',\n gap: 8 * fontScale,\n },\n placeholderIcon: {\n fontSize: 32,\n color: colors.iconColorDefaultSecondary,\n },\n placeholderText: {\n fontSize: 14,\n },\n })\n}\n"]}
@@ -1,8 +1,9 @@
1
+ import React from 'react';
1
2
  import { MessageReportReason } from '../../../types/resources/message_report';
2
3
  interface ReportReasonListProps {
3
4
  selectedReason: MessageReportReason | null;
4
5
  onReasonChange: (reason: MessageReportReason) => void;
5
6
  }
6
- export declare function ReportReasonList({ selectedReason, onReasonChange }: ReportReasonListProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ReportReasonList({ selectedReason, onReasonChange }: ReportReasonListProps): React.JSX.Element;
7
8
  export {};
8
9
  //# sourceMappingURL=report_reason_list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"report_reason_list.d.ts","sourceRoot":"","sources":["../../../../src/screens/message_report/components/report_reason_list.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,mBAAmB,EACpB,MAAM,yCAAyC,CAAA;AAQhD,UAAU,qBAAqB;IAC7B,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC1C,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;CACtD;AAED,wBAAgB,gBAAgB,CAAC,EAAE,cAAc,EAAE,cAAc,EAAE,EAAE,qBAAqB,2CAiBzF"}
1
+ {"version":3,"file":"report_reason_list.d.ts","sourceRoot":"","sources":["../../../../src/screens/message_report/components/report_reason_list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAEL,mBAAmB,EACpB,MAAM,yCAAyC,CAAA;AAQhD,UAAU,qBAAqB;IAC7B,cAAc,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC1C,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;CACtD;AAED,wBAAgB,gBAAgB,CAAC,EAAE,cAAc,EAAE,cAAc,EAAE,EAAE,qBAAqB,qBAiBzF"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import { PlatformPressable } from '@react-navigation/elements';
2
+ import React from 'react';
3
3
  import { View, StyleSheet } from 'react-native';
4
4
  import { Text } from '../../../components';
5
5
  import { useTheme, useCreateAndroidRippleColor } from '../../../hooks';
@@ -10,16 +10,25 @@ const MESSAGE_REPORT_REASONS_LIST = Object.entries(MESSAGE_REPORT_REASONS).map((
10
10
  label,
11
11
  }));
12
12
  export function ReportReasonList({ selectedReason, onReasonChange }) {
13
- return (_jsx(View, { children: MESSAGE_REPORT_REASONS_LIST.map(({ key, label }) => (_jsx(ReportReasonButton, { reason: key, label: label, isSelected: selectedReason === key, onPress: () => {
13
+ return (<View>
14
+ {MESSAGE_REPORT_REASONS_LIST.map(({ key, label }) => (<ReportReasonButton key={key} reason={key} label={label} isSelected={selectedReason === key} onPress={() => {
14
15
  Haptic.impactLight();
15
16
  onReasonChange(key);
16
- } }, key))) }));
17
+ }}/>))}
18
+ </View>);
17
19
  }
18
20
  function ReportReasonButton({ label, isSelected, onPress }) {
19
21
  const styles = useStyles({ isSelected });
20
22
  const { colors } = useTheme();
21
23
  const androidRippleColor = useCreateAndroidRippleColor({ color: colors.fillColorNeutral060 });
22
- return (_jsx(PlatformPressable, { onPress: onPress, style: styles.pressable, android_ripple: { color: androidRippleColor }, accessibilityRole: "radio", accessibilityState: { selected: isSelected }, accessibilityLabel: label, children: _jsxs(View, { style: styles.row, children: [_jsx(View, { style: styles.radioButton, children: isSelected && _jsx(View, { style: styles.radioButtonInner }) }), _jsx(Text, { style: styles.label, children: label })] }) }));
24
+ return (<PlatformPressable onPress={onPress} style={styles.pressable} android_ripple={{ color: androidRippleColor }} accessibilityRole="radio" accessibilityState={{ selected: isSelected }} accessibilityLabel={label}>
25
+ <View style={styles.row}>
26
+ <View style={styles.radioButton}>
27
+ {isSelected && <View style={styles.radioButtonInner}/>}
28
+ </View>
29
+ <Text style={styles.label}>{label}</Text>
30
+ </View>
31
+ </PlatformPressable>);
23
32
  }
24
33
  const useStyles = ({ isSelected }) => {
25
34
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"report_reason_list.js","sourceRoot":"","sources":["../../../../src/screens/message_report/components/report_reason_list.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAA;AACtE,OAAO,EACL,sBAAsB,GAEvB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAA;AAEvD,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAChG,GAAG,EAAE,GAA0B;IAC/B,KAAK;CACN,CAAC,CAAC,CAAA;AAOH,MAA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G,KAAK,GAAQ,IACpC,GACW,CACrB,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,CAAC,EAAE,UAAU,EAA2B,EAAE,EAAE;IAC5D,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,EAAE;SACtB;QACD,GAAG,EAAE;YACH,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;SACR;QACD,WAAW,EAAE;YACX,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB;YAC5E,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;SACrB;QACD,gBAAgB,EAAE;YAChB,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,MAAM,CAAC,WAAW;SACpC;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,IAAI,EAAE,CAAC;SACR;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { View, StyleSheet } from 'react-native'\nimport { Text } from '../../../components'\nimport { useTheme, useCreateAndroidRippleColor } from '../../../hooks'\nimport {\n MESSAGE_REPORT_REASONS,\n MessageReportReason,\n} from '../../../types/resources/message_report'\nimport { Haptic } from '../../../utils/native_adapters'\n\nconst MESSAGE_REPORT_REASONS_LIST = Object.entries(MESSAGE_REPORT_REASONS).map(([key, label]) => ({\n key: key as MessageReportReason,\n label,\n}))\n\ninterface ReportReasonListProps {\n selectedReason: MessageReportReason | null\n onReasonChange: (reason: MessageReportReason) => void\n}\n\nexport function ReportReasonList({ selectedReason, onReasonChange }: ReportReasonListProps) {\n return (\n <View>\n {MESSAGE_REPORT_REASONS_LIST.map(({ key, label }) => (\n <ReportReasonButton\n key={key}\n reason={key}\n label={label}\n isSelected={selectedReason === key}\n onPress={() => {\n Haptic.impactLight()\n onReasonChange(key)\n }}\n />\n ))}\n </View>\n )\n}\n\ninterface ReportReasonButtonProps {\n reason: MessageReportReason\n label: string\n isSelected: boolean\n onPress: () => void\n}\n\nfunction ReportReasonButton({ label, isSelected, onPress }: ReportReasonButtonProps) {\n const styles = useStyles({ isSelected })\n const { colors } = useTheme()\n const androidRippleColor = useCreateAndroidRippleColor({ color: colors.fillColorNeutral060 })\n\n return (\n <PlatformPressable\n onPress={onPress}\n style={styles.pressable}\n android_ripple={{ color: androidRippleColor }}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isSelected }}\n accessibilityLabel={label}\n >\n <View style={styles.row}>\n <View style={styles.radioButton}>\n {isSelected && <View style={styles.radioButtonInner} />}\n </View>\n <Text style={styles.label}>{label}</Text>\n </View>\n </PlatformPressable>\n )\n}\n\nconst useStyles = ({ isSelected }: { isSelected: boolean }) => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n pressable: {\n paddingVertical: 16,\n paddingHorizontal: 16,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n radioButton: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderWidth: 2,\n borderColor: isSelected ? colors.interaction : colors.borderColorDefaultBase,\n justifyContent: 'center',\n alignItems: 'center',\n },\n radioButtonInner: {\n width: 10,\n height: 10,\n borderRadius: 5,\n backgroundColor: colors.interaction,\n },\n label: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"report_reason_list.js","sourceRoot":"","sources":["../../../../src/screens/message_report/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AAE;YACH,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;SACR;QACD,WAAW,EAAE;YACX,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB;YAC5E,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;SACrB;QACD,gBAAgB,EAAE;YAChB,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,CAAC;YACf,eAAe,EAAE,MAAM,CAAC,WAAW;SACpC;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,IAAI,EAAE,CAAC;SACR;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport React from 'react'\nimport { View, StyleSheet } from 'react-native'\nimport { Text } from '../../../components'\nimport { useTheme, useCreateAndroidRippleColor } from '../../../hooks'\nimport {\n MESSAGE_REPORT_REASONS,\n MessageReportReason,\n} from '../../../types/resources/message_report'\nimport { Haptic } from '../../../utils/native_adapters'\n\nconst MESSAGE_REPORT_REASONS_LIST = Object.entries(MESSAGE_REPORT_REASONS).map(([key, label]) => ({\n key: key as MessageReportReason,\n label,\n}))\n\ninterface ReportReasonListProps {\n selectedReason: MessageReportReason | null\n onReasonChange: (reason: MessageReportReason) => void\n}\n\nexport function ReportReasonList({ selectedReason, onReasonChange }: ReportReasonListProps) {\n return (\n <View>\n {MESSAGE_REPORT_REASONS_LIST.map(({ key, label }) => (\n <ReportReasonButton\n key={key}\n reason={key}\n label={label}\n isSelected={selectedReason === key}\n onPress={() => {\n Haptic.impactLight()\n onReasonChange(key)\n }}\n />\n ))}\n </View>\n )\n}\n\ninterface ReportReasonButtonProps {\n reason: MessageReportReason\n label: string\n isSelected: boolean\n onPress: () => void\n}\n\nfunction ReportReasonButton({ label, isSelected, onPress }: ReportReasonButtonProps) {\n const styles = useStyles({ isSelected })\n const { colors } = useTheme()\n const androidRippleColor = useCreateAndroidRippleColor({ color: colors.fillColorNeutral060 })\n\n return (\n <PlatformPressable\n onPress={onPress}\n style={styles.pressable}\n android_ripple={{ color: androidRippleColor }}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isSelected }}\n accessibilityLabel={label}\n >\n <View style={styles.row}>\n <View style={styles.radioButton}>\n {isSelected && <View style={styles.radioButtonInner} />}\n </View>\n <Text style={styles.label}>{label}</Text>\n </View>\n </PlatformPressable>\n )\n}\n\nconst useStyles = ({ isSelected }: { isSelected: boolean }) => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n pressable: {\n paddingVertical: 16,\n paddingHorizontal: 16,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n radioButton: {\n width: 20,\n height: 20,\n borderRadius: 10,\n borderWidth: 2,\n borderColor: isSelected ? colors.interaction : colors.borderColorDefaultBase,\n justifyContent: 'center',\n alignItems: 'center',\n },\n radioButtonInner: {\n width: 10,\n height: 10,\n borderRadius: 5,\n backgroundColor: colors.interaction,\n },\n label: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n })\n}\n"]}
@@ -1,9 +1,10 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
2
  import type { NativeStackNavigationOptions, NativeStackScreenProps } from '@react-navigation/native-stack';
3
+ import React from 'react';
3
4
  export declare const MessageReportScreenOptions: ({ navigation, route, }: NativeStackScreenProps<any>) => NativeStackNavigationOptions;
4
5
  export type MessageReportScreenProps = StaticScreenProps<{
5
6
  conversation_id: number;
6
7
  message_id: string;
7
8
  }>;
8
- export declare function MessageReportScreen({ route }: MessageReportScreenProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export declare function MessageReportScreen({ route }: MessageReportScreenProps): React.JSX.Element | null;
9
10
  //# sourceMappingURL=message_report_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message_report_screen.d.ts","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA+B,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AAqBvC,eAAO,MAAM,0BAA0B,GAAI,wBAGxC,sBAAsB,CAAC,GAAG,CAAC,KAAG,4BAahC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACvD,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,EAAE,wBAAwB,kDAStE"}
1
+ {"version":3,"file":"message_report_screen.d.ts","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAA+B,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAA0D,MAAM,OAAO,CAAA;AAoB9E,eAAO,MAAM,0BAA0B,GAAI,wBAGxC,sBAAsB,CAAC,GAAG,CAAC,KAAG,4BAahC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACvD,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,EAAE,wBAAwB,4BAStE"}