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.
- package/lib/commonjs/components/MessageInput/SendButton.js +3 -1
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +11 -11
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/i18n/es.json +77 -78
- package/lib/commonjs/i18n/fr.json +46 -46
- package/lib/commonjs/i18n/he.json +77 -78
- package/lib/commonjs/i18n/hi.json +46 -46
- package/lib/commonjs/i18n/it.json +46 -46
- package/lib/commonjs/i18n/ja.json +77 -81
- package/lib/commonjs/i18n/ko.json +77 -80
- package/lib/commonjs/i18n/nl.json +46 -46
- package/lib/commonjs/i18n/ru.json +46 -46
- package/lib/commonjs/i18n/tr.json +46 -46
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/MessageInput/SendButton.js +3 -1
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +11 -11
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/i18n/es.json +77 -78
- package/lib/module/i18n/fr.json +46 -46
- package/lib/module/i18n/he.json +77 -78
- package/lib/module/i18n/hi.json +46 -46
- package/lib/module/i18n/it.json +46 -46
- package/lib/module/i18n/ja.json +77 -81
- package/lib/module/i18n/ko.json +77 -80
- package/lib/module/i18n/nl.json +46 -46
- package/lib/module/i18n/ru.json +46 -46
- package/lib/module/i18n/tr.json +46 -46
- package/lib/module/version.json +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +2 -2
- package/lib/typescript/i18n/es.json +77 -78
- package/lib/typescript/i18n/fr.json +46 -46
- package/lib/typescript/i18n/he.json +77 -78
- package/lib/typescript/i18n/hi.json +46 -46
- package/lib/typescript/i18n/it.json +46 -46
- package/lib/typescript/i18n/ja.json +77 -81
- package/lib/typescript/i18n/ko.json +77 -80
- package/lib/typescript/i18n/nl.json +46 -46
- package/lib/typescript/i18n/ru.json +46 -46
- package/lib/typescript/i18n/tr.json +46 -46
- package/package.json +1 -1
- package/src/components/MessageInput/SendButton.tsx +1 -1
- package/src/contexts/messageInputContext/MessageInputContext.tsx +5 -2
- package/src/i18n/es.json +46 -47
- package/src/i18n/fr.json +46 -46
- package/src/i18n/he.json +46 -47
- package/src/i18n/hi.json +46 -46
- package/src/i18n/it.json +46 -46
- package/src/i18n/ja.json +53 -57
- package/src/i18n/ko.json +52 -55
- package/src/i18n/nl.json +46 -46
- package/src/i18n/ru.json +46 -46
- package/src/i18n/tr.json +46 -46
- package/src/version.json +1 -1
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
{
|
|
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": "
|
|
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.": "
|
|
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": "
|
|
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 }}": "
|
|
75
|
-
"{{ replyCount }} Replies": "
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
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": "
|
|
3
|
-
"1 Thread Reply": "
|
|
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?": "Bu mesajı kalıcı olarak silmek istediğinizden emin misiniz?",
|
|
8
|
-
"Are you sure?": "
|
|
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": "
|
|
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.": "
|
|
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": "
|
|
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": "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?": "
|
|
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...": "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.": "
|
|
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": "Mesaj işaretlendi",
|
|
41
41
|
"Mute User": "Kullanıcıyı sessize al",
|
|
42
|
-
"Not supported": "
|
|
43
|
-
"Nothing yet...": "
|
|
42
|
+
"Not supported": "",
|
|
43
|
+
"Nothing yet...": "",
|
|
44
44
|
"Ok": "Tamam",
|
|
45
|
-
"Only visible to you": "
|
|
46
|
-
"Open Settings": "
|
|
45
|
+
"Only visible to you": "",
|
|
46
|
+
"Open Settings": "",
|
|
47
47
|
"Photo": "Fotoğraf",
|
|
48
|
-
"Photos and Videos": "
|
|
48
|
+
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "Konuşmaya sabitle",
|
|
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": "Lütfen önce bir kanal seçiniz",
|
|
53
|
-
"Reconnecting...": "
|
|
53
|
+
"Reconnecting...": "",
|
|
54
54
|
"Reply": "Yanıtla",
|
|
55
|
-
"Reply to Message": "
|
|
55
|
+
"Reply to Message": "",
|
|
56
56
|
"Resend": "Yeniden gönder",
|
|
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": "
|
|
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": "
|
|
66
|
+
"Unknown User": "",
|
|
67
67
|
"Unmute User": "Kullanıcının sesini aç",
|
|
68
68
|
"Unpin from Conversation": "Sabitlemeyi kaldır",
|
|
69
|
-
"Unread Messages": "
|
|
69
|
+
"Unread Messages": "",
|
|
70
70
|
"Video": "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 }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
|
|
74
|
-
"{{ index }} of {{ photoLength }}": "
|
|
75
|
-
"{{ replyCount }} Replies": "
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
74
|
+
"{{ index }} of {{ photoLength }}": "",
|
|
75
|
+
"{{ replyCount }} Replies": "",
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "{{ user }} yazıyor",
|
|
78
|
-
"🏙 Attachment...": "
|
|
78
|
+
"🏙 Attachment...": ""
|
|
79
79
|
}
|
|
@@ -32,7 +32,9 @@ var SendButtonWithContext = function SendButtonWithContext(props) {
|
|
|
32
32
|
disabled: disabled,
|
|
33
33
|
onPress: disabled ? function () {
|
|
34
34
|
return null;
|
|
35
|
-
} :
|
|
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 );\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;EAAAC,YAAA;AAU5C,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAGzBC,KAAqD,EAClD;EACH,IAAAC,eAAA,GAAuDD,KAAK,CAApDE,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IAAEE,WAAW,GAAkBH,KAAK,CAAlCG,WAAW;IAAEC,WAAW,GAAKJ,KAAK,CAArBI,WAAW;EAClD,IAAAC,SAAA,GAKI,IAAAC,sBAAQ,EAAC,CAAC;IAAAC,eAAA,GAAAF,SAAA,CAJZG,KAAK;IAAAC,qBAAA,GAAAF,eAAA,CACHG,MAAM;IAAIC,WAAW,GAAAF,qBAAA,CAAXE,WAAW;IAAEC,cAAc,GAAAH,qBAAA,CAAdG,cAAc;IAAAC,qBAAA,GAAAN,eAAA,CACrCO,YAAY;IAAIC,UAAU,GAAAF,qBAAA,CAAVE,UAAU;IAAEC,UAAU,GAAAH,qBAAA,CAAVG,UAAU;IAAEC,aAAa,GAAAJ,qBAAA,CAAbI,aAAa;IAAEC,UAAU,GAAAL,qBAAA,CAAVK,UAAU;EAIrE,OACE9B,MAAA,YAAA+B,aAAA,CAAC5B,YAAA,CAAA6B,SAAS;IACRlB,QAAQ,EAAEA,QAAS;IACnBmB,OAAO,EAAEnB,QAAQ,GAAG;MAAA,OAAM,IAAI;IAAA,
|
|
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;AAC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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,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(
|
|
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(
|
|
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(
|
|
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(
|
|
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:
|
|
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:
|
|
1046
|
+
lineNumber: 1253,
|
|
1047
1047
|
columnNumber: 12
|
|
1048
1048
|
}
|
|
1049
1049
|
}));
|