@planningcenter/chat-react-native 3.29.0 → 3.30.0-rc.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.js +2 -2
- package/build/components/conversation/attachments/attachment_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +3 -3
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +2 -2
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +4 -4
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +3 -3
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +6 -6
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +4 -4
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +1 -1
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +11 -11
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +4 -4
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +9 -9
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.js +2 -2
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +1 -1
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +2 -2
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +1 -1
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +1 -1
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +7 -7
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.js +1 -1
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +3 -3
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.js +1 -1
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/mute_indicator.js +1 -1
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +2 -2
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.js +1 -1
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.js +3 -3
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/banner.d.ts +1 -1
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +1 -1
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +2 -2
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +1 -1
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +3 -3
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +2 -2
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +4 -4
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +5 -5
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +1 -1
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image_attachment_preview.js +3 -3
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +1 -1
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +3 -3
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +1 -1
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +2 -2
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +3 -3
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/video_attachment_preview.js +4 -4
- package/build/components/display/video_attachment_preview.js.map +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +2 -2
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
- package/build/components/primitive/avatar_primitive.js +1 -1
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.d.ts +1 -1
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +3 -3
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +1 -1
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.js +1 -1
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.js +3 -3
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +3 -3
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +1 -1
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +1 -1
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +1 -1
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts +2 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +3 -2
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts.map +1 -1
- package/build/hooks/services/use_find_or_create_services_conversation.js +2 -2
- package/build/hooks/services/use_find_or_create_services_conversation.js.map +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.js +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.js.map +1 -1
- package/build/hooks/services/use_team_plans.js +2 -2
- package/build/hooks/services/use_team_plans.js.map +1 -1
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js +1 -1
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_attachment_uploader.d.ts.map +1 -1
- package/build/hooks/use_attachment_uploader.js +1 -1
- package/build/hooks/use_attachment_uploader.js.map +1 -1
- package/build/hooks/use_broadcast_typing_status.js +1 -1
- package/build/hooks/use_broadcast_typing_status.js.map +1 -1
- package/build/hooks/use_conversation.js +2 -2
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_membership.js +2 -2
- package/build/hooks/use_conversation_membership.js.map +1 -1
- package/build/hooks/use_conversation_message.js +1 -1
- package/build/hooks/use_conversation_message.js.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +1 -1
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +8 -8
- package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
- package/build/hooks/use_create_android_ripple_color.js +1 -1
- package/build/hooks/use_create_android_ripple_color.js.map +1 -1
- package/build/hooks/use_current_person.js.map +1 -1
- package/build/hooks/use_features.d.ts +1 -0
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +1 -0
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_font_scale.js +1 -1
- package/build/hooks/use_font_scale.js.map +1 -1
- package/build/hooks/use_giphy.d.ts.map +1 -1
- package/build/hooks/use_giphy.js.map +1 -1
- package/build/hooks/use_interaction_ghost_color.js +1 -1
- package/build/hooks/use_interaction_ghost_color.js.map +1 -1
- package/build/hooks/use_live_relative_time.d.ts.map +1 -1
- package/build/hooks/use_live_relative_time.js +1 -1
- package/build/hooks/use_live_relative_time.js.map +1 -1
- package/build/hooks/use_message_create_or_update.d.ts.map +1 -1
- package/build/hooks/use_message_create_or_update.js +5 -5
- package/build/hooks/use_message_create_or_update.js.map +1 -1
- package/build/hooks/use_message_draft.js +1 -1
- package/build/hooks/use_message_draft.js.map +1 -1
- package/build/hooks/use_message_reaction_toggle.d.ts.map +1 -1
- package/build/hooks/use_message_reaction_toggle.js +2 -2
- package/build/hooks/use_message_reaction_toggle.js.map +1 -1
- package/build/hooks/use_my_gender.d.ts +7 -0
- package/build/hooks/use_my_gender.d.ts.map +1 -0
- package/build/hooks/use_my_gender.js +28 -0
- package/build/hooks/use_my_gender.js.map +1 -0
- package/build/hooks/use_organization.d.ts.map +1 -1
- package/build/hooks/use_organization.js.map +1 -1
- package/build/hooks/use_product_analytics.d.ts.map +1 -1
- package/build/hooks/use_product_analytics.js +1 -1
- package/build/hooks/use_product_analytics.js.map +1 -1
- package/build/hooks/use_report_message.d.ts.map +1 -1
- package/build/hooks/use_report_message.js +1 -1
- package/build/hooks/use_report_message.js.map +1 -1
- package/build/hooks/use_submit_age_check.d.ts.map +1 -1
- package/build/hooks/use_submit_age_check.js +2 -2
- package/build/hooks/use_submit_age_check.js.map +1 -1
- package/build/hooks/use_suspense_api.d.ts +1 -1
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +1 -1
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/hooks/use_typing_indicators.d.ts.map +1 -1
- package/build/hooks/use_typing_indicators.js +1 -1
- package/build/hooks/use_typing_indicators.js.map +1 -1
- package/build/navigation/chat_access_gate.js +4 -4
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +4 -4
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +6 -6
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.js +1 -1
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/Event.d.ts +0 -4
- package/build/polyfills/events/Event.d.ts.map +1 -1
- package/build/polyfills/events/Event.js +5 -1
- package/build/polyfills/events/Event.js.map +1 -1
- package/build/polyfills/events/EventTarget.d.ts +0 -3
- package/build/polyfills/events/EventTarget.d.ts.map +1 -1
- package/build/polyfills/events/EventTarget.js +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +5 -5
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +1 -1
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +2 -2
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +2 -2
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +9 -9
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +2 -2
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js.map +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 +2 -2
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +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 +3 -3
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/types.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/types.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +1 -1
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -2
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +1 -1
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +2 -2
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +4 -4
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +10 -0
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -0
- package/build/screens/conversation_new/components/gender_filter_toggle.js +50 -0
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -0
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +28 -4
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +6 -6
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +1 -1
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +9 -9
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +2 -2
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +1 -1
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +1 -1
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +4 -4
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/design_system_screen.js +3 -3
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.js +2 -2
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
- package/build/screens/message_report/components/report_reason_list.js +2 -2
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +2 -2
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +5 -5
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +1 -1
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.js +1 -1
- package/build/screens/notification_settings/hooks/groups.js.map +1 -1
- package/build/screens/notification_settings_screen.js +1 -1
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +1 -1
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.js +1 -1
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.js +1 -1
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/utils/cache/messages_cache.d.ts.map +1 -1
- package/build/utils/cache/messages_cache.js +3 -3
- package/build/utils/cache/messages_cache.js.map +1 -1
- package/build/utils/cache/optimistically_create_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_create_message.js +2 -2
- package/build/utils/cache/optimistically_create_message.js.map +1 -1
- package/build/utils/cache/optimistically_update_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_update_message.js +1 -1
- package/build/utils/cache/optimistically_update_message.js.map +1 -1
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/client/transform_request_data.d.ts.map +1 -1
- package/build/utils/client/transform_request_data.js.map +1 -1
- package/build/utils/gender_display_label.d.ts +2 -0
- package/build/utils/gender_display_label.d.ts.map +1 -0
- package/build/utils/gender_display_label.js +11 -0
- package/build/utils/gender_display_label.js.map +1 -0
- package/build/utils/native_adapters/configuration.d.ts +3 -3
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +5 -5
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/performance_tracking.js +1 -1
- package/build/utils/performance_tracking.js.map +1 -1
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +1 -1
- package/build/utils/theme.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/contexts/session_context.tsx +4 -4
- package/src/__tests__/event-polyfill.test.ts +2 -3
- package/src/__tests__/hooks/useTheme.tsx +3 -3
- package/src/__tests__/hooks/use_async_storage.test.tsx +2 -2
- package/src/__tests__/hooks/use_conversation_messages.ts +1 -1
- package/src/__tests__/utils/client.ts +2 -2
- package/src/__tests__/utils/native_adapters/configuration.ts +2 -2
- package/src/__utils__/handlers.ts +1 -1
- package/src/components/conversation/attachments/attachment_card.tsx +2 -2
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +1 -1
- package/src/components/conversation/attachments/audio_attachment.tsx +3 -3
- package/src/components/conversation/attachments/expanded_link.tsx +2 -2
- package/src/components/conversation/attachments/generic_file_attachment.tsx +5 -5
- package/src/components/conversation/attachments/giphy_attachment.tsx +3 -3
- package/src/components/conversation/attachments/image_attachment.tsx +7 -7
- package/src/components/conversation/attachments/video_attachment.tsx +4 -4
- package/src/components/conversation/jump_to_bottom_button.tsx +1 -1
- package/src/components/conversation/message.tsx +13 -13
- package/src/components/conversation/message_attachments.tsx +4 -4
- package/src/components/conversation/message_form/message_form_attachment_image.tsx +1 -1
- package/src/components/conversation/message_form/message_form_attachment_video.tsx +1 -1
- package/src/components/conversation/message_form.tsx +15 -17
- package/src/components/conversation/message_markdown.tsx +2 -2
- package/src/components/conversation/message_reaction.tsx +3 -3
- package/src/components/conversation/message_read_receipts.tsx +2 -2
- package/src/components/conversation/messages_disabled_banners.tsx +1 -1
- package/src/components/conversation/reply_shadow_message.tsx +7 -7
- package/src/components/conversation/typing_indicator.tsx +1 -1
- package/src/components/conversations/conversation_preview.tsx +4 -4
- package/src/components/conversations/conversations.tsx +1 -1
- package/src/components/conversations/mute_indicator.tsx +1 -1
- package/src/components/conversations/swipeable_toggle_button.tsx +2 -2
- package/src/components/conversations/unread_count_badge.tsx +1 -1
- package/src/components/display/action_button.tsx +4 -4
- package/src/components/display/banner.tsx +1 -1
- package/src/components/display/banner_collapsible.tsx +1 -1
- package/src/components/display/button.tsx +2 -2
- package/src/components/display/child_notice.tsx +3 -3
- package/src/components/display/heading.tsx +2 -2
- package/src/components/display/icon.tsx +7 -8
- package/src/components/display/icon_button.tsx +2 -2
- package/src/components/display/image_attachment_preview.tsx +3 -3
- package/src/components/display/person.tsx +2 -2
- package/src/components/display/platform_modal_header_buttons.tsx +4 -4
- package/src/components/display/text.tsx +1 -1
- package/src/components/display/text_inline_button.tsx +2 -2
- package/src/components/display/toggle_button.tsx +3 -3
- package/src/components/display/video_attachment_preview.tsx +4 -4
- package/src/components/group_conversation_list.tsx +4 -4
- package/src/components/primitive/avatar_primitive.tsx +1 -1
- package/src/components/primitive/banner_primitive.tsx +6 -6
- package/src/components/primitive/form_sheet.tsx +1 -1
- package/src/components/safe_area_modal.tsx +1 -1
- package/src/contexts/api_provider.tsx +3 -3
- package/src/contexts/chat_context.tsx +4 -4
- package/src/contexts/conversations_context.tsx +3 -3
- package/src/contexts/session_context.tsx +2 -2
- package/src/hooks/groups/use_groups_conversation_create.ts +4 -2
- package/src/hooks/services/use_find_or_create_services_conversation.ts +2 -2
- package/src/hooks/services/use_team_members_for_new_conversation.ts +2 -2
- package/src/hooks/services/use_team_plans.ts +3 -3
- package/src/hooks/use_api_client.ts +1 -1
- package/src/hooks/use_attachment_uploader.ts +3 -3
- package/src/hooks/use_broadcast_typing_status.ts +1 -1
- package/src/hooks/use_conversation.ts +2 -2
- package/src/hooks/use_conversation_membership.ts +2 -2
- package/src/hooks/use_conversation_message.ts +1 -1
- package/src/hooks/use_conversation_messages.ts +1 -1
- package/src/hooks/use_conversation_messages_jolt_events.ts +12 -12
- package/src/hooks/use_create_android_ripple_color.ts +1 -1
- package/src/hooks/use_current_person.ts +1 -1
- package/src/hooks/use_features.ts +3 -2
- package/src/hooks/use_font_scale.ts +1 -1
- package/src/hooks/use_giphy.ts +1 -1
- package/src/hooks/use_interaction_ghost_color.ts +1 -1
- package/src/hooks/use_live_relative_time.ts +1 -1
- package/src/hooks/use_message_create_or_update.ts +7 -7
- package/src/hooks/use_message_draft.ts +2 -2
- package/src/hooks/use_message_reaction_toggle.ts +2 -2
- package/src/hooks/use_my_gender.ts +42 -0
- package/src/hooks/use_organization.ts +1 -1
- package/src/hooks/use_product_analytics.ts +2 -2
- package/src/hooks/use_report_message.ts +2 -2
- package/src/hooks/use_submit_age_check.ts +3 -3
- package/src/hooks/use_suspense_api.ts +3 -3
- package/src/hooks/use_typing_indicators.ts +2 -2
- package/src/navigation/chat_access_gate.tsx +4 -4
- package/src/navigation/index.tsx +12 -12
- package/src/navigation/screenLayout.tsx +1 -1
- package/src/polyfills/events/Event.ts +1 -1
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/screens/age_check/age_check_required_screen.tsx +5 -5
- package/src/screens/age_check/age_check_underage_screen.tsx +1 -1
- package/src/screens/age_check/components/age_check_select_birthdate_modal.tsx +2 -2
- package/src/screens/attachment_actions/hooks/useDeleteAttachment.tsx +2 -2
- package/src/screens/bug_report_screen.tsx +13 -13
- package/src/screens/conversation/message_read_receipts_screen.tsx +3 -3
- package/src/screens/conversation_details_screen.tsx +0 -1
- package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +2 -2
- package/src/screens/conversation_filter_recipients/components/header_row.tsx +4 -4
- package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +1 -1
- package/src/screens/conversation_filter_recipients/types.tsx +1 -1
- package/src/screens/conversation_filters/components/rows.tsx +1 -1
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +3 -3
- package/src/screens/conversation_filters/group_filters.tsx +3 -3
- package/src/screens/conversation_filters/hooks/filters.ts +1 -1
- package/src/screens/conversation_filters_screen.tsx +2 -2
- package/src/screens/conversation_new/components/filter_by_plan.tsx +4 -4
- package/src/screens/conversation_new/components/form_list.tsx +1 -1
- package/src/screens/conversation_new/components/gender_filter_toggle.tsx +92 -0
- package/src/screens/conversation_new/components/groups_form.tsx +63 -4
- package/src/screens/conversation_new/components/services_form.tsx +7 -7
- package/src/screens/conversation_new/conversation_new_screen.tsx +3 -3
- package/src/screens/conversation_notification_level_select_screen.tsx +1 -1
- package/src/screens/conversation_screen.tsx +13 -13
- package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +3 -3
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +3 -3
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +3 -3
- package/src/screens/conversation_select_type_screen.tsx +2 -2
- package/src/screens/conversations/components/list_header_component.tsx +4 -4
- package/src/screens/design_system_screen.tsx +3 -3
- package/src/screens/group_notification_settings_screen.tsx +1 -1
- package/src/screens/message_actions_screen.tsx +3 -3
- package/src/screens/message_report/components/report_reason_list.tsx +2 -2
- package/src/screens/message_report_screen.tsx +8 -8
- package/src/screens/not_found.tsx +1 -1
- package/src/screens/notification_settings/hooks/groups.ts +1 -1
- package/src/screens/notification_settings_screen.tsx +1 -1
- package/src/screens/preferred_app_selection_screen.tsx +1 -1
- package/src/screens/send_giphy_screen.tsx +1 -1
- package/src/screens/team_conversation_screen.tsx +1 -1
- package/src/utils/__tests__/convert_attachments_for_create.test.ts +2 -2
- package/src/utils/cache/messages_cache.ts +3 -3
- package/src/utils/cache/optimistically_create_message.ts +4 -4
- package/src/utils/cache/optimistically_update_message.ts +1 -1
- package/src/utils/client/client.ts +0 -1
- package/src/utils/client/transform_request_data.ts +1 -1
- package/src/utils/gender_display_label.ts +10 -0
- package/src/utils/native_adapters/configuration.ts +5 -5
- package/src/utils/performance_tracking.ts +1 -1
- package/src/utils/theme.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_product_analytics.js","sourceRoot":"","sources":["../../src/hooks/use_product_analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,O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;YAChB,IAAI,EAAE,EAAE,GAAG,kBAAkB,EAAE,GAAG,KAAK,CAAC,IAAI,EAAmB;SAChE,CAAC,CAAC,CAAA;QAEH,OAAO,UAAU,CAAC,cAAc,EAAE,sBAAsB,CAAC,CAAA;IAC3D,CAAC,EACD,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,CAC7C,CAAA;IAED,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,CAAA;AACxC,CAAC,CAAA;AAED,MAAM,UAAU,+BAA+B,CAAC,SAAiB,EAAE,OAAsB,EAAE;IACzF,MAAM,EAAE,YAAY,EAAE,GAAG,mBAAmB,EAAE,CAAA;IAC9C,MAAM,oBAAoB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAE1C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,oBAAoB,CAAC,OAAO;YAAE,OAAM;QAExC,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAA;QAEnC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IAC/B,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAA;AACrC,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,QAE1C;IACC,OAAO,eAAe,CAAC,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,IAAI,EAAE,CAA4B,CAAA;AAChG,CAAC","sourcesContent":["import { useCallback, useEffect, useMemo, useRef } from 'react'\nimport { useChatContext } from '../contexts/chat_context'\nimport { ProductAnalyticsConfig } from '../types/product_analytics'\nimport { AnalyticsMetadataResource } from '../types/resources/analytics_metadata'\nimport { keysToSnakeCase } from '../utils/client/utils'\nimport { SHA256, enc } from '../utils/sha_256'\n\nexport interface EventMetadata {\n [key: string]: string | number | boolean | null | undefined\n}\n\ninterface AnalyticsEvent {\n name: string\n meta: EventMetadata\n}\n\nfunction contentSha256(payload: string): string {\n return SHA256(payload).toString(enc.Hex)\n}\n\nfunction sendEvents(events: AnalyticsEvent[], config: ProductAnalyticsConfig): Promise<Response[]> {\n // Split into chunks of 10 and make parallel requests\n const chunks: AnalyticsEvent[][] = []\n for (let i = 0; i < events.length; i += 10) {\n chunks.push(events.slice(i, i + 10))\n }\n\n return Promise.all(\n chunks.map(async chunk => {\n const payload = JSON.stringify({ events: chunk })\n return fetch(config.endpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n 'X-Authorization': `Bearer ${config.token}`,\n 'X-Amz-Content-Sha256': contentSha256(payload),\n },\n body: payload,\n })\n })\n )\n}\n\nconst useProductAnalytics = () => {\n const { productAnalyticsConfig } = useChatContext()\n\n const snakeCasedBaseMeta = useMemo(\n () => keysToSnakeCase(productAnalyticsConfig?.metadata || {}),\n [productAnalyticsConfig?.metadata]\n )\n\n const publishEvent = useCallback(\n (name: string, meta: EventMetadata = {}): Promise<Response[]> => {\n if (!productAnalyticsConfig) {\n if (__DEV__) {\n console.warn('Product Analytics not available')\n }\n return Promise.resolve([])\n }\n\n const mergedMeta = { ...snakeCasedBaseMeta, ...meta } as EventMetadata\n\n return sendEvents([{ name, meta: mergedMeta }], productAnalyticsConfig)\n },\n [productAnalyticsConfig, snakeCasedBaseMeta]\n )\n\n const publishEvents = useCallback(\n (events: Array<{ name: string; meta?: EventMetadata }>): Promise<Response[]> => {\n if (!productAnalyticsConfig) {\n if (__DEV__) {\n console.warn('Product Analytics not available')\n }\n return Promise.resolve([])\n }\n\n const eventsWithMeta = events.map(event => ({\n name: event.name,\n meta: { ...snakeCasedBaseMeta, ...event.meta } as EventMetadata,\n }))\n\n return sendEvents(eventsWithMeta, productAnalyticsConfig)\n },\n [productAnalyticsConfig, snakeCasedBaseMeta]\n )\n\n return { publishEvent, publishEvents }\n}\n\nexport function usePublishProductAnalyticsEvent(eventName: string, meta: EventMetadata = {}) {\n const { publishEvent } = useProductAnalytics()\n const hasPublishedEventRef = useRef(false)\n\n useEffect(() => {\n if (hasPublishedEventRef.current) return\n\n hasPublishedEventRef.current = true\n\n publishEvent(eventName, meta)\n }, [eventName, meta, publishEvent])\n}\n\nexport function normalizeAnalyticsMetadata(resource: {\n analyticsMetadata?: AnalyticsMetadataResource\n}) {\n return keysToSnakeCase(resource?.analyticsMetadata?.metadata || {}) as Record<string, unknown>\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_report_message.d.ts","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_report_message.d.ts","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,mCAAmC,CAAA;AAI7F,eAAO,MAAM,gBAAgB,mBAAoB,MAAM,aAAa,MAAM;YAQ5D,mBAAmB;mBACZ,MAAM;WAsB1B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
|
-
import { useApiClient } from './use_api_client';
|
|
3
2
|
import { Haptic } from '../utils/native_adapters';
|
|
3
|
+
import { useApiClient } from './use_api_client';
|
|
4
4
|
export const useReportMessage = (conversationId, messageId) => {
|
|
5
5
|
const apiClient = useApiClient();
|
|
6
6
|
return useMutation({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_report_message.js","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"use_report_message.js","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,cAAsB,EAAE,SAAiB,EAAE,EAAE;IAC5E,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,OAAO,WAAW,CAAC;QACjB,UAAU,EAAE,KAAK,EAAE,EACjB,MAAM,EACN,YAAY,GAIb,EAAE,EAAE;YACH,MAAM,GAAG,GAAG,qBAAqB,cAAc,aAAa,SAAS,SAAS,CAAA;YAC9E,MAAM,IAAI,GAAyB;gBACjC,IAAI,EAAE;oBACJ,IAAI,EAAE,eAAe;oBACrB,UAAU,EAAE;wBACV,MAAM;wBACN,GAAG,CAAC,YAAY,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;qBACrD;iBACF;aACF,CAAA;YAED,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;QAC3C,CAAC;QACD,SAAS,EAAE,GAAG,EAAE;YACd,MAAM,CAAC,mBAAmB,EAAE,CAAA;QAC9B,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,iBAAiB,EAAE,CAAA;QAC5B,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useMutation } from '@tanstack/react-query'\nimport { MessageReportReason, MessageReportPayload } from '../types/resources/message_report'\nimport { Haptic } from '../utils/native_adapters'\nimport { useApiClient } from './use_api_client'\n\nexport const useReportMessage = (conversationId: number, messageId: string) => {\n const apiClient = useApiClient()\n\n return useMutation({\n mutationFn: async ({\n reason,\n reasonDetail,\n }: {\n reason: MessageReportReason\n reasonDetail?: string\n }) => {\n const url = `/me/conversations/${conversationId}/messages/${messageId}/report`\n const data: MessageReportPayload = {\n data: {\n type: 'MessageReport',\n attributes: {\n reason,\n ...(reasonDetail && { reason_detail: reasonDetail }),\n },\n },\n }\n\n return apiClient.chat.post({ url, data })\n },\n onSuccess: () => {\n Haptic.notificationSuccess()\n },\n onError: () => {\n Haptic.notificationError()\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_submit_age_check.d.ts","sourceRoot":"","sources":["../../src/hooks/use_submit_age_check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_submit_age_check.d.ts","sourceRoot":"","sources":["../../src/hooks/use_submit_age_check.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAKrD,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC5B;AAED,wBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiChC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Alert } from 'react-native';
|
|
2
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { Alert } from 'react-native';
|
|
3
|
+
import { Haptic } from '../utils/native_adapters';
|
|
3
4
|
import { useApiClient } from './use_api_client';
|
|
4
5
|
import { currentPersonQueryKey } from './use_current_person';
|
|
5
|
-
import { Haptic } from '../utils/native_adapters';
|
|
6
6
|
export function useSubmitAgeCheck() {
|
|
7
7
|
const apiClient = useApiClient();
|
|
8
8
|
const queryClient = useQueryClient();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_submit_age_check.js","sourceRoot":"","sources":["../../src/hooks/use_submit_age_check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use_submit_age_check.js","sourceRoot":"","sources":["../../src/hooks/use_submit_age_check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,OAAO,EAAE,MAAM,EAAE,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ent":["import { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { Alert } from 'react-native'\nimport { ApiResource } from '../types/api_primitives'\nimport { Haptic } from '../utils/native_adapters'\nimport { useApiClient } from './use_api_client'\nimport { currentPersonQueryKey } from './use_current_person'\n\ninterface AgeCheckResource {\n type: 'AgeCheck'\n id: string\n stated_date: string\n status: 'passed' | 'failed'\n}\n\nexport function useSubmitAgeCheck() {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n\n const { mutateAsync: submitAgeCheck, ...mutation } = useMutation({\n mutationKey: ['submitAgeCheck'],\n mutationFn: (date: Date) =>\n apiClient.people.post<ApiResource<AgeCheckResource>>({\n url: '/me/age_checks',\n data: {\n fields: { AgeCheck: 'stated_date,status' },\n data: {\n type: 'AgeCheck',\n attributes: {\n stated_date: date.toISOString(),\n },\n },\n },\n }),\n onSuccess: (response: ApiResource<AgeCheckResource>) => {\n queryClient.invalidateQueries({ queryKey: currentPersonQueryKey })\n if (response.data.status === 'passed') {\n Haptic.notificationSuccess()\n Alert.alert('Profile updated', `Your birthdate has been updated.`)\n }\n },\n onError: () => {\n Haptic.notificationError()\n Alert.alert('Oops', `We were unable to update your birthdate. Please try again.`)\n },\n })\n\n return { submitAgeCheck, ...mutation }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AnyUseSuspenseInfiniteQueryOptions, InfiniteData, UseSuspenseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import { ApiCollection, ApiResource, ResourceObject } from '../types';
|
|
3
|
+
import { FailedResponse } from '../types/api_primitives';
|
|
3
4
|
import { GetRequest } from '../utils/client';
|
|
4
5
|
import { App } from './use_api_client';
|
|
5
|
-
import { FailedResponse } from '../types/api_primitives';
|
|
6
6
|
interface SuspenseGetOptions extends GetRequest {
|
|
7
7
|
app?: App;
|
|
8
8
|
reply_root_id?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_suspense_api.d.ts","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,YAAY,EAGZ,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use_suspense_api.d.ts","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,YAAY,EAGZ,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,EAAE,UAAU,EAAe,MAAM,iBAAiB,CAAA;AAEzD,OAAO,EAAE,GAAG,EAAgB,MAAM,kBAAkB,CAAA;AAEpD,UAAU,kBAAmB,SAAQ,UAAU;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,IAAI,IAAI,CACrF,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,EACvD,UAAU,GAAG,SAAS,CACvB,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,QAClE,kBAAkB,YACd,uBAAuB,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBrC,CAAA;AAOD,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,kCAAkC,EAClC,kBAAkB,GAAG,kBAAkB,GAAG,SAAS,GAAG,UAAU,CACjE,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,cAAc,QACrD,kBAAkB,SACjB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ChC,CAAA;AAUD,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,CAAC,KAAK,CAAC;IACzB,kBAAkB,CAAC,MAAM,CAAC;IAC1B,kBAAkB,CAAC,SAAS,CAAC;IAC7B,kBAAkB,CAAC,KAAK,CAAC;IACzB,kBAAkB,CAAC,eAAe,CAAC;CACpC,CAAA;AACD,eAAO,MAAM,kBAAkB,SAAU,kBAAkB,KAAG,eAM7D,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSuspenseInfiniteQuery, useSuspenseQuery, } from '@tanstack/react-query';
|
|
2
|
-
import { useApiClient } from './use_api_client';
|
|
3
2
|
import { Log } from '../utils';
|
|
4
3
|
import { ResponseError } from '../utils/response_error';
|
|
4
|
+
import { useApiClient } from './use_api_client';
|
|
5
5
|
export const useSuspenseGet = (args, options) => {
|
|
6
6
|
const apiClient = useApiClient();
|
|
7
7
|
const { data, ...query } = useSuspenseQuery({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_suspense_api.js","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,gBAAgB,GAEjB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,
|
|
1
|
+
{"version":3,"file":"use_suspense_api.js","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,gBAAgB,GAEjB,MAAM,uBAAuB,CAAA;AAG9B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAO,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAYpD,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAwB,EACxB,OAAo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AAE,CAAC;QAC9B,MAAM,IAAI,aAAa,CAAC,KAAuB,CAAC,CAAA;IAClD,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC,CAAA;AASD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAwB,EAAmB,EAAE,CAAC;IAC/E,IAAI,CAAC,GAAG;IACR,IAAI,CAAC,IAAI;IACT,IAAI,CAAC,OAAO;IACZ,IAAI,CAAC,GAAG,IAAI,MAAM;IAClB,IAAI,CAAC,aAAa;CACnB,CAAA","sourcesContent":["import {\n AnyUseSuspenseInfiniteQueryOptions,\n InfiniteData,\n useSuspenseInfiniteQuery,\n useSuspenseQuery,\n UseSuspenseQueryOptions,\n} from '@tanstack/react-query'\nimport { ApiCollection, ApiResource, ResourceObject } from '../types'\nimport { FailedResponse } from '../types/api_primitives'\nimport { Log } from '../utils'\nimport { GetRequest, RequestData } from '../utils/client'\nimport { ResponseError } from '../utils/response_error'\nimport { App, useApiClient } from './use_api_client'\n\ninterface SuspenseGetOptions extends GetRequest {\n app?: App\n reply_root_id?: string | null\n}\n\nexport type SuspenseGetQueryOptions<T extends ResourceObject | ResourceObject[]> = Omit<\n UseSuspenseQueryOptions<ApiResource<T>, FailedResponse>,\n 'queryKey' | 'queryFn'\n>\n\nexport const useSuspenseGet = <T extends ResourceObject | ResourceObject[]>(\n args: SuspenseGetOptions,\n options?: SuspenseGetQueryOptions<T>\n) => {\n type Resource = ApiResource<T>\n const apiClient = useApiClient()\n\n const { data, ...query } = useSuspenseQuery<Resource, FailedResponse>({\n queryKey: getRequestQueryKey(args),\n queryFn: ({ queryKey }) => {\n const [url, d, headers, app = 'chat'] = queryKey as RequestQueryKey\n return apiClient[app]\n .get({ url, data: d, headers })\n .catch(throwResponseError) as Promise<Resource>\n },\n ...options,\n })\n\n return { ...data, ...query }\n}\n\ntype NextMeta = Partial<{\n offset: string\n idLt: string\n}>\n\nexport type SuspensePaginatorOptions = Omit<\n AnyUseSuspenseInfiniteQueryOptions,\n 'getNextPageParam' | 'initialPageParam' | 'queryFn' | 'queryKey'\n>\n\nexport const useSuspensePaginator = <T extends ResourceObject>(\n args: SuspenseGetOptions,\n opts?: SuspensePaginatorOptions\n) => {\n const apiClient = useApiClient()\n const query = useSuspenseInfiniteQuery<\n ApiCollection<T>,\n Response,\n InfiniteData<ApiCollection<T>>,\n any,\n Partial<RequestData> | undefined\n >({\n queryKey: getRequestQueryKey(args),\n queryFn: ({ pageParam }) => {\n Log.info('useSuspenseGet', { pageParam })\n\n const pageParmWhere = pageParam?.where || {}\n const argsWhere = args.data.where || {}\n const where = { ...argsWhere, ...pageParmWhere }\n const app = args.app || 'chat'\n const offset = pageParam?.offset || args.data.offset\n const data = { ...args.data, where, offset }\n\n return apiClient[app]\n .get<ApiCollection<T>>({\n url: args.url,\n data,\n })\n .catch(throwResponseError)\n },\n initialPageParam: {} as Partial<RequestData>,\n getNextPageParam: lastPage => {\n const next: NextMeta = lastPage.meta?.next || {}\n const { offset, idLt } = next\n\n if (idLt) return { where: { id_lt: idLt } }\n if (offset) return { offset: Number(offset) }\n\n return undefined\n },\n ...(opts || {}),\n })\n\n const data: T[] = query.data?.pages.flatMap(page => page.data) || []\n const totalCount = query.data?.pages[0]?.meta?.totalCount || data.length\n\n return { ...query, data, totalCount }\n}\n\nconst throwResponseError = (error: unknown) => {\n if (error instanceof Response) {\n throw new ResponseError(error as FailedResponse)\n }\n\n return Promise.reject(error)\n}\n\nexport type RequestQueryKey = [\n SuspenseGetOptions['url'],\n SuspenseGetOptions['data'],\n SuspenseGetOptions['headers'],\n SuspenseGetOptions['app'],\n SuspenseGetOptions['reply_root_id'],\n]\nexport const getRequestQueryKey = (args: SuspenseGetOptions): RequestQueryKey => [\n args.url,\n args.data,\n args.headers,\n args.app || 'chat',\n args.reply_root_id,\n]\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_typing_indicators.d.ts","sourceRoot":"","sources":["../../src/hooks/use_typing_indicators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_typing_indicators.d.ts","sourceRoot":"","sources":["../../src/hooks/use_typing_indicators.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,sBAuB/B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,WAAY,YAAY,EAAE,KAAG,MAU/D,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import { useCurrentPerson } from './use_current_person';
|
|
4
3
|
import { useConversationContext } from '../contexts/conversation_context';
|
|
4
|
+
import { useCurrentPerson } from './use_current_person';
|
|
5
5
|
/**
|
|
6
6
|
* Hook for getting people currently typing in a conversation
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_typing_indicators.js","sourceRoot":"","sources":["../../src/hooks/use_typing_indicators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"use_typing_indicators.js","sourceRoot":"","sources":["../../src/hooks/use_typing_indicators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAGvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,GAAG,sBAAsB,EAAE,C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AE,CAAC;QAC/B,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,gBAAgB,CAAA;IAC9E,CAAC;SAAM,CAAC;QACN,OAAO,8BAA8B,CAAA;IACvC,CAAC;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAmB,EAAE,CAAA","sourcesContent":["import { useQuery } from '@tanstack/react-query'\nimport { useMemo } from 'react'\nimport { useConversationContext } from '../contexts/conversation_context'\nimport { useCurrentPerson } from './use_current_person'\nimport { PersonTyping } from './use_typing_status_cache'\n\n/**\n * Hook for getting people currently typing in a conversation\n *\n * The query function itself doesn't do anything, but we add to the cache\n * from useTypingStatusCache when we receive a typing event.\n */\nexport const useTypingIndicators = () => {\n const { conversationId, currentPageReplyRootId } = useConversationContext()\n const cacheKey = useMemo(() => ['conversationTyping', String(conversationId)], [conversationId])\n const currentPerson = useCurrentPerson()\n const isCurrentPerson = (authorId: number) => authorId === currentPerson?.id\n const inMainConversationView = !currentPageReplyRootId\n const now = Date.now()\n const { data } = useQuery({\n queryKey: cacheKey,\n queryFn: () => stableArray,\n initialData: stableArray,\n })\n\n return data.filter(({ author_id, expires, reply_root_id }) => {\n if (isCurrentPerson(author_id)) return false\n if (now > expires) return false\n\n // If you are in the main conversation view, you will see any message sent\n if (inMainConversationView) return true\n\n // If you are in a reply view, you will only see messages sent in this reply thread\n return reply_root_id === currentPageReplyRootId\n })\n}\n\n/**\n * Format text for typing indicators based on the number of people typing\n */\nexport const getTypingIndicatorText = (people: PersonTyping[]): string => {\n if (!people.length) return ''\n\n if (people.length === 1) {\n return `${people[0].author_name} is typing...`\n } else if (people.length === 2) {\n return `${people[0].author_name} and ${people[1].author_name} are typing...`\n } else {\n return 'Several people are typing...'\n }\n}\n\nconst stableArray: PersonTyping[] = []\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { currentPersonRequestArgs } from '../hooks/use_current_person';
|
|
3
|
-
import { AgeCheckRequiredScreen } from '../screens/age_check/age_check_required_screen';
|
|
4
2
|
import { DefaultLoading } from '../components/page/loading';
|
|
5
|
-
import { useApiGet, useOrganization } from '../hooks';
|
|
6
|
-
import { AgeQualificationStatus } from '../types';
|
|
7
3
|
import { useChatContext } from '../contexts/chat_context';
|
|
4
|
+
import { useApiGet, useOrganization } from '../hooks';
|
|
5
|
+
import { currentPersonRequestArgs } from '../hooks/use_current_person';
|
|
6
|
+
import { AgeCheckRequiredScreen } from '../screens/age_check/age_check_required_screen';
|
|
8
7
|
import { AgeCheckUnderageScreen } from '../screens/age_check/age_check_underage_screen';
|
|
8
|
+
import { AgeQualificationStatus } from '../types';
|
|
9
9
|
export function ChatAccessGate({ children }) {
|
|
10
10
|
const { data: person, isFetched } = useApiGet(currentPersonRequestArgs);
|
|
11
11
|
const { data: organization } = useOrganization();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_access_gate.js","sourceRoot":"","sources":["../../src/navigation/chat_access_gate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"chat_access_gate.js","sourceRoot":"","sources":["../../src/navigation/chat_access_gate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,EAAE,sBAAsB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D,CAAC,oBAAoB,CAAC,OAAO,EAC7B,CAAC;YACD,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAA;YACnC,qBAAqB,CAAC,EAAE,YAAY,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC,CAAA;QAC7D,CAAC;IACH,CAAC,EAAE,CAAC,sBAAsB,EAAE,qBAAqB,EAAE,YAAY,CAAC,CAAC,CAAA;AACnE,CAAC","sourcesContent":["import React, { PropsWithChildren, useEffect, useRef } from 'react'\nimport { DefaultLoading } from '../components/page/loading'\nimport { useChatContext } from '../contexts/chat_context'\nimport { useApiGet, useOrganization } from '../hooks'\nimport { currentPersonRequestArgs } from '../hooks/use_current_person'\nimport { AgeCheckRequiredScreen } from '../screens/age_check/age_check_required_screen'\nimport { AgeCheckUnderageScreen } from '../screens/age_check/age_check_underage_screen'\nimport { AgeQualificationStatus, CurrentPersonResource } from '../types'\n\nexport function ChatAccessGate({ children }: PropsWithChildren) {\n const { data: person, isFetched } = useApiGet<CurrentPersonResource>(currentPersonRequestArgs)\n const { data: organization } = useOrganization()\n\n const ageQualificationStatus = person?.ageQualificationStatus\n const contactEmail = organization?.contactEmail\n\n useAgeDisqualification(ageQualificationStatus, contactEmail)\n\n if (!isFetched) {\n return <DefaultLoading />\n }\n\n if (!person) {\n throw new Error('Current person not found')\n }\n\n if (ageQualificationStatus === AgeQualificationStatus.DISQUALIFIED) {\n return <AgeCheckUnderageScreen contactEmail={contactEmail} />\n }\n\n if (ageQualificationStatus === AgeQualificationStatus.UNKNOWN) {\n return <AgeCheckRequiredScreen />\n }\n\n return <>{children}</>\n}\n\n/**\n * Helper hook that handles the age disqualification logic.\n *\n * If a host app provides an onAgeDisqualification callback, it will be called\n * when a user is found to be disqualified by their age.\n */\nfunction useAgeDisqualification(\n ageQualificationStatus: CurrentPersonResource['ageQualificationStatus'],\n contactEmail: string | undefined\n) {\n const { onAgeDisqualification } = useChatContext()\n const hasCalledCallbackRef = useRef(false)\n\n useEffect(() => {\n if (\n ageQualificationStatus === AgeQualificationStatus.DISQUALIFIED &&\n !hasCalledCallbackRef.current\n ) {\n hasCalledCallbackRef.current = true\n onAgeDisqualification({ contactEmail: contactEmail || '' })\n }\n }, [ageQualificationStatus, onAgeDisqualification, contactEmail])\n}\n"]}
|
|
@@ -6,20 +6,20 @@ import { AttachmentActionsScreen } from '../screens/attachment_actions/attachmen
|
|
|
6
6
|
import { BugReportScreen } from '../screens/bug_report_screen';
|
|
7
7
|
import { MessageReadReceiptsScreen } from '../screens/conversation/message_read_receipts_screen';
|
|
8
8
|
import { ConversationDetailsScreen } from '../screens/conversation_details_screen';
|
|
9
|
+
import { ConversationNotificationLevelSelectScreen } from '../screens/conversation_notification_level_select_screen';
|
|
9
10
|
import { ConversationScreen } from '../screens/conversation_screen';
|
|
10
11
|
import { ConversationSelectTypeScreen } from '../screens/conversation_select_type_screen';
|
|
11
12
|
import { ConversationsScreen } from '../screens/conversations/conversations_screen';
|
|
13
|
+
import { GroupNotificationLevelSelectScreen } from '../screens/group_notification_level_select_screen';
|
|
14
|
+
import { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen';
|
|
12
15
|
import { MessageActionsScreen } from '../screens/message_actions_screen';
|
|
13
16
|
import { MessageReportScreen } from '../screens/message_report_screen';
|
|
14
17
|
import { NotFound } from '../screens/not_found';
|
|
15
18
|
import { NotificationSettingsScreen } from '../screens/notification_settings_screen';
|
|
16
19
|
import { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen';
|
|
17
|
-
import { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen';
|
|
18
|
-
import { GroupNotificationLevelSelectScreen } from '../screens/group_notification_level_select_screen';
|
|
19
|
-
import { ConversationNotificationLevelSelectScreen } from '../screens/conversation_notification_level_select_screen';
|
|
20
20
|
import { ReactionsScreen } from '../screens/reactions_screen';
|
|
21
|
-
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
22
21
|
import { SendGiphyScreen } from '../screens/send_giphy_screen';
|
|
22
|
+
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
23
23
|
export declare const NewConversationStack: import("@react-navigation/native").TypedNavigator<{
|
|
24
24
|
ParamList: import("@react-navigation/native").ParamListBase;
|
|
25
25
|
NavigatorID: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,EACL,uBAAuB,EAExB,MAAM,yDAAyD,CAAA;AAChE,OAAO,EAAE,eAAe,EAA0B,MAAM,8BAA8B,CAAA;AACtF,OAAO,EACL,yBAAyB,EAE1B,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAWlF,OAAO,EACL,yCAAyC,EAE1C,MAAM,0DAA0D,CAAA;AACjE,OAAO,EAEL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAA;AAKvC,OAAO,EACL,4BAA4B,EAE7B,MAAM,4CAA4C,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAA;AAEnF,OAAO,EACL,kCAAkC,EAEnC,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EAAE,+B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AK;;;iDArRr9L,2BAA2B;;;;;;;;;mDAqRq7L,KAAK;;;iDA3Qr9L,2BAA2B;;;;;;;;mDA2Qq7L,KAAK;;;iDA9Pr9L,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;mDA8Pq7L,KAAK;;;;iDA5Or9L,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA4Oo6L,gBAAiB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAAtB,gBAAiB,KAAK;;;;;;;;;;;;;;;;;;EATh/L,CAAA;AAEF,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,SAAS,CAAC,CAAA;AAE3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,eAAe,CAAC;QACxB,UAAU,aAAc,SAAQ,kBAAkB;SAAG;KACtD;CACF"}
|
|
@@ -5,6 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { Platform } from 'react-native';
|
|
6
6
|
import { Icon } from '../components';
|
|
7
7
|
import { HeaderDoneButton, HeaderTextButton, } from '../components/display/platform_modal_header_buttons';
|
|
8
|
+
import { useQualifiedByAge } from '../hooks';
|
|
8
9
|
import { AttachmentActionsScreen, AttachmentActionsScreenOptions, } from '../screens/attachment_actions/attachment_actions_screen';
|
|
9
10
|
import { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen';
|
|
10
11
|
import { MessageReadReceiptsScreen, MessageReadReceiptsScreenOptions, } from '../screens/conversation/message_read_receipts_screen';
|
|
@@ -12,26 +13,25 @@ import { ConversationDetailsScreen } from '../screens/conversation_details_scree
|
|
|
12
13
|
import { ConversationFilterReceipientsScreenOptions, ConversationFilterRecipientsScreen, } from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen';
|
|
13
14
|
import { ConversationFiltersScreen, ConversationFiltersScreenOptions, } from '../screens/conversation_filters_screen';
|
|
14
15
|
import { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen';
|
|
16
|
+
import { ConversationNotificationLevelSelectScreen, ConversationNotificationLevelSelectScreenOptions, } from '../screens/conversation_notification_level_select_screen';
|
|
15
17
|
import { ConversationScreen, ConversationScreenTitle, } from '../screens/conversation_screen';
|
|
18
|
+
import { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen';
|
|
16
19
|
import { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen';
|
|
17
20
|
import { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen';
|
|
18
|
-
import { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen';
|
|
19
21
|
import { ConversationSelectTypeScreen, ConversationSelectTypeScreenOptions, } from '../screens/conversation_select_type_screen';
|
|
20
22
|
import { ConversationsScreen } from '../screens/conversations/conversations_screen';
|
|
21
23
|
import { GetHelpScreen } from '../screens/get_help_screen';
|
|
24
|
+
import { GroupNotificationLevelSelectScreen, GroupNotificationLevelSelectScreenOptions, } from '../screens/group_notification_level_select_screen';
|
|
25
|
+
import { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen';
|
|
22
26
|
import { MessageActionsScreen, MessageActionsScreenOptions, } from '../screens/message_actions_screen';
|
|
23
27
|
import { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen';
|
|
24
28
|
import { NotFound } from '../screens/not_found';
|
|
25
29
|
import { NotificationSettingsScreen } from '../screens/notification_settings_screen';
|
|
26
30
|
import { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen';
|
|
27
|
-
import { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen';
|
|
28
|
-
import { GroupNotificationLevelSelectScreen, GroupNotificationLevelSelectScreenOptions, } from '../screens/group_notification_level_select_screen';
|
|
29
|
-
import { ConversationNotificationLevelSelectScreen, ConversationNotificationLevelSelectScreenOptions, } from '../screens/conversation_notification_level_select_screen';
|
|
30
31
|
import { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen';
|
|
31
|
-
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
32
32
|
import { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen';
|
|
33
33
|
import { TeamConversationScreen } from '../screens/team_conversation_screen';
|
|
34
|
-
import {
|
|
34
|
+
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
35
35
|
const HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {
|
|
36
36
|
marginLeft: Platform.select({ ios: -8, default: -3 }),
|
|
37
37
|
marginRight: Platform.select({ ios: 0, default: 30 }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,yDAAyD,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,iFAAiF,CAAA;AAExF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,wCAAwC,CAAA;AAC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;YACtB,MAAM,EAAE,4BAA4B;YACpC,OAAO,EAAE,mCAAmC;SAC7C;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,mBAAmB,EAAE;YACnB,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,gCAAgC;SAC1C;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,OAAO,EAAE;YACP,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC5B,WAAW,EAAE,UAAU;gBACvB,iBAAiB,EAAE,KAAK;gBACxB,YAAY,EAAE,OAAO;gBACrB,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CACpB,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,EAAG,CAC1E;aACF,CAAC;SACH;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK;aACb;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport { Platform } from 'react-native'\nimport { Icon } from '../components'\nimport {\n HeaderDoneButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen'\nimport {\n MessageReadReceiptsScreen,\n MessageReadReceiptsScreenOptions,\n} from '../screens/conversation/message_read_receipts_screen'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport { ConversationSelectRecipientsParams } from '../screens/conversation_select_recipients/types/screen_props'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { NotificationSettingsScreen } from '../screens/notification_settings_screen'\nimport { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen'\nimport { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen'\nimport {\n GroupNotificationLevelSelectScreen,\n GroupNotificationLevelSelectScreenOptions,\n} from '../screens/group_notification_level_select_screen'\nimport {\n ConversationNotificationLevelSelectScreen,\n ConversationNotificationLevelSelectScreenOptions,\n} from '../screens/conversation_notification_level_select_screen'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { useQualifiedByAge } from '../hooks'\n\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => {\n const { chat_group_graph_id, group_source_app_name } =\n route.params as ConversationSelectRecipientsParams\n navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name })\n }}\n title=\"Cancel\"\n />\n ),\n }),\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted, muted } =\n route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n muted={muted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={() => navigation.getParent()?.goBack()}\n />\n ),\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n NotificationSettings: {\n screen: NotificationSettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n PreferredAppSelection: {\n screen: PreferredAppSelectionScreen,\n options: {\n title: 'Preferred app',\n },\n },\n GroupNotificationSettings: {\n screen: GroupNotificationSettingsScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as { title?: string })?.title || 'Group Settings',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderDoneButton {...props} navigation={navigation} />\n ),\n }),\n },\n GroupNotificationLevelSelect: {\n screen: GroupNotificationLevelSelectScreen,\n options: GroupNotificationLevelSelectScreenOptions,\n },\n ConversationNotificationLevelSelect: {\n screen: ConversationNotificationLevelSelectScreen,\n options: ConversationNotificationLevelSelectScreenOptions,\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n GroupConversationNew: {\n screen: ConversationNewScreen,\n if: useQualifiedByAge,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: props => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.getParent()?.goBack()}\n title=\"Cancel\"\n />\n ),\n }),\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,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;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport { Platform } from 'react-native'\nimport { Icon } from '../components'\nimport {\n HeaderDoneButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { useQualifiedByAge } from '../hooks'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen'\nimport {\n MessageReadReceiptsScreen,\n MessageReadReceiptsScreenOptions,\n} from '../screens/conversation/message_read_receipts_screen'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationNotificationLevelSelectScreen,\n ConversationNotificationLevelSelectScreenOptions,\n} from '../screens/conversation_notification_level_select_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationSelectRecipientsParams } from '../screens/conversation_select_recipients/types/screen_props'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n GroupNotificationLevelSelectScreen,\n GroupNotificationLevelSelectScreenOptions,\n} from '../screens/group_notification_level_select_screen'\nimport { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { NotificationSettingsScreen } from '../screens/notification_settings_screen'\nimport { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\n\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => {\n const { chat_group_graph_id, group_source_app_name } =\n route.params as ConversationSelectRecipientsParams\n navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name })\n }}\n title=\"Cancel\"\n />\n ),\n }),\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted, muted } =\n route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n muted={muted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={() => navigation.getParent()?.goBack()}\n />\n ),\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n NotificationSettings: {\n screen: NotificationSettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n PreferredAppSelection: {\n screen: PreferredAppSelectionScreen,\n options: {\n title: 'Preferred app',\n },\n },\n GroupNotificationSettings: {\n screen: GroupNotificationSettingsScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as { title?: string })?.title || 'Group Settings',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderDoneButton {...props} navigation={navigation} />\n ),\n }),\n },\n GroupNotificationLevelSelect: {\n screen: GroupNotificationLevelSelectScreen,\n options: GroupNotificationLevelSelectScreenOptions,\n },\n ConversationNotificationLevelSelect: {\n screen: ConversationNotificationLevelSelectScreen,\n options: ConversationNotificationLevelSelectScreenOptions,\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n GroupConversationNew: {\n screen: ConversationNewScreen,\n if: useQualifiedByAge,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: props => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.getParent()?.goBack()}\n title=\"Cancel\"\n />\n ),\n }),\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import ErrorBoundary from '../components/page/error_boundary';
|
|
3
2
|
import { Suspense } from 'react';
|
|
3
|
+
import ErrorBoundary from '../components/page/error_boundary';
|
|
4
4
|
import { DefaultLoading } from '../components/page/loading';
|
|
5
5
|
import { ChatAccessGate } from './chat_access_gate';
|
|
6
6
|
export function ScreenLayout({ children }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenLayout.js","sourceRoot":"","sources":["../../src/navigation/screenLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"screenLayout.js","sourceRoot":"","sources":["../../src/navigation/screenLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,aAAa,MAAM,mCAAmC,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAoC;IACzE,OAAO,CACL,CAAC,aAAa,CACZ;MAAA,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,AAAD,EAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAC9D;IAAA,EAAE,aAAa,CAAC,CACjB,CAAA;AACH,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,EAAE,QAAQ,EAAoC;IAC3F,OAAO,CACL,CAAC,YAAY,CACX;MAAA,CAAC,cAAc,CACb;QAAA,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,AAAD,EAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAC9D;MAAA,EAAE,cAAc,CAClB;IAAA,EAAE,YAAY,CAAC,CAChB,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport { Suspense } from 'react'\nimport ErrorBoundary from '../components/page/error_boundary'\nimport { DefaultLoading } from '../components/page/loading'\nimport { ChatAccessGate } from './chat_access_gate'\n\nexport function ScreenLayout({ children }: { children: React.ReactElement }) {\n return (\n <ErrorBoundary>\n <Suspense fallback={<DefaultLoading />}>{children}</Suspense>\n </ErrorBoundary>\n )\n}\n\nexport function ScreenLayoutWithChatAccessGate({ children }: { children: React.ReactElement }) {\n return (\n <ScreenLayout>\n <ChatAccessGate>\n <Suspense fallback={<DefaultLoading />}>{children}</Suspense>\n </ChatAccessGate>\n </ScreenLayout>\n )\n}\n"]}
|
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
/**
|
|
8
|
-
* This module implements the `Event` interface from the DOM.
|
|
9
|
-
* See https://dom.spec.whatwg.org/#interface-event.
|
|
10
|
-
*/
|
|
11
7
|
import type RNEventTarget from './EventTarget';
|
|
12
8
|
export interface EventInit {
|
|
13
9
|
bubbles?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../../src/polyfills/events/Event.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../../src/polyfills/events/Event.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,KAAK,aAAa,MAAM,eAAe,CAAA;AAc9C,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE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B,wBAAwB,IAAI,IAAI;IAKhC,eAAe,IAAI,IAAI;CAGxB"}
|
|
@@ -4,8 +4,12 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* This module implements the `Event` interface from the DOM.
|
|
9
|
+
* See https://dom.spec.whatwg.org/#interface-event.
|
|
10
|
+
*/
|
|
8
11
|
import { setPlatformObject } from '../webidl/PlatformObjects';
|
|
12
|
+
import { getComposedPath, getCurrentTarget, getEventPhase, getInPassiveListenerFlag, getIsTrusted, getTarget, setStopImmediatePropagationFlag, setStopPropagationFlag, setIsTrusted, setEventPhase, } from './internals/EventInternals';
|
|
9
13
|
export default class Event {
|
|
10
14
|
static NONE;
|
|
11
15
|
static CAPTURING_PHASE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../../src/polyfills/events/Event.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"Event.js","sourceRoot":"","sources":["../../../src/polyfills/events/Event.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,wBAAwB,EACxB,YAAY,EACZ,SAAS,EACT,+BAA+B,EAC/B,sBAAsB,EACtB,YAAY,EACZ,aAAa,GACd,MAAM,4BAA4B,CAAA;AAUnC,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,MAAM,CAAC,IAAI,CAAG;IACd,MAAM,CAAC,eAAe,CAAG;IACzB,MAAM,CAAC,SAAS,CAAG;IACnB,MAAM,CAAC,cAAc,CAAG;IAEf,IAAI,CAAI;IACR,eAAe,CAAI;IACnB,SAAS,CAAI;IACb,cAAc,CAAI;IAEnB,QAAQ,C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EAAE;IAC9C,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,CAAC;CACT,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,iBAAiB,EAAE;IACxD,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,CAAC;CACT,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE;IACxC,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,CAAC;CACT,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE;IAClD,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,CAAC;CACT,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,gBAAgB,EAAE;IAC7C,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,CAAC;CACT,CAAC,CAAA;AAEF,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,SAAS,EAAE,gBAAgB,EAAE;IACvD,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,CAAC;CACT,CAAC,CAAA;AAEF,iBAAiB,CAAC,KAAK,CAAC,CAAA","sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * This module implements the `Event` interface from the DOM.\n * See https://dom.spec.whatwg.org/#interface-event.\n */\n\nimport { setPlatformObject } from '../webidl/PlatformObjects'\nimport type RNEventTarget from './EventTarget'\nimport {\n getComposedPath,\n getCurrentTarget,\n getEventPhase,\n getInPassiveListenerFlag,\n getIsTrusted,\n getTarget,\n setStopImmediatePropagationFlag,\n setStopPropagationFlag,\n setIsTrusted,\n setEventPhase,\n} from './internals/EventInternals'\n\nexport interface EventInit {\n bubbles?: boolean\n cancelable?: boolean\n composed?: boolean\n}\n\nexport type EventPhase = 0 | 1 | 2 | 3\n\nexport default class Event {\n static NONE: 0\n static CAPTURING_PHASE: 1\n static AT_TARGET: 2\n static BUBBLING_PHASE: 3\n\n readonly NONE!: 0\n readonly CAPTURING_PHASE!: 1\n readonly AT_TARGET!: 2\n readonly BUBBLING_PHASE!: 3\n\n private _bubbles: boolean\n private _cancelable: boolean\n private _composed: boolean\n private _type: string\n\n private _defaultPrevented: boolean = false\n private _timeStamp: number = performance.now()\n\n // Symbol-keyed fields are internal and managed via helpers; not declared here.\n\n constructor(type: string, options?: EventInit | null) {\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'Event': 1 argument required, but only 0 present.\")\n }\n\n const typeOfOptions = typeof options\n if (options != null && typeOfOptions !== 'object' && typeOfOptions !== 'function') {\n throw new TypeError(\n \"Failed to construct 'Event': The provided value is not of type 'EventInit'.\"\n )\n }\n\n this._type = String(type)\n this._bubbles = Boolean((options as EventInit | undefined)?.bubbles)\n this._cancelable = Boolean((options as EventInit | undefined)?.cancelable)\n this._composed = Boolean((options as EventInit | undefined)?.composed)\n\n // Initialize internal flags\n setIsTrusted(this, false)\n setEventPhase(this, 0 as 0)\n }\n\n get bubbles(): boolean {\n return this._bubbles\n }\n\n get cancelable(): boolean {\n return this._cancelable\n }\n\n get composed(): boolean {\n return this._composed\n }\n\n get currentTarget(): RNEventTarget | null {\n return getCurrentTarget(this)\n }\n\n get defaultPrevented(): boolean {\n return this._defaultPrevented\n }\n\n get eventPhase(): EventPhase {\n return getEventPhase(this)\n }\n\n get isTrusted(): boolean {\n return getIsTrusted(this)\n }\n\n get target(): RNEventTarget | null {\n return getTarget(this)\n }\n\n get timeStamp(): number {\n return this._timeStamp\n }\n\n get type(): string {\n return this._type\n }\n\n composedPath(): ReadonlyArray<RNEventTarget> {\n return getComposedPath(this).slice()\n }\n\n preventDefault(): void {\n if (!this._cancelable) {\n return\n }\n\n if (getInPassiveListenerFlag(this)) {\n console.error(new Error('Unable to preventDefault inside passive event listener invocation.'))\n return\n }\n\n this._defaultPrevented = true\n }\n\n stopImmediatePropagation(): void {\n setStopPropagationFlag(this, true)\n setStopImmediatePropagationFlag(this, true)\n }\n\n stopPropagation(): void {\n setStopPropagationFlag(this, true)\n }\n}\n\nObject.defineProperty(Event, 'NONE', {\n enumerable: true,\n value: 0,\n})\n\nObject.defineProperty(Event.prototype, 'NONE', {\n enumerable: true,\n value: 0,\n})\n\nObject.defineProperty(Event, 'CAPTURING_PHASE', {\n enumerable: true,\n value: 1,\n})\n\nObject.defineProperty(Event.prototype, 'CAPTURING_PHASE', {\n enumerable: true,\n value: 1,\n})\n\nObject.defineProperty(Event, 'AT_TARGET', {\n enumerable: true,\n value: 2,\n})\n\nObject.defineProperty(Event.prototype, 'AT_TARGET', {\n enumerable: true,\n value: 2,\n})\n\nObject.defineProperty(Event, 'BUBBLING_PHASE', {\n enumerable: true,\n value: 3,\n})\n\nObject.defineProperty(Event.prototype, 'BUBBLING_PHASE', {\n enumerable: true,\n value: 3,\n})\n\nsetPlatformObject(Event)\n"]}
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
/**
|
|
8
|
-
* Implements the `EventTarget` interface from the DOM.
|
|
9
|
-
*/
|
|
10
7
|
import Event from './Event';
|
|
11
8
|
import { EVENT_TARGET_GET_THE_PARENT_KEY, INTERNAL_DISPATCH_METHOD_KEY } from './internals/EventTargetInternals';
|
|
12
9
|
export type EventCallback = (event: Event) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTarget.d.ts","sourceRoot":"","sources":["../../../src/polyfills/events/EventTarget.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"EventTarget.d.ts","sourceRoot":"","sources":["../../../src/polyfills/events/EventTarget.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,OAAO,KAAK,MAAM,SAAS,CAAA;AAa3B,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC7B,MAAM,kCAAkC,CAAA;AAEzC,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;AAClD,MAAM,MAAM,YAAY,GAAG;IAAE,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,CAAA;AAC9D,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,YAAY,CAAA;AAExD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,CAAC,CAAA;AAWF,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,gBAAgB,CACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,aAAa,GAAG,IAAI,EAC9B,mBAAmB,GAAE,uBAAuB,GAAG,OAAY,GAC1D,IAAI;IAmFP,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,aAAa,EACvB,mBAAmB,GAAE,oBAAoB,GAAG,OAAY,GACvD,IAAI;IAiCP,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAmBpC,CAAC,+BAA+B,CAAC,IAAI,WAAW,GAAG,IAAI;IAKvD,CAAC,4BAA4B,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAGnD"}
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Implements the `EventTarget` interface from the DOM.
|
|
9
9
|
*/
|
|
10
|
+
import { setPlatformObject } from '../webidl/PlatformObjects';
|
|
10
11
|
import Event from './Event';
|
|
11
12
|
import { getStopImmediatePropagationFlag, getStopPropagationFlag, setComposedPath, setCurrentTarget, setEventPhase, setInPassiveListenerFlag, setIsTrusted, setStopImmediatePropagationFlag, setStopPropagationFlag, setTarget, } from './internals/EventInternals';
|
|
12
13
|
import { EVENT_TARGET_GET_THE_PARENT_KEY, INTERNAL_DISPATCH_METHOD_KEY, } from './internals/EventTargetInternals';
|
|
13
|
-
import { setPlatformObject } from '../webidl/PlatformObjects';
|
|
14
14
|
export default class EventTarget {
|
|
15
15
|
addEventListener(type, callback, optionsOrUseCapture = {}) {
|
|
16
16
|
if (arguments.length < 2) {
|