@planningcenter/chat-react-native 3.42.3-qa-staging.2 → 3.42.3-qa-staging.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/build/components/conversation/messages_disabled_banners.d.ts +2 -3
  2. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  3. package/build/components/conversation/messages_disabled_banners.js +2 -7
  4. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  5. package/build/components/display/adult_requirement_notice.js +1 -1
  6. package/build/components/display/adult_requirement_notice.js.map +1 -1
  7. package/build/components/display/platform_modal_header_buttons.d.ts +47 -7
  8. package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
  9. package/build/components/display/platform_modal_header_buttons.js +119 -9
  10. package/build/components/display/platform_modal_header_buttons.js.map +1 -1
  11. package/build/hooks/use_conversation.d.ts.map +1 -1
  12. package/build/hooks/use_conversation.js +1 -0
  13. package/build/hooks/use_conversation.js.map +1 -1
  14. package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
  15. package/build/hooks/use_conversation_jolt_events.js +10 -2
  16. package/build/hooks/use_conversation_jolt_events.js.map +1 -1
  17. package/build/navigation/index.d.ts +67 -170
  18. package/build/navigation/index.d.ts.map +1 -1
  19. package/build/navigation/index.js +59 -70
  20. package/build/navigation/index.js.map +1 -1
  21. package/build/screens/bug_report_screen.d.ts.map +1 -1
  22. package/build/screens/bug_report_screen.js +10 -13
  23. package/build/screens/bug_report_screen.js.map +1 -1
  24. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  25. package/build/screens/conversation_details_screen.js +11 -12
  26. package/build/screens/conversation_details_screen.js.map +1 -1
  27. package/build/screens/conversation_filters_screen.js +2 -2
  28. package/build/screens/conversation_filters_screen.js.map +1 -1
  29. package/build/screens/conversation_screen.d.ts.map +1 -1
  30. package/build/screens/conversation_screen.js +10 -3
  31. package/build/screens/conversation_screen.js.map +1 -1
  32. package/build/screens/message_report_screen.d.ts.map +1 -1
  33. package/build/screens/message_report_screen.js +14 -18
  34. package/build/screens/message_report_screen.js.map +1 -1
  35. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  36. package/build/screens/notification_settings_screen.js +0 -14
  37. package/build/screens/notification_settings_screen.js.map +1 -1
  38. package/build/types/jolt_events/conversation_events.d.ts +2 -2
  39. package/build/types/jolt_events/conversation_events.d.ts.map +1 -1
  40. package/build/types/jolt_events/conversation_events.js.map +1 -1
  41. package/build/types/resources/conversation.d.ts +2 -2
  42. package/build/types/resources/conversation.d.ts.map +1 -1
  43. package/build/types/resources/conversation.js.map +1 -1
  44. package/build/utils/conversation_safety_constants.d.ts +1 -1
  45. package/build/utils/conversation_safety_constants.d.ts.map +1 -1
  46. package/build/utils/conversation_safety_constants.js +1 -1
  47. package/build/utils/conversation_safety_constants.js.map +1 -1
  48. package/build/utils/request/conversation.d.ts.map +1 -1
  49. package/build/utils/request/conversation.js +1 -0
  50. package/build/utils/request/conversation.js.map +1 -1
  51. package/package.json +3 -3
  52. package/src/components/conversation/messages_disabled_banners.tsx +3 -11
  53. package/src/components/display/adult_requirement_notice.tsx +1 -1
  54. package/src/components/display/platform_modal_header_buttons.tsx +254 -13
  55. package/src/hooks/use_conversation.ts +1 -0
  56. package/src/hooks/use_conversation_jolt_events.ts +16 -3
  57. package/src/navigation/index.tsx +147 -164
  58. package/src/screens/bug_report_screen.tsx +16 -15
  59. package/src/screens/conversation_details_screen.tsx +11 -17
  60. package/src/screens/conversation_filters_screen.tsx +2 -2
  61. package/src/screens/conversation_screen.tsx +11 -3
  62. package/src/screens/message_report_screen.tsx +20 -21
  63. package/src/screens/notification_settings_screen.tsx +1 -21
  64. package/src/types/jolt_events/conversation_events.ts +2 -2
  65. package/src/types/resources/conversation.ts +2 -3
  66. package/src/utils/conversation_safety_constants.ts +1 -1
  67. package/src/utils/request/conversation.ts +1 -0
@@ -1,10 +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 { Platform } from 'react-native';
6
- import { Icon } from '../components';
7
- import { HeaderDoneButton, HeaderTextButton, } from '../components/display/platform_modal_header_buttons';
4
+ import { composeOptions, createMinimalHeaderBackButton, withMinimalBack, withRightClose, withRightDone, } from '../components/display/platform_modal_header_buttons';
8
5
  import { useDirectMessagesEligible, useQualifiedByAge } from '../hooks';
9
6
  import { AttachmentActionsScreen, AttachmentActionsScreenOptions, } from '../screens/attachment_actions/attachment_actions_screen';
10
7
  import { AvatarPickerScreen, AvatarPickerScreenOptions, AvatarPickerCreateScreenOptions, } from '../screens/avatar_picker/avatar_picker_screen';
@@ -35,47 +32,48 @@ import { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_s
35
32
  import { SettingsScreen } from '../screens/settings_screen';
36
33
  import { SystemMessagePeopleScreen, SystemMessagePeopleScreenOptions, } from '../screens/system_message_people_screen';
37
34
  import { TeamConversationScreen } from '../screens/team_conversation_screen';
35
+ import { isLiquidGlassEnabled } from '../utils/liquid_glass';
38
36
  import { ScreenLayoutWithChatAccessGate } from './screenLayout';
39
- const HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {
40
- marginLeft: Platform.select({ ios: -8, default: -3 }),
41
- marginRight: Platform.select({ ios: 0, default: 30 }),
42
- };
37
+ const globalScreenOptions = () => ({
38
+ headerBackButtonDisplayMode: 'minimal',
39
+ ...(isLiquidGlassEnabled() ? { headerShadowVisible: false } : {}),
40
+ });
43
41
  export const NewConversationStack = createNativeStackNavigator({
44
42
  initialRouteName: 'ConversationNewEntry',
45
- screenOptions: {
46
- headerBackButtonDisplayMode: 'minimal',
47
- },
43
+ screenOptions: globalScreenOptions,
48
44
  screenLayout: ScreenLayoutWithChatAccessGate,
49
45
  screens: {
50
46
  ConversationNewEntry: {
51
47
  screen: ConversationNewEntryScreen,
52
- options: ({ navigation }) => ({
48
+ options: ({ navigation }) => composeOptions({
53
49
  title: 'New conversation',
54
- headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Cancel" })),
55
50
  headerBackVisible: false,
56
- }),
51
+ }, withRightClose({ onPress: navigation.goBack })),
57
52
  },
58
53
  ConversationSelectGroupRecipients: {
59
54
  screen: ConversationSelectGroupRecipientsScreen,
60
- options: ({ navigation, route }) => ({
55
+ options: ({ navigation, route }) => composeOptions({
61
56
  title: 'New conversation',
62
- headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: () => navigation.popTo('Conversations', route.params), title: "Cancel" })),
63
- }),
57
+ }, withRightClose({
58
+ onPress: () => navigation.popTo('Conversations', route.params),
59
+ })),
64
60
  },
65
61
  ConversationSelectTeamsILeadRecipients: {
66
62
  screen: ConversationSelectTeamsILeadRecipientsScreen,
67
- options: ({ navigation, route }) => ({
63
+ options: ({ navigation, route }) => composeOptions({
68
64
  title: 'New conversation',
69
- headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: () => navigation.popTo('Conversations', route.params), title: "Cancel" })),
70
- }),
65
+ }, withRightClose({
66
+ onPress: () => navigation.popTo('Conversations', route.params),
67
+ })),
71
68
  },
72
69
  ConversationSelectDirectMessageRecipients: {
73
70
  screen: ConversationSelectDirectMessageRecipientsScreen,
74
71
  if: useDirectMessagesEligible,
75
- options: ({ navigation, route }) => ({
72
+ options: ({ navigation, route }) => composeOptions({
76
73
  title: 'New conversation',
77
- headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: () => navigation.popTo('Conversations', route.params), title: "Cancel" })),
78
- }),
74
+ }, withRightClose({
75
+ onPress: () => navigation.popTo('Conversations', route.params),
76
+ })),
79
77
  },
80
78
  ConversationFilterRecipients: {
81
79
  screen: ConversationFilterRecipientsScreen,
@@ -83,14 +81,15 @@ export const NewConversationStack = createNativeStackNavigator({
83
81
  },
84
82
  ConversationNew: {
85
83
  screen: ConversationNewScreen,
86
- options: ({ navigation, route }) => ({
84
+ options: ({ navigation, route }) => composeOptions({
87
85
  title: 'New conversation',
88
86
  headerLeft: () => null,
89
- headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: () => {
90
- const { chat_group_graph_id, group_source_app_name } = route.params;
91
- navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name });
92
- }, title: "Cancel" })),
93
- }),
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
+ })),
94
93
  },
95
94
  AvatarPicker: {
96
95
  screen: AvatarPickerScreen,
@@ -99,18 +98,15 @@ export const NewConversationStack = createNativeStackNavigator({
99
98
  },
100
99
  });
101
100
  export const ChatStack = createNativeStackNavigator({
102
- screenOptions: {
103
- headerBackButtonDisplayMode: 'minimal',
104
- },
101
+ screenOptions: globalScreenOptions,
105
102
  screenLayout: ScreenLayoutWithChatAccessGate,
106
103
  screens: {
107
104
  Conversations: {
108
105
  screen: ConversationsScreen,
109
- options: ({ route, navigation }) => ({
106
+ options: ({ route, navigation }) => composeOptions({
110
107
  headerTitle: route.params?.title ?? 'Chat',
111
108
  headerBackVisible: false,
112
- headerRight: (props) => (_jsx(HeaderBackButton, { backImage: () => _jsx(Icon, { name: "general.x", size: 18, color: props.tintColor }), onPress: navigation.goBack, ...props })),
113
- }),
109
+ }, withRightClose({ onPress: navigation.goBack })),
114
110
  },
115
111
  ConversationFilters: {
116
112
  screen: ConversationFiltersScreen,
@@ -118,13 +114,13 @@ export const ChatStack = createNativeStackNavigator({
118
114
  },
119
115
  Conversation: {
120
116
  screen: ConversationScreen,
121
- options: ({ route, navigation }) => ({
117
+ options: ({ route, navigation }) => composeOptions({
122
118
  headerTitle: (props) => {
123
119
  const { conversation_id, title, badge, deleted, muted } = route.params;
124
120
  return (_jsx(ConversationScreenTitle, { conversation_id: conversation_id, badge: badge, deleted: deleted, muted: muted, ...props, children: title ?? 'Conversation' }));
125
121
  },
126
- headerRight: (props) => (_jsx(HeaderBackButton, { backImage: () => _jsx(Icon, { name: "general.x", size: 18, color: props.tintColor }), onPress: () => navigation.getParent()?.goBack() })),
127
- headerLeft: props => (_jsx(HeaderBackButton, { style: HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES, displayMode: "minimal", onPress: () => {
122
+ headerLeft: createMinimalHeaderBackButton({
123
+ onPress: () => {
128
124
  const params = route.params;
129
125
  if (params?.chat_group_graph_id) {
130
126
  // Ensure that conversations with a graph id pass them back to the conversation list
@@ -134,15 +130,13 @@ export const ChatStack = createNativeStackNavigator({
134
130
  else {
135
131
  navigation.goBack();
136
132
  }
137
- }, ...props })),
138
- }),
133
+ },
134
+ }),
135
+ }, withRightClose({ onPress: () => navigation.getParent()?.goBack() })),
139
136
  },
140
137
  ConversationReply: {
141
138
  screen: ConversationScreen,
142
- options: ({ route, navigation }) => ({
143
- title: route.params?.title ?? 'Reply',
144
- headerLeft: props => (_jsx(HeaderBackButton, { style: HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES, displayMode: "minimal", onPress: () => navigation.goBack(), ...props })),
145
- }),
139
+ options: ({ route, navigation }) => composeOptions({ title: route.params?.title ?? 'Reply' }, withMinimalBack({ onPress: navigation.goBack })),
146
140
  },
147
141
  TeamConversation: {
148
142
  screen: TeamConversationScreen,
@@ -155,11 +149,10 @@ export const ChatStack = createNativeStackNavigator({
155
149
  },
156
150
  ConversationDetails: {
157
151
  screen: ConversationDetailsScreen,
158
- options: ({ navigation }) => ({
152
+ options: ({ navigation }) => composeOptions({
159
153
  presentation: 'modal',
160
154
  title: 'Conversation details',
161
- headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Done" })),
162
- }),
155
+ }, withRightDone({ onPress: navigation.goBack })),
163
156
  },
164
157
  AvatarPicker: {
165
158
  screen: AvatarPickerScreen,
@@ -167,32 +160,30 @@ export const ChatStack = createNativeStackNavigator({
167
160
  },
168
161
  ChatSettings: {
169
162
  screen: SettingsScreen,
170
- options: ({ navigation }) => ({
171
- title: 'Chat settings',
172
- headerBackVisible: false,
173
- headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Done" })),
174
- }),
163
+ options: ({ navigation }) => composeOptions({ title: 'Chat settings' }, withMinimalBack({ onPress: navigation.goBack })),
175
164
  },
176
165
  NotificationSettings: {
177
166
  screen: NotificationSettingsScreen,
178
- options: ({ navigation }) => ({
179
- title: 'Chat',
180
- headerBackVisible: false,
181
- headerRight: (props) => (_jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Done" })),
182
- }),
167
+ options: ({ navigation }) => navigation.getState().index === 0
168
+ ? composeOptions({ title: 'Chat notifications' }, withRightClose({ onPress: navigation.goBack }))
169
+ : composeOptions({ title: 'Chat notifications' }, withMinimalBack({ onPress: navigation.goBack })),
183
170
  },
184
171
  PreferredAppSelection: {
185
172
  screen: PreferredAppSelectionScreen,
186
- options: {
187
- title: 'Preferred app',
188
- },
173
+ options: ({ navigation }) => composeOptions({ title: 'Preferred app' }, withMinimalBack({ onPress: navigation.goBack })),
189
174
  },
190
175
  GroupNotificationSettings: {
191
176
  screen: GroupNotificationSettingsScreen,
192
- options: ({ route, navigation }) => ({
193
- title: route.params?.title || 'Group Settings',
194
- headerRight: (props) => (_jsx(HeaderDoneButton, { ...props, navigation: navigation })),
195
- }),
177
+ options: ({ route, navigation }) => {
178
+ const title = route.params?.title || 'Group Settings';
179
+ // The dismiss button only shows when this is the entry screen (e.g.
180
+ // deep links); deeper in the stack the back button covers dismissal.
181
+ return navigation.getState().index === 0
182
+ ? composeOptions({
183
+ title,
184
+ }, withRightClose({ onPress: navigation.goBack }))
185
+ : composeOptions({ title }, withMinimalBack({ onPress: navigation.goBack }));
186
+ },
196
187
  },
197
188
  GroupNotificationLevelSelect: {
198
189
  screen: GroupNotificationLevelSelectScreen,
@@ -213,11 +204,10 @@ export const ChatStack = createNativeStackNavigator({
213
204
  GroupConversationNew: {
214
205
  screen: ConversationNewScreen,
215
206
  if: useQualifiedByAge,
216
- options: ({ navigation }) => ({
207
+ options: ({ navigation }) => composeOptions({
217
208
  title: 'New conversation',
218
209
  headerLeft: () => null,
219
- headerRight: props => (_jsx(HeaderTextButton, { ...props, onPress: () => navigation.getParent()?.goBack(), title: "Cancel" })),
220
- }),
210
+ }, withRightClose({ onPress: () => navigation.getParent()?.goBack() })),
221
211
  },
222
212
  SendGiphy: {
223
213
  screen: SendGiphyScreen,
@@ -258,12 +248,11 @@ export const ChatStack = createNativeStackNavigator({
258
248
  },
259
249
  GetHelp: {
260
250
  screen: GetHelpScreen,
261
- options: ({ navigation }) => ({
251
+ options: ({ navigation }) => composeOptions({
262
252
  headerTitle: 'Get help',
263
253
  headerBackVisible: false,
264
254
  presentation: 'modal',
265
- headerRight: props => (_jsx(HeaderTextButton, { ...props, onPress: navigation.goBack, title: "Close" })),
266
- }),
255
+ }, withRightClose({ onPress: navigation.goBack })),
267
256
  },
268
257
  NotFound: {
269
258
  screen: NotFound,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,yDAAyD,CAAA;AAChE,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EAC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;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 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\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n 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: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n 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":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,0BAA0B,GAG3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,OAAO,EACL,cAAc,EACd,6BAA6B,EAC7B,eAAe,EACf,cAAc,EACd,aAAa,GACd,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AACvE,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,yDAAyD,CAAA;AAChE,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,+CAA+C,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,iFAAiF,CAAA;AAExF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAA;AAC3F,OAAO,EACL,yCAAyC,EACzC,gDAAgD,GACjD,MAAM,0DAA0D,CAAA;AACjE,OAAO,EAEL,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAA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U;gBACvB,iBAAiB,EAAE,KAAK;gBACxB,YAAY,EAAE,OAAO;aACtB,EACD,cAAc,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAC/C;SACJ;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 { 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 createMinimalHeaderBackButton,\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 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 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 +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;AAmDvC,eAAO,MAAM,sBAAsB,GAAI,iBAEpC,sBAAsB,CAAC,GAAG,CAAC,KAAG,4BAI/B,CAAA;AAoBF,wBAAgB,eAAe,4CA0S9B"}
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, useLayoutEffect, useState } from 'react';
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, HeaderTextButton, } from '../components/display/platform_modal_header_buttons';
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
- useLayoutEffect(() => {
118
- navigation.setOptions({
119
- // eslint-disable-next-line react/no-unstable-nested-components
120
- headerRight: () => (_jsx(HeaderTextButton, { title: "Submit", onPress: handleSubmit, disabled: !formValid })),
121
- });
122
- }, [formValid, handleSubmit, navigation]);
113
+ useHeaderRight({
114
+ icon: 'general.message',
115
+ accessibilityLabel: 'Submit',
116
+ variant: 'fill',
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, {}) }));
125
122
  }
@@ -1 +1 @@
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,eAAe,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,MAAM,cAAc,CAAA;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,mBAAmB,EACnB,gBAAgB,GACjB,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,UAAU,CAAA;AACnC,OAAO,EAAE,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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,OAA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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.message',\n accessibilityLabel: 'Submit',\n variant: 'fill',\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_details_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAwFzF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,2CAwXlF"}
1
+ {"version":3,"file":"conversation_details_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgB,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAwFzF,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE,8BAA8B,2CAkXlF"}
@@ -5,7 +5,7 @@ import { useCallback, useEffect, useRef, useState, } from 'react';
5
5
  import { Alert, FlatList, Platform, Pressable, StyleSheet, TextInput, View, } from 'react-native';
6
6
  import { AdultRequirementNotice, Badge, Button, ChildNotice, Heading, Icon, Person, Switch, Text, TextButton, } from '../components';
7
7
  import { ConversationAvatar } from '../components/display/conversation_avatar';
8
- import { HeaderTextButton } from '../components/display/platform_modal_header_buttons';
8
+ import { useHeaderRight } from '../components/display/platform_modal_header_buttons';
9
9
  import { useSuspensePaginator, useTheme } from '../hooks';
10
10
  import { useConversation, useConversationDelete, useConversationDisableReplies, useConversationMute, useConversationUpdate, } from '../hooks/use_conversation';
11
11
  import { availableFeatures, useFeatures } from '../hooks/use_features';
@@ -114,18 +114,17 @@ export function ConversationDetailsScreen({ route }) {
114
114
  const HeaderTitle = useCallback((props) => {
115
115
  return (_jsxs(View, { style: styles.headerTitleContainer, children: [_jsx(ElementsHeaderTitle, { maxFontSizeMultiplier: 1, ...props }), _jsx(Badge, { variant: "metaSubtle", label: resourceType, metaLabel: name, style: styles.headerTitleBadge, productLogoName: productName, maxFontSizeMultiplier: 1 })] }));
116
116
  }, [name, productName, resourceType, styles.headerTitleBadge, styles.headerTitleContainer]);
117
- const HeaderRight = useCallback(() => {
118
- return (_jsx(HeaderTextButton, { onPress: () => {
119
- saveTitle({ title: trimmedTitle || conversation.title });
120
- navigation.goBack();
121
- }, title: "Done" }));
122
- }, [conversation.title, navigation, saveTitle, trimmedTitle]);
117
+ useHeaderRight({
118
+ icon: 'general.check',
119
+ accessibilityLabel: 'Done',
120
+ onPress: () => {
121
+ saveTitle({ title: trimmedTitle || conversation.title });
122
+ navigation.goBack();
123
+ },
124
+ });
123
125
  useEffect(() => {
124
- navigation.setOptions({
125
- headerRight: HeaderRight,
126
- headerTitle: HeaderTitle,
127
- });
128
- }, [HeaderRight, HeaderTitle, navigation]);
126
+ navigation.setOptions({ headerTitle: HeaderTitle });
127
+ }, [HeaderTitle, navigation]);
129
128
  const listData = [
130
129
  {
131
130
  type: canUpdate && customAvatarsEnabled ? SectionTypes.view : SectionTypes.hidden,