@planningcenter/chat-react-native 3.2.0-rc.13 → 3.2.0-rc.15
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/banner.d.ts +6 -1
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +2 -2
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.d.ts +1 -1
- package/build/components/display/banner_collapsible.d.ts.map +1 -1
- package/build/components/display/banner_collapsible.js +2 -2
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/child_notice.d.ts +3 -1
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +2 -2
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/primitive/banner_primitive.d.ts +3 -0
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +4 -4
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +12 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.js +4 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
- package/build/navigation/index.d.ts +30 -22
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +5 -2
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_details_screen.js +2 -2
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +74 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -0
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/header_row.js +69 -0
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.d.ts +5 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.js +46 -0
- package/build/screens/conversation_filter_recipients/components/navigation_header.js.map +1 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.d.ts +17 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.js +37 -0
- package/build/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.js.map +1 -0
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -3
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +66 -32
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.js +32 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.js.map +1 -0
- package/build/screens/conversation_filter_recipients/types.d.ts +38 -0
- package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/types.js +6 -0
- package/build/screens/conversation_filter_recipients/types.js.map +1 -0
- package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.d.ts +3 -0
- package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.js +133 -0
- package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.js.map +1 -0
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +9 -5
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/team_form.d.ts +1 -1
- package/build/screens/conversation_new/components/team_form.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +4 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts +5 -2
- 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 +3 -2
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +2 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +32 -1
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.d.ts +10 -0
- package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -0
- package/build/utils/destructure_chat_group_graph_id.js +8 -0
- package/build/utils/destructure_chat_group_graph_id.js.map +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +1 -0
- package/build/utils/index.js.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts +2 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts.map +1 -1
- package/build/vendor/tapestry/alias_tokens_color_map.js +2 -0
- package/build/vendor/tapestry/alias_tokens_color_map.js.map +1 -1
- package/package.json +2 -2
- package/src/components/display/banner.tsx +7 -1
- package/src/components/display/banner_collapsible.tsx +6 -1
- package/src/components/display/child_notice.tsx +9 -3
- package/src/components/primitive/banner_primitive.tsx +12 -5
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +5 -0
- package/src/navigation/index.tsx +10 -2
- package/src/screens/conversation_details_screen.tsx +2 -2
- package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +101 -0
- package/src/screens/conversation_filter_recipients/components/header_row.tsx +99 -0
- package/src/screens/conversation_filter_recipients/components/navigation_header.tsx +68 -0
- package/src/screens/conversation_filter_recipients/context/conversation_filter_recipients_context.tsx +53 -0
- package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +89 -49
- package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.tsx +50 -0
- package/src/screens/conversation_filter_recipients/types.tsx +47 -0
- package/src/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.ts +134 -0
- package/src/screens/conversation_new/components/groups_form.tsx +16 -6
- package/src/screens/conversation_new/components/team_form.tsx +1 -1
- package/src/screens/conversation_new/conversation_new_screen.tsx +4 -1
- package/src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx +9 -3
- package/src/screens/conversations/conversations_screen.tsx +37 -2
- package/src/utils/destructure_chat_group_graph_id.ts +25 -0
- package/src/utils/index.ts +1 -0
- package/src/vendor/tapestry/alias_tokens_color_map.ts +3 -0
- package/build/screens/conversation_new/components/member_error_card.d.ts +0 -5
- package/build/screens/conversation_new/components/member_error_card.d.ts.map +0 -1
- package/build/screens/conversation_new/components/member_error_card.js +0 -17
- package/build/screens/conversation_new/components/member_error_card.js.map +0 -1
- package/src/screens/conversation_new/components/member_error_card.tsx +0 -20
package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js
CHANGED
|
@@ -1,51 +1,85 @@
|
|
|
1
|
-
import { StackActions, useNavigation } from '@react-navigation/native';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { StyleSheet, View } from 'react-native';
|
|
2
|
+
import { Platform, StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
4
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
|
-
import {
|
|
4
|
+
import { FlashList } from '@shopify/flash-list';
|
|
5
|
+
import { Heading } from '../../components';
|
|
6
6
|
import { useTheme } from '../../hooks';
|
|
7
|
+
import { useFlattenedArrayOfServiceTypesAndTheirTeams } from './hooks/use_flattened_array_of_service_types_and_their_teams';
|
|
8
|
+
import { FAKE_SERVICE_TYPE_WITH_TEAMS_DATA } from './utils/fake_service_type_with_teams_data';
|
|
9
|
+
import { SectionTypes } from './types';
|
|
10
|
+
import { HeaderRow } from './components/header_row';
|
|
11
|
+
import { tokens } from '../../vendor/tapestry/tokens';
|
|
12
|
+
import { CheckboxRow } from './components/checkbox_row';
|
|
13
|
+
import { useHeaderHeight } from '@react-navigation/elements';
|
|
14
|
+
import { FilterRecipientsProvider } from './context/conversation_filter_recipients_context';
|
|
15
|
+
import { HeaderRightWithContext, FilterHeaderTitle } from './components/navigation_header';
|
|
16
|
+
const SERVICE_TYPE_LABELLED_BY_PREFIX = 'header-';
|
|
7
17
|
export const ConversationFilterReceipientsScreenOptions = {
|
|
8
|
-
presentation: 'formSheet',
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
presentation: Platform.select({ android: 'modal', ios: 'formSheet' }),
|
|
19
|
+
sheetAllowedDetents: Platform.select({
|
|
20
|
+
android: [0.75, 0.94],
|
|
21
|
+
default: [0.75, 1],
|
|
22
|
+
}),
|
|
11
23
|
sheetGrabberVisible: true,
|
|
24
|
+
headerBackVisible: false,
|
|
25
|
+
headerRight: HeaderRightWithContext,
|
|
26
|
+
headerTitle: FilterHeaderTitle,
|
|
27
|
+
headerTitleAlign: 'left',
|
|
12
28
|
};
|
|
13
29
|
export const ConversationFilterRecipientsScreen = ({}) => {
|
|
14
30
|
const styles = useStyles();
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
const data = useFlattenedArrayOfServiceTypesAndTheirTeams({
|
|
32
|
+
data: FAKE_SERVICE_TYPE_WITH_TEAMS_DATA,
|
|
33
|
+
firstRowStyle: styles.firstRow,
|
|
34
|
+
lastRowStyle: styles.lastRow,
|
|
35
|
+
});
|
|
36
|
+
return (<FilterRecipientsProvider>
|
|
37
|
+
<View style={styles.listWrapper}>
|
|
38
|
+
<FlashList data={data} ListHeaderComponent={<Heading variant="h3" style={styles.listHeader}>
|
|
39
|
+
Service Types
|
|
40
|
+
</Heading>} estimatedItemSize={50} contentContainerStyle={styles.listContentContainer} keyExtractor={item => `${item.type === SectionTypes.header ? item.data.serviceTypeId : item.data.teamId}`} renderItem={({ item }) => {
|
|
41
|
+
switch (item.type) {
|
|
42
|
+
case SectionTypes.header:
|
|
43
|
+
return (<HeaderRow data={item.data} style={item.sectionStyle} nativeID={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}/>);
|
|
44
|
+
case SectionTypes.team:
|
|
45
|
+
return (<CheckboxRow data={item.data} style={item.sectionStyle} accessibilityLabelledBy={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}/>);
|
|
46
|
+
default:
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}}/>
|
|
25
50
|
</View>
|
|
26
|
-
</
|
|
51
|
+
</FilterRecipientsProvider>);
|
|
27
52
|
};
|
|
28
53
|
const useStyles = () => {
|
|
29
|
-
const {
|
|
30
|
-
const
|
|
54
|
+
const { colors } = useTheme();
|
|
55
|
+
const { top, bottom } = useSafeAreaInsets();
|
|
56
|
+
const { height } = useWindowDimensions();
|
|
57
|
+
const headerHeight = useHeaderHeight();
|
|
58
|
+
const containerHeight = Platform.select({
|
|
59
|
+
android: height,
|
|
60
|
+
ios: height - top - headerHeight,
|
|
61
|
+
});
|
|
31
62
|
return StyleSheet.create({
|
|
32
|
-
|
|
33
|
-
flex: 1,
|
|
34
|
-
gap: 8,
|
|
35
|
-
},
|
|
36
|
-
section: {
|
|
37
|
-
padding: 16,
|
|
38
|
-
flexDirection: 'row',
|
|
39
|
-
justifyContent: 'space-between',
|
|
63
|
+
listWrapper: {
|
|
40
64
|
flex: 1,
|
|
65
|
+
height: containerHeight,
|
|
66
|
+
backgroundColor: colors.surfaceColor080,
|
|
41
67
|
},
|
|
42
|
-
|
|
43
|
-
routeDebug: {
|
|
44
|
-
alignContent: 'center',
|
|
68
|
+
listContentContainer: {
|
|
45
69
|
padding: 16,
|
|
46
70
|
paddingBottom: bottom,
|
|
47
|
-
|
|
48
|
-
|
|
71
|
+
},
|
|
72
|
+
listHeader: {
|
|
73
|
+
paddingBottom: 16,
|
|
74
|
+
},
|
|
75
|
+
firstRow: {
|
|
76
|
+
borderTopStartRadius: tokens.borderRadiusLg,
|
|
77
|
+
borderTopEndRadius: tokens.borderRadiusLg,
|
|
78
|
+
},
|
|
79
|
+
lastRow: {
|
|
80
|
+
borderBottomStartRadius: tokens.borderRadiusLg,
|
|
81
|
+
borderBottomEndRadius: tokens.borderRadiusLg,
|
|
82
|
+
marginBottom: 16,
|
|
49
83
|
},
|
|
50
84
|
});
|
|
51
85
|
};
|
package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_filter_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation_filter_recipients_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,OAAO,E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AA+B,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,EACxF,CACH,CAAA;gBACH;oBACE,OAAO,IAAI,CAAA;YACf,CAAC;QACH,CAAC,CAAC,EAEN;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,wBAAwB,CAAC,CAC5B,CAAA;AACH,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAC7B,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB,EAAE,CAAA;IACxC,MAAM,YAAY,GAAG,eAAe,EAAE,CAAA;IAEtC,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC;QACtC,OAAO,EAAE,MAAM;QACf,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,YAAY;KACjC,CAAC,CAAA;IAEF,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,WAAW,EAAE;YACX,IAAI,EAAE,CAAC;YACP,MAAM,EAAE,eAAe;YACvB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,oBAAoB,EAAE;YACpB,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,MAAM;SACtB;QACD,UAAU,EAAE;YACV,aAAa,EAAE,EAAE;SAClB;QACD,QAAQ,EAAE;YACR,oBAAoB,EAAE,MAAM,CAAC,cAAc;YAC3C,kBAAkB,EAAE,MAAM,CAAC,cAAc;SAC1C;QACD,OAAO,EAAE;YACP,uBAAuB,EAAE,MAAM,CAAC,cAAc;YAC9C,qBAAqB,EAAE,MAAM,CAAC,cAAc;YAC5C,YAAY,EAAE,EAAE;SACjB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { NativeStackNavigationOptions } from '@react-navigation/native-stack'\nimport React from 'react'\nimport { Platform, StyleSheet, useWindowDimensions, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { FlashList } from '@shopify/flash-list'\nimport { Heading } from '../../components'\nimport { useTheme } from '../../hooks'\nimport { useFlattenedArrayOfServiceTypesAndTheirTeams } from './hooks/use_flattened_array_of_service_types_and_their_teams'\nimport { FAKE_SERVICE_TYPE_WITH_TEAMS_DATA } from './utils/fake_service_type_with_teams_data'\nimport { ConversationFilterRecipientsScreenProps, SectionTypes } from './types'\nimport { HeaderRow } from './components/header_row'\nimport { tokens } from '../../vendor/tapestry/tokens'\nimport { CheckboxRow } from './components/checkbox_row'\nimport { useHeaderHeight } from '@react-navigation/elements'\nimport { FilterRecipientsProvider } from './context/conversation_filter_recipients_context'\nimport { HeaderRightWithContext, FilterHeaderTitle } from './components/navigation_header'\n\nconst SERVICE_TYPE_LABELLED_BY_PREFIX = 'header-'\n\nexport const ConversationFilterReceipientsScreenOptions: NativeStackNavigationOptions = {\n presentation: Platform.select({ android: 'modal', ios: 'formSheet' }),\n sheetAllowedDetents: Platform.select({\n android: [0.75, 0.94],\n default: [0.75, 1],\n }),\n sheetGrabberVisible: true,\n headerBackVisible: false,\n headerRight: HeaderRightWithContext,\n headerTitle: FilterHeaderTitle,\n headerTitleAlign: 'left',\n}\n\nexport const ConversationFilterRecipientsScreen = ({}: ConversationFilterRecipientsScreenProps) => {\n const styles = useStyles()\n\n const data = useFlattenedArrayOfServiceTypesAndTheirTeams({\n data: FAKE_SERVICE_TYPE_WITH_TEAMS_DATA,\n firstRowStyle: styles.firstRow,\n lastRowStyle: styles.lastRow,\n })\n\n return (\n <FilterRecipientsProvider>\n <View style={styles.listWrapper}>\n <FlashList\n data={data}\n ListHeaderComponent={\n <Heading variant=\"h3\" style={styles.listHeader}>\n Service Types\n </Heading>\n }\n estimatedItemSize={50}\n contentContainerStyle={styles.listContentContainer}\n keyExtractor={item =>\n `${item.type === SectionTypes.header ? item.data.serviceTypeId : item.data.teamId}`\n }\n renderItem={({ item }) => {\n switch (item.type) {\n case SectionTypes.header:\n return (\n <HeaderRow\n data={item.data}\n style={item.sectionStyle}\n nativeID={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}\n />\n )\n case SectionTypes.team:\n return (\n <CheckboxRow\n data={item.data}\n style={item.sectionStyle}\n accessibilityLabelledBy={`${SERVICE_TYPE_LABELLED_BY_PREFIX}${item.data.serviceTypeId}`}\n />\n )\n default:\n return null\n }\n }}\n />\n </View>\n </FilterRecipientsProvider>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n const { top, bottom } = useSafeAreaInsets()\n const { height } = useWindowDimensions()\n const headerHeight = useHeaderHeight()\n\n const containerHeight = Platform.select({\n android: height,\n ios: height - top - headerHeight,\n })\n\n return StyleSheet.create({\n listWrapper: {\n flex: 1,\n height: containerHeight,\n backgroundColor: colors.surfaceColor080,\n },\n listContentContainer: {\n padding: 16,\n paddingBottom: bottom,\n },\n listHeader: {\n paddingBottom: 16,\n },\n firstRow: {\n borderTopStartRadius: tokens.borderRadiusLg,\n borderTopEndRadius: tokens.borderRadiusLg,\n },\n lastRow: {\n borderBottomStartRadius: tokens.borderRadiusLg,\n borderBottomEndRadius: tokens.borderRadiusLg,\n marginBottom: 16,\n },\n })\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ViewStyle } from 'react-native';
|
|
2
|
+
import { type SectionListData, type ServiceTypeWithTeams } from '../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
data: ServiceTypeWithTeams[];
|
|
5
|
+
firstRowStyle: ViewStyle;
|
|
6
|
+
lastRowStyle: ViewStyle;
|
|
7
|
+
}
|
|
8
|
+
export declare function useFlattenedArrayOfServiceTypesAndTheirTeams({ data, firstRowStyle, lastRowStyle, }: Props): SectionListData;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=use_flattened_array_of_service_types_and_their_teams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_flattened_array_of_service_types_and_their_teams.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAgB,KAAK,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAExF,UAAU,KAAK;IACb,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAC5B,aAAa,EAAE,SAAS,CAAA;IACxB,YAAY,EAAE,SAAS,CAAA;CACxB;AAED,wBAAgB,4CAA4C,CAAC,EAC3D,IAAI,EACJ,aAAa,EACb,YAAY,GACb,EAAE,KAAK,mBAmCP"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { SectionTypes } from '../types';
|
|
3
|
+
export function useFlattenedArrayOfServiceTypesAndTheirTeams({ data, firstRowStyle, lastRowStyle, }) {
|
|
4
|
+
const flattenedData = useMemo(() => data.flatMap(serviceType => {
|
|
5
|
+
const teamIdsForServiceType = serviceType.teams.map(team => team.id);
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
type: SectionTypes.header,
|
|
9
|
+
data: {
|
|
10
|
+
serviceTypeName: serviceType.name,
|
|
11
|
+
serviceTypeId: serviceType.id,
|
|
12
|
+
teamIdsForServiceType,
|
|
13
|
+
},
|
|
14
|
+
sectionStyle: firstRowStyle,
|
|
15
|
+
},
|
|
16
|
+
...serviceType.teams.map((team, teamIdx) => {
|
|
17
|
+
const isLastTeamInServiceType = teamIdx === serviceType.teams.length - 1;
|
|
18
|
+
return {
|
|
19
|
+
type: SectionTypes.team,
|
|
20
|
+
data: {
|
|
21
|
+
teamName: team.name,
|
|
22
|
+
teamId: team.id,
|
|
23
|
+
serviceTypeId: serviceType.id,
|
|
24
|
+
},
|
|
25
|
+
sectionStyle: isLastTeamInServiceType ? lastRowStyle : undefined,
|
|
26
|
+
};
|
|
27
|
+
}),
|
|
28
|
+
];
|
|
29
|
+
}), [data, firstRowStyle, lastRowStyle]);
|
|
30
|
+
return flattenedData;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=use_flattened_array_of_service_types_and_their_teams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_flattened_array_of_service_types_and_their_teams.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_and_their_teams.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,YAAY,EAAmD,MAAM,UAAU,CAAA;AAQxF,MAAM,UAAU,4CAA4C,CAAC,EAC3D,IAAI,EACJ,aAAa,EACb,YAAY,GACN;IACN,MAAM,aAAa,GAAoB,OAAO,CAC5C,GAAG,EAAE,CACH,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QACzB,MAAM,qBAAqB,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAEpE,OAAO;YACL;gBACE,IAAI,EAAE,YAAY,CAAC,MAAe;gBAClC,IAAI,EAAE;oBACJ,eAAe,EAAE,WAAW,CAAC,IAAI;oBACjC,aAAa,EAAE,WAAW,CAAC,EAAE;oBAC7B,qBAAqB;iBACtB;gBACD,YAAY,EAAE,aAAa;aAC5B;YACD,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;gBACzC,MAAM,uBAAuB,GAAG,OAAO,KAAK,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;gBAExE,OAAO;oBACL,IAAI,EAAE,YAAY,CAAC,IAAa;oBAChC,IAAI,EAAE;wBACJ,QAAQ,EAAE,IAAI,CAAC,IAAI;wBACnB,MAAM,EAAE,IAAI,CAAC,EAAE;wBACf,aAAa,EAAE,WAAW,CAAC,EAAE;qBAC9B;oBACD,YAAY,EAAE,uBAAuB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS;iBACjE,CAAA;YACH,CAAC,CAAC;SACH,CAAA;IACH,CAAC,CAAC,EACJ,CAAC,IAAI,EAAE,aAAa,EAAE,YAAY,CAAC,CACpC,CAAA;IAED,OAAO,aAAa,CAAA;AACtB,CAAC","sourcesContent":["import { useMemo } from 'react'\nimport { type ViewStyle } from 'react-native'\nimport { SectionTypes, type SectionListData, type ServiceTypeWithTeams } from '../types'\n\ninterface Props {\n data: ServiceTypeWithTeams[]\n firstRowStyle: ViewStyle\n lastRowStyle: ViewStyle\n}\n\nexport function useFlattenedArrayOfServiceTypesAndTheirTeams({\n data,\n firstRowStyle,\n lastRowStyle,\n}: Props) {\n const flattenedData: SectionListData = useMemo(\n () =>\n data.flatMap(serviceType => {\n const teamIdsForServiceType = serviceType.teams.map(team => team.id)\n\n return [\n {\n type: SectionTypes.header as const,\n data: {\n serviceTypeName: serviceType.name,\n serviceTypeId: serviceType.id,\n teamIdsForServiceType,\n },\n sectionStyle: firstRowStyle,\n },\n ...serviceType.teams.map((team, teamIdx) => {\n const isLastTeamInServiceType = teamIdx === serviceType.teams.length - 1\n\n return {\n type: SectionTypes.team as const,\n data: {\n teamName: team.name,\n teamId: team.id,\n serviceTypeId: serviceType.id,\n },\n sectionStyle: isLastTeamInServiceType ? lastRowStyle : undefined,\n }\n }),\n ]\n }),\n [data, firstRowStyle, lastRowStyle]\n )\n\n return flattenedData\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ViewStyle } from 'react-native';
|
|
2
|
+
import { AppName } from '../../types/resources/app_name';
|
|
3
|
+
import { StaticScreenProps } from '@react-navigation/native';
|
|
4
|
+
export interface ServiceTypeWithTeams {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
teams: {
|
|
8
|
+
id: number;
|
|
9
|
+
name: string;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export declare enum SectionTypes {
|
|
13
|
+
header = 0,
|
|
14
|
+
team = 1
|
|
15
|
+
}
|
|
16
|
+
export interface ServiceTypeProps {
|
|
17
|
+
serviceTypeName: string;
|
|
18
|
+
serviceTypeId: number;
|
|
19
|
+
teamIdsForServiceType: number[];
|
|
20
|
+
}
|
|
21
|
+
export interface TeamProps {
|
|
22
|
+
teamName: string;
|
|
23
|
+
teamId: number;
|
|
24
|
+
serviceTypeId: number;
|
|
25
|
+
}
|
|
26
|
+
export type SectionListData = Array<DataItem<ServiceTypeProps, SectionTypes.header> | DataItem<TeamProps, SectionTypes.team>>;
|
|
27
|
+
interface DataItem<T, TName extends SectionTypes> {
|
|
28
|
+
type: TName;
|
|
29
|
+
data: T;
|
|
30
|
+
sectionStyle?: ViewStyle;
|
|
31
|
+
}
|
|
32
|
+
export type ConversationFilterRecipientsParams = {
|
|
33
|
+
source_app_name?: AppName;
|
|
34
|
+
team_ids?: number[];
|
|
35
|
+
};
|
|
36
|
+
export type ConversationFilterRecipientsScreenProps = StaticScreenProps<ConversationFilterRecipientsParams>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/types.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;KACb,EAAE,CAAA;CACJ;AAED,oBAAY,YAAY;IACtB,MAAM,IAAA;IACN,IAAI,IAAA;CACL;AAED,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,MAAM,EAAE,CAAA;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CACjC,QAAQ,CAAC,gBAAgB,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,CACzF,CAAA;AAED,UAAU,QAAQ,CAAC,CAAC,EAAE,KAAK,SAAS,YAAY;IAC9C,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,EAAE,CAAC,CAAA;IACP,YAAY,CAAC,EAAE,SAAS,CAAA;CACzB;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,uCAAuC,GACjD,iBAAiB,CAAC,kCAAkC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/screens/conversation_filter_recipients/types.tsx"],"names":[],"mappings":"AAaA,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mDAAM,CAAA;IACN,+CAAI,CAAA;AACN,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["import { type ViewStyle } from 'react-native'\nimport { AppName } from '../../types/resources/app_name'\nimport { StaticScreenProps } from '@react-navigation/native'\n\nexport interface ServiceTypeWithTeams {\n id: number\n name: string\n teams: {\n id: number\n name: string\n }[]\n}\n\nexport enum SectionTypes {\n header,\n team,\n}\n\nexport interface ServiceTypeProps {\n serviceTypeName: string\n serviceTypeId: number\n teamIdsForServiceType: number[]\n}\n\nexport interface TeamProps {\n teamName: string\n teamId: number\n serviceTypeId: number\n}\n\nexport type SectionListData = Array<\n DataItem<ServiceTypeProps, SectionTypes.header> | DataItem<TeamProps, SectionTypes.team>\n>\n\ninterface DataItem<T, TName extends SectionTypes> {\n type: TName\n data: T\n sectionStyle?: ViewStyle\n}\n\nexport type ConversationFilterRecipientsParams = {\n source_app_name?: AppName\n team_ids?: number[]\n}\n\nexport type ConversationFilterRecipientsScreenProps =\n StaticScreenProps<ConversationFilterRecipientsParams>\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake_service_type_with_teams_data.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C,eAAO,MAAM,iCAAiC,EAAE,oBAAoB,EAmInE,CAAA"}
|
package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.js
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export const FAKE_SERVICE_TYPE_WITH_TEAMS_DATA = [
|
|
2
|
+
{
|
|
3
|
+
id: 1,
|
|
4
|
+
name: 'Contemporary Service',
|
|
5
|
+
teams: [
|
|
6
|
+
{
|
|
7
|
+
id: 2,
|
|
8
|
+
name: 'Audio Visual',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: 3,
|
|
12
|
+
name: 'Ushers',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 4,
|
|
18
|
+
name: 'Traditional Service',
|
|
19
|
+
teams: [
|
|
20
|
+
{
|
|
21
|
+
id: 5,
|
|
22
|
+
name: 'Welcome Team',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 6,
|
|
28
|
+
name: 'Celebrate Recovery',
|
|
29
|
+
teams: [
|
|
30
|
+
{
|
|
31
|
+
id: 7,
|
|
32
|
+
name: 'Mens small group leaders',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 8,
|
|
36
|
+
name: 'Womans small group leaders',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 9,
|
|
40
|
+
name: 'The Landing',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 10,
|
|
44
|
+
name: 'Tech Booth',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 11,
|
|
48
|
+
name: 'Worship Team',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 12,
|
|
52
|
+
name: 'Teaching Team',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 13,
|
|
56
|
+
name: 'Step Study Leaders',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 14,
|
|
60
|
+
name: 'TEAM+',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 15,
|
|
66
|
+
name: 'Staff',
|
|
67
|
+
teams: [
|
|
68
|
+
{
|
|
69
|
+
id: 16,
|
|
70
|
+
name: 'Facilities',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 17,
|
|
74
|
+
name: 'Pastors On Call',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 18,
|
|
78
|
+
name: 'Prayer Team',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 19,
|
|
84
|
+
name: 'Services type with over 10 teams',
|
|
85
|
+
teams: [
|
|
86
|
+
{
|
|
87
|
+
id: 20,
|
|
88
|
+
name: 'Young Adult Ministry',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 21,
|
|
92
|
+
name: "Children's Ministry",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 22,
|
|
96
|
+
name: 'Worship Team',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 23,
|
|
100
|
+
name: 'Audio/Visual Ministry',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 24,
|
|
104
|
+
name: 'Community Outreach',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 25,
|
|
108
|
+
name: 'Small Groups Ministry',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 26,
|
|
112
|
+
name: 'Missions Ministry',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 27,
|
|
116
|
+
name: 'Media Ministry',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 28,
|
|
120
|
+
name: 'Welcome Team',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 29,
|
|
124
|
+
name: 'Prayer Ministry',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: 30,
|
|
128
|
+
name: 'Pastoral Care Team',
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
];
|
|
133
|
+
//# sourceMappingURL=fake_service_type_with_teams_data.js.map
|
package/build/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake_service_type_with_teams_data.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filter_recipients/utils/fake_service_type_with_teams_data.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,iCAAiC,GAA2B;IACvE;QACE,EAAE,EAAE,CAAC;QACL,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,CAAC;gBACL,IAAI,EAAE,cAAc;aACrB;YACD;gBACE,EAAE,EAAE,CAAC;gBACL,IAAI,EAAE,Q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;YACD;gBACE,EAAE,EAAE,EAAE;gBACN,IAAI,EAAE,uBAAuB;aAC9B;YACD;gBACE,EAAE,EAAE,EAAE;gBACN,IAAI,EAAE,oBAAoB;aAC3B;YACD;gBACE,EAAE,EAAE,EAAE;gBACN,IAAI,EAAE,uBAAuB;aAC9B;YACD;gBACE,EAAE,EAAE,EAAE;gBACN,IAAI,EAAE,mBAAmB;aAC1B;YACD;gBACE,EAAE,EAAE,EAAE;gBACN,IAAI,EAAE,gBAAgB;aACvB;YACD;gBACE,EAAE,EAAE,EAAE;gBACN,IAAI,EAAE,cAAc;aACrB;YACD;gBACE,EAAE,EAAE,EAAE;gBACN,IAAI,EAAE,iBAAiB;aACxB;YACD;gBACE,EAAE,EAAE,EAAE;gBACN,IAAI,EAAE,oBAAoB;aAC3B;SACF;KACF;CACF,CAAA","sourcesContent":["import { ServiceTypeWithTeams } from '../types'\n\nexport const FAKE_SERVICE_TYPE_WITH_TEAMS_DATA: ServiceTypeWithTeams[] = [\n {\n id: 1,\n name: 'Contemporary Service',\n teams: [\n {\n id: 2,\n name: 'Audio Visual',\n },\n {\n id: 3,\n name: 'Ushers',\n },\n ],\n },\n {\n id: 4,\n name: 'Traditional Service',\n teams: [\n {\n id: 5,\n name: 'Welcome Team',\n },\n ],\n },\n {\n id: 6,\n name: 'Celebrate Recovery',\n teams: [\n {\n id: 7,\n name: 'Mens small group leaders',\n },\n {\n id: 8,\n name: 'Womans small group leaders',\n },\n {\n id: 9,\n name: 'The Landing',\n },\n {\n id: 10,\n name: 'Tech Booth',\n },\n {\n id: 11,\n name: 'Worship Team',\n },\n {\n id: 12,\n name: 'Teaching Team',\n },\n {\n id: 13,\n name: 'Step Study Leaders',\n },\n {\n id: 14,\n name: 'TEAM+',\n },\n ],\n },\n {\n id: 15,\n name: 'Staff',\n teams: [\n {\n id: 16,\n name: 'Facilities',\n },\n {\n id: 17,\n name: 'Pastors On Call',\n },\n {\n id: 18,\n name: 'Prayer Team',\n },\n ],\n },\n {\n id: 19,\n name: 'Services type with over 10 teams',\n teams: [\n {\n id: 20,\n name: 'Young Adult Ministry',\n },\n {\n id: 21,\n name: \"Children's Ministry\",\n },\n {\n id: 22,\n name: 'Worship Team',\n },\n {\n id: 23,\n name: 'Audio/Visual Ministry',\n },\n {\n id: 24,\n name: 'Community Outreach',\n },\n {\n id: 25,\n name: 'Small Groups Ministry',\n },\n {\n id: 26,\n name: 'Missions Ministry',\n },\n {\n id: 27,\n name: 'Media Ministry',\n },\n {\n id: 28,\n name: 'Welcome Team',\n },\n {\n id: 29,\n name: 'Prayer Ministry',\n },\n {\n id: 30,\n name: 'Pastoral Care Team',\n },\n ],\n },\n]\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups_form.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/groups_form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"groups_form.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/groups_form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgC,MAAM,OAAO,CAAA;AAYpD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,UAAU,gBAAiB,eAAe,sBAyDtD,CAAA"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { StackActions, useNavigation } from '@react-navigation/native';
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import { Platform, StyleSheet, TextInput, View } from 'react-native';
|
|
4
|
-
import { Heading, Text } from '../../../components';
|
|
4
|
+
import { Banner, ChildNotice, Heading, Text } from '../../../components';
|
|
5
5
|
import { ActionButton } from '../../../components/display/action_button';
|
|
6
6
|
import { useSuspenseGet } from '../../../hooks';
|
|
7
7
|
import { Divider, FormList } from './form_list';
|
|
8
8
|
import { pluralize } from '../../../utils';
|
|
9
9
|
import { KeyboardView } from '../../../components/display/keyboard_view';
|
|
10
|
-
import { MemberErrorCard } from './member_error_card';
|
|
11
10
|
import { useGroupMembersForNewConversation } from '../../../hooks/groups/use_group_members_for_new_conversation';
|
|
12
11
|
import { useGroupsConversationCreate } from '../../../hooks/groups/use_groups_conversation_create';
|
|
13
12
|
export const GroupsForm = ({ groupId }) => {
|
|
@@ -37,14 +36,15 @@ export const GroupsForm = ({ groupId }) => {
|
|
|
37
36
|
onSuccess: redirectToConversation,
|
|
38
37
|
});
|
|
39
38
|
return (<KeyboardView>
|
|
40
|
-
<FormList memberData={groupMemberships.
|
|
39
|
+
<FormList memberData={groupMemberships.adultMembers} FormContent={<FormContent group={group} title={title} setTitle={setTitle} isMemberError={groupMemberships.isError} childMembers={groupMemberships.childMembers}/>}/>
|
|
41
40
|
<ActionButton disabled={!title} title="Start Conversation" onPress={() => handleSave()} infoText="Conversation will be automatically updated if any members are added or removed from this group."/>
|
|
42
41
|
</KeyboardView>);
|
|
43
42
|
};
|
|
44
|
-
function FormContent({ group, title, setTitle, isMemberError }) {
|
|
43
|
+
function FormContent({ group, title, setTitle, isMemberError, childMembers }) {
|
|
45
44
|
const styles = useStyles();
|
|
46
45
|
const { name, membershipsCount } = group;
|
|
47
46
|
const memberHeader = pluralize(membershipsCount, 'member');
|
|
47
|
+
const hasChildren = childMembers.length > 0;
|
|
48
48
|
return (<View style={styles.formContent}>
|
|
49
49
|
<View style={styles.toSection}>
|
|
50
50
|
<Heading variant="h3">To:</Heading>
|
|
@@ -58,7 +58,8 @@ function FormContent({ group, title, setTitle, isMemberError }) {
|
|
|
58
58
|
<Divider />
|
|
59
59
|
<View style={styles.memberSection}>
|
|
60
60
|
<Heading variant="h3">{memberHeader} selected</Heading>
|
|
61
|
-
{
|
|
61
|
+
{hasChildren && <ChildNotice childMembers={childMembers} style={styles.banner}/>}
|
|
62
|
+
{isMemberError && (<Banner appearance="error" description="There was an issue loading group members, please refresh and try again." style={styles.banner}/>)}
|
|
62
63
|
</View>
|
|
63
64
|
</View>);
|
|
64
65
|
}
|
|
@@ -96,6 +97,9 @@ const useStyles = () => {
|
|
|
96
97
|
padding: sectionPadding,
|
|
97
98
|
paddingBottom: 0,
|
|
98
99
|
},
|
|
100
|
+
banner: {
|
|
101
|
+
marginTop: 16,
|
|
102
|
+
},
|
|
99
103
|
});
|
|
100
104
|
};
|
|
101
105
|
//# sourceMappingURL=groups_form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups_form.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/groups_form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"groups_form.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/groups_form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACtE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACpE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,SAAS,E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,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,cAAc;YACvB,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC;gBAC7B,GAAG,EAAE,cAAc;gBACnB,OAAO,EAAE,cAAc,GAAG,YAAY;aACvC,CAAC;YACF,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC;gBACnB,GAAG,EAAE,CAAC;gBACN,OAAO,EAAE,CAAC;aACX,CAAC;SACH;QACD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE;SACb;QACD,aAAa,EAAE;YACb,OAAO,EAAE,cAAc;YACvB,aAAa,EAAE,CAAC;SACjB;QACD,MAAM,EAAE;YACN,SAAS,EAAE,EAAE;SACd;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StackActions, useNavigation } from '@react-navigation/native'\nimport React, { useCallback, useState } from 'react'\nimport { Platform, StyleSheet, TextInput, View } from 'react-native'\nimport { Banner, ChildNotice, Heading, Text } from '../../../components'\nimport { ActionButton } from '../../../components/display/action_button'\nimport { useSuspenseGet } from '../../../hooks'\nimport { GroupsGroupResource, MemberResource } from '../../../types'\nimport { Divider, FormList } from './form_list'\nimport { pluralize } from '../../../utils'\nimport { KeyboardView } from '../../../components/display/keyboard_view'\nimport { useGroupMembersForNewConversation } from '../../../hooks/groups/use_group_members_for_new_conversation'\nimport { useGroupsConversationCreate } from '../../../hooks/groups/use_groups_conversation_create'\n\ntype GroupsFormProps = {\n groupId: number\n}\n\nexport const GroupsForm = ({ groupId }: GroupsFormProps) => {\n const navigation = useNavigation()\n const [title, setTitle] = useState<string>()\n const { data: group } = useSuspenseGet<GroupsGroupResource>({\n url: `/me/groups/${groupId}`,\n data: {\n fields: {\n Group: [],\n },\n },\n app: 'groups',\n })\n\n const redirectToConversation = useCallback(\n (conversationId: number) => {\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: conversationId,\n })\n )\n },\n [navigation]\n )\n\n const groupMemberships = useGroupMembersForNewConversation({ id: groupId })\n\n const { mutate: handleSave } = useGroupsConversationCreate({\n groupId,\n title,\n onSuccess: redirectToConversation,\n })\n\n return (\n <KeyboardView>\n <FormList\n memberData={groupMemberships.adultMembers}\n FormContent={\n <FormContent\n group={group}\n title={title}\n setTitle={setTitle}\n isMemberError={groupMemberships.isError}\n childMembers={groupMemberships.childMembers}\n />\n }\n />\n <ActionButton\n disabled={!title}\n title=\"Start Conversation\"\n onPress={() => handleSave()}\n infoText=\"Conversation will be automatically updated if any members are added or removed from this group.\"\n />\n </KeyboardView>\n )\n}\n\ninterface FormContentProps {\n group: GroupsGroupResource\n title?: string\n setTitle: (title: string) => void\n isMemberError: boolean\n childMembers: MemberResource[]\n}\n\nfunction FormContent({ group, title, setTitle, isMemberError, childMembers }: FormContentProps) {\n const styles = useStyles()\n const { name, membershipsCount } = group\n const memberHeader = pluralize(membershipsCount, 'member')\n const hasChildren = childMembers.length > 0\n\n return (\n <View style={styles.formContent}>\n <View style={styles.toSection}>\n <Heading variant=\"h3\">To:</Heading>\n <Text style={styles.groupName}>{name}</Text>\n </View>\n <Divider />\n <View style={styles.titleSection}>\n <Heading variant=\"h3\">Title</Heading>\n <TextInput\n placeholder=\"Topic of conversation (required)\"\n value={title}\n onChangeText={setTitle}\n style={styles.titleInput}\n autoFocus={true}\n />\n </View>\n <Divider />\n <View style={styles.memberSection}>\n <Heading variant=\"h3\">{memberHeader} selected</Heading>\n {hasChildren && <ChildNotice childMembers={childMembers} style={styles.banner} />}\n {isMemberError && (\n <Banner\n appearance=\"error\"\n description=\"There was an issue loading group members, please refresh and try again.\"\n style={styles.banner}\n />\n )}\n </View>\n </View>\n )\n}\n\nconst useStyles = () => {\n const sectionPadding = 16\n const inputPadding = 8\n\n return StyleSheet.create({\n formContent: {\n paddingVertical: sectionPadding,\n flex: 1,\n },\n toSection: {\n padding: sectionPadding,\n flexDirection: 'row',\n gap: 8,\n },\n groupName: {\n fontSize: 18,\n },\n titleSection: {\n padding: sectionPadding,\n paddingBottom: Platform.select({\n ios: sectionPadding,\n android: sectionPadding - inputPadding,\n }),\n gap: Platform.select({\n ios: 8,\n android: 0,\n }),\n },\n titleInput: {\n fontSize: 18,\n },\n memberSection: {\n padding: sectionPadding,\n paddingBottom: 0,\n },\n banner: {\n marginTop: 16,\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team_form.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/team_form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAO1C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,cAAc,EAAE,aAAa,EAAiB,EAAE,EAAE;IAC5E,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAA;IAC7C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,CAAA;IAC3C,OAAO,CACL,CAAC,IAAI,CACH;MAAA,CAAC,IAAI,CAAC,8BAA8B,EAAE,IAAI,CAC5C;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { View } from 'react-native'\nimport { Text } from '../../../components'\n\ntype TeamFormProps = {\n initialTeamIds?:
|
|
1
|
+
{"version":3,"file":"team_form.js","sourceRoot":"","sources":["../../../../src/screens/conversation_new/components/team_form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAO1C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,cAAc,EAAE,aAAa,EAAiB,EAAE,EAAE;IAC5E,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAA;IAC7C,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,CAAA;IAC3C,OAAO,CACL,CAAC,IAAI,CACH;MAAA,CAAC,IAAI,CAAC,8BAA8B,EAAE,IAAI,CAC5C;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA","sourcesContent":["import React from 'react'\nimport { View } from 'react-native'\nimport { Text } from '../../../components'\n\ntype TeamFormProps = {\n initialTeamIds?: number[]\n initialPlanId?: number\n}\n\nexport const TeamsForm = ({ initialTeamIds, initialPlanId }: TeamFormProps) => {\n console.log('initialTeamIds', initialTeamIds)\n console.log('initialPlanId', initialPlanId)\n return (\n <View>\n <Text>Services team form coming soon</Text>\n </View>\n )\n}\n"]}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { AppName } from '../../types/resources/app_name';
|
|
4
|
+
import { GraphId } from '../../types/resources/group_resource';
|
|
4
5
|
type ConversationNewScreenProps = StaticScreenProps<{
|
|
5
6
|
group_id?: number;
|
|
6
|
-
team_ids?:
|
|
7
|
+
team_ids?: number[];
|
|
7
8
|
plan_id?: number;
|
|
8
9
|
source_app_name: AppName;
|
|
10
|
+
chat_group_graph_id?: GraphId;
|
|
11
|
+
group_source_app_name?: AppName;
|
|
9
12
|
}>;
|
|
10
13
|
export declare const ConversationNewScreen: ({ route }: ConversationNewScreenProps) => React.JSX.Element;
|
|
11
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_new_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_new/conversation_new_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"conversation_new_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_new/conversation_new_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAE9D,KAAK,0BAA0B,GAAG,iBAAiB,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,OAAO,CAAA;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAC,CAAA;AAEF,eAAO,MAAM,qBAAqB,cAAe,0BAA0B,sBAW1E,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_new_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_new/conversation_new_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;
|
|
1
|
+
{"version":3,"file":"conversation_new_screen.js","sourceRoot":"","sources":["../../../src/screens/conversation_new/conversation_new_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AAavE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,KAAK,EAA8B,EAAE,EAAE;IAC7E,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,CAAA;IAErE,QAAQ,eAAe,EAAE,CAAC;QACxB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,AAAD,EAAG,CAAA;QAC9E,KAAK,UAAU;YACb,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAG,CAAA;QACxE;YACE,OAAO,CAAC,kBAAkB,CAAC,AAAD,EAAG,CAAA;IACjC,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport React from 'react'\nimport { GroupsForm } from './components/groups_form'\nimport { TeamsForm } from './components/team_form'\nimport { SourceAppErrorCard } from './components/source_app_error_card'\nimport { AppName } from '../../types/resources/app_name'\nimport { GraphId } from '../../types/resources/group_resource'\n\ntype ConversationNewScreenProps = StaticScreenProps<{\n group_id?: number\n team_ids?: number[]\n plan_id?: number\n source_app_name: AppName\n chat_group_graph_id?: GraphId\n group_source_app_name?: AppName\n}>\n\nexport const ConversationNewScreen = ({ route }: ConversationNewScreenProps) => {\n const { group_id, team_ids, source_app_name, plan_id } = route.params\n\n switch (source_app_name) {\n case 'Groups':\n return group_id ? <GroupsForm groupId={group_id} /> : <SourceAppErrorCard />\n case 'Services':\n return <TeamsForm initialTeamIds={team_ids} initialPlanId={plan_id} />\n default:\n return <SourceAppErrorCard />\n }\n}\n"]}
|
package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { GraphId } from '../../types/resources/group_resource';
|
|
4
|
+
import { AppName } from '../../types/resources/app_name';
|
|
3
5
|
type ConversationSelectRecipientsScreenProps = StaticScreenProps<{
|
|
4
|
-
chat_group_graph_id?:
|
|
6
|
+
chat_group_graph_id?: GraphId;
|
|
7
|
+
group_source_app_name?: AppName;
|
|
5
8
|
}>;
|
|
6
|
-
export declare const ConversationSelectRecipientsScreen: ({}: ConversationSelectRecipientsScreenProps) => React.JSX.Element;
|
|
9
|
+
export declare const ConversationSelectRecipientsScreen: ({ route, }: ConversationSelectRecipientsScreenProps) => React.JSX.Element;
|
|
7
10
|
export {};
|
|
8
11
|
//# sourceMappingURL=conversation_select_recipients_screen.d.ts.map
|
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,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,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,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAGxD,KAAK,uCAAuC,GAAG,iBAAiB,CAAC;IAC/D,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,CAAC,CAAA;AAMF,eAAO,MAAM,kCAAkC,eAE5C,uCAAuC,sBA2EzC,CAAA"}
|