@planningcenter/chat-react-native 3.23.0 → 3.23.1-qa-538.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/display/toggle_button.d.ts +11 -4
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +6 -5
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +1 -1
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.d.ts.map +1 -1
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +6 -1
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_membership.d.ts +5 -0
- package/build/hooks/use_conversation_membership.d.ts.map +1 -0
- package/build/hooks/use_conversation_membership.js +54 -0
- package/build/hooks/use_conversation_membership.js.map +1 -0
- package/build/hooks/use_features.d.ts +1 -0
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +1 -0
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_new_conversation_entry.d.ts +3 -0
- package/build/hooks/use_new_conversation_entry.d.ts.map +1 -0
- package/build/hooks/use_new_conversation_entry.js +20 -0
- package/build/hooks/use_new_conversation_entry.js.map +1 -0
- package/build/hooks/use_report_message.d.ts +6 -0
- package/build/hooks/use_report_message.d.ts.map +1 -0
- package/build/hooks/use_report_message.js +28 -0
- package/build/hooks/use_report_message.js.map +1 -0
- package/build/navigation/index.d.ts +18 -8
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +16 -6
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +18 -10
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +5 -3
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +4 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +67 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +17 -2
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +11 -0
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_type_screen.js +32 -0
- package/build/screens/conversation_select_type_screen.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 +54 -25
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/index.d.ts +1 -1
- package/build/screens/index.d.ts.map +1 -1
- package/build/screens/index.js +1 -1
- package/build/screens/index.js.map +1 -1
- package/build/screens/message_actions_screen.js +14 -2
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +10 -0
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -0
- package/build/screens/message_report/components/message_preview.js +81 -0
- package/build/screens/message_report/components/message_preview.js.map +1 -0
- package/build/screens/message_report/components/report_reason_list.d.ts +9 -0
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -0
- package/build/screens/message_report/components/report_reason_list.js +67 -0
- package/build/screens/message_report/components/report_reason_list.js.map +1 -0
- package/build/screens/message_report_screen.d.ts +10 -0
- package/build/screens/message_report_screen.d.ts.map +1 -0
- package/build/screens/message_report_screen.js +214 -0
- package/build/screens/message_report_screen.js.map +1 -0
- package/build/types/resources/conversation.d.ts +2 -3
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/types/resources/conversation_membership.d.ts +14 -0
- package/build/types/resources/conversation_membership.d.ts.map +1 -0
- package/build/types/resources/conversation_membership.js +2 -0
- package/build/types/resources/conversation_membership.js.map +1 -0
- package/build/types/resources/index.d.ts +1 -0
- package/build/types/resources/index.d.ts.map +1 -1
- package/build/types/resources/index.js +1 -0
- package/build/types/resources/index.js.map +1 -1
- package/build/types/resources/message_report.d.ts +19 -0
- package/build/types/resources/message_report.d.ts.map +1 -0
- package/build/types/resources/message_report.js +9 -0
- package/build/types/resources/message_report.js.map +1 -0
- package/build/utils/deep_snake_case_keys.d.ts +4 -0
- package/build/utils/deep_snake_case_keys.d.ts.map +1 -0
- package/build/utils/deep_snake_case_keys.js +13 -0
- package/build/utils/deep_snake_case_keys.js.map +1 -0
- package/package.json +2 -2
- package/src/components/display/toggle_button.tsx +27 -15
- package/src/components/primitive/form_sheet.tsx +4 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use_conversation.ts +6 -1
- package/src/hooks/use_conversation_membership.ts +82 -0
- package/src/hooks/use_features.ts +1 -0
- package/src/hooks/use_new_conversation_entry.ts +31 -0
- package/src/hooks/use_report_message.ts +37 -0
- package/src/navigation/index.tsx +19 -6
- package/src/screens/conversation_details_screen.tsx +34 -16
- package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +10 -3
- package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +100 -0
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +23 -3
- package/src/screens/conversation_select_type_screen.tsx +53 -0
- package/src/screens/conversations/components/list_header_component.tsx +103 -67
- package/src/screens/index.ts +1 -1
- package/src/screens/message_actions_screen.tsx +24 -2
- package/src/screens/message_report/components/message_preview.tsx +99 -0
- package/src/screens/message_report/components/report_reason_list.tsx +106 -0
- package/src/screens/message_report_screen.tsx +278 -0
- package/src/types/resources/conversation.ts +2 -3
- package/src/types/resources/conversation_membership.ts +15 -0
- package/src/types/resources/index.ts +1 -0
- package/src/types/resources/message_report.ts +20 -0
- package/src/utils/deep_snake_case_keys.ts +16 -0
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts +0 -4
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts.map +0 -1
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js +0 -146
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +0 -1
- package/src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx +0 -215
package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { useNavigation } from '@react-navigation/native';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ScrollView, StyleSheet, View } from 'react-native';
|
|
4
|
-
import { Button, Heading } from '../../components';
|
|
5
|
-
import BlankState from '../../components/primitive/blank_state_primitive';
|
|
6
|
-
import { useGroupsGroups } from '../../hooks/use_groups_groups';
|
|
7
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
8
|
-
import { ViewMoreLinkRow } from './components/view_more_link_row';
|
|
9
|
-
import { GroupsWithoutChatDisclaimerRow } from './components/groups_without_chat_disclaimer_row';
|
|
10
|
-
import { useServiceTypesWithTeams } from '../conversation_filter_recipients/hooks/use_service_types_with_teams';
|
|
11
|
-
import { TeamFilterTypes } from '../conversation_filter_recipients/types';
|
|
12
|
-
import { TeamRecipientRow } from './components/team_recipient_row';
|
|
13
|
-
import { GroupsRecipientRow } from './components/groups_recipient_row';
|
|
14
|
-
import { DefaultLoading } from '../../components/page/loading';
|
|
15
|
-
import { useAppGrants } from '../../hooks';
|
|
16
|
-
import { Haptic } from '../../utils/native_adapters';
|
|
17
|
-
const MAX_VISIBLE_RECIPIENTS = 5;
|
|
18
|
-
export const ConversationSelectRecipientsScreen = ({ route, }) => {
|
|
19
|
-
const styles = useStyles();
|
|
20
|
-
const navigation = useNavigation();
|
|
21
|
-
const appGrants = useAppGrants();
|
|
22
|
-
const canCreateGroupsConversations = appGrants.data?.some(g => g.createConversations && g.appName === 'Groups');
|
|
23
|
-
const canCreateServicesConversations = appGrants.data?.some(g => g.createConversations && g.appName === 'Services');
|
|
24
|
-
const { data: groups = [], isFetching: isGroupsFetching } = useGroupsGroups();
|
|
25
|
-
const groupsWithCreatePermission = groups.filter(g => g.canCreateConversation);
|
|
26
|
-
const visibleGroups = groupsWithCreatePermission.slice(0, MAX_VISIBLE_RECIPIENTS);
|
|
27
|
-
const hasMoreGroups = groupsWithCreatePermission.length > MAX_VISIBLE_RECIPIENTS;
|
|
28
|
-
const hasGroupsWithoutChatPermission = groups.length > groupsWithCreatePermission.length;
|
|
29
|
-
const showGroupsDisclaimer = hasGroupsWithoutChatPermission && !hasMoreGroups;
|
|
30
|
-
const handleGroupsNavigateToConversationNew = (group) => {
|
|
31
|
-
navigation.navigate('New', {
|
|
32
|
-
screen: 'ConversationNew',
|
|
33
|
-
params: {
|
|
34
|
-
group_id: group.id,
|
|
35
|
-
source_app_name: 'Groups',
|
|
36
|
-
...route.params,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
const handleGroupsViewMore = () => {
|
|
41
|
-
navigation.navigate('New', {
|
|
42
|
-
screen: 'ConversationSelectGroupRecipients',
|
|
43
|
-
params: {
|
|
44
|
-
...route.params,
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
const { serviceTypes, isFetching: isServiceTypesFetching } = useServiceTypesWithTeams();
|
|
49
|
-
const visibleServiceTypes = serviceTypes.slice(0, MAX_VISIBLE_RECIPIENTS);
|
|
50
|
-
const hasMoreServiceTypes = serviceTypes.length > MAX_VISIBLE_RECIPIENTS;
|
|
51
|
-
const hasServiceTypes = serviceTypes.length > 0;
|
|
52
|
-
const handleTeamsNavigateToConversationNew = (teams) => {
|
|
53
|
-
const teamIds = teams.map(team => team.id);
|
|
54
|
-
navigation.navigate('New', {
|
|
55
|
-
screen: 'ConversationNew',
|
|
56
|
-
params: {
|
|
57
|
-
team_ids: teamIds,
|
|
58
|
-
source_app_name: 'Services',
|
|
59
|
-
...route.params,
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const handleServiceTypesViewMore = () => {
|
|
64
|
-
navigation.navigate('New', {
|
|
65
|
-
screen: 'ConversationSelectTeamsILeadRecipients',
|
|
66
|
-
params: {
|
|
67
|
-
...route.params,
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
return (<ScrollView contentContainerStyle={styles.contentContainer}>
|
|
72
|
-
{canCreateGroupsConversations && (<View style={styles.section}>
|
|
73
|
-
<View style={styles.sectionHeader}>
|
|
74
|
-
<Heading variant="h3">My groups</Heading>
|
|
75
|
-
</View>
|
|
76
|
-
<View>
|
|
77
|
-
{isGroupsFetching ? (<DefaultLoading />) : groupsWithCreatePermission.length === 0 ? (<RecipientsBlankState subtitle="Join a group with chat enabled and permissions to start a new conversation."/>) : (<>
|
|
78
|
-
{visibleGroups.map(group => {
|
|
79
|
-
return (<GroupsRecipientRow key={group.id} group={group} onPress={handleGroupsNavigateToConversationNew}/>);
|
|
80
|
-
})}
|
|
81
|
-
{hasMoreGroups && (<ViewMoreLinkRow onPress={handleGroupsViewMore} accessibilityHint="Navigate to a full list of your groups."/>)}
|
|
82
|
-
{showGroupsDisclaimer && <GroupsWithoutChatDisclaimerRow />}
|
|
83
|
-
</>)}
|
|
84
|
-
</View>
|
|
85
|
-
</View>)}
|
|
86
|
-
{canCreateServicesConversations && (<View style={styles.section}>
|
|
87
|
-
<View style={styles.sectionHeader}>
|
|
88
|
-
<Heading variant="h3">Teams I lead</Heading>
|
|
89
|
-
<Button style={styles.selectTeamsButton} onPress={() => {
|
|
90
|
-
Haptic.impactLight();
|
|
91
|
-
navigation.navigate('New', {
|
|
92
|
-
screen: 'ConversationFilterRecipients',
|
|
93
|
-
params: {
|
|
94
|
-
source_app_name: 'Services',
|
|
95
|
-
team_filter_type: hasServiceTypes
|
|
96
|
-
? TeamFilterTypes.TeamsIlead
|
|
97
|
-
: TeamFilterTypes.All,
|
|
98
|
-
},
|
|
99
|
-
});
|
|
100
|
-
}} title="Select teams" variant="outline" iconNameLeft="general.search" size="sm"/>
|
|
101
|
-
</View>
|
|
102
|
-
<View>
|
|
103
|
-
{isServiceTypesFetching ? (<DefaultLoading />) : hasServiceTypes ? (<>
|
|
104
|
-
{visibleServiceTypes.map(serviceType => {
|
|
105
|
-
return (<TeamRecipientRow key={serviceType.id} serviceType={serviceType} onPress={handleTeamsNavigateToConversationNew}/>);
|
|
106
|
-
})}
|
|
107
|
-
{hasMoreServiceTypes && (<ViewMoreLinkRow onPress={handleServiceTypesViewMore} accessibilityHint="Navigate to a full list of teams you lead."/>)}
|
|
108
|
-
</>) : (<RecipientsBlankState subtitle="You don't lead any teams."/>)}
|
|
109
|
-
</View>
|
|
110
|
-
</View>)}
|
|
111
|
-
</ScrollView>);
|
|
112
|
-
};
|
|
113
|
-
const RecipientsBlankState = ({ subtitle }) => {
|
|
114
|
-
const styles = useStyles();
|
|
115
|
-
return (<BlankState.Root style={styles.blankState}>
|
|
116
|
-
<BlankState.Imagery name="general.outlinedTextMessage"/>
|
|
117
|
-
<BlankState.Content>
|
|
118
|
-
<BlankState.Text>{subtitle}</BlankState.Text>
|
|
119
|
-
</BlankState.Content>
|
|
120
|
-
</BlankState.Root>);
|
|
121
|
-
};
|
|
122
|
-
const useStyles = () => {
|
|
123
|
-
const { bottom } = useSafeAreaInsets();
|
|
124
|
-
return StyleSheet.create({
|
|
125
|
-
contentContainer: {
|
|
126
|
-
gap: 24,
|
|
127
|
-
paddingTop: 16,
|
|
128
|
-
paddingBottom: 16 + bottom,
|
|
129
|
-
},
|
|
130
|
-
section: {
|
|
131
|
-
flex: 1,
|
|
132
|
-
},
|
|
133
|
-
sectionHeader: {
|
|
134
|
-
flexDirection: 'row',
|
|
135
|
-
justifyContent: 'space-between',
|
|
136
|
-
paddingHorizontal: 16,
|
|
137
|
-
paddingBottom: 4,
|
|
138
|
-
},
|
|
139
|
-
selectTeamsButton: {},
|
|
140
|
-
blankState: {
|
|
141
|
-
marginTop: 24,
|
|
142
|
-
marginBottom: 48,
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
//# sourceMappingURL=conversation_select_recipients_screen.js.map
|
package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_select_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,UAAU,MAAM,kDAAkD,CAAA;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAA;AAChG,OAAO,EAAE,wBAAwB,EAAE,MAAM,sEAAsE,CAAA;AAC/G,OAAO,EAAwB,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO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AE,EAAE;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { ScrollView, StyleSheet, View } from 'react-native'\nimport { Button, Heading } from '../../components'\nimport BlankState from '../../components/primitive/blank_state_primitive'\nimport { GroupsGroupResource } from '../../types'\nimport { useGroupsGroups } from '../../hooks/use_groups_groups'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { ConversationSelectRecipientsScreenProps } from './types/screen_props'\nimport { ViewMoreLinkRow } from './components/view_more_link_row'\nimport { GroupsWithoutChatDisclaimerRow } from './components/groups_without_chat_disclaimer_row'\nimport { useServiceTypesWithTeams } from '../conversation_filter_recipients/hooks/use_service_types_with_teams'\nimport { ServiceTypeWithTeams, TeamFilterTypes } from '../conversation_filter_recipients/types'\nimport { TeamRecipientRow } from './components/team_recipient_row'\nimport { GroupsRecipientRow } from './components/groups_recipient_row'\nimport { DefaultLoading } from '../../components/page/loading'\nimport { useAppGrants } from '../../hooks'\nimport { Haptic } from '../../utils/native_adapters'\n\nconst MAX_VISIBLE_RECIPIENTS = 5\n\nexport const ConversationSelectRecipientsScreen = ({\n route,\n}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const appGrants = useAppGrants()\n const canCreateGroupsConversations = appGrants.data?.some(\n g => g.createConversations && g.appName === 'Groups'\n )\n const canCreateServicesConversations = appGrants.data?.some(\n g => g.createConversations && g.appName === 'Services'\n )\n const { data: groups = [], isFetching: isGroupsFetching } = useGroupsGroups()\n const groupsWithCreatePermission = groups.filter(g => g.canCreateConversation)\n const visibleGroups = groupsWithCreatePermission.slice(0, MAX_VISIBLE_RECIPIENTS)\n const hasMoreGroups = groupsWithCreatePermission.length > MAX_VISIBLE_RECIPIENTS\n const hasGroupsWithoutChatPermission = groups.length > groupsWithCreatePermission.length\n const showGroupsDisclaimer = hasGroupsWithoutChatPermission && !hasMoreGroups\n\n const handleGroupsNavigateToConversationNew = (group: GroupsGroupResource) => {\n navigation.navigate('New', {\n screen: 'ConversationNew',\n params: {\n group_id: group.id,\n source_app_name: 'Groups',\n ...route.params,\n },\n })\n }\n\n const handleGroupsViewMore = () => {\n navigation.navigate('New', {\n screen: 'ConversationSelectGroupRecipients',\n params: {\n ...route.params,\n },\n })\n }\n\n const { serviceTypes, isFetching: isServiceTypesFetching } = useServiceTypesWithTeams()\n const visibleServiceTypes = serviceTypes.slice(0, MAX_VISIBLE_RECIPIENTS)\n const hasMoreServiceTypes = serviceTypes.length > MAX_VISIBLE_RECIPIENTS\n const hasServiceTypes = serviceTypes.length > 0\n\n const handleTeamsNavigateToConversationNew = (teams: ServiceTypeWithTeams['teams']) => {\n const teamIds = teams.map(team => team.id)\n\n navigation.navigate('New', {\n screen: 'ConversationNew',\n params: {\n team_ids: teamIds,\n source_app_name: 'Services',\n ...route.params,\n },\n })\n }\n\n const handleServiceTypesViewMore = () => {\n navigation.navigate('New', {\n screen: 'ConversationSelectTeamsILeadRecipients',\n params: {\n ...route.params,\n },\n })\n }\n\n return (\n <ScrollView contentContainerStyle={styles.contentContainer}>\n {canCreateGroupsConversations && (\n <View style={styles.section}>\n <View style={styles.sectionHeader}>\n <Heading variant=\"h3\">My groups</Heading>\n </View>\n <View>\n {isGroupsFetching ? (\n <DefaultLoading />\n ) : groupsWithCreatePermission.length === 0 ? (\n <RecipientsBlankState subtitle=\"Join a group with chat enabled and permissions to start a new conversation.\" />\n ) : (\n <>\n {visibleGroups.map(group => {\n return (\n <GroupsRecipientRow\n key={group.id}\n group={group}\n onPress={handleGroupsNavigateToConversationNew}\n />\n )\n })}\n {hasMoreGroups && (\n <ViewMoreLinkRow\n onPress={handleGroupsViewMore}\n accessibilityHint=\"Navigate to a full list of your groups.\"\n />\n )}\n {showGroupsDisclaimer && <GroupsWithoutChatDisclaimerRow />}\n </>\n )}\n </View>\n </View>\n )}\n {canCreateServicesConversations && (\n <View style={styles.section}>\n <View style={styles.sectionHeader}>\n <Heading variant=\"h3\">Teams I lead</Heading>\n <Button\n style={styles.selectTeamsButton}\n onPress={() => {\n Haptic.impactLight()\n navigation.navigate('New', {\n screen: 'ConversationFilterRecipients',\n params: {\n source_app_name: 'Services',\n team_filter_type: hasServiceTypes\n ? TeamFilterTypes.TeamsIlead\n : TeamFilterTypes.All,\n },\n })\n }}\n title=\"Select teams\"\n variant=\"outline\"\n iconNameLeft=\"general.search\"\n size=\"sm\"\n />\n </View>\n <View>\n {isServiceTypesFetching ? (\n <DefaultLoading />\n ) : hasServiceTypes ? (\n <>\n {visibleServiceTypes.map(serviceType => {\n return (\n <TeamRecipientRow\n key={serviceType.id}\n serviceType={serviceType}\n onPress={handleTeamsNavigateToConversationNew}\n />\n )\n })}\n {hasMoreServiceTypes && (\n <ViewMoreLinkRow\n onPress={handleServiceTypesViewMore}\n accessibilityHint=\"Navigate to a full list of teams you lead.\"\n />\n )}\n </>\n ) : (\n <RecipientsBlankState subtitle=\"You don't lead any teams.\" />\n )}\n </View>\n </View>\n )}\n </ScrollView>\n )\n}\n\nconst RecipientsBlankState = ({ subtitle }: { subtitle: string }) => {\n const styles = useStyles()\n\n return (\n <BlankState.Root style={styles.blankState}>\n <BlankState.Imagery name=\"general.outlinedTextMessage\" />\n <BlankState.Content>\n <BlankState.Text>{subtitle}</BlankState.Text>\n </BlankState.Content>\n </BlankState.Root>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n gap: 24,\n paddingTop: 16,\n paddingBottom: 16 + bottom,\n },\n section: {\n flex: 1,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingBottom: 4,\n },\n selectTeamsButton: {},\n blankState: {\n marginTop: 24,\n marginBottom: 48,\n },\n })\n}\n"]}
|
package/src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { useNavigation } from '@react-navigation/native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { ScrollView, StyleSheet, View } from 'react-native'
|
|
4
|
-
import { Button, Heading } from '../../components'
|
|
5
|
-
import BlankState from '../../components/primitive/blank_state_primitive'
|
|
6
|
-
import { GroupsGroupResource } from '../../types'
|
|
7
|
-
import { useGroupsGroups } from '../../hooks/use_groups_groups'
|
|
8
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
9
|
-
import { ConversationSelectRecipientsScreenProps } from './types/screen_props'
|
|
10
|
-
import { ViewMoreLinkRow } from './components/view_more_link_row'
|
|
11
|
-
import { GroupsWithoutChatDisclaimerRow } from './components/groups_without_chat_disclaimer_row'
|
|
12
|
-
import { useServiceTypesWithTeams } from '../conversation_filter_recipients/hooks/use_service_types_with_teams'
|
|
13
|
-
import { ServiceTypeWithTeams, TeamFilterTypes } from '../conversation_filter_recipients/types'
|
|
14
|
-
import { TeamRecipientRow } from './components/team_recipient_row'
|
|
15
|
-
import { GroupsRecipientRow } from './components/groups_recipient_row'
|
|
16
|
-
import { DefaultLoading } from '../../components/page/loading'
|
|
17
|
-
import { useAppGrants } from '../../hooks'
|
|
18
|
-
import { Haptic } from '../../utils/native_adapters'
|
|
19
|
-
|
|
20
|
-
const MAX_VISIBLE_RECIPIENTS = 5
|
|
21
|
-
|
|
22
|
-
export const ConversationSelectRecipientsScreen = ({
|
|
23
|
-
route,
|
|
24
|
-
}: ConversationSelectRecipientsScreenProps) => {
|
|
25
|
-
const styles = useStyles()
|
|
26
|
-
const navigation = useNavigation()
|
|
27
|
-
const appGrants = useAppGrants()
|
|
28
|
-
const canCreateGroupsConversations = appGrants.data?.some(
|
|
29
|
-
g => g.createConversations && g.appName === 'Groups'
|
|
30
|
-
)
|
|
31
|
-
const canCreateServicesConversations = appGrants.data?.some(
|
|
32
|
-
g => g.createConversations && g.appName === 'Services'
|
|
33
|
-
)
|
|
34
|
-
const { data: groups = [], isFetching: isGroupsFetching } = useGroupsGroups()
|
|
35
|
-
const groupsWithCreatePermission = groups.filter(g => g.canCreateConversation)
|
|
36
|
-
const visibleGroups = groupsWithCreatePermission.slice(0, MAX_VISIBLE_RECIPIENTS)
|
|
37
|
-
const hasMoreGroups = groupsWithCreatePermission.length > MAX_VISIBLE_RECIPIENTS
|
|
38
|
-
const hasGroupsWithoutChatPermission = groups.length > groupsWithCreatePermission.length
|
|
39
|
-
const showGroupsDisclaimer = hasGroupsWithoutChatPermission && !hasMoreGroups
|
|
40
|
-
|
|
41
|
-
const handleGroupsNavigateToConversationNew = (group: GroupsGroupResource) => {
|
|
42
|
-
navigation.navigate('New', {
|
|
43
|
-
screen: 'ConversationNew',
|
|
44
|
-
params: {
|
|
45
|
-
group_id: group.id,
|
|
46
|
-
source_app_name: 'Groups',
|
|
47
|
-
...route.params,
|
|
48
|
-
},
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const handleGroupsViewMore = () => {
|
|
53
|
-
navigation.navigate('New', {
|
|
54
|
-
screen: 'ConversationSelectGroupRecipients',
|
|
55
|
-
params: {
|
|
56
|
-
...route.params,
|
|
57
|
-
},
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const { serviceTypes, isFetching: isServiceTypesFetching } = useServiceTypesWithTeams()
|
|
62
|
-
const visibleServiceTypes = serviceTypes.slice(0, MAX_VISIBLE_RECIPIENTS)
|
|
63
|
-
const hasMoreServiceTypes = serviceTypes.length > MAX_VISIBLE_RECIPIENTS
|
|
64
|
-
const hasServiceTypes = serviceTypes.length > 0
|
|
65
|
-
|
|
66
|
-
const handleTeamsNavigateToConversationNew = (teams: ServiceTypeWithTeams['teams']) => {
|
|
67
|
-
const teamIds = teams.map(team => team.id)
|
|
68
|
-
|
|
69
|
-
navigation.navigate('New', {
|
|
70
|
-
screen: 'ConversationNew',
|
|
71
|
-
params: {
|
|
72
|
-
team_ids: teamIds,
|
|
73
|
-
source_app_name: 'Services',
|
|
74
|
-
...route.params,
|
|
75
|
-
},
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const handleServiceTypesViewMore = () => {
|
|
80
|
-
navigation.navigate('New', {
|
|
81
|
-
screen: 'ConversationSelectTeamsILeadRecipients',
|
|
82
|
-
params: {
|
|
83
|
-
...route.params,
|
|
84
|
-
},
|
|
85
|
-
})
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return (
|
|
89
|
-
<ScrollView contentContainerStyle={styles.contentContainer}>
|
|
90
|
-
{canCreateGroupsConversations && (
|
|
91
|
-
<View style={styles.section}>
|
|
92
|
-
<View style={styles.sectionHeader}>
|
|
93
|
-
<Heading variant="h3">My groups</Heading>
|
|
94
|
-
</View>
|
|
95
|
-
<View>
|
|
96
|
-
{isGroupsFetching ? (
|
|
97
|
-
<DefaultLoading />
|
|
98
|
-
) : groupsWithCreatePermission.length === 0 ? (
|
|
99
|
-
<RecipientsBlankState subtitle="Join a group with chat enabled and permissions to start a new conversation." />
|
|
100
|
-
) : (
|
|
101
|
-
<>
|
|
102
|
-
{visibleGroups.map(group => {
|
|
103
|
-
return (
|
|
104
|
-
<GroupsRecipientRow
|
|
105
|
-
key={group.id}
|
|
106
|
-
group={group}
|
|
107
|
-
onPress={handleGroupsNavigateToConversationNew}
|
|
108
|
-
/>
|
|
109
|
-
)
|
|
110
|
-
})}
|
|
111
|
-
{hasMoreGroups && (
|
|
112
|
-
<ViewMoreLinkRow
|
|
113
|
-
onPress={handleGroupsViewMore}
|
|
114
|
-
accessibilityHint="Navigate to a full list of your groups."
|
|
115
|
-
/>
|
|
116
|
-
)}
|
|
117
|
-
{showGroupsDisclaimer && <GroupsWithoutChatDisclaimerRow />}
|
|
118
|
-
</>
|
|
119
|
-
)}
|
|
120
|
-
</View>
|
|
121
|
-
</View>
|
|
122
|
-
)}
|
|
123
|
-
{canCreateServicesConversations && (
|
|
124
|
-
<View style={styles.section}>
|
|
125
|
-
<View style={styles.sectionHeader}>
|
|
126
|
-
<Heading variant="h3">Teams I lead</Heading>
|
|
127
|
-
<Button
|
|
128
|
-
style={styles.selectTeamsButton}
|
|
129
|
-
onPress={() => {
|
|
130
|
-
Haptic.impactLight()
|
|
131
|
-
navigation.navigate('New', {
|
|
132
|
-
screen: 'ConversationFilterRecipients',
|
|
133
|
-
params: {
|
|
134
|
-
source_app_name: 'Services',
|
|
135
|
-
team_filter_type: hasServiceTypes
|
|
136
|
-
? TeamFilterTypes.TeamsIlead
|
|
137
|
-
: TeamFilterTypes.All,
|
|
138
|
-
},
|
|
139
|
-
})
|
|
140
|
-
}}
|
|
141
|
-
title="Select teams"
|
|
142
|
-
variant="outline"
|
|
143
|
-
iconNameLeft="general.search"
|
|
144
|
-
size="sm"
|
|
145
|
-
/>
|
|
146
|
-
</View>
|
|
147
|
-
<View>
|
|
148
|
-
{isServiceTypesFetching ? (
|
|
149
|
-
<DefaultLoading />
|
|
150
|
-
) : hasServiceTypes ? (
|
|
151
|
-
<>
|
|
152
|
-
{visibleServiceTypes.map(serviceType => {
|
|
153
|
-
return (
|
|
154
|
-
<TeamRecipientRow
|
|
155
|
-
key={serviceType.id}
|
|
156
|
-
serviceType={serviceType}
|
|
157
|
-
onPress={handleTeamsNavigateToConversationNew}
|
|
158
|
-
/>
|
|
159
|
-
)
|
|
160
|
-
})}
|
|
161
|
-
{hasMoreServiceTypes && (
|
|
162
|
-
<ViewMoreLinkRow
|
|
163
|
-
onPress={handleServiceTypesViewMore}
|
|
164
|
-
accessibilityHint="Navigate to a full list of teams you lead."
|
|
165
|
-
/>
|
|
166
|
-
)}
|
|
167
|
-
</>
|
|
168
|
-
) : (
|
|
169
|
-
<RecipientsBlankState subtitle="You don't lead any teams." />
|
|
170
|
-
)}
|
|
171
|
-
</View>
|
|
172
|
-
</View>
|
|
173
|
-
)}
|
|
174
|
-
</ScrollView>
|
|
175
|
-
)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const RecipientsBlankState = ({ subtitle }: { subtitle: string }) => {
|
|
179
|
-
const styles = useStyles()
|
|
180
|
-
|
|
181
|
-
return (
|
|
182
|
-
<BlankState.Root style={styles.blankState}>
|
|
183
|
-
<BlankState.Imagery name="general.outlinedTextMessage" />
|
|
184
|
-
<BlankState.Content>
|
|
185
|
-
<BlankState.Text>{subtitle}</BlankState.Text>
|
|
186
|
-
</BlankState.Content>
|
|
187
|
-
</BlankState.Root>
|
|
188
|
-
)
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const useStyles = () => {
|
|
192
|
-
const { bottom } = useSafeAreaInsets()
|
|
193
|
-
|
|
194
|
-
return StyleSheet.create({
|
|
195
|
-
contentContainer: {
|
|
196
|
-
gap: 24,
|
|
197
|
-
paddingTop: 16,
|
|
198
|
-
paddingBottom: 16 + bottom,
|
|
199
|
-
},
|
|
200
|
-
section: {
|
|
201
|
-
flex: 1,
|
|
202
|
-
},
|
|
203
|
-
sectionHeader: {
|
|
204
|
-
flexDirection: 'row',
|
|
205
|
-
justifyContent: 'space-between',
|
|
206
|
-
paddingHorizontal: 16,
|
|
207
|
-
paddingBottom: 4,
|
|
208
|
-
},
|
|
209
|
-
selectTeamsButton: {},
|
|
210
|
-
blankState: {
|
|
211
|
-
marginTop: 24,
|
|
212
|
-
marginBottom: 48,
|
|
213
|
-
},
|
|
214
|
-
})
|
|
215
|
-
}
|