@planningcenter/chat-react-native 3.42.2-qa-821.0 → 3.42.2-qa-staging.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
- package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_card.js +7 -3
- package/build/components/conversation/attachments/attachment_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +2 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +7 -12
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts +2 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +23 -6
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts +2 -1
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +8 -2
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +2 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +12 -2
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts +2 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +7 -2
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts +2 -1
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +53 -16
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts +2 -1
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +13 -3
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/conversation_start_banner.d.ts +2 -1
- package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
- package/build/components/conversation/conversation_start_banner.js +14 -2
- package/build/components/conversation/conversation_start_banner.js.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js +9 -2
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +10 -2
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts +2 -1
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +53 -2
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +2 -1
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +21 -17
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts +2 -1
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +2 -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 +2 -2
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts +2 -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 +2 -2
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +6 -5
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +82 -20
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.d.ts +2 -1
- package/build/components/conversation/message_markdown.d.ts.map +1 -1
- package/build/components/conversation/message_markdown.js +16 -8
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +2 -1
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +5 -3
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts +2 -1
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +13 -3
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.d.ts +3 -3
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +8 -5
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_connectors.d.ts +2 -2
- package/build/components/conversation/reply_connectors.d.ts.map +1 -1
- package/build/components/conversation/reply_connectors.js +50 -18
- package/build/components/conversation/reply_connectors.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts +2 -1
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +46 -16
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/system_message.d.ts +2 -1
- package/build/components/conversation/system_message.d.ts.map +1 -1
- package/build/components/conversation/system_message.js +12 -3
- package/build/components/conversation/system_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.d.ts +2 -1
- package/build/components/conversation/typing_indicator.d.ts.map +1 -1
- package/build/components/conversation/typing_indicator.js +13 -3
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +2 -2
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +10 -4
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +3 -2
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +76 -12
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.d.ts +1 -1
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +17 -16
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/conversations_blank_state.d.ts +2 -1
- package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
- package/build/components/conversations/conversations_blank_state.js +12 -2
- package/build/components/conversations/conversations_blank_state.js.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts +2 -1
- package/build/components/conversations/mute_indicator.d.ts.map +1 -1
- package/build/components/conversations/mute_indicator.js +2 -2
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +2 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +10 -3
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.d.ts +4 -2
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
- package/build/components/conversations/unread_count_badge.js +12 -7
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +13 -3
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/adult_requirement_notice.d.ts +2 -1
- package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
- package/build/components/display/adult_requirement_notice.js +4 -2
- package/build/components/display/adult_requirement_notice.js.map +1 -1
- package/build/components/display/avatar.d.ts +2 -1
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +7 -2
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +2 -1
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +9 -2
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts +2 -1
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +37 -6
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/banner.d.ts +3 -3
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +11 -4
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts +2 -2
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +10 -2
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts +2 -1
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +14 -3
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +2 -1
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +15 -3
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/conversation_avatar.d.ts +2 -1
- package/build/components/display/conversation_avatar.d.ts.map +1 -1
- package/build/components/display/conversation_avatar.js +9 -5
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/components/display/emoji_avatar.d.ts +2 -1
- package/build/components/display/emoji_avatar.d.ts.map +1 -1
- package/build/components/display/emoji_avatar.js +12 -2
- package/build/components/display/emoji_avatar.js.map +1 -1
- package/build/components/display/file_attachment_preview.d.ts +1 -1
- package/build/components/display/file_attachment_preview.d.ts.map +1 -1
- package/build/components/display/file_attachment_preview.js +17 -3
- package/build/components/display/file_attachment_preview.js.map +1 -1
- package/build/components/display/heading.d.ts +2 -1
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +4 -2
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +2 -1
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +4 -4
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_avatar.d.ts +2 -1
- package/build/components/display/icon_avatar.d.ts.map +1 -1
- package/build/components/display/icon_avatar.js +12 -2
- package/build/components/display/icon_avatar.js.map +1 -1
- package/build/components/display/icon_button.d.ts +2 -1
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +5 -3
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image.d.ts +2 -1
- package/build/components/display/image.d.ts.map +1 -1
- package/build/components/display/image.js +7 -3
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.d.ts +1 -1
- package/build/components/display/image_attachment_preview.d.ts.map +1 -1
- package/build/components/display/image_attachment_preview.js +7 -2
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/keyboard_view.d.ts +2 -1
- package/build/components/display/keyboard_view.d.ts.map +1 -1
- package/build/components/display/keyboard_view.js +9 -4
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/components/display/person.d.ts +2 -1
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +12 -2
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +10 -5
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/pressable_row.d.ts +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/pressable_row.js +7 -2
- package/build/components/display/pressable_row.js.map +1 -1
- package/build/components/display/spinner.d.ts +2 -1
- package/build/components/display/spinner.d.ts.map +1 -1
- package/build/components/display/spinner.js +9 -3
- package/build/components/display/spinner.js.map +1 -1
- package/build/components/display/switch.d.ts +2 -1
- package/build/components/display/switch.d.ts.map +1 -1
- package/build/components/display/switch.js +2 -2
- package/build/components/display/switch.js.map +1 -1
- package/build/components/display/tabs.d.ts +1 -1
- package/build/components/display/tabs.d.ts.map +1 -1
- package/build/components/display/tabs.js +31 -21
- package/build/components/display/tabs.js.map +1 -1
- package/build/components/display/text.d.ts +2 -1
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +4 -2
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_button.d.ts +2 -1
- package/build/components/display/text_button.d.ts.map +1 -1
- package/build/components/display/text_button.js +8 -3
- package/build/components/display/text_button.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts +2 -1
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +5 -4
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/text_input.d.ts +1 -1
- package/build/components/display/text_input.d.ts.map +1 -1
- package/build/components/display/text_input.js +1 -2
- package/build/components/display/text_input.js.map +1 -1
- package/build/components/display/toggle_button.d.ts +2 -1
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +9 -3
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/video_attachment_preview.d.ts +1 -1
- package/build/components/display/video_attachment_preview.d.ts.map +1 -1
- package/build/components/display/video_attachment_preview.js +20 -3
- package/build/components/display/video_attachment_preview.js.map +1 -1
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +14 -4
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/page/component_error_boundary.d.ts +2 -2
- package/build/components/page/component_error_boundary.d.ts.map +1 -1
- package/build/components/page/component_error_boundary.js +4 -2
- package/build/components/page/component_error_boundary.js.map +1 -1
- package/build/components/page/loading.d.ts +2 -1
- package/build/components/page/loading.d.ts.map +1 -1
- package/build/components/page/loading.js +4 -2
- package/build/components/page/loading.js.map +1 -1
- package/build/components/page/page_error_boundary.d.ts +2 -2
- package/build/components/page/page_error_boundary.d.ts.map +1 -1
- package/build/components/page/page_error_boundary.js +32 -11
- package/build/components/page/page_error_boundary.js.map +1 -1
- package/build/components/primitive/avatar_primitive.js +41 -14
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.js +18 -10
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/blank_state_primitive.js +12 -8
- package/build/components/primitive/blank_state_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +22 -9
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.d.ts +1 -1
- package/build/components/safe_area_modal.d.ts.map +1 -1
- package/build/components/safe_area_modal.js +3 -2
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.d.ts +2 -1
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +5 -3
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +1 -1
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +1 -2
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversation_context.d.ts +2 -2
- package/build/contexts/conversation_context.d.ts.map +1 -1
- package/build/contexts/conversation_context.js +2 -3
- package/build/contexts/conversation_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +2 -3
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts +1 -1
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +2 -3
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/use_animated_message_background_color.d.ts +2 -2
- package/build/hooks/use_conversation.d.ts +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +2 -0
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +4 -19
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversation_membership.d.ts +1 -1
- package/build/hooks/use_conversation_membership.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +0 -1
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +2 -2
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +36 -36
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.js +3 -1
- package/build/hooks/use_conversations_actions.js.map +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
- package/build/hooks/use_mark_latest_message_read.js +3 -4
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_person_settings.d.ts +1 -1
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +1 -7
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/index.d.ts +1 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js.map +1 -1
- package/build/navigation/chat_access_gate.d.ts +2 -2
- package/build/navigation/chat_access_gate.d.ts.map +1 -1
- package/build/navigation/chat_access_gate.js +5 -6
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +36 -35
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +21 -19
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.d.ts +2 -2
- package/build/navigation/screenLayout.d.ts.map +1 -1
- package/build/navigation/screenLayout.js +9 -3
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/EventTarget.d.ts +1 -1
- package/build/polyfills/events/EventTarget.d.ts.map +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts +2 -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 +46 -3
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts +2 -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 +25 -2
- 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 +2 -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 +25 -6
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts +2 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +5 -3
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts +2 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.js +36 -9
- package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.js +9 -5
- package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
- package/build/screens/avatar_picker/color_picker.d.ts +2 -1
- package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
- package/build/screens/avatar_picker/color_picker.js +5 -4
- package/build/screens/avatar_picker/color_picker.js.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.d.ts +2 -1
- package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.js +13 -12
- package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
- package/build/screens/avatar_picker/icon_grid.d.ts +2 -1
- package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
- package/build/screens/avatar_picker/icon_grid.js +5 -4
- package/build/screens/avatar_picker/icon_grid.js.map +1 -1
- package/build/screens/avatar_picker/upload_tab.d.ts +2 -1
- package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/upload_tab.js +4 -3
- package/build/screens/avatar_picker/upload_tab.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +2 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +117 -11
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.d.ts +2 -1
- package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +20 -4
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts +2 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +106 -43
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +9 -3
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +12 -2
- 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 +2 -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 +44 -20
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts +2 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +11 -10
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +6 -6
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +34 -7
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +1 -2
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +2 -1
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +2 -2
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/team_filters.d.ts +2 -1
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +2 -2
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts +2 -1
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +16 -4
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts +3 -2
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.js +16 -6
- package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts +4 -3
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +46 -22
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +3 -2
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +6 -4
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +2 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +20 -4
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts +2 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +30 -4
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts +2 -1
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +61 -27
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js +3 -2
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +2 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js +4 -4
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts +2 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +6 -4
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +3 -2
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +66 -25
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -2
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +2 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +15 -2
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +2 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +14 -2
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -2
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +5 -2
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +2 -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 +11 -4
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +83 -11
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +2 -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 +14 -7
- 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 +2 -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 +18 -15
- 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 +2 -1
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +10 -3
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.d.ts +2 -1
- package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.js +4 -3
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts +2 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +5 -3
- package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts +2 -1
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +42 -19
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +2 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +6 -2
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.d.ts +2 -1
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +558 -35
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/get_help_screen.js +25 -4
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.d.ts +2 -1
- package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/group_notification_level_select_screen.js +4 -2
- package/build/screens/group_notification_level_select_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.d.ts +2 -1
- package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
- package/build/screens/group_notification_settings_screen.js +25 -3
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +2 -1
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +28 -12
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +2 -1
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
- package/build/screens/message_report/components/message_preview.js +22 -2
- package/build/screens/message_report/components/message_preview.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts +2 -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 +13 -4
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +2 -1
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +61 -9
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts +2 -1
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +5 -2
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.d.ts +2 -1
- package/build/screens/notification_settings_screen.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.js +66 -28
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts +2 -1
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +21 -3
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.d.ts +2 -1
- package/build/screens/reactions_screen.d.ts.map +1 -1
- package/build/screens/reactions_screen.js +19 -7
- package/build/screens/reactions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +2 -1
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.js +31 -5
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/settings_screen.d.ts +2 -1
- package/build/screens/settings_screen.d.ts.map +1 -1
- package/build/screens/settings_screen.js +26 -4
- package/build/screens/settings_screen.js.map +1 -1
- package/build/screens/system_message_people_screen.d.ts +2 -1
- package/build/screens/system_message_people_screen.d.ts.map +1 -1
- package/build/screens/system_message_people_screen.js +10 -4
- package/build/screens/system_message_people_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.d.ts +1 -1
- package/build/screens/team_conversation_screen.d.ts.map +1 -1
- package/build/screens/team_conversation_screen.js +12 -4
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/types/resources/conversation.d.ts +10 -1
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js +2 -1
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +2 -0
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/response_error.d.ts +1 -0
- package/build/utils/response_error.d.ts.map +1 -1
- package/build/utils/response_error.js +20 -1
- package/build/utils/response_error.js.map +1 -1
- package/build/utils/sha_256.js.map +1 -1
- package/build/utils/system_messages.d.ts +1 -1
- package/build/utils/system_messages.d.ts.map +1 -1
- package/build/utils/system_messages.js.map +1 -1
- package/build/utils/theme.d.ts +2 -2
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js.map +1 -1
- package/package.json +12 -12
- package/src/__tests__/hooks/use_attachment_uploader.test.tsx +0 -1
- package/src/__tests__/hooks/use_font_scale.test.ts +3 -7
- package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
- package/src/__tests__/utils/system_messages.ts +1 -1
- package/src/__tests__/utils/uri.ts +50 -8
- package/src/__utils__/handlers.ts +6 -5
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +3 -10
- package/src/components/conversations/conversation_preview.tsx +58 -23
- package/src/components/conversations/unread_count_badge.tsx +13 -4
- package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
- package/src/components/page/__tests__/error_boundary.test.tsx +2 -6
- package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
- package/src/hooks/use_conversation.ts +2 -0
- package/src/hooks/use_conversation_jolt_events.ts +3 -19
- package/src/hooks/use_conversation_messages.ts +5 -6
- package/src/hooks/use_conversations_actions.ts +3 -1
- package/src/hooks/use_mark_latest_message_read.ts +3 -4
- package/src/hooks/use_suspense_api.ts +1 -9
- package/src/index.tsx +1 -2
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/screens/conversation_screen.tsx +2 -4
- package/src/screens/conversations/components/list_header_component.tsx +6 -6
- package/src/types/resources/conversation.ts +11 -1
- package/src/utils/__tests__/response_error.test.ts +47 -0
- package/src/utils/client/client.ts +2 -1
- package/src/utils/request/conversation.ts +2 -0
- package/src/utils/response_error.ts +23 -1
- package/src/utils/sha_256.ts +24 -24
- package/src/utils/system_messages.ts +1 -1
- package/src/utils/theme.ts +2 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_filter_context.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/context/conversation_filter_context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation_filter_context.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/context/conversation_filter_context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC3F,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGlE,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAUvC;IACD,MAAM,EAAE;QACN,mBAAmB,EAAE,SAAS;QAC9B,qBAAqB,EAAE,SAAS;QAChC,oBAAoB,EAAE,SAAS;KAChC;IACD,YAAY,EAAE,CAAC;IACf,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,wBAAwB,EAAE,GAAG,EAAE,GAAE,CAAC;IAClC,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,yBAAyB,EAAE,2BAA2B;CACvD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAqB,EAAE,EAAE;IAChE,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACnD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IACtE,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,KAAK,GAAG,QAAQ,EAAsD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QAAQ,CAAC,CAAA;AAC/F,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;AACxC,CAAC,CAAA","sourcesContent":["import { RouteProp, StackActions, useNavigation, useRoute } from '@react-navigation/native'\nimport React from 'react'\nimport { createContext, PropsWithChildren, useState } from 'react'\nimport { Platform } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { ConversationFiltersParams, ConversationFiltersScreenProps } from '../screen_props'\n\nconst DEFAULT_LIST_PADDING_BOTTOM = 64\n\nexport const FilterContext = createContext<{\n params: ConversationFiltersParams\n scrollOffset: number\n setScrollOffset: (offset: number) => void\n setFormSheetHeaderHeight: (height: number) => void\n resetFilter: () => void\n setGroupFilter: (params: ConversationFiltersParams) => void\n setAppFilter: (params: ConversationFiltersParams) => void\n applyFilters: (params: ConversationFiltersParams) => void\n platformListPaddingBottom: number | undefined\n}>({\n params: {\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n show_direct_messages: undefined,\n },\n scrollOffset: 0,\n setScrollOffset: () => {},\n setFormSheetHeaderHeight: () => {},\n resetFilter: () => {},\n setGroupFilter: () => {},\n setAppFilter: () => {},\n applyFilters: () => {},\n platformListPaddingBottom: DEFAULT_LIST_PADDING_BOTTOM,\n})\n\nexport const FilterProvider = ({ children }: PropsWithChildren) => {\n const [scrollOffset, setScrollOffset] = useState(0)\n const [formSheetHeaderHeight, setFormSheetHeaderHeight] = useState(56)\n const navigation = useNavigation()\n const route = useRoute<RouteProp<ConversationFiltersScreenProps['route']>>()\n const { bottom } = useSafeAreaInsets()\n\n const platformListPaddingBottom = Platform.select({\n ios: bottom + formSheetHeaderHeight,\n android: bottom + 12,\n })\n\n const filterContextValue = {\n params: route.params,\n scrollOffset,\n setScrollOffset,\n platformListPaddingBottom,\n setFormSheetHeaderHeight,\n resetFilter: () => {\n navigation.dispatch(\n StackActions.popTo('Conversations', {\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n show_direct_messages: undefined,\n })\n )\n },\n setGroupFilter: (params: Omit<ConversationFiltersParams, 'group_source_app_name'>) => {\n navigation.setParams({\n chat_group_graph_id: params.chat_group_graph_id,\n group_source_app_name: undefined,\n show_direct_messages: undefined,\n })\n },\n setAppFilter: (params: Omit<ConversationFiltersParams, 'chat_group_graph_id'>) => {\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: params.group_source_app_name,\n show_direct_messages: params.show_direct_messages,\n })\n },\n applyFilters: (params: ConversationFiltersParams) => {\n navigation.dispatch(StackActions.popTo('Conversations', params))\n },\n }\n\n return <FilterContext.Provider value={filterContextValue}>{children}</FilterContext.Provider>\n}\n\nexport const useFilterContext = () => {\n return React.useContext(FilterContext)\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { ConversationFiltersParams } from './screen_props';
|
|
3
4
|
export type GroupFiltersScreenProps = StaticScreenProps<ConversationFiltersParams>;
|
|
4
|
-
export declare const GroupFilters: () =>
|
|
5
|
+
export declare const GroupFilters: () => React.JSX.Element;
|
|
5
6
|
//# sourceMappingURL=group_filters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_filters.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filters/group_filters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"group_filters.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filters/group_filters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAE1D,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,yBAAyB,CAAC,CAAA;AAElF,eAAO,MAAM,YAAY,yBAkBxB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RefreshControl, StyleSheet } from 'react-native';
|
|
3
3
|
import { FlatList } from 'react-native-gesture-handler';
|
|
4
4
|
import { Text } from '../../components/display';
|
|
@@ -10,7 +10,7 @@ export const GroupFilters = () => {
|
|
|
10
10
|
const { groups, fetchNextPage, isRefetching, refetch } = useGroupsToFilter();
|
|
11
11
|
const { params } = useFilterContext();
|
|
12
12
|
const { chat_group_graph_id } = params;
|
|
13
|
-
return (
|
|
13
|
+
return (<FlatList data={groups} renderItem={({ item }) => (<GroupRow group={item} isActive={item?.id.toString() === chat_group_graph_id}/>)} ListEmptyComponent={<Text>No groups available</Text>} refreshing={isRefetching} refreshControl={<RefreshControl refreshing={isRefetching} onRefresh={refetch}/>} onEndReached={() => fetchNextPage()} contentContainerStyle={styles.container}/>);
|
|
14
14
|
};
|
|
15
15
|
const useStyles = () => {
|
|
16
16
|
const { platformListPaddingBottom } = useFilterContext();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_filters.js","sourceRoot":"","sources":["../../../src/screens/conversation_filters/group_filters.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"group_filters.js","sourceRoot":"","sources":["../../../src/screens/conversation_filters/group_filters.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAA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Content":["import { StaticScreenProps } from '@react-navigation/native'\nimport React from 'react'\nimport { RefreshControl, StyleSheet } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { Text } from '../../components/display'\nimport { GroupRow } from './components/rows'\nimport { useFilterContext } from './context/conversation_filter_context'\nimport { useGroupsToFilter } from './hooks/filters'\nimport { ConversationFiltersParams } from './screen_props'\n\nexport type GroupFiltersScreenProps = StaticScreenProps<ConversationFiltersParams>\n\nexport const GroupFilters = () => {\n const styles = useStyles()\n const { groups, fetchNextPage, isRefetching, refetch } = useGroupsToFilter()\n const { params } = useFilterContext()\n const { chat_group_graph_id } = params\n return (\n <FlatList\n data={groups}\n renderItem={({ item }) => (\n <GroupRow group={item} isActive={item?.id.toString() === chat_group_graph_id} />\n )}\n ListEmptyComponent={<Text>No groups available</Text>}\n refreshing={isRefetching}\n refreshControl={<RefreshControl refreshing={isRefetching} onRefresh={refetch} />}\n onEndReached={() => fetchNextPage()}\n contentContainerStyle={styles.container}\n />\n )\n}\n\nconst useStyles = () => {\n const { platformListPaddingBottom } = useFilterContext()\n return StyleSheet.create({\n container: {\n paddingBottom: platformListPaddingBottom,\n },\n })\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { ConversationFiltersParams } from './screen_props';
|
|
3
4
|
export type GroupFiltersScreenProps = StaticScreenProps<ConversationFiltersParams>;
|
|
4
|
-
export declare const TeamFilters: () =>
|
|
5
|
+
export declare const TeamFilters: () => React.JSX.Element;
|
|
5
6
|
//# sourceMappingURL=team_filters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team_filters.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filters/team_filters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"team_filters.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filters/team_filters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAE1D,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,yBAAyB,CAAC,CAAA;AAElF,eAAO,MAAM,WAAW,yBAkBvB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RefreshControl, StyleSheet } from 'react-native';
|
|
3
3
|
import { FlatList } from 'react-native-gesture-handler';
|
|
4
4
|
import { Text } from '../../components/display';
|
|
@@ -10,7 +10,7 @@ export const TeamFilters = () => {
|
|
|
10
10
|
const { teams, fetchNextPage, isRefetching, refetch } = useTeamsToFilter();
|
|
11
11
|
const { params } = useFilterContext();
|
|
12
12
|
const { chat_group_graph_id } = params;
|
|
13
|
-
return (
|
|
13
|
+
return (<FlatList data={teams} renderItem={({ item }) => (<TeamRow team={item} isActive={item?.id.toString() === chat_group_graph_id}/>)} refreshing={isRefetching} refreshControl={<RefreshControl refreshing={isRefetching} onRefresh={refetch}/>} ListEmptyComponent={<Text>No teams available</Text>} onEndReached={() => fetchNextPage()} contentContainerStyle={styles.container}/>);
|
|
14
14
|
};
|
|
15
15
|
const useStyles = () => {
|
|
16
16
|
const { platformListPaddingBottom } = useFilterContext();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team_filters.js","sourceRoot":"","sources":["../../../src/screens/conversation_filters/team_filters.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"team_filters.js","sourceRoot":"","sources":["../../../src/screens/conversation_filters/team_filters.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,c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AED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,yBAAyB,EAAE,GAAG,gBAAgB,EAAE,CAAA;IAExD,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,aAAa,EAAE,yBAAyB;SACzC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport React from 'react'\nimport { RefreshControl, StyleSheet } from 'react-native'\nimport { FlatList } from 'react-native-gesture-handler'\nimport { Text } from '../../components/display'\nimport { TeamRow } from './components/rows'\nimport { useFilterContext } from './context/conversation_filter_context'\nimport { useTeamsToFilter } from './hooks/filters'\nimport { ConversationFiltersParams } from './screen_props'\n\nexport type GroupFiltersScreenProps = StaticScreenProps<ConversationFiltersParams>\n\nexport const TeamFilters = () => {\n const styles = useStyles()\n const { teams, fetchNextPage, isRefetching, refetch } = useTeamsToFilter()\n const { params } = useFilterContext()\n const { chat_group_graph_id } = params\n return (\n <FlatList\n data={teams}\n renderItem={({ item }) => (\n <TeamRow team={item} isActive={item?.id.toString() === chat_group_graph_id} />\n )}\n refreshing={isRefetching}\n refreshControl={<RefreshControl refreshing={isRefetching} onRefresh={refetch} />}\n ListEmptyComponent={<Text>No teams available</Text>}\n onEndReached={() => fetchNextPage()}\n contentContainerStyle={styles.container}\n />\n )\n}\n\nconst useStyles = () => {\n const { platformListPaddingBottom } = useFilterContext()\n\n return StyleSheet.create({\n container: {\n paddingBottom: platformListPaddingBottom,\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ConversationFiltersScreenProps } from './conversation_filters/screen_props';
|
|
2
3
|
export declare const ConversationFiltersScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
3
|
-
export declare const ConversationFiltersScreen: (_props: ConversationFiltersScreenProps) =>
|
|
4
|
+
export declare const ConversationFiltersScreen: (_props: ConversationFiltersScreenProps) => React.JSX.Element;
|
|
4
5
|
//# sourceMappingURL=conversation_filters_screen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_filters_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_filters_screen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation_filters_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_filters_screen.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAU1C,OAAO,EACL,8BAA8B,EAE/B,MAAM,qCAAqC,CAAA;AAG5C,eAAO,MAAM,gCAAgC,uEAO3C,CAAA;AAoCF,eAAO,MAAM,yBAAyB,GAAI,QAAQ,8BAA8B,sBAW/E,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { useHeaderHeight } from '@react-navigation/elements';
|
|
3
2
|
import { createComponentForStaticNavigation, useRoute } from '@react-navigation/native';
|
|
4
3
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
5
|
-
import { useCallback } from 'react';
|
|
4
|
+
import React, { useCallback } from 'react';
|
|
6
5
|
import { Platform, StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
7
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
8
7
|
import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
|
|
@@ -52,7 +51,12 @@ const FilterNavigator = createNativeStackNavigator({
|
|
|
52
51
|
const Filters = createComponentForStaticNavigation(FilterNavigator, 'Filters');
|
|
53
52
|
export const ConversationFiltersScreen = (_props) => {
|
|
54
53
|
const styles = useStyles();
|
|
55
|
-
return (
|
|
54
|
+
return (<FilterProvider>
|
|
55
|
+
<FormSheet.Root contentStyle={styles.contentContainer} showAndroidSheetGrabber={false}>
|
|
56
|
+
<FormSheetHeaderWithContext />
|
|
57
|
+
<Filters />
|
|
58
|
+
</FormSheet.Root>
|
|
59
|
+
</FilterProvider>);
|
|
56
60
|
};
|
|
57
61
|
const FormSheetHeaderWithContext = () => {
|
|
58
62
|
const { resetFilter, applyFilters, setFormSheetHeaderHeight } = useFilterContext();
|
|
@@ -61,7 +65,15 @@ const FormSheetHeaderWithContext = () => {
|
|
|
61
65
|
const handleFormSheetHeaderLayout = useCallback((event) => {
|
|
62
66
|
setFormSheetHeaderHeight(event.nativeEvent.layout.height);
|
|
63
67
|
}, [setFormSheetHeaderHeight]);
|
|
64
|
-
return (
|
|
68
|
+
return (<View onLayout={handleFormSheetHeaderLayout}>
|
|
69
|
+
<FormSheet.Header style={styles.header}>
|
|
70
|
+
<FormSheet.HeaderTitle>Filters</FormSheet.HeaderTitle>
|
|
71
|
+
<FormSheet.HeaderActions>
|
|
72
|
+
<FormSheet.HeaderTextButton onPress={resetFilter}>Reset</FormSheet.HeaderTextButton>
|
|
73
|
+
<FormSheet.HeaderButton title="Apply" onPress={() => applyFilters(route.params)}/>
|
|
74
|
+
</FormSheet.HeaderActions>
|
|
75
|
+
</FormSheet.Header>
|
|
76
|
+
</View>);
|
|
65
77
|
};
|
|
66
78
|
const useStyles = () => {
|
|
67
79
|
const { top } = useSafeAreaInsets();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_filters_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_filters_screen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation_filters_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_filters_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EAAE,kCAAkC,EAAa,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAqB,QAAQ,E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WAAW,CACrD;QAAA,CAAC,SAAS,CAAC,aAAa,CACtB;UAAA,CAAC,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,gBAAgB,CACnF;UAAA,CAAC,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAClF;QAAA,EAAE,SAAS,CAAC,aAAa,CAC3B;MAAA,EAAE,SAAS,CAAC,MAAM,CACpB;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACnC,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB,EAAE,CAAA;IACxC,MAAM,YAAY,GAAG,eAAe,EAAE,CAAA;IAEtC,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC;QACtC,OAAO,EAAE,MAAM;QACf,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,YAAY;KACjC,CAAC,CAAA;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,MAAM,EAAE,eAAe;SACxB;QACD,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC;gBAC1B,GAAG,EAAE,EAAE;gBACP,OAAO,EAAE,EAAE,GAAG,GAAG;aAClB,CAAC;SACH;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useHeaderHeight } from '@react-navigation/elements'\nimport { createComponentForStaticNavigation, RouteProp, useRoute } from '@react-navigation/native'\nimport { createNativeStackNavigator } from '@react-navigation/native-stack'\nimport React, { useCallback } from 'react'\nimport { LayoutChangeEvent, Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { ConversationFilters } from './conversation_filters/components/conversation_filters'\nimport {\n FilterProvider,\n useFilterContext,\n} from './conversation_filters/context/conversation_filter_context'\nimport { GroupFilters } from './conversation_filters/group_filters'\nimport {\n ConversationFiltersScreenProps,\n ConversationFilterStackParamList,\n} from './conversation_filters/screen_props'\nimport { TeamFilters } from './conversation_filters/team_filters'\n\nexport const ConversationFiltersScreenOptions = getFormSheetScreenOptions({\n presentation: Platform.select({ android: 'modal', ios: 'formSheet' }),\n sheetAllowedDetents: Platform.select({\n ios: [0.75, 1],\n default: [1],\n }),\n headerTitle: 'Filters',\n})\n\nconst FilterNavigator = createNativeStackNavigator<ConversationFilterStackParamList>({\n initialRouteName: 'Filters',\n screens: {\n Filters: {\n screen: ConversationFilters,\n options: {\n headerShown: false,\n },\n },\n GroupFilters: {\n screen: GroupFilters,\n options: {\n headerTitle: Platform.select({\n android: 'Groups',\n ios: '',\n }),\n headerBackTitle: 'Groups',\n },\n },\n TeamFilters: {\n screen: TeamFilters,\n options: {\n headerTitle: Platform.select({\n android: 'Teams',\n ios: '',\n }),\n headerBackTitle: 'Teams',\n },\n },\n },\n})\n\nconst Filters = createComponentForStaticNavigation(FilterNavigator, 'Filters')\n\nexport const ConversationFiltersScreen = (_props: ConversationFiltersScreenProps) => {\n const styles = useStyles()\n\n return (\n <FilterProvider>\n <FormSheet.Root contentStyle={styles.contentContainer} showAndroidSheetGrabber={false}>\n <FormSheetHeaderWithContext />\n <Filters />\n </FormSheet.Root>\n </FilterProvider>\n )\n}\n\nconst FormSheetHeaderWithContext = () => {\n const { resetFilter, applyFilters, setFormSheetHeaderHeight } = useFilterContext()\n const route = useRoute<RouteProp<ConversationFiltersScreenProps['route']>>()\n const styles = useStyles()\n\n const handleFormSheetHeaderLayout = useCallback(\n (event: LayoutChangeEvent) => {\n setFormSheetHeaderHeight(event.nativeEvent.layout.height)\n },\n [setFormSheetHeaderHeight]\n )\n\n return (\n <View onLayout={handleFormSheetHeaderLayout}>\n <FormSheet.Header style={styles.header}>\n <FormSheet.HeaderTitle>Filters</FormSheet.HeaderTitle>\n <FormSheet.HeaderActions>\n <FormSheet.HeaderTextButton onPress={resetFilter}>Reset</FormSheet.HeaderTextButton>\n <FormSheet.HeaderButton title=\"Apply\" onPress={() => applyFilters(route.params)} />\n </FormSheet.HeaderActions>\n </FormSheet.Header>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { top } = useSafeAreaInsets()\n const { height } = useWindowDimensions()\n const headerHeight = useHeaderHeight()\n\n const containerHeight = Platform.select({\n android: height,\n ios: height - top - headerHeight,\n })\n\n return StyleSheet.create({\n contentContainer: {\n height: containerHeight,\n },\n header: {\n paddingTop: Platform.select({\n ios: 20,\n android: 20 + top,\n }),\n },\n })\n}\n"]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { AvatarUpdatePayload } from '../../../hooks/use_conversation_avatar_update';
|
|
2
3
|
interface AvatarSelectionRowProps {
|
|
3
4
|
avatarSelection?: AvatarUpdatePayload;
|
|
4
5
|
}
|
|
5
|
-
export declare function AvatarSelectionRow({ avatarSelection }: AvatarSelectionRowProps):
|
|
6
|
+
export declare function AvatarSelectionRow({ avatarSelection }: AvatarSelectionRowProps): React.JSX.Element;
|
|
6
7
|
interface AvatarSelectionPreviewProps {
|
|
7
8
|
avatarSelection?: AvatarUpdatePayload;
|
|
8
9
|
}
|
|
9
|
-
export declare function AvatarSelectionPreview({ avatarSelection }: AvatarSelectionPreviewProps):
|
|
10
|
+
export declare function AvatarSelectionPreview({ avatarSelection }: AvatarSelectionPreviewProps): React.JSX.Element | null;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=avatar_selection_row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar_selection_row.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/avatar_selection_row.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avatar_selection_row.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/avatar_selection_row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAA;AAExF,UAAU,uBAAuB;IAC/B,eAAe,CAAC,EAAE,mBAAmB,CAAA;CACtC;AAED,wBAAgB,kBAAkB,CAAC,EAAE,eAAe,EAAE,EAAE,uBAAuB,qBAsB9E;AAED,UAAU,2BAA2B;IACnC,eAAe,CAAC,EAAE,mBAAmB,CAAA;CACtC;AAED,wBAAgB,sBAAsB,CAAC,EAAE,eAAe,EAAE,EAAE,2BAA2B,4BAiBtF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { useNavigation, useRoute } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { Pressable, StyleSheet, View } from 'react-native';
|
|
4
4
|
import { Icon, Text } from '../../../components';
|
|
5
5
|
import { EmojiAvatar } from '../../../components/display/emoji_avatar';
|
|
@@ -10,21 +10,31 @@ export function AvatarSelectionRow({ avatarSelection }) {
|
|
|
10
10
|
const styles = useStyles();
|
|
11
11
|
const navigation = useNavigation();
|
|
12
12
|
const route = useRoute();
|
|
13
|
-
return (
|
|
13
|
+
return (<Pressable style={styles.avatarSection} onPress={() => navigation.navigate('AvatarPicker', {
|
|
14
14
|
source_params: route.params,
|
|
15
15
|
...(avatarSelection && { avatar_selection: avatarSelection }),
|
|
16
|
-
})
|
|
16
|
+
})}>
|
|
17
|
+
<Text style={styles.avatarLabel}>Customize avatar</Text>
|
|
18
|
+
<View style={styles.avatarSectionTrailing}>
|
|
19
|
+
<AvatarSelectionPreview avatarSelection={avatarSelection}/>
|
|
20
|
+
<Icon name="general.rightChevron" size={12}/>
|
|
21
|
+
</View>
|
|
22
|
+
</Pressable>);
|
|
17
23
|
}
|
|
18
24
|
export function AvatarSelectionPreview({ avatarSelection }) {
|
|
19
25
|
if (!avatarSelection || avatarSelection.kind === 'clear')
|
|
20
26
|
return null;
|
|
21
27
|
switch (avatarSelection.kind) {
|
|
22
28
|
case 'icon':
|
|
23
|
-
return
|
|
29
|
+
return <IconAvatar iconKey={avatarSelection.key} color={avatarSelection.color} size="md"/>;
|
|
24
30
|
case 'emoji':
|
|
25
|
-
return
|
|
31
|
+
return <EmojiAvatar emoji={avatarSelection.key} color={avatarSelection.color} size="md"/>;
|
|
26
32
|
case 'image':
|
|
27
|
-
return (
|
|
33
|
+
return (<AvatarPrimitive.Root size="md">
|
|
34
|
+
<AvatarPrimitive.Mask>
|
|
35
|
+
<AvatarPrimitive.Image sourceUri={avatarSelection.imageAsset.uri}/>
|
|
36
|
+
</AvatarPrimitive.Mask>
|
|
37
|
+
</AvatarPrimitive.Root>);
|
|
28
38
|
}
|
|
29
39
|
}
|
|
30
40
|
const useStyles = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar_selection_row.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/avatar_selection_row.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avatar_selection_row.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/avatar_selection_row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAA;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAA;AACpE,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,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAG,CAAA;QAC7F,KAAK,OAAO;YACV,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAG,CAAA;QAC5F,KAAK,OAAO;YACV,OAAO,CACL,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAC7B;UAAA,CAAC,eAAe,CAAC,IAAI,CACnB;YAAA,CAAC,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,GAAG,CAAC,EACnE;UAAA,EAAE,eAAe,CAAC,IAAI,CACxB;QAAA,EAAE,eAAe,CAAC,IAAI,CAAC,CACxB,CAAA;IACL,CAAC;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,aAAa,EAAE;YACb,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;SAChC;QACD,qBAAqB,EAAE;YACrB,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;SACR;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation, useRoute } from '@react-navigation/native'\nimport React from 'react'\nimport { Pressable, StyleSheet, View } from 'react-native'\nimport { Icon, Text } from '../../../components'\nimport { EmojiAvatar } from '../../../components/display/emoji_avatar'\nimport { IconAvatar } from '../../../components/display/icon_avatar'\nimport AvatarPrimitive from '../../../components/primitive/avatar_primitive'\nimport { useTheme } from '../../../hooks'\nimport type { AvatarUpdatePayload } from '../../../hooks/use_conversation_avatar_update'\n\ninterface AvatarSelectionRowProps {\n avatarSelection?: AvatarUpdatePayload\n}\n\nexport function AvatarSelectionRow({ avatarSelection }: AvatarSelectionRowProps) {\n const styles = useStyles()\n const navigation = useNavigation()\n const route = useRoute()\n\n return (\n <Pressable\n style={styles.avatarSection}\n onPress={() =>\n navigation.navigate('AvatarPicker', {\n source_params: route.params as Record<string, unknown>,\n ...(avatarSelection && { avatar_selection: avatarSelection }),\n })\n }\n >\n <Text style={styles.avatarLabel}>Customize avatar</Text>\n <View style={styles.avatarSectionTrailing}>\n <AvatarSelectionPreview avatarSelection={avatarSelection} />\n <Icon name=\"general.rightChevron\" size={12} />\n </View>\n </Pressable>\n )\n}\n\ninterface AvatarSelectionPreviewProps {\n avatarSelection?: AvatarUpdatePayload\n}\n\nexport function AvatarSelectionPreview({ avatarSelection }: AvatarSelectionPreviewProps) {\n if (!avatarSelection || avatarSelection.kind === 'clear') return null\n\n switch (avatarSelection.kind) {\n case 'icon':\n return <IconAvatar iconKey={avatarSelection.key} color={avatarSelection.color} size=\"md\" />\n case 'emoji':\n return <EmojiAvatar emoji={avatarSelection.key} color={avatarSelection.color} size=\"md\" />\n case 'image':\n return (\n <AvatarPrimitive.Root size=\"md\">\n <AvatarPrimitive.Mask>\n <AvatarPrimitive.Image sourceUri={avatarSelection.imageAsset.uri} />\n </AvatarPrimitive.Mask>\n </AvatarPrimitive.Root>\n )\n }\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n avatarSection: {\n padding: 16,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n avatarSectionTrailing: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n avatarLabel: {\n fontSize: 18,\n color: colors.textColorDefaultPrimary,\n },\n })\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface FilterByPlanProps {
|
|
2
3
|
teamIds: number[];
|
|
3
4
|
selectedPlanId?: number;
|
|
@@ -15,8 +16,8 @@ interface FilterByPlanModalProps {
|
|
|
15
16
|
selectedPlanId?: number;
|
|
16
17
|
onPlanSelect: (planId: number | undefined) => void;
|
|
17
18
|
}
|
|
18
|
-
export declare function FilterByPlan({ teamIds, selectedPlanId, onPlanSelect }: FilterByPlanProps):
|
|
19
|
-
export declare function FilterByPlanField({ teamIds, planId, onOpenModal }: FilterByPlanFieldProps):
|
|
20
|
-
export declare function FilterByPlanModal({ visible, onClose, teamIds, selectedPlanId, onPlanSelect, }: FilterByPlanModalProps):
|
|
19
|
+
export declare function FilterByPlan({ teamIds, selectedPlanId, onPlanSelect }: FilterByPlanProps): React.JSX.Element;
|
|
20
|
+
export declare function FilterByPlanField({ teamIds, planId, onOpenModal }: FilterByPlanFieldProps): React.JSX.Element;
|
|
21
|
+
export declare function FilterByPlanModal({ visible, onClose, teamIds, selectedPlanId, onPlanSelect, }: FilterByPlanModalProps): React.JSX.Element;
|
|
21
22
|
export {};
|
|
22
23
|
//# sourceMappingURL=filter_by_plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter_by_plan.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/filter_by_plan.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter_by_plan.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/filter_by_plan.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAcvC,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;CACnD;AAED,UAAU,sBAAsB;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,IAAI,CAAA;CACxB;AAED,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;CACnD;AAYD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,iBAAiB,qBAsBxF;AAMD,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,sBAAsB,qBA0CzF;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,YAAY,GACb,EAAE,sBAAsB,qBAuDxB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { Header, PlatformPressable } from '@react-navigation/elements';
|
|
3
|
-
import { useState } from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
4
3
|
import { StyleSheet, View, FlatList, Platform } from 'react-native';
|
|
5
4
|
import { Banner, Icon, Spinner, Text, Heading } from '../../../components';
|
|
6
5
|
import { HeaderDismissButton } from '../../../components/display/platform_modal_header_buttons';
|
|
@@ -14,10 +13,13 @@ import { tokens } from '../../../vendor/tapestry/tokens';
|
|
|
14
13
|
// ==========================================
|
|
15
14
|
export function FilterByPlan({ teamIds, selectedPlanId, onPlanSelect }) {
|
|
16
15
|
const [modalVisible, setModalVisible] = useState(false);
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
return (<>
|
|
17
|
+
<FilterByPlanField teamIds={teamIds} planId={selectedPlanId} onOpenModal={() => setModalVisible(true)}/>
|
|
18
|
+
<FilterByPlanModal visible={modalVisible} onClose={() => setModalVisible(false)} teamIds={teamIds} selectedPlanId={selectedPlanId} onPlanSelect={planId => {
|
|
19
|
+
onPlanSelect(planId);
|
|
20
|
+
setModalVisible(false);
|
|
21
|
+
}}/>
|
|
22
|
+
</>);
|
|
21
23
|
}
|
|
22
24
|
// ==========================================
|
|
23
25
|
// Sub-components
|
|
@@ -26,39 +28,61 @@ export function FilterByPlanField({ teamIds, planId, onOpenModal }) {
|
|
|
26
28
|
const styles = useStyles();
|
|
27
29
|
const { planOptions, findPlan, isFetching, isError } = useTeamPlans({ teamIds });
|
|
28
30
|
if (isFetching) {
|
|
29
|
-
return (
|
|
31
|
+
return (<View style={styles.spinnerContainer}>
|
|
32
|
+
<Spinner size={20}/>
|
|
33
|
+
</View>);
|
|
30
34
|
}
|
|
31
35
|
if (isError) {
|
|
32
|
-
return (
|
|
36
|
+
return (<Banner appearance="error" description="An error occurred while fetching plans. Please try again."/>);
|
|
33
37
|
}
|
|
34
38
|
if (!planOptions || planOptions.length === 0) {
|
|
35
|
-
return
|
|
39
|
+
return <Banner appearance="neutral" description="No plans available with the selected teams."/>;
|
|
36
40
|
}
|
|
37
41
|
const selectedPlan = findPlan(planId);
|
|
38
42
|
const buttonText = selectedPlan ? selectedPlan.name : 'Select a plan';
|
|
39
|
-
return (
|
|
43
|
+
return (<PlatformPressable style={styles.selectButton} onPress={onOpenModal} accessibilityRole="button" accessibilityLabel={`Selected plan: ${buttonText}`} accessibilityHint="Opens plan selection">
|
|
44
|
+
<Text style={styles.buttonText} numberOfLines={1}>
|
|
45
|
+
{buttonText}
|
|
46
|
+
</Text>
|
|
47
|
+
<Icon name="general.downChevron" size={16} style={styles.chevronIcon}/>
|
|
48
|
+
</PlatformPressable>);
|
|
40
49
|
}
|
|
41
50
|
export function FilterByPlanModal({ visible, onClose, teamIds, selectedPlanId, onPlanSelect, }) {
|
|
42
51
|
const styles = useStyles();
|
|
43
52
|
const { planOptions, isFetching } = useTeamPlans({ teamIds });
|
|
44
|
-
return (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
return (<SafeAreaModal visible={visible} animationType="slide" presentationStyle="pageSheet" onRequestClose={onClose}>
|
|
54
|
+
<View style={styles.modalContainer}>
|
|
55
|
+
<Header headerStyle={styles.header} title="Select a plan" headerShadowVisible={false} headerRight={createStableHeaderRight(onClose)} headerRightContainerStyle={styles.modalHeaderRightContainer}/>
|
|
56
|
+
|
|
57
|
+
{isFetching && <DefaultLoading />}
|
|
58
|
+
|
|
59
|
+
{planOptions && planOptions.length > 0 && (<FlatList data={planOptions} contentContainerStyle={styles.listContainer} keyExtractor={item => item.type === 'header' ? `header-${item.title}` : `plan-${item.value}`} renderItem={({ item }) => {
|
|
60
|
+
switch (item.type) {
|
|
61
|
+
case 'header':
|
|
62
|
+
return (<Heading variant="h3" numberOfLines={1} style={styles.listHeader}>
|
|
63
|
+
{item.title}
|
|
64
|
+
</Heading>);
|
|
65
|
+
case 'plan': {
|
|
66
|
+
const isSelected = item.value === selectedPlanId;
|
|
67
|
+
return (<OptionItem plan={item} isSelected={isSelected} onPress={() => onPlanSelect(isSelected ? undefined : item.value)}/>);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}} showsVerticalScrollIndicator={false}/>)}
|
|
71
|
+
</View>
|
|
72
|
+
</SafeAreaModal>);
|
|
54
73
|
}
|
|
55
74
|
// ==========================================
|
|
56
75
|
// Helper Components
|
|
57
76
|
// ==========================================
|
|
58
|
-
const createStableHeaderRight = (onClose) => () => (
|
|
77
|
+
const createStableHeaderRight = (onClose) => () => (<HeaderDismissButton onPress={onClose} title="Cancel"/>);
|
|
59
78
|
function OptionItem({ plan, isSelected, onPress }) {
|
|
60
79
|
const styles = useStyles();
|
|
61
|
-
return (
|
|
80
|
+
return (<PlatformPressable style={styles.optionItem} onPress={onPress} accessibilityRole="radio" accessibilityState={{ selected: isSelected }} accessibilityLabel={plan.name}>
|
|
81
|
+
<Text style={styles.optionText} numberOfLines={1}>
|
|
82
|
+
{plan.name}
|
|
83
|
+
</Text>
|
|
84
|
+
{isSelected && <Icon name="general.check" size={16} style={styles.checkIcon}/>}
|
|
85
|
+
</PlatformPressable>);
|
|
62
86
|
}
|
|
63
87
|
// ==========================================
|
|
64
88
|
// Styles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter_by_plan.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/filter_by_plan.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAA;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAgCxD,6CAA6C;AAC7C,iBAAiB;AACjB,6CAA6C;AAE7C,MAAM,UAAU,YAAY,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAqB;IACvF,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA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AE;YACV,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM,CAAC,yBAAyB;YACvC,UAAU,EAAE,CAAC;SACd;QACD,cAAc,EAAE;YACd,eAAe,EAAE,MAAM,CAAC,eAAe;YACvC,IAAI,EAAE,CAAC;SACR;QACD,yBAAyB,EAAE;YACzB,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;SACvD;QACD,aAAa,EAAE;YACb,aAAa,EAAE,EAAE;SAClB;QACD,UAAU,EAAE;YACV,iBAAiB,EAAE,EAAE;YACrB,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE;SAClB;QACD,UAAU,EAAE;YACV,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,eAAe;YAC/B,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC,qBAAqB;SAChD;QACD,UAAU,EAAE;YACV,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,MAAM,CAAC,uBAAuB;SACtC;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,UAAU,EAAE,CAAC;SACd;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { Header, PlatformPressable } from '@react-navigation/elements'\nimport React, { useState } from 'react'\nimport { StyleSheet, View, FlatList, Platform } from 'react-native'\nimport { Banner, Icon, Spinner, Text, Heading } from '../../../components'\nimport { HeaderDismissButton } from '../../../components/display/platform_modal_header_buttons'\nimport { DefaultLoading } from '../../../components/page/loading'\nimport { SafeAreaModal } from '../../../components/safe_area_modal'\nimport { useTheme } from '../../../hooks'\nimport { useTeamPlans } from '../../../hooks/services/use_team_plans'\nimport { tokens } from '../../../vendor/tapestry/tokens'\n\n// ==========================================\n// Interfaces\n// ==========================================\n\ninterface FilterByPlanProps {\n teamIds: number[]\n selectedPlanId?: number\n onPlanSelect: (planId: number | undefined) => void\n}\n\ninterface FilterByPlanFieldProps {\n teamIds: number[]\n planId?: number\n onOpenModal: () => void\n}\n\ninterface FilterByPlanModalProps {\n visible: boolean\n onClose: () => void\n teamIds: number[]\n selectedPlanId?: number\n onPlanSelect: (planId: number | undefined) => void\n}\n\ninterface OptionItemProps {\n plan: { value: number; name: string }\n isSelected: boolean\n onPress: () => void\n}\n\n// ==========================================\n// Main Component\n// ==========================================\n\nexport function FilterByPlan({ teamIds, selectedPlanId, onPlanSelect }: FilterByPlanProps) {\n const [modalVisible, setModalVisible] = useState(false)\n\n return (\n <>\n <FilterByPlanField\n teamIds={teamIds}\n planId={selectedPlanId}\n onOpenModal={() => setModalVisible(true)}\n />\n <FilterByPlanModal\n visible={modalVisible}\n onClose={() => setModalVisible(false)}\n teamIds={teamIds}\n selectedPlanId={selectedPlanId}\n onPlanSelect={planId => {\n onPlanSelect(planId)\n setModalVisible(false)\n }}\n />\n </>\n )\n}\n\n// ==========================================\n// Sub-components\n// ==========================================\n\nexport function FilterByPlanField({ teamIds, planId, onOpenModal }: FilterByPlanFieldProps) {\n const styles = useStyles()\n const { planOptions, findPlan, isFetching, isError } = useTeamPlans({ teamIds })\n\n if (isFetching) {\n return (\n <View style={styles.spinnerContainer}>\n <Spinner size={20} />\n </View>\n )\n }\n\n if (isError) {\n return (\n <Banner\n appearance=\"error\"\n description=\"An error occurred while fetching plans. Please try again.\"\n />\n )\n }\n\n if (!planOptions || planOptions.length === 0) {\n return <Banner appearance=\"neutral\" description=\"No plans available with the selected teams.\" />\n }\n\n const selectedPlan = findPlan(planId)\n const buttonText = selectedPlan ? selectedPlan.name : 'Select a plan'\n\n return (\n <PlatformPressable\n style={styles.selectButton}\n onPress={onOpenModal}\n accessibilityRole=\"button\"\n accessibilityLabel={`Selected plan: ${buttonText}`}\n accessibilityHint=\"Opens plan selection\"\n >\n <Text style={styles.buttonText} numberOfLines={1}>\n {buttonText}\n </Text>\n <Icon name=\"general.downChevron\" size={16} style={styles.chevronIcon} />\n </PlatformPressable>\n )\n}\n\nexport function FilterByPlanModal({\n visible,\n onClose,\n teamIds,\n selectedPlanId,\n onPlanSelect,\n}: FilterByPlanModalProps) {\n const styles = useStyles()\n const { planOptions, isFetching } = useTeamPlans({ teamIds })\n\n return (\n <SafeAreaModal\n visible={visible}\n animationType=\"slide\"\n presentationStyle=\"pageSheet\"\n onRequestClose={onClose}\n >\n <View style={styles.modalContainer}>\n <Header\n headerStyle={styles.header}\n title=\"Select a plan\"\n headerShadowVisible={false}\n headerRight={createStableHeaderRight(onClose)}\n headerRightContainerStyle={styles.modalHeaderRightContainer}\n />\n\n {isFetching && <DefaultLoading />}\n\n {planOptions && planOptions.length > 0 && (\n <FlatList\n data={planOptions}\n contentContainerStyle={styles.listContainer}\n keyExtractor={item =>\n item.type === 'header' ? `header-${item.title}` : `plan-${item.value}`\n }\n renderItem={({ item }) => {\n switch (item.type) {\n case 'header':\n return (\n <Heading variant=\"h3\" numberOfLines={1} style={styles.listHeader}>\n {item.title}\n </Heading>\n )\n case 'plan': {\n const isSelected = item.value === selectedPlanId\n return (\n <OptionItem\n plan={item}\n isSelected={isSelected}\n onPress={() => onPlanSelect(isSelected ? undefined : item.value)}\n />\n )\n }\n }\n }}\n showsVerticalScrollIndicator={false}\n />\n )}\n </View>\n </SafeAreaModal>\n )\n}\n\n// ==========================================\n// Helper Components\n// ==========================================\n\nconst createStableHeaderRight = (onClose: () => void) => () => (\n <HeaderDismissButton onPress={onClose} title=\"Cancel\" />\n)\n\nfunction OptionItem({ plan, isSelected, onPress }: OptionItemProps) {\n const styles = useStyles()\n return (\n <PlatformPressable\n style={styles.optionItem}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isSelected }}\n accessibilityLabel={plan.name}\n >\n <Text style={styles.optionText} numberOfLines={1}>\n {plan.name}\n </Text>\n {isSelected && <Icon name=\"general.check\" size={16} style={styles.checkIcon} />}\n </PlatformPressable>\n )\n}\n\n// ==========================================\n// Styles\n// ==========================================\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n spinnerContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 44,\n },\n header: {\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n selectButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: tokens.borderRadiusRound,\n minHeight: 44,\n },\n buttonText: {\n flex: 1,\n color: colors.textColorDefaultPrimary,\n },\n chevronIcon: {\n color: colors.iconColorDefaultSecondary,\n marginLeft: 8,\n },\n modalContainer: {\n backgroundColor: colors.surfaceColor100,\n flex: 1,\n },\n modalHeaderRightContainer: {\n paddingRight: Platform.select({ ios: 20, android: 0 }),\n },\n listContainer: {\n paddingBottom: 16,\n },\n listHeader: {\n paddingHorizontal: 16,\n paddingTop: 24,\n paddingBottom: 12,\n },\n optionItem: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultDim,\n },\n optionText: {\n flex: 1,\n color: colors.textColorDefaultPrimary,\n },\n checkIcon: {\n color: colors.statusSuccessIcon,\n marginLeft: 8,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"filter_by_plan.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/filter_by_plan.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,C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igation/elements'\nimport React, { useState } from 'react'\nimport { StyleSheet, View, FlatList, Platform } from 'react-native'\nimport { Banner, Icon, Spinner, Text, Heading } from '../../../components'\nimport { HeaderDismissButton } from '../../../components/display/platform_modal_header_buttons'\nimport { DefaultLoading } from '../../../components/page/loading'\nimport { SafeAreaModal } from '../../../components/safe_area_modal'\nimport { useTheme } from '../../../hooks'\nimport { useTeamPlans } from '../../../hooks/services/use_team_plans'\nimport { tokens } from '../../../vendor/tapestry/tokens'\n\n// ==========================================\n// Interfaces\n// ==========================================\n\ninterface FilterByPlanProps {\n teamIds: number[]\n selectedPlanId?: number\n onPlanSelect: (planId: number | undefined) => void\n}\n\ninterface FilterByPlanFieldProps {\n teamIds: number[]\n planId?: number\n onOpenModal: () => void\n}\n\ninterface FilterByPlanModalProps {\n visible: boolean\n onClose: () => void\n teamIds: number[]\n selectedPlanId?: number\n onPlanSelect: (planId: number | undefined) => void\n}\n\ninterface OptionItemProps {\n plan: { value: number; name: string }\n isSelected: boolean\n onPress: () => void\n}\n\n// ==========================================\n// Main Component\n// ==========================================\n\nexport function FilterByPlan({ teamIds, selectedPlanId, onPlanSelect }: FilterByPlanProps) {\n const [modalVisible, setModalVisible] = useState(false)\n\n return (\n <>\n <FilterByPlanField\n teamIds={teamIds}\n planId={selectedPlanId}\n onOpenModal={() => setModalVisible(true)}\n />\n <FilterByPlanModal\n visible={modalVisible}\n onClose={() => setModalVisible(false)}\n teamIds={teamIds}\n selectedPlanId={selectedPlanId}\n onPlanSelect={planId => {\n onPlanSelect(planId)\n setModalVisible(false)\n }}\n />\n </>\n )\n}\n\n// ==========================================\n// Sub-components\n// ==========================================\n\nexport function FilterByPlanField({ teamIds, planId, onOpenModal }: FilterByPlanFieldProps) {\n const styles = useStyles()\n const { planOptions, findPlan, isFetching, isError } = useTeamPlans({ teamIds })\n\n if (isFetching) {\n return (\n <View style={styles.spinnerContainer}>\n <Spinner size={20} />\n </View>\n )\n }\n\n if (isError) {\n return (\n <Banner\n appearance=\"error\"\n description=\"An error occurred while fetching plans. Please try again.\"\n />\n )\n }\n\n if (!planOptions || planOptions.length === 0) {\n return <Banner appearance=\"neutral\" description=\"No plans available with the selected teams.\" />\n }\n\n const selectedPlan = findPlan(planId)\n const buttonText = selectedPlan ? selectedPlan.name : 'Select a plan'\n\n return (\n <PlatformPressable\n style={styles.selectButton}\n onPress={onOpenModal}\n accessibilityRole=\"button\"\n accessibilityLabel={`Selected plan: ${buttonText}`}\n accessibilityHint=\"Opens plan selection\"\n >\n <Text style={styles.buttonText} numberOfLines={1}>\n {buttonText}\n </Text>\n <Icon name=\"general.downChevron\" size={16} style={styles.chevronIcon} />\n </PlatformPressable>\n )\n}\n\nexport function FilterByPlanModal({\n visible,\n onClose,\n teamIds,\n selectedPlanId,\n onPlanSelect,\n}: FilterByPlanModalProps) {\n const styles = useStyles()\n const { planOptions, isFetching } = useTeamPlans({ teamIds })\n\n return (\n <SafeAreaModal\n visible={visible}\n animationType=\"slide\"\n presentationStyle=\"pageSheet\"\n onRequestClose={onClose}\n >\n <View style={styles.modalContainer}>\n <Header\n headerStyle={styles.header}\n title=\"Select a plan\"\n headerShadowVisible={false}\n headerRight={createStableHeaderRight(onClose)}\n headerRightContainerStyle={styles.modalHeaderRightContainer}\n />\n\n {isFetching && <DefaultLoading />}\n\n {planOptions && planOptions.length > 0 && (\n <FlatList\n data={planOptions}\n contentContainerStyle={styles.listContainer}\n keyExtractor={item =>\n item.type === 'header' ? `header-${item.title}` : `plan-${item.value}`\n }\n renderItem={({ item }) => {\n switch (item.type) {\n case 'header':\n return (\n <Heading variant=\"h3\" numberOfLines={1} style={styles.listHeader}>\n {item.title}\n </Heading>\n )\n case 'plan': {\n const isSelected = item.value === selectedPlanId\n return (\n <OptionItem\n plan={item}\n isSelected={isSelected}\n onPress={() => onPlanSelect(isSelected ? undefined : item.value)}\n />\n )\n }\n }\n }}\n showsVerticalScrollIndicator={false}\n />\n )}\n </View>\n </SafeAreaModal>\n )\n}\n\n// ==========================================\n// Helper Components\n// ==========================================\n\nconst createStableHeaderRight = (onClose: () => void) => () => (\n <HeaderDismissButton onPress={onClose} title=\"Cancel\" />\n)\n\nfunction OptionItem({ plan, isSelected, onPress }: OptionItemProps) {\n const styles = useStyles()\n return (\n <PlatformPressable\n style={styles.optionItem}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isSelected }}\n accessibilityLabel={plan.name}\n >\n <Text style={styles.optionText} numberOfLines={1}>\n {plan.name}\n </Text>\n {isSelected && <Icon name=\"general.check\" size={16} style={styles.checkIcon} />}\n </PlatformPressable>\n )\n}\n\n// ==========================================\n// Styles\n// ==========================================\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n spinnerContainer: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: 44,\n },\n header: {\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n selectButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: tokens.borderRadiusRound,\n minHeight: 44,\n },\n buttonText: {\n flex: 1,\n color: colors.textColorDefaultPrimary,\n },\n chevronIcon: {\n color: colors.iconColorDefaultSecondary,\n marginLeft: 8,\n },\n modalContainer: {\n backgroundColor: colors.surfaceColor100,\n flex: 1,\n },\n modalHeaderRightContainer: {\n paddingRight: Platform.select({ ios: 20, android: 0 }),\n },\n listContainer: {\n paddingBottom: 16,\n },\n listHeader: {\n paddingHorizontal: 16,\n paddingTop: 24,\n paddingBottom: 12,\n },\n optionItem: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultDim,\n },\n optionText: {\n flex: 1,\n color: colors.textColorDefaultPrimary,\n },\n checkIcon: {\n color: colors.statusSuccessIcon,\n marginLeft: 8,\n },\n })\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { type FlatListProps } from 'react-native';
|
|
2
3
|
import { MemberResource } from '../../../types';
|
|
3
4
|
interface FormListProps {
|
|
@@ -7,7 +8,7 @@ interface FormListProps {
|
|
|
7
8
|
listEmptyText?: string;
|
|
8
9
|
onEndReached?: () => void;
|
|
9
10
|
}
|
|
10
|
-
export declare const FormList: ({ memberData, loadingMore, FormContent, listEmptyText, onEndReached, }: FormListProps) =>
|
|
11
|
-
export declare const Divider: () =>
|
|
11
|
+
export declare const FormList: ({ memberData, loadingMore, FormContent, listEmptyText, onEndReached, }: FormListProps) => React.JSX.Element;
|
|
12
|
+
export declare const Divider: () => React.JSX.Element;
|
|
12
13
|
export {};
|
|
13
14
|
//# sourceMappingURL=form_list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form_list.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/form_list.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form_list.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/form_list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAY,KAAK,aAAa,EAAoB,MAAM,cAAc,CAAA;AAG7E,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,UAAU,aAAa;IACrB,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC,qBAAqB,CAAC,CAAA;IAClE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B;AAED,eAAO,MAAM,QAAQ,GAAI,wEAMtB,aAAa,sBAgBf,CAAA;AAYD,eAAO,MAAM,OAAO,yBAInB,CAAA"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { FlatList, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { Person, Text } from '../../../components/display';
|
|
4
4
|
import { useTheme } from '../../../hooks';
|
|
5
5
|
export const FormList = ({ memberData, loadingMore, FormContent, listEmptyText, onEndReached, }) => {
|
|
6
6
|
const styles = useStyles();
|
|
7
|
-
return (
|
|
7
|
+
return (<FlatList data={memberData} ListHeaderComponent={FormContent} renderItem={({ item }) => <Person person={item} style={styles.person}/>} ListFooterComponent={loadingMore ? <Text style={styles.loadingMore}>Loading more...</Text> : null} keyExtractor={item => item.id.toString()} ListEmptyComponent={<ListEmptyText text={listEmptyText || 'No members found'}/>} onEndReached={onEndReached}/>);
|
|
8
8
|
};
|
|
9
9
|
const ListEmptyText = ({ text }) => {
|
|
10
10
|
const styles = useStyles();
|
|
11
|
-
return (
|
|
11
|
+
return (<View style={styles.emptyTextContainer}>
|
|
12
|
+
<Text style={styles.emptyText}>{text}</Text>
|
|
13
|
+
</View>);
|
|
12
14
|
};
|
|
13
15
|
export const Divider = () => {
|
|
14
16
|
const styles = useStyles();
|
|
15
|
-
return
|
|
17
|
+
return <View style={styles.divider}/>;
|
|
16
18
|
};
|
|
17
19
|
const useStyles = () => {
|
|
18
20
|
const { colors } = useTheme();
|