@planningcenter/chat-react-native 3.15.0-rc.9 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/hooks/use_app_name.d.ts +3 -0
- package/build/hooks/use_app_name.d.ts.map +1 -0
- package/build/hooks/use_app_name.js +12 -0
- package/build/hooks/use_app_name.js.map +1 -0
- package/build/hooks/use_report_bug_action.d.ts +1 -1
- package/build/hooks/use_report_bug_action.d.ts.map +1 -1
- package/build/hooks/use_report_bug_action.js +1 -9
- package/build/hooks/use_report_bug_action.js.map +1 -1
- package/build/navigation/index.d.ts +20 -5
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +23 -15
- package/build/navigation/index.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +62 -57
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +6 -6
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/get_help_screen.d.ts +5 -0
- package/build/screens/get_help_screen.d.ts.map +1 -0
- package/build/screens/get_help_screen.js +94 -0
- package/build/screens/get_help_screen.js.map +1 -0
- package/package.json +2 -2
- package/src/hooks/use_app_name.ts +17 -0
- package/src/hooks/use_report_bug_action.ts +2 -10
- package/src/navigation/index.tsx +38 -25
- package/src/screens/bug_report_screen.tsx +79 -67
- package/src/screens/conversations/conversations_screen.tsx +7 -7
- package/src/screens/get_help_screen.tsx +131 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_app_name.d.ts","sourceRoot":"","sources":["../../src/hooks/use_app_name.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,cAAc,GAAG,UAAU,CAAA;AAE1D,eAAO,MAAM,UAAU,QAAO,OAY7B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import DeviceInfo from 'react-native-device-info';
|
|
2
|
+
export const useAppName = () => {
|
|
3
|
+
const applicationName = DeviceInfo.getApplicationName();
|
|
4
|
+
if (/churchcenter/i.test(applicationName)) {
|
|
5
|
+
return 'churchcenter';
|
|
6
|
+
}
|
|
7
|
+
if (/services/i.test(applicationName)) {
|
|
8
|
+
return 'services';
|
|
9
|
+
}
|
|
10
|
+
return 'chat';
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=use_app_name.js.map
|
|
@@ -0,0 +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,6 +1,6 @@
|
|
|
1
1
|
export declare const useReportBugAction: () => import("@tanstack/react-query").UseMutationResult<import("..").ApiCollection | import("..").ApiResource, Error, {
|
|
2
2
|
description: string;
|
|
3
|
-
description_json: string
|
|
3
|
+
description_json: Record<string, any>;
|
|
4
4
|
attachmentIds: string[];
|
|
5
5
|
}, unknown>;
|
|
6
6
|
//# sourceMappingURL=use_report_bug_action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_report_bug_action.d.ts","sourceRoot":"","sources":["../../src/hooks/use_report_bug_action.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use_report_bug_action.d.ts","sourceRoot":"","sources":["../../src/hooks/use_report_bug_action.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;iBASZ,MAAM;sBACD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;mBACtB,MAAM,EAAE;WAiB5B,CAAA"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
2
|
import { useApiClient } from './use_api_client';
|
|
3
|
-
import DeviceInfo from 'react-native-device-info';
|
|
4
|
-
const brand = DeviceInfo.getBrand();
|
|
5
|
-
const model = DeviceInfo.getModel();
|
|
6
|
-
const systemName = DeviceInfo.getSystemName();
|
|
7
|
-
const systemVersion = DeviceInfo.getSystemVersion();
|
|
8
|
-
const readableVersion = DeviceInfo.getReadableVersion();
|
|
9
|
-
const appName = DeviceInfo.getApplicationName();
|
|
10
3
|
export const useReportBugAction = () => {
|
|
11
4
|
const apiClient = useApiClient();
|
|
12
5
|
return useMutation({
|
|
@@ -18,8 +11,7 @@ export const useReportBugAction = () => {
|
|
|
18
11
|
type: '',
|
|
19
12
|
attributes: {
|
|
20
13
|
description,
|
|
21
|
-
description_json,
|
|
22
|
-
device_info: `${appName}/${readableVersion} (${brand}, ${model}, ${systemName}, ${systemVersion})`,
|
|
14
|
+
description_json: JSON.stringify(description_json),
|
|
23
15
|
attachment_ids: attachmentIds,
|
|
24
16
|
},
|
|
25
17
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_report_bug_action.js","sourceRoot":"","sources":["../../src/hooks/use_report_bug_action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"use_report_bug_action.js","sourceRoot":"","sources":["../../src/hooks/use_report_bug_action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAEhC,OAAO,WAAW,CAAC;QACjB,UAAU,EAAE,KAAK,EAAE,EACjB,WAAW,EACX,gBAAgB,EAChB,aAAa,GAKd,EAAE,EAAE;YACH,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;gBACzB,GAAG,EAAE,gBAAgB;gBACrB,IAAI,EAAE;oBACJ,IAAI,EAAE;wBACJ,IAAI,EAAE,EAAE;wBACR,UAAU,EAAE;4BACV,WAAW;4BACX,gBAAgB,EAAE,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC;4BAClD,cAAc,EAAE,aAAa;yBAC9B;qBACF;iBACF;aACF,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { useMutation } from '@tanstack/react-query'\nimport { useApiClient } from './use_api_client'\n\nexport const useReportBugAction = () => {\n const apiClient = useApiClient()\n\n return useMutation({\n mutationFn: async ({\n description,\n description_json,\n attachmentIds,\n }: {\n description: string\n description_json: Record<string, any>\n attachmentIds: string[]\n }) => {\n return apiClient.chat.post({\n url: `/me/report_bug`,\n data: {\n data: {\n type: '',\n attributes: {\n description,\n description_json: JSON.stringify(description_json),\n attachment_ids: attachmentIds,\n },\n },\n },\n })\n },\n })\n}\n"]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { StaticParamList } from '@react-navigation/native';
|
|
2
2
|
import { NativeStackHeaderRightProps } from '@react-navigation/native-stack';
|
|
3
|
+
import { CardStyleInterpolators } from '@react-navigation/stack';
|
|
3
4
|
import React from 'react';
|
|
5
|
+
import { AttachmentActionsScreen } from '../screens/attachment_actions/attachment_actions_screen';
|
|
6
|
+
import { BugReportScreen } from '../screens/bug_report_screen';
|
|
7
|
+
import { MessageReadReceiptsScreen } from '../screens/conversation/message_read_receipts_screen';
|
|
4
8
|
import { ConversationDetailsScreen } from '../screens/conversation_details_screen';
|
|
5
9
|
import { ConversationScreen } from '../screens/conversation_screen';
|
|
6
10
|
import { ConversationsScreen } from '../screens/conversations/conversations_screen';
|
|
7
11
|
import { MessageActionsScreen } from '../screens/message_actions_screen';
|
|
8
|
-
import { SendGiphyScreen } from '../screens/send_giphy_screen';
|
|
9
12
|
import { NotFound } from '../screens/not_found';
|
|
10
13
|
import { ReactionsScreen } from '../screens/reactions_screen';
|
|
14
|
+
import { SendGiphyScreen } from '../screens/send_giphy_screen';
|
|
11
15
|
import { ScreenLayout } from './screenLayout';
|
|
12
|
-
import { AttachmentActionsScreen } from '../screens/attachment_actions/attachment_actions_screen';
|
|
13
|
-
import { BugReportScreen } from '../screens/bug_report_screen';
|
|
14
|
-
import { MessageReadReceiptsScreen } from '../screens/conversation/message_read_receipts_screen';
|
|
15
|
-
import { CardStyleInterpolators } from '@react-navigation/stack';
|
|
16
16
|
export declare const NewConversationStack: import("@react-navigation/native").TypedNavigator<{
|
|
17
17
|
ParamList: import("@react-navigation/native").ParamListBase;
|
|
18
18
|
NavigatorID: undefined;
|
|
@@ -269,6 +269,21 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
|
|
|
269
269
|
readonly screen: typeof BugReportScreen;
|
|
270
270
|
readonly options: ({ navigation, }: import("@react-navigation/native-stack").NativeStackScreenProps<any>) => import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
271
271
|
};
|
|
272
|
+
readonly GetHelp: {
|
|
273
|
+
readonly screen: ({}: {
|
|
274
|
+
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<{}, string, undefined>;
|
|
275
|
+
route: import("@react-navigation/native").RouteProp<{}, string>;
|
|
276
|
+
}) => React.JSX.Element;
|
|
277
|
+
readonly options: ({ navigation }: {
|
|
278
|
+
route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
|
|
279
|
+
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
|
|
280
|
+
theme: ReactNavigation.Theme;
|
|
281
|
+
}) => {
|
|
282
|
+
headerTitle: string;
|
|
283
|
+
presentation: "modal";
|
|
284
|
+
headerLeft: (props: import("@react-navigation/native-stack").NativeStackHeaderLeftProps) => React.JSX.Element;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
272
287
|
readonly NotFound: {
|
|
273
288
|
readonly screen: typeof NotFound;
|
|
274
289
|
readonly options: {
|
|
@@ -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,
|
|
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,C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AAiB,KAAK;;;;;;;;;;;;;;;;;EATniT,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"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { HeaderBackButton } from '@react-navigation/elements';
|
|
2
2
|
import { createNativeStackNavigator, } from '@react-navigation/native-stack';
|
|
3
|
+
import { CardStyleInterpolators } from '@react-navigation/stack';
|
|
3
4
|
import React from 'react';
|
|
5
|
+
import { Platform } from 'react-native';
|
|
4
6
|
import { Icon } from '../components';
|
|
7
|
+
import { HeaderTextButton } from '../components/display/platform_modal_header_buttons';
|
|
8
|
+
import { AttachmentActionsScreen, AttachmentActionsScreenOptions, } from '../screens/attachment_actions/attachment_actions_screen';
|
|
9
|
+
import { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen';
|
|
10
|
+
import { MessageReadReceiptsScreen, MessageReadReceiptsScreenOptions, } from '../screens/conversation/message_read_receipts_screen';
|
|
5
11
|
import { ConversationDetailsScreen } from '../screens/conversation_details_screen';
|
|
6
|
-
import { ConversationScreen, ConversationScreenTitle, } from '../screens/conversation_screen';
|
|
7
|
-
import { ConversationsScreen } from '../screens/conversations/conversations_screen';
|
|
8
|
-
import { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen';
|
|
9
12
|
import { ConversationFilterReceipientsScreenOptions, ConversationFilterRecipientsScreen, } from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen';
|
|
13
|
+
import { ConversationFiltersScreen, ConversationFiltersScreenOptions, } from '../screens/conversation_filters_screen';
|
|
14
|
+
import { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen';
|
|
15
|
+
import { ConversationScreen, ConversationScreenTitle, } from '../screens/conversation_screen';
|
|
16
|
+
import { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen';
|
|
10
17
|
import { ConversationSelectRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_recipients_screen';
|
|
18
|
+
import { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen';
|
|
19
|
+
import { ConversationsScreen } from '../screens/conversations/conversations_screen';
|
|
20
|
+
import { GetHelpScreen } from '../screens/get_help_screen';
|
|
11
21
|
import { MessageActionsScreen, MessageActionsScreenOptions, } from '../screens/message_actions_screen';
|
|
12
|
-
import { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen';
|
|
13
22
|
import { NotFound } from '../screens/not_found';
|
|
14
23
|
import { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen';
|
|
15
|
-
import {
|
|
16
|
-
import { ConversationFiltersScreen, ConversationFiltersScreenOptions, } from '../screens/conversation_filters_screen';
|
|
17
|
-
import { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen';
|
|
18
|
-
import { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen';
|
|
19
|
-
import { AttachmentActionsScreenOptions } from '../screens/attachment_actions/attachment_actions_screen';
|
|
20
|
-
import { AttachmentActionsScreen } from '../screens/attachment_actions/attachment_actions_screen';
|
|
21
|
-
import { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen';
|
|
22
|
-
import { MessageReadReceiptsScreen, MessageReadReceiptsScreenOptions, } from '../screens/conversation/message_read_receipts_screen';
|
|
23
|
-
import { Platform } from 'react-native';
|
|
24
|
-
import { HeaderTextButton } from '../components/display/platform_modal_header_buttons';
|
|
24
|
+
import { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen';
|
|
25
25
|
import { TeamConversationScreen } from '../screens/team_conversation_screen';
|
|
26
|
-
import {
|
|
26
|
+
import { ScreenLayout } from './screenLayout';
|
|
27
27
|
const HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {
|
|
28
28
|
marginLeft: Platform.select({ ios: -8, default: -3 }),
|
|
29
29
|
marginRight: Platform.select({ ios: 0, default: 30 }),
|
|
@@ -160,6 +160,14 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
160
160
|
screen: BugReportScreen,
|
|
161
161
|
options: BugReportScreenOptions,
|
|
162
162
|
},
|
|
163
|
+
GetHelp: {
|
|
164
|
+
screen: GetHelpScreen,
|
|
165
|
+
options: ({ navigation }) => ({
|
|
166
|
+
headerTitle: 'Get help',
|
|
167
|
+
presentation: 'modal',
|
|
168
|
+
headerLeft: props => (<HeaderTextButton {...props} onPress={navigation.goBack} title="Close"/>),
|
|
169
|
+
}),
|
|
170
|
+
},
|
|
163
171
|
NotFound: {
|
|
164
172
|
screen: NotFound,
|
|
165
173
|
options: {
|
|
@@ -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,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EAEL,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAA;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAA;AAC3F,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,iFAAiF,CAAA;AACxF,OAAO,EAAE,kCAAkC,EAAE,MAAM,iFAAiF,CAAA;AACpI,OAAO,EACL,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,mCA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;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,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 React from 'react'\nimport { Icon } from '../components'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationSelectRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_recipients_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { NotFound } from '../screens/not_found'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { ScreenLayout } from './screenLayout'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\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 { AttachmentActionsScreenOptions } from '../screens/attachment_actions/attachment_actions_screen'\nimport { AttachmentActionsScreen } 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 { Platform } from 'react-native'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { CardStyleInterpolators } from '@react-navigation/stack'\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 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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P,WAAW,EAAE,KAAK;gBAClB,YAAY,EAAE,OAAO;aACtB;SACF;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,YAAY,EAAE,OAAO;gBACrB,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,CACnB,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 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 +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;
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useLayoutEffect, useState } from 'react';
|
|
2
|
-
import { View, StyleSheet, TextInput, Linking, ScrollView, TouchableOpacity } from 'react-native';
|
|
2
|
+
import { View, StyleSheet, TextInput, Linking, ScrollView, TouchableOpacity, Platform, } from 'react-native';
|
|
3
3
|
import { useNavigation } from '@react-navigation/native';
|
|
4
4
|
import { Button, Spinner, Text, TextInlineButton, ImageAttachmentPreview, Icon, KeyboardView, } from '../components';
|
|
5
5
|
import BlankState from '../components/primitive/blank_state_primitive';
|
|
@@ -12,69 +12,67 @@ import { DefaultLoading } from '../components/page/loading';
|
|
|
12
12
|
import { startsWith } from 'lodash';
|
|
13
13
|
import { VideoAttachmentPreview } from '../components/display/video_attachment_preview';
|
|
14
14
|
import { SafeAreaModal } from '../components/safe_area_modal';
|
|
15
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
16
|
+
import { useAppName } from '../hooks/use_app_name';
|
|
15
17
|
const MAX_DESCRIPTION_LENGTH = 2000;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
];
|
|
18
|
+
var BUG_TYPE_OPTIONS;
|
|
19
|
+
(function (BUG_TYPE_OPTIONS) {
|
|
20
|
+
BUG_TYPE_OPTIONS["Chat"] = "Chat";
|
|
21
|
+
BUG_TYPE_OPTIONS["FindMyChurch"] = "Find my church";
|
|
22
|
+
BUG_TYPE_OPTIONS["LoggingIn"] = "Logging in";
|
|
23
|
+
BUG_TYPE_OPTIONS["UsingGroups"] = "Using groups (events, resources, members)";
|
|
24
|
+
BUG_TYPE_OPTIONS["CheckingIn"] = "Checking in";
|
|
25
|
+
BUG_TYPE_OPTIONS["MakingADonation"] = "Making a donation";
|
|
26
|
+
BUG_TYPE_OPTIONS["RegisteringForAnEvent"] = "Registering for an event";
|
|
27
|
+
BUG_TYPE_OPTIONS["MyProfileAndSchedule"] = "My profile and schedule";
|
|
28
|
+
BUG_TYPE_OPTIONS["Directory"] = "Directory";
|
|
29
|
+
BUG_TYPE_OPTIONS["Other"] = "Other";
|
|
30
|
+
})(BUG_TYPE_OPTIONS || (BUG_TYPE_OPTIONS = {}));
|
|
26
31
|
export const BugReportScreenOptions = ({ navigation, }) => ({
|
|
27
32
|
presentation: 'modal',
|
|
28
33
|
title: 'Report a bug',
|
|
29
34
|
headerLeft: () => <HeaderDismissButton title="Cancel" onPress={() => navigation.goBack()}/>,
|
|
30
35
|
});
|
|
36
|
+
var QualifiedMobileAppName;
|
|
37
|
+
(function (QualifiedMobileAppName) {
|
|
38
|
+
QualifiedMobileAppName["chat"] = "Chat";
|
|
39
|
+
QualifiedMobileAppName["churchcenter"] = "Church Center App";
|
|
40
|
+
QualifiedMobileAppName["services"] = "Services Mobile";
|
|
41
|
+
})(QualifiedMobileAppName || (QualifiedMobileAppName = {}));
|
|
31
42
|
export function BugReportScreen() {
|
|
32
43
|
const styles = useStyles();
|
|
33
44
|
const navigation = useNavigation();
|
|
34
|
-
const
|
|
45
|
+
const name = useAppName();
|
|
46
|
+
const appName = QualifiedMobileAppName[name];
|
|
47
|
+
const [bugType, setBugType] = useState(BUG_TYPE_OPTIONS.Chat);
|
|
35
48
|
const [showBugTypePicker, setShowBugTypePicker] = useState(false);
|
|
36
49
|
const [whatWereDoing, setWhatWereDoing] = useState('');
|
|
37
50
|
const [whatExpected, setWhatExpected] = useState('');
|
|
38
|
-
const [stepsToResolve, setStepsToResolve] = useState('');
|
|
39
51
|
const uploadApi = useUploadClient();
|
|
40
52
|
const [uploading, setUploading] = useState(false);
|
|
41
53
|
const [attachment, setAttachment] = useState(null);
|
|
42
54
|
const [uploadError, setUploadError] = useState(null);
|
|
43
|
-
const
|
|
44
|
-
const { mutate, status } = mutation;
|
|
55
|
+
const { mutate: createBugReport, status } = useReportBugAction();
|
|
45
56
|
const formValid = bugType.trim().length > 0 &&
|
|
46
57
|
whatWereDoing.trim().length > 0 &&
|
|
47
58
|
whatExpected.trim().length > 0 &&
|
|
48
|
-
stepsToResolve.trim().length > 0 &&
|
|
49
59
|
status === 'idle' &&
|
|
50
60
|
!uploading;
|
|
51
61
|
const [imagePreviewURI, setImagePreviewURI] = useState('');
|
|
52
62
|
const isImageAttachment = startsWith(attachment?.type, 'image/');
|
|
53
63
|
const handleSubmit = useCallback(() => {
|
|
54
|
-
const description =
|
|
55
|
-
|
|
56
|
-
## What kind of bug did you experience?
|
|
57
|
-
${bugType}
|
|
58
|
-
|
|
59
|
-
## What were you trying to do when you encountered the bug?
|
|
60
|
-
${whatWereDoing}
|
|
61
|
-
|
|
62
|
-
## What did you expect to happen? What actually happened?
|
|
63
|
-
${whatExpected}
|
|
64
|
-
|
|
65
|
-
## What steps have you tried to resolve the issue?
|
|
66
|
-
${stepsToResolve}`;
|
|
67
|
-
mutate({
|
|
64
|
+
const description = generateBugReportDescription(bugType, whatWereDoing, whatExpected);
|
|
65
|
+
createBugReport({
|
|
68
66
|
description,
|
|
69
|
-
description_json:
|
|
67
|
+
description_json: {
|
|
70
68
|
bugType,
|
|
71
69
|
whatWereDoing,
|
|
72
70
|
whatExpected,
|
|
73
|
-
|
|
74
|
-
}
|
|
71
|
+
appName: appName,
|
|
72
|
+
},
|
|
75
73
|
attachmentIds: attachment ? [attachment.id] : [],
|
|
76
74
|
});
|
|
77
|
-
}, [attachment, bugType, whatWereDoing, whatExpected,
|
|
75
|
+
}, [attachment, bugType, whatWereDoing, whatExpected, createBugReport, appName]);
|
|
78
76
|
const handleRemoveAttachment = useCallback(() => {
|
|
79
77
|
setAttachment(null);
|
|
80
78
|
setImagePreviewURI('');
|
|
@@ -155,12 +153,10 @@ ${stepsToResolve}`;
|
|
|
155
153
|
|
|
156
154
|
<View style={styles.textInputContainer}>
|
|
157
155
|
<Text style={styles.fieldLabel}>
|
|
158
|
-
|
|
156
|
+
Where did you experience the issue? <Text style={styles.required}>*</Text>
|
|
159
157
|
</Text>
|
|
160
158
|
<TouchableOpacity style={styles.pickerButton} onPress={() => setShowBugTypePicker(true)}>
|
|
161
|
-
<Text style={[styles.pickerText, !bugType && styles.pickerPlaceholder]}>
|
|
162
|
-
{bugType || 'Select the bug type'}
|
|
163
|
-
</Text>
|
|
159
|
+
<Text style={[styles.pickerText, !bugType && styles.pickerPlaceholder]}>{bugType}</Text>
|
|
164
160
|
<Icon name="general.downChevron" style={styles.pickerArrow} accessibilityElementsHidden/>
|
|
165
161
|
</TouchableOpacity>
|
|
166
162
|
</View>
|
|
@@ -173,7 +169,7 @@ ${stepsToResolve}`;
|
|
|
173
169
|
<View style={styles.modalHeaderSpacer}/>
|
|
174
170
|
</View>
|
|
175
171
|
<ScrollView style={styles.modalContent}>
|
|
176
|
-
{BUG_TYPE_OPTIONS.map(option => (<TouchableOpacity key={option} style={styles.modalOption} onPress={() => {
|
|
172
|
+
{Object.values(BUG_TYPE_OPTIONS).map(option => (<TouchableOpacity key={option} style={styles.modalOption} onPress={() => {
|
|
177
173
|
setBugType(option);
|
|
178
174
|
setShowBugTypePicker(false);
|
|
179
175
|
}}>
|
|
@@ -197,7 +193,7 @@ ${stepsToResolve}`;
|
|
|
197
193
|
|
|
198
194
|
<View style={styles.textInputContainer}>
|
|
199
195
|
<Text style={styles.fieldLabel}>
|
|
200
|
-
What did you expect to happen?
|
|
196
|
+
What did you expect to happen? Please describe what actually happened.{' '}
|
|
201
197
|
<Text style={styles.required}>*</Text>
|
|
202
198
|
</Text>
|
|
203
199
|
<TextInput style={styles.textInput} multiline placeholder="Description" value={whatExpected} onChangeText={setWhatExpected} maxLength={MAX_DESCRIPTION_LENGTH}/>
|
|
@@ -206,16 +202,6 @@ ${stepsToResolve}`;
|
|
|
206
202
|
</Text>)}
|
|
207
203
|
</View>
|
|
208
204
|
|
|
209
|
-
<View style={styles.textInputContainer}>
|
|
210
|
-
<Text style={styles.fieldLabel}>
|
|
211
|
-
What steps have you tried to resolve the issue? <Text style={styles.required}>*</Text>
|
|
212
|
-
</Text>
|
|
213
|
-
<TextInput style={styles.textInput} multiline placeholder="Description" value={stepsToResolve} onChangeText={setStepsToResolve} maxLength={MAX_DESCRIPTION_LENGTH}/>
|
|
214
|
-
{stepsToResolve.length >= MAX_DESCRIPTION_LENGTH - 100 && (<Text variant="footnote">
|
|
215
|
-
{stepsToResolve.length}/{MAX_DESCRIPTION_LENGTH}
|
|
216
|
-
</Text>)}
|
|
217
|
-
</View>
|
|
218
|
-
|
|
219
205
|
<View style={styles.attachmentSection}>
|
|
220
206
|
<View style={styles.attachmentHeader}>
|
|
221
207
|
<Text style={styles.attachmentLabel}>
|
|
@@ -226,15 +212,16 @@ ${stepsToResolve}`;
|
|
|
226
212
|
{uploadError && <Text style={styles.attachmentErrorText}>{uploadError}</Text>}
|
|
227
213
|
{attachment ? (<View style={styles.attachmentPreviewContainer}>
|
|
228
214
|
{isImageAttachment ? (<ImageAttachmentPreview uri={imagePreviewURI} fileName={attachment.name} onRemovePress={handleRemoveAttachment}/>) : (<VideoAttachmentPreview name={attachment.name} onRemovePress={handleRemoveAttachment}/>)}
|
|
229
|
-
</View>) : (<Button title="Attach a screenshot" accessibilityHint="Opens your device's image gallery" iconNameLeft="general.paperclip" onPress={pickImage} size="sm" variant="outline" style={styles.attachButton} disabled={uploading || Boolean(attachment)}/>)}
|
|
230
|
-
</View>
|
|
231
|
-
|
|
232
|
-
<View style={styles.footer}>
|
|
215
|
+
</View>) : (<Button title="Attach a screenshot or recording" accessibilityHint="Opens your device's image gallery" iconNameLeft="general.paperclip" onPress={pickImage} size="sm" variant="outline" style={styles.attachButton} disabled={uploading || Boolean(attachment)}/>)}
|
|
233
216
|
<Text variant="footnote">
|
|
234
|
-
|
|
235
|
-
|
|
217
|
+
Screenshots and screen recordings help us reproduce and fix issues faster.{' '}
|
|
218
|
+
<TextInlineButton accessibilityRole="link" variant="footnote" onPress={() => Linking.openURL(VIDEO_RECORDING_HELP_URL)}>
|
|
219
|
+
How to record your screen
|
|
220
|
+
</TextInlineButton>
|
|
236
221
|
</Text>
|
|
222
|
+
</View>
|
|
237
223
|
|
|
224
|
+
<View style={styles.footer}>
|
|
238
225
|
<Text variant="footnote">
|
|
239
226
|
For details on how we process your data and ensure its security, please refer to our{' '}
|
|
240
227
|
<TextInlineButton accessibilityRole="link" variant="footnote" onPress={() => Linking.openURL('https://www.planningcenter.com/privacy')}>
|
|
@@ -246,12 +233,30 @@ ${stepsToResolve}`;
|
|
|
246
233
|
</ScrollView>
|
|
247
234
|
</KeyboardView>);
|
|
248
235
|
}
|
|
236
|
+
const VIDEO_RECORDING_HELP_URL = Platform.select({
|
|
237
|
+
android: 'https://support.google.com/android/answer/6241341?hl=en',
|
|
238
|
+
default: 'https://support.apple.com/en-us/HT208721',
|
|
239
|
+
});
|
|
240
|
+
const generateBugReportDescription = (bugType, whatWereDoing, whatExpected) => {
|
|
241
|
+
return `${whatWereDoing.substring(0, 100)}
|
|
242
|
+
|
|
243
|
+
## What kind of bug did you experience?
|
|
244
|
+
${bugType}
|
|
245
|
+
|
|
246
|
+
## What were you trying to do when you encountered the bug?
|
|
247
|
+
${whatWereDoing}
|
|
248
|
+
|
|
249
|
+
## What did you expect to happen? What actually happened?
|
|
250
|
+
${whatExpected}
|
|
251
|
+
`;
|
|
252
|
+
};
|
|
249
253
|
const useStyles = () => {
|
|
254
|
+
const { bottom } = useSafeAreaInsets();
|
|
250
255
|
const { colors } = useTheme();
|
|
251
256
|
return StyleSheet.create({
|
|
252
257
|
container: {
|
|
253
258
|
padding: 16,
|
|
254
|
-
paddingBottom: 16,
|
|
259
|
+
paddingBottom: 16 + bottom,
|
|
255
260
|
gap: 24,
|
|
256
261
|
},
|
|
257
262
|
fullHeight: {
|