@planningcenter/chat-react-native 3.42.2 → 3.42.3-qa-staging.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
- package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_card.js +3 -7
- package/build/components/conversation/attachments/attachment_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +1 -2
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +12 -7
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +6 -23
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -2
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +2 -8
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +2 -12
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +2 -7
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +16 -53
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +3 -13
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/conversation_start_banner.d.ts +1 -2
- package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
- package/build/components/conversation/conversation_start_banner.js +2 -14
- package/build/components/conversation/conversation_start_banner.js.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js +2 -9
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +2 -10
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts +1 -2
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +2 -53
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +1 -2
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +17 -21
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -2
- 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 +2 -2
- 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 -2
- 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 +2 -2
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +5 -6
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +20 -82
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.d.ts +1 -2
- package/build/components/conversation/message_markdown.d.ts.map +1 -1
- package/build/components/conversation/message_markdown.js +8 -16
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +1 -2
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +3 -5
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts +1 -2
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +3 -13
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.d.ts +7 -3
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +11 -11
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_connectors.d.ts +2 -2
- package/build/components/conversation/reply_connectors.d.ts.map +1 -1
- package/build/components/conversation/reply_connectors.js +18 -50
- package/build/components/conversation/reply_connectors.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts +1 -2
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +16 -46
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/system_message.d.ts +1 -2
- package/build/components/conversation/system_message.d.ts.map +1 -1
- package/build/components/conversation/system_message.js +3 -12
- package/build/components/conversation/system_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.d.ts +1 -2
- package/build/components/conversation/typing_indicator.d.ts.map +1 -1
- package/build/components/conversation/typing_indicator.js +3 -13
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +2 -2
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +4 -10
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +2 -3
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +7 -37
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.d.ts +1 -1
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +16 -17
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/conversations_blank_state.d.ts +1 -2
- package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
- package/build/components/conversations/conversations_blank_state.js +2 -12
- package/build/components/conversations/conversations_blank_state.js.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts +1 -2
- package/build/components/conversations/mute_indicator.d.ts.map +1 -1
- package/build/components/conversations/mute_indicator.js +2 -2
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -2
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +3 -10
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.d.ts +1 -2
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
- package/build/components/conversations/unread_count_badge.js +3 -7
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +3 -13
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/adult_requirement_notice.d.ts +1 -2
- package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
- package/build/components/display/adult_requirement_notice.js +2 -4
- package/build/components/display/adult_requirement_notice.js.map +1 -1
- package/build/components/display/avatar.d.ts +1 -2
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +2 -7
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +1 -2
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +2 -9
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts +1 -2
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +6 -37
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/banner.d.ts +3 -3
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +4 -11
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts +2 -2
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +2 -10
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts +1 -2
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +3 -14
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +1 -2
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +3 -15
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/conversation_avatar.d.ts +1 -2
- package/build/components/display/conversation_avatar.d.ts.map +1 -1
- package/build/components/display/conversation_avatar.js +5 -9
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/components/display/emoji_avatar.d.ts +1 -2
- package/build/components/display/emoji_avatar.d.ts.map +1 -1
- package/build/components/display/emoji_avatar.js +2 -12
- package/build/components/display/emoji_avatar.js.map +1 -1
- package/build/components/display/file_attachment_preview.d.ts +1 -1
- package/build/components/display/file_attachment_preview.d.ts.map +1 -1
- package/build/components/display/file_attachment_preview.js +3 -17
- package/build/components/display/file_attachment_preview.js.map +1 -1
- package/build/components/display/heading.d.ts +1 -2
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +2 -4
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +1 -2
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +4 -4
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_avatar.d.ts +1 -2
- package/build/components/display/icon_avatar.d.ts.map +1 -1
- package/build/components/display/icon_avatar.js +2 -12
- package/build/components/display/icon_avatar.js.map +1 -1
- package/build/components/display/icon_button.d.ts +1 -2
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +3 -5
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image.d.ts +1 -2
- package/build/components/display/image.d.ts.map +1 -1
- package/build/components/display/image.js +3 -7
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.d.ts +1 -1
- package/build/components/display/image_attachment_preview.d.ts.map +1 -1
- package/build/components/display/image_attachment_preview.js +2 -7
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/keyboard_view.d.ts +1 -2
- package/build/components/display/keyboard_view.d.ts.map +1 -1
- package/build/components/display/keyboard_view.js +4 -9
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/components/display/person.d.ts +1 -2
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +2 -12
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +5 -10
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/pressable_row.d.ts +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/pressable_row.js +2 -7
- package/build/components/display/pressable_row.js.map +1 -1
- package/build/components/display/spinner.d.ts +1 -2
- package/build/components/display/spinner.d.ts.map +1 -1
- package/build/components/display/spinner.js +3 -9
- package/build/components/display/spinner.js.map +1 -1
- package/build/components/display/switch.d.ts +1 -2
- package/build/components/display/switch.d.ts.map +1 -1
- package/build/components/display/switch.js +2 -2
- package/build/components/display/switch.js.map +1 -1
- package/build/components/display/tabs.d.ts +1 -1
- package/build/components/display/tabs.d.ts.map +1 -1
- package/build/components/display/tabs.js +21 -31
- package/build/components/display/tabs.js.map +1 -1
- package/build/components/display/text.d.ts +1 -2
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +2 -4
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_button.d.ts +1 -2
- package/build/components/display/text_button.d.ts.map +1 -1
- package/build/components/display/text_button.js +3 -8
- package/build/components/display/text_button.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts +1 -2
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +4 -5
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/text_input.d.ts +1 -1
- package/build/components/display/text_input.d.ts.map +1 -1
- package/build/components/display/text_input.js +2 -1
- package/build/components/display/text_input.js.map +1 -1
- package/build/components/display/toggle_button.d.ts +1 -2
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +3 -9
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/video_attachment_preview.d.ts +1 -1
- package/build/components/display/video_attachment_preview.d.ts.map +1 -1
- package/build/components/display/video_attachment_preview.js +3 -20
- 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 +4 -14
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/page/component_error_boundary.d.ts +2 -2
- package/build/components/page/component_error_boundary.d.ts.map +1 -1
- package/build/components/page/component_error_boundary.js +2 -4
- package/build/components/page/component_error_boundary.js.map +1 -1
- package/build/components/page/loading.d.ts +1 -2
- package/build/components/page/loading.d.ts.map +1 -1
- package/build/components/page/loading.js +2 -4
- package/build/components/page/loading.js.map +1 -1
- package/build/components/page/page_error_boundary.d.ts +2 -2
- package/build/components/page/page_error_boundary.d.ts.map +1 -1
- package/build/components/page/page_error_boundary.js +11 -32
- package/build/components/page/page_error_boundary.js.map +1 -1
- package/build/components/primitive/avatar_primitive.js +14 -41
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.js +10 -18
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/blank_state_primitive.js +8 -12
- package/build/components/primitive/blank_state_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +9 -22
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.d.ts +1 -1
- package/build/components/safe_area_modal.d.ts.map +1 -1
- package/build/components/safe_area_modal.js +2 -3
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.d.ts +1 -2
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +3 -5
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +1 -1
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +2 -1
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversation_context.d.ts +2 -2
- package/build/contexts/conversation_context.d.ts.map +1 -1
- package/build/contexts/conversation_context.js +3 -2
- package/build/contexts/conversation_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 +3 -2
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts +1 -1
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +3 -2
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/direct_messages/find_direct_message_conversation.d.ts +14 -0
- package/build/hooks/direct_messages/find_direct_message_conversation.d.ts.map +1 -0
- package/build/hooks/direct_messages/find_direct_message_conversation.js +10 -0
- package/build/hooks/direct_messages/find_direct_message_conversation.js.map +1 -0
- package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts +16 -0
- package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts.map +1 -0
- package/build/hooks/direct_messages/resolve_message_available_members_link.js +24 -0
- package/build/hooks/direct_messages/resolve_message_available_members_link.js.map +1 -0
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.d.ts.map +1 -1
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js +1 -8
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js.map +1 -1
- package/build/hooks/direct_messages/use_message_available_members.d.ts +6 -0
- package/build/hooks/direct_messages/use_message_available_members.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_message_available_members.js +40 -0
- package/build/hooks/direct_messages/use_message_available_members.js.map +1 -0
- package/build/hooks/direct_messages/use_message_available_members_action.d.ts +6 -0
- package/build/hooks/direct_messages/use_message_available_members_action.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_message_available_members_action.js +30 -0
- package/build/hooks/direct_messages/use_message_available_members_action.js.map +1 -0
- package/build/hooks/use_animated_message_background_color.d.ts +2 -2
- package/build/hooks/use_conversation.d.ts +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +1 -0
- package/build/hooks/use_conversation.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_conversations_actions.d.ts +36 -36
- package/build/hooks/use_person_settings.d.ts +1 -1
- package/build/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js.map +1 -1
- package/build/navigation/chat_access_gate.d.ts +2 -2
- package/build/navigation/chat_access_gate.d.ts.map +1 -1
- package/build/navigation/chat_access_gate.js +6 -5
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +35 -36
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +19 -21
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.d.ts +2 -2
- package/build/navigation/screenLayout.d.ts.map +1 -1
- package/build/navigation/screenLayout.js +3 -9
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/EventTarget.d.ts +1 -1
- package/build/polyfills/events/EventTarget.d.ts.map +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts +1 -2
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +3 -46
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts +1 -2
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +2 -25
- 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 +1 -2
- 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 +6 -25
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts +1 -2
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +3 -5
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts +1 -2
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.js +9 -36
- package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.js +5 -9
- package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
- package/build/screens/avatar_picker/color_picker.d.ts +1 -2
- package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
- package/build/screens/avatar_picker/color_picker.js +4 -5
- package/build/screens/avatar_picker/color_picker.js.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.d.ts +1 -2
- package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.js +12 -13
- package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
- package/build/screens/avatar_picker/icon_grid.d.ts +1 -2
- package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
- package/build/screens/avatar_picker/icon_grid.js +4 -5
- package/build/screens/avatar_picker/icon_grid.js.map +1 -1
- package/build/screens/avatar_picker/upload_tab.d.ts +1 -2
- package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/upload_tab.js +3 -4
- package/build/screens/avatar_picker/upload_tab.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +1 -2
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +11 -117
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.d.ts +1 -2
- package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +4 -20
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts +1 -2
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +43 -106
- 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 +3 -9
- 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 +2 -12
- 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 +1 -2
- 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 +20 -44
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts +1 -2
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +10 -11
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +6 -6
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +7 -34
- 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 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +1 -2
- 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/team_filters.d.ts +1 -2
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +2 -2
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts +1 -2
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +4 -16
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts +2 -3
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.js +6 -16
- package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts +3 -4
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +22 -46
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +2 -3
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +4 -6
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +1 -2
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +4 -20
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -2
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +4 -30
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts +1 -2
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +27 -61
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js +2 -3
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +1 -2
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js +4 -4
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts +1 -2
- package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +4 -6
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +2 -3
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +26 -65
- 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 +2 -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.d.ts +1 -2
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +2 -15
- 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 -2
- 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 +2 -14
- 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 +2 -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.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +2 -5
- 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 +1 -2
- 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 -11
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +24 -85
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +1 -2
- 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 +7 -14
- 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 +1 -2
- 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 +15 -18
- 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 -0
- 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 +1 -2
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +3 -10
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.d.ts +1 -2
- package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.js +3 -4
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -2
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +3 -5
- package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts +1 -2
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +19 -42
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +1 -2
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +2 -6
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.d.ts +1 -2
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +35 -558
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/get_help_screen.js +4 -25
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.d.ts +1 -2
- package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/group_notification_level_select_screen.js +2 -4
- package/build/screens/group_notification_level_select_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.d.ts +1 -2
- package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
- package/build/screens/group_notification_settings_screen.js +3 -25
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +1 -2
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +12 -28
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +1 -2
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -22
- package/build/screens/message_report/components/message_preview.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -2
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
- package/build/screens/message_report/components/report_reason_list.js +4 -13
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +1 -2
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +9 -61
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts +1 -2
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +2 -5
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.d.ts +1 -2
- package/build/screens/notification_settings_screen.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.js +28 -66
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts +1 -2
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +3 -21
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.d.ts +1 -2
- package/build/screens/reactions_screen.d.ts.map +1 -1
- package/build/screens/reactions_screen.js +7 -19
- package/build/screens/reactions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +1 -2
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.js +5 -31
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/settings_screen.d.ts +1 -2
- package/build/screens/settings_screen.d.ts.map +1 -1
- package/build/screens/settings_screen.js +4 -26
- package/build/screens/settings_screen.js.map +1 -1
- package/build/screens/system_message_people_screen.d.ts +1 -2
- package/build/screens/system_message_people_screen.d.ts.map +1 -1
- package/build/screens/system_message_people_screen.js +4 -10
- package/build/screens/system_message_people_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.d.ts +1 -1
- package/build/screens/team_conversation_screen.d.ts.map +1 -1
- package/build/screens/team_conversation_screen.js +4 -12
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/types/resources/direct_message_candidate.d.ts +1 -0
- package/build/types/resources/direct_message_candidate.d.ts.map +1 -1
- package/build/types/resources/direct_message_candidate.js.map +1 -1
- package/build/types/resources/member.d.ts +1 -0
- package/build/types/resources/member.d.ts.map +1 -1
- package/build/types/resources/member.js.map +1 -1
- package/build/types/resources/member_ability.d.ts +1 -0
- package/build/types/resources/member_ability.d.ts.map +1 -1
- package/build/types/resources/member_ability.js.map +1 -1
- package/build/utils/sha_256.js.map +1 -1
- package/build/utils/system_messages.d.ts +1 -1
- package/build/utils/system_messages.d.ts.map +1 -1
- package/build/utils/system_messages.js.map +1 -1
- package/build/utils/theme.d.ts +2 -2
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +6 -3
- package/build/utils/theme.js.map +1 -1
- package/package.json +12 -12
- package/src/__tests__/hooks/resolve_message_available_members_link.test.ts +72 -0
- package/src/__tests__/hooks/use_attachment_uploader.test.tsx +1 -0
- package/src/__tests__/hooks/use_font_scale.test.ts +7 -3
- package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
- package/src/__tests__/utils/system_messages.ts +1 -1
- package/src/__tests__/utils/uri.ts +8 -50
- package/src/__utils__/handlers.ts +5 -6
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +10 -3
- package/src/components/conversation/messages_disabled_banners.tsx +31 -4
- package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
- package/src/components/page/__tests__/error_boundary.test.tsx +6 -2
- package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
- package/src/hooks/direct_messages/find_direct_message_conversation.ts +16 -0
- package/src/hooks/direct_messages/resolve_message_available_members_link.ts +42 -0
- package/src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts +2 -11
- package/src/hooks/direct_messages/use_message_available_members.ts +65 -0
- package/src/hooks/direct_messages/use_message_available_members_action.ts +34 -0
- package/src/hooks/use_conversation.ts +1 -0
- package/src/index.tsx +2 -1
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/screens/conversation_screen.tsx +9 -1
- package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +18 -4
- package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -0
- package/src/types/resources/direct_message_candidate.ts +5 -0
- package/src/types/resources/member.ts +1 -0
- package/src/types/resources/member_ability.ts +1 -0
- package/src/utils/sha_256.ts +24 -24
- package/src/utils/system_messages.ts +1 -1
- package/src/utils/theme.ts +9 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function resolveMessageAvailableMembersLink({ availableMembers, existingConversations, canMessageAvailableMembers, }) {
|
|
2
|
+
if (availableMembers.length === 0 || !existingConversations)
|
|
3
|
+
return undefined;
|
|
4
|
+
const label = availableMembers.length === 1
|
|
5
|
+
? `Message ${availableMembers[0].name.split(' ')[0]}`
|
|
6
|
+
: `Message the remaining ${availableMembers.length} people`;
|
|
7
|
+
const existingConversation = existingConversations[0];
|
|
8
|
+
if (existingConversation) {
|
|
9
|
+
return existingConversation.disabled
|
|
10
|
+
? undefined
|
|
11
|
+
: { label, existingConversationId: Number(existingConversation.id) };
|
|
12
|
+
}
|
|
13
|
+
if (!canMessageAvailableMembers)
|
|
14
|
+
return undefined;
|
|
15
|
+
return {
|
|
16
|
+
label,
|
|
17
|
+
recipients: availableMembers.map(m => ({
|
|
18
|
+
id: m.id.toString(),
|
|
19
|
+
name: m.name,
|
|
20
|
+
avatar: m.avatar,
|
|
21
|
+
})),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=resolve_message_available_members_link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve_message_available_members_link.js","sourceRoot":"","sources":["../../../src/hooks/direct_messages/resolve_message_available_members_link.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,kCAAkC,CAAC,EACjD,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,GAK3B;IACC,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,qBAAqB;QAAE,OAAO,SAAS,CAAA;IAE7E,MAAM,KAAK,GACT,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAC3B,CAAC,CAAC,WAAW,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;QACrD,CAAC,CAAC,yBAAyB,gBAAgB,CAAC,MAAM,SAAS,CAAA;IAE/D,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;IACrD,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,oBAAoB,CAAC,QAAQ;YAClC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,EAAE,KAAK,EAAE,sBAAsB,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,CAAA;IACxE,CAAC;IAED,IAAI,CAAC,0BAA0B;QAAE,OAAO,SAAS,CAAA;IAEjD,OAAO;QACL,KAAK;QACL,UAAU,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACrC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE;YACnB,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,MAAM,EAAE,CAAC,CAAC,MAAM;SACjB,CAAC,CAAC;KACJ,CAAA;AACH,CAAC","sourcesContent":["import { ConversationResource } from '../../types'\nimport { PreselectedDirectMessagePerson } from '../../types/resources/direct_message_candidate'\nimport { MemberResource } from '../../types/resources/member'\n\nexport type MessageAvailableMembersLink =\n | { label: string; existingConversationId: number }\n | { label: string; recipients: PreselectedDirectMessagePerson[] }\n\nexport function resolveMessageAvailableMembersLink({\n availableMembers,\n existingConversations,\n canMessageAvailableMembers,\n}: {\n availableMembers: Pick<MemberResource, 'id' | 'name' | 'avatar'>[]\n existingConversations: Pick<ConversationResource, 'id' | 'disabled'>[] | undefined\n canMessageAvailableMembers: boolean\n}): MessageAvailableMembersLink | undefined {\n if (availableMembers.length === 0 || !existingConversations) return undefined\n\n const label =\n availableMembers.length === 1\n ? `Message ${availableMembers[0].name.split(' ')[0]}`\n : `Message the remaining ${availableMembers.length} people`\n\n const existingConversation = existingConversations[0]\n if (existingConversation) {\n return existingConversation.disabled\n ? undefined\n : { label, existingConversationId: Number(existingConversation.id) }\n }\n\n if (!canMessageAvailableMembers) return undefined\n\n return {\n label,\n recipients: availableMembers.map(m => ({\n id: m.id.toString(),\n name: m.name,\n avatar: m.avatar,\n })),\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_find_or_create_direct_message_conversation.d.ts","sourceRoot":"","sources":["../../../src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"use_find_or_create_direct_message_conversation.d.ts","sourceRoot":"","sources":["../../../src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAe/D,UAAU,KAAK;IACb,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,SAAS,EAAE,CAAC,cAAc,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,IAAI,CAAA;CAChE;AAED,wBAAgB,wCAAwC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,KAAK;+CAchE,MAAM,EAAE;;;;EAoBlC"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import { useState, useCallback } from 'react';
|
|
3
3
|
import { useApiClient } from '../use_api_client';
|
|
4
|
-
|
|
5
|
-
url: '/me/conversations',
|
|
6
|
-
data: {
|
|
7
|
-
fields: { Conversation: ['title'] },
|
|
8
|
-
filter: 'with_exact_direct_message_participants',
|
|
9
|
-
participant_ids: participantIds.join(','),
|
|
10
|
-
},
|
|
11
|
-
});
|
|
4
|
+
import { findDirectMessageConversation } from './find_direct_message_conversation';
|
|
12
5
|
const createDirectMessageConversation = (apiClient, ids) => apiClient.chat.post({
|
|
13
6
|
url: '/me/direct_messages',
|
|
14
7
|
data: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_find_or_create_direct_message_conversation.js","sourceRoot":"","sources":["../../../src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAa,YAAY,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"use_find_or_create_direct_message_conversation.js","sourceRoot":"","sources":["../../../src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAa,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAA;AAElF,MAAM,+BAA+B,GAAG,CAAC,SAAoB,EAAE,GAAa,EAAE,EAAE,CAC9E,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;IAClB,GAAG,EAAE,qBAAqB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,IAAI,EAAE,eAAe;YACrB,UAAU,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE;SAChC;KACF;CACF,CAA+C,CAAA;AAOlD,MAAM,UAAU,wCAAwC,CAAC,EAAE,YAAY,EAAE,SAAS,EAAS;IACzF,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK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AAS,EAAE,OAAO,EAAE,CAAA;AAC9E,CAAC","sourcesContent":["import { useQuery } from '@tanstack/react-query'\nimport { useState, useCallback } from 'react'\nimport { ApiResource, ConversationResource } from '../../types'\nimport { ApiClient, useApiClient } from '../use_api_client'\nimport { findDirectMessageConversation } from './find_direct_message_conversation'\n\nconst createDirectMessageConversation = (apiClient: ApiClient, ids: string[]) =>\n apiClient.chat.post({\n url: '/me/direct_messages',\n data: {\n data: {\n type: 'DirectMessage',\n attributes: { recipients: ids },\n },\n },\n }) as Promise<ApiResource<ConversationResource>>\n\ninterface Props {\n recipientIds: string[]\n onSuccess: (conversationId: ConversationResource['id']) => void\n}\n\nexport function useFindOrCreateDirectMessageConversation({ recipientIds, onSuccess }: Props) {\n const apiClient = useApiClient()\n const [isFinding, setIsFinding] = useState(false)\n const [isError, setIsError] = useState(false)\n\n const { data } = useQuery({\n queryKey: ['chat', '/me/conversations', 'with_exact_direct_message_participants', recipientIds],\n queryFn: () => findDirectMessageConversation(apiClient, recipientIds),\n enabled: recipientIds.length > 0,\n })\n\n const directMessageExists = (data?.data.length ?? 0) > 0\n\n const findOrCreateConversation = useCallback(\n async (participantIds: string[]) => {\n setIsFinding(true)\n setIsError(false)\n try {\n const findResponse = await findDirectMessageConversation(apiClient, participantIds)\n if (findResponse.data.length > 0) {\n onSuccess(findResponse.data[0].id)\n } else {\n const createResponse = await createDirectMessageConversation(apiClient, participantIds)\n onSuccess(createResponse.data.id)\n }\n } catch {\n setIsError(true)\n setIsFinding(false)\n }\n },\n [apiClient, onSuccess]\n )\n\n return { findOrCreateConversation, directMessageExists, isFinding, isError }\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ConversationResource } from '../../types';
|
|
2
|
+
import { MessageAvailableMembersLink } from './resolve_message_available_members_link';
|
|
3
|
+
export declare function useMessageAvailableMembers(conversation: ConversationResource, { enabled }: {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
}): MessageAvailableMembersLink | undefined;
|
|
6
|
+
//# sourceMappingURL=use_message_available_members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_message_available_members.d.ts","sourceRoot":"","sources":["../../../src/hooks/direct_messages/use_message_available_members.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAUlD,OAAO,EACL,2BAA2B,EAE5B,MAAM,0CAA0C,CAAA;AAEjD,wBAAgB,0BAA0B,CACxC,YAAY,EAAE,oBAAoB,EAClC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAChC,2BAA2B,GAAG,SAAS,CA4CzC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useQuery } from '@tanstack/react-query';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useApiGet } from '../use_api';
|
|
4
|
+
import { useApiClient } from '../use_api_client';
|
|
5
|
+
import { useCurrentPerson } from '../use_current_person';
|
|
6
|
+
import { getRequestQueryKey } from '../use_suspense_api';
|
|
7
|
+
import { findDirectMessageConversation, getFindDirectMessageConversationRequestArgs, } from './find_direct_message_conversation';
|
|
8
|
+
import { resolveMessageAvailableMembersLink, } from './resolve_message_available_members_link';
|
|
9
|
+
export function useMessageAvailableMembers(conversation, { enabled }) {
|
|
10
|
+
const apiClient = useApiClient();
|
|
11
|
+
const currentPerson = useCurrentPerson();
|
|
12
|
+
const { data: members } = useApiGet({
|
|
13
|
+
url: `/me/conversations/${conversation.id}/members`,
|
|
14
|
+
data: { fields: { Member: ['name', 'avatar', 'direct_messages_disabled'] } },
|
|
15
|
+
}, { enabled });
|
|
16
|
+
const availableMembers = useMemo(() => {
|
|
17
|
+
if (!enabled || !members)
|
|
18
|
+
return [];
|
|
19
|
+
const currentMember = members.find(m => m.id === currentPerson.id);
|
|
20
|
+
if (currentMember?.directMessagesDisabled)
|
|
21
|
+
return [];
|
|
22
|
+
return members.filter(m => m.id !== currentPerson.id && !m.directMessagesDisabled);
|
|
23
|
+
}, [enabled, members, currentPerson.id]);
|
|
24
|
+
const availablePersonIds = useMemo(() => availableMembers.map(m => m.id), [availableMembers]);
|
|
25
|
+
const { data: existingDirectMessageData } = useQuery({
|
|
26
|
+
queryKey: getRequestQueryKey(getFindDirectMessageConversationRequestArgs(availablePersonIds.map(String))),
|
|
27
|
+
queryFn: () => findDirectMessageConversation(apiClient, availablePersonIds.map(String)),
|
|
28
|
+
enabled: availablePersonIds.length > 0,
|
|
29
|
+
});
|
|
30
|
+
return useMemo(() => resolveMessageAvailableMembersLink({
|
|
31
|
+
availableMembers,
|
|
32
|
+
existingConversations: existingDirectMessageData?.data,
|
|
33
|
+
canMessageAvailableMembers: !!conversation.memberAbility?.canMessageAvailableMembers,
|
|
34
|
+
}), [
|
|
35
|
+
availableMembers,
|
|
36
|
+
existingDirectMessageData,
|
|
37
|
+
conversation.memberAbility?.canMessageAvailableMembers,
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=use_message_available_members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_message_available_members.js","sourceRoot":"","sources":["../../../src/hooks/direct_messages/use_message_available_members.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EACL,6BAA6B,EAC7B,2CAA2C,GAC5C,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAEL,kCAAkC,GACnC,MAAM,0CAA0C,CAAA;AAEjD,MAAM,UAAU,0BAA0B,CACx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M,CAAC,CAAC,CAC5E;QACD,OAAO,EAAE,GAAG,EAAE,CAAC,6BAA6B,CAAC,SAAS,EAAE,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACvF,OAAO,EAAE,kBAAkB,CAAC,MAAM,GAAG,CAAC;KACvC,CAAC,CAAA;IAEF,OAAO,OAAO,CACZ,GAAG,EAAE,CACH,kCAAkC,CAAC;QACjC,gBAAgB;QAChB,qBAAqB,EAAE,yBAAyB,EAAE,IAAI;QACtD,0BAA0B,EAAE,CAAC,CAAC,YAAY,CAAC,aAAa,EAAE,0BAA0B;KACrF,CAAC,EACJ;QACE,gBAAgB;QAChB,yBAAyB;QACzB,YAAY,CAAC,aAAa,EAAE,0BAA0B;KACvD,CACF,CAAA;AACH,CAAC","sourcesContent":["import { useQuery } from '@tanstack/react-query'\nimport { useMemo } from 'react'\nimport { ConversationResource } from '../../types'\nimport { MemberResource } from '../../types/resources/member'\nimport { useApiGet } from '../use_api'\nimport { useApiClient } from '../use_api_client'\nimport { useCurrentPerson } from '../use_current_person'\nimport { getRequestQueryKey } from '../use_suspense_api'\nimport {\n findDirectMessageConversation,\n getFindDirectMessageConversationRequestArgs,\n} from './find_direct_message_conversation'\nimport {\n MessageAvailableMembersLink,\n resolveMessageAvailableMembersLink,\n} from './resolve_message_available_members_link'\n\nexport function useMessageAvailableMembers(\n conversation: ConversationResource,\n { enabled }: { enabled: boolean }\n): MessageAvailableMembersLink | undefined {\n const apiClient = useApiClient()\n const currentPerson = useCurrentPerson()\n\n const { data: members } = useApiGet<MemberResource[]>(\n {\n url: `/me/conversations/${conversation.id}/members`,\n data: { fields: { Member: ['name', 'avatar', 'direct_messages_disabled'] } },\n },\n { enabled }\n )\n\n const availableMembers = useMemo(() => {\n if (!enabled || !members) return []\n\n const currentMember = members.find(m => m.id === currentPerson.id)\n if (currentMember?.directMessagesDisabled) return []\n\n return members.filter(m => m.id !== currentPerson.id && !m.directMessagesDisabled)\n }, [enabled, members, currentPerson.id])\n\n const availablePersonIds = useMemo(() => availableMembers.map(m => m.id), [availableMembers])\n\n const { data: existingDirectMessageData } = useQuery({\n queryKey: getRequestQueryKey(\n getFindDirectMessageConversationRequestArgs(availablePersonIds.map(String))\n ),\n queryFn: () => findDirectMessageConversation(apiClient, availablePersonIds.map(String)),\n enabled: availablePersonIds.length > 0,\n })\n\n return useMemo(\n () =>\n resolveMessageAvailableMembersLink({\n availableMembers,\n existingConversations: existingDirectMessageData?.data,\n canMessageAvailableMembers: !!conversation.memberAbility?.canMessageAvailableMembers,\n }),\n [\n availableMembers,\n existingDirectMessageData,\n conversation.memberAbility?.canMessageAvailableMembers,\n ]\n )\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ConversationResource } from '../../types';
|
|
2
|
+
export declare function useMessageAvailableMembersAction(conversation: ConversationResource): {
|
|
3
|
+
label: string;
|
|
4
|
+
onPress: () => void;
|
|
5
|
+
} | undefined;
|
|
6
|
+
//# sourceMappingURL=use_message_available_members_action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_message_available_members_action.d.ts","sourceRoot":"","sources":["../../../src/hooks/direct_messages/use_message_available_members_action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAGlD,wBAAgB,gCAAgC,CAAC,YAAY,EAAE,oBAAoB;;;cA6BlF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StackActions, useNavigation } from '@react-navigation/native';
|
|
2
|
+
import { useMessageAvailableMembers } from './use_message_available_members';
|
|
3
|
+
export function useMessageAvailableMembersAction(conversation) {
|
|
4
|
+
const navigation = useNavigation();
|
|
5
|
+
const isDmDisabled = !!conversation.disabled && conversation.disabledReason === 'direct_messages_disabled';
|
|
6
|
+
const messageAvailableMembersLink = useMessageAvailableMembers(conversation, {
|
|
7
|
+
enabled: isDmDisabled,
|
|
8
|
+
});
|
|
9
|
+
if (!messageAvailableMembersLink)
|
|
10
|
+
return undefined;
|
|
11
|
+
return {
|
|
12
|
+
label: messageAvailableMembersLink.label,
|
|
13
|
+
onPress: () => {
|
|
14
|
+
if ('existingConversationId' in messageAvailableMembersLink) {
|
|
15
|
+
// replace instead of navigate/push so the disabled conversation isn't
|
|
16
|
+
// left in the back stack as a dead end
|
|
17
|
+
navigation.dispatch(StackActions.replace('Conversation', {
|
|
18
|
+
conversation_id: messageAvailableMembersLink.existingConversationId,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
navigation.navigate('New', {
|
|
23
|
+
screen: 'ConversationSelectDirectMessageRecipients',
|
|
24
|
+
params: { preselected_people: messageAvailableMembersLink.recipients },
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=use_message_available_members_action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_message_available_members_action.js","sourceRoot":"","sources":["../../../src/hooks/direct_messages/use_message_available_members_action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAE5E,MAAM,UAAU,gCAAgC,CAAC,YAAkC;IACjF,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,YAAY,GAChB,CAAC,CAAC,YAAY,CAAC,QAAQ,IAAI,YAAY,CAAC,cAAc,KAAK,0BAA0B,CAAA;IACvF,MAAM,2BAA2B,GAAG,0BAA0B,CAAC,YAAY,EAAE;QAC3E,OAAO,EAAE,YAAY;KACtB,CAAC,CAAA;IAEF,IAAI,CAAC,2BAA2B;QAAE,OAAO,SAAS,CAAA;IAElD,OAAO;QACL,KAAK,EAAE,2BAA2B,CAAC,KAAK;QACxC,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,wBAAwB,IAAI,2BAA2B,EAAE,CAAC;gBAC5D,sEAAsE;gBACtE,uCAAuC;gBACvC,UAAU,CAAC,QAAQ,CACjB,YAAY,CAAC,OAAO,CAAC,cAAc,EAAE;oBACnC,eAAe,EAAE,2BAA2B,CAAC,sBAAsB;iBACpE,CAAC,CACH,CAAA;YACH,CAAC;iBAAM,CAAC;gBACN,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE;oBACzB,MAAM,EAAE,2CAA2C;oBACnD,MAAM,EAAE,EAAE,kBAAkB,EAAE,2BAA2B,CAAC,UAAU,EAAE;iBACvE,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["import { StackActions, useNavigation } from '@react-navigation/native'\nimport { ConversationResource } from '../../types'\nimport { useMessageAvailableMembers } from './use_message_available_members'\n\nexport function useMessageAvailableMembersAction(conversation: ConversationResource) {\n const navigation = useNavigation()\n const isDmDisabled =\n !!conversation.disabled && conversation.disabledReason === 'direct_messages_disabled'\n const messageAvailableMembersLink = useMessageAvailableMembers(conversation, {\n enabled: isDmDisabled,\n })\n\n if (!messageAvailableMembersLink) return undefined\n\n return {\n label: messageAvailableMembersLink.label,\n onPress: () => {\n if ('existingConversationId' in messageAvailableMembersLink) {\n // replace instead of navigate/push so the disabled conversation isn't\n // left in the back stack as a dead end\n navigation.dispatch(\n StackActions.replace('Conversation', {\n conversation_id: messageAvailableMembersLink.existingConversationId,\n })\n )\n } else {\n navigation.navigate('New', {\n screen: 'ConversationSelectDirectMessageRecipients',\n params: { preselected_people: messageAvailableMembersLink.recipients },\n })\n }\n },\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function useAnimatedMessageBackgroundColor(): {
|
|
2
|
-
animatedBackgroundColor: {
|
|
2
|
+
animatedBackgroundColor: import("react-native-reanimated/lib/typescript/hook/commonTypes").AnimatedStyleHandle<{
|
|
3
3
|
backgroundColor: string;
|
|
4
|
-
}
|
|
4
|
+
}>;
|
|
5
5
|
handleMessagePressIn: () => void;
|
|
6
6
|
handleMessagePressOut: () => void;
|
|
7
7
|
};
|
|
@@ -121,7 +121,7 @@ export declare const useConversationMute: ({ conversation_id }: {
|
|
|
121
121
|
};
|
|
122
122
|
export declare const useConversationUpdate: ({ conversation_id }: {
|
|
123
123
|
conversation_id: number;
|
|
124
|
-
}) => import("@tanstack/react-query").UseMutationResult<ApiResource<ConversationResource>, Error, Partial<ConversationResource>,
|
|
124
|
+
}) => import("@tanstack/react-query").UseMutationResult<ApiResource<ConversationResource>, Error, Partial<ConversationResource>, Promise<undefined> | undefined>;
|
|
125
125
|
export declare const useConversationDelete: ({ conversation_id }: {
|
|
126
126
|
conversation_id: number;
|
|
127
127
|
}) => import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_conversation.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAO5D,eAAO,MAAM,0BAA0B,GAAI,qBAAqB;IAAE,eAAe,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"use_conversation.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAO5D,eAAO,MAAM,0BAA0B,GAAI,qBAAqB;IAAE,eAAe,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;CA4DzF,CAAA;AAEF,eAAO,MAAM,eAAe,GAAI,qBAAqB;IAAE,eAAe,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/E,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,qBAAqB;IAAE,eAAe,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;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3C,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ,IAAI,EAAE,cAAc;wBACpB,UAAU,EAAE;4BACV,gBAAgB,EAAE,eAAe;yBAClC;qBACF;iBACF;aACF,CAAC,CAAA;QACJ,CAAC;QACD,SAAS,EAAE,CAAC,QAA2C,EAAE,EAAE;YACzD,WAAW,CAAC,YAAY,CAAoC,QAAQ,EAAE,IAAI,CAAC,EAAE;gBAC3E,IAAI,CAAC,IAAI,EAAE,IAAI;oBAAE,OAAO,IAAI,CAAA;gBAE5B,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAA;gBACzD,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;gBAEvC,OAAO,IAAI,CAAA;YACb,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,QAAQ,EAAE,CAAA;AACpE,CAAC,CAAA","sourcesContent":["import { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { useState } from 'react'\nimport { ApiResource, ConversationResource } from '../types'\nimport { transformGetToPost } from '../utils/client/request_helpers'\nimport { Haptic } from '../utils/native_adapters'\nimport { getConversationsRequestArgs } from '../utils/request/conversation'\nimport { useApiClient } from './use_api_client'\nimport { getRequestQueryKey, useSuspenseGet } from './use_suspense_api'\n\nexport const getConversationRequestArgs = ({ conversation_id }: { conversation_id: number }) => ({\n url: `/me/conversations/${conversation_id}`,\n data: {\n fields: {\n Conversation: [\n 'analytics_metadata',\n 'created_at',\n 'badges',\n 'conversation_membership',\n 'conversation_preview',\n 'gender_option',\n 'groups',\n 'last_message_author_id',\n 'last_message_author_name',\n 'last_message_created_at',\n 'last_message_text_preview',\n 'latest_read_message_sort_key',\n 'preview_avatar_urls',\n 'custom_avatar_type',\n 'custom_avatar_key',\n 'custom_avatar_color',\n 'custom_avatar_image_url',\n 'direct_message',\n 'disabled',\n 'disabled_reason',\n 'member_ability',\n 'muted',\n 'replies_disabled',\n 'title',\n 'unread_count',\n 'unread_reaction',\n 'updated_at',\n ],\n AnalyticsMetadata: ['metadata'],\n MemberAbility: [\n 'can_update',\n 'can_delete',\n 'leader',\n 'can_reply',\n 'can_delete_non_authored_messages',\n ],\n ConversationMembership: [\n 'last_read_message_sort_key',\n 'notification_level',\n 'notification_level_description',\n 'notification_level_options',\n 'muted',\n ],\n ConversationBadge: ['app_name', 'pco_resource_type', 'text'],\n Group: ['type', 'id', 'links', 'name', 'source_app_name', 'source_type'],\n },\n include: [\n 'badges',\n 'conversation_membership',\n 'member_ability',\n 'groups',\n 'analytics_metadata',\n ],\n },\n})\n\nexport const useConversation = ({ conversation_id }: { conversation_id: number }) => {\n const args = getConversationRequestArgs({ conversation_id })\n\n return useSuspenseGet<ConversationResource>(args)\n}\n\nexport const useConversationMute = ({ conversation_id }: { conversation_id: number }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const requestArgs = getConversationRequestArgs({ conversation_id })\n const queryKey = getRequestQueryKey(requestArgs)\n const { data: conversation } = useConversation({ conversation_id })\n const [value, setValue] = useState<boolean>(conversation.muted)\n\n const { mutate: setMuted, ...mutation } = useMutation({\n onMutate: async (muted: boolean) => {\n return queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n setValue(muted)\n prev.data.muted = muted\n if (prev.data.conversationMembership) {\n prev.data.conversationMembership.muted = muted\n }\n\n return prev\n })\n },\n mutationKey: ['muteConversation'],\n mutationFn: async (muted: boolean) => {\n const action = muted ? 'mute' : 'unmute'\n\n return apiClient.chat.post<ApiResource<ConversationResource>>({\n url: `/me/conversations/${conversation_id}/${action}`,\n data: { data: { type: '', attributes: {} }, fields: { Conversation: 'muted' } },\n })\n },\n onSuccess: (response: ApiResource<ConversationResource>) => {\n queryClient.invalidateQueries({ queryKey: ['/me/conversations'] })\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n\n // Posting to the mute action endpoint can't return all the fields\n // so we need to set only the fields we require\n prev.data.muted = response.data.muted\n if (prev.data.conversationMembership) {\n prev.data.conversationMembership.muted = response.data.muted\n }\n setValue(response.data.muted)\n\n return prev\n })\n },\n })\n\n return { muted: value, setMuted, ...mutation }\n}\n\nexport const useConversationUpdate = ({ conversation_id }: { conversation_id: number }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const requestArgs = getConversationRequestArgs({ conversation_id })\n const queryKey = getRequestQueryKey(requestArgs)\n\n return useMutation({\n onMutate: async (update: Partial<ConversationResource>) => {\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (prev?.data) {\n prev.data = {\n ...prev.data,\n ...update,\n }\n }\n\n return prev\n })\n },\n mutationKey: ['mutateConversation'],\n mutationFn: async (update: Partial<ConversationResource>) => {\n const postArgs = transformGetToPost(requestArgs).data\n return apiClient.chat.patch<ApiResource<ConversationResource>>({\n url: `/me/conversations/${conversation_id}/`,\n data: { data: { type: '', attributes: update }, ...postArgs },\n })\n },\n onSuccess: response => {\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, () => response)\n },\n })\n}\n\nexport const useConversationDelete = ({ conversation_id }: { conversation_id: number }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const { url } = getConversationsRequestArgs()\n\n return useMutation({\n mutationKey: ['deleteConversation'],\n mutationFn: async () => {\n return apiClient.chat.delete({\n url: `/me/conversations/${conversation_id}`,\n })\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: [url] })\n Haptic.notificationSuccess()\n },\n })\n}\n\nexport const useConversationDisableReplies = ({ conversation_id }: { conversation_id: number }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const requestArgs = getConversationRequestArgs({ conversation_id })\n const queryKey = getRequestQueryKey(requestArgs)\n const { data: conversation } = useConversation({ conversation_id })\n const [value, setValue] = useState<boolean>(conversation.repliesDisabled)\n\n const { mutate: setRepliesDisabled, ...mutation } = useMutation({\n onMutate: async (repliesDisabled: boolean) => {\n return queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n setValue(repliesDisabled)\n prev.data.repliesDisabled = repliesDisabled\n\n return prev\n })\n },\n mutationKey: ['disableRepliesConversation'],\n mutationFn: async (repliesDisabled: boolean) => {\n return apiClient.chat.patch<ApiResource<ConversationResource>>({\n url: `/me/conversations/${conversation_id}`,\n data: {\n data: {\n type: 'Conversation',\n attributes: {\n replies_disabled: repliesDisabled,\n },\n },\n },\n })\n },\n onSuccess: (response: ApiResource<ConversationResource>) => {\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n\n prev.data.repliesDisabled = response.data.repliesDisabled\n setValue(response.data.repliesDisabled)\n\n return prev\n })\n },\n })\n\n return { repliesDisabled: value, setRepliesDisabled, ...mutation }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"use_conversation.js","sourceRoot":"","sources":["../../src/hooks/use_conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEvE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EAAE,eAAe,EAA+B,EAAE,EAAE,CAAC,CAAC;IAC/F,GAAG,EAAE,qBAAqB,eAAe,EAAE;IAC3C,IAAI,EAAE;QACJ,MAAM,E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,CAAC;QAC3C,UAAU,EAAE,KAAK,EAAE,eAAwB,EAAE,EAAE;YAC7C,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,CAAoC;gBAC7D,GAAG,EAAE,qBAAqB,eAAe,EAAE;gBAC3C,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ,IAAI,EAAE,cAAc;wBACpB,UAAU,EAAE;4BACV,gBAAgB,EAAE,eAAe;yBAClC;qBACF;iBACF;aACF,CAAC,CAAA;QACJ,CAAC;QACD,SAAS,EAAE,CAAC,QAA2C,EAAE,EAAE;YACzD,WAAW,CAAC,YAAY,CAAoC,QAAQ,EAAE,IAAI,CAAC,EAAE;gBAC3E,IAAI,CAAC,IAAI,EAAE,IAAI;oBAAE,OAAO,IAAI,CAAA;gBAE5B,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAA;gBACzD,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;gBAEvC,OAAO,IAAI,CAAA;YACb,CAAC,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,QAAQ,EAAE,CAAA;AACpE,CAAC,CAAA","sourcesContent":["import { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { useState } from 'react'\nimport { ApiResource, ConversationResource } from '../types'\nimport { transformGetToPost } from '../utils/client/request_helpers'\nimport { Haptic } from '../utils/native_adapters'\nimport { getConversationsRequestArgs } from '../utils/request/conversation'\nimport { useApiClient } from './use_api_client'\nimport { getRequestQueryKey, useSuspenseGet } from './use_suspense_api'\n\nexport const getConversationRequestArgs = ({ conversation_id }: { conversation_id: number }) => ({\n url: `/me/conversations/${conversation_id}`,\n data: {\n fields: {\n Conversation: [\n 'analytics_metadata',\n 'created_at',\n 'badges',\n 'conversation_membership',\n 'conversation_preview',\n 'gender_option',\n 'groups',\n 'last_message_author_id',\n 'last_message_author_name',\n 'last_message_created_at',\n 'last_message_text_preview',\n 'latest_read_message_sort_key',\n 'preview_avatar_urls',\n 'custom_avatar_type',\n 'custom_avatar_key',\n 'custom_avatar_color',\n 'custom_avatar_image_url',\n 'direct_message',\n 'disabled',\n 'disabled_reason',\n 'member_ability',\n 'muted',\n 'replies_disabled',\n 'title',\n 'unread_count',\n 'unread_reaction',\n 'updated_at',\n ],\n AnalyticsMetadata: ['metadata'],\n MemberAbility: [\n 'can_update',\n 'can_delete',\n 'leader',\n 'can_reply',\n 'can_delete_non_authored_messages',\n 'can_message_available_members',\n ],\n ConversationMembership: [\n 'last_read_message_sort_key',\n 'notification_level',\n 'notification_level_description',\n 'notification_level_options',\n 'muted',\n ],\n ConversationBadge: ['app_name', 'pco_resource_type', 'text'],\n Group: ['type', 'id', 'links', 'name', 'source_app_name', 'source_type'],\n },\n include: [\n 'badges',\n 'conversation_membership',\n 'member_ability',\n 'groups',\n 'analytics_metadata',\n ],\n },\n})\n\nexport const useConversation = ({ conversation_id }: { conversation_id: number }) => {\n const args = getConversationRequestArgs({ conversation_id })\n\n return useSuspenseGet<ConversationResource>(args)\n}\n\nexport const useConversationMute = ({ conversation_id }: { conversation_id: number }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const requestArgs = getConversationRequestArgs({ conversation_id })\n const queryKey = getRequestQueryKey(requestArgs)\n const { data: conversation } = useConversation({ conversation_id })\n const [value, setValue] = useState<boolean>(conversation.muted)\n\n const { mutate: setMuted, ...mutation } = useMutation({\n onMutate: async (muted: boolean) => {\n return queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n setValue(muted)\n prev.data.muted = muted\n if (prev.data.conversationMembership) {\n prev.data.conversationMembership.muted = muted\n }\n\n return prev\n })\n },\n mutationKey: ['muteConversation'],\n mutationFn: async (muted: boolean) => {\n const action = muted ? 'mute' : 'unmute'\n\n return apiClient.chat.post<ApiResource<ConversationResource>>({\n url: `/me/conversations/${conversation_id}/${action}`,\n data: { data: { type: '', attributes: {} }, fields: { Conversation: 'muted' } },\n })\n },\n onSuccess: (response: ApiResource<ConversationResource>) => {\n queryClient.invalidateQueries({ queryKey: ['/me/conversations'] })\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n\n // Posting to the mute action endpoint can't return all the fields\n // so we need to set only the fields we require\n prev.data.muted = response.data.muted\n if (prev.data.conversationMembership) {\n prev.data.conversationMembership.muted = response.data.muted\n }\n setValue(response.data.muted)\n\n return prev\n })\n },\n })\n\n return { muted: value, setMuted, ...mutation }\n}\n\nexport const useConversationUpdate = ({ conversation_id }: { conversation_id: number }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const requestArgs = getConversationRequestArgs({ conversation_id })\n const queryKey = getRequestQueryKey(requestArgs)\n\n return useMutation({\n onMutate: async (update: Partial<ConversationResource>) => {\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (prev?.data) {\n prev.data = {\n ...prev.data,\n ...update,\n }\n }\n\n return prev\n })\n },\n mutationKey: ['mutateConversation'],\n mutationFn: async (update: Partial<ConversationResource>) => {\n const postArgs = transformGetToPost(requestArgs).data\n return apiClient.chat.patch<ApiResource<ConversationResource>>({\n url: `/me/conversations/${conversation_id}/`,\n data: { data: { type: '', attributes: update }, ...postArgs },\n })\n },\n onSuccess: response => {\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, () => response)\n },\n })\n}\n\nexport const useConversationDelete = ({ conversation_id }: { conversation_id: number }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const { url } = getConversationsRequestArgs()\n\n return useMutation({\n mutationKey: ['deleteConversation'],\n mutationFn: async () => {\n return apiClient.chat.delete({\n url: `/me/conversations/${conversation_id}`,\n })\n },\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: [url] })\n Haptic.notificationSuccess()\n },\n })\n}\n\nexport const useConversationDisableReplies = ({ conversation_id }: { conversation_id: number }) => {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const requestArgs = getConversationRequestArgs({ conversation_id })\n const queryKey = getRequestQueryKey(requestArgs)\n const { data: conversation } = useConversation({ conversation_id })\n const [value, setValue] = useState<boolean>(conversation.repliesDisabled)\n\n const { mutate: setRepliesDisabled, ...mutation } = useMutation({\n onMutate: async (repliesDisabled: boolean) => {\n return queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n setValue(repliesDisabled)\n prev.data.repliesDisabled = repliesDisabled\n\n return prev\n })\n },\n mutationKey: ['disableRepliesConversation'],\n mutationFn: async (repliesDisabled: boolean) => {\n return apiClient.chat.patch<ApiResource<ConversationResource>>({\n url: `/me/conversations/${conversation_id}`,\n data: {\n data: {\n type: 'Conversation',\n attributes: {\n replies_disabled: repliesDisabled,\n },\n },\n },\n })\n },\n onSuccess: (response: ApiResource<ConversationResource>) => {\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n\n prev.data.repliesDisabled = response.data.repliesDisabled\n setValue(response.data.repliesDisabled)\n\n return prev\n })\n },\n })\n\n return { repliesDisabled: value, setRepliesDisabled, ...mutation }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiResource, ConversationMembershipResource } from '../types';
|
|
2
2
|
export declare const useConversationMembershipUpdate: ({ conversation_id, }: {
|
|
3
3
|
conversation_id: number;
|
|
4
|
-
}) => import("@tanstack/react-query").UseMutationResult<ApiResource<ConversationMembershipResource>, Error, Partial<ConversationMembershipResource>,
|
|
4
|
+
}) => import("@tanstack/react-query").UseMutationResult<ApiResource<ConversationMembershipResource>, Error, Partial<ConversationMembershipResource>, Promise<undefined> | undefined>;
|
|
5
5
|
//# sourceMappingURL=use_conversation_membership.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_conversation_membership.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation_membership.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAwB,MAAM,UAAU,CAAA;AAO5F,eAAO,MAAM,+BAA+B,GAAI,sBAE7C;IACD,eAAe,EAAE,MAAM,CAAA;CACxB,
|
|
1
|
+
{"version":3,"file":"use_conversation_membership.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation_membership.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAwB,MAAM,UAAU,CAAA;AAO5F,eAAO,MAAM,+BAA+B,GAAI,sBAE7C;IACD,eAAe,EAAE,MAAM,CAAA;CACxB,mLAyCA,CAAA"}
|
|
@@ -11,14 +11,14 @@ export declare const useConversationsMarkRead: ({ conversation, }: {
|
|
|
11
11
|
isSuccess: false;
|
|
12
12
|
status: "idle";
|
|
13
13
|
reset: () => void;
|
|
14
|
-
context:
|
|
14
|
+
context: Promise<undefined> | undefined;
|
|
15
15
|
failureCount: number;
|
|
16
16
|
failureReason: Error | null;
|
|
17
17
|
isPaused: boolean;
|
|
18
18
|
submittedAt: number;
|
|
19
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, boolean,
|
|
19
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, boolean, Promise<undefined> | undefined>;
|
|
20
20
|
read: boolean;
|
|
21
|
-
markRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, boolean,
|
|
21
|
+
markRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, boolean, Promise<undefined> | undefined>;
|
|
22
22
|
} | {
|
|
23
23
|
data: undefined;
|
|
24
24
|
variables: boolean;
|
|
@@ -29,14 +29,14 @@ export declare const useConversationsMarkRead: ({ conversation, }: {
|
|
|
29
29
|
isSuccess: false;
|
|
30
30
|
status: "pending";
|
|
31
31
|
reset: () => void;
|
|
32
|
-
context:
|
|
32
|
+
context: Promise<undefined> | undefined;
|
|
33
33
|
failureCount: number;
|
|
34
34
|
failureReason: Error | null;
|
|
35
35
|
isPaused: boolean;
|
|
36
36
|
submittedAt: number;
|
|
37
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, boolean,
|
|
37
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, boolean, Promise<undefined> | undefined>;
|
|
38
38
|
read: boolean;
|
|
39
|
-
markRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, boolean,
|
|
39
|
+
markRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, boolean, Promise<undefined> | undefined>;
|
|
40
40
|
} | {
|
|
41
41
|
data: undefined;
|
|
42
42
|
error: Error;
|
|
@@ -47,14 +47,14 @@ export declare const useConversationsMarkRead: ({ conversation, }: {
|
|
|
47
47
|
isSuccess: false;
|
|
48
48
|
status: "error";
|
|
49
49
|
reset: () => void;
|
|
50
|
-
context:
|
|
50
|
+
context: Promise<undefined> | undefined;
|
|
51
51
|
failureCount: number;
|
|
52
52
|
failureReason: Error | null;
|
|
53
53
|
isPaused: boolean;
|
|
54
54
|
submittedAt: number;
|
|
55
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, boolean,
|
|
55
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, boolean, Promise<undefined> | undefined>;
|
|
56
56
|
read: boolean;
|
|
57
|
-
markRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, boolean,
|
|
57
|
+
markRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, boolean, Promise<undefined> | undefined>;
|
|
58
58
|
} | {
|
|
59
59
|
data: import("..").ApiCollection | ApiResource;
|
|
60
60
|
error: null;
|
|
@@ -65,14 +65,14 @@ export declare const useConversationsMarkRead: ({ conversation, }: {
|
|
|
65
65
|
isSuccess: true;
|
|
66
66
|
status: "success";
|
|
67
67
|
reset: () => void;
|
|
68
|
-
context:
|
|
68
|
+
context: Promise<undefined> | undefined;
|
|
69
69
|
failureCount: number;
|
|
70
70
|
failureReason: Error | null;
|
|
71
71
|
isPaused: boolean;
|
|
72
72
|
submittedAt: number;
|
|
73
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, boolean,
|
|
73
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, boolean, Promise<undefined> | undefined>;
|
|
74
74
|
read: boolean;
|
|
75
|
-
markRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, boolean,
|
|
75
|
+
markRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, boolean, Promise<undefined> | undefined>;
|
|
76
76
|
};
|
|
77
77
|
export declare const useConversationsMute: ({ conversation }: {
|
|
78
78
|
conversation: ConversationResource;
|
|
@@ -86,14 +86,14 @@ export declare const useConversationsMute: ({ conversation }: {
|
|
|
86
86
|
isSuccess: false;
|
|
87
87
|
status: "idle";
|
|
88
88
|
reset: () => void;
|
|
89
|
-
context:
|
|
89
|
+
context: Promise<undefined> | undefined;
|
|
90
90
|
failureCount: number;
|
|
91
91
|
failureReason: Error | null;
|
|
92
92
|
isPaused: boolean;
|
|
93
93
|
submittedAt: number;
|
|
94
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<ApiResource<ConversationResource>, Error, boolean,
|
|
94
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<ApiResource<ConversationResource>, Error, boolean, Promise<undefined> | undefined>;
|
|
95
95
|
muted: boolean;
|
|
96
|
-
setMuted: import("@tanstack/react-query").UseMutateFunction<ApiResource<ConversationResource>, Error, boolean,
|
|
96
|
+
setMuted: import("@tanstack/react-query").UseMutateFunction<ApiResource<ConversationResource>, Error, boolean, Promise<undefined> | undefined>;
|
|
97
97
|
} | {
|
|
98
98
|
data: undefined;
|
|
99
99
|
variables: boolean;
|
|
@@ -104,14 +104,14 @@ export declare const useConversationsMute: ({ conversation }: {
|
|
|
104
104
|
isSuccess: false;
|
|
105
105
|
status: "pending";
|
|
106
106
|
reset: () => void;
|
|
107
|
-
context:
|
|
107
|
+
context: Promise<undefined> | undefined;
|
|
108
108
|
failureCount: number;
|
|
109
109
|
failureReason: Error | null;
|
|
110
110
|
isPaused: boolean;
|
|
111
111
|
submittedAt: number;
|
|
112
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<ApiResource<ConversationResource>, Error, boolean,
|
|
112
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<ApiResource<ConversationResource>, Error, boolean, Promise<undefined> | undefined>;
|
|
113
113
|
muted: boolean;
|
|
114
|
-
setMuted: import("@tanstack/react-query").UseMutateFunction<ApiResource<ConversationResource>, Error, boolean,
|
|
114
|
+
setMuted: import("@tanstack/react-query").UseMutateFunction<ApiResource<ConversationResource>, Error, boolean, Promise<undefined> | undefined>;
|
|
115
115
|
} | {
|
|
116
116
|
data: undefined;
|
|
117
117
|
error: Error;
|
|
@@ -122,14 +122,14 @@ export declare const useConversationsMute: ({ conversation }: {
|
|
|
122
122
|
isSuccess: false;
|
|
123
123
|
status: "error";
|
|
124
124
|
reset: () => void;
|
|
125
|
-
context:
|
|
125
|
+
context: Promise<undefined> | undefined;
|
|
126
126
|
failureCount: number;
|
|
127
127
|
failureReason: Error | null;
|
|
128
128
|
isPaused: boolean;
|
|
129
129
|
submittedAt: number;
|
|
130
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<ApiResource<ConversationResource>, Error, boolean,
|
|
130
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<ApiResource<ConversationResource>, Error, boolean, Promise<undefined> | undefined>;
|
|
131
131
|
muted: boolean;
|
|
132
|
-
setMuted: import("@tanstack/react-query").UseMutateFunction<ApiResource<ConversationResource>, Error, boolean,
|
|
132
|
+
setMuted: import("@tanstack/react-query").UseMutateFunction<ApiResource<ConversationResource>, Error, boolean, Promise<undefined> | undefined>;
|
|
133
133
|
} | {
|
|
134
134
|
data: ApiResource<ConversationResource>;
|
|
135
135
|
error: null;
|
|
@@ -140,14 +140,14 @@ export declare const useConversationsMute: ({ conversation }: {
|
|
|
140
140
|
isSuccess: true;
|
|
141
141
|
status: "success";
|
|
142
142
|
reset: () => void;
|
|
143
|
-
context:
|
|
143
|
+
context: Promise<undefined> | undefined;
|
|
144
144
|
failureCount: number;
|
|
145
145
|
failureReason: Error | null;
|
|
146
146
|
isPaused: boolean;
|
|
147
147
|
submittedAt: number;
|
|
148
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<ApiResource<ConversationResource>, Error, boolean,
|
|
148
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<ApiResource<ConversationResource>, Error, boolean, Promise<undefined> | undefined>;
|
|
149
149
|
muted: boolean;
|
|
150
|
-
setMuted: import("@tanstack/react-query").UseMutateFunction<ApiResource<ConversationResource>, Error, boolean,
|
|
150
|
+
setMuted: import("@tanstack/react-query").UseMutateFunction<ApiResource<ConversationResource>, Error, boolean, Promise<undefined> | undefined>;
|
|
151
151
|
};
|
|
152
152
|
export declare const useMarkAllRead: () => {
|
|
153
153
|
data: undefined;
|
|
@@ -159,13 +159,13 @@ export declare const useMarkAllRead: () => {
|
|
|
159
159
|
isSuccess: false;
|
|
160
160
|
status: "idle";
|
|
161
161
|
reset: () => void;
|
|
162
|
-
context:
|
|
162
|
+
context: undefined;
|
|
163
163
|
failureCount: number;
|
|
164
164
|
failureReason: Error | null;
|
|
165
165
|
isPaused: boolean;
|
|
166
166
|
submittedAt: number;
|
|
167
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, void,
|
|
168
|
-
markAllRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, void,
|
|
167
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, void, undefined>;
|
|
168
|
+
markAllRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, void, undefined>;
|
|
169
169
|
} | {
|
|
170
170
|
data: undefined;
|
|
171
171
|
variables: void;
|
|
@@ -176,13 +176,13 @@ export declare const useMarkAllRead: () => {
|
|
|
176
176
|
isSuccess: false;
|
|
177
177
|
status: "pending";
|
|
178
178
|
reset: () => void;
|
|
179
|
-
context:
|
|
179
|
+
context: undefined;
|
|
180
180
|
failureCount: number;
|
|
181
181
|
failureReason: Error | null;
|
|
182
182
|
isPaused: boolean;
|
|
183
183
|
submittedAt: number;
|
|
184
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, void,
|
|
185
|
-
markAllRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, void,
|
|
184
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, void, undefined>;
|
|
185
|
+
markAllRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, void, undefined>;
|
|
186
186
|
} | {
|
|
187
187
|
data: undefined;
|
|
188
188
|
error: Error;
|
|
@@ -193,13 +193,13 @@ export declare const useMarkAllRead: () => {
|
|
|
193
193
|
isSuccess: false;
|
|
194
194
|
status: "error";
|
|
195
195
|
reset: () => void;
|
|
196
|
-
context:
|
|
196
|
+
context: undefined;
|
|
197
197
|
failureCount: number;
|
|
198
198
|
failureReason: Error | null;
|
|
199
199
|
isPaused: boolean;
|
|
200
200
|
submittedAt: number;
|
|
201
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, void,
|
|
202
|
-
markAllRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, void,
|
|
201
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, void, undefined>;
|
|
202
|
+
markAllRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, void, undefined>;
|
|
203
203
|
} | {
|
|
204
204
|
data: import("..").ApiCollection | ApiResource;
|
|
205
205
|
error: null;
|
|
@@ -210,12 +210,12 @@ export declare const useMarkAllRead: () => {
|
|
|
210
210
|
isSuccess: true;
|
|
211
211
|
status: "success";
|
|
212
212
|
reset: () => void;
|
|
213
|
-
context:
|
|
213
|
+
context: undefined;
|
|
214
214
|
failureCount: number;
|
|
215
215
|
failureReason: Error | null;
|
|
216
216
|
isPaused: boolean;
|
|
217
217
|
submittedAt: number;
|
|
218
|
-
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, void,
|
|
219
|
-
markAllRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, void,
|
|
218
|
+
mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("..").ApiCollection | ApiResource, Error, void, undefined>;
|
|
219
|
+
markAllRead: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | ApiResource, Error, void, undefined>;
|
|
220
220
|
};
|
|
221
221
|
//# sourceMappingURL=use_conversations_actions.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function usePersonSettings(): {
|
|
2
2
|
directMessagesDisabled: boolean;
|
|
3
|
-
setDirectMessagesDisabled: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | import("..").ApiResource, Error, boolean,
|
|
3
|
+
setDirectMessagesDisabled: import("@tanstack/react-query").UseMutateFunction<import("..").ApiCollection | import("..").ApiResource, Error, boolean, undefined>;
|
|
4
4
|
isMutating: boolean;
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=use_person_settings.d.ts.map
|
package/build/index.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ export { default as Event } from './polyfills/events/Event';
|
|
|
11
11
|
export * from './screens';
|
|
12
12
|
export { AgeCheckUnderageScreen } from './screens/age_check/age_check_underage_screen';
|
|
13
13
|
export * from './types';
|
|
14
|
-
export {
|
|
14
|
+
export { platformFontWeightBold, Session, Uri } from './utils';
|
|
15
|
+
export type { ENV, TemporaryDefaultColorsType } from './utils';
|
|
15
16
|
export * from './utils/client';
|
|
16
17
|
export * from './utils/host_bridge';
|
|
17
18
|
export * from './utils/native_adapters';
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACvF,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC3D,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAA;AACtF,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM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B;AAC7G,cAAc,SAAS,CAAA;AACvB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACvF,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC3D,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAA,CAAC,sBAAsB;AAC7G,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAE9D,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA","sourcesContent":["import './icons/font_awesome'\n\nexport * from './components'\nexport * from './hooks'\nexport { ApiProvider, chatQueryClient, useFocusManager } from './contexts/api_provider'\nexport * from './contexts/chat_context'\nexport * from './contexts/session_context'\nexport * from './navigation'\nexport { ScreenLayout } from './navigation/screenLayout'\nexport { CustomEvent } from './polyfills/events/CustomEvent'\nexport { default as Event } from './polyfills/events/Event'\nexport * from './screens'\nexport { AgeCheckUnderageScreen } from './screens/age_check/age_check_underage_screen' // TODO: add to barrel\nexport * from './types'\nexport { platformFontWeightBold, Session, Uri } from './utils'\nexport type { ENV, TemporaryDefaultColorsType } from './utils'\nexport * from './utils/client'\nexport * from './utils/host_bridge'\nexport * from './utils/native_adapters'\nexport { ResponseError } from './utils/response_error'\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare function ChatAccessGate({ children }: PropsWithChildren):
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export declare function ChatAccessGate({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=chat_access_gate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_access_gate.d.ts","sourceRoot":"","sources":["../../src/navigation/chat_access_gate.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"chat_access_gate.d.ts","sourceRoot":"","sources":["../../src/navigation/chat_access_gate.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAA;AASnE,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CA0B7D"}
|