@planningcenter/chat-react-native 3.4.0 → 3.4.1-qa-165.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/conversation/attachments/image_attachment.d.ts +6 -1
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +125 -11
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/disabled_replies_banners.d.ts +3 -0
- package/build/components/conversation/disabled_replies_banners.d.ts.map +1 -0
- package/build/components/conversation/disabled_replies_banners.js +41 -0
- package/build/components/conversation/disabled_replies_banners.js.map +1 -0
- package/build/components/conversation/empty_conversation_blank_state.d.ts +2 -0
- package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -0
- package/build/components/conversation/empty_conversation_blank_state.js +5 -0
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -0
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +5 -1
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +2 -0
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +4 -4
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +3 -2
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +77 -19
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/display/blank_state.d.ts +13 -0
- package/build/components/display/blank_state.d.ts.map +1 -0
- package/build/components/display/blank_state.js +46 -0
- package/build/components/display/blank_state.js.map +1 -0
- package/build/components/display/image.d.ts +11 -2
- package/build/components/display/image.d.ts.map +1 -1
- package/build/components/display/image.js +5 -3
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/keyboard_view.d.ts.map +1 -1
- package/build/components/display/keyboard_view.js +23 -22
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/contexts/chat_context.d.ts +7 -6
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +2 -2
- package/build/contexts/chat_context.js.map +1 -1
- package/build/hooks/use_conversation.js +1 -1
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/{use_message_create.d.ts → use_message_create_or_update.d.ts} +3 -2
- package/build/hooks/use_message_create_or_update.d.ts.map +1 -0
- package/build/hooks/{use_message_create.js → use_message_create_or_update.js} +21 -11
- package/build/hooks/use_message_create_or_update.js.map +1 -0
- package/build/navigation/index.d.ts +22 -0
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +10 -0
- package/build/navigation/index.js.map +1 -1
- 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 +21 -13
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +8 -0
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +7 -0
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -0
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +8 -0
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +8 -0
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -4
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js +37 -9
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +4 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +44 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -0
- package/build/screens/design_system_screen.d.ts.map +1 -1
- package/build/screens/design_system_screen.js +11 -0
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts +1 -0
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +15 -5
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.js +4 -2
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/types/resources/member_ability.d.ts +1 -0
- package/build/types/resources/member_ability.d.ts.map +1 -1
- package/build/types/resources/member_ability.js.map +1 -1
- package/package.json +2 -2
- package/src/components/conversation/attachments/image_attachment.tsx +229 -14
- package/src/components/conversation/disabled_replies_banners.tsx +58 -0
- package/src/components/conversation/empty_conversation_blank_state.tsx +11 -0
- package/src/components/conversation/message.tsx +6 -1
- package/src/components/conversation/message_attachments.tsx +15 -6
- package/src/components/conversation/message_form.tsx +101 -19
- package/src/components/display/blank_state.tsx +61 -0
- package/src/components/display/image.tsx +17 -2
- package/src/components/display/keyboard_view.tsx +31 -25
- package/src/contexts/chat_context.tsx +12 -8
- package/src/hooks/use_conversation.ts +1 -1
- package/src/hooks/{use_message_create.ts → use_message_create_or_update.ts} +21 -11
- package/src/navigation/index.tsx +15 -0
- package/src/screens/conversation_screen.tsx +47 -22
- package/src/screens/conversation_select_recipients/components/groups_recipient_row.tsx +23 -0
- package/src/screens/conversation_select_recipients/components/team_recipient_row.tsx +23 -0
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +4 -11
- package/src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx +57 -15
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +70 -0
- package/src/screens/design_system_screen.tsx +19 -0
- package/src/screens/message_actions_screen.tsx +26 -9
- package/src/screens/send_giphy_screen.tsx +4 -2
- package/src/types/resources/member_ability.ts +1 -0
- package/build/hooks/use_message_create.d.ts.map +0 -1
- package/build/hooks/use_message_create.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_select_group_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"conversation_select_group_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAElE,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAA;AAChG,OAAO,EAAE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AAK,EAAiC,EAAE,EAAE;YAC7D,OAAO,CACL,CAAC,kBAAkB,CACjB,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CACd,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,+BAA+B,CAAC,EACzC,CACH,CAAA;QACH,CAAC,CAAC,CACF,mBAAmB,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,8BAA8B,CAAC,AAAD,EAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EACtF,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,aAAa,EAAE,MAAM;SACtB;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,CAAC;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { FlashList } from '@shopify/flash-list'\nimport { Heading } from '../../components'\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 { GroupsWithoutChatDisclaimerRow } from './components/groups_without_chat_disclaimer_row'\nimport { GroupsRecipientRow } from './components/groups_recipient_row'\n\nexport const ConversationSelectGroupRecipientsScreen = ({\n route,\n}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const { data: groups = [] } = useGroupsGroups()\n const groupsWithCreatePermission = groups.filter(g => g.canCreateConversation)\n const showGroupsDisclaimer = groups.length > groupsWithCreatePermission.length\n\n const handleNavigateToConversationNew = (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 return (\n <FlashList\n data={groupsWithCreatePermission}\n keyExtractor={item => item.id.toString()}\n estimatedItemSize={65}\n contentContainerStyle={styles.contentContainer}\n ListHeaderComponent={\n <View style={styles.sectionHeader}>\n <Heading variant=\"h3\">All my groups</Heading>\n </View>\n }\n renderItem={({ item: group }: { item: GroupsGroupResource }) => {\n return (\n <GroupsRecipientRow\n key={group.id}\n group={group}\n onPress={handleNavigateToConversationNew}\n />\n )\n }}\n ListFooterComponent={showGroupsDisclaimer ? <GroupsWithoutChatDisclaimerRow /> : null}\n />\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 16,\n paddingBottom: 4,\n },\n })\n}\n"]}
|
package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_select_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"conversation_select_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAU9E,eAAO,MAAM,kCAAkC,eAE5C,uCAAuC,sBAyHzC,CAAA"}
|
package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js
CHANGED
|
@@ -3,22 +3,23 @@ import React from 'react';
|
|
|
3
3
|
import { ScrollView, StyleSheet, View } from 'react-native';
|
|
4
4
|
import { Button, Heading } from '../../components';
|
|
5
5
|
import { useGroupsGroups } from '../../hooks/use_groups_groups';
|
|
6
|
-
import { pluralize } from '../../utils';
|
|
7
|
-
import { RecipientLinkRow } from './components/recipient_link_row';
|
|
8
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
9
7
|
import { ViewMoreLinkRow } from './components/view_more_link_row';
|
|
10
8
|
import { GroupsWithoutChatDisclaimerRow } from './components/groups_without_chat_disclaimer_row';
|
|
11
|
-
|
|
9
|
+
import { useServiceTypesWithTeams } from '../conversation_filter_recipients/hooks/use_service_types_with_teams';
|
|
10
|
+
import { TeamRecipientRow } from './components/team_recipient_row';
|
|
11
|
+
import { GroupsRecipientRow } from './components/groups_recipient_row';
|
|
12
|
+
const MAX_VISIBLE_RECIPIENTS = 5;
|
|
12
13
|
export const ConversationSelectRecipientsScreen = ({ route, }) => {
|
|
13
14
|
const styles = useStyles();
|
|
14
15
|
const navigation = useNavigation();
|
|
15
16
|
const { data: groups = [] } = useGroupsGroups();
|
|
16
17
|
const groupsWithCreatePermission = groups.filter(g => g.canCreateConversation);
|
|
17
|
-
const visibleGroups = groupsWithCreatePermission.slice(0,
|
|
18
|
-
const hasMoreGroups = groupsWithCreatePermission.length >
|
|
18
|
+
const visibleGroups = groupsWithCreatePermission.slice(0, MAX_VISIBLE_RECIPIENTS);
|
|
19
|
+
const hasMoreGroups = groupsWithCreatePermission.length > MAX_VISIBLE_RECIPIENTS;
|
|
19
20
|
const hasGroupsWithoutChatPermission = groups.length > groupsWithCreatePermission.length;
|
|
20
21
|
const showGroupsDisclaimer = hasGroupsWithoutChatPermission && !hasMoreGroups;
|
|
21
|
-
const
|
|
22
|
+
const handleGroupsNavigateToConversationNew = (group) => {
|
|
22
23
|
navigation.navigate('New', {
|
|
23
24
|
screen: 'ConversationNew',
|
|
24
25
|
params: {
|
|
@@ -36,6 +37,28 @@ export const ConversationSelectRecipientsScreen = ({ route, }) => {
|
|
|
36
37
|
},
|
|
37
38
|
});
|
|
38
39
|
};
|
|
40
|
+
const { serviceTypes } = useServiceTypesWithTeams();
|
|
41
|
+
const visibleServiceTypes = serviceTypes.slice(0, MAX_VISIBLE_RECIPIENTS);
|
|
42
|
+
const hasMoreServiceTypes = serviceTypes.length > MAX_VISIBLE_RECIPIENTS;
|
|
43
|
+
const handleTeamsNavigateToConversationNew = (teams) => {
|
|
44
|
+
const teamIds = teams.map(team => team.id);
|
|
45
|
+
navigation.navigate('New', {
|
|
46
|
+
screen: 'ConversationNew',
|
|
47
|
+
params: {
|
|
48
|
+
team_ids: teamIds,
|
|
49
|
+
source_app_name: 'Services',
|
|
50
|
+
...route.params,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const handleServiceTypesViewMore = () => {
|
|
55
|
+
navigation.navigate('New', {
|
|
56
|
+
screen: 'ConversationSelectTeamsILeadRecipients',
|
|
57
|
+
params: {
|
|
58
|
+
...route.params,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
};
|
|
39
62
|
return (<ScrollView contentContainerStyle={styles.contentContainer}>
|
|
40
63
|
<View style={styles.section}>
|
|
41
64
|
<View style={styles.sectionHeader}>
|
|
@@ -43,8 +66,7 @@ export const ConversationSelectRecipientsScreen = ({ route, }) => {
|
|
|
43
66
|
</View>
|
|
44
67
|
<View>
|
|
45
68
|
{visibleGroups.map(group => {
|
|
46
|
-
|
|
47
|
-
return (<RecipientLinkRow key={group.id} imageUri={group.headerImage?.thumbnail} title={group.name} subtitle={`${group.membershipsCount} members`} onPress={() => handleNavigateToConversationNew(group)} accessibilityLabel={groupAccessibilityLabel} accessibilityHint={`Selects group as recipient and navigates to the final screen to finish creating the conversation`}/>);
|
|
69
|
+
return (<GroupsRecipientRow key={group.id} group={group} onPress={handleGroupsNavigateToConversationNew}/>);
|
|
48
70
|
})}
|
|
49
71
|
{hasMoreGroups && (<ViewMoreLinkRow onPress={handleGroupsViewMore} accessibilityHint="Navigate to a full list of your groups."/>)}
|
|
50
72
|
{showGroupsDisclaimer && <GroupsWithoutChatDisclaimerRow />}
|
|
@@ -58,7 +80,13 @@ export const ConversationSelectRecipientsScreen = ({ route, }) => {
|
|
|
58
80
|
params: {
|
|
59
81
|
source_app_name: 'Services',
|
|
60
82
|
},
|
|
61
|
-
})} title="Select teams" variant="outline" iconNameLeft="general.search"/>
|
|
83
|
+
})} title="Select teams" variant="outline" iconNameLeft="general.search" size="sm"/>
|
|
84
|
+
</View>
|
|
85
|
+
<View>
|
|
86
|
+
{visibleServiceTypes.map(serviceType => {
|
|
87
|
+
return (<TeamRecipientRow key={serviceType.id} serviceType={serviceType} onPress={handleTeamsNavigateToConversationNew}/>);
|
|
88
|
+
})}
|
|
89
|
+
{hasMoreServiceTypes && (<ViewMoreLinkRow onPress={handleServiceTypesViewMore} accessibilityHint="Navigate to a full list of teams you lead."/>)}
|
|
62
90
|
</View>
|
|
63
91
|
</View>
|
|
64
92
|
</ScrollView>);
|
package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"conversation_select_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx"],"names":[],"mappings":"AAAA,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AAE;YACzB,MAAM,EAAE,8BAA8B;YACtC,MAAM,EAAE;gBACN,eAAe,EAAE,UAAU;aAC5B;SACF,CACH,CAAC,CACD,KAAK,CAAC,cAAc,CACpB,OAAO,CAAC,SAAS,CACjB,YAAY,CAAC,gBAAgB,CAC7B,IAAI,CAAC,IAAI,EAEb;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,IAAI,CACH;UAAA,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YACrC,OAAO,CACL,CAAC,gBAAgB,CACf,GAAG,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CACpB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,oCAAoC,CAAC,EAC9C,CACH,CAAA;QACH,CAAC,CAAC,CACF;UAAA,CAAC,mBAAmB,IAAI,CACtB,CAAC,eAAe,CACd,OAAO,CAAC,CAAC,0BAA0B,CAAC,CACpC,iBAAiB,CAAC,4CAA4C,EAC9D,CACH,CACH;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,UAAU,CAAC,CACd,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE,GAAG,MAAM;SAC3B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,CAAC;SACR;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,iBAAiB,EAAE,EAAE;YACrB,aAAa,EAAE,CAAC;SACjB;QACD,iBAAiB,EAAE,EAAE;KACtB,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 { 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 } from '../conversation_filter_recipients/types'\nimport { TeamRecipientRow } from './components/team_recipient_row'\nimport { GroupsRecipientRow } from './components/groups_recipient_row'\n\nconst MAX_VISIBLE_RECIPIENTS = 5\n\nexport const ConversationSelectRecipientsScreen = ({\n route,\n}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n\n const { data: groups = [] } = 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 } = useServiceTypesWithTeams()\n const visibleServiceTypes = serviceTypes.slice(0, MAX_VISIBLE_RECIPIENTS)\n const hasMoreServiceTypes = serviceTypes.length > MAX_VISIBLE_RECIPIENTS\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 <View style={styles.section}>\n <View style={styles.sectionHeader}>\n <Heading variant=\"h3\">My groups</Heading>\n </View>\n <View>\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 </View>\n </View>\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 navigation.navigate('New', {\n screen: 'ConversationFilterRecipients',\n params: {\n source_app_name: 'Services',\n },\n })\n }\n title=\"Select teams\"\n variant=\"outline\"\n iconNameLeft=\"general.search\"\n size=\"sm\"\n />\n </View>\n <View>\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 </View>\n </View>\n </ScrollView>\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 })\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConversationSelectRecipientsScreenProps } from './types/screen_props';
|
|
3
|
+
export declare const ConversationSelectTeamsILeadRecipientsScreen: ({ route, }: ConversationSelectRecipientsScreenProps) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=conversation_select_teams_i_lead_recipients_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_select_teams_i_lead_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAK9E,eAAO,MAAM,4CAA4C,eAEtD,uCAAuC,sBAwCzC,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { useNavigation } from '@react-navigation/native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { FlashList } from '@shopify/flash-list';
|
|
5
|
+
import { Heading } from '../../components';
|
|
6
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
|
+
import { useServiceTypesWithTeams } from '../conversation_filter_recipients/hooks/use_service_types_with_teams';
|
|
8
|
+
import { TeamRecipientRow } from './components/team_recipient_row';
|
|
9
|
+
export const ConversationSelectTeamsILeadRecipientsScreen = ({ route, }) => {
|
|
10
|
+
const styles = useStyles();
|
|
11
|
+
const navigation = useNavigation();
|
|
12
|
+
const { serviceTypes } = useServiceTypesWithTeams();
|
|
13
|
+
const handleNavigateToConversationNew = (teams) => {
|
|
14
|
+
const teamIds = teams.map(team => team.id);
|
|
15
|
+
navigation.navigate('New', {
|
|
16
|
+
screen: 'ConversationNew',
|
|
17
|
+
params: {
|
|
18
|
+
team_ids: teamIds,
|
|
19
|
+
source_app_name: 'Services',
|
|
20
|
+
...route.params,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
return (<FlashList data={serviceTypes} keyExtractor={item => item.id.toString()} estimatedItemSize={65} contentContainerStyle={styles.contentContainer} ListHeaderComponent={<View style={styles.sectionHeader}>
|
|
25
|
+
<Heading variant="h3">All teams I lead</Heading>
|
|
26
|
+
</View>} renderItem={({ item: serviceType }) => {
|
|
27
|
+
return (<TeamRecipientRow key={serviceType.id} serviceType={serviceType} onPress={handleNavigateToConversationNew}/>);
|
|
28
|
+
}}/>);
|
|
29
|
+
};
|
|
30
|
+
const useStyles = () => {
|
|
31
|
+
const { bottom } = useSafeAreaInsets();
|
|
32
|
+
return StyleSheet.create({
|
|
33
|
+
contentContainer: {
|
|
34
|
+
paddingBottom: bottom,
|
|
35
|
+
},
|
|
36
|
+
sectionHeader: {
|
|
37
|
+
flexDirection: 'row',
|
|
38
|
+
justifyContent: 'space-between',
|
|
39
|
+
padding: 16,
|
|
40
|
+
paddingBottom: 4,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=conversation_select_teams_i_lead_recipients_screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_select_teams_i_lead_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB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E,IAAI,EAAE,WAAW,EAAkC,EAAE,EAAE;YACpE,OAAO,CACL,CAAC,gBAAgB,CACf,GAAG,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CACpB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,+BAA+B,CAAC,EACzC,CACH,CAAA;QACH,CAAC,CAAC,EACF,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAEtC,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,gBAAgB,EAAE;YAChB,aAAa,EAAE,MAAM;SACtB;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,CAAC;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet, View } from 'react-native'\nimport { FlashList } from '@shopify/flash-list'\nimport { Heading } from '../../components'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { ConversationSelectRecipientsScreenProps } from './types/screen_props'\nimport { useServiceTypesWithTeams } from '../conversation_filter_recipients/hooks/use_service_types_with_teams'\nimport { ServiceTypeWithTeams } from '../conversation_filter_recipients/types'\nimport { TeamRecipientRow } from './components/team_recipient_row'\n\nexport const ConversationSelectTeamsILeadRecipientsScreen = ({\n route,\n}: ConversationSelectRecipientsScreenProps) => {\n const styles = useStyles()\n const navigation = useNavigation()\n const { serviceTypes } = useServiceTypesWithTeams()\n\n const handleNavigateToConversationNew = (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 return (\n <FlashList\n data={serviceTypes}\n keyExtractor={item => item.id.toString()}\n estimatedItemSize={65}\n contentContainerStyle={styles.contentContainer}\n ListHeaderComponent={\n <View style={styles.sectionHeader}>\n <Heading variant=\"h3\">All teams I lead</Heading>\n </View>\n }\n renderItem={({ item: serviceType }: { item: ServiceTypeWithTeams }) => {\n return (\n <TeamRecipientRow\n key={serviceType.id}\n serviceType={serviceType}\n onPress={handleNavigateToConversationNew}\n />\n )\n }}\n />\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n contentContainer: {\n paddingBottom: bottom,\n },\n sectionHeader: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n padding: 16,\n paddingBottom: 4,\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design_system_screen.d.ts","sourceRoot":"","sources":["../../src/screens/design_system_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"design_system_screen.d.ts","sourceRoot":"","sources":["../../src/screens/design_system_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AA+EvC,wBAAgB,kBAAkB,sBAiBjC"}
|
|
@@ -4,6 +4,7 @@ import { useTheme } from '../hooks';
|
|
|
4
4
|
import { Avatar, AvatarGroup, Badge, Banner, BannerCollapsible, Button, ToggleButton, Heading, Icon, IconButton, Image, Person, Spinner, Switch, Text, TextButton, TextInlineButton, } from '../components/display';
|
|
5
5
|
import { space, MAX_FONT_SIZE_MULTIPLIER, platformPressedOpacityStyle, platformFontWeightMedium, } from '../utils';
|
|
6
6
|
import BannerPrimitive from '../components/primitive/banner_primitive';
|
|
7
|
+
import { BlankState } from '../components/display/blank_state';
|
|
7
8
|
// =================================
|
|
8
9
|
// ====== Docs Utils ===============
|
|
9
10
|
// =================================
|
|
@@ -519,6 +520,16 @@ function MiscComponentsSection({ isLast }) {
|
|
|
519
520
|
<Person person={personChild}/>
|
|
520
521
|
</Column>
|
|
521
522
|
</Group>
|
|
523
|
+
<Group title="BlankState" description="Displays a title and an optional icon, subtitle, and button. Button can be customized via `buttonProps`.">
|
|
524
|
+
<Column>
|
|
525
|
+
<BlankState iconName="general.outlinedTextMessage" title="No messages" subtitle="Conversation is hidden from everyone until you send a message." buttonProps={{
|
|
526
|
+
onPress: buttonPress,
|
|
527
|
+
title: 'Go back',
|
|
528
|
+
accessibilityHint: 'Navigates back to the conversations list',
|
|
529
|
+
accessibilityRole: 'link',
|
|
530
|
+
}}/>
|
|
531
|
+
</Column>
|
|
532
|
+
</Group>
|
|
522
533
|
</CollapsableSection>);
|
|
523
534
|
}
|
|
524
535
|
function CollapsableSection({ children, title, isLast = false }) {
|