@planningcenter/chat-react-native 3.30.0-rc.3 → 3.30.0-rc.4
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/conversation/attachments/attachment_card.js +3 -3
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +2 -2
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +3 -3
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -1
- package/build/components/conversation/attachments/expanded_link.js +3 -3
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +4 -4
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +4 -4
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/image_attachment.js +5 -5
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/video_attachment.js +4 -4
- package/build/components/conversation/empty_conversation_blank_state.js +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +3 -3
- package/build/components/conversation/message.d.ts +1 -1
- package/build/components/conversation/message.js +12 -12
- package/build/components/conversation/message_attachments.d.ts +1 -1
- package/build/components/conversation/message_attachments.js +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js +1 -1
- package/build/components/conversation/message_form.d.ts +1 -1
- package/build/components/conversation/message_form.js +12 -12
- package/build/components/conversation/message_markdown.js +3 -3
- package/build/components/conversation/message_reaction.d.ts +2 -2
- package/build/components/conversation/message_reaction.js +6 -6
- package/build/components/conversation/message_read_receipts.d.ts +1 -1
- package/build/components/conversation/message_read_receipts.js +2 -2
- package/build/components/conversation/messages_disabled_banners.js +2 -2
- package/build/components/conversation/reply_connectors.d.ts +1 -1
- package/build/components/conversation/reply_connectors.js +2 -2
- package/build/components/conversation/reply_shadow_message.d.ts +1 -1
- package/build/components/conversation/reply_shadow_message.js +6 -6
- package/build/components/conversation/typing_indicator.js +3 -3
- package/build/components/conversations/conversation_actions.d.ts +1 -1
- package/build/components/conversations/conversation_actions.js +5 -5
- package/build/components/conversations/conversation_preview.d.ts +1 -1
- package/build/components/conversations/conversation_preview.js +3 -3
- package/build/components/conversations/conversations.js +5 -5
- package/build/components/conversations/mute_indicator.js +3 -3
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +5 -5
- package/build/components/conversations/unread_count_badge.js +3 -3
- package/build/components/display/action_button.js +2 -2
- package/build/components/display/avatar.d.ts +1 -1
- package/build/components/display/avatar.js +1 -1
- package/build/components/display/avatar_group.d.ts +1 -1
- package/build/components/display/avatar_group.js +1 -1
- package/build/components/display/badge.js +3 -3
- package/build/components/display/banner.d.ts +1 -1
- package/build/components/display/banner.js +1 -1
- package/build/components/display/banner_collapsible.js +1 -1
- package/build/components/display/button.js +3 -3
- package/build/components/display/child_notice.d.ts +1 -1
- package/build/components/display/child_notice.js +2 -2
- package/build/components/display/heading.js +3 -3
- package/build/components/display/icon.js +1 -1
- package/build/components/display/icon_button.js +2 -2
- package/build/components/display/image.js +1 -1
- package/build/components/display/image_attachment_preview.js +2 -2
- package/build/components/display/keyboard_view.js +1 -1
- package/build/components/display/person.d.ts +1 -1
- package/build/components/display/person.js +1 -1
- package/build/components/display/platform_modal_header_buttons.js +1 -1
- package/build/components/display/pressable_row.js +1 -1
- package/build/components/display/spinner.js +1 -1
- package/build/components/display/switch.js +1 -1
- package/build/components/display/tabs.js +1 -1
- package/build/components/display/text.js +2 -2
- package/build/components/display/text_button.js +2 -2
- package/build/components/display/text_inline_button.js +2 -2
- package/build/components/display/toggle_button.js +4 -4
- package/build/components/display/utils/button_colors.js +1 -1
- package/build/components/display/utils/status_colors.js +1 -1
- package/build/components/display/video_attachment_preview.js +3 -3
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.js +2 -2
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/components/page/error_boundary.js +2 -2
- package/build/components/page/loading.js +1 -1
- package/build/components/primitive/avatar_primitive.d.ts +2 -2
- package/build/components/primitive/avatar_primitive.js +5 -5
- package/build/components/primitive/banner_primitive.d.ts +2 -2
- package/build/components/primitive/banner_primitive.js +8 -8
- package/build/components/primitive/blank_state_primitive.d.ts +1 -1
- package/build/components/primitive/blank_state_primitive.js +2 -2
- package/build/components/primitive/form_sheet.d.ts +2 -2
- package/build/components/primitive/form_sheet.js +3 -3
- package/build/components/safe_area_modal.js +1 -1
- package/build/contexts/api_provider.js +4 -4
- package/build/contexts/chat_context.d.ts +6 -6
- package/build/contexts/chat_context.js +2 -2
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.js +1 -1
- package/build/contexts/session_context.d.ts +3 -3
- package/build/contexts/session_context.js +6 -6
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +6 -6
- package/build/hooks/groups/use_group_members_for_new_conversation.js +2 -2
- package/build/hooks/groups/use_groups_conversation_create.d.ts +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +2 -2
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts +2 -2
- package/build/hooks/services/use_find_or_create_services_conversation.js +2 -2
- package/build/hooks/services/use_services_team.d.ts +1 -1
- package/build/hooks/services/use_services_team.js +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.d.ts +21 -21
- package/build/hooks/services/use_team_members_for_new_conversation.js +1 -1
- package/build/hooks/services/use_team_plans.d.ts +1 -1
- package/build/hooks/services/use_team_plans.js +1 -1
- package/build/hooks/use_api.d.ts +2 -2
- package/build/hooks/use_api_client.d.ts +1 -1
- package/build/hooks/use_api_client.js +3 -3
- package/build/hooks/use_async_storage.js +1 -1
- package/build/hooks/use_attachment_uploader.d.ts +1 -1
- package/build/hooks/use_broadcast_typing_status.js +1 -1
- package/build/hooks/use_chat_permissions.d.ts +21 -21
- package/build/hooks/use_conversation.d.ts +4 -4
- package/build/hooks/use_conversation.js +3 -3
- package/build/hooks/use_conversation_jolt_events.js +1 -1
- package/build/hooks/use_conversation_membership.d.ts +1 -1
- package/build/hooks/use_conversation_membership.js +2 -2
- package/build/hooks/use_conversation_message.d.ts +1 -1
- package/build/hooks/use_conversation_message.js +1 -1
- package/build/hooks/use_conversation_messages.d.ts +3 -3
- package/build/hooks/use_conversation_messages.js +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +6 -6
- package/build/hooks/use_conversations.d.ts +2 -2
- package/build/hooks/use_conversations.js +1 -1
- package/build/hooks/use_conversations_actions.d.ts +19 -19
- package/build/hooks/use_conversations_actions.js +1 -1
- package/build/hooks/use_conversations_cache.d.ts +2 -2
- package/build/hooks/use_conversations_cache.js +2 -2
- package/build/hooks/use_conversations_jolt_events.js +2 -2
- package/build/hooks/use_current_person.d.ts +1 -1
- package/build/hooks/use_features.d.ts +1 -1
- package/build/hooks/use_features.js +1 -1
- package/build/hooks/use_giphy.d.ts +1 -1
- package/build/hooks/use_giphy.js +1 -1
- package/build/hooks/use_groups.d.ts +2 -2
- package/build/hooks/use_groups_groups.d.ts +33 -33
- package/build/hooks/use_jolt.js +2 -2
- package/build/hooks/use_live_relative_time.d.ts +1 -1
- package/build/hooks/use_live_relative_time.js +2 -2
- package/build/hooks/use_mark_latest_message_read.d.ts +1 -1
- package/build/hooks/use_message_create_or_update.d.ts +2 -2
- package/build/hooks/use_message_create_or_update.js +7 -7
- package/build/hooks/use_message_draft.d.ts +1 -1
- package/build/hooks/use_message_draft.js +1 -1
- package/build/hooks/use_message_reaction_toggle.d.ts +2 -2
- package/build/hooks/use_message_reaction_toggle.js +2 -2
- package/build/hooks/use_organization.d.ts +4 -4
- package/build/hooks/use_people_person.d.ts +1 -1
- package/build/hooks/use_product_analytics.d.ts +1 -1
- package/build/hooks/use_product_analytics.js +3 -3
- package/build/hooks/use_qualified_by_age.js +1 -1
- package/build/hooks/use_read_receipts.d.ts +1 -1
- package/build/hooks/use_report_message.d.ts +1 -1
- package/build/hooks/use_report_message.js +1 -1
- package/build/hooks/use_storage.d.ts +1 -1
- package/build/hooks/use_submit_age_check.d.ts +1 -1
- package/build/hooks/use_submit_age_check.js +1 -1
- package/build/hooks/use_suspense_api.d.ts +3 -3
- package/build/hooks/use_suspense_api.js +2 -2
- package/build/hooks/use_teams.d.ts +1 -1
- package/build/hooks/use_theme.d.ts +1 -1
- package/build/hooks/use_theme.js +1 -1
- package/build/hooks/use_typing_indicators.js +1 -1
- package/build/hooks/use_typing_status_cache.d.ts +1 -1
- package/build/hooks/use_upload_client.d.ts +1 -1
- package/build/hooks/use_upload_client.js +3 -3
- package/build/icons/font_awesome.js +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/navigation/chat_access_gate.js +7 -7
- package/build/navigation/index.d.ts +25 -25
- package/build/navigation/index.js +28 -28
- package/build/navigation/screenLayout.js +2 -2
- package/build/polyfills/events/Event.js +1 -1
- package/build/polyfills/events/EventTarget.js +1 -1
- package/build/polyfills/events/internals/EventInternals.d.ts +2 -2
- package/build/polyfills/events/internals/EventTargetInternals.d.ts +2 -2
- package/build/screens/age_check/age_check_required_screen.js +8 -8
- package/build/screens/age_check/age_check_underage_screen.js +3 -3
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +3 -3
- package/build/screens/attachment_actions/attachment_actions_screen.js +1 -1
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +3 -3
- package/build/screens/bug_report_screen.js +11 -11
- package/build/screens/conversation/message_read_receipts_screen.js +4 -4
- package/build/screens/conversation_details_screen.js +8 -8
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +3 -3
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +4 -4
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +6 -6
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +22 -22
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js +2 -2
- package/build/screens/conversation_filter_recipients/types.d.ts +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +5 -5
- package/build/screens/conversation_filters/components/rows.d.ts +4 -4
- package/build/screens/conversation_filters/components/rows.js +5 -5
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/group_filters.js +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +54 -54
- package/build/screens/conversation_filters/hooks/filters.js +3 -3
- package/build/screens/conversation_filters/screen_props.d.ts +1 -1
- package/build/screens/conversation_filters/team_filters.js +1 -1
- package/build/screens/conversation_filters_screen.js +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +7 -7
- package/build/screens/conversation_new/components/form_list.d.ts +1 -1
- package/build/screens/conversation_new/components/form_list.js +2 -2
- package/build/screens/conversation_new/components/gender_filter_toggle.js +3 -3
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -1
- package/build/screens/conversation_new/components/groups_form.js +10 -10
- package/build/screens/conversation_new/components/services_form.d.ts +1 -1
- package/build/screens/conversation_new/components/services_form.js +8 -8
- package/build/screens/conversation_new/components/source_app_error_card.js +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +3 -3
- package/build/screens/conversation_notification_level_select_screen.js +5 -5
- package/build/screens/conversation_screen.d.ts +3 -3
- package/build/screens/conversation_screen.js +21 -21
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -4
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -2
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +4 -4
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -2
- package/build/screens/conversation_select_type_screen.d.ts +2 -2
- package/build/screens/conversation_select_type_screen.js +2 -2
- package/build/screens/conversations/components/chat_group_badge.js +2 -2
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +4 -4
- package/build/screens/conversations/components/list_header_component.js +9 -9
- package/build/screens/conversations/conversations_screen.d.ts +2 -2
- package/build/screens/conversations/conversations_screen.js +3 -3
- package/build/screens/design_system_screen.js +6 -6
- package/build/screens/get_help_screen.js +4 -4
- package/build/screens/group_notification_level_select_screen.js +3 -3
- package/build/screens/group_notification_settings_screen.js +3 -3
- package/build/screens/message_actions_screen.js +10 -10
- package/build/screens/message_report/components/message_preview.d.ts +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -2
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -1
- package/build/screens/message_report/components/report_reason_list.js +4 -4
- package/build/screens/message_report_screen.js +7 -7
- package/build/screens/notification_settings/hooks/groups.d.ts +5 -5
- package/build/screens/notification_settings/hooks/groups.js +4 -4
- package/build/screens/notification_settings_screen.js +4 -4
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts +4 -4
- package/build/screens/preferred_app/hooks/use_chat_types.js +1 -1
- package/build/screens/preferred_app_selection_screen.js +7 -7
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.js +7 -7
- package/build/screens/send_giphy_screen.js +8 -8
- package/build/screens/team_conversation_screen.js +3 -3
- package/build/types/jolt_events/message_events.d.ts +1 -1
- package/build/types/jolt_events/reaction_events.d.ts +1 -1
- package/build/types/resources/app_grant.d.ts +1 -1
- package/build/types/resources/conversation_membership.d.ts +1 -1
- package/build/types/resources/group_membership.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/organization.d.ts +1 -1
- package/build/types/resources/person.d.ts +1 -1
- package/build/types/resources/services/chat_resource.d.ts +1 -1
- package/build/types/resources/services/team_resource.d.ts +1 -1
- package/build/utils/cache/messages_cache.d.ts +3 -3
- package/build/utils/cache/messages_cache.js +3 -3
- package/build/utils/cache/optimistically_create_message.d.ts +2 -2
- package/build/utils/cache/optimistically_create_message.js +4 -4
- package/build/utils/cache/optimistically_update_message.d.ts +1 -1
- package/build/utils/cache/optimistically_update_message.js +2 -2
- package/build/utils/cache/page_mutations.d.ts +5 -5
- package/build/utils/client/client.d.ts +1 -1
- package/build/utils/convert_attachments_for_create.d.ts +2 -2
- package/build/utils/destructure_chat_group_graph_id.d.ts +2 -2
- package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts +2 -2
- package/build/utils/jolt/transform_message_event_data_to_message_resource.js +1 -1
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts +3 -3
- package/build/utils/performance_tracking.d.ts +1 -1
- package/build/utils/reaction_constants.d.ts +1 -1
- package/build/utils/request/conversation.d.ts +2 -2
- package/build/utils/request/get_features.d.ts +1 -1
- package/build/utils/request/get_features.js +1 -1
- package/build/utils/request/get_message.d.ts +1 -1
- package/build/utils/request/get_message.js +1 -1
- package/build/utils/request/get_messages.d.ts +1 -1
- package/build/utils/request/get_messages.js +1 -1
- package/build/utils/response_error.d.ts +1 -1
- package/build/utils/session.d.ts +1 -1
- package/build/utils/session_manager.d.ts +1 -1
- package/build/utils/styles.js +1 -1
- package/build/utils/theme.d.ts +1 -1
- package/build/utils/theme.js +2 -2
- package/package.json +4 -3
- package/src/screens/preferred_app_selection_screen.tsx +3 -3
|
@@ -4,27 +4,27 @@ import { CommonActions, useNavigation, useTheme as useNavigationTheme, useRoute,
|
|
|
4
4
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { FlatList, Platform, StyleSheet, View } from 'react-native';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
|
-
import { Badge, Icon, Text } from '
|
|
8
|
-
import { EmptyConversationBlankState } from '
|
|
9
|
-
import { JumpToBottomButton } from '
|
|
10
|
-
import { Message } from '
|
|
11
|
-
import { MessageForm } from '
|
|
12
|
-
import { LeaderMessagesDisabledBanner, MemberMessagesDisabledBanner, } from '
|
|
13
|
-
import { ReplyShadowMessage } from '
|
|
14
|
-
import { TypingIndicator } from '
|
|
15
|
-
import { KeyboardView } from '
|
|
16
|
-
import BlankState from '
|
|
17
|
-
import { ConversationContextProvider } from '
|
|
18
|
-
import { useTheme } from '
|
|
19
|
-
import { useConversation } from '
|
|
20
|
-
import { useConversationJoltEvents } from '
|
|
21
|
-
import { useConversationMessages } from '
|
|
22
|
-
import { useConversationMessagesJoltEvents } from '
|
|
23
|
-
import { useMarkLatestMessageRead } from '
|
|
24
|
-
import { normalizeAnalyticsMetadata, usePublishProductAnalyticsEvent, } from '
|
|
25
|
-
import { getRelativeDateStatus } from '
|
|
26
|
-
import dayjs from '
|
|
27
|
-
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL } from '
|
|
7
|
+
import { Badge, Icon, Text } from '../components';
|
|
8
|
+
import { EmptyConversationBlankState } from '../components/conversation/empty_conversation_blank_state';
|
|
9
|
+
import { JumpToBottomButton } from '../components/conversation/jump_to_bottom_button';
|
|
10
|
+
import { Message } from '../components/conversation/message';
|
|
11
|
+
import { MessageForm } from '../components/conversation/message_form';
|
|
12
|
+
import { LeaderMessagesDisabledBanner, MemberMessagesDisabledBanner, } from '../components/conversation/messages_disabled_banners';
|
|
13
|
+
import { ReplyShadowMessage } from '../components/conversation/reply_shadow_message';
|
|
14
|
+
import { TypingIndicator } from '../components/conversation/typing_indicator';
|
|
15
|
+
import { KeyboardView } from '../components/display/keyboard_view';
|
|
16
|
+
import BlankState from '../components/primitive/blank_state_primitive';
|
|
17
|
+
import { ConversationContextProvider } from '../contexts/conversation_context';
|
|
18
|
+
import { useTheme } from '../hooks';
|
|
19
|
+
import { useConversation } from '../hooks/use_conversation';
|
|
20
|
+
import { useConversationJoltEvents } from '../hooks/use_conversation_jolt_events';
|
|
21
|
+
import { useConversationMessages } from '../hooks/use_conversation_messages';
|
|
22
|
+
import { useConversationMessagesJoltEvents } from '../hooks/use_conversation_messages_jolt_events';
|
|
23
|
+
import { useMarkLatestMessageRead } from '../hooks/use_mark_latest_message_read';
|
|
24
|
+
import { normalizeAnalyticsMetadata, usePublishProductAnalyticsEvent, } from '../hooks/use_product_analytics';
|
|
25
|
+
import { getRelativeDateStatus } from '../utils/date';
|
|
26
|
+
import dayjs from '../utils/dayjs';
|
|
27
|
+
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL } from '../utils/styles';
|
|
28
28
|
export function ConversationScreen({ route }) {
|
|
29
29
|
const { conversation_id, reply_root_id } = route.params;
|
|
30
30
|
const { data: conversation } = useConversation({ conversation_id });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RecipientLinkRow } from './recipient_link_row';
|
|
2
|
-
import { pluralize } from '
|
|
2
|
+
import { pluralize } from '../../../utils';
|
|
3
3
|
export const GroupsRecipientRow = ({ group, onPress }) => {
|
|
4
4
|
const groupAccessibilityLabel = `Select ${group.name} with ${pluralize(group.membershipsCount, 'member')}`;
|
|
5
5
|
return (<RecipientLinkRow imageUri={group.headerImage?.thumbnail} title={group.name} subtitle={`${group.membershipsCount} members`} onPress={() => onPress(group)} accessibilityLabel={groupAccessibilityLabel} accessibilityHint={`Selects group as recipient and navigates to the final screen to finish creating the conversation`}/>);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Platform, StyleSheet, View } from 'react-native';
|
|
4
|
-
import { Icon, Image, Text } from '
|
|
5
|
-
import { useTheme } from '
|
|
6
|
-
import { platformFontWeightMedium } from '
|
|
4
|
+
import { Icon, Image, Text } from '../../../components';
|
|
5
|
+
import { useTheme } from '../../../hooks';
|
|
6
|
+
import { platformFontWeightMedium } from '../../../utils';
|
|
7
7
|
export const RecipientLinkRow = ({ onPress, accessibilityLabel, accessibilityHint, imageUri, title, subtitle, }) => {
|
|
8
8
|
const styles = useStyles();
|
|
9
9
|
return (<PlatformPressable style={styles.row} onPress={onPress} accessibilityRole="link" accessibilityLabel={accessibilityLabel} accessibilityHint={accessibilityHint}>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Image, Text } from '
|
|
4
|
-
import { useTheme } from '
|
|
5
|
-
import { platformFontWeightMedium } from '
|
|
3
|
+
import { Image, Text } from '../../../components';
|
|
4
|
+
import { useTheme } from '../../../hooks';
|
|
5
|
+
import { platformFontWeightMedium } from '../../../utils';
|
|
6
6
|
const DEFAULT_REASON = 'Chat is not enabled for this group';
|
|
7
7
|
const REASON_DISPLAY_TEXT = {
|
|
8
8
|
leaders_only: 'Only leaders can start conversations',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServiceTypeWithTeams } from '
|
|
1
|
+
import { ServiceTypeWithTeams } from '../../../screens/conversation_filter_recipients/types';
|
|
2
2
|
interface TeamRecipientRowProps {
|
|
3
3
|
serviceType: ServiceTypeWithTeams;
|
|
4
4
|
onPress: (teams: ServiceTypeWithTeams['teams']) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RecipientLinkRow } from './recipient_link_row';
|
|
2
|
-
import { pluralize } from '
|
|
2
|
+
import { pluralize } from '../../../utils';
|
|
3
3
|
export const TeamRecipientRow = ({ serviceType, onPress }) => {
|
|
4
4
|
const serviceTypeAccessibilityLabel = `Select ${pluralize(serviceType.teams.length, 'team')} for ${serviceType.name}`;
|
|
5
5
|
const teamNames = serviceType.teams.map(team => team.name).join(', ');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleSheet, View } from 'react-native';
|
|
2
|
-
import { TextButton } from '
|
|
2
|
+
import { TextButton } from '../../../components';
|
|
3
3
|
export const ViewMoreLinkRow = ({ accessibilityHint, onPress }) => {
|
|
4
4
|
const styles = useRowStyles();
|
|
5
5
|
return (<View style={[styles.row]}>
|
|
@@ -2,10 +2,10 @@ import { useNavigation } from '@react-navigation/native';
|
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import { ScrollView, StyleSheet, View } from 'react-native';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
-
import { Button, Heading } from '
|
|
6
|
-
import { DefaultLoading } from '
|
|
7
|
-
import { useNewConversationEntry } from '
|
|
8
|
-
import { Haptic } from '
|
|
5
|
+
import { Button, Heading } from '../../components';
|
|
6
|
+
import { DefaultLoading } from '../../components/page/loading';
|
|
7
|
+
import { useNewConversationEntry } from '../../hooks/use_new_conversation_entry';
|
|
8
|
+
import { Haptic } from '../../utils/native_adapters';
|
|
9
9
|
export const ConversationNewEntryScreen = ({ route }) => {
|
|
10
10
|
const styles = useStyles();
|
|
11
11
|
const navigation = useNavigation();
|
package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js
CHANGED
|
@@ -5,8 +5,8 @@ import { SectionList, StyleSheet, View } from 'react-native';
|
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { GroupsRecipientRow } from './components/groups_recipient_row';
|
|
7
7
|
import { RestrictedGroupRow } from './components/restricted_group_row';
|
|
8
|
-
import { Heading, Text } from '
|
|
9
|
-
import { useGroupsGroups } from '
|
|
8
|
+
import { Heading, Text } from '../../components';
|
|
9
|
+
import { useGroupsGroups } from '../../hooks/use_groups_groups';
|
|
10
10
|
const SectionKey = {
|
|
11
11
|
my: 'my',
|
|
12
12
|
more: 'more',
|
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import { FlatList, StyleSheet, View } from 'react-native';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
import { TeamRecipientRow } from './components/team_recipient_row';
|
|
6
|
-
import { Button, Heading } from '
|
|
7
|
-
import { useServiceTypesWithTeams } from '
|
|
8
|
-
import { TeamFilterTypes, } from '
|
|
9
|
-
import { Haptic } from '
|
|
6
|
+
import { Button, Heading } from '../../components';
|
|
7
|
+
import { useServiceTypesWithTeams } from '../../screens/conversation_filter_recipients/hooks/use_service_types_with_teams';
|
|
8
|
+
import { TeamFilterTypes, } from '../../screens/conversation_filter_recipients/types';
|
|
9
|
+
import { Haptic } from '../../utils/native_adapters';
|
|
10
10
|
export const ConversationSelectTeamsILeadRecipientsScreen = ({ route, }) => {
|
|
11
11
|
const styles = useStyles();
|
|
12
12
|
const navigation = useNavigation();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
-
import { AppName } from '
|
|
3
|
-
import { GraphId } from '
|
|
2
|
+
import { AppName } from '../../../types/resources/app_name';
|
|
3
|
+
import { GraphId } from '../../../types/resources/group_resource';
|
|
4
4
|
export type ConversationSelectRecipientsParams = {
|
|
5
5
|
chat_group_graph_id?: GraphId;
|
|
6
6
|
group_source_app_name?: AppName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { AppName } from '
|
|
4
|
-
import { GraphId } from '
|
|
3
|
+
import { AppName } from '../types/resources/app_name';
|
|
4
|
+
import { GraphId } from '../types/resources/group_resource';
|
|
5
5
|
export declare const ConversationSelectTypeScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
6
6
|
export type ConversationSelectTypeScreenProps = StaticScreenProps<{
|
|
7
7
|
chat_group_graph_id?: GraphId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useNavigation } from '@react-navigation/native';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import FormSheet, { getFormSheetScreenOptions } from '
|
|
4
|
-
import { Haptic } from '
|
|
3
|
+
import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
|
|
4
|
+
import { Haptic } from '../utils/native_adapters';
|
|
5
5
|
export const ConversationSelectTypeScreenOptions = getFormSheetScreenOptions({
|
|
6
6
|
headerTitle: 'New conversation',
|
|
7
7
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useNavigation, useRoute } from '@react-navigation/native';
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
|
-
import { Badge } from '
|
|
5
|
-
import { useApiGet } from '
|
|
4
|
+
import { Badge } from '../../../components';
|
|
5
|
+
import { useApiGet } from '../../../hooks/use_api';
|
|
6
6
|
export const ChatGroupBadge = ({ rowPaddingHorizontal }) => {
|
|
7
7
|
const styles = useStyles({ rowPaddingHorizontal });
|
|
8
8
|
const navigation = useNavigation();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PressableProps } from 'react-native';
|
|
3
|
-
import { type IconString } from '
|
|
3
|
+
import { type IconString } from '../../../components/display/icon';
|
|
4
4
|
interface ListHeaderActionButtonProps extends PressableProps {
|
|
5
5
|
/**
|
|
6
6
|
* Provides context to screen readers about what the button does.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Pressable, StyleSheet } from 'react-native';
|
|
3
|
-
import { Icon } from '
|
|
4
|
-
import { useTheme, useFontScale, useCreateAndroidRippleColor } from '
|
|
5
|
-
import { platformPressedOpacityStyle } from '
|
|
6
|
-
import { tokens } from '
|
|
3
|
+
import { Icon } from '../../../components/display/icon';
|
|
4
|
+
import { useTheme, useFontScale, useCreateAndroidRippleColor } from '../../../hooks';
|
|
5
|
+
import { platformPressedOpacityStyle } from '../../../utils';
|
|
6
|
+
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
7
7
|
export function ListHeaderActionButton({ accessibilityLabel, maxFontSizeMultiplier, name, ...props }) {
|
|
8
8
|
const styles = useStyles({ maxFontSizeMultiplier });
|
|
9
9
|
const { colors } = useTheme();
|
|
@@ -3,15 +3,15 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
3
3
|
import { Alert, ScrollView, StyleSheet, View } from 'react-native';
|
|
4
4
|
import { ChatGroupBadge } from './chat_group_badge';
|
|
5
5
|
import { ListHeaderActionButton } from './list_header_action_button';
|
|
6
|
-
import { Heading, TextButton, ToggleButton } from '
|
|
7
|
-
import { useAtFontScaleBreakpoint, useCurrentPersonCache, useTheme } from '
|
|
8
|
-
import { useCanCreateConversations } from '
|
|
9
|
-
import { useAppName } from '
|
|
10
|
-
import { useMarkAllRead } from '
|
|
11
|
-
import { useCanDisplayGroups } from '
|
|
12
|
-
import { useNewConversationEntry } from '
|
|
13
|
-
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '
|
|
14
|
-
import { Haptic } from '
|
|
6
|
+
import { Heading, TextButton, ToggleButton } from '../../../components';
|
|
7
|
+
import { useAtFontScaleBreakpoint, useCurrentPersonCache, useTheme } from '../../../hooks';
|
|
8
|
+
import { useCanCreateConversations } from '../../../hooks';
|
|
9
|
+
import { useAppName } from '../../../hooks/use_app_name';
|
|
10
|
+
import { useMarkAllRead } from '../../../hooks/use_conversations_actions';
|
|
11
|
+
import { useCanDisplayGroups } from '../../../hooks/use_groups';
|
|
12
|
+
import { useNewConversationEntry } from '../../../hooks/use_new_conversation_entry';
|
|
13
|
+
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '../../../utils';
|
|
14
|
+
import { Haptic } from '../../../utils/native_adapters';
|
|
15
15
|
const ROW_PADDING_HORIZONTAL = 16;
|
|
16
16
|
var FilterTypes;
|
|
17
17
|
(function (FilterTypes) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { AppName } from '
|
|
4
|
-
import { GraphId } from '
|
|
3
|
+
import { AppName } from '../../types/resources/app_name';
|
|
4
|
+
import { GraphId } from '../../types/resources/group_resource';
|
|
5
5
|
export type ConversationsScreenProps = StaticScreenProps<{
|
|
6
6
|
title?: string;
|
|
7
7
|
chat_group_graph_id?: GraphId;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { ListHeaderComponent } from './components/list_header_component';
|
|
4
|
-
import { Conversations } from '
|
|
5
|
-
import { ConversationsContextProvider } from '
|
|
6
|
-
import { usePublishProductAnalyticsEvent } from '
|
|
4
|
+
import { Conversations } from '../../components';
|
|
5
|
+
import { ConversationsContextProvider } from '../../contexts/conversations_context';
|
|
6
|
+
import { usePublishProductAnalyticsEvent } from '../../hooks';
|
|
7
7
|
export function ConversationsScreen({ route }) {
|
|
8
8
|
const styles = useStyles();
|
|
9
9
|
usePublishProductAnalyticsEvent('chat.mobile.conversations.index.opened');
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import { Alert, Pressable, ScrollView, StyleSheet, View } from 'react-native';
|
|
4
|
-
import { Avatar, AvatarGroup, Badge, Banner, BannerCollapsible, Button, ToggleButton, Heading, Icon, IconButton, Image, Person, Spinner, Switch, Text, TextButton, TextInlineButton, ImageAttachmentPreview, } from '
|
|
5
|
-
import { VideoAttachmentPreview } from '
|
|
6
|
-
import BannerPrimitive from '
|
|
7
|
-
import BlankState from '
|
|
8
|
-
import { useInteractionGhostBackgroundColor, useTheme } from '
|
|
9
|
-
import { MAX_FONT_SIZE_MULTIPLIER, platformPressedOpacityStyle, platformFontWeightMedium, Haptic, } from '
|
|
4
|
+
import { Avatar, AvatarGroup, Badge, Banner, BannerCollapsible, Button, ToggleButton, Heading, Icon, IconButton, Image, Person, Spinner, Switch, Text, TextButton, TextInlineButton, ImageAttachmentPreview, } from '../components/display';
|
|
5
|
+
import { VideoAttachmentPreview } from '../components/display/video_attachment_preview';
|
|
6
|
+
import BannerPrimitive from '../components/primitive/banner_primitive';
|
|
7
|
+
import BlankState from '../components/primitive/blank_state_primitive';
|
|
8
|
+
import { useInteractionGhostBackgroundColor, useTheme } from '../hooks';
|
|
9
|
+
import { MAX_FONT_SIZE_MULTIPLIER, platformPressedOpacityStyle, platformFontWeightMedium, Haptic, } from '../utils';
|
|
10
10
|
// =================================
|
|
11
11
|
// ====== Docs Utils ===============
|
|
12
12
|
// =================================
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useNavigation } from '@react-navigation/native';
|
|
2
2
|
import { useCallback, useMemo } from 'react';
|
|
3
3
|
import { Alert, Linking, StyleSheet, View } from 'react-native';
|
|
4
|
-
import { Heading, PressableRow, Text, TextInlineButton } from '
|
|
5
|
-
import { useApiGet, useTheme } from '
|
|
6
|
-
import { useAppName } from '
|
|
7
|
-
import { Clipboard } from '
|
|
4
|
+
import { Heading, PressableRow, Text, TextInlineButton } from '../components';
|
|
5
|
+
import { useApiGet, useTheme } from '../hooks';
|
|
6
|
+
import { useAppName } from '../hooks/use_app_name';
|
|
7
|
+
import { Clipboard } from '../utils';
|
|
8
8
|
const useOrganization = () => {
|
|
9
9
|
const { data: organization } = useApiGet({
|
|
10
10
|
url: '/',
|
|
@@ -2,9 +2,9 @@ import { useNavigation } from '@react-navigation/native';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
4
|
import { useGroup, useGroupMembershipUpdate } from './notification_settings/hooks/groups';
|
|
5
|
-
import { PressableRow } from '
|
|
6
|
-
import FormSheet, { getFormSheetScreenOptions } from '
|
|
7
|
-
import { useTheme } from '
|
|
5
|
+
import { PressableRow } from '../components';
|
|
6
|
+
import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
|
|
7
|
+
import { useTheme } from '../hooks';
|
|
8
8
|
export const GroupNotificationLevelSelectScreenOptions = getFormSheetScreenOptions({
|
|
9
9
|
headerTitle: 'Notification level',
|
|
10
10
|
sheetAllowedDetents: [0.35],
|
|
@@ -3,9 +3,9 @@ import { useNavigation } from '@react-navigation/native';
|
|
|
3
3
|
import React, { useEffect } from 'react';
|
|
4
4
|
import { Platform, StyleSheet, View } from 'react-native';
|
|
5
5
|
import { useGroup } from './notification_settings/hooks/groups';
|
|
6
|
-
import { Heading, Icon, Text } from '
|
|
7
|
-
import { useTheme } from '
|
|
8
|
-
import { platformFontWeightBold } from '
|
|
6
|
+
import { Heading, Icon, Text } from '../components';
|
|
7
|
+
import { useTheme } from '../hooks';
|
|
8
|
+
import { platformFontWeightBold } from '../utils/styles';
|
|
9
9
|
export function GroupNotificationSettingsScreen({ route }) {
|
|
10
10
|
const { groupId, title } = route.params;
|
|
11
11
|
const navigation = useNavigation();
|
|
@@ -4,16 +4,16 @@ import { useMutation } from '@tanstack/react-query';
|
|
|
4
4
|
import { isNil, omitBy } from 'lodash';
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
6
|
import { Alert, Platform, StyleSheet, View } from 'react-native';
|
|
7
|
-
import { Text } from '
|
|
8
|
-
import { useReactionStyles } from '
|
|
9
|
-
import FormSheet, { getFormSheetScreenOptions } from '
|
|
10
|
-
import { useCreateAndroidRippleColor, useFontScale, useTheme } from '
|
|
11
|
-
import { useApiClient } from '
|
|
12
|
-
import { useConversationMessages } from '
|
|
13
|
-
import { availableFeatures, useFeatures } from '
|
|
14
|
-
import { useMessageReactionToggle } from '
|
|
15
|
-
import { REACTION_EMOJIS } from '
|
|
16
|
-
import { Clipboard, Haptic } from '
|
|
7
|
+
import { Text } from '../components';
|
|
8
|
+
import { useReactionStyles } from '../components/conversation/message_reaction';
|
|
9
|
+
import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
|
|
10
|
+
import { useCreateAndroidRippleColor, useFontScale, useTheme } from '../hooks';
|
|
11
|
+
import { useApiClient } from '../hooks/use_api_client';
|
|
12
|
+
import { useConversationMessages } from '../hooks/use_conversation_messages';
|
|
13
|
+
import { availableFeatures, useFeatures } from '../hooks/use_features';
|
|
14
|
+
import { useMessageReactionToggle } from '../hooks/use_message_reaction_toggle';
|
|
15
|
+
import { REACTION_EMOJIS } from '../utils';
|
|
16
|
+
import { Clipboard, Haptic } from '../utils/native_adapters';
|
|
17
17
|
export const MessageActionsScreenOptions = getFormSheetScreenOptions({
|
|
18
18
|
sheetAllowedDetents: [0.5],
|
|
19
19
|
headerTitle: 'Message actions',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
|
-
import { Avatar, Text, Icon } from '
|
|
4
|
-
import { useTheme, useFontScale } from '
|
|
3
|
+
import { Avatar, Text, Icon } from '../../../components';
|
|
4
|
+
import { useTheme, useFontScale } from '../../../hooks';
|
|
5
5
|
export function MessagePreview({ message, style }) {
|
|
6
6
|
const hasImages = message.attachments.some(att => att.type === 'MessageAttachment' && att.attributes?.contentType?.startsWith('image/'));
|
|
7
7
|
const imageOnly = hasImages && !message.text;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MessageReportReason } from '
|
|
2
|
+
import { MessageReportReason } from '../../../types/resources/message_report';
|
|
3
3
|
interface ReportReasonListProps {
|
|
4
4
|
selectedReason: MessageReportReason | null;
|
|
5
5
|
onReasonChange: (reason: MessageReportReason) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { View, StyleSheet } from 'react-native';
|
|
4
|
-
import { Text } from '
|
|
5
|
-
import { useTheme, useCreateAndroidRippleColor } from '
|
|
6
|
-
import { MESSAGE_REPORT_REASONS } from '
|
|
7
|
-
import { Haptic } from '
|
|
4
|
+
import { Text } from '../../../components';
|
|
5
|
+
import { useTheme, useCreateAndroidRippleColor } from '../../../hooks';
|
|
6
|
+
import { MESSAGE_REPORT_REASONS } from '../../../types/resources/message_report';
|
|
7
|
+
import { Haptic } from '../../../utils/native_adapters';
|
|
8
8
|
const MESSAGE_REPORT_REASONS_LIST = Object.entries(MESSAGE_REPORT_REASONS).map(([key, label]) => ({
|
|
9
9
|
key: key,
|
|
10
10
|
label,
|
|
@@ -4,13 +4,13 @@ import { View, StyleSheet, TextInput, ScrollView } from 'react-native';
|
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
import { MessagePreview } from './message_report/components/message_preview';
|
|
6
6
|
import { ReportReasonList } from './message_report/components/report_reason_list';
|
|
7
|
-
import { Spinner, Text, KeyboardView } from '
|
|
8
|
-
import { HeaderDismissButton, HeaderTextButton, } from '
|
|
9
|
-
import BlankState from '
|
|
10
|
-
import { useTheme } from '
|
|
11
|
-
import { useConversationMessages } from '
|
|
12
|
-
import { useReportMessage } from '
|
|
13
|
-
import { platformFontWeightBold } from '
|
|
7
|
+
import { Spinner, Text, KeyboardView } from '../components';
|
|
8
|
+
import { HeaderDismissButton, HeaderTextButton, } from '../components/display/platform_modal_header_buttons';
|
|
9
|
+
import BlankState from '../components/primitive/blank_state_primitive';
|
|
10
|
+
import { useTheme } from '../hooks';
|
|
11
|
+
import { useConversationMessages } from '../hooks/use_conversation_messages';
|
|
12
|
+
import { useReportMessage } from '../hooks/use_report_message';
|
|
13
|
+
import { platformFontWeightBold } from '../utils';
|
|
14
14
|
const MAX_DETAIL_LENGTH = 500;
|
|
15
15
|
export const MessageReportScreenOptions = ({ navigation, route, }) => {
|
|
16
16
|
const handleClose = () => navigation.dispatch(StackActions.popTo('Conversation', {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InfiniteData } from '@tanstack/react-query';
|
|
2
|
-
import { ApiCollection, ApiResource } from '
|
|
3
|
-
import { GroupMembership, GroupResourceWithMembership } from '
|
|
2
|
+
import { ApiCollection, ApiResource } from '../../../types';
|
|
3
|
+
import { GroupMembership, GroupResourceWithMembership } from '../../../types/resources';
|
|
4
4
|
export declare const getGroupsRequestArgs: () => {
|
|
5
5
|
url: string;
|
|
6
6
|
data: {
|
|
@@ -63,7 +63,7 @@ export declare const useGroups: () => {
|
|
|
63
63
|
export declare const useGroup: ({ groupId }: {
|
|
64
64
|
groupId: number | string;
|
|
65
65
|
}) => {
|
|
66
|
-
error: import("
|
|
66
|
+
error: import("../../../types").FailedResponse | null;
|
|
67
67
|
isError: boolean;
|
|
68
68
|
isPending: false;
|
|
69
69
|
isLoading: false;
|
|
@@ -74,7 +74,7 @@ export declare const useGroup: ({ groupId }: {
|
|
|
74
74
|
dataUpdatedAt: number;
|
|
75
75
|
errorUpdatedAt: number;
|
|
76
76
|
failureCount: number;
|
|
77
|
-
failureReason: import("
|
|
77
|
+
failureReason: import("../../../types").FailedResponse | null;
|
|
78
78
|
errorUpdateCount: number;
|
|
79
79
|
isFetched: boolean;
|
|
80
80
|
isFetchedAfterMount: boolean;
|
|
@@ -83,7 +83,7 @@ export declare const useGroup: ({ groupId }: {
|
|
|
83
83
|
isPaused: boolean;
|
|
84
84
|
isRefetching: boolean;
|
|
85
85
|
isStale: boolean;
|
|
86
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<ApiResource<GroupResourceWithMembership>, import("
|
|
86
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<ApiResource<GroupResourceWithMembership>, import("../../../types").FailedResponse>>;
|
|
87
87
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
88
88
|
data: GroupResourceWithMembership;
|
|
89
89
|
links: Record<string, string>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
2
|
import { merge } from 'lodash';
|
|
3
|
-
import { getRequestQueryKey, useApiClient } from '
|
|
4
|
-
import { useSuspenseGet, useSuspensePaginator } from '
|
|
5
|
-
import { updateRecordInPagesData } from '
|
|
6
|
-
import { throwResponseError } from '
|
|
3
|
+
import { getRequestQueryKey, useApiClient } from '../../../hooks';
|
|
4
|
+
import { useSuspenseGet, useSuspensePaginator } from '../../../hooks';
|
|
5
|
+
import { updateRecordInPagesData } from '../../../utils';
|
|
6
|
+
import { throwResponseError } from '../../../utils/response_error';
|
|
7
7
|
export const getGroupsRequestArgs = () => ({
|
|
8
8
|
url: '/me/groups',
|
|
9
9
|
data: {
|
|
@@ -5,10 +5,10 @@ import { FlatList, Platform, StyleSheet, View } from 'react-native';
|
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
6
|
import { useGroups } from './notification_settings/hooks/groups';
|
|
7
7
|
import { useChatTypes } from './preferred_app/hooks/use_chat_types';
|
|
8
|
-
import { Badge, Heading, Icon, Text } from '
|
|
9
|
-
import { HeaderTextButton } from '
|
|
10
|
-
import { useTheme } from '
|
|
11
|
-
import { isDefined } from '
|
|
8
|
+
import { Badge, Heading, Icon, Text } from '../components';
|
|
9
|
+
import { HeaderTextButton } from '../components/display/platform_modal_header_buttons';
|
|
10
|
+
import { useTheme } from '../hooks';
|
|
11
|
+
import { isDefined } from '../types';
|
|
12
12
|
// =========================================
|
|
13
13
|
// ====== Factory Constants & Types ========
|
|
14
14
|
// =========================================
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResourceObject } from '
|
|
1
|
+
import { ResourceObject } from '../../../types';
|
|
2
2
|
export type SourceAppName = 'Services' | 'Church Center';
|
|
3
3
|
export type PreferredApp = 'Services' | 'Church Center' | 'Chat' | 'None';
|
|
4
4
|
export interface ChatTypeResource extends ResourceObject {
|
|
@@ -10,7 +10,7 @@ export interface ChatTypeResource extends ResourceObject {
|
|
|
10
10
|
title: string;
|
|
11
11
|
}
|
|
12
12
|
export declare const useChatTypes: () => {
|
|
13
|
-
error: import("
|
|
13
|
+
error: import("../../../types").FailedResponse | null;
|
|
14
14
|
isError: boolean;
|
|
15
15
|
isPending: false;
|
|
16
16
|
isLoading: false;
|
|
@@ -21,7 +21,7 @@ export declare const useChatTypes: () => {
|
|
|
21
21
|
dataUpdatedAt: number;
|
|
22
22
|
errorUpdatedAt: number;
|
|
23
23
|
failureCount: number;
|
|
24
|
-
failureReason: import("
|
|
24
|
+
failureReason: import("../../../types").FailedResponse | null;
|
|
25
25
|
errorUpdateCount: number;
|
|
26
26
|
isFetched: boolean;
|
|
27
27
|
isFetchedAfterMount: boolean;
|
|
@@ -30,7 +30,7 @@ export declare const useChatTypes: () => {
|
|
|
30
30
|
isPaused: boolean;
|
|
31
31
|
isRefetching: boolean;
|
|
32
32
|
isStale: boolean;
|
|
33
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("
|
|
33
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("../../../types").ApiResource<ChatTypeResource[]>, import("../../../types").FailedResponse>>;
|
|
34
34
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
35
35
|
data: ChatTypeResource[];
|
|
36
36
|
links: Record<string, string>;
|
|
@@ -3,10 +3,10 @@ import { useMutation } from '@tanstack/react-query';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Image, StyleSheet, View } from 'react-native';
|
|
5
5
|
import { useChatTypes } from './preferred_app/hooks/use_chat_types';
|
|
6
|
-
import { Heading, Icon, Text } from '
|
|
7
|
-
import { useApiClient, useTheme } from '
|
|
8
|
-
import { useAppName } from '
|
|
9
|
-
import { throwResponseError } from '
|
|
6
|
+
import { Heading, Icon, Text } from '../components';
|
|
7
|
+
import { useApiClient, useTheme } from '../hooks';
|
|
8
|
+
import { useAppName } from '../hooks/use_app_name';
|
|
9
|
+
import { throwResponseError } from '../utils/response_error';
|
|
10
10
|
export function PreferredAppSelectionScreen({ route }) {
|
|
11
11
|
const { chatTypeId } = route.params;
|
|
12
12
|
const { data: chatTypes, refetch: refetchChatTypes } = useChatTypes();
|
|
@@ -57,11 +57,11 @@ const sortPreferredApp = (dir) => (a, b) => {
|
|
|
57
57
|
const getAppImage = (option) => {
|
|
58
58
|
switch (option) {
|
|
59
59
|
case 'Church Center':
|
|
60
|
-
return require('assets/churchCenter.png');
|
|
60
|
+
return require('@assets/churchCenter.png');
|
|
61
61
|
case 'Services':
|
|
62
|
-
return require('assets/servicesApp.png');
|
|
62
|
+
return require('@assets/servicesApp.png');
|
|
63
63
|
case 'Chat':
|
|
64
|
-
return require('assets/chatLogo.png');
|
|
64
|
+
return require('@assets/chatLogo.png');
|
|
65
65
|
default:
|
|
66
66
|
return undefined;
|
|
67
67
|
}
|