@planningcenter/chat-react-native 3.42.3-qa-staging.7 → 3.42.3-qa-858.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/messages_disabled_banners.d.ts +3 -2
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +7 -2
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/display/adult_requirement_notice.js +1 -1
- package/build/components/display/adult_requirement_notice.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +45 -7
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +108 -9
- 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/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +0 -1
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +2 -10
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/navigation/index.d.ts +76 -149
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +67 -79
- 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 +10 -13
- 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 +11 -12
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +1 -1
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +15 -2
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +7 -3
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +14 -18
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/notification_settings_screen.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.js +0 -14
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/types/jolt_events/conversation_events.d.ts +2 -2
- package/build/types/jolt_events/conversation_events.d.ts.map +1 -1
- package/build/types/jolt_events/conversation_events.js.map +1 -1
- package/build/types/resources/conversation.d.ts +2 -2
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/utils/conversation_safety_constants.d.ts +1 -1
- package/build/utils/conversation_safety_constants.d.ts.map +1 -1
- package/build/utils/conversation_safety_constants.js +1 -1
- package/build/utils/conversation_safety_constants.js.map +1 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +0 -1
- package/build/utils/request/conversation.js.map +1 -1
- package/package.json +4 -3
- package/src/components/conversation/messages_disabled_banners.tsx +11 -3
- package/src/components/display/adult_requirement_notice.tsx +1 -1
- package/src/components/display/platform_modal_header_buttons.tsx +209 -13
- package/src/components/primitive/form_sheet.tsx +2 -2
- package/src/hooks/use_conversation.ts +0 -1
- package/src/hooks/use_conversation_jolt_events.ts +3 -16
- package/src/navigation/index.tsx +138 -156
- package/src/screens/bug_report_screen.tsx +16 -15
- package/src/screens/conversation_details_screen.tsx +11 -17
- package/src/screens/conversation_filters/components/rows.tsx +2 -2
- package/src/screens/conversation_filters_screen.tsx +22 -2
- package/src/screens/conversation_screen.tsx +8 -3
- package/src/screens/conversation_select_recipients/components/groups_recipient_row.tsx +1 -1
- package/src/screens/conversation_select_recipients/components/restricted_group_row.tsx +2 -2
- package/src/screens/message_report_screen.tsx +20 -21
- package/src/screens/notification_settings_screen.tsx +1 -21
- package/src/types/jolt_events/conversation_events.ts +2 -2
- package/src/types/resources/conversation.ts +3 -2
- package/src/utils/conversation_safety_constants.ts +1 -1
- package/src/utils/request/conversation.ts +0 -1
|
@@ -8,8 +8,9 @@ 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
|
-
|
|
11
|
+
composeOptions,
|
|
12
|
+
useHeaderRight,
|
|
13
|
+
withLeftClose,
|
|
13
14
|
} from '../components/display/platform_modal_header_buttons'
|
|
14
15
|
import BlankState from '../components/primitive/blank_state_primitive'
|
|
15
16
|
import { useTheme } from '../hooks'
|
|
@@ -34,11 +35,10 @@ export const MessageReportScreenOptions = ({
|
|
|
34
35
|
})
|
|
35
36
|
)
|
|
36
37
|
|
|
37
|
-
return
|
|
38
|
-
presentation: 'modal',
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
38
|
+
return composeOptions(
|
|
39
|
+
{ presentation: 'modal', title: 'Report message' },
|
|
40
|
+
withLeftClose({ onPress: handleClose })
|
|
41
|
+
)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export type MessageReportScreenProps = StaticScreenProps<{
|
|
@@ -103,23 +103,22 @@ function MessageReportScreenContent({
|
|
|
103
103
|
navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))
|
|
104
104
|
}, [navigation, conversation_id])
|
|
105
105
|
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
+
})
|
|
110
116
|
|
|
111
117
|
useLayoutEffect(() => {
|
|
112
|
-
if (
|
|
113
|
-
navigation.setOptions({
|
|
114
|
-
headerRight: () => null,
|
|
115
|
-
})
|
|
116
|
-
} else {
|
|
117
|
-
navigation.setOptions({
|
|
118
|
-
headerTitle: 'Report message',
|
|
119
|
-
headerRight: HeaderRight,
|
|
120
|
-
})
|
|
118
|
+
if (formVisible) {
|
|
119
|
+
navigation.setOptions({ headerTitle: 'Report message' })
|
|
121
120
|
}
|
|
122
|
-
}, [
|
|
121
|
+
}, [formVisible, navigation])
|
|
123
122
|
|
|
124
123
|
if (status === 'pending') {
|
|
125
124
|
return (
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { PlatformPressable } from '@react-navigation/elements'
|
|
2
2
|
import { StaticScreenProps, useNavigation } from '@react-navigation/native'
|
|
3
|
-
import
|
|
3
|
+
import { 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'
|
|
8
7
|
import { useTheme } from '../hooks'
|
|
9
8
|
import { isDefined } from '../types'
|
|
10
9
|
import { chatTypeLabel } from '../utils'
|
|
@@ -51,25 +50,6 @@ export function NotificationSettingsScreen({}: NotificationSettingsScreenProps)
|
|
|
51
50
|
const { data: chatTypes } = useChatTypes()
|
|
52
51
|
const { data: groups } = useGroups()
|
|
53
52
|
|
|
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
|
-
|
|
73
53
|
// Build section data
|
|
74
54
|
const listData = [
|
|
75
55
|
{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CustomMessage } from '@planningcenter/jolt-client/dist/types/JoltConnection'
|
|
2
|
+
import type { ConversationDisabledReason } from '../resources/conversation'
|
|
2
3
|
|
|
3
4
|
type DateString = string
|
|
4
5
|
interface BaseConversationEventData extends Record<string, unknown> {
|
|
@@ -15,8 +16,7 @@ interface BaseConversationEventData extends Record<string, unknown> {
|
|
|
15
16
|
latest_read_message_sort_key?: string
|
|
16
17
|
organization_id: number
|
|
17
18
|
disabled: boolean
|
|
18
|
-
disabled_reason
|
|
19
|
-
disabled_message: string | null
|
|
19
|
+
disabled_reason?: ConversationDisabledReason
|
|
20
20
|
replies_disabled: boolean
|
|
21
21
|
subtitle?: string
|
|
22
22
|
title: string
|
|
@@ -5,6 +5,8 @@ import { GroupResource } from './group_resource'
|
|
|
5
5
|
import { MemberAbilityResource } from './member_ability'
|
|
6
6
|
import { ReactionCountResource } from './reaction'
|
|
7
7
|
|
|
8
|
+
export type ConversationDisabledReason = 'safety_check' | 'direct_messages_disabled'
|
|
9
|
+
|
|
8
10
|
export interface ConversationPreviewData {
|
|
9
11
|
kind: 'reaction' | 'message'
|
|
10
12
|
authorName: string
|
|
@@ -24,8 +26,7 @@ export interface ConversationResource {
|
|
|
24
26
|
deleted?: boolean
|
|
25
27
|
directMessage?: boolean
|
|
26
28
|
disabled?: boolean
|
|
27
|
-
disabledReason?:
|
|
28
|
-
disabledMessage?: string | null
|
|
29
|
+
disabledReason?: ConversationDisabledReason
|
|
29
30
|
genderOption?: string | null
|
|
30
31
|
groups?: GroupResource[]
|
|
31
32
|
previewAvatarUrls?: string[]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const ADULT_REQUIREMENT_BODY =
|
|
2
|
-
'Conversations with
|
|
2
|
+
'Conversations with teens require at least 2 adults. This chat is paused until another adult is added.'
|