@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,5 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { useNavigation, StackActions } from '@react-navigation/native';
2
- import React, { useCallback, useLayoutEffect, useMemo, useState } from 'react';
3
+ import { useCallback, useLayoutEffect, useMemo, useState } from 'react';
3
4
  import { View, StyleSheet, TextInput, ScrollView } from 'react-native';
4
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
6
  import { Spinner, Text, KeyboardView } from '../components';
@@ -19,7 +20,7 @@ export const MessageReportScreenOptions = ({ navigation, route, }) => {
19
20
  return {
20
21
  presentation: 'modal',
21
22
  title: 'Report message',
22
- headerLeft: () => <HeaderDismissButton title="Cancel" onPress={handleClose}/>,
23
+ headerLeft: () => _jsx(HeaderDismissButton, { title: "Cancel", onPress: handleClose }),
23
24
  };
24
25
  };
25
26
  export function MessageReportScreen({ route }) {
@@ -28,7 +29,7 @@ export function MessageReportScreen({ route }) {
28
29
  const message = messages.find(m => m.id === message_id);
29
30
  if (!message)
30
31
  return null;
31
- return <MessageReportScreenContent message={message} conversation_id={conversation_id}/>;
32
+ return _jsx(MessageReportScreenContent, { message: message, conversation_id: conversation_id });
32
33
  }
33
34
  function MessageReportScreenContent({ message, conversation_id, }) {
34
35
  const styles = useStyles();
@@ -63,7 +64,7 @@ function MessageReportScreenContent({ message, conversation_id, }) {
63
64
  const handleClose = useCallback(() => {
64
65
  navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }));
65
66
  }, [navigation, conversation_id]);
66
- const HeaderRight = useCallback(() => <HeaderTextButton title="Submit" onPress={handleSubmit} disabled={!isFormValid}/>, [handleSubmit, isFormValid]);
67
+ const HeaderRight = useCallback(() => _jsx(HeaderTextButton, { title: "Submit", onPress: handleSubmit, disabled: !isFormValid }), [handleSubmit, isFormValid]);
67
68
  useLayoutEffect(() => {
68
69
  if (status === 'pending' || status === 'success') {
69
70
  navigation.setOptions({
@@ -78,68 +79,15 @@ function MessageReportScreenContent({ message, conversation_id, }) {
78
79
  }
79
80
  }, [HeaderRight, navigation, status]);
80
81
  if (status === 'pending') {
81
- return (<View style={styles.fullScreenContainer}>
82
- <Spinner />
83
- <Text style={styles.loadingText}>Submitting report...</Text>
84
- </View>);
82
+ return (_jsxs(View, { style: styles.fullScreenContainer, children: [_jsx(Spinner, {}), _jsx(Text, { style: styles.loadingText, children: "Submitting report..." })] }));
85
83
  }
86
84
  if (status === 'success') {
87
- return (<View style={styles.fullScreenContainer}>
88
- <BlankState.Root>
89
- <BlankState.Imagery name="general.checkCircle" style={styles.successIcon}/>
90
- <BlankState.Content>
91
- <BlankState.Heading style={styles.successTitle}>Message reported</BlankState.Heading>
92
- <BlankState.Text style={styles.successSubtitle}>
93
- The message has been reported and a church leader will be contacted.
94
- </BlankState.Text>
95
- </BlankState.Content>
96
- <BlankState.Button title="Close" onPress={handleClose} size="lg" variant="fill"/>
97
- </BlankState.Root>
98
- </View>);
85
+ return (_jsx(View, { style: styles.fullScreenContainer, children: _jsxs(BlankState.Root, { children: [_jsx(BlankState.Imagery, { name: "general.checkCircle", style: styles.successIcon }), _jsxs(BlankState.Content, { children: [_jsx(BlankState.Heading, { style: styles.successTitle, children: "Message reported" }), _jsx(BlankState.Text, { style: styles.successSubtitle, children: "The message has been reported and a church leader will be contacted." })] }), _jsx(BlankState.Button, { title: "Close", onPress: handleClose, size: "lg", variant: "fill" })] }) }));
99
86
  }
100
87
  if (status === 'error') {
101
- return (<BlankState.Root>
102
- <BlankState.Imagery name="general.exclamationTriangle"/>
103
- <BlankState.Content>
104
- <BlankState.Heading>Unable to submit report</BlankState.Heading>
105
- <BlankState.Text>
106
- We were unable to report this message. Please try again.
107
- </BlankState.Text>
108
- </BlankState.Content>
109
- <BlankState.Button title="Close" onPress={handleClose} size="lg" variant="outline"/>
110
- </BlankState.Root>);
88
+ return (_jsxs(BlankState.Root, { children: [_jsx(BlankState.Imagery, { name: "general.exclamationTriangle" }), _jsxs(BlankState.Content, { children: [_jsx(BlankState.Heading, { children: "Unable to submit report" }), _jsx(BlankState.Text, { children: "We were unable to report this message. Please try again." })] }), _jsx(BlankState.Button, { title: "Close", onPress: handleClose, size: "lg", variant: "outline" })] }));
111
89
  }
112
- return (<KeyboardView>
113
- <ScrollView contentContainerStyle={styles.container}>
114
- <Text style={styles.warningText} maxFontSizeMultiplier={1.5}>
115
- Reporting this message will notify a church leader. The person you are reporting will not
116
- receive a notification from Church Center. If someone is in immediate danger, call local
117
- emergency services. Don&apos;t wait.
118
- </Text>
119
-
120
- <MessagePreview message={message}/>
121
-
122
- <View style={styles.reasonSection}>
123
- <Text style={styles.fieldLabel}>
124
- What best describes the problem? <Text style={styles.required}>*</Text>
125
- </Text>
126
-
127
- <View style={styles.reasonListContainer}>
128
- <ReportReasonList selectedReason={selectedReason} onReasonChange={handleReasonChange}/>
129
- </View>
130
- </View>
131
-
132
- {selectedReason === 'other' && (<View style={styles.detailSection}>
133
- <Text style={styles.fieldLabel}>
134
- Please provide more details <Text style={styles.required}>*</Text>
135
- </Text>
136
- <TextInput style={styles.textInput} multiline placeholder="Describe the issue..." value={reasonDetail} onChangeText={setReasonDetail} maxLength={MAX_DETAIL_LENGTH} accessibilityLabel="Additional details" accessibilityHint="Provide more information about why you're reporting this message"/>
137
- {reasonDetail.length >= MAX_DETAIL_LENGTH - 100 && (<Text variant="footnote">
138
- {reasonDetail.length}/{MAX_DETAIL_LENGTH}
139
- </Text>)}
140
- </View>)}
141
- </ScrollView>
142
- </KeyboardView>);
90
+ return (_jsx(KeyboardView, { children: _jsxs(ScrollView, { contentContainerStyle: styles.container, children: [_jsx(Text, { style: styles.warningText, maxFontSizeMultiplier: 1.5, children: "Reporting this message will notify a church leader. The person you are reporting will not receive a notification from Church Center. If someone is in immediate danger, call local emergency services. Don't wait." }), _jsx(MessagePreview, { message: message }), _jsxs(View, { style: styles.reasonSection, children: [_jsxs(Text, { style: styles.fieldLabel, children: ["What best describes the problem? ", _jsx(Text, { style: styles.required, children: "*" })] }), _jsx(View, { style: styles.reasonListContainer, children: _jsx(ReportReasonList, { selectedReason: selectedReason, onReasonChange: handleReasonChange }) })] }), selectedReason === 'other' && (_jsxs(View, { style: styles.detailSection, children: [_jsxs(Text, { style: styles.fieldLabel, children: ["Please provide more details ", _jsx(Text, { style: styles.required, children: "*" })] }), _jsx(TextInput, { style: styles.textInput, multiline: true, placeholder: "Describe the issue...", value: reasonDetail, onChangeText: setReasonDetail, maxLength: MAX_DETAIL_LENGTH, accessibilityLabel: "Additional details", accessibilityHint: "Provide more information about why you're reporting this message" }), reasonDetail.length >= MAX_DETAIL_LENGTH - 100 && (_jsxs(Text, { variant: "footnote", children: [reasonDetail.length, "/", MAX_DETAIL_LENGTH] }))] }))] }) }));
143
91
  }
144
92
  const useStyles = () => {
145
93
  const { bottom } = useSafeAreaInsets();
@@ -1 +1 @@
1
- {"version":3,"file":"message_report_screen.js","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKzF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GACjB,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AAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation, StackActions } from '@react-navigation/native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport React, { useCallback, useLayoutEffect, useMemo, useState } from 'react'\nimport { View, StyleSheet, TextInput, ScrollView } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Spinner, Text, KeyboardView } from '../components'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { useTheme } from '../hooks'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { useReportMessage } from '../hooks/use_report_message'\nimport { MessageResource } from '../types'\nimport { MessageReportReason } from '../types/resources/message_report'\nimport { platformFontWeightBold } from '../utils'\nimport { MessagePreview } from './message_report/components/message_preview'\nimport { ReportReasonList } from './message_report/components/report_reason_list'\n\nconst MAX_DETAIL_LENGTH = 500\n\nexport const MessageReportScreenOptions = ({\n navigation,\n route,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => {\n const handleClose = () =>\n navigation.dispatch(\n StackActions.popTo('Conversation', {\n conversation_id: route.params?.conversation_id,\n })\n )\n\n return {\n presentation: 'modal',\n title: 'Report message',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={handleClose} />,\n }\n}\n\nexport type MessageReportScreenProps = StaticScreenProps<{\n conversation_id: number\n message_id: string\n}>\n\nexport function MessageReportScreen({ route }: MessageReportScreenProps) {\n const { conversation_id, message_id } = route.params\n\n const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false })\n const message = messages.find(m => m.id === message_id)\n\n if (!message) return null\n\n return <MessageReportScreenContent message={message} conversation_id={conversation_id} />\n}\n\nfunction MessageReportScreenContent({\n message,\n conversation_id,\n}: {\n message: MessageResource\n conversation_id: number\n}) {\n const styles = useStyles()\n const navigation = useNavigation()\n const [selectedReason, setSelectedReason] = useState<MessageReportReason | null>(null)\n const [reasonDetail, setReasonDetail] = useState('')\n const { mutate: submitReport, status } = useReportMessage(conversation_id, message.id)\n\n const handleReasonChange = useCallback((reason: MessageReportReason) => {\n setSelectedReason(reason)\n\n if (reason !== 'other') {\n setReasonDetail('')\n }\n }, [])\n\n const isFormValid = useMemo(() => {\n if (selectedReason === null) return false\n\n if (selectedReason === 'other' && reasonDetail.trim().length === 0) {\n return false\n }\n\n if (status === 'pending') return false\n\n return true\n }, [selectedReason, reasonDetail, status])\n\n const handleSubmit = useCallback(() => {\n if (!isFormValid || !selectedReason) return\n\n submitReport({\n reason: selectedReason,\n reasonDetail: selectedReason === 'other' ? reasonDetail : undefined,\n })\n }, [isFormValid, selectedReason, reasonDetail, submitReport])\n\n const handleClose = useCallback(() => {\n navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))\n }, [navigation, conversation_id])\n\n const HeaderRight = useCallback(\n () => <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!isFormValid} />,\n [handleSubmit, isFormValid]\n )\n\n useLayoutEffect(() => {\n if (status === 'pending' || status === 'success') {\n navigation.setOptions({\n headerRight: () => null,\n })\n } else {\n navigation.setOptions({\n headerTitle: 'Report message',\n headerRight: HeaderRight,\n })\n }\n }, [HeaderRight, navigation, status])\n\n if (status === 'pending') {\n return (\n <View style={styles.fullScreenContainer}>\n <Spinner />\n <Text style={styles.loadingText}>Submitting report...</Text>\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <View style={styles.fullScreenContainer}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Message reported</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n The message has been reported and a church leader will be contacted.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"fill\" />\n </BlankState.Root>\n </View>\n )\n }\n\n if (status === 'error') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.exclamationTriangle\" />\n <BlankState.Content>\n <BlankState.Heading>Unable to submit report</BlankState.Heading>\n <BlankState.Text>\n We were unable to report this message. Please try again.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"outline\" />\n </BlankState.Root>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.warningText} maxFontSizeMultiplier={1.5}>\n Reporting this message will notify a church leader. The person you are reporting will not\n receive a notification from Church Center. If someone is in immediate danger, call local\n emergency services. Don&apos;t wait.\n </Text>\n\n <MessagePreview message={message} />\n\n <View style={styles.reasonSection}>\n <Text style={styles.fieldLabel}>\n What best describes the problem? <Text style={styles.required}>*</Text>\n </Text>\n\n <View style={styles.reasonListContainer}>\n <ReportReasonList selectedReason={selectedReason} onReasonChange={handleReasonChange} />\n </View>\n </View>\n\n {selectedReason === 'other' && (\n <View style={styles.detailSection}>\n <Text style={styles.fieldLabel}>\n Please provide more details <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Describe the issue...\"\n value={reasonDetail}\n onChangeText={setReasonDetail}\n maxLength={MAX_DETAIL_LENGTH}\n accessibilityLabel=\"Additional details\"\n accessibilityHint=\"Provide more information about why you're reporting this message\"\n />\n {reasonDetail.length >= MAX_DETAIL_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {reasonDetail.length}/{MAX_DETAIL_LENGTH}\n </Text>\n )}\n </View>\n )}\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n fullScreenContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: colors.surfaceColor100,\n },\n loadingText: {\n marginTop: 16,\n fontSize: 16,\n fontWeight: '600',\n color: colors.textColorDefaultPrimary,\n },\n warningText: {\n fontSize: 14,\n lineHeight: 20,\n color: colors.textColorDefaultSecondary,\n },\n reasonSection: {\n gap: 8,\n },\n fieldLabel: {\n fontSize: 16,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n required: {\n color: colors.statusErrorText,\n },\n reasonListContainer: {\n backgroundColor: colors.surfaceColor100,\n },\n detailSection: {\n gap: 8,\n },\n textInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n textAlignVertical: 'top',\n minHeight: 120,\n maxHeight: 200,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n },\n successIcon: {\n color: colors.statusSuccessIcon,\n fontSize: 48,\n },\n successTitle: {\n fontSize: 24,\n marginBottom: 4,\n },\n successSubtitle: {\n fontSize: 16,\n marginBottom: 4,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"message_report_screen.js","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKzF,OAAc,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,qDAAqD,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E,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation, StackActions } from '@react-navigation/native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport React, { useCallback, useLayoutEffect, useMemo, useState } from 'react'\nimport { View, StyleSheet, TextInput, ScrollView } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Spinner, Text, KeyboardView } from '../components'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { useTheme } from '../hooks'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { useReportMessage } from '../hooks/use_report_message'\nimport { MessageResource } from '../types'\nimport { MessageReportReason } from '../types/resources/message_report'\nimport { platformFontWeightBold } from '../utils'\nimport { MessagePreview } from './message_report/components/message_preview'\nimport { ReportReasonList } from './message_report/components/report_reason_list'\n\nconst MAX_DETAIL_LENGTH = 500\n\nexport const MessageReportScreenOptions = ({\n navigation,\n route,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => {\n const handleClose = () =>\n navigation.dispatch(\n StackActions.popTo('Conversation', {\n conversation_id: route.params?.conversation_id,\n })\n )\n\n return {\n presentation: 'modal',\n title: 'Report message',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={handleClose} />,\n }\n}\n\nexport type MessageReportScreenProps = StaticScreenProps<{\n conversation_id: number\n message_id: string\n}>\n\nexport function MessageReportScreen({ route }: MessageReportScreenProps) {\n const { conversation_id, message_id } = route.params\n\n const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false })\n const message = messages.find(m => m.id === message_id)\n\n if (!message) return null\n\n return <MessageReportScreenContent message={message} conversation_id={conversation_id} />\n}\n\nfunction MessageReportScreenContent({\n message,\n conversation_id,\n}: {\n message: MessageResource\n conversation_id: number\n}) {\n const styles = useStyles()\n const navigation = useNavigation()\n const [selectedReason, setSelectedReason] = useState<MessageReportReason | null>(null)\n const [reasonDetail, setReasonDetail] = useState('')\n const { mutate: submitReport, status } = useReportMessage(conversation_id, message.id)\n\n const handleReasonChange = useCallback((reason: MessageReportReason) => {\n setSelectedReason(reason)\n\n if (reason !== 'other') {\n setReasonDetail('')\n }\n }, [])\n\n const isFormValid = useMemo(() => {\n if (selectedReason === null) return false\n\n if (selectedReason === 'other' && reasonDetail.trim().length === 0) {\n return false\n }\n\n if (status === 'pending') return false\n\n return true\n }, [selectedReason, reasonDetail, status])\n\n const handleSubmit = useCallback(() => {\n if (!isFormValid || !selectedReason) return\n\n submitReport({\n reason: selectedReason,\n reasonDetail: selectedReason === 'other' ? reasonDetail : undefined,\n })\n }, [isFormValid, selectedReason, reasonDetail, submitReport])\n\n const handleClose = useCallback(() => {\n navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))\n }, [navigation, conversation_id])\n\n const HeaderRight = useCallback(\n () => <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!isFormValid} />,\n [handleSubmit, isFormValid]\n )\n\n useLayoutEffect(() => {\n if (status === 'pending' || status === 'success') {\n navigation.setOptions({\n headerRight: () => null,\n })\n } else {\n navigation.setOptions({\n headerTitle: 'Report message',\n headerRight: HeaderRight,\n })\n }\n }, [HeaderRight, navigation, status])\n\n if (status === 'pending') {\n return (\n <View style={styles.fullScreenContainer}>\n <Spinner />\n <Text style={styles.loadingText}>Submitting report...</Text>\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <View style={styles.fullScreenContainer}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Message reported</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n The message has been reported and a church leader will be contacted.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"fill\" />\n </BlankState.Root>\n </View>\n )\n }\n\n if (status === 'error') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.exclamationTriangle\" />\n <BlankState.Content>\n <BlankState.Heading>Unable to submit report</BlankState.Heading>\n <BlankState.Text>\n We were unable to report this message. Please try again.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"outline\" />\n </BlankState.Root>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.warningText} maxFontSizeMultiplier={1.5}>\n Reporting this message will notify a church leader. The person you are reporting will not\n receive a notification from Church Center. If someone is in immediate danger, call local\n emergency services. Don&apos;t wait.\n </Text>\n\n <MessagePreview message={message} />\n\n <View style={styles.reasonSection}>\n <Text style={styles.fieldLabel}>\n What best describes the problem? <Text style={styles.required}>*</Text>\n </Text>\n\n <View style={styles.reasonListContainer}>\n <ReportReasonList selectedReason={selectedReason} onReasonChange={handleReasonChange} />\n </View>\n </View>\n\n {selectedReason === 'other' && (\n <View style={styles.detailSection}>\n <Text style={styles.fieldLabel}>\n Please provide more details <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Describe the issue...\"\n value={reasonDetail}\n onChangeText={setReasonDetail}\n maxLength={MAX_DETAIL_LENGTH}\n accessibilityLabel=\"Additional details\"\n accessibilityHint=\"Provide more information about why you're reporting this message\"\n />\n {reasonDetail.length >= MAX_DETAIL_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {reasonDetail.length}/{MAX_DETAIL_LENGTH}\n </Text>\n )}\n </View>\n )}\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n fullScreenContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: colors.surfaceColor100,\n },\n loadingText: {\n marginTop: 16,\n fontSize: 16,\n fontWeight: '600',\n color: colors.textColorDefaultPrimary,\n },\n warningText: {\n fontSize: 14,\n lineHeight: 20,\n color: colors.textColorDefaultSecondary,\n },\n reasonSection: {\n gap: 8,\n },\n fieldLabel: {\n fontSize: 16,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n required: {\n color: colors.statusErrorText,\n },\n reasonListContainer: {\n backgroundColor: colors.surfaceColor100,\n },\n detailSection: {\n gap: 8,\n },\n textInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n textAlignVertical: 'top',\n minHeight: 120,\n maxHeight: 200,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n },\n successIcon: {\n color: colors.statusSuccessIcon,\n fontSize: 48,\n },\n successTitle: {\n fontSize: 24,\n marginBottom: 4,\n },\n successSubtitle: {\n fontSize: 16,\n marginBottom: 4,\n },\n })\n}\n"]}
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
- export declare function NotFound(): React.JSX.Element;
1
+ export declare function NotFound(): import("react/jsx-runtime").JSX.Element;
3
2
  //# sourceMappingURL=not_found.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"not_found.d.ts","sourceRoot":"","sources":["../../src/screens/not_found.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,wBAAgB,QAAQ,sBAOvB"}
1
+ {"version":3,"file":"not_found.d.ts","sourceRoot":"","sources":["../../src/screens/not_found.tsx"],"names":[],"mappings":"AAIA,wBAAgB,QAAQ,4CAOvB"}
@@ -1,11 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { Button, Text } from '@react-navigation/elements';
2
- import React from 'react';
3
3
  import { StyleSheet, View } from 'react-native';
4
4
  export function NotFound() {
5
- return (<View style={styles.container}>
6
- <Text>404</Text>
7
- <Button href="Conversations">Go to Home</Button>
8
- </View>);
5
+ return (_jsxs(View, { style: styles.container, children: [_jsx(Text, { children: "404" }), _jsx(Button, { href: "Conversations", children: "Go to Home" })] }));
9
6
  }
10
7
  const styles = StyleSheet.create({
11
8
  container: {
@@ -1 +1 @@
1
- {"version":3,"file":"not_found.js","sourceRoot":"","sources":["../../src/screens/not_found.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE/C,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAC5B;MAAA,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CACf;MAAA,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,MAAM,CACjD;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAA","sourcesContent":["import { Button, Text } from '@react-navigation/elements'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\n\nexport function NotFound() {\n return (\n <View style={styles.container}>\n <Text>404</Text>\n <Button href=\"Conversations\">Go to Home</Button>\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n gap: 10,\n },\n})\n"]}
1
+ {"version":3,"file":"not_found.js","sourceRoot":"","sources":["../../src/screens/not_found.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE/C,MAAM,UAAU,QAAQ;IACtB,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,aAC3B,KAAC,IAAI,sBAAW,EAChB,KAAC,MAAM,IAAC,IAAI,EAAC,eAAe,2BAAoB,IAC3C,CACR,CAAA;AACH,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,EAAE;KACR;CACF,CAAC,CAAA","sourcesContent":["import { Button, Text } from '@react-navigation/elements'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\n\nexport function NotFound() {\n return (\n <View style={styles.container}>\n <Text>404</Text>\n <Button href=\"Conversations\">Go to Home</Button>\n </View>\n )\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n gap: 10,\n },\n})\n"]}
@@ -91,5 +91,5 @@ export declare const useGroup: ({ groupId }: {
91
91
  };
92
92
  export declare const useGroupMembershipUpdate: ({ groupId }: {
93
93
  groupId: number | string;
94
- }) => import("@tanstack/react-query").UseMutationResult<ApiResource<GroupMembership>, Error, Partial<GroupMembership>, void>;
94
+ }) => import("@tanstack/react-query").UseMutationResult<ApiResource<GroupMembership>, Error, Partial<GroupMembership>, undefined>;
95
95
  //# sourceMappingURL=groups.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../src/screens/notification_settings/hooks/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+B,MAAM,uBAAuB,CAAA;AAIjF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AAIvF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;CAgB/B,CAAA;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;;;;;;;CAa3E,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIrB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CAIjE,CAAA;AAID,eAAO,MAAM,wBAAwB,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,2HAmFjF,CAAA"}
1
+ {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../src/screens/notification_settings/hooks/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+B,MAAM,uBAAuB,CAAA;AAIjF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAA;AAIvF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;CAgB/B,CAAA;AAEF,eAAO,MAAM,mBAAmB,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;;;;;;;CAa3E,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIrB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CAIjE,CAAA;AAID,eAAO,MAAM,wBAAwB,GAAI,aAAa;IAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,gIAmFjF,CAAA"}
@@ -1,5 +1,4 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
- import React from 'react';
3
2
  export type NotificationSettingsScreenProps = StaticScreenProps<{}>;
4
- export declare function NotificationSettingsScreen({}: NotificationSettingsScreenProps): React.JSX.Element;
3
+ export declare function NotificationSettingsScreen({}: NotificationSettingsScreenProps): import("react/jsx-runtime").JSX.Element;
5
4
  //# sourceMappingURL=notification_settings_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification_settings_screen.d.ts","sourceRoot":"","sources":["../../src/screens/notification_settings_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAiD,MAAM,OAAO,CAAA;AA2CrE,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAA;AAEnE,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,+BAA+B,qBAmK7E"}
1
+ {"version":3,"file":"notification_settings_screen.d.ts","sourceRoot":"","sources":["../../src/screens/notification_settings_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AA4C3E,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAA;AAEnE,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,+BAA+B,2CAmK7E"}
@@ -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, useEffect } from 'react';
4
+ import { useCallback, useEffect } from 'react';
4
5
  import { FlatList, Platform, StyleSheet, View } from 'react-native';
5
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
7
  import { Badge, Heading, Icon, Text } from '../components';
@@ -28,10 +29,10 @@ export function NotificationSettingsScreen({}) {
28
29
  const { data: groups } = useGroups();
29
30
  // Header configuration
30
31
  const HeaderRight = useCallback(() => {
31
- return (<HeaderTextButton onPress={() => {
32
+ return (_jsx(HeaderTextButton, { onPress: () => {
32
33
  // Save settings logic would go here
33
34
  navigation.goBack();
34
- }} title="Done"/>);
35
+ }, title: "Done" }));
35
36
  }, [navigation]);
36
37
  useEffect(() => {
37
38
  navigation.setOptions({
@@ -48,9 +49,7 @@ export function NotificationSettingsScreen({}) {
48
49
  {
49
50
  type: SectionTypes.view,
50
51
  data: {
51
- children: (<Text variant="tertiary" style={styles.sectionDescription}>
52
- Choose which app receives each type of chat notification
53
- </Text>),
52
+ children: (_jsx(Text, { variant: "tertiary", style: styles.sectionDescription, children: "Choose which app receives each type of chat notification" })),
54
53
  },
55
54
  showBottomBorder: true,
56
55
  },
@@ -76,9 +75,7 @@ export function NotificationSettingsScreen({}) {
76
75
  {
77
76
  type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.view,
78
77
  data: {
79
- children: (<Text variant="tertiary" style={styles.sectionDescription}>
80
- Notification settings for all of your group, team and event related conversations
81
- </Text>),
78
+ children: (_jsx(Text, { variant: "tertiary", style: styles.sectionDescription, children: "Notification settings for all of your group, team and event related conversations" })),
82
79
  },
83
80
  showBottomBorder: true,
84
81
  },
@@ -100,74 +97,39 @@ export function NotificationSettingsScreen({}) {
100
97
  const headerIndices = listData
101
98
  .map(({ type }, index) => (type === SectionTypes.header ? index : undefined))
102
99
  .filter(isDefined);
103
- return (<View style={styles.listContainer}>
104
- <FlatList data={listData} contentContainerStyle={styles.contentContainer} renderItem={({ item, index }) => {
105
- const [isStart, isEnd] = [
106
- index === 0 || headerIndices.includes(index),
107
- index === listData.length - 1 || headerIndices.includes(index + 1),
108
- ];
109
- switch (item.type) {
110
- case SectionTypes.header:
111
- return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
112
- <Heading variant="h2">{item.data.title}</Heading>
113
- </ListSection>);
114
- case SectionTypes.setting:
115
- return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
116
- <SettingRow {...item.data}/>
117
- </ListSection>);
118
- case SectionTypes.view:
119
- return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
120
- <View {...item.data} style={item.data.style}/>
121
- </ListSection>);
122
- case SectionTypes.link:
123
- return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
124
- <LinkRow {...item.data}/>
125
- </ListSection>);
126
- case SectionTypes.hidden:
127
- default:
128
- return null;
129
- }
130
- }}/>
131
- </View>);
100
+ return (_jsx(View, { style: styles.listContainer, children: _jsx(FlatList, { data: listData, contentContainerStyle: styles.contentContainer, renderItem: ({ item, index }) => {
101
+ const [isStart, isEnd] = [
102
+ index === 0 || headerIndices.includes(index),
103
+ index === listData.length - 1 || headerIndices.includes(index + 1),
104
+ ];
105
+ switch (item.type) {
106
+ case SectionTypes.header:
107
+ return (_jsx(ListSection, { isStart: isStart, isEnd: isEnd, showBottomBorder: item?.showBottomBorder, outerStyle: item?.sectionOuterStyle, innerStyle: item?.sectionInnerStyle, children: _jsx(Heading, { variant: "h2", children: item.data.title }) }));
108
+ case SectionTypes.setting:
109
+ return (_jsx(ListSection, { isStart: isStart, isEnd: isEnd, showBottomBorder: item?.showBottomBorder, outerStyle: item?.sectionOuterStyle, innerStyle: item?.sectionInnerStyle, children: _jsx(SettingRow, { ...item.data }) }));
110
+ case SectionTypes.view:
111
+ return (_jsx(ListSection, { isStart: isStart, isEnd: isEnd, showBottomBorder: item?.showBottomBorder, outerStyle: item?.sectionOuterStyle, innerStyle: item?.sectionInnerStyle, children: _jsx(View, { ...item.data, style: item.data.style }) }));
112
+ case SectionTypes.link:
113
+ return (_jsx(ListSection, { isStart: isStart, isEnd: isEnd, showBottomBorder: item?.showBottomBorder, outerStyle: item?.sectionOuterStyle, innerStyle: item?.sectionInnerStyle, children: _jsx(LinkRow, { ...item.data }) }));
114
+ case SectionTypes.hidden:
115
+ default:
116
+ return null;
117
+ }
118
+ } }) }));
132
119
  }
133
120
  function ListSection({ isStart, isEnd, showBottomBorder, outerStyle, innerStyle, children, }) {
134
121
  const styles = useStyles({ isStart, isEnd });
135
122
  const bottomBorder = showBottomBorder ? styles.sectionInnerBottomBorder : {};
136
- return (<View style={[styles.sectionOuterBase, outerStyle]}>
137
- <View style={[styles.sectionInnerBase, bottomBorder, innerStyle]}>{children}</View>
138
- </View>);
123
+ return (_jsx(View, { style: [styles.sectionOuterBase, outerStyle], children: _jsx(View, { style: [styles.sectionInnerBase, bottomBorder, innerStyle], children: children }) }));
139
124
  }
140
125
  function SettingRow({ title, style, rightLabel, rightItem, rightItemStyle = {} }) {
141
126
  const styles = useStyles();
142
- return (<View style={[styles.settingRow, style]}>
143
- <View style={styles.settingRowContent}>
144
- <Text variant="plain" style={styles.settingRowText}>
145
- {title}
146
- </Text>
147
- {Boolean(rightLabel) && <Text variant="footnote">{rightLabel}</Text>}
148
- </View>
149
- {Boolean(rightItem) && <View style={rightItemStyle}>{rightItem}</View>}
150
- </View>);
127
+ return (_jsxs(View, { style: [styles.settingRow, style], children: [_jsxs(View, { style: styles.settingRowContent, children: [_jsx(Text, { variant: "plain", style: styles.settingRowText, children: title }), Boolean(rightLabel) && _jsx(Text, { variant: "footnote", children: rightLabel })] }), Boolean(rightItem) && _jsx(View, { style: rightItemStyle, children: rightItem })] }));
151
128
  }
152
129
  function LinkRow({ title, subtitle, rightLabel, onPress }) {
153
130
  const styles = useLinkRowStyles();
154
131
  const isSourceType = rightLabel === 'Team' || rightLabel === 'Group' || rightLabel === 'PlanTeam';
155
- return (<PlatformPressable style={styles.row} onPress={onPress} accessibilityRole="link" accessibilityLabel={title} accessibilityHint={`Navigate to ${title} settings`}>
156
- <View style={styles.innerContainer}>
157
- <View style={styles.leftContent}>
158
- <Text style={styles.title} numberOfLines={2}>
159
- {title}
160
- </Text>
161
- {Boolean(subtitle) && <Text variant="tertiary">{subtitle}</Text>}
162
- </View>
163
- <View style={styles.rightContent}>
164
- {isSourceType ? (<Badge label={rightLabel} appearance="neutral" variant="meta"/>) : (<Text numberOfLines={1} style={styles.rightLabelText}>
165
- {rightLabel}
166
- </Text>)}
167
- {Platform.OS === 'ios' && (<Icon name="general.rightChevron" size={16} style={styles.icon}/>)}
168
- </View>
169
- </View>
170
- </PlatformPressable>);
132
+ return (_jsx(PlatformPressable, { style: styles.row, onPress: onPress, accessibilityRole: "link", accessibilityLabel: title, accessibilityHint: `Navigate to ${title} settings`, children: _jsxs(View, { style: styles.innerContainer, children: [_jsxs(View, { style: styles.leftContent, children: [_jsx(Text, { style: styles.title, numberOfLines: 2, children: title }), Boolean(subtitle) && _jsx(Text, { variant: "tertiary", children: subtitle })] }), _jsxs(View, { style: styles.rightContent, children: [isSourceType ? (_jsx(Badge, { label: rightLabel, appearance: "neutral", variant: "meta" })) : (_jsx(Text, { numberOfLines: 1, style: styles.rightLabelText, children: rightLabel })), Platform.OS === 'ios' && (_jsx(Icon, { name: "general.rightChevron", size: 16, style: styles.icon }))] })] }) }));
171
133
  }
172
134
  // =================================
173
135
  // ====== Styles ===================
@@ -1 +1 @@
1
- {"version":3,"file":"notification_settings_screen.js","sourceRoot":"","sources":["../../src/screens/notification_settings_screen.tsx"],"names":[],"mappings":"A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wB,EAAE;YACxB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;YAChD,iBAAiB,EAAE,CAAC;SACrB;QACD,kBAAkB,EAAE;YAClB,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;QACD,UAAU,EAAE;YACV,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,CAAC;SACR;QACD,cAAc,EAAE;YACd,UAAU,EAAE,EAAE;SACf;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IAExB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,GAAG,EAAE;YACH,WAAW,EAAE,CAAC;YACd,eAAe,EAAE,EAAE;SACpB;QACD,cAAc,EAAE;YACd,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,GAAG,EAAE,EAAE;SACR;QACD,WAAW,EAAE;YACX,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,YAAY,EAAE;YACZ,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,KAAK,EAAE,EAAE;QACT,cAAc,EAAE;YACd,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,yBAAyB;SAC9C;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,wBAAwB;SAC7C;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback, useEffect, type ReactNode } from 'react'\nimport { FlatList, Platform, StyleSheet, View, type ViewProps, type ViewStyle } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Badge, Heading, Icon, Text } from '../components'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport { useTheme } from '../hooks'\nimport { isDefined } from '../types'\nimport { chatTypeLabel } from '../utils'\nimport { useGroups } from './notification_settings/hooks/groups'\nimport { useChatTypes } from './preferred_app/hooks/use_chat_types'\n\n// =========================================\n// ====== Factory Constants & Types ========\n// =========================================\n\nenum SectionTypes {\n header,\n hidden,\n setting,\n view,\n link,\n}\n\ntype SectionListData = Array<\n | DataItem<{ title: string }, SectionTypes.header>\n | DataItem<ViewProps, SectionTypes.view>\n | DataItem<SettingRowProps, SectionTypes.setting>\n | DataItem<LinkRowProps, SectionTypes.link>\n | DataItem<any, SectionTypes.hidden>\n>\n\ninterface DataItem<T, TName extends SectionTypes> {\n type: TName\n data: T\n sectionOuterStyle?: ViewStyle\n sectionInnerStyle?: ViewStyle\n showBottomBorder?: boolean\n}\n\n// =================================\n// ====== Components ===============\n// =================================\n\nexport type NotificationSettingsScreenProps = StaticScreenProps<{}>\n\nexport function NotificationSettingsScreen({}: NotificationSettingsScreenProps) {\n const navigation = useNavigation()\n const styles = useStyles()\n const { data: chatTypes } = useChatTypes()\n const { data: groups } = useGroups()\n\n // Header configuration\n const HeaderRight = useCallback(() => {\n return (\n <HeaderTextButton\n onPress={() => {\n // Save settings logic would go here\n navigation.goBack()\n }}\n title=\"Done\"\n />\n )\n }, [navigation])\n\n useEffect(() => {\n navigation.setOptions({\n headerRight: HeaderRight,\n })\n }, [HeaderRight, navigation])\n\n // Build section data\n const listData = [\n {\n type: SectionTypes.header,\n data: { title: 'Preferred app' },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: SectionTypes.view,\n data: {\n children: (\n <Text variant=\"tertiary\" style={styles.sectionDescription}>\n Choose which app receives each type of chat notification\n </Text>\n ),\n },\n showBottomBorder: true,\n },\n ...chatTypes.map(type => ({\n type: SectionTypes.link,\n data: {\n title: chatTypeLabel(type.title),\n rightLabel: type.preferredApp,\n onPress: () =>\n navigation.navigate('PreferredAppSelection', {\n chatTypeId: type.id,\n }),\n },\n sectionInnerStyle: { paddingVertical: 0 },\n showBottomBorder: true,\n })),\n {\n type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.header,\n data: {\n title: 'Manage chat settings',\n },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.view,\n data: {\n children: (\n <Text variant=\"tertiary\" style={styles.sectionDescription}>\n Notification settings for all of your group, team and event related conversations\n </Text>\n ),\n },\n showBottomBorder: true,\n },\n ...groups.map(group => ({\n type: SectionTypes.link,\n data: {\n title: group.name,\n subtitle: group.myGroupMembership?.notificationLevelDescription,\n rightLabel: group.sourceType,\n onPress: () =>\n navigation.navigate('GroupNotificationSettings', {\n groupId: group.id,\n title: group.name || 'Group',\n }),\n },\n sectionInnerStyle: { paddingVertical: 0 },\n showBottomBorder: true,\n })),\n ].filter(item => item.type !== SectionTypes.hidden)\n\n const headerIndices = listData\n .map(({ type }, index) => (type === SectionTypes.header ? index : undefined))\n .filter(isDefined)\n\n return (\n <View style={styles.listContainer}>\n <FlatList\n data={listData as SectionListData}\n contentContainerStyle={styles.contentContainer}\n renderItem={({ item, index }) => {\n const [isStart, isEnd] = [\n index === 0 || headerIndices.includes(index),\n index === listData.length - 1 || headerIndices.includes(index + 1),\n ]\n\n switch (item.type) {\n case SectionTypes.header:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Heading variant=\"h2\">{item.data.title}</Heading>\n </ListSection>\n )\n case SectionTypes.setting:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <SettingRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.view:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <View {...item.data} style={item.data.style} />\n </ListSection>\n )\n case SectionTypes.link:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <LinkRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.hidden:\n default:\n return null\n }\n }}\n />\n </View>\n )\n}\n\ninterface ListSectionProps {\n isStart?: boolean\n isEnd?: boolean\n showBottomBorder?: boolean\n outerStyle?: ViewStyle\n innerStyle?: ViewStyle\n children: ReactNode\n}\n\nfunction ListSection({\n isStart,\n isEnd,\n showBottomBorder,\n outerStyle,\n innerStyle,\n children,\n}: ListSectionProps) {\n const styles = useStyles({ isStart, isEnd })\n const bottomBorder = showBottomBorder ? styles.sectionInnerBottomBorder : {}\n\n return (\n <View style={[styles.sectionOuterBase, outerStyle]}>\n <View style={[styles.sectionInnerBase, bottomBorder, innerStyle]}>{children}</View>\n </View>\n )\n}\n\ninterface SettingRowProps {\n title: string\n style?: ViewStyle\n rightItem?: ReactNode\n rightLabel?: string\n rightItemStyle?: ViewStyle\n}\n\nfunction SettingRow({ title, style, rightLabel, rightItem, rightItemStyle = {} }: SettingRowProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.settingRow, style]}>\n <View style={styles.settingRowContent}>\n <Text variant=\"plain\" style={styles.settingRowText}>\n {title}\n </Text>\n {Boolean(rightLabel) && <Text variant=\"footnote\">{rightLabel}</Text>}\n </View>\n {Boolean(rightItem) && <View style={rightItemStyle}>{rightItem}</View>}\n </View>\n )\n}\n\ninterface LinkRowProps {\n title: string\n subtitle?: string\n rightLabel: string\n onPress: () => void\n}\n\nfunction LinkRow({ title, subtitle, rightLabel, onPress }: LinkRowProps) {\n const styles = useLinkRowStyles()\n const isSourceType = rightLabel === 'Team' || rightLabel === 'Group' || rightLabel === 'PlanTeam'\n\n return (\n <PlatformPressable\n style={styles.row}\n onPress={onPress}\n accessibilityRole=\"link\"\n accessibilityLabel={title}\n accessibilityHint={`Navigate to ${title} settings`}\n >\n <View style={styles.innerContainer}>\n <View style={styles.leftContent}>\n <Text style={styles.title} numberOfLines={2}>\n {title}\n </Text>\n {Boolean(subtitle) && <Text variant=\"tertiary\">{subtitle}</Text>}\n </View>\n <View style={styles.rightContent}>\n {isSourceType ? (\n <Badge label={rightLabel} appearance=\"neutral\" variant=\"meta\" />\n ) : (\n <Text numberOfLines={1} style={styles.rightLabelText}>\n {rightLabel}\n </Text>\n )}\n {Platform.OS === 'ios' && (\n <Icon name=\"general.rightChevron\" size={16} style={styles.icon} />\n )}\n </View>\n </View>\n </PlatformPressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({}: { isStart?: boolean; isEnd?: boolean } = {}) => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n const headerBottomPadding = 0\n\n return StyleSheet.create({\n listContainer: {\n flex: 1,\n },\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionOuterBase: {\n paddingLeft: 16,\n },\n sectionInnerBase: {\n paddingRight: 16,\n paddingVertical: 16,\n },\n sectionInnerHeader: {\n paddingTop: 24,\n paddingBottom: headerBottomPadding,\n },\n sectionInnerBottomBorder: {\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: 1,\n },\n sectionDescription: {\n color: colors.textColorDefaultSecondary,\n },\n settingRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n },\n settingRowContent: {\n flex: 1,\n },\n settingRowText: {\n lineHeight: 20,\n },\n })\n}\n\nconst useLinkRowStyles = () => {\n const theme = useTheme()\n\n return StyleSheet.create({\n row: {\n paddingLeft: 0,\n paddingVertical: 16,\n },\n innerContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n },\n leftContent: {\n flex: 1,\n gap: 4,\n },\n rightContent: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n title: {},\n rightLabelText: {\n color: theme.colors.textColorDefaultSecondary,\n },\n icon: {\n color: theme.colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"notification_settings_screen.js","sourceRoot":"","sources":["../../src/screens/notification_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,SAAS,EAAkB,MAAM,OAAO,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAkC,MAAM,cAAc,CAAA;AACnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAEnE,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAK,YAMJ;AAND,WAAK,YAAY;IACf,mDAAM,CAAA;IACN,mDAAM,CAAA;IACN,qDAAO,CAAA;IACP,+CAAI,CAAA;IACJ,+CAAI,CAAA;AACN,CAAC,EANI,YAAY,KAAZ,YAAY,QA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,CAAC,MAAM,CAAC,yBAAyB;SAC9C;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,wBAAwB;SAC7C;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback, useEffect, type ReactNode } from 'react'\nimport { FlatList, Platform, StyleSheet, View, type ViewProps, type ViewStyle } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Badge, Heading, Icon, Text } from '../components'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport { useTheme } from '../hooks'\nimport { isDefined } from '../types'\nimport { chatTypeLabel } from '../utils'\nimport { useGroups } from './notification_settings/hooks/groups'\nimport { useChatTypes } from './preferred_app/hooks/use_chat_types'\n\n// =========================================\n// ====== Factory Constants & Types ========\n// =========================================\n\nenum SectionTypes {\n header,\n hidden,\n setting,\n view,\n link,\n}\n\ntype SectionListData = Array<\n | DataItem<{ title: string }, SectionTypes.header>\n | DataItem<ViewProps, SectionTypes.view>\n | DataItem<SettingRowProps, SectionTypes.setting>\n | DataItem<LinkRowProps, SectionTypes.link>\n | DataItem<any, SectionTypes.hidden>\n>\n\ninterface DataItem<T, TName extends SectionTypes> {\n type: TName\n data: T\n sectionOuterStyle?: ViewStyle\n sectionInnerStyle?: ViewStyle\n showBottomBorder?: boolean\n}\n\n// =================================\n// ====== Components ===============\n// =================================\n\nexport type NotificationSettingsScreenProps = StaticScreenProps<{}>\n\nexport function NotificationSettingsScreen({}: NotificationSettingsScreenProps) {\n const navigation = useNavigation()\n const styles = useStyles()\n const { data: chatTypes } = useChatTypes()\n const { data: groups } = useGroups()\n\n // Header configuration\n const HeaderRight = useCallback(() => {\n return (\n <HeaderTextButton\n onPress={() => {\n // Save settings logic would go here\n navigation.goBack()\n }}\n title=\"Done\"\n />\n )\n }, [navigation])\n\n useEffect(() => {\n navigation.setOptions({\n headerRight: HeaderRight,\n })\n }, [HeaderRight, navigation])\n\n // Build section data\n const listData = [\n {\n type: SectionTypes.header,\n data: { title: 'Preferred app' },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: SectionTypes.view,\n data: {\n children: (\n <Text variant=\"tertiary\" style={styles.sectionDescription}>\n Choose which app receives each type of chat notification\n </Text>\n ),\n },\n showBottomBorder: true,\n },\n ...chatTypes.map(type => ({\n type: SectionTypes.link,\n data: {\n title: chatTypeLabel(type.title),\n rightLabel: type.preferredApp,\n onPress: () =>\n navigation.navigate('PreferredAppSelection', {\n chatTypeId: type.id,\n }),\n },\n sectionInnerStyle: { paddingVertical: 0 },\n showBottomBorder: true,\n })),\n {\n type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.header,\n data: {\n title: 'Manage chat settings',\n },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: groups.length === 0 ? SectionTypes.hidden : SectionTypes.view,\n data: {\n children: (\n <Text variant=\"tertiary\" style={styles.sectionDescription}>\n Notification settings for all of your group, team and event related conversations\n </Text>\n ),\n },\n showBottomBorder: true,\n },\n ...groups.map(group => ({\n type: SectionTypes.link,\n data: {\n title: group.name,\n subtitle: group.myGroupMembership?.notificationLevelDescription,\n rightLabel: group.sourceType,\n onPress: () =>\n navigation.navigate('GroupNotificationSettings', {\n groupId: group.id,\n title: group.name || 'Group',\n }),\n },\n sectionInnerStyle: { paddingVertical: 0 },\n showBottomBorder: true,\n })),\n ].filter(item => item.type !== SectionTypes.hidden)\n\n const headerIndices = listData\n .map(({ type }, index) => (type === SectionTypes.header ? index : undefined))\n .filter(isDefined)\n\n return (\n <View style={styles.listContainer}>\n <FlatList\n data={listData as SectionListData}\n contentContainerStyle={styles.contentContainer}\n renderItem={({ item, index }) => {\n const [isStart, isEnd] = [\n index === 0 || headerIndices.includes(index),\n index === listData.length - 1 || headerIndices.includes(index + 1),\n ]\n\n switch (item.type) {\n case SectionTypes.header:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Heading variant=\"h2\">{item.data.title}</Heading>\n </ListSection>\n )\n case SectionTypes.setting:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <SettingRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.view:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <View {...item.data} style={item.data.style} />\n </ListSection>\n )\n case SectionTypes.link:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <LinkRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.hidden:\n default:\n return null\n }\n }}\n />\n </View>\n )\n}\n\ninterface ListSectionProps {\n isStart?: boolean\n isEnd?: boolean\n showBottomBorder?: boolean\n outerStyle?: ViewStyle\n innerStyle?: ViewStyle\n children: ReactNode\n}\n\nfunction ListSection({\n isStart,\n isEnd,\n showBottomBorder,\n outerStyle,\n innerStyle,\n children,\n}: ListSectionProps) {\n const styles = useStyles({ isStart, isEnd })\n const bottomBorder = showBottomBorder ? styles.sectionInnerBottomBorder : {}\n\n return (\n <View style={[styles.sectionOuterBase, outerStyle]}>\n <View style={[styles.sectionInnerBase, bottomBorder, innerStyle]}>{children}</View>\n </View>\n )\n}\n\ninterface SettingRowProps {\n title: string\n style?: ViewStyle\n rightItem?: ReactNode\n rightLabel?: string\n rightItemStyle?: ViewStyle\n}\n\nfunction SettingRow({ title, style, rightLabel, rightItem, rightItemStyle = {} }: SettingRowProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.settingRow, style]}>\n <View style={styles.settingRowContent}>\n <Text variant=\"plain\" style={styles.settingRowText}>\n {title}\n </Text>\n {Boolean(rightLabel) && <Text variant=\"footnote\">{rightLabel}</Text>}\n </View>\n {Boolean(rightItem) && <View style={rightItemStyle}>{rightItem}</View>}\n </View>\n )\n}\n\ninterface LinkRowProps {\n title: string\n subtitle?: string\n rightLabel: string\n onPress: () => void\n}\n\nfunction LinkRow({ title, subtitle, rightLabel, onPress }: LinkRowProps) {\n const styles = useLinkRowStyles()\n const isSourceType = rightLabel === 'Team' || rightLabel === 'Group' || rightLabel === 'PlanTeam'\n\n return (\n <PlatformPressable\n style={styles.row}\n onPress={onPress}\n accessibilityRole=\"link\"\n accessibilityLabel={title}\n accessibilityHint={`Navigate to ${title} settings`}\n >\n <View style={styles.innerContainer}>\n <View style={styles.leftContent}>\n <Text style={styles.title} numberOfLines={2}>\n {title}\n </Text>\n {Boolean(subtitle) && <Text variant=\"tertiary\">{subtitle}</Text>}\n </View>\n <View style={styles.rightContent}>\n {isSourceType ? (\n <Badge label={rightLabel} appearance=\"neutral\" variant=\"meta\" />\n ) : (\n <Text numberOfLines={1} style={styles.rightLabelText}>\n {rightLabel}\n </Text>\n )}\n {Platform.OS === 'ios' && (\n <Icon name=\"general.rightChevron\" size={16} style={styles.icon} />\n )}\n </View>\n </View>\n </PlatformPressable>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({}: { isStart?: boolean; isEnd?: boolean } = {}) => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n const headerBottomPadding = 0\n\n return StyleSheet.create({\n listContainer: {\n flex: 1,\n },\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionOuterBase: {\n paddingLeft: 16,\n },\n sectionInnerBase: {\n paddingRight: 16,\n paddingVertical: 16,\n },\n sectionInnerHeader: {\n paddingTop: 24,\n paddingBottom: headerBottomPadding,\n },\n sectionInnerBottomBorder: {\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: 1,\n },\n sectionDescription: {\n color: colors.textColorDefaultSecondary,\n },\n settingRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n },\n settingRowContent: {\n flex: 1,\n },\n settingRowText: {\n lineHeight: 20,\n },\n })\n}\n\nconst useLinkRowStyles = () => {\n const theme = useTheme()\n\n return StyleSheet.create({\n row: {\n paddingLeft: 0,\n paddingVertical: 16,\n },\n innerContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n },\n leftContent: {\n flex: 1,\n gap: 4,\n },\n rightContent: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n },\n title: {},\n rightLabelText: {\n color: theme.colors.textColorDefaultSecondary,\n },\n icon: {\n color: theme.colors.iconColorDefaultDisabled,\n },\n })\n}\n"]}
@@ -1,10 +1,9 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
- import React from 'react';
3
2
  import { PreferredApp } from './preferred_app/hooks/use_chat_types';
4
3
  export type PreferredAppSelectionScreenProps = StaticScreenProps<{
5
4
  chatTypeId: number | string;
6
5
  conversationType?: 'group' | 'team';
7
6
  currentSelection?: PreferredApp;
8
7
  }>;
9
- export declare function PreferredAppSelectionScreen({ route }: PreferredAppSelectionScreenProps): React.JSX.Element;
8
+ export declare function PreferredAppSelectionScreen({ route }: PreferredAppSelectionScreenProps): import("react/jsx-runtime").JSX.Element;
10
9
  //# sourceMappingURL=preferred_app_selection_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preferred_app_selection_screen.d.ts","sourceRoot":"","sources":["../../src/screens/preferred_app_selection_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,KAAiC,MAAM,OAAO,CAAA;AAOrD,OAAO,EAAE,YAAY,EAAgB,MAAM,sCAAsC,CAAA;AAEjF,MAAM,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;IAC/D,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACnC,gBAAgB,CAAC,EAAE,YAAY,CAAA;CAChC,CAAC,CAAA;AAEF,wBAAgB,2BAA2B,CAAC,EAAE,KAAK,EAAE,EAAE,gCAAgC,qBAkDtF"}
1
+ {"version":3,"file":"preferred_app_selection_screen.d.ts","sourceRoot":"","sources":["../../src/screens/preferred_app_selection_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAS5D,OAAO,EAAE,YAAY,EAAgB,MAAM,sCAAsC,CAAA;AAEjF,MAAM,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;IAC/D,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACnC,gBAAgB,CAAC,EAAE,YAAY,CAAA;CAChC,CAAC,CAAA;AAEF,wBAAgB,2BAA2B,CAAC,EAAE,KAAK,EAAE,EAAE,gCAAgC,2CAkDtF"}
@@ -1,6 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { PlatformPressable } from '@react-navigation/elements';
2
3
  import { useMutation } from '@tanstack/react-query';
3
- import React from 'react';
4
4
  import { Image, StyleSheet, View } from 'react-native';
5
5
  import { Heading, Icon, Text } from '../components';
6
6
  import { useApiClient, useTheme } from '../hooks';
@@ -31,20 +31,7 @@ export function PreferredAppSelectionScreen({ route }) {
31
31
  updateChatType(app);
32
32
  };
33
33
  const sectionTitle = chatType ? chatTypeLabel(chatType.title) : undefined;
34
- return (<View style={styles.container}>
35
- <View style={styles.section}>
36
- <Heading variant="h2" style={styles.sectionHeading}>
37
- {sectionTitle}
38
- </Heading>
39
- {preferredAppOptions?.sort(sortPreferredApp('asc')).map((option, key) => (<PressableRow key={`${key}-${option}`} isActive={chatType?.preferredApp === option} onPress={() => handleSelection(option)}>
40
- <Image source={getAppImage(option)} style={styles.logo}/>
41
- <Text>
42
- {option}
43
- {appName.includes(option.replace(/\s/, '').toLowerCase()) ? ' ( current )' : ''}
44
- </Text>
45
- </PressableRow>))}
46
- </View>
47
- </View>);
34
+ return (_jsx(View, { style: styles.container, children: _jsxs(View, { style: styles.section, children: [_jsx(Heading, { variant: "h2", style: styles.sectionHeading, children: sectionTitle }), preferredAppOptions?.sort(sortPreferredApp('asc')).map((option, key) => (_jsxs(PressableRow, { isActive: chatType?.preferredApp === option, onPress: () => handleSelection(option), children: [_jsx(Image, { source: getAppImage(option), style: styles.logo }), _jsxs(Text, { children: [option, appName.includes(option.replace(/\s/, '').toLowerCase()) ? ' ( current )' : ''] })] }, `${key}-${option}`)))] }) }));
48
35
  }
49
36
  const sortPreferredApp = (dir) => (a, b) => {
50
37
  if (a === 'None')
@@ -69,12 +56,7 @@ const getAppImage = (option) => {
69
56
  };
70
57
  const PressableRow = ({ children, isActive, onPress, style, }) => {
71
58
  const styles = useRowStyles({ isActive });
72
- return (<PlatformPressable style={styles.pressable} onPress={onPress} accessibilityRole="radio" accessibilityState={{ selected: isActive }}>
73
- <View style={styles.row}>
74
- <View style={[styles.rowInner, style]}>{children}</View>
75
- <Icon name="general.check" style={styles.rowIconRight} accessibilityElementsHidden maxFontSizeMultiplier={2.5}/>
76
- </View>
77
- </PlatformPressable>);
59
+ return (_jsx(PlatformPressable, { style: styles.pressable, onPress: onPress, accessibilityRole: "radio", accessibilityState: { selected: isActive }, children: _jsxs(View, { style: styles.row, children: [_jsx(View, { style: [styles.rowInner, style], children: children }), _jsx(Icon, { name: "general.check", style: styles.rowIconRight, accessibilityElementsHidden: true, maxFontSizeMultiplier: 2.5 })] }) }));
78
60
  };
79
61
  const styles = StyleSheet.create({
80
62
  container: {