@planningcenter/chat-react-native 3.42.2-qa-staging.2 → 3.42.2-qa-821.0

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 (646) 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 +3 -3
  82. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  83. package/build/components/conversation/messages_disabled_banners.js +5 -8
  84. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  85. package/build/components/conversation/reply_connectors.d.ts +2 -2
  86. package/build/components/conversation/reply_connectors.d.ts.map +1 -1
  87. package/build/components/conversation/reply_connectors.js +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 +12 -76
  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 +2 -4
  126. package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
  127. package/build/components/conversations/unread_count_badge.js +7 -12
  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 +1 -1
  288. package/build/contexts/chat_context.d.ts.map +1 -1
  289. package/build/contexts/chat_context.js +2 -1
  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/use_animated_message_background_color.d.ts +2 -2
  304. package/build/hooks/use_conversation.d.ts +1 -1
  305. package/build/hooks/use_conversation.d.ts.map +1 -1
  306. package/build/hooks/use_conversation.js +0 -2
  307. package/build/hooks/use_conversation.js.map +1 -1
  308. package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
  309. package/build/hooks/use_conversation_jolt_events.js +19 -4
  310. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  311. package/build/hooks/use_conversation_membership.d.ts +1 -1
  312. package/build/hooks/use_conversation_membership.d.ts.map +1 -1
  313. package/build/hooks/use_conversation_messages.d.ts +1 -0
  314. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  315. package/build/hooks/use_conversation_messages.js +2 -2
  316. package/build/hooks/use_conversation_messages.js.map +1 -1
  317. package/build/hooks/use_conversations_actions.d.ts +36 -36
  318. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  319. package/build/hooks/use_conversations_actions.js +1 -3
  320. package/build/hooks/use_conversations_actions.js.map +1 -1
  321. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  322. package/build/hooks/use_mark_latest_message_read.js +4 -3
  323. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  324. package/build/hooks/use_person_settings.d.ts +1 -1
  325. package/build/hooks/use_suspense_api.d.ts.map +1 -1
  326. package/build/hooks/use_suspense_api.js +7 -1
  327. package/build/hooks/use_suspense_api.js.map +1 -1
  328. package/build/index.d.ts +2 -1
  329. package/build/index.d.ts.map +1 -1
  330. package/build/index.js.map +1 -1
  331. package/build/navigation/chat_access_gate.d.ts +2 -2
  332. package/build/navigation/chat_access_gate.d.ts.map +1 -1
  333. package/build/navigation/chat_access_gate.js +6 -5
  334. package/build/navigation/chat_access_gate.js.map +1 -1
  335. package/build/navigation/index.d.ts +35 -36
  336. package/build/navigation/index.d.ts.map +1 -1
  337. package/build/navigation/index.js +19 -21
  338. package/build/navigation/index.js.map +1 -1
  339. package/build/navigation/screenLayout.d.ts +2 -2
  340. package/build/navigation/screenLayout.d.ts.map +1 -1
  341. package/build/navigation/screenLayout.js +3 -9
  342. package/build/navigation/screenLayout.js.map +1 -1
  343. package/build/polyfills/events/EventTarget.d.ts +1 -1
  344. package/build/polyfills/events/EventTarget.d.ts.map +1 -1
  345. package/build/polyfills/events/EventTarget.js.map +1 -1
  346. package/build/screens/age_check/age_check_required_screen.d.ts +1 -2
  347. package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
  348. package/build/screens/age_check/age_check_required_screen.js +3 -46
  349. package/build/screens/age_check/age_check_required_screen.js.map +1 -1
  350. package/build/screens/age_check/age_check_underage_screen.d.ts +1 -2
  351. package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
  352. package/build/screens/age_check/age_check_underage_screen.js +2 -25
  353. package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
  354. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +1 -2
  355. package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
  356. package/build/screens/age_check/components/age_check_select_birthdate_modal.js +6 -25
  357. package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
  358. package/build/screens/attachment_actions/attachment_actions_screen.d.ts +1 -2
  359. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  360. package/build/screens/attachment_actions/attachment_actions_screen.js +3 -5
  361. package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
  362. package/build/screens/avatar_picker/avatar_picker_screen.d.ts +1 -2
  363. package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
  364. package/build/screens/avatar_picker/avatar_picker_screen.js +9 -36
  365. package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
  366. package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
  367. package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
  368. package/build/screens/avatar_picker/avatar_preview.js +5 -9
  369. package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
  370. package/build/screens/avatar_picker/color_picker.d.ts +1 -2
  371. package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
  372. package/build/screens/avatar_picker/color_picker.js +4 -5
  373. package/build/screens/avatar_picker/color_picker.js.map +1 -1
  374. package/build/screens/avatar_picker/emoji_tab.d.ts +1 -2
  375. package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
  376. package/build/screens/avatar_picker/emoji_tab.js +12 -13
  377. package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
  378. package/build/screens/avatar_picker/icon_grid.d.ts +1 -2
  379. package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
  380. package/build/screens/avatar_picker/icon_grid.js +4 -5
  381. package/build/screens/avatar_picker/icon_grid.js.map +1 -1
  382. package/build/screens/avatar_picker/upload_tab.d.ts +1 -2
  383. package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
  384. package/build/screens/avatar_picker/upload_tab.js +3 -4
  385. package/build/screens/avatar_picker/upload_tab.js.map +1 -1
  386. package/build/screens/bug_report_screen.d.ts +1 -2
  387. package/build/screens/bug_report_screen.d.ts.map +1 -1
  388. package/build/screens/bug_report_screen.js +11 -117
  389. package/build/screens/bug_report_screen.js.map +1 -1
  390. package/build/screens/conversation/message_read_receipts_screen.d.ts +1 -2
  391. package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
  392. package/build/screens/conversation/message_read_receipts_screen.js +4 -20
  393. package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
  394. package/build/screens/conversation_details_screen.d.ts +1 -2
  395. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  396. package/build/screens/conversation_details_screen.js +43 -106
  397. package/build/screens/conversation_details_screen.js.map +1 -1
  398. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
  399. package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
  400. package/build/screens/conversation_filter_recipients/components/checkbox_row.js +3 -9
  401. package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
  402. package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
  403. package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
  404. package/build/screens/conversation_filter_recipients/components/header_row.js +2 -12
  405. package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
  406. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -2
  407. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  408. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +20 -44
  409. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
  410. package/build/screens/conversation_filters/components/conversation_filters.d.ts +1 -2
  411. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  412. package/build/screens/conversation_filters/components/conversation_filters.js +10 -11
  413. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  414. package/build/screens/conversation_filters/components/rows.d.ts +6 -6
  415. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  416. package/build/screens/conversation_filters/components/rows.js +7 -34
  417. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  418. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
  419. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  420. package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -1
  421. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  422. package/build/screens/conversation_filters/group_filters.d.ts +1 -2
  423. package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
  424. package/build/screens/conversation_filters/group_filters.js +2 -2
  425. package/build/screens/conversation_filters/group_filters.js.map +1 -1
  426. package/build/screens/conversation_filters/team_filters.d.ts +1 -2
  427. package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
  428. package/build/screens/conversation_filters/team_filters.js +2 -2
  429. package/build/screens/conversation_filters/team_filters.js.map +1 -1
  430. package/build/screens/conversation_filters_screen.d.ts +1 -2
  431. package/build/screens/conversation_filters_screen.d.ts.map +1 -1
  432. package/build/screens/conversation_filters_screen.js +4 -16
  433. package/build/screens/conversation_filters_screen.js.map +1 -1
  434. package/build/screens/conversation_new/components/avatar_selection_row.d.ts +2 -3
  435. package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
  436. package/build/screens/conversation_new/components/avatar_selection_row.js +6 -16
  437. package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
  438. package/build/screens/conversation_new/components/filter_by_plan.d.ts +3 -4
  439. package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
  440. package/build/screens/conversation_new/components/filter_by_plan.js +22 -46
  441. package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
  442. package/build/screens/conversation_new/components/form_list.d.ts +2 -3
  443. package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
  444. package/build/screens/conversation_new/components/form_list.js +4 -6
  445. package/build/screens/conversation_new/components/form_list.js.map +1 -1
  446. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +1 -2
  447. package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
  448. package/build/screens/conversation_new/components/gender_filter_toggle.js +4 -20
  449. package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
  450. package/build/screens/conversation_new/components/groups_form.d.ts +1 -2
  451. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  452. package/build/screens/conversation_new/components/groups_form.js +4 -30
  453. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  454. package/build/screens/conversation_new/components/services_form.d.ts +1 -2
  455. package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
  456. package/build/screens/conversation_new/components/services_form.js +27 -61
  457. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  458. package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
  459. package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
  460. package/build/screens/conversation_new/components/source_app_error_card.js +2 -3
  461. package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
  462. package/build/screens/conversation_new/conversation_new_screen.d.ts +1 -2
  463. package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
  464. package/build/screens/conversation_new/conversation_new_screen.js +4 -4
  465. package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
  466. package/build/screens/conversation_notification_level_select_screen.d.ts +1 -2
  467. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
  468. package/build/screens/conversation_notification_level_select_screen.js +4 -6
  469. package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
  470. package/build/screens/conversation_screen.d.ts +2 -3
  471. package/build/screens/conversation_screen.d.ts.map +1 -1
  472. package/build/screens/conversation_screen.js +25 -66
  473. package/build/screens/conversation_screen.js.map +1 -1
  474. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
  475. package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
  476. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +2 -1
  477. package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
  478. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +1 -2
  479. package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
  480. package/build/screens/conversation_select_recipients/components/recipient_link_row.js +2 -15
  481. package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
  482. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -2
  483. package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
  484. package/build/screens/conversation_select_recipients/components/restricted_group_row.js +2 -14
  485. package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
  486. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
  487. package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
  488. package/build/screens/conversation_select_recipients/components/team_recipient_row.js +2 -1
  489. package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
  490. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
  491. package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
  492. package/build/screens/conversation_select_recipients/components/view_more_link_row.js +2 -5
  493. package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
  494. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +1 -2
  495. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  496. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -11
  497. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  498. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
  499. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  500. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +11 -83
  501. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  502. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +1 -2
  503. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  504. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +7 -14
  505. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  506. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +1 -2
  507. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  508. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +15 -18
  509. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  510. package/build/screens/conversation_select_type_screen.d.ts +1 -2
  511. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  512. package/build/screens/conversation_select_type_screen.js +3 -10
  513. package/build/screens/conversation_select_type_screen.js.map +1 -1
  514. package/build/screens/conversations/components/chat_group_badge.d.ts +1 -2
  515. package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
  516. package/build/screens/conversations/components/chat_group_badge.js +3 -4
  517. package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
  518. package/build/screens/conversations/components/list_header_action_button.d.ts +1 -2
  519. package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
  520. package/build/screens/conversations/components/list_header_action_button.js +3 -5
  521. package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
  522. package/build/screens/conversations/components/list_header_component.d.ts +1 -2
  523. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  524. package/build/screens/conversations/components/list_header_component.js +19 -42
  525. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  526. package/build/screens/conversations/conversations_screen.d.ts +1 -2
  527. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  528. package/build/screens/conversations/conversations_screen.js +2 -6
  529. package/build/screens/conversations/conversations_screen.js.map +1 -1
  530. package/build/screens/design_system_screen.d.ts +1 -2
  531. package/build/screens/design_system_screen.d.ts.map +1 -1
  532. package/build/screens/design_system_screen.js +35 -558
  533. package/build/screens/design_system_screen.js.map +1 -1
  534. package/build/screens/get_help_screen.d.ts +1 -1
  535. package/build/screens/get_help_screen.d.ts.map +1 -1
  536. package/build/screens/get_help_screen.js +4 -25
  537. package/build/screens/get_help_screen.js.map +1 -1
  538. package/build/screens/group_notification_level_select_screen.d.ts +1 -2
  539. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
  540. package/build/screens/group_notification_level_select_screen.js +2 -4
  541. package/build/screens/group_notification_level_select_screen.js.map +1 -1
  542. package/build/screens/group_notification_settings_screen.d.ts +1 -2
  543. package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
  544. package/build/screens/group_notification_settings_screen.js +3 -25
  545. package/build/screens/group_notification_settings_screen.js.map +1 -1
  546. package/build/screens/message_actions_screen.d.ts +1 -2
  547. package/build/screens/message_actions_screen.d.ts.map +1 -1
  548. package/build/screens/message_actions_screen.js +12 -28
  549. package/build/screens/message_actions_screen.js.map +1 -1
  550. package/build/screens/message_report/components/message_preview.d.ts +1 -2
  551. package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
  552. package/build/screens/message_report/components/message_preview.js +2 -22
  553. package/build/screens/message_report/components/message_preview.js.map +1 -1
  554. package/build/screens/message_report/components/report_reason_list.d.ts +1 -2
  555. package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
  556. package/build/screens/message_report/components/report_reason_list.js +4 -13
  557. package/build/screens/message_report/components/report_reason_list.js.map +1 -1
  558. package/build/screens/message_report_screen.d.ts +1 -2
  559. package/build/screens/message_report_screen.d.ts.map +1 -1
  560. package/build/screens/message_report_screen.js +9 -61
  561. package/build/screens/message_report_screen.js.map +1 -1
  562. package/build/screens/not_found.d.ts +1 -2
  563. package/build/screens/not_found.d.ts.map +1 -1
  564. package/build/screens/not_found.js +2 -5
  565. package/build/screens/not_found.js.map +1 -1
  566. package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
  567. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  568. package/build/screens/notification_settings_screen.d.ts +1 -2
  569. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  570. package/build/screens/notification_settings_screen.js +28 -66
  571. package/build/screens/notification_settings_screen.js.map +1 -1
  572. package/build/screens/preferred_app_selection_screen.d.ts +1 -2
  573. package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
  574. package/build/screens/preferred_app_selection_screen.js +3 -21
  575. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  576. package/build/screens/reactions_screen.d.ts +1 -2
  577. package/build/screens/reactions_screen.d.ts.map +1 -1
  578. package/build/screens/reactions_screen.js +7 -19
  579. package/build/screens/reactions_screen.js.map +1 -1
  580. package/build/screens/send_giphy_screen.d.ts +1 -2
  581. package/build/screens/send_giphy_screen.d.ts.map +1 -1
  582. package/build/screens/send_giphy_screen.js +5 -31
  583. package/build/screens/send_giphy_screen.js.map +1 -1
  584. package/build/screens/settings_screen.d.ts +1 -2
  585. package/build/screens/settings_screen.d.ts.map +1 -1
  586. package/build/screens/settings_screen.js +4 -26
  587. package/build/screens/settings_screen.js.map +1 -1
  588. package/build/screens/system_message_people_screen.d.ts +1 -2
  589. package/build/screens/system_message_people_screen.d.ts.map +1 -1
  590. package/build/screens/system_message_people_screen.js +4 -10
  591. package/build/screens/system_message_people_screen.js.map +1 -1
  592. package/build/screens/team_conversation_screen.d.ts +1 -1
  593. package/build/screens/team_conversation_screen.d.ts.map +1 -1
  594. package/build/screens/team_conversation_screen.js +4 -12
  595. package/build/screens/team_conversation_screen.js.map +1 -1
  596. package/build/types/resources/conversation.d.ts +1 -10
  597. package/build/types/resources/conversation.d.ts.map +1 -1
  598. package/build/types/resources/conversation.js.map +1 -1
  599. package/build/utils/client/client.d.ts.map +1 -1
  600. package/build/utils/client/client.js +1 -2
  601. package/build/utils/client/client.js.map +1 -1
  602. package/build/utils/request/conversation.d.ts.map +1 -1
  603. package/build/utils/request/conversation.js +0 -2
  604. package/build/utils/request/conversation.js.map +1 -1
  605. package/build/utils/response_error.d.ts +0 -1
  606. package/build/utils/response_error.d.ts.map +1 -1
  607. package/build/utils/response_error.js +1 -10
  608. package/build/utils/response_error.js.map +1 -1
  609. package/build/utils/sha_256.js.map +1 -1
  610. package/build/utils/system_messages.d.ts +1 -1
  611. package/build/utils/system_messages.d.ts.map +1 -1
  612. package/build/utils/system_messages.js.map +1 -1
  613. package/build/utils/theme.d.ts +2 -2
  614. package/build/utils/theme.d.ts.map +1 -1
  615. package/build/utils/theme.js.map +1 -1
  616. package/package.json +12 -12
  617. package/src/__tests__/hooks/use_attachment_uploader.test.tsx +1 -0
  618. package/src/__tests__/hooks/use_font_scale.test.ts +7 -3
  619. package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
  620. package/src/__tests__/utils/system_messages.ts +1 -1
  621. package/src/__tests__/utils/uri.ts +8 -50
  622. package/src/__utils__/handlers.ts +5 -6
  623. package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +10 -3
  624. package/src/components/conversations/conversation_preview.tsx +23 -58
  625. package/src/components/conversations/unread_count_badge.tsx +4 -13
  626. package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
  627. package/src/components/page/__tests__/error_boundary.test.tsx +6 -2
  628. package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
  629. package/src/hooks/use_conversation.ts +0 -2
  630. package/src/hooks/use_conversation_jolt_events.ts +19 -3
  631. package/src/hooks/use_conversation_messages.ts +6 -5
  632. package/src/hooks/use_conversations_actions.ts +1 -3
  633. package/src/hooks/use_mark_latest_message_read.ts +4 -3
  634. package/src/hooks/use_suspense_api.ts +9 -1
  635. package/src/index.tsx +2 -1
  636. package/src/polyfills/events/EventTarget.ts +1 -1
  637. package/src/screens/conversation_screen.tsx +4 -2
  638. package/src/screens/conversations/components/list_header_component.tsx +6 -6
  639. package/src/types/resources/conversation.ts +1 -11
  640. package/src/utils/client/client.ts +1 -2
  641. package/src/utils/request/conversation.ts +0 -2
  642. package/src/utils/response_error.ts +1 -12
  643. package/src/utils/sha_256.ts +24 -24
  644. package/src/utils/system_messages.ts +1 -1
  645. package/src/utils/theme.ts +3 -2
  646. package/src/utils/__tests__/response_error.test.ts +0 -40
@@ -1 +1 @@
1
- {"version":3,"file":"preferred_app_selection_screen.js","sourceRoot":"","sources":["../../src/screens/preferred_app_selection_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAiC,MAAM,OAAO,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAgB,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAQjF,MAAM,UAAU,2BAA2B,CAAC,EAAE,KAAK,EAAoC;IACrF,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,MAAM,CAAA;IACnC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,YAAY,EAAE,CAAA;IACrE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAE5B,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,WAAW,C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C;KACjB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,CAAC;KAChB;CACF,CAAC,CAAA;AAEF,MAAM,YAAY,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,KAA6B,EAAE,EAAE,EAAE;IACzE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IAExB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,WAAW,EAAE,EAAE;YACf,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,eAAe;SAC9C;QACD,GAAG,EAAE;YACH,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,GAAG,EAAE,EAAE;YACP,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,sBAAsB;YACtD,eAAe,EAAE,EAAE;YACnB,YAAY,EAAE,EAAE;SACjB;QACD,QAAQ,EAAE;YACR,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,CAAC;SACd;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,iBAAiB;YACrC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1B;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps } from '@react-navigation/native'\nimport { useMutation } from '@tanstack/react-query'\nimport React, { type PropsWithChildren } from 'react'\nimport { Image, StyleSheet, View, type ViewStyle } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { useApiClient, useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { chatTypeLabel } from '../utils'\nimport { throwResponseError } from '../utils/response_error'\nimport { PreferredApp, useChatTypes } from './preferred_app/hooks/use_chat_types'\n\nexport type PreferredAppSelectionScreenProps = StaticScreenProps<{\n chatTypeId: number | string\n conversationType?: 'group' | 'team'\n currentSelection?: PreferredApp\n}>\n\nexport function PreferredAppSelectionScreen({ route }: PreferredAppSelectionScreenProps) {\n const { chatTypeId } = route.params\n const { data: chatTypes, refetch: refetchChatTypes } = useChatTypes()\n const appName = useAppName()\n\n const apiClient = useApiClient()\n\n const { mutate: updateChatType } = useMutation({\n throwOnError: true,\n onSuccess: () => refetchChatTypes(),\n mutationFn: (app: PreferredApp) => {\n return apiClient.chat\n .post({\n url: `/me/chat_types/${chatTypeId}/set_preferred_app`,\n data: { data: { type: 'ChatType', attributes: { app } } },\n })\n .catch(throwResponseError)\n },\n })\n const chatType = chatTypes.find(t => t.id === chatTypeId)\n const { preferredAppOptions } = chatType || {}\n\n const handleSelection = (app: PreferredApp) => {\n updateChatType(app)\n }\n\n const sectionTitle = chatType ? chatTypeLabel(chatType.title) : undefined\n\n return (\n <View style={styles.container}>\n <View style={styles.section}>\n <Heading variant=\"h2\" style={styles.sectionHeading}>\n {sectionTitle}\n </Heading>\n {preferredAppOptions?.sort(sortPreferredApp('asc')).map((option, key) => (\n <PressableRow\n key={`${key}-${option}`}\n isActive={chatType?.preferredApp === option}\n onPress={() => handleSelection(option)}\n >\n <Image source={getAppImage(option)} style={styles.logo} />\n <Text>\n {option}\n {appName.includes(option.replace(/\\s/, '').toLowerCase()) ? ' ( current )' : ''}\n </Text>\n </PressableRow>\n ))}\n </View>\n </View>\n )\n}\n\nconst sortPreferredApp = (dir?: 'asc' | 'desc') => (a: PreferredApp, b: PreferredApp) => {\n if (a === 'None') return 1\n if (a > b) return dir === 'asc' ? 1 : -1\n if (b > a) return dir === 'asc' ? -1 : 1\n\n return 0\n}\n\nconst getAppImage = (option: PreferredApp) => {\n switch (option) {\n case 'Church Center':\n return require('../../assets/churchCenter.png')\n case 'Services':\n return require('../../assets/servicesApp.png')\n case 'Chat':\n return require('../../assets/chatLogo.png')\n default:\n return undefined\n }\n}\n\nconst PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n}: PropsWithChildren<{ isActive: boolean; onPress: () => void; style?: ViewStyle }>) => {\n const styles = useRowStyles({ isActive })\n return (\n <PlatformPressable\n style={styles.pressable}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={styles.row}>\n <View style={[styles.rowInner, style]}>{children}</View>\n <Icon\n name=\"general.check\"\n style={styles.rowIconRight}\n accessibilityElementsHidden\n maxFontSizeMultiplier={2.5}\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n section: {\n paddingTop: 24,\n },\n sectionHeading: {\n paddingHorizontal: 16,\n paddingBottom: 4,\n },\n logo: {\n width: 32,\n height: 32,\n borderRadius: 8,\n },\n})\n\nconst useRowStyles = ({ isActive = false }: { isActive?: boolean } = {}) => {\n const theme = useTheme()\n\n return StyleSheet.create({\n pressable: {\n paddingLeft: 16,\n backgroundColor: theme.colors.surfaceColor100,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.borderColorDefaultBase,\n paddingVertical: 12,\n paddingRight: 16,\n },\n rowInner: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n flexShrink: 1,\n },\n rowIconRight: {\n fontSize: 16,\n color: theme.colors.statusSuccessIcon,\n opacity: isActive ? 1 : 0,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"preferred_app_selection_screen.js","sourceRoot":"","sources":["../../src/screens/preferred_app_selection_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,E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{ PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps } from '@react-navigation/native'\nimport { useMutation } from '@tanstack/react-query'\nimport React, { type PropsWithChildren } from 'react'\nimport { Image, StyleSheet, View, type ViewStyle } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { useApiClient, useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { chatTypeLabel } from '../utils'\nimport { throwResponseError } from '../utils/response_error'\nimport { PreferredApp, useChatTypes } from './preferred_app/hooks/use_chat_types'\n\nexport type PreferredAppSelectionScreenProps = StaticScreenProps<{\n chatTypeId: number | string\n conversationType?: 'group' | 'team'\n currentSelection?: PreferredApp\n}>\n\nexport function PreferredAppSelectionScreen({ route }: PreferredAppSelectionScreenProps) {\n const { chatTypeId } = route.params\n const { data: chatTypes, refetch: refetchChatTypes } = useChatTypes()\n const appName = useAppName()\n\n const apiClient = useApiClient()\n\n const { mutate: updateChatType } = useMutation({\n throwOnError: true,\n onSuccess: () => refetchChatTypes(),\n mutationFn: (app: PreferredApp) => {\n return apiClient.chat\n .post({\n url: `/me/chat_types/${chatTypeId}/set_preferred_app`,\n data: { data: { type: 'ChatType', attributes: { app } } },\n })\n .catch(throwResponseError)\n },\n })\n const chatType = chatTypes.find(t => t.id === chatTypeId)\n const { preferredAppOptions } = chatType || {}\n\n const handleSelection = (app: PreferredApp) => {\n updateChatType(app)\n }\n\n const sectionTitle = chatType ? chatTypeLabel(chatType.title) : undefined\n\n return (\n <View style={styles.container}>\n <View style={styles.section}>\n <Heading variant=\"h2\" style={styles.sectionHeading}>\n {sectionTitle}\n </Heading>\n {preferredAppOptions?.sort(sortPreferredApp('asc')).map((option, key) => (\n <PressableRow\n key={`${key}-${option}`}\n isActive={chatType?.preferredApp === option}\n onPress={() => handleSelection(option)}\n >\n <Image source={getAppImage(option)} style={styles.logo} />\n <Text>\n {option}\n {appName.includes(option.replace(/\\s/, '').toLowerCase()) ? ' ( current )' : ''}\n </Text>\n </PressableRow>\n ))}\n </View>\n </View>\n )\n}\n\nconst sortPreferredApp = (dir?: 'asc' | 'desc') => (a: PreferredApp, b: PreferredApp) => {\n if (a === 'None') return 1\n if (a > b) return dir === 'asc' ? 1 : -1\n if (b > a) return dir === 'asc' ? -1 : 1\n\n return 0\n}\n\nconst getAppImage = (option: PreferredApp) => {\n switch (option) {\n case 'Church Center':\n return require('../../assets/churchCenter.png')\n case 'Services':\n return require('../../assets/servicesApp.png')\n case 'Chat':\n return require('../../assets/chatLogo.png')\n default:\n return undefined\n }\n}\n\nconst PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n}: PropsWithChildren<{ isActive: boolean; onPress: () => void; style?: ViewStyle }>) => {\n const styles = useRowStyles({ isActive })\n return (\n <PlatformPressable\n style={styles.pressable}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={styles.row}>\n <View style={[styles.rowInner, style]}>{children}</View>\n <Icon\n name=\"general.check\"\n style={styles.rowIconRight}\n accessibilityElementsHidden\n maxFontSizeMultiplier={2.5}\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n section: {\n paddingTop: 24,\n },\n sectionHeading: {\n paddingHorizontal: 16,\n paddingBottom: 4,\n },\n logo: {\n width: 32,\n height: 32,\n borderRadius: 8,\n },\n})\n\nconst useRowStyles = ({ isActive = false }: { isActive?: boolean } = {}) => {\n const theme = useTheme()\n\n return StyleSheet.create({\n pressable: {\n paddingLeft: 16,\n backgroundColor: theme.colors.surfaceColor100,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.borderColorDefaultBase,\n paddingVertical: 12,\n paddingRight: 16,\n },\n rowInner: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n flexShrink: 1,\n },\n rowIconRight: {\n fontSize: 16,\n color: theme.colors.statusSuccessIcon,\n opacity: isActive ? 1 : 0,\n },\n })\n}\n"]}
@@ -1,10 +1,9 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
- import React from 'react';
3
2
  export declare const ReactionsScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
4
3
  export type ReactionScreenProps = StaticScreenProps<{
5
4
  message_id: string;
6
5
  conversation_id: number;
7
6
  reaction_value?: string;
8
7
  }>;
9
- export declare function ReactionsScreen({ route }: ReactionScreenProps): React.JSX.Element;
8
+ export declare function ReactionsScreen({ route }: ReactionScreenProps): import("react/jsx-runtime").JSX.Element;
10
9
  //# sourceMappingURL=reactions_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reactions_screen.d.ts","sourceRoot":"","sources":["../../src/screens/reactions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAe,MAAM,OAAO,CAAA;AAcnC,eAAO,MAAM,sBAAsB,uEAMjC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IAClD,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,qBAkE7D"}
1
+ {"version":3,"file":"reactions_screen.d.ts","sourceRoot":"","sources":["../../src/screens/reactions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAe5D,eAAO,MAAM,sBAAsB,uEAMjC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IAClD,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAkE7D"}
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React, { memo } from 'react';
2
3
  import { Platform, StyleSheet, View } from 'react-native';
3
4
  import { FlatList } from 'react-native-gesture-handler';
@@ -40,33 +41,20 @@ export function ReactionsScreen({ route }) {
40
41
  },
41
42
  });
42
43
  if (!reactionCount) {
43
- return (<View style={styles.errorContainer}>
44
- <Text>No reactions found for this message.</Text>
45
- </View>);
44
+ return (_jsx(View, { style: styles.errorContainer, children: _jsx(Text, { children: "No reactions found for this message." }) }));
46
45
  }
47
46
  const authors = members.filter(member => authorIds.includes(member.id));
48
- return (<FormSheet.Root contentStyle={styles.formSheetContent}>
49
- <Tabs data={reactionCounts} activeTab={reactionCount} onTabPress={item => {
50
- setReactionCountValue(item.value);
51
- }} renderItem={({ item }) => (<Reaction active={reactionCount.id === item.id} reaction={item} onPress={() => setReactionCountValue(item.value)}/>)} style={styles.actions}/>
52
- <FlatList data={authors} contentContainerStyle={styles.contentContainer} keyExtractor={item => item.id.toString()} renderItem={({ item: author }) => <Author author={author} key={author.id}/>}/>
53
- </FormSheet.Root>);
47
+ return (_jsxs(FormSheet.Root, { contentStyle: styles.formSheetContent, children: [_jsx(Tabs, { data: reactionCounts, activeTab: reactionCount, onTabPress: item => {
48
+ setReactionCountValue(item.value);
49
+ }, renderItem: ({ item }) => (_jsx(Reaction, { active: reactionCount.id === item.id, reaction: item, onPress: () => setReactionCountValue(item.value) })), style: styles.actions }), _jsx(FlatList, { data: authors, contentContainerStyle: styles.contentContainer, keyExtractor: item => item.id.toString(), renderItem: ({ item: author }) => _jsx(Author, { author: author }, author.id) })] }));
54
50
  }
55
51
  const Reaction = ({ reaction, }) => {
56
52
  const styles = useStyles();
57
- return (<View key={reaction.value} style={styles.reaction}>
58
- <Text style={styles.reactionContent}>{REACTION_EMOJIS[reaction.value]}</Text>
59
- <Text style={styles.reactionContent}>{reaction.count}</Text>
60
- </View>);
53
+ return (_jsxs(View, { style: styles.reaction, children: [_jsx(Text, { style: styles.reactionContent, children: REACTION_EMOJIS[reaction.value] }), _jsx(Text, { style: styles.reactionContent, children: reaction.count })] }, reaction.value));
61
54
  };
62
55
  const Author = memo(({ author }) => {
63
56
  const styles = useStyles();
64
- return (<View style={styles.authorRow}>
65
- <Avatar sourceUri={author.avatar} size="sm"/>
66
- <Text variant="tertiary" numberOfLines={2} style={styles.authorName}>
67
- {author.name}
68
- </Text>
69
- </View>);
57
+ return (_jsxs(View, { style: styles.authorRow, children: [_jsx(Avatar, { sourceUri: author.avatar, size: "sm" }), _jsx(Text, { variant: "tertiary", numberOfLines: 2, style: styles.authorName, children: author.name })] }));
70
58
  });
71
59
  const TABS_HEIGHT = 67;
72
60
  const useStyles = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"reactions_screen.js","sourceRoot":"","sources":["../../src/screens/reactions_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AACjD,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAGtD,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CA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G,EAAE,CAAC;SACP;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,wBAAwB;SACrC;QACD,OAAO,EAAE;YACP,SAAS,EAAE,EAAE,GAAG,SAAS;YACzB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;YAChD,iBAAiB,EAAE,CAAC;SACrB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;YACP,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;SACd;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport React, { memo } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Avatar, Text } from '../components'\nimport { Tabs } from '../components/display/tabs'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useSuspenseGet, useTheme } from '../hooks'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { useFontScale } from '../hooks/use_font_scale'\nimport { MemberResource } from '../types'\nimport { ReactionCountResource } from '../types/resources/reaction'\nimport { platformFontWeightMedium, REACTION_EMOJIS } from '../utils'\n\nexport const ReactionsScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: Platform.select({\n android: [0.5, 0.94], // Going straight to full 0.94 preserves height of screen on Android\n default: [0.5, 1],\n }),\n headerTitle: 'Reactions',\n})\n\nexport type ReactionScreenProps = StaticScreenProps<{\n message_id: string\n conversation_id: number\n reaction_value?: string\n}>\n\nexport function ReactionsScreen({ route }: ReactionScreenProps) {\n const { conversation_id, message_id, reaction_value } = route.params\n const styles = useStyles()\n\n const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false })\n\n const message = messages.find(m => m.id === message_id)\n const reactionCounts = message?.reactionCounts || []\n const initialReactionCount =\n reactionCounts.find(r => r.value === reaction_value) || reactionCounts[0]\n const [reactionCountValue, setReactionCountValue] = React.useState<\n ReactionCountResource['value']\n >(initialReactionCount?.value)\n const reactionCount = reactionCounts.find(r => r.value === reactionCountValue)\n\n // Get author IDs for the API call, ensuring we have a valid array\n const authorIds = reactionCount?.authorIds || []\n\n const { data: members } = useSuspenseGet<MemberResource[]>({\n url: `/me/conversations/${conversation_id}/members`,\n data: {\n fields: {\n Member: ['id', 'name', 'avatar', 'badges', 'child', 'role'],\n },\n where: {\n id: authorIds,\n },\n limit: authorIds.length,\n },\n })\n\n if (!reactionCount) {\n return (\n <View style={styles.errorContainer}>\n <Text>No reactions found for this message.</Text>\n </View>\n )\n }\n\n const authors = members.filter(member => authorIds.includes(member.id))\n\n return (\n <FormSheet.Root contentStyle={styles.formSheetContent}>\n <Tabs\n data={reactionCounts}\n activeTab={reactionCount}\n onTabPress={item => {\n setReactionCountValue(item.value)\n }}\n renderItem={({ item }) => (\n <Reaction\n active={reactionCount.id === item.id}\n reaction={item}\n onPress={() => setReactionCountValue(item.value)}\n />\n )}\n style={styles.actions}\n />\n <FlatList\n data={authors}\n contentContainerStyle={styles.contentContainer}\n keyExtractor={item => item.id.toString()}\n renderItem={({ item: author }) => <Author author={author} key={author.id} />}\n />\n </FormSheet.Root>\n )\n}\n\nconst Reaction = ({\n reaction,\n}: {\n active: boolean\n reaction: ReactionCountResource\n onPress: () => void\n}) => {\n const styles = useStyles()\n\n return (\n <View key={reaction.value} style={styles.reaction}>\n <Text style={styles.reactionContent}>{REACTION_EMOJIS[reaction.value]}</Text>\n <Text style={styles.reactionContent}>{reaction.count}</Text>\n </View>\n )\n}\n\ntype AuthorProps = Pick<MemberResource, 'id' | 'name' | 'avatar'>\n\nconst Author = memo(({ author }: { author: AuthorProps }) => {\n const styles = useStyles()\n\n return (\n <View style={styles.authorRow}>\n <Avatar sourceUri={author.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" numberOfLines={2} style={styles.authorName}>\n {author.name}\n </Text>\n </View>\n )\n})\n\nconst TABS_HEIGHT = 67\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n const fontScale = useFontScale({ maxFontSizeMultiplier: 1.3 })\n\n return StyleSheet.create({\n formSheetContent: {\n paddingTop: 16,\n },\n contentContainer: {\n paddingTop: 8,\n paddingBottom: bottom + Platform.select({ android: 24, default: TABS_HEIGHT + 24 }),\n },\n authorRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n paddingVertical: 8,\n paddingHorizontal: 16,\n flex: 1,\n },\n authorName: {\n flex: 1,\n },\n reaction: {\n paddingHorizontal: 8,\n paddingVertical: 16,\n flexDirection: 'row',\n gap: 4,\n },\n reactionContent: {\n fontSize: 18,\n fontWeight: platformFontWeightMedium,\n },\n actions: {\n minHeight: 68 * fontScale,\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: 1,\n },\n errorContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 16,\n marginTop: 30,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"reactions_screen.js","sourceRoot":"","sources":["../../src/screens/reactions_screen.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AACjD,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE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;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport React, { memo } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Avatar, Text } from '../components'\nimport { Tabs } from '../components/display/tabs'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useSuspenseGet, useTheme } from '../hooks'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { useFontScale } from '../hooks/use_font_scale'\nimport { MemberResource } from '../types'\nimport { ReactionCountResource } from '../types/resources/reaction'\nimport { platformFontWeightMedium, REACTION_EMOJIS } from '../utils'\n\nexport const ReactionsScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: Platform.select({\n android: [0.5, 0.94], // Going straight to full 0.94 preserves height of screen on Android\n default: [0.5, 1],\n }),\n headerTitle: 'Reactions',\n})\n\nexport type ReactionScreenProps = StaticScreenProps<{\n message_id: string\n conversation_id: number\n reaction_value?: string\n}>\n\nexport function ReactionsScreen({ route }: ReactionScreenProps) {\n const { conversation_id, message_id, reaction_value } = route.params\n const styles = useStyles()\n\n const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false })\n\n const message = messages.find(m => m.id === message_id)\n const reactionCounts = message?.reactionCounts || []\n const initialReactionCount =\n reactionCounts.find(r => r.value === reaction_value) || reactionCounts[0]\n const [reactionCountValue, setReactionCountValue] = React.useState<\n ReactionCountResource['value']\n >(initialReactionCount?.value)\n const reactionCount = reactionCounts.find(r => r.value === reactionCountValue)\n\n // Get author IDs for the API call, ensuring we have a valid array\n const authorIds = reactionCount?.authorIds || []\n\n const { data: members } = useSuspenseGet<MemberResource[]>({\n url: `/me/conversations/${conversation_id}/members`,\n data: {\n fields: {\n Member: ['id', 'name', 'avatar', 'badges', 'child', 'role'],\n },\n where: {\n id: authorIds,\n },\n limit: authorIds.length,\n },\n })\n\n if (!reactionCount) {\n return (\n <View style={styles.errorContainer}>\n <Text>No reactions found for this message.</Text>\n </View>\n )\n }\n\n const authors = members.filter(member => authorIds.includes(member.id))\n\n return (\n <FormSheet.Root contentStyle={styles.formSheetContent}>\n <Tabs\n data={reactionCounts}\n activeTab={reactionCount}\n onTabPress={item => {\n setReactionCountValue(item.value)\n }}\n renderItem={({ item }) => (\n <Reaction\n active={reactionCount.id === item.id}\n reaction={item}\n onPress={() => setReactionCountValue(item.value)}\n />\n )}\n style={styles.actions}\n />\n <FlatList\n data={authors}\n contentContainerStyle={styles.contentContainer}\n keyExtractor={item => item.id.toString()}\n renderItem={({ item: author }) => <Author author={author} key={author.id} />}\n />\n </FormSheet.Root>\n )\n}\n\nconst Reaction = ({\n reaction,\n}: {\n active: boolean\n reaction: ReactionCountResource\n onPress: () => void\n}) => {\n const styles = useStyles()\n\n return (\n <View key={reaction.value} style={styles.reaction}>\n <Text style={styles.reactionContent}>{REACTION_EMOJIS[reaction.value]}</Text>\n <Text style={styles.reactionContent}>{reaction.count}</Text>\n </View>\n )\n}\n\ntype AuthorProps = Pick<MemberResource, 'id' | 'name' | 'avatar'>\n\nconst Author = memo(({ author }: { author: AuthorProps }) => {\n const styles = useStyles()\n\n return (\n <View style={styles.authorRow}>\n <Avatar sourceUri={author.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" numberOfLines={2} style={styles.authorName}>\n {author.name}\n </Text>\n </View>\n )\n})\n\nconst TABS_HEIGHT = 67\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n const fontScale = useFontScale({ maxFontSizeMultiplier: 1.3 })\n\n return StyleSheet.create({\n formSheetContent: {\n paddingTop: 16,\n },\n contentContainer: {\n paddingTop: 8,\n paddingBottom: bottom + Platform.select({ android: 24, default: TABS_HEIGHT + 24 }),\n },\n authorRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n paddingVertical: 8,\n paddingHorizontal: 16,\n flex: 1,\n },\n authorName: {\n flex: 1,\n },\n reaction: {\n paddingHorizontal: 8,\n paddingVertical: 16,\n flexDirection: 'row',\n gap: 4,\n },\n reactionContent: {\n fontSize: 18,\n fontWeight: platformFontWeightMedium,\n },\n actions: {\n minHeight: 68 * fontScale,\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: 1,\n },\n errorContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n padding: 16,\n marginTop: 30,\n },\n })\n}\n"]}
@@ -1,9 +1,8 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
- import React from 'react';
3
2
  export declare const SendGiphyScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
4
3
  export type SendGiphyScreenProps = StaticScreenProps<{
5
4
  conversation_id: number;
6
5
  search_term: string;
7
6
  }>;
8
- export declare function SendGiphyScreen({ route }: SendGiphyScreenProps): React.JSX.Element;
7
+ export declare function SendGiphyScreen({ route }: SendGiphyScreenProps): import("react/jsx-runtime").JSX.Element;
9
8
  //# sourceMappingURL=send_giphy_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"send_giphy_screen.d.ts","sourceRoot":"","sources":["../../src/screens/send_giphy_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,eAAO,MAAM,sBAAsB,uEAGjC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACnD,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC,CAAA;AAEF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,qBA6G9D"}
1
+ {"version":3,"file":"send_giphy_screen.d.ts","sourceRoot":"","sources":["../../src/screens/send_giphy_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAYzF,eAAO,MAAM,sBAAsB,uEAGjC,CAAA;AAEF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;IACnD,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC,CAAA;AAEF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CA6G9D"}
@@ -1,5 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { StackActions, useNavigation } from '@react-navigation/native';
2
- import React from 'react';
3
3
  import { Image as NativeImage, Platform, StyleSheet, useWindowDimensions, View } from 'react-native';
4
4
  import { Button, IconButton, TextButton } from '../components';
5
5
  import { DefaultLoading } from '../components/page/loading';
@@ -25,16 +25,7 @@ export function SendGiphyScreen({ route }) {
25
25
  const { width } = useWindowDimensions();
26
26
  const size = width - 24;
27
27
  if (!result)
28
- return (<FormSheet.Root contentStyle={styles.blankStateContainer}>
29
- <BlankState.Root style={styles.blankState}>
30
- <BlankState.Imagery name="general.bolt"/>
31
- <BlankState.Content>
32
- <BlankState.Heading>No Giphys found</BlankState.Heading>
33
- <BlankState.Text>Try a different search term.</BlankState.Text>
34
- </BlankState.Content>
35
- <BlankState.Button onPress={() => navigation.goBack()} title="Close"/>
36
- </BlankState.Root>
37
- </FormSheet.Root>);
28
+ return (_jsx(FormSheet.Root, { contentStyle: styles.blankStateContainer, children: _jsxs(BlankState.Root, { style: styles.blankState, children: [_jsx(BlankState.Imagery, { name: "general.bolt" }), _jsxs(BlankState.Content, { children: [_jsx(BlankState.Heading, { children: "No Giphys found" }), _jsx(BlankState.Text, { children: "Try a different search term." })] }), _jsx(BlankState.Button, { onPress: () => navigation.goBack(), title: "Close" })] }) }));
38
29
  const gif = result.giphy.fixed_width;
39
30
  const { url } = gif;
40
31
  function goBack({ clearInput = false }) {
@@ -57,34 +48,17 @@ export function SendGiphyScreen({ route }) {
57
48
  mutate({ text: '', attachments: [result] });
58
49
  goBack({ clearInput: true });
59
50
  }
60
- return (<FormSheet.Root contentStyle={styles.container}>
61
- <View style={styles.poweredByGiphyContainer}>
62
- <NativeImage alt="Powered by Giphy" style={styles.poweredByGiphyImage} source={{ uri: poweredByGiphyImage }}/>
63
- </View>
64
- <View style={styles.controlToolbar} accessibilityRole="toolbar">
65
- <View style={styles.paginateButtonGroup}>
66
- <PaginateButton name="general.leftArrow" accessibilityLabel="Previous Giphy" onPress={prevResult} disabled={disabled}/>
67
- <PaginateButton name="general.rightArrow" accessibilityLabel="Next GIF" onPress={nextResult} disabled={disabled}/>
68
- </View>
69
- <View style={styles.formButtonGroup}>
70
- <TextButton onPress={() => goBack({ clearInput: false })} maxFontSizeMultiplier={1} accessibilityHint="Cancels the Giphy selection and closes this modal.">
71
- Cancel
72
- </TextButton>
73
- <Button onPress={sendGiphy} title="Send" size="lg" disabled={disabled} maxFontSizeMultiplier={1} accessibilityLabel="Send Giphy" accessibilityHint="Sends the selected Giphy as a message to the conversation."/>
74
- </View>
75
- </View>
76
- {isSearching ? (<DefaultLoading />) : (<NativeImage source={{ uri: url }} alt={result.title} style={[styles.image, { width: size, height: size }]}/>)}
77
- </FormSheet.Root>);
51
+ return (_jsxs(FormSheet.Root, { contentStyle: styles.container, children: [_jsx(View, { style: styles.poweredByGiphyContainer, children: _jsx(NativeImage, { alt: "Powered by Giphy", style: styles.poweredByGiphyImage, source: { uri: poweredByGiphyImage } }) }), _jsxs(View, { style: styles.controlToolbar, accessibilityRole: "toolbar", children: [_jsxs(View, { style: styles.paginateButtonGroup, children: [_jsx(PaginateButton, { name: "general.leftArrow", accessibilityLabel: "Previous Giphy", onPress: prevResult, disabled: disabled }), _jsx(PaginateButton, { name: "general.rightArrow", accessibilityLabel: "Next GIF", onPress: nextResult, disabled: disabled })] }), _jsxs(View, { style: styles.formButtonGroup, children: [_jsx(TextButton, { onPress: () => goBack({ clearInput: false }), maxFontSizeMultiplier: 1, accessibilityHint: "Cancels the Giphy selection and closes this modal.", children: "Cancel" }), _jsx(Button, { onPress: sendGiphy, title: "Send", size: "lg", disabled: disabled, maxFontSizeMultiplier: 1, accessibilityLabel: "Send Giphy", accessibilityHint: "Sends the selected Giphy as a message to the conversation." })] })] }), isSearching ? (_jsx(DefaultLoading, {})) : (_jsx(NativeImage, { source: { uri: url }, alt: result.title, style: [styles.image, { width: size, height: size }] }))] }));
78
52
  }
79
53
  function PaginateButton({ name, accessibilityLabel, onPress, disabled }) {
80
54
  const styles = useStyles();
81
55
  const { colors } = useTheme();
82
56
  const androidRippleColor = useCreateAndroidRippleColor({ color: colors.interaction });
83
- return (<IconButton name={name} accessibilityLabel={accessibilityLabel} size="md" appearance="interaction" onPress={onPress} disabled={disabled} style={[styles.paginateButton, disabled && styles.paginateButtonDisabled]} android_ripple={{
57
+ return (_jsx(IconButton, { name: name, accessibilityLabel: accessibilityLabel, size: "md", appearance: "interaction", onPress: onPress, disabled: disabled, style: [styles.paginateButton, disabled && styles.paginateButtonDisabled], android_ripple: {
84
58
  color: androidRippleColor,
85
59
  borderless: true,
86
60
  foreground: true,
87
- }} maxFontSizeMultiplier={1}/>);
61
+ }, maxFontSizeMultiplier: 1 }));
88
62
  }
89
63
  const useStyles = () => {
90
64
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"send_giphy_screen.js","sourceRoot":"","sources":["../../src/screens/send_giphy_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACpG,OAAO,EAAE,MAAM,EAAE,UAAU,EAAc,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,UAAU,MAAM,+CAA+C,CAAA;A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,CAAC;SACP;QACD,cAAc,EAAE;YACd,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,WAAW,EAAE,CAAC;YACd,MAAM,EAAE,EAAE;YACV,iBAAiB,EAAE,EAAE;YACrB,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,QAAQ;SACnB;QACD,sBAAsB,EAAE;YACtB,eAAe,EAAE,MAAM,CAAC,mCAAmC;YAC3D,WAAW,EAAE,MAAM,CAAC,mCAAmC;SACxD;QACD,KAAK,EAAE;YACL,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,MAAM;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;6CA2BiB,CAAA","sourcesContent":["import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { Image as NativeImage, Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { Button, IconButton, IconString, TextButton } from '../components'\nimport { DefaultLoading } from '../components/page/loading'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useCreateAndroidRippleColor, useTheme } from '../hooks'\nimport { useGiphy } from '../hooks/use_giphy'\nimport { useMessageCreateOrUpdate } from '../hooks/use_message_create_or_update'\nimport { tokens } from '../vendor/tapestry/tokens'\n\nexport const SendGiphyScreenOptions = getFormSheetScreenOptions({\n headerTitle: 'Send Giphy',\n sheetAllowedDetents: Platform.select({ android: [0.7, 0.94], default: [0.7, 1] }),\n})\n\nexport type SendGiphyScreenProps = StaticScreenProps<{\n conversation_id: number\n search_term: string\n}>\n\nexport function SendGiphyScreen({ route }: SendGiphyScreenProps) {\n const { conversation_id, search_term } = route.params\n const styles = useStyles()\n const navigation = useNavigation()\n\n const { isPending, mutate } = useMessageCreateOrUpdate({\n conversationId: conversation_id,\n })\n const { isSearching, result, nextResult, prevResult } = useGiphy(search_term)\n const disabled = isPending || isSearching\n\n const { width } = useWindowDimensions()\n const size = width - 24\n\n if (!result)\n return (\n <FormSheet.Root contentStyle={styles.blankStateContainer}>\n <BlankState.Root style={styles.blankState}>\n <BlankState.Imagery name=\"general.bolt\" />\n <BlankState.Content>\n <BlankState.Heading>No Giphys found</BlankState.Heading>\n <BlankState.Text>Try a different search term.</BlankState.Text>\n </BlankState.Content>\n <BlankState.Button onPress={() => navigation.goBack()} title=\"Close\" />\n </BlankState.Root>\n </FormSheet.Root>\n )\n\n const gif = result.giphy.fixed_width\n const { url } = gif\n\n function goBack({ clearInput = false }) {\n if (clearInput) {\n const routes = navigation.getState()?.routes || []\n const conversationParams = routes.find(r => r.name === 'Conversation')?.params || {}\n\n navigation.dispatch(\n StackActions.popTo('Conversation', {\n ...conversationParams,\n conversation_id,\n clear_input: true,\n })\n )\n } else {\n navigation.goBack()\n }\n }\n\n function sendGiphy() {\n if (disabled) return\n\n mutate({ text: '', attachments: [result] })\n goBack({ clearInput: true })\n }\n\n return (\n <FormSheet.Root contentStyle={styles.container}>\n <View style={styles.poweredByGiphyContainer}>\n <NativeImage\n alt=\"Powered by Giphy\"\n style={styles.poweredByGiphyImage}\n source={{ uri: poweredByGiphyImage }}\n />\n </View>\n <View style={styles.controlToolbar} accessibilityRole=\"toolbar\">\n <View style={styles.paginateButtonGroup}>\n <PaginateButton\n name=\"general.leftArrow\"\n accessibilityLabel=\"Previous Giphy\"\n onPress={prevResult}\n disabled={disabled}\n />\n <PaginateButton\n name=\"general.rightArrow\"\n accessibilityLabel=\"Next GIF\"\n onPress={nextResult}\n disabled={disabled}\n />\n </View>\n <View style={styles.formButtonGroup}>\n <TextButton\n onPress={() => goBack({ clearInput: false })}\n maxFontSizeMultiplier={1}\n accessibilityHint=\"Cancels the Giphy selection and closes this modal.\"\n >\n Cancel\n </TextButton>\n <Button\n onPress={sendGiphy}\n title=\"Send\"\n size=\"lg\"\n disabled={disabled}\n maxFontSizeMultiplier={1}\n accessibilityLabel=\"Send Giphy\"\n accessibilityHint=\"Sends the selected Giphy as a message to the conversation.\"\n />\n </View>\n </View>\n {isSearching ? (\n <DefaultLoading />\n ) : (\n <NativeImage\n source={{ uri: url }}\n alt={result.title}\n style={[styles.image, { width: size, height: size }]}\n />\n )}\n </FormSheet.Root>\n )\n}\n\ninterface PaginateButtonProps {\n name: IconString\n accessibilityLabel: string\n onPress: () => void\n disabled: boolean\n}\n\nfunction PaginateButton({ name, accessibilityLabel, onPress, disabled }: PaginateButtonProps) {\n const styles = useStyles()\n const { colors } = useTheme()\n const androidRippleColor = useCreateAndroidRippleColor({ color: colors.interaction })\n\n return (\n <IconButton\n name={name}\n accessibilityLabel={accessibilityLabel}\n size=\"md\"\n appearance=\"interaction\"\n onPress={onPress}\n disabled={disabled}\n style={[styles.paginateButton, disabled && styles.paginateButtonDisabled]}\n android_ripple={{\n color: androidRippleColor,\n borderless: true,\n foreground: true,\n }}\n maxFontSizeMultiplier={1}\n />\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n paddingTop: 32,\n paddingHorizontal: 16,\n gap: 8,\n },\n blankStateContainer: {\n paddingVertical: 64,\n },\n blankState: {\n flex: 0,\n flexGrow: 1,\n },\n poweredByGiphyContainer: {\n alignSelf: 'flex-start',\n padding: 4,\n borderRadius: 4,\n backgroundColor: colors.name === 'dark' ? tokens.colorNeutral68 : 'transparent',\n },\n poweredByGiphyImage: {\n width: 170,\n height: 20,\n },\n controlToolbar: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n formButtonGroup: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 16,\n },\n paginateButtonGroup: {\n flexDirection: 'row',\n gap: 8,\n },\n paginateButton: {\n borderColor: colors.interaction,\n borderWidth: 1,\n height: 28,\n paddingHorizontal: 12,\n borderRadius: 16,\n overflow: 'hidden',\n },\n paginateButtonDisabled: {\n backgroundColor: colors.fillColorButtonNeutralSolidDisabled,\n borderColor: colors.fillColorButtonNeutralSolidDisabled,\n },\n image: {\n borderRadius: 8,\n maxWidth: '100%',\n },\n })\n}\n\nconst poweredByGiphyImage = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAWCAYAAACFbNPBAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA\nGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABa9JREFUeNrsWy1z40gQla8EDAwE\nDAQCDAIMAgwCDA0XBgYGBu5PyM84aLgw8KDBAoMDBgsEAgQEBAQEBARclZ2uepPrne2WRrbls7Pq\nKpWc0UxPz0y//pIyen9/Dwa6LhqNRjNzmwmPcnOl5kzrYZdOQ+GwBVcDirG5LXGNG7rWpu/O3Dcu\nUEz7ytxW7gDT76WtjzYXAdJcW8MjFWR+EoBMAF4ra3wRmmkdG/Psq/kdac8Vfg/mtpAMiRnzt88C\n/xpU7yrAEZvbMxR33NLdAukZ4/okmmturicz1yNA3Be9Ku0rM2+keNlFR14DQK4UHE+K9Wwi6v94\nRlHnfc4HD5Uojx8826zHyQeAfJ6w6tHDa2jhz7czizwzMi969iK1Mu/cCRMjJbTa9JKDSG7M0N5M\nWDn9iOeUHWpl+hTs2UQZF6HvnrVNIGMFfpq8ltdEUhQeiyvr+FgLm1Pl0WVvWtb8sT6+bkZL5aBJ\nli1ZVLKGmN+GFDM8X3exlB6UCh4qUmTe9eRFKL96VTzVF/MshZ6sjg2tDknSF4pyECoTduALl69p\nr3CYpDB3aP7OnhOgqP3NXBkbeocFU9/bhjBj1yJjwpRFs3Al+IjzGB6Z4fHWdW+wJlpHaP7eWqBB\nqRdQ5n8VvksFHL8ov/ltZd8ZvkskwvmJlXMteLdnYa96zXtI1wCEmQDYZSBX9zqHVodWsSocuCVS\nphiKUDNFIcAU4B9D6DkUocCYqfUs8Dh2czN2AHQVZF3N3y4YXLms98hx2fXRvHMzvmBWmvf5sPgK\n6EiGG7pIhgaQuDxv2XoSgGTO+N7avZK8B5JMKbT6p+m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AQ,EAAE,QAAQ;SACnB;QACD,sBAAsB,EAAE;YACtB,eAAe,EAAE,MAAM,CAAC,mCAAmC;YAC3D,WAAW,EAAE,MAAM,CAAC,mCAAmC;SACxD;QACD,KAAK,EAAE;YACL,YAAY,EAAE,CAAC;YACf,QAAQ,EAAE,MAAM;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;6CA2BiB,CAAA","sourcesContent":["import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { Image as NativeImage, Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { Button, IconButton, IconString, TextButton } from '../components'\nimport { DefaultLoading } from '../components/page/loading'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useCreateAndroidRippleColor, useTheme } from '../hooks'\nimport { useGiphy } from '../hooks/use_giphy'\nimport { useMessageCreateOrUpdate } from '../hooks/use_message_create_or_update'\nimport { tokens } from '../vendor/tapestry/tokens'\n\nexport const SendGiphyScreenOptions = getFormSheetScreenOptions({\n headerTitle: 'Send Giphy',\n sheetAllowedDetents: Platform.select({ android: [0.7, 0.94], default: [0.7, 1] }),\n})\n\nexport type SendGiphyScreenProps = StaticScreenProps<{\n conversation_id: number\n search_term: string\n}>\n\nexport function SendGiphyScreen({ route }: SendGiphyScreenProps) {\n const { conversation_id, search_term } = route.params\n const styles = useStyles()\n const navigation = useNavigation()\n\n const { isPending, mutate } = useMessageCreateOrUpdate({\n conversationId: conversation_id,\n })\n const { isSearching, result, nextResult, prevResult } = useGiphy(search_term)\n const disabled = isPending || isSearching\n\n const { width } = useWindowDimensions()\n const size = width - 24\n\n if (!result)\n return (\n <FormSheet.Root contentStyle={styles.blankStateContainer}>\n <BlankState.Root style={styles.blankState}>\n <BlankState.Imagery name=\"general.bolt\" />\n <BlankState.Content>\n <BlankState.Heading>No Giphys found</BlankState.Heading>\n <BlankState.Text>Try a different search term.</BlankState.Text>\n </BlankState.Content>\n <BlankState.Button onPress={() => navigation.goBack()} title=\"Close\" />\n </BlankState.Root>\n </FormSheet.Root>\n )\n\n const gif = result.giphy.fixed_width\n const { url } = gif\n\n function goBack({ clearInput = false }) {\n if (clearInput) {\n const routes = navigation.getState()?.routes || []\n const conversationParams = routes.find(r => r.name === 'Conversation')?.params || {}\n\n navigation.dispatch(\n StackActions.popTo('Conversation', {\n ...conversationParams,\n conversation_id,\n clear_input: true,\n })\n )\n } else {\n navigation.goBack()\n }\n }\n\n function sendGiphy() {\n if (disabled) return\n\n mutate({ text: '', attachments: [result] })\n goBack({ clearInput: true })\n }\n\n return (\n <FormSheet.Root contentStyle={styles.container}>\n <View style={styles.poweredByGiphyContainer}>\n <NativeImage\n alt=\"Powered by Giphy\"\n style={styles.poweredByGiphyImage}\n source={{ uri: poweredByGiphyImage }}\n />\n </View>\n <View style={styles.controlToolbar} accessibilityRole=\"toolbar\">\n <View style={styles.paginateButtonGroup}>\n <PaginateButton\n name=\"general.leftArrow\"\n accessibilityLabel=\"Previous Giphy\"\n onPress={prevResult}\n disabled={disabled}\n />\n <PaginateButton\n name=\"general.rightArrow\"\n accessibilityLabel=\"Next GIF\"\n onPress={nextResult}\n disabled={disabled}\n />\n </View>\n <View style={styles.formButtonGroup}>\n <TextButton\n onPress={() => goBack({ clearInput: false })}\n maxFontSizeMultiplier={1}\n accessibilityHint=\"Cancels the Giphy selection and closes this modal.\"\n >\n Cancel\n </TextButton>\n <Button\n onPress={sendGiphy}\n title=\"Send\"\n size=\"lg\"\n disabled={disabled}\n maxFontSizeMultiplier={1}\n accessibilityLabel=\"Send Giphy\"\n accessibilityHint=\"Sends the selected Giphy as a message to the conversation.\"\n />\n </View>\n </View>\n {isSearching ? (\n <DefaultLoading />\n ) : (\n <NativeImage\n source={{ uri: url }}\n alt={result.title}\n style={[styles.image, { width: size, height: size }]}\n />\n )}\n </FormSheet.Root>\n )\n}\n\ninterface PaginateButtonProps {\n name: IconString\n accessibilityLabel: string\n onPress: () => void\n disabled: boolean\n}\n\nfunction PaginateButton({ name, accessibilityLabel, onPress, disabled }: PaginateButtonProps) {\n const styles = useStyles()\n const { colors } = useTheme()\n const androidRippleColor = useCreateAndroidRippleColor({ color: colors.interaction })\n\n return (\n <IconButton\n name={name}\n accessibilityLabel={accessibilityLabel}\n size=\"md\"\n appearance=\"interaction\"\n onPress={onPress}\n disabled={disabled}\n style={[styles.paginateButton, disabled && styles.paginateButtonDisabled]}\n android_ripple={{\n color: androidRippleColor,\n borderless: true,\n foreground: true,\n }}\n maxFontSizeMultiplier={1}\n />\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n paddingTop: 32,\n paddingHorizontal: 16,\n gap: 8,\n },\n blankStateContainer: {\n paddingVertical: 64,\n },\n blankState: {\n flex: 0,\n flexGrow: 1,\n },\n poweredByGiphyContainer: {\n alignSelf: 'flex-start',\n padding: 4,\n borderRadius: 4,\n backgroundColor: colors.name === 'dark' ? tokens.colorNeutral68 : 'transparent',\n },\n poweredByGiphyImage: {\n width: 170,\n height: 20,\n },\n controlToolbar: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n formButtonGroup: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 16,\n },\n paginateButtonGroup: {\n flexDirection: 'row',\n gap: 8,\n },\n paginateButton: {\n borderColor: colors.interaction,\n borderWidth: 1,\n height: 28,\n paddingHorizontal: 12,\n borderRadius: 16,\n overflow: 'hidden',\n },\n paginateButtonDisabled: {\n backgroundColor: colors.fillColorButtonNeutralSolidDisabled,\n borderColor: colors.fillColorButtonNeutralSolidDisabled,\n },\n image: {\n borderRadius: 8,\n maxWidth: '100%',\n },\n })\n}\n\nconst poweredByGiphyImage = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAWCAYAAACFbNPBAAAACXBIWXMAAAsTA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';
2
- import React from 'react';
3
2
  export type SettingsScreenProps = StaticScreenProps<{}>;
4
- export declare function SettingsScreen({}: SettingsScreenProps): React.JSX.Element;
3
+ export declare function SettingsScreen({}: SettingsScreenProps): import("react/jsx-runtime").JSX.Element;
5
4
  //# sourceMappingURL=settings_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings_screen.d.ts","sourceRoot":"","sources":["../../src/screens/settings_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAsB,MAAM,OAAO,CAAA;AAQ1C,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAA;AAEvD,wBAAgB,cAAc,CAAC,EAAE,EAAE,mBAAmB,qBA0CrD"}
1
+ {"version":3,"file":"settings_screen.d.ts","sourceRoot":"","sources":["../../src/screens/settings_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAS3E,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAA;AAEvD,wBAAgB,cAAc,CAAC,EAAE,EAAE,mBAAmB,2CA0CrD"}
@@ -1,6 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { PlatformPressable } from '@react-navigation/elements';
2
3
  import { useNavigation } from '@react-navigation/native';
3
- import React, { useCallback } from 'react';
4
+ import { useCallback } from 'react';
4
5
  import { Platform, StyleSheet, View } from 'react-native';
5
6
  import { Heading, Icon, Text } from '../components';
6
7
  import { Switch } from '../components/display/switch';
@@ -19,34 +20,11 @@ export function SettingsScreen({}) {
19
20
  const handleGetHelp = useCallback(() => {
20
21
  navigation.navigate('GetHelp', { type: 'chat' });
21
22
  }, [navigation]);
22
- return (<View style={styles.container}>
23
- <View style={styles.sectionOuter}>
24
- <View style={styles.sectionHeader}>
25
- <Heading variant="h2">Messages</Heading>
26
- </View>
27
- {directMessagesEnabled && (<View style={styles.settingRow}>
28
- <View style={styles.settingRowText}>
29
- <Text>Allow direct messages</Text>
30
- <Text variant="tertiary">
31
- When off, you can't be added to new direct messages, and any you're already in will
32
- be turned off.
33
- </Text>
34
- </View>
35
- <Switch value={!directMessagesDisabled} onValueChange={enabled => setDirectMessagesDisabled(!enabled)} disabled={isMutating}/>
36
- </View>)}
37
- <NavRow label="Notification settings" onPress={handleNotificationSettings}/>
38
- {appName !== 'services' && <NavRow label="Get help" onPress={handleGetHelp}/>}
39
- </View>
40
- </View>);
23
+ return (_jsx(View, { style: styles.container, children: _jsxs(View, { style: styles.sectionOuter, children: [_jsx(View, { style: styles.sectionHeader, children: _jsx(Heading, { variant: "h2", children: "Messages" }) }), directMessagesEnabled && (_jsxs(View, { style: styles.settingRow, children: [_jsxs(View, { style: styles.settingRowText, children: [_jsx(Text, { children: "Allow direct messages" }), _jsx(Text, { variant: "tertiary", children: "When off, you can't be added to new direct messages, and any you're already in will be turned off." })] }), _jsx(Switch, { value: !directMessagesDisabled, onValueChange: enabled => setDirectMessagesDisabled(!enabled), disabled: isMutating })] })), _jsx(NavRow, { label: "Notification settings", onPress: handleNotificationSettings }), appName !== 'services' && _jsx(NavRow, { label: "Get help", onPress: handleGetHelp })] }) }));
41
24
  }
42
25
  function NavRow({ label, onPress }) {
43
26
  const styles = useNavRowStyles();
44
- return (<PlatformPressable style={styles.container} onPress={onPress} accessibilityRole="button" accessibilityLabel={label}>
45
- <View style={styles.inner}>
46
- <Text>{label}</Text>
47
- {Platform.OS === 'ios' && (<Icon name="general.rightChevron" size={16} style={styles.chevron}/>)}
48
- </View>
49
- </PlatformPressable>);
27
+ return (_jsx(PlatformPressable, { style: styles.container, onPress: onPress, accessibilityRole: "button", accessibilityLabel: label, children: _jsxs(View, { style: styles.inner, children: [_jsx(Text, { children: label }), Platform.OS === 'ios' && (_jsx(Icon, { name: "general.rightChevron", size: 16, style: styles.chevron }))] }) }));
50
28
  }
51
29
  const useStyles = () => {
52
30
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"settings_screen.js","sourceRoot":"","sources":["../../src/screens/settings_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAIhE,MAAM,UAAU,cAAc,CAAC,EAAuB;IACpD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAC7F,MAAM,qBAAqB,GAAG,wBAAwB,EAAE,CAAA;IACxD,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAElC,MAAM,0BAA0B,GAAG,WAAW,CAAC,GAAG,EAAE;QAClD,UAAU,CAAC,QAAQ,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAA;IACjD,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAA;IAEhB,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,UAAU,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,M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AAiB,EAAE,MAAM,CAAC,sBAAsB;SACjD;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,WAAW,EAAE,CAAC;SACf;QACD,KAAK,EAAE;YACL,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;SACjD;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { Switch } from '../components/display/switch'\nimport { useDirectMessagesEnabled, useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { usePersonSettings } from '../hooks/use_person_settings'\n\nexport type SettingsScreenProps = StaticScreenProps<{}>\n\nexport function SettingsScreen({}: SettingsScreenProps) {\n const styles = useStyles()\n const { directMessagesDisabled, setDirectMessagesDisabled, isMutating } = usePersonSettings()\n const directMessagesEnabled = useDirectMessagesEnabled()\n const appName = useAppName()\n const navigation = useNavigation()\n\n const handleNotificationSettings = useCallback(() => {\n navigation.navigate('NotificationSettings', {})\n }, [navigation])\n\n const handleGetHelp = useCallback(() => {\n navigation.navigate('GetHelp', { type: 'chat' })\n }, [navigation])\n\n return (\n <View style={styles.container}>\n <View style={styles.sectionOuter}>\n <View style={styles.sectionHeader}>\n <Heading variant=\"h2\">Messages</Heading>\n </View>\n {directMessagesEnabled && (\n <View style={styles.settingRow}>\n <View style={styles.settingRowText}>\n <Text>Allow direct messages</Text>\n <Text variant=\"tertiary\">\n When off, you can't be added to new direct messages, and any you're already in will\n be turned off.\n </Text>\n </View>\n <Switch\n value={!directMessagesDisabled}\n onValueChange={enabled => setDirectMessagesDisabled(!enabled)}\n disabled={isMutating}\n />\n </View>\n )}\n <NavRow label=\"Notification settings\" onPress={handleNotificationSettings} />\n {appName !== 'services' && <NavRow label=\"Get help\" onPress={handleGetHelp} />}\n </View>\n </View>\n )\n}\n\ninterface NavRowProps {\n label: string\n onPress: () => void\n}\n\nfunction NavRow({ label, onPress }: NavRowProps) {\n const styles = useNavRowStyles()\n return (\n <PlatformPressable\n style={styles.container}\n onPress={onPress}\n accessibilityRole=\"button\"\n accessibilityLabel={label}\n >\n <View style={styles.inner}>\n <Text>{label}</Text>\n {Platform.OS === 'ios' && (\n <Icon name=\"general.rightChevron\" size={16} style={styles.chevron} />\n )}\n </View>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n flex: 1,\n },\n sectionOuter: {\n paddingLeft: 16,\n },\n sectionHeader: {\n paddingRight: 16,\n paddingTop: 24,\n paddingBottom: 12,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n settingRow: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n paddingRight: 16,\n paddingVertical: 12,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n settingRowText: {\n flex: 1,\n gap: 8,\n },\n })\n}\n\nconst useNavRowStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n paddingLeft: 0,\n },\n inner: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingRight: 16,\n paddingVertical: 14,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n chevron: {\n color: colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"settings_screen.js","sourceRoot":"","sources":["../../src/screens/settings_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAc,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAIhE,MAAM,UAAU,cAAc,CAAC,EAAuB;IACpD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAC7F,MAAM,qBAAqB,GAAG,wBAAwB,EAAE,CAAA;IACxD,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAElC,MAAM,0BAA0B,GAAG,WAAW,CAAC,GAAG,EAAE;QAClD,UAAU,CAAC,QAAQ,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAA;IACjD,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAA;IAEhB,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,UAAU,CAAC,Q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E;YACnB,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;SACjD;QACD,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { Heading, Icon, Text } from '../components'\nimport { Switch } from '../components/display/switch'\nimport { useDirectMessagesEnabled, useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { usePersonSettings } from '../hooks/use_person_settings'\n\nexport type SettingsScreenProps = StaticScreenProps<{}>\n\nexport function SettingsScreen({}: SettingsScreenProps) {\n const styles = useStyles()\n const { directMessagesDisabled, setDirectMessagesDisabled, isMutating } = usePersonSettings()\n const directMessagesEnabled = useDirectMessagesEnabled()\n const appName = useAppName()\n const navigation = useNavigation()\n\n const handleNotificationSettings = useCallback(() => {\n navigation.navigate('NotificationSettings', {})\n }, [navigation])\n\n const handleGetHelp = useCallback(() => {\n navigation.navigate('GetHelp', { type: 'chat' })\n }, [navigation])\n\n return (\n <View style={styles.container}>\n <View style={styles.sectionOuter}>\n <View style={styles.sectionHeader}>\n <Heading variant=\"h2\">Messages</Heading>\n </View>\n {directMessagesEnabled && (\n <View style={styles.settingRow}>\n <View style={styles.settingRowText}>\n <Text>Allow direct messages</Text>\n <Text variant=\"tertiary\">\n When off, you can't be added to new direct messages, and any you're already in will\n be turned off.\n </Text>\n </View>\n <Switch\n value={!directMessagesDisabled}\n onValueChange={enabled => setDirectMessagesDisabled(!enabled)}\n disabled={isMutating}\n />\n </View>\n )}\n <NavRow label=\"Notification settings\" onPress={handleNotificationSettings} />\n {appName !== 'services' && <NavRow label=\"Get help\" onPress={handleGetHelp} />}\n </View>\n </View>\n )\n}\n\ninterface NavRowProps {\n label: string\n onPress: () => void\n}\n\nfunction NavRow({ label, onPress }: NavRowProps) {\n const styles = useNavRowStyles()\n return (\n <PlatformPressable\n style={styles.container}\n onPress={onPress}\n accessibilityRole=\"button\"\n accessibilityLabel={label}\n >\n <View style={styles.inner}>\n <Text>{label}</Text>\n {Platform.OS === 'ios' && (\n <Icon name=\"general.rightChevron\" size={16} style={styles.chevron} />\n )}\n </View>\n </PlatformPressable>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n flex: 1,\n },\n sectionOuter: {\n paddingLeft: 16,\n },\n sectionHeader: {\n paddingRight: 16,\n paddingTop: 24,\n paddingBottom: 12,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n settingRow: {\n flexDirection: 'row',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n paddingRight: 16,\n paddingVertical: 12,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n settingRowText: {\n flex: 1,\n gap: 8,\n },\n })\n}\n\nconst useNavRowStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n paddingLeft: 0,\n },\n inner: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingRight: 16,\n paddingVertical: 14,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n chevron: {\n color: colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
@@ -1,9 +1,8 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
- import React from 'react';
3
2
  export declare const SystemMessagePeopleScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
4
3
  export type SystemMessagePeopleScreenProps = StaticScreenProps<{
5
4
  conversation_id: number;
6
5
  person_ids: number[];
7
6
  }>;
8
- export declare function SystemMessagePeopleScreen({ route }: SystemMessagePeopleScreenProps): React.JSX.Element;
7
+ export declare function SystemMessagePeopleScreen({ route }: SystemMessagePeopleScreenProps): import("react/jsx-runtime").JSX.Element;
9
8
  //# sourceMappingURL=system_message_people_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"system_message_people_screen.d.ts","sourceRoot":"","sources":["../../src/screens/system_message_people_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAe,MAAM,OAAO,CAAA;AASnC,eAAO,MAAM,gCAAgC,uEAM3C,CAAA;AAEF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,qBA8BlF"}
1
+ {"version":3,"file":"system_message_people_screen.d.ts","sourceRoot":"","sources":["../../src/screens/system_message_people_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAU5D,eAAO,MAAM,gCAAgC,uEAM3C,CAAA;AAEF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,2CA8BlF"}
@@ -1,4 +1,5 @@
1
- import React, { memo } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo } from 'react';
2
3
  import { Platform, StyleSheet, View } from 'react-native';
3
4
  import { FlatList } from 'react-native-gesture-handler';
4
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -29,18 +30,11 @@ export function SystemMessagePeopleScreen({ route }) {
29
30
  });
30
31
  const orderById = Object.fromEntries(person_ids.map((id, i) => [id, i]));
31
32
  const sortedMembers = [...members].sort((a, b) => (orderById[a.id] ?? 0) - (orderById[b.id] ?? 0));
32
- return (<FormSheet.Root contentStyle={styles.formSheetContent}>
33
- <FlatList data={sortedMembers} contentContainerStyle={styles.contentContainer} keyExtractor={item => item.id.toString()} renderItem={({ item }) => <Person person={item}/>}/>
34
- </FormSheet.Root>);
33
+ return (_jsx(FormSheet.Root, { contentStyle: styles.formSheetContent, children: _jsx(FlatList, { data: sortedMembers, contentContainerStyle: styles.contentContainer, keyExtractor: item => item.id.toString(), renderItem: ({ item }) => _jsx(Person, { person: item }) }) }));
35
34
  }
36
35
  const Person = memo(({ person }) => {
37
36
  const styles = useStyles();
38
- return (<View style={styles.personRow}>
39
- <Avatar sourceUri={person.avatar} size="sm"/>
40
- <Text variant="tertiary" numberOfLines={2} style={styles.personName}>
41
- {person.name}
42
- </Text>
43
- </View>);
37
+ return (_jsxs(View, { style: styles.personRow, children: [_jsx(Avatar, { sourceUri: person.avatar, size: "sm" }), _jsx(Text, { variant: "tertiary", numberOfLines: 2, style: styles.personName, children: person.name })] }));
44
38
  });
45
39
  const useStyles = () => {
46
40
  const { bottom } = useSafeAreaInsets();
@@ -1 +1 @@
1
- {"version":3,"file":"system_message_people_screen.js","sourceRoot":"","sources":["../../src/screens/system_message_people_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGzC,MAAM,CAAC,MAAM,gCAAgC,GAAG,yBAAyB,CAAC;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AAC;YACN,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,EAAE;YACrB,IAAI,EAAE,CAAC;SACR;QACD,UAAU,EAAE;YACV,IAAI,EAAE,CAAC;SACR;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport React, { memo } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Avatar, Text } from '../components'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useSuspenseGet } from '../hooks'\nimport { MemberResource } from '../types'\n\nexport const SystemMessagePeopleScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: Platform.select({\n android: [0.5, 0.94],\n default: [0.5, 1],\n }),\n headerTitle: 'People',\n})\n\nexport type SystemMessagePeopleScreenProps = StaticScreenProps<{\n conversation_id: number\n person_ids: number[]\n}>\n\nexport function SystemMessagePeopleScreen({ route }: SystemMessagePeopleScreenProps) {\n const { conversation_id, person_ids } = route.params\n const styles = useStyles()\n\n const { data: members } = useSuspenseGet<MemberResource[]>({\n url: `/me/conversations/${conversation_id}/members`,\n data: {\n fields: {\n Member: ['id', 'name', 'avatar'],\n },\n where: {\n id: person_ids,\n },\n limit: person_ids.length,\n },\n })\n\n const orderById = Object.fromEntries(person_ids.map((id, i) => [id, i]))\n const sortedMembers = [...members].sort((a, b) => (orderById[a.id] ?? 0) - (orderById[b.id] ?? 0))\n\n return (\n <FormSheet.Root contentStyle={styles.formSheetContent}>\n <FlatList\n data={sortedMembers}\n contentContainerStyle={styles.contentContainer}\n keyExtractor={item => item.id.toString()}\n renderItem={({ item }) => <Person person={item} />}\n />\n </FormSheet.Root>\n )\n}\n\ntype PersonProps = Pick<MemberResource, 'id' | 'name' | 'avatar'>\n\nconst Person = memo(({ person }: { person: PersonProps }) => {\n const styles = useStyles()\n\n return (\n <View style={styles.personRow}>\n <Avatar sourceUri={person.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" numberOfLines={2} style={styles.personName}>\n {person.name}\n </Text>\n </View>\n )\n})\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n formSheetContent: {\n paddingTop: 16,\n },\n contentContainer: {\n paddingTop: 8,\n paddingBottom: bottom + 24,\n },\n personRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n paddingVertical: 8,\n paddingHorizontal: 16,\n flex: 1,\n },\n personName: {\n flex: 1,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"system_message_people_screen.js","sourceRoot":"","sources":["../../src/screens/system_message_people_screen.tsx"],"names":[],"mappings":";AACA,OAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGzC,MAAM,CAAC,MAAM,gCAAgC,GAAG,yBAAyB,CAAC;IACxE,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC;QACnC,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC;QACpB,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;KAClB,CAAC;IACF,WAAW,EAAE,QAAQ;CACtB,CAAC,CAAA;AAOF,MAAM,UAAU,yBAAyB,CAAC,EAAE,KAAK,EAAkC;IACjF,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,MAAM,CAAA;IACpD,MAAM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AAE,CAAA;IAE1B,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,aAC3B,KAAC,MAAM,IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAC,IAAI,GAAG,EAC9C,KAAC,IAAI,IAAC,OAAO,EAAC,UAAU,EAAC,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,UAAU,YAChE,MAAM,CAAC,IAAI,GACP,IACF,CACR,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,UAAU,EAAE,EAAE;SACf;QACD,gBAAgB,EAAE;YAChB,UAAU,EAAE,CAAC;YACb,aAAa,EAAE,MAAM,GAAG,EAAE;SAC3B;QACD,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;YACN,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,EAAE;YACrB,IAAI,EAAE,CAAC;SACR;QACD,UAAU,EAAE;YACV,IAAI,EAAE,CAAC;SACR;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport React, { memo } from 'react'\nimport { Platform, StyleSheet, View } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Avatar, Text } from '../components'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useSuspenseGet } from '../hooks'\nimport { MemberResource } from '../types'\n\nexport const SystemMessagePeopleScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: Platform.select({\n android: [0.5, 0.94],\n default: [0.5, 1],\n }),\n headerTitle: 'People',\n})\n\nexport type SystemMessagePeopleScreenProps = StaticScreenProps<{\n conversation_id: number\n person_ids: number[]\n}>\n\nexport function SystemMessagePeopleScreen({ route }: SystemMessagePeopleScreenProps) {\n const { conversation_id, person_ids } = route.params\n const styles = useStyles()\n\n const { data: members } = useSuspenseGet<MemberResource[]>({\n url: `/me/conversations/${conversation_id}/members`,\n data: {\n fields: {\n Member: ['id', 'name', 'avatar'],\n },\n where: {\n id: person_ids,\n },\n limit: person_ids.length,\n },\n })\n\n const orderById = Object.fromEntries(person_ids.map((id, i) => [id, i]))\n const sortedMembers = [...members].sort((a, b) => (orderById[a.id] ?? 0) - (orderById[b.id] ?? 0))\n\n return (\n <FormSheet.Root contentStyle={styles.formSheetContent}>\n <FlatList\n data={sortedMembers}\n contentContainerStyle={styles.contentContainer}\n keyExtractor={item => item.id.toString()}\n renderItem={({ item }) => <Person person={item} />}\n />\n </FormSheet.Root>\n )\n}\n\ntype PersonProps = Pick<MemberResource, 'id' | 'name' | 'avatar'>\n\nconst Person = memo(({ person }: { person: PersonProps }) => {\n const styles = useStyles()\n\n return (\n <View style={styles.personRow}>\n <Avatar sourceUri={person.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" numberOfLines={2} style={styles.personName}>\n {person.name}\n </Text>\n </View>\n )\n})\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n formSheetContent: {\n paddingTop: 16,\n },\n contentContainer: {\n paddingTop: 8,\n paddingBottom: bottom + 24,\n },\n personRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n paddingVertical: 8,\n paddingHorizontal: 16,\n flex: 1,\n },\n personName: {\n flex: 1,\n },\n })\n}\n"]}
@@ -4,5 +4,5 @@ export type TeamConversationRouteProps = {
4
4
  team_ids?: number[];
5
5
  };
6
6
  export type TeamConversationScreenProps = StaticScreenProps<TeamConversationRouteProps>;
7
- export declare const TeamConversationScreen: ({ route }: TeamConversationScreenProps) => import("react").JSX.Element;
7
+ export declare const TeamConversationScreen: ({ route }: TeamConversationScreenProps) => import("react/jsx-runtime").JSX.Element;
8
8
  //# sourceMappingURL=team_conversation_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"team_conversation_screen.d.ts","sourceRoot":"","sources":["../../src/screens/team_conversation_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AASzF,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC,0BAA0B,CAAC,CAAA;AAEvF,eAAO,MAAM,sBAAsB,GAAI,WAAW,2BAA2B,gCAqC5E,CAAA"}
1
+ {"version":3,"file":"team_conversation_screen.d.ts","sourceRoot":"","sources":["../../src/screens/team_conversation_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AASzF,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC,0BAA0B,CAAC,CAAA;AAEvF,eAAO,MAAM,sBAAsB,GAAI,WAAW,2BAA2B,4CAqC5E,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { StackActions, useNavigation } from '@react-navigation/native';
2
3
  import { useQuery, useQueryClient } from '@tanstack/react-query';
3
4
  import { useEffect } from 'react';
@@ -31,8 +32,8 @@ export const TeamConversationScreen = ({ route }) => {
31
32
  };
32
33
  }, [conversation?.id, conversation?.title, navigation, queryClient]);
33
34
  if (isError)
34
- return <TeamConversationError error={error} onGoBack={navigation.goBack}/>;
35
- return <DefaultLoading />;
35
+ return _jsx(TeamConversationError, { error: error, onGoBack: navigation.goBack });
36
+ return _jsx(DefaultLoading, {});
36
37
  };
37
38
  function TeamConversationError({ error, onGoBack }) {
38
39
  const detail = error instanceof ResponseError
@@ -41,15 +42,6 @@ function TeamConversationError({ error, onGoBack }) {
41
42
  .filter(Boolean)
42
43
  .join('\n')
43
44
  : '';
44
- return (<BlankState.Root>
45
- <BlankState.Imagery name="people.noTextMessage"/>
46
- <BlankState.Content>
47
- <BlankState.Heading>Can't start this conversation</BlankState.Heading>
48
- <BlankState.Text>
49
- {detail || 'Something went wrong while starting this conversation.'}
50
- </BlankState.Text>
51
- </BlankState.Content>
52
- <BlankState.Button title="Go back" onPress={onGoBack} size="md" accessibilityRole="link"/>
53
- </BlankState.Root>);
45
+ return (_jsxs(BlankState.Root, { children: [_jsx(BlankState.Imagery, { name: "people.noTextMessage" }), _jsxs(BlankState.Content, { children: [_jsx(BlankState.Heading, { children: "Can't start this conversation" }), _jsx(BlankState.Text, { children: detail || 'Something went wrong while starting this conversation.' })] }), _jsx(BlankState.Button, { title: "Go back", onPress: onGoBack, size: "md", accessibilityRole: "link" })] }));
54
46
  }
55
47
  //# sourceMappingURL=team_conversation_screen.js.map