@planningcenter/chat-react-native 3.43.1-qa-858.1 → 3.44.0-rc.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.
Files changed (67) hide show
  1. package/build/components/display/platform_modal_header_buttons.d.ts +14 -42
  2. package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
  3. package/build/components/display/platform_modal_header_buttons.js +27 -107
  4. package/build/components/display/platform_modal_header_buttons.js.map +1 -1
  5. package/build/components/primitive/form_sheet.d.ts +2 -8
  6. package/build/components/primitive/form_sheet.d.ts.map +1 -1
  7. package/build/components/primitive/form_sheet.js +4 -10
  8. package/build/components/primitive/form_sheet.js.map +1 -1
  9. package/build/navigation/index.d.ts +149 -76
  10. package/build/navigation/index.d.ts.map +1 -1
  11. package/build/navigation/index.js +76 -67
  12. package/build/navigation/index.js.map +1 -1
  13. package/build/screens/attachment_actions/attachment_actions_screen.d.ts +1 -1
  14. package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
  15. package/build/screens/avatar_picker/avatar_picker_screen.d.ts +2 -2
  16. package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
  17. package/build/screens/bug_report_screen.d.ts.map +1 -1
  18. package/build/screens/bug_report_screen.js +13 -10
  19. package/build/screens/bug_report_screen.js.map +1 -1
  20. package/build/screens/conversation/message_read_receipts_screen.d.ts +1 -1
  21. package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -1
  22. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  23. package/build/screens/conversation_details_screen.js +12 -11
  24. package/build/screens/conversation_details_screen.js.map +1 -1
  25. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +1 -1
  26. package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
  27. package/build/screens/conversation_filters_screen.d.ts +1 -1
  28. package/build/screens/conversation_filters_screen.d.ts.map +1 -1
  29. package/build/screens/conversation_filters_screen.js +2 -18
  30. package/build/screens/conversation_filters_screen.js.map +1 -1
  31. package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
  32. package/build/screens/conversation_new/components/groups_form.js +3 -2
  33. package/build/screens/conversation_new/components/groups_form.js.map +1 -1
  34. package/build/screens/conversation_notification_level_select_screen.d.ts +1 -1
  35. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -1
  36. package/build/screens/conversation_screen.d.ts.map +1 -1
  37. package/build/screens/conversation_screen.js +2 -6
  38. package/build/screens/conversation_screen.js.map +1 -1
  39. package/build/screens/conversation_select_type_screen.d.ts +1 -1
  40. package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
  41. package/build/screens/group_notification_level_select_screen.d.ts +1 -1
  42. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -1
  43. package/build/screens/message_actions_screen.d.ts +1 -1
  44. package/build/screens/message_actions_screen.d.ts.map +1 -1
  45. package/build/screens/message_report_screen.d.ts.map +1 -1
  46. package/build/screens/message_report_screen.js +18 -14
  47. package/build/screens/message_report_screen.js.map +1 -1
  48. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  49. package/build/screens/notification_settings_screen.js +14 -0
  50. package/build/screens/notification_settings_screen.js.map +1 -1
  51. package/build/screens/reactions_screen.d.ts +1 -1
  52. package/build/screens/reactions_screen.d.ts.map +1 -1
  53. package/build/screens/send_giphy_screen.d.ts +1 -1
  54. package/build/screens/send_giphy_screen.d.ts.map +1 -1
  55. package/build/screens/system_message_people_screen.d.ts +1 -1
  56. package/build/screens/system_message_people_screen.d.ts.map +1 -1
  57. package/package.json +3 -4
  58. package/src/components/display/platform_modal_header_buttons.tsx +45 -196
  59. package/src/components/primitive/form_sheet.tsx +15 -19
  60. package/src/navigation/index.tsx +151 -147
  61. package/src/screens/bug_report_screen.tsx +15 -16
  62. package/src/screens/conversation_details_screen.tsx +17 -11
  63. package/src/screens/conversation_filters_screen.tsx +2 -25
  64. package/src/screens/conversation_new/components/groups_form.tsx +3 -2
  65. package/src/screens/conversation_screen.tsx +2 -7
  66. package/src/screens/message_report_screen.tsx +21 -20
  67. package/src/screens/notification_settings_screen.tsx +21 -1
@@ -8,9 +8,8 @@ import { View, StyleSheet, TextInput, ScrollView } from 'react-native'
8
8
  import { useSafeAreaInsets } from 'react-native-safe-area-context'
9
9
  import { Spinner, Text, KeyboardView } from '../components'
10
10
  import {
11
- composeOptions,
12
- useHeaderRight,
13
- withLeftClose,
11
+ HeaderDismissButton,
12
+ HeaderTextButton,
14
13
  } from '../components/display/platform_modal_header_buttons'
15
14
  import BlankState from '../components/primitive/blank_state_primitive'
16
15
  import { useTheme } from '../hooks'
@@ -35,10 +34,11 @@ export const MessageReportScreenOptions = ({
35
34
  })
36
35
  )
37
36
 
38
- return composeOptions(
39
- { presentation: 'modal', title: 'Report message' },
40
- withLeftClose({ onPress: handleClose })
41
- )
37
+ return {
38
+ presentation: 'modal',
39
+ title: 'Report message',
40
+ headerLeft: () => <HeaderDismissButton title="Cancel" onPress={handleClose} />,
41
+ }
42
42
  }
43
43
 
44
44
  export type MessageReportScreenProps = StaticScreenProps<{
@@ -103,22 +103,23 @@ function MessageReportScreenContent({
103
103
  navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))
104
104
  }, [navigation, conversation_id])
105
105
 
106
- const formVisible = status !== 'pending' && status !== 'success'
107
-
108
- useHeaderRight({
109
- icon: 'general.upArrow',
110
- accessibilityLabel: 'Submit',
111
- prominent: true,
112
- onPress: handleSubmit,
113
- disabled: !isFormValid,
114
- enabled: formVisible,
115
- })
106
+ const HeaderRight = useCallback(
107
+ () => <HeaderTextButton title="Submit" onPress={handleSubmit} disabled={!isFormValid} />,
108
+ [handleSubmit, isFormValid]
109
+ )
116
110
 
117
111
  useLayoutEffect(() => {
118
- if (formVisible) {
119
- navigation.setOptions({ headerTitle: 'Report message' })
112
+ if (status === 'pending' || status === 'success') {
113
+ navigation.setOptions({
114
+ headerRight: () => null,
115
+ })
116
+ } else {
117
+ navigation.setOptions({
118
+ headerTitle: 'Report message',
119
+ headerRight: HeaderRight,
120
+ })
120
121
  }
121
- }, [formVisible, navigation])
122
+ }, [HeaderRight, navigation, status])
122
123
 
123
124
  if (status === 'pending') {
124
125
  return (
@@ -1,9 +1,10 @@
1
1
  import { PlatformPressable } from '@react-navigation/elements'
2
2
  import { StaticScreenProps, useNavigation } from '@react-navigation/native'
3
- import { type ReactNode } from 'react'
3
+ import React, { useCallback, useEffect, type ReactNode } from 'react'
4
4
  import { FlatList, Platform, StyleSheet, View, type ViewProps, type ViewStyle } from 'react-native'
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context'
6
6
  import { Badge, Heading, Icon, Text } from '../components'
7
+ import { HeaderTextButton } from '../components/display/platform_modal_header_buttons'
7
8
  import { useTheme } from '../hooks'
8
9
  import { isDefined } from '../types'
9
10
  import { chatTypeLabel } from '../utils'
@@ -50,6 +51,25 @@ export function NotificationSettingsScreen({}: NotificationSettingsScreenProps)
50
51
  const { data: chatTypes } = useChatTypes()
51
52
  const { data: groups } = useGroups()
52
53
 
54
+ // Header configuration
55
+ const HeaderRight = useCallback(() => {
56
+ return (
57
+ <HeaderTextButton
58
+ onPress={() => {
59
+ // Save settings logic would go here
60
+ navigation.goBack()
61
+ }}
62
+ title="Done"
63
+ />
64
+ )
65
+ }, [navigation])
66
+
67
+ useEffect(() => {
68
+ navigation.setOptions({
69
+ headerRight: HeaderRight,
70
+ })
71
+ }, [HeaderRight, navigation])
72
+
53
73
  // Build section data
54
74
  const listData = [
55
75
  {