@planningcenter/chat-react-native 2.2.2-rc.1 → 2.3.0-rc.0
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/conversations.d.ts.map +1 -1
- package/build/components/conversations.js +4 -0
- package/build/components/conversations.js.map +1 -1
- package/build/components/display/action_button.d.ts +8 -0
- package/build/components/display/action_button.d.ts.map +1 -0
- package/build/components/display/action_button.js +44 -0
- package/build/components/display/action_button.js.map +1 -0
- package/build/contexts/api_provider.js +2 -2
- package/build/contexts/api_provider.js.map +1 -1
- package/build/hooks/index.d.ts +2 -0
- package/build/hooks/index.d.ts.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use_api.d.ts +383 -0
- package/build/hooks/use_api.d.ts.map +1 -0
- package/build/hooks/use_api.js +40 -0
- package/build/hooks/use_api.js.map +1 -0
- package/build/hooks/use_api_client.d.ts +5 -3
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js +1 -1
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_chat_permissions.d.ts +172 -0
- package/build/hooks/use_chat_permissions.d.ts.map +1 -0
- package/build/hooks/use_chat_permissions.js +17 -0
- package/build/hooks/use_chat_permissions.js.map +1 -0
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +6 -5
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_suspense_api.d.ts +13 -4
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +1 -0
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/navigation/index.d.ts +123 -2
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +40 -4
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.js +1 -1
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/screens/create/conversation_create_screen.d.ts +9 -0
- package/build/screens/create/conversation_create_screen.d.ts.map +1 -0
- package/build/screens/create/conversation_create_screen.js +123 -0
- package/build/screens/create/conversation_create_screen.js.map +1 -0
- package/build/screens/create/conversation_filter_recipients_screen.d.ts +8 -0
- package/build/screens/create/conversation_filter_recipients_screen.d.ts.map +1 -0
- package/build/screens/create/conversation_filter_recipients_screen.js +52 -0
- package/build/screens/create/conversation_filter_recipients_screen.js.map +1 -0
- package/build/screens/create/conversation_select_recipients_screen.d.ts +8 -0
- package/build/screens/create/conversation_select_recipients_screen.d.ts.map +1 -0
- package/build/screens/create/conversation_select_recipients_screen.js +105 -0
- package/build/screens/create/conversation_select_recipients_screen.js.map +1 -0
- package/build/types/resources/app_grant.d.ts +6 -0
- package/build/types/resources/app_grant.d.ts.map +1 -0
- package/build/types/resources/app_grant.js +2 -0
- package/build/types/resources/app_grant.js.map +1 -0
- package/build/types/resources/groups/groups_group_resource.d.ts +12 -0
- package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -0
- package/build/types/resources/groups/groups_group_resource.js +2 -0
- package/build/types/resources/groups/groups_group_resource.js.map +1 -0
- package/build/types/resources/groups/index.d.ts +2 -0
- package/build/types/resources/groups/index.d.ts.map +1 -0
- package/build/types/resources/groups/index.js +2 -0
- package/build/types/resources/groups/index.js.map +1 -0
- package/build/types/resources/index.d.ts +2 -0
- package/build/types/resources/index.d.ts.map +1 -1
- package/build/types/resources/index.js +2 -0
- package/build/types/resources/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/conversations.tsx +8 -0
- package/src/components/display/action_button.tsx +62 -0
- package/src/contexts/api_provider.tsx +2 -2
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use_api.ts +80 -0
- package/src/hooks/use_api_client.ts +13 -15
- package/src/hooks/use_chat_permissions.ts +20 -0
- package/src/hooks/use_conversation.ts +6 -5
- package/src/hooks/use_suspense_api.ts +16 -4
- package/src/index.tsx +1 -1
- package/src/navigation/index.tsx +46 -7
- package/src/navigation/screenLayout.tsx +1 -1
- package/src/screens/create/conversation_create_screen.tsx +148 -0
- package/src/screens/create/conversation_filter_recipients_screen.tsx +79 -0
- package/src/screens/create/conversation_select_recipients_screen.tsx +136 -0
- package/src/types/resources/app_grant.ts +6 -0
- package/src/types/resources/groups/groups_group_resource.ts +12 -0
- package/src/types/resources/groups/index.ts +1 -0
- package/src/types/resources/index.ts +2 -0
- package/build/contexts/index.d.ts +0 -3
- package/build/contexts/index.d.ts.map +0 -1
- package/build/contexts/index.js +0 -3
- package/build/contexts/index.js.map +0 -1
- package/src/contexts/index.ts +0 -2
|
@@ -1,15 +1,47 @@
|
|
|
1
|
-
import { HeaderBackButton
|
|
1
|
+
import { HeaderBackButton } from '@react-navigation/elements';
|
|
2
2
|
import { createNativeStackNavigator, } from '@react-navigation/native-stack';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Icon } from '../components';
|
|
5
5
|
import { ConversationDetailsScreen } from '../screens/conversation_details_screen';
|
|
6
6
|
import { ConversationScreen } from '../screens/conversation_screen';
|
|
7
7
|
import { ConversationsScreen } from '../screens/conversations_screen';
|
|
8
|
+
import { ConversationCreateScreen } from '../screens/create/conversation_create_screen';
|
|
9
|
+
import { ConversationFilterReceipientsScreenOptions, ConversationFilterRecipientsScreen, } from '../screens/create/conversation_filter_recipients_screen';
|
|
10
|
+
import { ConversationSelectRecipientsScreen } from '../screens/create/conversation_select_recipients_screen';
|
|
8
11
|
import { MessageActionsScreen, MessageActionsScreenOptions, } from '../screens/message_actions_screen';
|
|
9
12
|
import { NotFound } from '../screens/not_found';
|
|
10
13
|
import { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen';
|
|
11
14
|
import { HeaderRightButton } from './header';
|
|
12
15
|
import { ScreenLayout } from './screenLayout';
|
|
16
|
+
export const CreateConversationStack = createNativeStackNavigator({
|
|
17
|
+
initialRouteName: 'ConversationSelectRecipients',
|
|
18
|
+
screenOptions: {
|
|
19
|
+
headerBackButtonDisplayMode: 'minimal',
|
|
20
|
+
},
|
|
21
|
+
screenLayout: ScreenLayout,
|
|
22
|
+
screens: {
|
|
23
|
+
ConversationSelectRecipients: {
|
|
24
|
+
screen: ConversationSelectRecipientsScreen,
|
|
25
|
+
options: ({ navigation }) => ({
|
|
26
|
+
title: 'New conversation',
|
|
27
|
+
headerRight: (props) => (<HeaderRightButton {...props} onPress={navigation.goBack}>
|
|
28
|
+
Cancel
|
|
29
|
+
</HeaderRightButton>),
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
ConversationFilterRecipients: {
|
|
33
|
+
screen: ConversationFilterRecipientsScreen,
|
|
34
|
+
options: ConversationFilterReceipientsScreenOptions,
|
|
35
|
+
},
|
|
36
|
+
ConversationCreate: {
|
|
37
|
+
screen: ConversationCreateScreen,
|
|
38
|
+
options: {
|
|
39
|
+
title: 'New conversation',
|
|
40
|
+
headerLeft: () => null,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
13
45
|
export const ChatStack = createNativeStackNavigator({
|
|
14
46
|
screenOptions: {
|
|
15
47
|
headerBackButtonDisplayMode: 'minimal',
|
|
@@ -20,9 +52,6 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
20
52
|
screen: ConversationsScreen,
|
|
21
53
|
options: ({ route, navigation }) => ({
|
|
22
54
|
headerTitle: route.params?.title ?? 'Chat',
|
|
23
|
-
headerLeft: ({ tintColor }) => (<HeaderButton>
|
|
24
|
-
<Icon name="general.threeReducingHorizontalBars" size={18} color={tintColor}/>
|
|
25
|
-
</HeaderButton>),
|
|
26
55
|
headerRight: (props) => (<HeaderBackButton backImage={() => <Icon name="general.x" size={18} color={props.tintColor}/>} onPress={navigation.goBack} {...props}/>),
|
|
27
56
|
}),
|
|
28
57
|
},
|
|
@@ -39,6 +68,13 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
39
68
|
</HeaderRightButton>),
|
|
40
69
|
}),
|
|
41
70
|
},
|
|
71
|
+
Create: {
|
|
72
|
+
screen: CreateConversationStack,
|
|
73
|
+
options: {
|
|
74
|
+
headerShown: false,
|
|
75
|
+
presentation: 'modal',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
42
78
|
MessageActions: {
|
|
43
79
|
screen: MessageActionsScreen,
|
|
44
80
|
// Something about sheetAllowedDetents declared inline breaks TS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,yDAAyD,CAAA;AAChE,OAAO,EAAE,kCAAkC,EAAE,MAAM,yDAAyD,CAAA;AAC5G,OAAO,EACL,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AA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AAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAG,CAAC,CAC7E,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAC3B,IAAI,KAAK,CAAC,EACV,CACH;aACF,CAAC;SACH;QACD,YAAY,EAAE;YACZ,MAAM,EAAE,kBAAkB;SAC3B;QACD,mBAAmB,EAAE;YACnB,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC5B,YAAY,EAAE,OAAO;gBACrB,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EAAE,CAAC,KAAkC,EAAE,EAAE,CAAC,CACnD,CAAC,iBAAiB,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CACvD;;UACF,EAAE,iBAAiB,CAAC,CACrB;aACF,CAAC;SACH;QACD,MAAM,EAAE;YACN,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE;gBACP,WAAW,EAAE,KAAK;gBAClB,YAAY,EAAE,OAAO;aACtB;SACF;QACD,cAAc,EAAE;YACd,MAAM,EAAE,oBAAoB;YAC5B,gEAAgE;YAChE,OAAO,EAAE,2BAA2B;SACrC;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK;aACb;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport React from 'react'\nimport { Icon } from '../components'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport { ConversationScreen } from '../screens/conversation_screen'\nimport { ConversationsScreen } from '../screens/conversations_screen'\nimport { ConversationCreateScreen } from '../screens/create/conversation_create_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/create/conversation_filter_recipients_screen'\nimport { ConversationSelectRecipientsScreen } from '../screens/create/conversation_select_recipients_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { NotFound } from '../screens/not_found'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { HeaderRightButton } from './header'\nimport { ScreenLayout } from './screenLayout'\n\nexport const CreateConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationSelectRecipients',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayout,\n screens: {\n ConversationSelectRecipients: {\n screen: ConversationSelectRecipientsScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton {...props} onPress={navigation.goBack}>\n Cancel\n </HeaderRightButton>\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationCreate: {\n screen: ConversationCreateScreen,\n options: {\n title: 'New conversation',\n headerLeft: () => null,\n },\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayout,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n Conversation: {\n screen: ConversationScreen,\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderRightButton {...props} onPress={navigation.goBack}>\n Done\n </HeaderRightButton>\n ),\n }),\n },\n Create: {\n screen: CreateConversationStack,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ErrorBoundary from '../components/page/error_boundary';
|
|
3
3
|
import { Suspense } from 'react';
|
|
4
|
-
import { ApiProvider } from '../contexts';
|
|
4
|
+
import { ApiProvider } from '../contexts/api_provider';
|
|
5
5
|
import { DefaultLoading } from '../components/page/loading';
|
|
6
6
|
export function ScreenLayout({ children }) {
|
|
7
7
|
return (<ApiProvider>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenLayout.js","sourceRoot":"","sources":["../../src/navigation/screenLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,aAAa,MAAM,mCAAmC,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"screenLayout.js","sourceRoot":"","sources":["../../src/navigation/screenLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,aAAa,MAAM,mCAAmC,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAE3D,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAoC;IACzE,OAAO,CACL,CAAC,WAAW,CACV;MAAA,CAAC,aAAa,CACZ;QAAA,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,AAAD,EAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAC9D;MAAA,EAAE,aAAa,CACjB;IAAA,EAAE,WAAW,CAAC,CACf,CAAA;AACH,CAAC","sourcesContent":["import React from 'react'\nimport ErrorBoundary from '../components/page/error_boundary'\nimport { Suspense } from 'react'\nimport { ApiProvider } from '../contexts/api_provider'\nimport { DefaultLoading } from '../components/page/loading'\n\nexport function ScreenLayout({ children }: { children: React.ReactElement }) {\n return (\n <ApiProvider>\n <ErrorBoundary>\n <Suspense fallback={<DefaultLoading />}>{children}</Suspense>\n </ErrorBoundary>\n </ApiProvider>\n )\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type ConversationCreateScreenProps = StaticScreenProps<{
|
|
4
|
+
group_id?: string;
|
|
5
|
+
team_ids?: string[];
|
|
6
|
+
}>;
|
|
7
|
+
export declare const ConversationCreateScreen: ({ route }: ConversationCreateScreenProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=conversation_create_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_create_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/create/conversation_create_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAgC,MAAM,OAAO,CAAA;AAUpD,KAAK,6BAA6B,GAAG,iBAAiB,CAAC;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB,CAAC,CAAA;AAEF,eAAO,MAAM,wBAAwB,cAAe,6BAA6B,sBAsFhF,CAAA"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { StackActions, 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
|
+
export const ConversationCreateScreen = ({ route }) => {
|
|
11
|
+
const styles = useStyles();
|
|
12
|
+
const navigation = useNavigation();
|
|
13
|
+
const [title, setTitle] = useState();
|
|
14
|
+
const apiClient = useApiClient();
|
|
15
|
+
const { data: group } = useSuspenseGet({
|
|
16
|
+
url: `/me/groups/${route.params.group_id}`,
|
|
17
|
+
data: {
|
|
18
|
+
fields: {
|
|
19
|
+
Group: [],
|
|
20
|
+
},
|
|
21
|
+
include: ['location'],
|
|
22
|
+
},
|
|
23
|
+
app: 'groups',
|
|
24
|
+
});
|
|
25
|
+
const { mutate: handleSave } = useMutation({
|
|
26
|
+
throwOnError: true,
|
|
27
|
+
onSuccess: result => {
|
|
28
|
+
handleRedirectToConversation({ conversation_id: result.data.id });
|
|
29
|
+
},
|
|
30
|
+
mutationFn: () => apiClient.groups
|
|
31
|
+
.post({
|
|
32
|
+
url: `/me/groups/${route.params.group_id}/chat_conversation_payload`,
|
|
33
|
+
data: {
|
|
34
|
+
data: {
|
|
35
|
+
type: '',
|
|
36
|
+
attributes: {
|
|
37
|
+
title,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
})
|
|
42
|
+
.then(res => res.data.value)
|
|
43
|
+
.then(payload => apiClient.chat.post({
|
|
44
|
+
url: '/me/conversations',
|
|
45
|
+
data: {
|
|
46
|
+
data: {
|
|
47
|
+
type: 'Conversation',
|
|
48
|
+
attributes: {
|
|
49
|
+
payload,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
})),
|
|
54
|
+
});
|
|
55
|
+
const handleRedirectToConversation = useCallback(({ conversation_id }) => {
|
|
56
|
+
// exit from the create stack
|
|
57
|
+
navigation.getParent()?.goBack();
|
|
58
|
+
// navigate to the conversation screen
|
|
59
|
+
navigation.dispatch(StackActions.push('Conversation', {
|
|
60
|
+
conversation_id,
|
|
61
|
+
}));
|
|
62
|
+
}, [navigation]);
|
|
63
|
+
return (<View style={styles.container}>
|
|
64
|
+
<View style={styles.section}>
|
|
65
|
+
<View style={styles.to}>
|
|
66
|
+
<Text>To:</Text>
|
|
67
|
+
<View>
|
|
68
|
+
<Text>{group.name}</Text>
|
|
69
|
+
<Text>{group.membershipsCount} members</Text>
|
|
70
|
+
</View>
|
|
71
|
+
</View>
|
|
72
|
+
<View style={styles.titleContainer}>
|
|
73
|
+
<Text style={styles.titleLabel}>Title</Text>
|
|
74
|
+
<TextInput placeholder="Topic of conversation (required)" value={title} onChangeText={setTitle} style={styles.titleInput}/>
|
|
75
|
+
</View>
|
|
76
|
+
</View>
|
|
77
|
+
<ActionButton title="Start Conversation" onPress={() => handleSave()}/>
|
|
78
|
+
</View>);
|
|
79
|
+
};
|
|
80
|
+
const useStyles = () => {
|
|
81
|
+
const { bottom } = useSafeAreaInsets();
|
|
82
|
+
const theme = useTheme();
|
|
83
|
+
return StyleSheet.create({
|
|
84
|
+
container: {
|
|
85
|
+
flex: 1,
|
|
86
|
+
gap: 8,
|
|
87
|
+
},
|
|
88
|
+
section: {
|
|
89
|
+
padding: 16,
|
|
90
|
+
flex: 1,
|
|
91
|
+
},
|
|
92
|
+
sectionHeader: {
|
|
93
|
+
flexDirection: 'row',
|
|
94
|
+
justifyContent: 'space-between',
|
|
95
|
+
},
|
|
96
|
+
selectTeamsButton: {},
|
|
97
|
+
routeDebug: {
|
|
98
|
+
alignContent: 'center',
|
|
99
|
+
padding: 16,
|
|
100
|
+
paddingBottom: bottom,
|
|
101
|
+
borderTopWidth: 1,
|
|
102
|
+
borderTopColor: theme.colors.fillColorNeutral050Base,
|
|
103
|
+
},
|
|
104
|
+
titleContainer: {
|
|
105
|
+
paddingVertical: 12,
|
|
106
|
+
borderBottomWidth: 1,
|
|
107
|
+
borderBottomColor: theme.colors.fillColorNeutral050Base,
|
|
108
|
+
gap: 8,
|
|
109
|
+
},
|
|
110
|
+
titleInput: {
|
|
111
|
+
fontSize: 18,
|
|
112
|
+
},
|
|
113
|
+
titleLabel: {},
|
|
114
|
+
to: {
|
|
115
|
+
flexDirection: 'row',
|
|
116
|
+
gap: 8,
|
|
117
|
+
paddingVertical: 12,
|
|
118
|
+
borderBottomWidth: 1,
|
|
119
|
+
borderBottomColor: theme.colors.fillColorNeutral050Base,
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=conversation_create_screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_create_screen.js","sourceRoot":"","sources":["../../../src/screens/create/conversation_create_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAA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AC,MAAM,CAAC,uBAAuB;YACvD,GAAG,EAAE,CAAC;SACP;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;SACb;QACD,UAAU,EAAE,EAAE;QACd,EAAE,EAAE;YACF,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACxD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, { useCallback, useState } from 'react'\nimport { StyleSheet, TextInput, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Text } from '../../components'\nimport { ActionButton } from '../../components/display/action_button'\nimport { useSuspenseGet, useTheme } from '../../hooks'\nimport { useApiClient } from '../../hooks/use_api_client'\nimport { useMutation } from '@tanstack/react-query'\nimport { GroupsGroupResource } from '../../types'\n\ntype ConversationCreateScreenProps = StaticScreenProps<{\n group_id?: string\n team_ids?: string[]\n}>\n\nexport const ConversationCreateScreen = ({ route }: ConversationCreateScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const [title, setTitle] = useState<string>()\n const apiClient = useApiClient()\n const { data: group } = useSuspenseGet<GroupsGroupResource>({\n url: `/me/groups/${route.params.group_id}`,\n data: {\n fields: {\n Group: [],\n },\n include: ['location'],\n },\n app: 'groups',\n })\n const { mutate: handleSave } = useMutation({\n throwOnError: true,\n onSuccess: result => {\n handleRedirectToConversation({ conversation_id: result.data.id })\n },\n mutationFn: () =>\n apiClient.groups\n .post({\n url: `/me/groups/${route.params.group_id}/chat_conversation_payload`,\n data: {\n data: {\n type: '',\n attributes: {\n title,\n },\n },\n },\n })\n .then(res => res.data.value)\n .then(payload =>\n apiClient.chat.post({\n url: '/me/conversations',\n data: {\n data: {\n type: 'Conversation',\n attributes: {\n payload,\n },\n },\n },\n })\n ),\n })\n\n const handleRedirectToConversation = useCallback(\n ({ conversation_id }: { conversation_id: string }) => {\n // exit from the create stack\n navigation.getParent()?.goBack()\n // navigate to the conversation screen\n navigation.dispatch(\n StackActions.push('Conversation', {\n conversation_id,\n })\n )\n },\n [navigation]\n )\n\n return (\n <View style={styles.container}>\n <View style={styles.section}>\n <View style={styles.to}>\n <Text>To:</Text>\n <View>\n <Text>{group.name}</Text>\n <Text>{group.membershipsCount} members</Text>\n </View>\n </View>\n <View style={styles.titleContainer}>\n <Text style={styles.titleLabel}>Title</Text>\n <TextInput\n placeholder=\"Topic of conversation (required)\"\n value={title}\n onChangeText={setTitle}\n style={styles.titleInput}\n />\n </View>\n </View>\n <ActionButton title=\"Start Conversation\" onPress={() => handleSave()} />\n </View>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const theme = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n gap: 8,\n },\n section: {\n padding: 16,\n flex: 1,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n selectTeamsButton: {},\n routeDebug: {\n alignContent: 'center',\n padding: 16,\n paddingBottom: bottom,\n borderTopWidth: 1,\n borderTopColor: theme.colors.fillColorNeutral050Base,\n },\n titleContainer: {\n paddingVertical: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n gap: 8,\n },\n titleInput: {\n fontSize: 18,\n },\n titleLabel: {},\n to: {\n flexDirection: 'row',\n gap: 8,\n paddingVertical: 12,\n borderBottomWidth: 1,\n borderBottomColor: theme.colors.fillColorNeutral050Base,\n },\n })\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
+
import { NativeStackNavigationOptions } from '@react-navigation/native-stack';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare const ConversationFilterReceipientsScreenOptions: NativeStackNavigationOptions;
|
|
5
|
+
type ConversationFilterRecipientsScreenProps = StaticScreenProps<{}>;
|
|
6
|
+
export declare const ConversationFilterRecipientsScreen: ({}: ConversationFilterRecipientsScreenProps) => React.JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=conversation_filter_recipients_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_filter_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/create/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AACzF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,eAAO,MAAM,0CAA0C,EAAE,4BAKxD,CAAA;AAED,KAAK,uCAAuC,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAA;AAEpE,eAAO,MAAM,kCAAkC,OAAQ,uCAAuC,sBAmC7F,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { StackActions, useNavigation } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
+
import { Button } from '../../components';
|
|
6
|
+
import { useTheme } from '../../hooks';
|
|
7
|
+
export const ConversationFilterReceipientsScreenOptions = {
|
|
8
|
+
presentation: 'formSheet',
|
|
9
|
+
headerShown: false,
|
|
10
|
+
sheetAllowedDetents: [0.75],
|
|
11
|
+
sheetGrabberVisible: true,
|
|
12
|
+
};
|
|
13
|
+
export const ConversationFilterRecipientsScreen = ({}) => {
|
|
14
|
+
const styles = useStyles();
|
|
15
|
+
const navigation = useNavigation();
|
|
16
|
+
return (<View style={styles.container}>
|
|
17
|
+
<View style={styles.section}>
|
|
18
|
+
<Button style={styles.selectTeamsButton} onPress={() => navigation.dispatch(StackActions.popTo('ConversationSelectRecipients', {
|
|
19
|
+
chat_group_graph_id: 'TBD',
|
|
20
|
+
}))} title="Redirect to select" variant="outline"/>
|
|
21
|
+
|
|
22
|
+
<Button style={styles.selectTeamsButton} onPress={() => navigation.dispatch(StackActions.popTo('ConversationCreate', {
|
|
23
|
+
chat_group_graph_id: 'TBD',
|
|
24
|
+
}))} title="Redirect to form" variant="outline"/>
|
|
25
|
+
</View>
|
|
26
|
+
</View>);
|
|
27
|
+
};
|
|
28
|
+
const useStyles = () => {
|
|
29
|
+
const { bottom } = useSafeAreaInsets();
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
return StyleSheet.create({
|
|
32
|
+
container: {
|
|
33
|
+
flex: 1,
|
|
34
|
+
gap: 8,
|
|
35
|
+
},
|
|
36
|
+
section: {
|
|
37
|
+
padding: 16,
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
justifyContent: 'space-between',
|
|
40
|
+
flex: 1,
|
|
41
|
+
},
|
|
42
|
+
selectTeamsButton: {},
|
|
43
|
+
routeDebug: {
|
|
44
|
+
alignContent: 'center',
|
|
45
|
+
padding: 16,
|
|
46
|
+
paddingBottom: bottom,
|
|
47
|
+
borderTopWidth: 1,
|
|
48
|
+
borderTopColor: theme.colors.fillColorNeutral050Base,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=conversation_filter_recipients_screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_filter_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/create/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEzF,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,E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M,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACtC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IAExB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,OAAO,EAAE;YACP,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,IAAI,EAAE,CAAC;SACR;QACD,iBAAiB,EAAE,EAAE;QACrB,UAAU,EAAE;YACV,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,MAAM;YACrB,cAAc,EAAE,CAAC;YACjB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACrD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport { NativeStackNavigationOptions } from '@react-navigation/native-stack'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button } from '../../components'\nimport { useTheme } from '../../hooks'\n\nexport const ConversationFilterReceipientsScreenOptions: NativeStackNavigationOptions = {\n presentation: 'formSheet',\n headerShown: false,\n sheetAllowedDetents: [0.75],\n sheetGrabberVisible: true,\n}\n\ntype ConversationFilterRecipientsScreenProps = StaticScreenProps<{}>\n\nexport const ConversationFilterRecipientsScreen = ({}: ConversationFilterRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n\n return (\n <View style={styles.container}>\n <View style={styles.section}>\n <Button\n style={styles.selectTeamsButton}\n onPress={() =>\n navigation.dispatch(\n StackActions.popTo('ConversationSelectRecipients', {\n chat_group_graph_id: 'TBD',\n })\n )\n }\n title=\"Redirect to select\"\n variant=\"outline\"\n />\n\n <Button\n style={styles.selectTeamsButton}\n onPress={() =>\n navigation.dispatch(\n StackActions.popTo('ConversationCreate', {\n chat_group_graph_id: 'TBD',\n })\n )\n }\n title=\"Redirect to form\"\n variant=\"outline\"\n />\n </View>\n </View>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const theme = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n gap: 8,\n },\n section: {\n padding: 16,\n flexDirection: 'row',\n justifyContent: 'space-between',\n flex: 1,\n },\n selectTeamsButton: {},\n routeDebug: {\n alignContent: 'center',\n padding: 16,\n paddingBottom: bottom,\n borderTopWidth: 1,\n borderTopColor: theme.colors.fillColorNeutral050Base,\n },\n })\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type ConversationSelectRecipientsScreenProps = StaticScreenProps<{
|
|
4
|
+
chat_group_graph_id?: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const ConversationSelectRecipientsScreen: ({}: ConversationSelectRecipientsScreenProps) => React.JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=conversation_select_recipients_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_select_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/create/conversation_select_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,KAAK,uCAAuC,GAAG,iBAAiB,CAAC;IAC/D,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAC,CAAA;AAMF,eAAO,MAAM,kCAAkC,OAAQ,uCAAuC,sBAyE7F,CAAA"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { PlatformPressable } from '@react-navigation/elements';
|
|
2
|
+
import { useNavigation } from '@react-navigation/native';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ScrollView, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import { Button, Heading, Icon, Image, Text } from '../../components';
|
|
7
|
+
import { useSuspenseGet, useTheme } from '../../hooks';
|
|
8
|
+
const ASPECT_RATIO = 16 / 9;
|
|
9
|
+
const THUMBNAIL_WIDTH = 80;
|
|
10
|
+
const THUMBNAIL_HEIGHT = THUMBNAIL_WIDTH / ASPECT_RATIO;
|
|
11
|
+
export const ConversationSelectRecipientsScreen = ({}) => {
|
|
12
|
+
const styles = useStyles();
|
|
13
|
+
const navigation = useNavigation();
|
|
14
|
+
const { data: groups = [] } = useSuspenseGet({
|
|
15
|
+
url: '/me/groups',
|
|
16
|
+
data: {
|
|
17
|
+
perPage: 100,
|
|
18
|
+
fields: {
|
|
19
|
+
Group: ['can_create_conversation', 'name', 'header_image', 'memberships_count'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
app: 'groups',
|
|
23
|
+
});
|
|
24
|
+
const groupsWithCreatePermission = groups.filter(g => g.canCreateConversation);
|
|
25
|
+
const handleNavigateToCreateConversation = (group) => {
|
|
26
|
+
navigation.navigate('Create', {
|
|
27
|
+
screen: 'ConversationCreate',
|
|
28
|
+
params: {
|
|
29
|
+
group_id: group.id,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
return (<ScrollView style={styles.container}>
|
|
34
|
+
<View style={styles.section}>
|
|
35
|
+
<View style={styles.sectionHeader}>
|
|
36
|
+
<Heading>My groups</Heading>
|
|
37
|
+
</View>
|
|
38
|
+
<View>
|
|
39
|
+
{groupsWithCreatePermission.map(group => (<PlatformPressable key={group.id} style={styles.row} onPress={() => handleNavigateToCreateConversation(group)}>
|
|
40
|
+
<Image source={{ uri: group.headerImage?.thumbnail }} resizeMode="cover" style={styles.rowImage} alt={`Image for ${group.name}`}/>
|
|
41
|
+
<View>
|
|
42
|
+
<Heading variant="h3">{group.name}</Heading>
|
|
43
|
+
<Text>{group.membershipsCount} members</Text>
|
|
44
|
+
</View>
|
|
45
|
+
<Icon name="general.rightChevron" size={16} style={styles.rowIconRight}/>
|
|
46
|
+
</PlatformPressable>))}
|
|
47
|
+
</View>
|
|
48
|
+
</View>
|
|
49
|
+
<View style={styles.section}>
|
|
50
|
+
<View style={styles.sectionHeader}>
|
|
51
|
+
<Heading>Teams I lead</Heading>
|
|
52
|
+
<Button style={styles.selectTeamsButton} onPress={() => navigation.navigate('Create', {
|
|
53
|
+
screen: 'ConversationFilterRecipients',
|
|
54
|
+
params: {
|
|
55
|
+
conversation_id: '2196252',
|
|
56
|
+
},
|
|
57
|
+
})} title="Select teams" variant="outline" iconNameLeft="general.search"/>
|
|
58
|
+
</View>
|
|
59
|
+
</View>
|
|
60
|
+
</ScrollView>);
|
|
61
|
+
};
|
|
62
|
+
const useStyles = () => {
|
|
63
|
+
const { bottom } = useSafeAreaInsets();
|
|
64
|
+
const theme = useTheme();
|
|
65
|
+
return StyleSheet.create({
|
|
66
|
+
container: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
gap: 8,
|
|
69
|
+
},
|
|
70
|
+
section: {
|
|
71
|
+
padding: 16,
|
|
72
|
+
flex: 1,
|
|
73
|
+
},
|
|
74
|
+
sectionHeader: {
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
justifyContent: 'space-between',
|
|
77
|
+
},
|
|
78
|
+
selectTeamsButton: {},
|
|
79
|
+
row: {
|
|
80
|
+
flexDirection: 'row',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
gap: 12,
|
|
83
|
+
paddingVertical: 16,
|
|
84
|
+
borderBottomWidth: 1,
|
|
85
|
+
borderColor: theme.colors.fillColorNeutral050Base,
|
|
86
|
+
},
|
|
87
|
+
rowImage: {
|
|
88
|
+
width: THUMBNAIL_WIDTH,
|
|
89
|
+
height: THUMBNAIL_HEIGHT,
|
|
90
|
+
borderRadius: 4,
|
|
91
|
+
},
|
|
92
|
+
rowIconRight: {
|
|
93
|
+
marginLeft: 'auto',
|
|
94
|
+
color: theme.colors.fillColorNeutral030,
|
|
95
|
+
},
|
|
96
|
+
routeDebug: {
|
|
97
|
+
alignContent: 'center',
|
|
98
|
+
padding: 16,
|
|
99
|
+
paddingBottom: bottom,
|
|
100
|
+
borderTopWidth: 1,
|
|
101
|
+
borderTopColor: theme.colors.fillColorNeutral050Base,
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=conversation_select_recipients_screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_select_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/create/conversation_select_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAOtD,MAAM,YAAY,GAAG,EAAE,GAAG,CAAC,CAAA;AAC3B,MAAM,eAAe,GAAG,EAAE,CAAA;AAC1B,MAAM,gBAAgB,GAAG,eAAe,GAAG,YAAY,CAAA;AAEvD,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,EAA2C,EAAE,EAAE;IAChG,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;IAC1B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,EAAE,EAAE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,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACtC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IAExB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;SACP;QACD,OAAO,EAAE;YACP,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,CAAC;SACR;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;SAChC;QACD,iBAAiB,EAAE,EAAE;QACrB,GAAG,EAAE;YACH,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,CAAC;YACpB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SAClD;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,gBAAgB;YACxB,YAAY,EAAE,CAAC;SAChB;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,MAAM;YAClB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,mBAAmB;SACxC;QACD,UAAU,EAAE;YACV,YAAY,EAAE,QAAQ;YACtB,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,MAAM;YACrB,cAAc,EAAE,CAAC;YACjB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACrD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { ScrollView, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Button, Heading, Icon, Image, Text } from '../../components'\nimport { useSuspenseGet, useTheme } from '../../hooks'\nimport { GroupsGroupResource } from '../../types'\n\ntype ConversationSelectRecipientsScreenProps = StaticScreenProps<{\n chat_group_graph_id?: string\n}>\n\nconst ASPECT_RATIO = 16 / 9\nconst THUMBNAIL_WIDTH = 80\nconst THUMBNAIL_HEIGHT = THUMBNAIL_WIDTH / ASPECT_RATIO\n\nexport const ConversationSelectRecipientsScreen = ({}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const { data: groups = [] } = useSuspenseGet<GroupsGroupResource[]>({\n url: '/me/groups',\n data: {\n perPage: 100,\n fields: {\n Group: ['can_create_conversation', 'name', 'header_image', 'memberships_count'],\n },\n },\n app: 'groups',\n })\n const groupsWithCreatePermission = groups.filter(g => g.canCreateConversation)\n\n const handleNavigateToCreateConversation = (group: GroupsGroupResource) => {\n navigation.navigate('Create', {\n screen: 'ConversationCreate',\n params: {\n group_id: group.id,\n },\n })\n }\n\n return (\n <ScrollView style={styles.container}>\n <View style={styles.section}>\n <View style={styles.sectionHeader}>\n <Heading>My groups</Heading>\n </View>\n <View>\n {groupsWithCreatePermission.map(group => (\n <PlatformPressable\n key={group.id}\n style={styles.row}\n onPress={() => handleNavigateToCreateConversation(group)}\n >\n <Image\n source={{ uri: group.headerImage?.thumbnail }}\n resizeMode=\"cover\"\n style={styles.rowImage}\n alt={`Image for ${group.name}`}\n />\n <View>\n <Heading variant=\"h3\">{group.name}</Heading>\n <Text>{group.membershipsCount} members</Text>\n </View>\n <Icon name=\"general.rightChevron\" size={16} style={styles.rowIconRight} />\n </PlatformPressable>\n ))}\n </View>\n </View>\n <View style={styles.section}>\n <View style={styles.sectionHeader}>\n <Heading>Teams I lead</Heading>\n <Button\n style={styles.selectTeamsButton}\n onPress={() =>\n navigation.navigate('Create', {\n screen: 'ConversationFilterRecipients',\n params: {\n conversation_id: '2196252',\n },\n })\n }\n title=\"Select teams\"\n variant=\"outline\"\n iconNameLeft=\"general.search\"\n />\n </View>\n </View>\n </ScrollView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const theme = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n gap: 8,\n },\n section: {\n padding: 16,\n flex: 1,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n selectTeamsButton: {},\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderColor: theme.colors.fillColorNeutral050Base,\n },\n rowImage: {\n width: THUMBNAIL_WIDTH,\n height: THUMBNAIL_HEIGHT,\n borderRadius: 4,\n },\n rowIconRight: {\n marginLeft: 'auto',\n color: theme.colors.fillColorNeutral030,\n },\n routeDebug: {\n alignContent: 'center',\n padding: 16,\n paddingBottom: bottom,\n borderTopWidth: 1,\n borderTopColor: theme.colors.fillColorNeutral050Base,\n },\n })\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app_grant.d.ts","sourceRoot":"","sources":["../../../src/types/resources/app_grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,mBAAmB,EAAE,OAAO,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app_grant.js","sourceRoot":"","sources":["../../../src/types/resources/app_grant.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '../api_primitives'\n\nexport interface AppGrantsResource extends ResourceObject {\n createConversations: boolean\n appName: string\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResourceObject } from '../../api_primitives';
|
|
2
|
+
export interface GroupsGroupResource extends ResourceObject {
|
|
3
|
+
headerImage: {
|
|
4
|
+
thumbnail: string;
|
|
5
|
+
medium: string;
|
|
6
|
+
original: string;
|
|
7
|
+
};
|
|
8
|
+
name: string;
|
|
9
|
+
membershipsCount: number;
|
|
10
|
+
canCreateConversation: boolean;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=groups_group_resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups_group_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/groups/groups_group_resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,EAAE,MAAM,CAAA;IACxB,qBAAqB,EAAE,OAAO,CAAA;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"groups_group_resource.js","sourceRoot":"","sources":["../../../../src/types/resources/groups/groups_group_resource.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '../../api_primitives'\n\nexport interface GroupsGroupResource extends ResourceObject {\n headerImage: {\n thumbnail: string\n medium: string\n original: string\n }\n name: string\n membershipsCount: number\n canCreateConversation: boolean\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/groups/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/resources/groups/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA","sourcesContent":["export * from './groups_group_resource'\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA","sourcesContent":["export * from './conversation'\nexport * from './member'\nexport * from './message'\nexport * from './oauth_token'\nexport * from './person'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA","sourcesContent":["export * from './conversation'\nexport * from './member'\nexport * from './message'\nexport * from './oauth_token'\nexport * from './person'\nexport * from './groups'\nexport * from './app_grant'\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-rc.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"prettier": "^3.4.2",
|
|
53
53
|
"typescript": "<5.6.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "a83eecfeb631cdd217b3be1d3836326d8db78943"
|
|
56
56
|
}
|