@planningcenter/chat-react-native 3.30.0-rc.1 → 3.30.0-rc.2

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 (895) hide show
  1. package/build/components/conversation/attachments/attachment_card.js +3 -3
  2. package/build/components/conversation/attachments/attachment_card.js.map +1 -1
  3. package/build/components/conversation/attachments/attachment_deleting_overlay.js +2 -2
  4. package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
  5. package/build/components/conversation/attachments/audio_attachment.d.ts +1 -1
  6. package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
  7. package/build/components/conversation/attachments/audio_attachment.js +3 -3
  8. package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
  9. package/build/components/conversation/attachments/expanded_link.d.ts +1 -1
  10. package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
  11. package/build/components/conversation/attachments/expanded_link.js +3 -3
  12. package/build/components/conversation/attachments/expanded_link.js.map +1 -1
  13. package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -1
  14. package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
  15. package/build/components/conversation/attachments/generic_file_attachment.js +4 -4
  16. package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
  17. package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -1
  18. package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
  19. package/build/components/conversation/attachments/giphy_attachment.js +4 -4
  20. package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
  21. package/build/components/conversation/attachments/image_attachment.d.ts +1 -1
  22. package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
  23. package/build/components/conversation/attachments/image_attachment.js +5 -5
  24. package/build/components/conversation/attachments/image_attachment.js.map +1 -1
  25. package/build/components/conversation/attachments/video_attachment.d.ts +1 -1
  26. package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
  27. package/build/components/conversation/attachments/video_attachment.js +4 -4
  28. package/build/components/conversation/attachments/video_attachment.js.map +1 -1
  29. package/build/components/conversation/empty_conversation_blank_state.js +1 -1
  30. package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
  31. package/build/components/conversation/jump_to_bottom_button.js +3 -3
  32. package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
  33. package/build/components/conversation/message.d.ts +1 -1
  34. package/build/components/conversation/message.d.ts.map +1 -1
  35. package/build/components/conversation/message.js +12 -12
  36. package/build/components/conversation/message.js.map +1 -1
  37. package/build/components/conversation/message_attachments.d.ts +1 -1
  38. package/build/components/conversation/message_attachments.d.ts.map +1 -1
  39. package/build/components/conversation/message_attachments.js +1 -1
  40. package/build/components/conversation/message_attachments.js.map +1 -1
  41. package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -1
  42. package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
  43. package/build/components/conversation/message_form/message_form_attachment_image.js +1 -1
  44. package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
  45. package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -1
  46. package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
  47. package/build/components/conversation/message_form/message_form_attachment_video.js +1 -1
  48. package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
  49. package/build/components/conversation/message_form.d.ts +1 -1
  50. package/build/components/conversation/message_form.d.ts.map +1 -1
  51. package/build/components/conversation/message_form.js +12 -12
  52. package/build/components/conversation/message_form.js.map +1 -1
  53. package/build/components/conversation/message_markdown.js +3 -3
  54. package/build/components/conversation/message_markdown.js.map +1 -1
  55. package/build/components/conversation/message_reaction.d.ts +2 -2
  56. package/build/components/conversation/message_reaction.d.ts.map +1 -1
  57. package/build/components/conversation/message_reaction.js +6 -6
  58. package/build/components/conversation/message_reaction.js.map +1 -1
  59. package/build/components/conversation/message_read_receipts.d.ts +1 -1
  60. package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
  61. package/build/components/conversation/message_read_receipts.js +2 -2
  62. package/build/components/conversation/message_read_receipts.js.map +1 -1
  63. package/build/components/conversation/messages_disabled_banners.js +2 -2
  64. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  65. package/build/components/conversation/reply_connectors.d.ts +1 -1
  66. package/build/components/conversation/reply_connectors.d.ts.map +1 -1
  67. package/build/components/conversation/reply_connectors.js +2 -2
  68. package/build/components/conversation/reply_connectors.js.map +1 -1
  69. package/build/components/conversation/reply_shadow_message.d.ts +1 -1
  70. package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
  71. package/build/components/conversation/reply_shadow_message.js +6 -6
  72. package/build/components/conversation/reply_shadow_message.js.map +1 -1
  73. package/build/components/conversation/typing_indicator.js +3 -3
  74. package/build/components/conversation/typing_indicator.js.map +1 -1
  75. package/build/components/conversations/conversation_actions.d.ts +1 -1
  76. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  77. package/build/components/conversations/conversation_actions.js +5 -5
  78. package/build/components/conversations/conversation_actions.js.map +1 -1
  79. package/build/components/conversations/conversation_preview.d.ts +1 -1
  80. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  81. package/build/components/conversations/conversation_preview.js +3 -3
  82. package/build/components/conversations/conversation_preview.js.map +1 -1
  83. package/build/components/conversations/conversations.js +5 -5
  84. package/build/components/conversations/conversations.js.map +1 -1
  85. package/build/components/conversations/mute_indicator.js +3 -3
  86. package/build/components/conversations/mute_indicator.js.map +1 -1
  87. package/build/components/conversations/swipeable_toggle_button.d.ts +1 -1
  88. package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
  89. package/build/components/conversations/swipeable_toggle_button.js +5 -5
  90. package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
  91. package/build/components/conversations/unread_count_badge.js +3 -3
  92. package/build/components/conversations/unread_count_badge.js.map +1 -1
  93. package/build/components/display/action_button.d.ts.map +1 -1
  94. package/build/components/display/action_button.js +2 -2
  95. package/build/components/display/action_button.js.map +1 -1
  96. package/build/components/display/avatar.d.ts +1 -1
  97. package/build/components/display/avatar.d.ts.map +1 -1
  98. package/build/components/display/avatar.js +1 -1
  99. package/build/components/display/avatar.js.map +1 -1
  100. package/build/components/display/avatar_group.d.ts +1 -1
  101. package/build/components/display/avatar_group.d.ts.map +1 -1
  102. package/build/components/display/avatar_group.js +1 -1
  103. package/build/components/display/avatar_group.js.map +1 -1
  104. package/build/components/display/badge.d.ts.map +1 -1
  105. package/build/components/display/badge.js +3 -3
  106. package/build/components/display/badge.js.map +1 -1
  107. package/build/components/display/banner.d.ts +1 -1
  108. package/build/components/display/banner.d.ts.map +1 -1
  109. package/build/components/display/banner.js +1 -1
  110. package/build/components/display/banner.js.map +1 -1
  111. package/build/components/display/banner_collapsible.d.ts.map +1 -1
  112. package/build/components/display/banner_collapsible.js +1 -1
  113. package/build/components/display/banner_collapsible.js.map +1 -1
  114. package/build/components/display/button.d.ts.map +1 -1
  115. package/build/components/display/button.js +3 -3
  116. package/build/components/display/button.js.map +1 -1
  117. package/build/components/display/child_notice.d.ts +1 -1
  118. package/build/components/display/child_notice.d.ts.map +1 -1
  119. package/build/components/display/child_notice.js +2 -2
  120. package/build/components/display/child_notice.js.map +1 -1
  121. package/build/components/display/heading.js +3 -3
  122. package/build/components/display/heading.js.map +1 -1
  123. package/build/components/display/icon.js +1 -1
  124. package/build/components/display/icon.js.map +1 -1
  125. package/build/components/display/icon_button.d.ts.map +1 -1
  126. package/build/components/display/icon_button.js +2 -2
  127. package/build/components/display/icon_button.js.map +1 -1
  128. package/build/components/display/image.js +1 -1
  129. package/build/components/display/image.js.map +1 -1
  130. package/build/components/display/image_attachment_preview.js +2 -2
  131. package/build/components/display/image_attachment_preview.js.map +1 -1
  132. package/build/components/display/keyboard_view.js +1 -1
  133. package/build/components/display/keyboard_view.js.map +1 -1
  134. package/build/components/display/person.d.ts +1 -1
  135. package/build/components/display/person.d.ts.map +1 -1
  136. package/build/components/display/person.js +1 -1
  137. package/build/components/display/person.js.map +1 -1
  138. package/build/components/display/platform_modal_header_buttons.js +1 -1
  139. package/build/components/display/platform_modal_header_buttons.js.map +1 -1
  140. package/build/components/display/pressable_row.d.ts.map +1 -1
  141. package/build/components/display/pressable_row.js +1 -1
  142. package/build/components/display/pressable_row.js.map +1 -1
  143. package/build/components/display/spinner.js +1 -1
  144. package/build/components/display/spinner.js.map +1 -1
  145. package/build/components/display/switch.js +1 -1
  146. package/build/components/display/switch.js.map +1 -1
  147. package/build/components/display/tabs.js +1 -1
  148. package/build/components/display/tabs.js.map +1 -1
  149. package/build/components/display/text.js +2 -2
  150. package/build/components/display/text.js.map +1 -1
  151. package/build/components/display/text_button.d.ts.map +1 -1
  152. package/build/components/display/text_button.js +2 -2
  153. package/build/components/display/text_button.js.map +1 -1
  154. package/build/components/display/text_inline_button.d.ts.map +1 -1
  155. package/build/components/display/text_inline_button.js +2 -2
  156. package/build/components/display/text_inline_button.js.map +1 -1
  157. package/build/components/display/toggle_button.d.ts.map +1 -1
  158. package/build/components/display/toggle_button.js +4 -4
  159. package/build/components/display/toggle_button.js.map +1 -1
  160. package/build/components/display/utils/button_colors.js +1 -1
  161. package/build/components/display/utils/button_colors.js.map +1 -1
  162. package/build/components/display/utils/status_colors.js +1 -1
  163. package/build/components/display/utils/status_colors.js.map +1 -1
  164. package/build/components/display/video_attachment_preview.js +3 -3
  165. package/build/components/display/video_attachment_preview.js.map +1 -1
  166. package/build/components/group_conversation_list.d.ts +1 -1
  167. package/build/components/group_conversation_list.d.ts.map +1 -1
  168. package/build/components/group_conversation_list.js +2 -2
  169. package/build/components/group_conversation_list.js.map +1 -1
  170. package/build/components/page/error_boundary.d.ts +1 -1
  171. package/build/components/page/error_boundary.d.ts.map +1 -1
  172. package/build/components/page/error_boundary.js +2 -2
  173. package/build/components/page/error_boundary.js.map +1 -1
  174. package/build/components/page/loading.js +1 -1
  175. package/build/components/page/loading.js.map +1 -1
  176. package/build/components/primitive/avatar_primitive.d.ts +2 -2
  177. package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
  178. package/build/components/primitive/avatar_primitive.js +5 -5
  179. package/build/components/primitive/avatar_primitive.js.map +1 -1
  180. package/build/components/primitive/banner_primitive.d.ts +2 -2
  181. package/build/components/primitive/banner_primitive.d.ts.map +1 -1
  182. package/build/components/primitive/banner_primitive.js +8 -8
  183. package/build/components/primitive/banner_primitive.js.map +1 -1
  184. package/build/components/primitive/blank_state_primitive.d.ts +1 -1
  185. package/build/components/primitive/blank_state_primitive.d.ts.map +1 -1
  186. package/build/components/primitive/blank_state_primitive.js +2 -2
  187. package/build/components/primitive/blank_state_primitive.js.map +1 -1
  188. package/build/components/primitive/form_sheet.d.ts +2 -2
  189. package/build/components/primitive/form_sheet.d.ts.map +1 -1
  190. package/build/components/primitive/form_sheet.js +3 -3
  191. package/build/components/primitive/form_sheet.js.map +1 -1
  192. package/build/components/safe_area_modal.js +1 -1
  193. package/build/components/safe_area_modal.js.map +1 -1
  194. package/build/contexts/api_provider.js +4 -4
  195. package/build/contexts/api_provider.js.map +1 -1
  196. package/build/contexts/chat_context.d.ts +6 -6
  197. package/build/contexts/chat_context.d.ts.map +1 -1
  198. package/build/contexts/chat_context.js +2 -2
  199. package/build/contexts/chat_context.js.map +1 -1
  200. package/build/contexts/conversations_context.d.ts +2 -2
  201. package/build/contexts/conversations_context.d.ts.map +1 -1
  202. package/build/contexts/conversations_context.js +1 -1
  203. package/build/contexts/conversations_context.js.map +1 -1
  204. package/build/contexts/session_context.d.ts +3 -3
  205. package/build/contexts/session_context.d.ts.map +1 -1
  206. package/build/contexts/session_context.js +6 -6
  207. package/build/contexts/session_context.js.map +1 -1
  208. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +7 -7
  209. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
  210. package/build/hooks/groups/use_group_members_for_new_conversation.js +2 -2
  211. package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
  212. package/build/hooks/groups/use_groups_conversation_create.d.ts +1 -1
  213. package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
  214. package/build/hooks/groups/use_groups_conversation_create.js +2 -2
  215. package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
  216. package/build/hooks/services/use_find_or_create_services_conversation.d.ts +2 -2
  217. package/build/hooks/services/use_find_or_create_services_conversation.d.ts.map +1 -1
  218. package/build/hooks/services/use_find_or_create_services_conversation.js +2 -2
  219. package/build/hooks/services/use_find_or_create_services_conversation.js.map +1 -1
  220. package/build/hooks/services/use_services_team.d.ts +1 -1
  221. package/build/hooks/services/use_services_team.d.ts.map +1 -1
  222. package/build/hooks/services/use_services_team.js +1 -1
  223. package/build/hooks/services/use_services_team.js.map +1 -1
  224. package/build/hooks/services/use_team_members_for_new_conversation.d.ts +21 -21
  225. package/build/hooks/services/use_team_members_for_new_conversation.d.ts.map +1 -1
  226. package/build/hooks/services/use_team_members_for_new_conversation.js +1 -1
  227. package/build/hooks/services/use_team_members_for_new_conversation.js.map +1 -1
  228. package/build/hooks/services/use_team_plans.d.ts +1 -1
  229. package/build/hooks/services/use_team_plans.js +1 -1
  230. package/build/hooks/services/use_team_plans.js.map +1 -1
  231. package/build/hooks/use_api.d.ts +2 -2
  232. package/build/hooks/use_api.d.ts.map +1 -1
  233. package/build/hooks/use_api.js.map +1 -1
  234. package/build/hooks/use_api_client.d.ts +1 -1
  235. package/build/hooks/use_api_client.d.ts.map +1 -1
  236. package/build/hooks/use_api_client.js +3 -3
  237. package/build/hooks/use_api_client.js.map +1 -1
  238. package/build/hooks/use_async_storage.js +1 -1
  239. package/build/hooks/use_async_storage.js.map +1 -1
  240. package/build/hooks/use_attachment_uploader.d.ts +1 -1
  241. package/build/hooks/use_attachment_uploader.d.ts.map +1 -1
  242. package/build/hooks/use_attachment_uploader.js.map +1 -1
  243. package/build/hooks/use_broadcast_typing_status.js +1 -1
  244. package/build/hooks/use_broadcast_typing_status.js.map +1 -1
  245. package/build/hooks/use_chat_permissions.d.ts +21 -21
  246. package/build/hooks/use_chat_permissions.d.ts.map +1 -1
  247. package/build/hooks/use_chat_permissions.js.map +1 -1
  248. package/build/hooks/use_conversation.d.ts +5 -5
  249. package/build/hooks/use_conversation.d.ts.map +1 -1
  250. package/build/hooks/use_conversation.js +4 -3
  251. package/build/hooks/use_conversation.js.map +1 -1
  252. package/build/hooks/use_conversation_jolt_events.js +1 -1
  253. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  254. package/build/hooks/use_conversation_membership.d.ts +1 -1
  255. package/build/hooks/use_conversation_membership.d.ts.map +1 -1
  256. package/build/hooks/use_conversation_membership.js +2 -2
  257. package/build/hooks/use_conversation_membership.js.map +1 -1
  258. package/build/hooks/use_conversation_message.d.ts +1 -1
  259. package/build/hooks/use_conversation_message.d.ts.map +1 -1
  260. package/build/hooks/use_conversation_message.js +1 -1
  261. package/build/hooks/use_conversation_message.js.map +1 -1
  262. package/build/hooks/use_conversation_messages.d.ts +3 -3
  263. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  264. package/build/hooks/use_conversation_messages.js +1 -1
  265. package/build/hooks/use_conversation_messages.js.map +1 -1
  266. package/build/hooks/use_conversation_messages_jolt_events.js +6 -6
  267. package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
  268. package/build/hooks/use_conversations.d.ts +2 -2
  269. package/build/hooks/use_conversations.d.ts.map +1 -1
  270. package/build/hooks/use_conversations.js +1 -1
  271. package/build/hooks/use_conversations.js.map +1 -1
  272. package/build/hooks/use_conversations_actions.d.ts +19 -19
  273. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  274. package/build/hooks/use_conversations_actions.js +1 -1
  275. package/build/hooks/use_conversations_actions.js.map +1 -1
  276. package/build/hooks/use_conversations_cache.d.ts +2 -2
  277. package/build/hooks/use_conversations_cache.d.ts.map +1 -1
  278. package/build/hooks/use_conversations_cache.js +2 -2
  279. package/build/hooks/use_conversations_cache.js.map +1 -1
  280. package/build/hooks/use_conversations_jolt_events.js +2 -2
  281. package/build/hooks/use_conversations_jolt_events.js.map +1 -1
  282. package/build/hooks/use_current_person.d.ts +1 -1
  283. package/build/hooks/use_current_person.d.ts.map +1 -1
  284. package/build/hooks/use_current_person.js.map +1 -1
  285. package/build/hooks/use_features.d.ts +2 -2
  286. package/build/hooks/use_features.d.ts.map +1 -1
  287. package/build/hooks/use_features.js +2 -2
  288. package/build/hooks/use_features.js.map +1 -1
  289. package/build/hooks/use_giphy.d.ts +1 -1
  290. package/build/hooks/use_giphy.d.ts.map +1 -1
  291. package/build/hooks/use_giphy.js +1 -1
  292. package/build/hooks/use_giphy.js.map +1 -1
  293. package/build/hooks/use_groups.d.ts +2 -2
  294. package/build/hooks/use_groups.d.ts.map +1 -1
  295. package/build/hooks/use_groups.js.map +1 -1
  296. package/build/hooks/use_groups_groups.d.ts +33 -33
  297. package/build/hooks/use_groups_groups.d.ts.map +1 -1
  298. package/build/hooks/use_groups_groups.js.map +1 -1
  299. package/build/hooks/use_jolt.js +2 -2
  300. package/build/hooks/use_jolt.js.map +1 -1
  301. package/build/hooks/use_live_relative_time.d.ts +1 -1
  302. package/build/hooks/use_live_relative_time.d.ts.map +1 -1
  303. package/build/hooks/use_live_relative_time.js +2 -2
  304. package/build/hooks/use_live_relative_time.js.map +1 -1
  305. package/build/hooks/use_mark_latest_message_read.d.ts +1 -1
  306. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  307. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  308. package/build/hooks/use_message_create_or_update.d.ts +2 -2
  309. package/build/hooks/use_message_create_or_update.d.ts.map +1 -1
  310. package/build/hooks/use_message_create_or_update.js +7 -7
  311. package/build/hooks/use_message_create_or_update.js.map +1 -1
  312. package/build/hooks/use_message_draft.d.ts +1 -1
  313. package/build/hooks/use_message_draft.d.ts.map +1 -1
  314. package/build/hooks/use_message_draft.js +1 -1
  315. package/build/hooks/use_message_draft.js.map +1 -1
  316. package/build/hooks/use_message_reaction_toggle.d.ts +2 -2
  317. package/build/hooks/use_message_reaction_toggle.d.ts.map +1 -1
  318. package/build/hooks/use_message_reaction_toggle.js +2 -2
  319. package/build/hooks/use_message_reaction_toggle.js.map +1 -1
  320. package/build/hooks/use_my_gender.js.map +1 -1
  321. package/build/hooks/use_organization.d.ts +5 -5
  322. package/build/hooks/use_organization.d.ts.map +1 -1
  323. package/build/hooks/use_organization.js.map +1 -1
  324. package/build/hooks/use_people_person.d.ts +1 -1
  325. package/build/hooks/use_people_person.d.ts.map +1 -1
  326. package/build/hooks/use_people_person.js.map +1 -1
  327. package/build/hooks/use_product_analytics.d.ts +1 -1
  328. package/build/hooks/use_product_analytics.d.ts.map +1 -1
  329. package/build/hooks/use_product_analytics.js +3 -3
  330. package/build/hooks/use_product_analytics.js.map +1 -1
  331. package/build/hooks/use_qualified_by_age.js +1 -1
  332. package/build/hooks/use_qualified_by_age.js.map +1 -1
  333. package/build/hooks/use_read_receipts.d.ts +2 -2
  334. package/build/hooks/use_read_receipts.d.ts.map +1 -1
  335. package/build/hooks/use_read_receipts.js.map +1 -1
  336. package/build/hooks/use_report_message.d.ts +1 -1
  337. package/build/hooks/use_report_message.d.ts.map +1 -1
  338. package/build/hooks/use_report_message.js +1 -1
  339. package/build/hooks/use_report_message.js.map +1 -1
  340. package/build/hooks/use_storage.d.ts +1 -1
  341. package/build/hooks/use_storage.d.ts.map +1 -1
  342. package/build/hooks/use_storage.js.map +1 -1
  343. package/build/hooks/use_submit_age_check.d.ts +1 -1
  344. package/build/hooks/use_submit_age_check.d.ts.map +1 -1
  345. package/build/hooks/use_submit_age_check.js +1 -1
  346. package/build/hooks/use_submit_age_check.js.map +1 -1
  347. package/build/hooks/use_suspense_api.d.ts +5 -5
  348. package/build/hooks/use_suspense_api.d.ts.map +1 -1
  349. package/build/hooks/use_suspense_api.js +2 -2
  350. package/build/hooks/use_suspense_api.js.map +1 -1
  351. package/build/hooks/use_teams.d.ts +1 -1
  352. package/build/hooks/use_teams.d.ts.map +1 -1
  353. package/build/hooks/use_teams.js.map +1 -1
  354. package/build/hooks/use_theme.d.ts +1 -1
  355. package/build/hooks/use_theme.d.ts.map +1 -1
  356. package/build/hooks/use_theme.js +1 -1
  357. package/build/hooks/use_theme.js.map +1 -1
  358. package/build/hooks/use_typing_indicators.d.ts.map +1 -1
  359. package/build/hooks/use_typing_indicators.js +1 -1
  360. package/build/hooks/use_typing_indicators.js.map +1 -1
  361. package/build/hooks/use_typing_status_cache.d.ts +1 -1
  362. package/build/hooks/use_typing_status_cache.d.ts.map +1 -1
  363. package/build/hooks/use_typing_status_cache.js.map +1 -1
  364. package/build/hooks/use_upload_client.d.ts +1 -1
  365. package/build/hooks/use_upload_client.d.ts.map +1 -1
  366. package/build/hooks/use_upload_client.js +3 -3
  367. package/build/hooks/use_upload_client.js.map +1 -1
  368. package/build/navigation/chat_access_gate.js +7 -7
  369. package/build/navigation/chat_access_gate.js.map +1 -1
  370. package/build/navigation/index.d.ts +25 -25
  371. package/build/navigation/index.d.ts.map +1 -1
  372. package/build/navigation/index.js +28 -28
  373. package/build/navigation/index.js.map +1 -1
  374. package/build/navigation/screenLayout.js +2 -2
  375. package/build/navigation/screenLayout.js.map +1 -1
  376. package/build/polyfills/events/Event.d.ts +4 -0
  377. package/build/polyfills/events/Event.d.ts.map +1 -1
  378. package/build/polyfills/events/Event.js +1 -5
  379. package/build/polyfills/events/Event.js.map +1 -1
  380. package/build/polyfills/events/EventTarget.d.ts +3 -0
  381. package/build/polyfills/events/EventTarget.d.ts.map +1 -1
  382. package/build/polyfills/events/EventTarget.js +1 -1
  383. package/build/polyfills/events/EventTarget.js.map +1 -1
  384. package/build/polyfills/events/internals/EventInternals.d.ts +2 -2
  385. package/build/polyfills/events/internals/EventInternals.d.ts.map +1 -1
  386. package/build/polyfills/events/internals/EventInternals.js.map +1 -1
  387. package/build/polyfills/events/internals/EventTargetInternals.d.ts +2 -2
  388. package/build/polyfills/events/internals/EventTargetInternals.d.ts.map +1 -1
  389. package/build/polyfills/events/internals/EventTargetInternals.js.map +1 -1
  390. package/build/screens/age_check/age_check_required_screen.js +8 -8
  391. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  392. package/build/screens/age_check/age_check_underage_screen.js +3 -3
  393. package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
  394. package/build/screens/age_check/components/age_check_select_birthdate_modal.js +3 -3
  395. package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
  396. package/build/screens/attachment_actions/attachment_actions_screen.js +1 -1
  397. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  398. package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +3 -3
  399. package/build/screens/attachment_actions/hooks/useDeleteAttachment.js.map +1 -1
  400. package/build/screens/bug_report_screen.js +11 -11
  401. package/build/screens/bug_report_screen.js.map +1 -1
  402. package/build/screens/conversation/message_read_receipts_screen.js +4 -4
  403. package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
  404. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  405. package/build/screens/conversation_details_screen.js +37 -9
  406. package/build/screens/conversation_details_screen.js.map +1 -1
  407. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
  408. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
  409. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +3 -3
  410. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
  411. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
  412. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
  413. package/build/screens/conversation_filter_recipients/components/header_row.js +4 -4
  414. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
  415. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  416. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +6 -6
  417. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  418. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts +1 -1
  419. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts.map +1 -1
  420. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js +1 -1
  421. package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js.map +1 -1
  422. package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +22 -22
  423. package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts.map +1 -1
  424. package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js +2 -2
  425. package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js.map +1 -1
  426. package/build/screens/conversation_filter_recipients/types.d.ts +1 -1
  427. package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -1
  428. package/build/screens/conversation_filter_recipients/types.js.map +1 -1
  429. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  430. package/build/screens/conversation_filters/components/conversation_filters.js +5 -5
  431. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  432. package/build/screens/conversation_filters/components/rows.d.ts +4 -4
  433. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  434. package/build/screens/conversation_filters/components/rows.js +5 -5
  435. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  436. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
  437. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  438. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  439. package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
  440. package/build/screens/conversation_filters/group_filters.js +1 -1
  441. package/build/screens/conversation_filters/group_filters.js.map +1 -1
  442. package/build/screens/conversation_filters/hooks/filters.d.ts +54 -54
  443. package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
  444. package/build/screens/conversation_filters/hooks/filters.js +3 -3
  445. package/build/screens/conversation_filters/hooks/filters.js.map +1 -1
  446. package/build/screens/conversation_filters/screen_props.d.ts +1 -1
  447. package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
  448. package/build/screens/conversation_filters/screen_props.js.map +1 -1
  449. package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
  450. package/build/screens/conversation_filters/team_filters.js +1 -1
  451. package/build/screens/conversation_filters/team_filters.js.map +1 -1
  452. package/build/screens/conversation_filters_screen.d.ts.map +1 -1
  453. package/build/screens/conversation_filters_screen.js +1 -1
  454. package/build/screens/conversation_filters_screen.js.map +1 -1
  455. package/build/screens/conversation_new/components/filter_by_plan.js +7 -7
  456. package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
  457. package/build/screens/conversation_new/components/form_list.d.ts +1 -1
  458. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  459. package/build/screens/conversation_new/components/form_list.js +2 -2
  460. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  461. package/build/screens/conversation_new/components/gender_filter_toggle.js +3 -3
  462. package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
  463. package/build/screens/conversation_new/components/groups_form.d.ts +1 -1
  464. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  465. package/build/screens/conversation_new/components/groups_form.js +10 -10
  466. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  467. package/build/screens/conversation_new/components/services_form.d.ts +1 -1
  468. package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
  469. package/build/screens/conversation_new/components/services_form.js +8 -8
  470. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  471. package/build/screens/conversation_new/components/source_app_error_card.js +1 -1
  472. package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
  473. package/build/screens/conversation_new/conversation_new_screen.d.ts +3 -3
  474. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  475. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  476. package/build/screens/conversation_notification_level_select_screen.js +5 -5
  477. package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
  478. package/build/screens/conversation_screen.d.ts +3 -3
  479. package/build/screens/conversation_screen.d.ts.map +1 -1
  480. package/build/screens/conversation_screen.js +21 -21
  481. package/build/screens/conversation_screen.js.map +1 -1
  482. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
  483. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
  484. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -1
  485. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
  486. package/build/screens/conversation_select_recipients/components/recipient_link_row.js +3 -3
  487. package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
  488. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -1
  489. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
  490. package/build/screens/conversation_select_recipients/components/restricted_group_row.js +3 -3
  491. package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
  492. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
  493. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
  494. package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -1
  495. package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
  496. package/build/screens/conversation_select_recipients/components/view_more_link_row.js +1 -1
  497. package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
  498. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  499. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -4
  500. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  501. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  502. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -2
  503. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  504. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  505. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +4 -4
  506. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  507. package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -2
  508. package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -1
  509. package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -1
  510. package/build/screens/conversation_select_type_screen.d.ts +2 -2
  511. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  512. package/build/screens/conversation_select_type_screen.js +2 -2
  513. package/build/screens/conversation_select_type_screen.js.map +1 -1
  514. package/build/screens/conversations/components/chat_group_badge.js +2 -2
  515. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  516. package/build/screens/conversations/components/list_header_action_button.d.ts +1 -1
  517. package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
  518. package/build/screens/conversations/components/list_header_action_button.js +4 -4
  519. package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
  520. package/build/screens/conversations/components/list_header_component.js +9 -9
  521. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  522. package/build/screens/conversations/conversations_screen.d.ts +2 -2
  523. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  524. package/build/screens/conversations/conversations_screen.js +3 -3
  525. package/build/screens/conversations/conversations_screen.js.map +1 -1
  526. package/build/screens/design_system_screen.js +6 -6
  527. package/build/screens/design_system_screen.js.map +1 -1
  528. package/build/screens/get_help_screen.js +4 -4
  529. package/build/screens/get_help_screen.js.map +1 -1
  530. package/build/screens/group_notification_level_select_screen.js +3 -3
  531. package/build/screens/group_notification_level_select_screen.js.map +1 -1
  532. package/build/screens/group_notification_settings_screen.js +3 -3
  533. package/build/screens/group_notification_settings_screen.js.map +1 -1
  534. package/build/screens/message_actions_screen.js +10 -10
  535. package/build/screens/message_actions_screen.js.map +1 -1
  536. package/build/screens/message_report/components/message_preview.d.ts +1 -1
  537. package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
  538. package/build/screens/message_report/components/message_preview.js +2 -2
  539. package/build/screens/message_report/components/message_preview.js.map +1 -1
  540. package/build/screens/message_report/components/report_reason_list.d.ts +1 -1
  541. package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
  542. package/build/screens/message_report/components/report_reason_list.js +4 -4
  543. package/build/screens/message_report/components/report_reason_list.js.map +1 -1
  544. package/build/screens/message_report_screen.js +7 -7
  545. package/build/screens/message_report_screen.js.map +1 -1
  546. package/build/screens/notification_settings/hooks/groups.d.ts +7 -7
  547. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  548. package/build/screens/notification_settings/hooks/groups.js +4 -4
  549. package/build/screens/notification_settings/hooks/groups.js.map +1 -1
  550. package/build/screens/notification_settings_screen.js +4 -4
  551. package/build/screens/notification_settings_screen.js.map +1 -1
  552. package/build/screens/preferred_app/hooks/use_chat_types.d.ts +5 -5
  553. package/build/screens/preferred_app/hooks/use_chat_types.d.ts.map +1 -1
  554. package/build/screens/preferred_app/hooks/use_chat_types.js +1 -1
  555. package/build/screens/preferred_app/hooks/use_chat_types.js.map +1 -1
  556. package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
  557. package/build/screens/preferred_app_selection_screen.js +7 -7
  558. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  559. package/build/screens/reactions_screen.js +7 -7
  560. package/build/screens/reactions_screen.js.map +1 -1
  561. package/build/screens/send_giphy_screen.js +8 -8
  562. package/build/screens/send_giphy_screen.js.map +1 -1
  563. package/build/screens/team_conversation_screen.js +3 -3
  564. package/build/screens/team_conversation_screen.js.map +1 -1
  565. package/build/types/jolt_events/message_events.d.ts +1 -1
  566. package/build/types/jolt_events/message_events.d.ts.map +1 -1
  567. package/build/types/jolt_events/message_events.js.map +1 -1
  568. package/build/types/jolt_events/reaction_events.d.ts +1 -1
  569. package/build/types/jolt_events/reaction_events.d.ts.map +1 -1
  570. package/build/types/jolt_events/reaction_events.js.map +1 -1
  571. package/build/types/resources/app_grant.d.ts +1 -1
  572. package/build/types/resources/app_grant.d.ts.map +1 -1
  573. package/build/types/resources/app_grant.js.map +1 -1
  574. package/build/types/resources/conversation.d.ts +1 -0
  575. package/build/types/resources/conversation.d.ts.map +1 -1
  576. package/build/types/resources/conversation.js.map +1 -1
  577. package/build/types/resources/conversation_membership.d.ts +1 -1
  578. package/build/types/resources/conversation_membership.d.ts.map +1 -1
  579. package/build/types/resources/conversation_membership.js.map +1 -1
  580. package/build/types/resources/group_membership.d.ts +1 -1
  581. package/build/types/resources/group_membership.d.ts.map +1 -1
  582. package/build/types/resources/group_membership.js.map +1 -1
  583. package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
  584. package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
  585. package/build/types/resources/groups/groups_group_resource.js.map +1 -1
  586. package/build/types/resources/organization.d.ts +1 -1
  587. package/build/types/resources/organization.d.ts.map +1 -1
  588. package/build/types/resources/organization.js.map +1 -1
  589. package/build/types/resources/person.d.ts +1 -1
  590. package/build/types/resources/person.d.ts.map +1 -1
  591. package/build/types/resources/person.js.map +1 -1
  592. package/build/types/resources/services/chat_resource.d.ts +1 -1
  593. package/build/types/resources/services/chat_resource.d.ts.map +1 -1
  594. package/build/types/resources/services/chat_resource.js.map +1 -1
  595. package/build/types/resources/services/team_resource.d.ts +1 -1
  596. package/build/types/resources/services/team_resource.d.ts.map +1 -1
  597. package/build/types/resources/services/team_resource.js.map +1 -1
  598. package/build/utils/cache/messages_cache.d.ts +3 -3
  599. package/build/utils/cache/messages_cache.d.ts.map +1 -1
  600. package/build/utils/cache/messages_cache.js +3 -3
  601. package/build/utils/cache/messages_cache.js.map +1 -1
  602. package/build/utils/cache/optimistically_create_message.d.ts +2 -2
  603. package/build/utils/cache/optimistically_create_message.d.ts.map +1 -1
  604. package/build/utils/cache/optimistically_create_message.js +4 -4
  605. package/build/utils/cache/optimistically_create_message.js.map +1 -1
  606. package/build/utils/cache/optimistically_update_message.d.ts +1 -1
  607. package/build/utils/cache/optimistically_update_message.d.ts.map +1 -1
  608. package/build/utils/cache/optimistically_update_message.js +2 -2
  609. package/build/utils/cache/optimistically_update_message.js.map +1 -1
  610. package/build/utils/cache/page_mutations.d.ts +5 -5
  611. package/build/utils/cache/page_mutations.d.ts.map +1 -1
  612. package/build/utils/cache/page_mutations.js.map +1 -1
  613. package/build/utils/client/client.d.ts +1 -1
  614. package/build/utils/client/client.d.ts.map +1 -1
  615. package/build/utils/client/client.js.map +1 -1
  616. package/build/utils/convert_attachments_for_create.d.ts +2 -2
  617. package/build/utils/convert_attachments_for_create.d.ts.map +1 -1
  618. package/build/utils/convert_attachments_for_create.js.map +1 -1
  619. package/build/utils/destructure_chat_group_graph_id.d.ts +2 -2
  620. package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -1
  621. package/build/utils/destructure_chat_group_graph_id.js.map +1 -1
  622. package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts +2 -2
  623. package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts.map +1 -1
  624. package/build/utils/jolt/transform_message_event_data_to_message_resource.js +1 -1
  625. package/build/utils/jolt/transform_message_event_data_to_message_resource.js.map +1 -1
  626. package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts +3 -3
  627. package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts.map +1 -1
  628. package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.js.map +1 -1
  629. package/build/utils/performance_tracking.d.ts +1 -1
  630. package/build/utils/performance_tracking.d.ts.map +1 -1
  631. package/build/utils/performance_tracking.js.map +1 -1
  632. package/build/utils/reaction_constants.d.ts +1 -1
  633. package/build/utils/reaction_constants.d.ts.map +1 -1
  634. package/build/utils/reaction_constants.js.map +1 -1
  635. package/build/utils/request/conversation.d.ts +2 -2
  636. package/build/utils/request/conversation.d.ts.map +1 -1
  637. package/build/utils/request/conversation.js.map +1 -1
  638. package/build/utils/request/get_features.d.ts +1 -1
  639. package/build/utils/request/get_features.d.ts.map +1 -1
  640. package/build/utils/request/get_features.js +1 -1
  641. package/build/utils/request/get_features.js.map +1 -1
  642. package/build/utils/request/get_message.d.ts +1 -1
  643. package/build/utils/request/get_message.d.ts.map +1 -1
  644. package/build/utils/request/get_message.js +1 -1
  645. package/build/utils/request/get_message.js.map +1 -1
  646. package/build/utils/request/get_messages.d.ts +1 -1
  647. package/build/utils/request/get_messages.d.ts.map +1 -1
  648. package/build/utils/request/get_messages.js +1 -1
  649. package/build/utils/request/get_messages.js.map +1 -1
  650. package/build/utils/response_error.d.ts +1 -1
  651. package/build/utils/response_error.d.ts.map +1 -1
  652. package/build/utils/response_error.js.map +1 -1
  653. package/build/utils/session.d.ts +1 -1
  654. package/build/utils/session.d.ts.map +1 -1
  655. package/build/utils/session.js.map +1 -1
  656. package/build/utils/session_manager.d.ts +1 -1
  657. package/build/utils/session_manager.d.ts.map +1 -1
  658. package/build/utils/session_manager.js.map +1 -1
  659. package/build/utils/styles.js +1 -1
  660. package/build/utils/styles.js.map +1 -1
  661. package/build/utils/theme.d.ts +1 -1
  662. package/build/utils/theme.d.ts.map +1 -1
  663. package/build/utils/theme.js +2 -2
  664. package/build/utils/theme.js.map +1 -1
  665. package/package.json +3 -2
  666. package/src/__tests__/contexts/session_context.tsx +5 -5
  667. package/src/__tests__/event-polyfill.test.ts +3 -3
  668. package/src/__tests__/hooks/useTheme.tsx +2 -2
  669. package/src/__tests__/hooks/use_async_storage.test.tsx +1 -1
  670. package/src/__tests__/hooks/use_conversation_messages.ts +2 -2
  671. package/src/__tests__/hooks/use_font_scale.test.ts +1 -1
  672. package/src/__tests__/utils/cache/page_mutations.ts +1 -1
  673. package/src/__tests__/utils/client.ts +5 -5
  674. package/src/__tests__/utils/native_adapters/configuration.ts +4 -4
  675. package/src/__tests__/utils/parse_simple_markdown.ts +1 -1
  676. package/src/__tests__/utils/pluralize.tsx +1 -1
  677. package/src/__tests__/utils/session.ts +2 -2
  678. package/src/__tests__/utils/uri.ts +1 -1
  679. package/src/__utils__/handlers.ts +1 -1
  680. package/src/components/conversation/attachments/attachment_card.tsx +3 -3
  681. package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +2 -2
  682. package/src/components/conversation/attachments/audio_attachment.tsx +4 -4
  683. package/src/components/conversation/attachments/expanded_link.tsx +4 -4
  684. package/src/components/conversation/attachments/generic_file_attachment.tsx +5 -5
  685. package/src/components/conversation/attachments/giphy_attachment.tsx +5 -5
  686. package/src/components/conversation/attachments/image_attachment.tsx +6 -6
  687. package/src/components/conversation/attachments/video_attachment.tsx +5 -5
  688. package/src/components/conversation/empty_conversation_blank_state.tsx +1 -1
  689. package/src/components/conversation/jump_to_bottom_button.tsx +3 -3
  690. package/src/components/conversation/message.tsx +19 -19
  691. package/src/components/conversation/message_attachments.tsx +5 -5
  692. package/src/components/conversation/message_form/message_form_attachment_image.tsx +2 -2
  693. package/src/components/conversation/message_form/message_form_attachment_video.tsx +2 -2
  694. package/src/components/conversation/message_form.tsx +17 -17
  695. package/src/components/conversation/message_markdown.tsx +3 -3
  696. package/src/components/conversation/message_reaction.tsx +8 -8
  697. package/src/components/conversation/message_read_receipts.tsx +3 -3
  698. package/src/components/conversation/messages_disabled_banners.tsx +2 -2
  699. package/src/components/conversation/reply_connectors.tsx +3 -3
  700. package/src/components/conversation/reply_shadow_message.tsx +9 -9
  701. package/src/components/conversation/typing_indicator.tsx +3 -3
  702. package/src/components/conversations/conversation_actions.tsx +6 -9
  703. package/src/components/conversations/conversation_preview.tsx +4 -9
  704. package/src/components/conversations/conversations.tsx +6 -6
  705. package/src/components/conversations/mute_indicator.tsx +3 -3
  706. package/src/components/conversations/swipeable_toggle_button.tsx +5 -5
  707. package/src/components/conversations/unread_count_badge.tsx +3 -3
  708. package/src/components/display/action_button.tsx +2 -2
  709. package/src/components/display/avatar.tsx +2 -2
  710. package/src/components/display/avatar_group.tsx +2 -2
  711. package/src/components/display/badge.tsx +3 -3
  712. package/src/components/display/banner.tsx +1 -1
  713. package/src/components/display/banner_collapsible.tsx +1 -1
  714. package/src/components/display/button.tsx +3 -3
  715. package/src/components/display/child_notice.tsx +3 -3
  716. package/src/components/display/heading.tsx +3 -3
  717. package/src/components/display/icon.tsx +1 -1
  718. package/src/components/display/icon_button.tsx +2 -2
  719. package/src/components/display/image.tsx +1 -1
  720. package/src/components/display/image_attachment_preview.tsx +2 -2
  721. package/src/components/display/keyboard_view.tsx +1 -1
  722. package/src/components/display/person.tsx +2 -2
  723. package/src/components/display/platform_modal_header_buttons.tsx +1 -1
  724. package/src/components/display/pressable_row.tsx +1 -1
  725. package/src/components/display/spinner.tsx +1 -1
  726. package/src/components/display/switch.tsx +1 -1
  727. package/src/components/display/tabs.tsx +1 -1
  728. package/src/components/display/text.tsx +2 -2
  729. package/src/components/display/text_button.tsx +2 -2
  730. package/src/components/display/text_inline_button.tsx +2 -2
  731. package/src/components/display/toggle_button.tsx +6 -6
  732. package/src/components/display/utils/button_colors.ts +1 -1
  733. package/src/components/display/utils/status_colors.ts +1 -1
  734. package/src/components/display/video_attachment_preview.tsx +3 -3
  735. package/src/components/group_conversation_list.tsx +5 -5
  736. package/src/components/page/error_boundary.tsx +2 -2
  737. package/src/components/page/loading.tsx +1 -1
  738. package/src/components/primitive/avatar_primitive.tsx +5 -5
  739. package/src/components/primitive/banner_primitive.tsx +11 -11
  740. package/src/components/primitive/blank_state_primitive.tsx +2 -2
  741. package/src/components/primitive/form_sheet.tsx +4 -4
  742. package/src/components/safe_area_modal.tsx +1 -1
  743. package/src/contexts/api_provider.tsx +4 -4
  744. package/src/contexts/chat_context.tsx +6 -6
  745. package/src/contexts/conversations_context.tsx +3 -3
  746. package/src/contexts/session_context.tsx +9 -9
  747. package/src/hooks/groups/use_group_members_for_new_conversation.ts +4 -4
  748. package/src/hooks/groups/use_groups_conversation_create.ts +3 -3
  749. package/src/hooks/services/use_find_or_create_services_conversation.ts +3 -3
  750. package/src/hooks/services/use_services_team.ts +2 -2
  751. package/src/hooks/services/use_team_members_for_new_conversation.ts +2 -2
  752. package/src/hooks/services/use_team_plans.ts +2 -2
  753. package/src/hooks/use_api.ts +2 -2
  754. package/src/hooks/use_api_client.ts +3 -3
  755. package/src/hooks/use_async_storage.ts +1 -1
  756. package/src/hooks/use_attachment_uploader.ts +5 -5
  757. package/src/hooks/use_broadcast_typing_status.ts +1 -1
  758. package/src/hooks/use_chat_permissions.ts +1 -1
  759. package/src/hooks/use_conversation.ts +5 -4
  760. package/src/hooks/use_conversation_jolt_events.ts +3 -3
  761. package/src/hooks/use_conversation_membership.ts +3 -3
  762. package/src/hooks/use_conversation_message.ts +2 -2
  763. package/src/hooks/use_conversation_messages.ts +2 -2
  764. package/src/hooks/use_conversation_messages_jolt_events.ts +14 -14
  765. package/src/hooks/use_conversations.ts +2 -2
  766. package/src/hooks/use_conversations_actions.ts +2 -2
  767. package/src/hooks/use_conversations_cache.ts +5 -5
  768. package/src/hooks/use_conversations_jolt_events.ts +4 -4
  769. package/src/hooks/use_current_person.ts +2 -2
  770. package/src/hooks/use_features.ts +4 -4
  771. package/src/hooks/use_giphy.ts +2 -2
  772. package/src/hooks/use_groups.ts +2 -2
  773. package/src/hooks/use_groups_groups.ts +1 -1
  774. package/src/hooks/use_jolt.ts +3 -3
  775. package/src/hooks/use_live_relative_time.ts +2 -2
  776. package/src/hooks/use_mark_latest_message_read.ts +1 -1
  777. package/src/hooks/use_message_create_or_update.ts +11 -11
  778. package/src/hooks/use_message_draft.ts +2 -2
  779. package/src/hooks/use_message_reaction_toggle.ts +4 -4
  780. package/src/hooks/use_my_gender.ts +1 -1
  781. package/src/hooks/use_organization.ts +1 -1
  782. package/src/hooks/use_people_person.ts +1 -1
  783. package/src/hooks/use_product_analytics.ts +5 -5
  784. package/src/hooks/use_qualified_by_age.ts +1 -1
  785. package/src/hooks/use_read_receipts.ts +1 -1
  786. package/src/hooks/use_report_message.ts +2 -2
  787. package/src/hooks/use_storage.ts +1 -1
  788. package/src/hooks/use_submit_age_check.ts +2 -2
  789. package/src/hooks/use_suspense_api.ts +5 -5
  790. package/src/hooks/use_teams.ts +1 -1
  791. package/src/hooks/use_theme.tsx +2 -2
  792. package/src/hooks/use_typing_indicators.ts +1 -1
  793. package/src/hooks/use_typing_status_cache.ts +1 -1
  794. package/src/hooks/use_upload_client.ts +3 -3
  795. package/src/navigation/chat_access_gate.tsx +7 -7
  796. package/src/navigation/index.tsx +31 -34
  797. package/src/navigation/screenLayout.tsx +2 -2
  798. package/src/polyfills/events/Event.ts +1 -1
  799. package/src/polyfills/events/EventTarget.ts +1 -1
  800. package/src/polyfills/events/internals/EventInternals.ts +2 -2
  801. package/src/polyfills/events/internals/EventTargetInternals.ts +2 -2
  802. package/src/screens/age_check/age_check_required_screen.tsx +8 -8
  803. package/src/screens/age_check/age_check_underage_screen.tsx +3 -3
  804. package/src/screens/age_check/components/age_check_select_birthdate_modal.tsx +3 -3
  805. package/src/screens/attachment_actions/attachment_actions_screen.tsx +1 -1
  806. package/src/screens/attachment_actions/hooks/useDeleteAttachment.tsx +3 -3
  807. package/src/screens/bug_report_screen.tsx +11 -11
  808. package/src/screens/conversation/message_read_receipts_screen.tsx +5 -5
  809. package/src/screens/conversation_details_screen.tsx +47 -12
  810. package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +8 -4
  811. package/src/screens/conversation_filter_recipients/components/header_row.tsx +5 -5
  812. package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +6 -6
  813. package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx +5 -1
  814. package/src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts +6 -3
  815. package/src/screens/conversation_filter_recipients/types.tsx +1 -1
  816. package/src/screens/conversation_filters/components/conversation_filters.tsx +8 -5
  817. package/src/screens/conversation_filters/components/rows.tsx +9 -14
  818. package/src/screens/conversation_filters/context/conversation_filter_context.tsx +4 -1
  819. package/src/screens/conversation_filters/group_filters.tsx +1 -1
  820. package/src/screens/conversation_filters/hooks/filters.ts +5 -5
  821. package/src/screens/conversation_filters/screen_props.ts +1 -1
  822. package/src/screens/conversation_filters/team_filters.tsx +1 -1
  823. package/src/screens/conversation_filters_screen.tsx +1 -1
  824. package/src/screens/conversation_new/components/filter_by_plan.tsx +7 -7
  825. package/src/screens/conversation_new/components/form_list.tsx +3 -3
  826. package/src/screens/conversation_new/components/gender_filter_toggle.tsx +3 -3
  827. package/src/screens/conversation_new/components/groups_form.tsx +14 -14
  828. package/src/screens/conversation_new/components/services_form.tsx +10 -10
  829. package/src/screens/conversation_new/components/source_app_error_card.tsx +1 -1
  830. package/src/screens/conversation_new/conversation_new_screen.tsx +3 -3
  831. package/src/screens/conversation_notification_level_select_screen.tsx +6 -6
  832. package/src/screens/conversation_screen.tsx +23 -23
  833. package/src/screens/conversation_select_recipients/components/groups_recipient_row.tsx +2 -2
  834. package/src/screens/conversation_select_recipients/components/recipient_link_row.tsx +3 -3
  835. package/src/screens/conversation_select_recipients/components/restricted_group_row.tsx +4 -4
  836. package/src/screens/conversation_select_recipients/components/team_recipient_row.tsx +2 -2
  837. package/src/screens/conversation_select_recipients/components/view_more_link_row.tsx +1 -1
  838. package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -4
  839. package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +3 -3
  840. package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +7 -4
  841. package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -2
  842. package/src/screens/conversation_select_type_screen.tsx +4 -4
  843. package/src/screens/conversations/components/chat_group_badge.tsx +4 -4
  844. package/src/screens/conversations/components/list_header_action_button.tsx +4 -4
  845. package/src/screens/conversations/components/list_header_component.tsx +10 -10
  846. package/src/screens/conversations/conversations_screen.tsx +5 -5
  847. package/src/screens/design_system_screen.tsx +6 -6
  848. package/src/screens/get_help_screen.tsx +5 -5
  849. package/src/screens/group_notification_level_select_screen.tsx +3 -3
  850. package/src/screens/group_notification_settings_screen.tsx +3 -3
  851. package/src/screens/message_actions_screen.tsx +12 -12
  852. package/src/screens/message_report/components/message_preview.tsx +3 -3
  853. package/src/screens/message_report/components/report_reason_list.tsx +4 -7
  854. package/src/screens/message_report_screen.tsx +11 -11
  855. package/src/screens/notification_settings/hooks/groups.ts +6 -6
  856. package/src/screens/notification_settings_screen.tsx +4 -4
  857. package/src/screens/preferred_app/hooks/use_chat_types.ts +2 -2
  858. package/src/screens/preferred_app_selection_screen.tsx +7 -7
  859. package/src/screens/reactions_screen.tsx +9 -9
  860. package/src/screens/send_giphy_screen.tsx +8 -8
  861. package/src/screens/team_conversation_screen.tsx +3 -3
  862. package/src/types/jolt_events/message_events.ts +1 -1
  863. package/src/types/jolt_events/reaction_events.ts +1 -1
  864. package/src/types/resources/app_grant.ts +1 -1
  865. package/src/types/resources/conversation.ts +1 -0
  866. package/src/types/resources/conversation_membership.ts +1 -1
  867. package/src/types/resources/group_membership.ts +1 -1
  868. package/src/types/resources/groups/groups_group_resource.ts +1 -1
  869. package/src/types/resources/organization.ts +1 -1
  870. package/src/types/resources/person.ts +1 -1
  871. package/src/types/resources/services/chat_resource.ts +1 -1
  872. package/src/types/resources/services/team_resource.ts +1 -1
  873. package/src/utils/__tests__/convert_attachments_for_create.test.ts +3 -3
  874. package/src/utils/__tests__/session_manager.test.ts +3 -3
  875. package/src/utils/__tests__/sha_256.test.ts +1 -1
  876. package/src/utils/cache/messages_cache.ts +5 -5
  877. package/src/utils/cache/optimistically_create_message.ts +7 -7
  878. package/src/utils/cache/optimistically_update_message.ts +3 -3
  879. package/src/utils/cache/page_mutations.ts +1 -1
  880. package/src/utils/client/client.ts +1 -1
  881. package/src/utils/convert_attachments_for_create.ts +2 -2
  882. package/src/utils/destructure_chat_group_graph_id.ts +2 -2
  883. package/src/utils/jolt/transform_message_event_data_to_message_resource.ts +4 -4
  884. package/src/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.ts +3 -3
  885. package/src/utils/performance_tracking.ts +1 -1
  886. package/src/utils/reaction_constants.ts +1 -1
  887. package/src/utils/request/conversation.ts +2 -2
  888. package/src/utils/request/get_features.ts +1 -1
  889. package/src/utils/request/get_message.ts +1 -1
  890. package/src/utils/request/get_messages.ts +1 -1
  891. package/src/utils/response_error.ts +1 -1
  892. package/src/utils/session.ts +1 -1
  893. package/src/utils/session_manager.ts +1 -1
  894. package/src/utils/styles.ts +1 -1
  895. package/src/utils/theme.ts +2 -2
@@ -4,16 +4,16 @@ import { useMutation } from '@tanstack/react-query';
4
4
  import { isNil, omitBy } from 'lodash';
5
5
  import React, { useCallback } from 'react';
6
6
  import { Alert, Platform, StyleSheet, View } from 'react-native';
7
- import { Text } from '../components';
8
- import { useReactionStyles } from '../components/conversation/message_reaction';
9
- import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
10
- import { useCreateAndroidRippleColor, useFontScale, useTheme } from '../hooks';
11
- import { useApiClient } from '../hooks/use_api_client';
12
- import { useConversationMessages } from '../hooks/use_conversation_messages';
13
- import { availableFeatures, useFeatures } from '../hooks/use_features';
14
- import { useMessageReactionToggle } from '../hooks/use_message_reaction_toggle';
15
- import { REACTION_EMOJIS } from '../utils';
16
- import { Clipboard, Haptic } from '../utils/native_adapters';
7
+ import { Text } from '@/components';
8
+ import { useReactionStyles } from '@/components/conversation/message_reaction';
9
+ import FormSheet, { getFormSheetScreenOptions } from '@/components/primitive/form_sheet';
10
+ import { useCreateAndroidRippleColor, useFontScale, useTheme } from '@/hooks';
11
+ import { useApiClient } from '@/hooks/use_api_client';
12
+ import { useConversationMessages } from '@/hooks/use_conversation_messages';
13
+ import { availableFeatures, useFeatures } from '@/hooks/use_features';
14
+ import { useMessageReactionToggle } from '@/hooks/use_message_reaction_toggle';
15
+ import { REACTION_EMOJIS } from '@/utils';
16
+ import { Clipboard, Haptic } from '@/utils/native_adapters';
17
17
  export const MessageActionsScreenOptions = getFormSheetScreenOptions({
18
18
  sheetAllowedDetents: [0.5],
19
19
  headerTitle: 'Message actions',
@@ -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,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,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,EAAE,MAAM,0BAA0B,CAAA;AAE5D,MAAM,CAAC,MAAM,2BAA2B,GAAG,yBAAyB,CAAC;IACnE,mBAAmB,EAAE,CAAC,GAAG,CAAC;IAC1B,WAAW,EAAE,iBAAiB;CAC/B,CAAC,CAAA;AAUF,MAAM,UA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,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC,CAAA;IAE9D,MAAM,cAAc,GAAG,CAAC,CAAA;IACxB,MAAM,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;IAC5C,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC;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}>\n\nexport function MessageActionsScreen({ route }: MessageActionsScreenProps) {\n const {\n conversation_id,\n message_id,\n canDeleteNonAuthoredMessages,\n inReplyScreen,\n reply_root_author_name,\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 />\n )\n}\n\nfunction MessageActionsScreenContent({\n message,\n conversation_id,\n canDeleteNonAuthoredMessages,\n refetchMessages,\n inReplyScreen,\n replyRootAuthorName,\n}: {\n message: MessageResource\n conversation_id: number\n canDeleteNonAuthoredMessages: boolean\n refetchMessages: () => void\n inReplyScreen?: boolean\n replyRootAuthorName?: string\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 <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 </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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B,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}>\n\nexport function MessageActionsScreen({ route }: MessageActionsScreenProps) {\n const {\n conversation_id,\n message_id,\n canDeleteNonAuthoredMessages,\n inReplyScreen,\n reply_root_author_name,\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 />\n )\n}\n\nfunction MessageActionsScreenContent({\n message,\n conversation_id,\n canDeleteNonAuthoredMessages,\n refetchMessages,\n inReplyScreen,\n replyRootAuthorName,\n}: {\n message: MessageResource\n conversation_id: number\n canDeleteNonAuthoredMessages: boolean\n refetchMessages: () => void\n inReplyScreen?: boolean\n replyRootAuthorName?: string\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 <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 </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,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ViewStyle } from 'react-native';
3
- import { MessageResource } from '../../../types';
3
+ import { MessageResource } from '@/types';
4
4
  interface MessagePreviewProps {
5
5
  message: MessageResource;
6
6
  style?: ViewStyle;
@@ -1 +1 @@
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
+ {"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,SAAS,CAAA;AAEzC,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,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { View, StyleSheet } from 'react-native';
3
- import { Avatar, Text, Icon } from '../../../components';
4
- import { useTheme, useFontScale } from '../../../hooks';
3
+ import { Avatar, Text, Icon } from '@/components';
4
+ import { useTheme, useFontScale } from '@/hooks';
5
5
  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;
@@ -1 +1 @@
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,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,CAAC,IAAI,CAAC,KAAK,CAAC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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,cAAc,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAQhD,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,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAC5C;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAChC;QAAA,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EACnD;QAAA,CAAC,IAAI,C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M,CAAC;QACvB,gBAAgB,EAAE;YAChB,GAAG,EAAE,EAAE;SACR;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;SACR;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;YACjB,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,UAAU,EAAE,CAAC;SACd;QACD,aAAa,EAAE;YACb,eAAe,EAAE,MAAM,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,5 +1,5 @@
1
1
  import React from 'react';
2
- import { MessageReportReason } from '../../../types/resources/message_report';
2
+ import { MessageReportReason } from '@/types/resources/message_report';
3
3
  interface ReportReasonListProps {
4
4
  selectedReason: MessageReportReason | null;
5
5
  onReasonChange: (reason: MessageReportReason) => void;
@@ -1 +1 @@
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
+ {"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,EAA0B,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAQ9F,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,10 +1,10 @@
1
1
  import { PlatformPressable } from '@react-navigation/elements';
2
2
  import React from 'react';
3
3
  import { View, StyleSheet } from 'react-native';
4
- import { Text } from '../../../components';
5
- import { useTheme, useCreateAndroidRippleColor } from '../../../hooks';
6
- import { MESSAGE_REPORT_REASONS, } from '../../../types/resources/message_report';
7
- import { Haptic } from '../../../utils/native_adapters';
4
+ import { Text } from '@/components';
5
+ import { useTheme, useCreateAndroidRippleColor } from '@/hooks';
6
+ import { MESSAGE_REPORT_REASONS } from '@/types/resources/message_report';
7
+ import { Haptic } from '@/utils/native_adapters';
8
8
  const MESSAGE_REPORT_REASONS_LIST = Object.entries(MESSAGE_REPORT_REASONS).map(([key, label]) => ({
9
9
  key: key,
10
10
  label,
@@ -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;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,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,MAAM,UAAU,gBAAgB,CAAC,EAAE,cAAc,EAAE,cAAc,EAAyB;IACxF,OAAO,CACL,CAAC,IAAI,CACH;MAAA,CAAC,2BAA2B,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACnD,CAAC,kBAAkB,CACjB,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,MAAM,CAAC,CAAC,GAAG,CAAC,CACZ,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,cAAc,KAAK,GAAG,CAAC,CACn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AAA;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/components/report_reason_list.tsx"],"names":[],"mappings":"AAA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AU,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 { MESSAGE_REPORT_REASONS, MessageReportReason } 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"]}
@@ -2,15 +2,15 @@ import { useNavigation, StackActions } from '@react-navigation/native';
2
2
  import React, { useCallback, useLayoutEffect, useMemo, useState } from 'react';
3
3
  import { View, StyleSheet, TextInput, ScrollView } from 'react-native';
4
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
- import { Spinner, Text, KeyboardView } from '../components';
6
- import { HeaderDismissButton, HeaderTextButton, } from '../components/display/platform_modal_header_buttons';
7
- import BlankState from '../components/primitive/blank_state_primitive';
8
- import { useTheme } from '../hooks';
9
- import { useConversationMessages } from '../hooks/use_conversation_messages';
10
- import { useReportMessage } from '../hooks/use_report_message';
11
- import { platformFontWeightBold } from '../utils';
12
5
  import { MessagePreview } from './message_report/components/message_preview';
13
6
  import { ReportReasonList } from './message_report/components/report_reason_list';
7
+ import { Spinner, Text, KeyboardView } from '@/components';
8
+ import { HeaderDismissButton, HeaderTextButton, } from '@/components/display/platform_modal_header_buttons';
9
+ import BlankState from '@/components/primitive/blank_state_primitive';
10
+ import { useTheme } from '@/hooks';
11
+ import { useConversationMessages } from '@/hooks/use_conversation_messages';
12
+ import { useReportMessage } from '@/hooks/use_report_message';
13
+ import { platformFontWeightBold } from '@/utils';
14
14
  const MAX_DETAIL_LENGTH = 500;
15
15
  export const MessageReportScreenOptions = ({ navigation, route, }) => {
16
16
  const handleClose = () => navigation.dispatch(StackActions.popTo('Conversation', {
@@ -1 +1 @@
1
- {"version":3,"file":"message_report_screen.js","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKzF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,UAAU,MAAM,+CAA+C,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAG9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;A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uBAAuB;SACtC;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;QACD,aAAa,EAAE;YACb,GAAG,EAAE,CAAC;SACP;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,sBAAsB;YAClC,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,eAAe;SAC9B;QACD,mBAAmB,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,aAAa,EAAE;YACb,GAAG,EAAE,CAAC;SACP;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,KAAK;YACxB,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;YACd,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,MAAM,CAAC,sBAAsB;YAC1C,YAAY,EAAE,CAAC;YACf,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation, StackActions } from '@react-navigation/native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport React, { useCallback, useLayoutEffect, useMemo, useState } from 'react'\nimport { View, StyleSheet, TextInput, ScrollView } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Spinner, Text, KeyboardView } from '../components'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { useTheme } from '../hooks'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { useReportMessage } from '../hooks/use_report_message'\nimport { MessageResource } from '../types'\nimport { MessageReportReason } from '../types/resources/message_report'\nimport { platformFontWeightBold } from '../utils'\nimport { MessagePreview } from './message_report/components/message_preview'\nimport { ReportReasonList } from './message_report/components/report_reason_list'\n\nconst MAX_DETAIL_LENGTH = 500\n\nexport const MessageReportScreenOptions = ({\n navigation,\n route,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => {\n const handleClose = () =>\n navigation.dispatch(\n StackActions.popTo('Conversation', {\n conversation_id: route.params?.conversation_id,\n })\n )\n\n return {\n presentation: 'modal',\n title: 'Report message',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={handleClose} />,\n }\n}\n\nexport type MessageReportScreenProps = StaticScreenProps<{\n conversation_id: number\n message_id: string\n}>\n\nexport function MessageReportScreen({ route }: MessageReportScreenProps) {\n const { conversation_id, message_id } = route.params\n\n const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false })\n const message = messages.find(m => m.id === message_id)\n\n if (!message) return null\n\n return <MessageReportScreenContent message={message} conversation_id={conversation_id} />\n}\n\nfunction MessageReportScreenContent({\n message,\n conversation_id,\n}: {\n message: MessageResource\n conversation_id: number\n}) {\n const styles = useStyles()\n const navigation = useNavigation()\n const [selectedReason, setSelectedReason] = useState<MessageReportReason | null>(null)\n const [reasonDetail, setReasonDetail] = useState('')\n const { mutate: submitReport, status } = useReportMessage(conversation_id, message.id)\n\n const handleReasonChange = useCallback((reason: MessageReportReason) => {\n setSelectedReason(reason)\n\n if (reason !== 'other') {\n setReasonDetail('')\n }\n }, [])\n\n const isFormValid = useMemo(() => {\n if (selectedReason === null) return false\n\n if (selectedReason === 'other' && reasonDetail.trim().length === 0) {\n return false\n }\n\n if (status === 'pending') return false\n\n return true\n }, [selectedReason, reasonDetail, status])\n\n const handleSubmit = useCallback(() => {\n if (!isFormValid || !selectedReason) return\n\n submitReport({\n reason: selectedReason,\n reasonDetail: selectedReason === 'other' ? reasonDetail : undefined,\n })\n }, [isFormValid, selectedReason, reasonDetail, submitReport])\n\n const handleClose = useCallback(() => {\n navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))\n }, [navigation, conversation_id])\n\n const HeaderRight = useCallback(\n () => <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!isFormValid} />,\n [handleSubmit, isFormValid]\n )\n\n useLayoutEffect(() => {\n if (status === 'pending' || status === 'success') {\n navigation.setOptions({\n headerRight: () => null,\n })\n } else {\n navigation.setOptions({\n headerTitle: 'Report message',\n headerRight: HeaderRight,\n })\n }\n }, [HeaderRight, navigation, status])\n\n if (status === 'pending') {\n return (\n <View style={styles.fullScreenContainer}>\n <Spinner />\n <Text style={styles.loadingText}>Submitting report...</Text>\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <View style={styles.fullScreenContainer}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Message reported</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n The message has been reported and a church leader will be contacted.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"fill\" />\n </BlankState.Root>\n </View>\n )\n }\n\n if (status === 'error') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.exclamationTriangle\" />\n <BlankState.Content>\n <BlankState.Heading>Unable to submit report</BlankState.Heading>\n <BlankState.Text>\n We were unable to report this message. Please try again.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"outline\" />\n </BlankState.Root>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.warningText} maxFontSizeMultiplier={1.5}>\n Reporting this message will notify a church leader. The person you are reporting will not\n receive a notification from Church Center. If someone is in immediate danger, call local\n emergency services. Don&apos;t wait.\n </Text>\n\n <MessagePreview message={message} />\n\n <View style={styles.reasonSection}>\n <Text style={styles.fieldLabel}>\n What best describes the problem? <Text style={styles.required}>*</Text>\n </Text>\n\n <View style={styles.reasonListContainer}>\n <ReportReasonList selectedReason={selectedReason} onReasonChange={handleReasonChange} />\n </View>\n </View>\n\n {selectedReason === 'other' && (\n <View style={styles.detailSection}>\n <Text style={styles.fieldLabel}>\n Please provide more details <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Describe the issue...\"\n value={reasonDetail}\n onChangeText={setReasonDetail}\n maxLength={MAX_DETAIL_LENGTH}\n accessibilityLabel=\"Additional details\"\n accessibilityHint=\"Provide more information about why you're reporting this message\"\n />\n {reasonDetail.length >= MAX_DETAIL_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {reasonDetail.length}/{MAX_DETAIL_LENGTH}\n </Text>\n )}\n </View>\n )}\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n fullScreenContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: colors.surfaceColor100,\n },\n loadingText: {\n marginTop: 16,\n fontSize: 16,\n fontWeight: '600',\n color: colors.textColorDefaultPrimary,\n },\n warningText: {\n fontSize: 14,\n lineHeight: 20,\n color: colors.textColorDefaultSecondary,\n },\n reasonSection: {\n gap: 8,\n },\n fieldLabel: {\n fontSize: 16,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n required: {\n color: colors.statusErrorText,\n },\n reasonListContainer: {\n backgroundColor: colors.surfaceColor100,\n },\n detailSection: {\n gap: 8,\n },\n textInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n textAlignVertical: 'top',\n minHeight: 120,\n maxHeight: 200,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n },\n successIcon: {\n color: colors.statusSuccessIcon,\n fontSize: 48,\n },\n successTitle: {\n fontSize: 24,\n marginBottom: 4,\n },\n successSubtitle: {\n fontSize: 16,\n marginBottom: 4,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"message_report_screen.js","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKzF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,oDAAoD,CAAA;AAC3D,OAAO,UAAU,MAAM,8CAA8C,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAA;AAC3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AAuB;SACtC;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;QACD,aAAa,EAAE;YACb,GAAG,EAAE,CAAC;SACP;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,sBAAsB;YAClC,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM,CAAC,eAAe;SAC9B;QACD,mBAAmB,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,aAAa,EAAE;YACb,GAAG,EAAE,CAAC;SACP;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,KAAK;YACxB,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;YACd,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,MAAM,CAAC,sBAAsB;YAC1C,YAAY,EAAE,CAAC;YACf,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation, StackActions } from '@react-navigation/native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport React, { useCallback, useLayoutEffect, useMemo, useState } from 'react'\nimport { View, StyleSheet, TextInput, ScrollView } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { MessagePreview } from './message_report/components/message_preview'\nimport { ReportReasonList } from './message_report/components/report_reason_list'\nimport { Spinner, Text, KeyboardView } from '@/components'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '@/components/display/platform_modal_header_buttons'\nimport BlankState from '@/components/primitive/blank_state_primitive'\nimport { useTheme } from '@/hooks'\nimport { useConversationMessages } from '@/hooks/use_conversation_messages'\nimport { useReportMessage } from '@/hooks/use_report_message'\nimport { MessageResource } from '@/types'\nimport { MessageReportReason } from '@/types/resources/message_report'\nimport { platformFontWeightBold } from '@/utils'\n\nconst MAX_DETAIL_LENGTH = 500\n\nexport const MessageReportScreenOptions = ({\n navigation,\n route,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => {\n const handleClose = () =>\n navigation.dispatch(\n StackActions.popTo('Conversation', {\n conversation_id: route.params?.conversation_id,\n })\n )\n\n return {\n presentation: 'modal',\n title: 'Report message',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={handleClose} />,\n }\n}\n\nexport type MessageReportScreenProps = StaticScreenProps<{\n conversation_id: number\n message_id: string\n}>\n\nexport function MessageReportScreen({ route }: MessageReportScreenProps) {\n const { conversation_id, message_id } = route.params\n\n const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false })\n const message = messages.find(m => m.id === message_id)\n\n if (!message) return null\n\n return <MessageReportScreenContent message={message} conversation_id={conversation_id} />\n}\n\nfunction MessageReportScreenContent({\n message,\n conversation_id,\n}: {\n message: MessageResource\n conversation_id: number\n}) {\n const styles = useStyles()\n const navigation = useNavigation()\n const [selectedReason, setSelectedReason] = useState<MessageReportReason | null>(null)\n const [reasonDetail, setReasonDetail] = useState('')\n const { mutate: submitReport, status } = useReportMessage(conversation_id, message.id)\n\n const handleReasonChange = useCallback((reason: MessageReportReason) => {\n setSelectedReason(reason)\n\n if (reason !== 'other') {\n setReasonDetail('')\n }\n }, [])\n\n const isFormValid = useMemo(() => {\n if (selectedReason === null) return false\n\n if (selectedReason === 'other' && reasonDetail.trim().length === 0) {\n return false\n }\n\n if (status === 'pending') return false\n\n return true\n }, [selectedReason, reasonDetail, status])\n\n const handleSubmit = useCallback(() => {\n if (!isFormValid || !selectedReason) return\n\n submitReport({\n reason: selectedReason,\n reasonDetail: selectedReason === 'other' ? reasonDetail : undefined,\n })\n }, [isFormValid, selectedReason, reasonDetail, submitReport])\n\n const handleClose = useCallback(() => {\n navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))\n }, [navigation, conversation_id])\n\n const HeaderRight = useCallback(\n () => <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!isFormValid} />,\n [handleSubmit, isFormValid]\n )\n\n useLayoutEffect(() => {\n if (status === 'pending' || status === 'success') {\n navigation.setOptions({\n headerRight: () => null,\n })\n } else {\n navigation.setOptions({\n headerTitle: 'Report message',\n headerRight: HeaderRight,\n })\n }\n }, [HeaderRight, navigation, status])\n\n if (status === 'pending') {\n return (\n <View style={styles.fullScreenContainer}>\n <Spinner />\n <Text style={styles.loadingText}>Submitting report...</Text>\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <View style={styles.fullScreenContainer}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Message reported</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n The message has been reported and a church leader will be contacted.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"fill\" />\n </BlankState.Root>\n </View>\n )\n }\n\n if (status === 'error') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.exclamationTriangle\" />\n <BlankState.Content>\n <BlankState.Heading>Unable to submit report</BlankState.Heading>\n <BlankState.Text>\n We were unable to report this message. Please try again.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"outline\" />\n </BlankState.Root>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.warningText} maxFontSizeMultiplier={1.5}>\n Reporting this message will notify a church leader. The person you are reporting will not\n receive a notification from Church Center. If someone is in immediate danger, call local\n emergency services. Don&apos;t wait.\n </Text>\n\n <MessagePreview message={message} />\n\n <View style={styles.reasonSection}>\n <Text style={styles.fieldLabel}>\n What best describes the problem? <Text style={styles.required}>*</Text>\n </Text>\n\n <View style={styles.reasonListContainer}>\n <ReportReasonList selectedReason={selectedReason} onReasonChange={handleReasonChange} />\n </View>\n </View>\n\n {selectedReason === 'other' && (\n <View style={styles.detailSection}>\n <Text style={styles.fieldLabel}>\n Please provide more details <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Describe the issue...\"\n value={reasonDetail}\n onChangeText={setReasonDetail}\n maxLength={MAX_DETAIL_LENGTH}\n accessibilityLabel=\"Additional details\"\n accessibilityHint=\"Provide more information about why you're reporting this message\"\n />\n {reasonDetail.length >= MAX_DETAIL_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {reasonDetail.length}/{MAX_DETAIL_LENGTH}\n </Text>\n )}\n </View>\n )}\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n fullScreenContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: colors.surfaceColor100,\n },\n loadingText: {\n marginTop: 16,\n fontSize: 16,\n fontWeight: '600',\n color: colors.textColorDefaultPrimary,\n },\n warningText: {\n fontSize: 14,\n lineHeight: 20,\n color: colors.textColorDefaultSecondary,\n },\n reasonSection: {\n gap: 8,\n },\n fieldLabel: {\n fontSize: 16,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n required: {\n color: colors.statusErrorText,\n },\n reasonListContainer: {\n backgroundColor: colors.surfaceColor100,\n },\n detailSection: {\n gap: 8,\n },\n textInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n textAlignVertical: 'top',\n minHeight: 120,\n maxHeight: 200,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n },\n successIcon: {\n color: colors.statusSuccessIcon,\n fontSize: 48,\n },\n successTitle: {\n fontSize: 24,\n marginBottom: 4,\n },\n successSubtitle: {\n fontSize: 16,\n marginBottom: 4,\n },\n })\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { InfiniteData } from '@tanstack/react-query';
2
- import { ApiCollection, ApiResource } from '../../../types';
3
- import { GroupMembership, GroupResourceWithMembership } from '../../../types/resources';
2
+ import { ApiCollection, ApiResource } from '@/types';
3
+ import { GroupMembership, GroupResourceWithMembership } from '@/types/resources';
4
4
  export declare const getGroupsRequestArgs: () => {
5
5
  url: string;
6
6
  data: {
@@ -30,13 +30,13 @@ export declare const useGroups: () => {
30
30
  data: GroupResourceWithMembership[];
31
31
  totalCount: number;
32
32
  error: Response | null;
33
- status: "success" | "error";
34
33
  isError: boolean;
35
34
  isPending: false;
36
35
  isLoading: false;
37
36
  isLoadingError: false;
38
37
  isRefetchError: boolean;
39
38
  isSuccess: boolean;
39
+ status: "error" | "success";
40
40
  dataUpdatedAt: number;
41
41
  errorUpdatedAt: number;
42
42
  failureCount: number;
@@ -63,18 +63,18 @@ export declare const useGroups: () => {
63
63
  export declare const useGroup: ({ groupId }: {
64
64
  groupId: number | string;
65
65
  }) => {
66
- error: import("../../../types").FailedResponse | null;
67
- status: "success" | "error";
66
+ error: import("@/types").FailedResponse | null;
68
67
  isError: boolean;
69
68
  isPending: false;
70
69
  isLoading: false;
71
70
  isLoadingError: false;
72
71
  isRefetchError: boolean;
73
72
  isSuccess: boolean;
73
+ status: "error" | "success";
74
74
  dataUpdatedAt: number;
75
75
  errorUpdatedAt: number;
76
76
  failureCount: number;
77
- failureReason: import("../../../types").FailedResponse | null;
77
+ failureReason: import("@/types").FailedResponse | null;
78
78
  errorUpdateCount: number;
79
79
  isFetched: boolean;
80
80
  isFetchedAfterMount: boolean;
@@ -83,7 +83,7 @@ export declare const useGroup: ({ groupId }: {
83
83
  isPaused: boolean;
84
84
  isRefetching: boolean;
85
85
  isStale: boolean;
86
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<ApiResource<GroupResourceWithMembership>, import("../../../types").FailedResponse>>;
86
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<ApiResource<GroupResourceWithMembership>, import("@/types").FailedResponse>>;
87
87
  fetchStatus: import("@tanstack/react-query").FetchStatus;
88
88
  data: GroupResourceWithMembership;
89
89
  links: Record<string, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../src/screens/notification_settings/hooks/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+B,MAAM,uBAAuB,CAAA;AAIjF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AAIvF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;CAgB/B,CAAA;AAEF,eAAO,MAAM,mBAAmB,gBAAiB;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;;;;;;;CAa3E,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIrB,CAAA;AAED,eAAO,MAAM,QAAQ,gBAAiB;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CAIjE,CAAA;AAID,eAAO,MAAM,wBAAwB,gBAAiB;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,2HAmFjF,CAAA"}
1
+ {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../src/screens/notification_settings/hooks/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+B,MAAM,uBAAuB,CAAA;AAIjF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AAIhF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;CAgB/B,CAAA;AAEF,eAAO,MAAM,mBAAmB,gBAAiB;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;;;;;;;CAa3E,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIrB,CAAA;AAED,eAAO,MAAM,QAAQ,gBAAiB;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CAIjE,CAAA;AAID,eAAO,MAAM,wBAAwB,gBAAiB;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,2HAmFjF,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import { useMutation, useQueryClient } from '@tanstack/react-query';
2
2
  import { merge } from 'lodash';
3
- import { getRequestQueryKey, useApiClient } from '../../../hooks';
4
- import { useSuspenseGet, useSuspensePaginator } from '../../../hooks';
5
- import { updateRecordInPagesData } from '../../../utils';
6
- import { throwResponseError } from '../../../utils/response_error';
3
+ import { getRequestQueryKey, useApiClient } from '@/hooks';
4
+ import { useSuspenseGet, useSuspensePaginator } from '@/hooks';
5
+ import { updateRecordInPagesData } from '@/utils';
6
+ import { throwResponseError } from '@/utils/response_error';
7
7
  export const getGroupsRequestArgs = () => ({
8
8
  url: '/me/groups',
9
9
  data: {
@@ -1 +1 @@
1
- {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/screens/notification_settings/hooks/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAGrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAElE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CAAC;IACzC,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE;QACJ,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,CAAC,qBAAqB,CAAC;QAChC,MAAM,EAAE,kCAAkC;QAC1C,MAAM,EAAE;YACN,KAAK,EAAE,EAAE;YACT,eAAe,EAAE;gBACf,oBAAoB;gBACpB,gCAAgC;gBAChC,4BAA4B;aAC7B;SACF;QACD,KAAK,EAAE,MAAM;KACd;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,OAAO,EAAgC,EAAE,EAAE,CAAC,CAAC;IACjF,GAAG,EAAE,cAAc,OAAO,EAAE;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC,qBAAqB,CAAC;QAChC,MAAM,EAAE;YACN,KAAK,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,qBAAqB,CAAC;YACxE,eAAe,EAAE;gBACf,oBAAoB;gBACpB,gCAAgC;gBAChC,4BAA4B;aAC7B;SACF;KACF;CACF,CAAC,CAA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,0BAA0B,CAAC,QAAQ,CAAC,CAAA;QACtC,CAAC;QACD,SAAS,EAAE,QAAQ,CAAC,EAAE;YACpB,MAAM,QAAQ,GAAG,qBAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;YACrD,2BAA2B,CAAC,QAAQ,CAAC,CAAA;YACrC,0BAA0B,CAAC,QAAQ,CAAC,CAAA;YAEpC,+DAA+D;YAC/D,wDAAwD;YACxD,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAA;QACpE,CAAC;QACD,UAAU,EAAE,CAAC,UAAoC,EAAE,EAAE;YACnD,OAAO,SAAS,CAAC,IAAI;iBAClB,KAAK,CAA+B;gBACnC,GAAG,EAAE,cAAc,OAAO,sBAAsB;gBAChD,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ,IAAI,EAAE,iBAAiB;wBACvB,UAAU,EAAE;4BACV,GAAG,CAAC,UAAU,CAAC,iBAAiB,KAAK,SAAS,IAAI;gCAChD,kBAAkB,EAAE,UAAU,CAAC,iBAAiB;6BACjD,CAAC;yBACH;qBACF;iBACF;aACF,CAAC;iBACD,KAAK,CAAC,kBAAkB,CAAC,CAAA;QAC9B,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { InfiniteData, useMutation, useQueryClient } from '@tanstack/react-query'\nimport { merge } from 'lodash'\nimport { getRequestQueryKey, useApiClient } from '../../../hooks'\nimport { useSuspenseGet, useSuspensePaginator } from '../../../hooks'\nimport { ApiCollection, ApiResource } from '../../../types'\nimport { GroupMembership, GroupResourceWithMembership } from '../../../types/resources'\nimport { updateRecordInPagesData } from '../../../utils'\nimport { throwResponseError } from '../../../utils/response_error'\n\nexport const getGroupsRequestArgs = () => ({\n url: '/me/groups',\n data: {\n perPage: 100,\n include: ['my_group_membership'],\n filter: 'user_settable_notification_level',\n fields: {\n Group: [],\n GroupMembership: [\n 'notification_level',\n 'notification_level_description',\n 'notification_level_options',\n ],\n },\n order: 'name',\n },\n})\n\nexport const getGroupRequestArgs = ({ groupId }: { groupId: number | string }) => ({\n url: `/me/groups/${groupId}`,\n data: {\n include: ['my_group_membership'],\n fields: {\n Group: ['name', 'source_app_name', 'source_type', 'my_group_membership'],\n GroupMembership: [\n 'notification_level',\n 'notification_level_description',\n 'notification_level_options',\n ],\n },\n },\n})\n\nexport const useGroups = () => {\n const args = getGroupsRequestArgs()\n\n return useSuspensePaginator<GroupResourceWithMembership>(args)\n}\n\nexport const useGroup = ({ groupId }: { groupId: number | string }) => {\n const args = getGroupRequestArgs({ groupId })\n\n return useSuspenseGet<GroupResourceWithMembership>(args, { refetchOnMount: false })\n}\n\ntype GroupsQueryData = InfiniteData<ApiCollection<GroupResourceWithMembership>>\n\nexport const useGroupMembershipUpdate = ({ groupId }: { groupId: number | string }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const groupRequestArgs = getGroupRequestArgs({ groupId })\n const groupsRequestArgs = getGroupsRequestArgs()\n const groupQueryKey = getRequestQueryKey(groupRequestArgs)\n\n const enrichGroupMembership = (\n membership: Partial<GroupMembership>\n ): Partial<GroupMembership> => {\n const cachedGroup =\n queryClient.getQueryData<ApiResource<GroupResourceWithMembership>>(groupQueryKey)\n const currentOptions = cachedGroup?.data.myGroupMembership?.notificationLevelOptions ?? []\n const { notificationLevel } = membership\n const selectedOption = notificationLevel\n ? currentOptions.find(o => o.value === notificationLevel)\n : undefined\n const notificationLevelDescription =\n membership.notificationLevelDescription ?? selectedOption?.description\n\n return {\n ...membership,\n notificationLevelDescription,\n ...(notificationLevel && {\n notificationLevelOptions: currentOptions.map(o => ({\n ...o,\n enabled: o.value === notificationLevel,\n })),\n }),\n }\n }\n\n const updateGroupsMembershipCache = (membership: Partial<GroupMembership>) => {\n queryClient.setQueryData<GroupsQueryData>(getRequestQueryKey(groupsRequestArgs), prev =>\n updateRecordInPagesData({\n data: prev,\n record: { id: groupId } as GroupResourceWithMembership,\n processRecord: (_record, current) => merge({}, current, { myGroupMembership: membership }),\n })\n )\n }\n\n const updateGroupMembershipCache = (membership: Partial<GroupMembership>) => {\n queryClient.setQueryData<ApiResource<GroupResourceWithMembership>>(groupQueryKey, groupData => {\n if (!groupData?.data.myGroupMembership) return groupData\n return merge({}, groupData, { data: { myGroupMembership: membership } })\n })\n }\n\n return useMutation({\n throwOnError: true,\n onMutate: membership => {\n const enriched = enrichGroupMembership(membership)\n updateGroupsMembershipCache(enriched)\n updateGroupMembershipCache(enriched)\n },\n onSuccess: response => {\n const enriched = enrichGroupMembership(response.data)\n updateGroupsMembershipCache(enriched)\n updateGroupMembershipCache(enriched)\n\n // Updating conversations without access to the current filters\n // is a hard itch to scratch so we just need to refetch.\n queryClient.invalidateQueries({ queryKey: ['/me/conversations'] })\n },\n mutationFn: (membership: Partial<GroupMembership>) => {\n return apiClient.chat\n .patch<ApiResource<GroupMembership>>({\n url: `/me/groups/${groupId}/my_group_membership`,\n data: {\n data: {\n type: 'GroupMembership',\n attributes: {\n ...(membership.notificationLevel !== undefined && {\n notification_level: membership.notificationLevel,\n }),\n },\n },\n },\n })\n .catch(throwResponseError)\n },\n })\n}\n"]}
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../src/screens/notification_settings/hooks/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAG9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,CAAC;IACzC,GAA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EAAE;4BACV,GAAG,CAAC,UAAU,CAAC,iBAAiB,KAAK,SAAS,IAAI;gCAChD,kBAAkB,EAAE,UAAU,CAAC,iBAAiB;6BACjD,CAAC;yBACH;qBACF;iBACF;aACF,CAAC;iBACD,KAAK,CAAC,kBAAkB,CAAC,CAAA;QAC9B,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { InfiniteData, useMutation, useQueryClient } from '@tanstack/react-query'\nimport { merge } from 'lodash'\nimport { getRequestQueryKey, useApiClient } from '@/hooks'\nimport { useSuspenseGet, useSuspensePaginator } from '@/hooks'\nimport { ApiCollection, ApiResource } from '@/types'\nimport { GroupMembership, GroupResourceWithMembership } from '@/types/resources'\nimport { updateRecordInPagesData } from '@/utils'\nimport { throwResponseError } from '@/utils/response_error'\n\nexport const getGroupsRequestArgs = () => ({\n url: '/me/groups',\n data: {\n perPage: 100,\n include: ['my_group_membership'],\n filter: 'user_settable_notification_level',\n fields: {\n Group: [],\n GroupMembership: [\n 'notification_level',\n 'notification_level_description',\n 'notification_level_options',\n ],\n },\n order: 'name',\n },\n})\n\nexport const getGroupRequestArgs = ({ groupId }: { groupId: number | string }) => ({\n url: `/me/groups/${groupId}`,\n data: {\n include: ['my_group_membership'],\n fields: {\n Group: ['name', 'source_app_name', 'source_type', 'my_group_membership'],\n GroupMembership: [\n 'notification_level',\n 'notification_level_description',\n 'notification_level_options',\n ],\n },\n },\n})\n\nexport const useGroups = () => {\n const args = getGroupsRequestArgs()\n\n return useSuspensePaginator<GroupResourceWithMembership>(args)\n}\n\nexport const useGroup = ({ groupId }: { groupId: number | string }) => {\n const args = getGroupRequestArgs({ groupId })\n\n return useSuspenseGet<GroupResourceWithMembership>(args, { refetchOnMount: false })\n}\n\ntype GroupsQueryData = InfiniteData<ApiCollection<GroupResourceWithMembership>>\n\nexport const useGroupMembershipUpdate = ({ groupId }: { groupId: number | string }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const groupRequestArgs = getGroupRequestArgs({ groupId })\n const groupsRequestArgs = getGroupsRequestArgs()\n const groupQueryKey = getRequestQueryKey(groupRequestArgs)\n\n const enrichGroupMembership = (\n membership: Partial<GroupMembership>\n ): Partial<GroupMembership> => {\n const cachedGroup =\n queryClient.getQueryData<ApiResource<GroupResourceWithMembership>>(groupQueryKey)\n const currentOptions = cachedGroup?.data.myGroupMembership?.notificationLevelOptions ?? []\n const { notificationLevel } = membership\n const selectedOption = notificationLevel\n ? currentOptions.find(o => o.value === notificationLevel)\n : undefined\n const notificationLevelDescription =\n membership.notificationLevelDescription ?? selectedOption?.description\n\n return {\n ...membership,\n notificationLevelDescription,\n ...(notificationLevel && {\n notificationLevelOptions: currentOptions.map(o => ({\n ...o,\n enabled: o.value === notificationLevel,\n })),\n }),\n }\n }\n\n const updateGroupsMembershipCache = (membership: Partial<GroupMembership>) => {\n queryClient.setQueryData<GroupsQueryData>(getRequestQueryKey(groupsRequestArgs), prev =>\n updateRecordInPagesData({\n data: prev,\n record: { id: groupId } as GroupResourceWithMembership,\n processRecord: (_record, current) => merge({}, current, { myGroupMembership: membership }),\n })\n )\n }\n\n const updateGroupMembershipCache = (membership: Partial<GroupMembership>) => {\n queryClient.setQueryData<ApiResource<GroupResourceWithMembership>>(groupQueryKey, groupData => {\n if (!groupData?.data.myGroupMembership) return groupData\n return merge({}, groupData, { data: { myGroupMembership: membership } })\n })\n }\n\n return useMutation({\n throwOnError: true,\n onMutate: membership => {\n const enriched = enrichGroupMembership(membership)\n updateGroupsMembershipCache(enriched)\n updateGroupMembershipCache(enriched)\n },\n onSuccess: response => {\n const enriched = enrichGroupMembership(response.data)\n updateGroupsMembershipCache(enriched)\n updateGroupMembershipCache(enriched)\n\n // Updating conversations without access to the current filters\n // is a hard itch to scratch so we just need to refetch.\n queryClient.invalidateQueries({ queryKey: ['/me/conversations'] })\n },\n mutationFn: (membership: Partial<GroupMembership>) => {\n return apiClient.chat\n .patch<ApiResource<GroupMembership>>({\n url: `/me/groups/${groupId}/my_group_membership`,\n data: {\n data: {\n type: 'GroupMembership',\n attributes: {\n ...(membership.notificationLevel !== undefined && {\n notification_level: membership.notificationLevel,\n }),\n },\n },\n },\n })\n .catch(throwResponseError)\n },\n })\n}\n"]}
@@ -3,12 +3,12 @@ import { useNavigation } from '@react-navigation/native';
3
3
  import React, { useCallback, useEffect } from 'react';
4
4
  import { FlatList, Platform, StyleSheet, View } from 'react-native';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
- import { Badge, Heading, Icon, Text } from '../components';
7
- import { HeaderTextButton } from '../components/display/platform_modal_header_buttons';
8
- import { useTheme } from '../hooks';
9
- import { isDefined } from '../types';
10
6
  import { useGroups } from './notification_settings/hooks/groups';
11
7
  import { useChatTypes } from './preferred_app/hooks/use_chat_types';
8
+ import { Badge, Heading, Icon, Text } from '@/components';
9
+ import { HeaderTextButton } from '@/components/display/platform_modal_header_buttons';
10
+ import { useTheme } from '@/hooks';
11
+ import { isDefined } from '@/types';
12
12
  // =========================================
13
13
  // ====== Factory Constants & Types ========
14
14
  // =========================================