@planningcenter/chat-react-native 3.39.0-rc.0 → 3.39.0-rc.10
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/messages_disabled_banners.d.ts +6 -1
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +8 -2
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/contexts/api_provider.js +2 -1
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +6 -2
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/hooks/direct_messages/use_direct_message_affiliations.d.ts +5 -0
- package/build/hooks/direct_messages/use_direct_message_affiliations.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_direct_message_affiliations.js +20 -0
- package/build/hooks/direct_messages/use_direct_message_affiliations.js.map +1 -0
- package/build/hooks/direct_messages/use_direct_message_candidates.d.ts +4 -0
- package/build/hooks/direct_messages/use_direct_message_candidates.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_direct_message_candidates.js +28 -0
- package/build/hooks/direct_messages/use_direct_message_candidates.js.map +1 -0
- package/build/hooks/direct_messages/use_direct_message_conversation_validate.d.ts +11 -0
- package/build/hooks/direct_messages/use_direct_message_conversation_validate.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_direct_message_conversation_validate.js +25 -0
- package/build/hooks/direct_messages/use_direct_message_conversation_validate.js.map +1 -0
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.d.ts +13 -0
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js +51 -0
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.js.map +1 -0
- package/build/hooks/groups/use_group_chat_conversation_payload.d.ts.map +1 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.js +2 -1
- package/build/hooks/groups/use_group_chat_conversation_payload.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/services/use_services_chat_conversation_payload.d.ts.map +1 -1
- package/build/hooks/services/use_services_chat_conversation_payload.js +2 -1
- package/build/hooks/services/use_services_chat_conversation_payload.js.map +1 -1
- package/build/hooks/use_api.d.ts +5 -1
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js +2 -1
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_chat_configuration.d.ts.map +1 -1
- package/build/hooks/use_chat_configuration.js +2 -1
- package/build/hooks/use_chat_configuration.js.map +1 -1
- package/build/hooks/use_chat_permissions.d.ts.map +1 -1
- package/build/hooks/use_chat_permissions.js +4 -1
- package/build/hooks/use_chat_permissions.js.map +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +1 -0
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +2 -2
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_current_person.d.ts.map +1 -1
- package/build/hooks/use_current_person.js +4 -2
- package/build/hooks/use_current_person.js.map +1 -1
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +2 -1
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_groups.d.ts.map +1 -1
- package/build/hooks/use_groups.js +2 -1
- package/build/hooks/use_groups.js.map +1 -1
- package/build/hooks/use_groups_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.js +2 -1
- package/build/hooks/use_groups_groups.js.map +1 -1
- package/build/hooks/use_has_direct_messages.d.ts +2 -0
- package/build/hooks/use_has_direct_messages.d.ts.map +1 -0
- package/build/hooks/use_has_direct_messages.js +17 -0
- package/build/hooks/use_has_direct_messages.js.map +1 -0
- package/build/hooks/use_jolt.d.ts.map +1 -1
- package/build/hooks/use_jolt.js +2 -1
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_organization.d.ts.map +1 -1
- package/build/hooks/use_organization.js +4 -1
- package/build/hooks/use_organization.js.map +1 -1
- package/build/hooks/use_person_settings.d.ts +6 -0
- package/build/hooks/use_person_settings.d.ts.map +1 -0
- package/build/hooks/use_person_settings.js +26 -0
- package/build/hooks/use_person_settings.js.map +1 -0
- package/build/navigation/index.d.ts +13 -0
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +9 -0
- 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 +2 -1
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +20 -5
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +2 -1
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +2 -2
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +4 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/filter_types.d.ts +1 -0
- package/build/screens/conversation_filters/filter_types.d.ts.map +1 -1
- package/build/screens/conversation_filters/filter_types.js +1 -0
- package/build/screens/conversation_filters/filter_types.js.map +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts +1 -0
- package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_filters/screen_props.js.map +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +1 -1
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +1 -2
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +319 -10
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +35 -17
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +1 -0
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts.map +1 -1
- package/build/screens/get_help_screen.js +2 -18
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/index.d.ts +1 -0
- package/build/screens/index.d.ts.map +1 -1
- package/build/screens/index.js +1 -0
- package/build/screens/index.js.map +1 -1
- package/build/screens/settings_screen.d.ts +5 -0
- package/build/screens/settings_screen.d.ts.map +1 -0
- package/build/screens/settings_screen.js +56 -0
- package/build/screens/settings_screen.js.map +1 -0
- package/build/types/jolt_events/conversation_events.d.ts +2 -0
- package/build/types/jolt_events/conversation_events.d.ts.map +1 -1
- package/build/types/jolt_events/conversation_events.js.map +1 -1
- package/build/types/resources/conversation.d.ts +2 -0
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/types/resources/direct_message_affiliations.d.ts +8 -0
- package/build/types/resources/direct_message_affiliations.d.ts.map +1 -0
- package/build/types/resources/direct_message_affiliations.js +2 -0
- package/build/types/resources/direct_message_affiliations.js.map +1 -0
- package/build/types/resources/direct_message_candidate.d.ts +12 -0
- package/build/types/resources/direct_message_candidate.d.ts.map +1 -0
- package/build/types/resources/direct_message_candidate.js +2 -0
- package/build/types/resources/direct_message_candidate.js.map +1 -0
- package/build/types/resources/index.d.ts +2 -0
- package/build/types/resources/index.d.ts.map +1 -1
- package/build/types/resources/index.js +2 -0
- package/build/types/resources/index.js.map +1 -1
- package/build/types/resources/organization.d.ts +1 -0
- package/build/types/resources/organization.d.ts.map +1 -1
- package/build/types/resources/organization.js.map +1 -1
- package/build/types/resources/person.d.ts +1 -0
- package/build/types/resources/person.d.ts.map +1 -1
- package/build/types/resources/person.js.map +1 -1
- package/build/utils/request/conversation.d.ts +2 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +15 -6
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/time.d.ts +8 -0
- package/build/utils/time.d.ts.map +1 -0
- package/build/utils/time.js +15 -0
- package/build/utils/time.js.map +1 -0
- package/package.json +2 -2
- package/src/components/conversation/messages_disabled_banners.tsx +16 -2
- package/src/contexts/api_provider.tsx +4 -1
- package/src/contexts/conversations_context.tsx +6 -2
- package/src/hooks/direct_messages/use_direct_message_affiliations.ts +39 -0
- package/src/hooks/direct_messages/use_direct_message_candidates.ts +31 -0
- package/src/hooks/direct_messages/use_direct_message_conversation_validate.ts +35 -0
- package/src/hooks/direct_messages/use_find_or_create_direct_message_conversation.ts +66 -0
- package/src/hooks/groups/use_group_chat_conversation_payload.ts +2 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/services/use_services_chat_conversation_payload.ts +2 -1
- package/src/hooks/use_api.ts +10 -1
- package/src/hooks/use_chat_configuration.ts +2 -1
- package/src/hooks/use_chat_permissions.ts +4 -1
- package/src/hooks/use_conversation.ts +1 -0
- package/src/hooks/use_conversation_jolt_events.ts +3 -2
- package/src/hooks/use_current_person.ts +4 -2
- package/src/hooks/use_features.ts +2 -1
- package/src/hooks/use_groups.ts +16 -12
- package/src/hooks/use_groups_groups.ts +19 -15
- package/src/hooks/use_has_direct_messages.ts +21 -0
- package/src/hooks/use_jolt.ts +2 -1
- package/src/hooks/use_organization.ts +4 -1
- package/src/hooks/use_person_settings.ts +29 -0
- package/src/navigation/index.tsx +11 -0
- package/src/screens/conversation_details_screen.tsx +2 -1
- package/src/screens/conversation_filters/components/conversation_filters.tsx +25 -5
- package/src/screens/conversation_filters/components/rows.tsx +16 -3
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +4 -0
- package/src/screens/conversation_filters/filter_types.ts +1 -0
- package/src/screens/conversation_filters/screen_props.ts +1 -0
- package/src/screens/conversation_screen.tsx +2 -1
- package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +513 -10
- package/src/screens/conversations/components/list_header_component.tsx +84 -34
- package/src/screens/conversations/conversations_screen.tsx +1 -0
- package/src/screens/get_help_screen.tsx +2 -29
- package/src/screens/index.ts +1 -0
- package/src/screens/settings_screen.tsx +67 -0
- package/src/types/jolt_events/conversation_events.ts +2 -0
- package/src/types/resources/conversation.ts +3 -0
- package/src/types/resources/direct_message_affiliations.ts +8 -0
- package/src/types/resources/direct_message_candidate.ts +12 -0
- package/src/types/resources/index.ts +2 -0
- package/src/types/resources/organization.ts +1 -0
- package/src/types/resources/person.ts +1 -0
- package/src/utils/__tests__/conversation.test.ts +14 -0
- package/src/utils/request/conversation.ts +13 -5
- package/src/utils/time.ts +17 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rows.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/components/rows.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAkB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,KAAK,EAAE,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAC5E,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,QAAQ,G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C,CAAC,CAAC;SAC1B;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,CAAC;YACb,UAAU,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,sBAAsB;SACjE;QACD,WAAW,EAAE;YACX,KAAK,EAAE,qBAAqB;gBAC1B,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,yBAAyB;gBACxC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACzC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { NavigationProp, useNavigation } from '@react-navigation/native'\nimport React, { PropsWithChildren, useContext } from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport { Heading, Icon, Image, Text, TextButton } from '../../../components'\nimport {\n useAtFontScaleBreakpoint,\n useFontScale,\n useScalableNumberOfLines,\n useTheme,\n} from '../../../hooks'\nimport { useServicesTeamsMap } from '../../../hooks/services/use_services_team'\nimport { GroupResource } from '../../../types/resources/group_resource'\nimport { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightBold } from '../../../utils/styles'\nimport { FilterContext } from '../context/conversation_filter_context'\nimport { FilterTypes } from '../filter_types'\nimport { FilteredGroup } from '../hooks/filters'\nimport { ConversationFilterStackParamList } from '../screen_props'\n\nexport type FilterProps = { group_source_app_name?: string; isActive: boolean; filter: FilterTypes }\n\nexport const FilterRow = ({ group_source_app_name, isActive, filter }: FilterProps) => {\n const { setAppFilter } = useContext(FilterContext)\n\n return (\n <PressableRow onPress={() => setAppFilter({ group_source_app_name })} isActive={isActive}>\n <Text>{filter}</Text>\n </PressableRow>\n )\n}\n\nexport type GroupRowProps = {\n group: FilteredGroup\n isActive: boolean\n}\n\nexport const GroupRow = ({ group, isActive }: GroupRowProps) => {\n const styles = useRowStyles()\n const { setGroupFilter } = useContext(FilterContext)\n\n const handleFilterByGroup = () => {\n setGroupFilter({ chat_group_graph_id: group.id })\n }\n\n const { headerImage, membershipsCount } = group\n\n return (\n <PressableRow onPress={handleFilterByGroup} isActive={isActive}>\n {headerImage?.thumbnail && (\n <Image\n source={{ uri: headerImage?.thumbnail }}\n resizeMode=\"cover\"\n style={styles.rowImage}\n alt=\"\"\n />\n )}\n <View style={styles.rowTextContainer}>\n <Heading variant=\"h3\" style={styles.rowTitle}>\n {group.name}\n </Heading>\n {membershipsCount && (\n <Text style={styles.rowSubtitle}>{group.membershipsCount} members</Text>\n )}\n </View>\n </PressableRow>\n )\n}\n\nexport type TeamRowProps = {\n team: GroupResource\n isActive: boolean\n}\n\nexport const TeamRow = ({ team }: TeamRowProps) => {\n const { setGroupFilter } = useContext(FilterContext)\n const servicesTeams = useServicesTeamsMap()\n const { params } = useContext(FilterContext)\n const { chat_group_graph_id } = params\n const isActive = chat_group_graph_id === team.id.toString()\n const styles = useRowStyles()\n const scalableNumberOfLines = useScalableNumberOfLines()\n\n const handleFilterByGroup = () => {\n setGroupFilter({ chat_group_graph_id: team.id })\n }\n\n const servicesTeam = servicesTeams[team.id]\n const concatedServiceTypeNames = servicesTeam?.serviceTypeNames.join(', ')\n const serviceTypeName = concatedServiceTypeNames || servicesTeam?.group\n\n return (\n <PressableRow onPress={handleFilterByGroup} isActive={isActive}>\n <View style={styles.rowTextContainer}>\n <Heading variant=\"h3\" style={styles.rowTitle}>\n {team.name}\n </Heading>\n <Text numberOfLines={scalableNumberOfLines} style={styles.rowSubtitle}>\n {serviceTypeName}\n </Text>\n </View>\n </PressableRow>\n )\n}\n\nexport type ViewMoreRowProps = { routeName: keyof ConversationFilterStackParamList }\n\nexport const ViewMore = ({ routeName }: ViewMoreRowProps) => {\n const styles = useRowStyles()\n const navigation = useNavigation<NavigationProp<ConversationFilterStackParamList, 'Filters'>>()\n\n return (\n <View style={[styles.rowWithoutBorder]}>\n <TextButton onPress={() => navigation.navigate(routeName, {})} style={styles.viewMoreButton}>\n View more\n </TextButton>\n </View>\n )\n}\n\nexport const PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n}: PropsWithChildren<{ isActive: boolean; onPress: () => void; style?: ViewStyle }>) => {\n const styles = useRowStyles({ isActive })\n return (\n <PlatformPressable\n style={styles.pressable}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={styles.row}>\n <View style={[styles.rowInner, style]}>{children}</View>\n <Icon\n name=\"general.check\"\n style={styles.rowIconRight}\n accessibilityElementsHidden\n maxFontSizeMultiplier={2.5}\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst ASPECT_RATIO = 16 / 9\nconst THUMBNAIL_WIDTH = 80\nconst THUMBNAIL_HEIGHT = THUMBNAIL_WIDTH / ASPECT_RATIO\n\nconst useRowStyles = ({ isActive = false }: { isActive?: boolean } = {}) => {\n const theme = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER })\n const atFontScaleBreakpoint = useAtFontScaleBreakpoint()\n\n return StyleSheet.create({\n pressable: {\n paddingLeft: 16,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: atFontScaleBreakpoint\n ? theme.colors.borderColorDefaultDark\n : theme.colors.borderColorDefaultBase,\n paddingVertical: 12,\n paddingRight: 16,\n },\n rowInner: {\n flexDirection: atFontScaleBreakpoint ? 'column' : 'row',\n alignItems: atFontScaleBreakpoint ? 'flex-start' : 'center',\n gap: 12,\n flexShrink: 1,\n },\n rowTextContainer: {\n flexShrink: 1,\n },\n rowWithoutBorder: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n paddingVertical: 12,\n paddingRight: 16,\n paddingLeft: 16,\n },\n viewMoreButton: {\n flex: 1,\n },\n rowImage: {\n width: THUMBNAIL_WIDTH * fontScale,\n height: THUMBNAIL_HEIGHT * fontScale,\n borderRadius: 4 * fontScale,\n },\n rowIconRight: {\n fontSize: 16,\n color: theme.colors.statusSuccessIcon,\n opacity: isActive ? 1 : 0,\n },\n rowTitle: {\n fontSize: 16,\n flexShrink: 1,\n fontWeight: atFontScaleBreakpoint ? 400 : platformFontWeightBold,\n },\n rowSubtitle: {\n color: atFontScaleBreakpoint\n ? theme.colors.textColorDefaultSecondary\n : theme.colors.textColorDefaultPrimary,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"rows.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/components/rows.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAkB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,KAAK,EAAE,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAC5E,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,wBAAwB,EACxB,QAAQ,GACT,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAA;AAE/E,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAYtE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,QAAQ,EACR,MAAM,GACM,EAAE,EAAE;IAChB,MAAM,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC,CAAA;IAElD,OAAO,CACL,CAAC,YAAY,CACX,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAC7E,QAAQ,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EAAE,qBAAqB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK;YACvD,UAAU,EAAE,qBAAqB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ;YAC3D,GAAG,EAAE,EAAE;YACP,UAAU,EAAE,CAAC;SACd;QACD,gBAAgB,EAAE;YAChB,UAAU,EAAE,CAAC;SACd;QACD,gBAAgB,EAAE;YAChB,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;YACP,eAAe,EAAE,EAAE;YACnB,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,EAAE;SAChB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,CAAC;SACR;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,eAAe,GAAG,SAAS;YAClC,MAAM,EAAE,gBAAgB,GAAG,SAAS;YACpC,YAAY,EAAE,CAAC,GAAG,SAAS;SAC5B;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,iBAAiB;YACrC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1B;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,CAAC;YACb,UAAU,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,sBAAsB;SACjE;QACD,WAAW,EAAE;YACX,KAAK,EAAE,qBAAqB;gBAC1B,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,yBAAyB;gBACxC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,uBAAuB;SACzC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements'\nimport { NavigationProp, useNavigation } from '@react-navigation/native'\nimport React, { PropsWithChildren, useContext } from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport { Heading, Icon, Image, Text, TextButton } from '../../../components'\nimport {\n useAtFontScaleBreakpoint,\n useFontScale,\n useScalableNumberOfLines,\n useTheme,\n} from '../../../hooks'\nimport { useServicesTeamsMap } from '../../../hooks/services/use_services_team'\nimport { GroupResource } from '../../../types/resources/group_resource'\nimport { MAX_FONT_SIZE_MULTIPLIER, platformFontWeightBold } from '../../../utils/styles'\nimport { FilterContext } from '../context/conversation_filter_context'\nimport { FilterTypes } from '../filter_types'\nimport { FilteredGroup } from '../hooks/filters'\nimport { ConversationFilterStackParamList } from '../screen_props'\n\nexport type FilterProps = {\n group_source_app_name?: string\n show_direct_messages?: boolean\n isActive: boolean\n filter: FilterTypes\n}\n\nexport const FilterRow = ({\n group_source_app_name,\n show_direct_messages,\n isActive,\n filter,\n}: FilterProps) => {\n const { setAppFilter } = useContext(FilterContext)\n\n return (\n <PressableRow\n onPress={() => setAppFilter({ group_source_app_name, show_direct_messages })}\n isActive={isActive}\n >\n <Text>{filter}</Text>\n </PressableRow>\n )\n}\n\nexport type GroupRowProps = {\n group: FilteredGroup\n isActive: boolean\n}\n\nexport const GroupRow = ({ group, isActive }: GroupRowProps) => {\n const styles = useRowStyles()\n const { setGroupFilter } = useContext(FilterContext)\n\n const handleFilterByGroup = () => {\n setGroupFilter({ chat_group_graph_id: group.id })\n }\n\n const { headerImage, membershipsCount } = group\n\n return (\n <PressableRow onPress={handleFilterByGroup} isActive={isActive}>\n {headerImage?.thumbnail && (\n <Image\n source={{ uri: headerImage?.thumbnail }}\n resizeMode=\"cover\"\n style={styles.rowImage}\n alt=\"\"\n />\n )}\n <View style={styles.rowTextContainer}>\n <Heading variant=\"h3\" style={styles.rowTitle}>\n {group.name}\n </Heading>\n {membershipsCount && (\n <Text style={styles.rowSubtitle}>{group.membershipsCount} members</Text>\n )}\n </View>\n </PressableRow>\n )\n}\n\nexport type TeamRowProps = {\n team: GroupResource\n isActive: boolean\n}\n\nexport const TeamRow = ({ team }: TeamRowProps) => {\n const { setGroupFilter } = useContext(FilterContext)\n const servicesTeams = useServicesTeamsMap()\n const { params } = useContext(FilterContext)\n const { chat_group_graph_id } = params\n const isActive = chat_group_graph_id === team.id.toString()\n const styles = useRowStyles()\n const scalableNumberOfLines = useScalableNumberOfLines()\n\n const handleFilterByGroup = () => {\n setGroupFilter({ chat_group_graph_id: team.id })\n }\n\n const servicesTeam = servicesTeams[team.id]\n const concatedServiceTypeNames = servicesTeam?.serviceTypeNames.join(', ')\n const serviceTypeName = concatedServiceTypeNames || servicesTeam?.group\n\n return (\n <PressableRow onPress={handleFilterByGroup} isActive={isActive}>\n <View style={styles.rowTextContainer}>\n <Heading variant=\"h3\" style={styles.rowTitle}>\n {team.name}\n </Heading>\n <Text numberOfLines={scalableNumberOfLines} style={styles.rowSubtitle}>\n {serviceTypeName}\n </Text>\n </View>\n </PressableRow>\n )\n}\n\nexport type ViewMoreRowProps = { routeName: keyof ConversationFilterStackParamList }\n\nexport const ViewMore = ({ routeName }: ViewMoreRowProps) => {\n const styles = useRowStyles()\n const navigation = useNavigation<NavigationProp<ConversationFilterStackParamList, 'Filters'>>()\n\n return (\n <View style={[styles.rowWithoutBorder]}>\n <TextButton onPress={() => navigation.navigate(routeName, {})} style={styles.viewMoreButton}>\n View more\n </TextButton>\n </View>\n )\n}\n\nexport const PressableRow = ({\n children,\n isActive,\n onPress,\n style,\n}: PropsWithChildren<{ isActive: boolean; onPress: () => void; style?: ViewStyle }>) => {\n const styles = useRowStyles({ isActive })\n return (\n <PlatformPressable\n style={styles.pressable}\n onPress={onPress}\n accessibilityRole=\"radio\"\n accessibilityState={{ selected: isActive }}\n >\n <View style={styles.row}>\n <View style={[styles.rowInner, style]}>{children}</View>\n <Icon\n name=\"general.check\"\n style={styles.rowIconRight}\n accessibilityElementsHidden\n maxFontSizeMultiplier={2.5}\n />\n </View>\n </PlatformPressable>\n )\n}\n\nconst ASPECT_RATIO = 16 / 9\nconst THUMBNAIL_WIDTH = 80\nconst THUMBNAIL_HEIGHT = THUMBNAIL_WIDTH / ASPECT_RATIO\n\nconst useRowStyles = ({ isActive = false }: { isActive?: boolean } = {}) => {\n const theme = useTheme()\n const fontScale = useFontScale({ maxFontSizeMultiplier: MAX_FONT_SIZE_MULTIPLIER })\n const atFontScaleBreakpoint = useAtFontScaleBreakpoint()\n\n return StyleSheet.create({\n pressable: {\n paddingLeft: 16,\n },\n row: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 12,\n borderBottomWidth: 1,\n borderBottomColor: atFontScaleBreakpoint\n ? theme.colors.borderColorDefaultDark\n : theme.colors.borderColorDefaultBase,\n paddingVertical: 12,\n paddingRight: 16,\n },\n rowInner: {\n flexDirection: atFontScaleBreakpoint ? 'column' : 'row',\n alignItems: atFontScaleBreakpoint ? 'flex-start' : 'center',\n gap: 12,\n flexShrink: 1,\n },\n rowTextContainer: {\n flexShrink: 1,\n },\n rowWithoutBorder: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n paddingVertical: 12,\n paddingRight: 16,\n paddingLeft: 16,\n },\n viewMoreButton: {\n flex: 1,\n },\n rowImage: {\n width: THUMBNAIL_WIDTH * fontScale,\n height: THUMBNAIL_HEIGHT * fontScale,\n borderRadius: 4 * fontScale,\n },\n rowIconRight: {\n fontSize: 16,\n color: theme.colors.statusSuccessIcon,\n opacity: isActive ? 1 : 0,\n },\n rowTitle: {\n fontSize: 16,\n flexShrink: 1,\n fontWeight: atFontScaleBreakpoint ? 400 : platformFontWeightBold,\n },\n rowSubtitle: {\n color: atFontScaleBreakpoint\n ? theme.colors.textColorDefaultSecondary\n : theme.colors.textColorDefaultPrimary,\n },\n })\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_filter_context.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/context/conversation_filter_context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAiB,iBAAiB,EAAY,MAAM,OAAO,CAAA;AAGlE,OAAO,EAAE,yBAAyB,EAAkC,MAAM,iBAAiB,CAAA;AAI3F,eAAO,MAAM,aAAa;YAChB,yBAAyB;kBACnB,MAAM;qBACH,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;8BACf,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;iBACrC,MAAM,IAAI;oBACP,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;kBAC7C,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;kBAC3C,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;+BAC9B,MAAM,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"conversation_filter_context.d.ts","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/context/conversation_filter_context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAiB,iBAAiB,EAAY,MAAM,OAAO,CAAA;AAGlE,OAAO,EAAE,yBAAyB,EAAkC,MAAM,iBAAiB,CAAA;AAI3F,eAAO,MAAM,aAAa;YAChB,yBAAyB;kBACnB,MAAM;qBACH,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;8BACf,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;iBACrC,MAAM,IAAI;oBACP,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;kBAC7C,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;kBAC3C,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;+BAC9B,MAAM,GAAG,SAAS;EAe7C,CAAA;AAEF,eAAO,MAAM,cAAc,GAAI,cAAc,iBAAiB,sBA+C7D,CAAA;AAED,eAAO,MAAM,gBAAgB;YA1EnB,yBAAyB;kBACnB,MAAM;qBACH,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;8BACf,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;iBACrC,MAAM,IAAI;oBACP,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;kBAC7C,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;kBAC3C,CAAC,MAAM,EAAE,yBAAyB,KAAK,IAAI;+BAC9B,MAAM,GAAG,SAAS;CAoE9C,CAAA"}
|
|
@@ -8,6 +8,7 @@ export const FilterContext = createContext({
|
|
|
8
8
|
params: {
|
|
9
9
|
chat_group_graph_id: undefined,
|
|
10
10
|
group_source_app_name: undefined,
|
|
11
|
+
show_direct_messages: undefined,
|
|
11
12
|
},
|
|
12
13
|
scrollOffset: 0,
|
|
13
14
|
setScrollOffset: () => { },
|
|
@@ -38,18 +39,21 @@ export const FilterProvider = ({ children }) => {
|
|
|
38
39
|
navigation.dispatch(StackActions.popTo('Conversations', {
|
|
39
40
|
chat_group_graph_id: undefined,
|
|
40
41
|
group_source_app_name: undefined,
|
|
42
|
+
show_direct_messages: undefined,
|
|
41
43
|
}));
|
|
42
44
|
},
|
|
43
45
|
setGroupFilter: (params) => {
|
|
44
46
|
navigation.setParams({
|
|
45
47
|
chat_group_graph_id: params.chat_group_graph_id,
|
|
46
48
|
group_source_app_name: undefined,
|
|
49
|
+
show_direct_messages: undefined,
|
|
47
50
|
});
|
|
48
51
|
},
|
|
49
52
|
setAppFilter: (params) => {
|
|
50
53
|
navigation.setParams({
|
|
51
54
|
chat_group_graph_id: undefined,
|
|
52
55
|
group_source_app_name: params.group_source_app_name,
|
|
56
|
+
show_direct_messages: params.show_direct_messages,
|
|
53
57
|
});
|
|
54
58
|
},
|
|
55
59
|
applyFilters: (params) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_filter_context.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/context/conversation_filter_context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC3F,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGlE,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAUvC;IACD,MAAM,EAAE;QACN,mBAAmB,EAAE,SAAS;QAC9B,qBAAqB,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"conversation_filter_context.js","sourceRoot":"","sources":["../../../../src/screens/conversation_filters/context/conversation_filter_context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAC3F,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGlE,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAUvC;IACD,MAAM,EAAE;QACN,mBAAmB,EAAE,SAAS;QAC9B,qBAAqB,EAAE,SAAS;QAChC,oBAAoB,EAAE,SAAS;KAChC;IACD,YAAY,EAAE,CAAC;IACf,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;IACzB,wBAAwB,EAAE,GAAG,EAAE,GAAE,CAAC;IAClC,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;IACrB,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,yBAAyB,EAAE,2BAA2B;CACvD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ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EAAE,CAAC,MAAiC,EAAE,EAAE;YAClD,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAA;QAClE,CAAC;KACF,CAAA;IAED,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;AAC/F,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;AACxC,CAAC,CAAA","sourcesContent":["import { RouteProp, StackActions, useNavigation, useRoute } from '@react-navigation/native'\nimport React from 'react'\nimport { createContext, PropsWithChildren, useState } from 'react'\nimport { Platform } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { ConversationFiltersParams, ConversationFiltersScreenProps } from '../screen_props'\n\nconst DEFAULT_LIST_PADDING_BOTTOM = 64\n\nexport const FilterContext = createContext<{\n params: ConversationFiltersParams\n scrollOffset: number\n setScrollOffset: (offset: number) => void\n setFormSheetHeaderHeight: (height: number) => void\n resetFilter: () => void\n setGroupFilter: (params: ConversationFiltersParams) => void\n setAppFilter: (params: ConversationFiltersParams) => void\n applyFilters: (params: ConversationFiltersParams) => void\n platformListPaddingBottom: number | undefined\n}>({\n params: {\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n show_direct_messages: undefined,\n },\n scrollOffset: 0,\n setScrollOffset: () => {},\n setFormSheetHeaderHeight: () => {},\n resetFilter: () => {},\n setGroupFilter: () => {},\n setAppFilter: () => {},\n applyFilters: () => {},\n platformListPaddingBottom: DEFAULT_LIST_PADDING_BOTTOM,\n})\n\nexport const FilterProvider = ({ children }: PropsWithChildren) => {\n const [scrollOffset, setScrollOffset] = useState(0)\n const [formSheetHeaderHeight, setFormSheetHeaderHeight] = useState(56)\n const navigation = useNavigation()\n const route = useRoute<RouteProp<ConversationFiltersScreenProps['route']>>()\n const { bottom } = useSafeAreaInsets()\n\n const platformListPaddingBottom = Platform.select({\n ios: bottom + formSheetHeaderHeight,\n android: bottom + 12,\n })\n\n const filterContextValue = {\n params: route.params,\n scrollOffset,\n setScrollOffset,\n platformListPaddingBottom,\n setFormSheetHeaderHeight,\n resetFilter: () => {\n navigation.dispatch(\n StackActions.popTo('Conversations', {\n chat_group_graph_id: undefined,\n group_source_app_name: undefined,\n show_direct_messages: undefined,\n })\n )\n },\n setGroupFilter: (params: Omit<ConversationFiltersParams, 'group_source_app_name'>) => {\n navigation.setParams({\n chat_group_graph_id: params.chat_group_graph_id,\n group_source_app_name: undefined,\n show_direct_messages: undefined,\n })\n },\n setAppFilter: (params: Omit<ConversationFiltersParams, 'chat_group_graph_id'>) => {\n navigation.setParams({\n chat_group_graph_id: undefined,\n group_source_app_name: params.group_source_app_name,\n show_direct_messages: params.show_direct_messages,\n })\n },\n applyFilters: (params: ConversationFiltersParams) => {\n navigation.dispatch(StackActions.popTo('Conversations', params))\n },\n }\n\n return <FilterContext.Provider value={filterContextValue}>{children}</FilterContext.Provider>\n}\n\nexport const useFilterContext = () => {\n return React.useContext(FilterContext)\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter_types.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filters/filter_types.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,GAAG,sBAAsB;IACzB,MAAM,kBAAkB;IACxB,KAAK,2BAA2B;IAChC,IAAI,SAAS;CACd"}
|
|
1
|
+
{"version":3,"file":"filter_types.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filters/filter_types.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,GAAG,sBAAsB;IACzB,cAAc,oBAAoB;IAClC,MAAM,kBAAkB;IACxB,KAAK,2BAA2B;IAChC,IAAI,SAAS;CACd"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export var FilterTypes;
|
|
2
2
|
(function (FilterTypes) {
|
|
3
3
|
FilterTypes["All"] = "All conversations";
|
|
4
|
+
FilterTypes["DirectMessages"] = "Direct messages";
|
|
4
5
|
FilterTypes["Groups"] = "All my groups";
|
|
5
6
|
FilterTypes["Teams"] = "All my teams and plans";
|
|
6
7
|
FilterTypes["More"] = "More";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter_types.js","sourceRoot":"","sources":["../../../src/screens/conversation_filters/filter_types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"filter_types.js","sourceRoot":"","sources":["../../../src/screens/conversation_filters/filter_types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,wCAAyB,CAAA;IACzB,iDAAkC,CAAA;IAClC,uCAAwB,CAAA;IACxB,+CAAgC,CAAA;IAChC,4BAAa,CAAA;AACf,CAAC,EANW,WAAW,KAAX,WAAW,QAMtB","sourcesContent":["export enum FilterTypes {\n All = 'All conversations',\n DirectMessages = 'Direct messages',\n Groups = 'All my groups',\n Teams = 'All my teams and plans',\n More = 'More',\n}\n"]}
|
|
@@ -3,6 +3,7 @@ import { GraphId } from '../../types/resources/group_resource';
|
|
|
3
3
|
export type ConversationFiltersParams = {
|
|
4
4
|
chat_group_graph_id?: GraphId;
|
|
5
5
|
group_source_app_name?: string;
|
|
6
|
+
show_direct_messages?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export type ConversationFiltersScreenProps = StaticScreenProps<ConversationFiltersParams>;
|
|
8
9
|
export type ConversationFilterStackParamList = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen_props.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filters/screen_props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAE9D,MAAM,MAAM,yBAAyB,GAAG;IACtC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC,yBAAyB,CAAC,CAAA;AAEzF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,OAAO,EAAE,yBAAyB,CAAA;IAClC,YAAY,EAAE,yBAAyB,CAAA;IACvC,WAAW,EAAE,yBAAyB,CAAA;CACvC,CAAA"}
|
|
1
|
+
{"version":3,"file":"screen_props.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_filters/screen_props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAA;AAE9D,MAAM,MAAM,yBAAyB,GAAG;IACtC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC,yBAAyB,CAAC,CAAA;AAEzF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,OAAO,EAAE,yBAAyB,CAAA;IAClC,YAAY,EAAE,yBAAyB,CAAA;IACvC,WAAW,EAAE,yBAAyB,CAAA;CACvC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen_props.js","sourceRoot":"","sources":["../../../src/screens/conversation_filters/screen_props.ts"],"names":[],"mappings":"","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport { GraphId } from '../../types/resources/group_resource'\n\nexport type ConversationFiltersParams = {\n chat_group_graph_id?: GraphId\n group_source_app_name?: string\n}\n\nexport type ConversationFiltersScreenProps = StaticScreenProps<ConversationFiltersParams>\n\nexport type ConversationFilterStackParamList = {\n Filters: ConversationFiltersParams\n GroupFilters: ConversationFiltersParams\n TeamFilters: ConversationFiltersParams\n}\n"]}
|
|
1
|
+
{"version":3,"file":"screen_props.js","sourceRoot":"","sources":["../../../src/screens/conversation_filters/screen_props.ts"],"names":[],"mappings":"","sourcesContent":["import { StaticScreenProps } from '@react-navigation/native'\nimport { GraphId } from '../../types/resources/group_resource'\n\nexport type ConversationFiltersParams = {\n chat_group_graph_id?: GraphId\n group_source_app_name?: string\n show_direct_messages?: boolean\n}\n\nexport type ConversationFiltersScreenProps = StaticScreenProps<ConversationFiltersParams>\n\nexport type ConversationFilterStackParamList = {\n Filters: ConversationFiltersParams\n GroupFilters: ConversationFiltersParams\n TeamFilters: ConversationFiltersParams\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,gBAAgB,EAAqB,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EAGL,iBAAiB,EAIlB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAmD,MAAM,OAAO,CAAA;AA+BvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AAOjF,MAAM,MAAM,sBAAsB,GAAG;IACnC,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,yBAAyB,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC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IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,eAAO,MAAM,uBAAuB,GAAI,8DAOrC,4BAA4B,sBAoC9B,CAAA"}
|
|
@@ -127,7 +127,7 @@ function ConversationScreenContent({ route }) {
|
|
|
127
127
|
}
|
|
128
128
|
function ConversationBottomBar({ conversation, canReply, replyRootAuthorFirstName, replyRootId, currentlyEditingMessage, }) {
|
|
129
129
|
if (conversation.disabled)
|
|
130
|
-
return <ConversationDisabledBanner />;
|
|
130
|
+
return <ConversationDisabledBanner disabledReason={conversation.disabledReason}/>;
|
|
131
131
|
if (!canReply)
|
|
132
132
|
return <MemberMessagesDisabledBanner />;
|
|
133
133
|
return (<MessageForm.Root replyRootAuthorFirstName={replyRootAuthorFirstName} conversation={conversation} replyRootId={replyRootId} currentlyEditingMessage={currentlyEditingMessage} key={currentlyEditingMessage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,WAAW,EAAoB,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EACL,aAAa,EAGb,aAAa,EACb,QAAQ,IAAI,kBAAkB,EAC9B,QAAQ,GACT,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CA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AmB,EAAE,EAAE;oBACvF,GAAG,MAAM;iBACV;gBACD,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,CAAC;aACvB,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAA;AAC/C,CAAC,CAAA","sourcesContent":["import { date as formatDate } from '@planningcenter/datetime-fmt'\nimport { HeaderTitle, HeaderTitleProps, PlatformPressable } from '@react-navigation/elements'\nimport {\n CommonActions,\n RouteProp,\n StaticScreenProps,\n useNavigation,\n useTheme as useNavigationTheme,\n useRoute,\n} from '@react-navigation/native'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { FlatList, Platform, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Badge, Icon, Text } from '../components'\nimport { EmptyConversationBlankState } from '../components/conversation/empty_conversation_blank_state'\nimport { JumpToBottomButton } from '../components/conversation/jump_to_bottom_button'\nimport { Message } from '../components/conversation/message'\nimport { MessageForm } from '../components/conversation/message_form'\nimport {\n ConversationDisabledBanner,\n LeaderMessagesDisabledBanner,\n MemberMessagesDisabledBanner,\n} from '../components/conversation/messages_disabled_banners'\nimport { ReplyShadowMessage } from '../components/conversation/reply_shadow_message'\nimport { SystemMessage } from '../components/conversation/system_message'\nimport { TypingIndicator } from '../components/conversation/typing_indicator'\nimport { KeyboardView } from '../components/display/keyboard_view'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { ConversationContextProvider } from '../contexts/conversation_context'\nimport { useTheme } from '../hooks'\nimport { useConversation } from '../hooks/use_conversation'\nimport { useConversationJoltEvents } from '../hooks/use_conversation_jolt_events'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { useConversationMessagesJoltEvents } from '../hooks/use_conversation_messages_jolt_events'\nimport { useMarkLatestMessageRead } from '../hooks/use_mark_latest_message_read'\nimport {\n analyticsEvents,\n normalizeAnalyticsMetadata,\n usePublishProductAnalyticsEvent,\n} from '../hooks/use_product_analytics'\nimport { ConversationResource } from '../types/resources/conversation'\nimport { ConversationBadgeResource } from '../types/resources/conversation_badge'\nimport { MessageResource } from '../types/resources/message'\nimport { getRelativeDateStatus } from '../utils/date'\nimport { groupMessages, type DateSeparator } from '../utils/group_messages'\nimport { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL } from '../utils/styles'\nimport { isSystemMessage } from '../utils/system_messages'\n\nexport type ConversationRouteProps = {\n conversation_id: number\n reply_root_id?: string | null\n reply_root_author_name?: string\n chat_group_graph_id?: string\n clear_input?: boolean\n editing_message_id?: number | null\n title?: string\n subtitle?: string\n badge?: ConversationBadgeResource\n deleted?: boolean\n muted?: boolean\n}\n\nexport type ConversationScreenProps = StaticScreenProps<ConversationRouteProps>\n\nexport function ConversationScreen({ route }: ConversationScreenProps) {\n const { conversation_id, reply_root_id } = route.params\n\n const { data: conversation } = useConversation({ conversation_id })\n\n usePublishProductAnalyticsEvent(analyticsEvents.conversation_show_opened, {\n reply_root_id,\n ...normalizeAnalyticsMetadata(conversation),\n })\n\n return (\n <ConversationContextProvider\n conversationId={conversation_id}\n currentPageReplyRootId={reply_root_id ?? null}\n >\n <ConversationScreenContent route={route} />\n </ConversationContextProvider>\n )\n}\n\nfunction ConversationScreenContent({ route }: ConversationScreenProps) {\n const styles = useStyles()\n const navigation = useNavigation()\n const { conversation_id, editing_message_id, reply_root_id, reply_root_author_name } =\n route.params\n const { data: conversation } = useConversation(route.params)\n const { messages, fetchNextPage } = useConversationMessages({\n conversation_id,\n reply_root_id,\n })\n useConversationJoltEvents({ conversationId: conversation_id })\n useConversationMessagesJoltEvents({ conversationId: conversation_id })\n useEnsureConversationsRouteExists()\n useMarkLatestMessageRead({ conversation, messages })\n const messagesWithSeparators = groupMessages({\n ms: messages,\n inReplyScreen: !!reply_root_id,\n })\n const noMessages = messagesWithSeparators.length === 0\n\n const { repliesDisabled, memberAbility, badges, title } = conversation\n const canReply = memberAbility?.canReply\n const showLeaderDisabledReplyBanner = canReply && repliesDisabled\n const canDeleteNonAuthoredMessages = memberAbility?.canDeleteNonAuthoredMessages ?? false\n const currentlyEditingMessage = messages.find(m => String(m.id) === String(editing_message_id))\n const replyRootAuthorFirstName = reply_root_author_name?.split(' ')[0]\n const replyHeaderTitle = replyRootAuthorFirstName\n ? `Reply to ${replyRootAuthorFirstName}`\n : 'Reply'\n // Prefer the membership for optimistic updates.\n const muted = conversation.conversationMembership?.muted ?? conversation.muted\n\n const listRef = useRef<FlatList>(null)\n const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false)\n\n const trackScroll = (event: any) => {\n const offsetY = event.nativeEvent.contentOffset.y\n setShowJumpToBottomButton(offsetY > 200)\n }\n\n const handleReturnToBottom = useCallback(() => {\n listRef.current?.scrollToOffset({\n offset: 0,\n })\n }, [])\n\n useEffect(() => {\n if (reply_root_id) {\n navigation.setParams({\n title: replyHeaderTitle,\n })\n } else {\n navigation.setParams({\n title: title,\n badge: badges?.[0],\n deleted: conversation?.deleted,\n muted,\n })\n }\n }, [navigation, title, badges, conversation?.deleted, reply_root_id, replyHeaderTitle, muted])\n\n if (!conversation || conversation.deleted) {\n return (\n <View style={styles.container}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.outlinedTextMessage\" />\n <BlankState.Content>\n <BlankState.Heading>This conversation has been deleted</BlankState.Heading>\n </BlankState.Content>\n <BlankState.Button\n onPress={navigation.goBack}\n title=\"Back to conversations\"\n accessibilityHint=\"Navigates back to the conversations list\"\n accessibilityRole=\"link\"\n />\n </BlankState.Root>\n </View>\n )\n }\n\n return (\n <View style={styles.container}>\n <KeyboardView>\n {noMessages ? (\n <EmptyConversationBlankState />\n ) : (\n <FlatList\n inverted\n ref={listRef}\n contentContainerStyle={styles.listContainer}\n data={messagesWithSeparators}\n keyExtractor={item => item.id}\n onScroll={trackScroll}\n scrollEventThrottle={10}\n renderItem={({ item }) => {\n if (item.type === 'DateSeparator') {\n return <InlineDateSeparator {...item} />\n }\n\n if (item.type === 'ReplyShadowMessage') {\n return (\n <ReplyShadowMessage\n {...(item as any)}\n conversation_id={conversation_id}\n inReplyScreen={!!reply_root_id}\n />\n )\n }\n\n if (isSystemMessage(item)) {\n return <SystemMessage message={item} conversationId={conversation_id} />\n }\n\n return (\n <Message\n {...item}\n canDeleteNonAuthoredMessages={canDeleteNonAuthoredMessages}\n conversation_id={conversation_id}\n latestReadMessageSortKey={conversation?.latestReadMessageSortKey}\n inReplyScreen={!!reply_root_id}\n />\n )\n }}\n onEndReached={() => fetchNextPage()}\n ListHeaderComponent={<View style={styles.listHeader} />}\n />\n )}\n <JumpToBottomButton onPress={handleReturnToBottom} visible={showJumpToBottomButton} />\n {!noMessages && <TypingIndicator />}\n {showLeaderDisabledReplyBanner && <LeaderMessagesDisabledBanner />}\n <ConversationBottomBar\n conversation={conversation}\n canReply={canReply}\n replyRootAuthorFirstName={replyRootAuthorFirstName}\n replyRootId={reply_root_id}\n currentlyEditingMessage={currentlyEditingMessage}\n />\n </KeyboardView>\n </View>\n )\n}\n\ninterface ConversationBottomBarProps {\n conversation: ConversationResource\n canReply: boolean | undefined\n replyRootAuthorFirstName: string | undefined\n replyRootId: string | null | undefined\n currentlyEditingMessage: MessageResource | undefined\n}\n\nfunction ConversationBottomBar({\n conversation,\n canReply,\n replyRootAuthorFirstName,\n replyRootId,\n currentlyEditingMessage,\n}: ConversationBottomBarProps) {\n if (conversation.disabled) return <ConversationDisabledBanner />\n if (!canReply) return <MemberMessagesDisabledBanner />\n return (\n <MessageForm.Root\n replyRootAuthorFirstName={replyRootAuthorFirstName}\n conversation={conversation}\n replyRootId={replyRootId}\n currentlyEditingMessage={currentlyEditingMessage}\n key={\n currentlyEditingMessage\n ? `edit-message-form-${currentlyEditingMessage.id}`\n : 'new-message-form'\n }\n >\n <MessageForm.AttachmentPicker />\n <MessageForm.Commands />\n <MessageForm.TextInput />\n <MessageForm.SubmitButton />\n </MessageForm.Root>\n )\n}\n\nfunction InlineDateSeparator({ date }: DateSeparator) {\n const styles = useDateSeparatorStyles()\n const { isThisYear } = getRelativeDateStatus(date)\n const showYear = !isThisYear\n const dateStamp = formatDate(date, { style: 'long', year: showYear })\n\n return (\n <View style={styles.container}>\n <View style={styles.separator} />\n <Text variant=\"footnote\" style={styles.dateText}>\n {dateStamp}\n </Text>\n <View style={styles.separator} />\n </View>\n )\n}\n\nconst useDateSeparatorStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n paddingHorizontal: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n paddingVertical: 16,\n },\n separator: {\n flex: 1,\n height: 1,\n borderTopWidth: 1,\n borderTopColor: theme.colors.borderColorDefaultBase,\n },\n dateText: {\n paddingHorizontal: 8,\n },\n })\n}\n\ninterface ConversationScreenTitleProps extends HeaderTitleProps {\n conversation_id: number\n badge?: ConversationBadgeResource\n deleted?: boolean\n muted?: boolean\n}\n\nexport const ConversationScreenTitle = ({\n conversation_id,\n badge,\n children,\n style,\n deleted,\n muted,\n}: ConversationScreenTitleProps) => {\n const styles = usePressableHeaderStyle()\n const navigation = useNavigation()\n const resourceType = badge?.pcoResourceType || ''\n const productName = badge?.appName\n const name = badge?.text || undefined\n\n return (\n <PlatformPressable\n accessibilityHint=\"Opens details about members and settings\"\n style={styles.container}\n onPress={() => {\n if (deleted) return\n\n navigation.navigate('ConversationDetails', { conversation_id })\n }}\n >\n <View style={styles.titleWrapper}>\n <View style={styles.titleTextContainer}>\n <HeaderTitle maxFontSizeMultiplier={1} style={style}>\n {children}\n </HeaderTitle>\n </View>\n {muted && <Icon name=\"general.bellMuted\" size={12} />}\n {!deleted && <Icon name=\"general.downChevron\" size={12} />}\n </View>\n <Badge\n variant=\"metaSubtle\"\n productLogoName={productName}\n label={resourceType}\n metaLabel={name}\n style={styles.badge}\n maxFontSizeMultiplier={1}\n />\n </PlatformPressable>\n )\n}\n\nconst usePressableHeaderStyle = () => {\n return StyleSheet.create({\n container: {\n alignItems: Platform.select({ android: 'flex-start', default: 'center' }),\n marginRight: Platform.select({ ios: 20, default: 16 }),\n flex: 1,\n },\n titleWrapper: {\n alignItems: 'center',\n columnGap: 4,\n flexDirection: 'row',\n flexShrink: 1,\n },\n titleTextContainer: {\n flexShrink: 1,\n minWidth: 0,\n },\n badge: {\n alignSelf: Platform.select({ android: 'flex-start', default: 'center' }),\n marginTop: 2,\n },\n })\n}\n\nconst useStyles = () => {\n const navigationTheme = useNavigationTheme()\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n backgroundColor: navigationTheme.colors.card,\n paddingBottom: bottom,\n },\n listContainer: {\n paddingVertical: 12,\n },\n listHeader: {\n // Just whitespace to provide space where the typing indicator can be\n height: 16,\n },\n })\n}\n\n/**\n * useEnsureConversationsRouteExists\n */\nconst useEnsureConversationsRouteExists = () => {\n const navigation = useNavigation()\n const { params } = useRoute<RouteProp<ConversationScreenProps['route']>>()\n\n useEffect(() => {\n const navigationState = navigation.getState()\n const routes = navigationState?.routes || []\n const conversationsRoute = routes.find(r => r.name === 'Conversations')\n\n if (conversationsRoute) return\n\n navigation.dispatch(state => {\n return CommonActions.reset({\n ...state,\n routes: [\n { name: 'Conversations', params: { chat_group_graph_id: params?.chat_group_graph_id } },\n ...routes,\n ],\n index: state.index + 1,\n })\n })\n }, [navigation, params?.chat_group_graph_id])\n}\n"]}
|
|
1
|
+
{"version":3,"file":"conversation_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,WAAW,EAAoB,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EACL,aAAa,EAGb,aAAa,EACb,QAAQ,IAAI,kBAAkB,EAC9B,QAAQ,GACT,MAAM,0BAA0B,CAAA;AACjC,OAAO,K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M,IAAI,EAAE,CAAA;QAC5C,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,eAAe,CAAC,CAAA;QAEvE,IAAI,kBAAkB;YAAE,OAAM;QAE9B,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,aAAa,CAAC,KAAK,CAAC;gBACzB,GAAG,KAAK;gBACR,MAAM,EAAE;oBACN,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,mBAAmB,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE;oBACvF,GAAG,MAAM;iBACV;gBACD,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,CAAC;aACvB,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAA;AAC/C,CAAC,CAAA","sourcesContent":["import { date as formatDate } from '@planningcenter/datetime-fmt'\nimport { HeaderTitle, HeaderTitleProps, PlatformPressable } from '@react-navigation/elements'\nimport {\n CommonActions,\n RouteProp,\n StaticScreenProps,\n useNavigation,\n useTheme as useNavigationTheme,\n useRoute,\n} from '@react-navigation/native'\nimport React, { useCallback, useEffect, useRef, useState } from 'react'\nimport { FlatList, Platform, StyleSheet, View } from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { Badge, Icon, Text } from '../components'\nimport { EmptyConversationBlankState } from '../components/conversation/empty_conversation_blank_state'\nimport { JumpToBottomButton } from '../components/conversation/jump_to_bottom_button'\nimport { Message } from '../components/conversation/message'\nimport { MessageForm } from '../components/conversation/message_form'\nimport {\n ConversationDisabledBanner,\n LeaderMessagesDisabledBanner,\n MemberMessagesDisabledBanner,\n} from '../components/conversation/messages_disabled_banners'\nimport { ReplyShadowMessage } from '../components/conversation/reply_shadow_message'\nimport { SystemMessage } from '../components/conversation/system_message'\nimport { TypingIndicator } from '../components/conversation/typing_indicator'\nimport { KeyboardView } from '../components/display/keyboard_view'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { ConversationContextProvider } from '../contexts/conversation_context'\nimport { useTheme } from '../hooks'\nimport { useConversation } from '../hooks/use_conversation'\nimport { useConversationJoltEvents } from '../hooks/use_conversation_jolt_events'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { useConversationMessagesJoltEvents } from '../hooks/use_conversation_messages_jolt_events'\nimport { useMarkLatestMessageRead } from '../hooks/use_mark_latest_message_read'\nimport {\n analyticsEvents,\n normalizeAnalyticsMetadata,\n usePublishProductAnalyticsEvent,\n} from '../hooks/use_product_analytics'\nimport { ConversationResource } from '../types/resources/conversation'\nimport { ConversationBadgeResource } from '../types/resources/conversation_badge'\nimport { MessageResource } from '../types/resources/message'\nimport { getRelativeDateStatus } from '../utils/date'\nimport { groupMessages, type DateSeparator } from '../utils/group_messages'\nimport { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL } from '../utils/styles'\nimport { isSystemMessage } from '../utils/system_messages'\n\nexport type ConversationRouteProps = {\n conversation_id: number\n reply_root_id?: string | null\n reply_root_author_name?: string\n chat_group_graph_id?: string\n clear_input?: boolean\n editing_message_id?: number | null\n title?: string\n subtitle?: string\n badge?: ConversationBadgeResource\n deleted?: boolean\n muted?: boolean\n}\n\nexport type ConversationScreenProps = StaticScreenProps<ConversationRouteProps>\n\nexport function ConversationScreen({ route }: ConversationScreenProps) {\n const { conversation_id, reply_root_id } = route.params\n\n const { data: conversation } = useConversation({ conversation_id })\n\n usePublishProductAnalyticsEvent(analyticsEvents.conversation_show_opened, {\n reply_root_id,\n ...normalizeAnalyticsMetadata(conversation),\n })\n\n return (\n <ConversationContextProvider\n conversationId={conversation_id}\n currentPageReplyRootId={reply_root_id ?? null}\n >\n <ConversationScreenContent route={route} />\n </ConversationContextProvider>\n )\n}\n\nfunction ConversationScreenContent({ route }: ConversationScreenProps) {\n const styles = useStyles()\n const navigation = useNavigation()\n const { conversation_id, editing_message_id, reply_root_id, reply_root_author_name } =\n route.params\n const { data: conversation } = useConversation(route.params)\n const { messages, fetchNextPage } = useConversationMessages({\n conversation_id,\n reply_root_id,\n })\n useConversationJoltEvents({ conversationId: conversation_id })\n useConversationMessagesJoltEvents({ conversationId: conversation_id })\n useEnsureConversationsRouteExists()\n useMarkLatestMessageRead({ conversation, messages })\n const messagesWithSeparators = groupMessages({\n ms: messages,\n inReplyScreen: !!reply_root_id,\n })\n const noMessages = messagesWithSeparators.length === 0\n\n const { repliesDisabled, memberAbility, badges, title } = conversation\n const canReply = memberAbility?.canReply\n const showLeaderDisabledReplyBanner = canReply && repliesDisabled\n const canDeleteNonAuthoredMessages = memberAbility?.canDeleteNonAuthoredMessages ?? false\n const currentlyEditingMessage = messages.find(m => String(m.id) === String(editing_message_id))\n const replyRootAuthorFirstName = reply_root_author_name?.split(' ')[0]\n const replyHeaderTitle = replyRootAuthorFirstName\n ? `Reply to ${replyRootAuthorFirstName}`\n : 'Reply'\n // Prefer the membership for optimistic updates.\n const muted = conversation.conversationMembership?.muted ?? conversation.muted\n\n const listRef = useRef<FlatList>(null)\n const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false)\n\n const trackScroll = (event: any) => {\n const offsetY = event.nativeEvent.contentOffset.y\n setShowJumpToBottomButton(offsetY > 200)\n }\n\n const handleReturnToBottom = useCallback(() => {\n listRef.current?.scrollToOffset({\n offset: 0,\n })\n }, [])\n\n useEffect(() => {\n if (reply_root_id) {\n navigation.setParams({\n title: replyHeaderTitle,\n })\n } else {\n navigation.setParams({\n title: title,\n badge: badges?.[0],\n deleted: conversation?.deleted,\n muted,\n })\n }\n }, [navigation, title, badges, conversation?.deleted, reply_root_id, replyHeaderTitle, muted])\n\n if (!conversation || conversation.deleted) {\n return (\n <View style={styles.container}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.outlinedTextMessage\" />\n <BlankState.Content>\n <BlankState.Heading>This conversation has been deleted</BlankState.Heading>\n </BlankState.Content>\n <BlankState.Button\n onPress={navigation.goBack}\n title=\"Back to conversations\"\n accessibilityHint=\"Navigates back to the conversations list\"\n accessibilityRole=\"link\"\n />\n </BlankState.Root>\n </View>\n )\n }\n\n return (\n <View style={styles.container}>\n <KeyboardView>\n {noMessages ? (\n <EmptyConversationBlankState />\n ) : (\n <FlatList\n inverted\n ref={listRef}\n contentContainerStyle={styles.listContainer}\n data={messagesWithSeparators}\n keyExtractor={item => item.id}\n onScroll={trackScroll}\n scrollEventThrottle={10}\n renderItem={({ item }) => {\n if (item.type === 'DateSeparator') {\n return <InlineDateSeparator {...item} />\n }\n\n if (item.type === 'ReplyShadowMessage') {\n return (\n <ReplyShadowMessage\n {...(item as any)}\n conversation_id={conversation_id}\n inReplyScreen={!!reply_root_id}\n />\n )\n }\n\n if (isSystemMessage(item)) {\n return <SystemMessage message={item} conversationId={conversation_id} />\n }\n\n return (\n <Message\n {...item}\n canDeleteNonAuthoredMessages={canDeleteNonAuthoredMessages}\n conversation_id={conversation_id}\n latestReadMessageSortKey={conversation?.latestReadMessageSortKey}\n inReplyScreen={!!reply_root_id}\n />\n )\n }}\n onEndReached={() => fetchNextPage()}\n ListHeaderComponent={<View style={styles.listHeader} />}\n />\n )}\n <JumpToBottomButton onPress={handleReturnToBottom} visible={showJumpToBottomButton} />\n {!noMessages && <TypingIndicator />}\n {showLeaderDisabledReplyBanner && <LeaderMessagesDisabledBanner />}\n <ConversationBottomBar\n conversation={conversation}\n canReply={canReply}\n replyRootAuthorFirstName={replyRootAuthorFirstName}\n replyRootId={reply_root_id}\n currentlyEditingMessage={currentlyEditingMessage}\n />\n </KeyboardView>\n </View>\n )\n}\n\ninterface ConversationBottomBarProps {\n conversation: ConversationResource\n canReply: boolean | undefined\n replyRootAuthorFirstName: string | undefined\n replyRootId: string | null | undefined\n currentlyEditingMessage: MessageResource | undefined\n}\n\nfunction ConversationBottomBar({\n conversation,\n canReply,\n replyRootAuthorFirstName,\n replyRootId,\n currentlyEditingMessage,\n}: ConversationBottomBarProps) {\n if (conversation.disabled)\n return <ConversationDisabledBanner disabledReason={conversation.disabledReason} />\n if (!canReply) return <MemberMessagesDisabledBanner />\n return (\n <MessageForm.Root\n replyRootAuthorFirstName={replyRootAuthorFirstName}\n conversation={conversation}\n replyRootId={replyRootId}\n currentlyEditingMessage={currentlyEditingMessage}\n key={\n currentlyEditingMessage\n ? `edit-message-form-${currentlyEditingMessage.id}`\n : 'new-message-form'\n }\n >\n <MessageForm.AttachmentPicker />\n <MessageForm.Commands />\n <MessageForm.TextInput />\n <MessageForm.SubmitButton />\n </MessageForm.Root>\n )\n}\n\nfunction InlineDateSeparator({ date }: DateSeparator) {\n const styles = useDateSeparatorStyles()\n const { isThisYear } = getRelativeDateStatus(date)\n const showYear = !isThisYear\n const dateStamp = formatDate(date, { style: 'long', year: showYear })\n\n return (\n <View style={styles.container}>\n <View style={styles.separator} />\n <Text variant=\"footnote\" style={styles.dateText}>\n {dateStamp}\n </Text>\n <View style={styles.separator} />\n </View>\n )\n}\n\nconst useDateSeparatorStyles = () => {\n const theme = useTheme()\n return StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n paddingHorizontal: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,\n paddingVertical: 16,\n },\n separator: {\n flex: 1,\n height: 1,\n borderTopWidth: 1,\n borderTopColor: theme.colors.borderColorDefaultBase,\n },\n dateText: {\n paddingHorizontal: 8,\n },\n })\n}\n\ninterface ConversationScreenTitleProps extends HeaderTitleProps {\n conversation_id: number\n badge?: ConversationBadgeResource\n deleted?: boolean\n muted?: boolean\n}\n\nexport const ConversationScreenTitle = ({\n conversation_id,\n badge,\n children,\n style,\n deleted,\n muted,\n}: ConversationScreenTitleProps) => {\n const styles = usePressableHeaderStyle()\n const navigation = useNavigation()\n const resourceType = badge?.pcoResourceType || ''\n const productName = badge?.appName\n const name = badge?.text || undefined\n\n return (\n <PlatformPressable\n accessibilityHint=\"Opens details about members and settings\"\n style={styles.container}\n onPress={() => {\n if (deleted) return\n\n navigation.navigate('ConversationDetails', { conversation_id })\n }}\n >\n <View style={styles.titleWrapper}>\n <View style={styles.titleTextContainer}>\n <HeaderTitle maxFontSizeMultiplier={1} style={style}>\n {children}\n </HeaderTitle>\n </View>\n {muted && <Icon name=\"general.bellMuted\" size={12} />}\n {!deleted && <Icon name=\"general.downChevron\" size={12} />}\n </View>\n <Badge\n variant=\"metaSubtle\"\n productLogoName={productName}\n label={resourceType}\n metaLabel={name}\n style={styles.badge}\n maxFontSizeMultiplier={1}\n />\n </PlatformPressable>\n )\n}\n\nconst usePressableHeaderStyle = () => {\n return StyleSheet.create({\n container: {\n alignItems: Platform.select({ android: 'flex-start', default: 'center' }),\n marginRight: Platform.select({ ios: 20, default: 16 }),\n flex: 1,\n },\n titleWrapper: {\n alignItems: 'center',\n columnGap: 4,\n flexDirection: 'row',\n flexShrink: 1,\n },\n titleTextContainer: {\n flexShrink: 1,\n minWidth: 0,\n },\n badge: {\n alignSelf: Platform.select({ android: 'flex-start', default: 'center' }),\n marginTop: 2,\n },\n })\n}\n\nconst useStyles = () => {\n const navigationTheme = useNavigationTheme()\n const { bottom } = useSafeAreaInsets()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n justifyContent: 'center',\n backgroundColor: navigationTheme.colors.card,\n paddingBottom: bottom,\n },\n listContainer: {\n paddingVertical: 12,\n },\n listHeader: {\n // Just whitespace to provide space where the typing indicator can be\n height: 16,\n },\n })\n}\n\n/**\n * useEnsureConversationsRouteExists\n */\nconst useEnsureConversationsRouteExists = () => {\n const navigation = useNavigation()\n const { params } = useRoute<RouteProp<ConversationScreenProps['route']>>()\n\n useEffect(() => {\n const navigationState = navigation.getState()\n const routes = navigationState?.routes || []\n const conversationsRoute = routes.find(r => r.name === 'Conversations')\n\n if (conversationsRoute) return\n\n navigation.dispatch(state => {\n return CommonActions.reset({\n ...state,\n routes: [\n { name: 'Conversations', params: { chat_group_graph_id: params?.chat_group_graph_id } },\n ...routes,\n ],\n index: state.index + 1,\n })\n })\n }, [navigation, params?.chat_group_graph_id])\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ConversationSelectRecipientsScreenProps } from './types/screen_props';
|
|
3
|
-
export declare function ConversationSelectDirectMessageRecipientsScreen(_props: ConversationSelectRecipientsScreenProps):
|
|
2
|
+
export declare function ConversationSelectDirectMessageRecipientsScreen(_props: ConversationSelectRecipientsScreenProps): import("react").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=conversation_select_direct_message_recipients_screen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_select_direct_message_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conversation_select_direct_message_recipients_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,uCAAuC,EAAE,MAAM,sBAAsB,CAAA;AAI9E,wBAAgB,+CAA+C,CAC7D,MAAM,EAAE,uCAAuC,+BAiGhD"}
|