stream-chat-react-native-core 5.23.1-beta.1 → 5.23.2-beta.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.
Files changed (38) hide show
  1. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +94 -93
  2. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  3. package/lib/commonjs/components/MessageInput/MessageInput.js +28 -37
  4. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  5. package/lib/commonjs/i18n/fr.json +12 -12
  6. package/lib/commonjs/i18n/hi.json +12 -12
  7. package/lib/commonjs/i18n/it.json +12 -12
  8. package/lib/commonjs/i18n/nl.json +12 -12
  9. package/lib/commonjs/i18n/ru.json +12 -12
  10. package/lib/commonjs/i18n/tr.json +12 -12
  11. package/lib/commonjs/version.json +1 -1
  12. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +94 -93
  13. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  14. package/lib/module/components/MessageInput/MessageInput.js +28 -37
  15. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  16. package/lib/module/i18n/fr.json +12 -12
  17. package/lib/module/i18n/hi.json +12 -12
  18. package/lib/module/i18n/it.json +12 -12
  19. package/lib/module/i18n/nl.json +12 -12
  20. package/lib/module/i18n/ru.json +12 -12
  21. package/lib/module/i18n/tr.json +12 -12
  22. package/lib/module/version.json +1 -1
  23. package/lib/typescript/i18n/fr.json +12 -12
  24. package/lib/typescript/i18n/hi.json +12 -12
  25. package/lib/typescript/i18n/it.json +12 -12
  26. package/lib/typescript/i18n/nl.json +12 -12
  27. package/lib/typescript/i18n/ru.json +12 -12
  28. package/lib/typescript/i18n/tr.json +12 -12
  29. package/package.json +1 -1
  30. package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +83 -74
  31. package/src/components/MessageInput/MessageInput.tsx +2 -11
  32. package/src/i18n/fr.json +12 -12
  33. package/src/i18n/hi.json +12 -12
  34. package/src/i18n/it.json +12 -12
  35. package/src/i18n/nl.json +12 -12
  36. package/src/i18n/ru.json +12 -12
  37. package/src/i18n/tr.json +12 -12
  38. package/src/version.json +1 -1
@@ -3,7 +3,7 @@
3
3
  "1 Thread Reply": "1 Risposta alla Discussione",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Invia anche al canale",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -21,18 +21,18 @@
21
21
  "Error loading channel list...": "",
22
22
  "Error loading messages for this channel...": "",
23
23
  "Error while loading, please reload/refresh": "",
24
- "File type not supported": "",
24
+ "File type not supported": "Tipo di file non supportato",
25
25
  "Flag": "",
26
26
  "Flag Message": "",
27
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
28
28
  "How about sending your first message to a friend?": "",
29
29
  "Instant Commands": "Comandi Istantanei",
30
30
  "Let's start chatting!": "",
31
- "Links are disabled": "",
31
+ "Links are disabled": "I link sono disabilitati",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
- "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
35
+ "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "È stato raggiunto il limite massimo di caricamento delle dimensioni del file. Carica un file inferiore a {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.",
36
36
  "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
@@ -40,14 +40,14 @@
40
40
  "Not supported": "",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
- "Only visible to you": "Visibile solo a te",
43
+ "Only visible to you": "",
44
44
  "Open Settings": "",
45
- "Photo": "Foto",
45
+ "Photo": "",
46
46
  "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "Fissato da",
49
49
  "Please enable access to your photos and videos so you can share them.": "",
50
- "Please select a channel first": "",
50
+ "Please select a channel first": "Seleziona un canale",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
@@ -55,7 +55,7 @@
55
55
  "Search GIFs": "",
56
56
  "Select More Photos": "",
57
57
  "Send a message": "",
58
- "Sending links is not allowed in this conversation": "",
58
+ "Sending links is not allowed in this conversation": "L'invio di link non è consentito in questa conversazione",
59
59
  "Slow mode ON": "",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
@@ -64,13 +64,13 @@
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
66
  "Unread Messages": "",
67
- "Video": "Video",
67
+ "Video": "",
68
68
  "You": "",
69
- "You can't send messages in this channel": "",
70
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e altri {{ nonSelfUserLength }} stanno scrivendo",
69
+ "You can't send messages in this channel": "Non puoi inviare messaggi in questo canale",
70
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
71
71
  "{{ index }} of {{ photoLength }}": "",
72
72
  "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "{{replyCount}} Risposte alle Conversazione",
74
- "{{ user }} is typing": "{{ user }} sta scrivendo",
74
+ "{{ user }} is typing": "",
75
75
  "🏙 Attachment...": ""
76
76
  }
@@ -3,7 +3,7 @@
3
3
  "1 Thread Reply": "1 thread antwoord",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Stuur ook naar kanaal",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -21,18 +21,18 @@
21
21
  "Error loading channel list...": "",
22
22
  "Error loading messages for this channel...": "",
23
23
  "Error while loading, please reload/refresh": "",
24
- "File type not supported": "",
24
+ "File type not supported": "Bestandstype niet ondersteund",
25
25
  "Flag": "",
26
26
  "Flag Message": "",
27
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
28
28
  "How about sending your first message to a friend?": "",
29
29
  "Instant Commands": "Directe Opdrachten",
30
30
  "Let's start chatting!": "",
31
- "Links are disabled": "",
31
+ "Links are disabled": "Het versturen van links staat uit",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
- "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
35
+ "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "Maximale uploadlimiet voor bestandsgrootte bereikt. Upload een bestand van minder dan {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.",
36
36
  "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
@@ -40,14 +40,14 @@
40
40
  "Not supported": "",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
- "Only visible to you": "Alleen zichtbaar voor jou",
43
+ "Only visible to you": "",
44
44
  "Open Settings": "",
45
- "Photo": "Foto",
45
+ "Photo": "",
46
46
  "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "Vastgemaakt door",
49
49
  "Please enable access to your photos and videos so you can share them.": "",
50
- "Please select a channel first": "",
50
+ "Please select a channel first": "Selecteer eerst een kanaal",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
@@ -55,7 +55,7 @@
55
55
  "Search GIFs": "",
56
56
  "Select More Photos": "",
57
57
  "Send a message": "",
58
- "Sending links is not allowed in this conversation": "",
58
+ "Sending links is not allowed in this conversation": "In dit gesprek is het niet toegestaan links te versturen",
59
59
  "Slow mode ON": "",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
@@ -64,13 +64,13 @@
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
66
  "Unread Messages": "",
67
- "Video": "Video",
67
+ "Video": "",
68
68
  "You": "",
69
- "You can't send messages in this channel": "",
70
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
69
+ "You can't send messages in this channel": "Je kan geen berichten sturen in dit kanaal",
70
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
71
71
  "{{ index }} of {{ photoLength }}": "",
72
72
  "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "{{replyCount}} Discussiereacties",
74
- "{{ user }} is typing": "{{ user }} is aan het typen",
74
+ "{{ user }} is typing": "",
75
75
  "🏙 Attachment...": ""
76
76
  }
@@ -3,7 +3,7 @@
3
3
  "1 Thread Reply": "1 тема Ответить",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Также отправить на канал",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -21,18 +21,18 @@
21
21
  "Error loading channel list...": "",
22
22
  "Error loading messages for this channel...": "",
23
23
  "Error while loading, please reload/refresh": "",
24
- "File type not supported": "",
24
+ "File type not supported": "Тип файла не поддерживается",
25
25
  "Flag": "",
26
26
  "Flag Message": "",
27
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
28
28
  "How about sending your first message to a friend?": "",
29
29
  "Instant Commands": "Мгновенные Команды",
30
30
  "Let's start chatting!": "",
31
- "Links are disabled": "",
31
+ "Links are disabled": "Ссылки отключены",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
- "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
35
+ "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "Достигнут предел максимального размера файла для загрузки. Загрузите файл размером менее {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} МБ.",
36
36
  "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
@@ -40,14 +40,14 @@
40
40
  "Not supported": "",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
- "Only visible to you": "Видно только вам",
43
+ "Only visible to you": "",
44
44
  "Open Settings": "",
45
- "Photo": "Фото",
45
+ "Photo": "",
46
46
  "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "Закреплено пользователем",
49
49
  "Please enable access to your photos and videos so you can share them.": "",
50
- "Please select a channel first": "",
50
+ "Please select a channel first": "Пожалуйста, сначала выберите канал",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
@@ -55,7 +55,7 @@
55
55
  "Search GIFs": "",
56
56
  "Select More Photos": "",
57
57
  "Send a message": "",
58
- "Sending links is not allowed in this conversation": "",
58
+ "Sending links is not allowed in this conversation": "Отправка ссылок недоступна в этом чате",
59
59
  "Slow mode ON": "",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
@@ -64,13 +64,13 @@
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
66
  "Unread Messages": "",
67
- "Video": "видео",
67
+ "Video": "",
68
68
  "You": "",
69
- "You can't send messages in this channel": "",
70
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
69
+ "You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
70
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
71
71
  "{{ index }} of {{ photoLength }}": "",
72
72
  "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "{{replyCount}} Ответы в темах",
74
- "{{ user }} is typing": "{{ user }} пишет",
74
+ "{{ user }} is typing": "",
75
75
  "🏙 Attachment...": ""
76
76
  }
@@ -3,7 +3,7 @@
3
3
  "1 Thread Reply": "1 Konu Yanıtı",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Kanala da gönder",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -21,18 +21,18 @@
21
21
  "Error loading channel list...": "",
22
22
  "Error loading messages for this channel...": "",
23
23
  "Error while loading, please reload/refresh": "",
24
- "File type not supported": "",
24
+ "File type not supported": "Dosya türü desteklenmiyor",
25
25
  "Flag": "",
26
26
  "Flag Message": "",
27
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
28
28
  "How about sending your first message to a friend?": "",
29
29
  "Instant Commands": "Anlık Komutlar",
30
30
  "Let's start chatting!": "",
31
- "Links are disabled": "",
31
+ "Links are disabled": "Bağlantılar devre dışı",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
- "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
35
+ "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "Maksimum dosya boyutu yükleme sınırına ulaşıldı. Lütfen {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB'ın altında bir dosya yükleyin.",
36
36
  "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
@@ -40,14 +40,14 @@
40
40
  "Not supported": "",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
- "Only visible to you": "Sadece siz görebilirsiniz",
43
+ "Only visible to you": "",
44
44
  "Open Settings": "",
45
- "Photo": "Fotoğraf",
45
+ "Photo": "",
46
46
  "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "Tarafından sabitlendi",
49
49
  "Please enable access to your photos and videos so you can share them.": "",
50
- "Please select a channel first": "",
50
+ "Please select a channel first": "Lütfen önce bir kanal seçiniz",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
@@ -55,7 +55,7 @@
55
55
  "Search GIFs": "",
56
56
  "Select More Photos": "",
57
57
  "Send a message": "",
58
- "Sending links is not allowed in this conversation": "",
58
+ "Sending links is not allowed in this conversation": "Bu konuşmada bağlantı göndermek desteklenmiyor",
59
59
  "Slow mode ON": "",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
@@ -64,13 +64,13 @@
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
66
  "Unread Messages": "",
67
- "Video": "Video",
67
+ "Video": "",
68
68
  "You": "",
69
- "You can't send messages in this channel": "",
70
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
69
+ "You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
70
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
71
71
  "{{ index }} of {{ photoLength }}": "",
72
72
  "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
74
- "{{ user }} is typing": "{{ user }} yazıyor",
74
+ "{{ user }} is typing": "",
75
75
  "🏙 Attachment...": ""
76
76
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native-core",
3
3
  "description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4
- "version": "5.23.1-beta.1",
4
+ "version": "5.23.2-beta.1",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -1,20 +1,29 @@
1
- import React from 'react';
2
- import { FlatList, TouchableOpacity, TouchableOpacityProps } from 'react-native';
1
+ import React, { useMemo, useState } from 'react';
2
+ import {
3
+ LayoutChangeEvent,
4
+ Pressable,
5
+ PressableProps,
6
+ PressableStateCallbackType,
7
+ StyleSheet,
8
+ View,
9
+ ViewStyle,
10
+ } from 'react-native';
3
11
 
4
12
  import type { AutoCompleteSuggestionHeaderProps } from './AutoCompleteSuggestionHeader';
5
13
  import type { AutoCompleteSuggestionItemProps } from './AutoCompleteSuggestionItem';
6
14
 
7
15
  import {
8
- isSuggestionCommand,
9
- isSuggestionEmoji,
10
16
  isSuggestionUser,
11
17
  Suggestion,
12
18
  SuggestionsContextValue,
13
19
  useSuggestionsContext,
14
20
  } from '../../contexts/suggestionsContext/SuggestionsContext';
15
21
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
22
+ import { FlatList } from '../../native';
16
23
  import type { DefaultStreamChatGenerics } from '../../types/types';
17
24
 
25
+ const AUTO_COMPLETE_SUGGESTION_LIST_HEADER_HEIGHT = 30;
26
+
18
27
  type AutoCompleteSuggestionListComponentProps<
19
28
  StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
20
29
  > = Pick<SuggestionsContextValue, 'queryText' | 'triggerType'> & {
@@ -31,9 +40,19 @@ export type AutoCompleteSuggestionListPropsWithContext<
31
40
  > &
32
41
  AutoCompleteSuggestionListComponentProps<StreamChatGenerics>;
33
42
 
34
- const SuggestionsItem: React.FC<TouchableOpacityProps> = (props) => {
35
- const { children, ...touchableOpacityProps } = props;
36
- return <TouchableOpacity {...touchableOpacityProps}>{children}</TouchableOpacity>;
43
+ const SuggestionsItem: React.FC<PressableProps> = (props) => {
44
+ const { children, style: propsStyle, ...pressableProps } = props;
45
+
46
+ const style = ({ pressed }: PressableStateCallbackType) => [
47
+ propsStyle as ViewStyle,
48
+ { opacity: pressed ? 0.2 : 1 },
49
+ ];
50
+
51
+ return (
52
+ <Pressable {...pressableProps} style={style}>
53
+ {children}
54
+ </Pressable>
55
+ );
37
56
  };
38
57
 
39
58
  SuggestionsItem.displayName = 'SuggestionsHeader{messageInput{suggestions}}';
@@ -43,6 +62,7 @@ export const AutoCompleteSuggestionListWithContext = <
43
62
  >(
44
63
  props: AutoCompleteSuggestionListPropsWithContext<StreamChatGenerics>,
45
64
  ) => {
65
+ const [itemHeight, setItemHeight] = useState<number>(0);
46
66
  const {
47
67
  active,
48
68
  AutoCompleteSuggestionHeader,
@@ -55,6 +75,7 @@ export const AutoCompleteSuggestionListWithContext = <
55
75
 
56
76
  const {
57
77
  theme: {
78
+ colors: { white },
58
79
  messageInput: {
59
80
  container: { maxHeight },
60
81
  suggestions: { item: itemStyle },
@@ -63,62 +84,37 @@ export const AutoCompleteSuggestionListWithContext = <
63
84
  },
64
85
  } = useTheme();
65
86
 
66
- const renderItem = ({ index, item }: { index: number; item: Suggestion<StreamChatGenerics> }) => {
87
+ const flatlistHeight = useMemo(() => {
88
+ let totalItemHeight;
89
+ if (triggerType === 'emoji') {
90
+ totalItemHeight = data.length < 7 ? data.length * itemHeight : itemHeight * 6;
91
+ } else {
92
+ totalItemHeight = data.length < 4 ? data.length * itemHeight : itemHeight * 3;
93
+ }
94
+
95
+ return triggerType === 'emoji' || triggerType === 'command'
96
+ ? totalItemHeight + AUTO_COMPLETE_SUGGESTION_LIST_HEADER_HEIGHT
97
+ : totalItemHeight;
98
+ }, [itemHeight, data.length]);
99
+
100
+ const renderItem = ({ item }: { item: Suggestion<StreamChatGenerics> }) => {
67
101
  switch (triggerType) {
68
- case 'mention':
69
- if (isSuggestionUser(item)) {
70
- return (
71
- <SuggestionsItem
72
- onPress={() => {
73
- onSelect(item);
74
- }}
75
- style={[
76
- {
77
- paddingBottom: index === data.length - 1 ? 8 : 0,
78
- paddingTop: index === 0 ? 8 : 0,
79
- },
80
- itemStyle,
81
- ]}
82
- >
83
- {AutoCompleteSuggestionItem && (
84
- <AutoCompleteSuggestionItem itemProps={item} triggerType={triggerType} />
85
- )}
86
- </SuggestionsItem>
87
- );
88
- }
89
- return null;
90
102
  case 'command':
91
- if (isSuggestionCommand(item)) {
92
- return (
93
- <SuggestionsItem
94
- onPress={() => {
95
- onSelect(item);
96
- }}
97
- style={[itemStyle]}
98
- >
99
- {AutoCompleteSuggestionItem && (
100
- <AutoCompleteSuggestionItem itemProps={item} triggerType={triggerType} />
101
- )}
102
- </SuggestionsItem>
103
- );
104
- }
105
- return null;
103
+ case 'mention':
106
104
  case 'emoji':
107
- if (isSuggestionEmoji(item)) {
108
- return (
109
- <SuggestionsItem
110
- onPress={() => {
111
- onSelect(item);
112
- }}
113
- style={[itemStyle]}
114
- >
115
- {AutoCompleteSuggestionItem && (
116
- <AutoCompleteSuggestionItem itemProps={item} triggerType={triggerType} />
117
- )}
118
- </SuggestionsItem>
119
- );
120
- }
121
- return null;
105
+ return (
106
+ <SuggestionsItem
107
+ onLayout={(event: LayoutChangeEvent) => setItemHeight(event.nativeEvent.layout.height)}
108
+ onPress={() => {
109
+ onSelect(item);
110
+ }}
111
+ style={itemStyle}
112
+ >
113
+ {AutoCompleteSuggestionItem && (
114
+ <AutoCompleteSuggestionItem itemProps={item} triggerType={triggerType} />
115
+ )}
116
+ </SuggestionsItem>
117
+ );
122
118
  default:
123
119
  return null;
124
120
  }
@@ -127,20 +123,22 @@ export const AutoCompleteSuggestionListWithContext = <
127
123
  if (!active || data.length === 0) return null;
128
124
 
129
125
  return (
130
- <FlatList
131
- data={data}
132
- keyboardShouldPersistTaps='always'
133
- keyExtractor={(item, index) =>
134
- `${item.name || (isSuggestionUser(item) ? item.id : '')}${index}`
135
- }
136
- ListHeaderComponent={
137
- AutoCompleteSuggestionHeader ? (
138
- <AutoCompleteSuggestionHeader queryText={queryText} triggerType={triggerType} />
139
- ) : null
140
- }
141
- renderItem={renderItem}
142
- style={[flatlist, { maxHeight }]}
143
- />
126
+ <View style={[styles.container, { backgroundColor: white, height: flatlistHeight }]}>
127
+ <FlatList
128
+ data={data}
129
+ keyboardShouldPersistTaps='always'
130
+ keyExtractor={(item, index) =>
131
+ `${item.name || (isSuggestionUser(item) ? item.id : '')}${index}`
132
+ }
133
+ ListHeaderComponent={
134
+ AutoCompleteSuggestionHeader ? (
135
+ <AutoCompleteSuggestionHeader queryText={queryText} triggerType={triggerType} />
136
+ ) : null
137
+ }
138
+ renderItem={renderItem}
139
+ style={[flatlist, { maxHeight }]}
140
+ />
141
+ </View>
144
142
  );
145
143
  };
146
144
 
@@ -206,5 +204,16 @@ export const AutoCompleteSuggestionList = <
206
204
  );
207
205
  };
208
206
 
207
+ const styles = StyleSheet.create({
208
+ container: {
209
+ borderRadius: 8,
210
+ elevation: 3,
211
+ marginHorizontal: 8,
212
+ marginVertical: 8,
213
+ shadowOffset: { height: 1, width: 0 },
214
+ shadowOpacity: 0.15,
215
+ },
216
+ });
217
+
209
218
  AutoCompleteSuggestionList.displayName =
210
219
  'AutoCompleteSuggestionList{messageInput{suggestions{List}}}';
@@ -73,13 +73,8 @@ const styles = StyleSheet.create({
73
73
  replyContainer: { paddingBottom: 12, paddingHorizontal: 8 },
74
74
  sendButtonContainer: { paddingBottom: 10, paddingLeft: 10 },
75
75
  suggestionsListContainer: {
76
- borderRadius: 10,
77
- elevation: 3,
78
- left: 8,
79
76
  position: 'absolute',
80
- right: 8,
81
- shadowOffset: { height: 1, width: 0 },
82
- shadowOpacity: 0.15,
77
+ width: '100%',
83
78
  },
84
79
  });
85
80
 
@@ -624,11 +619,7 @@ const MessageInputWithContext = <
624
619
 
625
620
  {triggerType && suggestions ? (
626
621
  <View
627
- style={[
628
- suggestionListContainer,
629
- styles.suggestionsListContainer,
630
- { backgroundColor: white, bottom: height },
631
- ]}
622
+ style={[styles.suggestionsListContainer, suggestionListContainer, { bottom: height }]}
632
623
  >
633
624
  <AutoCompleteSuggestionList
634
625
  active={!!suggestions}
package/src/i18n/fr.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "1 Thread Reply": "Réponse à 1 fil",
4
4
  "Allow access to your Gallery": "",
5
5
  "Allow camera access in device settings": "",
6
- "Also send to channel": "Envoyer également à la chaîne",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "",
8
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -21,18 +21,18 @@
21
21
  "Error loading channel list...": "",
22
22
  "Error loading messages for this channel...": "",
23
23
  "Error while loading, please reload/refresh": "",
24
- "File type not supported": "",
24
+ "File type not supported": "Le type de fichier n'est pas pris en charge",
25
25
  "Flag": "",
26
26
  "Flag Message": "",
27
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
28
28
  "How about sending your first message to a friend?": "",
29
29
  "Instant Commands": "Commandes Instantanées",
30
30
  "Let's start chatting!": "",
31
- "Links are disabled": "",
31
+ "Links are disabled": "Links are disabled",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
- "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
35
+ "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "Taille maximale de téléchargement de fichier atteinte. Veuillez télécharger un fichier inférieur à {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} Mo.",
36
36
  "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
@@ -40,14 +40,14 @@
40
40
  "Not supported": "",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
- "Only visible to you": "Seulement visible par vous",
43
+ "Only visible to you": "",
44
44
  "Open Settings": "",
45
- "Photo": "Photo",
45
+ "Photo": "",
46
46
  "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "Épinglé par",
49
49
  "Please enable access to your photos and videos so you can share them.": "",
50
- "Please select a channel first": "",
50
+ "Please select a channel first": "Veuillez d'abord selectionnez un canal",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
@@ -55,7 +55,7 @@
55
55
  "Search GIFs": "",
56
56
  "Select More Photos": "",
57
57
  "Send a message": "",
58
- "Sending links is not allowed in this conversation": "",
58
+ "Sending links is not allowed in this conversation": "Sending links is not allowed in this conversation",
59
59
  "Slow mode ON": "",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
@@ -64,13 +64,13 @@
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
66
  "Unread Messages": "",
67
- "Video": "Vidéo",
67
+ "Video": "",
68
68
  "You": "",
69
- "You can't send messages in this channel": "",
70
- "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} et {{ nonSelfUserLength }} autres sont en train d'écrire",
69
+ "You can't send messages in this channel": "You can't send messages in this channel",
70
+ "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
71
71
  "{{ index }} of {{ photoLength }}": "",
72
72
  "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "{{replyCount}} Réponses à la discussion",
74
- "{{ user }} is typing": "{{ user }} est en train d'écrire",
74
+ "{{ user }} is typing": "",
75
75
  "🏙 Attachment...": ""
76
76
  }