@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Text } from '
|
|
4
|
-
import { useTheme } from '
|
|
5
|
-
import { tokens } from '
|
|
3
|
+
import { Text } from '../../../components/display';
|
|
4
|
+
import { useTheme } from '../../../hooks';
|
|
5
|
+
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
6
6
|
export function AttachmentCard({ children, ...props }) {
|
|
7
7
|
const styles = useStyles();
|
|
8
8
|
return (<View style={styles.card} {...props}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
|
-
import { Spinner } from '
|
|
4
|
-
import { useTheme } from '
|
|
3
|
+
import { Spinner } from '../../../components/display';
|
|
4
|
+
import { useTheme } from '../../../hooks';
|
|
5
5
|
export function AttachmentDeletingOverlay() {
|
|
6
6
|
const styles = useStyles();
|
|
7
7
|
return (<View style={styles.container}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DenormalizedMessageAttachmentResource } from '
|
|
2
|
+
import { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
|
|
3
3
|
export declare function AudioAttachment({ attachment, onMessageAttachmentLongPress, isDeleting, }: {
|
|
4
4
|
attachment: DenormalizedMessageAttachmentResource;
|
|
5
5
|
onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void;
|
|
@@ -3,9 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import { View, StyleSheet } from 'react-native';
|
|
4
4
|
import { AttachmentCard, AttachmentCardTitle } from './attachment_card';
|
|
5
5
|
import { AttachmentDeletingOverlay } from './attachment_deleting_overlay';
|
|
6
|
-
import { IconButton, Text } from '
|
|
7
|
-
import { useTheme } from '
|
|
8
|
-
import { Audio } from '
|
|
6
|
+
import { IconButton, Text } from '../../../components/display';
|
|
7
|
+
import { useTheme } from '../../../hooks';
|
|
8
|
+
import { Audio } from '../../../utils/native_adapters';
|
|
9
9
|
export function AudioAttachment({ attachment, onMessageAttachmentLongPress, isDeleting, }) {
|
|
10
10
|
const styles = useStyles();
|
|
11
11
|
const { colors } = useTheme();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DenormalizedExpandedLinkAttachmentResource } from '
|
|
2
|
+
import { DenormalizedExpandedLinkAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
|
|
3
3
|
export declare function ExpandedLink({ attachment, onMessageLongPress, }: {
|
|
4
4
|
attachment: DenormalizedExpandedLinkAttachmentResource;
|
|
5
5
|
onMessageLongPress: () => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Image, StyleSheet, Text, View } from 'react-native';
|
|
4
|
-
import { useTheme } from '
|
|
5
|
-
import { Linking } from '
|
|
6
|
-
import { tokens } from '
|
|
4
|
+
import { useTheme } from '../../../hooks';
|
|
5
|
+
import { Linking } from '../../../utils';
|
|
6
|
+
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
7
7
|
export function ExpandedLink({ attachment, onMessageLongPress, }) {
|
|
8
8
|
const styles = useStyles();
|
|
9
9
|
const { colors } = useTheme();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DenormalizedMessageAttachmentResource } from '
|
|
2
|
+
import { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
|
|
3
3
|
export declare function GenericFileAttachment({ attachment, onMessageAttachmentLongPress, isDeleting, }: {
|
|
4
4
|
attachment: DenormalizedMessageAttachmentResource;
|
|
5
5
|
onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void;
|
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
import { AttachmentCard, AttachmentCardTitle } from './attachment_card';
|
|
5
5
|
import { AttachmentDeletingOverlay } from './attachment_deleting_overlay';
|
|
6
|
-
import { Icon } from '
|
|
7
|
-
import { useTheme } from '
|
|
8
|
-
import { Linking } from '
|
|
9
|
-
import { tokens } from '
|
|
6
|
+
import { Icon } from '../../../components/display';
|
|
7
|
+
import { useTheme } from '../../../hooks';
|
|
8
|
+
import { Linking } from '../../../utils';
|
|
9
|
+
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
10
10
|
export function GenericFileAttachment({ attachment, onMessageAttachmentLongPress, isDeleting, }) {
|
|
11
11
|
const styles = useStyles();
|
|
12
12
|
const { colors } = useTheme();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DenormalizedGiphyAttachmentResource } from '
|
|
2
|
+
import { DenormalizedGiphyAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
|
|
3
3
|
export declare function GiphyAttachment({ attachment, onMessageLongPress, }: {
|
|
4
4
|
attachment: DenormalizedGiphyAttachmentResource;
|
|
5
5
|
onMessageLongPress: () => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Text, StyleSheet, Linking } from 'react-native';
|
|
4
|
-
import { Image } from '
|
|
5
|
-
import { useTheme } from '
|
|
6
|
-
import { assertKeysAreNumbers } from '
|
|
7
|
-
import { tokens } from '
|
|
4
|
+
import { Image } from '../../../components/display';
|
|
5
|
+
import { useTheme } from '../../../hooks';
|
|
6
|
+
import { assertKeysAreNumbers } from '../../../utils';
|
|
7
|
+
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
8
8
|
export function GiphyAttachment({ attachment, onMessageLongPress, }) {
|
|
9
9
|
const { colors } = useTheme();
|
|
10
10
|
const { title, titleLink, giphy } = attachment;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DenormalizedMessageAttachmentResource } from '
|
|
2
|
+
import { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
|
|
3
3
|
export type MetaProps = {
|
|
4
4
|
authorName: string;
|
|
5
5
|
createdAt: string;
|
|
@@ -6,11 +6,11 @@ import { FlatList, Gesture, GestureDetector, GestureHandlerRootView, } from 'rea
|
|
|
6
6
|
import Animated, { runOnJS, useAnimatedStyle, useAnimatedReaction, useSharedValue, withSpring, withDecay, } from 'react-native-reanimated';
|
|
7
7
|
import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
|
|
8
8
|
import { AttachmentDeletingOverlay } from './attachment_deleting_overlay';
|
|
9
|
-
import { IconButton, Image, Heading, Text } from '
|
|
10
|
-
import { useTheme } from '
|
|
11
|
-
import { Haptic, platformFontWeightMedium } from '
|
|
12
|
-
import { formatDatePreview } from '
|
|
13
|
-
import { tokens } from '
|
|
9
|
+
import { IconButton, Image, Heading, Text } from '../../../components/display';
|
|
10
|
+
import { useTheme } from '../../../hooks';
|
|
11
|
+
import { Haptic, platformFontWeightMedium } from '../../../utils';
|
|
12
|
+
import { formatDatePreview } from '../../../utils/date';
|
|
13
|
+
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
14
14
|
const { width: WINDOW_WIDTH, height: WINDOW_HEIGHT } = Dimensions.get('window');
|
|
15
15
|
const DISMISS_PAN_THRESHOLD = 175;
|
|
16
16
|
const MIN_DISTANCE_FOR_PAN = 10; // Higher threshold gives pinching priority
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DenormalizedMessageAttachmentResource } from '
|
|
2
|
+
import { DenormalizedMessageAttachmentResource } from '../../../types/resources/denormalized_attachment_resource';
|
|
3
3
|
export declare function VideoAttachment({ attachment, onMessageAttachmentLongPress, isDeleting, }: {
|
|
4
4
|
attachment: DenormalizedMessageAttachmentResource;
|
|
5
5
|
onMessageAttachmentLongPress: (attachment: DenormalizedMessageAttachmentResource) => void;
|
|
@@ -3,10 +3,10 @@ import React, { useRef, useState } from 'react';
|
|
|
3
3
|
import { View, StyleSheet } from 'react-native';
|
|
4
4
|
import { AttachmentDeletingOverlay } from './attachment_deleting_overlay';
|
|
5
5
|
import { MESSAGE_ATTACHMENT_WIDTH_SINGLE } from './constants';
|
|
6
|
-
import { Icon } from '
|
|
7
|
-
import { useTheme } from '
|
|
8
|
-
import { Video } from '
|
|
9
|
-
import { tokens } from '
|
|
6
|
+
import { Icon } from '../../../components/display';
|
|
7
|
+
import { useTheme } from '../../../hooks';
|
|
8
|
+
import { Video } from '../../../utils/native_adapters';
|
|
9
|
+
import { tokens } from '../../../vendor/tapestry/tokens';
|
|
10
10
|
export function VideoAttachment({ attachment, onMessageAttachmentLongPress, isDeleting, }) {
|
|
11
11
|
const { colors } = useTheme();
|
|
12
12
|
const styles = useStyles();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import BlankState from '
|
|
1
|
+
import BlankState from '../../components/primitive/blank_state_primitive';
|
|
2
2
|
export const EmptyConversationBlankState = () => {
|
|
3
3
|
return (<BlankState.Root>
|
|
4
4
|
<BlankState.Imagery name="general.outlinedTextMessage"/>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import { View, Pressable, StyleSheet } from 'react-native';
|
|
3
3
|
import Animated, { useSharedValue, useAnimatedStyle, interpolate, Extrapolation, ReduceMotion, withSpring, } from 'react-native-reanimated';
|
|
4
|
-
import { Icon, Text } from '
|
|
5
|
-
import { useTheme } from '
|
|
6
|
-
import { platformFontWeightMedium } from '
|
|
4
|
+
import { Icon, Text } from '../../components/display';
|
|
5
|
+
import { useTheme } from '../../hooks';
|
|
6
|
+
import { platformFontWeightMedium } from '../../utils';
|
|
7
7
|
export const JumpToBottomButton = ({ onPress, visible }) => {
|
|
8
8
|
const styles = useStyles();
|
|
9
9
|
const progress = useSharedValue(0);
|
|
@@ -7,18 +7,18 @@ import { MessageAttachments } from './message_attachments';
|
|
|
7
7
|
import { MessageMarkdown } from './message_markdown';
|
|
8
8
|
import { MessageReadReceipts } from './message_read_receipts';
|
|
9
9
|
import { TheirReplyConnector, MyReplyConnector, AVATAR_CONNECTOR_SPACING } from './reply_connectors';
|
|
10
|
-
import { MessageReaction } from '
|
|
11
|
-
import { Avatar, Icon, Spinner, Text, TextButton, TextInlineButton } from '
|
|
12
|
-
import ErrorBoundary from '
|
|
13
|
-
import { useAnimatedMessageBackgroundColor, useInteractionGhostBackgroundColor, useTheme, } from '
|
|
14
|
-
import { useDeletingIds } from '
|
|
15
|
-
import { useConversationMessage } from '
|
|
16
|
-
import { useLiveRelativeTime } from '
|
|
17
|
-
import { useMessageCreateOrUpdate } from '
|
|
18
|
-
import { pluralize } from '
|
|
19
|
-
import { isNewMessage } from '
|
|
20
|
-
import { Haptic } from '
|
|
21
|
-
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL, MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH, platformFontWeightMedium, } from '
|
|
10
|
+
import { MessageReaction } from '../../components/conversation/message_reaction';
|
|
11
|
+
import { Avatar, Icon, Spinner, Text, TextButton, TextInlineButton } from '../../components/display';
|
|
12
|
+
import ErrorBoundary from '../../components/page/error_boundary';
|
|
13
|
+
import { useAnimatedMessageBackgroundColor, useInteractionGhostBackgroundColor, useTheme, } from '../../hooks';
|
|
14
|
+
import { useDeletingIds } from '../../hooks';
|
|
15
|
+
import { useConversationMessage } from '../../hooks/use_conversation_message';
|
|
16
|
+
import { useLiveRelativeTime } from '../../hooks/use_live_relative_time';
|
|
17
|
+
import { useMessageCreateOrUpdate } from '../../hooks/use_message_create_or_update';
|
|
18
|
+
import { pluralize } from '../../utils';
|
|
19
|
+
import { isNewMessage } from '../../utils/cache/messages_cache';
|
|
20
|
+
import { Haptic } from '../../utils/native_adapters';
|
|
21
|
+
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL, MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH, platformFontWeightMedium, } from '../../utils/styles';
|
|
22
22
|
export function Message({ canDeleteNonAuthoredMessages, conversation_id, latestReadMessageSortKey, inReplyScreen, ...message }) {
|
|
23
23
|
const { text, reactionCounts, pending, error, attachments, author } = message;
|
|
24
24
|
const deletingMessageIds = useDeletingIds('deleteMessage');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type MetaProps } from './attachments/image_attachment';
|
|
3
|
-
import { DenormalizedAttachmentResource, DenormalizedMessageAttachmentResource } from '
|
|
3
|
+
import { DenormalizedAttachmentResource, DenormalizedMessageAttachmentResource } from '../../types/resources/denormalized_attachment_resource';
|
|
4
4
|
export declare function MessageAttachments(props: {
|
|
5
5
|
attachments: DenormalizedAttachmentResource[];
|
|
6
6
|
metaProps: MetaProps;
|
|
@@ -6,7 +6,7 @@ import { GenericFileAttachment } from './attachments/generic_file_attachment';
|
|
|
6
6
|
import { GiphyAttachment } from './attachments/giphy_attachment';
|
|
7
7
|
import { ImageAttachment } from './attachments/image_attachment';
|
|
8
8
|
import { VideoAttachment } from './attachments/video_attachment';
|
|
9
|
-
import { useDeletingIds } from '
|
|
9
|
+
import { useDeletingIds } from '../../hooks';
|
|
10
10
|
export function MessageAttachments(props) {
|
|
11
11
|
const styles = useStyles();
|
|
12
12
|
const { attachments, metaProps, onMessageAttachmentLongPress, onMessageLongPress } = props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FileAttachment } from '
|
|
2
|
+
import { FileAttachment } from '../../../types/resources/denormalized_attachment_resource_for_create';
|
|
3
3
|
interface Props {
|
|
4
4
|
uri: string;
|
|
5
5
|
alt: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ImageAttachmentPreview } from '
|
|
2
|
+
import { ImageAttachmentPreview } from '../../../components/display';
|
|
3
3
|
export function MessageFormAttachmentImage({ uri, alt, status, removeAttachment }) {
|
|
4
4
|
const loading = status === 'uploading';
|
|
5
5
|
const error = status === 'error';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FileAttachment } from '
|
|
2
|
+
import { FileAttachment } from '../../../types/resources/denormalized_attachment_resource_for_create';
|
|
3
3
|
interface Props {
|
|
4
4
|
status: FileAttachment['status'];
|
|
5
5
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { VideoAttachmentPreview } from '
|
|
2
|
+
import { VideoAttachmentPreview } from '../../../components/display';
|
|
3
3
|
export function MessageFormAttachmentVideo({ name, status, removeAttachment }) {
|
|
4
4
|
const loading = status === 'uploading';
|
|
5
5
|
const error = status === 'error';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewProps } from 'react-native';
|
|
3
|
-
import { ConversationResource, MessageResource } from '
|
|
3
|
+
import { ConversationResource, MessageResource } from '../../types';
|
|
4
4
|
export declare const MessageForm: {
|
|
5
5
|
Root: typeof MessageFormRoot;
|
|
6
6
|
TextInput: typeof MessageFormInput;
|
|
@@ -4,18 +4,18 @@ import { Linking, Platform, Pressable, ScrollView, StyleSheet, TextInput, View,
|
|
|
4
4
|
import LinearGradient from 'react-native-linear-gradient';
|
|
5
5
|
import { MessageFormAttachmentImage } from './message_form/message_form_attachment_image';
|
|
6
6
|
import { MessageFormAttachmentVideo } from './message_form/message_form_attachment_video';
|
|
7
|
-
import { Heading, Icon, IconButton, Text, TextButton } from '
|
|
8
|
-
import { Button } from '
|
|
9
|
-
import BannerPrimitive from '
|
|
10
|
-
import { ChatContext } from '
|
|
11
|
-
import { useCreateAndroidRippleColor, useTheme, useInteractionGhostBackgroundColor, useScalableNumberOfLines, useFontScale, } from '
|
|
12
|
-
import { useAttachmentUploader } from '
|
|
13
|
-
import { useBroadcastTypingStatus } from '
|
|
14
|
-
import { useMessageCreateOrUpdate } from '
|
|
15
|
-
import { useMessageDraft } from '
|
|
16
|
-
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, platformFontWeightMedium, platformPressedOpacityStyle, } from '
|
|
17
|
-
import { Haptic, ImagePicker } from '
|
|
18
|
-
import { tokens } from '
|
|
7
|
+
import { Heading, Icon, IconButton, Text, TextButton } from '../../components';
|
|
8
|
+
import { Button } from '../../components/display/button';
|
|
9
|
+
import BannerPrimitive from '../../components/primitive/banner_primitive';
|
|
10
|
+
import { ChatContext } from '../../contexts/chat_context';
|
|
11
|
+
import { useCreateAndroidRippleColor, useTheme, useInteractionGhostBackgroundColor, useScalableNumberOfLines, useFontScale, } from '../../hooks';
|
|
12
|
+
import { useAttachmentUploader } from '../../hooks/use_attachment_uploader';
|
|
13
|
+
import { useBroadcastTypingStatus } from '../../hooks/use_broadcast_typing_status';
|
|
14
|
+
import { useMessageCreateOrUpdate } from '../../hooks/use_message_create_or_update';
|
|
15
|
+
import { useMessageDraft } from '../../hooks/use_message_draft';
|
|
16
|
+
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, platformFontWeightMedium, platformPressedOpacityStyle, } from '../../utils';
|
|
17
|
+
import { Haptic, ImagePicker } from '../../utils/native_adapters';
|
|
18
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
19
19
|
export const MessageForm = {
|
|
20
20
|
Root: MessageFormRoot,
|
|
21
21
|
TextInput: MessageFormInput,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
-
import { Text, TextInlineButton } from '
|
|
4
|
-
import { Linking } from '
|
|
5
|
-
import { parseSimpleMarkdown } from '
|
|
3
|
+
import { Text, TextInlineButton } from '../../components/display';
|
|
4
|
+
import { Linking } from '../../utils/native_adapters';
|
|
5
|
+
import { parseSimpleMarkdown } from '../../utils/parse_simple_markdown';
|
|
6
6
|
export function MessageMarkdown({ text }) {
|
|
7
7
|
if (!text)
|
|
8
8
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MessageResource } from '
|
|
3
|
-
import { ReactionCountResource } from '
|
|
2
|
+
import { MessageResource } from '../../types';
|
|
3
|
+
import { ReactionCountResource } from '../../types/resources/reaction';
|
|
4
4
|
export declare function MessageReaction({ reaction, onLongPress, message, conversationId, }: {
|
|
5
5
|
reaction: ReactionCountResource;
|
|
6
6
|
onLongPress: (_reaction: ReactionCountResource) => void;
|
|
@@ -2,12 +2,12 @@ import { PlatformPressable } from '@react-navigation/elements';
|
|
|
2
2
|
import colorFunction from 'color';
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { StyleSheet } from 'react-native';
|
|
5
|
-
import { Text } from '
|
|
6
|
-
import { useInteractionGhostBackgroundColor, useTheme } from '
|
|
7
|
-
import { useCreateAndroidRippleColor } from '
|
|
8
|
-
import { useMessageReactionToggle } from '
|
|
9
|
-
import { REACTION_EMOJIS } from '
|
|
10
|
-
import { Haptic } from '
|
|
5
|
+
import { Text } from '../../components/display';
|
|
6
|
+
import { useInteractionGhostBackgroundColor, useTheme } from '../../hooks';
|
|
7
|
+
import { useCreateAndroidRippleColor } from '../../hooks/use_create_android_ripple_color';
|
|
8
|
+
import { useMessageReactionToggle } from '../../hooks/use_message_reaction_toggle';
|
|
9
|
+
import { REACTION_EMOJIS } from '../../utils';
|
|
10
|
+
import { Haptic } from '../../utils/native_adapters';
|
|
11
11
|
export function MessageReaction({ reaction, onLongPress, message, conversationId, }) {
|
|
12
12
|
const styles = useReactionStyles(reaction);
|
|
13
13
|
const { handleReactionToggle } = useMessageReactionToggle({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Icon, Text } from '
|
|
4
|
-
import { useTheme } from '
|
|
3
|
+
import { Icon, Text } from '../../components/display';
|
|
4
|
+
import { useTheme } from '../../hooks';
|
|
5
5
|
export function MessageReadReceipts({ message, latestReadMessageSortKey }) {
|
|
6
6
|
const styles = useStyles();
|
|
7
7
|
if (!latestReadMessageSortKey || message.id > latestReadMessageSortKey) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet, View } from 'react-native';
|
|
2
2
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
|
-
import { Text } from '
|
|
4
|
-
import { useTheme } from '
|
|
3
|
+
import { Text } from '../../components/display';
|
|
4
|
+
import { useTheme } from '../../hooks';
|
|
5
5
|
export const LeaderMessagesDisabledBanner = () => {
|
|
6
6
|
return (<MessagesDisabledBanner description="Only leaders can send messages in this conversation."/>);
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet, View } from 'react-native';
|
|
2
2
|
import Svg, { Path } from 'react-native-svg';
|
|
3
|
-
import { useTheme } from '
|
|
4
|
-
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL, MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH, } from '
|
|
3
|
+
import { useTheme } from '../../hooks';
|
|
4
|
+
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL, MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH, } from '../../utils/styles';
|
|
5
5
|
const MY_REPLY_CONNECTOR_WIDTH = 38;
|
|
6
6
|
const CONNECTOR_BORDER_WIDTH = 4;
|
|
7
7
|
const OFFSET_CONNECTOR_CONTAINER = CONNECTOR_BORDER_WIDTH / 2; // Accounts for the border width ensuring the connectors are centered under the avatar
|
|
@@ -4,12 +4,12 @@ import React from 'react';
|
|
|
4
4
|
import { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
5
5
|
import Animated from 'react-native-reanimated';
|
|
6
6
|
import { TheirReplyConnector, MyReplyConnector } from './reply_connectors';
|
|
7
|
-
import { Avatar, Icon, Image, Text } from '
|
|
8
|
-
import { useAnimatedMessageBackgroundColor, useFontScale, useScalableNumberOfLines, useTheme, } from '
|
|
9
|
-
import { useConversationMessage } from '
|
|
10
|
-
import { useLiveRelativeTime } from '
|
|
11
|
-
import { assertKeysAreNumbers, pluralize } from '
|
|
12
|
-
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL, MAX_FONT_SIZE_MULTIPLIER, MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH, platformFontWeightMedium, } from '
|
|
7
|
+
import { Avatar, Icon, Image, Text } from '../../components/display';
|
|
8
|
+
import { useAnimatedMessageBackgroundColor, useFontScale, useScalableNumberOfLines, useTheme, } from '../../hooks';
|
|
9
|
+
import { useConversationMessage } from '../../hooks/use_conversation_message';
|
|
10
|
+
import { useLiveRelativeTime } from '../../hooks/use_live_relative_time';
|
|
11
|
+
import { assertKeysAreNumbers, pluralize } from '../../utils';
|
|
12
|
+
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL, MAX_FONT_SIZE_MULTIPLIER, MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH, platformFontWeightMedium, } from '../../utils/styles';
|
|
13
13
|
export function ReplyShadowMessage({ conversation_id, inReplyScreen, messageId, isReplyShadowMessage, nextRendersAuthor, }) {
|
|
14
14
|
const { message, isError, isLoading } = useConversationMessage({ conversation_id, messageId });
|
|
15
15
|
if (inReplyScreen)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { StyleSheet, View, Animated } from 'react-native';
|
|
3
|
-
import { Text } from '
|
|
4
|
-
import { useTheme } from '
|
|
5
|
-
import { useTypingIndicators, getTypingIndicatorText } from '
|
|
3
|
+
import { Text } from '../../components/display';
|
|
4
|
+
import { useTheme } from '../../hooks';
|
|
5
|
+
import { useTypingIndicators, getTypingIndicatorText } from '../../hooks/use_typing_indicators';
|
|
6
6
|
/**
|
|
7
7
|
* Animated dots to indicate typing
|
|
8
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { ConversationResource } from '
|
|
3
|
+
import { ConversationResource } from '../../types';
|
|
4
4
|
export declare function ConversationActions({ children, conversation, style, onPress, accessibilityLabel, }: {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
conversation: ConversationResource;
|
|
@@ -2,11 +2,11 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import { Platform, Pressable, StyleSheet, View, } from 'react-native';
|
|
3
3
|
import ReanimatedSwipeable from 'react-native-gesture-handler/ReanimatedSwipeable';
|
|
4
4
|
import { SwipeableToggleButton } from './swipeable_toggle_button';
|
|
5
|
-
import { useConversationsContext } from '
|
|
6
|
-
import { useTheme, useCreateAndroidRippleColor } from '
|
|
7
|
-
import { useConversationsMarkRead, useConversationsMute } from '
|
|
8
|
-
import { platformPressedOpacityStyle } from '
|
|
9
|
-
import { tokens } from '
|
|
5
|
+
import { useConversationsContext } from '../../contexts/conversations_context';
|
|
6
|
+
import { useTheme, useCreateAndroidRippleColor } from '../../hooks';
|
|
7
|
+
import { useConversationsMarkRead, useConversationsMute } from '../../hooks/use_conversations_actions';
|
|
8
|
+
import { platformPressedOpacityStyle } from '../../utils';
|
|
9
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
10
10
|
export function ConversationActions({ children, conversation, style, onPress, accessibilityLabel, }) {
|
|
11
11
|
const swipeableRef = useRef(null);
|
|
12
12
|
const styles = useStyles();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
-
import { ConversationResource } from '
|
|
3
|
+
import { ConversationResource } from '../../types';
|
|
4
4
|
interface ConversationPreviewProps {
|
|
5
5
|
conversation: ConversationResource;
|
|
6
6
|
onPress: () => void;
|
|
@@ -3,9 +3,9 @@ import { StyleSheet, View } from 'react-native';
|
|
|
3
3
|
import { ConversationActions } from './conversation_actions';
|
|
4
4
|
import { MuteIndicator } from './mute_indicator';
|
|
5
5
|
import { UnreadCountBadge } from './unread_count_badge';
|
|
6
|
-
import { AvatarGroup, Heading, Text, Badge } from '
|
|
7
|
-
import { useTheme, useAtFontScaleBreakpoint, useFontScale, useScalableNumberOfLines } from '
|
|
8
|
-
import { formatDatePreview } from '
|
|
6
|
+
import { AvatarGroup, Heading, Text, Badge } from '../../components/display';
|
|
7
|
+
import { useTheme, useAtFontScaleBreakpoint, useFontScale, useScalableNumberOfLines } from '../../hooks';
|
|
8
|
+
import { formatDatePreview } from '../../utils/date';
|
|
9
9
|
const EMPTY_CONVERSATION_PREVIEW_TEXT = 'Send your first message';
|
|
10
10
|
export const ConversationPreview = ({ conversation, onPress, showBadges = true, style, }) => {
|
|
11
11
|
const styles = useStyles();
|
|
@@ -2,11 +2,11 @@ import { useNavigation } from '@react-navigation/native';
|
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { FlatList, StyleSheet, View } from 'react-native';
|
|
4
4
|
import { ConversationPreview, ConversationPreviewSkeleton } from './conversation_preview';
|
|
5
|
-
import BlankState from '
|
|
6
|
-
import { useConversationsContext } from '
|
|
7
|
-
import { useTheme } from '
|
|
8
|
-
import { useConversationsJoltEvents } from '
|
|
9
|
-
import { throwResponseError } from '
|
|
5
|
+
import BlankState from '../../components/primitive/blank_state_primitive';
|
|
6
|
+
import { useConversationsContext } from '../../contexts/conversations_context';
|
|
7
|
+
import { useTheme } from '../../hooks';
|
|
8
|
+
import { useConversationsJoltEvents } from '../../hooks/use_conversations_jolt_events';
|
|
9
|
+
import { throwResponseError } from '../../utils/response_error';
|
|
10
10
|
export const Conversations = ({ ListHeaderComponent }) => {
|
|
11
11
|
const styles = useStyles();
|
|
12
12
|
const { conversations, isLoading, fetchNextPage, refetch, isRefetching, isFetched, isError, error, args: { chat_group_graph_id }, } = useConversationsContext();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
-
import { Icon } from '
|
|
4
|
-
import { useTheme } from '
|
|
5
|
-
import { MAX_FONT_SIZE_MULTIPLIER } from '
|
|
3
|
+
import { Icon } from '../../components/display';
|
|
4
|
+
import { useTheme } from '../../hooks';
|
|
5
|
+
import { MAX_FONT_SIZE_MULTIPLIER } from '../../utils';
|
|
6
6
|
export const MuteIndicator = ({ muted }) => {
|
|
7
7
|
const styles = useStyles();
|
|
8
8
|
if (!muted)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type PressableProps } from 'react-native-gesture-handler';
|
|
3
|
-
import { IconString } from '
|
|
3
|
+
import { IconString } from '../../components/display';
|
|
4
4
|
interface SwipeableToggleButtonProps extends PressableProps {
|
|
5
5
|
backgroundColor: string;
|
|
6
6
|
toggled: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
import { Pressable } from 'react-native-gesture-handler';
|
|
4
|
-
import { Icon, Spinner, Text } from '
|
|
5
|
-
import { useCreateAndroidRippleColor, useTheme } from '
|
|
6
|
-
import { Haptic } from '
|
|
7
|
-
import { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightMedium, platformPressedOpacityStyle, } from '
|
|
8
|
-
import { tokens } from '
|
|
4
|
+
import { Icon, Spinner, Text } from '../../components/display';
|
|
5
|
+
import { useCreateAndroidRippleColor, useTheme } from '../../hooks';
|
|
6
|
+
import { Haptic } from '../../utils/native_adapters/configuration';
|
|
7
|
+
import { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightMedium, platformPressedOpacityStyle, } from '../../utils/styles';
|
|
8
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
9
9
|
export function SwipeableToggleButton({ backgroundColor, onPress, toggleContent, disabled = false, toggled, loading = false, ...props }) {
|
|
10
10
|
const styles = useStyles({ backgroundColor, disabled });
|
|
11
11
|
const androidRippleColor = useCreateAndroidRippleColor({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Text } from '
|
|
4
|
-
import { useFontScale, useTheme } from '
|
|
5
|
-
import { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightBold } from '
|
|
3
|
+
import { Text } from '../../components/display';
|
|
4
|
+
import { useFontScale, useTheme } from '../../hooks';
|
|
5
|
+
import { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightBold } from '../../utils';
|
|
6
6
|
export const UnreadCountBadge = ({ count, showDot }) => {
|
|
7
7
|
const styles = useStyles();
|
|
8
8
|
const displayCount = count > 99 ? '99+' : count;
|