@planningcenter/chat-react-native 3.30.0-rc.0 → 3.30.0-rc.2
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_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +2 -2
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +4 -4
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +4 -4
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +5 -5
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +5 -5
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +8 -8
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +6 -6
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +3 -3
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts +1 -1
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +14 -14
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +1 -1
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +4 -4
- package/build/components/conversation/message_attachments.js.map +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.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +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.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +1 -1
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +13 -13
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.js +3 -3
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +2 -2
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +6 -6
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts +1 -1
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +2 -2
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +2 -2
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_connectors.d.ts +1 -1
- package/build/components/conversation/reply_connectors.d.ts.map +1 -1
- package/build/components/conversation/reply_connectors.js +2 -2
- package/build/components/conversation/reply_connectors.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +8 -8
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.js +3 -3
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +1 -1
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +5 -5
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +4 -4
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.js +5 -5
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/mute_indicator.js +3 -3
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +5 -5
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.js +3 -3
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +4 -4
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/avatar.d.ts +1 -1
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +1 -1
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +1 -1
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +1 -1
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +3 -3
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/banner.d.ts +1 -1
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +1 -1
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.js +1 -1
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +3 -3
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +1 -1
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +3 -3
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +3 -3
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +4 -4
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +5 -5
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +2 -2
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image.js +1 -1
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.js +4 -4
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/keyboard_view.js +1 -1
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/components/display/person.d.ts +1 -1
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +2 -2
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +3 -3
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/pressable_row.js +1 -1
- package/build/components/display/pressable_row.js.map +1 -1
- package/build/components/display/spinner.js +1 -1
- package/build/components/display/spinner.js.map +1 -1
- package/build/components/display/switch.js +1 -1
- package/build/components/display/switch.js.map +1 -1
- package/build/components/display/tabs.js +1 -1
- package/build/components/display/tabs.js.map +1 -1
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +2 -2
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_button.d.ts.map +1 -1
- package/build/components/display/text_button.js +2 -2
- package/build/components/display/text_button.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +3 -3
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +5 -5
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/utils/button_colors.js +1 -1
- package/build/components/display/utils/button_colors.js.map +1 -1
- package/build/components/display/utils/status_colors.js +1 -1
- package/build/components/display/utils/status_colors.js.map +1 -1
- package/build/components/display/video_attachment_preview.js +5 -5
- package/build/components/display/video_attachment_preview.js.map +1 -1
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +2 -2
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/components/page/error_boundary.d.ts.map +1 -1
- package/build/components/page/error_boundary.js +2 -2
- package/build/components/page/error_boundary.js.map +1 -1
- package/build/components/page/loading.js +1 -1
- package/build/components/page/loading.js.map +1 -1
- package/build/components/primitive/avatar_primitive.d.ts +2 -2
- package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
- package/build/components/primitive/avatar_primitive.js +5 -5
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.d.ts +2 -2
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +8 -8
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/blank_state_primitive.d.ts +1 -1
- package/build/components/primitive/blank_state_primitive.d.ts.map +1 -1
- package/build/components/primitive/blank_state_primitive.js +2 -2
- package/build/components/primitive/blank_state_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +2 -2
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +3 -3
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.js +1 -1
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.js +4 -4
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +6 -6
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +3 -3
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +1 -1
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts +3 -3
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +6 -6
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +7 -7
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.js +2 -2
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +2 -2
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts +2 -2
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts.map +1 -1
- package/build/hooks/services/use_find_or_create_services_conversation.js +3 -3
- package/build/hooks/services/use_find_or_create_services_conversation.js.map +1 -1
- package/build/hooks/services/use_services_team.d.ts +1 -1
- package/build/hooks/services/use_services_team.d.ts.map +1 -1
- package/build/hooks/services/use_services_team.js +1 -1
- package/build/hooks/services/use_services_team.js.map +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.d.ts.map +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.js +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.js.map +1 -1
- package/build/hooks/services/use_team_plans.d.ts +1 -1
- package/build/hooks/services/use_team_plans.js +2 -2
- package/build/hooks/services/use_team_plans.js.map +1 -1
- package/build/hooks/use_api.d.ts +2 -2
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_api_client.d.ts +1 -1
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js +3 -3
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_async_storage.js +1 -1
- package/build/hooks/use_async_storage.js.map +1 -1
- package/build/hooks/use_attachment_uploader.d.ts +1 -1
- package/build/hooks/use_attachment_uploader.d.ts.map +1 -1
- package/build/hooks/use_attachment_uploader.js +1 -1
- package/build/hooks/use_attachment_uploader.js.map +1 -1
- package/build/hooks/use_broadcast_typing_status.js +1 -1
- package/build/hooks/use_broadcast_typing_status.js.map +1 -1
- package/build/hooks/use_chat_permissions.d.ts +21 -21
- package/build/hooks/use_chat_permissions.d.ts.map +1 -1
- package/build/hooks/use_chat_permissions.js.map +1 -1
- package/build/hooks/use_conversation.d.ts +5 -5
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +4 -3
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +1 -1
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversation_membership.d.ts +1 -1
- package/build/hooks/use_conversation_membership.d.ts.map +1 -1
- package/build/hooks/use_conversation_membership.js +2 -2
- package/build/hooks/use_conversation_membership.js.map +1 -1
- package/build/hooks/use_conversation_message.d.ts +1 -1
- package/build/hooks/use_conversation_message.d.ts.map +1 -1
- package/build/hooks/use_conversation_message.js +1 -1
- package/build/hooks/use_conversation_message.js.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +3 -3
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +1 -1
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +8 -8
- package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
- package/build/hooks/use_conversations.d.ts +2 -2
- package/build/hooks/use_conversations.d.ts.map +1 -1
- package/build/hooks/use_conversations.js +1 -1
- package/build/hooks/use_conversations.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +19 -19
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.js +1 -1
- package/build/hooks/use_conversations_actions.js.map +1 -1
- package/build/hooks/use_conversations_cache.d.ts +2 -2
- package/build/hooks/use_conversations_cache.d.ts.map +1 -1
- package/build/hooks/use_conversations_cache.js +2 -2
- package/build/hooks/use_conversations_cache.js.map +1 -1
- package/build/hooks/use_conversations_jolt_events.js +2 -2
- package/build/hooks/use_conversations_jolt_events.js.map +1 -1
- package/build/hooks/use_create_android_ripple_color.js +1 -1
- package/build/hooks/use_create_android_ripple_color.js.map +1 -1
- package/build/hooks/use_current_person.d.ts +1 -1
- package/build/hooks/use_current_person.d.ts.map +1 -1
- package/build/hooks/use_current_person.js.map +1 -1
- package/build/hooks/use_features.d.ts +2 -2
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +2 -2
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_font_scale.js +1 -1
- package/build/hooks/use_font_scale.js.map +1 -1
- package/build/hooks/use_giphy.d.ts +1 -1
- package/build/hooks/use_giphy.d.ts.map +1 -1
- package/build/hooks/use_giphy.js +1 -1
- package/build/hooks/use_giphy.js.map +1 -1
- package/build/hooks/use_groups.d.ts +2 -2
- package/build/hooks/use_groups.d.ts.map +1 -1
- package/build/hooks/use_groups.js.map +1 -1
- package/build/hooks/use_groups_groups.d.ts +33 -33
- package/build/hooks/use_groups_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.js.map +1 -1
- package/build/hooks/use_interaction_ghost_color.js +1 -1
- package/build/hooks/use_interaction_ghost_color.js.map +1 -1
- package/build/hooks/use_jolt.js +2 -2
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_live_relative_time.d.ts +1 -1
- package/build/hooks/use_live_relative_time.d.ts.map +1 -1
- package/build/hooks/use_live_relative_time.js +2 -2
- package/build/hooks/use_live_relative_time.js.map +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_message_create_or_update.d.ts +2 -2
- package/build/hooks/use_message_create_or_update.d.ts.map +1 -1
- package/build/hooks/use_message_create_or_update.js +7 -7
- package/build/hooks/use_message_create_or_update.js.map +1 -1
- package/build/hooks/use_message_draft.d.ts +1 -1
- package/build/hooks/use_message_draft.d.ts.map +1 -1
- package/build/hooks/use_message_draft.js +1 -1
- package/build/hooks/use_message_draft.js.map +1 -1
- package/build/hooks/use_message_reaction_toggle.d.ts +2 -2
- package/build/hooks/use_message_reaction_toggle.d.ts.map +1 -1
- package/build/hooks/use_message_reaction_toggle.js +2 -2
- package/build/hooks/use_message_reaction_toggle.js.map +1 -1
- package/build/hooks/use_my_gender.js.map +1 -1
- package/build/hooks/use_organization.d.ts +5 -5
- package/build/hooks/use_organization.d.ts.map +1 -1
- package/build/hooks/use_organization.js.map +1 -1
- package/build/hooks/use_people_person.d.ts +1 -1
- package/build/hooks/use_people_person.d.ts.map +1 -1
- package/build/hooks/use_people_person.js.map +1 -1
- package/build/hooks/use_product_analytics.d.ts +1 -1
- package/build/hooks/use_product_analytics.d.ts.map +1 -1
- package/build/hooks/use_product_analytics.js +3 -3
- package/build/hooks/use_product_analytics.js.map +1 -1
- package/build/hooks/use_qualified_by_age.js +1 -1
- package/build/hooks/use_qualified_by_age.js.map +1 -1
- package/build/hooks/use_read_receipts.d.ts +2 -2
- package/build/hooks/use_read_receipts.d.ts.map +1 -1
- package/build/hooks/use_read_receipts.js.map +1 -1
- package/build/hooks/use_report_message.d.ts +1 -1
- package/build/hooks/use_report_message.d.ts.map +1 -1
- package/build/hooks/use_report_message.js +1 -1
- package/build/hooks/use_report_message.js.map +1 -1
- package/build/hooks/use_storage.d.ts +1 -1
- package/build/hooks/use_storage.d.ts.map +1 -1
- package/build/hooks/use_storage.js.map +1 -1
- package/build/hooks/use_submit_age_check.d.ts +1 -1
- package/build/hooks/use_submit_age_check.d.ts.map +1 -1
- package/build/hooks/use_submit_age_check.js +2 -2
- package/build/hooks/use_submit_age_check.js.map +1 -1
- package/build/hooks/use_suspense_api.d.ts +5 -5
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +2 -2
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/hooks/use_teams.d.ts +1 -1
- package/build/hooks/use_teams.d.ts.map +1 -1
- package/build/hooks/use_teams.js.map +1 -1
- package/build/hooks/use_theme.d.ts +1 -1
- package/build/hooks/use_theme.d.ts.map +1 -1
- package/build/hooks/use_theme.js +1 -1
- package/build/hooks/use_theme.js.map +1 -1
- package/build/hooks/use_typing_indicators.d.ts.map +1 -1
- package/build/hooks/use_typing_indicators.js +1 -1
- package/build/hooks/use_typing_indicators.js.map +1 -1
- package/build/hooks/use_typing_status_cache.d.ts +1 -1
- package/build/hooks/use_typing_status_cache.d.ts.map +1 -1
- package/build/hooks/use_typing_status_cache.js.map +1 -1
- package/build/hooks/use_upload_client.d.ts +1 -1
- package/build/hooks/use_upload_client.d.ts.map +1 -1
- package/build/hooks/use_upload_client.js +3 -3
- package/build/hooks/use_upload_client.js.map +1 -1
- package/build/navigation/chat_access_gate.js +7 -7
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +25 -25
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +28 -28
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.js +2 -2
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/Event.js +1 -1
- package/build/polyfills/events/Event.js.map +1 -1
- package/build/polyfills/events/EventTarget.js +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/polyfills/events/internals/EventInternals.d.ts +2 -2
- package/build/polyfills/events/internals/EventInternals.d.ts.map +1 -1
- package/build/polyfills/events/internals/EventInternals.js.map +1 -1
- package/build/polyfills/events/internals/EventTargetInternals.d.ts +2 -2
- package/build/polyfills/events/internals/EventTargetInternals.d.ts.map +1 -1
- package/build/polyfills/events/internals/EventTargetInternals.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +9 -9
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +4 -4
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +4 -4
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +4 -4
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +13 -13
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +5 -5
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +37 -9
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +4 -4
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +5 -5
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +6 -6
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- 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.d.ts.map +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_flattened_array_of_service_types_with_teams.js.map +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.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js +2 -2
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js.map +1 -1
- package/build/screens/conversation_filter_recipients/types.d.ts +2 -2
- package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/types.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +5 -5
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +4 -4
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +5 -5
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -2
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +2 -2
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +54 -54
- package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.js +3 -3
- package/build/screens/conversation_filters/hooks/filters.js.map +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_filters/screen_props.js.map +1 -1
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +1 -1
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.js +2 -2
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +8 -8
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +2 -2
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +3 -3
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +10 -10
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +10 -10
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +3 -3
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +5 -5
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +3 -3
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +21 -21
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -4
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -2
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +4 -4
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -2
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +3 -3
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +3 -3
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.js +2 -2
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +4 -4
- package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +9 -9
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +2 -2
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +3 -3
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.js +6 -6
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.js +4 -4
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.js +3 -3
- package/build/screens/group_notification_level_select_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.js +3 -3
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.js +10 -10
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +1 -1
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -2
- package/build/screens/message_report/components/message_preview.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
- package/build/screens/message_report/components/report_reason_list.js +5 -5
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +2 -2
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +8 -8
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +1 -1
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +7 -7
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/notification_settings/hooks/groups.js +4 -4
- package/build/screens/notification_settings/hooks/groups.js.map +1 -1
- package/build/screens/notification_settings_screen.js +4 -4
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts +5 -5
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts.map +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.js +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts.map +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/reactions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.js +8 -8
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.js +3 -3
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/types/jolt_events/message_events.d.ts +1 -1
- package/build/types/jolt_events/message_events.d.ts.map +1 -1
- package/build/types/jolt_events/message_events.js.map +1 -1
- package/build/types/jolt_events/reaction_events.d.ts +1 -1
- package/build/types/jolt_events/reaction_events.d.ts.map +1 -1
- package/build/types/jolt_events/reaction_events.js.map +1 -1
- package/build/types/resources/app_grant.d.ts +1 -1
- package/build/types/resources/app_grant.d.ts.map +1 -1
- package/build/types/resources/app_grant.js.map +1 -1
- package/build/types/resources/conversation.d.ts +1 -0
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/types/resources/conversation_membership.d.ts +1 -1
- package/build/types/resources/conversation_membership.d.ts.map +1 -1
- package/build/types/resources/conversation_membership.js.map +1 -1
- package/build/types/resources/group_membership.d.ts +1 -1
- package/build/types/resources/group_membership.d.ts.map +1 -1
- package/build/types/resources/group_membership.js.map +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
- package/build/types/resources/groups/groups_group_resource.js.map +1 -1
- package/build/types/resources/organization.d.ts +1 -1
- package/build/types/resources/organization.d.ts.map +1 -1
- package/build/types/resources/organization.js.map +1 -1
- package/build/types/resources/person.d.ts +1 -1
- package/build/types/resources/person.d.ts.map +1 -1
- package/build/types/resources/person.js.map +1 -1
- package/build/types/resources/services/chat_resource.d.ts +1 -1
- package/build/types/resources/services/chat_resource.d.ts.map +1 -1
- package/build/types/resources/services/chat_resource.js.map +1 -1
- package/build/types/resources/services/team_resource.d.ts +1 -1
- package/build/types/resources/services/team_resource.d.ts.map +1 -1
- package/build/types/resources/services/team_resource.js.map +1 -1
- package/build/utils/cache/messages_cache.d.ts +3 -3
- package/build/utils/cache/messages_cache.d.ts.map +1 -1
- package/build/utils/cache/messages_cache.js +4 -4
- package/build/utils/cache/messages_cache.js.map +1 -1
- package/build/utils/cache/optimistically_create_message.d.ts +2 -2
- package/build/utils/cache/optimistically_create_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_create_message.js +4 -4
- package/build/utils/cache/optimistically_create_message.js.map +1 -1
- package/build/utils/cache/optimistically_update_message.d.ts +1 -1
- package/build/utils/cache/optimistically_update_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_update_message.js +2 -2
- package/build/utils/cache/optimistically_update_message.js.map +1 -1
- package/build/utils/cache/page_mutations.d.ts +5 -5
- package/build/utils/cache/page_mutations.d.ts.map +1 -1
- package/build/utils/cache/page_mutations.js.map +1 -1
- package/build/utils/client/client.d.ts +1 -1
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/client/transform_request_data.d.ts.map +1 -1
- package/build/utils/client/transform_request_data.js.map +1 -1
- package/build/utils/convert_attachments_for_create.d.ts +2 -2
- package/build/utils/convert_attachments_for_create.d.ts.map +1 -1
- package/build/utils/convert_attachments_for_create.js.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.d.ts +2 -2
- package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.js.map +1 -1
- 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.d.ts.map +1 -1
- package/build/utils/jolt/transform_message_event_data_to_message_resource.js +1 -1
- package/build/utils/jolt/transform_message_event_data_to_message_resource.js.map +1 -1
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts +3 -3
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts.map +1 -1
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.js.map +1 -1
- package/build/utils/native_adapters/configuration.d.ts +3 -3
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +5 -5
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/performance_tracking.d.ts +1 -1
- package/build/utils/performance_tracking.d.ts.map +1 -1
- package/build/utils/performance_tracking.js +1 -1
- package/build/utils/performance_tracking.js.map +1 -1
- package/build/utils/reaction_constants.d.ts +1 -1
- package/build/utils/reaction_constants.d.ts.map +1 -1
- package/build/utils/reaction_constants.js.map +1 -1
- package/build/utils/request/conversation.d.ts +2 -2
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/request/get_features.d.ts +1 -1
- package/build/utils/request/get_features.d.ts.map +1 -1
- package/build/utils/request/get_features.js +1 -1
- package/build/utils/request/get_features.js.map +1 -1
- package/build/utils/request/get_message.d.ts +1 -1
- package/build/utils/request/get_message.d.ts.map +1 -1
- package/build/utils/request/get_message.js +1 -1
- package/build/utils/request/get_message.js.map +1 -1
- package/build/utils/request/get_messages.d.ts +1 -1
- package/build/utils/request/get_messages.d.ts.map +1 -1
- package/build/utils/request/get_messages.js +1 -1
- package/build/utils/request/get_messages.js.map +1 -1
- package/build/utils/response_error.d.ts +1 -1
- package/build/utils/response_error.d.ts.map +1 -1
- package/build/utils/response_error.js.map +1 -1
- package/build/utils/session.d.ts +1 -1
- package/build/utils/session.d.ts.map +1 -1
- package/build/utils/session.js.map +1 -1
- package/build/utils/session_manager.d.ts +1 -1
- package/build/utils/session_manager.d.ts.map +1 -1
- package/build/utils/session_manager.js.map +1 -1
- package/build/utils/styles.js +1 -1
- package/build/utils/styles.js.map +1 -1
- package/build/utils/theme.d.ts +1 -1
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +2 -2
- package/build/utils/theme.js.map +1 -1
- package/package.json +3 -2
- package/src/__tests__/contexts/session_context.tsx +7 -7
- package/src/__tests__/event-polyfill.test.ts +3 -4
- package/src/__tests__/hooks/useTheme.tsx +3 -3
- package/src/__tests__/hooks/use_async_storage.test.tsx +3 -3
- package/src/__tests__/hooks/use_conversation_messages.ts +2 -2
- package/src/__tests__/hooks/use_font_scale.test.ts +1 -1
- package/src/__tests__/utils/cache/page_mutations.ts +1 -1
- package/src/__tests__/utils/client.ts +5 -5
- package/src/__tests__/utils/native_adapters/configuration.ts +4 -4
- package/src/__tests__/utils/parse_simple_markdown.ts +1 -1
- package/src/__tests__/utils/pluralize.tsx +1 -1
- package/src/__tests__/utils/session.ts +2 -2
- package/src/__tests__/utils/uri.ts +1 -1
- package/src/__utils__/handlers.ts +1 -1
- package/src/components/conversation/attachments/attachment_card.tsx +3 -3
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +2 -2
- package/src/components/conversation/attachments/audio_attachment.tsx +5 -5
- package/src/components/conversation/attachments/expanded_link.tsx +5 -5
- package/src/components/conversation/attachments/generic_file_attachment.tsx +6 -6
- package/src/components/conversation/attachments/giphy_attachment.tsx +6 -6
- package/src/components/conversation/attachments/image_attachment.tsx +9 -9
- package/src/components/conversation/attachments/video_attachment.tsx +7 -7
- package/src/components/conversation/empty_conversation_blank_state.tsx +1 -1
- package/src/components/conversation/jump_to_bottom_button.tsx +3 -3
- package/src/components/conversation/message.tsx +21 -21
- package/src/components/conversation/message_attachments.tsx +8 -8
- package/src/components/conversation/message_form/message_form_attachment_image.tsx +2 -2
- package/src/components/conversation/message_form/message_form_attachment_video.tsx +2 -2
- package/src/components/conversation/message_form.tsx +21 -23
- package/src/components/conversation/message_markdown.tsx +3 -3
- package/src/components/conversation/message_reaction.tsx +8 -8
- package/src/components/conversation/message_read_receipts.tsx +3 -3
- package/src/components/conversation/messages_disabled_banners.tsx +2 -2
- package/src/components/conversation/reply_connectors.tsx +3 -3
- package/src/components/conversation/reply_shadow_message.tsx +12 -12
- package/src/components/conversation/typing_indicator.tsx +3 -3
- package/src/components/conversations/conversation_actions.tsx +6 -9
- package/src/components/conversations/conversation_preview.tsx +5 -10
- package/src/components/conversations/conversations.tsx +6 -6
- package/src/components/conversations/mute_indicator.tsx +3 -3
- package/src/components/conversations/swipeable_toggle_button.tsx +5 -5
- package/src/components/conversations/unread_count_badge.tsx +3 -3
- package/src/components/display/action_button.tsx +5 -5
- package/src/components/display/avatar.tsx +2 -2
- package/src/components/display/avatar_group.tsx +2 -2
- package/src/components/display/badge.tsx +3 -3
- package/src/components/display/banner.tsx +2 -2
- package/src/components/display/banner_collapsible.tsx +1 -1
- package/src/components/display/button.tsx +3 -3
- package/src/components/display/child_notice.tsx +4 -4
- package/src/components/display/heading.tsx +3 -3
- package/src/components/display/icon.tsx +7 -8
- package/src/components/display/icon_button.tsx +2 -2
- package/src/components/display/image.tsx +1 -1
- package/src/components/display/image_attachment_preview.tsx +4 -4
- package/src/components/display/keyboard_view.tsx +1 -1
- package/src/components/display/person.tsx +3 -3
- package/src/components/display/platform_modal_header_buttons.tsx +4 -4
- package/src/components/display/pressable_row.tsx +1 -1
- package/src/components/display/spinner.tsx +1 -1
- package/src/components/display/switch.tsx +1 -1
- package/src/components/display/tabs.tsx +1 -1
- package/src/components/display/text.tsx +2 -2
- package/src/components/display/text_button.tsx +2 -2
- package/src/components/display/text_inline_button.tsx +3 -3
- package/src/components/display/toggle_button.tsx +5 -5
- package/src/components/display/utils/button_colors.ts +1 -1
- package/src/components/display/utils/status_colors.ts +1 -1
- package/src/components/display/video_attachment_preview.tsx +5 -5
- package/src/components/group_conversation_list.tsx +3 -3
- package/src/components/page/error_boundary.tsx +2 -2
- package/src/components/page/loading.tsx +1 -1
- package/src/components/primitive/avatar_primitive.tsx +5 -5
- package/src/components/primitive/banner_primitive.tsx +8 -8
- package/src/components/primitive/blank_state_primitive.tsx +2 -2
- package/src/components/primitive/form_sheet.tsx +4 -4
- package/src/components/safe_area_modal.tsx +1 -1
- package/src/contexts/api_provider.tsx +4 -4
- package/src/contexts/chat_context.tsx +7 -7
- package/src/contexts/conversations_context.tsx +4 -4
- package/src/contexts/session_context.tsx +9 -9
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +4 -4
- package/src/hooks/groups/use_groups_conversation_create.ts +3 -3
- package/src/hooks/services/use_find_or_create_services_conversation.ts +4 -4
- package/src/hooks/services/use_services_team.ts +2 -2
- package/src/hooks/services/use_team_members_for_new_conversation.ts +2 -2
- package/src/hooks/services/use_team_plans.ts +3 -3
- package/src/hooks/use_api.ts +2 -2
- package/src/hooks/use_api_client.ts +3 -3
- package/src/hooks/use_async_storage.ts +1 -1
- package/src/hooks/use_attachment_uploader.ts +3 -3
- package/src/hooks/use_broadcast_typing_status.ts +1 -1
- package/src/hooks/use_chat_permissions.ts +1 -1
- package/src/hooks/use_conversation.ts +5 -4
- package/src/hooks/use_conversation_jolt_events.ts +3 -3
- package/src/hooks/use_conversation_membership.ts +3 -3
- package/src/hooks/use_conversation_message.ts +2 -2
- package/src/hooks/use_conversation_messages.ts +2 -2
- package/src/hooks/use_conversation_messages_jolt_events.ts +14 -14
- package/src/hooks/use_conversations.ts +2 -2
- package/src/hooks/use_conversations_actions.ts +2 -2
- package/src/hooks/use_conversations_cache.ts +5 -5
- package/src/hooks/use_conversations_jolt_events.ts +4 -4
- package/src/hooks/use_create_android_ripple_color.ts +1 -1
- package/src/hooks/use_current_person.ts +2 -2
- package/src/hooks/use_features.ts +4 -4
- package/src/hooks/use_font_scale.ts +1 -1
- package/src/hooks/use_giphy.ts +2 -2
- package/src/hooks/use_groups.ts +2 -2
- package/src/hooks/use_groups_groups.ts +1 -1
- package/src/hooks/use_interaction_ghost_color.ts +1 -1
- package/src/hooks/use_jolt.ts +3 -3
- package/src/hooks/use_live_relative_time.ts +2 -2
- package/src/hooks/use_mark_latest_message_read.ts +1 -1
- package/src/hooks/use_message_create_or_update.ts +10 -10
- package/src/hooks/use_message_draft.ts +2 -2
- package/src/hooks/use_message_reaction_toggle.ts +4 -4
- package/src/hooks/use_my_gender.ts +1 -1
- package/src/hooks/use_organization.ts +2 -2
- package/src/hooks/use_people_person.ts +1 -1
- package/src/hooks/use_product_analytics.ts +5 -5
- package/src/hooks/use_qualified_by_age.ts +1 -1
- package/src/hooks/use_read_receipts.ts +1 -1
- package/src/hooks/use_report_message.ts +2 -2
- package/src/hooks/use_storage.ts +1 -1
- package/src/hooks/use_submit_age_check.ts +3 -3
- package/src/hooks/use_suspense_api.ts +5 -5
- package/src/hooks/use_teams.ts +1 -1
- package/src/hooks/use_theme.tsx +2 -2
- package/src/hooks/use_typing_indicators.ts +2 -2
- package/src/hooks/use_typing_status_cache.ts +1 -1
- package/src/hooks/use_upload_client.ts +3 -3
- package/src/navigation/chat_access_gate.tsx +7 -7
- package/src/navigation/index.tsx +34 -37
- package/src/navigation/screenLayout.tsx +2 -2
- package/src/polyfills/events/Event.ts +1 -1
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/polyfills/events/internals/EventInternals.ts +2 -2
- package/src/polyfills/events/internals/EventTargetInternals.ts +2 -2
- package/src/screens/age_check/age_check_required_screen.tsx +9 -9
- package/src/screens/age_check/age_check_underage_screen.tsx +4 -4
- package/src/screens/age_check/components/age_check_select_birthdate_modal.tsx +4 -4
- package/src/screens/attachment_actions/attachment_actions_screen.tsx +1 -1
- package/src/screens/attachment_actions/hooks/useDeleteAttachment.tsx +4 -4
- package/src/screens/bug_report_screen.tsx +18 -18
- package/src/screens/conversation/message_read_receipts_screen.tsx +6 -6
- package/src/screens/conversation_details_screen.tsx +47 -13
- package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +9 -5
- package/src/screens/conversation_filter_recipients/components/header_row.tsx +6 -6
- package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +6 -6
- package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx +5 -1
- package/src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts +6 -3
- package/src/screens/conversation_filter_recipients/types.tsx +2 -2
- package/src/screens/conversation_filters/components/conversation_filters.tsx +8 -5
- package/src/screens/conversation_filters/components/rows.tsx +9 -14
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +6 -3
- package/src/screens/conversation_filters/group_filters.tsx +4 -4
- package/src/screens/conversation_filters/hooks/filters.ts +5 -5
- package/src/screens/conversation_filters/screen_props.ts +1 -1
- package/src/screens/conversation_filters/team_filters.tsx +1 -1
- package/src/screens/conversation_filters_screen.tsx +2 -2
- package/src/screens/conversation_new/components/filter_by_plan.tsx +8 -8
- package/src/screens/conversation_new/components/form_list.tsx +3 -3
- package/src/screens/conversation_new/components/gender_filter_toggle.tsx +3 -3
- package/src/screens/conversation_new/components/groups_form.tsx +14 -14
- package/src/screens/conversation_new/components/services_form.tsx +12 -12
- package/src/screens/conversation_new/components/source_app_error_card.tsx +1 -1
- package/src/screens/conversation_new/conversation_new_screen.tsx +3 -3
- package/src/screens/conversation_notification_level_select_screen.tsx +6 -6
- package/src/screens/conversation_screen.tsx +23 -23
- package/src/screens/conversation_select_recipients/components/groups_recipient_row.tsx +2 -2
- package/src/screens/conversation_select_recipients/components/recipient_link_row.tsx +3 -3
- package/src/screens/conversation_select_recipients/components/restricted_group_row.tsx +4 -4
- package/src/screens/conversation_select_recipients/components/team_recipient_row.tsx +2 -2
- package/src/screens/conversation_select_recipients/components/view_more_link_row.tsx +1 -1
- package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -4
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +4 -4
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +8 -5
- package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -2
- package/src/screens/conversation_select_type_screen.tsx +5 -5
- package/src/screens/conversations/components/chat_group_badge.tsx +4 -4
- package/src/screens/conversations/components/list_header_action_button.tsx +4 -4
- package/src/screens/conversations/components/list_header_component.tsx +10 -10
- package/src/screens/conversations/conversations_screen.tsx +5 -5
- package/src/screens/design_system_screen.tsx +6 -6
- package/src/screens/get_help_screen.tsx +5 -5
- package/src/screens/group_notification_level_select_screen.tsx +3 -3
- package/src/screens/group_notification_settings_screen.tsx +4 -4
- package/src/screens/message_actions_screen.tsx +12 -12
- package/src/screens/message_report/components/message_preview.tsx +3 -3
- package/src/screens/message_report/components/report_reason_list.tsx +5 -8
- package/src/screens/message_report_screen.tsx +15 -15
- package/src/screens/not_found.tsx +1 -1
- package/src/screens/notification_settings/hooks/groups.ts +6 -6
- package/src/screens/notification_settings_screen.tsx +4 -4
- package/src/screens/preferred_app/hooks/use_chat_types.ts +2 -2
- package/src/screens/preferred_app_selection_screen.tsx +7 -7
- package/src/screens/reactions_screen.tsx +9 -9
- package/src/screens/send_giphy_screen.tsx +8 -8
- package/src/screens/team_conversation_screen.tsx +3 -3
- package/src/types/jolt_events/message_events.ts +1 -1
- package/src/types/jolt_events/reaction_events.ts +1 -1
- package/src/types/resources/app_grant.ts +1 -1
- package/src/types/resources/conversation.ts +1 -0
- package/src/types/resources/conversation_membership.ts +1 -1
- package/src/types/resources/group_membership.ts +1 -1
- package/src/types/resources/groups/groups_group_resource.ts +1 -1
- package/src/types/resources/organization.ts +1 -1
- package/src/types/resources/person.ts +1 -1
- package/src/types/resources/services/chat_resource.ts +1 -1
- package/src/types/resources/services/team_resource.ts +1 -1
- package/src/utils/__tests__/convert_attachments_for_create.test.ts +3 -3
- package/src/utils/__tests__/session_manager.test.ts +3 -3
- package/src/utils/__tests__/sha_256.test.ts +1 -1
- package/src/utils/cache/messages_cache.ts +6 -6
- package/src/utils/cache/optimistically_create_message.ts +7 -7
- package/src/utils/cache/optimistically_update_message.ts +3 -3
- package/src/utils/cache/page_mutations.ts +1 -1
- package/src/utils/client/client.ts +1 -2
- package/src/utils/client/transform_request_data.ts +1 -1
- package/src/utils/convert_attachments_for_create.ts +2 -2
- package/src/utils/destructure_chat_group_graph_id.ts +2 -2
- package/src/utils/jolt/transform_message_event_data_to_message_resource.ts +4 -4
- package/src/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.ts +3 -3
- package/src/utils/native_adapters/configuration.ts +5 -5
- package/src/utils/performance_tracking.ts +2 -2
- package/src/utils/reaction_constants.ts +1 -1
- package/src/utils/request/conversation.ts +2 -2
- package/src/utils/request/get_features.ts +1 -1
- package/src/utils/request/get_message.ts +1 -1
- package/src/utils/request/get_messages.ts +1 -1
- package/src/utils/response_error.ts +1 -1
- package/src/utils/session.ts +1 -1
- package/src/utils/session_manager.ts +1 -1
- package/src/utils/styles.ts +1 -1
- package/src/utils/theme.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_markdown.js","sourceRoot":"","sources":["../../../src/components/conversation/message_markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"message_markdown.js","sourceRoot":"","sources":["../../../src/components/conversation/message_markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AAMnE,MAAM,UAAU,eAAe,CAAC,EAAE,IAAI,EAAS;IAC7C,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAEtB,sEAAsE;IACtE,IAAI,IAAI,CAAC,MAAM,GAAG,IAAI;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC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I,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE;IAC5B,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE;CAChC,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet } from 'react-native'\nimport { Text, TextInlineButton } from '@/components/display'\nimport { Linking } from '@/utils/native_adapters'\nimport { parseSimpleMarkdown } from '@/utils/parse_simple_markdown'\n\ninterface Props {\n text: string\n}\n\nexport function MessageMarkdown({ text }: Props) {\n if (!text) return null\n\n // Skip markdown for excessively long messages for performance reasons\n if (text.length > 5000) return <Text>{text}</Text>\n\n const parsed = parseSimpleMarkdown(text)\n\n return (\n <Text>\n {parsed.map((part, i) => {\n switch (part.type) {\n case 'bold':\n return (\n <Text key={i} style={styles.bold}>\n {part.content}\n </Text>\n )\n case 'italic':\n return (\n <Text key={i} style={styles.italic}>\n {part.content}\n </Text>\n )\n case 'link':\n return (\n <TextInlineButton\n key={i}\n onPress={() => Linking.openURL(part.content)}\n accessibilityRole=\"link\"\n accessibilityHint=\"Opens browser\"\n >\n {part.content}\n </TextInlineButton>\n )\n default:\n return <Text key={i}>{part.content}</Text>\n }\n })}\n </Text>\n )\n}\n\nconst styles = StyleSheet.create({\n bold: { fontWeight: 'bold' },\n italic: { fontStyle: 'italic' },\n})\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_reaction.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_reaction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"message_reaction.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_reaction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAMtC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAIlE,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAW,EACX,OAAO,EACP,cAAc,GACf,EAAE;IACD,QAAQ,EAAE,qBAAqB,CAAA;IAC/B,WAAW,EAAE,CAAC,SAAS,EAAE,qBAAqB,KAAK,IAAI,CAAA;IACvD,OAAO,EAAE,eAAe,CAAA;IACxB,cAAc,EAAE,MAAM,CAAA;CACvB,4BA+BA;AAED,eAAO,MAAM,iBAAiB,aAAc;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;CA0B3D,CAAA"}
|
|
@@ -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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_reaction.js","sourceRoot":"","sources":["../../../src/components/conversation/message_reaction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,aAAa,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"message_reaction.js","sourceRoot":"","sources":["../../../src/components/conversation/message_reaction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,aAAa,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,kCAAkC,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAA;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AAG9E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,MAAM,UAAU,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAW,EACX,OAAO,EACP,cAAc,GAMf;IACC,MAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IAC1C,MAAM,EAAE,oBAAoB,EAAE,GAAG,wBAAwB,CAAC;QACxD,eAAe,EAAE,cAAc;QAC/B,OAAO;KACR,CAAC,CAAA;IAEF,MA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, { useMemo } from 'react'\nimport { StyleSheet } from 'react-native'\nimport { Text } from '@/components/display'\nimport { useInteractionGhostBackgroundColor, useTheme } from '@/hooks'\nimport { useCreateAndroidRippleColor } from '@/hooks/use_create_android_ripple_color'\nimport { useMessageReactionToggle } from '@/hooks/use_message_reaction_toggle'\nimport { MessageResource } from '@/types'\nimport { ReactionCountResource } from '@/types/resources/reaction'\nimport { REACTION_EMOJIS } from '@/utils'\nimport { Haptic } from '@/utils/native_adapters'\n\nexport function MessageReaction({\n reaction,\n onLongPress,\n message,\n conversationId,\n}: {\n reaction: ReactionCountResource\n onLongPress: (_reaction: ReactionCountResource) => void\n message: MessageResource\n conversationId: number\n}) {\n const styles = useReactionStyles(reaction)\n const { handleReactionToggle } = useMessageReactionToggle({\n conversation_id: conversationId,\n message,\n })\n\n const { colors } = useTheme()\n const baseRippleColor = reaction.mine ? colors.interaction : colors.fillColorNeutral060\n const androidRippleColor = useCreateAndroidRippleColor({ color: baseRippleColor })\n\n if (!reaction.count) return null\n if (!REACTION_EMOJIS[reaction.value]) return null\n\n const handlePress = () => {\n Haptic.impactLight()\n handleReactionToggle({ value: reaction.value, mine: !!reaction.mine })\n }\n\n return (\n <PlatformPressable\n key={reaction.value}\n style={styles.reaction}\n onLongPress={() => onLongPress(reaction)}\n onPress={handlePress}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n >\n <Text style={styles.reactionEmoji}>{REACTION_EMOJIS[reaction.value]}</Text>\n <Text style={styles.reactionText}>{reaction.count}</Text>\n </PlatformPressable>\n )\n}\n\nexport const useReactionStyles = ({ mine }: { mine: number }) => {\n const { colors } = useTheme()\n const activeBorderColor = useMemo(() => {\n return colorFunction(colors.interaction)\n .hsl()\n .lightness(colors.name === 'dark' ? 20 : 80)\n .string()\n }, [colors.interaction, colors.name])\n const activeBackgroundColor = useInteractionGhostBackgroundColor()\n\n return StyleSheet.create({\n reaction: {\n borderWidth: 1,\n borderColor: mine ? activeBorderColor : 'transparent',\n backgroundColor: mine ? activeBackgroundColor : colors.fillColorNeutral060,\n borderRadius: 16,\n overflow: 'hidden',\n paddingVertical: 4,\n paddingHorizontal: 8,\n flexDirection: 'row',\n alignItems: 'center',\n gap: 2,\n },\n reactionEmoji: { fontSize: 12, paddingTop: 0 },\n reactionText: { fontSize: 12, color: colors.textColorDefaultPrimary },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_read_receipts.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_read_receipts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"message_read_receipts.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/message_read_receipts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,UAAU,KAAK;IACb,OAAO,EAAE,eAAe,CAAA;IACxB,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC;AAED,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAE,EAAE,KAAK,qBAqB/E"}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_read_receipts.js","sourceRoot":"","sources":["../../../src/components/conversation/message_read_receipts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"message_read_receipts.js","sourceRoot":"","sources":["../../../src/components/conversation/message_read_receipts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAQlC,MAAM,UAAU,mBAAmB,CAAC,EAAE,OAAO,EAAE,wBAAwB,EAAS;IAC9E,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,IAAI,CAAC,wBAAwB,IAAI,OAAO,CAAC,EAAE,GAAG,wBAAwB,EAAE,CAAC;QACvE,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CACjC;QAAA,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAC9C;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,CAC/C;;QACF,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CAAC,CACR,CAAA;IACH,CAAC;IAED,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CACjC;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EACpD;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,CAC/C;;MACF,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,cAAc,EAAE;YACd,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,SAAS,EAAE;YACT,UAAU,EAAE,KAAK;SAClB;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { Icon, Text } from '@/components/display'\nimport { useTheme } from '@/hooks'\nimport { MessageResource } from '@/types'\n\ninterface Props {\n message: MessageResource\n latestReadMessageSortKey?: string\n}\n\nexport function MessageReadReceipts({ message, latestReadMessageSortKey }: Props) {\n const styles = useStyles()\n if (!latestReadMessageSortKey || message.id > latestReadMessageSortKey) {\n return (\n <View style={styles.badgeContainer}>\n <Icon name=\"general.check\" style={styles.icon} />\n <Text style={styles.badgeText} variant=\"footnote\">\n Sent\n </Text>\n </View>\n )\n }\n\n return (\n <View style={styles.badgeContainer}>\n <Icon name=\"general.checkDouble\" style={styles.icon} />\n <Text style={styles.badgeText} variant=\"footnote\">\n Read\n </Text>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n badgeContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n badgeText: {\n fontWeight: '600',\n },\n icon: {\n color: colors.iconColorDefaultSecondary,\n },\n })\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet, View } from 'react-native';
|
|
2
|
-
import { useTheme } from '../../hooks';
|
|
3
|
-
import { Text } from '../display';
|
|
4
2
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages_disabled_banners.js","sourceRoot":"","sources":["../../../src/components/conversation/messages_disabled_banners.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"messages_disabled_banners.js","sourceRoot":"","sources":["../../../src/components/conversation/messages_disabled_banners.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAElC,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,EAAE;IAC/C,OAAO,CACL,CAAC,sBAAsB,CAAC,WAAW,CAAC,sDAAsD,EAAG,CAC9F,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,EAAE;IAC/C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,CAAC,sBAAsB,CACrB,WAAW,CAAC,kEAAkE,CAC9E,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,EAC3B,CACH,CAAA;AACH,CAAC,CAAA;AAOD,MAAM,sBAAsB,GAAG,CAAC,EAAE,WAAW,EAAE,KAAK,EAA+B,EAAE,EAAE;IACrF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CACtC;MAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,CAC1C;QAAA,CAAC,WAAW,CACd;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,UAAU,EAAE;YACV,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,CAAC;YAClB,eAAe,EAAE,MAAM,CAAC,+BAA+B;YACvD,cAAc,EAAE,CAAC;YACjB,cAAc,EAAE,MAAM,CAAC,sBAAsB;SAC9C;QACD,IAAI,EAAE;YACJ,SAAS,EAAE,QAAQ;SACpB;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE,GAAG,MAAM;YAC1B,YAAY,EAAE,CAAC,MAAM;SACtB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StyleSheet, View, type ViewStyle } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Text } from '@/components/display'\nimport { useTheme } from '@/hooks'\n\nexport const LeaderMessagesDisabledBanner = () => {\n return (\n <MessagesDisabledBanner description=\"Only leaders can send messages in this conversation.\" />\n )\n}\n\nexport const MemberMessagesDisabledBanner = () => {\n const styles = useStyles()\n\n return (\n <MessagesDisabledBanner\n description=\"Only leaders can send messages, but you can still add reactions.\"\n style={styles.memberBanner}\n />\n )\n}\n\ninterface MessagesDisabledBannerProps {\n description: string\n style?: ViewStyle\n}\n\nconst MessagesDisabledBanner = ({ description, style }: MessagesDisabledBannerProps) => {\n const styles = useStyles()\n\n return (\n <View style={[styles.baseBanner, style]}>\n <Text style={styles.text} variant=\"tertiary\">\n {description}\n </Text>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n baseBanner: {\n paddingHorizontal: 16,\n paddingVertical: 4,\n backgroundColor: colors.statusNeutralComposedBackground,\n borderTopWidth: 1,\n borderTopColor: colors.borderColorDefaultBase,\n },\n text: {\n textAlign: 'center',\n },\n memberBanner: {\n paddingTop: 16,\n paddingBottom: 16 + bottom,\n marginBottom: -bottom,\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply_connectors.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/reply_connectors.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"reply_connectors.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/reply_connectors.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AASzC,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC,UAAU,mBAAmB;IAC3B,OAAO,EAAE,eAAe,CAAA;IACxB,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,mBAAmB,sCAiCxF;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE,mBAAmB,sCA4CrF"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply_connectors.js","sourceRoot":"","sources":["../../../src/components/conversation/reply_connectors.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EACL,4CAA4C,EAC5C,kCAAkC,GACnC,MAAM,oBAAoB,CAAA;AAE3B,MAAM,wBAAwB,GAAG,EAAE,CAAA;AACnC,MAAM,sBAAsB,GAAG,CAAC,CAAA;AAChC,MAAM,0BAA0B,GAAG,sBAAsB,GAAG,CAAC,CAAA,CAAC,sFAAsF;AACpJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAA;AAOzC,MAAM,UAAU,mBAAmB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAuB;IACvF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAA;IAEzF,IAAI,mBAAmB,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA,CAAC,uBAAuB;IAElE,MAAM,YAAY,GAA2C;QAC3D,cAAc,EAAE,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,mBAAmB,GAAG,CAAC,CAAC,EAAG;QAC5E,cAAc,EAAE,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,mBAAmB,GAAG,CAAC,CAAC,EAAG;QA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AsB,EAAE;YACtB,IAAI,EAAE,CAAC;SACR;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,CAAC;SACR;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,CAAC;SACR;QACD,6BAA6B,EAAE;YAC7B,eAAe,EAAE,WAAW;YAC5B,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,CAAC;YACP,YAAY,EAAE,CAAC,CAAC,EAAE,4EAA4E;SAC/F;QACD,6BAA6B,EAAE;YAC7B,eAAe,EAAE,WAAW;YAC5B,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,CAAC;YACP,SAAS,EAAE,CAAC,CAAC,EAAE,4EAA4E;SAC5F;QACD,gFAAgF;QAChF,aAAa,EAAE;YACb,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;SACV;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StyleSheet, View, ViewStyle } from 'react-native'\nimport Svg, { Path } from 'react-native-svg'\nimport { useTheme } from '../../hooks'\nimport { MessageResource } from '../../types'\nimport {\n CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n} from '../../utils/styles'\n\nconst MY_REPLY_CONNECTOR_WIDTH = 38\nconst CONNECTOR_BORDER_WIDTH = 4\nconst OFFSET_CONNECTOR_CONTAINER = CONNECTOR_BORDER_WIDTH / 2 // Accounts for the border width ensuring the connectors are centered under the avatar\nexport const AVATAR_CONNECTOR_SPACING = 8\n\ninterface ReplyConnectorProps {\n message: MessageResource\n messageBubbleHeight: number\n}\n\nexport function TheirReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps) {\n const styles = useStyles()\n const { nextRendersAuthor, threadPosition, renderAuthor, isReplyShadowMessage } = message\n\n if (messageBubbleHeight === 0) return null // Prevents UI shifting\n\n const connectorMap: Record<string, React.ReactNode | null> = {\n shortTailCurve: <ShortTailCurveConnector height={messageBubbleHeight / 2} />,\n shortHeadCurve: <ShortHeadCurveConnector height={messageBubbleHeight / 2} />,\n verticalLine: <VerticalLineConnector />,\n default: null,\n }\n\n const getConnectorKey = () => {\n if (threadPosition === 'first' && !renderAuthor) return 'shortHeadCurve'\n if (threadPosition === 'last' && !renderAuthor) return 'shortTailCurve'\n if (\n (threadPosition === 'first' && renderAuthor) ||\n threadPosition === 'center' ||\n isReplyShadowMessage\n )\n return 'verticalLine'\n return 'default'\n }\n\n const ConnectorComponent = connectorMap[getConnectorKey()]\n if (!ConnectorComponent) return null\n\n const spacerStyle = nextRendersAuthor ? styles.theirReplyConnectorSpacer : null\n\n return (\n <View style={[styles.theirReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>\n )\n}\n\nexport function MyReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps) {\n const styles = useStyles()\n const { nextRendersAuthor, threadPosition, prevIsMyReply, nextIsMyReply, isReplyShadowMessage } =\n message\n\n if (messageBubbleHeight === 0) return null // Prevents UI shifting\n\n const connectorMap: Record<string, React.ReactNode | null> = {\n longTailCurve: (\n <LongTailCurveConnector\n height={messageBubbleHeight / 2}\n style={styles.myReplyConnectorPosition}\n />\n ),\n longHeadCurve: (\n <LongHeadCurveConnector\n height={messageBubbleHeight / 2}\n style={styles.myReplyConnectorPosition}\n />\n ),\n verticalLine: <VerticalLineConnector style={styles.myReplyConnectorPosition} />,\n swirl: <SwirlConnector style={styles.myReplyConnectorPosition} height={messageBubbleHeight} />,\n default: null,\n }\n\n const getConnectorKey = () => {\n if (threadPosition === 'first' || isReplyShadowMessage) return 'longHeadCurve'\n if (threadPosition === 'center' && prevIsMyReply && nextIsMyReply) return 'verticalLine'\n if (threadPosition === 'center' && (!prevIsMyReply || !nextIsMyReply)) return 'swirl'\n if (threadPosition === 'last') return 'longTailCurve'\n\n return 'default'\n }\n\n const ConnectorComponent = connectorMap[getConnectorKey()]\n if (!ConnectorComponent) return null\n\n const spacerStyle = nextRendersAuthor ? styles.myReplyConnectorSpacer : null\n\n return (\n <EnforceLeftPositionForMyReplyConnector>\n <View style={[styles.myReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>\n </EnforceLeftPositionForMyReplyConnector>\n )\n}\n\nfunction VerticalLineConnector({ style }: { style?: ViewStyle }) {\n const styles = useStyles()\n return <View style={[styles.verticalLineConnector, style]} />\n}\n\nfunction LongHeadCurveConnector({ height, style }: { height: number; style?: ViewStyle }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.longHeadCurveConnector, { marginTop: height }, style]}>\n <Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill=\"none\">\n <Path\n d=\"M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 38 2\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\nfunction LongTailCurveConnector({ height, style }: { height: number; style?: ViewStyle }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[{ height }, style]}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill=\"none\">\n <Path\n d=\"M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 38 16\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n </View>\n )\n}\n\nfunction ShortHeadCurveConnector({ height }: { height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.shortHeadCurveConnector, { marginTop: height }]}>\n <Svg width={20} height={18} fill=\"none\">\n <Path\n d=\"M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 20 2\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\nfunction ShortTailCurveConnector({ height }: { height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={{ height }}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={20} height={18} fill=\"none\">\n <Path\n d=\"M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 20 16\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n </View>\n )\n}\n\nfunction SwirlConnector({ style, height }: { style?: ViewStyle; height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.swirlConnectorContainer, style]}>\n <View style={{ height }}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={27} height={34} fill=\"none\">\n <Path\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n d=\"M2.07 34c0-6.142 1.201-12.283 3.343-17m0 0c2.305-5.075 5.699-8.5 9.857-8.5 4.86 0 8.8 3.806 8.8 8.5s-3.94 8.5-8.8 8.5c-4.158 0-7.552-3.425-9.857-8.5zm0 0C3.271 12.283 2.07 6.142 2.07 0\"\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\n// TODO: Remove when Services React Native bumps to React Native 0.74 or higher.\n// This fixes a React Native bug where using `flexDirection: 'row-reverse'` also switches the `left`/`right` absolute positioning values.\n// The wrapper ensures the MyReplyConnector is always positioned to the left of the message bubble on older versions of React Native.\n// Long term fix is described here: https://reactnative.dev/blog/2024/04/22/release-0.74#new-layout-behaviors\nfunction EnforceLeftPositionForMyReplyConnector({ children }: { children: React.ReactNode }) {\n const styles = useStyles()\n return (\n <View\n style={styles.resetPosition}\n pointerEvents=\"none\" // ensures wrapper does not block press events\n >\n {children}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const borderColor = colors.borderColorDefaultBase\n\n return StyleSheet.create({\n theirReplyConnectorContainer: {\n width: '50%',\n marginRight: OFFSET_CONNECTOR_CONTAINER,\n alignSelf: 'flex-end',\n flex: 1,\n },\n theirReplyConnectorSpacer: {\n paddingBottom: AVATAR_CONNECTOR_SPACING,\n },\n myReplyConnectorContainer: {\n width: MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n position: 'absolute',\n left: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL - OFFSET_CONNECTOR_CONTAINER,\n top: 0,\n bottom: 0,\n },\n myReplyConnectorPosition: {\n left: '50%',\n },\n myReplyConnectorSpacer: {\n bottom: AVATAR_CONNECTOR_SPACING,\n },\n verticalLineConnector: {\n flex: 1,\n borderLeftWidth: CONNECTOR_BORDER_WIDTH,\n borderLeftColor: borderColor,\n },\n longHeadCurveConnector: {\n flex: 1,\n },\n shortHeadCurveConnector: {\n flex: 1,\n },\n swirlConnectorContainer: {\n flex: 1,\n },\n svgConnnectorVerticalLineHead: {\n backgroundColor: borderColor,\n width: CONNECTOR_BORDER_WIDTH,\n flex: 1,\n marginBottom: -1, // Ensures there is no gap between the vertical line and the swirl connector\n },\n svgConnnectorVerticalLineTail: {\n backgroundColor: borderColor,\n width: CONNECTOR_BORDER_WIDTH,\n flex: 1,\n marginTop: -1, // Ensures there is no gap between the vertical line and the swirl connector\n },\n // TODO: Remove when Services React Native bumps to React Native 0.74 or higher.\n resetPosition: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"reply_connectors.js","sourceRoot":"","sources":["../../../src/components/conversation/reply_connectors.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEl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B,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;SACV;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StyleSheet, View, ViewStyle } from 'react-native'\nimport Svg, { Path } from 'react-native-svg'\nimport { useTheme } from '@/hooks'\nimport { MessageResource } from '@/types'\nimport {\n CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n} from '@/utils/styles'\n\nconst MY_REPLY_CONNECTOR_WIDTH = 38\nconst CONNECTOR_BORDER_WIDTH = 4\nconst OFFSET_CONNECTOR_CONTAINER = CONNECTOR_BORDER_WIDTH / 2 // Accounts for the border width ensuring the connectors are centered under the avatar\nexport const AVATAR_CONNECTOR_SPACING = 8\n\ninterface ReplyConnectorProps {\n message: MessageResource\n messageBubbleHeight: number\n}\n\nexport function TheirReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps) {\n const styles = useStyles()\n const { nextRendersAuthor, threadPosition, renderAuthor, isReplyShadowMessage } = message\n\n if (messageBubbleHeight === 0) return null // Prevents UI shifting\n\n const connectorMap: Record<string, React.ReactNode | null> = {\n shortTailCurve: <ShortTailCurveConnector height={messageBubbleHeight / 2} />,\n shortHeadCurve: <ShortHeadCurveConnector height={messageBubbleHeight / 2} />,\n verticalLine: <VerticalLineConnector />,\n default: null,\n }\n\n const getConnectorKey = () => {\n if (threadPosition === 'first' && !renderAuthor) return 'shortHeadCurve'\n if (threadPosition === 'last' && !renderAuthor) return 'shortTailCurve'\n if (\n (threadPosition === 'first' && renderAuthor) ||\n threadPosition === 'center' ||\n isReplyShadowMessage\n )\n return 'verticalLine'\n return 'default'\n }\n\n const ConnectorComponent = connectorMap[getConnectorKey()]\n if (!ConnectorComponent) return null\n\n const spacerStyle = nextRendersAuthor ? styles.theirReplyConnectorSpacer : null\n\n return (\n <View style={[styles.theirReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>\n )\n}\n\nexport function MyReplyConnector({ message, messageBubbleHeight }: ReplyConnectorProps) {\n const styles = useStyles()\n const { nextRendersAuthor, threadPosition, prevIsMyReply, nextIsMyReply, isReplyShadowMessage } =\n message\n\n if (messageBubbleHeight === 0) return null // Prevents UI shifting\n\n const connectorMap: Record<string, React.ReactNode | null> = {\n longTailCurve: (\n <LongTailCurveConnector\n height={messageBubbleHeight / 2}\n style={styles.myReplyConnectorPosition}\n />\n ),\n longHeadCurve: (\n <LongHeadCurveConnector\n height={messageBubbleHeight / 2}\n style={styles.myReplyConnectorPosition}\n />\n ),\n verticalLine: <VerticalLineConnector style={styles.myReplyConnectorPosition} />,\n swirl: <SwirlConnector style={styles.myReplyConnectorPosition} height={messageBubbleHeight} />,\n default: null,\n }\n\n const getConnectorKey = () => {\n if (threadPosition === 'first' || isReplyShadowMessage) return 'longHeadCurve'\n if (threadPosition === 'center' && prevIsMyReply && nextIsMyReply) return 'verticalLine'\n if (threadPosition === 'center' && (!prevIsMyReply || !nextIsMyReply)) return 'swirl'\n if (threadPosition === 'last') return 'longTailCurve'\n\n return 'default'\n }\n\n const ConnectorComponent = connectorMap[getConnectorKey()]\n if (!ConnectorComponent) return null\n\n const spacerStyle = nextRendersAuthor ? styles.myReplyConnectorSpacer : null\n\n return (\n <EnforceLeftPositionForMyReplyConnector>\n <View style={[styles.myReplyConnectorContainer, spacerStyle]}>{ConnectorComponent}</View>\n </EnforceLeftPositionForMyReplyConnector>\n )\n}\n\nfunction VerticalLineConnector({ style }: { style?: ViewStyle }) {\n const styles = useStyles()\n return <View style={[styles.verticalLineConnector, style]} />\n}\n\nfunction LongHeadCurveConnector({ height, style }: { height: number; style?: ViewStyle }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.longHeadCurveConnector, { marginTop: height }, style]}>\n <Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill=\"none\">\n <Path\n d=\"M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 38 2\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\nfunction LongTailCurveConnector({ height, style }: { height: number; style?: ViewStyle }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[{ height }, style]}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={MY_REPLY_CONNECTOR_WIDTH} height={18} fill=\"none\">\n <Path\n d=\"M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 38 16\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n </View>\n )\n}\n\nfunction ShortHeadCurveConnector({ height }: { height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.shortHeadCurveConnector, { marginTop: height }]}>\n <Svg width={20} height={18} fill=\"none\">\n <Path\n d=\"M 2 18 L 2 16 A 14 14 0 0 1 16 2 L 20 2\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\nfunction ShortTailCurveConnector({ height }: { height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={{ height }}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={20} height={18} fill=\"none\">\n <Path\n d=\"M 2 0 L 2 2 A 14 14 0 0 0 16 16 L 20 16\"\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n />\n </Svg>\n </View>\n )\n}\n\nfunction SwirlConnector({ style, height }: { style?: ViewStyle; height: number }) {\n const styles = useStyles()\n const { colors } = useTheme()\n\n return (\n <View style={[styles.swirlConnectorContainer, style]}>\n <View style={{ height }}>\n <View style={styles.svgConnnectorVerticalLineHead} />\n <Svg width={27} height={34} fill=\"none\">\n <Path\n stroke={colors.borderColorDefaultBase}\n strokeWidth={CONNECTOR_BORDER_WIDTH}\n d=\"M2.07 34c0-6.142 1.201-12.283 3.343-17m0 0c2.305-5.075 5.699-8.5 9.857-8.5 4.86 0 8.8 3.806 8.8 8.5s-3.94 8.5-8.8 8.5c-4.158 0-7.552-3.425-9.857-8.5zm0 0C3.271 12.283 2.07 6.142 2.07 0\"\n />\n </Svg>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n <View style={styles.svgConnnectorVerticalLineTail} />\n </View>\n )\n}\n\n// TODO: Remove when Services React Native bumps to React Native 0.74 or higher.\n// This fixes a React Native bug where using `flexDirection: 'row-reverse'` also switches the `left`/`right` absolute positioning values.\n// The wrapper ensures the MyReplyConnector is always positioned to the left of the message bubble on older versions of React Native.\n// Long term fix is described here: https://reactnative.dev/blog/2024/04/22/release-0.74#new-layout-behaviors\nfunction EnforceLeftPositionForMyReplyConnector({ children }: { children: React.ReactNode }) {\n const styles = useStyles()\n return (\n <View\n style={styles.resetPosition}\n pointerEvents=\"none\" // ensures wrapper does not block press events\n >\n {children}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const borderColor = colors.borderColorDefaultBase\n\n return StyleSheet.create({\n theirReplyConnectorContainer: {\n width: '50%',\n marginRight: OFFSET_CONNECTOR_CONTAINER,\n alignSelf: 'flex-end',\n flex: 1,\n },\n theirReplyConnectorSpacer: {\n paddingBottom: AVATAR_CONNECTOR_SPACING,\n },\n myReplyConnectorContainer: {\n width: MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n position: 'absolute',\n left: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL - OFFSET_CONNECTOR_CONTAINER,\n top: 0,\n bottom: 0,\n },\n myReplyConnectorPosition: {\n left: '50%',\n },\n myReplyConnectorSpacer: {\n bottom: AVATAR_CONNECTOR_SPACING,\n },\n verticalLineConnector: {\n flex: 1,\n borderLeftWidth: CONNECTOR_BORDER_WIDTH,\n borderLeftColor: borderColor,\n },\n longHeadCurveConnector: {\n flex: 1,\n },\n shortHeadCurveConnector: {\n flex: 1,\n },\n swirlConnectorContainer: {\n flex: 1,\n },\n svgConnnectorVerticalLineHead: {\n backgroundColor: borderColor,\n width: CONNECTOR_BORDER_WIDTH,\n flex: 1,\n marginBottom: -1, // Ensures there is no gap between the vertical line and the swirl connector\n },\n svgConnnectorVerticalLineTail: {\n backgroundColor: borderColor,\n width: CONNECTOR_BORDER_WIDTH,\n flex: 1,\n marginTop: -1, // Ensures there is no gap between the vertical line and the swirl connector\n },\n // TODO: Remove when Services React Native bumps to React Native 0.74 or higher.\n resetPosition: {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply_shadow_message.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/reply_shadow_message.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reply_shadow_message.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/reply_shadow_message.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAezC,UAAU,uBAAwB,SAAQ,eAAe;IACvD,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,iBAAiB,EAAE,OAAO,CAAA;CAC3B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,aAAa,EACb,SAAS,EACT,oBAAoB,EACpB,iBAAiB,GAClB,EAAE,uBAAuB,4BAczB"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { useNavigation } from '@react-navigation/native';
|
|
2
|
+
import { some } from 'lodash';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
3
|
-
import { Avatar, Icon, Image, Text } from '../display';
|
|
4
|
-
import { useAnimatedMessageBackgroundColor, useFontScale, useScalableNumberOfLines, useTheme, } from '../../hooks';
|
|
5
|
-
import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL, MAX_FONT_SIZE_MULTIPLIER, MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH, platformFontWeightMedium, } from '../../utils/styles';
|
|
6
5
|
import Animated from 'react-native-reanimated';
|
|
7
6
|
import { TheirReplyConnector, MyReplyConnector } from './reply_connectors';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { useConversationMessage } from '
|
|
11
|
-
import { useLiveRelativeTime } from '
|
|
12
|
-
import {
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply_shadow_message.js","sourceRoot":"","sources":["../../../src/components/conversation/reply_shadow_message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,UAAU,E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W,EAAE;YACX,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY;SACjD;QACD,cAAc,EAAE;YACd,KAAK,EAAE,MAAM,CAAC,WAAW;YACzB,UAAU,EAAE,wBAAwB;SACrC;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,EAAE,GAAG,SAAS;YACrB,WAAW,EAAE,UAAU,GAAG,WAAW;YACrC,OAAO,EAAE,GAAG;SACb;QACD,KAAK,EAAE;YACL,YAAY,EAAE,CAAC;SAChB;QACD,cAAc,EAAE;YACd,KAAK,EAAE,MAAM,CAAC,mBAAmB;YACjC,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { Avatar, Icon, IconProps, Image, Text } from '../display'\nimport {\n useAnimatedMessageBackgroundColor,\n useFontScale,\n useScalableNumberOfLines,\n useTheme,\n} from '../../hooks'\nimport { MessageResource } from '../../types'\nimport {\n DenormalizedAttachmentResource,\n DenormalizedGiphyAttachmentResource,\n DenormalizedExpandedLinkAttachmentResource,\n DenormalizedMessageAttachmentResource,\n} from '../../types/resources/denormalized_attachment_resource'\nimport {\n CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n MAX_FONT_SIZE_MULTIPLIER,\n MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n platformFontWeightMedium,\n} from '../../utils/styles'\nimport Animated from 'react-native-reanimated'\nimport { TheirReplyConnector, MyReplyConnector } from './reply_connectors'\nimport { assertKeysAreNumbers, pluralize } from '../../utils'\nimport { useNavigation } from '@react-navigation/native'\nimport { useConversationMessage } from '../../hooks/use_conversation_message'\nimport { useLiveRelativeTime } from '../../hooks/use_live_relative_time'\nimport { some } from 'lodash'\n\ninterface ReplyShadowMessageProps extends MessageResource {\n messageId: string\n conversation_id: number\n inReplyScreen?: boolean\n isReplyShadowMessage: boolean\n nextRendersAuthor: boolean\n}\n\nexport function ReplyShadowMessage({\n conversation_id,\n inReplyScreen,\n messageId,\n isReplyShadowMessage,\n nextRendersAuthor,\n}: ReplyShadowMessageProps) {\n const { message, isError, isLoading } = useConversationMessage({ conversation_id, messageId })\n\n if (inReplyScreen) return null\n if (isLoading) return <ShadowMessageFallback text=\"Loading...\" />\n if (isError || !message) return <ShadowMessageFallback text=\"Message deleted\" />\n\n const enrichedMessage = {\n ...message,\n isReplyShadowMessage,\n nextRendersAuthor,\n }\n\n return <ShadowMessageContent conversation_id={conversation_id} {...enrichedMessage} />\n}\n\ninterface ShadowMessageContentProps extends MessageResource {\n conversation_id: number\n}\n\nfunction ShadowMessageContent({ conversation_id, ...message }: ShadowMessageContentProps) {\n const { text, deletedAt, author, attachments } = message\n const styles = useStyles(message)\n const { colors } = useTheme()\n const navigation = useNavigation()\n const timestamp = useLiveRelativeTime(message.createdAt)\n\n const [messageBubbleHeight, setMessageBubbleHeight] = React.useState(0)\n const { animatedBackgroundColor, handleMessagePressIn, handleMessagePressOut } =\n useAnimatedMessageBackgroundColor()\n const scalableNumberOfLines = useScalableNumberOfLines(2)\n const replyCountText = pluralize(message.replyCount, 'reply')\n const isDeleted = !!deletedAt\n const messageText = isDeleted ? 'Message deleted' : text\n\n const handleNavigateToReplies = () => {\n navigation.navigate('ConversationReply', {\n conversation_id,\n reply_root_id: message.replyRootId,\n reply_root_author_name: message.author.name,\n })\n }\n\n const attachmentLabel = some(attachments) ? pluralize(attachments.length, 'attachment') : ''\n const accessibilityLabel = `${author?.name || ''} Reply Preview ${attachmentLabel} ${messageText || ''} ${timestamp} ${replyCountText}`\n\n return (\n <Pressable\n android_ripple={{ color: colors.androidRippleNeutral }}\n onPress={handleNavigateToReplies}\n onPressIn={handleMessagePressIn}\n onPressOut={handleMessagePressOut}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint=\"Navigate to reply screen for this message\"\n accessibilityRole=\"link\"\n >\n <Animated.View style={[styles.message, animatedBackgroundColor]}>\n {!message.mine && (\n <View>\n <View style={[styles.avatarWrapper, !isDeleted && styles.avatarOpacity]}>\n <Avatar\n size=\"xs\"\n sourceUri={message.author.avatar}\n style={styles.avatar}\n maxFontSizeMultiplier={1}\n fallbackIconName={isDeleted ? 'publishing.trash' : 'general.person'}\n showFallback={isDeleted}\n />\n </View>\n <TheirReplyConnector message={message} messageBubbleHeight={messageBubbleHeight} />\n </View>\n )}\n <View style={styles.messageContent}>\n <View\n style={styles.messageBubble}\n onLayout={e => setMessageBubbleHeight(e.nativeEvent.layout.height)}\n >\n <MessageAttachmentImagery attachments={attachments} />\n {text && (\n <Text\n variant=\"footnote\"\n style={styles.messageText}\n numberOfLines={scalableNumberOfLines}\n >\n {messageText}\n </Text>\n )}\n </View>\n <View style={styles.messageMeta}>\n <Text variant=\"footnote\" style={styles.replyCountText}>\n {replyCountText}\n </Text>\n </View>\n </View>\n {message.mine && (\n <MyReplyConnector message={message} messageBubbleHeight={messageBubbleHeight} />\n )}\n </Animated.View>\n </Pressable>\n )\n}\n\nfunction MessageAttachmentImagery({\n attachments,\n}: {\n attachments: DenormalizedAttachmentResource[]\n}) {\n if (!attachments || attachments.length === 0) return null\n\n const attachment = attachments[0]\n\n if (attachment.type === 'giphy') {\n return <GiphyImage attachment={attachment} />\n }\n if (attachment.type === 'ExpandedLink') {\n return <ExpandedLinkImage attachment={attachment} />\n }\n if (attachment.type === 'MessageAttachment') {\n const contentType = attachment.attributes?.contentType\n const basicType = contentType?.split('/')[0]\n\n switch (basicType) {\n case 'image':\n return <MessageAttachmentImage attachment={attachment} />\n case 'video':\n return <MessageAttachmentIcon iconName=\"general.outlinedVideoFile\" />\n case 'audio':\n return <MessageAttachmentIcon iconName=\"general.outlinedMusicFile\" />\n case 'application':\n return <MessageAttachmentIcon iconName=\"general.outlinedGenericFile\" />\n default:\n return null\n }\n }\n\n return null\n}\n\nfunction GiphyImage({ attachment }: { attachment: DenormalizedGiphyAttachmentResource }) {\n const { title, giphy } = attachment\n const { url } = giphy.fixedWidth\n const { width, height } = assertKeysAreNumbers(giphy.fixedWidth)\n const styles = useStyles({ imageWidth: width, imageHeight: height })\n\n return (\n <Image\n source={{ uri: url }}\n wrapperStyle={styles.imageWrapper}\n style={styles.image}\n alt={title}\n loaderSize={16}\n />\n )\n}\n\nfunction ExpandedLinkImage({\n attachment,\n}: {\n attachment: DenormalizedExpandedLinkAttachmentResource\n}) {\n const { title = '', imageUrl, imageHeight, imageWidth } = attachment.attributes\n const styles = useStyles({ imageWidth, imageHeight })\n\n return (\n <Image\n source={{ uri: imageUrl }}\n wrapperStyle={styles.imageWrapper}\n style={styles.image}\n alt={title}\n loaderSize={16}\n />\n )\n}\n\nfunction MessageAttachmentImage({\n attachment,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n}) {\n const { url, urlMedium, filename, metadata = {} } = attachment.attributes\n const styles = useStyles({ imageWidth: metadata.width, imageHeight: metadata.height })\n\n return (\n <Image\n source={{ uri: urlMedium || url }}\n style={styles.image}\n wrapperStyle={styles.imageWrapper}\n alt={filename}\n loaderSize={16}\n />\n )\n}\n\nfunction MessageAttachmentIcon({ iconName }: { iconName: IconProps['name'] }) {\n const styles = useStyles()\n return (\n <Icon\n name={iconName}\n style={styles.attachmentIcon}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}\n />\n )\n}\n\n// TODO: The mine prop is not used yet, but in the future we will be adding a way to find the `mine` value for this fallback.\nfunction ShadowMessageFallback({ text, mine }: { text: string; mine?: boolean }) {\n const styles = useStyles({ mine })\n\n return (\n <View style={styles.message}>\n <View style={styles.messageContent}>\n <View style={styles.messageBubble}>\n <Text variant=\"footnote\" style={styles.messageText}>\n {text}\n </Text>\n </View>\n </View>\n </View>\n )\n}\n\ninterface StylesProps {\n imageWidth?: number\n imageHeight?: number\n mine?: boolean\n}\n\nconst useStyles = ({ mine, imageWidth = 32, imageHeight = 32 }: StylesProps = {}) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER })\n const { width } = useWindowDimensions()\n const tabletWidth = width >= 744 // Smallest iPad Mini's width\n\n return StyleSheet.create({\n message: {\n gap: 8,\n flexDirection: mine ? 'row-reverse' : 'row',\n paddingHorizontal: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n },\n messageContent: {\n flex: 1,\n gap: 4,\n marginBottom: 12,\n },\n avatarWrapper: {\n width: MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n alignItems: 'center',\n },\n avatar: {\n marginBottom: 8,\n },\n avatarOpacity: {\n opacity: 0.5,\n },\n messageBubble: {\n flexDirection: 'row',\n alignSelf: mine ? 'flex-end' : 'flex-start',\n alignItems: 'center',\n gap: 8,\n borderColor: colors.borderColorDefaultBase,\n borderWidth: 1,\n borderRadius: 8,\n maxWidth: tabletWidth ? 360 : '80%',\n paddingVertical: 6,\n paddingHorizontal: 8,\n },\n messageText: {\n color: colors.textColorDefaultPlaceholder,\n flexShrink: 1,\n },\n messageMeta: {\n flexDirection: 'row',\n justifyContent: mine ? 'flex-end' : 'flex-start',\n },\n replyCountText: {\n color: colors.interaction,\n fontWeight: platformFontWeightMedium,\n },\n imageWrapper: {\n width: 32 * fontScale,\n aspectRatio: imageWidth / imageHeight,\n opacity: 0.5,\n },\n image: {\n borderRadius: 4,\n },\n attachmentIcon: {\n color: colors.iconColorDefaultDim,\n fontSize: 16,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"reply_shadow_message.js","sourceRoot":"","sources":["../../../src/components/conversation/reply_shadow_message.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc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,MAAM,CAAC,WAAW;YACzB,UAAU,EAAE,wBAAwB;SACrC;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,EAAE,GAAG,SAAS;YACrB,WAAW,EAAE,UAAU,GAAG,WAAW;YACrC,OAAO,EAAE,GAAG;SACb;QACD,KAAK,EAAE;YACL,YAAY,EAAE,CAAC;SAChB;QACD,cAAc,EAAE;YACd,KAAK,EAAE,MAAM,CAAC,mBAAmB;YACjC,QAAQ,EAAE,EAAE;SACb;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport { some } from 'lodash'\nimport React from 'react'\nimport { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport Animated from 'react-native-reanimated'\nimport { TheirReplyConnector, MyReplyConnector } from './reply_connectors'\nimport { Avatar, Icon, IconProps, Image, Text } from '@/components/display'\nimport {\n useAnimatedMessageBackgroundColor,\n useFontScale,\n useScalableNumberOfLines,\n useTheme,\n} from '@/hooks'\nimport { useConversationMessage } from '@/hooks/use_conversation_message'\nimport { useLiveRelativeTime } from '@/hooks/use_live_relative_time'\nimport { MessageResource } from '@/types'\nimport {\n DenormalizedAttachmentResource,\n DenormalizedGiphyAttachmentResource,\n DenormalizedExpandedLinkAttachmentResource,\n DenormalizedMessageAttachmentResource,\n} from '@/types/resources/denormalized_attachment_resource'\nimport { assertKeysAreNumbers, pluralize } from '@/utils'\nimport {\n CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n MAX_FONT_SIZE_MULTIPLIER,\n MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n platformFontWeightMedium,\n} from '@/utils/styles'\n\ninterface ReplyShadowMessageProps extends MessageResource {\n messageId: string\n conversation_id: number\n inReplyScreen?: boolean\n isReplyShadowMessage: boolean\n nextRendersAuthor: boolean\n}\n\nexport function ReplyShadowMessage({\n conversation_id,\n inReplyScreen,\n messageId,\n isReplyShadowMessage,\n nextRendersAuthor,\n}: ReplyShadowMessageProps) {\n const { message, isError, isLoading } = useConversationMessage({ conversation_id, messageId })\n\n if (inReplyScreen) return null\n if (isLoading) return <ShadowMessageFallback text=\"Loading...\" />\n if (isError || !message) return <ShadowMessageFallback text=\"Message deleted\" />\n\n const enrichedMessage = {\n ...message,\n isReplyShadowMessage,\n nextRendersAuthor,\n }\n\n return <ShadowMessageContent conversation_id={conversation_id} {...enrichedMessage} />\n}\n\ninterface ShadowMessageContentProps extends MessageResource {\n conversation_id: number\n}\n\nfunction ShadowMessageContent({ conversation_id, ...message }: ShadowMessageContentProps) {\n const { text, deletedAt, author, attachments } = message\n const styles = useStyles(message)\n const { colors } = useTheme()\n const navigation = useNavigation()\n const timestamp = useLiveRelativeTime(message.createdAt)\n\n const [messageBubbleHeight, setMessageBubbleHeight] = React.useState(0)\n const { animatedBackgroundColor, handleMessagePressIn, handleMessagePressOut } =\n useAnimatedMessageBackgroundColor()\n const scalableNumberOfLines = useScalableNumberOfLines(2)\n const replyCountText = pluralize(message.replyCount, 'reply')\n const isDeleted = !!deletedAt\n const messageText = isDeleted ? 'Message deleted' : text\n\n const handleNavigateToReplies = () => {\n navigation.navigate('ConversationReply', {\n conversation_id,\n reply_root_id: message.replyRootId,\n reply_root_author_name: message.author.name,\n })\n }\n\n const attachmentLabel = some(attachments) ? pluralize(attachments.length, 'attachment') : ''\n const accessibilityLabel = `${author?.name || ''} Reply Preview ${attachmentLabel} ${messageText || ''} ${timestamp} ${replyCountText}`\n\n return (\n <Pressable\n android_ripple={{ color: colors.androidRippleNeutral }}\n onPress={handleNavigateToReplies}\n onPressIn={handleMessagePressIn}\n onPressOut={handleMessagePressOut}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint=\"Navigate to reply screen for this message\"\n accessibilityRole=\"link\"\n >\n <Animated.View style={[styles.message, animatedBackgroundColor]}>\n {!message.mine && (\n <View>\n <View style={[styles.avatarWrapper, !isDeleted && styles.avatarOpacity]}>\n <Avatar\n size=\"xs\"\n sourceUri={message.author.avatar}\n style={styles.avatar}\n maxFontSizeMultiplier={1}\n fallbackIconName={isDeleted ? 'publishing.trash' : 'general.person'}\n showFallback={isDeleted}\n />\n </View>\n <TheirReplyConnector message={message} messageBubbleHeight={messageBubbleHeight} />\n </View>\n )}\n <View style={styles.messageContent}>\n <View\n style={styles.messageBubble}\n onLayout={e => setMessageBubbleHeight(e.nativeEvent.layout.height)}\n >\n <MessageAttachmentImagery attachments={attachments} />\n {text && (\n <Text\n variant=\"footnote\"\n style={styles.messageText}\n numberOfLines={scalableNumberOfLines}\n >\n {messageText}\n </Text>\n )}\n </View>\n <View style={styles.messageMeta}>\n <Text variant=\"footnote\" style={styles.replyCountText}>\n {replyCountText}\n </Text>\n </View>\n </View>\n {message.mine && (\n <MyReplyConnector message={message} messageBubbleHeight={messageBubbleHeight} />\n )}\n </Animated.View>\n </Pressable>\n )\n}\n\nfunction MessageAttachmentImagery({\n attachments,\n}: {\n attachments: DenormalizedAttachmentResource[]\n}) {\n if (!attachments || attachments.length === 0) return null\n\n const attachment = attachments[0]\n\n if (attachment.type === 'giphy') {\n return <GiphyImage attachment={attachment} />\n }\n if (attachment.type === 'ExpandedLink') {\n return <ExpandedLinkImage attachment={attachment} />\n }\n if (attachment.type === 'MessageAttachment') {\n const contentType = attachment.attributes?.contentType\n const basicType = contentType?.split('/')[0]\n\n switch (basicType) {\n case 'image':\n return <MessageAttachmentImage attachment={attachment} />\n case 'video':\n return <MessageAttachmentIcon iconName=\"general.outlinedVideoFile\" />\n case 'audio':\n return <MessageAttachmentIcon iconName=\"general.outlinedMusicFile\" />\n case 'application':\n return <MessageAttachmentIcon iconName=\"general.outlinedGenericFile\" />\n default:\n return null\n }\n }\n\n return null\n}\n\nfunction GiphyImage({ attachment }: { attachment: DenormalizedGiphyAttachmentResource }) {\n const { title, giphy } = attachment\n const { url } = giphy.fixedWidth\n const { width, height } = assertKeysAreNumbers(giphy.fixedWidth)\n const styles = useStyles({ imageWidth: width, imageHeight: height })\n\n return (\n <Image\n source={{ uri: url }}\n wrapperStyle={styles.imageWrapper}\n style={styles.image}\n alt={title}\n loaderSize={16}\n />\n )\n}\n\nfunction ExpandedLinkImage({\n attachment,\n}: {\n attachment: DenormalizedExpandedLinkAttachmentResource\n}) {\n const { title = '', imageUrl, imageHeight, imageWidth } = attachment.attributes\n const styles = useStyles({ imageWidth, imageHeight })\n\n return (\n <Image\n source={{ uri: imageUrl }}\n wrapperStyle={styles.imageWrapper}\n style={styles.image}\n alt={title}\n loaderSize={16}\n />\n )\n}\n\nfunction MessageAttachmentImage({\n attachment,\n}: {\n attachment: DenormalizedMessageAttachmentResource\n}) {\n const { url, urlMedium, filename, metadata = {} } = attachment.attributes\n const styles = useStyles({ imageWidth: metadata.width, imageHeight: metadata.height })\n\n return (\n <Image\n source={{ uri: urlMedium || url }}\n style={styles.image}\n wrapperStyle={styles.imageWrapper}\n alt={filename}\n loaderSize={16}\n />\n )\n}\n\nfunction MessageAttachmentIcon({ iconName }: { iconName: IconProps['name'] }) {\n const styles = useStyles()\n return (\n <Icon\n name={iconName}\n style={styles.attachmentIcon}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER}\n />\n )\n}\n\n// TODO: The mine prop is not used yet, but in the future we will be adding a way to find the `mine` value for this fallback.\nfunction ShadowMessageFallback({ text, mine }: { text: string; mine?: boolean }) {\n const styles = useStyles({ mine })\n\n return (\n <View style={styles.message}>\n <View style={styles.messageContent}>\n <View style={styles.messageBubble}>\n <Text variant=\"footnote\" style={styles.messageText}>\n {text}\n </Text>\n </View>\n </View>\n </View>\n )\n}\n\ninterface StylesProps {\n imageWidth?: number\n imageHeight?: number\n mine?: boolean\n}\n\nconst useStyles = ({ mine, imageWidth = 32, imageHeight = 32 }: StylesProps = {}) => {\n const { colors } = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER })\n const { width } = useWindowDimensions()\n const tabletWidth = width >= 744 // Smallest iPad Mini's width\n\n return StyleSheet.create({\n message: {\n gap: 8,\n flexDirection: mine ? 'row-reverse' : 'row',\n paddingHorizontal: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n },\n messageContent: {\n flex: 1,\n gap: 4,\n marginBottom: 12,\n },\n avatarWrapper: {\n width: MESSAGE_AUTHOR_AVATAR_COLUMN_WIDTH,\n alignItems: 'center',\n },\n avatar: {\n marginBottom: 8,\n },\n avatarOpacity: {\n opacity: 0.5,\n },\n messageBubble: {\n flexDirection: 'row',\n alignSelf: mine ? 'flex-end' : 'flex-start',\n alignItems: 'center',\n gap: 8,\n borderColor: colors.borderColorDefaultBase,\n borderWidth: 1,\n borderRadius: 8,\n maxWidth: tabletWidth ? 360 : '80%',\n paddingVertical: 6,\n paddingHorizontal: 8,\n },\n messageText: {\n color: colors.textColorDefaultPlaceholder,\n flexShrink: 1,\n },\n messageMeta: {\n flexDirection: 'row',\n justifyContent: mine ? 'flex-end' : 'flex-start',\n },\n replyCountText: {\n color: colors.interaction,\n fontWeight: platformFontWeightMedium,\n },\n imageWrapper: {\n width: 32 * fontScale,\n aspectRatio: imageWidth / imageHeight,\n opacity: 0.5,\n },\n image: {\n borderRadius: 4,\n },\n attachmentIcon: {\n color: colors.iconColorDefaultDim,\n fontSize: 16,\n },\n })\n}\n"]}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing_indicator.js","sourceRoot":"","sources":["../../../src/components/conversation/typing_indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"typing_indicator.js","sourceRoot":"","sources":["../../../src/components/conversation/typing_indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAE3F;;GAEG;AACH,MAAM,UAAU,GAAG,GAAG,EAAE;IACtB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,sCAAsC;IACtC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAA;IACjE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAA;IACjE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAA;IAEjE,8BAA8B;IAC9B,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,IAAI,CACX,QAAQ,CAAC,QAAQ,CAAC;YAChB,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;YAC1B,UAAU,CAAC,WAAW,EAAE,GAAG,CAAC;Y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EAAE;YACnB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,GAAG;YACb,KAAK;YACL,eAAe,EAAE,IAAI;SACtB,CAAC;QACF,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE;YACnB,OAAO,EAAE,GAAG;YACZ,QAAQ,EAAE,GAAG;YACb,eAAe,EAAE,IAAI;SACtB,CAAC;KACH,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import React, { useEffect } from 'react'\nimport { StyleSheet, View, Animated } from 'react-native'\nimport { Text } from '@/components/display'\nimport { useTheme } from '@/hooks'\nimport { useTypingIndicators, getTypingIndicatorText } from '@/hooks/use_typing_indicators'\n\n/**\n * Animated dots to indicate typing\n */\nconst TypingDots = () => {\n const styles = useStyles()\n\n // Create animated values for each dot\n const dot1Opacity = React.useRef(new Animated.Value(0.3)).current\n const dot2Opacity = React.useRef(new Animated.Value(0.3)).current\n const dot3Opacity = React.useRef(new Animated.Value(0.3)).current\n\n // Animation sequence for dots\n useEffect(() => {\n Animated.loop(\n Animated.parallel([\n animateDot(dot1Opacity, 0),\n animateDot(dot2Opacity, 200),\n animateDot(dot3Opacity, 400),\n ])\n ).start()\n\n return () => {\n dot1Opacity.stopAnimation()\n dot2Opacity.stopAnimation()\n dot3Opacity.stopAnimation()\n }\n }, [dot1Opacity, dot2Opacity, dot3Opacity])\n\n return (\n <View style={styles.dotsContainer}>\n <Animated.View style={[styles.dots, { opacity: dot1Opacity }]} />\n <Animated.View style={[styles.dots, { opacity: dot2Opacity }]} />\n <Animated.View style={[styles.dots, { opacity: dot3Opacity }]} />\n </View>\n )\n}\n\n/**\n * Component to display typing indicators in a conversation\n * Shows \"X is typing...\" with animated dots\n */\nexport const TypingIndicator = () => {\n const typingPeople = useTypingIndicators()\n const styles = useStyles()\n const enabled = typingPeople.length > 0\n\n if (!typingPeople.length) return null\n\n return (\n <View style={styles.relativeWrapper}>\n <View style={styles.container}>\n {enabled && <TypingDots />}\n <Text variant=\"footnote\" style={styles.text}>\n {getTypingIndicatorText(typingPeople)}\n </Text>\n </View>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n relativeWrapper: {\n position: 'relative',\n },\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n padding: 8,\n backgroundColor: colors.fillColorNeutral090,\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: 10,\n },\n dotsContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n marginRight: 8,\n },\n dots: {\n width: 4,\n height: 4,\n borderRadius: 2,\n backgroundColor: colors.textColorDefaultSecondary,\n marginHorizontal: 2,\n },\n text: {\n color: colors.textColorDefaultSecondary,\n },\n })\n}\n\nfunction animateDot(dot: Animated.Value, delay: number) {\n return Animated.sequence([\n Animated.timing(dot, {\n toValue: 1,\n duration: 400,\n delay,\n useNativeDriver: true,\n }),\n Animated.timing(dot, {\n toValue: 0.3,\n duration: 400,\n useNativeDriver: true,\n }),\n ])\n}\n"]}
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_actions.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversation_actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAA;AAClF,OAAO,EAIL,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"conversation_actions.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversation_actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAA;AAClF,OAAO,EAIL,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAA;AAQrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAI9C,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,EACP,kBAAkB,GACnB,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,EAAE,oBAAoB,CAAA;IAClC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,qBA4HA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
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
|
-
import { useConversationsContext } from '../../contexts/conversations_context';
|
|
5
|
-
import { useTheme, useCreateAndroidRippleColor } from '../../hooks';
|
|
6
|
-
import { useConversationsMarkRead, useConversationsMute, } from '../../hooks/use_conversations_actions';
|
|
7
|
-
import { platformPressedOpacityStyle } from '../../utils';
|
|
8
|
-
import { tokens } from '../../vendor/tapestry/tokens';
|
|
9
4
|
import { SwipeableToggleButton } from './swipeable_toggle_button';
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_actions.js","sourceRoot":"","sources":["../../../src/components/conversations/conversation_actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClF,OAAO,EAEL,QAAQ,EACR,SAAS,EAET,UAAU,EACV,IAAI,GAEL,MAAM,cAAc,CAAA;AACrB,OAAO,mBAEN,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAEjE,MAAM,UAAU,mBAAmB,CAAC,EAClC,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,EACP,kBAAkB,GAOnB;IACC,MAAM,YAAY,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAA;IACnD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,GAAG,uBAAuB,EAAE,CAAA;IACnF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/C,MAAM,aAAa,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAA;IAC3C,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;QACrD,KAAK,EAAE,MAAM,CAAC,uBAAuB,CAAC,eAAe;KACtD,CAAC,CAAA;IACF,MAAM,EAAE,KA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AE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,uBAAuB,EAAE;YACvB,eAAe,EAAE,MAAM,CAAC,6BAA6B;SACtD;QACD,qBAAqB,EAAE;YACrB,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,mBAAmB,GAAG,mBAAmB;YAChD,YAAY,EAAE,SAAS;SACxB;QACD,kBAAkB,EAAE;YAClB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport {\n AccessibilityActionEvent,\n Platform,\n Pressable,\n StyleProp,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native'\nimport ReanimatedSwipeable, {\n SwipeableMethods,\n} from 'react-native-gesture-handler/ReanimatedSwipeable'\nimport { useConversationsContext } from '../../contexts/conversations_context'\nimport { useTheme, useCreateAndroidRippleColor } from '../../hooks'\nimport {\n useConversationsMarkRead,\n useConversationsMute,\n} from '../../hooks/use_conversations_actions'\nimport { ConversationResource } from '../../types'\nimport { platformPressedOpacityStyle } from '../../utils'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { SwipeableToggleButton } from './swipeable_toggle_button'\n\nexport function ConversationActions({\n children,\n conversation,\n style,\n onPress,\n accessibilityLabel,\n}: {\n children: ReactNode\n conversation: ConversationResource\n onPress: () => void\n style?: StyleProp<ViewStyle>\n accessibilityLabel?: string\n}) {\n const swipeableRef = useRef<SwipeableMethods>(null)\n const styles = useStyles()\n const { activeConversationId, setActiveConversationId } = useConversationsContext()\n const [disabled, setDisabled] = useState(false)\n const overshootLeft = Platform.OS === 'ios'\n const androidRippleColor = useCreateAndroidRippleColor({\n color: styles.swipeableChildContainer.backgroundColor,\n })\n const { muted, setMuted, isPending: isMutedPending } = useConversationsMute({ conversation })\n const {\n read,\n markRead,\n isPending: isMarkReadPending,\n } = useConversationsMarkRead({\n conversation,\n })\n\n const isConversationEmpty = conversation.lastMessageCreatedAt === null\n\n const handleSwipeableClose = useCallback(() => {\n setDisabled(false)\n swipeableRef.current?.close()\n }, [setDisabled])\n\n const handleSwipeableOpen = () => {\n setDisabled(true)\n setActiveConversationId(conversation.id)\n }\n\n const handlePress = useCallback(() => {\n if (disabled || !onPress) return\n onPress()\n }, [disabled, onPress])\n\n const handleMute = useCallback(() => {\n setMuted(!muted)\n handleSwipeableClose()\n }, [muted, handleSwipeableClose, setMuted])\n\n const handleLatestMessageUnread = useCallback(() => {\n markRead(!read)\n handleSwipeableClose()\n }, [read, handleSwipeableClose, markRead])\n\n const readAccessibilityAction = !isConversationEmpty\n ? [\n {\n name: read ? 'markUnread' : 'markRead',\n label: read ? 'Mark unread' : 'Mark read',\n },\n ]\n : []\n\n const accessibilityActions = [\n {\n name: muted ? 'unmute' : 'mute',\n label: muted ? 'Enable' : 'Silence',\n },\n ...readAccessibilityAction,\n ]\n\n const handleAccessibilityAction = useCallback(\n (event: AccessibilityActionEvent) => {\n switch (event.nativeEvent.actionName) {\n case 'markRead':\n handleLatestMessageUnread()\n break\n case 'markUnread':\n handleLatestMessageUnread()\n break\n case 'mute':\n handleMute()\n break\n case 'unmute':\n handleMute()\n break\n }\n },\n [handleLatestMessageUnread, handleMute]\n )\n\n useEffect(() => {\n if (activeConversationId === conversation.id) return\n\n handleSwipeableClose()\n }, [activeConversationId, conversation.id, handleSwipeableClose])\n\n return (\n <ReanimatedSwipeable\n ref={swipeableRef}\n childrenContainerStyle={styles.swipeableChildContainer}\n containerStyle={styles.swipeableContainer}\n overshootFriction={8}\n overshootLeft={overshootLeft}\n overshootRight={false}\n onSwipeableOpenStartDrag={handleSwipeableOpen}\n onSwipeableClose={() => setDisabled(false)}\n renderRightActions={() => <></>}\n renderLeftActions={() => (\n <LeftActions\n isConversationEmpty={isConversationEmpty}\n handleMute={handleMute}\n handleLatestMessageUnread={handleLatestMessageUnread}\n muted={muted}\n read={read}\n isMutedPending={isMutedPending}\n isMarkReadPending={isMarkReadPending}\n />\n )}\n >\n <Pressable\n onPress={handlePress}\n style={({ pressed }) => [style, pressed && platformPressedOpacityStyle]}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole=\"button\"\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={handleAccessibilityAction}\n >\n {children}\n </Pressable>\n </ReanimatedSwipeable>\n )\n}\n\ninterface LeftActionsProps {\n isConversationEmpty: boolean\n handleMute: () => void\n handleLatestMessageUnread: () => void\n muted: boolean\n read: boolean\n isMutedPending: boolean\n isMarkReadPending: boolean\n}\n\nfunction LeftActions({\n isConversationEmpty,\n handleMute,\n handleLatestMessageUnread,\n muted,\n read,\n isMutedPending,\n isMarkReadPending,\n}: LeftActionsProps) {\n const styles = useStyles()\n\n const muteToggleContent = {\n true: { iconName: 'general.bell', label: 'Enable' },\n false: { iconName: 'general.bellMuted', label: 'Silence' },\n } as const\n\n const latestMessageUnreadToggleContent = {\n true: { iconName: 'general.outlinedTextMessage', label: 'Mark read' },\n false: { iconName: 'general.textMessageNotifications', label: 'Mark unread' },\n } as const\n\n return (\n <View style={styles.actionButtonContainer}>\n <SwipeableToggleButton\n loading={isMarkReadPending}\n disabled={isConversationEmpty}\n toggled={!read}\n onPress={handleLatestMessageUnread}\n toggleContent={latestMessageUnreadToggleContent}\n backgroundColor={tokens.fillColorInteractionSwipeDefault}\n />\n <SwipeableToggleButton\n loading={isMutedPending}\n toggled={muted}\n onPress={handleMute}\n toggleContent={muteToggleContent}\n backgroundColor={tokens.fillColorInteractionSwipeSecondary}\n />\n </View>\n )\n}\n\nconst ACTION_BUTTON_WIDTH = 120\nconst ACTION_BUTTON_COUNT = 2\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n swipeableChildContainer: {\n backgroundColor: colors.conversationActionsBackground,\n },\n actionButtonContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n width: ACTION_BUTTON_WIDTH * ACTION_BUTTON_COUNT,\n alignContent: 'stretch',\n },\n swipeableContainer: {\n backgroundColor: colors.surfaceColor090,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"conversation_actions.js","sourceRoot":"","sources":["../../../src/components/conversations/conversation_actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClF,OAAO,EAEL,QAAQ,EACR,SAAS,EAET,UAAU,EACV,IAAI,GAEL,MAAM,cAAc,CAAA;AACrB,OAAO,mBAEN,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAC/D,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAElG,OAAO,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAEjD,MAAM,UAAU,mBAAmB,CAAC,EAClC,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,OAAO,EACP,kBAAkB,GAOnB;IACC,MAAM,YAAY,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAA;IACnD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,GAAG,uBAAuB,EAAE,CAAA;IACnF,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/C,MAAM,aAAa,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAA;IAC3C,MAAM,kBAAkB,GAAG,2BAA2B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AA;AAC/B,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAE7B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,uBAAuB,EAAE;YACvB,eAAe,EAAE,MAAM,CAAC,6BAA6B;SACtD;QACD,qBAAqB,EAAE;YACrB,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,mBAAmB,GAAG,mBAAmB;YAChD,YAAY,EAAE,SAAS;SACxB;QACD,kBAAkB,EAAE;YAClB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'\nimport {\n AccessibilityActionEvent,\n Platform,\n Pressable,\n StyleProp,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native'\nimport ReanimatedSwipeable, {\n SwipeableMethods,\n} from 'react-native-gesture-handler/ReanimatedSwipeable'\nimport { SwipeableToggleButton } from './swipeable_toggle_button'\nimport { useConversationsContext } from '@/contexts/conversations_context'\nimport { useTheme, useCreateAndroidRippleColor } from '@/hooks'\nimport { useConversationsMarkRead, useConversationsMute } from '@/hooks/use_conversations_actions'\nimport { ConversationResource } from '@/types'\nimport { platformPressedOpacityStyle } from '@/utils'\nimport { tokens } from '@/vendor/tapestry/tokens'\n\nexport function ConversationActions({\n children,\n conversation,\n style,\n onPress,\n accessibilityLabel,\n}: {\n children: ReactNode\n conversation: ConversationResource\n onPress: () => void\n style?: StyleProp<ViewStyle>\n accessibilityLabel?: string\n}) {\n const swipeableRef = useRef<SwipeableMethods>(null)\n const styles = useStyles()\n const { activeConversationId, setActiveConversationId } = useConversationsContext()\n const [disabled, setDisabled] = useState(false)\n const overshootLeft = Platform.OS === 'ios'\n const androidRippleColor = useCreateAndroidRippleColor({\n color: styles.swipeableChildContainer.backgroundColor,\n })\n const { muted, setMuted, isPending: isMutedPending } = useConversationsMute({ conversation })\n const {\n read,\n markRead,\n isPending: isMarkReadPending,\n } = useConversationsMarkRead({\n conversation,\n })\n\n const isConversationEmpty = conversation.lastMessageCreatedAt === null\n\n const handleSwipeableClose = useCallback(() => {\n setDisabled(false)\n swipeableRef.current?.close()\n }, [setDisabled])\n\n const handleSwipeableOpen = () => {\n setDisabled(true)\n setActiveConversationId(conversation.id)\n }\n\n const handlePress = useCallback(() => {\n if (disabled || !onPress) return\n onPress()\n }, [disabled, onPress])\n\n const handleMute = useCallback(() => {\n setMuted(!muted)\n handleSwipeableClose()\n }, [muted, handleSwipeableClose, setMuted])\n\n const handleLatestMessageUnread = useCallback(() => {\n markRead(!read)\n handleSwipeableClose()\n }, [read, handleSwipeableClose, markRead])\n\n const readAccessibilityAction = !isConversationEmpty\n ? [\n {\n name: read ? 'markUnread' : 'markRead',\n label: read ? 'Mark unread' : 'Mark read',\n },\n ]\n : []\n\n const accessibilityActions = [\n {\n name: muted ? 'unmute' : 'mute',\n label: muted ? 'Enable' : 'Silence',\n },\n ...readAccessibilityAction,\n ]\n\n const handleAccessibilityAction = useCallback(\n (event: AccessibilityActionEvent) => {\n switch (event.nativeEvent.actionName) {\n case 'markRead':\n handleLatestMessageUnread()\n break\n case 'markUnread':\n handleLatestMessageUnread()\n break\n case 'mute':\n handleMute()\n break\n case 'unmute':\n handleMute()\n break\n }\n },\n [handleLatestMessageUnread, handleMute]\n )\n\n useEffect(() => {\n if (activeConversationId === conversation.id) return\n\n handleSwipeableClose()\n }, [activeConversationId, conversation.id, handleSwipeableClose])\n\n return (\n <ReanimatedSwipeable\n ref={swipeableRef}\n childrenContainerStyle={styles.swipeableChildContainer}\n containerStyle={styles.swipeableContainer}\n overshootFriction={8}\n overshootLeft={overshootLeft}\n overshootRight={false}\n onSwipeableOpenStartDrag={handleSwipeableOpen}\n onSwipeableClose={() => setDisabled(false)}\n renderRightActions={() => <></>}\n renderLeftActions={() => (\n <LeftActions\n isConversationEmpty={isConversationEmpty}\n handleMute={handleMute}\n handleLatestMessageUnread={handleLatestMessageUnread}\n muted={muted}\n read={read}\n isMutedPending={isMutedPending}\n isMarkReadPending={isMarkReadPending}\n />\n )}\n >\n <Pressable\n onPress={handlePress}\n style={({ pressed }) => [style, pressed && platformPressedOpacityStyle]}\n android_ripple={{ color: androidRippleColor, borderless: false, foreground: true }}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole=\"button\"\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={handleAccessibilityAction}\n >\n {children}\n </Pressable>\n </ReanimatedSwipeable>\n )\n}\n\ninterface LeftActionsProps {\n isConversationEmpty: boolean\n handleMute: () => void\n handleLatestMessageUnread: () => void\n muted: boolean\n read: boolean\n isMutedPending: boolean\n isMarkReadPending: boolean\n}\n\nfunction LeftActions({\n isConversationEmpty,\n handleMute,\n handleLatestMessageUnread,\n muted,\n read,\n isMutedPending,\n isMarkReadPending,\n}: LeftActionsProps) {\n const styles = useStyles()\n\n const muteToggleContent = {\n true: { iconName: 'general.bell', label: 'Enable' },\n false: { iconName: 'general.bellMuted', label: 'Silence' },\n } as const\n\n const latestMessageUnreadToggleContent = {\n true: { iconName: 'general.outlinedTextMessage', label: 'Mark read' },\n false: { iconName: 'general.textMessageNotifications', label: 'Mark unread' },\n } as const\n\n return (\n <View style={styles.actionButtonContainer}>\n <SwipeableToggleButton\n loading={isMarkReadPending}\n disabled={isConversationEmpty}\n toggled={!read}\n onPress={handleLatestMessageUnread}\n toggleContent={latestMessageUnreadToggleContent}\n backgroundColor={tokens.fillColorInteractionSwipeDefault}\n />\n <SwipeableToggleButton\n loading={isMutedPending}\n toggled={muted}\n onPress={handleMute}\n toggleContent={muteToggleContent}\n backgroundColor={tokens.fillColorInteractionSwipeSecondary}\n />\n </View>\n )\n}\n\nconst ACTION_BUTTON_WIDTH = 120\nconst ACTION_BUTTON_COUNT = 2\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n swipeableChildContainer: {\n backgroundColor: colors.conversationActionsBackground,\n },\n actionButtonContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n width: ACTION_BUTTON_WIDTH * ACTION_BUTTON_COUNT,\n alignContent: 'stretch',\n },\n swipeableContainer: {\n backgroundColor: colors.surfaceColor090,\n },\n })\n}\n"]}
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_preview.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversation_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"conversation_preview.d.ts","sourceRoot":"","sources":["../../../src/components/conversations/conversation_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAM1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAK9C,UAAU,wBAAwB;IAChC,YAAY,EAAE,oBAAoB,CAAA;IAClC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,eAAO,MAAM,mBAAmB,kDAK7B,wBAAwB,sBAoE1B,CAAA;AAqCD,eAAO,MAAM,2BAA2B,yBAqBvC,CAAA"}
|