@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,6 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { useNavigation } from '@react-navigation/native';
2
3
  import { startsWith } from 'lodash';
3
- import React, { useCallback, useLayoutEffect, useState } from 'react';
4
+ import { useCallback, useLayoutEffect, useState } from 'react';
4
5
  import { View, StyleSheet, TextInput, Linking, ScrollView, TouchableOpacity, Platform, } from 'react-native';
5
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
7
  import { Button, Spinner, Text, TextInlineButton, ImageAttachmentPreview, Icon, KeyboardView, } from '../components';
@@ -31,7 +32,7 @@ var BUG_TYPE_OPTIONS;
31
32
  export const BugReportScreenOptions = ({ navigation, }) => ({
32
33
  presentation: 'modal',
33
34
  title: 'Report a bug',
34
- headerLeft: () => <HeaderDismissButton title="Cancel" onPress={() => navigation.goBack()}/>,
35
+ headerLeft: () => _jsx(HeaderDismissButton, { title: "Cancel", onPress: () => navigation.goBack() }),
35
36
  });
36
37
  var QualifiedMobileAppName;
37
38
  (function (QualifiedMobileAppName) {
@@ -116,129 +117,22 @@ export function BugReportScreen() {
116
117
  useLayoutEffect(() => {
117
118
  navigation.setOptions({
118
119
  // eslint-disable-next-line react/no-unstable-nested-components
119
- headerRight: () => (<HeaderTextButton title="Submit" onPress={handleSubmit} disabled={!formValid}/>),
120
+ headerRight: () => (_jsx(HeaderTextButton, { title: "Submit", onPress: handleSubmit, disabled: !formValid })),
120
121
  });
121
122
  }, [formValid, handleSubmit, navigation]);
122
123
  if (status === 'pending') {
123
- return (<View style={[styles.container, styles.fullHeight]}>
124
- <DefaultLoading />
125
- </View>);
124
+ return (_jsx(View, { style: [styles.container, styles.fullHeight], children: _jsx(DefaultLoading, {}) }));
126
125
  }
127
126
  if (status === 'success') {
128
- return (<BlankState.Root>
129
- <BlankState.Imagery name="general.checkCircle" style={styles.successIcon}/>
130
- <BlankState.Content>
131
- <BlankState.Heading style={styles.successTitle}>Thank you!</BlankState.Heading>
132
- <BlankState.Text style={styles.successSubtitle}>
133
- We appreciate you taking the time to help improve {DisplayableAppName[name]}! We'll take
134
- a look at the issue you reported.
135
- </BlankState.Text>
136
- </BlankState.Content>
137
- <BlankState.Button title="Return to chat" onPress={navigation.goBack} size="lg" variant="fill"/>
138
- </BlankState.Root>);
127
+ return (_jsxs(BlankState.Root, { children: [_jsx(BlankState.Imagery, { name: "general.checkCircle", style: styles.successIcon }), _jsxs(BlankState.Content, { children: [_jsx(BlankState.Heading, { style: styles.successTitle, children: "Thank you!" }), _jsxs(BlankState.Text, { style: styles.successSubtitle, children: ["We appreciate you taking the time to help improve ", DisplayableAppName[name], "! We'll take a look at the issue you reported."] })] }), _jsx(BlankState.Button, { title: "Return to chat", onPress: navigation.goBack, size: "lg", variant: "fill" })] }));
139
128
  }
140
129
  if (status === 'error') {
141
- return (<View style={styles.container}>
142
- <Text>
143
- This is embarrassing, we can't submit your bug report right now. If you still need help or
144
- would like to submit this bug report another way please{' '}
145
- <TextInlineButton accessibilityRole="link" onPress={() => Linking.openURL('https://support.planningcenteronline.com/hc/en-us/requests/new')}>
146
- contact our help center
147
- </TextInlineButton>
148
- .
149
- </Text>
150
- <Button title="Return to chat" onPress={navigation.goBack} variant="fill" size="lg"/>
151
- </View>);
130
+ return (_jsxs(View, { style: styles.container, children: [_jsxs(Text, { children: ["This is embarrassing, we can't submit your bug report right now. If you still need help or would like to submit this bug report another way please", ' ', _jsx(TextInlineButton, { accessibilityRole: "link", onPress: () => Linking.openURL('https://support.planningcenteronline.com/hc/en-us/requests/new'), children: "contact our help center" }), "."] }), _jsx(Button, { title: "Return to chat", onPress: navigation.goBack, variant: "fill", size: "lg" })] }));
152
131
  }
153
- return (<KeyboardView>
154
- <ScrollView contentContainerStyle={styles.container}>
155
- <Text style={styles.description}>
156
- Thanks for helping us improve {DisplayableAppName[name]}. We won't be able to respond to
157
- your submission, but your feedback helps us improve the experience helps us improve the
158
- experience.
159
- </Text>
160
-
161
- <View style={styles.textInputContainer}>
162
- <Text style={styles.fieldLabel}>
163
- Where did you experience the issue? <Text style={styles.required}>*</Text>
164
- </Text>
165
- <TouchableOpacity style={styles.pickerButton} onPress={() => setShowBugTypePicker(true)}>
166
- <Text style={[styles.pickerText, !bugType && styles.pickerPlaceholder]}>{bugType}</Text>
167
- <Icon name="general.downChevron" style={styles.pickerArrow} accessibilityElementsHidden/>
168
- </TouchableOpacity>
169
- </View>
170
-
171
- <SafeAreaModal visible={showBugTypePicker} animationType="slide" presentationStyle="pageSheet" onRequestClose={() => setShowBugTypePicker(false)}>
172
- <View style={styles.modalContainer}>
173
- <View style={styles.modalHeader}>
174
- <HeaderDismissButton title="Cancel" onPress={() => setShowBugTypePicker(false)}/>
175
- <Text style={styles.modalTitle}>Select Bug Type</Text>
176
- <View style={styles.modalHeaderSpacer}/>
177
- </View>
178
- <ScrollView style={styles.modalContent}>
179
- {Object.values(BUG_TYPE_OPTIONS).map(option => (<TouchableOpacity key={option} style={styles.modalOption} onPress={() => {
180
- setBugType(option);
181
- setShowBugTypePicker(false);
182
- }}>
183
- <Text style={styles.modalOptionText}>{option}</Text>
184
- {bugType === option && (<Icon name="general.check" style={styles.modalCheckmark} accessibilityElementsHidden/>)}
185
- </TouchableOpacity>))}
186
- </ScrollView>
187
- </View>
188
- </SafeAreaModal>
189
-
190
- <View style={styles.textInputContainer}>
191
- <Text style={styles.fieldLabel}>
192
- What were you trying to do when you encountered the bug?{' '}
193
- <Text style={styles.required}>*</Text>
194
- </Text>
195
- <TextInput style={styles.textInput} multiline placeholder="Description" value={whatWereDoing} onChangeText={setWhatWereDoing} maxLength={MAX_DESCRIPTION_LENGTH}/>
196
- {whatWereDoing.length >= MAX_DESCRIPTION_LENGTH - 100 && (<Text variant="footnote">
197
- {whatWereDoing.length}/{MAX_DESCRIPTION_LENGTH}
198
- </Text>)}
199
- </View>
200
-
201
- <View style={styles.textInputContainer}>
202
- <Text style={styles.fieldLabel}>
203
- What did you expect to happen? Please describe what actually happened.{' '}
204
- <Text style={styles.required}>*</Text>
205
- </Text>
206
- <TextInput style={styles.textInput} multiline placeholder="Description" value={whatExpected} onChangeText={setWhatExpected} maxLength={MAX_DESCRIPTION_LENGTH}/>
207
- {whatExpected.length >= MAX_DESCRIPTION_LENGTH - 100 && (<Text variant="footnote">
208
- {whatExpected.length}/{MAX_DESCRIPTION_LENGTH}
209
- </Text>)}
210
- </View>
211
-
212
- <View style={styles.attachmentSection}>
213
- <View style={styles.attachmentHeader}>
214
- <Text style={styles.attachmentLabel}>
215
- Attachment <Text style={styles.subLabel}>(optional)</Text>
216
- </Text>
217
- {uploading && <Spinner />}
218
- </View>
219
- {uploadError && <Text style={styles.attachmentErrorText}>{uploadError}</Text>}
220
- {attachment ? (<View style={styles.attachmentPreviewContainer}>
221
- {isImageAttachment ? (<ImageAttachmentPreview uri={imagePreviewURI} fileName={attachment.name} onRemovePress={handleRemoveAttachment}/>) : (<VideoAttachmentPreview name={attachment.name} onRemovePress={handleRemoveAttachment}/>)}
222
- </View>) : (<Button title="Attach a screenshot or recording" accessibilityHint="Opens your device's image gallery" iconNameLeft="general.paperclip" onPress={pickImage} size="sm" variant="outline" style={styles.attachButton} disabled={uploading || Boolean(attachment)}/>)}
223
- <Text variant="footnote">
224
- Screenshots and screen recordings help us reproduce and fix issues faster.{' '}
225
- <TextInlineButton accessibilityRole="link" variant="footnote" onPress={() => Linking.openURL(VIDEO_RECORDING_HELP_URL)}>
226
- How to record your screen
227
- </TextInlineButton>
228
- </Text>
229
- </View>
230
-
231
- <View style={styles.footer}>
232
- <Text variant="footnote">
233
- For details on how we process your data and ensure its security, please refer to our{' '}
234
- <TextInlineButton accessibilityRole="link" variant="footnote" onPress={() => Linking.openURL('https://www.planningcenter.com/privacy')}>
235
- Privacy Policy
236
- </TextInlineButton>
237
- .
238
- </Text>
239
- </View>
240
- </ScrollView>
241
- </KeyboardView>);
132
+ return (_jsx(KeyboardView, { children: _jsxs(ScrollView, { contentContainerStyle: styles.container, children: [_jsxs(Text, { style: styles.description, children: ["Thanks for helping us improve ", DisplayableAppName[name], ". We won't be able to respond to your submission, but your feedback helps us improve the experience helps us improve the experience."] }), _jsxs(View, { style: styles.textInputContainer, children: [_jsxs(Text, { style: styles.fieldLabel, children: ["Where did you experience the issue? ", _jsx(Text, { style: styles.required, children: "*" })] }), _jsxs(TouchableOpacity, { style: styles.pickerButton, onPress: () => setShowBugTypePicker(true), children: [_jsx(Text, { style: [styles.pickerText, !bugType && styles.pickerPlaceholder], children: bugType }), _jsx(Icon, { name: "general.downChevron", style: styles.pickerArrow, accessibilityElementsHidden: true })] })] }), _jsx(SafeAreaModal, { visible: showBugTypePicker, animationType: "slide", presentationStyle: "pageSheet", onRequestClose: () => setShowBugTypePicker(false), children: _jsxs(View, { style: styles.modalContainer, children: [_jsxs(View, { style: styles.modalHeader, children: [_jsx(HeaderDismissButton, { title: "Cancel", onPress: () => setShowBugTypePicker(false) }), _jsx(Text, { style: styles.modalTitle, children: "Select Bug Type" }), _jsx(View, { style: styles.modalHeaderSpacer })] }), _jsx(ScrollView, { style: styles.modalContent, children: Object.values(BUG_TYPE_OPTIONS).map(option => (_jsxs(TouchableOpacity, { style: styles.modalOption, onPress: () => {
133
+ setBugType(option);
134
+ setShowBugTypePicker(false);
135
+ }, children: [_jsx(Text, { style: styles.modalOptionText, children: option }), bugType === option && (_jsx(Icon, { name: "general.check", style: styles.modalCheckmark, accessibilityElementsHidden: true }))] }, option))) })] }) }), _jsxs(View, { style: styles.textInputContainer, children: [_jsxs(Text, { style: styles.fieldLabel, children: ["What were you trying to do when you encountered the bug?", ' ', _jsx(Text, { style: styles.required, children: "*" })] }), _jsx(TextInput, { style: styles.textInput, multiline: true, placeholder: "Description", value: whatWereDoing, onChangeText: setWhatWereDoing, maxLength: MAX_DESCRIPTION_LENGTH }), whatWereDoing.length >= MAX_DESCRIPTION_LENGTH - 100 && (_jsxs(Text, { variant: "footnote", children: [whatWereDoing.length, "/", MAX_DESCRIPTION_LENGTH] }))] }), _jsxs(View, { style: styles.textInputContainer, children: [_jsxs(Text, { style: styles.fieldLabel, children: ["What did you expect to happen? Please describe what actually happened.", ' ', _jsx(Text, { style: styles.required, children: "*" })] }), _jsx(TextInput, { style: styles.textInput, multiline: true, placeholder: "Description", value: whatExpected, onChangeText: setWhatExpected, maxLength: MAX_DESCRIPTION_LENGTH }), whatExpected.length >= MAX_DESCRIPTION_LENGTH - 100 && (_jsxs(Text, { variant: "footnote", children: [whatExpected.length, "/", MAX_DESCRIPTION_LENGTH] }))] }), _jsxs(View, { style: styles.attachmentSection, children: [_jsxs(View, { style: styles.attachmentHeader, children: [_jsxs(Text, { style: styles.attachmentLabel, children: ["Attachment ", _jsx(Text, { style: styles.subLabel, children: "(optional)" })] }), uploading && _jsx(Spinner, {})] }), uploadError && _jsx(Text, { style: styles.attachmentErrorText, children: uploadError }), attachment ? (_jsx(View, { style: styles.attachmentPreviewContainer, children: isImageAttachment ? (_jsx(ImageAttachmentPreview, { uri: imagePreviewURI, fileName: attachment.name, onRemovePress: handleRemoveAttachment })) : (_jsx(VideoAttachmentPreview, { name: attachment.name, onRemovePress: handleRemoveAttachment })) })) : (_jsx(Button, { title: "Attach a screenshot or recording", accessibilityHint: "Opens your device's image gallery", iconNameLeft: "general.paperclip", onPress: pickImage, size: "sm", variant: "outline", style: styles.attachButton, disabled: uploading || Boolean(attachment) })), _jsxs(Text, { variant: "footnote", children: ["Screenshots and screen recordings help us reproduce and fix issues faster.", ' ', _jsx(TextInlineButton, { accessibilityRole: "link", variant: "footnote", onPress: () => Linking.openURL(VIDEO_RECORDING_HELP_URL), children: "How to record your screen" })] })] }), _jsx(View, { style: styles.footer, children: _jsxs(Text, { variant: "footnote", children: ["For details on how we process your data and ensure its security, please refer to our", ' ', _jsx(TextInlineButton, { accessibilityRole: "link", variant: "footnote", onPress: () => Linking.openURL('https://www.planningcenter.com/privacy'), children: "Privacy Policy" }), "."] }) })] }) }));
242
136
  }
243
137
  const VIDEO_RECORDING_HELP_URL = Platform.select({
244
138
  android: 'https://support.google.com/android/answer/9075928?hl=en',
@@ -1 +1 @@
1
- {"version":3,"file":"bug_report_screen.js","sourceRoot":"","sources":["../../src/screens/bug_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAKxD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,gBAAgB,EAChB,sBAAsB,EACtB,IAAI,EACJ,YAAY,GACb,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,UAAU,MAAM,+CAA+C,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAA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AM,CAAC,eAAe;SACxC;QACD,iBAAiB,EAAE;YACjB,GAAG,EAAE,CAAC;SACP;QACD,gBAAgB,EAAE;YAChB,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,QAAQ;SACrB;QACD,eAAe,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE;QACvD,QAAQ,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,yBAAyB,EAAE;QAC3E,0BAA0B,EAAE;YAC1B,GAAG,EAAE,CAAC;SACP;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,MAAM,CAAC,eAAe;SAC9B;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,YAAY;SACxB;QACD,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;QAClB,WAAW,EAAE;YACX,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport { startsWith } from 'lodash'\nimport React, { useCallback, useLayoutEffect, useState } from 'react'\nimport {\n View,\n StyleSheet,\n TextInput,\n Linking,\n ScrollView,\n TouchableOpacity,\n Platform,\n} from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport {\n Button,\n Spinner,\n Text,\n TextInlineButton,\n ImageAttachmentPreview,\n Icon,\n KeyboardView,\n} from '../components'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { VideoAttachmentPreview } from '../components/display/video_attachment_preview'\nimport { DefaultLoading } from '../components/page/loading'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { SafeAreaModal } from '../components/safe_area_modal'\nimport { useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { useReportBugAction } from '../hooks/use_report_bug_action'\nimport { useUploadClient } from '../hooks/use_upload_client'\nimport { ImagePicker, ImagePickerResult, platformFontWeightBold } from '../utils'\n\nconst MAX_DESCRIPTION_LENGTH = 2000\n\nenum BUG_TYPE_OPTIONS {\n Chat = 'Chat',\n FindMyChurch = 'Find my church',\n LoggingIn = 'Logging in',\n UsingGroups = 'Using groups (events, resources, members)',\n CheckingIn = 'Checking in',\n MakingADonation = 'Making a donation',\n RegisteringForAnEvent = 'Registering for an event',\n MyProfileAndSchedule = 'My profile and schedule',\n Directory = 'Directory',\n Other = 'Other',\n}\n\nexport const BugReportScreenOptions = ({\n navigation,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => ({\n presentation: 'modal',\n title: 'Report a bug',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={() => navigation.goBack()} />,\n})\n\ninterface Attachment {\n id: string\n name: string\n type: string\n}\n\nenum QualifiedMobileAppName {\n chat = 'Chat', // There is no app name for the mobile app\n churchcenter = 'Church Center App',\n services = 'Services Mobile',\n}\n\nenum DisplayableAppName {\n chat = 'Chat',\n churchcenter = 'Church Center',\n services = 'Services',\n}\n\nexport function BugReportScreen() {\n const styles = useStyles()\n const navigation = useNavigation()\n const name = useAppName()\n const appName = QualifiedMobileAppName[name]\n const [bugType, setBugType] = useState<BUG_TYPE_OPTIONS>(BUG_TYPE_OPTIONS.Chat)\n const [showBugTypePicker, setShowBugTypePicker] = useState(false)\n const [whatWereDoing, setWhatWereDoing] = useState('')\n const [whatExpected, setWhatExpected] = useState('')\n const uploadApi = useUploadClient()\n const [uploading, setUploading] = useState(false)\n const [attachment, setAttachment] = useState<Attachment | null>(null)\n const [uploadError, setUploadError] = useState<string | null>(null)\n const { mutate: createBugReport, status } = useReportBugAction()\n const formValid =\n bugType.trim().length > 0 &&\n whatWereDoing.trim().length > 0 &&\n whatExpected.trim().length > 0 &&\n status === 'idle' &&\n !uploading\n const [imagePreviewURI, setImagePreviewURI] = useState<string>('')\n const isImageAttachment = startsWith(attachment?.type, 'image/')\n\n const handleSubmit = useCallback(() => {\n const description = generateBugReportDescription(bugType, whatWereDoing, whatExpected)\n\n createBugReport({\n description,\n description_json: {\n bugType,\n whatWereDoing,\n whatExpected,\n appName: appName,\n },\n attachmentIds: attachment ? [attachment.id] : [],\n })\n }, [attachment, bugType, whatWereDoing, whatExpected, createBugReport, appName])\n\n const handleRemoveAttachment = useCallback(() => {\n setAttachment(null)\n setImagePreviewURI('')\n }, [])\n\n function uploadImagePickerResult(result: ImagePickerResult) {\n if (result.canceled || result.assets.length === 0) {\n setUploading(false)\n return\n }\n\n const asset = result.assets[0]\n\n uploadApi\n ?.uploadFile({\n uri: asset.uri,\n name: asset.fileName as string,\n type: asset.mimeType as string,\n })\n .then(uploadedResource => {\n setUploading(false)\n setImagePreviewURI(asset.uri)\n setAttachment({\n id: uploadedResource.id,\n name: asset.fileName || 'File',\n type: asset.mimeType as string,\n })\n })\n .catch(() => {\n setUploading(false)\n setUploadError(`Failed to upload attachment`)\n })\n }\n\n function pickImage() {\n setUploading(true)\n return ImagePicker.openImageLibraryAsync().then(result => uploadImagePickerResult(result))\n }\n\n useLayoutEffect(() => {\n navigation.setOptions({\n // eslint-disable-next-line react/no-unstable-nested-components\n headerRight: () => (\n <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!formValid} />\n ),\n })\n }, [formValid, handleSubmit, navigation])\n\n if (status === 'pending') {\n return (\n <View style={[styles.container, styles.fullHeight]}>\n <DefaultLoading />\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Thank you!</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n We appreciate you taking the time to help improve {DisplayableAppName[name]}! We'll take\n a look at the issue you reported.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button\n title=\"Return to chat\"\n onPress={navigation.goBack}\n size=\"lg\"\n variant=\"fill\"\n />\n </BlankState.Root>\n )\n }\n\n if (status === 'error') {\n return (\n <View style={styles.container}>\n <Text>\n This is embarrassing, we can't submit your bug report right now. If you still need help or\n would like to submit this bug report another way please{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n onPress={() =>\n Linking.openURL('https://support.planningcenteronline.com/hc/en-us/requests/new')\n }\n >\n contact our help center\n </TextInlineButton>\n .\n </Text>\n <Button title=\"Return to chat\" onPress={navigation.goBack} variant=\"fill\" size=\"lg\" />\n </View>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.description}>\n Thanks for helping us improve {DisplayableAppName[name]}. We won't be able to respond to\n your submission, but your feedback helps us improve the experience helps us improve the\n experience.\n </Text>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n Where did you experience the issue? <Text style={styles.required}>*</Text>\n </Text>\n <TouchableOpacity style={styles.pickerButton} onPress={() => setShowBugTypePicker(true)}>\n <Text style={[styles.pickerText, !bugType && styles.pickerPlaceholder]}>{bugType}</Text>\n <Icon\n name=\"general.downChevron\"\n style={styles.pickerArrow}\n accessibilityElementsHidden\n />\n </TouchableOpacity>\n </View>\n\n <SafeAreaModal\n visible={showBugTypePicker}\n animationType=\"slide\"\n presentationStyle=\"pageSheet\"\n onRequestClose={() => setShowBugTypePicker(false)}\n >\n <View style={styles.modalContainer}>\n <View style={styles.modalHeader}>\n <HeaderDismissButton title=\"Cancel\" onPress={() => setShowBugTypePicker(false)} />\n <Text style={styles.modalTitle}>Select Bug Type</Text>\n <View style={styles.modalHeaderSpacer} />\n </View>\n <ScrollView style={styles.modalContent}>\n {Object.values(BUG_TYPE_OPTIONS).map(option => (\n <TouchableOpacity\n key={option}\n style={styles.modalOption}\n onPress={() => {\n setBugType(option)\n setShowBugTypePicker(false)\n }}\n >\n <Text style={styles.modalOptionText}>{option}</Text>\n {bugType === option && (\n <Icon\n name=\"general.check\"\n style={styles.modalCheckmark}\n accessibilityElementsHidden\n />\n )}\n </TouchableOpacity>\n ))}\n </ScrollView>\n </View>\n </SafeAreaModal>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n What were you trying to do when you encountered the bug?{' '}\n <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Description\"\n value={whatWereDoing}\n onChangeText={setWhatWereDoing}\n maxLength={MAX_DESCRIPTION_LENGTH}\n />\n {whatWereDoing.length >= MAX_DESCRIPTION_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {whatWereDoing.length}/{MAX_DESCRIPTION_LENGTH}\n </Text>\n )}\n </View>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n What did you expect to happen? Please describe what actually happened.{' '}\n <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Description\"\n value={whatExpected}\n onChangeText={setWhatExpected}\n maxLength={MAX_DESCRIPTION_LENGTH}\n />\n {whatExpected.length >= MAX_DESCRIPTION_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {whatExpected.length}/{MAX_DESCRIPTION_LENGTH}\n </Text>\n )}\n </View>\n\n <View style={styles.attachmentSection}>\n <View style={styles.attachmentHeader}>\n <Text style={styles.attachmentLabel}>\n Attachment <Text style={styles.subLabel}>(optional)</Text>\n </Text>\n {uploading && <Spinner />}\n </View>\n {uploadError && <Text style={styles.attachmentErrorText}>{uploadError}</Text>}\n {attachment ? (\n <View style={styles.attachmentPreviewContainer}>\n {isImageAttachment ? (\n <ImageAttachmentPreview\n uri={imagePreviewURI}\n fileName={attachment.name}\n onRemovePress={handleRemoveAttachment}\n />\n ) : (\n <VideoAttachmentPreview\n name={attachment.name}\n onRemovePress={handleRemoveAttachment}\n />\n )}\n </View>\n ) : (\n <Button\n title=\"Attach a screenshot or recording\"\n accessibilityHint=\"Opens your device's image gallery\"\n iconNameLeft=\"general.paperclip\"\n onPress={pickImage}\n size=\"sm\"\n variant=\"outline\"\n style={styles.attachButton}\n disabled={uploading || Boolean(attachment)}\n />\n )}\n <Text variant=\"footnote\">\n Screenshots and screen recordings help us reproduce and fix issues faster.{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n variant=\"footnote\"\n onPress={() => Linking.openURL(VIDEO_RECORDING_HELP_URL)}\n >\n How to record your screen\n </TextInlineButton>\n </Text>\n </View>\n\n <View style={styles.footer}>\n <Text variant=\"footnote\">\n For details on how we process your data and ensure its security, please refer to our{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n variant=\"footnote\"\n onPress={() => Linking.openURL('https://www.planningcenter.com/privacy')}\n >\n Privacy Policy\n </TextInlineButton>\n .\n </Text>\n </View>\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst VIDEO_RECORDING_HELP_URL = Platform.select({\n android: 'https://support.google.com/android/answer/9075928?hl=en',\n default: 'https://support.apple.com/en-us/102653',\n})\n\nconst generateBugReportDescription = (\n bugType: BUG_TYPE_OPTIONS,\n whatWereDoing: string,\n whatExpected: string\n) => {\n return `${whatWereDoing.substring(0, 100)}\n\n ## What kind of bug did you experience?\n${bugType}\n\n## What were you trying to do when you encountered the bug?\n${whatWereDoing}\n\n## What did you expect to happen? What actually happened?\n${whatExpected}\n`\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n },\n description: {\n color: colors.textColorDefaultSecondary,\n },\n textInputContainer: {\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 pickerButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n minHeight: 48,\n },\n pickerText: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n pickerPlaceholder: {\n color: colors.textColorDefaultSecondary,\n },\n pickerArrow: {\n fontSize: 12,\n color: colors.iconColorDefaultSecondary,\n marginLeft: 8,\n },\n modalContainer: {\n flex: 1,\n backgroundColor: colors.surfaceColor100,\n },\n modalHeader: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n modalTitle: {\n fontSize: 18,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n modalHeaderSpacer: {\n width: 50, // Same width as cancel button to center title\n },\n modalContent: {\n flex: 1,\n },\n modalOption: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n modalOptionText: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n modalCheckmark: {\n fontSize: 16,\n color: colors.statusSuccessIcon,\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 attachmentSection: {\n gap: 8,\n },\n attachmentHeader: {\n flexDirection: 'row',\n gap: 4,\n alignItems: 'center',\n },\n attachmentLabel: { fontWeight: platformFontWeightBold },\n subLabel: { fontWeight: 'normal', color: colors.textColorDefaultSecondary },\n attachmentPreviewContainer: {\n gap: 4,\n },\n attachmentErrorText: {\n color: colors.statusErrorText,\n },\n attachButton: {\n alignSelf: 'flex-start',\n },\n footer: { gap: 8 },\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":"bug_report_screen.js","sourceRoot":"","sources":["../../src/screens/bug_report_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAKxD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAc,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,gBAAgB,EAChB,sBAAsB,EACtB,IAAI,EACJ,YAAY,GACb,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,UAAU,MAAM,+CAA+C,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAC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AM,CAAC,iBAAiB;SAChC;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,KAAK;YACxB,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;YACd,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,MAAM,CAAC,sBAAsB;YAC1C,YAAY,EAAE,CAAC;YACf,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,iBAAiB,EAAE;YACjB,GAAG,EAAE,CAAC;SACP;QACD,gBAAgB,EAAE;YAChB,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,QAAQ;SACrB;QACD,eAAe,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE;QACvD,QAAQ,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,yBAAyB,EAAE;QAC3E,0BAA0B,EAAE;YAC1B,GAAG,EAAE,CAAC;SACP;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,MAAM,CAAC,eAAe;SAC9B;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,YAAY;SACxB;QACD,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;QAClB,WAAW,EAAE;YACX,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport { startsWith } from 'lodash'\nimport React, { useCallback, useLayoutEffect, useState } from 'react'\nimport {\n View,\n StyleSheet,\n TextInput,\n Linking,\n ScrollView,\n TouchableOpacity,\n Platform,\n} from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport {\n Button,\n Spinner,\n Text,\n TextInlineButton,\n ImageAttachmentPreview,\n Icon,\n KeyboardView,\n} from '../components'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { VideoAttachmentPreview } from '../components/display/video_attachment_preview'\nimport { DefaultLoading } from '../components/page/loading'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { SafeAreaModal } from '../components/safe_area_modal'\nimport { useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { useReportBugAction } from '../hooks/use_report_bug_action'\nimport { useUploadClient } from '../hooks/use_upload_client'\nimport { ImagePicker, ImagePickerResult, platformFontWeightBold } from '../utils'\n\nconst MAX_DESCRIPTION_LENGTH = 2000\n\nenum BUG_TYPE_OPTIONS {\n Chat = 'Chat',\n FindMyChurch = 'Find my church',\n LoggingIn = 'Logging in',\n UsingGroups = 'Using groups (events, resources, members)',\n CheckingIn = 'Checking in',\n MakingADonation = 'Making a donation',\n RegisteringForAnEvent = 'Registering for an event',\n MyProfileAndSchedule = 'My profile and schedule',\n Directory = 'Directory',\n Other = 'Other',\n}\n\nexport const BugReportScreenOptions = ({\n navigation,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => ({\n presentation: 'modal',\n title: 'Report a bug',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={() => navigation.goBack()} />,\n})\n\ninterface Attachment {\n id: string\n name: string\n type: string\n}\n\nenum QualifiedMobileAppName {\n chat = 'Chat', // There is no app name for the mobile app\n churchcenter = 'Church Center App',\n services = 'Services Mobile',\n}\n\nenum DisplayableAppName {\n chat = 'Chat',\n churchcenter = 'Church Center',\n services = 'Services',\n}\n\nexport function BugReportScreen() {\n const styles = useStyles()\n const navigation = useNavigation()\n const name = useAppName()\n const appName = QualifiedMobileAppName[name]\n const [bugType, setBugType] = useState<BUG_TYPE_OPTIONS>(BUG_TYPE_OPTIONS.Chat)\n const [showBugTypePicker, setShowBugTypePicker] = useState(false)\n const [whatWereDoing, setWhatWereDoing] = useState('')\n const [whatExpected, setWhatExpected] = useState('')\n const uploadApi = useUploadClient()\n const [uploading, setUploading] = useState(false)\n const [attachment, setAttachment] = useState<Attachment | null>(null)\n const [uploadError, setUploadError] = useState<string | null>(null)\n const { mutate: createBugReport, status } = useReportBugAction()\n const formValid =\n bugType.trim().length > 0 &&\n whatWereDoing.trim().length > 0 &&\n whatExpected.trim().length > 0 &&\n status === 'idle' &&\n !uploading\n const [imagePreviewURI, setImagePreviewURI] = useState<string>('')\n const isImageAttachment = startsWith(attachment?.type, 'image/')\n\n const handleSubmit = useCallback(() => {\n const description = generateBugReportDescription(bugType, whatWereDoing, whatExpected)\n\n createBugReport({\n description,\n description_json: {\n bugType,\n whatWereDoing,\n whatExpected,\n appName: appName,\n },\n attachmentIds: attachment ? [attachment.id] : [],\n })\n }, [attachment, bugType, whatWereDoing, whatExpected, createBugReport, appName])\n\n const handleRemoveAttachment = useCallback(() => {\n setAttachment(null)\n setImagePreviewURI('')\n }, [])\n\n function uploadImagePickerResult(result: ImagePickerResult) {\n if (result.canceled || result.assets.length === 0) {\n setUploading(false)\n return\n }\n\n const asset = result.assets[0]\n\n uploadApi\n ?.uploadFile({\n uri: asset.uri,\n name: asset.fileName as string,\n type: asset.mimeType as string,\n })\n .then(uploadedResource => {\n setUploading(false)\n setImagePreviewURI(asset.uri)\n setAttachment({\n id: uploadedResource.id,\n name: asset.fileName || 'File',\n type: asset.mimeType as string,\n })\n })\n .catch(() => {\n setUploading(false)\n setUploadError(`Failed to upload attachment`)\n })\n }\n\n function pickImage() {\n setUploading(true)\n return ImagePicker.openImageLibraryAsync().then(result => uploadImagePickerResult(result))\n }\n\n useLayoutEffect(() => {\n navigation.setOptions({\n // eslint-disable-next-line react/no-unstable-nested-components\n headerRight: () => (\n <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!formValid} />\n ),\n })\n }, [formValid, handleSubmit, navigation])\n\n if (status === 'pending') {\n return (\n <View style={[styles.container, styles.fullHeight]}>\n <DefaultLoading />\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Thank you!</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n We appreciate you taking the time to help improve {DisplayableAppName[name]}! We'll take\n a look at the issue you reported.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button\n title=\"Return to chat\"\n onPress={navigation.goBack}\n size=\"lg\"\n variant=\"fill\"\n />\n </BlankState.Root>\n )\n }\n\n if (status === 'error') {\n return (\n <View style={styles.container}>\n <Text>\n This is embarrassing, we can't submit your bug report right now. If you still need help or\n would like to submit this bug report another way please{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n onPress={() =>\n Linking.openURL('https://support.planningcenteronline.com/hc/en-us/requests/new')\n }\n >\n contact our help center\n </TextInlineButton>\n .\n </Text>\n <Button title=\"Return to chat\" onPress={navigation.goBack} variant=\"fill\" size=\"lg\" />\n </View>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.description}>\n Thanks for helping us improve {DisplayableAppName[name]}. We won't be able to respond to\n your submission, but your feedback helps us improve the experience helps us improve the\n experience.\n </Text>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n Where did you experience the issue? <Text style={styles.required}>*</Text>\n </Text>\n <TouchableOpacity style={styles.pickerButton} onPress={() => setShowBugTypePicker(true)}>\n <Text style={[styles.pickerText, !bugType && styles.pickerPlaceholder]}>{bugType}</Text>\n <Icon\n name=\"general.downChevron\"\n style={styles.pickerArrow}\n accessibilityElementsHidden\n />\n </TouchableOpacity>\n </View>\n\n <SafeAreaModal\n visible={showBugTypePicker}\n animationType=\"slide\"\n presentationStyle=\"pageSheet\"\n onRequestClose={() => setShowBugTypePicker(false)}\n >\n <View style={styles.modalContainer}>\n <View style={styles.modalHeader}>\n <HeaderDismissButton title=\"Cancel\" onPress={() => setShowBugTypePicker(false)} />\n <Text style={styles.modalTitle}>Select Bug Type</Text>\n <View style={styles.modalHeaderSpacer} />\n </View>\n <ScrollView style={styles.modalContent}>\n {Object.values(BUG_TYPE_OPTIONS).map(option => (\n <TouchableOpacity\n key={option}\n style={styles.modalOption}\n onPress={() => {\n setBugType(option)\n setShowBugTypePicker(false)\n }}\n >\n <Text style={styles.modalOptionText}>{option}</Text>\n {bugType === option && (\n <Icon\n name=\"general.check\"\n style={styles.modalCheckmark}\n accessibilityElementsHidden\n />\n )}\n </TouchableOpacity>\n ))}\n </ScrollView>\n </View>\n </SafeAreaModal>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n What were you trying to do when you encountered the bug?{' '}\n <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Description\"\n value={whatWereDoing}\n onChangeText={setWhatWereDoing}\n maxLength={MAX_DESCRIPTION_LENGTH}\n />\n {whatWereDoing.length >= MAX_DESCRIPTION_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {whatWereDoing.length}/{MAX_DESCRIPTION_LENGTH}\n </Text>\n )}\n </View>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n What did you expect to happen? Please describe what actually happened.{' '}\n <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Description\"\n value={whatExpected}\n onChangeText={setWhatExpected}\n maxLength={MAX_DESCRIPTION_LENGTH}\n />\n {whatExpected.length >= MAX_DESCRIPTION_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {whatExpected.length}/{MAX_DESCRIPTION_LENGTH}\n </Text>\n )}\n </View>\n\n <View style={styles.attachmentSection}>\n <View style={styles.attachmentHeader}>\n <Text style={styles.attachmentLabel}>\n Attachment <Text style={styles.subLabel}>(optional)</Text>\n </Text>\n {uploading && <Spinner />}\n </View>\n {uploadError && <Text style={styles.attachmentErrorText}>{uploadError}</Text>}\n {attachment ? (\n <View style={styles.attachmentPreviewContainer}>\n {isImageAttachment ? (\n <ImageAttachmentPreview\n uri={imagePreviewURI}\n fileName={attachment.name}\n onRemovePress={handleRemoveAttachment}\n />\n ) : (\n <VideoAttachmentPreview\n name={attachment.name}\n onRemovePress={handleRemoveAttachment}\n />\n )}\n </View>\n ) : (\n <Button\n title=\"Attach a screenshot or recording\"\n accessibilityHint=\"Opens your device's image gallery\"\n iconNameLeft=\"general.paperclip\"\n onPress={pickImage}\n size=\"sm\"\n variant=\"outline\"\n style={styles.attachButton}\n disabled={uploading || Boolean(attachment)}\n />\n )}\n <Text variant=\"footnote\">\n Screenshots and screen recordings help us reproduce and fix issues faster.{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n variant=\"footnote\"\n onPress={() => Linking.openURL(VIDEO_RECORDING_HELP_URL)}\n >\n How to record your screen\n </TextInlineButton>\n </Text>\n </View>\n\n <View style={styles.footer}>\n <Text variant=\"footnote\">\n For details on how we process your data and ensure its security, please refer to our{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n variant=\"footnote\"\n onPress={() => Linking.openURL('https://www.planningcenter.com/privacy')}\n >\n Privacy Policy\n </TextInlineButton>\n .\n </Text>\n </View>\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst VIDEO_RECORDING_HELP_URL = Platform.select({\n android: 'https://support.google.com/android/answer/9075928?hl=en',\n default: 'https://support.apple.com/en-us/102653',\n})\n\nconst generateBugReportDescription = (\n bugType: BUG_TYPE_OPTIONS,\n whatWereDoing: string,\n whatExpected: string\n) => {\n return `${whatWereDoing.substring(0, 100)}\n\n ## What kind of bug did you experience?\n${bugType}\n\n## What were you trying to do when you encountered the bug?\n${whatWereDoing}\n\n## What did you expect to happen? What actually happened?\n${whatExpected}\n`\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n },\n description: {\n color: colors.textColorDefaultSecondary,\n },\n textInputContainer: {\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 pickerButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n minHeight: 48,\n },\n pickerText: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n pickerPlaceholder: {\n color: colors.textColorDefaultSecondary,\n },\n pickerArrow: {\n fontSize: 12,\n color: colors.iconColorDefaultSecondary,\n marginLeft: 8,\n },\n modalContainer: {\n flex: 1,\n backgroundColor: colors.surfaceColor100,\n },\n modalHeader: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n modalTitle: {\n fontSize: 18,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n modalHeaderSpacer: {\n width: 50, // Same width as cancel button to center title\n },\n modalContent: {\n flex: 1,\n },\n modalOption: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n modalOptionText: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n modalCheckmark: {\n fontSize: 16,\n color: colors.statusSuccessIcon,\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 attachmentSection: {\n gap: 8,\n },\n attachmentHeader: {\n flexDirection: 'row',\n gap: 4,\n alignItems: 'center',\n },\n attachmentLabel: { fontWeight: platformFontWeightBold },\n subLabel: { fontWeight: 'normal', color: colors.textColorDefaultSecondary },\n attachmentPreviewContainer: {\n gap: 4,\n },\n attachmentErrorText: {\n color: colors.statusErrorText,\n },\n attachButton: {\n alignSelf: 'flex-start',\n },\n footer: { gap: 8 },\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,9 +1,8 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
- import React from 'react';
3
2
  export declare const MessageReadReceiptsScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
4
3
  export type MessageReadReceiptsScreenProps = StaticScreenProps<{
5
4
  conversation_id: number;
6
5
  message_id: string;
7
6
  }>;
8
- export declare function MessageReadReceiptsScreen({ route }: MessageReadReceiptsScreenProps): React.JSX.Element;
7
+ export declare function MessageReadReceiptsScreen({ route }: MessageReadReceiptsScreenProps): import("react/jsx-runtime").JSX.Element;
9
8
  //# sourceMappingURL=message_read_receipts_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message_read_receipts_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation/message_read_receipts_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAA+C,MAAM,OAAO,CAAA;AAYnE,eAAO,MAAM,gCAAgC,uEAM3C,CAAA;AAEF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,qBAmDlF"}
1
+ {"version":3,"file":"message_read_receipts_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation/message_read_receipts_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAa3E,eAAO,MAAM,gCAAgC,uEAM3C,CAAA;AAEF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,2CAmDlF"}
@@ -1,5 +1,6 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
2
  import { useNavigation } from '@react-navigation/native';
2
- import React, { memo, useCallback, useMemo, useState } from 'react';
3
+ import { memo, useCallback, useMemo, useState } from 'react';
3
4
  import { Platform, StyleSheet, View } from 'react-native';
4
5
  import { FlatList } from 'react-native-gesture-handler';
5
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -31,28 +32,11 @@ export function MessageReadReceiptsScreen({ route }) {
31
32
  const handleFormSheetHeaderLayout = useCallback((event) => {
32
33
  setFormSheetHeaderHeight(event.nativeEvent.layout.height);
33
34
  }, [setFormSheetHeaderHeight]);
34
- return (<FormSheet.Root>
35
- <View onLayout={handleFormSheetHeaderLayout}>
36
- <FormSheet.Header>
37
- <FormSheet.HeaderTitle>Read receipts ({totalCount})</FormSheet.HeaderTitle>
38
- <FormSheet.HeaderActions>
39
- <FormSheet.HeaderTextButton onPress={() => navigation.goBack()}>
40
- Close
41
- </FormSheet.HeaderTextButton>
42
- </FormSheet.HeaderActions>
43
- </FormSheet.Header>
44
- </View>
45
- <FlatList data={receipts} contentContainerStyle={[styles.contentContainer, contentContainerPaddingBottomStyles]} keyExtractor={item => item.id.toString()} renderItem={({ item }) => <Receipt receipt={item}/>} nestedScrollEnabled ListEmptyComponent={<Text style={styles.emptyText}>No one has read this message yet.</Text>} onEndReached={() => fetchNextPage()} onEndReachedThreshold={0.2}/>
46
- </FormSheet.Root>);
35
+ return (_jsxs(FormSheet.Root, { children: [_jsx(View, { onLayout: handleFormSheetHeaderLayout, children: _jsxs(FormSheet.Header, { children: [_jsxs(FormSheet.HeaderTitle, { children: ["Read receipts (", totalCount, ")"] }), _jsx(FormSheet.HeaderActions, { children: _jsx(FormSheet.HeaderTextButton, { onPress: () => navigation.goBack(), children: "Close" }) })] }) }), _jsx(FlatList, { data: receipts, contentContainerStyle: [styles.contentContainer, contentContainerPaddingBottomStyles], keyExtractor: item => item.id.toString(), renderItem: ({ item }) => _jsx(Receipt, { receipt: item }), nestedScrollEnabled: true, ListEmptyComponent: _jsx(Text, { style: styles.emptyText, children: "No one has read this message yet." }), onEndReached: () => fetchNextPage(), onEndReachedThreshold: 0.2 })] }));
47
36
  }
48
37
  const Receipt = memo(({ receipt }) => {
49
38
  const styles = useStyles();
50
- return (<View style={styles.receiptRow}>
51
- <Avatar sourceUri={receipt.avatar} size="sm"/>
52
- <Text variant="tertiary" numberOfLines={2} style={styles.name}>
53
- {receipt.name}
54
- </Text>
55
- </View>);
39
+ return (_jsxs(View, { style: styles.receiptRow, children: [_jsx(Avatar, { sourceUri: receipt.avatar, size: "sm" }), _jsx(Text, { variant: "tertiary", numberOfLines: 2, style: styles.name, children: receipt.name })] }));
56
40
  });
57
41
  const useStyles = () => {
58
42
  const { colors } = useTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"message_read_receipts_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation/message_read_receipts_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EA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AAgB,EAAE;YAChB,iBAAiB,EAAE,EAAE;YACrB,UAAU,EAAE,CAAC;SACd;QACD,UAAU,EAAE;YACV,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;YACN,eAAe,EAAE,CAAC;YAClB,IAAI,EAAE,CAAC;SACR;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,CAAC;SACR;QACD,SAAS,EAAE;YACT,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;SACb;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;YACP,cAAc,EAAE,QAAQ;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { memo, useCallback, useMemo, useState } from 'react'\nimport { LayoutChangeEvent, Platform, StyleSheet, View } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Avatar, Text } from '../../components'\nimport FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet'\nimport { useTheme } from '../../hooks'\nimport { useReadReceipts } from '../../hooks/use_read_receipts'\nimport { ReadReceiptResource } from '../../types/resources/read_receipt'\n\nconst LIST_BOTTOM_PADDING = 24\n\nexport const MessageReadReceiptsScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: Platform.select({\n android: [0.5, 0.94], // Going straight to full 0.94 preserves height of screen on Android\n default: [0.5, 1],\n }),\n headerTitle: 'Read receipts',\n})\n\nexport type MessageReadReceiptsScreenProps = StaticScreenProps<{\n conversation_id: number\n message_id: string\n}>\n\nexport function MessageReadReceiptsScreen({ route }: MessageReadReceiptsScreenProps) {\n const styles = useStyles()\n const navigation = useNavigation()\n const [formSheetHeaderHeight, setFormSheetHeaderHeight] = useState(0)\n const { bottom } = useSafeAreaInsets()\n\n const { conversation_id, message_id } = route.params\n const {\n data: receipts,\n totalCount,\n fetchNextPage,\n } = useReadReceipts({ conversation_id, message_id })\n\n const contentContainerPaddingBottomStyles = useMemo(() => {\n return Platform.select({\n android: { paddingBottom: bottom + LIST_BOTTOM_PADDING },\n default: { paddingBottom: bottom + formSheetHeaderHeight + LIST_BOTTOM_PADDING },\n })\n }, [bottom, formSheetHeaderHeight])\n\n const handleFormSheetHeaderLayout = useCallback(\n (event: LayoutChangeEvent) => {\n setFormSheetHeaderHeight(event.nativeEvent.layout.height)\n },\n [setFormSheetHeaderHeight]\n )\n\n return (\n <FormSheet.Root>\n <View onLayout={handleFormSheetHeaderLayout}>\n <FormSheet.Header>\n <FormSheet.HeaderTitle>Read receipts ({totalCount})</FormSheet.HeaderTitle>\n <FormSheet.HeaderActions>\n <FormSheet.HeaderTextButton onPress={() => navigation.goBack()}>\n Close\n </FormSheet.HeaderTextButton>\n </FormSheet.HeaderActions>\n </FormSheet.Header>\n </View>\n <FlatList\n data={receipts}\n contentContainerStyle={[styles.contentContainer, contentContainerPaddingBottomStyles]}\n keyExtractor={item => item.id.toString()}\n renderItem={({ item }) => <Receipt receipt={item} />}\n nestedScrollEnabled\n ListEmptyComponent={<Text style={styles.emptyText}>No one has read this message yet.</Text>}\n onEndReached={() => fetchNextPage()}\n onEndReachedThreshold={0.2}\n />\n </FormSheet.Root>\n )\n}\n\nconst Receipt = memo(({ receipt }: { receipt: ReadReceiptResource }) => {\n const styles = useStyles()\n\n return (\n <View style={styles.receiptRow}>\n <Avatar sourceUri={receipt.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" numberOfLines={2} style={styles.name}>\n {receipt.name}\n </Text>\n </View>\n )\n})\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n contentContainer: {\n paddingHorizontal: 16,\n paddingTop: 8,\n },\n receiptRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n paddingVertical: 8,\n flex: 1,\n },\n name: {\n flex: 1,\n },\n emptyText: {\n textAlign: 'center',\n color: colors.textColorDefaultSecondary,\n marginTop: 32,\n fontSize: 16,\n },\n emptyContainer: {\n flex: 1,\n justifyContent: 'center',\n },\n })\n}\n"]}
1
+ {"version":3,"file":"message_read_receipts_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation/message_read_receipts_screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAc,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,EAAqB,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAG/D,MAAM,mBAAmB,GAAG,EAAE,CAAA;AAE9B,MAAM,CAAC,MAAM,gCAAgC,GAAG,yBAAyB,CAAC;IACxE,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC;QACnC,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,oEAAoE;QAC1F,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;KAClB,CAAC;IACF,WAAW,EAAE,eAAe;CAC7B,CAAC,CAAA;AAOF,MAAM,UAAU,yBAAyB,CAAC,EAAE,KAAK,EAAkC;IACjF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MA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;QACD,SAAS,EAAE;YACT,SAAS,EAAE,QAAQ;YACnB,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;SACb;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;YACP,cAAc,EAAE,QAAQ;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { memo, useCallback, useMemo, useState } from 'react'\nimport { LayoutChangeEvent, Platform, StyleSheet, View } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Avatar, Text } from '../../components'\nimport FormSheet, { getFormSheetScreenOptions } from '../../components/primitive/form_sheet'\nimport { useTheme } from '../../hooks'\nimport { useReadReceipts } from '../../hooks/use_read_receipts'\nimport { ReadReceiptResource } from '../../types/resources/read_receipt'\n\nconst LIST_BOTTOM_PADDING = 24\n\nexport const MessageReadReceiptsScreenOptions = getFormSheetScreenOptions({\n sheetAllowedDetents: Platform.select({\n android: [0.5, 0.94], // Going straight to full 0.94 preserves height of screen on Android\n default: [0.5, 1],\n }),\n headerTitle: 'Read receipts',\n})\n\nexport type MessageReadReceiptsScreenProps = StaticScreenProps<{\n conversation_id: number\n message_id: string\n}>\n\nexport function MessageReadReceiptsScreen({ route }: MessageReadReceiptsScreenProps) {\n const styles = useStyles()\n const navigation = useNavigation()\n const [formSheetHeaderHeight, setFormSheetHeaderHeight] = useState(0)\n const { bottom } = useSafeAreaInsets()\n\n const { conversation_id, message_id } = route.params\n const {\n data: receipts,\n totalCount,\n fetchNextPage,\n } = useReadReceipts({ conversation_id, message_id })\n\n const contentContainerPaddingBottomStyles = useMemo(() => {\n return Platform.select({\n android: { paddingBottom: bottom + LIST_BOTTOM_PADDING },\n default: { paddingBottom: bottom + formSheetHeaderHeight + LIST_BOTTOM_PADDING },\n })\n }, [bottom, formSheetHeaderHeight])\n\n const handleFormSheetHeaderLayout = useCallback(\n (event: LayoutChangeEvent) => {\n setFormSheetHeaderHeight(event.nativeEvent.layout.height)\n },\n [setFormSheetHeaderHeight]\n )\n\n return (\n <FormSheet.Root>\n <View onLayout={handleFormSheetHeaderLayout}>\n <FormSheet.Header>\n <FormSheet.HeaderTitle>Read receipts ({totalCount})</FormSheet.HeaderTitle>\n <FormSheet.HeaderActions>\n <FormSheet.HeaderTextButton onPress={() => navigation.goBack()}>\n Close\n </FormSheet.HeaderTextButton>\n </FormSheet.HeaderActions>\n </FormSheet.Header>\n </View>\n <FlatList\n data={receipts}\n contentContainerStyle={[styles.contentContainer, contentContainerPaddingBottomStyles]}\n keyExtractor={item => item.id.toString()}\n renderItem={({ item }) => <Receipt receipt={item} />}\n nestedScrollEnabled\n ListEmptyComponent={<Text style={styles.emptyText}>No one has read this message yet.</Text>}\n onEndReached={() => fetchNextPage()}\n onEndReachedThreshold={0.2}\n />\n </FormSheet.Root>\n )\n}\n\nconst Receipt = memo(({ receipt }: { receipt: ReadReceiptResource }) => {\n const styles = useStyles()\n\n return (\n <View style={styles.receiptRow}>\n <Avatar sourceUri={receipt.avatar} size=\"sm\" />\n <Text variant=\"tertiary\" numberOfLines={2} style={styles.name}>\n {receipt.name}\n </Text>\n </View>\n )\n})\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n contentContainer: {\n paddingHorizontal: 16,\n paddingTop: 8,\n },\n receiptRow: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n paddingVertical: 8,\n flex: 1,\n },\n name: {\n flex: 1,\n },\n emptyText: {\n textAlign: 'center',\n color: colors.textColorDefaultSecondary,\n marginTop: 32,\n fontSize: 16,\n },\n emptyContainer: {\n flex: 1,\n justifyContent: 'center',\n },\n })\n}\n"]}
@@ -1,7 +1,6 @@
1
1
  import { StaticScreenProps } from '@react-navigation/native';
2
- import React from 'react';
3
2
  export type ConversationDetailsScreenProps = StaticScreenProps<{
4
3
  conversation_id: number;
5
4
  }>;
6
- export declare function ConversationDetailsScreen({ route }: ConversationDetailsScreenProps): React.JSX.Element;
5
+ export declare function ConversationDetailsScreen({ route }: ConversationDetailsScreenProps): import("react/jsx-runtime").JSX.Element;
7
6
  //# sourceMappingURL=conversation_details_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_details_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAQN,MAAM,OAAO,CAAA;AA+Ed,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,qBAwXlF"}
1
+ {"version":3,"file":"conversation_details_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAwFzF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,2CAwXlF"}