stream-chat-react-native-core 5.22.0-beta.6 → 5.22.0-beta.8

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 (74) hide show
  1. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +4 -4
  2. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
  3. package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js +7 -5
  4. package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -1
  5. package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.test.js +8 -0
  6. package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.test.js.map +1 -0
  7. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +25 -17
  8. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  9. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +30 -20
  10. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  11. package/lib/commonjs/components/MessageInput/MessageInput.js +1 -1
  12. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  13. package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js.map +1 -1
  14. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +7 -7
  15. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  16. package/lib/commonjs/i18n/fr.json +23 -23
  17. package/lib/commonjs/i18n/hi.json +23 -23
  18. package/lib/commonjs/i18n/it.json +23 -23
  19. package/lib/commonjs/i18n/nl.json +23 -23
  20. package/lib/commonjs/i18n/ru.json +23 -23
  21. package/lib/commonjs/i18n/tr.json +23 -23
  22. package/lib/commonjs/types/types.js.map +1 -1
  23. package/lib/commonjs/version.json +1 -1
  24. package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +4 -4
  25. package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
  26. package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js +7 -5
  27. package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -1
  28. package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.test.js +8 -0
  29. package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.test.js.map +1 -0
  30. package/lib/module/components/Message/MessageSimple/utils/renderText.js +25 -17
  31. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  32. package/lib/module/components/MessageInput/FileUploadPreview.js +30 -20
  33. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  34. package/lib/module/components/MessageInput/MessageInput.js +1 -1
  35. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  36. package/lib/module/components/MessageInput/UploadProgressIndicator.js.map +1 -1
  37. package/lib/module/contexts/messageInputContext/MessageInputContext.js +7 -7
  38. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  39. package/lib/module/i18n/fr.json +23 -23
  40. package/lib/module/i18n/hi.json +23 -23
  41. package/lib/module/i18n/it.json +23 -23
  42. package/lib/module/i18n/nl.json +23 -23
  43. package/lib/module/i18n/ru.json +23 -23
  44. package/lib/module/i18n/tr.json +23 -23
  45. package/lib/module/types/types.js.map +1 -1
  46. package/lib/module/version.json +1 -1
  47. package/lib/typescript/components/Message/MessageSimple/utils/generateMarkdownText.d.ts +1 -3
  48. package/lib/typescript/components/Message/MessageSimple/utils/generateMarkdownText.test.d.ts +1 -0
  49. package/lib/typescript/components/MessageInput/UploadProgressIndicator.d.ts +5 -2
  50. package/lib/typescript/i18n/fr.json +23 -23
  51. package/lib/typescript/i18n/hi.json +23 -23
  52. package/lib/typescript/i18n/it.json +23 -23
  53. package/lib/typescript/i18n/nl.json +23 -23
  54. package/lib/typescript/i18n/ru.json +23 -23
  55. package/lib/typescript/i18n/tr.json +23 -23
  56. package/lib/typescript/types/types.d.ts +8 -11
  57. package/package.json +1 -1
  58. package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +4 -4
  59. package/src/components/Message/MessageSimple/utils/generateMarkdownText.test.ts +23 -0
  60. package/src/components/Message/MessageSimple/utils/generateMarkdownText.ts +12 -13
  61. package/src/components/Message/MessageSimple/utils/renderText.tsx +12 -2
  62. package/src/components/MessageInput/FileUploadPreview.tsx +16 -1
  63. package/src/components/MessageInput/MessageInput.tsx +1 -1
  64. package/src/components/MessageInput/UploadProgressIndicator.tsx +2 -2
  65. package/src/components/MessageInput/__tests__/MessageInput.test.js +2 -2
  66. package/src/contexts/messageInputContext/MessageInputContext.tsx +2 -2
  67. package/src/i18n/fr.json +23 -23
  68. package/src/i18n/hi.json +23 -23
  69. package/src/i18n/it.json +23 -23
  70. package/src/i18n/nl.json +23 -23
  71. package/src/i18n/ru.json +23 -23
  72. package/src/i18n/tr.json +23 -23
  73. package/src/types/types.ts +8 -12
  74. package/src/version.json +1 -1
@@ -1,9 +1,9 @@
1
1
  {
2
- "1 Reply": "1 Risposta",
2
+ "1 Reply": "",
3
3
  "1 Thread Reply": "",
4
- "Allow access to your Gallery": "Consenti l'accesso alla tua galleria",
5
- "Allow camera access in device settings": "Consenti l'accesso alla fotocamera nelle impostazioni del dispositivo",
6
- "Also send to channel": "Invia anche al canale",
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
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -11,11 +11,11 @@
11
11
  "Copy Message": "",
12
12
  "Delete": "",
13
13
  "Delete Message": "",
14
- "Device camera is used to take photos or videos.": "La fotocamera del dispositivo viene utilizzata per scattare foto o video.",
14
+ "Device camera is used to take photos or videos.": "",
15
15
  "Do you want to send a copy of this message to a moderator for further investigation?": "",
16
16
  "Edit Message": "",
17
17
  "Editing Message": "",
18
- "Emoji matching": "",
18
+ "Emoji matching": "Abbinamento emoji",
19
19
  "Empty message...": "",
20
20
  "Error loading": "",
21
21
  "Error loading channel list...": "",
@@ -26,50 +26,50 @@
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
- "Instant Commands": "",
29
+ "Instant Commands": "Comandi Istantanei",
30
30
  "Let's start chatting!": "",
31
31
  "Links are disabled": "",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
36
- "Message Reactions": "Reazioni ai Messaggi",
36
+ "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
39
39
  "Mute User": "",
40
- "Not supported": "",
40
+ "Not supported": "non supportato",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
43
  "Only visible to you": "",
44
- "Open Settings": "Apri Impostazioni",
45
- "Photo": "",
46
- "Photos and Videos": "Foto e Video",
44
+ "Open Settings": "",
45
+ "Photo": "Foto",
46
+ "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "",
49
- "Please enable access to your photos and videos so you can share them.": "Abilita l'accesso alle tue foto e ai tuoi video in modo da poterli condividere.",
50
- "Please select a channel first": "Seleziona un canale",
49
+ "Please enable access to your photos and videos so you can share them.": "",
50
+ "Please select a channel first": "",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
54
54
  "Resend": "",
55
- "Search GIFs": "",
56
- "Select More Photos": "Seleziona Altre foto",
57
- "Send a message": "",
55
+ "Search GIFs": "Cerca GIF",
56
+ "Select More Photos": "",
57
+ "Send a message": "Mandare un messaggio",
58
58
  "Sending links is not allowed in this conversation": "",
59
- "Slow mode ON": "",
59
+ "Slow mode ON": "Slowmode attiva",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
62
62
  "Unblock User": "",
63
- "Unknown User": "Utente sconosciuto",
63
+ "Unknown User": "",
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
- "Unread Messages": "Messaggi non letti",
67
- "Video": "",
66
+ "Unread Messages": "",
67
+ "Video": "Video",
68
68
  "You": "",
69
69
  "You can't send messages in this channel": "",
70
70
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e altri {{ nonSelfUserLength }} stanno scrivendo",
71
- "{{ index }} of {{ photoLength }}": "{{ index }} di {{ photoLength }}",
72
- "{{ replyCount }} Replies": "{{ replyCount }} Risposte",
71
+ "{{ index }} of {{ photoLength }}": "",
72
+ "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "",
74
74
  "{{ user }} is typing": "{{ user }} sta scrivendo",
75
75
  "🏙 Attachment...": ""
@@ -1,9 +1,9 @@
1
1
  {
2
- "1 Reply": "1 Antwoord",
2
+ "1 Reply": "",
3
3
  "1 Thread Reply": "",
4
- "Allow access to your Gallery": "Geef toegang tot uw galerij",
5
- "Allow camera access in device settings": "Sta cameratoegang toe in de apparaatinstellingen",
6
- "Also send to channel": "Stuur ook naar kanaal",
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
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -11,11 +11,11 @@
11
11
  "Copy Message": "",
12
12
  "Delete": "",
13
13
  "Delete Message": "",
14
- "Device camera is used to take photos or videos.": "De camera van het apparaat wordt gebruikt om foto's of video's te maken.",
14
+ "Device camera is used to take photos or videos.": "",
15
15
  "Do you want to send a copy of this message to a moderator for further investigation?": "",
16
16
  "Edit Message": "",
17
17
  "Editing Message": "",
18
- "Emoji matching": "",
18
+ "Emoji matching": "Emoji-overeenkomsten",
19
19
  "Empty message...": "",
20
20
  "Error loading": "",
21
21
  "Error loading channel list...": "",
@@ -26,50 +26,50 @@
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
- "Instant Commands": "",
29
+ "Instant Commands": "Directe Opdrachten",
30
30
  "Let's start chatting!": "",
31
31
  "Links are disabled": "",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
36
- "Message Reactions": "Bericht Reacties",
36
+ "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
39
39
  "Mute User": "",
40
- "Not supported": "",
40
+ "Not supported": "niet ondersteund",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
43
  "Only visible to you": "",
44
- "Open Settings": "Open instellingen",
45
- "Photo": "",
46
- "Photos and Videos": "Foto's en video's",
44
+ "Open Settings": "",
45
+ "Photo": "Foto",
46
+ "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "",
49
- "Please enable access to your photos and videos so you can share them.": "Schakel toegang tot uw foto's en video's in zodat u ze kunt delen.",
50
- "Please select a channel first": "Selecteer eerst een kanaal",
49
+ "Please enable access to your photos and videos so you can share them.": "",
50
+ "Please select a channel first": "",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
54
54
  "Resend": "",
55
- "Search GIFs": "",
56
- "Select More Photos": "Selecteer Meer foto's",
57
- "Send a message": "",
55
+ "Search GIFs": "Zoek GIF's",
56
+ "Select More Photos": "",
57
+ "Send a message": "Stuur een bericht",
58
58
  "Sending links is not allowed in this conversation": "",
59
- "Slow mode ON": "",
59
+ "Slow mode ON": "Langzame modus aan",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
62
62
  "Unblock User": "",
63
- "Unknown User": "Onbekende gebruiker",
63
+ "Unknown User": "",
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
- "Unread Messages": "Ongelezen Berichten",
67
- "Video": "",
66
+ "Unread Messages": "",
67
+ "Video": "Video",
68
68
  "You": "",
69
69
  "You can't send messages in this channel": "",
70
70
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
71
- "{{ index }} of {{ photoLength }}": "{{ index }} van {{ photoLength }}",
72
- "{{ replyCount }} Replies": "{{ replyCount }} Antwoorden",
71
+ "{{ index }} of {{ photoLength }}": "",
72
+ "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "",
74
74
  "{{ user }} is typing": "{{ user }} is aan het typen",
75
75
  "🏙 Attachment...": ""
@@ -1,9 +1,9 @@
1
1
  {
2
- "1 Reply": "1 Ответ",
2
+ "1 Reply": "",
3
3
  "1 Thread Reply": "",
4
- "Allow access to your Gallery": "Разрешить доступ к вашей галерее",
5
- "Allow camera access in device settings": "Разрешите доступ к камере в настройках устройства.",
6
- "Also send to channel": "Также отправить на канал",
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
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -11,11 +11,11 @@
11
11
  "Copy Message": "",
12
12
  "Delete": "",
13
13
  "Delete Message": "",
14
- "Device camera is used to take photos or videos.": "Камера устройства используется для съемки фотографий или видео.",
14
+ "Device camera is used to take photos or videos.": "",
15
15
  "Do you want to send a copy of this message to a moderator for further investigation?": "",
16
16
  "Edit Message": "",
17
17
  "Editing Message": "",
18
- "Emoji matching": "",
18
+ "Emoji matching": "Соответствие эмодзи",
19
19
  "Empty message...": "",
20
20
  "Error loading": "",
21
21
  "Error loading channel list...": "",
@@ -26,50 +26,50 @@
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
- "Instant Commands": "",
29
+ "Instant Commands": "Мгновенные Команды",
30
30
  "Let's start chatting!": "",
31
31
  "Links are disabled": "",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
36
- "Message Reactions": "Сообщения Реакции",
36
+ "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
39
39
  "Mute User": "",
40
- "Not supported": "",
40
+ "Not supported": "не поддерживается",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
43
  "Only visible to you": "",
44
- "Open Settings": "Открыть настройки",
45
- "Photo": "",
46
- "Photos and Videos": "Фото и видео",
44
+ "Open Settings": "",
45
+ "Photo": "Фото",
46
+ "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "",
49
- "Please enable access to your photos and videos so you can share them.": "Разрешите доступ к своим фотографиям и видео, чтобы вы могли ими поделиться.",
50
- "Please select a channel first": "Пожалуйста, сначала выберите канал",
49
+ "Please enable access to your photos and videos so you can share them.": "",
50
+ "Please select a channel first": "",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
54
54
  "Resend": "",
55
- "Search GIFs": "",
56
- "Select More Photos": "Выбрать больше фотографий",
57
- "Send a message": "",
55
+ "Search GIFs": "Поиск GIF",
56
+ "Select More Photos": "",
57
+ "Send a message": "Отправить сообщение",
58
58
  "Sending links is not allowed in this conversation": "",
59
- "Slow mode ON": "",
59
+ "Slow mode ON": "Медленный режим включен",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
62
62
  "Unblock User": "",
63
- "Unknown User": "Неизвестный пользователь",
63
+ "Unknown User": "",
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
- "Unread Messages": "Непрочитанные Сообщения",
67
- "Video": "",
66
+ "Unread Messages": "",
67
+ "Video": "видео",
68
68
  "You": "",
69
69
  "You can't send messages in this channel": "",
70
70
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
71
- "{{ index }} of {{ photoLength }}": "{{ index }} из {{ photoLength }}",
72
- "{{ replyCount }} Replies": "{{ replyCount }} Ответов",
71
+ "{{ index }} of {{ photoLength }}": "",
72
+ "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "",
74
74
  "{{ user }} is typing": "{{ user }} пишет",
75
75
  "🏙 Attachment...": ""
@@ -1,9 +1,9 @@
1
1
  {
2
- "1 Reply": "1 Cevap",
2
+ "1 Reply": "",
3
3
  "1 Thread Reply": "",
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",
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
8
  "Block User": "",
9
9
  "Cancel": "",
@@ -11,11 +11,11 @@
11
11
  "Copy Message": "",
12
12
  "Delete": "",
13
13
  "Delete Message": "",
14
- "Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
14
+ "Device camera is used to take photos or videos.": "",
15
15
  "Do you want to send a copy of this message to a moderator for further investigation?": "",
16
16
  "Edit Message": "",
17
17
  "Editing Message": "",
18
- "Emoji matching": "",
18
+ "Emoji matching": "Emoji eşleştirme",
19
19
  "Empty message...": "",
20
20
  "Error loading": "",
21
21
  "Error loading channel list...": "",
@@ -26,50 +26,50 @@
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
- "Instant Commands": "",
29
+ "Instant Commands": "Anlık Komutlar",
30
30
  "Let's start chatting!": "",
31
31
  "Links are disabled": "",
32
32
  "Loading channels...": "",
33
33
  "Loading messages...": "",
34
34
  "Loading...": "",
35
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
36
- "Message Reactions": "Mesaj Tepkileri",
36
+ "Message Reactions": "",
37
37
  "Message deleted": "",
38
38
  "Message flagged": "",
39
39
  "Mute User": "",
40
- "Not supported": "",
40
+ "Not supported": "Desteklenmiyor",
41
41
  "Nothing yet...": "",
42
42
  "Ok": "",
43
43
  "Only visible to you": "",
44
- "Open Settings": "Ayarları aç",
45
- "Photo": "",
46
- "Photos and Videos": "Fotoğraflar ve Videolar",
44
+ "Open Settings": "",
45
+ "Photo": "Fotoğraf",
46
+ "Photos and Videos": "",
47
47
  "Pin to Conversation": "",
48
48
  "Pinned by": "",
49
- "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
- "Please select a channel first": "Lütfen önce bir kanal seçiniz",
49
+ "Please enable access to your photos and videos so you can share them.": "",
50
+ "Please select a channel first": "",
51
51
  "Reconnecting...": "",
52
52
  "Reply": "",
53
53
  "Reply to Message": "",
54
54
  "Resend": "",
55
- "Search GIFs": "",
56
- "Select More Photos": "Daha Fazla Fotoğraf Seçin",
57
- "Send a message": "",
55
+ "Search GIFs": "GIF Ara",
56
+ "Select More Photos": "",
57
+ "Send a message": "Mesaj gönder",
58
58
  "Sending links is not allowed in this conversation": "",
59
- "Slow mode ON": "",
59
+ "Slow mode ON": "Yavaş Mod Açık",
60
60
  "The message has been reported to a moderator.": "",
61
61
  "Thread Reply": "",
62
62
  "Unblock User": "",
63
- "Unknown User": "Bilinmeyen kullanıcı",
63
+ "Unknown User": "",
64
64
  "Unmute User": "",
65
65
  "Unpin from Conversation": "",
66
- "Unread Messages": "Okunmamış Mesajlar",
67
- "Video": "",
66
+ "Unread Messages": "",
67
+ "Video": "Video",
68
68
  "You": "",
69
69
  "You can't send messages in this channel": "",
70
70
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
71
- "{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
72
- "{{ replyCount }} Replies": "{{ replyCount }} Cevap",
71
+ "{{ index }} of {{ photoLength }}": "",
72
+ "{{ replyCount }} Replies": "",
73
73
  "{{ replyCount }} Thread Replies": "",
74
74
  "{{ user }} is typing": "{{ user }} yazıyor",
75
75
  "🏙 Attachment...": ""
@@ -1,28 +1,25 @@
1
1
  import type { ExtendableGenerics, LiteralStringForUnion } from 'stream-chat';
2
2
  export declare type Asset = {
3
- duration: number | null;
4
- filename: string;
3
+ duration: number;
5
4
  height: number;
5
+ name: string;
6
6
  source: 'camera' | 'picker';
7
7
  type: string;
8
8
  uri: string;
9
9
  width: number;
10
- fileSize?: number;
11
10
  id?: string;
12
- size?: number | string;
11
+ size?: number;
13
12
  };
14
- export declare type FileAssetType = {
13
+ export declare type File = {
15
14
  name: string;
15
+ duration?: number;
16
+ id?: string;
16
17
  mimeType?: string;
17
- size?: number | string;
18
+ size?: number;
18
19
  uri?: string;
19
20
  };
20
- export declare type File = FileAssetType & {
21
- duration?: string | null;
22
- id?: string;
23
- };
24
21
  export declare type DefaultAttachmentType = UnknownType & {
25
- file_size?: number | string;
22
+ file_size?: number;
26
23
  mime_type?: string;
27
24
  originalFile?: File;
28
25
  };
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.22.0-beta.6",
4
+ "version": "5.22.0-beta.8",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -71,15 +71,15 @@ const AttachmentVideo: React.FC<AttachmentVideoProps> = (props) => {
71
71
  const localAssetURI = Platform.OS === 'ios' && asset.id && (await getLocalAssetUri(asset.id));
72
72
  const uri = localAssetURI || asset.uri || '';
73
73
  // We need a mime-type to upload a video file.
74
- const mimeType = lookup(asset.filename) || 'multipart/form-data';
74
+ const mimeType = lookup(asset.name) || 'multipart/form-data';
75
75
  return [
76
76
  ...files,
77
77
  {
78
- duration: durationLabel,
78
+ duration: asset.duration,
79
79
  id: asset.id,
80
80
  mimeType,
81
- name: asset.filename,
82
- size: asset.fileSize,
81
+ name: asset.name,
82
+ size: asset.size,
83
83
  uri,
84
84
  },
85
85
  ];
@@ -0,0 +1,23 @@
1
+ import { generateMarkdownText } from './generateMarkdownText';
2
+
3
+ describe('generateMarkdownText', () => {
4
+ it.each([
5
+ ['', null],
6
+ [' test message ', 'test message'],
7
+ ['https://www.getstream.io', '[https://www.getstream.io](https://www.getstream.io)'],
8
+ [
9
+ 'https://getstream-production.s3-accelerate.amazonaws.com/N336903591601695/33e78ef89e64642862a75c5cca2541eaf6b1c924/trimmedVideos/alert/2_270_881/outputVideo.mp4?AWSAccessKeyId=AKIAVJAW2AD2SQVQCBXV&Expires=1699998768&Signature=zdEMCGzf4Pq++16YkPprvN5NAds=',
10
+ '[https://getstream-production.s3-accelerate.amazonaws.com/N336903591601695/33e78ef89e64642862a75c5cca2541eaf6b1c924/trimmedVideos/alert/2_270_881/outputVideo.mp4?AWSAccessKeyId=AKIAVJAW2AD2SQVQCBXV&...](https://getstream-production.s3-accelerate.amazonaws.com/N336903591601695/33e78ef89e64642862a75c5cca2541eaf6b1c924/trimmedVideos/alert/2_270_881/outputVideo.mp4?AWSAccessKeyId=AKIAVJAW2AD2SQVQCBXV&Expires=1699998768&Signature=zdEMCGzf4Pq++16YkPprvN5NAds=)',
11
+ ],
12
+ ['Hi @getstream.io', 'Hi @getstream.io'],
13
+ [
14
+ 'Hi test@gmail.com @test@gmail.com',
15
+ 'Hi [test@gmail.com](mailto:test@gmail.com) @test@gmail.com',
16
+ ],
17
+ ['Hi @getstream.io getstream.io', 'Hi @getstream.io [getstream.io](http://getstream.io)'],
18
+ ['Hi <Stream>', 'Hi \\<Stream\\>'],
19
+ ])('Returns the generated markdown text for %p and %p', (text, expected) => {
20
+ const result = generateMarkdownText(text);
21
+ expect(result).toBe(expected);
22
+ });
23
+ });
@@ -2,16 +2,12 @@ import truncate from 'lodash/truncate';
2
2
 
3
3
  import { parseLinksFromText } from './parseLinks';
4
4
 
5
- import type { DefaultStreamChatGenerics } from '../../../../types/types';
6
- import type { MessageType } from '../../../MessageList/hooks/useMessageList';
7
-
8
- export const generateMarkdownText = <
9
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
10
- >(
11
- message: MessageType<StreamChatGenerics>,
12
- ) => {
13
- const { text } = message;
5
+ // If you need to use any of the special characters literally (actually searching for a "*", for instance), you must escape it by putting a backslash in front of it.
6
+ function escapeRegExp(text: string) {
7
+ return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
8
+ }
14
9
 
10
+ export const generateMarkdownText = (text?: string) => {
15
11
  if (!text) return null;
16
12
 
17
13
  // Trim the extra spaces from the text.
@@ -26,18 +22,21 @@ export const generateMarkdownText = <
26
22
  omission: '...',
27
23
  });
28
24
  // Convert raw links/emails in the text to respective markdown syntax.
29
- // Eg: Hi getstream.io -> Hi [getstream.io](getstream.io).
30
- const normalRegEx = new RegExp(linkInfo.raw, 'g');
25
+ // Eg: Hi @getstream.io -> Hi @[getstream.io](getstream.io).
26
+ const normalRegEx = new RegExp(escapeRegExp(linkInfo.raw), 'g');
31
27
  const markdown = `[${displayLink}](${linkInfo.encodedUrl})`;
32
28
  resultText = text.replace(normalRegEx, markdown);
33
29
 
34
30
  // After previous step, in some cases, the mentioned user after `@` might have a link/email so we convert it back to normal raw text.
35
31
  // Eg: Hi, @[test.user@gmail.com](mailto:test.user@gmail.com) to @test.user@gmail.com.
36
- const mentionsRegex = new RegExp(`@\\[${displayLink}\\]\\(${linkInfo.encodedUrl}\\)`, 'g');
32
+ const mentionsRegex = new RegExp(
33
+ `@\\[${escapeRegExp(displayLink)}\\]\\(${escapeRegExp(linkInfo.encodedUrl)}\\)`,
34
+ 'g',
35
+ );
37
36
  resultText = resultText.replace(mentionsRegex, `@${displayLink}`);
38
37
  }
39
38
 
40
- resultText = resultText.replace(/[<&"'>]/g, '\\$&');
39
+ resultText = resultText.replace(/[<"'>]/g, '\\$&');
41
40
 
42
41
  return resultText;
43
42
  };
@@ -100,8 +100,9 @@ export const renderText = <
100
100
  onPress: onPressParam,
101
101
  preventPress,
102
102
  } = params;
103
+ const { text } = message;
103
104
 
104
- const markdownText = generateMarkdownText<StreamChatGenerics>(message);
105
+ const markdownText = generateMarkdownText(text);
105
106
 
106
107
  const styles: MarkdownStyle = {
107
108
  ...defaultMarkdownStyles,
@@ -141,8 +142,17 @@ export const renderText = <
141
142
  : Linking.canOpenURL(url).then((canOpenUrl) => canOpenUrl && Linking.openURL(url));
142
143
  };
143
144
 
145
+ let previousLink: string | undefined;
144
146
  const linkReact: ReactNodeOutput = (node, output, { ...state }) => {
145
- const url = node.target;
147
+ let url: string;
148
+ // Some long URLs with `&` separated parameters are trimmed and the url only until first param is taken.
149
+ // This is done because of internal link been taken from the original URL in react-native-markdown-package. So, we check for `withinLink` and take the previous full URL.
150
+ if (state?.withinLink && previousLink) {
151
+ url = previousLink;
152
+ } else {
153
+ url = node.target;
154
+ previousLink = node.target;
155
+ }
146
156
  const onPress = (event: GestureResponderEvent) => {
147
157
  if (!preventPress && onPressParam) {
148
158
  onPressParam({
@@ -1,6 +1,8 @@
1
1
  import React, { useEffect, useRef, useState } from 'react';
2
2
  import { FlatList, I18nManager, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
3
3
 
4
+ import dayjs from 'dayjs';
5
+
4
6
  import { UploadProgressIndicator } from './UploadProgressIndicator';
5
7
 
6
8
  import { ChatContextValue, useChatContext } from '../../contexts';
@@ -101,6 +103,19 @@ const UnsupportedFileTypeOrFileSizeIndicator = ({
101
103
  },
102
104
  } = useTheme();
103
105
 
106
+ const ONE_HOUR_IN_SECONDS = 3600;
107
+ let durationLabel = '00:00';
108
+ const videoDuration = item.file.duration;
109
+
110
+ if (videoDuration) {
111
+ const isDurationLongerThanHour = videoDuration / ONE_HOUR_IN_SECONDS >= 1;
112
+ const formattedDurationParam = isDurationLongerThanHour ? 'HH:mm:ss' : 'mm:ss';
113
+ const formattedVideoDuration = dayjs
114
+ .duration(videoDuration, 'second')
115
+ .format(formattedDurationParam);
116
+ durationLabel = formattedVideoDuration;
117
+ }
118
+
104
119
  const { t } = useTranslationContext();
105
120
 
106
121
  return indicatorType === ProgressIndicatorTypes.NOT_SUPPORTED ? (
@@ -117,7 +132,7 @@ const UnsupportedFileTypeOrFileSizeIndicator = ({
117
132
  </View>
118
133
  ) : (
119
134
  <WritingDirectionAwareText style={[styles.fileSizeText, { color: grey }, fileSizeText]}>
120
- {item.file.duration || getFileSizeDisplayText(item.file.size)}
135
+ {videoDuration ? durationLabel : getFileSizeDisplayText(item.file.size)}
121
136
  </WritingDirectionAwareText>
122
137
  );
123
138
  };
@@ -288,7 +288,7 @@ const MessageInputWithContext = <
288
288
  // Check if the file size of the image exceeds the threshold of 100MB
289
289
  if (
290
290
  imageToUpload &&
291
- Number(imageToUpload.fileSize) / MEGA_BYTES_TO_BYTES > MAX_FILE_SIZE_TO_UPLOAD_IN_MB
291
+ Number(imageToUpload.size) / MEGA_BYTES_TO_BYTES > MAX_FILE_SIZE_TO_UPLOAD_IN_MB
292
292
  ) {
293
293
  Alert.alert(
294
294
  t(
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { PropsWithChildren } from 'react';
2
2
  import {
3
3
  ActivityIndicator,
4
4
  GestureResponderEvent,
@@ -24,7 +24,7 @@ export type UploadProgressIndicatorProps = {
24
24
  type?: 'in_progress' | 'retry' | 'not_supported' | 'inactive' | null;
25
25
  };
26
26
 
27
- export const UploadProgressIndicator: React.FC<UploadProgressIndicatorProps> = (props) => {
27
+ export const UploadProgressIndicator = (props: PropsWithChildren<UploadProgressIndicatorProps>) => {
28
28
  const { action, children, style, type } = props;
29
29
 
30
30
  const {
@@ -39,12 +39,12 @@ describe('MessageInput', () => {
39
39
  selectedImages: [
40
40
  generateImageAttachment({
41
41
  file: { height: 100, uri: 'https://picsum.photos/200/300', width: 100 },
42
- fileSize: 500000000,
42
+ size: 500000000,
43
43
  uri: 'https://picsum.photos/200/300',
44
44
  }),
45
45
  generateImageAttachment({
46
46
  file: { height: 100, uri: 'https://picsum.photos/200/300', width: 100 },
47
- fileSize: 600000000,
47
+ size: 600000000,
48
48
  uri: 'https://picsum.photos/200/300',
49
49
  }),
50
50
  ],