@planningcenter/chat-react-native 3.2.0-rc.1 → 3.2.0-rc.11
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/conversation/message_reaction.d.ts +2 -2
- package/build/components/conversations/action_toggle_button.d.ts +21 -0
- package/build/components/conversations/action_toggle_button.d.ts.map +1 -0
- package/build/components/conversations/action_toggle_button.js +48 -0
- package/build/components/conversations/action_toggle_button.js.map +1 -0
- package/build/components/conversations/conversation_actions.d.ts +10 -0
- package/build/components/conversations/conversation_actions.d.ts.map +1 -0
- package/build/components/conversations/conversation_actions.js +84 -0
- package/build/components/conversations/conversation_actions.js.map +1 -0
- package/build/components/conversations/conversation_preview.d.ts +2 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +27 -9
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.d.ts +2 -3
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +5 -11
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/mute_indicator.d.ts +5 -0
- package/build/components/conversations/mute_indicator.d.ts.map +1 -0
- package/build/components/conversations/mute_indicator.js +19 -0
- package/build/components/conversations/mute_indicator.js.map +1 -0
- package/build/components/conversations/unread_count_badge.d.ts +2 -1
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -1
- package/build/components/conversations/unread_count_badge.js +9 -1
- package/build/components/conversations/unread_count_badge.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/badge.d.ts +5 -4
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +5 -2
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/button.d.ts +3 -2
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/icon.d.ts +14 -1
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +9 -0
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_button.d.ts +2 -2
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.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/display/text.js.map +1 -1
- package/build/components/display/toggle_button.d.ts +3 -2
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/utils/button_colors.d.ts +3 -3
- package/build/components/display/utils/button_colors.d.ts.map +1 -1
- package/build/components/display/utils/button_colors.js +1 -1
- package/build/components/display/utils/button_colors.js.map +1 -1
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
- package/build/components/primitive/avatar_primitive.js +3 -2
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.d.ts +2 -1
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +0 -1
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +2 -0
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +6 -1
- 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 +214 -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 +50 -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_conversation.d.ts +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +1 -1
- package/build/hooks/use_conversation.js.map +1 -1
- 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_create_android_ripple_color.d.ts +1 -1
- package/build/hooks/use_create_android_ripple_color.d.ts.map +1 -1
- 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_jolt.d.ts.map +1 -1
- package/build/hooks/use_jolt.js +39 -10
- 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/navigation/index.d.ts +23 -6
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +25 -8
- package/build/navigation/index.js.map +1 -1
- 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.map +1 -0
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +2 -1
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +19 -14
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- 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 +101 -0
- package/build/screens/conversation_new/components/groups_form.js.map +1 -0
- package/build/screens/conversation_new/components/member_error_card.d.ts +5 -0
- package/build/screens/conversation_new/components/member_error_card.d.ts.map +1 -0
- package/build/screens/conversation_new/components/member_error_card.js +17 -0
- package/build/screens/conversation_new/components/member_error_card.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 +12 -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_new/utils/fake_member_data.d.ts +3 -0
- package/build/screens/conversation_new/utils/fake_member_data.d.ts.map +1 -0
- package/build/screens/conversation_new/utils/fake_member_data.js +129 -0
- package/build/screens/conversation_new/utils/fake_member_data.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/conversation_select_recipients_screen.d.ts.map +1 -0
- package/build/screens/{create → conversation_select_recipients}/conversation_select_recipients_screen.js +6 -5
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +1 -0
- package/build/screens/conversations/components/chat_group_badge.js +1 -1
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +6 -2
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +6 -13
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.js +1 -0
- package/build/screens/design_system_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 +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 +98 -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/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 +2 -2
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js +12 -4
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/client/request_helpers.d.ts +15 -8
- package/build/utils/client/request_helpers.d.ts.map +1 -1
- package/build/utils/client/request_helpers.js +2 -1
- package/build/utils/client/request_helpers.js.map +1 -1
- package/build/utils/client/transform_request_data.d.ts +11 -6
- package/build/utils/client/transform_request_data.d.ts.map +1 -1
- package/build/utils/client/transform_request_data.js +1 -1
- package/build/utils/client/transform_request_data.js.map +1 -1
- package/build/utils/client/transform_response.d.ts +1 -1
- package/build/utils/client/transform_response.d.ts.map +1 -1
- package/build/utils/client/transform_response.js +2 -0
- package/build/utils/client/transform_response.js.map +1 -1
- package/build/utils/client/utils.d.ts +3 -3
- package/build/utils/client/utils.d.ts.map +1 -1
- package/build/utils/client/utils.js +6 -6
- package/build/utils/client/utils.js.map +1 -1
- package/build/utils/date.d.ts.map +1 -1
- package/build/utils/date.js +1 -0
- package/build/utils/date.js.map +1 -1
- package/build/utils/deepCamelCaseKeys.d.ts.map +1 -1
- package/build/utils/deepCamelCaseKeys.js +3 -1
- package/build/utils/deepCamelCaseKeys.js.map +1 -1
- package/build/utils/parse_simple_markdown.d.ts +1 -1
- package/build/utils/parse_simple_markdown.d.ts.map +1 -1
- package/build/utils/parse_simple_markdown.js +2 -1
- package/build/utils/parse_simple_markdown.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/space.js.map +1 -1
- package/build/utils/uri.d.ts +2 -2
- package/build/utils/uri.d.ts.map +1 -1
- package/build/utils/uri.js +2 -2
- package/build/utils/uri.js.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts +8 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.js +8 -0
- package/build/vendor/tapestry/alias_tokens_color_map.js.map +1 -1
- package/build/vendor/tapestry/tokens.d.ts +2 -0
- package/build/vendor/tapestry/tokens.d.ts.map +1 -1
- package/build/vendor/tapestry/tokens.js +2 -0
- package/build/vendor/tapestry/tokens.js.map +1 -1
- package/package.json +8 -6
- package/src/__tests__/utils/cache/page_mutations.ts +49 -15
- package/src/components/conversation/message_form.tsx +127 -58
- package/src/components/conversations/action_toggle_button.tsx +84 -0
- package/src/components/conversations/conversation_actions.tsx +146 -0
- package/src/components/conversations/conversation_preview.tsx +46 -16
- package/src/components/conversations/conversations.tsx +13 -18
- package/src/components/conversations/mute_indicator.tsx +21 -0
- package/src/components/conversations/unread_count_badge.tsx +8 -1
- package/src/components/display/action_button.tsx +4 -3
- package/src/components/display/badge.tsx +12 -8
- package/src/components/display/button.tsx +3 -3
- package/src/components/display/icon.tsx +16 -3
- package/src/components/display/icon_button.tsx +2 -2
- package/src/components/display/person.tsx +4 -3
- package/src/components/display/text.tsx +1 -1
- package/src/components/display/toggle_button.tsx +3 -3
- package/src/components/display/utils/button_colors.ts +8 -3
- package/src/components/primitive/avatar_primitive.tsx +5 -3
- package/src/components/primitive/banner_primitive.tsx +2 -3
- package/src/contexts/api_provider.tsx +1 -1
- package/src/contexts/chat_context.tsx +8 -1
- package/src/contexts/conversations_context.tsx +69 -0
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +57 -0
- package/src/hooks/groups/use_groups_conversation_create.ts +50 -0
- package/src/hooks/use_conversation.ts +5 -5
- 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 +53 -12
- package/src/hooks/use_message_create.ts +55 -0
- package/src/navigation/index.tsx +31 -8
- package/src/screens/conversation_filters/components/conversation_filters.tsx +1 -1
- package/src/screens/conversation_filters/components/rows.tsx +44 -14
- 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 +153 -0
- package/src/screens/conversation_new/components/member_error_card.tsx +20 -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 +26 -0
- package/src/screens/conversation_new/utils/fake_member_data.ts +130 -0
- package/src/screens/conversation_screen.tsx +2 -1
- package/src/screens/{create → conversation_select_recipients}/conversation_select_recipients_screen.tsx +6 -5
- package/src/screens/conversations/components/chat_group_badge.tsx +1 -1
- package/src/screens/conversations/components/list_header_component.tsx +7 -2
- package/src/screens/conversations/conversations_screen.tsx +6 -19
- package/src/screens/design_system_screen.tsx +1 -0
- package/src/screens/message_actions_screen.tsx +4 -4
- package/src/screens/send_giphy_screen.tsx +155 -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/utils/cache/page_mutations.ts +22 -0
- package/src/utils/client/client.ts +15 -7
- package/src/utils/client/request_helpers.ts +15 -6
- package/src/utils/client/transform_request_data.ts +13 -4
- package/src/utils/client/transform_response.ts +3 -0
- package/src/utils/client/types.d.ts +2 -1
- package/src/utils/client/utils.ts +13 -12
- package/src/utils/date.ts +1 -0
- package/src/utils/deepCamelCaseKeys.ts +3 -2
- package/src/utils/parse_simple_markdown.ts +3 -1
- package/src/utils/request/conversation.ts +39 -34
- package/src/utils/space.ts +1 -1
- package/src/utils/uri.ts +2 -2
- package/src/vendor/tapestry/alias_tokens_color_map.ts +12 -0
- package/src/vendor/tapestry/tokens.ts +2 -0
- 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 -123
- 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.map +0 -1
- package/build/screens/create/conversation_select_recipients_screen.d.ts.map +0 -1
- package/build/screens/create/conversation_select_recipients_screen.js.map +0 -1
- package/src/screens/create/conversation_create_screen.tsx +0 -148
- /package/build/screens/{create → conversation_filter_recipients}/conversation_filter_recipients_screen.d.ts +0 -0
- /package/build/screens/{create → conversation_filter_recipients}/conversation_filter_recipients_screen.js +0 -0
- /package/build/screens/{create → conversation_select_recipients}/conversation_select_recipients_screen.d.ts +0 -0
- /package/src/screens/{create → conversation_filter_recipients}/conversation_filter_recipients_screen.tsx +0 -0
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'
|
|
2
|
-
import React, { useCallback, useState } from 'react'
|
|
3
|
-
import { StyleSheet, TextInput, View } from 'react-native'
|
|
4
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
5
|
-
import { Text } from '../../components'
|
|
6
|
-
import { ActionButton } from '../../components/display/action_button'
|
|
7
|
-
import { useSuspenseGet, useTheme } from '../../hooks'
|
|
8
|
-
import { useApiClient } from '../../hooks/use_api_client'
|
|
9
|
-
import { useMutation } from '@tanstack/react-query'
|
|
10
|
-
import { GroupsGroupResource } from '../../types'
|
|
11
|
-
|
|
12
|
-
type ConversationCreateScreenProps = StaticScreenProps<{
|
|
13
|
-
group_id?: string
|
|
14
|
-
team_ids?: string[]
|
|
15
|
-
}>
|
|
16
|
-
|
|
17
|
-
export const ConversationCreateScreen = ({ route }: ConversationCreateScreenProps) => {
|
|
18
|
-
const styles = useStyles()
|
|
19
|
-
const navigation = useNavigation()
|
|
20
|
-
const [title, setTitle] = useState<string>()
|
|
21
|
-
const apiClient = useApiClient()
|
|
22
|
-
const { data: group } = useSuspenseGet<GroupsGroupResource>({
|
|
23
|
-
url: `/me/groups/${route.params.group_id}`,
|
|
24
|
-
data: {
|
|
25
|
-
fields: {
|
|
26
|
-
Group: [],
|
|
27
|
-
},
|
|
28
|
-
include: ['location'],
|
|
29
|
-
},
|
|
30
|
-
app: 'groups',
|
|
31
|
-
})
|
|
32
|
-
const { mutate: handleSave } = useMutation({
|
|
33
|
-
throwOnError: true,
|
|
34
|
-
onSuccess: result => {
|
|
35
|
-
handleRedirectToConversation({ conversation_id: result.data.id })
|
|
36
|
-
},
|
|
37
|
-
mutationFn: () =>
|
|
38
|
-
apiClient.groups
|
|
39
|
-
.post({
|
|
40
|
-
url: `/me/groups/${route.params.group_id}/chat_conversation_payload`,
|
|
41
|
-
data: {
|
|
42
|
-
data: {
|
|
43
|
-
type: '',
|
|
44
|
-
attributes: {
|
|
45
|
-
title,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
})
|
|
50
|
-
.then(res => res.data.value)
|
|
51
|
-
.then(payload =>
|
|
52
|
-
apiClient.chat.post({
|
|
53
|
-
url: '/me/conversations',
|
|
54
|
-
data: {
|
|
55
|
-
data: {
|
|
56
|
-
type: 'Conversation',
|
|
57
|
-
attributes: {
|
|
58
|
-
payload,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
})
|
|
63
|
-
),
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
const handleRedirectToConversation = useCallback(
|
|
67
|
-
({ conversation_id }: { conversation_id: number }) => {
|
|
68
|
-
// exit from the create stack
|
|
69
|
-
navigation.getParent()?.goBack()
|
|
70
|
-
// navigate to the conversation screen
|
|
71
|
-
navigation.dispatch(
|
|
72
|
-
StackActions.push('Conversation', {
|
|
73
|
-
conversation_id,
|
|
74
|
-
})
|
|
75
|
-
)
|
|
76
|
-
},
|
|
77
|
-
[navigation]
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<View style={styles.container}>
|
|
82
|
-
<View style={styles.section}>
|
|
83
|
-
<View style={styles.to}>
|
|
84
|
-
<Text>To:</Text>
|
|
85
|
-
<View>
|
|
86
|
-
<Text>{group.name}</Text>
|
|
87
|
-
<Text>{group.membershipsCount} members</Text>
|
|
88
|
-
</View>
|
|
89
|
-
</View>
|
|
90
|
-
<View style={styles.titleContainer}>
|
|
91
|
-
<Text style={styles.titleLabel}>Title</Text>
|
|
92
|
-
<TextInput
|
|
93
|
-
placeholder="Topic of conversation (required)"
|
|
94
|
-
value={title}
|
|
95
|
-
onChangeText={setTitle}
|
|
96
|
-
style={styles.titleInput}
|
|
97
|
-
/>
|
|
98
|
-
</View>
|
|
99
|
-
</View>
|
|
100
|
-
<ActionButton title="Start Conversation" onPress={() => handleSave()} />
|
|
101
|
-
</View>
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const useStyles = () => {
|
|
106
|
-
const { bottom } = useSafeAreaInsets()
|
|
107
|
-
const theme = useTheme()
|
|
108
|
-
|
|
109
|
-
return StyleSheet.create({
|
|
110
|
-
container: {
|
|
111
|
-
flex: 1,
|
|
112
|
-
gap: 8,
|
|
113
|
-
},
|
|
114
|
-
section: {
|
|
115
|
-
padding: 16,
|
|
116
|
-
flex: 1,
|
|
117
|
-
},
|
|
118
|
-
sectionHeader: {
|
|
119
|
-
flexDirection: 'row',
|
|
120
|
-
justifyContent: 'space-between',
|
|
121
|
-
},
|
|
122
|
-
selectTeamsButton: {},
|
|
123
|
-
routeDebug: {
|
|
124
|
-
alignContent: 'center',
|
|
125
|
-
padding: 16,
|
|
126
|
-
paddingBottom: bottom,
|
|
127
|
-
borderTopWidth: 1,
|
|
128
|
-
borderTopColor: theme.colors.fillColorNeutral050Base,
|
|
129
|
-
},
|
|
130
|
-
titleContainer: {
|
|
131
|
-
paddingVertical: 12,
|
|
132
|
-
borderBottomWidth: 1,
|
|
133
|
-
borderBottomColor: theme.colors.fillColorNeutral050Base,
|
|
134
|
-
gap: 8,
|
|
135
|
-
},
|
|
136
|
-
titleInput: {
|
|
137
|
-
fontSize: 18,
|
|
138
|
-
},
|
|
139
|
-
titleLabel: {},
|
|
140
|
-
to: {
|
|
141
|
-
flexDirection: 'row',
|
|
142
|
-
gap: 8,
|
|
143
|
-
paddingVertical: 12,
|
|
144
|
-
borderBottomWidth: 1,
|
|
145
|
-
borderBottomColor: theme.colors.fillColorNeutral050Base,
|
|
146
|
-
},
|
|
147
|
-
})
|
|
148
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|