@planningcenter/chat-react-native 3.2.0-rc.2 → 3.2.0-rc.20
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/message_form.d.ts +2 -2
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +95 -41
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversations/action_toggle_button.d.ts +1 -1
- package/build/components/conversations/action_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/action_toggle_button.js +2 -1
- package/build/components/conversations/action_toggle_button.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +25 -11
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversations.d.ts +3 -6
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +8 -18
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/display/action_button.d.ts +2 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +3 -4
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/banner.d.ts +6 -1
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +2 -2
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts +1 -1
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +2 -2
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/child_notice.d.ts +3 -1
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +2 -2
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/person.d.ts +3 -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/primitive/banner_primitive.d.ts +3 -0
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +4 -5
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/contexts/api_provider.d.ts +1 -1
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +3 -3
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +5 -3
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +8 -3
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +14 -0
- package/build/contexts/conversations_context.d.ts.map +1 -0
- package/build/contexts/conversations_context.js +38 -0
- package/build/contexts/conversations_context.js.map +1 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +226 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.js +54 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -0
- package/build/hooks/groups/use_groups_conversation_create.d.ts +9 -0
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -0
- package/build/hooks/groups/use_groups_conversation_create.js +36 -0
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -0
- package/build/hooks/use_api.d.ts +41 -41
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js +5 -0
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js +5 -3
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_chat_permissions.d.ts +14 -14
- package/build/hooks/use_conversations.d.ts +6 -32
- package/build/hooks/use_conversations.d.ts.map +1 -1
- package/build/hooks/use_conversations.js +15 -14
- package/build/hooks/use_conversations.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +221 -0
- package/build/hooks/use_conversations_actions.d.ts.map +1 -0
- package/build/hooks/use_conversations_actions.js +93 -0
- package/build/hooks/use_conversations_actions.js.map +1 -0
- package/build/hooks/use_conversations_cache.d.ts +18 -0
- package/build/hooks/use_conversations_cache.d.ts.map +1 -0
- package/build/hooks/{use_conversation_jolt_events.js → use_conversations_cache.js} +27 -17
- package/build/hooks/use_conversations_cache.js.map +1 -0
- package/build/hooks/use_conversations_jolt_events.d.ts +3 -0
- package/build/hooks/use_conversations_jolt_events.d.ts.map +1 -0
- package/build/hooks/use_conversations_jolt_events.js +12 -0
- package/build/hooks/use_conversations_jolt_events.js.map +1 -0
- package/build/hooks/use_giphy.d.ts +9 -0
- package/build/hooks/use_giphy.d.ts.map +1 -0
- package/build/hooks/use_giphy.js +63 -0
- package/build/hooks/use_giphy.js.map +1 -0
- package/build/hooks/use_groups.d.ts +26 -26
- package/build/hooks/use_groups_groups.d.ts +26 -26
- package/build/hooks/use_jolt.d.ts.map +1 -1
- package/build/hooks/use_jolt.js +42 -20
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_message_create.d.ts +11 -0
- package/build/hooks/use_message_create.d.ts.map +1 -0
- package/build/hooks/use_message_create.js +35 -0
- package/build/hooks/use_message_create.js.map +1 -0
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +5 -0
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/hooks/use_teams.d.ts +26 -26
- package/build/index.d.ts +2 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/navigation/index.d.ts +65 -38
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +29 -10
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_details_screen.js +2 -2
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +74 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -0
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/header_row.js +69 -0
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.d.ts +5 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.js +46 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.js.map +1 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.d.ts +17 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.js +37 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.js.map +1 -0
- package/build/screens/{create → conversation_filter_recipients}/conversation_filter_recipients_screen.d.ts +1 -3
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +87 -0
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js +32 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +8 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js +65 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js.map +1 -0
- package/build/screens/conversation_filter_recipients/types.d.ts +38 -0
- package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/types.js +6 -0
- package/build/screens/conversation_filter_recipients/types.js.map +1 -0
- package/build/screens/conversation_filters/hooks/filters.d.ts +40 -40
- package/build/screens/conversation_filters/hooks/filters.js +1 -1
- package/build/screens/conversation_filters/hooks/filters.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +12 -0
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -0
- package/build/screens/conversation_new/components/form_list.js +42 -0
- package/build/screens/conversation_new/components/form_list.js.map +1 -0
- package/build/screens/conversation_new/components/groups_form.d.ts +7 -0
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -0
- package/build/screens/conversation_new/components/groups_form.js +105 -0
- package/build/screens/conversation_new/components/groups_form.js.map +1 -0
- package/build/screens/conversation_new/components/source_app_error_card.d.ts +2 -0
- package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -0
- package/build/screens/conversation_new/components/source_app_error_card.js +16 -0
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -0
- package/build/screens/conversation_new/components/team_form.d.ts +8 -0
- package/build/screens/conversation_new/components/team_form.d.ts.map +1 -0
- package/build/screens/conversation_new/components/team_form.js +11 -0
- package/build/screens/conversation_new/components/team_form.js.map +1 -0
- package/build/screens/conversation_new/conversation_new_screen.d.ts +15 -0
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -0
- package/build/screens/conversation_new/conversation_new_screen.js +16 -0
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -0
- package/build/screens/conversation_screen.d.ts +1 -0
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +1 -1
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.d.ts +2 -0
- package/build/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.js +17 -0
- package/build/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.js.map +1 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +12 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +61 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +7 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +21 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +4 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +48 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts +4 -0
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js +86 -0
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +1 -0
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts +9 -0
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/types/screen_props.js +2 -0
- package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -0
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +5 -1
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +2 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +35 -11
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +2 -2
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +10 -0
- package/build/screens/send_giphy_screen.d.ts.map +1 -0
- package/build/screens/send_giphy_screen.js +126 -0
- package/build/screens/send_giphy_screen.js.map +1 -0
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.js.map +1 -1
- package/build/types/resources/groups/groups_member_resource_with_person.d.ts +14 -0
- package/build/types/resources/groups/groups_member_resource_with_person.d.ts.map +1 -0
- package/build/types/resources/groups/groups_member_resource_with_person.js +2 -0
- package/build/types/resources/groups/groups_member_resource_with_person.js.map +1 -0
- package/build/types/resources/member.d.ts +0 -10
- package/build/types/resources/member.d.ts.map +1 -1
- package/build/types/resources/member.js.map +1 -1
- package/build/types/resources/oauth_token.d.ts +4 -4
- package/build/types/resources/oauth_token.d.ts.map +1 -1
- package/build/types/resources/oauth_token.js.map +1 -1
- package/build/utils/cache/page_mutations.d.ts +18 -0
- package/build/utils/cache/page_mutations.d.ts.map +1 -1
- package/build/utils/cache/page_mutations.js +13 -0
- package/build/utils/cache/page_mutations.js.map +1 -1
- package/build/utils/client/client.d.ts +4 -8
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js +10 -9
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.d.ts +10 -0
- package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -0
- package/build/utils/destructure_chat_group_graph_id.js +8 -0
- package/build/utils/destructure_chat_group_graph_id.js.map +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +1 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/request/conversation.d.ts +1 -3
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +37 -30
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/session.d.ts +6 -2
- package/build/utils/session.d.ts.map +1 -1
- package/build/utils/session.js +6 -1
- package/build/utils/session.js.map +1 -1
- package/build/utils/uri.d.ts +10 -2
- package/build/utils/uri.d.ts.map +1 -1
- package/build/utils/uri.js +24 -6
- package/build/utils/uri.js.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts +2 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.js +2 -0
- package/build/vendor/tapestry/alias_tokens_color_map.js.map +1 -1
- package/package.json +4 -3
- package/src/__tests__/hooks/useTheme.tsx +1 -1
- package/src/__tests__/utils/cache/page_mutations.ts +49 -15
- package/src/__tests__/{client.ts → utils/client.ts} +7 -115
- package/src/__tests__/{session.ts → utils/session.ts} +4 -4
- package/src/__tests__/utils/uri.ts +107 -0
- package/src/components/conversation/message_form.tsx +127 -58
- package/src/components/conversations/action_toggle_button.tsx +2 -1
- package/src/components/conversations/conversation_actions.tsx +41 -14
- package/src/components/conversations/conversations.tsx +39 -52
- package/src/components/display/action_button.tsx +4 -3
- package/src/components/display/banner.tsx +7 -1
- package/src/components/display/banner_collapsible.tsx +6 -1
- package/src/components/display/child_notice.tsx +9 -3
- package/src/components/display/person.tsx +4 -3
- package/src/components/primitive/banner_primitive.tsx +12 -6
- package/src/contexts/api_provider.tsx +3 -3
- package/src/contexts/chat_context.tsx +13 -6
- package/src/contexts/conversations_context.tsx +69 -0
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +62 -0
- package/src/hooks/groups/use_groups_conversation_create.ts +50 -0
- package/src/hooks/use_api.ts +11 -5
- package/src/hooks/use_api_client.ts +7 -3
- package/src/hooks/use_conversations.ts +34 -16
- package/src/hooks/use_conversations_actions.ts +108 -0
- package/src/hooks/{use_conversation_jolt_events.ts → use_conversations_cache.ts} +35 -20
- package/src/hooks/use_conversations_jolt_events.ts +21 -0
- package/src/hooks/use_giphy.ts +97 -0
- package/src/hooks/use_jolt.ts +56 -20
- package/src/hooks/use_message_create.ts +55 -0
- package/src/hooks/use_suspense_api.ts +6 -0
- package/src/index.tsx +2 -1
- package/src/navigation/index.tsx +39 -10
- package/src/screens/conversation_details_screen.tsx +2 -2
- package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +101 -0
- package/src/screens/conversation_filter_recipients/components/header_row.tsx +99 -0
- package/src/screens/conversation_filter_recipients/components/navigation_header.tsx +68 -0
- package/src/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.tsx +53 -0
- package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +120 -0
- package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx +50 -0
- package/src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts +90 -0
- package/src/screens/conversation_filter_recipients/types.tsx +47 -0
- package/src/screens/conversation_filters/hooks/filters.ts +1 -1
- package/src/screens/conversation_new/components/form_list.tsx +67 -0
- package/src/screens/conversation_new/components/groups_form.tsx +163 -0
- package/src/screens/conversation_new/components/source_app_error_card.tsx +24 -0
- package/src/screens/conversation_new/components/team_form.tsx +18 -0
- package/src/screens/conversation_new/conversation_new_screen.tsx +29 -0
- package/src/screens/conversation_screen.tsx +2 -1
- package/src/screens/conversation_select_recipients/components/groups_without_chat_disclaimer_row.tsx +21 -0
- package/src/screens/conversation_select_recipients/components/recipient_link_row.tsx +91 -0
- package/src/screens/conversation_select_recipients/components/view_more_link_row.tsx +30 -0
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +79 -0
- package/src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx +121 -0
- package/src/screens/conversation_select_recipients/types/screen_props.tsx +11 -0
- package/src/screens/conversations/components/list_header_component.tsx +6 -1
- package/src/screens/conversations/conversations_screen.tsx +39 -17
- package/src/screens/message_actions_screen.tsx +2 -2
- package/src/screens/send_giphy_screen.tsx +184 -0
- package/src/types/resources/groups/groups_group_resource.ts +1 -1
- package/src/types/resources/groups/groups_member_resource_with_person.ts +13 -0
- package/src/types/resources/member.ts +0 -11
- package/src/types/resources/oauth_token.ts +4 -4
- package/src/utils/cache/page_mutations.ts +22 -0
- package/src/utils/client/client.ts +13 -13
- package/src/utils/destructure_chat_group_graph_id.ts +25 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/request/conversation.ts +39 -34
- package/src/utils/session.ts +10 -4
- package/src/utils/uri.ts +30 -6
- package/src/vendor/tapestry/alias_tokens_color_map.ts +3 -0
- package/build/contexts/swipeable_active_conversation.d.ts +0 -11
- package/build/contexts/swipeable_active_conversation.d.ts.map +0 -1
- package/build/contexts/swipeable_active_conversation.js +0 -16
- package/build/contexts/swipeable_active_conversation.js.map +0 -1
- package/build/hooks/use_conversation_jolt_events.d.ts +0 -2
- package/build/hooks/use_conversation_jolt_events.d.ts.map +0 -1
- package/build/hooks/use_conversation_jolt_events.js.map +0 -1
- package/build/screens/create/conversation_create_screen.d.ts +0 -9
- package/build/screens/create/conversation_create_screen.d.ts.map +0 -1
- package/build/screens/create/conversation_create_screen.js +0 -122
- package/build/screens/create/conversation_create_screen.js.map +0 -1
- package/build/screens/create/conversation_filter_recipients_screen.d.ts.map +0 -1
- package/build/screens/create/conversation_filter_recipients_screen.js +0 -52
- package/build/screens/create/conversation_filter_recipients_screen.js.map +0 -1
- package/build/screens/create/conversation_select_recipients_screen.d.ts +0 -8
- package/build/screens/create/conversation_select_recipients_screen.d.ts.map +0 -1
- package/build/screens/create/conversation_select_recipients_screen.js +0 -97
- package/build/screens/create/conversation_select_recipients_screen.js.map +0 -1
- package/src/contexts/swipeable_active_conversation.tsx +0 -27
- package/src/screens/create/conversation_create_screen.tsx +0 -151
- package/src/screens/create/conversation_filter_recipients_screen.tsx +0 -79
- package/src/screens/create/conversation_select_recipients_screen.tsx +0 -128
package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_filter_recipients_screen.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,aAAa,EAAE,EAAE;SAClB;QACD,QAAQ,EAAE;YACR,oBAAoB,EAAE,MAAM,CAAC,cAAc;YAC3C,kBAAkB,EAAE,MAAM,CAAC,cAAc;SAC1C;QACD,OAAO,EAAE;YACP,uBAAuB,EAAE,MAAM,CAAC,cAAc;YAC9C,qBAAqB,EAAE,MAAM,CAAC,cAAc;YAC5C,YAAY,EAAE,EAAE;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { NativeStackNavigationOptions } from '@react-navigation/native-stack'\nimport React from 'react'\nimport { Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { FlashList } from '@shopify/flash-list'\nimport { Heading } from '../../components'\nimport { useTheme } from '../../hooks'\nimport { useFlattenedArrayOfServiceTypesWithTeams } from './hooks/use_flattened_array_of_service_types_with_teams'\nimport { ConversationFilterRecipientsScreenProps, SectionTypes } from './types'\nimport { HeaderRow } from './components/header_row'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { CheckboxRow } from './components/checkbox_row'\nimport { useHeaderHeight } from '@react-navigation/elements'\nimport { FilterRecipientsProvider } from './context/conversation_filter_recipients_context'\nimport { HeaderRightWithContext, FilterHeaderTitle } from './components/navigation_header'\nimport { useServiceTypesWithTeams } from './hooks/use_service_types_with_teams'\n\nconst SERVICE_TYPE_LABELLED_BY_PREFIX = 'header-'\n\nexport const ConversationFilterReceipientsScreenOptions: NativeStackNavigationOptions = {\n presentation: Platform.select({ android: 'modal', ios: 'formSheet' }),\n sheetAllowedDetents: Platform.select({\n android: [0.75, 0.94],\n default: [0.75, 1],\n }),\n sheetGrabberVisible: true,\n headerBackVisible: false,\n headerRight: HeaderRightWithContext,\n headerTitle: FilterHeaderTitle,\n headerTitleAlign: 'left',\n}\n\nexport const ConversationFilterRecipientsScreen = ({}: ConversationFilterRecipientsScreenProps) => {\n const styles = useStyles()\n\n const { serviceTypes } = useServiceTypesWithTeams()\n const data = useFlattenedArrayOfServiceTypesWithTeams({\n data: serviceTypes,\n firstRowStyle: styles.firstRow,\n lastRowStyle: styles.lastRow,\n })\n\n return (\n <FilterRecipientsProvider>\n <View style={styles.listWrapper}>\n <FlashList\n data={data}\n ListHeaderComponent={\n <Heading variant=\"h3\" style={styles.listHeader}>\n Service Types\n </Heading>\n }\n estimatedItemSize={50}\n contentContainerStyle={styles.listContentContainer}\n keyExtractor={item =>\n `${item.type === SectionTypes.header ? item.data.serviceTypeId : item.data.teamId}`\n }\n renderItem={({ item }) => {\n switch (item.type) {\n case SectionTypes.header:\n return (\n <HeaderRow\n data={item.data}\n style={item.sectionStyle}\n nativeID={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}\n />\n )\n case SectionTypes.team:\n return (\n <CheckboxRow\n data={item.data}\n style={item.sectionStyle}\n accessibilityLabelledBy={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}\n />\n )\n default:\n return null\n }\n }}\n />\n </View>\n </FilterRecipientsProvider>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const { top, bottom } = useSafeAreaInsets()\n const { height } = useWindowDimensions()\n const headerHeight = useHeaderHeight()\n\n const containerHeight = Platform.select({\n android: height,\n ios: height - top - headerHeight,\n })\n\n return StyleSheet.create({\n listWrapper: {\n flex: 1,\n height: containerHeight,\n backgroundColor: colors.surfaceColor080,\n },\n listContentContainer: {\n padding: 16,\n paddingBottom: bottom,\n },\n listHeader: {\n paddingBottom: 16,\n },\n firstRow: {\n borderTopStartRadius: tokens.borderRadiusLg,\n borderTopEndRadius: tokens.borderRadiusLg,\n },\n lastRow: {\n borderBottomStartRadius: tokens.borderRadiusLg,\n borderBottomEndRadius: tokens.borderRadiusLg,\n marginBottom: 16,\n },\n })\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ViewStyle } from 'react-native';
|
|
2
|
+
import { type SectionListData, type ServiceTypeWithTeams } from '../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
data: ServiceTypeWithTeams[];
|
|
5
|
+
firstRowStyle: ViewStyle;
|
|
6
|
+
lastRowStyle: ViewStyle;
|
|
7
|
+
}
|
|
8
|
+
export declare function useFlattenedArrayOfServiceTypesWithTeams({ data, firstRowStyle, lastRowStyle, }: Props): SectionListData;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=use_flattened_array_of_service_types_with_teams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_flattened_array_of_service_types_with_teams.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAgB,KAAK,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAExF,UAAU,KAAK;IACb,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAC5B,aAAa,EAAE,SAAS,CAAA;IACxB,YAAY,EAAE,SAAS,CAAA;CACxB;AAED,wBAAgB,wCAAwC,CAAC,EACvD,IAAI,EACJ,aAAa,EACb,YAAY,GACb,EAAE,KAAK,mBAmCP"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { SectionTypes } from '../types';
|
|
3
|
+
export function useFlattenedArrayOfServiceTypesWithTeams({ data, firstRowStyle, lastRowStyle, }) {
|
|
4
|
+
const flattenedData = useMemo(() => data.flatMap(serviceType => {
|
|
5
|
+
const teamIdsForServiceType = serviceType.teams.map(team => team.id);
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
type: SectionTypes.header,
|
|
9
|
+
data: {
|
|
10
|
+
serviceTypeName: serviceType.name,
|
|
11
|
+
serviceTypeId: serviceType.id,
|
|
12
|
+
teamIdsForServiceType,
|
|
13
|
+
},
|
|
14
|
+
sectionStyle: firstRowStyle,
|
|
15
|
+
},
|
|
16
|
+
...serviceType.teams.map((team, teamIdx) => {
|
|
17
|
+
const isLastTeamInServiceType = teamIdx === serviceType.teams.length - 1;
|
|
18
|
+
return {
|
|
19
|
+
type: SectionTypes.team,
|
|
20
|
+
data: {
|
|
21
|
+
teamName: team.name,
|
|
22
|
+
teamId: team.id,
|
|
23
|
+
serviceTypeId: serviceType.id,
|
|
24
|
+
},
|
|
25
|
+
sectionStyle: isLastTeamInServiceType ? lastRowStyle : undefined,
|
|
26
|
+
};
|
|
27
|
+
}),
|
|
28
|
+
];
|
|
29
|
+
}), [data, firstRowStyle, lastRowStyle]);
|
|
30
|
+
return flattenedData;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=use_flattened_array_of_service_types_with_teams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_flattened_array_of_service_types_with_teams.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,YAAY,EAAmD,MAAM,UAAU,CAAA;AAQxF,MAAM,UAAU,wCAAwC,CAAC,EACvD,IAAI,EACJ,aAAa,EACb,YAAY,GACN;IACN,MAAM,aAAa,GAAoB,OAAO,CAC5C,GAAG,EAAE,CACH,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QACzB,MAAM,qBAAqB,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAEpE,OAAO;YACL;gBACE,IAAI,EAAE,YAAY,CAAC,MAAe;gBAClC,IAAI,EAAE;oBACJ,eAAe,EAAE,WAAW,CAAC,IAAI;oBACjC,aAAa,EAAE,WAAW,CAAC,EAAE;oBAC7B,qBAAqB;iBACtB;gBACD,YAAY,EAAE,aAAa;aAC5B;YACD,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;gBACzC,MAAM,uBAAuB,GAAG,OAAO,KAAK,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;gBAExE,OAAO;oBACL,IAAI,EAAE,YAAY,CAAC,IAAa;oBAChC,IAAI,EAAE;wBACJ,QAAQ,EAAE,IAAI,CAAC,IAAI;wBACnB,MAAM,EAAE,IAAI,CAAC,EAAE;wBACf,aAAa,EAAE,WAAW,CAAC,EAAE;qBAC9B;oBACD,YAAY,EAAE,uBAAuB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS;iBACjE,CAAA;YACH,CAAC,CAAC;SACH,CAAA;IACH,CAAC,CAAC,EACJ,CAAC,IAAI,EAAE,aAAa,EAAE,YAAY,CAAC,CACpC,CAAA;IAED,OAAO,aAAa,CAAA;AACtB,CAAC","sourcesContent":["import { useMemo } from 'react'\nimport { type ViewStyle } from 'react-native'\nimport { SectionTypes, type SectionListData, type ServiceTypeWithTeams } from '../types'\n\ninterface Props {\n data: ServiceTypeWithTeams[]\n firstRowStyle: ViewStyle\n lastRowStyle: ViewStyle\n}\n\nexport function useFlattenedArrayOfServiceTypesWithTeams({\n data,\n firstRowStyle,\n lastRowStyle,\n}: Props) {\n const flattenedData: SectionListData = useMemo(\n () =>\n data.flatMap(serviceType => {\n const teamIdsForServiceType = serviceType.teams.map(team => team.id)\n\n return [\n {\n type: SectionTypes.header as const,\n data: {\n serviceTypeName: serviceType.name,\n serviceTypeId: serviceType.id,\n teamIdsForServiceType,\n },\n sectionStyle: firstRowStyle,\n },\n ...serviceType.teams.map((team, teamIdx) => {\n const isLastTeamInServiceType = teamIdx === serviceType.teams.length - 1\n\n return {\n type: SectionTypes.team as const,\n data: {\n teamName: team.name,\n teamId: team.id,\n serviceTypeId: serviceType.id,\n },\n sectionStyle: isLastTeamInServiceType ? lastRowStyle : undefined,\n }\n }),\n ]\n }),\n [data, firstRowStyle, lastRowStyle]\n )\n\n return flattenedData\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceTypeWithTeams } from '../types';
|
|
2
|
+
export declare function useServiceTypesWithTeams(): {
|
|
3
|
+
serviceTypes: ServiceTypeWithTeams[];
|
|
4
|
+
isFetching: boolean;
|
|
5
|
+
isError: boolean;
|
|
6
|
+
noServicesAccess: boolean;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=use_service_types_with_teams.d.ts.map
|
package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_service_types_with_teams.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAG/C,wBAAgB,wBAAwB;;;;;EAoCvC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useCallback, useMemo } from 'react';
|
|
2
|
+
import { useApiGet } from '../../../hooks/use_api';
|
|
3
|
+
import { uniqBy } from 'lodash';
|
|
4
|
+
export function useServiceTypesWithTeams() {
|
|
5
|
+
const response = useApiGet({
|
|
6
|
+
url: `/chat`,
|
|
7
|
+
data: {
|
|
8
|
+
fields: {
|
|
9
|
+
Chat: ['teams_i_lead'],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
app: 'services',
|
|
13
|
+
});
|
|
14
|
+
const { data, isFetching, isError, error } = response;
|
|
15
|
+
const teamsILead = data?.teamsILead || stableEmptyTeamResponseArray;
|
|
16
|
+
const decoratedResponse = useMemo(() => {
|
|
17
|
+
return decorateTeamResponseItems(teamsILead);
|
|
18
|
+
}, [teamsILead]);
|
|
19
|
+
const hasNoServicesAccess = useCallback(() => {
|
|
20
|
+
if (isError && error) {
|
|
21
|
+
const errorArray = error;
|
|
22
|
+
const allErrors = errorArray.errors.map(e => e.detail);
|
|
23
|
+
if (allErrors.some(e => e.includes(NOT_IN_APPLICATION_CODE))) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}, [isError, error]);
|
|
29
|
+
return {
|
|
30
|
+
serviceTypes: decoratedResponse,
|
|
31
|
+
isFetching,
|
|
32
|
+
isError,
|
|
33
|
+
noServicesAccess: hasNoServicesAccess(),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function decorateTeamResponseItems(teamResponseItems) {
|
|
37
|
+
return teamResponseItems
|
|
38
|
+
.map(({ value, serviceTypeName, teamName }) => ({
|
|
39
|
+
service_type: {
|
|
40
|
+
id: value.serviceTypeId,
|
|
41
|
+
name: serviceTypeName,
|
|
42
|
+
},
|
|
43
|
+
team: {
|
|
44
|
+
id: value.teamId,
|
|
45
|
+
name: teamName,
|
|
46
|
+
},
|
|
47
|
+
}))
|
|
48
|
+
.reduce((acc, { service_type, team }) => {
|
|
49
|
+
let serviceTypeEntry = acc.find(entry => entry.id === service_type.id);
|
|
50
|
+
if (!serviceTypeEntry) {
|
|
51
|
+
serviceTypeEntry = {
|
|
52
|
+
id: service_type.id,
|
|
53
|
+
name: service_type.name,
|
|
54
|
+
teams: [],
|
|
55
|
+
};
|
|
56
|
+
acc.push(serviceTypeEntry);
|
|
57
|
+
}
|
|
58
|
+
const initialTeams = serviceTypeEntry.teams;
|
|
59
|
+
serviceTypeEntry.teams = uniqBy([...initialTeams, team], 'id');
|
|
60
|
+
return acc;
|
|
61
|
+
}, []);
|
|
62
|
+
}
|
|
63
|
+
const stableEmptyTeamResponseArray = [];
|
|
64
|
+
const NOT_IN_APPLICATION_CODE = 'TRASH_PANDA';
|
|
65
|
+
//# sourceMappingURL=use_service_types_with_teams.js.map
|
package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_service_types_with_teams.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAGlD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,MAAM,UAAU,wBAAwB;IACtC,MAAM,QAAQ,GAAG,SAAS,CAAuB;QAC/C,GAAG,EAAE,OAAO;QACZ,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,CAAC,cAAc,CAAC;aACvB;SACF;QACD,GAAG,EAAE,UAAU;KAChB,CAAC,CAAA;IAEF,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAA;IAErD,MAAM,UAAU,GAAG,IAAI,EAAE,UAAU,IAAI,4BAA4B,CAAA;IAEnE,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,EAAE;QACrC,OAAO,yBAAyB,CAAC,UAAU,CAAC,CAAA;IAC9C,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAA;IAEhB,MAAM,mBAAmB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC3C,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;YACrB,MAAM,UAAU,GAAG,KAAK,CAAA;YACxB,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;YACtD,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC;gBAC7D,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC,EAAE,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Aa,CAAA","sourcesContent":["import { useCallback, useMemo } from 'react'\nimport { useApiGet } from '../../../hooks/use_api'\nimport { ResourceObject } from '../../../types'\nimport { ServiceTypeWithTeams } from '../types'\nimport { uniqBy } from 'lodash'\n\nexport function useServiceTypesWithTeams() {\n const response = useApiGet<ServicesChatResource>({\n url: `/chat`,\n data: {\n fields: {\n Chat: ['teams_i_lead'],\n },\n },\n app: 'services',\n })\n\n const { data, isFetching, isError, error } = response\n\n const teamsILead = data?.teamsILead || stableEmptyTeamResponseArray\n\n const decoratedResponse = useMemo(() => {\n return decorateTeamResponseItems(teamsILead)\n }, [teamsILead])\n\n const hasNoServicesAccess = useCallback(() => {\n if (isError && error) {\n const errorArray = error\n const allErrors = errorArray.errors.map(e => e.detail)\n if (allErrors.some(e => e.includes(NOT_IN_APPLICATION_CODE))) {\n return true\n }\n }\n return false\n }, [isError, error])\n\n return {\n serviceTypes: decoratedResponse,\n isFetching,\n isError,\n noServicesAccess: hasNoServicesAccess(),\n }\n}\n\nfunction decorateTeamResponseItems(teamResponseItems: TeamResponseItem[]) {\n return teamResponseItems\n .map(({ value, serviceTypeName, teamName }) => ({\n service_type: {\n id: value.serviceTypeId,\n name: serviceTypeName,\n },\n team: {\n id: value.teamId,\n name: teamName,\n },\n }))\n .reduce((acc: ServiceTypeWithTeams[], { service_type, team }) => {\n let serviceTypeEntry = acc.find(entry => entry.id === service_type.id)\n\n if (!serviceTypeEntry) {\n serviceTypeEntry = {\n id: service_type.id,\n name: service_type.name,\n teams: [],\n }\n acc.push(serviceTypeEntry)\n }\n const initialTeams = serviceTypeEntry.teams\n serviceTypeEntry.teams = uniqBy([...initialTeams, team], 'id')\n return acc\n }, [])\n}\n\ninterface TeamResponseItem {\n value: {\n teamId: number\n serviceTypeId: number\n }\n name: string\n teamName: string\n serviceTypeName: string\n order: string[]\n}\n\ninterface ServicesChatResource extends ResourceObject {\n teamsILead: TeamResponseItem[]\n}\n\nconst stableEmptyTeamResponseArray: TeamResponseItem[] = []\nconst NOT_IN_APPLICATION_CODE = 'TRASH_PANDA'\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ViewStyle } from 'react-native';
|
|
2
|
+
import { AppName } from '../../types/resources/app_name';
|
|
3
|
+
import { StaticScreenProps } from '@react-navigation/native';
|
|
4
|
+
export interface ServiceTypeWithTeams {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
teams: {
|
|
8
|
+
id: number;
|
|
9
|
+
name: string;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export declare enum SectionTypes {
|
|
13
|
+
header = 0,
|
|
14
|
+
team = 1
|
|
15
|
+
}
|
|
16
|
+
export interface ServiceTypeProps {
|
|
17
|
+
serviceTypeName: string;
|
|
18
|
+
serviceTypeId: number;
|
|
19
|
+
teamIdsForServiceType: number[];
|
|
20
|
+
}
|
|
21
|
+
export interface TeamProps {
|
|
22
|
+
teamName: string;
|
|
23
|
+
teamId: number;
|
|
24
|
+
serviceTypeId: number;
|
|
25
|
+
}
|
|
26
|
+
export type SectionListData = Array<DataItem<ServiceTypeProps, SectionTypes.header> | DataItem<TeamProps, SectionTypes.team>>;
|
|
27
|
+
interface DataItem<T, TName extends SectionTypes> {
|
|
28
|
+
type: TName;
|
|
29
|
+
data: T;
|
|
30
|
+
sectionStyle?: ViewStyle;
|
|
31
|
+
}
|
|
32
|
+
export type ConversationFilterRecipientsParams = {
|
|
33
|
+
source_app_name?: AppName;
|
|
34
|
+
team_ids?: number[];
|
|
35
|
+
};
|
|
36
|
+
export type ConversationFilterRecipientsScreenProps = StaticScreenProps<ConversationFilterRecipientsParams>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;KACb,EAAE,CAAA;CACJ;AAED,oBAAY,YAAY;IACtB,MAAM,IAAA;IACN,IAAI,IAAA;CACL;AAED,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,MAAM,EAAE,CAAA;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CACjC,QAAQ,CAAC,gBAAgB,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,CACzF,CAAA;AAED,UAAU,QAAQ,CAAC,CAAC,EAAE,KAAK,SAAS,YAAY;IAC9C,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,EAAE,CAAC,CAAA;IACP,YAAY,CAAC,EAAE,SAAS,CAAA;CACzB;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,uCAAuC,GACjD,iBAAiB,CAAC,kCAAkC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/types.tsx"],"names":[],"mappings":"AAaA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mDAAM,CAAA;IACN,+CAAI,CAAA;AACN,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["import { type ViewStyle } from 'react-native'\nimport { AppName } from '../../types/resources/app_name'\nimport { StaticScreenProps } from '@react-navigation/native'\n\nexport interface ServiceTypeWithTeams {\n id: number\n name: string\n teams: {\n id: number\n name: string\n }[]\n}\n\nexport enum SectionTypes {\n header,\n team,\n}\n\nexport interface ServiceTypeProps {\n serviceTypeName: string\n serviceTypeId: number\n teamIdsForServiceType: number[]\n}\n\nexport interface TeamProps {\n teamName: string\n teamId: number\n serviceTypeId: number\n}\n\nexport type SectionListData = Array<\n DataItem<ServiceTypeProps, SectionTypes.header> | DataItem<TeamProps, SectionTypes.team>\n>\n\ninterface DataItem<T, TName extends SectionTypes> {\n type: TName\n data: T\n sectionStyle?: ViewStyle\n}\n\nexport type ConversationFilterRecipientsParams = {\n source_app_name?: AppName\n team_ids?: number[]\n}\n\nexport type ConversationFilterRecipientsScreenProps =\n StaticScreenProps<ConversationFilterRecipientsParams>\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GroupResource } from '../../../types/resources/group_resource';
|
|
2
2
|
import { GroupsGroupResource } from '../../../types';
|
|
3
3
|
export declare const useTeamsToFilter: () => {
|
|
4
|
-
error:
|
|
4
|
+
error: import("../../../types").ApiError;
|
|
5
5
|
isError: true;
|
|
6
6
|
isPending: false;
|
|
7
7
|
isLoading: false;
|
|
@@ -10,8 +10,8 @@ export declare const useTeamsToFilter: () => {
|
|
|
10
10
|
isSuccess: false;
|
|
11
11
|
isPlaceholderData: false;
|
|
12
12
|
status: "error";
|
|
13
|
-
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
14
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
13
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
14
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
15
15
|
hasNextPage: boolean;
|
|
16
16
|
hasPreviousPage: boolean;
|
|
17
17
|
isFetchNextPageError: boolean;
|
|
@@ -21,7 +21,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
21
21
|
dataUpdatedAt: number;
|
|
22
22
|
errorUpdatedAt: number;
|
|
23
23
|
failureCount: number;
|
|
24
|
-
failureReason:
|
|
24
|
+
failureReason: import("../../../types").ApiError | null;
|
|
25
25
|
errorUpdateCount: number;
|
|
26
26
|
isFetched: boolean;
|
|
27
27
|
isFetchedAfterMount: boolean;
|
|
@@ -30,7 +30,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
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("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
33
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
34
34
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
35
35
|
promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>>;
|
|
36
36
|
teams: GroupResource[];
|
|
@@ -46,8 +46,8 @@ export declare const useTeamsToFilter: () => {
|
|
|
46
46
|
isSuccess: true;
|
|
47
47
|
isPlaceholderData: false;
|
|
48
48
|
status: "success";
|
|
49
|
-
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
50
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
49
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
50
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
51
51
|
hasNextPage: boolean;
|
|
52
52
|
hasPreviousPage: boolean;
|
|
53
53
|
isFetchingNextPage: boolean;
|
|
@@ -55,7 +55,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
55
55
|
dataUpdatedAt: number;
|
|
56
56
|
errorUpdatedAt: number;
|
|
57
57
|
failureCount: number;
|
|
58
|
-
failureReason:
|
|
58
|
+
failureReason: import("../../../types").ApiError | null;
|
|
59
59
|
errorUpdateCount: number;
|
|
60
60
|
isFetched: boolean;
|
|
61
61
|
isFetchedAfterMount: boolean;
|
|
@@ -64,12 +64,12 @@ export declare const useTeamsToFilter: () => {
|
|
|
64
64
|
isPaused: boolean;
|
|
65
65
|
isRefetching: boolean;
|
|
66
66
|
isStale: boolean;
|
|
67
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
67
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
68
68
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
69
69
|
promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>>;
|
|
70
70
|
teams: GroupResource[];
|
|
71
71
|
} | {
|
|
72
|
-
error:
|
|
72
|
+
error: import("../../../types").ApiError;
|
|
73
73
|
isError: true;
|
|
74
74
|
isPending: false;
|
|
75
75
|
isLoading: false;
|
|
@@ -80,8 +80,8 @@ export declare const useTeamsToFilter: () => {
|
|
|
80
80
|
isSuccess: false;
|
|
81
81
|
isPlaceholderData: false;
|
|
82
82
|
status: "error";
|
|
83
|
-
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
84
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
83
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
84
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
85
85
|
hasNextPage: boolean;
|
|
86
86
|
hasPreviousPage: boolean;
|
|
87
87
|
isFetchingNextPage: boolean;
|
|
@@ -89,7 +89,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
89
89
|
dataUpdatedAt: number;
|
|
90
90
|
errorUpdatedAt: number;
|
|
91
91
|
failureCount: number;
|
|
92
|
-
failureReason:
|
|
92
|
+
failureReason: import("../../../types").ApiError | null;
|
|
93
93
|
errorUpdateCount: number;
|
|
94
94
|
isFetched: boolean;
|
|
95
95
|
isFetchedAfterMount: boolean;
|
|
@@ -98,7 +98,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
98
98
|
isPaused: boolean;
|
|
99
99
|
isRefetching: boolean;
|
|
100
100
|
isStale: boolean;
|
|
101
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
101
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
102
102
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
103
103
|
promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>>;
|
|
104
104
|
teams: GroupResource[];
|
|
@@ -114,8 +114,8 @@ export declare const useTeamsToFilter: () => {
|
|
|
114
114
|
isSuccess: false;
|
|
115
115
|
isPlaceholderData: false;
|
|
116
116
|
status: "pending";
|
|
117
|
-
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
118
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
117
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
118
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
119
119
|
hasNextPage: boolean;
|
|
120
120
|
hasPreviousPage: boolean;
|
|
121
121
|
isFetchingNextPage: boolean;
|
|
@@ -123,7 +123,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
123
123
|
dataUpdatedAt: number;
|
|
124
124
|
errorUpdatedAt: number;
|
|
125
125
|
failureCount: number;
|
|
126
|
-
failureReason:
|
|
126
|
+
failureReason: import("../../../types").ApiError | null;
|
|
127
127
|
errorUpdateCount: number;
|
|
128
128
|
isFetched: boolean;
|
|
129
129
|
isFetchedAfterMount: boolean;
|
|
@@ -132,7 +132,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
132
132
|
isPaused: boolean;
|
|
133
133
|
isRefetching: boolean;
|
|
134
134
|
isStale: boolean;
|
|
135
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
135
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
136
136
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
137
137
|
promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>>;
|
|
138
138
|
teams: GroupResource[];
|
|
@@ -147,8 +147,8 @@ export declare const useTeamsToFilter: () => {
|
|
|
147
147
|
isSuccess: false;
|
|
148
148
|
isPlaceholderData: false;
|
|
149
149
|
status: "pending";
|
|
150
|
-
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
151
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
150
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
151
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
152
152
|
hasNextPage: boolean;
|
|
153
153
|
hasPreviousPage: boolean;
|
|
154
154
|
isFetchingNextPage: boolean;
|
|
@@ -156,7 +156,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
156
156
|
dataUpdatedAt: number;
|
|
157
157
|
errorUpdatedAt: number;
|
|
158
158
|
failureCount: number;
|
|
159
|
-
failureReason:
|
|
159
|
+
failureReason: import("../../../types").ApiError | null;
|
|
160
160
|
errorUpdateCount: number;
|
|
161
161
|
isFetched: boolean;
|
|
162
162
|
isFetchedAfterMount: boolean;
|
|
@@ -166,7 +166,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
166
166
|
isPaused: boolean;
|
|
167
167
|
isRefetching: boolean;
|
|
168
168
|
isStale: boolean;
|
|
169
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
169
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
170
170
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
171
171
|
promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>>;
|
|
172
172
|
teams: GroupResource[];
|
|
@@ -182,8 +182,8 @@ export declare const useTeamsToFilter: () => {
|
|
|
182
182
|
isFetchNextPageError: false;
|
|
183
183
|
isFetchPreviousPageError: false;
|
|
184
184
|
status: "success";
|
|
185
|
-
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
186
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
185
|
+
fetchNextPage: (options?: import("@tanstack/query-core").FetchNextPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
186
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
187
187
|
hasNextPage: boolean;
|
|
188
188
|
hasPreviousPage: boolean;
|
|
189
189
|
isFetchingNextPage: boolean;
|
|
@@ -191,7 +191,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
191
191
|
dataUpdatedAt: number;
|
|
192
192
|
errorUpdatedAt: number;
|
|
193
193
|
failureCount: number;
|
|
194
|
-
failureReason:
|
|
194
|
+
failureReason: import("../../../types").ApiError | null;
|
|
195
195
|
errorUpdateCount: number;
|
|
196
196
|
isFetched: boolean;
|
|
197
197
|
isFetchedAfterMount: boolean;
|
|
@@ -200,7 +200,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
200
200
|
isPaused: boolean;
|
|
201
201
|
isRefetching: boolean;
|
|
202
202
|
isStale: boolean;
|
|
203
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
203
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
204
204
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
205
205
|
promise: Promise<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>>;
|
|
206
206
|
teams: GroupResource[];
|
|
@@ -208,7 +208,7 @@ export declare const useTeamsToFilter: () => {
|
|
|
208
208
|
export interface FilteredGroup extends GroupResource, Partial<Pick<GroupsGroupResource, 'headerImage' | 'membershipsCount'>> {
|
|
209
209
|
}
|
|
210
210
|
export declare const useGroupsToFilter: () => {
|
|
211
|
-
error:
|
|
211
|
+
error: import("../../../types").ApiError;
|
|
212
212
|
isError: true;
|
|
213
213
|
isPending: false;
|
|
214
214
|
isLoading: false;
|
|
@@ -217,7 +217,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
217
217
|
isSuccess: false;
|
|
218
218
|
isPlaceholderData: false;
|
|
219
219
|
status: "error";
|
|
220
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
220
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
221
221
|
hasNextPage: boolean;
|
|
222
222
|
hasPreviousPage: boolean;
|
|
223
223
|
isFetchNextPageError: boolean;
|
|
@@ -227,7 +227,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
227
227
|
dataUpdatedAt: number;
|
|
228
228
|
errorUpdatedAt: number;
|
|
229
229
|
failureCount: number;
|
|
230
|
-
failureReason:
|
|
230
|
+
failureReason: import("../../../types").ApiError | null;
|
|
231
231
|
errorUpdateCount: number;
|
|
232
232
|
isFetched: boolean;
|
|
233
233
|
isFetchedAfterMount: boolean;
|
|
@@ -253,7 +253,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
253
253
|
isSuccess: true;
|
|
254
254
|
isPlaceholderData: false;
|
|
255
255
|
status: "success";
|
|
256
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
256
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
257
257
|
hasNextPage: boolean;
|
|
258
258
|
hasPreviousPage: boolean;
|
|
259
259
|
isFetchingNextPage: boolean;
|
|
@@ -261,7 +261,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
261
261
|
dataUpdatedAt: number;
|
|
262
262
|
errorUpdatedAt: number;
|
|
263
263
|
failureCount: number;
|
|
264
|
-
failureReason:
|
|
264
|
+
failureReason: import("../../../types").ApiError | null;
|
|
265
265
|
errorUpdateCount: number;
|
|
266
266
|
isFetched: boolean;
|
|
267
267
|
isFetchedAfterMount: boolean;
|
|
@@ -276,7 +276,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
276
276
|
fetchNextPage: () => void;
|
|
277
277
|
refetch: () => void;
|
|
278
278
|
} | {
|
|
279
|
-
error:
|
|
279
|
+
error: import("../../../types").ApiError;
|
|
280
280
|
isError: true;
|
|
281
281
|
isPending: false;
|
|
282
282
|
isLoading: false;
|
|
@@ -287,7 +287,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
287
287
|
isSuccess: false;
|
|
288
288
|
isPlaceholderData: false;
|
|
289
289
|
status: "error";
|
|
290
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
290
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
291
291
|
hasNextPage: boolean;
|
|
292
292
|
hasPreviousPage: boolean;
|
|
293
293
|
isFetchingNextPage: boolean;
|
|
@@ -295,7 +295,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
295
295
|
dataUpdatedAt: number;
|
|
296
296
|
errorUpdatedAt: number;
|
|
297
297
|
failureCount: number;
|
|
298
|
-
failureReason:
|
|
298
|
+
failureReason: import("../../../types").ApiError | null;
|
|
299
299
|
errorUpdateCount: number;
|
|
300
300
|
isFetched: boolean;
|
|
301
301
|
isFetchedAfterMount: boolean;
|
|
@@ -321,7 +321,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
321
321
|
isSuccess: false;
|
|
322
322
|
isPlaceholderData: false;
|
|
323
323
|
status: "pending";
|
|
324
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
324
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
325
325
|
hasNextPage: boolean;
|
|
326
326
|
hasPreviousPage: boolean;
|
|
327
327
|
isFetchingNextPage: boolean;
|
|
@@ -329,7 +329,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
329
329
|
dataUpdatedAt: number;
|
|
330
330
|
errorUpdatedAt: number;
|
|
331
331
|
failureCount: number;
|
|
332
|
-
failureReason:
|
|
332
|
+
failureReason: import("../../../types").ApiError | null;
|
|
333
333
|
errorUpdateCount: number;
|
|
334
334
|
isFetched: boolean;
|
|
335
335
|
isFetchedAfterMount: boolean;
|
|
@@ -354,7 +354,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
354
354
|
isSuccess: false;
|
|
355
355
|
isPlaceholderData: false;
|
|
356
356
|
status: "pending";
|
|
357
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
357
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
358
358
|
hasNextPage: boolean;
|
|
359
359
|
hasPreviousPage: boolean;
|
|
360
360
|
isFetchingNextPage: boolean;
|
|
@@ -362,7 +362,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
362
362
|
dataUpdatedAt: number;
|
|
363
363
|
errorUpdatedAt: number;
|
|
364
364
|
failureCount: number;
|
|
365
|
-
failureReason:
|
|
365
|
+
failureReason: import("../../../types").ApiError | null;
|
|
366
366
|
errorUpdateCount: number;
|
|
367
367
|
isFetched: boolean;
|
|
368
368
|
isFetchedAfterMount: boolean;
|
|
@@ -389,7 +389,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
389
389
|
isFetchNextPageError: false;
|
|
390
390
|
isFetchPreviousPageError: false;
|
|
391
391
|
status: "success";
|
|
392
|
-
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>,
|
|
392
|
+
fetchPreviousPage: (options?: import("@tanstack/query-core").FetchPreviousPageOptions) => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<import("../../../types").ApiCollection<GroupResource>, unknown>, import("../../../types").ApiError>>;
|
|
393
393
|
hasNextPage: boolean;
|
|
394
394
|
hasPreviousPage: boolean;
|
|
395
395
|
isFetchingNextPage: boolean;
|
|
@@ -397,7 +397,7 @@ export declare const useGroupsToFilter: () => {
|
|
|
397
397
|
dataUpdatedAt: number;
|
|
398
398
|
errorUpdatedAt: number;
|
|
399
399
|
failureCount: number;
|
|
400
|
-
failureReason:
|
|
400
|
+
failureReason: import("../../../types").ApiError | null;
|
|
401
401
|
errorUpdateCount: number;
|
|
402
402
|
isFetched: boolean;
|
|
403
403
|
isFetchedAfterMount: boolean;
|
|
@@ -22,7 +22,7 @@ export const useGroupsToFilter = () => {
|
|
|
22
22
|
};
|
|
23
23
|
const filteredGroups = useMemo(() => groups
|
|
24
24
|
.map(group => {
|
|
25
|
-
const groupsGroup = groupsData.find(g => group.id
|
|
25
|
+
const groupsGroup = groupsData.find(g => group.id === `Groups-Group-${g.id}`);
|
|
26
26
|
const { membershipsCount, headerImage } = groupsGroup || {};
|
|
27
27
|
return {
|
|
28
28
|
...group,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/hooks/filters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAInD,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE,CAAA;IAEhD,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,CAAA;AAC3B,CAAC,CAAA;AAMD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,EACJ,IAAI,EAAE,MAAM,GAAG,EAAE,EACjB,aAAa,EAAE,eAAe,EAC9B,OAAO,EAAE,aAAa,EACtB,GAAG,IAAI,EACR,GAAG,SAAS,CAAC;QACZ,eAAe,EAAE,QAAQ;QACzB,WAAW,EAAE,OAAO;KACrB,CAAC,CAAA;IAE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Z,eAAe,EAAE,QAAQ;QACzB,WAAW,EAAE,OAAO;KACrB,CAAC,CAAA;IAEF,MAAM,EACJ,IAAI,EAAE,UAAU,GAAG,EAAE,EACrB,aAAa,EAAE,qBAAqB,EACpC,OAAO,EAAE,mBAAmB,GAC7B,GAAG,eAAe,EAAE,CAAA;IAErB,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,aAAa,EAAE,CAAA;QACf,mBAAmB,EAAE,CAAA;IACvB,CAAC,CAAA;IAED,MAAM,mBAAmB,GAAG,GAAG,EAAE;QAC/B,eAAe,EAAE,CAAA;QACjB,qBAAqB,EAAE,CAAA;IACzB,CAAC,CAAA;IAED,MAAM,cAAc,GAAoB,OAAO,CAC7C,GAAG,EAAE,CACH,MAAM;SACH,GAAG,CAAC,KAAK,CAAC,EAAE;QACX,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QAC7E,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,WAAW,IAAI,EAAE,CAAA;QAE3D,OAAO;YACL,GAAG,KAAK;YACR,gBAAgB;YAChB,WAAW;SACZ,CAAA;IACH,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,WAAW,CAAC,EAC1C,CAAC,MAAM,EAAE,UAAU,CAAC,CACrB,CAAA;IAED,OAAO;QACL,MAAM,EAAE,cAAc;QACtB,aAAa,EAAE,mBAAmB;QAClC,OAAO,EAAE,aAAa;QACtB,GAAG,IAAI;KACR,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { useMemo } from 'react'\nimport { useGroups } from '../../../hooks/use_groups'\nimport { useGroupsGroups } from '../../../hooks/use_groups_groups'\nimport { useTeams } from '../../../hooks/use_teams'\nimport { GroupResource } from '../../../types/resources/group_resource'\nimport { GroupsGroupResource } from '../../../types'\n\nexport const useTeamsToFilter = () => {\n const { data: teams = [], ...rest } = useTeams()\n\n return { teams, ...rest }\n}\n\nexport interface FilteredGroup\n extends GroupResource,\n Partial<Pick<GroupsGroupResource, 'headerImage' | 'membershipsCount'>> {}\n\nexport const useGroupsToFilter = () => {\n const {\n data: groups = [],\n fetchNextPage: fetchNextGroups,\n refetch: refetchGroups,\n ...rest\n } = useGroups({\n source_app_name: 'Groups',\n source_type: 'Group',\n })\n\n const {\n data: groupsData = [],\n fetchNextPage: fetchNextGroupsGroups,\n refetch: refetchGroupsGroups,\n } = useGroupsGroups()\n\n const handleRefetch = () => {\n refetchGroups()\n refetchGroupsGroups()\n }\n\n const handleFetchNextPage = () => {\n fetchNextGroups()\n fetchNextGroupsGroups()\n }\n\n const filteredGroups: FilteredGroup[] = useMemo(\n () =>\n groups\n .map(group => {\n const groupsGroup = groupsData.find(g => group.id === `Groups-Group-${g.id}`)\n const { membershipsCount, headerImage } = groupsGroup || {}\n\n return {\n ...group,\n membershipsCount,\n headerImage,\n }\n })\n .filter(g => typeof g !== 'undefined'),\n [groups, groupsData]\n )\n\n return {\n groups: filteredGroups,\n fetchNextPage: handleFetchNextPage,\n refetch: handleRefetch,\n ...rest,\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FlashListProps } from '@shopify/flash-list';
|
|
3
|
+
import { MemberResource } from '../../../types';
|
|
4
|
+
interface FormListProps {
|
|
5
|
+
memberData: MemberResource[];
|
|
6
|
+
FormContent?: FlashListProps<MemberResource>['ListHeaderComponent'];
|
|
7
|
+
listEmptyText?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormList: ({ memberData, FormContent, listEmptyText }: FormListProps) => React.JSX.Element;
|
|
10
|
+
export declare const Divider: () => React.JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=form_list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form_list.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/form_list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAI/C,UAAU,aAAa;IACrB,UAAU,EAAE,cAAc,EAAE,CAAA;IAC5B,WAAW,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC,qBAAqB,CAAC,CAAA;IACnE,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,eAAO,MAAM,QAAQ,+CAAgD,aAAa,sBAajF,CAAA;AAYD,eAAO,MAAM,OAAO,yBAInB,CAAA"}
|