@planningcenter/chat-react-native 4.4.1-qa-staging.29 → 4.4.1-qa-staging.31

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 (82) hide show
  1. package/build/components/conversation/message_list.d.ts.map +1 -1
  2. package/build/components/conversation/message_list.js +155 -123
  3. package/build/components/conversation/message_list.js.map +1 -1
  4. package/build/components/conversations/conversations.d.ts.map +1 -1
  5. package/build/components/conversations/conversations.js +1 -0
  6. package/build/components/conversations/conversations.js.map +1 -1
  7. package/build/components/display/filter_dropdown.d.ts +16 -0
  8. package/build/components/display/filter_dropdown.d.ts.map +1 -1
  9. package/build/components/display/filter_dropdown.js +103 -57
  10. package/build/components/display/filter_dropdown.js.map +1 -1
  11. package/build/components/display/keyboard_scroll_view.d.ts.map +1 -1
  12. package/build/components/display/keyboard_scroll_view.js +1 -0
  13. package/build/components/display/keyboard_scroll_view.js.map +1 -1
  14. package/build/hooks/direct_messages/use_direct_message_candidates.d.ts +3 -1
  15. package/build/hooks/direct_messages/use_direct_message_candidates.d.ts.map +1 -1
  16. package/build/hooks/direct_messages/use_direct_message_candidates.js +42 -29
  17. package/build/hooks/direct_messages/use_direct_message_candidates.js.map +1 -1
  18. package/build/navigation/index.d.ts.map +1 -1
  19. package/build/navigation/index.js +11 -3
  20. package/build/navigation/index.js.map +1 -1
  21. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  22. package/build/screens/conversation_details_screen.js +1 -0
  23. package/build/screens/conversation_details_screen.js.map +1 -1
  24. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
  25. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +1 -0
  26. package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
  27. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
  28. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +409 -308
  29. package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
  30. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
  31. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +1 -0
  32. package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
  33. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
  34. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +1 -0
  35. package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
  36. package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts.map +1 -1
  37. package/build/screens/conversations/components/filter_dropdown_list_header_component.js +146 -81
  38. package/build/screens/conversations/components/filter_dropdown_list_header_component.js.map +1 -1
  39. package/build/screens/get_help_screen.js +56 -62
  40. package/build/screens/get_help_screen.js.map +1 -1
  41. package/build/screens/group_notification_settings_screen.js +3 -2
  42. package/build/screens/group_notification_settings_screen.js.map +1 -1
  43. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  44. package/build/screens/notification_settings_screen.js +1 -0
  45. package/build/screens/notification_settings_screen.js.map +1 -1
  46. package/build/screens/preferred_app_selection_screen.js +45 -39
  47. package/build/screens/preferred_app_selection_screen.js.map +1 -1
  48. package/build/screens/search/components/search_results_list.d.ts +4 -1
  49. package/build/screens/search/components/search_results_list.d.ts.map +1 -1
  50. package/build/screens/search/components/search_results_list.js +176 -138
  51. package/build/screens/search/components/search_results_list.js.map +1 -1
  52. package/build/screens/search/search_screen.d.ts.map +1 -1
  53. package/build/screens/search/search_screen.js +21 -28
  54. package/build/screens/search/search_screen.js.map +1 -1
  55. package/build/screens/settings_screen.d.ts.map +1 -1
  56. package/build/screens/settings_screen.js +7 -6
  57. package/build/screens/settings_screen.js.map +1 -1
  58. package/package.json +3 -3
  59. package/src/components/conversation/__tests__/message_list.test.tsx +4 -0
  60. package/src/components/conversation/message_list.tsx +6 -0
  61. package/src/components/conversations/conversations.tsx +1 -0
  62. package/src/components/display/filter_dropdown.tsx +50 -18
  63. package/src/components/display/keyboard_scroll_view.tsx +1 -0
  64. package/src/hooks/direct_messages/use_direct_message_candidates.ts +2 -2
  65. package/src/navigation/index.tsx +11 -2
  66. package/src/screens/conversation_details_screen.tsx +1 -0
  67. package/src/screens/conversation_select_recipients/__tests__/conversation_select_direct_message_recipients_screen.test.tsx +83 -0
  68. package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -1
  69. package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +104 -69
  70. package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +1 -0
  71. package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +1 -0
  72. package/src/screens/conversations/components/__tests__/filter_dropdown_list_header_component.test.tsx +0 -21
  73. package/src/screens/conversations/components/filter_dropdown_list_header_component.tsx +39 -8
  74. package/src/screens/get_help_screen.tsx +4 -4
  75. package/src/screens/group_notification_settings_screen.tsx +3 -3
  76. package/src/screens/notification_settings_screen.tsx +1 -0
  77. package/src/screens/preferred_app_selection_screen.tsx +4 -4
  78. package/src/screens/search/__tests__/search_screen.test.tsx +5 -7
  79. package/src/screens/search/components/__tests__/search_results_list.test.tsx +6 -2
  80. package/src/screens/search/components/search_results_list.tsx +29 -8
  81. package/src/screens/search/search_screen.tsx +8 -18
  82. package/src/screens/settings_screen.tsx +25 -25
@@ -4,7 +4,7 @@ import {
4
4
  NativeStackScreenProps,
5
5
  } from '@react-navigation/native-stack'
6
6
  import React, { useRef, useState } from 'react'
7
- import { Keyboard, ScrollView, StyleSheet, View } from 'react-native'
7
+ import { Keyboard, StyleSheet, View } from 'react-native'
8
8
  import { KeyboardView } from '../../components'
9
9
  import {
10
10
  composeOptions,
@@ -64,19 +64,13 @@ export function SearchScreen() {
64
64
  return (
65
65
  <KeyboardView>
66
66
  <View style={styles.container} testID="search-screen">
67
- <SearchField term={term} onChange={setTerm} />
68
- {debouncedTerm.length > 0 ? (
69
- <SearchResultsList
70
- key={debouncedTerm}
71
- term={debouncedTerm}
72
- onSelect={openResult}
73
- onSettled={publishSearch}
74
- />
75
- ) : (
76
- <ScrollView contentContainerStyle={styles.prompt} keyboardShouldPersistTaps="handled">
77
- <SearchPromptBlankState />
78
- </ScrollView>
79
- )}
67
+ <SearchResultsList
68
+ term={debouncedTerm}
69
+ onSelect={openResult}
70
+ onSettled={publishSearch}
71
+ header={<SearchField term={term} onChange={setTerm} />}
72
+ prompt={<SearchPromptBlankState />}
73
+ />
80
74
  </View>
81
75
  </KeyboardView>
82
76
  )
@@ -86,8 +80,4 @@ const styles = StyleSheet.create({
86
80
  container: {
87
81
  flex: 1,
88
82
  },
89
- prompt: {
90
- flexGrow: 1,
91
- justifyContent: 'center',
92
- },
93
83
  })
@@ -1,7 +1,7 @@
1
1
  import { PlatformPressable } from '@react-navigation/elements'
2
2
  import { StaticScreenProps, useNavigation } from '@react-navigation/native'
3
3
  import React, { useCallback } from 'react'
4
- import { Platform, StyleSheet, View } from 'react-native'
4
+ import { Platform, ScrollView, StyleSheet, View } from 'react-native'
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context'
6
6
  import { Heading, Icon, Text, VersionFooter } from '../components'
7
7
  import { Switch } from '../components/display/switch'
@@ -28,29 +28,31 @@ export function SettingsScreen({}: SettingsScreenProps) {
28
28
 
29
29
  return (
30
30
  <View style={styles.container}>
31
- <View style={styles.sectionOuter}>
32
- <View style={styles.sectionHeader}>
33
- <Heading variant="h2">Messages</Heading>
34
- </View>
35
- {directMessagesEligible && (
36
- <View style={styles.settingRow}>
37
- <View style={styles.settingRowText}>
38
- <Text>Allow direct messages</Text>
39
- <Text variant="tertiary">
40
- When off, you can't be added to new direct messages, and any you're already in will
41
- be turned off.
42
- </Text>
43
- </View>
44
- <Switch
45
- value={!directMessagesDisabled}
46
- onValueChange={enabled => setDirectMessagesDisabled(!enabled)}
47
- disabled={isMutating}
48
- />
31
+ <ScrollView contentInsetAdjustmentBehavior="automatic">
32
+ <View style={styles.sectionOuter}>
33
+ <View style={styles.sectionHeader}>
34
+ <Heading variant="h2">Messages</Heading>
49
35
  </View>
50
- )}
51
- <NavRow label="Notification settings" onPress={handleNotificationSettings} />
52
- {appName !== 'services' && <NavRow label="Get help" onPress={handleGetHelp} />}
53
- </View>
36
+ {directMessagesEligible && (
37
+ <View style={styles.settingRow}>
38
+ <View style={styles.settingRowText}>
39
+ <Text>Allow direct messages</Text>
40
+ <Text variant="tertiary">
41
+ When off, you can't be added to new direct messages, and any you're already in
42
+ will be turned off.
43
+ </Text>
44
+ </View>
45
+ <Switch
46
+ value={!directMessagesDisabled}
47
+ onValueChange={enabled => setDirectMessagesDisabled(!enabled)}
48
+ disabled={isMutating}
49
+ />
50
+ </View>
51
+ )}
52
+ <NavRow label="Notification settings" onPress={handleNotificationSettings} />
53
+ {appName !== 'services' && <NavRow label="Get help" onPress={handleGetHelp} />}
54
+ </View>
55
+ </ScrollView>
54
56
  <View style={styles.footer}>
55
57
  <VersionFooter />
56
58
  </View>
@@ -90,8 +92,6 @@ const useStyles = () => {
90
92
  flex: 1,
91
93
  },
92
94
  footer: {
93
- flex: 1,
94
- justifyContent: 'flex-end',
95
95
  paddingBottom: Math.max(insets.bottom, 8),
96
96
  },
97
97
  sectionOuter: {