@planningcenter/chat-react-native 3.30.0-rc.0 → 3.30.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/attachments/attachment_card.js +3 -3
- package/build/components/conversation/attachments/attachment_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +2 -2
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +4 -4
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +4 -4
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +5 -5
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +5 -5
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +8 -8
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +6 -6
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +3 -3
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts +1 -1
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +14 -14
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +1 -1
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +4 -4
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +1 -1
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +13 -13
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.js +3 -3
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +2 -2
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +6 -6
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts +1 -1
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +2 -2
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +2 -2
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_connectors.d.ts +1 -1
- package/build/components/conversation/reply_connectors.d.ts.map +1 -1
- package/build/components/conversation/reply_connectors.js +2 -2
- package/build/components/conversation/reply_connectors.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +8 -8
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.js +3 -3
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +1 -1
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +5 -5
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +4 -4
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.js +5 -5
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/mute_indicator.js +3 -3
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +5 -5
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.js +3 -3
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +4 -4
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/avatar.d.ts +1 -1
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +1 -1
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +1 -1
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +1 -1
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +3 -3
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/banner.d.ts +1 -1
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +1 -1
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.js +1 -1
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +3 -3
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +1 -1
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +3 -3
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +3 -3
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +4 -4
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +5 -5
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +2 -2
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image.js +1 -1
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.js +4 -4
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/keyboard_view.js +1 -1
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/components/display/person.d.ts +1 -1
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +2 -2
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +3 -3
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/pressable_row.js +1 -1
- package/build/components/display/pressable_row.js.map +1 -1
- package/build/components/display/spinner.js +1 -1
- package/build/components/display/spinner.js.map +1 -1
- package/build/components/display/switch.js +1 -1
- package/build/components/display/switch.js.map +1 -1
- package/build/components/display/tabs.js +1 -1
- package/build/components/display/tabs.js.map +1 -1
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +2 -2
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_button.d.ts.map +1 -1
- package/build/components/display/text_button.js +2 -2
- package/build/components/display/text_button.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +3 -3
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +5 -5
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/utils/button_colors.js +1 -1
- package/build/components/display/utils/button_colors.js.map +1 -1
- package/build/components/display/utils/status_colors.js +1 -1
- package/build/components/display/utils/status_colors.js.map +1 -1
- package/build/components/display/video_attachment_preview.js +5 -5
- package/build/components/display/video_attachment_preview.js.map +1 -1
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +2 -2
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/components/page/error_boundary.d.ts.map +1 -1
- package/build/components/page/error_boundary.js +2 -2
- package/build/components/page/error_boundary.js.map +1 -1
- package/build/components/page/loading.js +1 -1
- package/build/components/page/loading.js.map +1 -1
- package/build/components/primitive/avatar_primitive.d.ts +2 -2
- package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
- package/build/components/primitive/avatar_primitive.js +5 -5
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.d.ts +2 -2
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +8 -8
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/blank_state_primitive.d.ts +1 -1
- package/build/components/primitive/blank_state_primitive.d.ts.map +1 -1
- package/build/components/primitive/blank_state_primitive.js +2 -2
- package/build/components/primitive/blank_state_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +2 -2
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +3 -3
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.js +1 -1
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.js +4 -4
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +6 -6
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +3 -3
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +1 -1
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts +3 -3
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +6 -6
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +7 -7
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.js +2 -2
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +2 -2
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts +2 -2
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts.map +1 -1
- package/build/hooks/services/use_find_or_create_services_conversation.js +3 -3
- package/build/hooks/services/use_find_or_create_services_conversation.js.map +1 -1
- package/build/hooks/services/use_services_team.d.ts +1 -1
- package/build/hooks/services/use_services_team.d.ts.map +1 -1
- package/build/hooks/services/use_services_team.js +1 -1
- package/build/hooks/services/use_services_team.js.map +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.d.ts +21 -21
- package/build/hooks/services/use_team_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.js +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.js.map +1 -1
- package/build/hooks/services/use_team_plans.d.ts +1 -1
- package/build/hooks/services/use_team_plans.js +2 -2
- package/build/hooks/services/use_team_plans.js.map +1 -1
- package/build/hooks/use_api.d.ts +2 -2
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_api_client.d.ts +1 -1
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js +3 -3
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_async_storage.js +1 -1
- package/build/hooks/use_async_storage.js.map +1 -1
- package/build/hooks/use_attachment_uploader.d.ts +1 -1
- package/build/hooks/use_attachment_uploader.d.ts.map +1 -1
- package/build/hooks/use_attachment_uploader.js +1 -1
- package/build/hooks/use_attachment_uploader.js.map +1 -1
- package/build/hooks/use_broadcast_typing_status.js +1 -1
- package/build/hooks/use_broadcast_typing_status.js.map +1 -1
- package/build/hooks/use_chat_permissions.d.ts +21 -21
- package/build/hooks/use_chat_permissions.d.ts.map +1 -1
- package/build/hooks/use_chat_permissions.js.map +1 -1
- package/build/hooks/use_conversation.d.ts +5 -5
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +4 -3
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +1 -1
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversation_membership.d.ts +1 -1
- package/build/hooks/use_conversation_membership.d.ts.map +1 -1
- package/build/hooks/use_conversation_membership.js +2 -2
- package/build/hooks/use_conversation_membership.js.map +1 -1
- package/build/hooks/use_conversation_message.d.ts +1 -1
- package/build/hooks/use_conversation_message.d.ts.map +1 -1
- package/build/hooks/use_conversation_message.js +1 -1
- package/build/hooks/use_conversation_message.js.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +3 -3
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +1 -1
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +8 -8
- package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
- package/build/hooks/use_conversations.d.ts +2 -2
- package/build/hooks/use_conversations.d.ts.map +1 -1
- package/build/hooks/use_conversations.js +1 -1
- package/build/hooks/use_conversations.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +19 -19
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.js +1 -1
- package/build/hooks/use_conversations_actions.js.map +1 -1
- package/build/hooks/use_conversations_cache.d.ts +2 -2
- package/build/hooks/use_conversations_cache.d.ts.map +1 -1
- package/build/hooks/use_conversations_cache.js +2 -2
- package/build/hooks/use_conversations_cache.js.map +1 -1
- package/build/hooks/use_conversations_jolt_events.js +2 -2
- package/build/hooks/use_conversations_jolt_events.js.map +1 -1
- package/build/hooks/use_create_android_ripple_color.js +1 -1
- package/build/hooks/use_create_android_ripple_color.js.map +1 -1
- package/build/hooks/use_current_person.d.ts +1 -1
- package/build/hooks/use_current_person.d.ts.map +1 -1
- package/build/hooks/use_current_person.js.map +1 -1
- package/build/hooks/use_features.d.ts +2 -2
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +2 -2
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_font_scale.js +1 -1
- package/build/hooks/use_font_scale.js.map +1 -1
- package/build/hooks/use_giphy.d.ts +1 -1
- package/build/hooks/use_giphy.d.ts.map +1 -1
- package/build/hooks/use_giphy.js +1 -1
- package/build/hooks/use_giphy.js.map +1 -1
- package/build/hooks/use_groups.d.ts +2 -2
- package/build/hooks/use_groups.d.ts.map +1 -1
- package/build/hooks/use_groups.js.map +1 -1
- package/build/hooks/use_groups_groups.d.ts +33 -33
- package/build/hooks/use_groups_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.js.map +1 -1
- package/build/hooks/use_interaction_ghost_color.js +1 -1
- package/build/hooks/use_interaction_ghost_color.js.map +1 -1
- package/build/hooks/use_jolt.js +2 -2
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_live_relative_time.d.ts +1 -1
- package/build/hooks/use_live_relative_time.d.ts.map +1 -1
- package/build/hooks/use_live_relative_time.js +2 -2
- package/build/hooks/use_live_relative_time.js.map +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_message_create_or_update.d.ts +2 -2
- package/build/hooks/use_message_create_or_update.d.ts.map +1 -1
- package/build/hooks/use_message_create_or_update.js +7 -7
- package/build/hooks/use_message_create_or_update.js.map +1 -1
- package/build/hooks/use_message_draft.d.ts +1 -1
- package/build/hooks/use_message_draft.d.ts.map +1 -1
- package/build/hooks/use_message_draft.js +1 -1
- package/build/hooks/use_message_draft.js.map +1 -1
- package/build/hooks/use_message_reaction_toggle.d.ts +2 -2
- package/build/hooks/use_message_reaction_toggle.d.ts.map +1 -1
- package/build/hooks/use_message_reaction_toggle.js +2 -2
- package/build/hooks/use_message_reaction_toggle.js.map +1 -1
- package/build/hooks/use_my_gender.js.map +1 -1
- package/build/hooks/use_organization.d.ts +5 -5
- package/build/hooks/use_organization.d.ts.map +1 -1
- package/build/hooks/use_organization.js.map +1 -1
- package/build/hooks/use_people_person.d.ts +1 -1
- package/build/hooks/use_people_person.d.ts.map +1 -1
- package/build/hooks/use_people_person.js.map +1 -1
- package/build/hooks/use_product_analytics.d.ts +1 -1
- package/build/hooks/use_product_analytics.d.ts.map +1 -1
- package/build/hooks/use_product_analytics.js +3 -3
- package/build/hooks/use_product_analytics.js.map +1 -1
- package/build/hooks/use_qualified_by_age.js +1 -1
- package/build/hooks/use_qualified_by_age.js.map +1 -1
- package/build/hooks/use_read_receipts.d.ts +2 -2
- package/build/hooks/use_read_receipts.d.ts.map +1 -1
- package/build/hooks/use_read_receipts.js.map +1 -1
- package/build/hooks/use_report_message.d.ts +1 -1
- package/build/hooks/use_report_message.d.ts.map +1 -1
- package/build/hooks/use_report_message.js +1 -1
- package/build/hooks/use_report_message.js.map +1 -1
- package/build/hooks/use_storage.d.ts +1 -1
- package/build/hooks/use_storage.d.ts.map +1 -1
- package/build/hooks/use_storage.js.map +1 -1
- package/build/hooks/use_submit_age_check.d.ts +1 -1
- package/build/hooks/use_submit_age_check.d.ts.map +1 -1
- package/build/hooks/use_submit_age_check.js +2 -2
- package/build/hooks/use_submit_age_check.js.map +1 -1
- package/build/hooks/use_suspense_api.d.ts +5 -5
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +2 -2
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/hooks/use_teams.d.ts +1 -1
- package/build/hooks/use_teams.d.ts.map +1 -1
- package/build/hooks/use_teams.js.map +1 -1
- package/build/hooks/use_theme.d.ts +1 -1
- package/build/hooks/use_theme.d.ts.map +1 -1
- package/build/hooks/use_theme.js +1 -1
- package/build/hooks/use_theme.js.map +1 -1
- package/build/hooks/use_typing_indicators.d.ts.map +1 -1
- package/build/hooks/use_typing_indicators.js +1 -1
- package/build/hooks/use_typing_indicators.js.map +1 -1
- package/build/hooks/use_typing_status_cache.d.ts +1 -1
- package/build/hooks/use_typing_status_cache.d.ts.map +1 -1
- package/build/hooks/use_typing_status_cache.js.map +1 -1
- package/build/hooks/use_upload_client.d.ts +1 -1
- package/build/hooks/use_upload_client.d.ts.map +1 -1
- package/build/hooks/use_upload_client.js +3 -3
- package/build/hooks/use_upload_client.js.map +1 -1
- package/build/navigation/chat_access_gate.js +7 -7
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +25 -25
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +28 -28
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.js +2 -2
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/Event.js +1 -1
- package/build/polyfills/events/Event.js.map +1 -1
- package/build/polyfills/events/EventTarget.js +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/polyfills/events/internals/EventInternals.d.ts +2 -2
- package/build/polyfills/events/internals/EventInternals.d.ts.map +1 -1
- package/build/polyfills/events/internals/EventInternals.js.map +1 -1
- package/build/polyfills/events/internals/EventTargetInternals.d.ts +2 -2
- package/build/polyfills/events/internals/EventTargetInternals.d.ts.map +1 -1
- package/build/polyfills/events/internals/EventTargetInternals.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +9 -9
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +4 -4
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +4 -4
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +4 -4
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +13 -13
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +5 -5
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +37 -9
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +4 -4
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +5 -5
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +6 -6
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +22 -22
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js +2 -2
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js.map +1 -1
- package/build/screens/conversation_filter_recipients/types.d.ts +2 -2
- package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/types.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +5 -5
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +4 -4
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +5 -5
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -2
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +2 -2
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +54 -54
- package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.js +3 -3
- package/build/screens/conversation_filters/hooks/filters.js.map +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_filters/screen_props.js.map +1 -1
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +1 -1
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.js +2 -2
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +8 -8
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +2 -2
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +3 -3
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +10 -10
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +10 -10
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +3 -3
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +5 -5
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +3 -3
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +21 -21
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -4
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -2
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +4 -4
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -2
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +3 -3
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +3 -3
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.js +2 -2
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +4 -4
- package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +9 -9
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +2 -2
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +3 -3
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.js +6 -6
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.js +4 -4
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.js +3 -3
- package/build/screens/group_notification_level_select_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.js +3 -3
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.js +10 -10
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +1 -1
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -2
- package/build/screens/message_report/components/message_preview.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
- package/build/screens/message_report/components/report_reason_list.js +5 -5
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +2 -2
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +8 -8
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +1 -1
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +7 -7
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/notification_settings/hooks/groups.js +4 -4
- package/build/screens/notification_settings/hooks/groups.js.map +1 -1
- package/build/screens/notification_settings_screen.js +4 -4
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts +5 -5
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts.map +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.js +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +7 -7
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.js +7 -7
- package/build/screens/reactions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.js +8 -8
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.js +3 -3
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/types/jolt_events/message_events.d.ts +1 -1
- package/build/types/jolt_events/message_events.d.ts.map +1 -1
- package/build/types/jolt_events/message_events.js.map +1 -1
- package/build/types/jolt_events/reaction_events.d.ts +1 -1
- package/build/types/jolt_events/reaction_events.d.ts.map +1 -1
- package/build/types/jolt_events/reaction_events.js.map +1 -1
- package/build/types/resources/app_grant.d.ts +1 -1
- package/build/types/resources/app_grant.d.ts.map +1 -1
- package/build/types/resources/app_grant.js.map +1 -1
- package/build/types/resources/conversation.d.ts +1 -0
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/types/resources/conversation_membership.d.ts +1 -1
- package/build/types/resources/conversation_membership.d.ts.map +1 -1
- package/build/types/resources/conversation_membership.js.map +1 -1
- package/build/types/resources/group_membership.d.ts +1 -1
- package/build/types/resources/group_membership.d.ts.map +1 -1
- package/build/types/resources/group_membership.js.map +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
- package/build/types/resources/groups/groups_group_resource.js.map +1 -1
- package/build/types/resources/organization.d.ts +1 -1
- package/build/types/resources/organization.d.ts.map +1 -1
- package/build/types/resources/organization.js.map +1 -1
- package/build/types/resources/person.d.ts +1 -1
- package/build/types/resources/person.d.ts.map +1 -1
- package/build/types/resources/person.js.map +1 -1
- package/build/types/resources/services/chat_resource.d.ts +1 -1
- package/build/types/resources/services/chat_resource.d.ts.map +1 -1
- package/build/types/resources/services/chat_resource.js.map +1 -1
- package/build/types/resources/services/team_resource.d.ts +1 -1
- package/build/types/resources/services/team_resource.d.ts.map +1 -1
- package/build/types/resources/services/team_resource.js.map +1 -1
- package/build/utils/cache/messages_cache.d.ts +3 -3
- package/build/utils/cache/messages_cache.d.ts.map +1 -1
- package/build/utils/cache/messages_cache.js +4 -4
- package/build/utils/cache/messages_cache.js.map +1 -1
- package/build/utils/cache/optimistically_create_message.d.ts +2 -2
- package/build/utils/cache/optimistically_create_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_create_message.js +4 -4
- package/build/utils/cache/optimistically_create_message.js.map +1 -1
- package/build/utils/cache/optimistically_update_message.d.ts +1 -1
- package/build/utils/cache/optimistically_update_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_update_message.js +2 -2
- package/build/utils/cache/optimistically_update_message.js.map +1 -1
- package/build/utils/cache/page_mutations.d.ts +5 -5
- package/build/utils/cache/page_mutations.d.ts.map +1 -1
- package/build/utils/cache/page_mutations.js.map +1 -1
- package/build/utils/client/client.d.ts +1 -1
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/client/transform_request_data.d.ts.map +1 -1
- package/build/utils/client/transform_request_data.js.map +1 -1
- package/build/utils/convert_attachments_for_create.d.ts +2 -2
- package/build/utils/convert_attachments_for_create.d.ts.map +1 -1
- package/build/utils/convert_attachments_for_create.js.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.d.ts +2 -2
- package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.js.map +1 -1
- package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts +2 -2
- package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts.map +1 -1
- package/build/utils/jolt/transform_message_event_data_to_message_resource.js +1 -1
- package/build/utils/jolt/transform_message_event_data_to_message_resource.js.map +1 -1
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts +3 -3
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts.map +1 -1
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.js.map +1 -1
- package/build/utils/native_adapters/configuration.d.ts +3 -3
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +5 -5
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/performance_tracking.d.ts +1 -1
- package/build/utils/performance_tracking.d.ts.map +1 -1
- package/build/utils/performance_tracking.js +1 -1
- package/build/utils/performance_tracking.js.map +1 -1
- package/build/utils/reaction_constants.d.ts +1 -1
- package/build/utils/reaction_constants.d.ts.map +1 -1
- package/build/utils/reaction_constants.js.map +1 -1
- package/build/utils/request/conversation.d.ts +2 -2
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/request/get_features.d.ts +1 -1
- package/build/utils/request/get_features.d.ts.map +1 -1
- package/build/utils/request/get_features.js +1 -1
- package/build/utils/request/get_features.js.map +1 -1
- package/build/utils/request/get_message.d.ts +1 -1
- package/build/utils/request/get_message.d.ts.map +1 -1
- package/build/utils/request/get_message.js +1 -1
- package/build/utils/request/get_message.js.map +1 -1
- package/build/utils/request/get_messages.d.ts +1 -1
- package/build/utils/request/get_messages.d.ts.map +1 -1
- package/build/utils/request/get_messages.js +1 -1
- package/build/utils/request/get_messages.js.map +1 -1
- package/build/utils/response_error.d.ts +1 -1
- package/build/utils/response_error.d.ts.map +1 -1
- package/build/utils/response_error.js.map +1 -1
- package/build/utils/session.d.ts +1 -1
- package/build/utils/session.d.ts.map +1 -1
- package/build/utils/session.js.map +1 -1
- package/build/utils/session_manager.d.ts +1 -1
- package/build/utils/session_manager.d.ts.map +1 -1
- package/build/utils/session_manager.js.map +1 -1
- package/build/utils/styles.js +1 -1
- package/build/utils/styles.js.map +1 -1
- package/build/utils/theme.d.ts +1 -1
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +2 -2
- package/build/utils/theme.js.map +1 -1
- package/package.json +3 -2
- package/src/__tests__/contexts/session_context.tsx +7 -7
- package/src/__tests__/event-polyfill.test.ts +3 -4
- package/src/__tests__/hooks/useTheme.tsx +3 -3
- package/src/__tests__/hooks/use_async_storage.test.tsx +3 -3
- package/src/__tests__/hooks/use_conversation_messages.ts +2 -2
- package/src/__tests__/hooks/use_font_scale.test.ts +1 -1
- package/src/__tests__/utils/cache/page_mutations.ts +1 -1
- package/src/__tests__/utils/client.ts +5 -5
- package/src/__tests__/utils/native_adapters/configuration.ts +4 -4
- package/src/__tests__/utils/parse_simple_markdown.ts +1 -1
- package/src/__tests__/utils/pluralize.tsx +1 -1
- package/src/__tests__/utils/session.ts +2 -2
- package/src/__tests__/utils/uri.ts +1 -1
- package/src/__utils__/handlers.ts +1 -1
- package/src/components/conversation/attachments/attachment_card.tsx +3 -3
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +2 -2
- package/src/components/conversation/attachments/audio_attachment.tsx +5 -5
- package/src/components/conversation/attachments/expanded_link.tsx +5 -5
- package/src/components/conversation/attachments/generic_file_attachment.tsx +6 -6
- package/src/components/conversation/attachments/giphy_attachment.tsx +6 -6
- package/src/components/conversation/attachments/image_attachment.tsx +9 -9
- package/src/components/conversation/attachments/video_attachment.tsx +7 -7
- package/src/components/conversation/empty_conversation_blank_state.tsx +1 -1
- package/src/components/conversation/jump_to_bottom_button.tsx +3 -3
- package/src/components/conversation/message.tsx +21 -21
- package/src/components/conversation/message_attachments.tsx +8 -8
- package/src/components/conversation/message_form/message_form_attachment_image.tsx +2 -2
- package/src/components/conversation/message_form/message_form_attachment_video.tsx +2 -2
- package/src/components/conversation/message_form.tsx +21 -23
- package/src/components/conversation/message_markdown.tsx +3 -3
- package/src/components/conversation/message_reaction.tsx +8 -8
- package/src/components/conversation/message_read_receipts.tsx +3 -3
- package/src/components/conversation/messages_disabled_banners.tsx +2 -2
- package/src/components/conversation/reply_connectors.tsx +3 -3
- package/src/components/conversation/reply_shadow_message.tsx +12 -12
- package/src/components/conversation/typing_indicator.tsx +3 -3
- package/src/components/conversations/conversation_actions.tsx +6 -9
- package/src/components/conversations/conversation_preview.tsx +5 -10
- package/src/components/conversations/conversations.tsx +6 -6
- package/src/components/conversations/mute_indicator.tsx +3 -3
- package/src/components/conversations/swipeable_toggle_button.tsx +5 -5
- package/src/components/conversations/unread_count_badge.tsx +3 -3
- package/src/components/display/action_button.tsx +5 -5
- package/src/components/display/avatar.tsx +2 -2
- package/src/components/display/avatar_group.tsx +2 -2
- package/src/components/display/badge.tsx +3 -3
- package/src/components/display/banner.tsx +2 -2
- package/src/components/display/banner_collapsible.tsx +1 -1
- package/src/components/display/button.tsx +3 -3
- package/src/components/display/child_notice.tsx +4 -4
- package/src/components/display/heading.tsx +3 -3
- package/src/components/display/icon.tsx +7 -8
- package/src/components/display/icon_button.tsx +2 -2
- package/src/components/display/image.tsx +1 -1
- package/src/components/display/image_attachment_preview.tsx +4 -4
- package/src/components/display/keyboard_view.tsx +1 -1
- package/src/components/display/person.tsx +3 -3
- package/src/components/display/platform_modal_header_buttons.tsx +4 -4
- package/src/components/display/pressable_row.tsx +1 -1
- package/src/components/display/spinner.tsx +1 -1
- package/src/components/display/switch.tsx +1 -1
- package/src/components/display/tabs.tsx +1 -1
- package/src/components/display/text.tsx +2 -2
- package/src/components/display/text_button.tsx +2 -2
- package/src/components/display/text_inline_button.tsx +3 -3
- package/src/components/display/toggle_button.tsx +5 -5
- package/src/components/display/utils/button_colors.ts +1 -1
- package/src/components/display/utils/status_colors.ts +1 -1
- package/src/components/display/video_attachment_preview.tsx +5 -5
- package/src/components/group_conversation_list.tsx +3 -3
- package/src/components/page/error_boundary.tsx +2 -2
- package/src/components/page/loading.tsx +1 -1
- package/src/components/primitive/avatar_primitive.tsx +5 -5
- package/src/components/primitive/banner_primitive.tsx +8 -8
- package/src/components/primitive/blank_state_primitive.tsx +2 -2
- package/src/components/primitive/form_sheet.tsx +4 -4
- package/src/components/safe_area_modal.tsx +1 -1
- package/src/contexts/api_provider.tsx +4 -4
- package/src/contexts/chat_context.tsx +7 -7
- package/src/contexts/conversations_context.tsx +4 -4
- package/src/contexts/session_context.tsx +9 -9
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +4 -4
- package/src/hooks/groups/use_groups_conversation_create.ts +3 -3
- package/src/hooks/services/use_find_or_create_services_conversation.ts +4 -4
- package/src/hooks/services/use_services_team.ts +2 -2
- package/src/hooks/services/use_team_members_for_new_conversation.ts +2 -2
- package/src/hooks/services/use_team_plans.ts +3 -3
- package/src/hooks/use_api.ts +2 -2
- package/src/hooks/use_api_client.ts +3 -3
- package/src/hooks/use_async_storage.ts +1 -1
- package/src/hooks/use_attachment_uploader.ts +3 -3
- package/src/hooks/use_broadcast_typing_status.ts +1 -1
- package/src/hooks/use_chat_permissions.ts +1 -1
- package/src/hooks/use_conversation.ts +5 -4
- package/src/hooks/use_conversation_jolt_events.ts +3 -3
- package/src/hooks/use_conversation_membership.ts +3 -3
- package/src/hooks/use_conversation_message.ts +2 -2
- package/src/hooks/use_conversation_messages.ts +2 -2
- package/src/hooks/use_conversation_messages_jolt_events.ts +14 -14
- package/src/hooks/use_conversations.ts +2 -2
- package/src/hooks/use_conversations_actions.ts +2 -2
- package/src/hooks/use_conversations_cache.ts +5 -5
- package/src/hooks/use_conversations_jolt_events.ts +4 -4
- package/src/hooks/use_create_android_ripple_color.ts +1 -1
- package/src/hooks/use_current_person.ts +2 -2
- package/src/hooks/use_features.ts +4 -4
- package/src/hooks/use_font_scale.ts +1 -1
- package/src/hooks/use_giphy.ts +2 -2
- package/src/hooks/use_groups.ts +2 -2
- package/src/hooks/use_groups_groups.ts +1 -1
- package/src/hooks/use_interaction_ghost_color.ts +1 -1
- package/src/hooks/use_jolt.ts +3 -3
- package/src/hooks/use_live_relative_time.ts +2 -2
- package/src/hooks/use_mark_latest_message_read.ts +1 -1
- package/src/hooks/use_message_create_or_update.ts +10 -10
- package/src/hooks/use_message_draft.ts +2 -2
- package/src/hooks/use_message_reaction_toggle.ts +4 -4
- package/src/hooks/use_my_gender.ts +1 -1
- package/src/hooks/use_organization.ts +2 -2
- package/src/hooks/use_people_person.ts +1 -1
- package/src/hooks/use_product_analytics.ts +5 -5
- package/src/hooks/use_qualified_by_age.ts +1 -1
- package/src/hooks/use_read_receipts.ts +1 -1
- package/src/hooks/use_report_message.ts +2 -2
- package/src/hooks/use_storage.ts +1 -1
- package/src/hooks/use_submit_age_check.ts +3 -3
- package/src/hooks/use_suspense_api.ts +5 -5
- package/src/hooks/use_teams.ts +1 -1
- package/src/hooks/use_theme.tsx +2 -2
- package/src/hooks/use_typing_indicators.ts +2 -2
- package/src/hooks/use_typing_status_cache.ts +1 -1
- package/src/hooks/use_upload_client.ts +3 -3
- package/src/navigation/chat_access_gate.tsx +7 -7
- package/src/navigation/index.tsx +34 -37
- package/src/navigation/screenLayout.tsx +2 -2
- package/src/polyfills/events/Event.ts +1 -1
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/polyfills/events/internals/EventInternals.ts +2 -2
- package/src/polyfills/events/internals/EventTargetInternals.ts +2 -2
- package/src/screens/age_check/age_check_required_screen.tsx +9 -9
- package/src/screens/age_check/age_check_underage_screen.tsx +4 -4
- package/src/screens/age_check/components/age_check_select_birthdate_modal.tsx +4 -4
- package/src/screens/attachment_actions/attachment_actions_screen.tsx +1 -1
- package/src/screens/attachment_actions/hooks/useDeleteAttachment.tsx +4 -4
- package/src/screens/bug_report_screen.tsx +18 -18
- package/src/screens/conversation/message_read_receipts_screen.tsx +6 -6
- package/src/screens/conversation_details_screen.tsx +47 -13
- package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +9 -5
- package/src/screens/conversation_filter_recipients/components/header_row.tsx +6 -6
- package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +6 -6
- package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx +5 -1
- package/src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts +6 -3
- package/src/screens/conversation_filter_recipients/types.tsx +2 -2
- package/src/screens/conversation_filters/components/conversation_filters.tsx +8 -5
- package/src/screens/conversation_filters/components/rows.tsx +9 -14
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +6 -3
- package/src/screens/conversation_filters/group_filters.tsx +4 -4
- package/src/screens/conversation_filters/hooks/filters.ts +5 -5
- package/src/screens/conversation_filters/screen_props.ts +1 -1
- package/src/screens/conversation_filters/team_filters.tsx +1 -1
- package/src/screens/conversation_filters_screen.tsx +2 -2
- package/src/screens/conversation_new/components/filter_by_plan.tsx +8 -8
- package/src/screens/conversation_new/components/form_list.tsx +3 -3
- package/src/screens/conversation_new/components/gender_filter_toggle.tsx +3 -3
- package/src/screens/conversation_new/components/groups_form.tsx +14 -14
- package/src/screens/conversation_new/components/services_form.tsx +12 -12
- package/src/screens/conversation_new/components/source_app_error_card.tsx +1 -1
- package/src/screens/conversation_new/conversation_new_screen.tsx +3 -3
- package/src/screens/conversation_notification_level_select_screen.tsx +6 -6
- package/src/screens/conversation_screen.tsx +23 -23
- package/src/screens/conversation_select_recipients/components/groups_recipient_row.tsx +2 -2
- package/src/screens/conversation_select_recipients/components/recipient_link_row.tsx +3 -3
- package/src/screens/conversation_select_recipients/components/restricted_group_row.tsx +4 -4
- package/src/screens/conversation_select_recipients/components/team_recipient_row.tsx +2 -2
- package/src/screens/conversation_select_recipients/components/view_more_link_row.tsx +1 -1
- package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -4
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +4 -4
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +8 -5
- package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -2
- package/src/screens/conversation_select_type_screen.tsx +5 -5
- package/src/screens/conversations/components/chat_group_badge.tsx +4 -4
- package/src/screens/conversations/components/list_header_action_button.tsx +4 -4
- package/src/screens/conversations/components/list_header_component.tsx +10 -10
- package/src/screens/conversations/conversations_screen.tsx +5 -5
- package/src/screens/design_system_screen.tsx +6 -6
- package/src/screens/get_help_screen.tsx +5 -5
- package/src/screens/group_notification_level_select_screen.tsx +3 -3
- package/src/screens/group_notification_settings_screen.tsx +4 -4
- package/src/screens/message_actions_screen.tsx +12 -12
- package/src/screens/message_report/components/message_preview.tsx +3 -3
- package/src/screens/message_report/components/report_reason_list.tsx +5 -8
- package/src/screens/message_report_screen.tsx +15 -15
- package/src/screens/not_found.tsx +1 -1
- package/src/screens/notification_settings/hooks/groups.ts +6 -6
- package/src/screens/notification_settings_screen.tsx +4 -4
- package/src/screens/preferred_app/hooks/use_chat_types.ts +2 -2
- package/src/screens/preferred_app_selection_screen.tsx +7 -7
- package/src/screens/reactions_screen.tsx +9 -9
- package/src/screens/send_giphy_screen.tsx +8 -8
- package/src/screens/team_conversation_screen.tsx +3 -3
- package/src/types/jolt_events/message_events.ts +1 -1
- package/src/types/jolt_events/reaction_events.ts +1 -1
- package/src/types/resources/app_grant.ts +1 -1
- package/src/types/resources/conversation.ts +1 -0
- package/src/types/resources/conversation_membership.ts +1 -1
- package/src/types/resources/group_membership.ts +1 -1
- package/src/types/resources/groups/groups_group_resource.ts +1 -1
- package/src/types/resources/organization.ts +1 -1
- package/src/types/resources/person.ts +1 -1
- package/src/types/resources/services/chat_resource.ts +1 -1
- package/src/types/resources/services/team_resource.ts +1 -1
- package/src/utils/__tests__/convert_attachments_for_create.test.ts +3 -3
- package/src/utils/__tests__/session_manager.test.ts +3 -3
- package/src/utils/__tests__/sha_256.test.ts +1 -1
- package/src/utils/cache/messages_cache.ts +6 -6
- package/src/utils/cache/optimistically_create_message.ts +7 -7
- package/src/utils/cache/optimistically_update_message.ts +3 -3
- package/src/utils/cache/page_mutations.ts +1 -1
- package/src/utils/client/client.ts +1 -2
- package/src/utils/client/transform_request_data.ts +1 -1
- package/src/utils/convert_attachments_for_create.ts +2 -2
- package/src/utils/destructure_chat_group_graph_id.ts +2 -2
- package/src/utils/jolt/transform_message_event_data_to_message_resource.ts +4 -4
- package/src/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.ts +3 -3
- package/src/utils/native_adapters/configuration.ts +5 -5
- package/src/utils/performance_tracking.ts +2 -2
- package/src/utils/reaction_constants.ts +1 -1
- package/src/utils/request/conversation.ts +2 -2
- package/src/utils/request/get_features.ts +1 -1
- package/src/utils/request/get_message.ts +1 -1
- package/src/utils/request/get_messages.ts +1 -1
- package/src/utils/response_error.ts +1 -1
- package/src/utils/session.ts +1 -1
- package/src/utils/session_manager.ts +1 -1
- package/src/utils/styles.ts +1 -1
- package/src/utils/theme.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_message_reaction_toggle.js","sourceRoot":"","sources":["../../src/hooks/use_message_reaction_toggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"use_message_reaction_toggle.js","sourceRoot":"","sources":["../../src/hooks/use_message_reaction_toggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAG/C,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAE1F,MAAM,KAAK,G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C,EACvC,KAAqC,EACrC,SAAiB,EACQ,EAAE;IAC3B,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAqC,CAAA;IACtF,MAAM,gBAAgB,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACrD,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAC1C,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,gBAAgB,CACvD,CAAA;IAED,MAAM,WAAW,GAA0B;QACzC,IAAI,EAAE,eAAe;QACrB,EAAE,EAAE,GAAG,SAAS,IAAI,KAAK,EAAE;QAC3B,KAAK;QACL,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;QACP,SAAS;QACT,SAAS,EAAE,EAAE;KACd,CAAA;IAED,OAAO,WAAW,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC,GAAG,cAAc,EAAE,WAAW,CAAC;QAClC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,WAAW,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;AAClG,CAAC,CAAA","sourcesContent":["import { InfiniteData, useMutation, useQueryClient } from '@tanstack/react-query'\nimport { useCallback } from 'react'\nimport { Alert } from 'react-native'\nimport { useApiClient } from './use_api_client'\nimport { ApiCollection, ApiResource, MessageResource } from '@/types'\nimport { ReactionCountResource } from '@/types/resources/reaction'\nimport { updateRecordInPagesData, REACTION_EMOJIS } from '@/utils'\nimport { getMessagesQueryKey, getMessagesRequestArgs } from '@/utils/request/get_messages'\n\nconst REACT = 1\nconst UNREACT = -1\n\ntype UseMessageReactionToggleProps = {\n conversation_id: number\n message: MessageResource\n onSuccess?: () => void\n}\n\ntype ToggleReactionParams = {\n value: ReactionCountResource['value']\n mine: boolean\n}\n\ntype QueryData = InfiniteData<ApiCollection<MessageResource>>\n\nexport function useMessageReactionToggle({\n conversation_id,\n message,\n onSuccess,\n}: UseMessageReactionToggleProps) {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n const queryKey = getMessagesQueryKey({ conversation_id })\n const message_id = message.id\n\n const toggleReaction = useCallback(\n ({ value, mine }: ToggleReactionParams) => {\n const requestParams = getMessagesRequestArgs({ conversation_id })\n\n // If already reacted, unreact; otherwise react\n const endpoint = mine ? 'unreact' : 'react'\n const url = `/me/conversations/${conversation_id}/messages/${message_id}/${endpoint}`\n const fieldsWithValueJoined = Object.fromEntries(\n Object.entries(requestParams.data.fields).map(([k, v]) => [k, v.join(',')])\n )\n\n return apiClient.chat.post<ApiResource<MessageResource>>({\n url,\n data: {\n ...requestParams.data,\n data: {\n type: 'Message',\n attributes: { value: value },\n },\n fields: fieldsWithValueJoined,\n },\n })\n },\n [apiClient, conversation_id, message_id]\n )\n\n const { mutate: handleReactionToggle, isPending } = useMutation({\n mutationFn: toggleReaction,\n onMutate: variables => {\n const previousData = queryClient.getQueryData<QueryData>(queryKey)\n if (previousData) {\n queryClient.setQueryData<QueryData>(queryKey, data =>\n optimisticUpdate({\n message,\n data,\n value: variables.value,\n mine: variables.mine,\n })\n )\n }\n return { previousData }\n },\n onSuccess: result => {\n const updatedMessage = result.data\n\n queryClient.setQueryData<QueryData>(queryKey, data =>\n updateRecordInPagesData({\n data,\n record: updatedMessage,\n })\n )\n\n if (onSuccess) {\n onSuccess()\n }\n },\n onError: (_data, _variables, context) => {\n if (context?.previousData) {\n queryClient.setQueryData<QueryData>(queryKey, context.previousData)\n }\n Alert.alert('Oops', 'We were unable to react to this message. Please try again.')\n },\n })\n\n return {\n handleReactionToggle,\n isPending,\n }\n}\n\nconst optimisticUpdate = ({\n message,\n data,\n value,\n mine,\n}: {\n message: MessageResource\n data: QueryData | undefined\n value: ReactionCountResource['value']\n mine: boolean\n}) => {\n if (!data) return data\n\n const hasExistingReaction = message.reactionCounts.some(r => r.value === value)\n\n let updatedReactionCounts: ReactionCountResource[]\n\n if (hasExistingReaction) {\n const delta = mine ? UNREACT : REACT\n updatedReactionCounts = updateCount(message.reactionCounts, value, delta)\n } else {\n updatedReactionCounts = createCount(message.reactionCounts, value, message.id)\n }\n\n const updatedMessage: MessageResource = {\n ...message,\n reactionCounts: updatedReactionCounts,\n }\n\n return updateRecordInPagesData({\n data,\n record: updatedMessage,\n })\n}\n\nconst updateCount = (\n reactionCounts: ReactionCountResource[],\n value: ReactionCountResource['value'],\n delta: typeof REACT | typeof UNREACT\n): ReactionCountResource[] => {\n return reactionCounts.map(reaction => {\n if (reaction.value === value) {\n return {\n ...reaction,\n mine: delta > 0 ? 1 : 0,\n count: reaction.count + delta,\n } as ReactionCountResource\n }\n return reaction\n })\n}\n\nconst createCount = (\n reactionCounts: ReactionCountResource[],\n value: ReactionCountResource['value'],\n messageId: string\n): ReactionCountResource[] => {\n const reactionOrder = Object.keys(REACTION_EMOJIS) as ReactionCountResource['value'][]\n const newReactionIndex = reactionOrder.indexOf(value)\n const insertIndex = reactionCounts.findIndex(\n r => reactionOrder.indexOf(r.value) > newReactionIndex\n )\n\n const newReaction: ReactionCountResource = {\n type: 'ReactionCount',\n id: `${messageId}/${value}`,\n value,\n count: 1,\n mine: 1,\n messageId,\n authorIds: [],\n }\n\n return insertIndex === -1\n ? [...reactionCounts, newReaction]\n : [...reactionCounts.slice(0, insertIndex), newReaction, ...reactionCounts.slice(insertIndex)]\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_my_gender.js","sourceRoot":"","sources":["../../src/hooks/use_my_gender.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_my_gender.js","sourceRoot":"","sources":["../../src/hooks/use_my_gender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAa/D,MAAM,UAAU,WAAW;IACzB,MAAM,EAAE,cAAc,EAAE,GAAG,WAAW,EAAE,CAAA;IACxC,MAAM,gBAAgB,GAAG,cAAc,CAAC,iBAAiB,CAAC,6BAA6B,CAAC,CAAA;IAExF,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,SAAS,CAAmB;QACvD,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,gBAAgB;QACzB,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC,QAAQ,CAAC;YACnB,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC,QAAQ,CAAC;gBAClB,MAAM,EAAE,CAAC,OAAO,CAAC;aAClB;SACF;QACD,GAAG,EAAE,QAAQ;KACd,CAAC,CAAA;IAEF,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,CAAA;IAC3B,MAAM,WAAW,GAAG,MAAM,EAAE,KAAK,IAAI,IAAI,CAAA;IACzC,MAAM,QAAQ,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAEtD,OAAO;QACL,gBAAgB;QAChB,WAAW;QACX,QAAQ;QACR,UAAU;KACX,CAAA;AACH,CAAC","sourcesContent":["import { useApiGet } from './use_api'\nimport { availableFeatures, useFeatures } from './use_features'\nimport { ResourceObject } from '@/types/api_primitives'\n\ninterface GenderResource extends ResourceObject {\n type: 'Gender'\n value: string\n}\n\ninterface PersonWithGender extends ResourceObject {\n type: 'Person'\n gender: GenderResource | undefined\n}\n\nexport function useMyGender() {\n const { featureEnabled } = useFeatures()\n const isFeatureEnabled = featureEnabled(availableFeatures.gender_specific_conversations)\n\n const { data, isFetching } = useApiGet<PersonWithGender>({\n url: '/me',\n enabled: isFeatureEnabled,\n data: {\n include: ['gender'],\n fields: {\n Person: ['gender'],\n Gender: ['value'],\n },\n },\n app: 'people',\n })\n\n const gender = data?.gender\n const genderValue = gender?.value ?? null\n const genderId = gender?.id ? String(gender.id) : null\n\n return {\n isFeatureEnabled,\n genderValue,\n genderId,\n isFetching,\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OrganizationResource } from '../types';
|
|
2
1
|
import { App } from './use_api_client';
|
|
2
|
+
import { OrganizationResource } from '@/types';
|
|
3
3
|
export declare const organizationRequestArgs: {
|
|
4
4
|
url: string;
|
|
5
5
|
data: {
|
|
@@ -10,18 +10,18 @@ export declare const organizationRequestArgs: {
|
|
|
10
10
|
app: App;
|
|
11
11
|
};
|
|
12
12
|
export declare function useOrganization(): {
|
|
13
|
-
error: import("
|
|
14
|
-
status: "success" | "error";
|
|
13
|
+
error: import("@/types").FailedResponse | null;
|
|
15
14
|
isError: boolean;
|
|
16
15
|
isPending: false;
|
|
17
16
|
isLoading: false;
|
|
18
17
|
isLoadingError: false;
|
|
19
18
|
isRefetchError: boolean;
|
|
20
19
|
isSuccess: boolean;
|
|
20
|
+
status: "error" | "success";
|
|
21
21
|
dataUpdatedAt: number;
|
|
22
22
|
errorUpdatedAt: number;
|
|
23
23
|
failureCount: number;
|
|
24
|
-
failureReason: import("
|
|
24
|
+
failureReason: import("@/types").FailedResponse | null;
|
|
25
25
|
errorUpdateCount: number;
|
|
26
26
|
isFetched: boolean;
|
|
27
27
|
isFetchedAfterMount: boolean;
|
|
@@ -30,7 +30,7 @@ export declare function useOrganization(): {
|
|
|
30
30
|
isPaused: boolean;
|
|
31
31
|
isRefetching: boolean;
|
|
32
32
|
isStale: boolean;
|
|
33
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("
|
|
33
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@/types").ApiResource<OrganizationResource>, import("@/types").FailedResponse>>;
|
|
34
34
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
35
35
|
data: OrganizationResource;
|
|
36
36
|
links: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_organization.d.ts","sourceRoot":"","sources":["../../src/hooks/use_organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use_organization.d.ts","sourceRoot":"","sources":["../../src/hooks/use_organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C,eAAO,MAAM,uBAAuB;;;;;;;SAOnB,GAAG;CACnB,CAAA;AAED,wBAAgB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_organization.js","sourceRoot":"","sources":["../../src/hooks/use_organization.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAGnD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,GAAG,EAAE,GAAG;IACR,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,YAAY,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,sBAAsB,CAAC;SAChE;KACF;IACD,GAAG,EAAE,MAAa;CACnB,CAAA;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,cAAc,CAAuB,uBAAuB,CAAC,CAAA;AACtE,CAAC","sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"use_organization.js","sourceRoot":"","sources":["../../src/hooks/use_organization.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAGnD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,GAAG,EAAE,GAAG;IACR,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,YAAY,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,sBAAsB,CAAC;SAChE;KACF;IACD,GAAG,EAAE,MAAa;CACnB,CAAA;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,cAAc,CAAuB,uBAAuB,CAAC,CAAA;AACtE,CAAC","sourcesContent":["import { App } from './use_api_client'\nimport { useSuspenseGet } from './use_suspense_api'\nimport { OrganizationResource } from '@/types'\n\nexport const organizationRequestArgs = {\n url: '/',\n data: {\n fields: {\n Organization: ['contact_email', 'name', 'contact_phone_number'],\n },\n },\n app: 'chat' as App,\n}\n\nexport function useOrganization() {\n return useSuspenseGet<OrganizationResource>(organizationRequestArgs)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_people_person.d.ts","sourceRoot":"","sources":["../../src/hooks/use_people_person.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_people_person.d.ts","sourceRoot":"","sources":["../../src/hooks/use_people_person.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,KAAK,aAAa,GAAG,cAAc,GAAG;IACpC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,UAAU,YAAa,SAAQ,cAAc;IAC3C,IAAI,EAAE,QAAQ,CAAA;IACd,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,aAAa,EAAE,CAAA;CACxB;AAED,eAAO,MAAM,eAAe,YAAa;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,6BAetD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_people_person.js","sourceRoot":"","sources":["../../src/hooks/use_people_person.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_people_person.js","sourceRoot":"","sources":["../../src/hooks/use_people_person.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAiBrC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAuB,EAAE,EAAE;IACzD,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,SAAS,CAAe;QACrD,GAAG,EAAE,WAAW,MAAM,EAAE,EAAE,EAAE;QAC5B,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QAC5B,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC,QAAQ,CAAC;YACnB,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC;gBAC1C,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;aAC9B;SACF;QACD,GAAG,EAAE,QAAQ;KACd,CAAC,CAAA;IAEF,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA","sourcesContent":["import { useApiGet } from './use_api'\nimport { ResourceObject } from '@/types/api_primitives'\n\ntype EmailResource = ResourceObject & {\n type: 'Email'\n primary: boolean\n address: string\n}\n\ninterface PeoplePerson extends ResourceObject {\n type: 'Person'\n id: number\n name: string\n avatar: string\n emails: EmailResource[]\n}\n\nexport const usePeoplePerson = (person?: { id: number }) => {\n const { data: peoplePerson } = useApiGet<PeoplePerson>({\n url: `/people/${person?.id}`,\n enabled: Boolean(person?.id),\n data: {\n include: ['emails'],\n fields: {\n Person: ['id', 'name', 'avatar', 'emails'],\n Email: ['address', 'primary'],\n },\n },\n app: 'people',\n })\n\n return peoplePerson\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_product_analytics.d.ts","sourceRoot":"","sources":["../../src/hooks/use_product_analytics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_product_analytics.d.ts","sourceRoot":"","sources":["../../src/hooks/use_product_analytics.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAIhF,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAC5D;AAgFD,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,GAAE,aAAkB,QAW1F;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE;IACnD,iBAAiB,CAAC,EAAE,yBAAyB,CAAA;CAC9C,GACwE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC/F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useChatContext } from '@/contexts/chat_context';
|
|
3
|
+
import { keysToSnakeCase } from '@/utils/client/utils';
|
|
4
|
+
import { SHA256, enc } from '@/utils/sha_256';
|
|
5
5
|
function contentSha256(payload) {
|
|
6
6
|
return SHA256(payload).toString(enc.Hex);
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_product_analytics.js","sourceRoot":"","sources":["../../src/hooks/use_product_analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use_product_analytics.js","sourceRoot":"","sources":["../../src/hooks/use_product_analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAW7C,SAAS,aAAa,CAAC,OAAe;IACpC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ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CAAC,CAAA;IAE1C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,oBAAoB,CAAC,OAAO;YAAE,OAAM;QAExC,oBAAoB,CAAC,OAAO,GAAG,IAAI,CAAA;QAEnC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IAC/B,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAA;AACrC,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,QAE1C;IACC,OAAO,eAAe,CAAC,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,IAAI,EAAE,CAA4B,CAAA;AAChG,CAAC","sourcesContent":["import { useCallback, useEffect, useMemo, useRef } from 'react'\nimport { useChatContext } from '@/contexts/chat_context'\nimport { ProductAnalyticsConfig } from '@/types/product_analytics'\nimport { AnalyticsMetadataResource } from '@/types/resources/analytics_metadata'\nimport { keysToSnakeCase } from '@/utils/client/utils'\nimport { SHA256, enc } from '@/utils/sha_256'\n\nexport interface EventMetadata {\n [key: string]: string | number | boolean | null | undefined\n}\n\ninterface AnalyticsEvent {\n name: string\n meta: EventMetadata\n}\n\nfunction contentSha256(payload: string): string {\n return SHA256(payload).toString(enc.Hex)\n}\n\nfunction sendEvents(events: AnalyticsEvent[], config: ProductAnalyticsConfig): Promise<Response[]> {\n // Split into chunks of 10 and make parallel requests\n const chunks: AnalyticsEvent[][] = []\n for (let i = 0; i < events.length; i += 10) {\n chunks.push(events.slice(i, i + 10))\n }\n\n return Promise.all(\n chunks.map(async chunk => {\n const payload = JSON.stringify({ events: chunk })\n return fetch(config.endpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8',\n 'X-Authorization': `Bearer ${config.token}`,\n 'X-Amz-Content-Sha256': contentSha256(payload),\n },\n body: payload,\n })\n })\n )\n}\n\nconst useProductAnalytics = () => {\n const { productAnalyticsConfig } = useChatContext()\n\n const snakeCasedBaseMeta = useMemo(\n () => keysToSnakeCase(productAnalyticsConfig?.metadata || {}),\n [productAnalyticsConfig?.metadata]\n )\n\n const publishEvent = useCallback(\n (name: string, meta: EventMetadata = {}): Promise<Response[]> => {\n if (!productAnalyticsConfig) {\n if (__DEV__) {\n console.warn('Product Analytics not available')\n }\n return Promise.resolve([])\n }\n\n const mergedMeta = { ...snakeCasedBaseMeta, ...meta } as EventMetadata\n\n return sendEvents([{ name, meta: mergedMeta }], productAnalyticsConfig)\n },\n [productAnalyticsConfig, snakeCasedBaseMeta]\n )\n\n const publishEvents = useCallback(\n (events: Array<{ name: string; meta?: EventMetadata }>): Promise<Response[]> => {\n if (!productAnalyticsConfig) {\n if (__DEV__) {\n console.warn('Product Analytics not available')\n }\n return Promise.resolve([])\n }\n\n const eventsWithMeta = events.map(event => ({\n name: event.name,\n meta: { ...snakeCasedBaseMeta, ...event.meta } as EventMetadata,\n }))\n\n return sendEvents(eventsWithMeta, productAnalyticsConfig)\n },\n [productAnalyticsConfig, snakeCasedBaseMeta]\n )\n\n return { publishEvent, publishEvents }\n}\n\nexport function usePublishProductAnalyticsEvent(eventName: string, meta: EventMetadata = {}) {\n const { publishEvent } = useProductAnalytics()\n const hasPublishedEventRef = useRef(false)\n\n useEffect(() => {\n if (hasPublishedEventRef.current) return\n\n hasPublishedEventRef.current = true\n\n publishEvent(eventName, meta)\n }, [eventName, meta, publishEvent])\n}\n\nexport function normalizeAnalyticsMetadata(resource: {\n analyticsMetadata?: AnalyticsMetadataResource\n}) {\n return keysToSnakeCase(resource?.analyticsMetadata?.metadata || {}) as Record<string, unknown>\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AgeQualificationStatus } from '../types';
|
|
2
1
|
import { useApiGet } from './use_api';
|
|
3
2
|
import { currentPersonRequestArgs } from './use_current_person';
|
|
3
|
+
import { AgeQualificationStatus } from '@/types';
|
|
4
4
|
export const useQualifiedByAge = () => {
|
|
5
5
|
const { data: person, isFetched } = useApiGet(currentPersonRequestArgs);
|
|
6
6
|
if (!isFetched) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_qualified_by_age.js","sourceRoot":"","sources":["../../src/hooks/use_qualified_by_age.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use_qualified_by_age.js","sourceRoot":"","sources":["../../src/hooks/use_qualified_by_age.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,sBAAsB,EAAyB,MAAM,SAAS,CAAA;AAEvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAY,EAAE;IAC7C,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,CAAwB,wBAAwB,CAAC,CAAA;IAE9F,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,KAAK,CAAA;IACd,CAAC;IAED,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,MAAM,CAAC,sBAAsB,KAAK,sBAAsB,CAAC,SAAS,CAAA;AAC3E,CAAC,CAAA","sourcesContent":["import { useApiGet } from './use_api'\nimport { currentPersonRequestArgs } from './use_current_person'\nimport { AgeQualificationStatus, CurrentPersonResource } from '@/types'\n\nexport const useQualifiedByAge = (): boolean => {\n const { data: person, isFetched } = useApiGet<CurrentPersonResource>(currentPersonRequestArgs)\n\n if (!isFetched) {\n return false\n }\n\n if (!person) {\n return false\n }\n\n return person.ageQualificationStatus === AgeQualificationStatus.QUALIFIED\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReadReceiptResource } from '
|
|
1
|
+
import { ReadReceiptResource } from '@/types/resources/read_receipt';
|
|
2
2
|
export declare function useReadReceipts({ conversation_id, message_id, }: {
|
|
3
3
|
conversation_id: number;
|
|
4
4
|
message_id: string;
|
|
@@ -6,13 +6,13 @@ export declare function useReadReceipts({ conversation_id, message_id, }: {
|
|
|
6
6
|
data: ReadReceiptResource[];
|
|
7
7
|
totalCount: number;
|
|
8
8
|
error: Response | null;
|
|
9
|
-
status: "success" | "error";
|
|
10
9
|
isError: boolean;
|
|
11
10
|
isPending: false;
|
|
12
11
|
isLoading: false;
|
|
13
12
|
isLoadingError: false;
|
|
14
13
|
isRefetchError: boolean;
|
|
15
14
|
isSuccess: boolean;
|
|
15
|
+
status: "error" | "success";
|
|
16
16
|
dataUpdatedAt: number;
|
|
17
17
|
errorUpdatedAt: number;
|
|
18
18
|
failureCount: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_read_receipts.d.ts","sourceRoot":"","sources":["../../src/hooks/use_read_receipts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_read_receipts.d.ts","sourceRoot":"","sources":["../../src/hooks/use_read_receipts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAEpE,wBAAgB,eAAe,CAAC,EAC9B,eAAe,EACf,UAAU,GACX,EAAE;IACD,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_read_receipts.js","sourceRoot":"","sources":["../../src/hooks/use_read_receipts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_read_receipts.js","sourceRoot":"","sources":["../../src/hooks/use_read_receipts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAGzD,MAAM,UAAU,eAAe,CAAC,EAC9B,eAAe,EACf,UAAU,GAIX;IACC,OAAO,oBAAoB,CACzB;QACE,GAAG,EAAE,qBAAqB,eAAe,aAAa,UAAU,gBAAgB;QAChF,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,WAAW,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;aAChC;SACF;KACF,EACD;QACE,SAAS,EAAE,CAAC;QACZ,MAAM,EAAE,CAAC;KACV,CACF,CAAA;AACH,CAAC","sourcesContent":["import { useSuspensePaginator } from './use_suspense_api'\nimport { ReadReceiptResource } from '@/types/resources/read_receipt'\n\nexport function useReadReceipts({\n conversation_id,\n message_id,\n}: {\n conversation_id: number\n message_id: string\n}) {\n return useSuspensePaginator<ReadReceiptResource>(\n {\n url: `/me/conversations/${conversation_id}/messages/${message_id}/read_receipts`,\n data: {\n fields: {\n ReadReceipt: ['name', 'avatar'],\n },\n },\n },\n {\n staleTime: 0,\n gcTime: 0,\n }\n )\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MessageReportReason } from '
|
|
1
|
+
import { MessageReportReason } from '@/types/resources/message_report';
|
|
2
2
|
export declare const useReportMessage: (conversationId: number, messageId: string) => import("@tanstack/react-query").UseMutationResult<import("..").ApiCollection | import("..").ApiResource, Error, {
|
|
3
3
|
reason: MessageReportReason;
|
|
4
4
|
reasonDetail?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_report_message.d.ts","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_report_message.d.ts","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,kCAAkC,CAAA;AAG5F,eAAO,MAAM,gBAAgB,mBAAoB,MAAM,aAAa,MAAM;YAQ5D,mBAAmB;mBACZ,MAAM;WAsB1B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
2
|
import { useApiClient } from './use_api_client';
|
|
3
|
-
import { Haptic } from '
|
|
3
|
+
import { Haptic } from '@/utils/native_adapters';
|
|
4
4
|
export const useReportMessage = (conversationId, messageId) => {
|
|
5
5
|
const apiClient = useApiClient();
|
|
6
6
|
return useMutation({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_report_message.js","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"use_report_message.js","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,cAAsB,EAAE,SAAiB,EAAE,EAAE;IAC5E,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,OAAO,WAAW,CAAC;QACjB,UAAU,EAAE,KAAK,EAAE,EACjB,MAAM,EACN,YAAY,GAIb,EAAE,EAAE;YACH,MAAM,GAAG,GAAG,qBAAqB,cAAc,aAAa,SAAS,SAAS,CAAA;YAC9E,MAAM,IAAI,GAAyB;gBACjC,IAAI,EAAE;oBACJ,IAAI,EAAE,eAAe;oBACrB,UAAU,EAAE;wBACV,MAAM;wBACN,GAAG,CAAC,YAAY,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;qBACrD;iBACF;aACF,CAAA;YAED,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;QAC3C,CAAC;QACD,SAAS,EAAE,GAAG,EAAE;YACd,MAAM,CAAC,mBAAmB,EAAE,CAAA;QAC9B,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,iBAAiB,EAAE,CAAA;QAC5B,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useMutation } from '@tanstack/react-query'\nimport { useApiClient } from './use_api_client'\nimport { MessageReportReason, MessageReportPayload } from '@/types/resources/message_report'\nimport { Haptic } from '@/utils/native_adapters'\n\nexport const useReportMessage = (conversationId: number, messageId: string) => {\n const apiClient = useApiClient()\n\n return useMutation({\n mutationFn: async ({\n reason,\n reasonDetail,\n }: {\n reason: MessageReportReason\n reasonDetail?: string\n }) => {\n const url = `/me/conversations/${conversationId}/messages/${messageId}/report`\n const data: MessageReportPayload = {\n data: {\n type: 'MessageReport',\n attributes: {\n reason,\n ...(reasonDetail && { reason_detail: reasonDetail }),\n },\n },\n }\n\n return apiClient.chat.post({ url, data })\n },\n onSuccess: () => {\n Haptic.notificationSuccess()\n },\n onError: () => {\n Haptic.notificationError()\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_storage.d.ts","sourceRoot":"","sources":["../../src/hooks/use_storage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use_storage.d.ts","sourceRoot":"","sources":["../../src/hooks/use_storage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,KAAK,QAAQ,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;AAE5E;;;GAGG;AACH,wBAAgB,UAAU,CAAC,UAAU,EACnC,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,UAAU,EACxB,YAAY,GAAE,OAAe,GAC5B,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAkDpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_storage.js","sourceRoot":"","sources":["../../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OAAO,EAAE,CAAA;YACX,CAAC,CAAC;iBACD,KAAK,CAAC,IAAI,CAAC,CAAA;QAChB,CAAC;QAED,OAAO,OAAO;aACX,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;aACvC,IAAI,CAAC,GAAG,EAAE;YACT,OAAO,EAAE,CAAA;QACX,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,CAAC,EAAE;YACT,IAAI,CAAC,YAAY;gBAAE,OAAM;YAEzB,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAC1B,CAAC,CAAC,CAAA;IACN,CAAC,EACD,CAAC,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CACtC,CAAA;IAED,OAAO,CAAC,KAAK,IAAI,YAAY,EAAE,QAAQ,CAAC,CAAA;AAC1C,CAAC","sourcesContent":["import { useSuspenseQuery } from '@tanstack/react-query'\nimport { noop } from 'lodash'\nimport { useCallback } from 'react'\nimport { StorageAdapter } from '
|
|
1
|
+
{"version":3,"file":"use_storage.js","sourceRoot":"","sources":["../../src/hooks/use_storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAGnC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,mBAAmB,GAAG,EAAE,CAAC,CAAA;AAIrE;;;GAGG;AACH,MAAM,UAAU,UAAU,CACxB,OAAuB,EACvB,GAAW,EACX,YAAwB,EACxB,eAAwB,KAAK;IAE7B,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAA;IAEvC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAa;QAC5D,QAAQ,EAAE,QAAQ;QACl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,CAAC","sourcesContent":["import { useSuspenseQuery } from '@tanstack/react-query'\nimport { noop } from 'lodash'\nimport { useCallback } from 'react'\nimport { StorageAdapter } from '@/utils/native_adapters'\n\nconst cacheKeyGenerator = (key: string) => [`StorageResource:${key}`]\n\ntype SetValue<TCacheData> = (_itemValue?: TCacheData | null) => Promise<any>\n\n/**\n * Hook for using a storage adapter with React Query caching.\n * Similar to useAsyncStorage but accepts a StorageAdapter instead of using AsyncStorage directly.\n */\nexport function useStorage<TCacheData>(\n storage: StorageAdapter,\n key: string,\n initialValue: TCacheData,\n throwOnError: boolean = false\n): [TCacheData, SetValue<TCacheData>] {\n const cacheKey = cacheKeyGenerator(key)\n\n const { data: value, refetch } = useSuspenseQuery<TCacheData>({\n queryKey: cacheKey,\n queryFn: () =>\n storage\n .getItem(key)\n .then(storedValue => {\n if (!storedValue) return initialValue\n\n try {\n return JSON.parse(storedValue) as TCacheData\n } catch {\n return storedValue as TCacheData\n }\n })\n .catch(e => {\n if (!throwOnError) return initialValue\n\n return Promise.reject(e)\n }),\n })\n\n const setValue: SetValue<TCacheData> = useCallback(\n itemValue => {\n if (itemValue === null || itemValue === undefined) {\n return storage\n .removeItem(key)\n .then(() => {\n refetch()\n })\n .catch(noop)\n }\n\n return storage\n .setItem(key, JSON.stringify(itemValue))\n .then(() => {\n refetch()\n })\n .catch(e => {\n if (!throwOnError) return\n\n return Promise.reject(e)\n })\n },\n [throwOnError, key, refetch, storage]\n )\n\n return [value || initialValue, setValue]\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_submit_age_check.d.ts","sourceRoot":"","sources":["../../src/hooks/use_submit_age_check.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use_submit_age_check.d.ts","sourceRoot":"","sources":["../../src/hooks/use_submit_age_check.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGpD,UAAU,gBAAgB;IACxB,IAAI,EAAE,UAAU,CAAA;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC5B;AAED,wBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiChC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Alert } from 'react-native';
|
|
2
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { Alert } from 'react-native';
|
|
3
3
|
import { useApiClient } from './use_api_client';
|
|
4
4
|
import { currentPersonQueryKey } from './use_current_person';
|
|
5
|
-
import { Haptic } from '
|
|
5
|
+
import { Haptic } from '@/utils/native_adapters';
|
|
6
6
|
export function useSubmitAgeCheck() {
|
|
7
7
|
const apiClient = useApiClient();
|
|
8
8
|
const queryClient = useQueryClient();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_submit_age_check.js","sourceRoot":"","sources":["../../src/hooks/use_submit_age_check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use_submit_age_check.js","sourceRoot":"","sources":["../../src/hooks/use_submit_age_check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAShD,MAAM,UAAU,iBAAiB;IAC/B,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,WAAW,GAAG,cAAc,EAAE,CAAA;IAEpC,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,QAAQ,EAAE,GAAG,WAAW,CAAC;QAC/D,WAAW,EAAE,CAAC,gBAAgB,CAAC;QAC/B,UAAU,EAAE,CAAC,IAAU,EAAE,EAAE,CACzB,SAAS,CAAC,MAAM,CAAC,IAAI,CAAgC;YACnD,GAAG,EAAE,gBAAgB;YACrB,IAAI,EAAE;gBACJ,MAAM,EAAE,EAAE,QAAQ,EAAE,oBAAoB,EAAE;gBAC1C,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,UAAU,EAAE;wBACV,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;qBAChC;iBACF;aACF;SACF,CAAC;QACJ,SAAS,EAAE,CAAC,QAAuC,EAAE,EAAE;YACrD,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,qBAAqB,EAAE,CAAC,CAAA;YAClE,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;gBACtC,MAAM,CAAC,mBAAmB,EAAE,CAAA;gBAC5B,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAAE,kCAAkC,CAAC,CAAA;YACpE,CAAC;QACH,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,iBAAiB,EAAE,CAAA;YAC1B,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,4DAA4D,CAAC,CAAA;QACnF,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,EAAE,cAAc,EAAE,GAAG,QAAQ,EAAE,CAAA;AACxC,CAAC","sourcesContent":["import { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { Alert } from 'react-native'\nimport { useApiClient } from './use_api_client'\nimport { currentPersonQueryKey } from './use_current_person'\nimport { ApiResource } from '@/types/api_primitives'\nimport { Haptic } from '@/utils/native_adapters'\n\ninterface AgeCheckResource {\n type: 'AgeCheck'\n id: string\n stated_date: string\n status: 'passed' | 'failed'\n}\n\nexport function useSubmitAgeCheck() {\n const apiClient = useApiClient()\n const queryClient = useQueryClient()\n\n const { mutateAsync: submitAgeCheck, ...mutation } = useMutation({\n mutationKey: ['submitAgeCheck'],\n mutationFn: (date: Date) =>\n apiClient.people.post<ApiResource<AgeCheckResource>>({\n url: '/me/age_checks',\n data: {\n fields: { AgeCheck: 'stated_date,status' },\n data: {\n type: 'AgeCheck',\n attributes: {\n stated_date: date.toISOString(),\n },\n },\n },\n }),\n onSuccess: (response: ApiResource<AgeCheckResource>) => {\n queryClient.invalidateQueries({ queryKey: currentPersonQueryKey })\n if (response.data.status === 'passed') {\n Haptic.notificationSuccess()\n Alert.alert('Profile updated', `Your birthdate has been updated.`)\n }\n },\n onError: () => {\n Haptic.notificationError()\n Alert.alert('Oops', `We were unable to update your birthdate. Please try again.`)\n },\n })\n\n return { submitAgeCheck, ...mutation }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AnyUseSuspenseInfiniteQueryOptions, InfiniteData, UseSuspenseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { ApiCollection, ApiResource, ResourceObject } from '../types';
|
|
3
|
-
import { GetRequest } from '../utils/client';
|
|
4
2
|
import { App } from './use_api_client';
|
|
5
|
-
import {
|
|
3
|
+
import { ApiCollection, ApiResource, ResourceObject } from '@/types';
|
|
4
|
+
import { FailedResponse } from '@/types/api_primitives';
|
|
5
|
+
import { GetRequest } from '@/utils/client';
|
|
6
6
|
interface SuspenseGetOptions extends GetRequest {
|
|
7
7
|
app?: App;
|
|
8
8
|
reply_root_id?: string | null;
|
|
@@ -10,13 +10,13 @@ interface SuspenseGetOptions extends GetRequest {
|
|
|
10
10
|
export type SuspenseGetQueryOptions<T extends ResourceObject | ResourceObject[]> = Omit<UseSuspenseQueryOptions<ApiResource<T>, FailedResponse>, 'queryKey' | 'queryFn'>;
|
|
11
11
|
export declare const useSuspenseGet: <T extends ResourceObject | ResourceObject[]>(args: SuspenseGetOptions, options?: SuspenseGetQueryOptions<T>) => {
|
|
12
12
|
error: FailedResponse | null;
|
|
13
|
-
status: "success" | "error";
|
|
14
13
|
isError: boolean;
|
|
15
14
|
isPending: false;
|
|
16
15
|
isLoading: false;
|
|
17
16
|
isLoadingError: false;
|
|
18
17
|
isRefetchError: boolean;
|
|
19
18
|
isSuccess: boolean;
|
|
19
|
+
status: "error" | "success";
|
|
20
20
|
dataUpdatedAt: number;
|
|
21
21
|
errorUpdatedAt: number;
|
|
22
22
|
failureCount: number;
|
|
@@ -40,13 +40,13 @@ export declare const useSuspensePaginator: <T extends ResourceObject>(args: Susp
|
|
|
40
40
|
data: T[];
|
|
41
41
|
totalCount: number;
|
|
42
42
|
error: Response | null;
|
|
43
|
-
status: "success" | "error";
|
|
44
43
|
isError: boolean;
|
|
45
44
|
isPending: false;
|
|
46
45
|
isLoading: false;
|
|
47
46
|
isLoadingError: false;
|
|
48
47
|
isRefetchError: boolean;
|
|
49
48
|
isSuccess: boolean;
|
|
49
|
+
status: "error" | "success";
|
|
50
50
|
dataUpdatedAt: number;
|
|
51
51
|
errorUpdatedAt: number;
|
|
52
52
|
failureCount: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_suspense_api.d.ts","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,YAAY,EAGZ,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"use_suspense_api.d.ts","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,YAAY,EAGZ,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAgB,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,OAAO,EAAE,UAAU,EAAe,MAAM,gBAAgB,CAAA;AAGxD,UAAU,kBAAmB,SAAQ,UAAU;IAC7C,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,IAAI,IAAI,CACrF,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,EACvD,UAAU,GAAG,SAAS,CACvB,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,cAAc,GAAG,cAAc,EAAE,QAClE,kBAAkB,YACd,uBAAuB,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBrC,CAAA;AAOD,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,kCAAkC,EAClC,kBAAkB,GAAG,kBAAkB,GAAG,SAAS,GAAG,UAAU,CACjE,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,cAAc,QACrD,kBAAkB,SACjB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ChC,CAAA;AAUD,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,CAAC,KAAK,CAAC;IACzB,kBAAkB,CAAC,MAAM,CAAC;IAC1B,kBAAkB,CAAC,SAAS,CAAC;IAC7B,kBAAkB,CAAC,KAAK,CAAC;IACzB,kBAAkB,CAAC,eAAe,CAAC;CACpC,CAAA;AACD,eAAO,MAAM,kBAAkB,SAAU,kBAAkB,KAAG,eAM7D,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSuspenseInfiniteQuery, useSuspenseQuery, } from '@tanstack/react-query';
|
|
2
2
|
import { useApiClient } from './use_api_client';
|
|
3
|
-
import { Log } from '
|
|
4
|
-
import { ResponseError } from '
|
|
3
|
+
import { Log } from '@/utils';
|
|
4
|
+
import { ResponseError } from '@/utils/response_error';
|
|
5
5
|
export const useSuspenseGet = (args, options) => {
|
|
6
6
|
const apiClient = useApiClient();
|
|
7
7
|
const { data, ...query } = useSuspenseQuery({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_suspense_api.js","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,gBAAgB,GAEjB,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"use_suspense_api.js","sourceRoot":"","sources":["../../src/hooks/use_suspense_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,wBAAwB,EACxB,gBAAgB,GAEjB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAO,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAGpD,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAE7B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAYtD,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,IAAwB,EACxB,OAAoC,EACpC,EAAE;IAEF,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,gBAAgB,CAA2B;QACpE,QAAQ,EAAE,kBAAkB,CAAC,IAAI,CAAC;QAClC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxB,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,GAAG,MAAM,CAAC,GAAG,QAA2B,CAAA;YACnE,OAAO,SAAS,CAAC,GAAG,CAAC;iBAClB,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC;iBAC9B,KAAK,CAAC,kBAAkB,CAAsB,CAAA;QACnD,CAAC;QACD,GAAG,OAAO;KACX,CAAC,CAAA;IA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AAI,IAAI;gBAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAA;YAC3C,IAAI,MAAM;gBAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAA;YAE7C,OAAO,SAAS,CAAA;QAClB,CAAC;QACD,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;KAChB,CAAC,CAAA;IAEF,MAAM,IAAI,GAAQ,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;IACpE,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,IAAI,IAAI,CAAC,MAAM,CAAA;IAExE,OAAO,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;AACvC,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAE,EAAE;IAC5C,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,aAAa,CAAC,KAAuB,CAAC,CAAA;IAClD,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC,CAAA;AASD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAwB,EAAmB,EAAE,CAAC;IAC/E,IAAI,CAAC,GAAG;IACR,IAAI,CAAC,IAAI;IACT,IAAI,CAAC,OAAO;IACZ,IAAI,CAAC,GAAG,IAAI,MAAM;IAClB,IAAI,CAAC,aAAa;CACnB,CAAA","sourcesContent":["import {\n AnyUseSuspenseInfiniteQueryOptions,\n InfiniteData,\n useSuspenseInfiniteQuery,\n useSuspenseQuery,\n UseSuspenseQueryOptions,\n} from '@tanstack/react-query'\nimport { App, useApiClient } from './use_api_client'\nimport { ApiCollection, ApiResource, ResourceObject } from '@/types'\nimport { FailedResponse } from '@/types/api_primitives'\nimport { Log } from '@/utils'\nimport { GetRequest, RequestData } from '@/utils/client'\nimport { ResponseError } from '@/utils/response_error'\n\ninterface SuspenseGetOptions extends GetRequest {\n app?: App\n reply_root_id?: string | null\n}\n\nexport type SuspenseGetQueryOptions<T extends ResourceObject | ResourceObject[]> = Omit<\n UseSuspenseQueryOptions<ApiResource<T>, FailedResponse>,\n 'queryKey' | 'queryFn'\n>\n\nexport const useSuspenseGet = <T extends ResourceObject | ResourceObject[]>(\n args: SuspenseGetOptions,\n options?: SuspenseGetQueryOptions<T>\n) => {\n type Resource = ApiResource<T>\n const apiClient = useApiClient()\n\n const { data, ...query } = useSuspenseQuery<Resource, FailedResponse>({\n queryKey: getRequestQueryKey(args),\n queryFn: ({ queryKey }) => {\n const [url, d, headers, app = 'chat'] = queryKey as RequestQueryKey\n return apiClient[app]\n .get({ url, data: d, headers })\n .catch(throwResponseError) as Promise<Resource>\n },\n ...options,\n })\n\n return { ...data, ...query }\n}\n\ntype NextMeta = Partial<{\n offset: string\n idLt: string\n}>\n\nexport type SuspensePaginatorOptions = Omit<\n AnyUseSuspenseInfiniteQueryOptions,\n 'getNextPageParam' | 'initialPageParam' | 'queryFn' | 'queryKey'\n>\n\nexport const useSuspensePaginator = <T extends ResourceObject>(\n args: SuspenseGetOptions,\n opts?: SuspensePaginatorOptions\n) => {\n const apiClient = useApiClient()\n const query = useSuspenseInfiniteQuery<\n ApiCollection<T>,\n Response,\n InfiniteData<ApiCollection<T>>,\n any,\n Partial<RequestData> | undefined\n >({\n queryKey: getRequestQueryKey(args),\n queryFn: ({ pageParam }) => {\n Log.info('useSuspenseGet', { pageParam })\n\n const pageParmWhere = pageParam?.where || {}\n const argsWhere = args.data.where || {}\n const where = { ...argsWhere, ...pageParmWhere }\n const app = args.app || 'chat'\n const offset = pageParam?.offset || args.data.offset\n const data = { ...args.data, where, offset }\n\n return apiClient[app]\n .get<ApiCollection<T>>({\n url: args.url,\n data,\n })\n .catch(throwResponseError)\n },\n initialPageParam: {} as Partial<RequestData>,\n getNextPageParam: lastPage => {\n const next: NextMeta = lastPage.meta?.next || {}\n const { offset, idLt } = next\n\n if (idLt) return { where: { id_lt: idLt } }\n if (offset) return { offset: Number(offset) }\n\n return undefined\n },\n ...(opts || {}),\n })\n\n const data: T[] = query.data?.pages.flatMap(page => page.data) || []\n const totalCount = query.data?.pages[0]?.meta?.totalCount || data.length\n\n return { ...query, data, totalCount }\n}\n\nconst throwResponseError = (error: unknown) => {\n if (error instanceof Response) {\n throw new ResponseError(error as FailedResponse)\n }\n\n return Promise.reject(error)\n}\n\nexport type RequestQueryKey = [\n SuspenseGetOptions['url'],\n SuspenseGetOptions['data'],\n SuspenseGetOptions['headers'],\n SuspenseGetOptions['app'],\n SuspenseGetOptions['reply_root_id'],\n]\nexport const getRequestQueryKey = (args: SuspenseGetOptions): RequestQueryKey => [\n args.url,\n args.data,\n args.headers,\n args.app || 'chat',\n args.reply_root_id,\n]\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_teams.d.ts","sourceRoot":"","sources":["../../src/hooks/use_teams.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_teams.d.ts","sourceRoot":"","sources":["../../src/hooks/use_teams.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAEhE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAA;AAED,eAAO,MAAM,kBAAkB,eAI9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_teams.js","sourceRoot":"","sources":["../../src/hooks/use_teams.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_teams.js","sourceRoot":"","sources":["../../src/hooks/use_teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,OAAO,eAAe,CAAgB;QACpC,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE;aACV;YACD,KAAK,EAAE;gBACL,eAAe,EAAE,UAAU;gBAC3B,WAAW,EAAE,MAAM;aACpB;YACD,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,GAAG;SACb;QACD,GAAG,EAAE,MAAM;KACZ,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,QAAQ,EAAE,CAAA;IAEvC,OAAO,KAAK,EAAE,MAAM,GAAG,CAAC,CAAA;AAC1B,CAAC,CAAA","sourcesContent":["import { useApiPaginator } from './use_api'\nimport { GroupResource } from '@/types/resources/group_resource'\n\nexport const useTeams = () => {\n return useApiPaginator<GroupResource>({\n url: '/me/groups',\n data: {\n fields: {\n Group: [],\n },\n where: {\n source_app_name: 'Services',\n source_type: 'Team',\n },\n order: 'name',\n perPage: 100,\n },\n app: 'chat',\n })\n}\n\nexport const useCanDisplayTeams = () => {\n const { data: teams = [] } = useTeams()\n\n return teams?.length > 0\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_theme.d.ts","sourceRoot":"","sources":["../../src/hooks/use_theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use_theme.d.ts","sourceRoot":"","sources":["../../src/hooks/use_theme.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzC,eAAO,MAAM,QAAQ,QAAO,SAI3B,CAAA"}
|
package/build/hooks/use_theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_theme.js","sourceRoot":"","sources":["../../src/hooks/use_theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use_theme.js","sourceRoot":"","sources":["../../src/hooks/use_theme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAGrD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAc,EAAE;IACtC,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IAEzC,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { useContext } from 'react'\nimport { ChatContext } from '@/contexts/chat_context'\nimport { ChatTheme } from '@/utils/theme'\n\nexport const useTheme = (): ChatTheme => {\n const { theme } = useContext(ChatContext)\n\n return theme\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_typing_indicators.d.ts","sourceRoot":"","sources":["../../src/hooks/use_typing_indicators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_typing_indicators.d.ts","sourceRoot":"","sources":["../../src/hooks/use_typing_indicators.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAGxD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,sBAuB/B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,WAAY,YAAY,EAAE,KAAG,MAU/D,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery } from '@tanstack/react-query';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { useCurrentPerson } from './use_current_person';
|
|
4
|
-
import { useConversationContext } from '
|
|
4
|
+
import { useConversationContext } from '@/contexts/conversation_context';
|
|
5
5
|
/**
|
|
6
6
|
* Hook for getting people currently typing in a conversation
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_typing_indicators.js","sourceRoot":"","sources":["../../src/hooks/use_typing_indicators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"use_typing_indicators.js","sourceRoot":"","sources":["../../src/hooks/use_typing_indicators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAA;AAExE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,GAAG,sBAAsB,EAAE,CAAA;IAC3E,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,oBAAoB,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAA;IAChG,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAA;IACxC,MAAM,eAAe,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,QAAQ,KAAK,aAAa,EAAE,EAAE,CAAA;IAC5E,MAAM,sBAAsB,GAAG,CAAC,sBAAsB,CAAA;IACtD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IACtB,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;QACxB,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW;QAC1B,WAAW,EAAE,WAAW;KACzB,CAAC,CAAA;IAEF,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE;QAC3D,IAAI,eAAe,CAAC,SAAS,CAAC;YAAE,OAAO,KAAK,CAAA;QAC5C,IAAI,GAAG,GAAG,OAAO;YAAE,OAAO,KAAK,CAAA;QAE/B,0EAA0E;QAC1E,IAAI,sBAAsB;YAAE,OAAO,IAAI,CAAA;QAEvC,mFAAmF;QACnF,OAAO,aAAa,KAAK,sBAAsB,CAAA;IACjD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAsB,EAAU,EAAE;IACvE,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,EAAE,CAAA;IAE7B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,eAAe,CAAA;IAChD,CAAC;SAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,gBAAgB,CAAA;IAC9E,CAAC;SAAM,CAAC;QACN,OAAO,8BAA8B,CAAA;IACvC,CAAC;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAmB,EAAE,CAAA","sourcesContent":["import { useQuery } from '@tanstack/react-query'\nimport { useMemo } from 'react'\nimport { useCurrentPerson } from './use_current_person'\nimport { PersonTyping } from './use_typing_status_cache'\nimport { useConversationContext } from '@/contexts/conversation_context'\n\n/**\n * Hook for getting people currently typing in a conversation\n *\n * The query function itself doesn't do anything, but we add to the cache\n * from useTypingStatusCache when we receive a typing event.\n */\nexport const useTypingIndicators = () => {\n const { conversationId, currentPageReplyRootId } = useConversationContext()\n const cacheKey = useMemo(() => ['conversationTyping', String(conversationId)], [conversationId])\n const currentPerson = useCurrentPerson()\n const isCurrentPerson = (authorId: number) => authorId === currentPerson?.id\n const inMainConversationView = !currentPageReplyRootId\n const now = Date.now()\n const { data } = useQuery({\n queryKey: cacheKey,\n queryFn: () => stableArray,\n initialData: stableArray,\n })\n\n return data.filter(({ author_id, expires, reply_root_id }) => {\n if (isCurrentPerson(author_id)) return false\n if (now > expires) return false\n\n // If you are in the main conversation view, you will see any message sent\n if (inMainConversationView) return true\n\n // If you are in a reply view, you will only see messages sent in this reply thread\n return reply_root_id === currentPageReplyRootId\n })\n}\n\n/**\n * Format text for typing indicators based on the number of people typing\n */\nexport const getTypingIndicatorText = (people: PersonTyping[]): string => {\n if (!people.length) return ''\n\n if (people.length === 1) {\n return `${people[0].author_name} is typing...`\n } else if (people.length === 2) {\n return `${people[0].author_name} and ${people[1].author_name} are typing...`\n } else {\n return 'Several people are typing...'\n }\n}\n\nconst stableArray: PersonTyping[] = []\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TypingBroadcastDataAttributes } from '
|
|
1
|
+
import { TypingBroadcastDataAttributes } from '@/types/jolt_events/typing_events';
|
|
2
2
|
export declare const TYPING_TIMEOUT_INTERVAL = 6000;
|
|
3
3
|
export interface PersonTyping extends TypingBroadcastDataAttributes {
|
|
4
4
|
expires: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_typing_status_cache.d.ts","sourceRoot":"","sources":["../../src/hooks/use_typing_status_cache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use_typing_status_cache.d.ts","sourceRoot":"","sources":["../../src/hooks/use_typing_status_cache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAA;AAEjF,eAAO,MAAM,uBAAuB,OAAO,CAAA;AAE3C,MAAM,WAAW,YAAa,SAAQ,6BAA6B;IACjE,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,mBAAoB,MAAM;2BAKhD,6BAA6B;gCAa/B,MAAM;gDASA,MAAM;CAapB,CAAA"}
|