@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.
- package/build/components/conversations/app_update_banner.d.ts +2 -0
- package/build/components/conversations/app_update_banner.d.ts.map +1 -0
- package/build/components/conversations/app_update_banner.js +52 -0
- package/build/components/conversations/app_update_banner.js.map +1 -0
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +333 -193
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +106 -91
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +63 -56
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/conversations_blank_state.d.ts +2 -1
- package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
- package/build/components/conversations/conversations_blank_state.js +71 -39
- package/build/components/conversations/conversations_blank_state.js.map +1 -1
- package/build/components/conversations/hidden_indicator.d.ts +4 -0
- package/build/components/conversations/hidden_indicator.d.ts.map +1 -0
- package/build/components/conversations/hidden_indicator.js +52 -0
- package/build/components/conversations/hidden_indicator.js.map +1 -0
- package/build/components/conversations/hidden_results_footer.d.ts +2 -0
- package/build/components/conversations/hidden_results_footer.d.ts.map +1 -0
- package/build/components/conversations/hidden_results_footer.js +34 -0
- package/build/components/conversations/hidden_results_footer.js.map +1 -0
- package/build/components/display/toast.d.ts +3 -0
- package/build/components/display/toast.d.ts.map +1 -0
- package/build/components/display/toast.js +224 -0
- package/build/components/display/toast.js.map +1 -0
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +1 -0
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/primitive/banner_primitive.js +7 -3
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +2 -0
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +0 -2
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +16 -93
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +3 -1
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +39 -31
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +3 -0
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.d.ts +11 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.d.ts.map +1 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.js +92 -47
- package/build/hooks/groups/use_group_chat_conversation_payload.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +33 -25
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.js +125 -110
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +39 -31
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
- package/build/hooks/groups/use_groups_proxy.d.ts +2 -0
- package/build/hooks/groups/use_groups_proxy.d.ts.map +1 -0
- package/build/hooks/groups/use_groups_proxy.js +18 -0
- package/build/hooks/groups/use_groups_proxy.js.map +1 -0
- package/build/hooks/use_api.d.ts +6 -0
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js +8 -5
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_clear_conversation_filters.d.ts.map +1 -1
- package/build/hooks/use_clear_conversation_filters.js +1 -0
- package/build/hooks/use_clear_conversation_filters.js.map +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +1 -1
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +3 -2
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +9 -9
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.js +12 -7
- package/build/hooks/use_conversations_actions.js.map +1 -1
- package/build/hooks/use_conversations_cache.d.ts +1 -3
- package/build/hooks/use_conversations_cache.d.ts.map +1 -1
- package/build/hooks/use_conversations_cache.js +79 -124
- package/build/hooks/use_conversations_cache.js.map +1 -1
- package/build/hooks/use_conversations_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversations_jolt_events.js +47 -20
- package/build/hooks/use_conversations_jolt_events.js.map +1 -1
- package/build/hooks/use_features.d.ts +2 -0
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +3 -1
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_groups.d.ts +6 -0
- package/build/hooks/use_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.d.ts +6 -0
- package/build/hooks/use_groups_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.js +25 -9
- package/build/hooks/use_groups_groups.js.map +1 -1
- package/build/hooks/use_hidden_conversations_count.d.ts +2 -0
- package/build/hooks/use_hidden_conversations_count.d.ts.map +1 -0
- package/build/hooks/use_hidden_conversations_count.js +32 -0
- package/build/hooks/use_hidden_conversations_count.js.map +1 -0
- package/build/hooks/use_hide_conversation.d.ts +108 -0
- package/build/hooks/use_hide_conversation.d.ts.map +1 -0
- package/build/hooks/use_hide_conversation.js +243 -0
- package/build/hooks/use_hide_conversation.js.map +1 -0
- package/build/hooks/use_hide_conversations_enabled.d.ts +2 -0
- package/build/hooks/use_hide_conversations_enabled.d.ts.map +1 -0
- package/build/hooks/use_hide_conversations_enabled.js +18 -0
- package/build/hooks/use_hide_conversations_enabled.js.map +1 -0
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
- package/build/hooks/use_mark_latest_message_read.js +5 -4
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_new_conversation_from_filter.d.ts.map +1 -1
- package/build/hooks/use_new_conversation_from_filter.js +11 -1
- package/build/hooks/use_new_conversation_from_filter.js.map +1 -1
- package/build/hooks/use_product_analytics.d.ts.map +1 -1
- package/build/hooks/use_product_analytics.js +93 -75
- package/build/hooks/use_product_analytics.js.map +1 -1
- package/build/hooks/use_teams.d.ts +6 -0
- package/build/hooks/use_teams.d.ts.map +1 -1
- package/build/navigation/index.d.ts +5 -0
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +5 -0
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_actions_screen.d.ts +7 -0
- package/build/screens/conversation_actions_screen.d.ts.map +1 -0
- package/build/screens/conversation_actions_screen.js +89 -0
- package/build/screens/conversation_actions_screen.js.map +1 -0
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +460 -394
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +53 -12
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +6 -3
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +99 -62
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +4 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/filter_types.d.ts +1 -0
- package/build/screens/conversation_filters/filter_types.d.ts.map +1 -1
- package/build/screens/conversation_filters/filter_types.js +1 -0
- package/build/screens/conversation_filters/filter_types.js.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +12 -0
- package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts +1 -0
- package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_filters/screen_props.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +96 -93
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/filter_dropdown_list_header_component.js +138 -126
- package/build/screens/conversations/components/filter_dropdown_list_header_component.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +95 -90
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/components/search_list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/search_list_header_component.js +100 -95
- package/build/screens/conversations/components/search_list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +1 -0
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +47 -21
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/get_help_screen.js +4 -20
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/index.d.ts +1 -0
- package/build/screens/index.d.ts.map +1 -1
- package/build/screens/index.js +1 -0
- package/build/screens/index.js.map +1 -1
- package/build/types/jolt_events/index.d.ts +2 -0
- package/build/types/jolt_events/index.d.ts.map +1 -1
- package/build/types/jolt_events/index.js.map +1 -1
- package/build/types/jolt_events/person_events.d.ts +9 -0
- package/build/types/jolt_events/person_events.d.ts.map +1 -0
- package/build/types/jolt_events/person_events.js +2 -0
- package/build/types/jolt_events/person_events.js.map +1 -0
- package/build/types/resources/conversation_membership.d.ts +1 -0
- package/build/types/resources/conversation_membership.d.ts.map +1 -1
- package/build/types/resources/conversation_membership.js.map +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
- package/build/types/resources/groups/groups_group_resource.js.map +1 -1
- package/build/types/resources/groups/groups_membership_resource.d.ts +11 -0
- package/build/types/resources/groups/groups_membership_resource.d.ts.map +1 -0
- package/build/types/resources/groups/groups_membership_resource.js +2 -0
- package/build/types/resources/groups/groups_membership_resource.js.map +1 -0
- package/build/types/resources/groups/index.d.ts +1 -0
- package/build/types/resources/groups/index.d.ts.map +1 -1
- package/build/types/resources/groups/index.js +1 -0
- package/build/types/resources/groups/index.js.map +1 -1
- package/build/utils/jolt/parse_stream_user_event_type.d.ts +3 -0
- package/build/utils/jolt/parse_stream_user_event_type.d.ts.map +1 -0
- package/build/utils/jolt/parse_stream_user_event_type.js +9 -0
- package/build/utils/jolt/parse_stream_user_event_type.js.map +1 -0
- package/build/utils/native_adapters/configuration.d.ts +3 -0
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +3 -0
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/native_adapters/index.d.ts +1 -0
- package/build/utils/native_adapters/index.d.ts.map +1 -1
- package/build/utils/native_adapters/index.js +1 -0
- package/build/utils/native_adapters/index.js.map +1 -1
- package/build/utils/native_adapters/linking.d.ts.map +1 -1
- package/build/utils/native_adapters/linking.js +48 -2
- package/build/utils/native_adapters/linking.js.map +1 -1
- package/build/utils/native_adapters/updates.d.ts +11 -0
- package/build/utils/native_adapters/updates.d.ts.map +1 -0
- package/build/utils/native_adapters/updates.js +8 -0
- package/build/utils/native_adapters/updates.js.map +1 -0
- package/build/utils/product_analytics_token.d.ts +12 -0
- package/build/utils/product_analytics_token.d.ts.map +1 -0
- package/build/utils/product_analytics_token.js +84 -0
- package/build/utils/product_analytics_token.js.map +1 -0
- package/build/utils/request/conversation.d.ts +3 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +4 -0
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/throttled_refresh.d.ts +7 -0
- package/build/utils/throttled_refresh.d.ts.map +1 -0
- package/build/utils/throttled_refresh.js +42 -0
- package/build/utils/throttled_refresh.js.map +1 -0
- package/build/utils/toast_store.d.ts +21 -0
- package/build/utils/toast_store.d.ts.map +1 -0
- package/build/utils/toast_store.js +27 -0
- package/build/utils/toast_store.js.map +1 -0
- package/build/vendor/font_awesome_pro_solid_icons.d.ts +1 -0
- package/build/vendor/font_awesome_pro_solid_icons.d.ts.map +1 -1
- package/build/vendor/font_awesome_pro_solid_icons.js +5 -0
- package/build/vendor/font_awesome_pro_solid_icons.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/hooks/use_group_chat_conversation_payload.test.tsx +31 -0
- package/src/__tests__/screens/conversation_filters/components/conversation_filters.test.tsx +6 -0
- package/src/components/conversations/__tests__/app_update_banner.test.tsx +27 -0
- package/src/components/conversations/__tests__/conversation_actions.test.tsx +77 -2
- package/src/components/conversations/__tests__/conversation_preview.test.tsx +29 -0
- package/src/components/conversations/__tests__/conversations.test.tsx +26 -0
- package/src/components/conversations/__tests__/conversations_blank_state.test.tsx +17 -0
- package/src/components/conversations/app_update_banner.tsx +36 -0
- package/src/components/conversations/conversation_actions.tsx +73 -4
- package/src/components/conversations/conversation_preview.tsx +12 -1
- package/src/components/conversations/conversations.tsx +9 -0
- package/src/components/conversations/conversations_blank_state.tsx +18 -0
- package/src/components/conversations/hidden_indicator.tsx +30 -0
- package/src/components/conversations/hidden_results_footer.tsx +25 -0
- package/src/components/display/__tests__/toast.test.tsx +55 -0
- package/src/components/display/toast.tsx +115 -0
- package/src/components/group_conversation_list.tsx +4 -1
- package/src/components/primitive/banner_primitive.tsx +5 -1
- package/src/contexts/api_provider.tsx +2 -0
- package/src/contexts/chat_context.tsx +2 -58
- package/src/contexts/conversations_context.tsx +8 -1
- package/src/contexts/session_context.tsx +3 -0
- package/src/hooks/__tests__/jolt_refresh_throttling.test.tsx +229 -0
- package/src/hooks/__tests__/use_conversations_jolt_events.test.tsx +1 -0
- package/src/hooks/__tests__/use_conversations_mark_read.test.tsx +38 -12
- package/src/hooks/__tests__/use_hide_conversation.test.tsx +189 -0
- package/src/hooks/__tests__/use_mark_latest_message_read.test.tsx +23 -2
- package/src/hooks/__tests__/use_product_analytics.test.tsx +304 -0
- package/src/hooks/groups/use_group_chat_conversation_payload.ts +30 -12
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +49 -18
- package/src/hooks/groups/use_groups_conversation_create.ts +10 -14
- package/src/hooks/groups/use_groups_proxy.ts +6 -0
- package/src/hooks/use_api.ts +2 -1
- package/src/hooks/use_clear_conversation_filters.ts +1 -0
- package/src/hooks/use_conversation.ts +1 -0
- package/src/hooks/use_conversation_jolt_events.ts +2 -1
- package/src/hooks/use_conversations_actions.ts +7 -4
- package/src/hooks/use_conversations_cache.ts +1 -23
- package/src/hooks/use_conversations_jolt_events.ts +24 -10
- package/src/hooks/use_features.ts +2 -0
- package/src/hooks/use_groups_groups.ts +21 -16
- package/src/hooks/use_hidden_conversations_count.ts +14 -0
- package/src/hooks/use_hide_conversation.ts +128 -0
- package/src/hooks/use_hide_conversations_enabled.ts +7 -0
- package/src/hooks/use_mark_latest_message_read.ts +6 -5
- package/src/hooks/use_new_conversation_from_filter.ts +13 -5
- package/src/hooks/use_product_analytics.ts +74 -41
- package/src/navigation/index.tsx +8 -0
- package/src/screens/__tests__/conversation_actions_screen.test.tsx +79 -0
- package/src/screens/__tests__/conversation_details_screen.test.tsx +49 -1
- package/src/screens/conversation_actions_screen.tsx +53 -0
- package/src/screens/conversation_details_screen.tsx +19 -0
- package/src/screens/conversation_filters/__tests__/conversation_filters.test.tsx +42 -0
- package/src/screens/conversation_filters/components/conversation_filters.tsx +22 -3
- package/src/screens/conversation_filters/components/rows.tsx +44 -10
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +4 -0
- package/src/screens/conversation_filters/filter_types.ts +1 -0
- package/src/screens/conversation_filters/screen_props.ts +1 -0
- package/src/screens/conversation_new/components/groups_form.tsx +11 -9
- package/src/screens/conversations/__tests__/conversations_screen.test.tsx +3 -3
- package/src/screens/conversations/components/__tests__/filter_dropdown_list_header_component.test.tsx +42 -0
- package/src/screens/conversations/components/__tests__/list_header_component.test.tsx +1 -0
- package/src/screens/conversations/components/filter_dropdown_list_header_component.tsx +21 -5
- package/src/screens/conversations/components/list_header_component.tsx +14 -4
- package/src/screens/conversations/components/search_list_header_component.tsx +14 -4
- package/src/screens/conversations/conversations_screen.tsx +12 -1
- package/src/screens/get_help_screen.tsx +4 -18
- package/src/screens/index.ts +1 -0
- package/src/types/jolt_events/index.ts +2 -0
- package/src/types/jolt_events/person_events.ts +16 -0
- package/src/types/resources/conversation_membership.ts +1 -0
- package/src/types/resources/groups/groups_group_resource.ts +1 -1
- package/src/types/resources/groups/groups_membership_resource.ts +10 -0
- package/src/types/resources/groups/index.ts +1 -0
- package/src/utils/__tests__/throttled_refresh.test.ts +101 -0
- package/src/utils/jolt/__tests__/parse_stream_user_event_type.test.ts +27 -0
- package/src/utils/jolt/parse_stream_user_event_type.ts +16 -0
- package/src/utils/native_adapters/__tests__/linking.test.ts +60 -4
- package/src/utils/native_adapters/configuration.ts +5 -0
- package/src/utils/native_adapters/index.ts +1 -0
- package/src/utils/native_adapters/linking.ts +50 -2
- package/src/utils/native_adapters/updates.ts +16 -0
- package/src/utils/product_analytics_token.ts +120 -0
- package/src/utils/request/conversation.ts +6 -0
- package/src/utils/throttled_refresh.ts +62 -0
- package/src/utils/toast_store.ts +45 -0
- 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,aAAa,QAAQ,0BAA0B;AAC3E,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,SAAS,IAAIC,yBAAyB,QAAQ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.ts","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;
|
|
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"}
|