@planningcenter/chat-react-native 3.24.0-rc.2 → 3.24.0-rc.4
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/primitive/form_sheet.d.ts +1 -1
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +1 -1
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.d.ts.map +1 -1
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use_features.d.ts +1 -0
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +1 -0
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_new_conversation_entry.d.ts +3 -0
- package/build/hooks/use_new_conversation_entry.d.ts.map +1 -0
- package/build/hooks/use_new_conversation_entry.js +20 -0
- package/build/hooks/use_new_conversation_entry.js.map +1 -0
- package/build/hooks/use_report_message.d.ts +6 -0
- package/build/hooks/use_report_message.d.ts.map +1 -0
- package/build/hooks/use_report_message.js +28 -0
- package/build/hooks/use_report_message.js.map +1 -0
- package/build/navigation/index.d.ts +18 -8
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +16 -6
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +4 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +67 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +17 -2
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +11 -0
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_type_screen.js +32 -0
- package/build/screens/conversation_select_type_screen.js.map +1 -0
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +18 -7
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/index.d.ts +1 -1
- package/build/screens/index.d.ts.map +1 -1
- package/build/screens/index.js +1 -1
- package/build/screens/index.js.map +1 -1
- package/build/screens/message_actions_screen.js +9 -0
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +10 -0
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -0
- package/build/screens/message_report/components/message_preview.js +81 -0
- package/build/screens/message_report/components/message_preview.js.map +1 -0
- package/build/screens/message_report/components/report_reason_list.d.ts +9 -0
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -0
- package/build/screens/message_report/components/report_reason_list.js +67 -0
- package/build/screens/message_report/components/report_reason_list.js.map +1 -0
- package/build/screens/message_report_screen.d.ts +10 -0
- package/build/screens/message_report_screen.d.ts.map +1 -0
- package/build/screens/message_report_screen.js +214 -0
- package/build/screens/message_report_screen.js.map +1 -0
- package/build/types/resources/message_report.d.ts +19 -0
- package/build/types/resources/message_report.d.ts.map +1 -0
- package/build/types/resources/message_report.js +9 -0
- package/build/types/resources/message_report.js.map +1 -0
- package/package.json +2 -2
- package/src/components/primitive/form_sheet.tsx +4 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use_features.ts +1 -0
- package/src/hooks/use_new_conversation_entry.ts +31 -0
- package/src/hooks/use_report_message.ts +37 -0
- package/src/navigation/index.tsx +19 -6
- package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +100 -0
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +23 -3
- package/src/screens/conversation_select_type_screen.tsx +53 -0
- package/src/screens/conversations/components/list_header_component.tsx +20 -7
- package/src/screens/index.ts +1 -1
- package/src/screens/message_actions_screen.tsx +19 -0
- package/src/screens/message_report/components/message_preview.tsx +99 -0
- package/src/screens/message_report/components/report_reason_list.tsx +106 -0
- package/src/screens/message_report_screen.tsx +278 -0
- package/src/types/resources/message_report.ts +20 -0
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts +0 -4
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.d.ts.map +0 -1
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js +0 -146
- package/build/screens/conversation_select_recipients/conversation_select_recipients_screen.js.map +0 -1
- package/src/screens/conversation_select_recipients/conversation_select_recipients_screen.tsx +0 -215
|
@@ -55,7 +55,7 @@ declare const FORM_SHEET_ACTION_APPEARANCES: {
|
|
|
55
55
|
type FormSheetActionAppearanceUnion = (typeof FORM_SHEET_ACTION_APPEARANCES)[keyof typeof FORM_SHEET_ACTION_APPEARANCES];
|
|
56
56
|
interface FormSheetActionProps {
|
|
57
57
|
title: string;
|
|
58
|
-
iconName
|
|
58
|
+
iconName?: IconString;
|
|
59
59
|
onPress: () => void;
|
|
60
60
|
accessibilityLabel?: string;
|
|
61
61
|
accessibilityHint?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form_sheet.d.ts","sourceRoot":"","sources":["../../../src/components/primitive/form_sheet.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAA;AAGrB,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC9D,OAAO,EAAyB,UAAU,EAAoB,MAAM,YAAY,CAAA;AAOhF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,mDAInC,4BAA4B,KAAQ,4BA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,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,UAAU,CAAC,EAAE,8BAA8B,CAAA;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
|
|
@@ -89,7 +89,7 @@ const FORM_SHEET_ACTION_APPEARANCES = {
|
|
|
89
89
|
function FormSheetAction({ title, iconName, onPress, accessibilityLabel, accessibilityHint, accessibilityRole = 'button', appearance = 'neutral', disabled = false, }) {
|
|
90
90
|
const styles = useStyles({ appearance });
|
|
91
91
|
return (<PlatformPressable onPress={onPress} accessibilityLabel={accessibilityLabel} accessibilityHint={accessibilityHint} accessibilityRole={accessibilityRole} style={styles.actionPressable} disabled={disabled}>
|
|
92
|
-
<Icon name={iconName} size={16} accessibilityElementsHidden style={styles.actionIcon}/>
|
|
92
|
+
{iconName && (<Icon name={iconName} size={16} accessibilityElementsHidden style={styles.actionIcon}/>)}
|
|
93
93
|
<Text style={styles.actionTitle}>{title}</Text>
|
|
94
94
|
</PlatformPressable>);
|
|
95
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form_sheet.js","sourceRoot":"","sources":["../../../src/components/primitive/form_sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EACL,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,mBAAmB,GAIpB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,MAAM,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,iBAAiB,EAAE,EAAE;YACrB,GAAG,EAAE,CAAC;SACP;QACD,UAAU,EAAE;YACV,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,SAAS;SACjD;QACD,WAAW,EAAE;YACX,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,SAAS;SACjD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable, useHeaderHeight } from '@react-navigation/elements'\nimport { NativeStackNavigationOptions } from '@react-navigation/native-stack'\nimport React, { ReactNode } from 'react'\nimport {\n Platform,\n StyleSheet,\n View,\n useWindowDimensions,\n type AccessibilityRole,\n type StyleProp,\n type ViewStyle,\n} from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport type { ButtonProps, TextButtonProps } from '../display'\nimport { Button, Heading, Icon, IconString, Text, TextButton } from '../display'\nimport { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '../../utils'\n\n// =================================\n// ====== Exports ==================\n// =================================\n\n/**\n * Screen options for the formsheet's NativeStackNavigation route\n * @param {string} options.headerTitle - Doesn't show in UI but good to have for semantic reasons.\n * @param {number[]} [options.sheetAllowedDetents] - Controls the height increments the sheet grows to. To prevent bugs in Android, do not specify more then two values and use [0.94] instead of [1] to go full screen.\n * @param {NativeStackNavigationOptions} [options.rest] - Adds or overrides any valid NativeStackNavigationOptions\n * @returns {NativeStackNavigationOptions} Merged NativeStackNavigationOptions\n */\nexport const getFormSheetScreenOptions = ({\n headerTitle,\n sheetAllowedDetents = [0.25],\n ...rest\n}: NativeStackNavigationOptions = {}): NativeStackNavigationOptions => ({\n presentation: 'formSheet',\n headerShown: false,\n sheetAllowedDetents,\n sheetCornerRadius: 16,\n sheetGrabberVisible: true,\n headerTitle,\n ...rest,\n})\n\nconst FormSheet = {\n Root: FormSheetRoot,\n Action: FormSheetAction,\n Header: FormSheetHeader,\n HeaderTitle: FormSheetHeaderTitle,\n HeaderActions: FormSheetHeaderActions,\n HeaderTextButton: FormSheetHeaderTextButton,\n HeaderButton: FormSheetHeaderButton,\n} as const\n\ntype FormSheetComponents = {\n Root: React.FC<FormSheetRootProps>\n Action: React.FC<FormSheetActionProps>\n Header: React.FC<FormSheetHeaderProps>\n HeaderTitle: React.FC<FormSheetHeaderTitleProps>\n HeaderActions: React.FC<FormSheetHeaderActionsProps>\n HeaderTextButton: React.FC<FormSheetHeaderTextButtonProps>\n HeaderButton: React.FC<FormSheetHeaderButtonProps>\n}\n\nexport default FormSheet as FormSheetComponents\nexport type {\n FormSheetActionProps,\n FormSheetHeaderActionsProps,\n FormSheetHeaderButtonProps,\n FormSheetHeaderProps,\n FormSheetHeaderTextButtonProps,\n FormSheetHeaderTitleProps,\n FormSheetRootProps,\n}\n\n// ====================================\n// ====== ActionsFormSheetRoot ========\n// ====================================\n\ninterface FormSheetRootProps {\n children: ReactNode\n style?: StyleProp<ViewStyle>\n contentStyle?: StyleProp<ViewStyle>\n showAndroidSheetGrabber?: boolean\n}\n\nexport function FormSheetRoot({\n children,\n style,\n contentStyle,\n showAndroidSheetGrabber = true,\n}: FormSheetRootProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.container, style]} collapsable={false}>\n <View style={[styles.content, contentStyle]}>{children}</View>\n {showAndroidSheetGrabber && <AndroidSheetGrabber />}\n </View>\n )\n}\n\nFormSheetRoot.displayName = 'FormSheet.Root'\n\n// ====================================\n// ====== AndroidSheetGrabber =========\n// ====================================\n\nfunction AndroidSheetGrabber() {\n const styles = useStyles()\n\n return Platform.select({\n android: <View style={styles.androidSheetGrabber} />,\n ios: null,\n })\n}\n\n// ====================================\n// ====== FormSheetHeader =============\n// ====================================\n\ninterface FormSheetHeaderProps {\n children: ReactNode\n style?: StyleProp<ViewStyle>\n}\n\nfunction FormSheetHeader({ children, style }: FormSheetHeaderProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.header, style]}>\n <View style={styles.headerContent}>{children}</View>\n </View>\n )\n}\n\nFormSheetHeader.displayName = 'FormSheet.Header'\n\n// ====================================\n// ====== FormSheetHeaderTitle ========\n// ====================================\n\ninterface FormSheetHeaderTitleProps {\n children: ReactNode\n}\n\nfunction FormSheetHeaderTitle({ children }: FormSheetHeaderTitleProps) {\n const styles = useStyles()\n\n return (\n <Heading\n variant=\"h3\"\n style={styles.headerTitle}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n >\n {children}\n </Heading>\n )\n}\n\nFormSheetHeaderTitle.displayName = 'FormSheet.HeaderTitle'\n\n// ====================================\n// ====== FormSheetHeaderActions ======\n// ====================================\n\ninterface FormSheetHeaderActionsProps {\n children: ReactNode\n}\n\nfunction FormSheetHeaderActions({ children }: FormSheetHeaderActionsProps) {\n const styles = useStyles()\n\n return <View style={styles.headerActions}>{children}</View>\n}\n\nFormSheetHeaderActions.displayName = 'FormSheet.HeaderActions'\n\n// ===========================================\n// ====== FormSheetHeaderTextButton ==========\n// ===========================================\n\n// We are omitting `onLongPress` because we are instead supporting `accessibilityShowsLargeContentViewer`.\n// This is triggered by an `onLongPress` event when an iOS device is in Apple's accessible font scale range.\n// Triggering this prop will display an almost full screen iOS a11y button.\ninterface FormSheetHeaderTextButtonProps\n extends Omit<TextButtonProps, 'maxFontSizeMultiplier' | 'onLongPress'> {\n children: string\n}\n\nfunction FormSheetHeaderTextButton(props: FormSheetHeaderTextButtonProps) {\n return (\n <TextButton\n {...props}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n accessibilityShowsLargeContentViewer\n accessibilityLargeContentTitle={props.children}\n />\n )\n}\n\nFormSheetHeaderTextButton.displayName = 'FormSheet.HeaderTextButton'\n\n// =========================================\n// ====== FormSheetHeaderButton ============\n// =========================================\n\n// Same `onLongPress`note as `FormSheetHeaderTextButtonProps`\ninterface FormSheetHeaderButtonProps\n extends Omit<ButtonProps, 'maxFontSizeMultiplier' | 'onLongPress'> {}\n\nfunction FormSheetHeaderButton(props: FormSheetHeaderButtonProps) {\n return (\n <Button\n {...props}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n accessibilityShowsLargeContentViewer\n accessibilityLargeContentTitle={props.title}\n />\n )\n}\n\nFormSheetHeaderButton.displayName = 'FormSheet.HeaderButton'\n\n// ====================================\n// ====== ActionsFormSheetAction ======\n// ====================================\n\nconst FORM_SHEET_ACTION_APPEARANCES = {\n neutral: 'neutral',\n danger: 'danger',\n} as const\n\ntype FormSheetActionAppearanceUnion =\n (typeof FORM_SHEET_ACTION_APPEARANCES)[keyof typeof FORM_SHEET_ACTION_APPEARANCES]\n\ninterface FormSheetActionProps {\n title: string\n iconName: IconString\n onPress: () => void\n accessibilityLabel?: string\n accessibilityHint?: string\n accessibilityRole?: AccessibilityRole\n appearance?: FormSheetActionAppearanceUnion\n disabled?: boolean\n}\n\nfunction FormSheetAction({\n title,\n iconName,\n onPress,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n appearance = 'neutral',\n disabled = false,\n}: FormSheetActionProps) {\n const styles = useStyles({ appearance })\n\n return (\n <PlatformPressable\n onPress={onPress}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint={accessibilityHint}\n accessibilityRole={accessibilityRole}\n style={styles.actionPressable}\n disabled={disabled}\n >\n <Icon name={iconName} size={16} accessibilityElementsHidden style={styles.actionIcon} />\n <Text style={styles.actionTitle}>{title}</Text>\n </PlatformPressable>\n )\n}\n\nFormSheetAction.displayName = 'FormSheet.Action'\n\n// ==================================\n// ====== Styles ====================\n// ==================================\n\ninterface Styles {\n appearance?: FormSheetActionAppearanceUnion\n}\n\nconst useStyles = ({ appearance = 'neutral' }: Styles = {}) => {\n const { colors } = useTheme()\n const { height } = useWindowDimensions()\n const { bottom, top } = useSafeAreaInsets()\n const headerHeight = useHeaderHeight()\n\n const containerHeight = Platform.select({\n ios: height - top - headerHeight,\n default: null,\n })\n\n const appearanceColorsMap = {\n neutral: {\n iconColor: colors.iconColorDefaultPrimary,\n textColor: colors.textColorDefaultPrimary,\n },\n danger: {\n iconColor: colors.fillColorStatusErrorMedium,\n textColor: colors.fillColorStatusErrorMedium,\n },\n }\n\n return StyleSheet.create({\n container: {\n justifyContent: 'flex-start',\n paddingBottom: bottom,\n width: '100%',\n backgroundColor: colors.fillColorNeutral100Inverted,\n height: containerHeight,\n ...Platform.select({\n ios: {\n flexGrow: 1, // Ensures the FormSheet children respond to the formsheet height changing on iOS\n },\n android: {\n maxHeight: '100%', // Ensures lists to scroll on Android\n },\n }),\n },\n androidSheetGrabber: {\n position: 'absolute',\n top: 5,\n width: 34,\n height: 5,\n backgroundColor: colors.fillColorNeutral040,\n borderRadius: 100,\n alignSelf: 'center',\n },\n content: {\n ...Platform.select({\n android: {\n maxHeight: '100%', // Ensures content above a list (e.g. FormSheet.Header) don't subtract from the FormSheet's height\n },\n }),\n },\n header: {\n paddingHorizontal: 16,\n paddingTop: 20,\n paddingBottom: 16,\n backgroundColor: colors.fillColorNeutral100Inverted,\n gap: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n headerContent: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n headerTitle: {\n textAlign: 'left',\n flex: 1,\n },\n headerActions: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 16,\n },\n actionPressable: {\n flexDirection: 'row',\n alignItems: 'center',\n paddingVertical: 12,\n paddingHorizontal: 16,\n gap: 8,\n },\n actionIcon: {\n color: appearanceColorsMap[appearance].iconColor,\n },\n actionTitle: {\n color: appearanceColorsMap[appearance].textColor,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"form_sheet.js","sourceRoot":"","sources":["../../../src/components/primitive/form_sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE/E,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EACL,QAAQ,EACR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AM;YACjB,IAAI,EAAE,CAAC;SACR;QACD,aAAa,EAAE;YACb,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,EAAE;SACR;QACD,eAAe,EAAE;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,EAAE;YACnB,iBAAiB,EAAE,EAAE;YACrB,GAAG,EAAE,CAAC;SACP;QACD,UAAU,EAAE;YACV,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,SAAS;SACjD;QACD,WAAW,EAAE;YACX,KAAK,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC,SAAS;SACjD;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { PlatformPressable, useHeaderHeight } from '@react-navigation/elements'\nimport { NativeStackNavigationOptions } from '@react-navigation/native-stack'\nimport React, { ReactNode } from 'react'\nimport {\n Platform,\n StyleSheet,\n View,\n useWindowDimensions,\n type AccessibilityRole,\n type StyleProp,\n type ViewStyle,\n} from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useTheme } from '../../hooks'\nimport type { ButtonProps, TextButtonProps } from '../display'\nimport { Button, Heading, Icon, IconString, Text, TextButton } from '../display'\nimport { MAX_FONT_SIZE_MULTIPLIER_LANDMARK } from '../../utils'\n\n// =================================\n// ====== Exports ==================\n// =================================\n\n/**\n * Screen options for the formsheet's NativeStackNavigation route\n * @param {string} options.headerTitle - Doesn't show in UI but good to have for semantic reasons.\n * @param {number[]} [options.sheetAllowedDetents] - Controls the height increments the sheet grows to. To prevent bugs in Android, do not specify more then two values and use [0.94] instead of [1] to go full screen.\n * @param {NativeStackNavigationOptions} [options.rest] - Adds or overrides any valid NativeStackNavigationOptions\n * @returns {NativeStackNavigationOptions} Merged NativeStackNavigationOptions\n */\nexport const getFormSheetScreenOptions = ({\n headerTitle,\n sheetAllowedDetents = [0.25],\n ...rest\n}: NativeStackNavigationOptions = {}): NativeStackNavigationOptions => ({\n presentation: 'formSheet',\n headerShown: false,\n sheetAllowedDetents,\n sheetCornerRadius: 16,\n sheetGrabberVisible: true,\n headerTitle,\n ...rest,\n})\n\nconst FormSheet = {\n Root: FormSheetRoot,\n Action: FormSheetAction,\n Header: FormSheetHeader,\n HeaderTitle: FormSheetHeaderTitle,\n HeaderActions: FormSheetHeaderActions,\n HeaderTextButton: FormSheetHeaderTextButton,\n HeaderButton: FormSheetHeaderButton,\n} as const\n\ntype FormSheetComponents = {\n Root: React.FC<FormSheetRootProps>\n Action: React.FC<FormSheetActionProps>\n Header: React.FC<FormSheetHeaderProps>\n HeaderTitle: React.FC<FormSheetHeaderTitleProps>\n HeaderActions: React.FC<FormSheetHeaderActionsProps>\n HeaderTextButton: React.FC<FormSheetHeaderTextButtonProps>\n HeaderButton: React.FC<FormSheetHeaderButtonProps>\n}\n\nexport default FormSheet as FormSheetComponents\nexport type {\n FormSheetActionProps,\n FormSheetHeaderActionsProps,\n FormSheetHeaderButtonProps,\n FormSheetHeaderProps,\n FormSheetHeaderTextButtonProps,\n FormSheetHeaderTitleProps,\n FormSheetRootProps,\n}\n\n// ====================================\n// ====== ActionsFormSheetRoot ========\n// ====================================\n\ninterface FormSheetRootProps {\n children: ReactNode\n style?: StyleProp<ViewStyle>\n contentStyle?: StyleProp<ViewStyle>\n showAndroidSheetGrabber?: boolean\n}\n\nexport function FormSheetRoot({\n children,\n style,\n contentStyle,\n showAndroidSheetGrabber = true,\n}: FormSheetRootProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.container, style]} collapsable={false}>\n <View style={[styles.content, contentStyle]}>{children}</View>\n {showAndroidSheetGrabber && <AndroidSheetGrabber />}\n </View>\n )\n}\n\nFormSheetRoot.displayName = 'FormSheet.Root'\n\n// ====================================\n// ====== AndroidSheetGrabber =========\n// ====================================\n\nfunction AndroidSheetGrabber() {\n const styles = useStyles()\n\n return Platform.select({\n android: <View style={styles.androidSheetGrabber} />,\n ios: null,\n })\n}\n\n// ====================================\n// ====== FormSheetHeader =============\n// ====================================\n\ninterface FormSheetHeaderProps {\n children: ReactNode\n style?: StyleProp<ViewStyle>\n}\n\nfunction FormSheetHeader({ children, style }: FormSheetHeaderProps) {\n const styles = useStyles()\n\n return (\n <View style={[styles.header, style]}>\n <View style={styles.headerContent}>{children}</View>\n </View>\n )\n}\n\nFormSheetHeader.displayName = 'FormSheet.Header'\n\n// ====================================\n// ====== FormSheetHeaderTitle ========\n// ====================================\n\ninterface FormSheetHeaderTitleProps {\n children: ReactNode\n}\n\nfunction FormSheetHeaderTitle({ children }: FormSheetHeaderTitleProps) {\n const styles = useStyles()\n\n return (\n <Heading\n variant=\"h3\"\n style={styles.headerTitle}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n >\n {children}\n </Heading>\n )\n}\n\nFormSheetHeaderTitle.displayName = 'FormSheet.HeaderTitle'\n\n// ====================================\n// ====== FormSheetHeaderActions ======\n// ====================================\n\ninterface FormSheetHeaderActionsProps {\n children: ReactNode\n}\n\nfunction FormSheetHeaderActions({ children }: FormSheetHeaderActionsProps) {\n const styles = useStyles()\n\n return <View style={styles.headerActions}>{children}</View>\n}\n\nFormSheetHeaderActions.displayName = 'FormSheet.HeaderActions'\n\n// ===========================================\n// ====== FormSheetHeaderTextButton ==========\n// ===========================================\n\n// We are omitting `onLongPress` because we are instead supporting `accessibilityShowsLargeContentViewer`.\n// This is triggered by an `onLongPress` event when an iOS device is in Apple's accessible font scale range.\n// Triggering this prop will display an almost full screen iOS a11y button.\ninterface FormSheetHeaderTextButtonProps\n extends Omit<TextButtonProps, 'maxFontSizeMultiplier' | 'onLongPress'> {\n children: string\n}\n\nfunction FormSheetHeaderTextButton(props: FormSheetHeaderTextButtonProps) {\n return (\n <TextButton\n {...props}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n accessibilityShowsLargeContentViewer\n accessibilityLargeContentTitle={props.children}\n />\n )\n}\n\nFormSheetHeaderTextButton.displayName = 'FormSheet.HeaderTextButton'\n\n// =========================================\n// ====== FormSheetHeaderButton ============\n// =========================================\n\n// Same `onLongPress`note as `FormSheetHeaderTextButtonProps`\ninterface FormSheetHeaderButtonProps\n extends Omit<ButtonProps, 'maxFontSizeMultiplier' | 'onLongPress'> {}\n\nfunction FormSheetHeaderButton(props: FormSheetHeaderButtonProps) {\n return (\n <Button\n {...props}\n maxFontSizeMultiplier={MAX_FONT_SIZE_MULTIPLIER_LANDMARK}\n accessibilityShowsLargeContentViewer\n accessibilityLargeContentTitle={props.title}\n />\n )\n}\n\nFormSheetHeaderButton.displayName = 'FormSheet.HeaderButton'\n\n// ====================================\n// ====== ActionsFormSheetAction ======\n// ====================================\n\nconst FORM_SHEET_ACTION_APPEARANCES = {\n neutral: 'neutral',\n danger: 'danger',\n} as const\n\ntype FormSheetActionAppearanceUnion =\n (typeof FORM_SHEET_ACTION_APPEARANCES)[keyof typeof FORM_SHEET_ACTION_APPEARANCES]\n\ninterface FormSheetActionProps {\n title: string\n iconName?: IconString\n onPress: () => void\n accessibilityLabel?: string\n accessibilityHint?: string\n accessibilityRole?: AccessibilityRole\n appearance?: FormSheetActionAppearanceUnion\n disabled?: boolean\n}\n\nfunction FormSheetAction({\n title,\n iconName,\n onPress,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n appearance = 'neutral',\n disabled = false,\n}: FormSheetActionProps) {\n const styles = useStyles({ appearance })\n\n return (\n <PlatformPressable\n onPress={onPress}\n accessibilityLabel={accessibilityLabel}\n accessibilityHint={accessibilityHint}\n accessibilityRole={accessibilityRole}\n style={styles.actionPressable}\n disabled={disabled}\n >\n {iconName && (\n <Icon name={iconName} size={16} accessibilityElementsHidden style={styles.actionIcon} />\n )}\n <Text style={styles.actionTitle}>{title}</Text>\n </PlatformPressable>\n )\n}\n\nFormSheetAction.displayName = 'FormSheet.Action'\n\n// ==================================\n// ====== Styles ====================\n// ==================================\n\ninterface Styles {\n appearance?: FormSheetActionAppearanceUnion\n}\n\nconst useStyles = ({ appearance = 'neutral' }: Styles = {}) => {\n const { colors } = useTheme()\n const { height } = useWindowDimensions()\n const { bottom, top } = useSafeAreaInsets()\n const headerHeight = useHeaderHeight()\n\n const containerHeight = Platform.select({\n ios: height - top - headerHeight,\n default: null,\n })\n\n const appearanceColorsMap = {\n neutral: {\n iconColor: colors.iconColorDefaultPrimary,\n textColor: colors.textColorDefaultPrimary,\n },\n danger: {\n iconColor: colors.fillColorStatusErrorMedium,\n textColor: colors.fillColorStatusErrorMedium,\n },\n }\n\n return StyleSheet.create({\n container: {\n justifyContent: 'flex-start',\n paddingBottom: bottom,\n width: '100%',\n backgroundColor: colors.fillColorNeutral100Inverted,\n height: containerHeight,\n ...Platform.select({\n ios: {\n flexGrow: 1, // Ensures the FormSheet children respond to the formsheet height changing on iOS\n },\n android: {\n maxHeight: '100%', // Ensures lists to scroll on Android\n },\n }),\n },\n androidSheetGrabber: {\n position: 'absolute',\n top: 5,\n width: 34,\n height: 5,\n backgroundColor: colors.fillColorNeutral040,\n borderRadius: 100,\n alignSelf: 'center',\n },\n content: {\n ...Platform.select({\n android: {\n maxHeight: '100%', // Ensures content above a list (e.g. FormSheet.Header) don't subtract from the FormSheet's height\n },\n }),\n },\n header: {\n paddingHorizontal: 16,\n paddingTop: 20,\n paddingBottom: 16,\n backgroundColor: colors.fillColorNeutral100Inverted,\n gap: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n headerContent: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n },\n headerTitle: {\n textAlign: 'left',\n flex: 1,\n },\n headerActions: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 16,\n },\n actionPressable: {\n flexDirection: 'row',\n alignItems: 'center',\n paddingVertical: 12,\n paddingHorizontal: 16,\n gap: 8,\n },\n actionIcon: {\n color: appearanceColorsMap[appearance].iconColor,\n },\n actionTitle: {\n color: appearanceColorsMap[appearance].textColor,\n },\n })\n}\n"]}
|
package/build/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,yCAAyC,CAAA;AACvD,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,yCAAyC,CAAA;AACvD,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,8BAA8B,CAAA"}
|
package/build/hooks/index.js
CHANGED
package/build/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,yCAAyC,CAAA;AACvD,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA","sourcesContent":["export * from './use_async_storage'\nexport * from './use_animated_message_background_color'\nexport * from './use_theme'\nexport * from './use_suspense_api'\nexport * from './use_current_person'\nexport * from './use_deleting_ids'\nexport * from './use_font_scale'\nexport * from './use_create_android_ripple_color'\nexport * from './use_chat_permissions'\nexport * from './use_api_client'\nexport * from './use_groups_groups'\nexport * from './use_groups'\nexport * from './use_api'\nexport * from './use_api_client'\nexport * from './use_message_reaction_toggle'\nexport * from './use_interaction_ghost_color'\nexport * from './use_at_font_scale_breakpoint'\nexport * from './use_qualified_by_age'\nexport * from './use_scalable_number_of_lines'\nexport * from './use_submit_age_check'\nexport * from './use_organization'\nexport * from './use_product_analytics'\nexport * from './use_people_person'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,yCAAyC,CAAA;AACvD,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,kBAAkB,CAAA;AAChC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,qBAAqB,CAAA;AACnC,cAAc,8BAA8B,CAAA","sourcesContent":["export * from './use_async_storage'\nexport * from './use_animated_message_background_color'\nexport * from './use_theme'\nexport * from './use_suspense_api'\nexport * from './use_current_person'\nexport * from './use_deleting_ids'\nexport * from './use_font_scale'\nexport * from './use_create_android_ripple_color'\nexport * from './use_chat_permissions'\nexport * from './use_api_client'\nexport * from './use_groups_groups'\nexport * from './use_groups'\nexport * from './use_api'\nexport * from './use_api_client'\nexport * from './use_message_reaction_toggle'\nexport * from './use_interaction_ghost_color'\nexport * from './use_at_font_scale_breakpoint'\nexport * from './use_qualified_by_age'\nexport * from './use_scalable_number_of_lines'\nexport * from './use_submit_age_check'\nexport * from './use_organization'\nexport * from './use_product_analytics'\nexport * from './use_people_person'\nexport * from './use_new_conversation_entry'\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_features.d.ts","sourceRoot":"","sources":["../../src/hooks/use_features.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAG1E,wBAAgB,WAAW;;kCAiBT,MAAM;EASvB;AAED,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"use_features.d.ts","sourceRoot":"","sources":["../../src/hooks/use_features.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAG1E,wBAAgB,WAAW;;kCAiBT,MAAM;EASvB;AAED,eAAO,MAAM,iBAAiB;;;CAG7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_features.js","sourceRoot":"","sources":["../../src/hooks/use_features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAI/C,MAAM,UAAU,WAAW;IACzB,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAA;IAE5C,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC;QAChC,QAAQ,EAAE,mBAAmB,EAAE;QAC/B,OAAO,EAAE,GAAG,EAAE;YACZ,OAAO,SAAS,CAAC,IAAI;iBAClB,GAAG,CAAiC,WAAW,CAAC;iBAChD,KAAK,CAAC,GAAG,EAAE,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AC,CAAA;IAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAA;IAE1B,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,WAAmB,EAAE,EAAE,CACtB,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,EAC3E,CAAC,QAAQ,CAAC,CACX,CAAA;IAED,OAAO;QACL,QAAQ;QACR,cAAc;KACf,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,gBAAgB,EAAE,oCAAoC;IACtD,iBAAiB,EAAE,kCAAkC;CACtD,CAAA;AAED,MAAM,mBAAmB,GAAmC;IAC1D,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,IAAI,EAAE;QACJ,KAAK,EAAE,CAAC;QACR,UAAU,EAAE,CAAC;KACd;CACF,CAAA","sourcesContent":["import { useSuspenseQuery } from '@tanstack/react-query'\nimport { useCallback } from 'react'\nimport { getFeaturesRequestArgs, getFeaturesQueryKey } from '../utils/request/get_features'\nimport { useApiClient } from './use_api_client'\nimport type { FeatureResource } from '../types/resources/feature_resource'\nimport { ApiCollection } from '../types'\n\nexport function useFeatures() {\n const apiClient = useApiClient()\n const requestArgs = getFeaturesRequestArgs()\n\n const { data } = useSuspenseQuery({\n queryKey: getFeaturesQueryKey(),\n queryFn: () => {\n return apiClient.chat\n .get<ApiCollection<FeatureResource>>(requestArgs)\n .catch(() => stableEmptyFeatures)\n },\n staleTime: 1000 * 60 * 5, // 5 minutes\n })\n\n const features = data.data\n\n const featureEnabled = useCallback(\n (featureName: string) =>\n features.some(feature => feature.name === featureName && feature.enabled),\n [features]\n )\n\n return {\n features,\n featureEnabled,\n }\n}\n\nexport const availableFeatures = {\n threaded_replies: 'ROLLOUT_MOBILE_threaded_replies_v1',\n message_reporting: 'ROLLOUT_MOBILE_message_reporting',\n}\n\nconst stableEmptyFeatures: ApiCollection<FeatureResource> = {\n data: [],\n links: {},\n meta: {\n count: 0,\n totalCount: 0,\n },\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_new_conversation_entry.d.ts","sourceRoot":"","sources":["../../src/hooks/use_new_conversation_entry.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;AAElF,wBAAgB,uBAAuB,IAAI,wBAAwB,CAyBlE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useAppGrants } from './use_chat_permissions';
|
|
3
|
+
export function useNewConversationEntry() {
|
|
4
|
+
const appGrants = useAppGrants();
|
|
5
|
+
return useMemo(() => {
|
|
6
|
+
const canCreateGroupsConversations = appGrants.data?.some(g => g.createConversations && g.appName === 'Groups');
|
|
7
|
+
const canCreateServicesConversations = appGrants.data?.some(g => g.createConversations && g.appName === 'Services');
|
|
8
|
+
if (canCreateGroupsConversations && canCreateServicesConversations) {
|
|
9
|
+
return 'select_type';
|
|
10
|
+
}
|
|
11
|
+
if (canCreateGroupsConversations) {
|
|
12
|
+
return 'groups';
|
|
13
|
+
}
|
|
14
|
+
if (canCreateServicesConversations) {
|
|
15
|
+
return 'teams';
|
|
16
|
+
}
|
|
17
|
+
return 'none';
|
|
18
|
+
}, [appGrants.data]);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=use_new_conversation_entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_new_conversation_entry.js","sourceRoot":"","sources":["../../src/hooks/use_new_conversation_entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAIrD,MAAM,UAAU,uBAAuB;IACrC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,4BAA4B,GAAG,SAAS,CAAC,IAAI,EAAE,IAAI,CACvD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,CAAC,OAAO,KAAK,QAAQ,CACrD,CAAA;QACD,MAAM,8BAA8B,GAAG,SAAS,CAAC,IAAI,EAAE,IAAI,CACzD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,IAAI,CAAC,CAAC,OAAO,KAAK,UAAU,CACvD,CAAA;QAED,IAAI,4BAA4B,IAAI,8BAA8B,EAAE,CAAC;YACnE,OAAO,aAAa,CAAA;QACtB,CAAC;QAED,IAAI,4BAA4B,EAAE,CAAC;YACjC,OAAO,QAAQ,CAAA;QACjB,CAAC;QAED,IAAI,8BAA8B,EAAE,CAAC;YACnC,OAAO,OAAO,CAAA;QAChB,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;AACtB,CAAC","sourcesContent":["import { useMemo } from 'react'\nimport { useAppGrants } from './use_chat_permissions'\n\nexport type NewConversationEntryMode = 'select_type' | 'groups' | 'teams' | 'none'\n\nexport function useNewConversationEntry(): NewConversationEntryMode {\n const appGrants = useAppGrants()\n\n return useMemo(() => {\n const canCreateGroupsConversations = appGrants.data?.some(\n g => g.createConversations && g.appName === 'Groups'\n )\n const canCreateServicesConversations = appGrants.data?.some(\n g => g.createConversations && g.appName === 'Services'\n )\n\n if (canCreateGroupsConversations && canCreateServicesConversations) {\n return 'select_type'\n }\n\n if (canCreateGroupsConversations) {\n return 'groups'\n }\n\n if (canCreateServicesConversations) {\n return 'teams'\n }\n\n return 'none'\n }, [appGrants.data])\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MessageReportReason } from '../types/resources/message_report';
|
|
2
|
+
export declare const useReportMessage: (conversationId: number, messageId: string) => import("@tanstack/react-query").UseMutationResult<import("..").ApiCollection | import("..").ApiResource, Error, {
|
|
3
|
+
reason: MessageReportReason;
|
|
4
|
+
reasonDetail?: string;
|
|
5
|
+
}, unknown>;
|
|
6
|
+
//# sourceMappingURL=use_report_message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_report_message.d.ts","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAwB,MAAM,mCAAmC,CAAA;AAE7F,eAAO,MAAM,gBAAgB,mBAAoB,MAAM,aAAa,MAAM;YAQ5D,mBAAmB;mBACZ,MAAM;WAsB1B,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { useApiClient } from './use_api_client';
|
|
3
|
+
import { Haptic } from '../utils/native_adapters';
|
|
4
|
+
export const useReportMessage = (conversationId, messageId) => {
|
|
5
|
+
const apiClient = useApiClient();
|
|
6
|
+
return useMutation({
|
|
7
|
+
mutationFn: async ({ reason, reasonDetail, }) => {
|
|
8
|
+
const url = `/me/conversations/${conversationId}/messages/${messageId}/report`;
|
|
9
|
+
const data = {
|
|
10
|
+
data: {
|
|
11
|
+
type: 'MessageReport',
|
|
12
|
+
attributes: {
|
|
13
|
+
reason,
|
|
14
|
+
...(reasonDetail && { reason_detail: reasonDetail }),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
return apiClient.chat.post({ url, data });
|
|
19
|
+
},
|
|
20
|
+
onSuccess: () => {
|
|
21
|
+
Haptic.notificationSuccess();
|
|
22
|
+
},
|
|
23
|
+
onError: () => {
|
|
24
|
+
Haptic.notificationError();
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=use_report_message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_report_message.js","sourceRoot":"","sources":["../../src/hooks/use_report_message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAGjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,cAAsB,EAAE,SAAiB,EAAE,EAAE;IAC5E,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,OAAO,WAAW,CAAC;QACjB,UAAU,EAAE,KAAK,EAAE,EACjB,MAAM,EACN,YAAY,GAIb,EAAE,EAAE;YACH,MAAM,GAAG,GAAG,qBAAqB,cAAc,aAAa,SAAS,SAAS,CAAA;YAC9E,MAAM,IAAI,GAAyB;gBACjC,IAAI,EAAE;oBACJ,IAAI,EAAE,eAAe;oBACrB,UAAU,EAAE;wBACV,MAAM;wBACN,GAAG,CAAC,YAAY,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;qBACrD;iBACF;aACF,CAAA;YAED,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;QAC3C,CAAC;QACD,SAAS,EAAE,GAAG,EAAE;YACd,MAAM,CAAC,mBAAmB,EAAE,CAAA;QAC9B,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACZ,MAAM,CAAC,iBAAiB,EAAE,CAAA;QAC5B,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useMutation } from '@tanstack/react-query'\nimport { useApiClient } from './use_api_client'\nimport { Haptic } from '../utils/native_adapters'\nimport { MessageReportReason, MessageReportPayload } from '../types/resources/message_report'\n\nexport const useReportMessage = (conversationId: number, messageId: string) => {\n const apiClient = useApiClient()\n\n return useMutation({\n mutationFn: async ({\n reason,\n reasonDetail,\n }: {\n reason: MessageReportReason\n reasonDetail?: string\n }) => {\n const url = `/me/conversations/${conversationId}/messages/${messageId}/report`\n const data: MessageReportPayload = {\n data: {\n type: 'MessageReport',\n attributes: {\n reason,\n ...(reasonDetail && { reason_detail: reasonDetail }),\n },\n },\n }\n\n return apiClient.chat.post({ url, data })\n },\n onSuccess: () => {\n Haptic.notificationSuccess()\n },\n onError: () => {\n Haptic.notificationError()\n },\n })\n}\n"]}
|
|
@@ -7,8 +7,10 @@ import { BugReportScreen } from '../screens/bug_report_screen';
|
|
|
7
7
|
import { MessageReadReceiptsScreen } from '../screens/conversation/message_read_receipts_screen';
|
|
8
8
|
import { ConversationDetailsScreen } from '../screens/conversation_details_screen';
|
|
9
9
|
import { ConversationScreen } from '../screens/conversation_screen';
|
|
10
|
+
import { ConversationSelectTypeScreen } from '../screens/conversation_select_type_screen';
|
|
10
11
|
import { ConversationsScreen } from '../screens/conversations/conversations_screen';
|
|
11
12
|
import { MessageActionsScreen } from '../screens/message_actions_screen';
|
|
13
|
+
import { MessageReportScreen } from '../screens/message_report_screen';
|
|
12
14
|
import { NotFound } from '../screens/not_found';
|
|
13
15
|
import { ReactionsScreen } from '../screens/reactions_screen';
|
|
14
16
|
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
@@ -24,14 +26,14 @@ export declare const NewConversationStack: import("@react-navigation/native").Ty
|
|
|
24
26
|
};
|
|
25
27
|
Navigator: ({ id, initialRouteName, children, layout, screenListeners, screenOptions, screenLayout, UNSTABLE_getStateForRouteNamesChange, ...rest }: import("@react-navigation/native-stack").NativeStackNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
28
|
}, {
|
|
27
|
-
readonly initialRouteName: "
|
|
29
|
+
readonly initialRouteName: "ConversationNewEntry";
|
|
28
30
|
readonly screenOptions: {
|
|
29
31
|
readonly headerBackButtonDisplayMode: "minimal";
|
|
30
32
|
};
|
|
31
33
|
readonly screenLayout: typeof ScreenLayoutWithChatAccessGate;
|
|
32
34
|
readonly screens: {
|
|
33
|
-
readonly
|
|
34
|
-
readonly screen: ({ route
|
|
35
|
+
readonly ConversationNewEntry: {
|
|
36
|
+
readonly screen: ({ route }: import("../screens/conversation_select_recipients/types/screen_props").ConversationSelectRecipientsScreenProps) => React.JSX.Element;
|
|
35
37
|
readonly options: ({ navigation }: {
|
|
36
38
|
route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
|
|
37
39
|
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
|
|
@@ -82,7 +84,7 @@ export declare const NewConversationStack: import("@react-navigation/native").Ty
|
|
|
82
84
|
};
|
|
83
85
|
};
|
|
84
86
|
}) => React.JSX.Element;
|
|
85
|
-
readonly options: ({ navigation }: {
|
|
87
|
+
readonly options: ({ navigation, route }: {
|
|
86
88
|
route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
|
|
87
89
|
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
|
|
88
90
|
theme: ReactNavigation.Theme;
|
|
@@ -182,14 +184,14 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
|
|
|
182
184
|
};
|
|
183
185
|
Navigator: ({ id, initialRouteName, children, layout, screenListeners, screenOptions, screenLayout, UNSTABLE_getStateForRouteNamesChange, ...rest }: import("@react-navigation/native-stack").NativeStackNavigatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
184
186
|
}, {
|
|
185
|
-
readonly initialRouteName: "
|
|
187
|
+
readonly initialRouteName: "ConversationNewEntry";
|
|
186
188
|
readonly screenOptions: {
|
|
187
189
|
readonly headerBackButtonDisplayMode: "minimal";
|
|
188
190
|
};
|
|
189
191
|
readonly screenLayout: typeof ScreenLayoutWithChatAccessGate;
|
|
190
192
|
readonly screens: {
|
|
191
|
-
readonly
|
|
192
|
-
readonly screen: ({ route
|
|
193
|
+
readonly ConversationNewEntry: {
|
|
194
|
+
readonly screen: ({ route }: import("../screens/conversation_select_recipients/types/screen_props").ConversationSelectRecipientsScreenProps) => React.JSX.Element;
|
|
193
195
|
readonly options: ({ navigation }: {
|
|
194
196
|
route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
|
|
195
197
|
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
|
|
@@ -240,7 +242,7 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
|
|
|
240
242
|
};
|
|
241
243
|
};
|
|
242
244
|
}) => React.JSX.Element;
|
|
243
|
-
readonly options: ({ navigation }: {
|
|
245
|
+
readonly options: ({ navigation, route }: {
|
|
244
246
|
route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
|
|
245
247
|
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
|
|
246
248
|
theme: ReactNavigation.Theme;
|
|
@@ -266,10 +268,18 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
|
|
|
266
268
|
readonly screen: typeof MessageActionsScreen;
|
|
267
269
|
readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
268
270
|
};
|
|
271
|
+
readonly MessageReport: {
|
|
272
|
+
readonly screen: typeof MessageReportScreen;
|
|
273
|
+
readonly options: ({ navigation, }: import("@react-navigation/native-stack").NativeStackScreenProps<any>) => import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
274
|
+
};
|
|
269
275
|
readonly AttachmentActions: {
|
|
270
276
|
readonly screen: typeof AttachmentActionsScreen;
|
|
271
277
|
readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
272
278
|
};
|
|
279
|
+
readonly ConversationSelectType: {
|
|
280
|
+
readonly screen: typeof ConversationSelectTypeScreen;
|
|
281
|
+
readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
282
|
+
};
|
|
273
283
|
readonly Reactions: {
|
|
274
284
|
readonly screen: typeof ReactionsScreen;
|
|
275
285
|
readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EACL,uBAAuB,EAExB,MAAM,yDAAyD,CAAA;AAChE,OAAO,EAAE,eAAe,EAA0B,MAAM,8BAA8B,CAAA;AACtF,OAAO,EACL,yBAAyB,EAE1B,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAWlF,OAAO,EAEL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAA;AAIvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAA;AAEnF,OAAO,EACL,oBAAoB,EAErB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAA0B,MAAM,6BAA6B,CAAA;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAA;AAC/D,OAAO,EAAE,eAAe,EAA0B,MAAM,8BAA8B,CAAA;AAStF,eAAO,MAAM,oBAAoB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,O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;;;;;;;;;;;;;;;;uBAAtB,gBAAiB,KAAK;;;;qCA5Ez8Q,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;mDA4Ey6Q,KAAK;;;iDA/Nz8Q,2BAA2B;;;;;;;;;mDA+Ny6Q,KAAK;;;iDArNz8Q,2BAA2B;;;;;;;;mDAqNy6Q,KAAK;;;iDAxMz8Q,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;mDAwMy6Q,KAAK;;;;iDAtLz8Q,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAsLw5Q,gBAAiB,KAAK;;;;;;;;;;;;;;;;;;EATp+Q,CAAA;AAEF,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,SAAS,CAAC,CAAA;AAE3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,eAAe,CAAC;QACxB,UAAU,aAAc,SAAQ,kBAAkB;SAAG;KACtD;CACF"}
|
|
@@ -14,11 +14,13 @@ import { ConversationFiltersScreen, ConversationFiltersScreenOptions, } from '..
|
|
|
14
14
|
import { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen';
|
|
15
15
|
import { ConversationScreen, ConversationScreenTitle, } from '../screens/conversation_screen';
|
|
16
16
|
import { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen';
|
|
17
|
-
import { ConversationSelectRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_recipients_screen';
|
|
18
17
|
import { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen';
|
|
18
|
+
import { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen';
|
|
19
|
+
import { ConversationSelectTypeScreen, ConversationSelectTypeScreenOptions, } from '../screens/conversation_select_type_screen';
|
|
19
20
|
import { ConversationsScreen } from '../screens/conversations/conversations_screen';
|
|
20
21
|
import { GetHelpScreen } from '../screens/get_help_screen';
|
|
21
22
|
import { MessageActionsScreen, MessageActionsScreenOptions, } from '../screens/message_actions_screen';
|
|
23
|
+
import { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen';
|
|
22
24
|
import { NotFound } from '../screens/not_found';
|
|
23
25
|
import { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen';
|
|
24
26
|
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
@@ -30,14 +32,14 @@ const HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {
|
|
|
30
32
|
marginRight: Platform.select({ ios: 0, default: 30 }),
|
|
31
33
|
};
|
|
32
34
|
export const NewConversationStack = createNativeStackNavigator({
|
|
33
|
-
initialRouteName: '
|
|
35
|
+
initialRouteName: 'ConversationNewEntry',
|
|
34
36
|
screenOptions: {
|
|
35
37
|
headerBackButtonDisplayMode: 'minimal',
|
|
36
38
|
},
|
|
37
39
|
screenLayout: ScreenLayoutWithChatAccessGate,
|
|
38
40
|
screens: {
|
|
39
|
-
|
|
40
|
-
screen:
|
|
41
|
+
ConversationNewEntry: {
|
|
42
|
+
screen: ConversationNewEntryScreen,
|
|
41
43
|
options: ({ navigation }) => ({
|
|
42
44
|
title: 'New conversation',
|
|
43
45
|
headerRight: (props) => (<HeaderTextButton {...props} onPress={navigation.goBack} title="Cancel"/>),
|
|
@@ -64,10 +66,10 @@ export const NewConversationStack = createNativeStackNavigator({
|
|
|
64
66
|
},
|
|
65
67
|
ConversationNew: {
|
|
66
68
|
screen: ConversationNewScreen,
|
|
67
|
-
options: ({ navigation }) => ({
|
|
69
|
+
options: ({ navigation, route }) => ({
|
|
68
70
|
title: 'New conversation',
|
|
69
71
|
headerLeft: () => null,
|
|
70
|
-
headerRight: (props) => (<HeaderTextButton {...props} onPress={() => navigation.
|
|
72
|
+
headerRight: (props) => (<HeaderTextButton {...props} onPress={() => navigation.popTo('Conversations', route.params)} title="Cancel"/>),
|
|
71
73
|
}),
|
|
72
74
|
},
|
|
73
75
|
},
|
|
@@ -154,10 +156,18 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
154
156
|
// Something about sheetAllowedDetents declared inline breaks TS
|
|
155
157
|
options: MessageActionsScreenOptions,
|
|
156
158
|
},
|
|
159
|
+
MessageReport: {
|
|
160
|
+
screen: MessageReportScreen,
|
|
161
|
+
options: MessageReportScreenOptions,
|
|
162
|
+
},
|
|
157
163
|
AttachmentActions: {
|
|
158
164
|
screen: AttachmentActionsScreen,
|
|
159
165
|
options: AttachmentActionsScreenOptions,
|
|
160
166
|
},
|
|
167
|
+
ConversationSelectType: {
|
|
168
|
+
screen: ConversationSelectTypeScreen,
|
|
169
|
+
options: ConversationSelectTypeScreenOptions,
|
|
170
|
+
},
|
|
161
171
|
Reactions: {
|
|
162
172
|
screen: ReactionsScreen,
|
|
163
173
|
options: ReactionsScreenOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AACtF,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,yDAAyD,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,O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AAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport { Platform } from 'react-native'\nimport { Icon } from '../components'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen'\nimport {\n MessageReadReceiptsScreen,\n MessageReadReceiptsScreenOptions,\n} from '../screens/conversation/message_read_receipts_screen'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { NotFound } from '../screens/not_found'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { useQualifiedByAge } from '../hooks'\n\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationSelectRecipients',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationSelectRecipients: {\n screen: ConversationSelectRecipientsScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.getParent()?.goBack()}\n title=\"Cancel\"\n />\n ),\n }),\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted } = route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={() => navigation.getParent()?.goBack()}\n />\n ),\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL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EAAE,8BAA8B;SACxC;QACD,sBAAsB,EAAE;YACtB,MAAM,EAAE,4BAA4B;YACpC,OAAO,EAAE,mCAAmC;SAC7C;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,mBAAmB,EAAE;YACnB,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,gCAAgC;SAC1C;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,OAAO,EAAE;YACP,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC5B,WAAW,EAAE,UAAU;gBACvB,iBAAiB,EAAE,KAAK;gBACxB,YAAY,EAAE,OAAO;gBACrB,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CACpB,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,EAAG,CAC1E;aACF,CAAC;SACH;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK;aACb;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport { Platform } from 'react-native'\nimport { Icon } from '../components'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen'\nimport {\n MessageReadReceiptsScreen,\n MessageReadReceiptsScreenOptions,\n} from '../screens/conversation/message_read_receipts_screen'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { useQualifiedByAge } from '../hooks'\n\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted } = route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={() => navigation.getParent()?.goBack()}\n />\n ),\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ConversationSelectRecipientsScreenProps } from './types/screen_props';
|
|
3
|
+
export declare const ConversationNewEntryScreen: ({ route }: ConversationSelectRecipientsScreenProps) => React.JSX.Element;
|
|
4
|
+
//# sourceMappingURL=conversation_new_entry_screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation_new_entry_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAKxC,OAAO,KAAK,EAEV,uCAAuC,EACxC,MAAM,sBAAsB,CAAA;AAU7B,eAAO,MAAM,0BAA0B,cAAe,uCAAuC,sBAyD5F,CAAA"}
|