@planningcenter/chat-react-native 3.44.0-rc.0 → 3.44.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/components/display/platform_modal_header_buttons.d.ts +42 -14
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +107 -27
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +8 -2
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +10 -4
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/navigation/index.d.ts +76 -149
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +67 -76
- package/build/navigation/index.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts +2 -2
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +10 -13
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.d.ts +1 -1
- package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +11 -12
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts +1 -1
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +18 -2
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts +1 -1
- package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +6 -2
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +1 -1
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/group_notification_level_select_screen.d.ts +1 -1
- package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.d.ts +1 -1
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +14 -18
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/notification_settings_screen.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.js +0 -14
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/reactions_screen.d.ts +1 -1
- package/build/screens/reactions_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +1 -1
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/system_message_people_screen.d.ts +1 -1
- package/build/screens/system_message_people_screen.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/components/display/platform_modal_header_buttons.tsx +196 -45
- package/src/components/primitive/form_sheet.tsx +19 -15
- package/src/navigation/index.tsx +147 -151
- package/src/screens/bug_report_screen.tsx +16 -15
- package/src/screens/conversation_details_screen.tsx +11 -17
- package/src/screens/conversation_filters_screen.tsx +25 -2
- package/src/screens/conversation_screen.tsx +7 -2
- package/src/screens/message_report_screen.tsx +20 -21
- package/src/screens/notification_settings_screen.tsx +1 -21
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { HeaderBackButton } from '@react-navigation/elements';
|
|
3
2
|
import { createNativeStackNavigator, } from '@react-navigation/native-stack';
|
|
4
3
|
import { CardStyleInterpolators } from '@react-navigation/stack';
|
|
5
|
-
import {
|
|
6
|
-
import { composeHeaderOptions, createMinimalHeaderBackButton, HeaderDoneButton, HeaderTextButton, } from '../components/display/platform_modal_header_buttons';
|
|
4
|
+
import { composeOptions, withMinimalBack, withRightClose, withRightDone, } from '../components/display/platform_modal_header_buttons';
|
|
7
5
|
import { useDirectMessagesEligible, useQualifiedByAge } from '../hooks';
|
|
8
6
|
import { AttachmentActionsScreen, AttachmentActionsScreenOptions, } from '../screens/attachment_actions/attachment_actions_screen';
|
|
9
7
|
import { AvatarPickerScreen, AvatarPickerScreenOptions, AvatarPickerCreateScreenOptions, } from '../screens/avatar_picker/avatar_picker_screen';
|
|
@@ -34,43 +32,48 @@ import { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_s
|
|
|
34
32
|
import { SettingsScreen } from '../screens/settings_screen';
|
|
35
33
|
import { SystemMessagePeopleScreen, SystemMessagePeopleScreenOptions, } from '../screens/system_message_people_screen';
|
|
36
34
|
import { TeamConversationScreen } from '../screens/team_conversation_screen';
|
|
35
|
+
import { isLiquidGlassEnabled } from '../utils/liquid_glass';
|
|
37
36
|
import { ScreenLayoutWithChatAccessGate } from './screenLayout';
|
|
37
|
+
const globalScreenOptions = () => ({
|
|
38
|
+
headerBackButtonDisplayMode: 'minimal',
|
|
39
|
+
...(isLiquidGlassEnabled() ? { headerShadowVisible: false } : {}),
|
|
40
|
+
});
|
|
38
41
|
export const NewConversationStack = createNativeStackNavigator({
|
|
39
42
|
initialRouteName: 'ConversationNewEntry',
|
|
40
|
-
screenOptions:
|
|
41
|
-
headerBackButtonDisplayMode: 'minimal',
|
|
42
|
-
},
|
|
43
|
+
screenOptions: globalScreenOptions,
|
|
43
44
|
screenLayout: ScreenLayoutWithChatAccessGate,
|
|
44
45
|
screens: {
|
|
45
46
|
ConversationNewEntry: {
|
|
46
47
|
screen: ConversationNewEntryScreen,
|
|
47
|
-
options: ({ navigation }) => ({
|
|
48
|
+
options: ({ navigation }) => composeOptions({
|
|
48
49
|
title: 'New conversation',
|
|
49
|
-
headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Cancel" })),
|
|
50
50
|
headerBackVisible: false,
|
|
51
|
-
}),
|
|
51
|
+
}, withRightClose({ onPress: navigation.goBack })),
|
|
52
52
|
},
|
|
53
53
|
ConversationSelectGroupRecipients: {
|
|
54
54
|
screen: ConversationSelectGroupRecipientsScreen,
|
|
55
|
-
options: ({ navigation, route }) => ({
|
|
55
|
+
options: ({ navigation, route }) => composeOptions({
|
|
56
56
|
title: 'New conversation',
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
}, withRightClose({
|
|
58
|
+
onPress: () => navigation.popTo('Conversations', route.params),
|
|
59
|
+
})),
|
|
59
60
|
},
|
|
60
61
|
ConversationSelectTeamsILeadRecipients: {
|
|
61
62
|
screen: ConversationSelectTeamsILeadRecipientsScreen,
|
|
62
|
-
options: ({ navigation, route }) => ({
|
|
63
|
+
options: ({ navigation, route }) => composeOptions({
|
|
63
64
|
title: 'New conversation',
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
}, withRightClose({
|
|
66
|
+
onPress: () => navigation.popTo('Conversations', route.params),
|
|
67
|
+
})),
|
|
66
68
|
},
|
|
67
69
|
ConversationSelectDirectMessageRecipients: {
|
|
68
70
|
screen: ConversationSelectDirectMessageRecipientsScreen,
|
|
69
71
|
if: useDirectMessagesEligible,
|
|
70
|
-
options: ({ navigation, route }) => ({
|
|
72
|
+
options: ({ navigation, route }) => composeOptions({
|
|
71
73
|
title: 'New conversation',
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
}, withRightClose({
|
|
75
|
+
onPress: () => navigation.popTo('Conversations', route.params),
|
|
76
|
+
})),
|
|
74
77
|
},
|
|
75
78
|
ConversationFilterRecipients: {
|
|
76
79
|
screen: ConversationFilterRecipientsScreen,
|
|
@@ -78,14 +81,15 @@ export const NewConversationStack = createNativeStackNavigator({
|
|
|
78
81
|
},
|
|
79
82
|
ConversationNew: {
|
|
80
83
|
screen: ConversationNewScreen,
|
|
81
|
-
options: ({ navigation, route }) => ({
|
|
84
|
+
options: ({ navigation, route }) => composeOptions({
|
|
82
85
|
title: 'New conversation',
|
|
83
86
|
headerLeft: () => null,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
}, withRightClose({
|
|
88
|
+
onPress: () => {
|
|
89
|
+
const { chat_group_graph_id, group_source_app_name } = route.params;
|
|
90
|
+
navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name });
|
|
91
|
+
},
|
|
92
|
+
})),
|
|
89
93
|
},
|
|
90
94
|
AvatarPicker: {
|
|
91
95
|
screen: AvatarPickerScreen,
|
|
@@ -94,18 +98,15 @@ export const NewConversationStack = createNativeStackNavigator({
|
|
|
94
98
|
},
|
|
95
99
|
});
|
|
96
100
|
export const ChatStack = createNativeStackNavigator({
|
|
97
|
-
screenOptions:
|
|
98
|
-
headerBackButtonDisplayMode: 'minimal',
|
|
99
|
-
},
|
|
101
|
+
screenOptions: globalScreenOptions,
|
|
100
102
|
screenLayout: ScreenLayoutWithChatAccessGate,
|
|
101
103
|
screens: {
|
|
102
104
|
Conversations: {
|
|
103
105
|
screen: ConversationsScreen,
|
|
104
|
-
options: ({ route, navigation }) => ({
|
|
106
|
+
options: ({ route, navigation }) => composeOptions({
|
|
105
107
|
headerTitle: route.params?.title ?? 'Chat',
|
|
106
108
|
headerBackVisible: false,
|
|
107
|
-
|
|
108
|
-
}),
|
|
109
|
+
}, withRightClose({ onPress: navigation.goBack })),
|
|
109
110
|
},
|
|
110
111
|
ConversationFilters: {
|
|
111
112
|
screen: ConversationFiltersScreen,
|
|
@@ -113,33 +114,28 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
113
114
|
},
|
|
114
115
|
Conversation: {
|
|
115
116
|
screen: ConversationScreen,
|
|
116
|
-
options: ({ route, navigation }) => ({
|
|
117
|
+
options: ({ route, navigation }) => composeOptions({
|
|
117
118
|
headerTitle: (props) => {
|
|
118
119
|
const { conversation_id, title, badge, deleted, muted } = route.params;
|
|
119
120
|
return (_jsx(ConversationScreenTitle, { conversation_id: conversation_id, badge: badge, deleted: deleted, muted: muted, ...props, children: title ?? 'Conversation' }));
|
|
120
121
|
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}),
|
|
135
|
-
}),
|
|
122
|
+
}, withMinimalBack({
|
|
123
|
+
onPress: () => {
|
|
124
|
+
const params = route.params;
|
|
125
|
+
if (params?.chat_group_graph_id) {
|
|
126
|
+
// Ensure that conversations with a graph id pass them back to the conversation list
|
|
127
|
+
const { chat_group_graph_id } = params;
|
|
128
|
+
navigation.popTo('Conversations', { chat_group_graph_id });
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
navigation.goBack();
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
}), withRightClose({ onPress: () => navigation.getParent()?.goBack() })),
|
|
136
135
|
},
|
|
137
136
|
ConversationReply: {
|
|
138
137
|
screen: ConversationScreen,
|
|
139
|
-
options: ({ route, navigation }) =>
|
|
140
|
-
title: route.params?.title ?? 'Reply',
|
|
141
|
-
onPress: navigation.goBack,
|
|
142
|
-
}),
|
|
138
|
+
options: ({ route, navigation }) => composeOptions({ title: route.params?.title ?? 'Reply' }, withMinimalBack({ onPress: navigation.goBack })),
|
|
143
139
|
},
|
|
144
140
|
TeamConversation: {
|
|
145
141
|
screen: TeamConversationScreen,
|
|
@@ -152,11 +148,10 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
152
148
|
},
|
|
153
149
|
ConversationDetails: {
|
|
154
150
|
screen: ConversationDetailsScreen,
|
|
155
|
-
options: ({ navigation }) => ({
|
|
151
|
+
options: ({ navigation }) => composeOptions({
|
|
156
152
|
presentation: 'modal',
|
|
157
153
|
title: 'Conversation details',
|
|
158
|
-
|
|
159
|
-
}),
|
|
154
|
+
}, withRightDone({ onPress: navigation.goBack })),
|
|
160
155
|
},
|
|
161
156
|
AvatarPicker: {
|
|
162
157
|
screen: AvatarPickerScreen,
|
|
@@ -164,32 +159,30 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
164
159
|
},
|
|
165
160
|
ChatSettings: {
|
|
166
161
|
screen: SettingsScreen,
|
|
167
|
-
options: ({ navigation }) => ({
|
|
168
|
-
title: 'Chat settings',
|
|
169
|
-
headerBackVisible: false,
|
|
170
|
-
headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Done" })),
|
|
171
|
-
}),
|
|
162
|
+
options: ({ navigation }) => composeOptions({ title: 'Chat settings' }, withMinimalBack({ onPress: navigation.goBack })),
|
|
172
163
|
},
|
|
173
164
|
NotificationSettings: {
|
|
174
165
|
screen: NotificationSettingsScreen,
|
|
175
|
-
options: ({ navigation }) => (
|
|
176
|
-
title: 'Chat',
|
|
177
|
-
|
|
178
|
-
headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Done" })),
|
|
179
|
-
}),
|
|
166
|
+
options: ({ navigation }) => navigation.getState().index === 0
|
|
167
|
+
? composeOptions({ title: 'Chat notifications' }, withRightClose({ onPress: navigation.goBack }))
|
|
168
|
+
: composeOptions({ title: 'Chat notifications' }, withMinimalBack({ onPress: navigation.goBack })),
|
|
180
169
|
},
|
|
181
170
|
PreferredAppSelection: {
|
|
182
171
|
screen: PreferredAppSelectionScreen,
|
|
183
|
-
options: {
|
|
184
|
-
title: 'Preferred app',
|
|
185
|
-
},
|
|
172
|
+
options: ({ navigation }) => composeOptions({ title: 'Preferred app' }, withMinimalBack({ onPress: navigation.goBack })),
|
|
186
173
|
},
|
|
187
174
|
GroupNotificationSettings: {
|
|
188
175
|
screen: GroupNotificationSettingsScreen,
|
|
189
|
-
options: ({ route, navigation }) =>
|
|
190
|
-
title
|
|
191
|
-
|
|
192
|
-
|
|
176
|
+
options: ({ route, navigation }) => {
|
|
177
|
+
const title = route.params?.title || 'Group Settings';
|
|
178
|
+
// The dismiss button only shows when this is the entry screen (e.g.
|
|
179
|
+
// deep links); deeper in the stack the back button covers dismissal.
|
|
180
|
+
return navigation.getState().index === 0
|
|
181
|
+
? composeOptions({
|
|
182
|
+
title,
|
|
183
|
+
}, withRightClose({ onPress: navigation.goBack }))
|
|
184
|
+
: composeOptions({ title }, withMinimalBack({ onPress: navigation.goBack }));
|
|
185
|
+
},
|
|
193
186
|
},
|
|
194
187
|
GroupNotificationLevelSelect: {
|
|
195
188
|
screen: GroupNotificationLevelSelectScreen,
|
|
@@ -210,11 +203,10 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
210
203
|
GroupConversationNew: {
|
|
211
204
|
screen: ConversationNewScreen,
|
|
212
205
|
if: useQualifiedByAge,
|
|
213
|
-
options: ({ navigation }) => ({
|
|
206
|
+
options: ({ navigation }) => composeOptions({
|
|
214
207
|
title: 'New conversation',
|
|
215
208
|
headerLeft: () => null,
|
|
216
|
-
|
|
217
|
-
}),
|
|
209
|
+
}, withRightClose({ onPress: () => navigation.getParent()?.goBack() })),
|
|
218
210
|
},
|
|
219
211
|
SendGiphy: {
|
|
220
212
|
screen: SendGiphyScreen,
|
|
@@ -255,12 +247,11 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
255
247
|
},
|
|
256
248
|
GetHelp: {
|
|
257
249
|
screen: GetHelpScreen,
|
|
258
|
-
options: ({ navigation }) => ({
|
|
250
|
+
options: ({ navigation }) => composeOptions({
|
|
259
251
|
headerTitle: 'Get help',
|
|
260
252
|
headerBackVisible: false,
|
|
261
253
|
presentation: 'modal',
|
|
262
|
-
|
|
263
|
-
}),
|
|
254
|
+
}, withRightClose({ onPress: navigation.goBack })),
|
|
264
255
|
},
|
|
265
256
|
NotFound: {
|
|
266
257
|
screen: NotFound,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.t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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,KAAC,gBAAgB,OAAK,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,MAAM,EAAE,KAAK,EAAC,OAAO,GAAG,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 {\n composeHeaderOptions,\n createMinimalHeaderBackButton,\n HeaderDoneButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { useDirectMessagesEligible, useQualifiedByAge } from '../hooks'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport {\n AvatarPickerScreen,\n AvatarPickerScreenOptions,\n AvatarPickerCreateScreenOptions,\n} from '../screens/avatar_picker/avatar_picker_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 ConversationNotificationLevelSelectScreen,\n ConversationNotificationLevelSelectScreenOptions,\n} from '../screens/conversation_notification_level_select_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport { ConversationSelectDirectMessageRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationSelectRecipientsParams } from '../screens/conversation_select_recipients/types/screen_props'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n GroupNotificationLevelSelectScreen,\n GroupNotificationLevelSelectScreenOptions,\n} from '../screens/group_notification_level_select_screen'\nimport { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { NotificationSettingsScreen } from '../screens/notification_settings_screen'\nimport { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { SettingsScreen } from '../screens/settings_screen'\nimport {\n SystemMessagePeopleScreen,\n SystemMessagePeopleScreenOptions,\n} from '../screens/system_message_people_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectDirectMessageRecipients: {\n screen: ConversationSelectDirectMessageRecipientsScreen,\n if: useDirectMessagesEligible,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => {\n const { chat_group_graph_id, group_source_app_name } =\n route.params as ConversationSelectRecipientsParams\n navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name })\n }}\n title=\"Cancel\"\n />\n ),\n }),\n },\n AvatarPicker: {\n screen: AvatarPickerScreen,\n options: AvatarPickerCreateScreenOptions,\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted, muted } =\n route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n muted={muted}\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: createMinimalHeaderBackButton({\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 }),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) =>\n composeHeaderOptions({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n onPress: navigation.goBack,\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n AvatarPicker: {\n screen: AvatarPickerScreen,\n options: AvatarPickerScreenOptions,\n },\n ChatSettings: {\n screen: SettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat settings',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n NotificationSettings: {\n screen: NotificationSettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n PreferredAppSelection: {\n screen: PreferredAppSelectionScreen,\n options: {\n title: 'Preferred app',\n },\n },\n GroupNotificationSettings: {\n screen: GroupNotificationSettingsScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as { title?: string })?.title || 'Group Settings',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderDoneButton {...props} navigation={navigation} />\n ),\n }),\n },\n GroupNotificationLevelSelect: {\n screen: GroupNotificationLevelSelectScreen,\n options: GroupNotificationLevelSelectScreenOptions,\n },\n ConversationNotificationLevelSelect: {\n screen: ConversationNotificationLevelSelectScreen,\n options: ConversationNotificationLevelSelectScreenOptions,\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n GroupConversationNew: {\n screen: ConversationNewScreen,\n if: useQualifiedByAge,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: props => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.getParent()?.goBack()}\n title=\"Cancel\"\n />\n ),\n }),\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n SystemMessagePeople: {\n screen: SystemMessagePeopleScreen,\n options: SystemMessagePeopleScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
1
|
+
{"version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AG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n NativeStackNavigationOptions,\n} from '@react-navigation/native-stack'\nimport { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport {\n composeOptions,\n withMinimalBack,\n withRightClose,\n withRightDone,\n} from '../components/display/platform_modal_header_buttons'\nimport { useDirectMessagesEligible, useQualifiedByAge } from '../hooks'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport {\n AvatarPickerScreen,\n AvatarPickerScreenOptions,\n AvatarPickerCreateScreenOptions,\n} from '../screens/avatar_picker/avatar_picker_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 ConversationNotificationLevelSelectScreen,\n ConversationNotificationLevelSelectScreenOptions,\n} from '../screens/conversation_notification_level_select_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport { ConversationSelectDirectMessageRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationSelectRecipientsParams } from '../screens/conversation_select_recipients/types/screen_props'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n GroupNotificationLevelSelectScreen,\n GroupNotificationLevelSelectScreenOptions,\n} from '../screens/group_notification_level_select_screen'\nimport { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { NotificationSettingsScreen } from '../screens/notification_settings_screen'\nimport { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { SettingsScreen } from '../screens/settings_screen'\nimport {\n SystemMessagePeopleScreen,\n SystemMessagePeopleScreenOptions,\n} from '../screens/system_message_people_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { isLiquidGlassEnabled } from '../utils/liquid_glass'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\n\nconst globalScreenOptions: () => NativeStackNavigationOptions = () => ({\n headerBackButtonDisplayMode: 'minimal',\n ...(isLiquidGlassEnabled() ? { headerShadowVisible: false } : {}),\n})\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: globalScreenOptions,\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) =>\n composeOptions(\n {\n title: 'New conversation',\n headerBackVisible: false,\n },\n withRightClose({ onPress: navigation.goBack })\n ),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) =>\n composeOptions(\n {\n title: 'New conversation',\n },\n withRightClose({\n onPress: () => navigation.popTo('Conversations', route.params),\n })\n ),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) =>\n composeOptions(\n {\n title: 'New conversation',\n },\n withRightClose({\n onPress: () => navigation.popTo('Conversations', route.params),\n })\n ),\n },\n ConversationSelectDirectMessageRecipients: {\n screen: ConversationSelectDirectMessageRecipientsScreen,\n if: useDirectMessagesEligible,\n options: ({ navigation, route }) =>\n composeOptions(\n {\n title: 'New conversation',\n },\n withRightClose({\n onPress: () => navigation.popTo('Conversations', route.params),\n })\n ),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) =>\n composeOptions(\n {\n title: 'New conversation',\n headerLeft: () => null,\n },\n withRightClose({\n onPress: () => {\n const { chat_group_graph_id, group_source_app_name } =\n route.params as ConversationSelectRecipientsParams\n navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name })\n },\n })\n ),\n },\n AvatarPicker: {\n screen: AvatarPickerScreen,\n options: AvatarPickerCreateScreenOptions,\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: globalScreenOptions,\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) =>\n composeOptions(\n {\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\n },\n withRightClose({ onPress: navigation.goBack })\n ),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) =>\n composeOptions(\n {\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted, muted } =\n route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n muted={muted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n },\n withMinimalBack({\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 }),\n withRightClose({ onPress: () => navigation.getParent()?.goBack() })\n ),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) =>\n composeOptions(\n { title: (route.params as ConversationRouteProps)?.title ?? 'Reply' },\n withMinimalBack({ onPress: navigation.goBack })\n ),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) =>\n composeOptions(\n {\n presentation: 'modal',\n title: 'Conversation details',\n },\n withRightDone({ onPress: navigation.goBack })\n ),\n },\n AvatarPicker: {\n screen: AvatarPickerScreen,\n options: AvatarPickerScreenOptions,\n },\n ChatSettings: {\n screen: SettingsScreen,\n options: ({ navigation }) =>\n composeOptions({ title: 'Chat settings' }, withMinimalBack({ onPress: navigation.goBack })),\n },\n NotificationSettings: {\n screen: NotificationSettingsScreen,\n options: ({ navigation }) =>\n navigation.getState().index === 0\n ? composeOptions(\n { title: 'Chat notifications' },\n withRightClose({ onPress: navigation.goBack })\n )\n : composeOptions(\n { title: 'Chat notifications' },\n withMinimalBack({ onPress: navigation.goBack })\n ),\n },\n PreferredAppSelection: {\n screen: PreferredAppSelectionScreen,\n options: ({ navigation }) =>\n composeOptions({ title: 'Preferred app' }, withMinimalBack({ onPress: navigation.goBack })),\n },\n GroupNotificationSettings: {\n screen: GroupNotificationSettingsScreen,\n options: ({ route, navigation }) => {\n const title = (route.params as { title?: string })?.title || 'Group Settings'\n\n // The dismiss button only shows when this is the entry screen (e.g.\n // deep links); deeper in the stack the back button covers dismissal.\n return navigation.getState().index === 0\n ? composeOptions(\n {\n title,\n },\n withRightClose({ onPress: navigation.goBack })\n )\n : composeOptions({ title }, withMinimalBack({ onPress: navigation.goBack }))\n },\n },\n GroupNotificationLevelSelect: {\n screen: GroupNotificationLevelSelectScreen,\n options: GroupNotificationLevelSelectScreenOptions,\n },\n ConversationNotificationLevelSelect: {\n screen: ConversationNotificationLevelSelectScreen,\n options: ConversationNotificationLevelSelectScreenOptions,\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n GroupConversationNew: {\n screen: ConversationNewScreen,\n if: useQualifiedByAge,\n options: ({ navigation }) =>\n composeOptions(\n {\n title: 'New conversation',\n headerLeft: () => null,\n },\n withRightClose({ onPress: () => navigation.getParent()?.goBack() })\n ),\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n SystemMessagePeople: {\n screen: SystemMessagePeopleScreen,\n options: SystemMessagePeopleScreenOptions,\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 composeOptions(\n {\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n },\n withRightClose({ onPress: navigation.goBack })\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,5 +1,5 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
|
-
export declare const AttachmentActionsScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
2
|
+
export declare const AttachmentActionsScreenOptions: () => import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
3
3
|
export type AttachmentActionsScreenProps = StaticScreenProps<{
|
|
4
4
|
attachmentId: string;
|
|
5
5
|
attachmentContentType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment_actions_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/attachment_actions/attachment_actions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAM3E,eAAO,MAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"attachment_actions_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/attachment_actions/attachment_actions_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAM3E,eAAO,MAAM,8BAA8B,6EAEzC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC3D,YAAY,EAAE,MAAM,CAAA;IACpB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,4BAA4B,EAAE,OAAO,CAAA;IACrC,SAAS,EAAE,OAAO,CAAA;CACnB,CAAC,CAAA;AAEF,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,EAAE,4BAA4B,2CAgE9E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
2
2
|
import { type AvatarUpdatePayload } from '../../hooks/use_conversation_avatar_update';
|
|
3
|
-
export declare const AvatarPickerScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
4
|
-
export declare const AvatarPickerCreateScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
3
|
+
export declare const AvatarPickerScreenOptions: () => import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
4
|
+
export declare const AvatarPickerCreateScreenOptions: () => import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
5
5
|
export type AvatarPickerScreenProps = StaticScreenProps<{
|
|
6
6
|
conversation_id?: number;
|
|
7
7
|
source_params?: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar_picker_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/avatar_picker/avatar_picker_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAWzF,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,4CAA4C,CAAA;AAoBnD,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"avatar_picker_screen.d.ts","sourceRoot":"","sources":["../../../src/screens/avatar_picker/avatar_picker_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAWzF,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,4CAA4C,CAAA;AAoBnD,eAAO,MAAM,yBAAyB,6EAIpC,CAAA;AAEF,eAAO,MAAM,+BAA+B,6EAI1C,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACtD,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,gBAAgB,CAAC,EAAE,mBAAmB,CAAA;CACvC,CAAC,CAAA;AAUF,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,uBAAuB,2CAMpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bug_report_screen.d.ts","sourceRoot":"","sources":["../../src/screens/bug_report_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"bug_report_screen.d.ts","sourceRoot":"","sources":["../../src/screens/bug_report_screen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AAqDvC,eAAO,MAAM,sBAAsB,GAAI,iBAEpC,sBAAsB,CAAC,GAAG,CAAC,KAAG,4BAI9B,CAAA;AAoBH,wBAAgB,eAAe,4CAyS9B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useNavigation } from '@react-navigation/native';
|
|
3
3
|
import { startsWith } from 'lodash';
|
|
4
|
-
import { useCallback,
|
|
4
|
+
import { useCallback, useState } from 'react';
|
|
5
5
|
import { View, StyleSheet, TextInput, Linking, ScrollView, TouchableOpacity, Platform, } from 'react-native';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
7
|
import { Button, Spinner, Text, TextInlineButton, ImageAttachmentPreview, Icon, KeyboardView, } from '../components';
|
|
8
|
-
import { HeaderDismissButton,
|
|
8
|
+
import { composeOptions, HeaderDismissButton, useHeaderRight, withLeftClose, } from '../components/display/platform_modal_header_buttons';
|
|
9
9
|
import { VideoAttachmentPreview } from '../components/display/video_attachment_preview';
|
|
10
10
|
import { DefaultLoading } from '../components/page/loading';
|
|
11
11
|
import BlankState from '../components/primitive/blank_state_primitive';
|
|
@@ -29,11 +29,7 @@ var BUG_TYPE_OPTIONS;
|
|
|
29
29
|
BUG_TYPE_OPTIONS["Directory"] = "Directory";
|
|
30
30
|
BUG_TYPE_OPTIONS["Other"] = "Other";
|
|
31
31
|
})(BUG_TYPE_OPTIONS || (BUG_TYPE_OPTIONS = {}));
|
|
32
|
-
export const BugReportScreenOptions = ({ navigation, }) => ({
|
|
33
|
-
presentation: 'modal',
|
|
34
|
-
title: 'Report a bug',
|
|
35
|
-
headerLeft: () => _jsx(HeaderDismissButton, { title: "Cancel", onPress: () => navigation.goBack() }),
|
|
36
|
-
});
|
|
32
|
+
export const BugReportScreenOptions = ({ navigation, }) => composeOptions({ presentation: 'modal', title: 'Report a bug' }, withLeftClose({ onPress: () => navigation.goBack() }));
|
|
37
33
|
var QualifiedMobileAppName;
|
|
38
34
|
(function (QualifiedMobileAppName) {
|
|
39
35
|
QualifiedMobileAppName["chat"] = "Chat";
|
|
@@ -114,12 +110,13 @@ export function BugReportScreen() {
|
|
|
114
110
|
setUploading(true);
|
|
115
111
|
return ImagePicker.openImageLibraryAsync().then(result => uploadImagePickerResult(result));
|
|
116
112
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
113
|
+
useHeaderRight({
|
|
114
|
+
icon: 'general.upArrow',
|
|
115
|
+
accessibilityLabel: 'Submit',
|
|
116
|
+
prominent: true,
|
|
117
|
+
onPress: handleSubmit,
|
|
118
|
+
disabled: !formValid,
|
|
119
|
+
});
|
|
123
120
|
if (status === 'pending') {
|
|
124
121
|
return (_jsx(View, { style: [styles.container, styles.fullHeight], children: _jsx(DefaultLoading, {}) }));
|
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,sBAAsB;YAC1C,YAAY,EAAE,CAAC;YACf,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,iBAAiB,EAAE;YACjB,GAAG,EAAE,CAAC;SACP;QACD,gBAAgB,EAAE;YAChB,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,QAAQ;SACrB;QACD,eAAe,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE;QACvD,QAAQ,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,yBAAyB,EAAE;QAC3E,0BAA0B,EAAE;YAC1B,GAAG,EAAE,CAAC;SACP;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,MAAM,CAAC,eAAe;SAC9B;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,YAAY;SACxB;QACD,MAAM,EAAE,EAAE,GAAG,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 { useNavigation } from '@react-navigation/native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport { startsWith } from 'lodash'\nimport 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 { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport {\n Button,\n Spinner,\n Text,\n TextInlineButton,\n ImageAttachmentPreview,\n Icon,\n KeyboardView,\n} from '../components'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { VideoAttachmentPreview } from '../components/display/video_attachment_preview'\nimport { DefaultLoading } from '../components/page/loading'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { SafeAreaModal } from '../components/safe_area_modal'\nimport { useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { useReportBugAction } from '../hooks/use_report_bug_action'\nimport { useUploadClient } from '../hooks/use_upload_client'\nimport { ImagePicker, ImagePickerResult, platformFontWeightBold } from '../utils'\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/102653',\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,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAKxD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,MAAM,EACN,OAAO,EACP,IAAI,EACJ,gBAAgB,EAChB,sBAAsB,EACtB,IAAI,EACJ,YAAY,GACb,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,aAAa,GACd,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAA;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,UAAU,MAAM,+CAA+C,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,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uB;YACrC,QAAQ,EAAE,EAAE;YACZ,iBAAiB,EAAE,KAAK;YACxB,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;YACd,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,MAAM,CAAC,sBAAsB;YAC1C,YAAY,EAAE,CAAC;YACf,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,iBAAiB,EAAE;YACjB,GAAG,EAAE,CAAC;SACP;QACD,gBAAgB,EAAE;YAChB,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,UAAU,EAAE,QAAQ;SACrB;QACD,eAAe,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE;QACvD,QAAQ,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,yBAAyB,EAAE;QAC3E,0BAA0B,EAAE;YAC1B,GAAG,EAAE,CAAC;SACP;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,MAAM,CAAC,eAAe;SAC9B;QACD,YAAY,EAAE;YACZ,SAAS,EAAE,YAAY;SACxB;QACD,MAAM,EAAE,EAAE,GAAG,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 { useNavigation } from '@react-navigation/native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport { startsWith } from 'lodash'\nimport React, { useCallback, useState } from 'react'\nimport {\n View,\n StyleSheet,\n TextInput,\n Linking,\n ScrollView,\n TouchableOpacity,\n Platform,\n} from 'react-native'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport {\n Button,\n Spinner,\n Text,\n TextInlineButton,\n ImageAttachmentPreview,\n Icon,\n KeyboardView,\n} from '../components'\nimport {\n composeOptions,\n HeaderDismissButton,\n useHeaderRight,\n withLeftClose,\n} from '../components/display/platform_modal_header_buttons'\nimport { VideoAttachmentPreview } from '../components/display/video_attachment_preview'\nimport { DefaultLoading } from '../components/page/loading'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { SafeAreaModal } from '../components/safe_area_modal'\nimport { useTheme } from '../hooks'\nimport { useAppName } from '../hooks/use_app_name'\nimport { useReportBugAction } from '../hooks/use_report_bug_action'\nimport { useUploadClient } from '../hooks/use_upload_client'\nimport { ImagePicker, ImagePickerResult, platformFontWeightBold } from '../utils'\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 composeOptions(\n { presentation: 'modal', title: 'Report a bug' },\n withLeftClose({ 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 useHeaderRight({\n icon: 'general.upArrow',\n accessibilityLabel: 'Submit',\n prominent: true,\n onPress: handleSubmit,\n disabled: !formValid,\n })\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/102653',\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"]}
|