@planningcenter/chat-react-native 3.42.3-qa-staging.0 → 3.42.3-qa-staging.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 (694) hide show
  1. package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
  2. package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
  3. package/build/components/conversation/attachments/attachment_card.js +3 -7
  4. package/build/components/conversation/attachments/attachment_card.js.map +1 -1
  5. package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +1 -2
  6. package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
  7. package/build/components/conversation/attachments/attachment_deleting_overlay.js +12 -7
  8. package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
  9. package/build/components/conversation/attachments/audio_attachment.d.ts +1 -2
  10. package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
  11. package/build/components/conversation/attachments/audio_attachment.js +6 -23
  12. package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
  13. package/build/components/conversation/attachments/expanded_link.d.ts +1 -2
  14. package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
  15. package/build/components/conversation/attachments/expanded_link.js +2 -8
  16. package/build/components/conversation/attachments/expanded_link.js.map +1 -1
  17. package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -2
  18. package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
  19. package/build/components/conversation/attachments/generic_file_attachment.js +2 -12
  20. package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
  21. package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -2
  22. package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
  23. package/build/components/conversation/attachments/giphy_attachment.js +2 -7
  24. package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
  25. package/build/components/conversation/attachments/image_attachment.d.ts +1 -2
  26. package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
  27. package/build/components/conversation/attachments/image_attachment.js +16 -53
  28. package/build/components/conversation/attachments/image_attachment.js.map +1 -1
  29. package/build/components/conversation/attachments/video_attachment.d.ts +1 -2
  30. package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
  31. package/build/components/conversation/attachments/video_attachment.js +3 -13
  32. package/build/components/conversation/attachments/video_attachment.js.map +1 -1
  33. package/build/components/conversation/conversation_start_banner.d.ts +1 -2
  34. package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
  35. package/build/components/conversation/conversation_start_banner.js +2 -14
  36. package/build/components/conversation/conversation_start_banner.js.map +1 -1
  37. package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
  38. package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
  39. package/build/components/conversation/empty_conversation_blank_state.js +2 -9
  40. package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
  41. package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
  42. package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
  43. package/build/components/conversation/jump_to_bottom_button.js +2 -10
  44. package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
  45. package/build/components/conversation/message.d.ts +1 -2
  46. package/build/components/conversation/message.d.ts.map +1 -1
  47. package/build/components/conversation/message.js +2 -53
  48. package/build/components/conversation/message.js.map +1 -1
  49. package/build/components/conversation/message_attachments.d.ts +1 -2
  50. package/build/components/conversation/message_attachments.d.ts.map +1 -1
  51. package/build/components/conversation/message_attachments.js +17 -21
  52. package/build/components/conversation/message_attachments.js.map +1 -1
  53. package/build/components/conversation/message_form/message_form_attachment_file.d.ts +1 -2
  54. package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
  55. package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
  56. package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
  57. package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -2
  58. package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
  59. package/build/components/conversation/message_form/message_form_attachment_image.js +2 -2
  60. package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
  61. package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -2
  62. package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
  63. package/build/components/conversation/message_form/message_form_attachment_video.js +2 -2
  64. package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
  65. package/build/components/conversation/message_form.d.ts +5 -6
  66. package/build/components/conversation/message_form.d.ts.map +1 -1
  67. package/build/components/conversation/message_form.js +20 -82
  68. package/build/components/conversation/message_form.js.map +1 -1
  69. package/build/components/conversation/message_markdown.d.ts +1 -2
  70. package/build/components/conversation/message_markdown.d.ts.map +1 -1
  71. package/build/components/conversation/message_markdown.js +8 -16
  72. package/build/components/conversation/message_markdown.js.map +1 -1
  73. package/build/components/conversation/message_reaction.d.ts +1 -2
  74. package/build/components/conversation/message_reaction.d.ts.map +1 -1
  75. package/build/components/conversation/message_reaction.js +3 -5
  76. package/build/components/conversation/message_reaction.js.map +1 -1
  77. package/build/components/conversation/message_read_receipts.d.ts +1 -2
  78. package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
  79. package/build/components/conversation/message_read_receipts.js +3 -13
  80. package/build/components/conversation/message_read_receipts.js.map +1 -1
  81. package/build/components/conversation/messages_disabled_banners.d.ts +7 -3
  82. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  83. package/build/components/conversation/messages_disabled_banners.js +11 -11
  84. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  85. package/build/components/conversation/reply_connectors.d.ts +2 -2
  86. package/build/components/conversation/reply_connectors.d.ts.map +1 -1
  87. package/build/components/conversation/reply_connectors.js +18 -50
  88. package/build/components/conversation/reply_connectors.js.map +1 -1
  89. package/build/components/conversation/reply_shadow_message.d.ts +1 -2
  90. package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
  91. package/build/components/conversation/reply_shadow_message.js +16 -46
  92. package/build/components/conversation/reply_shadow_message.js.map +1 -1
  93. package/build/components/conversation/system_message.d.ts +1 -2
  94. package/build/components/conversation/system_message.d.ts.map +1 -1
  95. package/build/components/conversation/system_message.js +3 -12
  96. package/build/components/conversation/system_message.js.map +1 -1
  97. package/build/components/conversation/typing_indicator.d.ts +1 -2
  98. package/build/components/conversation/typing_indicator.d.ts.map +1 -1
  99. package/build/components/conversation/typing_indicator.js +3 -13
  100. package/build/components/conversation/typing_indicator.js.map +1 -1
  101. package/build/components/conversations/conversation_actions.d.ts +2 -2
  102. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  103. package/build/components/conversations/conversation_actions.js +4 -10
  104. package/build/components/conversations/conversation_actions.js.map +1 -1
  105. package/build/components/conversations/conversation_preview.d.ts +2 -3
  106. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  107. package/build/components/conversations/conversation_preview.js +7 -37
  108. package/build/components/conversations/conversation_preview.js.map +1 -1
  109. package/build/components/conversations/conversations.d.ts +1 -1
  110. package/build/components/conversations/conversations.d.ts.map +1 -1
  111. package/build/components/conversations/conversations.js +16 -17
  112. package/build/components/conversations/conversations.js.map +1 -1
  113. package/build/components/conversations/conversations_blank_state.d.ts +1 -2
  114. package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
  115. package/build/components/conversations/conversations_blank_state.js +2 -12
  116. package/build/components/conversations/conversations_blank_state.js.map +1 -1
  117. package/build/components/conversations/mute_indicator.d.ts +1 -2
  118. package/build/components/conversations/mute_indicator.d.ts.map +1 -1
  119. package/build/components/conversations/mute_indicator.js +2 -2
  120. package/build/components/conversations/mute_indicator.js.map +1 -1
  121. package/build/components/conversations/swipeable_toggle_button.d.ts +1 -2
  122. package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
  123. package/build/components/conversations/swipeable_toggle_button.js +3 -10
  124. package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
  125. package/build/components/conversations/unread_count_badge.d.ts +1 -2
  126. package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
  127. package/build/components/conversations/unread_count_badge.js +3 -7
  128. package/build/components/conversations/unread_count_badge.js.map +1 -1
  129. package/build/components/display/action_button.d.ts +1 -1
  130. package/build/components/display/action_button.d.ts.map +1 -1
  131. package/build/components/display/action_button.js +3 -13
  132. package/build/components/display/action_button.js.map +1 -1
  133. package/build/components/display/adult_requirement_notice.d.ts +1 -2
  134. package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
  135. package/build/components/display/adult_requirement_notice.js +2 -4
  136. package/build/components/display/adult_requirement_notice.js.map +1 -1
  137. package/build/components/display/avatar.d.ts +1 -2
  138. package/build/components/display/avatar.d.ts.map +1 -1
  139. package/build/components/display/avatar.js +2 -7
  140. package/build/components/display/avatar.js.map +1 -1
  141. package/build/components/display/avatar_group.d.ts +1 -2
  142. package/build/components/display/avatar_group.d.ts.map +1 -1
  143. package/build/components/display/avatar_group.js +2 -9
  144. package/build/components/display/avatar_group.js.map +1 -1
  145. package/build/components/display/badge.d.ts +1 -2
  146. package/build/components/display/badge.d.ts.map +1 -1
  147. package/build/components/display/badge.js +6 -37
  148. package/build/components/display/badge.js.map +1 -1
  149. package/build/components/display/banner.d.ts +3 -3
  150. package/build/components/display/banner.d.ts.map +1 -1
  151. package/build/components/display/banner.js +4 -11
  152. package/build/components/display/banner.js.map +1 -1
  153. package/build/components/display/banner_collapsible.d.ts +2 -2
  154. package/build/components/display/banner_collapsible.d.ts.map +1 -1
  155. package/build/components/display/banner_collapsible.js +2 -10
  156. package/build/components/display/banner_collapsible.js.map +1 -1
  157. package/build/components/display/button.d.ts +1 -2
  158. package/build/components/display/button.d.ts.map +1 -1
  159. package/build/components/display/button.js +3 -14
  160. package/build/components/display/button.js.map +1 -1
  161. package/build/components/display/child_notice.d.ts +1 -2
  162. package/build/components/display/child_notice.d.ts.map +1 -1
  163. package/build/components/display/child_notice.js +3 -15
  164. package/build/components/display/child_notice.js.map +1 -1
  165. package/build/components/display/conversation_avatar.d.ts +1 -2
  166. package/build/components/display/conversation_avatar.d.ts.map +1 -1
  167. package/build/components/display/conversation_avatar.js +5 -9
  168. package/build/components/display/conversation_avatar.js.map +1 -1
  169. package/build/components/display/emoji_avatar.d.ts +1 -2
  170. package/build/components/display/emoji_avatar.d.ts.map +1 -1
  171. package/build/components/display/emoji_avatar.js +2 -12
  172. package/build/components/display/emoji_avatar.js.map +1 -1
  173. package/build/components/display/file_attachment_preview.d.ts +1 -1
  174. package/build/components/display/file_attachment_preview.d.ts.map +1 -1
  175. package/build/components/display/file_attachment_preview.js +3 -17
  176. package/build/components/display/file_attachment_preview.js.map +1 -1
  177. package/build/components/display/heading.d.ts +1 -2
  178. package/build/components/display/heading.d.ts.map +1 -1
  179. package/build/components/display/heading.js +2 -4
  180. package/build/components/display/heading.js.map +1 -1
  181. package/build/components/display/icon.d.ts +1 -2
  182. package/build/components/display/icon.d.ts.map +1 -1
  183. package/build/components/display/icon.js +4 -4
  184. package/build/components/display/icon.js.map +1 -1
  185. package/build/components/display/icon_avatar.d.ts +1 -2
  186. package/build/components/display/icon_avatar.d.ts.map +1 -1
  187. package/build/components/display/icon_avatar.js +2 -12
  188. package/build/components/display/icon_avatar.js.map +1 -1
  189. package/build/components/display/icon_button.d.ts +1 -2
  190. package/build/components/display/icon_button.d.ts.map +1 -1
  191. package/build/components/display/icon_button.js +3 -5
  192. package/build/components/display/icon_button.js.map +1 -1
  193. package/build/components/display/image.d.ts +1 -2
  194. package/build/components/display/image.d.ts.map +1 -1
  195. package/build/components/display/image.js +3 -7
  196. package/build/components/display/image.js.map +1 -1
  197. package/build/components/display/image_attachment_preview.d.ts +1 -1
  198. package/build/components/display/image_attachment_preview.d.ts.map +1 -1
  199. package/build/components/display/image_attachment_preview.js +2 -7
  200. package/build/components/display/image_attachment_preview.js.map +1 -1
  201. package/build/components/display/keyboard_view.d.ts +1 -2
  202. package/build/components/display/keyboard_view.d.ts.map +1 -1
  203. package/build/components/display/keyboard_view.js +4 -9
  204. package/build/components/display/keyboard_view.js.map +1 -1
  205. package/build/components/display/person.d.ts +1 -2
  206. package/build/components/display/person.d.ts.map +1 -1
  207. package/build/components/display/person.js +2 -12
  208. package/build/components/display/person.js.map +1 -1
  209. package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
  210. package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
  211. package/build/components/display/platform_modal_header_buttons.js +5 -10
  212. package/build/components/display/platform_modal_header_buttons.js.map +1 -1
  213. package/build/components/display/pressable_row.d.ts +1 -1
  214. package/build/components/display/pressable_row.d.ts.map +1 -1
  215. package/build/components/display/pressable_row.js +2 -7
  216. package/build/components/display/pressable_row.js.map +1 -1
  217. package/build/components/display/spinner.d.ts +1 -2
  218. package/build/components/display/spinner.d.ts.map +1 -1
  219. package/build/components/display/spinner.js +3 -9
  220. package/build/components/display/spinner.js.map +1 -1
  221. package/build/components/display/switch.d.ts +1 -2
  222. package/build/components/display/switch.d.ts.map +1 -1
  223. package/build/components/display/switch.js +2 -2
  224. package/build/components/display/switch.js.map +1 -1
  225. package/build/components/display/tabs.d.ts +1 -1
  226. package/build/components/display/tabs.d.ts.map +1 -1
  227. package/build/components/display/tabs.js +21 -31
  228. package/build/components/display/tabs.js.map +1 -1
  229. package/build/components/display/text.d.ts +1 -2
  230. package/build/components/display/text.d.ts.map +1 -1
  231. package/build/components/display/text.js +2 -4
  232. package/build/components/display/text.js.map +1 -1
  233. package/build/components/display/text_button.d.ts +1 -2
  234. package/build/components/display/text_button.d.ts.map +1 -1
  235. package/build/components/display/text_button.js +3 -8
  236. package/build/components/display/text_button.js.map +1 -1
  237. package/build/components/display/text_inline_button.d.ts +1 -2
  238. package/build/components/display/text_inline_button.d.ts.map +1 -1
  239. package/build/components/display/text_inline_button.js +4 -5
  240. package/build/components/display/text_inline_button.js.map +1 -1
  241. package/build/components/display/text_input.d.ts +1 -1
  242. package/build/components/display/text_input.d.ts.map +1 -1
  243. package/build/components/display/text_input.js +2 -1
  244. package/build/components/display/text_input.js.map +1 -1
  245. package/build/components/display/toggle_button.d.ts +1 -2
  246. package/build/components/display/toggle_button.d.ts.map +1 -1
  247. package/build/components/display/toggle_button.js +3 -9
  248. package/build/components/display/toggle_button.js.map +1 -1
  249. package/build/components/display/video_attachment_preview.d.ts +1 -1
  250. package/build/components/display/video_attachment_preview.d.ts.map +1 -1
  251. package/build/components/display/video_attachment_preview.js +3 -20
  252. package/build/components/display/video_attachment_preview.js.map +1 -1
  253. package/build/components/group_conversation_list.d.ts +1 -1
  254. package/build/components/group_conversation_list.d.ts.map +1 -1
  255. package/build/components/group_conversation_list.js +4 -14
  256. package/build/components/group_conversation_list.js.map +1 -1
  257. package/build/components/page/component_error_boundary.d.ts +2 -2
  258. package/build/components/page/component_error_boundary.d.ts.map +1 -1
  259. package/build/components/page/component_error_boundary.js +2 -4
  260. package/build/components/page/component_error_boundary.js.map +1 -1
  261. package/build/components/page/loading.d.ts +1 -2
  262. package/build/components/page/loading.d.ts.map +1 -1
  263. package/build/components/page/loading.js +2 -4
  264. package/build/components/page/loading.js.map +1 -1
  265. package/build/components/page/page_error_boundary.d.ts +2 -2
  266. package/build/components/page/page_error_boundary.d.ts.map +1 -1
  267. package/build/components/page/page_error_boundary.js +11 -32
  268. package/build/components/page/page_error_boundary.js.map +1 -1
  269. package/build/components/primitive/avatar_primitive.js +14 -41
  270. package/build/components/primitive/avatar_primitive.js.map +1 -1
  271. package/build/components/primitive/banner_primitive.js +10 -18
  272. package/build/components/primitive/banner_primitive.js.map +1 -1
  273. package/build/components/primitive/blank_state_primitive.js +8 -12
  274. package/build/components/primitive/blank_state_primitive.js.map +1 -1
  275. package/build/components/primitive/form_sheet.d.ts +1 -1
  276. package/build/components/primitive/form_sheet.d.ts.map +1 -1
  277. package/build/components/primitive/form_sheet.js +9 -22
  278. package/build/components/primitive/form_sheet.js.map +1 -1
  279. package/build/components/safe_area_modal.d.ts +1 -1
  280. package/build/components/safe_area_modal.d.ts.map +1 -1
  281. package/build/components/safe_area_modal.js +2 -3
  282. package/build/components/safe_area_modal.js.map +1 -1
  283. package/build/contexts/api_provider.d.ts +1 -2
  284. package/build/contexts/api_provider.d.ts.map +1 -1
  285. package/build/contexts/api_provider.js +3 -5
  286. package/build/contexts/api_provider.js.map +1 -1
  287. package/build/contexts/chat_context.d.ts +2 -1
  288. package/build/contexts/chat_context.d.ts.map +1 -1
  289. package/build/contexts/chat_context.js +9 -2
  290. package/build/contexts/chat_context.js.map +1 -1
  291. package/build/contexts/conversation_context.d.ts +2 -2
  292. package/build/contexts/conversation_context.d.ts.map +1 -1
  293. package/build/contexts/conversation_context.js +3 -2
  294. package/build/contexts/conversation_context.js.map +1 -1
  295. package/build/contexts/conversations_context.d.ts +2 -2
  296. package/build/contexts/conversations_context.d.ts.map +1 -1
  297. package/build/contexts/conversations_context.js +3 -2
  298. package/build/contexts/conversations_context.js.map +1 -1
  299. package/build/contexts/session_context.d.ts +1 -1
  300. package/build/contexts/session_context.d.ts.map +1 -1
  301. package/build/contexts/session_context.js +3 -2
  302. package/build/contexts/session_context.js.map +1 -1
  303. package/build/hooks/direct_messages/find_direct_message_conversation.d.ts +14 -0
  304. package/build/hooks/direct_messages/find_direct_message_conversation.d.ts.map +1 -0
  305. package/build/hooks/direct_messages/find_direct_message_conversation.js +10 -0
  306. package/build/hooks/direct_messages/find_direct_message_conversation.js.map +1 -0
  307. package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts +16 -0
  308. package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts.map +1 -0
  309. package/build/hooks/direct_messages/resolve_message_available_members_link.js +24 -0
  310. package/build/hooks/direct_messages/resolve_message_available_members_link.js.map +1 -0
  311. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.d.ts.map +1 -1
  312. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js +1 -8
  313. package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js.map +1 -1
  314. package/build/hooks/direct_messages/use_message_available_members.d.ts +6 -0
  315. package/build/hooks/direct_messages/use_message_available_members.d.ts.map +1 -0
  316. package/build/hooks/direct_messages/use_message_available_members.js +40 -0
  317. package/build/hooks/direct_messages/use_message_available_members.js.map +1 -0
  318. package/build/hooks/direct_messages/use_message_available_members_action.d.ts +6 -0
  319. package/build/hooks/direct_messages/use_message_available_members_action.d.ts.map +1 -0
  320. package/build/hooks/direct_messages/use_message_available_members_action.js +30 -0
  321. package/build/hooks/direct_messages/use_message_available_members_action.js.map +1 -0
  322. package/build/hooks/index.d.ts +1 -1
  323. package/build/hooks/index.d.ts.map +1 -1
  324. package/build/hooks/index.js +1 -1
  325. package/build/hooks/index.js.map +1 -1
  326. package/build/hooks/use_animated_message_background_color.d.ts +2 -2
  327. package/build/hooks/use_conversation.d.ts +1 -1
  328. package/build/hooks/use_conversation.d.ts.map +1 -1
  329. package/build/hooks/use_conversation.js +1 -0
  330. package/build/hooks/use_conversation.js.map +1 -1
  331. package/build/hooks/use_conversation_membership.d.ts +1 -1
  332. package/build/hooks/use_conversation_membership.d.ts.map +1 -1
  333. package/build/hooks/use_conversations_actions.d.ts +36 -36
  334. package/build/hooks/use_current_person.d.ts.map +1 -1
  335. package/build/hooks/use_current_person.js +1 -0
  336. package/build/hooks/use_current_person.js.map +1 -1
  337. package/build/hooks/use_direct_messages_eligible.d.ts +2 -0
  338. package/build/hooks/use_direct_messages_eligible.d.ts.map +1 -0
  339. package/build/hooks/use_direct_messages_eligible.js +9 -0
  340. package/build/hooks/use_direct_messages_eligible.js.map +1 -0
  341. package/build/hooks/use_features.d.ts +0 -1
  342. package/build/hooks/use_features.d.ts.map +1 -1
  343. package/build/hooks/use_features.js +0 -1
  344. package/build/hooks/use_features.js.map +1 -1
  345. package/build/hooks/use_person_settings.d.ts +1 -1
  346. package/build/index.d.ts +2 -1
  347. package/build/index.d.ts.map +1 -1
  348. package/build/index.js.map +1 -1
  349. package/build/navigation/chat_access_gate.d.ts +2 -2
  350. package/build/navigation/chat_access_gate.d.ts.map +1 -1
  351. package/build/navigation/chat_access_gate.js +6 -5
  352. package/build/navigation/chat_access_gate.js.map +1 -1
  353. package/build/navigation/index.d.ts +37 -39
  354. package/build/navigation/index.d.ts.map +1 -1
  355. package/build/navigation/index.js +21 -23
  356. package/build/navigation/index.js.map +1 -1
  357. package/build/navigation/screenLayout.d.ts +2 -2
  358. package/build/navigation/screenLayout.d.ts.map +1 -1
  359. package/build/navigation/screenLayout.js +3 -9
  360. package/build/navigation/screenLayout.js.map +1 -1
  361. package/build/polyfills/events/EventTarget.d.ts +1 -1
  362. package/build/polyfills/events/EventTarget.d.ts.map +1 -1
  363. package/build/polyfills/events/EventTarget.js.map +1 -1
  364. package/build/screens/age_check/age_check_required_screen.d.ts +1 -2
  365. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  366. package/build/screens/age_check/age_check_required_screen.js +3 -46
  367. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  368. package/build/screens/age_check/age_check_underage_screen.d.ts +1 -2
  369. package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
  370. package/build/screens/age_check/age_check_underage_screen.js +2 -25
  371. package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
  372. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +1 -2
  373. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
  374. package/build/screens/age_check/components/age_check_select_birthdate_modal.js +6 -25
  375. package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
  376. package/build/screens/attachment_actions/attachment_actions_screen.d.ts +1 -2
  377. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  378. package/build/screens/attachment_actions/attachment_actions_screen.js +3 -5
  379. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  380. package/build/screens/avatar_picker/avatar_picker_screen.d.ts +1 -2
  381. package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
  382. package/build/screens/avatar_picker/avatar_picker_screen.js +9 -36
  383. package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
  384. package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
  385. package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
  386. package/build/screens/avatar_picker/avatar_preview.js +5 -9
  387. package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
  388. package/build/screens/avatar_picker/color_picker.d.ts +1 -2
  389. package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
  390. package/build/screens/avatar_picker/color_picker.js +4 -5
  391. package/build/screens/avatar_picker/color_picker.js.map +1 -1
  392. package/build/screens/avatar_picker/emoji_tab.d.ts +1 -2
  393. package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
  394. package/build/screens/avatar_picker/emoji_tab.js +12 -13
  395. package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
  396. package/build/screens/avatar_picker/icon_grid.d.ts +1 -2
  397. package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
  398. package/build/screens/avatar_picker/icon_grid.js +4 -5
  399. package/build/screens/avatar_picker/icon_grid.js.map +1 -1
  400. package/build/screens/avatar_picker/upload_tab.d.ts +1 -2
  401. package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
  402. package/build/screens/avatar_picker/upload_tab.js +3 -4
  403. package/build/screens/avatar_picker/upload_tab.js.map +1 -1
  404. package/build/screens/bug_report_screen.d.ts +1 -2
  405. package/build/screens/bug_report_screen.d.ts.map +1 -1
  406. package/build/screens/bug_report_screen.js +11 -117
  407. package/build/screens/bug_report_screen.js.map +1 -1
  408. package/build/screens/conversation/message_read_receipts_screen.d.ts +1 -2
  409. package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
  410. package/build/screens/conversation/message_read_receipts_screen.js +4 -20
  411. package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
  412. package/build/screens/conversation_details_screen.d.ts +1 -2
  413. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  414. package/build/screens/conversation_details_screen.js +43 -106
  415. package/build/screens/conversation_details_screen.js.map +1 -1
  416. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
  417. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
  418. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +3 -9
  419. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
  420. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
  421. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
  422. package/build/screens/conversation_filter_recipients/components/header_row.js +2 -12
  423. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
  424. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -2
  425. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  426. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +20 -44
  427. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  428. package/build/screens/conversation_filters/components/conversation_filters.d.ts +1 -2
  429. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  430. package/build/screens/conversation_filters/components/conversation_filters.js +13 -14
  431. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  432. package/build/screens/conversation_filters/components/rows.d.ts +6 -6
  433. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  434. package/build/screens/conversation_filters/components/rows.js +7 -34
  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 +2 -1
  439. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  440. package/build/screens/conversation_filters/group_filters.d.ts +1 -2
  441. package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
  442. package/build/screens/conversation_filters/group_filters.js +2 -2
  443. package/build/screens/conversation_filters/group_filters.js.map +1 -1
  444. package/build/screens/conversation_filters/team_filters.d.ts +1 -2
  445. package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
  446. package/build/screens/conversation_filters/team_filters.js +2 -2
  447. package/build/screens/conversation_filters/team_filters.js.map +1 -1
  448. package/build/screens/conversation_filters_screen.d.ts +1 -2
  449. package/build/screens/conversation_filters_screen.d.ts.map +1 -1
  450. package/build/screens/conversation_filters_screen.js +4 -16
  451. package/build/screens/conversation_filters_screen.js.map +1 -1
  452. package/build/screens/conversation_new/components/avatar_selection_row.d.ts +2 -3
  453. package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
  454. package/build/screens/conversation_new/components/avatar_selection_row.js +6 -16
  455. package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
  456. package/build/screens/conversation_new/components/filter_by_plan.d.ts +3 -4
  457. package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
  458. package/build/screens/conversation_new/components/filter_by_plan.js +22 -46
  459. package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
  460. package/build/screens/conversation_new/components/form_list.d.ts +2 -3
  461. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  462. package/build/screens/conversation_new/components/form_list.js +4 -6
  463. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  464. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +1 -2
  465. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
  466. package/build/screens/conversation_new/components/gender_filter_toggle.js +4 -20
  467. package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
  468. package/build/screens/conversation_new/components/groups_form.d.ts +1 -2
  469. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  470. package/build/screens/conversation_new/components/groups_form.js +4 -30
  471. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  472. package/build/screens/conversation_new/components/services_form.d.ts +1 -2
  473. package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
  474. package/build/screens/conversation_new/components/services_form.js +27 -61
  475. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  476. package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
  477. package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
  478. package/build/screens/conversation_new/components/source_app_error_card.js +2 -3
  479. package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
  480. package/build/screens/conversation_new/conversation_new_screen.d.ts +1 -2
  481. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  482. package/build/screens/conversation_new/conversation_new_screen.js +4 -4
  483. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  484. package/build/screens/conversation_notification_level_select_screen.d.ts +1 -2
  485. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
  486. package/build/screens/conversation_notification_level_select_screen.js +4 -6
  487. package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
  488. package/build/screens/conversation_screen.d.ts +2 -3
  489. package/build/screens/conversation_screen.d.ts.map +1 -1
  490. package/build/screens/conversation_screen.js +26 -65
  491. package/build/screens/conversation_screen.js.map +1 -1
  492. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
  493. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
  494. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +2 -1
  495. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
  496. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +1 -2
  497. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
  498. package/build/screens/conversation_select_recipients/components/recipient_link_row.js +2 -15
  499. package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
  500. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -2
  501. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
  502. package/build/screens/conversation_select_recipients/components/restricted_group_row.js +2 -14
  503. package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
  504. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
  505. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
  506. package/build/screens/conversation_select_recipients/components/team_recipient_row.js +2 -1
  507. package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
  508. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
  509. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
  510. package/build/screens/conversation_select_recipients/components/view_more_link_row.js +2 -5
  511. package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
  512. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +1 -2
  513. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  514. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -11
  515. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  516. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
  517. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  518. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +24 -85
  519. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  520. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +1 -2
  521. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  522. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +7 -14
  523. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  524. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +1 -2
  525. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  526. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +15 -18
  527. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  528. package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -0
  529. package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -1
  530. package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -1
  531. package/build/screens/conversation_select_type_screen.d.ts +1 -2
  532. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  533. package/build/screens/conversation_select_type_screen.js +7 -17
  534. package/build/screens/conversation_select_type_screen.js.map +1 -1
  535. package/build/screens/conversations/components/chat_group_badge.d.ts +1 -2
  536. package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
  537. package/build/screens/conversations/components/chat_group_badge.js +3 -4
  538. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  539. package/build/screens/conversations/components/list_header_action_button.d.ts +1 -2
  540. package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
  541. package/build/screens/conversations/components/list_header_action_button.js +3 -5
  542. package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
  543. package/build/screens/conversations/components/list_header_component.d.ts +1 -2
  544. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  545. package/build/screens/conversations/components/list_header_component.js +22 -45
  546. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  547. package/build/screens/conversations/conversations_screen.d.ts +1 -2
  548. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  549. package/build/screens/conversations/conversations_screen.js +2 -6
  550. package/build/screens/conversations/conversations_screen.js.map +1 -1
  551. package/build/screens/design_system_screen.d.ts +1 -2
  552. package/build/screens/design_system_screen.d.ts.map +1 -1
  553. package/build/screens/design_system_screen.js +35 -558
  554. package/build/screens/design_system_screen.js.map +1 -1
  555. package/build/screens/get_help_screen.d.ts +1 -1
  556. package/build/screens/get_help_screen.d.ts.map +1 -1
  557. package/build/screens/get_help_screen.js +4 -25
  558. package/build/screens/get_help_screen.js.map +1 -1
  559. package/build/screens/group_notification_level_select_screen.d.ts +1 -2
  560. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
  561. package/build/screens/group_notification_level_select_screen.js +2 -4
  562. package/build/screens/group_notification_level_select_screen.js.map +1 -1
  563. package/build/screens/group_notification_settings_screen.d.ts +1 -2
  564. package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
  565. package/build/screens/group_notification_settings_screen.js +3 -25
  566. package/build/screens/group_notification_settings_screen.js.map +1 -1
  567. package/build/screens/message_actions_screen.d.ts +1 -2
  568. package/build/screens/message_actions_screen.d.ts.map +1 -1
  569. package/build/screens/message_actions_screen.js +12 -28
  570. package/build/screens/message_actions_screen.js.map +1 -1
  571. package/build/screens/message_report/components/message_preview.d.ts +1 -2
  572. package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
  573. package/build/screens/message_report/components/message_preview.js +2 -22
  574. package/build/screens/message_report/components/message_preview.js.map +1 -1
  575. package/build/screens/message_report/components/report_reason_list.d.ts +1 -2
  576. package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
  577. package/build/screens/message_report/components/report_reason_list.js +4 -13
  578. package/build/screens/message_report/components/report_reason_list.js.map +1 -1
  579. package/build/screens/message_report_screen.d.ts +1 -2
  580. package/build/screens/message_report_screen.d.ts.map +1 -1
  581. package/build/screens/message_report_screen.js +9 -61
  582. package/build/screens/message_report_screen.js.map +1 -1
  583. package/build/screens/not_found.d.ts +1 -2
  584. package/build/screens/not_found.d.ts.map +1 -1
  585. package/build/screens/not_found.js +2 -5
  586. package/build/screens/not_found.js.map +1 -1
  587. package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
  588. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  589. package/build/screens/notification_settings_screen.d.ts +1 -2
  590. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  591. package/build/screens/notification_settings_screen.js +28 -66
  592. package/build/screens/notification_settings_screen.js.map +1 -1
  593. package/build/screens/preferred_app_selection_screen.d.ts +1 -2
  594. package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
  595. package/build/screens/preferred_app_selection_screen.js +3 -21
  596. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  597. package/build/screens/reactions_screen.d.ts +1 -2
  598. package/build/screens/reactions_screen.d.ts.map +1 -1
  599. package/build/screens/reactions_screen.js +7 -19
  600. package/build/screens/reactions_screen.js.map +1 -1
  601. package/build/screens/send_giphy_screen.d.ts +1 -2
  602. package/build/screens/send_giphy_screen.d.ts.map +1 -1
  603. package/build/screens/send_giphy_screen.js +5 -31
  604. package/build/screens/send_giphy_screen.js.map +1 -1
  605. package/build/screens/settings_screen.d.ts +1 -2
  606. package/build/screens/settings_screen.d.ts.map +1 -1
  607. package/build/screens/settings_screen.js +6 -28
  608. package/build/screens/settings_screen.js.map +1 -1
  609. package/build/screens/system_message_people_screen.d.ts +1 -2
  610. package/build/screens/system_message_people_screen.d.ts.map +1 -1
  611. package/build/screens/system_message_people_screen.js +4 -10
  612. package/build/screens/system_message_people_screen.js.map +1 -1
  613. package/build/screens/team_conversation_screen.d.ts +1 -1
  614. package/build/screens/team_conversation_screen.d.ts.map +1 -1
  615. package/build/screens/team_conversation_screen.js +4 -12
  616. package/build/screens/team_conversation_screen.js.map +1 -1
  617. package/build/types/resources/direct_message_candidate.d.ts +1 -0
  618. package/build/types/resources/direct_message_candidate.d.ts.map +1 -1
  619. package/build/types/resources/direct_message_candidate.js.map +1 -1
  620. package/build/types/resources/member.d.ts +1 -0
  621. package/build/types/resources/member.d.ts.map +1 -1
  622. package/build/types/resources/member.js.map +1 -1
  623. package/build/types/resources/member_ability.d.ts +1 -0
  624. package/build/types/resources/member_ability.d.ts.map +1 -1
  625. package/build/types/resources/member_ability.js.map +1 -1
  626. package/build/types/resources/person.d.ts +1 -0
  627. package/build/types/resources/person.d.ts.map +1 -1
  628. package/build/types/resources/person.js.map +1 -1
  629. package/build/utils/index.d.ts +1 -0
  630. package/build/utils/index.d.ts.map +1 -1
  631. package/build/utils/index.js +1 -0
  632. package/build/utils/index.js.map +1 -1
  633. package/build/utils/liquid_glass.d.ts +3 -0
  634. package/build/utils/liquid_glass.d.ts.map +1 -0
  635. package/build/utils/liquid_glass.js +9 -0
  636. package/build/utils/liquid_glass.js.map +1 -0
  637. package/build/utils/sha_256.js.map +1 -1
  638. package/build/utils/system_messages.d.ts +1 -1
  639. package/build/utils/system_messages.d.ts.map +1 -1
  640. package/build/utils/system_messages.js.map +1 -1
  641. package/build/utils/theme.d.ts +2 -2
  642. package/build/utils/theme.d.ts.map +1 -1
  643. package/build/utils/theme.js +1 -1
  644. package/build/utils/theme.js.map +1 -1
  645. package/package.json +12 -12
  646. package/src/__tests__/hooks/resolve_message_available_members_link.test.ts +72 -0
  647. package/src/__tests__/hooks/use_attachment_uploader.test.tsx +1 -0
  648. package/src/__tests__/hooks/use_direct_messages_eligible.test.tsx +77 -0
  649. package/src/__tests__/hooks/use_font_scale.test.ts +7 -3
  650. package/src/__tests__/utils/liquid_glass.ts +40 -0
  651. package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
  652. package/src/__tests__/utils/system_messages.ts +1 -1
  653. package/src/__tests__/utils/uri.ts +8 -50
  654. package/src/__utils__/handlers.ts +5 -6
  655. package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +10 -3
  656. package/src/components/conversation/messages_disabled_banners.tsx +31 -4
  657. package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
  658. package/src/components/page/__tests__/error_boundary.test.tsx +6 -2
  659. package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
  660. package/src/contexts/chat_context.tsx +8 -0
  661. package/src/hooks/direct_messages/find_direct_message_conversation.ts +16 -0
  662. package/src/hooks/direct_messages/resolve_message_available_members_link.ts +42 -0
  663. package/src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts +2 -11
  664. package/src/hooks/direct_messages/use_message_available_members.ts +65 -0
  665. package/src/hooks/direct_messages/use_message_available_members_action.ts +34 -0
  666. package/src/hooks/index.ts +1 -1
  667. package/src/hooks/use_conversation.ts +1 -0
  668. package/src/hooks/use_current_person.ts +1 -0
  669. package/src/hooks/use_direct_messages_eligible.ts +11 -0
  670. package/src/hooks/use_features.ts +0 -1
  671. package/src/index.tsx +2 -1
  672. package/src/navigation/index.tsx +2 -2
  673. package/src/polyfills/events/EventTarget.ts +1 -1
  674. package/src/screens/conversation_filters/components/conversation_filters.tsx +3 -3
  675. package/src/screens/conversation_screen.tsx +9 -1
  676. package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +18 -4
  677. package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -0
  678. package/src/screens/conversation_select_type_screen.tsx +4 -7
  679. package/src/screens/conversations/components/list_header_component.tsx +3 -3
  680. package/src/screens/settings_screen.tsx +3 -3
  681. package/src/types/resources/direct_message_candidate.ts +5 -0
  682. package/src/types/resources/member.ts +1 -0
  683. package/src/types/resources/member_ability.ts +1 -0
  684. package/src/types/resources/person.ts +1 -0
  685. package/src/utils/index.ts +1 -0
  686. package/src/utils/liquid_glass.ts +12 -0
  687. package/src/utils/sha_256.ts +24 -24
  688. package/src/utils/system_messages.ts +1 -1
  689. package/src/utils/theme.ts +3 -8
  690. package/build/hooks/use_direct_messages_enabled.d.ts +0 -2
  691. package/build/hooks/use_direct_messages_enabled.d.ts.map +0 -1
  692. package/build/hooks/use_direct_messages_enabled.js +0 -16
  693. package/build/hooks/use_direct_messages_enabled.js.map +0 -1
  694. package/src/hooks/use_direct_messages_enabled.ts +0 -23
@@ -1,5 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { useNavigation } from '@react-navigation/native';
2
- import React, { useEffect } from 'react';
3
+ import { useEffect } from 'react';
3
4
  import { ScrollView, StyleSheet, View } from 'react-native';
4
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
6
  import { Button, Heading } from '../../components';
@@ -29,7 +30,7 @@ export const ConversationNewEntryScreen = ({ route }) => {
29
30
  }
30
31
  }, [entryMode, navigation, route.params]);
31
32
  if (entryMode !== 'select_type')
32
- return <DefaultLoading />;
33
+ return _jsx(DefaultLoading, {});
33
34
  const handleGroupPress = () => {
34
35
  Haptic.impactLight();
35
36
  navigation.navigate('ConversationSelectGroupRecipients', route.params);
@@ -38,15 +39,7 @@ export const ConversationNewEntryScreen = ({ route }) => {
38
39
  Haptic.impactLight();
39
40
  navigation.navigate('ConversationSelectTeamsILeadRecipients', route.params);
40
41
  };
41
- return (<ScrollView contentContainerStyle={styles.contentContainer}>
42
- <View style={styles.header}>
43
- <Heading variant="h2">Start a conversation by</Heading>
44
- </View>
45
- <View style={styles.actions}>
46
- <Button title="Group" onPress={handleGroupPress} size="lg" variant="outline" accessibilityHint="Opens group selection screen"/>
47
- <Button title="Team" onPress={handleTeamPress} size="lg" variant="outline" accessibilityHint="Opens team selection screen"/>
48
- </View>
49
- </ScrollView>);
42
+ return (_jsxs(ScrollView, { contentContainerStyle: styles.contentContainer, children: [_jsx(View, { style: styles.header, children: _jsx(Heading, { variant: "h2", children: "Start a conversation by" }) }), _jsxs(View, { style: styles.actions, children: [_jsx(Button, { title: "Group", onPress: handleGroupPress, size: "lg", variant: "outline", accessibilityHint: "Opens group selection screen" }), _jsx(Button, { title: "Team", onPress: handleTeamPress, size: "lg", variant: "outline", accessibilityHint: "Opens team selection screen" })] })] }));
50
43
  };
51
44
  const useStyles = () => {
52
45
  const { bottom } = useSafeAreaInsets();
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_new_entry_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAA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AE;YACN,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,QAAQ;SACrB;QACD,OAAO,EAAE;YACP,GAAG,EAAE,EAAE;YACP,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,QAAQ;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport type { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { useEffect } from 'react'\nimport { ScrollView, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button, Heading } from '../../components'\nimport { DefaultLoading } from '../../components/page/loading'\nimport { useNewConversationEntry } from '../../hooks/use_new_conversation_entry'\nimport { Haptic } from '../../utils/native_adapters'\nimport type {\n ConversationSelectRecipientsParams,\n ConversationSelectRecipientsScreenProps,\n} from './types/screen_props'\n\ntype NewConversationStackParamList = {\n ConversationNewEntry: ConversationSelectRecipientsParams | undefined\n ConversationSelectGroupRecipients: ConversationSelectRecipientsParams | undefined\n ConversationSelectTeamsILeadRecipients: ConversationSelectRecipientsParams | undefined\n ConversationSelectDirectMessageRecipients: ConversationSelectRecipientsParams | undefined\n}\n\nexport const ConversationNewEntryScreen = ({ route }: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation<NativeStackNavigationProp<NewConversationStackParamList>>()\n const entryMode = useNewConversationEntry()\n\n useEffect(() => {\n if (entryMode === 'groups') {\n navigation.replace('ConversationSelectGroupRecipients', route.params)\n return\n }\n\n if (entryMode === 'teams') {\n navigation.replace('ConversationSelectTeamsILeadRecipients', route.params)\n return\n }\n\n if (entryMode === 'direct_message') {\n navigation.replace('ConversationSelectDirectMessageRecipients', route.params)\n return\n }\n\n if (entryMode === 'none') {\n navigation.goBack()\n return\n }\n }, [entryMode, navigation, route.params])\n\n if (entryMode !== 'select_type') return <DefaultLoading />\n\n const handleGroupPress = () => {\n Haptic.impactLight()\n navigation.navigate('ConversationSelectGroupRecipients', route.params)\n }\n\n const handleTeamPress = () => {\n Haptic.impactLight()\n navigation.navigate('ConversationSelectTeamsILeadRecipients', route.params)\n }\n\n return (\n <ScrollView contentContainerStyle={styles.contentContainer}>\n <View style={styles.header}>\n <Heading variant=\"h2\">Start a conversation by</Heading>\n </View>\n <View style={styles.actions}>\n <Button\n title=\"Group\"\n onPress={handleGroupPress}\n size=\"lg\"\n variant=\"outline\"\n accessibilityHint=\"Opens group selection screen\"\n />\n <Button\n title=\"Team\"\n onPress={handleTeamPress}\n size=\"lg\"\n variant=\"outline\"\n accessibilityHint=\"Opens team selection screen\"\n />\n </View>\n </ScrollView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n flexGrow: 1,\n padding: 16,\n paddingBottom: 16 + bottom,\n justifyContent: 'center',\n },\n header: {\n marginBottom: 24,\n alignItems: 'center',\n },\n actions: {\n gap: 12,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_new_entry_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAapD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAAE,KAAK,EAA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B,EAAE,MAAM,CAAC,gBAAgB,aACxD,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,YACxB,KAAC,OAAO,IAAC,OAAO,EAAC,IAAI,wCAAkC,GAClD,EACP,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,aACzB,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,EACjB,iBAAiB,EAAC,8BAA8B,GAChD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE,eAAe,EACxB,IAAI,EAAC,IAAI,EACT,OAAO,EAAC,SAAS,EACjB,iBAAiB,EAAC,6BAA6B,GAC/C,IACG,IACI,CACd,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,EAAE,GAAG,MAAM;YAC1B,cAAc,EAAE,QAAQ;SACzB;QACD,MAAM,EAAE;YACN,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,QAAQ;SACrB;QACD,OAAO,EAAE;YACP,GAAG,EAAE,EAAE;YACP,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,QAAQ;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport type { NativeStackNavigationProp } from '@react-navigation/native-stack'\nimport React, { useEffect } from 'react'\nimport { ScrollView, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button, Heading } from '../../components'\nimport { DefaultLoading } from '../../components/page/loading'\nimport { useNewConversationEntry } from '../../hooks/use_new_conversation_entry'\nimport { Haptic } from '../../utils/native_adapters'\nimport type {\n ConversationSelectRecipientsParams,\n ConversationSelectRecipientsScreenProps,\n} from './types/screen_props'\n\ntype NewConversationStackParamList = {\n ConversationNewEntry: ConversationSelectRecipientsParams | undefined\n ConversationSelectGroupRecipients: ConversationSelectRecipientsParams | undefined\n ConversationSelectTeamsILeadRecipients: ConversationSelectRecipientsParams | undefined\n ConversationSelectDirectMessageRecipients: ConversationSelectRecipientsParams | undefined\n}\n\nexport const ConversationNewEntryScreen = ({ route }: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation<NativeStackNavigationProp<NewConversationStackParamList>>()\n const entryMode = useNewConversationEntry()\n\n useEffect(() => {\n if (entryMode === 'groups') {\n navigation.replace('ConversationSelectGroupRecipients', route.params)\n return\n }\n\n if (entryMode === 'teams') {\n navigation.replace('ConversationSelectTeamsILeadRecipients', route.params)\n return\n }\n\n if (entryMode === 'direct_message') {\n navigation.replace('ConversationSelectDirectMessageRecipients', route.params)\n return\n }\n\n if (entryMode === 'none') {\n navigation.goBack()\n return\n }\n }, [entryMode, navigation, route.params])\n\n if (entryMode !== 'select_type') return <DefaultLoading />\n\n const handleGroupPress = () => {\n Haptic.impactLight()\n navigation.navigate('ConversationSelectGroupRecipients', route.params)\n }\n\n const handleTeamPress = () => {\n Haptic.impactLight()\n navigation.navigate('ConversationSelectTeamsILeadRecipients', route.params)\n }\n\n return (\n <ScrollView contentContainerStyle={styles.contentContainer}>\n <View style={styles.header}>\n <Heading variant=\"h2\">Start a conversation by</Heading>\n </View>\n <View style={styles.actions}>\n <Button\n title=\"Group\"\n onPress={handleGroupPress}\n size=\"lg\"\n variant=\"outline\"\n accessibilityHint=\"Opens group selection screen\"\n />\n <Button\n title=\"Team\"\n onPress={handleTeamPress}\n size=\"lg\"\n variant=\"outline\"\n accessibilityHint=\"Opens team selection screen\"\n />\n </View>\n </ScrollView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n flexGrow: 1,\n padding: 16,\n paddingBottom: 16 + bottom,\n justifyContent: 'center',\n },\n header: {\n marginBottom: 24,\n alignItems: 'center',\n },\n actions: {\n gap: 12,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n })\n}\n"]}
@@ -1,3 +1,3 @@
1
1
  import { ConversationSelectRecipientsScreenProps } from './types/screen_props';
2
- export declare function ConversationSelectDirectMessageRecipientsScreen(_props: ConversationSelectRecipientsScreenProps): import("react").JSX.Element;
2
+ export declare function ConversationSelectDirectMessageRecipientsScreen({ route, }: ConversationSelectRecipientsScreenProps): import("react/jsx-runtime").JSX.Element;
3
3
  //# sourceMappingURL=conversation_select_direct_message_recipients_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_select_direct_message_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAI9E,wBAAgB,+CAA+C,CAC7D,MAAM,EAAE,uCAAuC,+BA2GhD"}
1
+ {"version":3,"file":"conversation_select_direct_message_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAI9E,wBAAgB,+CAA+C,CAAC,EAC9D,KAAK,GACN,EAAE,uCAAuC,2CAwHzC"}
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
2
  import { PlatformPressable } from '@react-navigation/elements';
2
3
  import { StackActions, useNavigation } from '@react-navigation/native';
3
4
  import { useEffect, useRef, useState } from 'react';
@@ -13,13 +14,24 @@ import { useDirectMessageConversationValidate } from '../../hooks/direct_message
13
14
  import { useFindOrCreateDirectMessageConversation } from '../../hooks/direct_messages/use_find_or_create_direct_message_conversation';
14
15
  import { availableFeatures, useFeatures } from '../../hooks/use_features';
15
16
  const MAX_RECIPIENTS = 9;
16
- export function ConversationSelectDirectMessageRecipientsScreen(_props) {
17
+ export function ConversationSelectDirectMessageRecipientsScreen({ route, }) {
18
+ const { preselected_people = [] } = route.params ?? {};
17
19
  const styles = useStyles();
18
20
  const navigation = useNavigation();
19
21
  const { featureEnabled } = useFeatures();
20
22
  const [searchTerm, setSearchTerm] = useState('');
21
23
  const [debouncedTerm, setDebouncedTerm] = useState('');
22
- const [selectedPeople, setSelectedPeople] = useState(new Map());
24
+ const [selectedPeople, setSelectedPeople] = useState(() => new Map(preselected_people.map(person => [
25
+ person.id,
26
+ {
27
+ ...person,
28
+ type: 'DirectMessageCandidate',
29
+ groups: [],
30
+ teams: [],
31
+ under_18: false,
32
+ directMessagesDisabled: false,
33
+ },
34
+ ])));
23
35
  const searchInputRef = useRef(null);
24
36
  useEffect(() => {
25
37
  const timer = setTimeout(() => setDebouncedTerm(searchTerm), 200);
@@ -64,43 +76,17 @@ export function ConversationSelectDirectMessageRecipientsScreen(_props) {
64
76
  ? `Open direct message (${selectedPeople.size})`
65
77
  : `Start direct message (${selectedPeople.size})`;
66
78
  })();
67
- return (<KeyboardView>
68
- {isError && (<Banner appearance="error" description="There was an issue starting the conversation. Please try again." style={styles.errorBanner}/>)}
69
- <ToField selectedPeople={selectedPeople} searchTerm={searchTerm} onSearchChange={setSearchTerm} onRemove={removePerson} onClear={() => setSelectedPeople(new Map())} searchInputRef={searchInputRef}/>
70
- <View style={styles.candidateResultsContainer}>
71
- <ComponentErrorBoundary key={debouncedTerm} fallback={<Banner appearance="error" description="Couldn't load people right now. Try again." style={styles.errorBanner}/>}>
72
- <CandidateResults term={debouncedTerm} selectedPeople={selectedPeople} onSelect={selectPerson}/>
73
- </ComponentErrorBoundary>
74
- </View>
75
- <ActionButton title={buttonText} disabled={selectedPeople.size === 0 || validationPending || warnings.length > 0 || isFinding} loading={validationPending || isFinding} onPress={() => findOrCreateConversation(recipientIds)} warnings={warnings}/>
76
- </KeyboardView>);
79
+ return (_jsxs(KeyboardView, { children: [isError && (_jsx(Banner, { appearance: "error", description: "There was an issue starting the conversation. Please try again.", style: styles.errorBanner })), _jsx(ToField, { selectedPeople: selectedPeople, searchTerm: searchTerm, onSearchChange: setSearchTerm, onRemove: removePerson, onClear: () => setSelectedPeople(new Map()), searchInputRef: searchInputRef }), _jsx(View, { style: styles.candidateResultsContainer, children: _jsx(ComponentErrorBoundary, { fallback: _jsx(Banner, { appearance: "error", description: "Couldn't load people right now. Try again.", style: styles.errorBanner }), children: _jsx(CandidateResults, { term: debouncedTerm, selectedPeople: selectedPeople, onSelect: selectPerson }) }, debouncedTerm) }), _jsx(ActionButton, { title: buttonText, disabled: selectedPeople.size === 0 || validationPending || warnings.length > 0 || isFinding, loading: validationPending || isFinding, onPress: () => findOrCreateConversation(recipientIds), warnings: warnings })] }));
77
80
  }
78
81
  function ToField({ selectedPeople, searchTerm, onSearchChange, onRemove, onClear, searchInputRef, }) {
79
82
  const styles = useStyles();
80
83
  const { colors } = useTheme();
81
84
  const hasSelections = selectedPeople.size > 0;
82
- return (<View style={styles.toField}>
83
- <View style={styles.toFieldHeader}>
84
- <Text style={styles.toLabel}>To</Text>
85
- {hasSelections && (<Pressable onPress={onClear} hitSlop={8}>
86
- <Text style={styles.clearButton}>Clear</Text>
87
- </Pressable>)}
88
- </View>
89
- <View style={styles.toInputArea}>
90
- {[...selectedPeople.values()].map(person => (<PersonChip key={person.id} person={person} onRemove={onRemove}/>))}
91
- <AutoFocusAwareTextInput autoFocus inputRef={searchInputRef} placeholder="Search" placeholderTextColor={colors.textColorDefaultPlaceholder} value={searchTerm} onChangeText={onSearchChange} style={styles.toTextInput} returnKeyType="search"/>
92
- </View>
93
- </View>);
85
+ return (_jsxs(View, { style: styles.toField, children: [_jsxs(View, { style: styles.toFieldHeader, children: [_jsx(Text, { style: styles.toLabel, children: "To" }), hasSelections && (_jsx(Pressable, { onPress: onClear, hitSlop: 8, children: _jsx(Text, { style: styles.clearButton, children: "Clear" }) }))] }), _jsxs(View, { style: styles.toInputArea, children: [[...selectedPeople.values()].map(person => (_jsx(PersonChip, { person: person, onRemove: onRemove }, person.id))), _jsx(AutoFocusAwareTextInput, { autoFocus: true, inputRef: searchInputRef, placeholder: "Search", placeholderTextColor: colors.textColorDefaultPlaceholder, value: searchTerm, onChangeText: onSearchChange, style: styles.toTextInput, returnKeyType: "search" })] })] }));
94
86
  }
95
87
  function PersonChip({ person, onRemove, }) {
96
88
  const styles = useStyles();
97
- return (<View style={styles.chip}>
98
- <Avatar sourceUri={person.avatar} size="sm" showFallback={!person.avatar}/>
99
- <Text style={styles.chipName}>{person.name}</Text>
100
- <Pressable onPress={() => onRemove(person.id)} hitSlop={8} accessibilityLabel={`Remove ${person.name}`}>
101
- <Icon name="general.x" size={12} style={styles.chipRemoveIcon}/>
102
- </Pressable>
103
- </View>);
89
+ return (_jsxs(View, { style: styles.chip, children: [_jsx(Avatar, { sourceUri: person.avatar, size: "sm", showFallback: !person.avatar }), _jsx(Text, { style: styles.chipName, children: person.name }), _jsx(Pressable, { onPress: () => onRemove(person.id), hitSlop: 8, accessibilityLabel: `Remove ${person.name}`, children: _jsx(Icon, { name: "general.x", size: 12, style: styles.chipRemoveIcon }) })] }));
104
90
  }
105
91
  function CandidateResults({ term, selectedPeople, onSelect, }) {
106
92
  const styles = useStyles();
@@ -109,39 +95,21 @@ function CandidateResults({ term, selectedPeople, onSelect, }) {
109
95
  if (term.length < 1) {
110
96
  if (selectedPeople.size > 0)
111
97
  return null;
112
- return (<View style={styles.emptyState}>
113
- <Icon name="churchCenter.people" size={40} style={styles.emptyStateIcon}/>
114
- <Text style={styles.emptyStateTitle}>Search for people to direct message</Text>
115
- <Text variant="secondary" style={styles.emptyStateSubtitle}>
116
- Start a conversation with people in your groups and teams.
117
- </Text>
118
- </View>);
98
+ return (_jsxs(View, { style: styles.emptyState, children: [_jsx(Icon, { name: "churchCenter.people", size: 40, style: styles.emptyStateIcon }), _jsx(Text, { style: styles.emptyStateTitle, children: "Search for people to direct message" }), _jsx(Text, { variant: "secondary", style: styles.emptyStateSubtitle, children: "Start a conversation with people in your groups and teams." })] }));
119
99
  }
120
100
  const isAtLimit = selectedPeople.size >= MAX_RECIPIENTS;
121
101
  if (isAtLimit) {
122
- return (<View style={styles.emptyState}>
123
- <Text variant="secondary" style={styles.emptyStateSubtitle}>
124
- You can add up to {MAX_RECIPIENTS} people to a direct message.
125
- </Text>
126
- </View>);
102
+ return (_jsx(View, { style: styles.emptyState, children: _jsxs(Text, { variant: "secondary", style: styles.emptyStateSubtitle, children: ["You can add up to ", MAX_RECIPIENTS, " people to a direct message."] }) }));
127
103
  }
128
104
  const unselectedCandidates = (data?.data ?? []).filter(c => !selectedPeople.has(c.id));
129
105
  const hasTruncated = (data?.meta.totalCount ?? 0) > (data?.data.length ?? 0);
130
106
  if (isFetching && unselectedCandidates.length === 0) {
131
- return (<View style={styles.emptyState}>
132
- <Spinner />
133
- </View>);
107
+ return (_jsx(View, { style: styles.emptyState, children: _jsx(Spinner, {}) }));
134
108
  }
135
109
  if (!isFetching && unselectedCandidates.length === 0) {
136
- return (<View style={styles.emptyState}>
137
- <Icon name="general.search" size={32} style={styles.emptyStateIcon}/>
138
- <Text style={styles.emptyStateTitle}>No matches for "{term}"</Text>
139
- <Text variant="secondary" style={styles.emptyStateSubtitle}>
140
- Try a different name, or check that you share a group or team with them.
141
- </Text>
142
- </View>);
110
+ return (_jsxs(View, { style: styles.emptyState, children: [_jsx(Icon, { name: "general.search", size: 32, style: styles.emptyStateIcon }), _jsxs(Text, { style: styles.emptyStateTitle, children: ["No matches for \"", term, "\""] }), _jsx(Text, { variant: "secondary", style: styles.emptyStateSubtitle, children: "Try a different name, or check that you share a group or team with them." })] }));
143
111
  }
144
- return (<CandidateList candidates={unselectedCandidates} hasTruncated={hasTruncated} groups={groups} teams={teams} onSelect={onSelect}/>);
112
+ return (_jsx(CandidateList, { candidates: unselectedCandidates, hasTruncated: hasTruncated, groups: groups, teams: teams, onSelect: onSelect }));
145
113
  }
146
114
  function candidateBadges(candidate) {
147
115
  const badges = [];
@@ -167,40 +135,11 @@ function CandidateList({ candidates, hasTruncated, groups, teams, onSelect, }) {
167
135
  const styles = useStyles();
168
136
  const available = candidates.filter(c => !c.directMessagesDisabled);
169
137
  const dmDisabled = candidates.filter(c => c.directMessagesDisabled);
170
- return (<FlatList data={available} keyboardShouldPersistTaps="handled" keyExtractor={item => item.id} renderItem={({ item }) => (<CandidateItem candidate={item} badges={candidateBadges(item)} affiliationNames={candidateAffiliationNames(item, groups, teams)} onSelect={() => onSelect(item)}/>)} ListHeaderComponent={<View style={styles.resultsHeader}>
171
- <Text style={styles.resultsHeading}>Results</Text>
172
- </View>} ListFooterComponent={<>
173
- {dmDisabled.length > 0 && (<>
174
- <View style={styles.unavailableHeader}>
175
- <Text variant="secondary" style={styles.unavailableLabel}>
176
- Unavailable for direct messages
177
- </Text>
178
- </View>
179
- {dmDisabled.map(candidate => (<CandidateItem key={candidate.id} candidate={candidate} badges={candidateBadges(candidate)} affiliationNames={candidateAffiliationNames(candidate, groups, teams)} disabled/>))}
180
- </>)}
181
- {hasTruncated && (<View style={styles.truncatedFooter}>
182
- <Text variant="secondary" style={styles.truncatedText}>
183
- Keep typing to narrow your results.
184
- </Text>
185
- </View>)}
186
- </>}/>);
138
+ return (_jsx(FlatList, { data: available, keyboardShouldPersistTaps: "handled", keyExtractor: item => item.id, renderItem: ({ item }) => (_jsx(CandidateItem, { candidate: item, badges: candidateBadges(item), affiliationNames: candidateAffiliationNames(item, groups, teams), onSelect: () => onSelect(item) })), ListHeaderComponent: _jsx(View, { style: styles.resultsHeader, children: _jsx(Text, { style: styles.resultsHeading, children: "Results" }) }), ListFooterComponent: _jsxs(_Fragment, { children: [dmDisabled.length > 0 && (_jsxs(_Fragment, { children: [_jsx(View, { style: styles.unavailableHeader, children: _jsx(Text, { variant: "secondary", style: styles.unavailableLabel, children: "Unavailable for direct messages" }) }), dmDisabled.map(candidate => (_jsx(CandidateItem, { candidate: candidate, badges: candidateBadges(candidate), affiliationNames: candidateAffiliationNames(candidate, groups, teams), disabled: true }, candidate.id)))] })), hasTruncated && (_jsx(View, { style: styles.truncatedFooter, children: _jsx(Text, { variant: "secondary", style: styles.truncatedText, children: "Keep typing to narrow your results." }) }))] }) }));
187
139
  }
188
140
  function CandidateItem({ candidate, badges, affiliationNames, onSelect, disabled = false, }) {
189
141
  const styles = useStyles();
190
- return (<PlatformPressable onPress={disabled ? undefined : onSelect} accessibilityRole="button" accessibilityLabel={`Select ${candidate.name}`} accessibilityState={{ disabled }}>
191
- <View style={[styles.row, disabled && styles.candidateDisabled]}>
192
- <Avatar sourceUri={candidate.avatar} size="lg" showFallback={!candidate.avatar}/>
193
- <View style={styles.rowInfo}>
194
- <Text style={styles.rowName}>{candidate.name}</Text>
195
- {affiliationNames.length > 0 && (<Text style={styles.rowAffiliations} numberOfLines={2}>
196
- {affiliationNames.join(', ')}
197
- </Text>)}
198
- {badges.length > 0 && (<View style={styles.badgeRow}>
199
- {badges.map(({ title }) => (<Badge key={title} label={title}/>))}
200
- </View>)}
201
- </View>
202
- </View>
203
- </PlatformPressable>);
142
+ return (_jsx(PlatformPressable, { onPress: disabled ? undefined : onSelect, accessibilityRole: "button", accessibilityLabel: `Select ${candidate.name}`, accessibilityState: { disabled }, children: _jsxs(View, { style: [styles.row, disabled && styles.candidateDisabled], children: [_jsx(Avatar, { sourceUri: candidate.avatar, size: "lg", showFallback: !candidate.avatar }), _jsxs(View, { style: styles.rowInfo, children: [_jsx(Text, { style: styles.rowName, children: candidate.name }), affiliationNames.length > 0 && (_jsx(Text, { style: styles.rowAffiliations, numberOfLines: 2, children: affiliationNames.join(', ') })), badges.length > 0 && (_jsx(View, { style: styles.badgeRow, children: badges.map(({ title }) => (_jsx(Badge, { label: title }, title))) }))] })] }) }));
204
143
  }
205
144
  const useStyles = () => {
206
145
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_select_direct_message_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAAa,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAa,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAA;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,6DAA6D,CAAA;AAC1G,OAAO,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAA;AACtG,OAAO,EAAE,oCAAoC,EAAE,MAAM,sEAAsE,CAAA;AAC3H,OAAO,EAAE,wCAAwC,EAAE,MAAM,4EAA4E,CAAA;AACrI,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAIzE,MAAM,cAAc,GAAG,CAAC,CAAA;AAExB,MAAM,UAAU,+CAA+C,CAC7D,MAA+C;IAE/C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,EAAE,cAAc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AQ,EAAE,EAAE;YACZ,SAAS,EAAE,QAAQ;SACpB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StackActions, useNavigation } from '@react-navigation/native'\nimport { RefObject, useEffect, useRef, useState } from 'react'\nimport { FlatList, Pressable, StyleSheet, TextInput, View } from 'react-native'\nimport { Avatar, Badge, Banner, Icon, KeyboardView, Spinner, Text } from '../../components'\nimport { ActionButton } from '../../components/display/action_button'\nimport { AutoFocusAwareTextInput } from '../../components/display/text_input'\nimport { ComponentErrorBoundary } from '../../components/page/component_error_boundary'\nimport { useTheme } from '../../hooks'\nimport { useDirectMessageAffiliations } from '../../hooks/direct_messages/use_direct_message_affiliations'\nimport { useDirectMessageCandidates } from '../../hooks/direct_messages/use_direct_message_candidates'\nimport { useDirectMessageConversationValidate } from '../../hooks/direct_messages/use_direct_message_conversation_validate'\nimport { useFindOrCreateDirectMessageConversation } from '../../hooks/direct_messages/use_find_or_create_direct_message_conversation'\nimport { availableFeatures, useFeatures } from '../../hooks/use_features'\nimport { DirectMessageCandidateResource } from '../../types/resources/direct_message_candidate'\nimport { ConversationSelectRecipientsScreenProps } from './types/screen_props'\n\nconst MAX_RECIPIENTS = 9\n\nexport function ConversationSelectDirectMessageRecipientsScreen(\n _props: ConversationSelectRecipientsScreenProps\n) {\n const styles = useStyles()\n const navigation = useNavigation()\n const { featureEnabled } = useFeatures()\n const [searchTerm, setSearchTerm] = useState('')\n const [debouncedTerm, setDebouncedTerm] = useState('')\n const [selectedPeople, setSelectedPeople] = useState<Map<string, DirectMessageCandidateResource>>(\n new Map()\n )\n const searchInputRef = useRef<TextInput>(null)\n\n useEffect(() => {\n const timer = setTimeout(() => setDebouncedTerm(searchTerm), 200)\n return () => clearTimeout(timer)\n }, [searchTerm])\n\n const selectPerson = (person: DirectMessageCandidateResource) => {\n if (selectedPeople.size >= MAX_RECIPIENTS) return\n setSelectedPeople(prev => new Map(prev).set(person.id, person))\n setSearchTerm('')\n setDebouncedTerm('')\n // Controlled TextInput can retain stale native text on iOS when the value\n // is cleared while it stays focused (keyboardShouldPersistTaps keeps it\n // focused through the tap) — clear() forces the native view to sync. Gated\n // so EAP reporters can toggle the fix on their devices to confirm it.\n if (featureEnabled(availableFeatures.dm_search_clear_fix)) {\n searchInputRef.current?.clear()\n }\n }\n\n const removePerson = (id: string) => {\n setSelectedPeople(prev => {\n const next = new Map(prev)\n next.delete(id)\n return next\n })\n }\n\n const recipientIds = [...selectedPeople.keys()]\n const { warnings, validationPending } = useDirectMessageConversationValidate({ recipientIds })\n\n const handleSuccess = (conversationId: number) => {\n navigation.getParent()?.goBack()\n navigation.dispatch(StackActions.push('Conversation', { conversation_id: conversationId }))\n }\n\n const { findOrCreateConversation, directMessageExists, isFinding, isError } =\n useFindOrCreateDirectMessageConversation({ recipientIds, onSuccess: handleSuccess })\n\n const buttonText = (() => {\n if (selectedPeople.size === 0) return 'Start conversation'\n if (selectedPeople.size === 1) {\n const firstName = selectedPeople.values().next().value!.name.split(' ')[0]\n return directMessageExists ? `Open message with ${firstName}` : `Message ${firstName}`\n }\n return directMessageExists\n ? `Open direct message (${selectedPeople.size})`\n : `Start direct message (${selectedPeople.size})`\n })()\n\n return (\n <KeyboardView>\n {isError && (\n <Banner\n appearance=\"error\"\n description=\"There was an issue starting the conversation. Please try again.\"\n style={styles.errorBanner}\n />\n )}\n <ToField\n selectedPeople={selectedPeople}\n searchTerm={searchTerm}\n onSearchChange={setSearchTerm}\n onRemove={removePerson}\n onClear={() => setSelectedPeople(new Map())}\n searchInputRef={searchInputRef}\n />\n <View style={styles.candidateResultsContainer}>\n <ComponentErrorBoundary\n key={debouncedTerm}\n fallback={\n <Banner\n appearance=\"error\"\n description=\"Couldn't load people right now. Try again.\"\n style={styles.errorBanner}\n />\n }\n >\n <CandidateResults\n term={debouncedTerm}\n selectedPeople={selectedPeople}\n onSelect={selectPerson}\n />\n </ComponentErrorBoundary>\n </View>\n <ActionButton\n title={buttonText}\n disabled={\n selectedPeople.size === 0 || validationPending || warnings.length > 0 || isFinding\n }\n loading={validationPending || isFinding}\n onPress={() => findOrCreateConversation(recipientIds)}\n warnings={warnings}\n />\n </KeyboardView>\n )\n}\n\nfunction ToField({\n selectedPeople,\n searchTerm,\n onSearchChange,\n onRemove,\n onClear,\n searchInputRef,\n}: {\n selectedPeople: Map<string, DirectMessageCandidateResource>\n searchTerm: string\n onSearchChange: (term: string) => void\n onRemove: (id: string) => void\n onClear: () => void\n searchInputRef: RefObject<TextInput | null>\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n const hasSelections = selectedPeople.size > 0\n\n return (\n <View style={styles.toField}>\n <View style={styles.toFieldHeader}>\n <Text style={styles.toLabel}>To</Text>\n {hasSelections && (\n <Pressable onPress={onClear} hitSlop={8}>\n <Text style={styles.clearButton}>Clear</Text>\n </Pressable>\n )}\n </View>\n <View style={styles.toInputArea}>\n {[...selectedPeople.values()].map(person => (\n <PersonChip key={person.id} person={person} onRemove={onRemove} />\n ))}\n <AutoFocusAwareTextInput\n autoFocus\n inputRef={searchInputRef}\n placeholder=\"Search\"\n placeholderTextColor={colors.textColorDefaultPlaceholder}\n value={searchTerm}\n onChangeText={onSearchChange}\n style={styles.toTextInput}\n returnKeyType=\"search\"\n />\n </View>\n </View>\n )\n}\n\nfunction PersonChip({\n person,\n onRemove,\n}: {\n person: DirectMessageCandidateResource\n onRemove: (id: string) => void\n}) {\n const styles = useStyles()\n\n return (\n <View style={styles.chip}>\n <Avatar sourceUri={person.avatar} size=\"sm\" showFallback={!person.avatar} />\n <Text style={styles.chipName}>{person.name}</Text>\n <Pressable\n onPress={() => onRemove(person.id)}\n hitSlop={8}\n accessibilityLabel={`Remove ${person.name}`}\n >\n <Icon name=\"general.x\" size={12} style={styles.chipRemoveIcon} />\n </Pressable>\n </View>\n )\n}\n\nfunction CandidateResults({\n term,\n selectedPeople,\n onSelect,\n}: {\n term: string\n selectedPeople: Map<string, DirectMessageCandidateResource>\n onSelect: (candidate: DirectMessageCandidateResource) => void\n}) {\n const styles = useStyles()\n const { data, isFetching } = useDirectMessageCandidates(term)\n const { groups, teams } = useDirectMessageAffiliations()\n\n if (term.length < 1) {\n if (selectedPeople.size > 0) return null\n\n return (\n <View style={styles.emptyState}>\n <Icon name=\"churchCenter.people\" size={40} style={styles.emptyStateIcon} />\n <Text style={styles.emptyStateTitle}>Search for people to direct message</Text>\n <Text variant=\"secondary\" style={styles.emptyStateSubtitle}>\n Start a conversation with people in your groups and teams.\n </Text>\n </View>\n )\n }\n\n const isAtLimit = selectedPeople.size >= MAX_RECIPIENTS\n\n if (isAtLimit) {\n return (\n <View style={styles.emptyState}>\n <Text variant=\"secondary\" style={styles.emptyStateSubtitle}>\n You can add up to {MAX_RECIPIENTS} people to a direct message.\n </Text>\n </View>\n )\n }\n\n const unselectedCandidates = (data?.data ?? []).filter(c => !selectedPeople.has(c.id))\n const hasTruncated = (data?.meta.totalCount ?? 0) > (data?.data.length ?? 0)\n\n if (isFetching && unselectedCandidates.length === 0) {\n return (\n <View style={styles.emptyState}>\n <Spinner />\n </View>\n )\n }\n\n if (!isFetching && unselectedCandidates.length === 0) {\n return (\n <View style={styles.emptyState}>\n <Icon name=\"general.search\" size={32} style={styles.emptyStateIcon} />\n <Text style={styles.emptyStateTitle}>No matches for \"{term}\"</Text>\n <Text variant=\"secondary\" style={styles.emptyStateSubtitle}>\n Try a different name, or check that you share a group or team with them.\n </Text>\n </View>\n )\n }\n\n return (\n <CandidateList\n candidates={unselectedCandidates}\n hasTruncated={hasTruncated}\n groups={groups}\n teams={teams}\n onSelect={onSelect}\n />\n )\n}\n\nfunction candidateBadges(candidate: DirectMessageCandidateResource) {\n const badges = []\n if (candidate.directMessagesDisabled) badges.push({ title: 'DMs off' })\n if (candidate.under_18) badges.push({ title: 'Under 18' })\n return badges\n}\n\nfunction candidateAffiliationNames(\n candidate: DirectMessageCandidateResource,\n groups: Map<number, string>,\n teams: Map<number, string>\n) {\n return [\n ...candidate.groups.flatMap(id => {\n const name = groups.get(id)\n return name ? [name] : []\n }),\n ...candidate.teams.flatMap(id => {\n const name = teams.get(id)\n return name ? [name] : []\n }),\n ]\n}\n\nfunction CandidateList({\n candidates,\n hasTruncated,\n groups,\n teams,\n onSelect,\n}: {\n candidates: DirectMessageCandidateResource[]\n hasTruncated: boolean\n groups: Map<number, string>\n teams: Map<number, string>\n onSelect: (candidate: DirectMessageCandidateResource) => void\n}) {\n const styles = useStyles()\n const available = candidates.filter(c => !c.directMessagesDisabled)\n const dmDisabled = candidates.filter(c => c.directMessagesDisabled)\n\n return (\n <FlatList<DirectMessageCandidateResource>\n data={available}\n keyboardShouldPersistTaps=\"handled\"\n keyExtractor={item => item.id}\n renderItem={({ item }) => (\n <CandidateItem\n candidate={item}\n badges={candidateBadges(item)}\n affiliationNames={candidateAffiliationNames(item, groups, teams)}\n onSelect={() => onSelect(item)}\n />\n )}\n ListHeaderComponent={\n <View style={styles.resultsHeader}>\n <Text style={styles.resultsHeading}>Results</Text>\n </View>\n }\n ListFooterComponent={\n <>\n {dmDisabled.length > 0 && (\n <>\n <View style={styles.unavailableHeader}>\n <Text variant=\"secondary\" style={styles.unavailableLabel}>\n Unavailable for direct messages\n </Text>\n </View>\n {dmDisabled.map(candidate => (\n <CandidateItem\n key={candidate.id}\n candidate={candidate}\n badges={candidateBadges(candidate)}\n affiliationNames={candidateAffiliationNames(candidate, groups, teams)}\n disabled\n />\n ))}\n </>\n )}\n {hasTruncated && (\n <View style={styles.truncatedFooter}>\n <Text variant=\"secondary\" style={styles.truncatedText}>\n Keep typing to narrow your results.\n </Text>\n </View>\n )}\n </>\n }\n />\n )\n}\n\nfunction CandidateItem({\n candidate,\n badges,\n affiliationNames,\n onSelect,\n disabled = false,\n}: {\n candidate: DirectMessageCandidateResource\n badges: { title: string }[]\n affiliationNames: string[]\n onSelect?: () => void\n disabled?: boolean\n}) {\n const styles = useStyles()\n\n return (\n <PlatformPressable\n onPress={disabled ? undefined : onSelect}\n accessibilityRole=\"button\"\n accessibilityLabel={`Select ${candidate.name}`}\n accessibilityState={{ disabled }}\n >\n <View style={[styles.row, disabled && styles.candidateDisabled]}>\n <Avatar sourceUri={candidate.avatar} size=\"lg\" showFallback={!candidate.avatar} />\n <View style={styles.rowInfo}>\n <Text style={styles.rowName}>{candidate.name}</Text>\n {affiliationNames.length > 0 && (\n <Text style={styles.rowAffiliations} numberOfLines={2}>\n {affiliationNames.join(', ')}\n </Text>\n )}\n {badges.length > 0 && (\n <View style={styles.badgeRow}>\n {badges.map(({ title }) => (\n <Badge key={title} label={title} />\n ))}\n </View>\n )}\n </View>\n </View>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n candidateResultsContainer: {\n flex: 1,\n },\n toField: {\n paddingHorizontal: 16,\n paddingTop: 16,\n paddingBottom: 8,\n },\n toFieldHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginBottom: 8,\n },\n toLabel: {\n fontWeight: '600',\n color: colors.textColorDefaultSecondary,\n },\n clearButton: {\n color: colors.interaction,\n },\n toInputArea: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n gap: 6,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 10,\n paddingVertical: 8,\n },\n toTextInput: {\n flex: 1,\n minWidth: 80,\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n paddingVertical: 2,\n },\n chip: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 100,\n paddingLeft: 4,\n paddingRight: 6,\n paddingVertical: 3,\n },\n chipName: {\n fontSize: 14,\n },\n chipRemoveIcon: {\n color: colors.iconColorDefaultSecondary,\n },\n errorBanner: {\n margin: 16,\n },\n emptyState: {\n alignItems: 'center',\n paddingTop: 32,\n paddingHorizontal: 32,\n gap: 8,\n },\n emptyStateIcon: {\n color: colors.iconColorDefaultSecondary,\n marginBottom: 4,\n },\n emptyStateTitle: {\n fontWeight: '600',\n textAlign: 'center',\n },\n emptyStateSubtitle: {\n textAlign: 'center',\n fontSize: 14,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: 12,\n paddingHorizontal: 16,\n paddingVertical: 12,\n borderBottomWidth: 1,\n borderColor: colors.borderColorDefaultDim,\n },\n rowInfo: {\n flex: 1,\n gap: 2,\n },\n rowName: {\n fontSize: 15,\n fontWeight: '500',\n },\n rowAffiliations: {\n fontSize: 12,\n color: colors.textColorDefaultSecondary,\n },\n badgeRow: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n gap: 4,\n marginTop: 4,\n },\n\n candidateDisabled: {\n opacity: 0.5,\n },\n resultsHeader: {\n paddingHorizontal: 16,\n paddingTop: 16,\n paddingBottom: 8,\n },\n resultsHeading: {\n fontWeight: '600',\n },\n unavailableHeader: {\n paddingHorizontal: 16,\n paddingTop: 16,\n paddingBottom: 8,\n },\n unavailableLabel: {\n fontSize: 13,\n },\n truncatedFooter: {\n paddingHorizontal: 16,\n paddingTop: 12,\n paddingBottom: 8,\n },\n truncatedText: {\n fontSize: 13,\n textAlign: 'center',\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_select_direct_message_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,EAAa,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAa,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAA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,EAAE;YACd,aAAa,EAAE,CAAC;SACjB;QACD,gBAAgB,EAAE;YAChB,QAAQ,EAAE,EAAE;SACb;QACD,eAAe,EAAE;YACf,iBAAiB,EAAE,EAAE;YACrB,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,CAAC;SACjB;QACD,aAAa,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,QAAQ;SACpB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StackActions, useNavigation } from '@react-navigation/native'\nimport { RefObject, useEffect, useRef, useState } from 'react'\nimport { FlatList, Pressable, StyleSheet, TextInput, View } from 'react-native'\nimport { Avatar, Badge, Banner, Icon, KeyboardView, Spinner, Text } from '../../components'\nimport { ActionButton } from '../../components/display/action_button'\nimport { AutoFocusAwareTextInput } from '../../components/display/text_input'\nimport { ComponentErrorBoundary } from '../../components/page/component_error_boundary'\nimport { useTheme } from '../../hooks'\nimport { useDirectMessageAffiliations } from '../../hooks/direct_messages/use_direct_message_affiliations'\nimport { useDirectMessageCandidates } from '../../hooks/direct_messages/use_direct_message_candidates'\nimport { useDirectMessageConversationValidate } from '../../hooks/direct_messages/use_direct_message_conversation_validate'\nimport { useFindOrCreateDirectMessageConversation } from '../../hooks/direct_messages/use_find_or_create_direct_message_conversation'\nimport { availableFeatures, useFeatures } from '../../hooks/use_features'\nimport { DirectMessageCandidateResource } from '../../types/resources/direct_message_candidate'\nimport { ConversationSelectRecipientsScreenProps } from './types/screen_props'\n\nconst MAX_RECIPIENTS = 9\n\nexport function ConversationSelectDirectMessageRecipientsScreen({\n route,\n}: ConversationSelectRecipientsScreenProps) {\n const { preselected_people = [] } = route.params ?? {}\n const styles = useStyles()\n const navigation = useNavigation()\n const { featureEnabled } = useFeatures()\n const [searchTerm, setSearchTerm] = useState('')\n const [debouncedTerm, setDebouncedTerm] = useState('')\n const [selectedPeople, setSelectedPeople] = useState<Map<string, DirectMessageCandidateResource>>(\n () =>\n new Map(\n preselected_people.map(person => [\n person.id,\n {\n ...person,\n type: 'DirectMessageCandidate' as const,\n groups: [],\n teams: [],\n under_18: false,\n directMessagesDisabled: false,\n },\n ])\n )\n )\n const searchInputRef = useRef<TextInput>(null)\n\n useEffect(() => {\n const timer = setTimeout(() => setDebouncedTerm(searchTerm), 200)\n return () => clearTimeout(timer)\n }, [searchTerm])\n\n const selectPerson = (person: DirectMessageCandidateResource) => {\n if (selectedPeople.size >= MAX_RECIPIENTS) return\n setSelectedPeople(prev => new Map(prev).set(person.id, person))\n setSearchTerm('')\n setDebouncedTerm('')\n // Controlled TextInput can retain stale native text on iOS when the value\n // is cleared while it stays focused (keyboardShouldPersistTaps keeps it\n // focused through the tap) — clear() forces the native view to sync. Gated\n // so EAP reporters can toggle the fix on their devices to confirm it.\n if (featureEnabled(availableFeatures.dm_search_clear_fix)) {\n searchInputRef.current?.clear()\n }\n }\n\n const removePerson = (id: string) => {\n setSelectedPeople(prev => {\n const next = new Map(prev)\n next.delete(id)\n return next\n })\n }\n\n const recipientIds = [...selectedPeople.keys()]\n const { warnings, validationPending } = useDirectMessageConversationValidate({ recipientIds })\n\n const handleSuccess = (conversationId: number) => {\n navigation.getParent()?.goBack()\n navigation.dispatch(StackActions.push('Conversation', { conversation_id: conversationId }))\n }\n\n const { findOrCreateConversation, directMessageExists, isFinding, isError } =\n useFindOrCreateDirectMessageConversation({ recipientIds, onSuccess: handleSuccess })\n\n const buttonText = (() => {\n if (selectedPeople.size === 0) return 'Start conversation'\n if (selectedPeople.size === 1) {\n const firstName = selectedPeople.values().next().value!.name.split(' ')[0]\n return directMessageExists ? `Open message with ${firstName}` : `Message ${firstName}`\n }\n return directMessageExists\n ? `Open direct message (${selectedPeople.size})`\n : `Start direct message (${selectedPeople.size})`\n })()\n\n return (\n <KeyboardView>\n {isError && (\n <Banner\n appearance=\"error\"\n description=\"There was an issue starting the conversation. Please try again.\"\n style={styles.errorBanner}\n />\n )}\n <ToField\n selectedPeople={selectedPeople}\n searchTerm={searchTerm}\n onSearchChange={setSearchTerm}\n onRemove={removePerson}\n onClear={() => setSelectedPeople(new Map())}\n searchInputRef={searchInputRef}\n />\n <View style={styles.candidateResultsContainer}>\n <ComponentErrorBoundary\n key={debouncedTerm}\n fallback={\n <Banner\n appearance=\"error\"\n description=\"Couldn't load people right now. Try again.\"\n style={styles.errorBanner}\n />\n }\n >\n <CandidateResults\n term={debouncedTerm}\n selectedPeople={selectedPeople}\n onSelect={selectPerson}\n />\n </ComponentErrorBoundary>\n </View>\n <ActionButton\n title={buttonText}\n disabled={\n selectedPeople.size === 0 || validationPending || warnings.length > 0 || isFinding\n }\n loading={validationPending || isFinding}\n onPress={() => findOrCreateConversation(recipientIds)}\n warnings={warnings}\n />\n </KeyboardView>\n )\n}\n\nfunction ToField({\n selectedPeople,\n searchTerm,\n onSearchChange,\n onRemove,\n onClear,\n searchInputRef,\n}: {\n selectedPeople: Map<string, DirectMessageCandidateResource>\n searchTerm: string\n onSearchChange: (term: string) => void\n onRemove: (id: string) => void\n onClear: () => void\n searchInputRef: RefObject<TextInput | null>\n}) {\n const styles = useStyles()\n const { colors } = useTheme()\n const hasSelections = selectedPeople.size > 0\n\n return (\n <View style={styles.toField}>\n <View style={styles.toFieldHeader}>\n <Text style={styles.toLabel}>To</Text>\n {hasSelections && (\n <Pressable onPress={onClear} hitSlop={8}>\n <Text style={styles.clearButton}>Clear</Text>\n </Pressable>\n )}\n </View>\n <View style={styles.toInputArea}>\n {[...selectedPeople.values()].map(person => (\n <PersonChip key={person.id} person={person} onRemove={onRemove} />\n ))}\n <AutoFocusAwareTextInput\n autoFocus\n inputRef={searchInputRef}\n placeholder=\"Search\"\n placeholderTextColor={colors.textColorDefaultPlaceholder}\n value={searchTerm}\n onChangeText={onSearchChange}\n style={styles.toTextInput}\n returnKeyType=\"search\"\n />\n </View>\n </View>\n )\n}\n\nfunction PersonChip({\n person,\n onRemove,\n}: {\n person: DirectMessageCandidateResource\n onRemove: (id: string) => void\n}) {\n const styles = useStyles()\n\n return (\n <View style={styles.chip}>\n <Avatar sourceUri={person.avatar} size=\"sm\" showFallback={!person.avatar} />\n <Text style={styles.chipName}>{person.name}</Text>\n <Pressable\n onPress={() => onRemove(person.id)}\n hitSlop={8}\n accessibilityLabel={`Remove ${person.name}`}\n >\n <Icon name=\"general.x\" size={12} style={styles.chipRemoveIcon} />\n </Pressable>\n </View>\n )\n}\n\nfunction CandidateResults({\n term,\n selectedPeople,\n onSelect,\n}: {\n term: string\n selectedPeople: Map<string, DirectMessageCandidateResource>\n onSelect: (candidate: DirectMessageCandidateResource) => void\n}) {\n const styles = useStyles()\n const { data, isFetching } = useDirectMessageCandidates(term)\n const { groups, teams } = useDirectMessageAffiliations()\n\n if (term.length < 1) {\n if (selectedPeople.size > 0) return null\n\n return (\n <View style={styles.emptyState}>\n <Icon name=\"churchCenter.people\" size={40} style={styles.emptyStateIcon} />\n <Text style={styles.emptyStateTitle}>Search for people to direct message</Text>\n <Text variant=\"secondary\" style={styles.emptyStateSubtitle}>\n Start a conversation with people in your groups and teams.\n </Text>\n </View>\n )\n }\n\n const isAtLimit = selectedPeople.size >= MAX_RECIPIENTS\n\n if (isAtLimit) {\n return (\n <View style={styles.emptyState}>\n <Text variant=\"secondary\" style={styles.emptyStateSubtitle}>\n You can add up to {MAX_RECIPIENTS} people to a direct message.\n </Text>\n </View>\n )\n }\n\n const unselectedCandidates = (data?.data ?? []).filter(c => !selectedPeople.has(c.id))\n const hasTruncated = (data?.meta.totalCount ?? 0) > (data?.data.length ?? 0)\n\n if (isFetching && unselectedCandidates.length === 0) {\n return (\n <View style={styles.emptyState}>\n <Spinner />\n </View>\n )\n }\n\n if (!isFetching && unselectedCandidates.length === 0) {\n return (\n <View style={styles.emptyState}>\n <Icon name=\"general.search\" size={32} style={styles.emptyStateIcon} />\n <Text style={styles.emptyStateTitle}>No matches for \"{term}\"</Text>\n <Text variant=\"secondary\" style={styles.emptyStateSubtitle}>\n Try a different name, or check that you share a group or team with them.\n </Text>\n </View>\n )\n }\n\n return (\n <CandidateList\n candidates={unselectedCandidates}\n hasTruncated={hasTruncated}\n groups={groups}\n teams={teams}\n onSelect={onSelect}\n />\n )\n}\n\nfunction candidateBadges(candidate: DirectMessageCandidateResource) {\n const badges = []\n if (candidate.directMessagesDisabled) badges.push({ title: 'DMs off' })\n if (candidate.under_18) badges.push({ title: 'Under 18' })\n return badges\n}\n\nfunction candidateAffiliationNames(\n candidate: DirectMessageCandidateResource,\n groups: Map<number, string>,\n teams: Map<number, string>\n) {\n return [\n ...candidate.groups.flatMap(id => {\n const name = groups.get(id)\n return name ? [name] : []\n }),\n ...candidate.teams.flatMap(id => {\n const name = teams.get(id)\n return name ? [name] : []\n }),\n ]\n}\n\nfunction CandidateList({\n candidates,\n hasTruncated,\n groups,\n teams,\n onSelect,\n}: {\n candidates: DirectMessageCandidateResource[]\n hasTruncated: boolean\n groups: Map<number, string>\n teams: Map<number, string>\n onSelect: (candidate: DirectMessageCandidateResource) => void\n}) {\n const styles = useStyles()\n const available = candidates.filter(c => !c.directMessagesDisabled)\n const dmDisabled = candidates.filter(c => c.directMessagesDisabled)\n\n return (\n <FlatList<DirectMessageCandidateResource>\n data={available}\n keyboardShouldPersistTaps=\"handled\"\n keyExtractor={item => item.id}\n renderItem={({ item }) => (\n <CandidateItem\n candidate={item}\n badges={candidateBadges(item)}\n affiliationNames={candidateAffiliationNames(item, groups, teams)}\n onSelect={() => onSelect(item)}\n />\n )}\n ListHeaderComponent={\n <View style={styles.resultsHeader}>\n <Text style={styles.resultsHeading}>Results</Text>\n </View>\n }\n ListFooterComponent={\n <>\n {dmDisabled.length > 0 && (\n <>\n <View style={styles.unavailableHeader}>\n <Text variant=\"secondary\" style={styles.unavailableLabel}>\n Unavailable for direct messages\n </Text>\n </View>\n {dmDisabled.map(candidate => (\n <CandidateItem\n key={candidate.id}\n candidate={candidate}\n badges={candidateBadges(candidate)}\n affiliationNames={candidateAffiliationNames(candidate, groups, teams)}\n disabled\n />\n ))}\n </>\n )}\n {hasTruncated && (\n <View style={styles.truncatedFooter}>\n <Text variant=\"secondary\" style={styles.truncatedText}>\n Keep typing to narrow your results.\n </Text>\n </View>\n )}\n </>\n }\n />\n )\n}\n\nfunction CandidateItem({\n candidate,\n badges,\n affiliationNames,\n onSelect,\n disabled = false,\n}: {\n candidate: DirectMessageCandidateResource\n badges: { title: string }[]\n affiliationNames: string[]\n onSelect?: () => void\n disabled?: boolean\n}) {\n const styles = useStyles()\n\n return (\n <PlatformPressable\n onPress={disabled ? undefined : onSelect}\n accessibilityRole=\"button\"\n accessibilityLabel={`Select ${candidate.name}`}\n accessibilityState={{ disabled }}\n >\n <View style={[styles.row, disabled && styles.candidateDisabled]}>\n <Avatar sourceUri={candidate.avatar} size=\"lg\" showFallback={!candidate.avatar} />\n <View style={styles.rowInfo}>\n <Text style={styles.rowName}>{candidate.name}</Text>\n {affiliationNames.length > 0 && (\n <Text style={styles.rowAffiliations} numberOfLines={2}>\n {affiliationNames.join(', ')}\n </Text>\n )}\n {badges.length > 0 && (\n <View style={styles.badgeRow}>\n {badges.map(({ title }) => (\n <Badge key={title} label={title} />\n ))}\n </View>\n )}\n </View>\n </View>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n candidateResultsContainer: {\n flex: 1,\n },\n toField: {\n paddingHorizontal: 16,\n paddingTop: 16,\n paddingBottom: 8,\n },\n toFieldHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n marginBottom: 8,\n },\n toLabel: {\n fontWeight: '600',\n color: colors.textColorDefaultSecondary,\n },\n clearButton: {\n color: colors.interaction,\n },\n toInputArea: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n alignItems: 'center',\n gap: 6,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 10,\n paddingVertical: 8,\n },\n toTextInput: {\n flex: 1,\n minWidth: 80,\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n paddingVertical: 2,\n },\n chip: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 100,\n paddingLeft: 4,\n paddingRight: 6,\n paddingVertical: 3,\n },\n chipName: {\n fontSize: 14,\n },\n chipRemoveIcon: {\n color: colors.iconColorDefaultSecondary,\n },\n errorBanner: {\n margin: 16,\n },\n emptyState: {\n alignItems: 'center',\n paddingTop: 32,\n paddingHorizontal: 32,\n gap: 8,\n },\n emptyStateIcon: {\n color: colors.iconColorDefaultSecondary,\n marginBottom: 4,\n },\n emptyStateTitle: {\n fontWeight: '600',\n textAlign: 'center',\n },\n emptyStateSubtitle: {\n textAlign: 'center',\n fontSize: 14,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n gap: 12,\n paddingHorizontal: 16,\n paddingVertical: 12,\n borderBottomWidth: 1,\n borderColor: colors.borderColorDefaultDim,\n },\n rowInfo: {\n flex: 1,\n gap: 2,\n },\n rowName: {\n fontSize: 15,\n fontWeight: '500',\n },\n rowAffiliations: {\n fontSize: 12,\n color: colors.textColorDefaultSecondary,\n },\n badgeRow: {\n flexDirection: 'row',\n flexWrap: 'wrap',\n gap: 4,\n marginTop: 4,\n },\n\n candidateDisabled: {\n opacity: 0.5,\n },\n resultsHeader: {\n paddingHorizontal: 16,\n paddingTop: 16,\n paddingBottom: 8,\n },\n resultsHeading: {\n fontWeight: '600',\n },\n unavailableHeader: {\n paddingHorizontal: 16,\n paddingTop: 16,\n paddingBottom: 8,\n },\n unavailableLabel: {\n fontSize: 13,\n },\n truncatedFooter: {\n paddingHorizontal: 16,\n paddingTop: 12,\n paddingBottom: 8,\n },\n truncatedText: {\n fontSize: 13,\n textAlign: 'center',\n },\n })\n}\n"]}
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { ConversationSelectRecipientsScreenProps } from './types/screen_props';
3
- export declare const ConversationSelectGroupRecipientsScreen: ({ route, }: ConversationSelectRecipientsScreenProps) => React.JSX.Element;
2
+ export declare const ConversationSelectGroupRecipientsScreen: ({ route, }: ConversationSelectRecipientsScreenProps) => import("react/jsx-runtime").JSX.Element;
4
3
  //# sourceMappingURL=conversation_select_group_recipients_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_select_group_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAyB9E,eAAO,MAAM,uCAAuC,GAAI,YAErD,uCAAuC,sBAuDzC,CAAA"}
1
+ {"version":3,"file":"conversation_select_group_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAyB9E,eAAO,MAAM,uCAAuC,GAAI,YAErD,uCAAuC,4CAuDzC,CAAA"}
@@ -1,6 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { useNavigation } from '@react-navigation/native';
2
3
  import { partition } from 'lodash';
3
- import React from 'react';
4
4
  import { SectionList, StyleSheet, View } from 'react-native';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { Heading, Text } from '../../components';
@@ -42,23 +42,16 @@ export const ConversationSelectGroupRecipientsScreen = ({ route, }) => {
42
42
  },
43
43
  });
44
44
  };
45
- return (<SectionList sections={sections} keyExtractor={item => item.id.toString()} stickySectionHeadersEnabled={false} contentContainerStyle={styles.contentContainer} renderSectionHeader={({ section }) => {
45
+ return (_jsx(SectionList, { sections: sections, keyExtractor: item => item.id.toString(), stickySectionHeadersEnabled: false, contentContainerStyle: styles.contentContainer, renderSectionHeader: ({ section }) => {
46
46
  const { title, subtitle } = SECTION_CONFIG[section.key];
47
- return (<View style={[
47
+ return (_jsx(View, { style: [
48
48
  styles.sectionHeader,
49
49
  section.key === SectionKey.more && styles.sectionHeaderSpaced,
50
- ]}>
51
- <View>
52
- <Heading variant="h3">{title}</Heading>
53
- {subtitle && (<Text variant="tertiary" style={styles.sectionSubtitle}>
54
- {subtitle}
55
- </Text>)}
56
- </View>
57
- </View>);
58
- }} renderItem={({ item: group, section }) => {
50
+ ], children: _jsxs(View, { children: [_jsx(Heading, { variant: "h3", children: title }), subtitle && (_jsx(Text, { variant: "tertiary", style: styles.sectionSubtitle, children: subtitle }))] }) }));
51
+ }, renderItem: ({ item: group, section }) => {
59
52
  const { ListItemComponent } = SECTION_CONFIG[section.key];
60
- return <ListItemComponent group={group} onPress={handleNavigateToConversationNew}/>;
61
- }}/>);
53
+ return _jsx(ListItemComponent, { group: group, onPress: handleNavigateToConversationNew });
54
+ } }));
62
55
  };
63
56
  const useStyles = () => {
64
57
  const { bottom } = useSafeAreaInsets();
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_select_group_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,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C,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,+BAA+B,CAAC,EAAG,CAAA;QACtF,CAAC,CAAC,EACF,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,aAAa,EAAE,MAAM;SACtB;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,CAAC;SACjB;QACD,mBAAmB,EAAE;YACnB,SAAS,EAAE,EAAE;SACd;QACD,eAAe,EAAE;YACf,SAAS,EAAE,CAAC;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport { partition } from 'lodash'\nimport React from 'react'\nimport { SectionList, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Heading, Text } from '../../components'\nimport { useGroupsGroups } from '../../hooks/use_groups_groups'\nimport { GroupsGroupResource } from '../../types'\nimport { GroupsRecipientRow } from './components/groups_recipient_row'\nimport { RestrictedGroupRow } from './components/restricted_group_row'\nimport { ConversationSelectRecipientsScreenProps } from './types/screen_props'\n\nconst SectionKey = {\n my: 'my',\n more: 'more',\n} as const\n\nconst SECTION_CONFIG = {\n [SectionKey.my]: {\n title: 'My groups',\n subtitle: null,\n ListItemComponent: GroupsRecipientRow,\n },\n [SectionKey.more]: {\n title: 'More groups',\n subtitle: 'You can not start a new conversation in these groups',\n ListItemComponent: RestrictedGroupRow,\n },\n}\n\ninterface GroupsSection {\n key: keyof typeof SectionKey\n data: GroupsGroupResource[]\n}\n\nexport const ConversationSelectGroupRecipientsScreen = ({\n route,\n}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const { data: groups = [] } = useGroupsGroups()\n\n const [myGroups, moreGroups] = partition(groups, g => g.canCreateConversation)\n\n const sections: GroupsSection[] = [\n { key: SectionKey.my, data: myGroups },\n { key: SectionKey.more, data: moreGroups },\n ].filter(({ data }) => data.length > 0)\n\n const handleNavigateToConversationNew = (group: GroupsGroupResource) => {\n navigation.navigate('New', {\n screen: 'ConversationNew',\n params: {\n ...route.params,\n group_id: group.id,\n source_app_name: 'Groups',\n },\n })\n }\n\n return (\n <SectionList<GroupsGroupResource, GroupsSection>\n sections={sections}\n keyExtractor={item => item.id.toString()}\n stickySectionHeadersEnabled={false}\n contentContainerStyle={styles.contentContainer}\n renderSectionHeader={({ section }) => {\n const { title, subtitle } = SECTION_CONFIG[section.key]\n return (\n <View\n style={[\n styles.sectionHeader,\n section.key === SectionKey.more && styles.sectionHeaderSpaced,\n ]}\n >\n <View>\n <Heading variant=\"h3\">{title}</Heading>\n {subtitle && (\n <Text variant=\"tertiary\" style={styles.sectionSubtitle}>\n {subtitle}\n </Text>\n )}\n </View>\n </View>\n )\n }}\n renderItem={({ item: group, section }) => {\n const { ListItemComponent } = SECTION_CONFIG[section.key]\n return <ListItemComponent group={group} onPress={handleNavigateToConversationNew} />\n }}\n />\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 16,\n paddingBottom: 4,\n },\n sectionHeaderSpaced: {\n marginTop: 16,\n },\n sectionSubtitle: {\n marginTop: 4,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_select_group_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,E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iB,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;YACzD,OAAO,KAAC,iBAAiB,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,+BAA+B,GAAI,CAAA;QACtF,CAAC,GACD,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,aAAa,EAAE,MAAM;SACtB;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,CAAC;SACjB;QACD,mBAAmB,EAAE;YACnB,SAAS,EAAE,EAAE;SACd;QACD,eAAe,EAAE;YACf,SAAS,EAAE,CAAC;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport { partition } from 'lodash'\nimport React from 'react'\nimport { SectionList, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Heading, Text } from '../../components'\nimport { useGroupsGroups } from '../../hooks/use_groups_groups'\nimport { GroupsGroupResource } from '../../types'\nimport { GroupsRecipientRow } from './components/groups_recipient_row'\nimport { RestrictedGroupRow } from './components/restricted_group_row'\nimport { ConversationSelectRecipientsScreenProps } from './types/screen_props'\n\nconst SectionKey = {\n my: 'my',\n more: 'more',\n} as const\n\nconst SECTION_CONFIG = {\n [SectionKey.my]: {\n title: 'My groups',\n subtitle: null,\n ListItemComponent: GroupsRecipientRow,\n },\n [SectionKey.more]: {\n title: 'More groups',\n subtitle: 'You can not start a new conversation in these groups',\n ListItemComponent: RestrictedGroupRow,\n },\n}\n\ninterface GroupsSection {\n key: keyof typeof SectionKey\n data: GroupsGroupResource[]\n}\n\nexport const ConversationSelectGroupRecipientsScreen = ({\n route,\n}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const { data: groups = [] } = useGroupsGroups()\n\n const [myGroups, moreGroups] = partition(groups, g => g.canCreateConversation)\n\n const sections: GroupsSection[] = [\n { key: SectionKey.my, data: myGroups },\n { key: SectionKey.more, data: moreGroups },\n ].filter(({ data }) => data.length > 0)\n\n const handleNavigateToConversationNew = (group: GroupsGroupResource) => {\n navigation.navigate('New', {\n screen: 'ConversationNew',\n params: {\n ...route.params,\n group_id: group.id,\n source_app_name: 'Groups',\n },\n })\n }\n\n return (\n <SectionList<GroupsGroupResource, GroupsSection>\n sections={sections}\n keyExtractor={item => item.id.toString()}\n stickySectionHeadersEnabled={false}\n contentContainerStyle={styles.contentContainer}\n renderSectionHeader={({ section }) => {\n const { title, subtitle } = SECTION_CONFIG[section.key]\n return (\n <View\n style={[\n styles.sectionHeader,\n section.key === SectionKey.more && styles.sectionHeaderSpaced,\n ]}\n >\n <View>\n <Heading variant=\"h3\">{title}</Heading>\n {subtitle && (\n <Text variant=\"tertiary\" style={styles.sectionSubtitle}>\n {subtitle}\n </Text>\n )}\n </View>\n </View>\n )\n }}\n renderItem={({ item: group, section }) => {\n const { ListItemComponent } = SECTION_CONFIG[section.key]\n return <ListItemComponent group={group} onPress={handleNavigateToConversationNew} />\n }}\n />\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 16,\n paddingBottom: 4,\n },\n sectionHeaderSpaced: {\n marginTop: 16,\n },\n sectionSubtitle: {\n marginTop: 4,\n },\n })\n}\n"]}
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { ConversationSelectRecipientsScreenProps } from './types/screen_props';
3
- export declare const ConversationSelectTeamsILeadRecipientsScreen: ({ route, }: ConversationSelectRecipientsScreenProps) => React.JSX.Element;
2
+ export declare const ConversationSelectTeamsILeadRecipientsScreen: ({ route, }: ConversationSelectRecipientsScreenProps) => import("react/jsx-runtime").JSX.Element;
4
3
  //# sourceMappingURL=conversation_select_teams_i_lead_recipients_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_select_teams_i_lead_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAE9E,eAAO,MAAM,4CAA4C,GAAI,YAE1D,uCAAuC,sBA0DzC,CAAA"}
1
+ {"version":3,"file":"conversation_select_teams_i_lead_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAE9E,eAAO,MAAM,4CAA4C,GAAI,YAE1D,uCAAuC,4CA0DzC,CAAA"}
@@ -1,5 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { useNavigation } from '@react-navigation/native';
2
- import React from 'react';
3
3
  import { FlatList, StyleSheet, View } from 'react-native';
4
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
5
  import { Button, Heading } from '../../components';
@@ -23,23 +23,20 @@ export const ConversationSelectTeamsILeadRecipientsScreen = ({ route, }) => {
23
23
  },
24
24
  });
25
25
  };
26
- return (<FlatList data={serviceTypes} keyExtractor={item => item.id.toString()} contentContainerStyle={styles.contentContainer} ListHeaderComponent={<View style={styles.sectionHeader}>
27
- <Heading variant="h3">Teams I lead</Heading>
28
- <Button onPress={() => {
29
- Haptic.impactLight();
30
- navigation.navigate('New', {
31
- screen: 'ConversationFilterRecipients',
32
- params: {
33
- source_app_name: 'Services',
34
- team_filter_type: hasServiceTypes
35
- ? TeamFilterTypes.TeamsIlead
36
- : TeamFilterTypes.All,
37
- },
38
- });
39
- }} title="Select teams" variant="outline" iconNameLeft="general.search" size="sm"/>
40
- </View>} renderItem={({ item: serviceType }) => {
41
- return (<TeamRecipientRow key={serviceType.id} serviceType={serviceType} onPress={handleNavigateToConversationNew}/>);
42
- }}/>);
26
+ return (_jsx(FlatList, { data: serviceTypes, keyExtractor: item => item.id.toString(), contentContainerStyle: styles.contentContainer, ListHeaderComponent: _jsxs(View, { style: styles.sectionHeader, children: [_jsx(Heading, { variant: "h3", children: "Teams I lead" }), _jsx(Button, { onPress: () => {
27
+ Haptic.impactLight();
28
+ navigation.navigate('New', {
29
+ screen: 'ConversationFilterRecipients',
30
+ params: {
31
+ source_app_name: 'Services',
32
+ team_filter_type: hasServiceTypes
33
+ ? TeamFilterTypes.TeamsIlead
34
+ : TeamFilterTypes.All,
35
+ },
36
+ });
37
+ }, title: "Select teams", variant: "outline", iconNameLeft: "general.search", size: "sm" })] }), renderItem: ({ item: serviceType }) => {
38
+ return (_jsx(TeamRecipientRow, { serviceType: serviceType, onPress: handleNavigateToConversationNew }, serviceType.id));
39
+ } }));
43
40
  };
44
41
  const useStyles = () => {
45
42
  const { bottom } = useSafeAreaInsets();
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_select_teams_i_lead_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,MAAM,EA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AAO,CAAC,CAAC,GAAG,EAAE;gBACZ,MAAM,CAAC,WAAW,EAAE,CAAA;gBACpB,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE;oBACzB,MAAM,EAAE,8BAA8B;oBACtC,MAAM,EAAE;wBACN,eAAe,EAAE,UAAU;wBAC3B,gBAAgB,EAAE,eAAe;4BAC/B,CAAC,CAAC,eAAe,CAAC,UAAU;4BAC5B,CAAC,CAAC,eAAe,CAAC,GAAG;qBACxB;iBACF,CAAC,CAAA;YACJ,CAAC,CAAC,CACF,KAAK,CAAC,cAAc,CACpB,OAAO,CAAC,SAAS,CACjB,YAAY,CAAC,gBAAgB,CAC7B,IAAI,CAAC,IAAI,EAEb;QAAA,EAAE,IAAI,CACR,CAAC,CACD,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAkC,EAAE,EAAE;YACpE,OAAO,CACL,CAAC,gBAAgB,CACf,GAAG,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CACpB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,+BAA+B,CAAC,EACzC,CACH,CAAA;QACH,CAAC,CAAC,EACF,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,aAAa,EAAE,MAAM;SACtB;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,CAAC;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { FlatList, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button, Heading } from '../../components'\nimport { Haptic } from '../../utils/native_adapters'\nimport { useServiceTypesWithTeams } from '../conversation_filter_recipients/hooks/use_service_types_with_teams'\nimport { ServiceTypeWithTeams, TeamFilterTypes } from '../conversation_filter_recipients/types'\nimport { TeamRecipientRow } from './components/team_recipient_row'\nimport { ConversationSelectRecipientsScreenProps } from './types/screen_props'\n\nexport const ConversationSelectTeamsILeadRecipientsScreen = ({\n route,\n}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const { serviceTypes } = useServiceTypesWithTeams()\n const hasServiceTypes = serviceTypes.length > 0\n\n const handleNavigateToConversationNew = (teams: ServiceTypeWithTeams['teams']) => {\n const teamIds = teams.map(team => team.id)\n\n navigation.navigate('New', {\n screen: 'ConversationNew',\n params: {\n ...route.params,\n team_ids: teamIds,\n source_app_name: 'Services',\n },\n })\n }\n\n return (\n <FlatList\n data={serviceTypes}\n keyExtractor={item => item.id.toString()}\n contentContainerStyle={styles.contentContainer}\n ListHeaderComponent={\n <View style={styles.sectionHeader}>\n <Heading variant=\"h3\">Teams I lead</Heading>\n <Button\n onPress={() => {\n Haptic.impactLight()\n navigation.navigate('New', {\n screen: 'ConversationFilterRecipients',\n params: {\n source_app_name: 'Services',\n team_filter_type: hasServiceTypes\n ? TeamFilterTypes.TeamsIlead\n : TeamFilterTypes.All,\n },\n })\n }}\n title=\"Select teams\"\n variant=\"outline\"\n iconNameLeft=\"general.search\"\n size=\"sm\"\n />\n </View>\n }\n renderItem={({ item: serviceType }: { item: ServiceTypeWithTeams }) => {\n return (\n <TeamRecipientRow\n key={serviceType.id}\n serviceType={serviceType}\n onPress={handleNavigateToConversationNew}\n />\n )\n }}\n />\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 16,\n paddingBottom: 4,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_select_teams_i_lead_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sEAAsE,CAAA;AAC/G,OAAO,EAAwB,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAGlE,MAAM,CAAC,MAAM,4CAA4C,GAAG,CAAC,EAC3D,KAAK,GACmC,EAAE,EAAE;IAC5C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,EAAE,YAAY,EAAE,GAAG,wBAAwB,EAAE,CAAA;IACnD,MAAM,eAAe,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,CAAA;IAE/C,MAAM,+BAA+B,GAAG,CAAC,KAAoC,EAAE,EAAE;QAC/E,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAE1C,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE;YACzB,MAAM,EAAE,iBAAiB;YACzB,MAAM,EAAE;gBACN,GAAG,KAAK,CAAC,MAAM;gBACf,QAAQ,EAAE,OAAO;gBACjB,eAAe,EAAE,UAAU;aAC5B;SACF,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,OAAO,CACL,KAAC,QAAQ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,EAAE,CAAC;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { FlatList, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button, Heading } from '../../components'\nimport { Haptic } from '../../utils/native_adapters'\nimport { useServiceTypesWithTeams } from '../conversation_filter_recipients/hooks/use_service_types_with_teams'\nimport { ServiceTypeWithTeams, TeamFilterTypes } from '../conversation_filter_recipients/types'\nimport { TeamRecipientRow } from './components/team_recipient_row'\nimport { ConversationSelectRecipientsScreenProps } from './types/screen_props'\n\nexport const ConversationSelectTeamsILeadRecipientsScreen = ({\n route,\n}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const { serviceTypes } = useServiceTypesWithTeams()\n const hasServiceTypes = serviceTypes.length > 0\n\n const handleNavigateToConversationNew = (teams: ServiceTypeWithTeams['teams']) => {\n const teamIds = teams.map(team => team.id)\n\n navigation.navigate('New', {\n screen: 'ConversationNew',\n params: {\n ...route.params,\n team_ids: teamIds,\n source_app_name: 'Services',\n },\n })\n }\n\n return (\n <FlatList\n data={serviceTypes}\n keyExtractor={item => item.id.toString()}\n contentContainerStyle={styles.contentContainer}\n ListHeaderComponent={\n <View style={styles.sectionHeader}>\n <Heading variant=\"h3\">Teams I lead</Heading>\n <Button\n onPress={() => {\n Haptic.impactLight()\n navigation.navigate('New', {\n screen: 'ConversationFilterRecipients',\n params: {\n source_app_name: 'Services',\n team_filter_type: hasServiceTypes\n ? TeamFilterTypes.TeamsIlead\n : TeamFilterTypes.All,\n },\n })\n }}\n title=\"Select teams\"\n variant=\"outline\"\n iconNameLeft=\"general.search\"\n size=\"sm\"\n />\n </View>\n }\n renderItem={({ item: serviceType }: { item: ServiceTypeWithTeams }) => {\n return (\n <TeamRecipientRow\n key={serviceType.id}\n serviceType={serviceType}\n onPress={handleNavigateToConversationNew}\n />\n )\n }}\n />\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 16,\n paddingBottom: 4,\n },\n })\n}\n"]}