@planningcenter/chat-react-native 4.5.1-qa-staging.6 → 4.5.1-qa-staging.7
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/assets/powered_by_giphy.png +0 -0
- package/assets/powered_by_giphy_dark.png +0 -0
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +2 -2
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +5 -3
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +2 -2
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/display/conversation_avatar.d.ts +3 -1
- package/build/components/display/conversation_avatar.d.ts.map +1 -1
- package/build/components/display/conversation_avatar.js +77 -66
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/hooks/use_conversation_avatar_update.d.ts +3 -2
- package/build/hooks/use_conversation_avatar_update.d.ts.map +1 -1
- package/build/hooks/use_conversation_avatar_update.js +37 -4
- package/build/hooks/use_conversation_avatar_update.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +2 -1
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +5 -2
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +3 -3
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/get_help_screen.js +2 -2
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.js +93 -136
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/utils/native_adapters/linking.d.ts +11 -3
- package/build/utils/native_adapters/linking.d.ts.map +1 -1
- package/build/utils/native_adapters/linking.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/components/conversation/attachments/giphy_attachment.test.tsx +76 -0
- package/src/__tests__/screens/get_help_screen.test.ts +36 -0
- package/src/__utils__/render_with_query_client.tsx +13 -0
- package/src/components/conversation/attachments/giphy_attachment.tsx +2 -3
- package/src/components/conversation/attachments/image_attachment.tsx +2 -3
- package/src/components/conversation/message_form.tsx +1 -1
- package/src/components/conversations/__tests__/conversation_preview.test.tsx +2 -2
- package/src/components/display/__tests__/conversation_avatar.test.tsx +84 -0
- package/src/components/display/conversation_avatar.tsx +9 -2
- package/src/hooks/use_conversation_avatar_update.ts +18 -8
- package/src/screens/age_check/age_check_underage_screen.tsx +2 -1
- package/src/screens/attachment_actions/__tests__/attachment_actions_screen.test.tsx +37 -1
- package/src/screens/attachment_actions/attachment_actions_screen.tsx +3 -2
- package/src/screens/bug_report_screen.tsx +3 -11
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +1 -1
- package/src/screens/get_help_screen.tsx +2 -2
- package/src/screens/search/__tests__/search_screen.test.tsx +6 -5
- package/src/screens/search/components/__tests__/conversation_results.test.tsx +14 -5
- package/src/screens/search/components/__tests__/message_result_row.test.tsx +5 -4
- package/src/screens/search/components/__tests__/search_results_list.test.tsx +4 -3
- package/src/screens/send_giphy_screen.tsx +13 -44
- package/src/utils/native_adapters/__tests__/linking.test.ts +12 -0
- package/src/utils/native_adapters/linking.ts +12 -3
|
@@ -8,7 +8,6 @@ import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/fo
|
|
|
8
8
|
import { useCreateAndroidRippleColor, useTheme } from '../hooks'
|
|
9
9
|
import { useGiphy } from '../hooks/use_giphy'
|
|
10
10
|
import { useMessageCreateOrUpdate } from '../hooks/use_message_create_or_update'
|
|
11
|
-
import { tokens } from '../vendor/tapestry/tokens'
|
|
12
11
|
|
|
13
12
|
export const SendGiphyScreenOptions = getFormSheetScreenOptions({
|
|
14
13
|
headerTitle: 'Send Giphy',
|
|
@@ -24,6 +23,7 @@ export type SendGiphyScreenProps = StaticScreenProps<{
|
|
|
24
23
|
export function SendGiphyScreen({ route }: SendGiphyScreenProps) {
|
|
25
24
|
const { conversation_id, reply_root_id, search_term } = route.params
|
|
26
25
|
const styles = useStyles()
|
|
26
|
+
const { colors } = useTheme()
|
|
27
27
|
const navigation = useNavigation()
|
|
28
28
|
|
|
29
29
|
const { isPending, mutate } = useMessageCreateOrUpdate({
|
|
@@ -78,15 +78,18 @@ export function SendGiphyScreen({ route }: SendGiphyScreenProps) {
|
|
|
78
78
|
goBack({ clearInput: true })
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
const poweredByGiphyImage =
|
|
82
|
+
colors.name === 'dark'
|
|
83
|
+
? require('../../assets/powered_by_giphy_dark.png')
|
|
84
|
+
: require('../../assets/powered_by_giphy.png')
|
|
85
|
+
|
|
81
86
|
return (
|
|
82
87
|
<FormSheet.Root contentStyle={styles.container}>
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/>
|
|
89
|
-
</View>
|
|
88
|
+
<NativeImage
|
|
89
|
+
alt="Powered by Giphy"
|
|
90
|
+
style={styles.poweredByGiphyImage}
|
|
91
|
+
source={poweredByGiphyImage}
|
|
92
|
+
/>
|
|
90
93
|
<View style={styles.controlToolbar} accessibilityRole="toolbar">
|
|
91
94
|
<View style={styles.paginateButtonGroup}>
|
|
92
95
|
<PaginateButton
|
|
@@ -181,15 +184,10 @@ const useStyles = () => {
|
|
|
181
184
|
flex: 0,
|
|
182
185
|
flexGrow: 1,
|
|
183
186
|
},
|
|
184
|
-
poweredByGiphyContainer: {
|
|
185
|
-
alignSelf: 'flex-start',
|
|
186
|
-
padding: 4,
|
|
187
|
-
borderRadius: 4,
|
|
188
|
-
backgroundColor: colors.name === 'dark' ? tokens.colorNeutral68 : 'transparent',
|
|
189
|
-
},
|
|
190
187
|
poweredByGiphyImage: {
|
|
191
|
-
|
|
188
|
+
alignSelf: 'flex-start',
|
|
192
189
|
height: 20,
|
|
190
|
+
aspectRatio: 641 / 71,
|
|
193
191
|
},
|
|
194
192
|
controlToolbar: {
|
|
195
193
|
flexDirection: 'row',
|
|
@@ -223,32 +221,3 @@ const useStyles = () => {
|
|
|
223
221
|
},
|
|
224
222
|
})
|
|
225
223
|
}
|
|
226
|
-
|
|
227
|
-
const poweredByGiphyImage = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAWCAYAAACFbNPBAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA
|
|
228
|
-
GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABa9JREFUeNrsWy1z40gQla8EDAwE
|
|
229
|
-
DAQCDAIMAgwCDA0XBgYGBu5PyM84aLgw8KDBAoMDBgsEAgQEBAQEBARclZ2uepPrne2WRrbls7Pq
|
|
230
|
-
KpWc0UxPz0y//pIyen9/Dwa6LhqNRjNzmwmPcnOl5kzrYZdOQ+GwBVcDirG5LXGNG7rWpu/O3Dcu
|
|
231
|
-
UEz7ytxW7gDT76WtjzYXAdJcW8MjFWR+EoBMAF4ra3wRmmkdG/Psq/kdac8Vfg/mtpAMiRnzt88C
|
|
232
|
-
/xpU7yrAEZvbMxR33NLdAukZ4/okmmturicz1yNA3Be9Ku0rM2+keNlFR14DQK4UHE+K9Wwi6v94
|
|
233
|
-
RlHnfc4HD5Uojx8826zHyQeAfJ6w6tHDa2jhz7czizwzMi969iK1Mu/cCRMjJbTa9JKDSG7M0N5M
|
|
234
|
-
WDn9iOeUHWpl+hTs2UQZF6HvnrVNIGMFfpq8ltdEUhQeiyvr+Fg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iA1S+K7
|
|
247
|
-
hiEpqxJFx26S4XUDuWpPd73HAR3zZrlWPHjMwk4C3sYzUT2LRfeoFNVKZBB4hEsSSDbIxX6rbB4T
|
|
248
|
-
Wp0qB+GC2no8KdK9+V2Cv03g3Y/obEzPgWPzk7HkPaCsUtz7pliXBHMsqOLCQppYeHdR8QoVm8d6
|
|
249
|
-
Ihr7o8m6C6Fd0BK2NSbXSjslpmuWe6XO/vwfAClRXUs8Ddj6yDDubOFo2HETqhaQJCwBj9m4TPAG
|
|
250
|
-
BZ6VTiyeYbxrZdpCkj341Q5oQyZP5qGwlfB3hTXUDXvjjtkrVarSYy1W9lLwgJS7PZjnr4KC9fkt
|
|
251
|
-
VKq05Z7AuEryBkhDaCVVlFKPfqRAO6E9C359WWjb3zymb+XXtg7PeQ7am659ET5J3xQtUCxJmEGI
|
|
252
|
-
mUfuI95fB38gDZ+7XzARmPBmPFYqZctLrnx9Bho+Vrx8WjcktT7g2AxbOADkM3uRGiDpGucTqE79
|
|
253
|
-
weIQYg10sSD5xt5ezwL9K1/K/xIl1yk98kOfPl1A6tPWVAjwqQIeOq6VRsP/pF8vOZ/L5MP/ovew
|
|
254
|
-
xwNABhpIp58CDAChjQWETVMlnAAAAABJRU5ErkJggg==`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LinkingAdapter } from '../linking'
|
|
2
|
+
|
|
3
|
+
describe('LinkingAdapter', () => {
|
|
4
|
+
it('forwards open options to the host', async () => {
|
|
5
|
+
const openURL = jest.fn(async () => {})
|
|
6
|
+
const adapter = new LinkingAdapter({ openURL, canOpenURL: async () => true })
|
|
7
|
+
|
|
8
|
+
await adapter.openURL('https://example.com', { forceOpenInBrowser: true })
|
|
9
|
+
|
|
10
|
+
expect(openURL).toHaveBeenCalledWith('https://example.com', { forceOpenInBrowser: true })
|
|
11
|
+
})
|
|
12
|
+
})
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { Linking } from 'react-native'
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type LinkingOpenURLOptions = {
|
|
4
|
+
forceOpenInBrowser?: boolean
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type LinkingMethods = {
|
|
8
|
+
openURL: (url: string, options?: LinkingOpenURLOptions) => Promise<unknown>
|
|
5
9
|
canOpenURL: Linking['canOpenURL']
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class LinkingAdapter {
|
|
13
|
+
openURL: LinkingMethods['openURL']
|
|
14
|
+
canOpenURL: LinkingMethods['canOpenURL']
|
|
6
15
|
|
|
7
|
-
constructor(methods:
|
|
16
|
+
constructor(methods: LinkingMethods) {
|
|
8
17
|
this.openURL = methods.openURL.bind(Linking)
|
|
9
18
|
this.canOpenURL = methods.canOpenURL.bind(Linking)
|
|
10
19
|
}
|