@planningcenter/chat-react-native 3.30.0-rc.2 → 3.30.0-rc.4
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_deleting_overlay.js +2 -2
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +3 -3
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -1
- package/build/components/conversation/attachments/expanded_link.js +3 -3
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +4 -4
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +4 -4
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/image_attachment.js +5 -5
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/video_attachment.js +4 -4
- package/build/components/conversation/empty_conversation_blank_state.js +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +3 -3
- package/build/components/conversation/message.d.ts +1 -1
- package/build/components/conversation/message.js +12 -12
- package/build/components/conversation/message_attachments.d.ts +1 -1
- package/build/components/conversation/message_attachments.js +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.js +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.js +1 -1
- package/build/components/conversation/message_form.d.ts +1 -1
- package/build/components/conversation/message_form.js +12 -12
- package/build/components/conversation/message_markdown.js +3 -3
- package/build/components/conversation/message_reaction.d.ts +2 -2
- package/build/components/conversation/message_reaction.js +6 -6
- package/build/components/conversation/message_read_receipts.d.ts +1 -1
- package/build/components/conversation/message_read_receipts.js +2 -2
- package/build/components/conversation/messages_disabled_banners.js +2 -2
- package/build/components/conversation/reply_connectors.d.ts +1 -1
- package/build/components/conversation/reply_connectors.js +2 -2
- package/build/components/conversation/reply_shadow_message.d.ts +1 -1
- package/build/components/conversation/reply_shadow_message.js +6 -6
- package/build/components/conversation/typing_indicator.js +3 -3
- package/build/components/conversations/conversation_actions.d.ts +1 -1
- package/build/components/conversations/conversation_actions.js +5 -5
- package/build/components/conversations/conversation_preview.d.ts +1 -1
- package/build/components/conversations/conversation_preview.js +3 -3
- package/build/components/conversations/conversations.js +5 -5
- package/build/components/conversations/mute_indicator.js +3 -3
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +5 -5
- package/build/components/conversations/unread_count_badge.js +3 -3
- package/build/components/display/action_button.js +2 -2
- package/build/components/display/avatar.d.ts +1 -1
- package/build/components/display/avatar.js +1 -1
- package/build/components/display/avatar_group.d.ts +1 -1
- package/build/components/display/avatar_group.js +1 -1
- package/build/components/display/badge.js +3 -3
- package/build/components/display/banner.d.ts +1 -1
- package/build/components/display/banner.js +1 -1
- package/build/components/display/banner_collapsible.js +1 -1
- package/build/components/display/button.js +3 -3
- package/build/components/display/child_notice.d.ts +1 -1
- package/build/components/display/child_notice.js +2 -2
- package/build/components/display/heading.js +3 -3
- package/build/components/display/icon.js +1 -1
- package/build/components/display/icon_button.js +2 -2
- package/build/components/display/image.js +1 -1
- package/build/components/display/image_attachment_preview.js +2 -2
- package/build/components/display/keyboard_view.js +1 -1
- package/build/components/display/person.d.ts +1 -1
- package/build/components/display/person.js +1 -1
- package/build/components/display/platform_modal_header_buttons.js +1 -1
- package/build/components/display/pressable_row.js +1 -1
- package/build/components/display/spinner.js +1 -1
- package/build/components/display/switch.js +1 -1
- package/build/components/display/tabs.js +1 -1
- package/build/components/display/text.js +2 -2
- package/build/components/display/text_button.js +2 -2
- package/build/components/display/text_inline_button.js +2 -2
- package/build/components/display/toggle_button.js +4 -4
- package/build/components/display/utils/button_colors.js +1 -1
- package/build/components/display/utils/status_colors.js +1 -1
- package/build/components/display/video_attachment_preview.js +3 -3
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.js +2 -2
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/components/page/error_boundary.js +2 -2
- package/build/components/page/loading.js +1 -1
- package/build/components/primitive/avatar_primitive.d.ts +2 -2
- package/build/components/primitive/avatar_primitive.js +5 -5
- package/build/components/primitive/banner_primitive.d.ts +2 -2
- package/build/components/primitive/banner_primitive.js +8 -8
- package/build/components/primitive/blank_state_primitive.d.ts +1 -1
- package/build/components/primitive/blank_state_primitive.js +2 -2
- package/build/components/primitive/form_sheet.d.ts +2 -2
- package/build/components/primitive/form_sheet.js +3 -3
- package/build/components/safe_area_modal.js +1 -1
- package/build/contexts/api_provider.js +4 -4
- package/build/contexts/chat_context.d.ts +6 -6
- package/build/contexts/chat_context.js +2 -2
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.js +1 -1
- package/build/contexts/session_context.d.ts +3 -3
- package/build/contexts/session_context.js +6 -6
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +6 -6
- package/build/hooks/groups/use_group_members_for_new_conversation.js +2 -2
- package/build/hooks/groups/use_groups_conversation_create.d.ts +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +2 -2
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts +2 -2
- package/build/hooks/services/use_find_or_create_services_conversation.js +2 -2
- package/build/hooks/services/use_services_team.d.ts +1 -1
- package/build/hooks/services/use_services_team.js +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.js +1 -1
- package/build/hooks/services/use_team_plans.d.ts +1 -1
- package/build/hooks/services/use_team_plans.js +1 -1
- package/build/hooks/use_api.d.ts +2 -2
- package/build/hooks/use_api_client.d.ts +1 -1
- package/build/hooks/use_api_client.js +3 -3
- package/build/hooks/use_async_storage.js +1 -1
- package/build/hooks/use_attachment_uploader.d.ts +1 -1
- package/build/hooks/use_broadcast_typing_status.js +1 -1
- package/build/hooks/use_chat_permissions.d.ts +21 -21
- package/build/hooks/use_conversation.d.ts +4 -4
- package/build/hooks/use_conversation.js +3 -3
- package/build/hooks/use_conversation_jolt_events.js +1 -1
- package/build/hooks/use_conversation_membership.d.ts +1 -1
- package/build/hooks/use_conversation_membership.js +2 -2
- package/build/hooks/use_conversation_message.d.ts +1 -1
- package/build/hooks/use_conversation_message.js +1 -1
- package/build/hooks/use_conversation_messages.d.ts +3 -3
- package/build/hooks/use_conversation_messages.js +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +6 -6
- package/build/hooks/use_conversations.d.ts +2 -2
- package/build/hooks/use_conversations.js +1 -1
- package/build/hooks/use_conversations_actions.d.ts +19 -19
- package/build/hooks/use_conversations_actions.js +1 -1
- package/build/hooks/use_conversations_cache.d.ts +2 -2
- package/build/hooks/use_conversations_cache.js +2 -2
- package/build/hooks/use_conversations_jolt_events.js +2 -2
- package/build/hooks/use_current_person.d.ts +1 -1
- package/build/hooks/use_features.d.ts +1 -1
- package/build/hooks/use_features.js +1 -1
- package/build/hooks/use_giphy.d.ts +1 -1
- package/build/hooks/use_giphy.js +1 -1
- package/build/hooks/use_groups.d.ts +2 -2
- package/build/hooks/use_groups_groups.d.ts +33 -33
- package/build/hooks/use_jolt.js +2 -2
- package/build/hooks/use_live_relative_time.d.ts +1 -1
- package/build/hooks/use_live_relative_time.js +2 -2
- package/build/hooks/use_mark_latest_message_read.d.ts +1 -1
- package/build/hooks/use_message_create_or_update.d.ts +2 -2
- package/build/hooks/use_message_create_or_update.js +7 -7
- package/build/hooks/use_message_draft.d.ts +1 -1
- package/build/hooks/use_message_draft.js +1 -1
- package/build/hooks/use_message_reaction_toggle.d.ts +2 -2
- package/build/hooks/use_message_reaction_toggle.js +2 -2
- package/build/hooks/use_organization.d.ts +4 -4
- package/build/hooks/use_people_person.d.ts +1 -1
- package/build/hooks/use_product_analytics.d.ts +1 -1
- package/build/hooks/use_product_analytics.js +3 -3
- package/build/hooks/use_qualified_by_age.js +1 -1
- package/build/hooks/use_read_receipts.d.ts +1 -1
- package/build/hooks/use_report_message.d.ts +1 -1
- package/build/hooks/use_report_message.js +1 -1
- package/build/hooks/use_storage.d.ts +1 -1
- package/build/hooks/use_submit_age_check.d.ts +1 -1
- package/build/hooks/use_submit_age_check.js +1 -1
- package/build/hooks/use_suspense_api.d.ts +3 -3
- package/build/hooks/use_suspense_api.js +2 -2
- package/build/hooks/use_teams.d.ts +1 -1
- package/build/hooks/use_theme.d.ts +1 -1
- package/build/hooks/use_theme.js +1 -1
- package/build/hooks/use_typing_indicators.js +1 -1
- package/build/hooks/use_typing_status_cache.d.ts +1 -1
- package/build/hooks/use_upload_client.d.ts +1 -1
- package/build/hooks/use_upload_client.js +3 -3
- package/build/icons/font_awesome.d.ts +2 -0
- package/build/icons/font_awesome.d.ts.map +1 -0
- package/build/icons/font_awesome.js +16 -0
- package/build/icons/font_awesome.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/navigation/chat_access_gate.js +7 -7
- package/build/navigation/index.d.ts +25 -25
- package/build/navigation/index.js +28 -28
- package/build/navigation/screenLayout.js +2 -2
- package/build/polyfills/events/Event.js +1 -1
- package/build/polyfills/events/EventTarget.js +1 -1
- package/build/polyfills/events/internals/EventInternals.d.ts +2 -2
- package/build/polyfills/events/internals/EventTargetInternals.d.ts +2 -2
- package/build/screens/age_check/age_check_required_screen.js +8 -8
- package/build/screens/age_check/age_check_underage_screen.js +3 -3
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +3 -3
- package/build/screens/attachment_actions/attachment_actions_screen.js +1 -1
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +3 -3
- package/build/screens/bug_report_screen.js +11 -11
- package/build/screens/conversation/message_read_receipts_screen.js +4 -4
- package/build/screens/conversation_details_screen.js +8 -8
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +3 -3
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +4 -4
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +6 -6
- 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.js +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.js +2 -2
- package/build/screens/conversation_filter_recipients/types.d.ts +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +5 -5
- package/build/screens/conversation_filters/components/rows.d.ts +4 -4
- package/build/screens/conversation_filters/components/rows.js +5 -5
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/group_filters.js +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +54 -54
- package/build/screens/conversation_filters/hooks/filters.js +3 -3
- package/build/screens/conversation_filters/screen_props.d.ts +1 -1
- package/build/screens/conversation_filters/team_filters.js +1 -1
- package/build/screens/conversation_filters_screen.js +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +7 -7
- package/build/screens/conversation_new/components/form_list.d.ts +1 -1
- package/build/screens/conversation_new/components/form_list.js +2 -2
- package/build/screens/conversation_new/components/gender_filter_toggle.js +3 -3
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -1
- package/build/screens/conversation_new/components/groups_form.js +10 -10
- package/build/screens/conversation_new/components/services_form.d.ts +1 -1
- package/build/screens/conversation_new/components/services_form.js +8 -8
- package/build/screens/conversation_new/components/source_app_error_card.js +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +3 -3
- package/build/screens/conversation_notification_level_select_screen.js +5 -5
- package/build/screens/conversation_screen.d.ts +3 -3
- package/build/screens/conversation_screen.js +21 -21
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -4
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -2
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +4 -4
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts +2 -2
- package/build/screens/conversation_select_type_screen.d.ts +2 -2
- package/build/screens/conversation_select_type_screen.js +2 -2
- package/build/screens/conversations/components/chat_group_badge.js +2 -2
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +4 -4
- package/build/screens/conversations/components/list_header_component.js +9 -9
- package/build/screens/conversations/conversations_screen.d.ts +2 -2
- package/build/screens/conversations/conversations_screen.js +3 -3
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +98 -6
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.js +4 -4
- package/build/screens/group_notification_level_select_screen.js +3 -3
- package/build/screens/group_notification_settings_screen.js +3 -3
- package/build/screens/message_actions_screen.js +10 -10
- package/build/screens/message_report/components/message_preview.d.ts +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -2
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -1
- package/build/screens/message_report/components/report_reason_list.js +4 -4
- package/build/screens/message_report_screen.js +7 -7
- package/build/screens/notification_settings/hooks/groups.d.ts +5 -5
- package/build/screens/notification_settings/hooks/groups.js +4 -4
- package/build/screens/notification_settings_screen.js +4 -4
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts +4 -4
- package/build/screens/preferred_app/hooks/use_chat_types.js +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/send_giphy_screen.js +8 -8
- package/build/screens/team_conversation_screen.js +3 -3
- package/build/types/jolt_events/message_events.d.ts +1 -1
- package/build/types/jolt_events/reaction_events.d.ts +1 -1
- package/build/types/resources/app_grant.d.ts +1 -1
- package/build/types/resources/conversation_membership.d.ts +1 -1
- package/build/types/resources/group_membership.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/organization.d.ts +1 -1
- package/build/types/resources/person.d.ts +1 -1
- package/build/types/resources/services/chat_resource.d.ts +1 -1
- package/build/types/resources/services/team_resource.d.ts +1 -1
- package/build/utils/cache/messages_cache.d.ts +3 -3
- package/build/utils/cache/messages_cache.js +3 -3
- package/build/utils/cache/optimistically_create_message.d.ts +2 -2
- package/build/utils/cache/optimistically_create_message.js +4 -4
- package/build/utils/cache/optimistically_update_message.d.ts +1 -1
- package/build/utils/cache/optimistically_update_message.js +2 -2
- package/build/utils/cache/page_mutations.d.ts +5 -5
- package/build/utils/client/client.d.ts +1 -1
- package/build/utils/convert_attachments_for_create.d.ts +2 -2
- package/build/utils/destructure_chat_group_graph_id.d.ts +2 -2
- 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.js +1 -1
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts +3 -3
- package/build/utils/performance_tracking.d.ts +1 -1
- package/build/utils/reaction_constants.d.ts +1 -1
- package/build/utils/request/conversation.d.ts +2 -2
- package/build/utils/request/get_features.d.ts +1 -1
- package/build/utils/request/get_features.js +1 -1
- package/build/utils/request/get_message.d.ts +1 -1
- package/build/utils/request/get_message.js +1 -1
- package/build/utils/request/get_messages.d.ts +1 -1
- package/build/utils/request/get_messages.js +1 -1
- package/build/utils/response_error.d.ts +1 -1
- package/build/utils/session.d.ts +1 -1
- package/build/utils/session_manager.d.ts +1 -1
- package/build/utils/styles.js +1 -1
- package/build/utils/theme.d.ts +1 -1
- package/build/utils/theme.js +2 -2
- package/build/utils/upload_uri.d.ts +1 -1
- package/build/vendor/font_awesome_pro_solid_icons.d.ts +48 -0
- package/build/vendor/font_awesome_pro_solid_icons.d.ts.map +1 -0
- package/build/vendor/font_awesome_pro_solid_icons.js +513 -0
- package/build/vendor/font_awesome_pro_solid_icons.js.map +1 -0
- package/package.json +10 -4
- package/src/icons/font_awesome.ts +104 -0
- package/src/index.tsx +2 -0
- package/src/screens/design_system_screen.tsx +107 -0
- package/src/screens/preferred_app_selection_screen.tsx +3 -3
- package/src/vendor/font_awesome_pro_solid_icons.ts +560 -0
|
@@ -4,8 +4,8 @@ import { Animated, LayoutAnimation, StyleSheet, useWindowDimensions, View } from
|
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
import { Button } from './button';
|
|
6
6
|
import { Text } from './text';
|
|
7
|
-
import { useTheme } from '
|
|
8
|
-
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '
|
|
7
|
+
import { useTheme } from '../../hooks';
|
|
8
|
+
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '../../utils';
|
|
9
9
|
export const ActionButton = ({ visible = true, disabled = false, onPress, title, infoText, buttonIconNameLeft, secondaryButton, loading = false, }) => {
|
|
10
10
|
const styles = useStyles();
|
|
11
11
|
const [show, setShow] = useState(visible);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type IconString } from './icon';
|
|
3
|
-
import { type AvatarImageProps, type AvatarPresenceProps, type AvatarRootProps } from '
|
|
3
|
+
import { type AvatarImageProps, type AvatarPresenceProps, type AvatarRootProps } from '../../components/primitive/avatar_primitive';
|
|
4
4
|
interface AvatarProps {
|
|
5
5
|
sourceUri: AvatarImageProps['sourceUri'];
|
|
6
6
|
size?: AvatarRootProps['size'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import AvatarPrimitive from '
|
|
2
|
+
import AvatarPrimitive from '../../components/primitive/avatar_primitive';
|
|
3
3
|
export function Avatar({ presence, size = 'lg', sourceUri, showFallback = false, fallbackIconName = 'general.person', style, maxFontSizeMultiplier, minFontSizeMultiplier, }) {
|
|
4
4
|
const shouldShowFallback = showFallback || !sourceUri;
|
|
5
5
|
return (<AvatarPrimitive.Root size={size} style={style} maxFontSizeMultiplier={maxFontSizeMultiplier} minFontSizeMultiplier={minFontSizeMultiplier}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type IconString } from './icon';
|
|
3
|
-
import { type AvatarGroupProps, type AvatarRootProps } from '
|
|
3
|
+
import { type AvatarGroupProps, type AvatarRootProps } from '../../components/primitive/avatar_primitive';
|
|
4
4
|
interface AvatarGroupDisplayProps {
|
|
5
5
|
sourceUris: AvatarGroupProps['sourceUris'];
|
|
6
6
|
showFallback?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import AvatarPrimitive from '
|
|
2
|
+
import AvatarPrimitive from '../../components/primitive/avatar_primitive';
|
|
3
3
|
export function AvatarGroup({ sourceUris, showFallback = false, fallbackIconName = 'general.person', size = 'lg', style, maxFontSizeMultiplier, minFontSizeMultiplier, }) {
|
|
4
4
|
const shouldShowFallback = showFallback || !sourceUris || sourceUris.length === 0;
|
|
5
5
|
return (<AvatarPrimitive.Root size={size} style={style} maxFontSizeMultiplier={maxFontSizeMultiplier} minFontSizeMultiplier={minFontSizeMultiplier}>
|
|
@@ -4,9 +4,9 @@ import Svg, { Defs, LinearGradient, Path, Stop } from 'react-native-svg';
|
|
|
4
4
|
import { Icon } from './icon';
|
|
5
5
|
import { Text } from './text';
|
|
6
6
|
import { useStatusColorAppearanceMap } from './utils/status_colors';
|
|
7
|
-
import { useFontScale, useTheme } from '
|
|
8
|
-
import { platformFontWeightMedium } from '
|
|
9
|
-
import { tokens } from '
|
|
7
|
+
import { useFontScale, useTheme } from '../../hooks';
|
|
8
|
+
import { platformFontWeightMedium } from '../../utils';
|
|
9
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
10
10
|
// =================================
|
|
11
11
|
// ====== Constants ================
|
|
12
12
|
// =================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
-
import { type BannerStatusIconProps, type BannerRootProps } from '
|
|
3
|
+
import { type BannerStatusIconProps, type BannerRootProps } from '../../components/primitive/banner_primitive';
|
|
4
4
|
type descriptionUnion = string | ReactElement | undefined;
|
|
5
5
|
export interface BannerProps {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { isValidElement } from 'react';
|
|
2
|
-
import BannerPrimitive from '
|
|
2
|
+
import BannerPrimitive from '../../components/primitive/banner_primitive';
|
|
3
3
|
export function Banner({ appearance, description, heading, iconName, showIcon = true, style, }) {
|
|
4
4
|
if (!description && !heading)
|
|
5
5
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ConditionalDescription } from './banner';
|
|
3
|
-
import BannerPrimitive from '
|
|
3
|
+
import BannerPrimitive from '../../components/primitive/banner_primitive';
|
|
4
4
|
export function BannerCollapsible({ appearance, children, description, heading, iconName, showIcon = true, style, }) {
|
|
5
5
|
const [expanded, setExpanded] = React.useState(false);
|
|
6
6
|
const toggleCollapsible = () => {
|
|
@@ -4,9 +4,9 @@ import LinearGradient from 'react-native-linear-gradient';
|
|
|
4
4
|
import { Icon } from './icon';
|
|
5
5
|
import { Spinner } from './spinner';
|
|
6
6
|
import { getColorKey, useButtonColorOptionMap, useGradientColorMap } from './utils/button_colors';
|
|
7
|
-
import { useTheme, useFontScale, useCreateAndroidRippleColor } from '
|
|
8
|
-
import { platformFontWeightBold, platformPressedOpacityStyle } from '
|
|
9
|
-
import { tokens } from '
|
|
7
|
+
import { useTheme, useFontScale, useCreateAndroidRippleColor } from '../../hooks';
|
|
8
|
+
import { platformFontWeightBold, platformPressedOpacityStyle } from '../../utils';
|
|
9
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
10
10
|
// =================================
|
|
11
11
|
// ====== Constants ================
|
|
12
12
|
// =================================
|
|
@@ -3,8 +3,8 @@ import { View, StyleSheet } from 'react-native';
|
|
|
3
3
|
import { Avatar } from './avatar';
|
|
4
4
|
import { BannerCollapsible } from './banner_collapsible';
|
|
5
5
|
import { Text } from './text';
|
|
6
|
-
import BannerPrimitive from '
|
|
7
|
-
import { platformFontWeightMedium, pluralize } from '
|
|
6
|
+
import BannerPrimitive from '../../components/primitive/banner_primitive';
|
|
7
|
+
import { platformFontWeightMedium, pluralize } from '../../utils';
|
|
8
8
|
export function ChildNotice({ childMembers, showMembers = false, style }) {
|
|
9
9
|
const styles = useStyles();
|
|
10
10
|
const heading = `${pluralize(childMembers.length, 'member')} under age 13`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Platform, StyleSheet, Text as ReactNativeText, } from 'react-native';
|
|
3
|
-
import { useTheme } from '
|
|
4
|
-
import { platformFontWeightBold } from '
|
|
5
|
-
import { tokens } from '
|
|
3
|
+
import { useTheme } from '../../hooks';
|
|
4
|
+
import { platformFontWeightBold } from '../../utils/styles';
|
|
5
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
6
6
|
export function Heading({ style, variant = 'h1', children, ...props }) {
|
|
7
7
|
const styles = useStyles();
|
|
8
8
|
const variantStyleMap = {
|
|
@@ -14,7 +14,7 @@ import * as services from '@planningcenter/icons/paths/services';
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { StyleSheet, View } from 'react-native';
|
|
16
16
|
import { SvgXml } from 'react-native-svg';
|
|
17
|
-
import { useFontScale, useTheme } from '
|
|
17
|
+
import { useFontScale, useTheme } from '../../hooks';
|
|
18
18
|
// =================================
|
|
19
19
|
// ====== Constants ================
|
|
20
20
|
// =================================
|
|
@@ -3,8 +3,8 @@ import { Pressable, StyleSheet } from 'react-native';
|
|
|
3
3
|
import { Icon } from './icon';
|
|
4
4
|
import { Spinner } from './spinner';
|
|
5
5
|
import { getColorKey, useIconButtonColorOptionMap } from './utils/button_colors';
|
|
6
|
-
import { useTheme, useFontScale, useCreateAndroidRippleColor } from '
|
|
7
|
-
import { platformPressedOpacityStyle } from '
|
|
6
|
+
import { useTheme, useFontScale, useCreateAndroidRippleColor } from '../../hooks';
|
|
7
|
+
import { platformPressedOpacityStyle } from '../../utils';
|
|
8
8
|
// =================================
|
|
9
9
|
// ====== Constants ================
|
|
10
10
|
// =================================
|
|
@@ -3,7 +3,7 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import { Image as ReactNativeImage, StyleSheet, View, } from 'react-native';
|
|
4
4
|
import Animated from 'react-native-reanimated';
|
|
5
5
|
import { Spinner } from './spinner';
|
|
6
|
-
import { useTheme } from '
|
|
6
|
+
import { useTheme } from '../../hooks';
|
|
7
7
|
export function Image({ source, onLoad = noop, defaultLoading = true, loading = false, hideLoader = false, loaderSize = 24, loadingBackgroundStyles, style = {}, wrapperStyle = {}, alt, animatedImageStyle = {}, ...props }) {
|
|
8
8
|
const [isImageLoading, setIsImageLoading] = useState(defaultLoading);
|
|
9
9
|
const imageStyles = StyleSheet.flatten(style);
|
|
@@ -2,8 +2,8 @@ import { View, StyleSheet } from 'react-native';
|
|
|
2
2
|
import { Icon } from './icon';
|
|
3
3
|
import { IconButton } from './icon_button';
|
|
4
4
|
import { Image } from './image';
|
|
5
|
-
import { useTheme } from '
|
|
6
|
-
import { tokens } from '
|
|
5
|
+
import { useTheme } from '../../hooks';
|
|
6
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
7
7
|
const SIZES = {
|
|
8
8
|
sm: 'sm',
|
|
9
9
|
md: 'md',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { Dimensions, Keyboard, KeyboardAvoidingView, Platform, StyleSheet, View, } from 'react-native';
|
|
3
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
-
import { useChatContext } from '
|
|
4
|
+
import { useChatContext } from '../../contexts/chat_context';
|
|
5
5
|
export function KeyboardView({ children }) {
|
|
6
6
|
const styles = useStyles();
|
|
7
7
|
const isKeyboardOpen = useKeyboardOpen();
|
|
@@ -3,7 +3,7 @@ import { StyleSheet, View } from 'react-native';
|
|
|
3
3
|
import { Avatar } from './avatar';
|
|
4
4
|
import { Badge } from './badge';
|
|
5
5
|
import { Text } from './text';
|
|
6
|
-
import { platformFontWeightMedium } from '
|
|
6
|
+
import { platformFontWeightMedium } from '../../utils/styles';
|
|
7
7
|
export function Person({ person, style }) {
|
|
8
8
|
const styles = useStyles();
|
|
9
9
|
return (<View style={[styles.wrapper, style]}>
|
|
@@ -2,7 +2,7 @@ import { HeaderButton } from '@react-navigation/elements';
|
|
|
2
2
|
import { Platform, StyleSheet } from 'react-native';
|
|
3
3
|
import { Icon } from './icon';
|
|
4
4
|
import { TextButton } from './text_button';
|
|
5
|
-
import { useTheme } from '
|
|
5
|
+
import { useTheme } from '../../hooks';
|
|
6
6
|
export const HeaderTextButton = ({ onPress, title = 'Submit', ...props }) => {
|
|
7
7
|
const styles = useStyles();
|
|
8
8
|
return (<TextButton maxFontSizeMultiplier={1} onPress={onPress} textStyle={[styles.interactionColor, props.disabled && styles.disabledColor]} {...props}>
|
|
@@ -2,7 +2,7 @@ import { PlatformPressable } from '@react-navigation/elements';
|
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { Icon } from './icon';
|
|
4
4
|
import { Text } from './text';
|
|
5
|
-
import { useTheme } from '
|
|
5
|
+
import { useTheme } from '../../hooks';
|
|
6
6
|
export const PressableRow = ({ children, isActive, onPress, style, text, textStyle, iconPath, iconColor, }) => {
|
|
7
7
|
const styles = useRowStyles({ isActive, iconColor });
|
|
8
8
|
return (<PlatformPressable style={styles.container} onPress={onPress} accessibilityRole="radio" accessibilityState={{ selected: isActive }}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import Animated, { useSharedValue, useAnimatedStyle, withRepeat, withTiming, Easing, } from 'react-native-reanimated';
|
|
4
|
-
import { useFontScale, useTheme } from '
|
|
4
|
+
import { useFontScale, useTheme } from '../../hooks';
|
|
5
5
|
// =================================
|
|
6
6
|
// ====== Constants ================
|
|
7
7
|
// =================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Platform, Switch as ReactNativeSwitch } from 'react-native';
|
|
3
|
-
import { useTheme } from '
|
|
3
|
+
import { useTheme } from '../../hooks';
|
|
4
4
|
// =================================
|
|
5
5
|
// ====== Component ================
|
|
6
6
|
// =================================
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
2
|
import React, { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { Animated, Easing, StyleSheet, View } from 'react-native';
|
|
4
|
-
import { useTheme } from '
|
|
4
|
+
import { useTheme } from '../../hooks';
|
|
5
5
|
const defaultKeyExtractor = (item, index) => {
|
|
6
6
|
if (typeof item === 'string')
|
|
7
7
|
return item;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { StyleSheet, Text as ReactNativeText, Platform } from 'react-native';
|
|
3
|
-
import { useTheme } from '
|
|
4
|
-
import { tokens } from '
|
|
3
|
+
import { useTheme } from '../../hooks';
|
|
4
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
5
5
|
const VARIANTS = {
|
|
6
6
|
plain: 'plain',
|
|
7
7
|
secondary: 'secondary',
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { Pressable, StyleSheet } from 'react-native';
|
|
3
3
|
import { Text } from './text';
|
|
4
4
|
import { getColorKey, useButtonColorOptionMap } from './utils/button_colors';
|
|
5
|
-
import { useTheme } from '
|
|
6
|
-
import { platformFontWeightMedium } from '
|
|
5
|
+
import { useTheme } from '../../hooks';
|
|
6
|
+
import { platformFontWeightMedium } from '../../utils';
|
|
7
7
|
export function TextButton({ adjustsFontSizeToFit = false, allowFontScaling = true, appearance = 'interaction', disabled = false, children, maxFontSizeMultiplier, minimumFontScale, variant = 'plain', style, textStyle, ...props }) {
|
|
8
8
|
const styles = useStyles({ appearance, disabled });
|
|
9
9
|
const overrideStyles = StyleSheet.flatten(style); // Ensures the pressed styles still get applied
|
|
@@ -3,8 +3,8 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import { Platform, StyleSheet } from 'react-native';
|
|
4
4
|
import { Text } from './text';
|
|
5
5
|
import { getColorKey, useButtonColorOptionMap } from './utils/button_colors';
|
|
6
|
-
import { useTheme } from '
|
|
7
|
-
import { platformFontWeightMedium } from '
|
|
6
|
+
import { useTheme } from '../../hooks';
|
|
7
|
+
import { platformFontWeightMedium } from '../../utils';
|
|
8
8
|
export function TextInlineButton({ appearance = 'interaction', children, disabled = false, onPress, style, ...props }) {
|
|
9
9
|
const styles = useStyles({ appearance, disabled });
|
|
10
10
|
const [isPressed, setIsPressed] = useState(false);
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { Pressable, StyleSheet } from 'react-native';
|
|
3
3
|
import { Icon } from './icon';
|
|
4
4
|
import { Text } from './text';
|
|
5
|
-
import { useTheme, useFontScale, useCreateAndroidRippleColor, useInteractionGhostBackgroundColor, } from '
|
|
6
|
-
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, platformFontWeightBold, platformPressedOpacityStyle, } from '
|
|
7
|
-
import { Haptic } from '
|
|
8
|
-
import { tokens } from '
|
|
5
|
+
import { useTheme, useFontScale, useCreateAndroidRippleColor, useInteractionGhostBackgroundColor, } from '../../hooks';
|
|
6
|
+
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK, platformFontWeightBold, platformPressedOpacityStyle, } from '../../utils';
|
|
7
|
+
import { Haptic } from '../../utils/native_adapters/configuration';
|
|
8
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
9
9
|
export function ToggleButton({ active, accessibilityLabel, adjustsFontSizeToFit = false, allowFontScaling = true, iconNameLeft, iconNameRight, maxFontSizeMultiplier = MAX_FONT_SIZE_MULTIPLIER_LANDMARK, minimumFontScale, title, style, hapticFeedback = true, onPress, ...props }) {
|
|
10
10
|
const hasTitle = Boolean(title);
|
|
11
11
|
const styles = useStyles({ active, maxFontSizeMultiplier });
|
|
@@ -3,9 +3,9 @@ import { Icon } from './icon';
|
|
|
3
3
|
import { IconButton } from './icon_button';
|
|
4
4
|
import { Spinner } from './spinner';
|
|
5
5
|
import { Text } from './text';
|
|
6
|
-
import { useTheme } from '
|
|
7
|
-
import { platformFontWeightMedium } from '
|
|
8
|
-
import { tokens } from '
|
|
6
|
+
import { useTheme } from '../../hooks';
|
|
7
|
+
import { platformFontWeightMedium } from '../../utils';
|
|
8
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
9
9
|
export const VideoAttachmentPreview = ({ name, duration, onRemovePress, loading = false, error = false, hideRemoveButton = false, }) => {
|
|
10
10
|
const styles = useStyles({ error });
|
|
11
11
|
if (loading) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
-
import { ConversationRequestArgs } from '
|
|
3
|
+
import { ConversationRequestArgs } from '../utils/request/conversation';
|
|
4
4
|
interface GroupConversationsProps extends Partial<ConversationRequestArgs> {
|
|
5
5
|
limit?: number;
|
|
6
6
|
onConversationPress: (conversation: any) => void;
|
|
@@ -2,8 +2,8 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { ConversationPreview } from './conversations/conversation_preview';
|
|
4
4
|
import { Icon, Text } from './display';
|
|
5
|
-
import { ConversationsContextProvider, useConversationsContext, } from '
|
|
6
|
-
import { useTheme } from '
|
|
5
|
+
import { ConversationsContextProvider, useConversationsContext, } from '../contexts/conversations_context';
|
|
6
|
+
import { useTheme } from '../hooks';
|
|
7
7
|
/**
|
|
8
8
|
* GroupConversations is a component that displays a list of conversations
|
|
9
9
|
* for a specific group.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { ResponseError } from '
|
|
2
|
+
import { ResponseError } from '../../utils/response_error';
|
|
3
3
|
type ErrorBoundaryState = {
|
|
4
4
|
error: ResponseError | Error | TypeError | null;
|
|
5
5
|
unsubscriber: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useNavigation } from '@react-navigation/native';
|
|
2
2
|
import { useQueryErrorResetBoundary } from '@tanstack/react-query';
|
|
3
3
|
import React, { useEffect, useMemo } from 'react';
|
|
4
|
-
import BlankState from '
|
|
5
|
-
import { ResponseError } from '
|
|
4
|
+
import BlankState from '../../components/primitive/blank_state_primitive';
|
|
5
|
+
import { ResponseError } from '../../utils/response_error';
|
|
6
6
|
class ErrorBoundary extends React.Component {
|
|
7
7
|
state = {
|
|
8
8
|
error: null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useTheme } from '@react-navigation/native';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
|
-
import { Spinner } from '
|
|
4
|
+
import { Spinner } from '../../components/display';
|
|
5
5
|
export function DefaultLoading() {
|
|
6
6
|
const styles = useStyles();
|
|
7
7
|
return (<View style={styles.container}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewProps } from 'react-native';
|
|
3
|
-
import { IconString } from '
|
|
4
|
-
import { ImageProps } from '
|
|
3
|
+
import { IconString } from '../../components/display/icon';
|
|
4
|
+
import { ImageProps } from '../../components/display/image';
|
|
5
5
|
type AvatarComponents = {
|
|
6
6
|
Root: React.FC<AvatarRootProps>;
|
|
7
7
|
Image: React.FC<AvatarImageProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { createContext, useContext, useEffect, useState } from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Icon } from '
|
|
4
|
-
import { Image } from '
|
|
5
|
-
import { Spinner } from '
|
|
6
|
-
import { useFontScale, useTheme } from '
|
|
7
|
-
import { MAX_FONT_SIZE_MULTIPLIER } from '
|
|
3
|
+
import { Icon } from '../../components/display/icon';
|
|
4
|
+
import { Image } from '../../components/display/image';
|
|
5
|
+
import { Spinner } from '../../components/display/spinner';
|
|
6
|
+
import { useFontScale, useTheme } from '../../hooks';
|
|
7
|
+
import { MAX_FONT_SIZE_MULTIPLIER } from '../../utils';
|
|
8
8
|
// =================================
|
|
9
9
|
// ====== Exports ==================
|
|
10
10
|
// =================================
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
-
import { IconString } from '
|
|
4
|
-
import { type StatusAppearanceUnion } from '
|
|
3
|
+
import { IconString } from '../../components/display/icon';
|
|
4
|
+
import { type StatusAppearanceUnion } from '../../components/display/utils/status_colors';
|
|
5
5
|
type BannerComponents = {
|
|
6
6
|
Root: FC<BannerRootProps>;
|
|
7
7
|
StaticLayout: FC<BannerStaticLayoutProps>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { createContext, useContext } from 'react';
|
|
2
2
|
import { Pressable, StyleSheet, View } from 'react-native';
|
|
3
|
-
import { Heading } from '
|
|
4
|
-
import { Icon } from '
|
|
5
|
-
import { Text } from '
|
|
6
|
-
import { TextInlineButton } from '
|
|
7
|
-
import { useStatusColorAppearanceMap, } from '
|
|
8
|
-
import { useCreateAndroidRippleColor, useFontScale } from '
|
|
9
|
-
import { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightMedium, platformPressedOpacityStyle, } from '
|
|
10
|
-
import { tokens } from '
|
|
3
|
+
import { Heading } from '../../components/display/heading';
|
|
4
|
+
import { Icon } from '../../components/display/icon';
|
|
5
|
+
import { Text } from '../../components/display/text';
|
|
6
|
+
import { TextInlineButton } from '../../components/display/text_inline_button';
|
|
7
|
+
import { useStatusColorAppearanceMap, } from '../../components/display/utils/status_colors';
|
|
8
|
+
import { useCreateAndroidRippleColor, useFontScale } from '../../hooks';
|
|
9
|
+
import { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightMedium, platformPressedOpacityStyle, } from '../../utils';
|
|
10
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
11
11
|
// ========================================
|
|
12
12
|
// ====== Exports =========================
|
|
13
13
|
// ========================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
-
import { type ButtonProps, type HeadingProps, type IconString, type IconStyle, type TextButtonProps, type TextProps } from '
|
|
3
|
+
import { type ButtonProps, type HeadingProps, type IconString, type IconStyle, type TextButtonProps, type TextProps } from '../../components/display';
|
|
4
4
|
type BlankStateComponents = {
|
|
5
5
|
Root: FC<BlankStateRootProps>;
|
|
6
6
|
Imagery: FC<BlankStateImageryProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
|
-
import { Button, Heading, Icon, TextButton, Text, } from '
|
|
4
|
-
import { useTheme } from '
|
|
3
|
+
import { Button, Heading, Icon, TextButton, Text, } from '../../components/display';
|
|
4
|
+
import { useTheme } from '../../hooks';
|
|
5
5
|
// ========================================
|
|
6
6
|
// ====== Exports =========================
|
|
7
7
|
// ========================================
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { type AccessibilityRole, type StyleProp, type ViewStyle } from 'react-native';
|
|
4
|
-
import type { ButtonProps, TextButtonProps } from '
|
|
5
|
-
import { IconString } from '
|
|
4
|
+
import type { ButtonProps, TextButtonProps } from '../../components/display';
|
|
5
|
+
import { IconString } from '../../components/display';
|
|
6
6
|
/**
|
|
7
7
|
* Screen options for the formsheet's NativeStackNavigation route
|
|
8
8
|
* @param {string} options.headerTitle - Doesn't show in UI but good to have for semantic reasons.
|
|
@@ -2,9 +2,9 @@ import { PlatformPressable, useHeaderHeight } from '@react-navigation/elements';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Platform, StyleSheet, View, useWindowDimensions, } from 'react-native';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
-
import { Button, Heading, Icon, Text, TextButton } from '
|
|
6
|
-
import { useTheme } from '
|
|
7
|
-
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '
|
|
5
|
+
import { Button, Heading, Icon, Text, TextButton } from '../../components/display';
|
|
6
|
+
import { useTheme } from '../../hooks';
|
|
7
|
+
import { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '../../utils';
|
|
8
8
|
// =================================
|
|
9
9
|
// ====== Exports ==================
|
|
10
10
|
// =================================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Platform, Modal, View, StyleSheet } from 'react-native';
|
|
2
2
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
|
-
import { useChatContext } from '
|
|
3
|
+
import { useChatContext } from '../contexts/chat_context';
|
|
4
4
|
export function SafeAreaModal(props) {
|
|
5
5
|
const { edgeToEdge = true } = useChatContext();
|
|
6
6
|
const styles = useModalStyles(props);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { focusManager, QueryClient, QueryClientProvider, usePrefetchQuery, } from '@tanstack/react-query';
|
|
2
2
|
import React, { useContext, useEffect, useRef } from 'react';
|
|
3
3
|
import { ChatContext } from './chat_context';
|
|
4
|
-
import { useApiClient } from '
|
|
5
|
-
import { useAppState } from '
|
|
6
|
-
import { appGrantsRequestArgs } from '
|
|
7
|
-
import { getRequestQueryKey } from '
|
|
4
|
+
import { useApiClient } from '../hooks/use_api_client';
|
|
5
|
+
import { useAppState } from '../hooks/use_app_state';
|
|
6
|
+
import { appGrantsRequestArgs } from '../hooks/use_chat_permissions';
|
|
7
|
+
import { getRequestQueryKey } from '../hooks/use_suspense_api';
|
|
8
8
|
let apiClient;
|
|
9
9
|
const defaultQueryFn = ({ queryKey }) => {
|
|
10
10
|
if (!apiClient) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ColorSchemeName } from 'react-native';
|
|
3
|
-
import { AgeCheckContactInfo } from '
|
|
4
|
-
import { DeepPartial } from '
|
|
5
|
-
import { FailedResponse } from '
|
|
6
|
-
import { ProductAnalyticsConfig } from '
|
|
7
|
-
import { ENV, OauthType, PartialToken, Session } from '
|
|
8
|
-
import { ChatTheme, DefaultTheme } from '
|
|
3
|
+
import { AgeCheckContactInfo } from '../screens/age_check/screen_props';
|
|
4
|
+
import { DeepPartial } from '../types';
|
|
5
|
+
import { FailedResponse } from '../types';
|
|
6
|
+
import { ProductAnalyticsConfig } from '../types/product_analytics';
|
|
7
|
+
import { ENV, OauthType, PartialToken, Session } from '../utils';
|
|
8
|
+
import { ChatTheme, DefaultTheme } from '../utils/theme';
|
|
9
9
|
export interface ChatProviderProps {
|
|
10
10
|
env?: ENV;
|
|
11
11
|
giphyApiKey?: string;
|
|
@@ -2,8 +2,8 @@ import { useQuery } from '@tanstack/react-query';
|
|
|
2
2
|
import { merge } from 'lodash';
|
|
3
3
|
import React, { createContext, useMemo } from 'react';
|
|
4
4
|
import { useColorScheme } from 'react-native';
|
|
5
|
-
import { Client, Session, Uri } from '
|
|
6
|
-
import { defaultTheme } from '
|
|
5
|
+
import { Client, Session, Uri } from '../utils';
|
|
6
|
+
import { defaultTheme } from '../utils/theme';
|
|
7
7
|
export const ChatContext = createContext({
|
|
8
8
|
env: undefined,
|
|
9
9
|
giphyApiKey: undefined,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { UseConversationsValue } from '
|
|
3
|
-
import { ConversationFiltersParams } from '
|
|
2
|
+
import { UseConversationsValue } from '../hooks/use_conversations';
|
|
3
|
+
import { ConversationFiltersParams } from '../screens/conversation_filters/screen_props';
|
|
4
4
|
interface ConversationsContextValue extends UseConversationsValue {
|
|
5
5
|
activeConversationId?: number;
|
|
6
6
|
setActiveConversationId: (_id: number) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useContext, useMemo, useState } from 'react';
|
|
2
|
-
import { useConversations } from '
|
|
2
|
+
import { useConversations } from '../hooks/use_conversations';
|
|
3
3
|
const defaultQueryValue = {
|
|
4
4
|
conversations: [],
|
|
5
5
|
refetch: () => Promise.resolve(null),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/react-query';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
|
-
import { FailedResponse, OAuthToken } from '
|
|
4
|
-
import { ENV, Session } from '
|
|
5
|
-
import { StorageAdapter } from '
|
|
3
|
+
import { FailedResponse, OAuthToken } from '../types';
|
|
4
|
+
import { ENV, Session } from '../utils';
|
|
5
|
+
import { StorageAdapter } from '../utils/native_adapters/storage_adapter';
|
|
6
6
|
type Sessions = Record<string, string>;
|
|
7
7
|
export type SessionContextValue = {
|
|
8
8
|
env: ENV;
|