@planningcenter/chat-react-native 3.43.1-qa-858.0 → 3.43.1-qa-staging.1
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/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +16 -25
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +14 -42
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +27 -107
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/primitive/form_sheet.js +2 -2
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/navigation/index.d.ts +149 -76
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +76 -67
- package/build/navigation/index.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +13 -10
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +12 -11
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +2 -15
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +3 -2
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +2 -6
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +20 -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 +33 -27
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/package.json +3 -4
- package/src/components/conversations/conversations.tsx +1 -17
- package/src/components/display/platform_modal_header_buttons.tsx +45 -196
- package/src/components/primitive/form_sheet.tsx +2 -2
- package/src/navigation/index.tsx +151 -147
- package/src/screens/bug_report_screen.tsx +15 -16
- package/src/screens/conversation_details_screen.tsx +17 -11
- package/src/screens/conversation_filters_screen.tsx +2 -22
- package/src/screens/conversation_new/components/groups_form.tsx +3 -2
- package/src/screens/conversation_screen.tsx +2 -7
- package/src/screens/message_report_screen.tsx +23 -24
- package/src/screens/notification_settings_screen.tsx +21 -16
|
@@ -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
|
-
|
|
12
|
-
|
|
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'
|
|
@@ -30,15 +29,14 @@ export const MessageReportScreenOptions = ({
|
|
|
30
29
|
}: NativeStackScreenProps<any>): NativeStackNavigationOptions => {
|
|
31
30
|
const handleClose = () =>
|
|
32
31
|
navigation.dispatch(
|
|
33
|
-
StackActions.popTo('Conversation', {
|
|
34
|
-
conversation_id: route.params?.conversation_id,
|
|
35
|
-
})
|
|
32
|
+
StackActions.popTo('Conversation', { conversation_id: route.params?.conversation_id }, true)
|
|
36
33
|
)
|
|
37
34
|
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
return {
|
|
36
|
+
presentation: 'modal',
|
|
37
|
+
title: 'Report message',
|
|
38
|
+
headerLeft: () => <HeaderDismissButton title="Cancel" onPress={handleClose} />,
|
|
39
|
+
}
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
export type MessageReportScreenProps = StaticScreenProps<{
|
|
@@ -100,25 +98,26 @@ function MessageReportScreenContent({
|
|
|
100
98
|
}, [isFormValid, selectedReason, reasonDetail, submitReport])
|
|
101
99
|
|
|
102
100
|
const handleClose = useCallback(() => {
|
|
103
|
-
navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))
|
|
101
|
+
navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }, true))
|
|
104
102
|
}, [navigation, conversation_id])
|
|
105
103
|
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
accessibilityLabel: 'Submit',
|
|
111
|
-
prominent: true,
|
|
112
|
-
onPress: handleSubmit,
|
|
113
|
-
disabled: !isFormValid,
|
|
114
|
-
enabled: formVisible,
|
|
115
|
-
})
|
|
104
|
+
const HeaderRight = useCallback(
|
|
105
|
+
() => <HeaderTextButton title="Submit" onPress={handleSubmit} disabled={!isFormValid} />,
|
|
106
|
+
[handleSubmit, isFormValid]
|
|
107
|
+
)
|
|
116
108
|
|
|
117
109
|
useLayoutEffect(() => {
|
|
118
|
-
if (
|
|
119
|
-
navigation.setOptions({
|
|
110
|
+
if (status === 'pending' || status === 'success') {
|
|
111
|
+
navigation.setOptions({
|
|
112
|
+
headerRight: () => null,
|
|
113
|
+
})
|
|
114
|
+
} else {
|
|
115
|
+
navigation.setOptions({
|
|
116
|
+
headerTitle: 'Report message',
|
|
117
|
+
headerRight: HeaderRight,
|
|
118
|
+
})
|
|
120
119
|
}
|
|
121
|
-
}, [
|
|
120
|
+
}, [HeaderRight, navigation, status])
|
|
122
121
|
|
|
123
122
|
if (status === 'pending') {
|
|
124
123
|
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'
|
|
@@ -49,7 +50,25 @@ export function NotificationSettingsScreen({}: NotificationSettingsScreenProps)
|
|
|
49
50
|
const styles = useStyles()
|
|
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])
|
|
53
72
|
|
|
54
73
|
// Build section data
|
|
55
74
|
const listData = [
|
|
@@ -123,20 +142,6 @@ export function NotificationSettingsScreen({}: NotificationSettingsScreenProps)
|
|
|
123
142
|
|
|
124
143
|
return (
|
|
125
144
|
<View style={styles.listContainer}>
|
|
126
|
-
<View
|
|
127
|
-
style={{
|
|
128
|
-
position: 'absolute',
|
|
129
|
-
top: 0,
|
|
130
|
-
right: 0,
|
|
131
|
-
zIndex: 999,
|
|
132
|
-
backgroundColor: 'magenta',
|
|
133
|
-
padding: 8,
|
|
134
|
-
}}
|
|
135
|
-
>
|
|
136
|
-
<Text style={{ color: 'white' }}>
|
|
137
|
-
bottom={debugInsets.bottom} top={debugInsets.top}
|
|
138
|
-
</Text>
|
|
139
|
-
</View>
|
|
140
145
|
<FlatList
|
|
141
146
|
data={listData as SectionListData}
|
|
142
147
|
contentContainerStyle={styles.contentContainer}
|