stream-chat-react-native-core 5.24.0 → 5.25.0-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 (55) hide show
  1. package/lib/commonjs/components/MessageInput/SendButton.js +3 -1
  2. package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
  3. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +11 -11
  4. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  5. package/lib/commonjs/i18n/es.json +77 -78
  6. package/lib/commonjs/i18n/fr.json +46 -46
  7. package/lib/commonjs/i18n/he.json +77 -78
  8. package/lib/commonjs/i18n/hi.json +46 -46
  9. package/lib/commonjs/i18n/it.json +46 -46
  10. package/lib/commonjs/i18n/ja.json +77 -81
  11. package/lib/commonjs/i18n/ko.json +77 -80
  12. package/lib/commonjs/i18n/nl.json +46 -46
  13. package/lib/commonjs/i18n/ru.json +46 -46
  14. package/lib/commonjs/i18n/tr.json +46 -46
  15. package/lib/commonjs/version.json +1 -1
  16. package/lib/module/components/MessageInput/SendButton.js +3 -1
  17. package/lib/module/components/MessageInput/SendButton.js.map +1 -1
  18. package/lib/module/contexts/messageInputContext/MessageInputContext.js +11 -11
  19. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  20. package/lib/module/i18n/es.json +77 -78
  21. package/lib/module/i18n/fr.json +46 -46
  22. package/lib/module/i18n/he.json +77 -78
  23. package/lib/module/i18n/hi.json +46 -46
  24. package/lib/module/i18n/it.json +46 -46
  25. package/lib/module/i18n/ja.json +77 -81
  26. package/lib/module/i18n/ko.json +77 -80
  27. package/lib/module/i18n/nl.json +46 -46
  28. package/lib/module/i18n/ru.json +46 -46
  29. package/lib/module/i18n/tr.json +46 -46
  30. package/lib/module/version.json +1 -1
  31. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +2 -2
  32. package/lib/typescript/i18n/es.json +77 -78
  33. package/lib/typescript/i18n/fr.json +46 -46
  34. package/lib/typescript/i18n/he.json +77 -78
  35. package/lib/typescript/i18n/hi.json +46 -46
  36. package/lib/typescript/i18n/it.json +46 -46
  37. package/lib/typescript/i18n/ja.json +77 -81
  38. package/lib/typescript/i18n/ko.json +77 -80
  39. package/lib/typescript/i18n/nl.json +46 -46
  40. package/lib/typescript/i18n/ru.json +46 -46
  41. package/lib/typescript/i18n/tr.json +46 -46
  42. package/package.json +1 -1
  43. package/src/components/MessageInput/SendButton.tsx +1 -1
  44. package/src/contexts/messageInputContext/MessageInputContext.tsx +5 -2
  45. package/src/i18n/es.json +46 -47
  46. package/src/i18n/fr.json +46 -46
  47. package/src/i18n/he.json +46 -47
  48. package/src/i18n/hi.json +46 -46
  49. package/src/i18n/it.json +46 -46
  50. package/src/i18n/ja.json +53 -57
  51. package/src/i18n/ko.json +52 -55
  52. package/src/i18n/nl.json +46 -46
  53. package/src/i18n/ru.json +46 -46
  54. package/src/i18n/tr.json +46 -46
  55. package/src/version.json +1 -1
@@ -1,79 +1,79 @@
1
1
  {
2
- "1 Reply": "1 Ответ",
3
- "1 Thread Reply": "1 тема Ответить",
4
- "Allow access to your Gallery": "Разрешить доступ к вашей галерее",
5
- "Allow camera access in device settings": "Разрешите доступ к камере в настройках устройства.",
6
- "Also send to channel": "Также отправить на канал",
2
+ "1 Reply": "",
3
+ "1 Thread Reply": "",
4
+ "Allow access to your Gallery": "",
5
+ "Allow camera access in device settings": "",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "Вы действительно хотите удалить это сообщение без возможности восстановления?",
8
- "Are you sure?": "Вы уверены?",
8
+ "Are you sure?": "",
9
9
  "Block User": "Заблокировать пользователя",
10
10
  "Cancel": "Отмена",
11
11
  "Cannot Flag Message": "Невозможно пожаловаться на сообщение",
12
- "Consider how your comment might make others feel and be sure to follow our Community Guidelines": "Обдумайте, как ваш комментарий может повлиять на других, и убедитесь, что вы следуете нашим правилам сообщества",
12
+ "Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
13
13
  "Copy Message": "Копировать сообщение",
14
14
  "Delete": "удалять",
15
15
  "Delete Message": "Удалить сообщение",
16
- "Device camera is used to take photos or videos.": "Камера устройства используется для съемки фотографий или видео.",
16
+ "Device camera is used to take photos or videos.": "",
17
17
  "Do you want to send a copy of this message to a moderator for further investigation?": "Вы хотите отправить копию этого сообщения модератору для дальнейшего изучения?",
18
18
  "Edit Message": "Редактировать сообщение",
19
- "Editing Message": "Редактирование сообщения",
20
- "Emoji matching": "Соответствие эмодзи",
21
- "Empty message...": "Пустое сообщение...",
22
- "Error loading": "Ошибка при загрузке",
23
- "Error loading channel list...": "Ошибка загрузки списка каналов...",
24
- "Error loading messages for this channel...": "Ошибка загрузки сообщений для этого канала...",
25
- "Error while loading, please reload/refresh": "Ошибка загрузки, пожалуйста перезагрузите или обновите",
26
- "File type not supported": "Тип файла не поддерживается",
19
+ "Editing Message": "",
20
+ "Emoji matching": "",
21
+ "Empty message...": "",
22
+ "Error loading": "",
23
+ "Error loading channel list...": "",
24
+ "Error loading messages for this channel...": "",
25
+ "Error while loading, please reload/refresh": "",
26
+ "File type not supported": "",
27
27
  "Flag": "Пометить",
28
28
  "Flag Message": "Пометить сообщение",
29
29
  "Flag action failed either due to a network issue or the message is already flagged": "Не удалось отправить жалобу. Возможные причины: проблема с подключением к интернету или ваша жалоба уже была принята.",
30
- "How about sending your first message to a friend?": "Как насчет отправки первого сообщения другу?",
31
- "Instant Commands": "Мгновенные Команды",
32
- "Let's start chatting!": "Давайте начнем общаться!",
33
- "Links are disabled": "Ссылки отключены",
30
+ "How about sending your first message to a friend?": "",
31
+ "Instant Commands": "",
32
+ "Let's start chatting!": "",
33
+ "Links are disabled": "",
34
34
  "Loading channels...": "Загружаю каналы...",
35
35
  "Loading messages...": "Загружаю сообщения...",
36
36
  "Loading...": "Загружаю...",
37
- "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}} МБ.",
38
- "Message Reactions": "Сообщения Реакции",
39
- "Message deleted": "Сообщение удалено",
37
+ "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
38
+ "Message Reactions": "",
39
+ "Message deleted": "",
40
40
  "Message flagged": "Сообщение отмечено",
41
41
  "Mute User": "Отключить пользователя",
42
- "Not supported": "не поддерживается",
43
- "Nothing yet...": "Пока ничего нет...",
42
+ "Not supported": "",
43
+ "Nothing yet...": "",
44
44
  "Ok": "Oк",
45
- "Only visible to you": "Видно только вам",
46
- "Open Settings": "Открыть настройки",
45
+ "Only visible to you": "",
46
+ "Open Settings": "",
47
47
  "Photo": "Фото",
48
- "Photos and Videos": "Фото и видео",
48
+ "Photos and Videos": "",
49
49
  "Pin to Conversation": "Закрепить к беседе",
50
- "Pinned by": "Закреплено пользователем",
51
- "Please enable access to your photos and videos so you can share them.": "Разрешите доступ к своим фотографиям и видео, чтобы вы могли ими поделиться.",
50
+ "Pinned by": "",
51
+ "Please enable access to your photos and videos so you can share them.": "",
52
52
  "Please select a channel first": "Пожалуйста, сначала выберите канал",
53
- "Reconnecting...": "Переподключение...",
53
+ "Reconnecting...": "",
54
54
  "Reply": "Ответить",
55
- "Reply to Message": "Ответить на сообщение",
55
+ "Reply to Message": "",
56
56
  "Resend": "Отправить",
57
- "Search GIFs": "Поиск GIF",
58
- "Select More Photos": "Выбрать больше фотографий",
59
- "Send Anyway": "Всё равно отправить",
60
- "Send a message": "Отправить сообщение",
61
- "Sending links is not allowed in this conversation": "Отправка ссылок недоступна в этом чате",
62
- "Slow mode ON": "Медленный режим включен",
57
+ "Search GIFs": "",
58
+ "Select More Photos": "",
59
+ "Send Anyway": "",
60
+ "Send a message": "",
61
+ "Sending links is not allowed in this conversation": "",
62
+ "Slow mode ON": "",
63
63
  "The message has been reported to a moderator.": "Сообщение отправлено модератору.",
64
64
  "Thread Reply": "Тема Ответить",
65
65
  "Unblock User": "Разблокировать пользователя",
66
- "Unknown User": "Неизвестный пользователь",
66
+ "Unknown User": "",
67
67
  "Unmute User": "Включить микрофон",
68
68
  "Unpin from Conversation": "Открепить от беседы",
69
- "Unread Messages": "Непрочитанные Сообщения",
69
+ "Unread Messages": "",
70
70
  "Video": "видео",
71
- "You": "Вы",
72
- "You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
71
+ "You": "",
72
+ "You can't send messages in this channel": "",
73
73
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
74
- "{{ index }} of {{ photoLength }}": "{{ index }} из {{ photoLength }}",
75
- "{{ replyCount }} Replies": "{{ replyCount }} Ответов",
76
- "{{ replyCount }} Thread Replies": "{{replyCount}} Ответы в темах",
74
+ "{{ index }} of {{ photoLength }}": "",
75
+ "{{ replyCount }} Replies": "",
76
+ "{{ replyCount }} Thread Replies": "",
77
77
  "{{ user }} is typing": "{{ user }} пишет",
78
- "🏙 Attachment...": "🏙 Вложение..."
78
+ "🏙 Attachment...": ""
79
79
  }
@@ -1,79 +1,79 @@
1
1
  {
2
- "1 Reply": "1 Cevap",
3
- "1 Thread Reply": "1 Konu Yanıtı",
4
- "Allow access to your Gallery": "Galerinize erişime izin verin",
5
- "Allow camera access in device settings": "Cihaz ayarlarında kamera erişimine izin ver",
6
- "Also send to channel": "Kanala da gönder",
2
+ "1 Reply": "",
3
+ "1 Thread Reply": "",
4
+ "Allow access to your Gallery": "",
5
+ "Allow camera access in device settings": "",
6
+ "Also send to channel": "",
7
7
  "Are you sure you want to permanently delete this message?": "Bu mesajı kalıcı olarak silmek istediğinizden emin misiniz?",
8
- "Are you sure?": "Emin misiniz?",
8
+ "Are you sure?": "",
9
9
  "Block User": "Kullanıcıyı engelle",
10
10
  "Cancel": "İptal",
11
11
  "Cannot Flag Message": "Raporlama Başarısız",
12
- "Consider how your comment might make others feel and be sure to follow our Community Guidelines": "Yorumunuzun diğerlerini nasıl hissettirebileceğini düşünün ve topluluk kurallarımızı takip ettiğinizden emin olun",
12
+ "Consider how your comment might make others feel and be sure to follow our Community Guidelines": "",
13
13
  "Copy Message": "Mesajı Kopyala",
14
14
  "Delete": "Sil",
15
15
  "Delete Message": "Mesajı Sil",
16
- "Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
16
+ "Device camera is used to take photos or videos.": "",
17
17
  "Do you want to send a copy of this message to a moderator for further investigation?": "Detaylı inceleme için bu mesajın kopyasını moderatöre göndermek istiyor musunuz?",
18
18
  "Edit Message": "Mesajı Düzenle",
19
- "Editing Message": "Mesaj Düzenleniyor",
20
- "Emoji matching": "Emoji eşleştirme",
21
- "Empty message...": "Boş mesaj...",
22
- "Error loading": "Yükleme hatası",
23
- "Error loading channel list...": "Kanal listesi yüklenirken hata oluştu...",
24
- "Error loading messages for this channel...": "Bu kanal için mesajlar yüklenirken hata oluştu...",
25
- "Error while loading, please reload/refresh": "Yüklenirken hata oluştu, lütfen tekrar deneyiniz",
26
- "File type not supported": "Dosya türü desteklenmiyor",
19
+ "Editing Message": "",
20
+ "Emoji matching": "",
21
+ "Empty message...": "",
22
+ "Error loading": "",
23
+ "Error loading channel list...": "",
24
+ "Error loading messages for this channel...": "",
25
+ "Error while loading, please reload/refresh": "",
26
+ "File type not supported": "",
27
27
  "Flag": "Raporla",
28
28
  "Flag Message": "Mesajı Raporla",
29
29
  "Flag action failed either due to a network issue or the message is already flagged": "Mesajın daha önce raporlanmış olması veya bir ağ bağlantısı sorunu nedeniyle raporlama işlemi başarısız oldu.",
30
- "How about sending your first message to a friend?": "İlk mesajınızı bir arkadaşınıza göndermeye ne dersiniz?",
31
- "Instant Commands": "Anlık Komutlar",
32
- "Let's start chatting!": "Haydi sohbete başlayalım!",
33
- "Links are disabled": "Bağlantılar devre dışı",
30
+ "How about sending your first message to a friend?": "",
31
+ "Instant Commands": "",
32
+ "Let's start chatting!": "",
33
+ "Links are disabled": "",
34
34
  "Loading channels...": "Kanallar yükleniyor...",
35
35
  "Loading messages...": "Mesajlar yükleniyor...",
36
36
  "Loading...": "Yükleniyor...",
37
- "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.",
38
- "Message Reactions": "Mesaj Tepkileri",
39
- "Message deleted": "Mesaj silindi",
37
+ "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
38
+ "Message Reactions": "",
39
+ "Message deleted": "",
40
40
  "Message flagged": "Mesaj işaretlendi",
41
41
  "Mute User": "Kullanıcıyı sessize al",
42
- "Not supported": "Desteklenmiyor",
43
- "Nothing yet...": "Henüz değil...",
42
+ "Not supported": "",
43
+ "Nothing yet...": "",
44
44
  "Ok": "Tamam",
45
- "Only visible to you": "Sadece siz görebilirsiniz",
46
- "Open Settings": "Ayarları aç",
45
+ "Only visible to you": "",
46
+ "Open Settings": "",
47
47
  "Photo": "Fotoğraf",
48
- "Photos and Videos": "Fotoğraflar ve Videolar",
48
+ "Photos and Videos": "",
49
49
  "Pin to Conversation": "Konuşmaya sabitle",
50
- "Pinned by": "Tarafından sabitlendi",
51
- "Please enable access to your photos and videos so you can share them.": "Paylaşım yapabilmek için lutfen fotoğraflarınıza ve videolarınıza erişimi etkinleştirin.",
50
+ "Pinned by": "",
51
+ "Please enable access to your photos and videos so you can share them.": "",
52
52
  "Please select a channel first": "Lütfen önce bir kanal seçiniz",
53
- "Reconnecting...": "Yeniden Bağlanılıyor...",
53
+ "Reconnecting...": "",
54
54
  "Reply": "Yanıtla",
55
- "Reply to Message": "Mesajı Yanıtla",
55
+ "Reply to Message": "",
56
56
  "Resend": "Yeniden gönder",
57
- "Search GIFs": "GIF Ara",
58
- "Select More Photos": "Daha Fazla Fotoğraf Seçin",
59
- "Send Anyway": "Yine de Gönder",
60
- "Send a message": "Mesaj gönder",
61
- "Sending links is not allowed in this conversation": "Bu konuşmada bağlantı göndermek desteklenmiyor",
62
- "Slow mode ON": "Yavaş Mod Açık",
57
+ "Search GIFs": "",
58
+ "Select More Photos": "",
59
+ "Send Anyway": "",
60
+ "Send a message": "",
61
+ "Sending links is not allowed in this conversation": "",
62
+ "Slow mode ON": "",
63
63
  "The message has been reported to a moderator.": "Mesaj moderatöre bildirildi.",
64
64
  "Thread Reply": "Konu Yanıtı",
65
65
  "Unblock User": "Kullanıcının engelini kaldır",
66
- "Unknown User": "Bilinmeyen kullanıcı",
66
+ "Unknown User": "",
67
67
  "Unmute User": "Kullanıcının sesini aç",
68
68
  "Unpin from Conversation": "Sabitlemeyi kaldır",
69
- "Unread Messages": "Okunmamış Mesajlar",
69
+ "Unread Messages": "",
70
70
  "Video": "Video",
71
- "You": "Sen",
72
- "You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
71
+ "You": "",
72
+ "You can't send messages in this channel": "",
73
73
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
74
- "{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
75
- "{{ replyCount }} Replies": "{{ replyCount }} Cevap",
76
- "{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
74
+ "{{ index }} of {{ photoLength }}": "",
75
+ "{{ replyCount }} Replies": "",
76
+ "{{ replyCount }} Thread Replies": "",
77
77
  "{{ user }} is typing": "{{ user }} yazıyor",
78
- "🏙 Attachment...": "🏙 Ek..."
78
+ "🏙 Attachment...": ""
79
79
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "5.24.0"
2
+ "version": "5.25.0-beta.1"
3
3
  }
@@ -32,7 +32,9 @@ var SendButtonWithContext = function SendButtonWithContext(props) {
32
32
  disabled: disabled,
33
33
  onPress: disabled ? function () {
34
34
  return null;
35
- } : sendMessage,
35
+ } : function () {
36
+ return sendMessage(undefined);
37
+ },
36
38
  style: [sendButton],
37
39
  testID: "send-button",
38
40
  __self: _this,
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_MessageInputContext","_ThemeContext","_Search","_SendRight","_SendUp","_this","_jsxFileName","SendButtonWithContext","props","_props$disabled","disabled","giphyActive","sendMessage","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$color","colors","accent_blue","grey_gainsboro","_useTheme$theme$messa","messageInput","searchIcon","sendButton","sendRightIcon","sendUpIcon","createElement","Pressable","onPress","style","testID","__self","__source","fileName","lineNumber","columnNumber","Search","_extends2","pathFill","SendRight","SendUp","areEqual","prevProps","nextProps","prevDisabled","prevGiphyActive","prevSendMessage","nextDisabled","nextGiphyActive","nextSendMessage","disabledEqual","giphyActiveEqual","sendMessageEqual","MemoizedSendButton","React","memo","SendButton","_useMessageInputConte","useMessageInputContext","exports","displayName"],"sources":["SendButton.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Pressable } from 'react-native';\n\nimport {\n MessageInputContextValue,\n useMessageInputContext,\n} from '../../contexts/messageInputContext/MessageInputContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Search } from '../../icons/Search';\nimport { SendRight } from '../../icons/SendRight';\nimport { SendUp } from '../../icons/SendUp';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\ntype SendButtonPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<MessageInputContextValue<StreamChatGenerics>, 'giphyActive' | 'sendMessage'> & {\n /** Disables the button */ disabled: boolean;\n};\n\nconst SendButtonWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: SendButtonPropsWithContext<StreamChatGenerics>,\n) => {\n const { disabled = false, giphyActive, sendMessage } = props;\n const {\n theme: {\n colors: { accent_blue, grey_gainsboro },\n messageInput: { searchIcon, sendButton, sendRightIcon, sendUpIcon },\n },\n } = useTheme();\n\n return (\n <Pressable\n disabled={disabled}\n onPress={disabled ? () => null : sendMessage}\n style={[sendButton]}\n testID='send-button'\n >\n {giphyActive && <Search pathFill={disabled ? grey_gainsboro : accent_blue} {...searchIcon} />}\n {!giphyActive && disabled && <SendRight pathFill={grey_gainsboro} {...sendRightIcon} />}\n {!giphyActive && !disabled && <SendUp pathFill={accent_blue} {...sendUpIcon} />}\n </Pressable>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: SendButtonPropsWithContext<StreamChatGenerics>,\n nextProps: SendButtonPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n disabled: prevDisabled,\n giphyActive: prevGiphyActive,\n sendMessage: prevSendMessage,\n } = prevProps;\n const {\n disabled: nextDisabled,\n giphyActive: nextGiphyActive,\n sendMessage: nextSendMessage,\n } = nextProps;\n\n const disabledEqual = prevDisabled === nextDisabled;\n if (!disabledEqual) return false;\n\n const giphyActiveEqual = prevGiphyActive === nextGiphyActive;\n if (!giphyActiveEqual) return false;\n\n const sendMessageEqual = prevSendMessage === nextSendMessage;\n if (!sendMessageEqual) return false;\n\n return true;\n};\n\nconst MemoizedSendButton = React.memo(\n SendButtonWithContext,\n areEqual,\n) as typeof SendButtonWithContext;\n\nexport type SendButtonProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<SendButtonPropsWithContext<StreamChatGenerics>>;\n\n/**\n * UI Component for send button in MessageInput component.\n */\nexport const SendButton = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: SendButtonProps<StreamChatGenerics>,\n) => {\n const { giphyActive, sendMessage } = useMessageInputContext<StreamChatGenerics>();\n\n return (\n <MemoizedSendButton\n {...{ giphyActive, sendMessage }}\n {...props}\n {...{ disabled: props.disabled || false }}\n />\n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uC,eAAe,GAC1BN,SAAS,CADXhC,WAAW;EAGb,IAAMuC,aAAa,GAAGN,YAAY,KAAKG,YAAY;EACnD,IAAI,CAACG,aAAa,EAAE,OAAO,KAAK;EAEhC,IAAMC,gBAAgB,GAAGN,eAAe,KAAKG,eAAe;EAC5D,IAAI,CAACG,gBAAgB,EAAE,OAAO,KAAK;EAEnC,IAAMC,gBAAgB,GAAGN,eAAe,KAAKG,eAAe;EAC5D,IAAI,CAACG,gBAAgB,EAAE,OAAO,KAAK;EAEnC,OAAO,IAAI;AACb,CAAC;AAED,IAAMC,kBAAkB,GAAGC,iBAAK,CAACC,IAAI,CACnCjD,qBAAqB,EACrBmC,QACF,CAAiC;AAS1B,IAAMe,UAAU,GAAG,SAAbA,UAAUA,CAGrBjD,KAA0C,EACvC;EACH,IAAAkD,qBAAA,GAAqC,IAAAC,2CAAsB,EAAqB,CAAC;IAAzEhD,WAAW,GAAA+C,qBAAA,CAAX/C,WAAW;IAAEC,WAAW,GAAA8C,qBAAA,CAAX9C,WAAW;EAEhC,OACEhB,MAAA,YAAA+B,aAAA,CAAC2B,kBAAkB,MAAAhB,SAAA;IACX3B,WAAW,EAAXA,WAAW;IAAEC,WAAW,EAAXA;EAAW,GAC1BJ,KAAK;IACHE,QAAQ,EAAEF,KAAK,CAACE,QAAQ,IAAI,KAAK;IAAAsB,MAAA,EAAA3B,KAAA;IAAA4B,QAAA;MAAAC,QAAA,EAAA5B,YAAA;MAAA6B,UAAA;MAAAC,YAAA;IAAA;EAAA,EACxC,CAAC;AAEN,CAAC;AAACwB,OAAA,CAAAH,UAAA,GAAAA,UAAA;AAEFA,UAAU,CAACI,WAAW,GAAG,0BAA0B"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_MessageInputContext","_ThemeContext","_Search","_SendRight","_SendUp","_this","_jsxFileName","SendButtonWithContext","props","_props$disabled","disabled","giphyActive","sendMessage","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$color","colors","accent_blue","grey_gainsboro","_useTheme$theme$messa","messageInput","searchIcon","sendButton","sendRightIcon","sendUpIcon","createElement","Pressable","onPress","undefined","style","testID","__self","__source","fileName","lineNumber","columnNumber","Search","_extends2","pathFill","SendRight","SendUp","areEqual","prevProps","nextProps","prevDisabled","prevGiphyActive","prevSendMessage","nextDisabled","nextGiphyActive","nextSendMessage","disabledEqual","giphyActiveEqual","sendMessageEqual","MemoizedSendButton","React","memo","SendButton","_useMessageInputConte","useMessageInputContext","exports","displayName"],"sources":["SendButton.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Pressable } from 'react-native';\n\nimport {\n MessageInputContextValue,\n useMessageInputContext,\n} from '../../contexts/messageInputContext/MessageInputContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Search } from '../../icons/Search';\nimport { SendRight } from '../../icons/SendRight';\nimport { SendUp } from '../../icons/SendUp';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\ntype SendButtonPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<MessageInputContextValue<StreamChatGenerics>, 'giphyActive' | 'sendMessage'> & {\n /** Disables the button */ disabled: boolean;\n};\n\nconst SendButtonWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: SendButtonPropsWithContext<StreamChatGenerics>,\n) => {\n const { disabled = false, giphyActive, sendMessage } = props;\n const {\n theme: {\n colors: { accent_blue, grey_gainsboro },\n messageInput: { searchIcon, sendButton, sendRightIcon, sendUpIcon },\n },\n } = useTheme();\n\n return (\n <Pressable\n disabled={disabled}\n onPress={disabled ? () => null : () => sendMessage(undefined)}\n style={[sendButton]}\n testID='send-button'\n >\n {giphyActive && <Search pathFill={disabled ? grey_gainsboro : accent_blue} {...searchIcon} />}\n {!giphyActive && disabled && <SendRight pathFill={grey_gainsboro} {...sendRightIcon} />}\n {!giphyActive && !disabled && <SendUp pathFill={accent_blue} {...sendUpIcon} />}\n </Pressable>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: SendButtonPropsWithContext<StreamChatGenerics>,\n nextProps: SendButtonPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n disabled: prevDisabled,\n giphyActive: prevGiphyActive,\n sendMessage: prevSendMessage,\n } = prevProps;\n const {\n disabled: nextDisabled,\n giphyActive: nextGiphyActive,\n sendMessage: nextSendMessage,\n } = nextProps;\n\n const disabledEqual = prevDisabled === nextDisabled;\n if (!disabledEqual) return false;\n\n const giphyActiveEqual = prevGiphyActive === nextGiphyActive;\n if (!giphyActiveEqual) return false;\n\n const sendMessageEqual = prevSendMessage === nextSendMessage;\n if (!sendMessageEqual) return false;\n\n return true;\n};\n\nconst MemoizedSendButton = React.memo(\n SendButtonWithContext,\n areEqual,\n) as typeof SendButtonWithContext;\n\nexport type SendButtonProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<SendButtonPropsWithContext<StreamChatGenerics>>;\n\n/**\n * UI Component for send button in MessageInput component.\n */\nexport const SendButton = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: SendButtonProps<StreamChatGenerics>,\n) => {\n const { giphyActive, sendMessage } = useMessageInputContext<StreamChatGenerics>();\n\n return (\n <MemoizedSendButton\n {...{ giphyActive, sendMessage }}\n {...props}\n {...{ disabled: props.disabled || false }}\n />\n );\n};\n\nSendButton.displayName = 'SendButton{messageInput}';\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AAIA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA4C,IAAAO,KAAA;EAA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5D,IAAI,CAACG,gBAAgB,EAAE,OAAO,KAAK;EAEnC,OAAO,IAAI;AACb,CAAC;AAED,IAAMC,kBAAkB,GAAGC,iBAAK,CAACC,IAAI,CACnClD,qBAAqB,EACrBoC,QACF,CAAiC;AAS1B,IAAMe,UAAU,GAAG,SAAbA,UAAUA,CAGrBlD,KAA0C,EACvC;EACH,IAAAmD,qBAAA,GAAqC,IAAAC,2CAAsB,EAAqB,CAAC;IAAzEjD,WAAW,GAAAgD,qBAAA,CAAXhD,WAAW;IAAEC,WAAW,GAAA+C,qBAAA,CAAX/C,WAAW;EAEhC,OACEhB,MAAA,YAAA+B,aAAA,CAAC4B,kBAAkB,MAAAhB,SAAA;IACX5B,WAAW,EAAXA,WAAW;IAAEC,WAAW,EAAXA;EAAW,GAC1BJ,KAAK;IACHE,QAAQ,EAAEF,KAAK,CAACE,QAAQ,IAAI,KAAK;IAAAuB,MAAA,EAAA5B,KAAA;IAAA6B,QAAA;MAAAC,QAAA,EAAA7B,YAAA;MAAA8B,UAAA;MAAAC,YAAA;IAAA;EAAA,EACxC,CAAC;AAEN,CAAC;AAACwB,OAAA,CAAAH,UAAA,GAAAA,UAAA;AAEFA,UAAU,CAACI,WAAW,GAAG,0BAA0B"}
@@ -361,7 +361,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
361
361
  }
362
362
  };
363
363
  var sendMessage = function () {
364
- var _ref3 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3() {
364
+ var _ref3 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(customMessageData) {
365
365
  var linkInfos, prevText, attachments, _loop, _iterator3, _step3, _image, _ret, _iterator4, _step4, _file3, message, updatedMessage, updateMessagePromise;
366
366
  return _regenerator["default"].wrap(function _callee3$(_context3) {
367
367
  while (1) switch (_context3.prev = _context3.next) {
@@ -520,7 +520,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
520
520
  mentioned_users: mentionedUsers,
521
521
  quoted_message: undefined,
522
522
  text: prevText
523
- });
523
+ }, customMessageData);
524
524
  value.clearEditingState();
525
525
  updateMessagePromise = value.editMessage((0, _removeReservedFields.removeReservedFields)(updatedMessage)).then(value.clearEditingState);
526
526
  resetInput(attachments);
@@ -531,14 +531,14 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
531
531
  if (message && (0, _utils.isBouncedMessage)(message)) {
532
532
  removeMessage(message);
533
533
  }
534
- value.sendMessage({
534
+ value.sendMessage((0, _extends2["default"])({
535
535
  attachments: attachments,
536
536
  mentioned_users: (0, _uniq["default"])(mentionedUsers),
537
537
  parent_id: thread == null ? void 0 : thread.id,
538
538
  quoted_message_id: typeof value.quotedMessage === 'boolean' ? undefined : value.quotedMessage.id,
539
539
  show_in_channel: sendThreadMessageInChannel || undefined,
540
540
  text: prevText
541
- });
541
+ }, customMessageData));
542
542
  value.clearQuotedMessageState();
543
543
  sending.current = false;
544
544
  resetInput(attachments);
@@ -557,7 +557,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
557
557
  }
558
558
  }, _callee3);
559
559
  }));
560
- return function sendMessage() {
560
+ return function sendMessage(_x) {
561
561
  return _ref3.apply(this, arguments);
562
562
  };
563
563
  }();
@@ -766,7 +766,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
766
766
  }
767
767
  }, _callee5, null, [[4, 30]]);
768
768
  }));
769
- return function uploadFile(_x) {
769
+ return function uploadFile(_x2) {
770
770
  return _ref6.apply(this, arguments);
771
771
  };
772
772
  }();
@@ -870,7 +870,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
870
870
  }
871
871
  }, _callee6, null, [[7, 32]]);
872
872
  }));
873
- return function uploadImage(_x2) {
873
+ return function uploadImage(_x3) {
874
874
  return _ref8.apply(this, arguments);
875
875
  };
876
876
  }();
@@ -916,7 +916,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
916
916
  }
917
917
  }, _callee7);
918
918
  }));
919
- return function uploadNewFile(_x3) {
919
+ return function uploadNewFile(_x4) {
920
920
  return _ref10.apply(this, arguments);
921
921
  };
922
922
  }();
@@ -962,7 +962,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
962
962
  }
963
963
  }, _callee8);
964
964
  }));
965
- return function uploadNewImage(_x4) {
965
+ return function uploadNewImage(_x5) {
966
966
  return _ref11.apply(this, arguments);
967
967
  };
968
968
  }();
@@ -1022,7 +1022,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
1022
1022
  __self: _this,
1023
1023
  __source: {
1024
1024
  fileName: _jsxFileName,
1025
- lineNumber: 1210,
1025
+ lineNumber: 1213,
1026
1026
  columnNumber: 5
1027
1027
  }
1028
1028
  }, children);
@@ -1043,7 +1043,7 @@ var withMessageInputContext = function withMessageInputContext(Component) {
1043
1043
  __self: _this,
1044
1044
  __source: {
1045
1045
  fileName: _jsxFileName,
1046
- lineNumber: 1250,
1046
+ lineNumber: 1253,
1047
1047
  columnNumber: 12
1048
1048
  }
1049
1049
  }));