@planningcenter/chat-react-native 4.7.1-rc.0 → 4.8.0-qa-staging.1

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 (321) hide show
  1. package/build/components/conversations/app_update_banner.d.ts +2 -0
  2. package/build/components/conversations/app_update_banner.d.ts.map +1 -0
  3. package/build/components/conversations/app_update_banner.js +52 -0
  4. package/build/components/conversations/app_update_banner.js.map +1 -0
  5. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  6. package/build/components/conversations/conversation_actions.js +333 -193
  7. package/build/components/conversations/conversation_actions.js.map +1 -1
  8. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  9. package/build/components/conversations/conversation_preview.js +106 -91
  10. package/build/components/conversations/conversation_preview.js.map +1 -1
  11. package/build/components/conversations/conversations.d.ts.map +1 -1
  12. package/build/components/conversations/conversations.js +63 -56
  13. package/build/components/conversations/conversations.js.map +1 -1
  14. package/build/components/conversations/conversations_blank_state.d.ts +2 -1
  15. package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
  16. package/build/components/conversations/conversations_blank_state.js +71 -39
  17. package/build/components/conversations/conversations_blank_state.js.map +1 -1
  18. package/build/components/conversations/hidden_indicator.d.ts +4 -0
  19. package/build/components/conversations/hidden_indicator.d.ts.map +1 -0
  20. package/build/components/conversations/hidden_indicator.js +52 -0
  21. package/build/components/conversations/hidden_indicator.js.map +1 -0
  22. package/build/components/conversations/hidden_results_footer.d.ts +2 -0
  23. package/build/components/conversations/hidden_results_footer.d.ts.map +1 -0
  24. package/build/components/conversations/hidden_results_footer.js +34 -0
  25. package/build/components/conversations/hidden_results_footer.js.map +1 -0
  26. package/build/components/display/toast.d.ts +3 -0
  27. package/build/components/display/toast.d.ts.map +1 -0
  28. package/build/components/display/toast.js +224 -0
  29. package/build/components/display/toast.js.map +1 -0
  30. package/build/components/group_conversation_list.d.ts.map +1 -1
  31. package/build/components/group_conversation_list.js +1 -0
  32. package/build/components/group_conversation_list.js.map +1 -1
  33. package/build/components/primitive/banner_primitive.js +7 -3
  34. package/build/components/primitive/banner_primitive.js.map +1 -1
  35. package/build/contexts/api_provider.d.ts.map +1 -1
  36. package/build/contexts/api_provider.js +2 -0
  37. package/build/contexts/api_provider.js.map +1 -1
  38. package/build/contexts/chat_context.d.ts +0 -2
  39. package/build/contexts/chat_context.d.ts.map +1 -1
  40. package/build/contexts/chat_context.js +16 -93
  41. package/build/contexts/chat_context.js.map +1 -1
  42. package/build/contexts/conversations_context.d.ts +3 -1
  43. package/build/contexts/conversations_context.d.ts.map +1 -1
  44. package/build/contexts/conversations_context.js +39 -31
  45. package/build/contexts/conversations_context.js.map +1 -1
  46. package/build/contexts/session_context.d.ts.map +1 -1
  47. package/build/contexts/session_context.js +3 -0
  48. package/build/contexts/session_context.js.map +1 -1
  49. package/build/hooks/groups/use_group_chat_conversation_payload.d.ts +11 -1
  50. package/build/hooks/groups/use_group_chat_conversation_payload.d.ts.map +1 -1
  51. package/build/hooks/groups/use_group_chat_conversation_payload.js +92 -47
  52. package/build/hooks/groups/use_group_chat_conversation_payload.js.map +1 -1
  53. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +33 -25
  54. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
  55. package/build/hooks/groups/use_group_members_for_new_conversation.js +125 -110
  56. package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
  57. package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
  58. package/build/hooks/groups/use_groups_conversation_create.js +39 -31
  59. package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
  60. package/build/hooks/groups/use_groups_proxy.d.ts +2 -0
  61. package/build/hooks/groups/use_groups_proxy.d.ts.map +1 -0
  62. package/build/hooks/groups/use_groups_proxy.js +18 -0
  63. package/build/hooks/groups/use_groups_proxy.js.map +1 -0
  64. package/build/hooks/use_api.d.ts +6 -0
  65. package/build/hooks/use_api.d.ts.map +1 -1
  66. package/build/hooks/use_api.js +8 -5
  67. package/build/hooks/use_api.js.map +1 -1
  68. package/build/hooks/use_clear_conversation_filters.d.ts.map +1 -1
  69. package/build/hooks/use_clear_conversation_filters.js +1 -0
  70. package/build/hooks/use_clear_conversation_filters.js.map +1 -1
  71. package/build/hooks/use_conversation.d.ts.map +1 -1
  72. package/build/hooks/use_conversation.js +1 -1
  73. package/build/hooks/use_conversation.js.map +1 -1
  74. package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
  75. package/build/hooks/use_conversation_jolt_events.js +3 -2
  76. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  77. package/build/hooks/use_conversations_actions.d.ts +9 -9
  78. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  79. package/build/hooks/use_conversations_actions.js +12 -7
  80. package/build/hooks/use_conversations_actions.js.map +1 -1
  81. package/build/hooks/use_conversations_cache.d.ts +1 -3
  82. package/build/hooks/use_conversations_cache.d.ts.map +1 -1
  83. package/build/hooks/use_conversations_cache.js +79 -124
  84. package/build/hooks/use_conversations_cache.js.map +1 -1
  85. package/build/hooks/use_conversations_jolt_events.d.ts.map +1 -1
  86. package/build/hooks/use_conversations_jolt_events.js +47 -20
  87. package/build/hooks/use_conversations_jolt_events.js.map +1 -1
  88. package/build/hooks/use_features.d.ts +2 -0
  89. package/build/hooks/use_features.d.ts.map +1 -1
  90. package/build/hooks/use_features.js +3 -1
  91. package/build/hooks/use_features.js.map +1 -1
  92. package/build/hooks/use_groups.d.ts +6 -0
  93. package/build/hooks/use_groups.d.ts.map +1 -1
  94. package/build/hooks/use_groups_groups.d.ts +6 -0
  95. package/build/hooks/use_groups_groups.d.ts.map +1 -1
  96. package/build/hooks/use_groups_groups.js +25 -9
  97. package/build/hooks/use_groups_groups.js.map +1 -1
  98. package/build/hooks/use_hidden_conversations_count.d.ts +2 -0
  99. package/build/hooks/use_hidden_conversations_count.d.ts.map +1 -0
  100. package/build/hooks/use_hidden_conversations_count.js +32 -0
  101. package/build/hooks/use_hidden_conversations_count.js.map +1 -0
  102. package/build/hooks/use_hide_conversation.d.ts +108 -0
  103. package/build/hooks/use_hide_conversation.d.ts.map +1 -0
  104. package/build/hooks/use_hide_conversation.js +243 -0
  105. package/build/hooks/use_hide_conversation.js.map +1 -0
  106. package/build/hooks/use_hide_conversations_enabled.d.ts +2 -0
  107. package/build/hooks/use_hide_conversations_enabled.d.ts.map +1 -0
  108. package/build/hooks/use_hide_conversations_enabled.js +18 -0
  109. package/build/hooks/use_hide_conversations_enabled.js.map +1 -0
  110. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  111. package/build/hooks/use_mark_latest_message_read.js +5 -4
  112. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  113. package/build/hooks/use_new_conversation_from_filter.d.ts.map +1 -1
  114. package/build/hooks/use_new_conversation_from_filter.js +11 -1
  115. package/build/hooks/use_new_conversation_from_filter.js.map +1 -1
  116. package/build/hooks/use_product_analytics.d.ts.map +1 -1
  117. package/build/hooks/use_product_analytics.js +93 -75
  118. package/build/hooks/use_product_analytics.js.map +1 -1
  119. package/build/hooks/use_teams.d.ts +6 -0
  120. package/build/hooks/use_teams.d.ts.map +1 -1
  121. package/build/navigation/index.d.ts +5 -0
  122. package/build/navigation/index.d.ts.map +1 -1
  123. package/build/navigation/index.js +5 -0
  124. package/build/navigation/index.js.map +1 -1
  125. package/build/screens/conversation_actions_screen.d.ts +7 -0
  126. package/build/screens/conversation_actions_screen.d.ts.map +1 -0
  127. package/build/screens/conversation_actions_screen.js +89 -0
  128. package/build/screens/conversation_actions_screen.js.map +1 -0
  129. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  130. package/build/screens/conversation_details_screen.js +460 -394
  131. package/build/screens/conversation_details_screen.js.map +1 -1
  132. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  133. package/build/screens/conversation_filters/components/conversation_filters.js +53 -12
  134. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  135. package/build/screens/conversation_filters/components/rows.d.ts +6 -3
  136. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  137. package/build/screens/conversation_filters/components/rows.js +99 -62
  138. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  139. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  140. package/build/screens/conversation_filters/context/conversation_filter_context.js +4 -0
  141. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  142. package/build/screens/conversation_filters/filter_types.d.ts +1 -0
  143. package/build/screens/conversation_filters/filter_types.d.ts.map +1 -1
  144. package/build/screens/conversation_filters/filter_types.js +1 -0
  145. package/build/screens/conversation_filters/filter_types.js.map +1 -1
  146. package/build/screens/conversation_filters/hooks/filters.d.ts +12 -0
  147. package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
  148. package/build/screens/conversation_filters/screen_props.d.ts +1 -0
  149. package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
  150. package/build/screens/conversation_filters/screen_props.js.map +1 -1
  151. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  152. package/build/screens/conversation_new/components/groups_form.js +96 -93
  153. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  154. package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts.map +1 -1
  155. package/build/screens/conversations/components/filter_dropdown_list_header_component.js +138 -126
  156. package/build/screens/conversations/components/filter_dropdown_list_header_component.js.map +1 -1
  157. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  158. package/build/screens/conversations/components/list_header_component.js +95 -90
  159. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  160. package/build/screens/conversations/components/search_list_header_component.d.ts.map +1 -1
  161. package/build/screens/conversations/components/search_list_header_component.js +100 -95
  162. package/build/screens/conversations/components/search_list_header_component.js.map +1 -1
  163. package/build/screens/conversations/conversations_screen.d.ts +1 -0
  164. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  165. package/build/screens/conversations/conversations_screen.js +47 -21
  166. package/build/screens/conversations/conversations_screen.js.map +1 -1
  167. package/build/screens/get_help_screen.d.ts.map +1 -1
  168. package/build/screens/get_help_screen.js +4 -20
  169. package/build/screens/get_help_screen.js.map +1 -1
  170. package/build/screens/index.d.ts +1 -0
  171. package/build/screens/index.d.ts.map +1 -1
  172. package/build/screens/index.js +1 -0
  173. package/build/screens/index.js.map +1 -1
  174. package/build/types/jolt_events/index.d.ts +2 -0
  175. package/build/types/jolt_events/index.d.ts.map +1 -1
  176. package/build/types/jolt_events/index.js.map +1 -1
  177. package/build/types/jolt_events/person_events.d.ts +9 -0
  178. package/build/types/jolt_events/person_events.d.ts.map +1 -0
  179. package/build/types/jolt_events/person_events.js +2 -0
  180. package/build/types/jolt_events/person_events.js.map +1 -0
  181. package/build/types/resources/conversation_membership.d.ts +1 -0
  182. package/build/types/resources/conversation_membership.d.ts.map +1 -1
  183. package/build/types/resources/conversation_membership.js.map +1 -1
  184. package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
  185. package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
  186. package/build/types/resources/groups/groups_group_resource.js.map +1 -1
  187. package/build/types/resources/groups/groups_membership_resource.d.ts +11 -0
  188. package/build/types/resources/groups/groups_membership_resource.d.ts.map +1 -0
  189. package/build/types/resources/groups/groups_membership_resource.js +2 -0
  190. package/build/types/resources/groups/groups_membership_resource.js.map +1 -0
  191. package/build/types/resources/groups/index.d.ts +1 -0
  192. package/build/types/resources/groups/index.d.ts.map +1 -1
  193. package/build/types/resources/groups/index.js +1 -0
  194. package/build/types/resources/groups/index.js.map +1 -1
  195. package/build/utils/jolt/parse_stream_user_event_type.d.ts +3 -0
  196. package/build/utils/jolt/parse_stream_user_event_type.d.ts.map +1 -0
  197. package/build/utils/jolt/parse_stream_user_event_type.js +9 -0
  198. package/build/utils/jolt/parse_stream_user_event_type.js.map +1 -0
  199. package/build/utils/native_adapters/configuration.d.ts +3 -0
  200. package/build/utils/native_adapters/configuration.d.ts.map +1 -1
  201. package/build/utils/native_adapters/configuration.js +3 -0
  202. package/build/utils/native_adapters/configuration.js.map +1 -1
  203. package/build/utils/native_adapters/index.d.ts +1 -0
  204. package/build/utils/native_adapters/index.d.ts.map +1 -1
  205. package/build/utils/native_adapters/index.js +1 -0
  206. package/build/utils/native_adapters/index.js.map +1 -1
  207. package/build/utils/native_adapters/linking.d.ts.map +1 -1
  208. package/build/utils/native_adapters/linking.js +48 -2
  209. package/build/utils/native_adapters/linking.js.map +1 -1
  210. package/build/utils/native_adapters/updates.d.ts +11 -0
  211. package/build/utils/native_adapters/updates.d.ts.map +1 -0
  212. package/build/utils/native_adapters/updates.js +8 -0
  213. package/build/utils/native_adapters/updates.js.map +1 -0
  214. package/build/utils/product_analytics_token.d.ts +12 -0
  215. package/build/utils/product_analytics_token.d.ts.map +1 -0
  216. package/build/utils/product_analytics_token.js +84 -0
  217. package/build/utils/product_analytics_token.js.map +1 -0
  218. package/build/utils/request/conversation.d.ts +3 -1
  219. package/build/utils/request/conversation.d.ts.map +1 -1
  220. package/build/utils/request/conversation.js +4 -0
  221. package/build/utils/request/conversation.js.map +1 -1
  222. package/build/utils/throttled_refresh.d.ts +7 -0
  223. package/build/utils/throttled_refresh.d.ts.map +1 -0
  224. package/build/utils/throttled_refresh.js +42 -0
  225. package/build/utils/throttled_refresh.js.map +1 -0
  226. package/build/utils/toast_store.d.ts +21 -0
  227. package/build/utils/toast_store.d.ts.map +1 -0
  228. package/build/utils/toast_store.js +27 -0
  229. package/build/utils/toast_store.js.map +1 -0
  230. package/build/vendor/font_awesome_pro_solid_icons.d.ts +1 -0
  231. package/build/vendor/font_awesome_pro_solid_icons.d.ts.map +1 -1
  232. package/build/vendor/font_awesome_pro_solid_icons.js +5 -0
  233. package/build/vendor/font_awesome_pro_solid_icons.js.map +1 -1
  234. package/package.json +3 -3
  235. package/src/__tests__/hooks/use_group_chat_conversation_payload.test.tsx +31 -0
  236. package/src/__tests__/screens/conversation_filters/components/conversation_filters.test.tsx +6 -0
  237. package/src/components/conversations/__tests__/app_update_banner.test.tsx +27 -0
  238. package/src/components/conversations/__tests__/conversation_actions.test.tsx +77 -2
  239. package/src/components/conversations/__tests__/conversation_preview.test.tsx +29 -0
  240. package/src/components/conversations/__tests__/conversations.test.tsx +26 -0
  241. package/src/components/conversations/__tests__/conversations_blank_state.test.tsx +17 -0
  242. package/src/components/conversations/app_update_banner.tsx +36 -0
  243. package/src/components/conversations/conversation_actions.tsx +73 -4
  244. package/src/components/conversations/conversation_preview.tsx +12 -1
  245. package/src/components/conversations/conversations.tsx +9 -0
  246. package/src/components/conversations/conversations_blank_state.tsx +18 -0
  247. package/src/components/conversations/hidden_indicator.tsx +30 -0
  248. package/src/components/conversations/hidden_results_footer.tsx +25 -0
  249. package/src/components/display/__tests__/toast.test.tsx +55 -0
  250. package/src/components/display/toast.tsx +115 -0
  251. package/src/components/group_conversation_list.tsx +4 -1
  252. package/src/components/primitive/banner_primitive.tsx +5 -1
  253. package/src/contexts/api_provider.tsx +2 -0
  254. package/src/contexts/chat_context.tsx +2 -58
  255. package/src/contexts/conversations_context.tsx +8 -1
  256. package/src/contexts/session_context.tsx +3 -0
  257. package/src/hooks/__tests__/jolt_refresh_throttling.test.tsx +229 -0
  258. package/src/hooks/__tests__/use_conversations_jolt_events.test.tsx +1 -0
  259. package/src/hooks/__tests__/use_conversations_mark_read.test.tsx +38 -12
  260. package/src/hooks/__tests__/use_hide_conversation.test.tsx +189 -0
  261. package/src/hooks/__tests__/use_mark_latest_message_read.test.tsx +23 -2
  262. package/src/hooks/__tests__/use_product_analytics.test.tsx +304 -0
  263. package/src/hooks/groups/use_group_chat_conversation_payload.ts +30 -12
  264. package/src/hooks/groups/use_group_members_for_new_conversation.ts +49 -18
  265. package/src/hooks/groups/use_groups_conversation_create.ts +10 -14
  266. package/src/hooks/groups/use_groups_proxy.ts +6 -0
  267. package/src/hooks/use_api.ts +2 -1
  268. package/src/hooks/use_clear_conversation_filters.ts +1 -0
  269. package/src/hooks/use_conversation.ts +1 -0
  270. package/src/hooks/use_conversation_jolt_events.ts +2 -1
  271. package/src/hooks/use_conversations_actions.ts +7 -4
  272. package/src/hooks/use_conversations_cache.ts +1 -23
  273. package/src/hooks/use_conversations_jolt_events.ts +24 -10
  274. package/src/hooks/use_features.ts +2 -0
  275. package/src/hooks/use_groups_groups.ts +21 -16
  276. package/src/hooks/use_hidden_conversations_count.ts +14 -0
  277. package/src/hooks/use_hide_conversation.ts +128 -0
  278. package/src/hooks/use_hide_conversations_enabled.ts +7 -0
  279. package/src/hooks/use_mark_latest_message_read.ts +6 -5
  280. package/src/hooks/use_new_conversation_from_filter.ts +13 -5
  281. package/src/hooks/use_product_analytics.ts +74 -41
  282. package/src/navigation/index.tsx +8 -0
  283. package/src/screens/__tests__/conversation_actions_screen.test.tsx +79 -0
  284. package/src/screens/__tests__/conversation_details_screen.test.tsx +49 -1
  285. package/src/screens/conversation_actions_screen.tsx +53 -0
  286. package/src/screens/conversation_details_screen.tsx +19 -0
  287. package/src/screens/conversation_filters/__tests__/conversation_filters.test.tsx +42 -0
  288. package/src/screens/conversation_filters/components/conversation_filters.tsx +22 -3
  289. package/src/screens/conversation_filters/components/rows.tsx +44 -10
  290. package/src/screens/conversation_filters/context/conversation_filter_context.tsx +4 -0
  291. package/src/screens/conversation_filters/filter_types.ts +1 -0
  292. package/src/screens/conversation_filters/screen_props.ts +1 -0
  293. package/src/screens/conversation_new/components/groups_form.tsx +11 -9
  294. package/src/screens/conversations/__tests__/conversations_screen.test.tsx +3 -3
  295. package/src/screens/conversations/components/__tests__/filter_dropdown_list_header_component.test.tsx +42 -0
  296. package/src/screens/conversations/components/__tests__/list_header_component.test.tsx +1 -0
  297. package/src/screens/conversations/components/filter_dropdown_list_header_component.tsx +21 -5
  298. package/src/screens/conversations/components/list_header_component.tsx +14 -4
  299. package/src/screens/conversations/components/search_list_header_component.tsx +14 -4
  300. package/src/screens/conversations/conversations_screen.tsx +12 -1
  301. package/src/screens/get_help_screen.tsx +4 -18
  302. package/src/screens/index.ts +1 -0
  303. package/src/types/jolt_events/index.ts +2 -0
  304. package/src/types/jolt_events/person_events.ts +16 -0
  305. package/src/types/resources/conversation_membership.ts +1 -0
  306. package/src/types/resources/groups/groups_group_resource.ts +1 -1
  307. package/src/types/resources/groups/groups_membership_resource.ts +10 -0
  308. package/src/types/resources/groups/index.ts +1 -0
  309. package/src/utils/__tests__/throttled_refresh.test.ts +101 -0
  310. package/src/utils/jolt/__tests__/parse_stream_user_event_type.test.ts +27 -0
  311. package/src/utils/jolt/parse_stream_user_event_type.ts +16 -0
  312. package/src/utils/native_adapters/__tests__/linking.test.ts +60 -4
  313. package/src/utils/native_adapters/configuration.ts +5 -0
  314. package/src/utils/native_adapters/index.ts +1 -0
  315. package/src/utils/native_adapters/linking.ts +50 -2
  316. package/src/utils/native_adapters/updates.ts +16 -0
  317. package/src/utils/product_analytics_token.ts +120 -0
  318. package/src/utils/request/conversation.ts +6 -0
  319. package/src/utils/throttled_refresh.ts +62 -0
  320. package/src/utils/toast_store.ts +45 -0
  321. package/src/vendor/font_awesome_pro_solid_icons.ts +12 -0
@@ -0,0 +1,89 @@
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { useNavigation } from '@react-navigation/native';
3
+ import React from 'react';
4
+ import { StyleSheet } from 'react-native';
5
+ import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
6
+ import { useConversation } from '../hooks/use_conversation';
7
+ import { useHideConversation } from '../hooks/use_hide_conversation';
8
+ import { useHideConversationsEnabled } from '../hooks/use_hide_conversations_enabled';
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ export const ConversationActionsScreenOptions = getFormSheetScreenOptions({
11
+ headerTitle: 'Conversation actions'
12
+ });
13
+ export function ConversationActionsScreen(t0) {
14
+ const $ = _c(14);
15
+ const {
16
+ route
17
+ } = t0;
18
+ const navigation = useNavigation();
19
+ const styles = useStyles();
20
+ const {
21
+ data: conversation
22
+ } = useConversation(route.params);
23
+ let t1;
24
+ if ($[0] !== conversation) {
25
+ t1 = {
26
+ conversation
27
+ };
28
+ $[0] = conversation;
29
+ $[1] = t1;
30
+ } else {
31
+ t1 = $[1];
32
+ }
33
+ const {
34
+ hidden,
35
+ setHidden,
36
+ isPending
37
+ } = useHideConversation(t1);
38
+ const hideConversationsEnabled = useHideConversationsEnabled();
39
+ let t2;
40
+ if ($[2] !== hidden || $[3] !== navigation || $[4] !== setHidden) {
41
+ t2 = () => {
42
+ setHidden(!hidden);
43
+ navigation.goBack();
44
+ };
45
+ $[2] = hidden;
46
+ $[3] = navigation;
47
+ $[4] = setHidden;
48
+ $[5] = t2;
49
+ } else {
50
+ t2 = $[5];
51
+ }
52
+ const handleHidePress = t2;
53
+ let t3;
54
+ if ($[6] !== handleHidePress || $[7] !== hidden || $[8] !== hideConversationsEnabled || $[9] !== isPending) {
55
+ t3 = hideConversationsEnabled && /*#__PURE__*/_jsx(FormSheet.Action, {
56
+ onPress: handleHidePress,
57
+ title: hidden ? "Unhide conversation" : "Hide conversation",
58
+ iconName: hidden ? "general.showEye" : "general.hideEye",
59
+ disabled: isPending,
60
+ accessibilityHint: hidden ? "Shows this conversation in your conversation list again." : "Hides this conversation from your conversation list."
61
+ });
62
+ $[6] = handleHidePress;
63
+ $[7] = hidden;
64
+ $[8] = hideConversationsEnabled;
65
+ $[9] = isPending;
66
+ $[10] = t3;
67
+ } else {
68
+ t3 = $[10];
69
+ }
70
+ let t4;
71
+ if ($[11] !== styles.formSheetContent || $[12] !== t3) {
72
+ t4 = /*#__PURE__*/_jsx(FormSheet.Root, {
73
+ style: styles.formSheetContent,
74
+ children: t3
75
+ });
76
+ $[11] = styles.formSheetContent;
77
+ $[12] = t3;
78
+ $[13] = t4;
79
+ } else {
80
+ t4 = $[13];
81
+ }
82
+ return t4;
83
+ }
84
+ const useStyles = () => StyleSheet.create({
85
+ formSheetContent: {
86
+ paddingTop: 16
87
+ }
88
+ });
89
+ //# sourceMappingURL=conversation_actions_screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation_actions_screen.js","names":["useNavigation","React","StyleSheet","FormSheet","getFormSheetScreenOptions","useConversation","useHideConversation","useHideConversationsEnabled","jsx","_jsx","ConversationActionsScreenOptions","headerTitle","ConversationActionsScreen","t0","$","_c","route","navigation","styles","useStyles","data","conversation","params","t1","hidden","setHidden","isPending","hideConversationsEnabled","t2","goBack","handleHidePress","t3","Action","title","iconName","accessibilityHint","t4","formSheetContent","Root","style","children","create","paddingTop"],"sources":["../../src/screens/conversation_actions_screen.tsx"],"sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet } from 'react-native'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { useConversation } from '../hooks/use_conversation'\nimport { useHideConversation } from '../hooks/use_hide_conversation'\nimport { useHideConversationsEnabled } from '../hooks/use_hide_conversations_enabled'\n\nexport const ConversationActionsScreenOptions = getFormSheetScreenOptions({\n headerTitle: 'Conversation actions',\n})\n\nexport type ConversationActionsScreenProps = StaticScreenProps<{\n conversation_id: number\n}>\n\nexport function ConversationActionsScreen({ route }: ConversationActionsScreenProps) {\n const navigation = useNavigation()\n const styles = useStyles()\n const { data: conversation } = useConversation(route.params)\n const { hidden, setHidden, isPending } = useHideConversation({ conversation })\n const hideConversationsEnabled = useHideConversationsEnabled()\n\n const handleHidePress = () => {\n setHidden(!hidden)\n navigation.goBack()\n }\n\n return (\n <FormSheet.Root style={styles.formSheetContent}>\n {hideConversationsEnabled && (\n <FormSheet.Action\n onPress={handleHidePress}\n title={hidden ? 'Unhide conversation' : 'Hide conversation'}\n iconName={hidden ? 'general.showEye' : 'general.hideEye'}\n disabled={isPending}\n accessibilityHint={\n hidden\n ? 'Shows this conversation in your conversation list again.'\n : 'Hides this conversation from your conversation list.'\n }\n />\n )}\n </FormSheet.Root>\n )\n}\n\nconst useStyles = () =>\n StyleSheet.create({\n formSheetContent: {\n paddingTop: 16,\n },\n })\n"],"mappings":";AAAA,SAA4BA,a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BAAgB,EAAE;IAChBK,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -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;AA4FzF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,2CA0alF"}
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;AA8FzF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,2CA2blF"}