@planningcenter/chat-react-native 3.42.3-qa-staging.7 → 3.43.0-rc.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/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 +11 -1
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +20 -1
- package/build/components/display/platform_modal_header_buttons.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 +1 -1
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +7 -10
- package/build/navigation/index.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_screen.js +1 -1
- 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/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 +3 -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 +47 -2
- package/src/hooks/use_conversation.ts +0 -1
- package/src/hooks/use_conversation_jolt_events.ts +3 -16
- package/src/navigation/index.tsx +19 -33
- package/src/screens/conversation_filters/components/rows.tsx +2 -2
- package/src/screens/conversation_screen.tsx +1 -1
- 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/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
package/src/navigation/index.tsx
CHANGED
|
@@ -9,6 +9,8 @@ import React from 'react'
|
|
|
9
9
|
import { Platform } from 'react-native'
|
|
10
10
|
import { Icon } from '../components'
|
|
11
11
|
import {
|
|
12
|
+
composeHeaderOptions,
|
|
13
|
+
createMinimalHeaderBackButton,
|
|
12
14
|
HeaderDoneButton,
|
|
13
15
|
HeaderTextButton,
|
|
14
16
|
} from '../components/display/platform_modal_header_buttons'
|
|
@@ -81,11 +83,6 @@ import {
|
|
|
81
83
|
import { TeamConversationScreen } from '../screens/team_conversation_screen'
|
|
82
84
|
import { ScreenLayoutWithChatAccessGate } from './screenLayout'
|
|
83
85
|
|
|
84
|
-
const HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {
|
|
85
|
-
marginLeft: Platform.select({ ios: -8, default: -3 }),
|
|
86
|
-
marginRight: Platform.select({ ios: 0, default: 30 }),
|
|
87
|
-
}
|
|
88
|
-
|
|
89
86
|
export const NewConversationStack = createNativeStackNavigator({
|
|
90
87
|
initialRouteName: 'ConversationNewEntry',
|
|
91
88
|
screenOptions: {
|
|
@@ -221,38 +218,27 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
221
218
|
onPress={() => navigation.getParent()?.goBack()}
|
|
222
219
|
/>
|
|
223
220
|
),
|
|
224
|
-
headerLeft:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
}}
|
|
238
|
-
{...props}
|
|
239
|
-
/>
|
|
240
|
-
),
|
|
221
|
+
headerLeft: createMinimalHeaderBackButton({
|
|
222
|
+
onPress: () => {
|
|
223
|
+
const params = route.params as ConversationRouteProps
|
|
224
|
+
if ((params as ConversationFiltersParams)?.chat_group_graph_id) {
|
|
225
|
+
// Ensure that conversations with a graph id pass them back to the conversation list
|
|
226
|
+
const { chat_group_graph_id } = params
|
|
227
|
+
navigation.popTo('Conversations', { chat_group_graph_id })
|
|
228
|
+
} else {
|
|
229
|
+
navigation.goBack()
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
}),
|
|
241
233
|
}),
|
|
242
234
|
},
|
|
243
235
|
ConversationReply: {
|
|
244
236
|
screen: ConversationScreen,
|
|
245
|
-
options: ({ route, navigation }) =>
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
displayMode="minimal"
|
|
251
|
-
onPress={() => navigation.goBack()}
|
|
252
|
-
{...props}
|
|
253
|
-
/>
|
|
254
|
-
),
|
|
255
|
-
}),
|
|
237
|
+
options: ({ route, navigation }) =>
|
|
238
|
+
composeHeaderOptions({
|
|
239
|
+
title: (route.params as ConversationRouteProps)?.title ?? 'Reply',
|
|
240
|
+
onPress: navigation.goBack,
|
|
241
|
+
}),
|
|
256
242
|
},
|
|
257
243
|
TeamConversation: {
|
|
258
244
|
screen: TeamConversationScreen,
|
|
@@ -59,9 +59,9 @@ export const GroupRow = ({ group, isActive }: GroupRowProps) => {
|
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
61
|
<PressableRow onPress={handleFilterByGroup} isActive={isActive}>
|
|
62
|
-
{headerImage?.
|
|
62
|
+
{headerImage?.thumbnail && (
|
|
63
63
|
<Image
|
|
64
|
-
source={{ uri: headerImage?.
|
|
64
|
+
source={{ uri: headerImage?.thumbnail }}
|
|
65
65
|
resizeMode="cover"
|
|
66
66
|
style={styles.rowImage}
|
|
67
67
|
alt=""
|
|
@@ -12,7 +12,7 @@ export const GroupsRecipientRow = ({ group, onPress }: GroupsRecipientRowProps)
|
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<RecipientLinkRow
|
|
15
|
-
imageUri={group.headerImage?.
|
|
15
|
+
imageUri={group.headerImage?.thumbnail}
|
|
16
16
|
title={group.name}
|
|
17
17
|
subtitle={`${group.membershipsCount} members`}
|
|
18
18
|
onPress={() => onPress(group)}
|
|
@@ -29,9 +29,9 @@ export const RestrictedGroupRow = ({ group }: RestrictedGroupRowProps) => {
|
|
|
29
29
|
accessibilityLabel={`${group.name} — ${reasonText(group.canCreateConversationReasonCode)}`}
|
|
30
30
|
>
|
|
31
31
|
<View style={styles.innerContainer}>
|
|
32
|
-
{group.headerImage?.
|
|
32
|
+
{group.headerImage?.thumbnail && (
|
|
33
33
|
<Image
|
|
34
|
-
source={{ uri: group.headerImage.
|
|
34
|
+
source={{ uri: group.headerImage.thumbnail }}
|
|
35
35
|
resizeMode="cover"
|
|
36
36
|
style={styles.image}
|
|
37
37
|
alt=""
|
|
@@ -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.'
|