@planningcenter/chat-react-native 3.16.0-rc.1 → 3.16.0-rc.2

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.
@@ -1,7 +1,7 @@
1
1
  import DeviceInfo from 'react-native-device-info';
2
2
  export const useAppName = () => {
3
3
  const applicationName = DeviceInfo.getApplicationName();
4
- if (/churchcenter/i.test(applicationName)) {
4
+ if (/church\s?center/i.test(applicationName)) {
5
5
  return 'churchcenter';
6
6
  }
7
7
  if (/services/i.test(applicationName)) {
@@ -1 +1 @@
1
- {"version":3,"file":"use_app_name.js","sourceRoot":"","sources":["../../src/hooks/use_app_name.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAA;AAIjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAY,EAAE;IACtC,MAAM,eAAe,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAA;IAEvD,IAAI,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAC1C,OAAO,cAAc,CAAA;IACvB,CAAC;IAED,IAAI,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QACtC,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import DeviceInfo from 'react-native-device-info'\n\nexport type AppName = 'chat' | 'churchcenter' | 'services'\n\nexport const useAppName = (): AppName => {\n const applicationName = DeviceInfo.getApplicationName()\n\n if (/churchcenter/i.test(applicationName)) {\n return 'churchcenter'\n }\n\n if (/services/i.test(applicationName)) {\n return 'services'\n }\n\n return 'chat'\n}\n"]}
1
+ {"version":3,"file":"use_app_name.js","sourceRoot":"","sources":["../../src/hooks/use_app_name.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,0BAA0B,CAAA;AAIjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAY,EAAE;IACtC,MAAM,eAAe,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAA;IAEvD,IAAI,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAC7C,OAAO,cAAc,CAAA;IACvB,CAAC;IAED,IAAI,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QACtC,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import DeviceInfo from 'react-native-device-info'\n\nexport type AppName = 'chat' | 'churchcenter' | 'services'\n\nexport const useAppName = (): AppName => {\n const applicationName = DeviceInfo.getApplicationName()\n\n if (/church\\s?center/i.test(applicationName)) {\n return 'churchcenter'\n }\n\n if (/services/i.test(applicationName)) {\n return 'services'\n }\n\n return 'chat'\n}\n"]}
@@ -283,8 +283,9 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
283
283
  theme: ReactNavigation.Theme;
284
284
  }) => {
285
285
  headerTitle: string;
286
+ headerBackVisible: false;
286
287
  presentation: "modal";
287
- headerLeft: (props: import("@react-navigation/native-stack").NativeStackHeaderLeftProps) => React.JSX.Element;
288
+ headerRight: (props: NativeStackHeaderRightProps) => React.JSX.Element;
288
289
  };
289
290
  };
290
291
  readonly NotFound: {
@@ -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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,KAAK;;;qCA7Lr+S,2BAA2B;;;;;;;;uBA6Lo7S,gBAAiB,KAAK;;;qCAhLr+S,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;uBAgLo7S,gBAAiB,KAAK;;;;qCA9Jr+S,2BAA2B;;;;EAUtD,CAAA;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;uBAkJs9S,gBAAiB,KAAK;;;;qCAvIr+S,2BAA2B;;;;;;;;;;;;uBAuIo7S,gBAAiB,KAAK;;qCAvHr+S,2BAA2B;qCAc3B,2BAA2B;;;;;;;;;;;;;;;;;uBAyGo7S,gBAAiB,KAAK;;;;qCAnEr+S,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;mDAmEq8S,KAAK;;;iDAvMr+S,2BAA2B;;;;;;;;;mDAuMq8S,KAAK;;;iDA7Lr+S,2BAA2B;;;;;;;;mDA6Lq8S,KAAK;;;iDAhLr+S,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;mDAgLq8S,KAAK;;;;iDA9Jr+S,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA8Jo7S,gBAAiB,KAAK;;;;;;;;;;;;;;;;;;EAThgT,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"}
@@ -164,8 +164,9 @@ export const ChatStack = createNativeStackNavigator({
164
164
  screen: GetHelpScreen,
165
165
  options: ({ navigation }) => ({
166
166
  headerTitle: 'Get help',
167
+ headerBackVisible: false,
167
168
  presentation: 'modal',
168
- headerLeft: props => (<HeaderTextButton {...props} onPress={navigation.goBack} title="Close"/>),
169
+ headerRight: props => (<HeaderTextButton {...props} onPress={navigation.goBack} title="Close"/>),
169
170
  }),
170
171
  },
171
172
  NotFound: {
@@ -1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AAO,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 { 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 { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { ScreenLayout } from './screenLayout'\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: ScreenLayout,\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: ScreenLayout,\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 TeamConversation: {\n screen: TeamConversationScreen,\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 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 presentation: 'modal',\n headerLeft: 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,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;A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QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,cAAc,EAAE;YACd,MAAM,EAAE,oBAAoB;YAC5B,gEAAgE;YAChE,OAAO,EAAE,2BAA2B;SACrC;QACD,iBAAiB,EAAE;YACjB,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE,8BAA8B;SACxC;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 { 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 { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { ScreenLayout } from './screenLayout'\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: ScreenLayout,\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: ScreenLayout,\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 TeamConversation: {\n screen: TeamConversationScreen,\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 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 +1 @@
1
- {"version":3,"file":"bug_report_screen.d.ts","sourceRoot":"","sources":["../../src/screens/bug_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAA;AAUrE,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AA0CvC,eAAO,MAAM,sBAAsB,oBAEhC,sBAAsB,CAAC,GAAG,CAAC,KAAG,4BAI/B,CAAA;AAcF,wBAAgB,eAAe,sBAyS9B"}
1
+ {"version":3,"file":"bug_report_screen.d.ts","sourceRoot":"","sources":["../../src/screens/bug_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAA;AAUrE,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AA0CvC,eAAO,MAAM,sBAAsB,oBAEhC,sBAAsB,CAAC,GAAG,CAAC,KAAG,4BAI/B,CAAA;AAoBF,wBAAgB,eAAe,sBA0S9B"}
@@ -39,6 +39,12 @@ var QualifiedMobileAppName;
39
39
  QualifiedMobileAppName["churchcenter"] = "Church Center App";
40
40
  QualifiedMobileAppName["services"] = "Services Mobile";
41
41
  })(QualifiedMobileAppName || (QualifiedMobileAppName = {}));
42
+ var DisplayableAppName;
43
+ (function (DisplayableAppName) {
44
+ DisplayableAppName["chat"] = "Chat";
45
+ DisplayableAppName["churchcenter"] = "Church Center";
46
+ DisplayableAppName["services"] = "Services";
47
+ })(DisplayableAppName || (DisplayableAppName = {}));
42
48
  export function BugReportScreen() {
43
49
  const styles = useStyles();
44
50
  const navigation = useNavigation();
@@ -124,8 +130,8 @@ export function BugReportScreen() {
124
130
  <BlankState.Content>
125
131
  <BlankState.Heading style={styles.successTitle}>Thank you!</BlankState.Heading>
126
132
  <BlankState.Text style={styles.successSubtitle}>
127
- We appreciate you taking the time to help improve chat! We'll take a look at the issue
128
- you reported.
133
+ We appreciate you taking the time to help improve {DisplayableAppName[name]}! We'll take
134
+ a look at the issue you reported.
129
135
  </BlankState.Text>
130
136
  </BlankState.Content>
131
137
  <BlankState.Button title="Return to chat" onPress={navigation.goBack} size="lg" variant="fill"/>
@@ -147,8 +153,9 @@ export function BugReportScreen() {
147
153
  return (<KeyboardView>
148
154
  <ScrollView contentContainerStyle={styles.container}>
149
155
  <Text style={styles.description}>
150
- Thanks for helping us improve chat. Please provide details about the issue you've
151
- encountered. We read every submission and your feedback helps us improve the experience.
156
+ Thanks for helping us improve {DisplayableAppName[name]}. We won't be able to respond to
157
+ your submission, but your feedback helps us improve the experience helps us improve the
158
+ experience.
152
159
  </Text>
153
160
 
154
161
  <View style={styles.textInputContainer}>
@@ -234,7 +241,7 @@ export function BugReportScreen() {
234
241
  </KeyboardView>);
235
242
  }
236
243
  const VIDEO_RECORDING_HELP_URL = Platform.select({
237
- android: 'https://support.google.com/android/answer/6241341?hl=en',
244
+ android: 'https://support.google.com/android/answer/9075928?hl=en',
238
245
  default: 'https://support.apple.com/en-us/HT208721',
239
246
  });
240
247
  const generateBugReportDescription = (bugType, whatWereDoing, whatExpected) => {
@@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EAAE,CAAC,EAAE;QAClB,WAAW,EAAE;YACX,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useCallback, useLayoutEffect, useState } from 'react'\nimport {\n View,\n StyleSheet,\n TextInput,\n Linking,\n ScrollView,\n TouchableOpacity,\n Platform,\n} from 'react-native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport { useNavigation } from '@react-navigation/native'\nimport {\n Button,\n Spinner,\n Text,\n TextInlineButton,\n ImageAttachmentPreview,\n Icon,\n KeyboardView,\n} from '../components'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { useTheme } from '../hooks'\nimport { useUploadClient } from '../hooks/use_upload_client'\nimport { ImagePicker, ImagePickerResult, platformFontWeightBold } from '../utils'\nimport { useReportBugAction } from '../hooks/use_report_bug_action'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { DefaultLoading } from '../components/page/loading'\nimport { startsWith } from 'lodash'\nimport { VideoAttachmentPreview } from '../components/display/video_attachment_preview'\nimport { SafeAreaModal } from '../components/safe_area_modal'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useAppName } from '../hooks/use_app_name'\n\nconst MAX_DESCRIPTION_LENGTH = 2000\n\nenum BUG_TYPE_OPTIONS {\n Chat = 'Chat',\n FindMyChurch = 'Find my church',\n LoggingIn = 'Logging in',\n UsingGroups = 'Using groups (events, resources, members)',\n CheckingIn = 'Checking in',\n MakingADonation = 'Making a donation',\n RegisteringForAnEvent = 'Registering for an event',\n MyProfileAndSchedule = 'My profile and schedule',\n Directory = 'Directory',\n Other = 'Other',\n}\n\nexport const BugReportScreenOptions = ({\n navigation,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => ({\n presentation: 'modal',\n title: 'Report a bug',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={() => navigation.goBack()} />,\n})\n\ninterface Attachment {\n id: string\n name: string\n type: string\n}\n\nenum QualifiedMobileAppName {\n chat = 'Chat', // There is no app name for the mobile app\n churchcenter = 'Church Center App',\n services = 'Services Mobile',\n}\n\nexport function BugReportScreen() {\n const styles = useStyles()\n const navigation = useNavigation()\n const name = useAppName()\n const appName = QualifiedMobileAppName[name]\n const [bugType, setBugType] = useState<BUG_TYPE_OPTIONS>(BUG_TYPE_OPTIONS.Chat)\n const [showBugTypePicker, setShowBugTypePicker] = useState(false)\n const [whatWereDoing, setWhatWereDoing] = useState('')\n const [whatExpected, setWhatExpected] = useState('')\n const uploadApi = useUploadClient()\n const [uploading, setUploading] = useState(false)\n const [attachment, setAttachment] = useState<Attachment | null>(null)\n const [uploadError, setUploadError] = useState<string | null>(null)\n const { mutate: createBugReport, status } = useReportBugAction()\n const formValid =\n bugType.trim().length > 0 &&\n whatWereDoing.trim().length > 0 &&\n whatExpected.trim().length > 0 &&\n status === 'idle' &&\n !uploading\n const [imagePreviewURI, setImagePreviewURI] = useState<string>('')\n const isImageAttachment = startsWith(attachment?.type, 'image/')\n\n const handleSubmit = useCallback(() => {\n const description = generateBugReportDescription(bugType, whatWereDoing, whatExpected)\n\n createBugReport({\n description,\n description_json: {\n bugType,\n whatWereDoing,\n whatExpected,\n appName: appName,\n },\n attachmentIds: attachment ? [attachment.id] : [],\n })\n }, [attachment, bugType, whatWereDoing, whatExpected, createBugReport, appName])\n\n const handleRemoveAttachment = useCallback(() => {\n setAttachment(null)\n setImagePreviewURI('')\n }, [])\n\n function uploadImagePickerResult(result: ImagePickerResult) {\n if (result.canceled || result.assets.length === 0) {\n setUploading(false)\n return\n }\n\n const asset = result.assets[0]\n\n uploadApi\n ?.uploadFile({\n uri: asset.uri,\n name: asset.fileName as string,\n type: asset.mimeType as string,\n })\n .then(uploadedResource => {\n setUploading(false)\n setImagePreviewURI(asset.uri)\n setAttachment({\n id: uploadedResource.id,\n name: asset.fileName || 'File',\n type: asset.mimeType as string,\n })\n })\n .catch(() => {\n setUploading(false)\n setUploadError(`Failed to upload attachment`)\n })\n }\n\n function pickImage() {\n setUploading(true)\n return ImagePicker.openImageLibraryAsync().then(result => uploadImagePickerResult(result))\n }\n\n useLayoutEffect(() => {\n navigation.setOptions({\n // eslint-disable-next-line react/no-unstable-nested-components\n headerRight: () => (\n <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!formValid} />\n ),\n })\n }, [formValid, handleSubmit, navigation])\n\n if (status === 'pending') {\n return (\n <View style={[styles.container, styles.fullHeight]}>\n <DefaultLoading />\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Thank you!</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n We appreciate you taking the time to help improve chat! We'll take a look at the issue\n you reported.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button\n title=\"Return to chat\"\n onPress={navigation.goBack}\n size=\"lg\"\n variant=\"fill\"\n />\n </BlankState.Root>\n )\n }\n\n if (status === 'error') {\n return (\n <View style={styles.container}>\n <Text>\n This is embarrassing, we can't submit your bug report right now. If you still need help or\n would like to submit this bug report another way please{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n onPress={() =>\n Linking.openURL('https://support.planningcenteronline.com/hc/en-us/requests/new')\n }\n >\n contact our help center\n </TextInlineButton>\n .\n </Text>\n <Button title=\"Return to chat\" onPress={navigation.goBack} variant=\"fill\" size=\"lg\" />\n </View>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.description}>\n Thanks for helping us improve chat. Please provide details about the issue you've\n encountered. We read every submission and your feedback helps us improve the experience.\n </Text>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n Where did you experience the issue? <Text style={styles.required}>*</Text>\n </Text>\n <TouchableOpacity style={styles.pickerButton} onPress={() => setShowBugTypePicker(true)}>\n <Text style={[styles.pickerText, !bugType && styles.pickerPlaceholder]}>{bugType}</Text>\n <Icon\n name=\"general.downChevron\"\n style={styles.pickerArrow}\n accessibilityElementsHidden\n />\n </TouchableOpacity>\n </View>\n\n <SafeAreaModal\n visible={showBugTypePicker}\n animationType=\"slide\"\n presentationStyle=\"pageSheet\"\n onRequestClose={() => setShowBugTypePicker(false)}\n >\n <View style={styles.modalContainer}>\n <View style={styles.modalHeader}>\n <HeaderDismissButton title=\"Cancel\" onPress={() => setShowBugTypePicker(false)} />\n <Text style={styles.modalTitle}>Select Bug Type</Text>\n <View style={styles.modalHeaderSpacer} />\n </View>\n <ScrollView style={styles.modalContent}>\n {Object.values(BUG_TYPE_OPTIONS).map(option => (\n <TouchableOpacity\n key={option}\n style={styles.modalOption}\n onPress={() => {\n setBugType(option)\n setShowBugTypePicker(false)\n }}\n >\n <Text style={styles.modalOptionText}>{option}</Text>\n {bugType === option && (\n <Icon\n name=\"general.check\"\n style={styles.modalCheckmark}\n accessibilityElementsHidden\n />\n )}\n </TouchableOpacity>\n ))}\n </ScrollView>\n </View>\n </SafeAreaModal>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n What were you trying to do when you encountered the bug?{' '}\n <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Description\"\n value={whatWereDoing}\n onChangeText={setWhatWereDoing}\n maxLength={MAX_DESCRIPTION_LENGTH}\n />\n {whatWereDoing.length >= MAX_DESCRIPTION_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {whatWereDoing.length}/{MAX_DESCRIPTION_LENGTH}\n </Text>\n )}\n </View>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n What did you expect to happen? Please describe what actually happened.{' '}\n <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Description\"\n value={whatExpected}\n onChangeText={setWhatExpected}\n maxLength={MAX_DESCRIPTION_LENGTH}\n />\n {whatExpected.length >= MAX_DESCRIPTION_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {whatExpected.length}/{MAX_DESCRIPTION_LENGTH}\n </Text>\n )}\n </View>\n\n <View style={styles.attachmentSection}>\n <View style={styles.attachmentHeader}>\n <Text style={styles.attachmentLabel}>\n Attachment <Text style={styles.subLabel}>(optional)</Text>\n </Text>\n {uploading && <Spinner />}\n </View>\n {uploadError && <Text style={styles.attachmentErrorText}>{uploadError}</Text>}\n {attachment ? (\n <View style={styles.attachmentPreviewContainer}>\n {isImageAttachment ? (\n <ImageAttachmentPreview\n uri={imagePreviewURI}\n fileName={attachment.name}\n onRemovePress={handleRemoveAttachment}\n />\n ) : (\n <VideoAttachmentPreview\n name={attachment.name}\n onRemovePress={handleRemoveAttachment}\n />\n )}\n </View>\n ) : (\n <Button\n title=\"Attach a screenshot or recording\"\n accessibilityHint=\"Opens your device's image gallery\"\n iconNameLeft=\"general.paperclip\"\n onPress={pickImage}\n size=\"sm\"\n variant=\"outline\"\n style={styles.attachButton}\n disabled={uploading || Boolean(attachment)}\n />\n )}\n <Text variant=\"footnote\">\n Screenshots and screen recordings help us reproduce and fix issues faster.{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n variant=\"footnote\"\n onPress={() => Linking.openURL(VIDEO_RECORDING_HELP_URL)}\n >\n How to record your screen\n </TextInlineButton>\n </Text>\n </View>\n\n <View style={styles.footer}>\n <Text variant=\"footnote\">\n For details on how we process your data and ensure its security, please refer to our{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n variant=\"footnote\"\n onPress={() => Linking.openURL('https://www.planningcenter.com/privacy')}\n >\n Privacy Policy\n </TextInlineButton>\n .\n </Text>\n </View>\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst VIDEO_RECORDING_HELP_URL = Platform.select({\n android: 'https://support.google.com/android/answer/6241341?hl=en',\n default: 'https://support.apple.com/en-us/HT208721',\n})\n\nconst generateBugReportDescription = (\n bugType: BUG_TYPE_OPTIONS,\n whatWereDoing: string,\n whatExpected: string\n) => {\n return `${whatWereDoing.substring(0, 100)}\n\n ## What kind of bug did you experience?\n${bugType}\n\n## What were you trying to do when you encountered the bug?\n${whatWereDoing}\n\n## What did you expect to happen? What actually happened?\n${whatExpected}\n`\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n },\n description: {\n color: colors.textColorDefaultSecondary,\n },\n textInputContainer: {\n gap: 8,\n },\n fieldLabel: {\n fontSize: 16,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n required: {\n color: colors.statusErrorText,\n },\n pickerButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n minHeight: 48,\n },\n pickerText: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n pickerPlaceholder: {\n color: colors.textColorDefaultSecondary,\n },\n pickerArrow: {\n fontSize: 12,\n color: colors.iconColorDefaultSecondary,\n marginLeft: 8,\n },\n modalContainer: {\n flex: 1,\n backgroundColor: colors.surfaceColor100,\n },\n modalHeader: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n modalTitle: {\n fontSize: 18,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n modalHeaderSpacer: {\n width: 50, // Same width as cancel button to center title\n },\n modalContent: {\n flex: 1,\n },\n modalOption: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n modalOptionText: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n modalCheckmark: {\n fontSize: 16,\n color: colors.statusSuccessIcon,\n },\n textInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n textAlignVertical: 'top',\n minHeight: 120,\n maxHeight: 200,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n },\n attachmentSection: {\n gap: 8,\n },\n attachmentHeader: {\n flexDirection: 'row',\n gap: 4,\n alignItems: 'center',\n },\n attachmentLabel: { fontWeight: platformFontWeightBold },\n subLabel: { fontWeight: 'normal', color: colors.textColorDefaultSecondary },\n attachmentPreviewContainer: {\n gap: 4,\n },\n attachmentErrorText: {\n color: colors.statusErrorText,\n },\n attachButton: {\n alignSelf: 'flex-start',\n },\n footer: { gap: 8 },\n successIcon: {\n color: colors.statusSuccessIcon,\n fontSize: 48,\n },\n successTitle: {\n fontSize: 24,\n marginBottom: 4,\n },\n successSubtitle: {\n fontSize: 16,\n marginBottom: 4,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"bug_report_screen.js","sourceRoot":"","sources":["../../src/screens/bug_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,MAAM,cAAc,CAAA;AAKrB,OAAO,EAAE,aAAa,EAAE,MAA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,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useCallback, useLayoutEffect, useState } from 'react'\nimport {\n View,\n StyleSheet,\n TextInput,\n Linking,\n ScrollView,\n TouchableOpacity,\n Platform,\n} from 'react-native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport { useNavigation } from '@react-navigation/native'\nimport {\n Button,\n Spinner,\n Text,\n TextInlineButton,\n ImageAttachmentPreview,\n Icon,\n KeyboardView,\n} from '../components'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { useTheme } from '../hooks'\nimport { useUploadClient } from '../hooks/use_upload_client'\nimport { ImagePicker, ImagePickerResult, platformFontWeightBold } from '../utils'\nimport { useReportBugAction } from '../hooks/use_report_bug_action'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { DefaultLoading } from '../components/page/loading'\nimport { startsWith } from 'lodash'\nimport { VideoAttachmentPreview } from '../components/display/video_attachment_preview'\nimport { SafeAreaModal } from '../components/safe_area_modal'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useAppName } from '../hooks/use_app_name'\n\nconst MAX_DESCRIPTION_LENGTH = 2000\n\nenum BUG_TYPE_OPTIONS {\n Chat = 'Chat',\n FindMyChurch = 'Find my church',\n LoggingIn = 'Logging in',\n UsingGroups = 'Using groups (events, resources, members)',\n CheckingIn = 'Checking in',\n MakingADonation = 'Making a donation',\n RegisteringForAnEvent = 'Registering for an event',\n MyProfileAndSchedule = 'My profile and schedule',\n Directory = 'Directory',\n Other = 'Other',\n}\n\nexport const BugReportScreenOptions = ({\n navigation,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => ({\n presentation: 'modal',\n title: 'Report a bug',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={() => navigation.goBack()} />,\n})\n\ninterface Attachment {\n id: string\n name: string\n type: string\n}\n\nenum QualifiedMobileAppName {\n chat = 'Chat', // There is no app name for the mobile app\n churchcenter = 'Church Center App',\n services = 'Services Mobile',\n}\n\nenum DisplayableAppName {\n chat = 'Chat',\n churchcenter = 'Church Center',\n services = 'Services',\n}\n\nexport function BugReportScreen() {\n const styles = useStyles()\n const navigation = useNavigation()\n const name = useAppName()\n const appName = QualifiedMobileAppName[name]\n const [bugType, setBugType] = useState<BUG_TYPE_OPTIONS>(BUG_TYPE_OPTIONS.Chat)\n const [showBugTypePicker, setShowBugTypePicker] = useState(false)\n const [whatWereDoing, setWhatWereDoing] = useState('')\n const [whatExpected, setWhatExpected] = useState('')\n const uploadApi = useUploadClient()\n const [uploading, setUploading] = useState(false)\n const [attachment, setAttachment] = useState<Attachment | null>(null)\n const [uploadError, setUploadError] = useState<string | null>(null)\n const { mutate: createBugReport, status } = useReportBugAction()\n const formValid =\n bugType.trim().length > 0 &&\n whatWereDoing.trim().length > 0 &&\n whatExpected.trim().length > 0 &&\n status === 'idle' &&\n !uploading\n const [imagePreviewURI, setImagePreviewURI] = useState<string>('')\n const isImageAttachment = startsWith(attachment?.type, 'image/')\n\n const handleSubmit = useCallback(() => {\n const description = generateBugReportDescription(bugType, whatWereDoing, whatExpected)\n\n createBugReport({\n description,\n description_json: {\n bugType,\n whatWereDoing,\n whatExpected,\n appName: appName,\n },\n attachmentIds: attachment ? [attachment.id] : [],\n })\n }, [attachment, bugType, whatWereDoing, whatExpected, createBugReport, appName])\n\n const handleRemoveAttachment = useCallback(() => {\n setAttachment(null)\n setImagePreviewURI('')\n }, [])\n\n function uploadImagePickerResult(result: ImagePickerResult) {\n if (result.canceled || result.assets.length === 0) {\n setUploading(false)\n return\n }\n\n const asset = result.assets[0]\n\n uploadApi\n ?.uploadFile({\n uri: asset.uri,\n name: asset.fileName as string,\n type: asset.mimeType as string,\n })\n .then(uploadedResource => {\n setUploading(false)\n setImagePreviewURI(asset.uri)\n setAttachment({\n id: uploadedResource.id,\n name: asset.fileName || 'File',\n type: asset.mimeType as string,\n })\n })\n .catch(() => {\n setUploading(false)\n setUploadError(`Failed to upload attachment`)\n })\n }\n\n function pickImage() {\n setUploading(true)\n return ImagePicker.openImageLibraryAsync().then(result => uploadImagePickerResult(result))\n }\n\n useLayoutEffect(() => {\n navigation.setOptions({\n // eslint-disable-next-line react/no-unstable-nested-components\n headerRight: () => (\n <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!formValid} />\n ),\n })\n }, [formValid, handleSubmit, navigation])\n\n if (status === 'pending') {\n return (\n <View style={[styles.container, styles.fullHeight]}>\n <DefaultLoading />\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Thank you!</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n We appreciate you taking the time to help improve {DisplayableAppName[name]}! We'll take\n a look at the issue you reported.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button\n title=\"Return to chat\"\n onPress={navigation.goBack}\n size=\"lg\"\n variant=\"fill\"\n />\n </BlankState.Root>\n )\n }\n\n if (status === 'error') {\n return (\n <View style={styles.container}>\n <Text>\n This is embarrassing, we can't submit your bug report right now. If you still need help or\n would like to submit this bug report another way please{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n onPress={() =>\n Linking.openURL('https://support.planningcenteronline.com/hc/en-us/requests/new')\n }\n >\n contact our help center\n </TextInlineButton>\n .\n </Text>\n <Button title=\"Return to chat\" onPress={navigation.goBack} variant=\"fill\" size=\"lg\" />\n </View>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.description}>\n Thanks for helping us improve {DisplayableAppName[name]}. We won't be able to respond to\n your submission, but your feedback helps us improve the experience helps us improve the\n experience.\n </Text>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n Where did you experience the issue? <Text style={styles.required}>*</Text>\n </Text>\n <TouchableOpacity style={styles.pickerButton} onPress={() => setShowBugTypePicker(true)}>\n <Text style={[styles.pickerText, !bugType && styles.pickerPlaceholder]}>{bugType}</Text>\n <Icon\n name=\"general.downChevron\"\n style={styles.pickerArrow}\n accessibilityElementsHidden\n />\n </TouchableOpacity>\n </View>\n\n <SafeAreaModal\n visible={showBugTypePicker}\n animationType=\"slide\"\n presentationStyle=\"pageSheet\"\n onRequestClose={() => setShowBugTypePicker(false)}\n >\n <View style={styles.modalContainer}>\n <View style={styles.modalHeader}>\n <HeaderDismissButton title=\"Cancel\" onPress={() => setShowBugTypePicker(false)} />\n <Text style={styles.modalTitle}>Select Bug Type</Text>\n <View style={styles.modalHeaderSpacer} />\n </View>\n <ScrollView style={styles.modalContent}>\n {Object.values(BUG_TYPE_OPTIONS).map(option => (\n <TouchableOpacity\n key={option}\n style={styles.modalOption}\n onPress={() => {\n setBugType(option)\n setShowBugTypePicker(false)\n }}\n >\n <Text style={styles.modalOptionText}>{option}</Text>\n {bugType === option && (\n <Icon\n name=\"general.check\"\n style={styles.modalCheckmark}\n accessibilityElementsHidden\n />\n )}\n </TouchableOpacity>\n ))}\n </ScrollView>\n </View>\n </SafeAreaModal>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n What were you trying to do when you encountered the bug?{' '}\n <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Description\"\n value={whatWereDoing}\n onChangeText={setWhatWereDoing}\n maxLength={MAX_DESCRIPTION_LENGTH}\n />\n {whatWereDoing.length >= MAX_DESCRIPTION_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {whatWereDoing.length}/{MAX_DESCRIPTION_LENGTH}\n </Text>\n )}\n </View>\n\n <View style={styles.textInputContainer}>\n <Text style={styles.fieldLabel}>\n What did you expect to happen? Please describe what actually happened.{' '}\n <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Description\"\n value={whatExpected}\n onChangeText={setWhatExpected}\n maxLength={MAX_DESCRIPTION_LENGTH}\n />\n {whatExpected.length >= MAX_DESCRIPTION_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {whatExpected.length}/{MAX_DESCRIPTION_LENGTH}\n </Text>\n )}\n </View>\n\n <View style={styles.attachmentSection}>\n <View style={styles.attachmentHeader}>\n <Text style={styles.attachmentLabel}>\n Attachment <Text style={styles.subLabel}>(optional)</Text>\n </Text>\n {uploading && <Spinner />}\n </View>\n {uploadError && <Text style={styles.attachmentErrorText}>{uploadError}</Text>}\n {attachment ? (\n <View style={styles.attachmentPreviewContainer}>\n {isImageAttachment ? (\n <ImageAttachmentPreview\n uri={imagePreviewURI}\n fileName={attachment.name}\n onRemovePress={handleRemoveAttachment}\n />\n ) : (\n <VideoAttachmentPreview\n name={attachment.name}\n onRemovePress={handleRemoveAttachment}\n />\n )}\n </View>\n ) : (\n <Button\n title=\"Attach a screenshot or recording\"\n accessibilityHint=\"Opens your device's image gallery\"\n iconNameLeft=\"general.paperclip\"\n onPress={pickImage}\n size=\"sm\"\n variant=\"outline\"\n style={styles.attachButton}\n disabled={uploading || Boolean(attachment)}\n />\n )}\n <Text variant=\"footnote\">\n Screenshots and screen recordings help us reproduce and fix issues faster.{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n variant=\"footnote\"\n onPress={() => Linking.openURL(VIDEO_RECORDING_HELP_URL)}\n >\n How to record your screen\n </TextInlineButton>\n </Text>\n </View>\n\n <View style={styles.footer}>\n <Text variant=\"footnote\">\n For details on how we process your data and ensure its security, please refer to our{' '}\n <TextInlineButton\n accessibilityRole=\"link\"\n variant=\"footnote\"\n onPress={() => Linking.openURL('https://www.planningcenter.com/privacy')}\n >\n Privacy Policy\n </TextInlineButton>\n .\n </Text>\n </View>\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst VIDEO_RECORDING_HELP_URL = Platform.select({\n android: 'https://support.google.com/android/answer/9075928?hl=en',\n default: 'https://support.apple.com/en-us/HT208721',\n})\n\nconst generateBugReportDescription = (\n bugType: BUG_TYPE_OPTIONS,\n whatWereDoing: string,\n whatExpected: string\n) => {\n return `${whatWereDoing.substring(0, 100)}\n\n ## What kind of bug did you experience?\n${bugType}\n\n## What were you trying to do when you encountered the bug?\n${whatWereDoing}\n\n## What did you expect to happen? What actually happened?\n${whatExpected}\n`\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n },\n description: {\n color: colors.textColorDefaultSecondary,\n },\n textInputContainer: {\n gap: 8,\n },\n fieldLabel: {\n fontSize: 16,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n required: {\n color: colors.statusErrorText,\n },\n pickerButton: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n minHeight: 48,\n },\n pickerText: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n pickerPlaceholder: {\n color: colors.textColorDefaultSecondary,\n },\n pickerArrow: {\n fontSize: 12,\n color: colors.iconColorDefaultSecondary,\n marginLeft: 8,\n },\n modalContainer: {\n flex: 1,\n backgroundColor: colors.surfaceColor100,\n },\n modalHeader: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n modalTitle: {\n fontSize: 18,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n modalHeaderSpacer: {\n width: 50, // Same width as cancel button to center title\n },\n modalContent: {\n flex: 1,\n },\n modalOption: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 16,\n paddingVertical: 16,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n modalOptionText: {\n fontSize: 16,\n color: colors.textColorDefaultPrimary,\n flex: 1,\n },\n modalCheckmark: {\n fontSize: 16,\n color: colors.statusSuccessIcon,\n },\n textInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n textAlignVertical: 'top',\n minHeight: 120,\n maxHeight: 200,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n },\n attachmentSection: {\n gap: 8,\n },\n attachmentHeader: {\n flexDirection: 'row',\n gap: 4,\n alignItems: 'center',\n },\n attachmentLabel: { fontWeight: platformFontWeightBold },\n subLabel: { fontWeight: 'normal', color: colors.textColorDefaultSecondary },\n attachmentPreviewContainer: {\n gap: 4,\n },\n attachmentErrorText: {\n color: colors.statusErrorText,\n },\n attachButton: {\n alignSelf: 'flex-start',\n },\n footer: { gap: 8 },\n successIcon: {\n color: colors.statusSuccessIcon,\n fontSize: 48,\n },\n successTitle: {\n fontSize: 24,\n marginBottom: 4,\n },\n successSubtitle: {\n fontSize: 16,\n marginBottom: 4,\n },\n })\n}\n"]}
@@ -4,5 +4,7 @@ type GetHelpScreenRouteProps = {
4
4
  };
5
5
  type GetHelpScreenProps = StaticScreenProps<GetHelpScreenRouteProps>;
6
6
  export declare const GetHelpScreen: ({ route }: GetHelpScreenProps) => import("react").JSX.Element;
7
+ export declare function sendEmail(email: string): void;
8
+ export declare function placePhoneCall(phoneNumber: string): void;
7
9
  export {};
8
10
  //# sourceMappingURL=get_help_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get_help_screen.d.ts","sourceRoot":"","sources":["../../src/screens/get_help_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAQ3E,KAAK,uBAAuB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAA;AAED,KAAK,kBAAkB,GAAG,iBAAiB,CAAC,uBAAuB,CAAC,CAAA;AAmDpE,eAAO,MAAM,aAAa,cAAe,kBAAkB,gCAyD1D,CAAA"}
1
+ {"version":3,"file":"get_help_screen.d.ts","sourceRoot":"","sources":["../../src/screens/get_help_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAS3E,KAAK,uBAAuB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,CAAA;AAED,KAAK,kBAAkB,GAAG,iBAAiB,CAAC,uBAAuB,CAAC,CAAA;AAmDpE,eAAO,MAAM,aAAa,cAAe,kBAAkB,gCAyD1D,CAAA;AAsBD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,QAWtC;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,QAWjD"}
@@ -1,9 +1,10 @@
1
1
  import { useNavigation } from '@react-navigation/native';
2
2
  import { useCallback, useMemo } from 'react';
3
- import { Linking, StyleSheet, View } from 'react-native';
3
+ import { Alert, Linking, StyleSheet, View } from 'react-native';
4
4
  import { Heading, PressableRow, Text, TextInlineButton } from '../components';
5
5
  import { useApiGet, useTheme } from '../hooks';
6
6
  import { useAppName } from '../hooks/use_app_name';
7
+ import { Clipboard } from '../utils';
7
8
  const useOrganization = () => {
8
9
  const { data: organization } = useApiGet({
9
10
  url: '/',
@@ -71,11 +72,40 @@ export const GetHelpScreen = ({ route }) => {
71
72
  </View>);
72
73
  };
73
74
  const ContactRow = ({ email, phone }) => {
74
- if (!email && !phone)
75
- return null;
76
75
  const contact = email || phone;
77
- return (<PressableRow onPress={() => { }} text={contact || ''} isActive={true} iconPath={email ? 'services.email' : 'general.phone'}/>);
76
+ if (!contact)
77
+ return null;
78
+ return (<PressableRow onPress={() => {
79
+ if (email) {
80
+ sendEmail(contact);
81
+ }
82
+ else {
83
+ placePhoneCall(contact);
84
+ }
85
+ }} text={contact || ''} isActive={true} iconPath={email ? 'services.email' : 'general.phone'}/>);
78
86
  };
87
+ export function sendEmail(email) {
88
+ if (!email)
89
+ return;
90
+ const url = encodeURI(`mailto:${email}`);
91
+ Linking.openURL(url).catch(() => {
92
+ Alert.alert('Oops', `Unable to open: ${email}`, [
93
+ { text: 'Copy to clipboard', onPress: () => Clipboard.setStringAsync(email) },
94
+ { text: 'OK' },
95
+ ]);
96
+ });
97
+ }
98
+ export function placePhoneCall(phoneNumber) {
99
+ if (!phoneNumber)
100
+ return;
101
+ const url = encodeURI(`tel:${phoneNumber}`);
102
+ Linking.openURL(url).catch(() => {
103
+ Alert.alert('Oops', `Unable to open: ${phoneNumber}`, [
104
+ { text: 'Copy to clipboard', onPress: () => Clipboard.setStringAsync(phoneNumber) },
105
+ { text: 'OK' },
106
+ ]);
107
+ });
108
+ }
79
109
  const useStyles = () => {
80
110
  const { colors } = useTheme();
81
111
  return StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"file":"get_help_screen.js","sourceRoot":"","sources":["../../src/screens/get_help_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,UAAU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,EAAE;YACJ,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,EAAE;SACtB;QACD,OAAO,EAAE;YACP,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE;SAClB;QACD,mBAAmB,EAAE;YACnB,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,CAAC;YACd,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;SACjD;QACD,UAAU,EAAE;YACV,UAAU,EAAE,EAAE;YACd,iBAAiB,EAAE,EAAE;SACtB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport { useCallback, useMemo } from 'react'\nimport { Linking, StyleSheet, View } from 'react-native'\nimport { Heading, PressableRow, Text, TextInlineButton } from '../components'\nimport { useApiGet, useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { ResourceObject } from '../types'\n\ntype GetHelpScreenRouteProps = {\n type?: 'chat' | 'general'\n}\n\ntype GetHelpScreenProps = StaticScreenProps<GetHelpScreenRouteProps>\n\ninterface OrganizationResource extends ResourceObject {\n id: number\n name: string\n contactEmail: string\n contactPhoneNumber: string\n churchCenterChatHelpUrl: string\n servicesChatHelpUrl: string\n}\n\nconst useOrganization = () => {\n const { data: organization } = useApiGet<OrganizationResource>({\n url: '/',\n data: {\n fields: {\n Organization: [\n 'contact_phone_number',\n 'contact_email',\n 'name',\n 'church_center_chat_help_url',\n 'services_chat_help_url',\n ],\n },\n },\n })\n\n return organization\n}\n\ninterface HelpUrlResource extends ResourceObject {\n id: number\n link: string\n title: string\n product: 'services' | 'churchcenter'\n type: 'chat' | 'general'\n}\n\nconst useHelpUrls = () => {\n const { data: helpUrls = [] } = useApiGet<HelpUrlResource[]>({\n url: '/help_urls',\n data: {\n fields: {\n HelpUrl: [],\n },\n },\n })\n\n return helpUrls\n}\n\nexport const GetHelpScreen = ({ route }: GetHelpScreenProps) => {\n const { type = 'chat' } = route.params || {}\n const styles = useStyles()\n const appName = useAppName()\n const navigation = useNavigation()\n const organization = useOrganization()\n const contactPresent = organization?.contactEmail || organization?.contactPhoneNumber\n const helpUrls = useHelpUrls()\n const appSpecificHelpUrls = useMemo(\n () =>\n helpUrls\n .filter(helpUrl => helpUrl.product === appName)\n .filter(helpUrl => helpUrl.type.includes(type)),\n [helpUrls, appName, type]\n )\n\n const handleNavigateToBugReport = useCallback(() => {\n navigation.navigate('BugReport')\n }, [navigation])\n\n return (\n <View style={[styles.container]}>\n {appSpecificHelpUrls.length > 0 && (\n <Heading variant=\"h2\" style={[styles.heading, styles.headingBottomBorder]}>\n How-to articles\n </Heading>\n )}\n {appSpecificHelpUrls.map(helpUrl => (\n <PressableRow\n key={helpUrl.id}\n onPress={() => Linking.openURL(helpUrl.link)}\n text={helpUrl.title}\n isActive={true}\n iconPath=\"general.newWindow\"\n />\n ))}\n {contactPresent && (\n <Heading variant=\"h2\" style={[styles.heading, styles.headingBottomBorder]}>\n Contact {organization?.name}\n </Heading>\n )}\n <ContactRow email={organization?.contactEmail} />\n <ContactRow phone={organization?.contactPhoneNumber} />\n <Heading variant=\"h2\" style={[styles.heading]}>\n Report a bug\n </Heading>\n <View style={styles.text}>\n <Text>\n Having an issue?{' '}\n <TextInlineButton onPress={handleNavigateToBugReport}>\n Submit a bug report\n </TextInlineButton>{' '}\n to the development team.\n </Text>\n </View>\n </View>\n )\n}\n\nconst ContactRow = ({ email, phone }: { email?: string; phone?: string }) => {\n if (!email && !phone) return null\n\n const contact = email || phone\n\n return (\n <PressableRow\n onPress={() => {}}\n text={contact || ''}\n isActive={true}\n iconPath={email ? 'services.email' : 'general.phone'}\n />\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n },\n text: {\n paddingVertical: 4,\n paddingHorizontal: 16,\n },\n heading: {\n marginLeft: 16,\n paddingTop: 24,\n paddingBottom: 12,\n },\n headingBottomBorder: {\n marginLeft: 16,\n paddingLeft: 0,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n headingAux: {\n paddingTop: 24,\n paddingHorizontal: 16,\n },\n })\n}\n"]}
1
+ {"version":3,"file":"get_help_screen.js","sourceRoot":"","sources":["../../src/screens/get_help_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC7E,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAiBpC,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,SAAS,CAAuB;QAC7D,GAAG,EAAE,GAAG;QACR,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,YAAY,EAAE;oBACZ,sBAAsB;oBACtB,eAAe;oBACf,MAAM;oBACN,6BAA6B;oBAC7B,wBAAwB;iBACzB;aACF;SACF;KACF,CAAC,CAAA;IAEF,OAAO,YAAY,CAAA;AACrB,CAAC,CAAA;AAUD,MAAM,WAAW,GAAG,GAAG,EAAE;IACvB,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,SAAS,CAAoB;QAC3D,GAAG,EAAE,YAAY;QACjB,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,OAAO,EAAE,EAAE;aACZ;SACF;KACF,CAAC,CAAA;IAEF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AC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;QAC9B,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,mBAAmB,WAAW,EAAE,EAAE;YACpD,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;YACnF,EAAE,IAAI,EAAE,IAAI,EAAE;SACf,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAA;IAE7B,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,SAAS,EAAE;YACT,IAAI,EAAE,CAAC;SACR;QACD,IAAI,EAAE;YACJ,eAAe,EAAE,CAAC;YAClB,iBAAiB,EAAE,EAAE;SACtB;QACD,OAAO,EAAE;YACP,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE;SAClB;QACD,mBAAmB,EAAE;YACnB,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,CAAC;YACd,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,MAAM,CAAC,sBAAsB;SACjD;QACD,UAAU,EAAE;YACV,UAAU,EAAE,EAAE;YACd,iBAAiB,EAAE,EAAE;SACtB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport { useCallback, useMemo } from 'react'\nimport { Alert, Linking, StyleSheet, View } from 'react-native'\nimport { Heading, PressableRow, Text, TextInlineButton } from '../components'\nimport { useApiGet, useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { ResourceObject } from '../types'\nimport { Clipboard } from '../utils'\n\ntype GetHelpScreenRouteProps = {\n type?: 'chat' | 'general'\n}\n\ntype GetHelpScreenProps = StaticScreenProps<GetHelpScreenRouteProps>\n\ninterface OrganizationResource extends ResourceObject {\n id: number\n name: string\n contactEmail: string\n contactPhoneNumber: string\n churchCenterChatHelpUrl: string\n servicesChatHelpUrl: string\n}\n\nconst useOrganization = () => {\n const { data: organization } = useApiGet<OrganizationResource>({\n url: '/',\n data: {\n fields: {\n Organization: [\n 'contact_phone_number',\n 'contact_email',\n 'name',\n 'church_center_chat_help_url',\n 'services_chat_help_url',\n ],\n },\n },\n })\n\n return organization\n}\n\ninterface HelpUrlResource extends ResourceObject {\n id: number\n link: string\n title: string\n product: 'services' | 'churchcenter'\n type: 'chat' | 'general'\n}\n\nconst useHelpUrls = () => {\n const { data: helpUrls = [] } = useApiGet<HelpUrlResource[]>({\n url: '/help_urls',\n data: {\n fields: {\n HelpUrl: [],\n },\n },\n })\n\n return helpUrls\n}\n\nexport const GetHelpScreen = ({ route }: GetHelpScreenProps) => {\n const { type = 'chat' } = route.params || {}\n const styles = useStyles()\n const appName = useAppName()\n const navigation = useNavigation()\n const organization = useOrganization()\n const contactPresent = organization?.contactEmail || organization?.contactPhoneNumber\n const helpUrls = useHelpUrls()\n const appSpecificHelpUrls = useMemo(\n () =>\n helpUrls\n .filter(helpUrl => helpUrl.product === appName)\n .filter(helpUrl => helpUrl.type.includes(type)),\n [helpUrls, appName, type]\n )\n\n const handleNavigateToBugReport = useCallback(() => {\n navigation.navigate('BugReport')\n }, [navigation])\n\n return (\n <View style={[styles.container]}>\n {appSpecificHelpUrls.length > 0 && (\n <Heading variant=\"h2\" style={[styles.heading, styles.headingBottomBorder]}>\n How-to articles\n </Heading>\n )}\n {appSpecificHelpUrls.map(helpUrl => (\n <PressableRow\n key={helpUrl.id}\n onPress={() => Linking.openURL(helpUrl.link)}\n text={helpUrl.title}\n isActive={true}\n iconPath=\"general.newWindow\"\n />\n ))}\n {contactPresent && (\n <Heading variant=\"h2\" style={[styles.heading, styles.headingBottomBorder]}>\n Contact {organization?.name}\n </Heading>\n )}\n <ContactRow email={organization?.contactEmail} />\n <ContactRow phone={organization?.contactPhoneNumber} />\n <Heading variant=\"h2\" style={[styles.heading]}>\n Report a bug\n </Heading>\n <View style={styles.text}>\n <Text>\n Having an issue?{' '}\n <TextInlineButton onPress={handleNavigateToBugReport}>\n Submit a bug report\n </TextInlineButton>{' '}\n to the development team.\n </Text>\n </View>\n </View>\n )\n}\n\nconst ContactRow = ({ email, phone }: { email?: string; phone?: string }) => {\n const contact = email || phone\n if (!contact) return null\n\n return (\n <PressableRow\n onPress={() => {\n if (email) {\n sendEmail(contact)\n } else {\n placePhoneCall(contact)\n }\n }}\n text={contact || ''}\n isActive={true}\n iconPath={email ? 'services.email' : 'general.phone'}\n />\n )\n}\n\nexport function sendEmail(email: string) {\n if (!email) return\n\n const url = encodeURI(`mailto:${email}`)\n\n Linking.openURL(url).catch(() => {\n Alert.alert('Oops', `Unable to open: ${email}`, [\n { text: 'Copy to clipboard', onPress: () => Clipboard.setStringAsync(email) },\n { text: 'OK' },\n ])\n })\n}\n\nexport function placePhoneCall(phoneNumber: string) {\n if (!phoneNumber) return\n\n const url = encodeURI(`tel:${phoneNumber}`)\n\n Linking.openURL(url).catch(() => {\n Alert.alert('Oops', `Unable to open: ${phoneNumber}`, [\n { text: 'Copy to clipboard', onPress: () => Clipboard.setStringAsync(phoneNumber) },\n { text: 'OK' },\n ])\n })\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n flex: 1,\n },\n text: {\n paddingVertical: 4,\n paddingHorizontal: 16,\n },\n heading: {\n marginLeft: 16,\n paddingTop: 24,\n paddingBottom: 12,\n },\n headingBottomBorder: {\n marginLeft: 16,\n paddingLeft: 0,\n borderBottomWidth: 1,\n borderBottomColor: colors.borderColorDefaultBase,\n },\n headingAux: {\n paddingTop: 24,\n paddingHorizontal: 16,\n },\n })\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/chat-react-native",
3
- "version": "3.16.0-rc.1",
3
+ "version": "3.16.0-rc.2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -55,5 +55,5 @@
55
55
  "react-native-url-polyfill": "^2.0.0",
56
56
  "typescript": "<5.6.0"
57
57
  },
58
- "gitHead": "47e50810584fa31ba56562462c46916de42d51ec"
58
+ "gitHead": "7049e04c5d4b3cc2b6d30b5869c66dba504244b1"
59
59
  }
@@ -5,7 +5,7 @@ export type AppName = 'chat' | 'churchcenter' | 'services'
5
5
  export const useAppName = (): AppName => {
6
6
  const applicationName = DeviceInfo.getApplicationName()
7
7
 
8
- if (/churchcenter/i.test(applicationName)) {
8
+ if (/church\s?center/i.test(applicationName)) {
9
9
  return 'churchcenter'
10
10
  }
11
11
 
@@ -238,8 +238,9 @@ export const ChatStack = createNativeStackNavigator({
238
238
  screen: GetHelpScreen,
239
239
  options: ({ navigation }) => ({
240
240
  headerTitle: 'Get help',
241
+ headerBackVisible: false,
241
242
  presentation: 'modal',
242
- headerLeft: props => (
243
+ headerRight: props => (
243
244
  <HeaderTextButton {...props} onPress={navigation.goBack} title="Close" />
244
245
  ),
245
246
  }),
@@ -73,6 +73,12 @@ enum QualifiedMobileAppName {
73
73
  services = 'Services Mobile',
74
74
  }
75
75
 
76
+ enum DisplayableAppName {
77
+ chat = 'Chat',
78
+ churchcenter = 'Church Center',
79
+ services = 'Services',
80
+ }
81
+
76
82
  export function BugReportScreen() {
77
83
  const styles = useStyles()
78
84
  const navigation = useNavigation()
@@ -174,8 +180,8 @@ export function BugReportScreen() {
174
180
  <BlankState.Content>
175
181
  <BlankState.Heading style={styles.successTitle}>Thank you!</BlankState.Heading>
176
182
  <BlankState.Text style={styles.successSubtitle}>
177
- We appreciate you taking the time to help improve chat! We'll take a look at the issue
178
- you reported.
183
+ We appreciate you taking the time to help improve {DisplayableAppName[name]}! We'll take
184
+ a look at the issue you reported.
179
185
  </BlankState.Text>
180
186
  </BlankState.Content>
181
187
  <BlankState.Button
@@ -213,8 +219,9 @@ export function BugReportScreen() {
213
219
  <KeyboardView>
214
220
  <ScrollView contentContainerStyle={styles.container}>
215
221
  <Text style={styles.description}>
216
- Thanks for helping us improve chat. Please provide details about the issue you've
217
- encountered. We read every submission and your feedback helps us improve the experience.
222
+ Thanks for helping us improve {DisplayableAppName[name]}. We won't be able to respond to
223
+ your submission, but your feedback helps us improve the experience helps us improve the
224
+ experience.
218
225
  </Text>
219
226
 
220
227
  <View style={styles.textInputContainer}>
@@ -373,7 +380,7 @@ export function BugReportScreen() {
373
380
  }
374
381
 
375
382
  const VIDEO_RECORDING_HELP_URL = Platform.select({
376
- android: 'https://support.google.com/android/answer/6241341?hl=en',
383
+ android: 'https://support.google.com/android/answer/9075928?hl=en',
377
384
  default: 'https://support.apple.com/en-us/HT208721',
378
385
  })
379
386
 
@@ -1,10 +1,11 @@
1
1
  import { StaticScreenProps, useNavigation } from '@react-navigation/native'
2
2
  import { useCallback, useMemo } from 'react'
3
- import { Linking, StyleSheet, View } from 'react-native'
3
+ import { Alert, Linking, StyleSheet, View } from 'react-native'
4
4
  import { Heading, PressableRow, Text, TextInlineButton } from '../components'
5
5
  import { useApiGet, useTheme } from '../hooks'
6
6
  import { useAppName } from '../hooks/use_app_name'
7
7
  import { ResourceObject } from '../types'
8
+ import { Clipboard } from '../utils'
8
9
 
9
10
  type GetHelpScreenRouteProps = {
10
11
  type?: 'chat' | 'general'
@@ -121,13 +122,18 @@ export const GetHelpScreen = ({ route }: GetHelpScreenProps) => {
121
122
  }
122
123
 
123
124
  const ContactRow = ({ email, phone }: { email?: string; phone?: string }) => {
124
- if (!email && !phone) return null
125
-
126
125
  const contact = email || phone
126
+ if (!contact) return null
127
127
 
128
128
  return (
129
129
  <PressableRow
130
- onPress={() => {}}
130
+ onPress={() => {
131
+ if (email) {
132
+ sendEmail(contact)
133
+ } else {
134
+ placePhoneCall(contact)
135
+ }
136
+ }}
131
137
  text={contact || ''}
132
138
  isActive={true}
133
139
  iconPath={email ? 'services.email' : 'general.phone'}
@@ -135,6 +141,32 @@ const ContactRow = ({ email, phone }: { email?: string; phone?: string }) => {
135
141
  )
136
142
  }
137
143
 
144
+ export function sendEmail(email: string) {
145
+ if (!email) return
146
+
147
+ const url = encodeURI(`mailto:${email}`)
148
+
149
+ Linking.openURL(url).catch(() => {
150
+ Alert.alert('Oops', `Unable to open: ${email}`, [
151
+ { text: 'Copy to clipboard', onPress: () => Clipboard.setStringAsync(email) },
152
+ { text: 'OK' },
153
+ ])
154
+ })
155
+ }
156
+
157
+ export function placePhoneCall(phoneNumber: string) {
158
+ if (!phoneNumber) return
159
+
160
+ const url = encodeURI(`tel:${phoneNumber}`)
161
+
162
+ Linking.openURL(url).catch(() => {
163
+ Alert.alert('Oops', `Unable to open: ${phoneNumber}`, [
164
+ { text: 'Copy to clipboard', onPress: () => Clipboard.setStringAsync(phoneNumber) },
165
+ { text: 'OK' },
166
+ ])
167
+ })
168
+ }
169
+
138
170
  const useStyles = () => {
139
171
  const { colors } = useTheme()
140
172