@planningcenter/chat-react-native 3.42.2-qa-staging.2 → 3.42.2-qa-821.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/attachments/attachment_card.d.ts +3 -3
- package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_card.js +3 -7
- package/build/components/conversation/attachments/attachment_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +1 -2
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +12 -7
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +6 -23
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -2
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +2 -8
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +2 -12
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +2 -7
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +16 -53
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -2
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +3 -13
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/conversation_start_banner.d.ts +1 -2
- package/build/components/conversation/conversation_start_banner.d.ts.map +1 -1
- package/build/components/conversation/conversation_start_banner.js +2 -14
- package/build/components/conversation/conversation_start_banner.js.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts +1 -1
- package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js +2 -9
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts +1 -1
- package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +2 -10
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts +1 -2
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +2 -53
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +1 -2
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +17 -21
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_file.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_file.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -2
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js +2 -2
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +5 -6
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +20 -82
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.d.ts +1 -2
- package/build/components/conversation/message_markdown.d.ts.map +1 -1
- package/build/components/conversation/message_markdown.js +8 -16
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +1 -2
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +3 -5
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts +1 -2
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +3 -13
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.d.ts +3 -3
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +5 -8
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_connectors.d.ts +2 -2
- package/build/components/conversation/reply_connectors.d.ts.map +1 -1
- package/build/components/conversation/reply_connectors.js +18 -50
- package/build/components/conversation/reply_connectors.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts +1 -2
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +16 -46
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/system_message.d.ts +1 -2
- package/build/components/conversation/system_message.d.ts.map +1 -1
- package/build/components/conversation/system_message.js +3 -12
- package/build/components/conversation/system_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.d.ts +1 -2
- package/build/components/conversation/typing_indicator.d.ts.map +1 -1
- package/build/components/conversation/typing_indicator.js +3 -13
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +2 -2
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +4 -10
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +2 -3
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +12 -76
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.d.ts +1 -1
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +16 -17
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/conversations_blank_state.d.ts +1 -2
- package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
- package/build/components/conversations/conversations_blank_state.js +2 -12
- package/build/components/conversations/conversations_blank_state.js.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts +1 -2
- package/build/components/conversations/mute_indicator.d.ts.map +1 -1
- package/build/components/conversations/mute_indicator.js +2 -2
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -2
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +3 -10
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.d.ts +2 -4
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
- package/build/components/conversations/unread_count_badge.js +7 -12
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +3 -13
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/adult_requirement_notice.d.ts +1 -2
- package/build/components/display/adult_requirement_notice.d.ts.map +1 -1
- package/build/components/display/adult_requirement_notice.js +2 -4
- package/build/components/display/adult_requirement_notice.js.map +1 -1
- package/build/components/display/avatar.d.ts +1 -2
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +2 -7
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +1 -2
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +2 -9
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts +1 -2
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +6 -37
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/banner.d.ts +3 -3
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +4 -11
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts +2 -2
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +2 -10
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts +1 -2
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +3 -14
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +1 -2
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +3 -15
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/conversation_avatar.d.ts +1 -2
- package/build/components/display/conversation_avatar.d.ts.map +1 -1
- package/build/components/display/conversation_avatar.js +5 -9
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/components/display/emoji_avatar.d.ts +1 -2
- package/build/components/display/emoji_avatar.d.ts.map +1 -1
- package/build/components/display/emoji_avatar.js +2 -12
- package/build/components/display/emoji_avatar.js.map +1 -1
- package/build/components/display/file_attachment_preview.d.ts +1 -1
- package/build/components/display/file_attachment_preview.d.ts.map +1 -1
- package/build/components/display/file_attachment_preview.js +3 -17
- package/build/components/display/file_attachment_preview.js.map +1 -1
- package/build/components/display/heading.d.ts +1 -2
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +2 -4
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +1 -2
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +4 -4
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_avatar.d.ts +1 -2
- package/build/components/display/icon_avatar.d.ts.map +1 -1
- package/build/components/display/icon_avatar.js +2 -12
- package/build/components/display/icon_avatar.js.map +1 -1
- package/build/components/display/icon_button.d.ts +1 -2
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +3 -5
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image.d.ts +1 -2
- package/build/components/display/image.d.ts.map +1 -1
- package/build/components/display/image.js +3 -7
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.d.ts +1 -1
- package/build/components/display/image_attachment_preview.d.ts.map +1 -1
- package/build/components/display/image_attachment_preview.js +2 -7
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/keyboard_view.d.ts +1 -2
- package/build/components/display/keyboard_view.d.ts.map +1 -1
- package/build/components/display/keyboard_view.js +4 -9
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/components/display/person.d.ts +1 -2
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +2 -12
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +3 -3
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +5 -10
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/pressable_row.d.ts +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/pressable_row.js +2 -7
- package/build/components/display/pressable_row.js.map +1 -1
- package/build/components/display/spinner.d.ts +1 -2
- package/build/components/display/spinner.d.ts.map +1 -1
- package/build/components/display/spinner.js +3 -9
- package/build/components/display/spinner.js.map +1 -1
- package/build/components/display/switch.d.ts +1 -2
- package/build/components/display/switch.d.ts.map +1 -1
- package/build/components/display/switch.js +2 -2
- package/build/components/display/switch.js.map +1 -1
- package/build/components/display/tabs.d.ts +1 -1
- package/build/components/display/tabs.d.ts.map +1 -1
- package/build/components/display/tabs.js +21 -31
- package/build/components/display/tabs.js.map +1 -1
- package/build/components/display/text.d.ts +1 -2
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +2 -4
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_button.d.ts +1 -2
- package/build/components/display/text_button.d.ts.map +1 -1
- package/build/components/display/text_button.js +3 -8
- package/build/components/display/text_button.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts +1 -2
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +4 -5
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/text_input.d.ts +1 -1
- package/build/components/display/text_input.d.ts.map +1 -1
- package/build/components/display/text_input.js +2 -1
- package/build/components/display/text_input.js.map +1 -1
- package/build/components/display/toggle_button.d.ts +1 -2
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +3 -9
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/video_attachment_preview.d.ts +1 -1
- package/build/components/display/video_attachment_preview.d.ts.map +1 -1
- package/build/components/display/video_attachment_preview.js +3 -20
- package/build/components/display/video_attachment_preview.js.map +1 -1
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +4 -14
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/page/component_error_boundary.d.ts +2 -2
- package/build/components/page/component_error_boundary.d.ts.map +1 -1
- package/build/components/page/component_error_boundary.js +2 -4
- package/build/components/page/component_error_boundary.js.map +1 -1
- package/build/components/page/loading.d.ts +1 -2
- package/build/components/page/loading.d.ts.map +1 -1
- package/build/components/page/loading.js +2 -4
- package/build/components/page/loading.js.map +1 -1
- package/build/components/page/page_error_boundary.d.ts +2 -2
- package/build/components/page/page_error_boundary.d.ts.map +1 -1
- package/build/components/page/page_error_boundary.js +11 -32
- package/build/components/page/page_error_boundary.js.map +1 -1
- package/build/components/primitive/avatar_primitive.js +14 -41
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.js +10 -18
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/blank_state_primitive.js +8 -12
- package/build/components/primitive/blank_state_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +9 -22
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.d.ts +1 -1
- package/build/components/safe_area_modal.d.ts.map +1 -1
- package/build/components/safe_area_modal.js +2 -3
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.d.ts +1 -2
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +3 -5
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +1 -1
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +2 -1
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversation_context.d.ts +2 -2
- package/build/contexts/conversation_context.d.ts.map +1 -1
- package/build/contexts/conversation_context.js +3 -2
- package/build/contexts/conversation_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +3 -2
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts +1 -1
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +3 -2
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/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 +0 -2
- 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 +19 -4
- 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 +1 -0
- 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 +1 -3
- 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 +4 -3
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_person_settings.d.ts +1 -1
- package/build/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js.map +1 -1
- package/build/navigation/chat_access_gate.d.ts +2 -2
- package/build/navigation/chat_access_gate.d.ts.map +1 -1
- package/build/navigation/chat_access_gate.js +6 -5
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +35 -36
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +19 -21
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.d.ts +2 -2
- package/build/navigation/screenLayout.d.ts.map +1 -1
- package/build/navigation/screenLayout.js +3 -9
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/EventTarget.d.ts +1 -1
- package/build/polyfills/events/EventTarget.d.ts.map +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts +1 -2
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +3 -46
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts +1 -2
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +2 -25
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +1 -2
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +6 -25
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts +1 -2
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +3 -5
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts +1 -2
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.js +9 -36
- package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts +1 -1
- package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_preview.js +5 -9
- package/build/screens/avatar_picker/avatar_preview.js.map +1 -1
- package/build/screens/avatar_picker/color_picker.d.ts +1 -2
- package/build/screens/avatar_picker/color_picker.d.ts.map +1 -1
- package/build/screens/avatar_picker/color_picker.js +4 -5
- package/build/screens/avatar_picker/color_picker.js.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.d.ts +1 -2
- package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/emoji_tab.js +12 -13
- package/build/screens/avatar_picker/emoji_tab.js.map +1 -1
- package/build/screens/avatar_picker/icon_grid.d.ts +1 -2
- package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -1
- package/build/screens/avatar_picker/icon_grid.js +4 -5
- package/build/screens/avatar_picker/icon_grid.js.map +1 -1
- package/build/screens/avatar_picker/upload_tab.d.ts +1 -2
- package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -1
- package/build/screens/avatar_picker/upload_tab.js +3 -4
- package/build/screens/avatar_picker/upload_tab.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +1 -2
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +11 -117
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.d.ts +1 -2
- package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +4 -20
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts +1 -2
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +43 -106
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +3 -9
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +2 -12
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +20 -44
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts +1 -2
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +10 -11
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +6 -6
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +7 -34
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +1 -2
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +2 -2
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/team_filters.d.ts +1 -2
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +2 -2
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts +1 -2
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +4 -16
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts +2 -3
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -1
- package/build/screens/conversation_new/components/avatar_selection_row.js +6 -16
- package/build/screens/conversation_new/components/avatar_selection_row.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts +3 -4
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +22 -46
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +2 -3
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +4 -6
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +1 -2
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +4 -20
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -2
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +4 -30
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts +1 -2
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +27 -61
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js +2 -3
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +1 -2
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js +4 -4
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts +1 -2
- package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +4 -6
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +2 -3
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +25 -66
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +2 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +1 -2
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +2 -15
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -2
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +2 -14
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +2 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +2 -5
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -11
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +11 -83
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +7 -14
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +15 -18
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +1 -2
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +3 -10
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.d.ts +1 -2
- package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.js +3 -4
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -2
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +3 -5
- package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts +1 -2
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +19 -42
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +1 -2
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +2 -6
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.d.ts +1 -2
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +35 -558
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/get_help_screen.js +4 -25
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.d.ts +1 -2
- package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/group_notification_level_select_screen.js +2 -4
- package/build/screens/group_notification_level_select_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.d.ts +1 -2
- package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
- package/build/screens/group_notification_settings_screen.js +3 -25
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +1 -2
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +12 -28
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +1 -2
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -22
- package/build/screens/message_report/components/message_preview.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -2
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
- package/build/screens/message_report/components/report_reason_list.js +4 -13
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +1 -2
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +9 -61
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts +1 -2
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +2 -5
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.d.ts +1 -2
- package/build/screens/notification_settings_screen.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.js +28 -66
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts +1 -2
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +3 -21
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.d.ts +1 -2
- package/build/screens/reactions_screen.d.ts.map +1 -1
- package/build/screens/reactions_screen.js +7 -19
- package/build/screens/reactions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +1 -2
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.js +5 -31
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/settings_screen.d.ts +1 -2
- package/build/screens/settings_screen.d.ts.map +1 -1
- package/build/screens/settings_screen.js +4 -26
- package/build/screens/settings_screen.js.map +1 -1
- package/build/screens/system_message_people_screen.d.ts +1 -2
- package/build/screens/system_message_people_screen.d.ts.map +1 -1
- package/build/screens/system_message_people_screen.js +4 -10
- package/build/screens/system_message_people_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.d.ts +1 -1
- package/build/screens/team_conversation_screen.d.ts.map +1 -1
- package/build/screens/team_conversation_screen.js +4 -12
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/types/resources/conversation.d.ts +1 -10
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +0 -2
- package/build/utils/request/conversation.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 +1 -0
- package/src/__tests__/hooks/use_font_scale.test.ts +7 -3
- package/src/__tests__/utils/native_adapters/configuration.ts +1 -1
- package/src/__tests__/utils/system_messages.ts +1 -1
- package/src/__tests__/utils/uri.ts +8 -50
- package/src/__utils__/handlers.ts +5 -6
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +10 -3
- package/src/components/conversations/conversation_preview.tsx +23 -58
- package/src/components/conversations/unread_count_badge.tsx +4 -13
- package/src/components/page/__tests__/component_error_boundary.test.tsx +1 -1
- package/src/components/page/__tests__/error_boundary.test.tsx +6 -2
- package/src/components/page/__tests__/page_error_boundary.test.tsx +1 -1
- package/src/hooks/use_conversation.ts +0 -2
- package/src/hooks/use_conversation_jolt_events.ts +19 -3
- package/src/hooks/use_conversation_messages.ts +6 -5
- package/src/hooks/use_conversations_actions.ts +1 -3
- package/src/hooks/use_mark_latest_message_read.ts +4 -3
- package/src/index.tsx +2 -1
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/screens/conversation_screen.tsx +4 -2
- package/src/screens/conversations/components/list_header_component.tsx +6 -6
- package/src/types/resources/conversation.ts +1 -11
- package/src/utils/request/conversation.ts +0 -2
- package/src/utils/sha_256.ts +24 -24
- package/src/utils/system_messages.ts +1 -1
- package/src/utils/theme.ts +3 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { View, StyleSheet } from 'react-native';
|
|
2
3
|
import { useTheme } from '../../hooks';
|
|
3
4
|
import { platformFontWeightMedium } from '../../utils';
|
|
@@ -9,27 +10,9 @@ import { Text } from './text';
|
|
|
9
10
|
export const VideoAttachmentPreview = ({ name, duration, onRemovePress, loading = false, error = false, hideRemoveButton = false, }) => {
|
|
10
11
|
const styles = useStyles({ error });
|
|
11
12
|
if (loading) {
|
|
12
|
-
return (
|
|
13
|
-
<Spinner size={20} style={styles.spinner}/>
|
|
14
|
-
</View>);
|
|
13
|
+
return (_jsx(View, { style: styles.container, children: _jsx(Spinner, { size: 20, style: styles.spinner }) }));
|
|
15
14
|
}
|
|
16
|
-
return (
|
|
17
|
-
<View style={styles.contentContainer}>
|
|
18
|
-
<Icon name="general.outlinedVideoFile" size={18} style={styles.fileIcon}/>
|
|
19
|
-
<View style={styles.textContainer}>
|
|
20
|
-
<Text variant="tertiary" numberOfLines={1} style={styles.nameText} accessibilityLabel={`Video attachment: ${name}`}>
|
|
21
|
-
{name}
|
|
22
|
-
</Text>
|
|
23
|
-
{duration && (<Text variant="tertiary" numberOfLines={1} style={styles.durationText} accessibilityLabel={`Duration: ${duration}`}>
|
|
24
|
-
{duration}
|
|
25
|
-
</Text>)}
|
|
26
|
-
</View>
|
|
27
|
-
</View>
|
|
28
|
-
{!hideRemoveButton && (<IconButton name="general.x" onPress={onRemovePress} size="xxs" appearance="neutral" style={styles.closeButton} accessibilityLabel="Remove video attachment"/>)}
|
|
29
|
-
{error && (<View style={styles.errorBadge}>
|
|
30
|
-
<Icon name="general.exclamationTriangle" size={12} style={styles.errorIcon}/>
|
|
31
|
-
</View>)}
|
|
32
|
-
</View>);
|
|
15
|
+
return (_jsxs(View, { style: styles.container, children: [_jsxs(View, { style: styles.contentContainer, children: [_jsx(Icon, { name: "general.outlinedVideoFile", size: 18, style: styles.fileIcon }), _jsxs(View, { style: styles.textContainer, children: [_jsx(Text, { variant: "tertiary", numberOfLines: 1, style: styles.nameText, accessibilityLabel: `Video attachment: ${name}`, children: name }), duration && (_jsx(Text, { variant: "tertiary", numberOfLines: 1, style: styles.durationText, accessibilityLabel: `Duration: ${duration}`, children: duration }))] })] }), !hideRemoveButton && (_jsx(IconButton, { name: "general.x", onPress: onRemovePress, size: "xxs", appearance: "neutral", style: styles.closeButton, accessibilityLabel: "Remove video attachment" })), error && (_jsx(View, { style: styles.errorBadge, children: _jsx(Icon, { name: "general.exclamationTriangle", size: 12, style: styles.errorIcon }) }))] }));
|
|
33
16
|
};
|
|
34
17
|
const useStyles = ({ error }) => {
|
|
35
18
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video_attachment_preview.js","sourceRoot":"","sources":["../../../src/components/display/video_attachment_preview.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAW7B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,OAAO,GAAG,KAAK,EACf,KAAK,GAAG,KAAK,EACb,gBAAgB,GAAG,KAAK,GACI,EAAE,EAAE;IAChC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAEnC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"video_attachment_preview.js","sourceRoot":"","sources":["../../../src/components/display/video_attachment_preview.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;A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K,CAAC,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB;SAChF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB;YAC/E,UAAU,EAAE,wBAAwB;YACpC,UAAU,EAAE,CAAC;SACd;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB;SAChF;QACD,WAAW,EAAE;YACX,eAAe,EAAE,MAAM,CAAC,uBAAuB;YAC/C,YAAY,EAAE,EAAE;YAChB,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,YAAY;SACxB;QACD,UAAU,EAAE;YACV,eAAe,EAAE,MAAM,CAAC,iBAAiB;YACzC,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;YACT,sBAAsB,EAAE,YAAY;YACpC,OAAO,EAAE,CAAC;SACX;QACD,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,CAAC,oBAAoB;YAClC,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;YAC9B,QAAQ,EAAE,EAAE;SACb;QACD,OAAO,EAAE;YACP,gBAAgB,EAAE,MAAM;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { View, StyleSheet } from 'react-native'\nimport { useTheme } from '../../hooks'\nimport { platformFontWeightMedium } from '../../utils'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { Icon } from './icon'\nimport { IconButton } from './icon_button'\nimport { Spinner } from './spinner'\nimport { Text } from './text'\n\ninterface VideoAttachmentPreviewProps {\n name: string\n duration?: string\n onRemovePress: () => void\n loading?: boolean\n error?: boolean\n hideRemoveButton?: boolean\n}\n\nexport const VideoAttachmentPreview = ({\n name,\n duration,\n onRemovePress,\n loading = false,\n error = false,\n hideRemoveButton = false,\n}: VideoAttachmentPreviewProps) => {\n const styles = useStyles({ error })\n\n if (loading) {\n return (\n <View style={styles.container}>\n <Spinner size={20} style={styles.spinner} />\n </View>\n )\n }\n\n return (\n <View style={styles.container}>\n <View style={styles.contentContainer}>\n <Icon name=\"general.outlinedVideoFile\" size={18} style={styles.fileIcon} />\n <View style={styles.textContainer}>\n <Text\n variant=\"tertiary\"\n numberOfLines={1}\n style={styles.nameText}\n accessibilityLabel={`Video attachment: ${name}`}\n >\n {name}\n </Text>\n {duration && (\n <Text\n variant=\"tertiary\"\n numberOfLines={1}\n style={styles.durationText}\n accessibilityLabel={`Duration: ${duration}`}\n >\n {duration}\n </Text>\n )}\n </View>\n </View>\n {!hideRemoveButton && (\n <IconButton\n name=\"general.x\"\n onPress={onRemovePress}\n size=\"xxs\"\n appearance=\"neutral\"\n style={styles.closeButton}\n accessibilityLabel=\"Remove video attachment\"\n />\n )}\n {error && (\n <View style={styles.errorBadge}>\n <Icon name=\"general.exclamationTriangle\" size={12} style={styles.errorIcon} />\n </View>\n )}\n </View>\n )\n}\n\nconst useStyles = ({ error }: Partial<VideoAttachmentPreviewProps>) => {\n const { colors } = useTheme()\n const borderRadius = 8\n\n return StyleSheet.create({\n container: {\n height: 60,\n minWidth: 150,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n backgroundColor: colors.fillColorNeutral070,\n borderColor: error ? colors.statusErrorBorder : colors.borderColorDefaultBase,\n borderWidth: error ? 2 : 1,\n borderRadius,\n padding: 4,\n },\n contentContainer: {\n flexDirection: 'row',\n gap: 8,\n alignItems: 'center',\n flexShrink: 1,\n paddingHorizontal: 8,\n paddingVertical: 4,\n },\n textContainer: {\n flexShrink: 1,\n flexDirection: 'column',\n },\n fileIcon: {\n color: error ? colors.iconColorDefaultDisabled : colors.iconColorDefaultPrimary,\n },\n nameText: {\n color: error ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary,\n fontWeight: platformFontWeightMedium,\n flexShrink: 1,\n },\n durationText: {\n color: error ? colors.textColorDefaultDisabled : colors.textColorDefaultPrimary,\n },\n closeButton: {\n backgroundColor: colors.fillColorNeutral050Base,\n borderRadius: 16,\n height: 20,\n width: 20,\n alignSelf: 'flex-start',\n },\n errorBadge: {\n backgroundColor: colors.statusErrorBorder,\n position: 'absolute',\n bottom: 0,\n right: 0,\n zIndex: 2,\n borderStartStartRadius: borderRadius,\n padding: 4,\n },\n errorIcon: {\n color: tokens.colorNeutral100White,\n transform: [{ translateX: 1 }],\n fontSize: 10,\n },\n spinner: {\n marginHorizontal: 'auto',\n },\n })\n}\n"]}
|
|
@@ -18,6 +18,6 @@ interface GroupConversationsProps extends Partial<ConversationRequestArgs> {
|
|
|
18
18
|
*
|
|
19
19
|
* Originally designed for use in CCA.
|
|
20
20
|
*/
|
|
21
|
-
export declare const GroupConversations: ({ chat_group_graph_id, ...rest }: GroupConversationsProps) =>
|
|
21
|
+
export declare const GroupConversations: ({ chat_group_graph_id, ...rest }: GroupConversationsProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export {};
|
|
23
23
|
//# sourceMappingURL=group_conversation_list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_conversation_list.d.ts","sourceRoot":"","sources":["../../src/components/group_conversation_list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAM1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAIvE,UAAU,uBAAwB,SAAQ,OAAO,CAAC,uBAAuB,CAAC;IACxE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,IAAI,CAAA;IAChD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,mBAAmB,CAAC,EAAE,CAAC,EAAE,gBAAgB,EAAE,EAAE;QAAE,gBAAgB,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACnF,mBAAmB,CAAC,EAChB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;IACtE,2BAA2B,CAAC,EACxB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;IACtE,wBAAwB,CAAC,EACrB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;CACvE;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,kCAAkC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"group_conversation_list.d.ts","sourceRoot":"","sources":["../../src/components/group_conversation_list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAM1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAIvE,UAAU,uBAAwB,SAAQ,OAAO,CAAC,uBAAuB,CAAC;IACxE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,IAAI,CAAA;IAChD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,mBAAmB,CAAC,EAAE,CAAC,EAAE,gBAAgB,EAAE,EAAE;QAAE,gBAAgB,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACnF,mBAAmB,CAAC,EAChB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;IACtE,2BAA2B,CAAC,EACxB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;IACtE,wBAAwB,CAAC,EACrB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;CACvE;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,kCAAkC,uBAAuB,4CAM3F,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
2
3
|
import { StyleSheet, View } from 'react-native';
|
|
3
4
|
import { ConversationsContextProvider, useConversationsContext, } from '../contexts/conversations_context';
|
|
4
5
|
import { useTheme } from '../hooks';
|
|
@@ -11,9 +12,7 @@ import { Icon, Text } from './display';
|
|
|
11
12
|
* Originally designed for use in CCA.
|
|
12
13
|
*/
|
|
13
14
|
export const GroupConversations = ({ chat_group_graph_id, ...rest }) => {
|
|
14
|
-
return (
|
|
15
|
-
<GroupConversationList {...rest}/>
|
|
16
|
-
</ConversationsContextProvider>);
|
|
15
|
+
return (_jsx(ConversationsContextProvider, { args: { chat_group_graph_id, group_source_app_name: undefined }, children: _jsx(GroupConversationList, { ...rest }) }));
|
|
17
16
|
};
|
|
18
17
|
const GroupConversationList = ({ limit, onConversationPress, style, onConversationsLoad, ListHeaderComponent, ListOverflowFooterComponent, ListEmptyFooterComponent, }) => {
|
|
19
18
|
const styles = useStyles();
|
|
@@ -23,16 +22,7 @@ const GroupConversationList = ({ limit, onConversationPress, style, onConversati
|
|
|
23
22
|
onConversationsLoad?.({ hasConversations: conversations.length > 0 });
|
|
24
23
|
}
|
|
25
24
|
}, [conversations.length, isFetched, onConversationsLoad]);
|
|
26
|
-
return (
|
|
27
|
-
<>{ListHeaderComponent}</>
|
|
28
|
-
{isFetched && conversations.length === 0 && (<View style={styles.listEmpty}>
|
|
29
|
-
<Icon size={24} name="general.textMessage" style={styles.listEmptyIcon}/>
|
|
30
|
-
<Text variant="secondary">No conversations found</Text>
|
|
31
|
-
<>{ListEmptyFooterComponent}</>
|
|
32
|
-
</View>)}
|
|
33
|
-
{conversations.slice(0, limit).map(conversation => (<ConversationPreview style={styles.conversation} key={conversation.id} showBadges={false} conversation={conversation} onPress={() => onConversationPress(conversation)}/>))}
|
|
34
|
-
{conversations.length > (limit || 0) && <>{ListOverflowFooterComponent}</>}
|
|
35
|
-
</View>);
|
|
25
|
+
return (_jsxs(View, { style: style, children: [_jsx(_Fragment, { children: ListHeaderComponent }), isFetched && conversations.length === 0 && (_jsxs(View, { style: styles.listEmpty, children: [_jsx(Icon, { size: 24, name: "general.textMessage", style: styles.listEmptyIcon }), _jsx(Text, { variant: "secondary", children: "No conversations found" }), _jsx(_Fragment, { children: ListEmptyFooterComponent })] })), conversations.slice(0, limit).map(conversation => (_jsx(ConversationPreview, { style: styles.conversation, showBadges: false, conversation: conversation, onPress: () => onConversationPress(conversation) }, conversation.id))), conversations.length > (limit || 0) && _jsx(_Fragment, { children: ListOverflowFooterComponent })] }));
|
|
36
26
|
};
|
|
37
27
|
const useStyles = () => {
|
|
38
28
|
const { colors } = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_conversation_list.js","sourceRoot":"","sources":["../../src/components/group_conversation_list.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"group_conversation_list.js","sourceRoot":"","sources":["../../src/components/group_conversation_list.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AAC1E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAkBtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAE,mBAAmB,EAAE,GAAG,IAAI,EAA2B,EAAE,EAAE;IAC9F,OAAO,CACL,KAAC,4BAA4B,IAAC,IAAI,EAAE,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,SAAS,EAAE,YAC3F,KAAC,qBAAqB,OAAK,IAAI,GAAI,GACN,CAChC,CAAA;AACH,CAAC,CAAA;AAED,MAAM,qBAAqB,GAAG,CAAC,EAC7B,KAAK,EACL,mBAAmB,EACnB,KAAK,EACL,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,GACA,EAAE,EAAE;IAC5B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,EAAE,aAAa,GAAG,EAAE,EAAE,SAAS,EAAE,GAAG,uBAAuB,EAAE,CAAA;IAEnE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,EAAE,CAAC;YACd,mBAAmB,EAAE,CAAC,EAAE,gBAAgB,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAA;QACvE,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAA;I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K,EAAE,MAAM,CAAC,mBAAmB;SAClC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useEffect } from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport {\n ConversationsContextProvider,\n useConversationsContext,\n} from '../contexts/conversations_context'\nimport { useTheme } from '../hooks'\nimport { ConversationRequestArgs } from '../utils/request/conversation'\nimport { ConversationPreview } from './conversations/conversation_preview'\nimport { Icon, Text } from './display'\n\ninterface GroupConversationsProps extends Partial<ConversationRequestArgs> {\n limit?: number\n onConversationPress: (conversation: any) => void\n style?: ViewStyle\n onConversationsLoad?: ({ hasConversations }: { hasConversations: boolean }) => void\n ListHeaderComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n ListOverflowFooterComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n ListEmptyFooterComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n}\n\n/**\n * GroupConversations is a component that displays a list of conversations\n * for a specific group.\n *\n * Originally designed for use in CCA.\n */\nexport const GroupConversations = ({ chat_group_graph_id, ...rest }: GroupConversationsProps) => {\n return (\n <ConversationsContextProvider args={{ chat_group_graph_id, group_source_app_name: undefined }}>\n <GroupConversationList {...rest} />\n </ConversationsContextProvider>\n )\n}\n\nconst GroupConversationList = ({\n limit,\n onConversationPress,\n style,\n onConversationsLoad,\n ListHeaderComponent,\n ListOverflowFooterComponent,\n ListEmptyFooterComponent,\n}: GroupConversationsProps) => {\n const styles = useStyles()\n const { conversations = [], isFetched } = useConversationsContext()\n\n useEffect(() => {\n if (isFetched) {\n onConversationsLoad?.({ hasConversations: conversations.length > 0 })\n }\n }, [conversations.length, isFetched, onConversationsLoad])\n\n return (\n <View style={style}>\n <>{ListHeaderComponent}</>\n {isFetched && conversations.length === 0 && (\n <View style={styles.listEmpty}>\n <Icon size={24} name=\"general.textMessage\" style={styles.listEmptyIcon} />\n <Text variant=\"secondary\">No conversations found</Text>\n <>{ListEmptyFooterComponent}</>\n </View>\n )}\n {conversations.slice(0, limit).map(conversation => (\n <ConversationPreview\n style={styles.conversation}\n key={conversation.id}\n showBadges={false}\n conversation={conversation}\n onPress={() => onConversationPress(conversation)}\n />\n ))}\n {conversations.length > (limit || 0) && <>{ListOverflowFooterComponent}</>}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n constainer: {},\n conversation: {\n borderBottomWidth: 0,\n },\n listItem: { color: colors.fillColorNeutral020 },\n listEmpty: {\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 16,\n gap: 8,\n },\n listEmptyIcon: {\n color: colors.fillColorNeutral020,\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { ErrorBoundaryProps } from './error_boundary';
|
|
3
|
-
export declare function ComponentErrorBoundary({ children, ...props }: PropsWithChildren<ErrorBoundaryProps>):
|
|
3
|
+
export declare function ComponentErrorBoundary({ children, ...props }: PropsWithChildren<ErrorBoundaryProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=component_error_boundary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component_error_boundary.d.ts","sourceRoot":"","sources":["../../../src/components/page/component_error_boundary.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"component_error_boundary.d.ts","sourceRoot":"","sources":["../../../src/components/page/component_error_boundary.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,EAAiB,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAEpE,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,2CAMvC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ErrorBoundary } from './error_boundary';
|
|
3
3
|
export function ComponentErrorBoundary({ children, ...props }) {
|
|
4
|
-
return (
|
|
5
|
-
{children}
|
|
6
|
-
</ErrorBoundary>);
|
|
4
|
+
return (_jsx(ErrorBoundary, { scope: "component", fallback: null, ...props, children: children }));
|
|
7
5
|
}
|
|
8
6
|
//# sourceMappingURL=component_error_boundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component_error_boundary.js","sourceRoot":"","sources":["../../../src/components/page/component_error_boundary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component_error_boundary.js","sourceRoot":"","sources":["../../../src/components/page/component_error_boundary.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAsB,MAAM,kBAAkB,CAAA;AAEpE,MAAM,UAAU,sBAAsB,CAAC,EACrC,QAAQ,EACR,GAAG,KAAK,EAC8B;IACtC,OAAO,CACL,KAAC,aAAa,IAAC,KAAK,EAAC,WAAW,EAAC,QAAQ,EAAE,IAAI,KAAM,KAAK,YACvD,QAAQ,GACK,CACjB,CAAA;AACH,CAAC","sourcesContent":["import React, { PropsWithChildren } from 'react'\nimport { ErrorBoundary, ErrorBoundaryProps } from './error_boundary'\n\nexport function ComponentErrorBoundary({\n children,\n ...props\n}: PropsWithChildren<ErrorBoundaryProps>) {\n return (\n <ErrorBoundary scope=\"component\" fallback={null} {...props}>\n {children}\n </ErrorBoundary>\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../src/components/page/loading.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../src/components/page/loading.tsx"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,4CAQ7B"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useTheme } from '@react-navigation/native';
|
|
2
|
-
import React from 'react';
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
import { Spinner } from '../display';
|
|
5
5
|
export function DefaultLoading() {
|
|
6
6
|
const styles = useStyles();
|
|
7
|
-
return (
|
|
8
|
-
<Spinner size={48}/>
|
|
9
|
-
</View>);
|
|
7
|
+
return (_jsx(View, { style: styles.container, children: _jsx(Spinner, { size: 48 }) }));
|
|
10
8
|
}
|
|
11
9
|
const useStyles = () => {
|
|
12
10
|
const theme = useTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.js","sourceRoot":"","sources":["../../../src/components/page/loading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"loading.js","sourceRoot":"","sources":["../../../src/components/page/loading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,UAAU,cAAc;IAC5B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAE1B,OAAO,CACL,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAC3B,KAAC,OAAO,IAAC,IAAI,EAAE,EAAE,GAAI,GAChB,CACR,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,SAAS,EAAE,GAAG;YACd,IAAI,EAAE,CAAC;YACP,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;SACrB;QACD,OAAO,EAAE;YACP,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;SACzB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useTheme } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { Spinner } from '../display'\n\nexport function DefaultLoading() {\n const styles = useStyles()\n\n return (\n <View style={styles.container}>\n <Spinner size={48} />\n </View>\n )\n}\n\nconst useStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n container: {\n minHeight: 200,\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n loading: {\n color: theme.colors.text,\n },\n })\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { ErrorBoundaryProps } from './error_boundary';
|
|
3
|
-
export declare function PageErrorBoundary({ children, ...props }: PropsWithChildren<ErrorBoundaryProps>):
|
|
3
|
+
export declare function PageErrorBoundary({ children, ...props }: PropsWithChildren<ErrorBoundaryProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=page_error_boundary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page_error_boundary.d.ts","sourceRoot":"","sources":["../../../src/components/page/page_error_boundary.tsx"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"page_error_boundary.d.ts","sourceRoot":"","sources":["../../../src/components/page/page_error_boundary.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,iBAAiB,EAAqD,MAAM,OAAO,CAAA;AAInG,OAAO,EAAwC,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAM3F,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,2CAM9F"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { useNavigation } from '@react-navigation/native';
|
|
2
3
|
import { useQueryErrorResetBoundary } from '@tanstack/react-query';
|
|
3
|
-
import
|
|
4
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
5
|
import { onAuthRefresh } from '../../utils/auth_events';
|
|
5
6
|
import { ResponseError } from '../../utils/response_error';
|
|
6
7
|
import BlankState from '../primitive/blank_state_primitive';
|
|
7
8
|
import { ErrorBoundary } from './error_boundary';
|
|
8
|
-
const renderPageFallback = (error, reset) => (
|
|
9
|
+
const renderPageFallback = (error, reset) => (_jsx(ErrorView, { error: error, reset: reset }));
|
|
9
10
|
export function PageErrorBoundary({ children, ...props }) {
|
|
10
|
-
return (
|
|
11
|
-
{children}
|
|
12
|
-
</ErrorBoundary>);
|
|
11
|
+
return (_jsx(ErrorBoundary, { scope: "screen", fallback: renderPageFallback, ...props, children: children }));
|
|
13
12
|
}
|
|
14
13
|
function ErrorView({ error, reset }) {
|
|
15
14
|
const { reset: resetQueries } = useQueryErrorResetBoundary();
|
|
@@ -19,12 +18,12 @@ function ErrorView({ error, reset }) {
|
|
|
19
18
|
}, [resetQueries, reset]);
|
|
20
19
|
useEffect(() => handleReset, [handleReset]);
|
|
21
20
|
if (error instanceof ResponseError) {
|
|
22
|
-
return
|
|
21
|
+
return _jsx(ResponseErrorView, { response: error.response, onReset: handleReset });
|
|
23
22
|
}
|
|
24
23
|
if (isNetworkError(error)) {
|
|
25
|
-
return (
|
|
24
|
+
return (_jsx(ErrorContent, { heading: 'Problem connecting!', body: 'Check your internet connection and try again.' }));
|
|
26
25
|
}
|
|
27
|
-
return
|
|
26
|
+
return _jsx(ErrorContent, { heading: 'Oops!', body: 'Something unexpected happened.' });
|
|
28
27
|
}
|
|
29
28
|
function isNetworkError(error) {
|
|
30
29
|
const networkFailedMessages = [
|
|
@@ -62,9 +61,9 @@ function ResponseErrorView({ response, onReset }) {
|
|
|
62
61
|
return onAuthRefresh(onReset);
|
|
63
62
|
}, [status, onReset]);
|
|
64
63
|
if (status === 429) {
|
|
65
|
-
return
|
|
64
|
+
return _jsx(RateLimitedView, { response: response, onReset: onReset });
|
|
66
65
|
}
|
|
67
|
-
return
|
|
66
|
+
return _jsx(ErrorContent, { heading: heading, body: body });
|
|
68
67
|
}
|
|
69
68
|
const RATE_LIMIT_WINDOW_S = 20;
|
|
70
69
|
function RateLimitedView({ response, onReset }) {
|
|
@@ -79,30 +78,10 @@ function RateLimitedView({ response, onReset }) {
|
|
|
79
78
|
}, [readyAt]);
|
|
80
79
|
const navigation = useNavigation();
|
|
81
80
|
const secondsLeft = Math.max(0, Math.ceil((readyAt - now) / 1000));
|
|
82
|
-
return (
|
|
83
|
-
<BlankState.Imagery name="people.noTextMessage"/>
|
|
84
|
-
<BlankState.Content>
|
|
85
|
-
<BlankState.Heading>Too many requests</BlankState.Heading>
|
|
86
|
-
<BlankState.Text>
|
|
87
|
-
Chat is being accessed too frequently. Please wait a moment.
|
|
88
|
-
</BlankState.Text>
|
|
89
|
-
</BlankState.Content>
|
|
90
|
-
<BlankState.Button title={secondsLeft > 0 ? `Retry in ${secondsLeft}s` : 'Try again'} disabled={secondsLeft > 0} onPress={onReset} size="md" accessibilityRole="button"/>
|
|
91
|
-
<BlankState.TextButton onPress={navigation.goBack}>Go back</BlankState.TextButton>
|
|
92
|
-
</BlankState.Root>);
|
|
81
|
+
return (_jsxs(BlankState.Root, { children: [_jsx(BlankState.Imagery, { name: "people.noTextMessage" }), _jsxs(BlankState.Content, { children: [_jsx(BlankState.Heading, { children: "Too many requests" }), _jsx(BlankState.Text, { children: "Chat is being accessed too frequently. Please wait a moment." })] }), _jsx(BlankState.Button, { title: secondsLeft > 0 ? `Retry in ${secondsLeft}s` : 'Try again', disabled: secondsLeft > 0, onPress: onReset, size: "md", accessibilityRole: "button" }), _jsx(BlankState.TextButton, { onPress: navigation.goBack, children: "Go back" })] }));
|
|
93
82
|
}
|
|
94
83
|
function ErrorContent({ heading, body }) {
|
|
95
84
|
const navigation = useNavigation();
|
|
96
|
-
return (
|
|
97
|
-
<BlankState.Imagery name="people.noTextMessage"/>
|
|
98
|
-
<BlankState.Content>
|
|
99
|
-
<BlankState.Heading>{heading}</BlankState.Heading>
|
|
100
|
-
<BlankState.Text>{body}</BlankState.Text>
|
|
101
|
-
</BlankState.Content>
|
|
102
|
-
<BlankState.Button title="Go back" onPress={navigation.goBack} size="md" accessibilityRole="link"/>
|
|
103
|
-
<BlankState.TextButton onPress={() => navigation.navigate('BugReport')}>
|
|
104
|
-
Report a bug
|
|
105
|
-
</BlankState.TextButton>
|
|
106
|
-
</BlankState.Root>);
|
|
85
|
+
return (_jsxs(BlankState.Root, { children: [_jsx(BlankState.Imagery, { name: "people.noTextMessage" }), _jsxs(BlankState.Content, { children: [_jsx(BlankState.Heading, { children: heading }), _jsx(BlankState.Text, { children: body })] }), _jsx(BlankState.Button, { title: "Go back", onPress: navigation.goBack, size: "md", accessibilityRole: "link" }), _jsx(BlankState.TextButton, { onPress: () => navigation.navigate('BugReport'), children: "Report a bug" })] }));
|
|
107
86
|
}
|
|
108
87
|
//# sourceMappingURL=page_error_boundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page_error_boundary.js","sourceRoot":"","sources":["../../../src/components/page/page_error_boundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAA;AAClE,
|
|
1
|
+
{"version":3,"file":"page_error_boundary.js","sourceRoot":"","sources":["../../../src/components/page/page_error_boundary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAc,EAAqB,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE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,UAAU,CAAC,OAAO,IAAC,IAAI,EAAC,sBAAsB,GAAG,EAClD,MAAC,UAAU,CAAC,OAAO,eACjB,KAAC,UAAU,CAAC,OAAO,oCAAuC,EAC1D,KAAC,UAAU,CAAC,IAAI,+EAEE,IACC,EACrB,KAAC,UAAU,CAAC,MAAM,IAChB,KAAK,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,WAAW,GAAG,CAAC,CAAC,CAAC,WAAW,EACjE,QAAQ,EAAE,WAAW,GAAG,CAAC,EACzB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,IAAI,EACT,iBAAiB,EAAC,QAAQ,GAC1B,EACF,KAAC,UAAU,CAAC,UAAU,IAAC,OAAO,EAAE,UAAU,CAAC,MAAM,wBAAiC,IAClE,CACnB,CAAA;AACH,CAAC;AAED,SAAS,YAAY,CAAC,EAAE,OAAO,EAAE,IAAI,EAAqC;IACxE,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAElC,OAAO,CACL,MAAC,UAAU,CAAC,IAAI,eACd,KAAC,UAAU,CAAC,OAAO,IAAC,IAAI,EAAC,sBAAsB,GAAG,EAClD,MAAC,UAAU,CAAC,OAAO,eACjB,KAAC,UAAU,CAAC,OAAO,cAAE,OAAO,GAAsB,EAClD,KAAC,UAAU,CAAC,IAAI,cAAE,IAAI,GAAmB,IACtB,EACrB,KAAC,UAAU,CAAC,MAAM,IAChB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,UAAU,CAAC,MAAM,EAC1B,IAAI,EAAC,IAAI,EACT,iBAAiB,EAAC,MAAM,GACxB,EACF,KAAC,UAAU,CAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,6BAE9C,IACR,CACnB,CAAA;AACH,CAAC","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport { useQueryErrorResetBoundary } from '@tanstack/react-query'\nimport React, { PropsWithChildren, useCallback, useEffect, useMemo, useRef, useState } from 'react'\nimport { onAuthRefresh } from '../../utils/auth_events'\nimport { ResponseError } from '../../utils/response_error'\nimport BlankState from '../primitive/blank_state_primitive'\nimport { ErrorBoundary, ErrorBoundaryFallback, ErrorBoundaryProps } from './error_boundary'\n\nconst renderPageFallback: ErrorBoundaryFallback = (error, reset) => (\n <ErrorView error={error} reset={reset} />\n)\n\nexport function PageErrorBoundary({ children, ...props }: PropsWithChildren<ErrorBoundaryProps>) {\n return (\n <ErrorBoundary scope=\"screen\" fallback={renderPageFallback} {...props}>\n {children}\n </ErrorBoundary>\n )\n}\n\nfunction ErrorView({ error, reset }: { error: Error; reset: () => void }) {\n const { reset: resetQueries } = useQueryErrorResetBoundary()\n\n const handleReset = useCallback(() => {\n resetQueries()\n reset()\n }, [resetQueries, reset])\n\n useEffect(() => handleReset, [handleReset])\n\n if (error instanceof ResponseError) {\n return <ResponseErrorView response={error.response} onReset={handleReset} />\n }\n\n if (isNetworkError(error)) {\n return (\n <ErrorContent\n heading={'Problem connecting!'}\n body={'Check your internet connection and try again.'}\n />\n )\n }\n\n return <ErrorContent heading={'Oops!'} body={'Something unexpected happened.'} />\n}\n\nfunction isNetworkError(error: Error) {\n const networkFailedMessages = [\n 'Network request failed',\n 'Network request timed out',\n 'Failed to fetch',\n ]\n\n return new RegExp(networkFailedMessages.join('|'), 'i').test(error.message)\n}\n\nfunction ResponseErrorView({ response, onReset }: { response: Response; onReset: () => void }) {\n const { status } = response\n\n const heading = useMemo(() => {\n switch (status) {\n case 403:\n return 'Permission required'\n case 404:\n return 'Content not found'\n default:\n return 'Oops!'\n }\n }, [status])\n\n const body = useMemo(() => {\n switch (status) {\n case 403:\n return 'Contact your administrator for access.'\n case 404:\n return 'If you believe something should be here, please reach out to your administrator.'\n default:\n return 'Something unexpected happened.'\n }\n }, [status])\n\n useEffect(() => {\n if (status !== 401) return\n\n return onAuthRefresh(onReset)\n }, [status, onReset])\n\n if (status === 429) {\n return <RateLimitedView response={response} onReset={onReset} />\n }\n\n return <ErrorContent heading={heading} body={body} />\n}\n\nconst RATE_LIMIT_WINDOW_S = 20\n\nfunction RateLimitedView({ response, onReset }: { response: Response; onReset: () => void }) {\n const retryAfterS = parseInt(\n response.headers?.get('Retry-After') ?? String(RATE_LIMIT_WINDOW_S),\n 10\n )\n const readyAt = useRef(Date.now() + retryAfterS * 1000).current\n const [now, setNow] = useState(Date.now)\n\n useEffect(() => {\n const id = setInterval(() => {\n setNow(prev => (prev >= readyAt ? prev : Date.now()))\n }, 1000)\n return () => clearInterval(id)\n }, [readyAt])\n\n const navigation = useNavigation()\n const secondsLeft = Math.max(0, Math.ceil((readyAt - now) / 1000))\n\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"people.noTextMessage\" />\n <BlankState.Content>\n <BlankState.Heading>Too many requests</BlankState.Heading>\n <BlankState.Text>\n Chat is being accessed too frequently. Please wait a moment.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button\n title={secondsLeft > 0 ? `Retry in ${secondsLeft}s` : 'Try again'}\n disabled={secondsLeft > 0}\n onPress={onReset}\n size=\"md\"\n accessibilityRole=\"button\"\n />\n <BlankState.TextButton onPress={navigation.goBack}>Go back</BlankState.TextButton>\n </BlankState.Root>\n )\n}\n\nfunction ErrorContent({ heading, body }: { heading: string; body: string }) {\n const navigation = useNavigation()\n\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"people.noTextMessage\" />\n <BlankState.Content>\n <BlankState.Heading>{heading}</BlankState.Heading>\n <BlankState.Text>{body}</BlankState.Text>\n </BlankState.Content>\n <BlankState.Button\n title=\"Go back\"\n onPress={navigation.goBack}\n size=\"md\"\n accessibilityRole=\"link\"\n />\n <BlankState.TextButton onPress={() => navigation.navigate('BugReport')}>\n Report a bug\n </BlankState.TextButton>\n </BlankState.Root>\n )\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useEffect, useState } from 'react';
|
|
2
3
|
import { StyleSheet, View } from 'react-native';
|
|
3
4
|
import { useFontScale, useTheme } from '../../hooks';
|
|
4
5
|
import { MAX_FONT_SIZE_MULTIPLIER } from '../../utils';
|
|
@@ -68,43 +69,37 @@ function useAvatarContext() {
|
|
|
68
69
|
function AvatarRoot({ children, size = 'md', style, maxFontSizeMultiplier = MAX_FONT_SIZE_MULTIPLIER, minFontSizeMultiplier = undefined, }) {
|
|
69
70
|
const [allImagesLoaded, setAllImagesLoaded] = useState(false);
|
|
70
71
|
const styles = useStyles({ size, maxFontSizeMultiplier, minFontSizeMultiplier });
|
|
71
|
-
return (
|
|
72
|
+
return (_jsx(AvatarContext.Provider, { value: {
|
|
72
73
|
size,
|
|
73
74
|
allImagesLoaded,
|
|
74
75
|
setAllImagesLoaded,
|
|
75
76
|
maxFontSizeMultiplier,
|
|
76
77
|
minFontSizeMultiplier,
|
|
77
|
-
}}
|
|
78
|
-
<View style={[styles.rootContainer, style]}>{children}</View>
|
|
79
|
-
</AvatarContext.Provider>);
|
|
78
|
+
}, children: _jsx(View, { style: [styles.rootContainer, style], children: children }) }));
|
|
80
79
|
}
|
|
81
80
|
AvatarRoot.displayName = 'Avatar.Root';
|
|
82
81
|
function AvatarMask({ children, ...props }) {
|
|
83
82
|
const { size, maxFontSizeMultiplier, minFontSizeMultiplier } = useAvatarContext();
|
|
84
83
|
const styles = useStyles({ size, maxFontSizeMultiplier, minFontSizeMultiplier });
|
|
85
|
-
return (
|
|
86
|
-
{children}
|
|
87
|
-
</View>);
|
|
84
|
+
return (_jsx(View, { style: styles.mask, ...props, children: children }));
|
|
88
85
|
}
|
|
89
86
|
AvatarMask.displayName = 'Avatar.Mask';
|
|
90
87
|
function AvatarImage({ sourceUri, ...props }) {
|
|
91
88
|
const { size, maxFontSizeMultiplier, minFontSizeMultiplier } = useAvatarContext();
|
|
92
89
|
const fontScale = useFontScale({ maxFontSizeMultiplier, minFontSizeMultiplier });
|
|
93
90
|
const scaledAvatarSize = AVATAR_PX[size] * fontScale;
|
|
94
|
-
return
|
|
91
|
+
return _jsx(Image, { source: { uri: sourceUri }, loaderSize: scaledAvatarSize, ...props, alt: "" });
|
|
95
92
|
}
|
|
96
93
|
AvatarImage.displayName = 'Avatar.Image';
|
|
97
94
|
function AvatarGroupImage({ sourceUri, style, onLoad }) {
|
|
98
|
-
return (
|
|
95
|
+
return (_jsx(Image, { source: { uri: sourceUri }, hideLoader: true, wrapperStyle: style, onLoad: onLoad, alt: "" }));
|
|
99
96
|
}
|
|
100
97
|
function AvatarImageFallback({ name = 'general.person' }) {
|
|
101
98
|
const { size, maxFontSizeMultiplier, minFontSizeMultiplier } = useAvatarContext();
|
|
102
99
|
const styles = useStyles({ maxFontSizeMultiplier, minFontSizeMultiplier });
|
|
103
100
|
const fontScale = useFontScale({ maxFontSizeMultiplier, minFontSizeMultiplier });
|
|
104
101
|
const scaledIconSize = AVATAR_FALLBACK_ICON_PX[size] * fontScale;
|
|
105
|
-
return (
|
|
106
|
-
<Icon name={name} size={scaledIconSize} style={styles.fallbackIcon} accessibilityElementsHidden={true}/>
|
|
107
|
-
</View>);
|
|
102
|
+
return (_jsx(View, { style: styles.fallbackContainer, children: _jsx(Icon, { name: name, size: scaledIconSize, style: styles.fallbackIcon, accessibilityElementsHidden: true }) }));
|
|
108
103
|
}
|
|
109
104
|
AvatarImageFallback.displayName = 'Avatar.ImageFallback';
|
|
110
105
|
function AvatarGroup({ sourceUris }) {
|
|
@@ -130,35 +125,15 @@ function AvatarGroup({ sourceUris }) {
|
|
|
130
125
|
setAllImagesLoaded(allImagesLoaded);
|
|
131
126
|
}, [displayUris, hasDisplayUris, loadingStatus, setAllImagesLoaded]);
|
|
132
127
|
if (displayUris.length === 1) {
|
|
133
|
-
return
|
|
128
|
+
return _jsx(AvatarGroupImage, { sourceUri: displayUris[0], onLoad: () => handleImageLoaded(0) });
|
|
134
129
|
}
|
|
135
130
|
if (displayUris.length === 2) {
|
|
136
|
-
return (
|
|
137
|
-
<AvatarGroupImage sourceUri={displayUris[0]} style={styles.halfWidthFullHeight} onLoad={() => handleImageLoaded(0)}/>
|
|
138
|
-
<AvatarGroupImage sourceUri={displayUris[1]} style={styles.halfWidthFullHeight} onLoad={() => handleImageLoaded(1)}/>
|
|
139
|
-
</View>);
|
|
131
|
+
return (_jsxs(View, { style: styles.groupRow, children: [_jsx(AvatarGroupImage, { sourceUri: displayUris[0], style: styles.halfWidthFullHeight, onLoad: () => handleImageLoaded(0) }), _jsx(AvatarGroupImage, { sourceUri: displayUris[1], style: styles.halfWidthFullHeight, onLoad: () => handleImageLoaded(1) })] }));
|
|
140
132
|
}
|
|
141
133
|
if (displayUris.length === 3) {
|
|
142
|
-
return (
|
|
143
|
-
<View style={styles.groupRow}>
|
|
144
|
-
<AvatarGroupImage sourceUri={displayUris[0]} style={styles.halfWidthFullHeight} onLoad={() => handleImageLoaded(0)}/>
|
|
145
|
-
<View style={styles.groupColumn}>
|
|
146
|
-
<AvatarGroupImage sourceUri={displayUris[1]} style={styles.fullWidthHalfHeight} onLoad={() => handleImageLoaded(1)}/>
|
|
147
|
-
<AvatarGroupImage sourceUri={displayUris[2]} style={styles.fullWidthHalfHeight} onLoad={() => handleImageLoaded(2)}/>
|
|
148
|
-
</View>
|
|
149
|
-
</View>
|
|
150
|
-
</View>);
|
|
134
|
+
return (_jsx(View, { style: styles.groupColumn, children: _jsxs(View, { style: styles.groupRow, children: [_jsx(AvatarGroupImage, { sourceUri: displayUris[0], style: styles.halfWidthFullHeight, onLoad: () => handleImageLoaded(0) }), _jsxs(View, { style: styles.groupColumn, children: [_jsx(AvatarGroupImage, { sourceUri: displayUris[1], style: styles.fullWidthHalfHeight, onLoad: () => handleImageLoaded(1) }), _jsx(AvatarGroupImage, { sourceUri: displayUris[2], style: styles.fullWidthHalfHeight, onLoad: () => handleImageLoaded(2) })] })] }) }));
|
|
151
135
|
}
|
|
152
|
-
return (
|
|
153
|
-
<View style={styles.groupRow}>
|
|
154
|
-
<AvatarGroupImage sourceUri={displayUris[0]} style={styles.halfWidthFullHeight} onLoad={() => handleImageLoaded(0)}/>
|
|
155
|
-
<AvatarGroupImage sourceUri={displayUris[1]} style={styles.halfWidthFullHeight} onLoad={() => handleImageLoaded(1)}/>
|
|
156
|
-
</View>
|
|
157
|
-
<View style={styles.groupRow}>
|
|
158
|
-
<AvatarGroupImage sourceUri={displayUris[2]} style={styles.halfWidthFullHeight} onLoad={() => handleImageLoaded(2)}/>
|
|
159
|
-
<AvatarGroupImage sourceUri={displayUris[3]} style={styles.halfWidthFullHeight} onLoad={() => handleImageLoaded(3)}/>
|
|
160
|
-
</View>
|
|
161
|
-
</View>);
|
|
136
|
+
return (_jsxs(View, { style: styles.groupColumn, children: [_jsxs(View, { style: styles.groupRow, children: [_jsx(AvatarGroupImage, { sourceUri: displayUris[0], style: styles.halfWidthFullHeight, onLoad: () => handleImageLoaded(0) }), _jsx(AvatarGroupImage, { sourceUri: displayUris[1], style: styles.halfWidthFullHeight, onLoad: () => handleImageLoaded(1) })] }), _jsxs(View, { style: styles.groupRow, children: [_jsx(AvatarGroupImage, { sourceUri: displayUris[2], style: styles.halfWidthFullHeight, onLoad: () => handleImageLoaded(2) }), _jsx(AvatarGroupImage, { sourceUri: displayUris[3], style: styles.halfWidthFullHeight, onLoad: () => handleImageLoaded(3) })] })] }));
|
|
162
137
|
}
|
|
163
138
|
AvatarGroup.displayName = 'Avatar.Group';
|
|
164
139
|
// =================================
|
|
@@ -171,15 +146,13 @@ function AvatarGroupLoader() {
|
|
|
171
146
|
const scaledSpinnerSize = AVATAR_PX[size] * fontScale;
|
|
172
147
|
if (allImagesLoaded)
|
|
173
148
|
return null;
|
|
174
|
-
return (
|
|
175
|
-
<Spinner size={scaledSpinnerSize}/>
|
|
176
|
-
</View>);
|
|
149
|
+
return (_jsx(View, { style: styles.groupLoader, children: _jsx(Spinner, { size: scaledSpinnerSize }) }));
|
|
177
150
|
}
|
|
178
151
|
AvatarGroupLoader.displayName = 'Avatar.GroupLoader';
|
|
179
152
|
function AvatarPresence({ presence, ...props }) {
|
|
180
153
|
const { size, maxFontSizeMultiplier, minFontSizeMultiplier } = useAvatarContext();
|
|
181
154
|
const styles = useStyles({ size, presence, maxFontSizeMultiplier, minFontSizeMultiplier });
|
|
182
|
-
return
|
|
155
|
+
return _jsx(View, { style: styles.presence, ...props });
|
|
183
156
|
}
|
|
184
157
|
AvatarPresence.displayName = 'Avatar.Presence';
|
|
185
158
|
const useStyles = ({ size = 'md', presence = 'offline', maxFontSizeMultiplier = MAX_FONT_SIZE_MULTIPLIER, minFontSizeMultiplier = undefined, } = {}) => {
|