stream-chat-react-native-core 5.22.0-beta.1 → 5.22.0-beta.10

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 (269) hide show
  1. package/README.md +10 -5
  2. package/lib/commonjs/components/Attachment/AudioAttachment.js +12 -12
  3. package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -1
  4. package/lib/commonjs/components/Attachment/FileAttachment.js +10 -7
  5. package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
  6. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +8 -6
  7. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  8. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +24 -20
  9. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
  10. package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js +26 -11
  11. package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
  12. package/lib/commonjs/components/Channel/Channel.js +65 -46
  13. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  14. package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +2 -0
  15. package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  16. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -2
  17. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  18. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +16 -14
  19. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  20. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js +4 -2
  21. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  22. package/lib/commonjs/components/ImageGallery/ImageGallery.js +29 -32
  23. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  24. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +7 -5
  25. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  26. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +10 -8
  27. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
  28. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +10 -8
  29. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  30. package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +17 -12
  31. package/lib/commonjs/components/Indicators/EmptyStateIndicator.js.map +1 -1
  32. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +20 -17
  33. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
  34. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +18 -17
  35. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
  36. package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js +7 -5
  37. package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -1
  38. package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.test.js +8 -0
  39. package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.test.js.map +1 -0
  40. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +25 -17
  41. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  42. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +30 -20
  43. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  44. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +13 -13
  45. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
  46. package/lib/commonjs/components/MessageInput/MessageInput.js +1 -1
  47. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  48. package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js.map +1 -1
  49. package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +13 -11
  50. package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js.map +1 -1
  51. package/lib/commonjs/components/MessageOverlay/MessageActionList.js +8 -14
  52. package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
  53. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +11 -8
  54. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  55. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +32 -29
  56. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
  57. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +17 -15
  58. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  59. package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
  60. package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
  61. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +66 -45
  62. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  63. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -2
  64. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  65. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  66. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  67. package/lib/commonjs/contexts/themeContext/utils/theme.js +1 -4
  68. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  69. package/lib/commonjs/hooks/index.js +11 -0
  70. package/lib/commonjs/hooks/index.js.map +1 -1
  71. package/lib/commonjs/hooks/useViewport.js +47 -0
  72. package/lib/commonjs/hooks/useViewport.js.map +1 -0
  73. package/lib/commonjs/i18n/en.json +5 -0
  74. package/lib/commonjs/i18n/es.json +6 -1
  75. package/lib/commonjs/i18n/fr.json +20 -15
  76. package/lib/commonjs/i18n/he.json +6 -1
  77. package/lib/commonjs/i18n/hi.json +20 -15
  78. package/lib/commonjs/i18n/it.json +20 -15
  79. package/lib/commonjs/i18n/ja.json +6 -1
  80. package/lib/commonjs/i18n/ko.json +6 -1
  81. package/lib/commonjs/i18n/nl.json +20 -15
  82. package/lib/commonjs/i18n/ru.json +20 -15
  83. package/lib/commonjs/i18n/tr.json +20 -15
  84. package/lib/commonjs/native.js.map +1 -1
  85. package/lib/commonjs/types/types.js.map +1 -1
  86. package/lib/commonjs/utils/compressImage.js +37 -0
  87. package/lib/commonjs/utils/compressImage.js.map +1 -0
  88. package/lib/commonjs/utils/utils.js +1 -15
  89. package/lib/commonjs/utils/utils.js.map +1 -1
  90. package/lib/commonjs/version.json +1 -1
  91. package/lib/module/components/Attachment/AudioAttachment.js +12 -12
  92. package/lib/module/components/Attachment/AudioAttachment.js.map +1 -1
  93. package/lib/module/components/Attachment/FileAttachment.js +10 -7
  94. package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
  95. package/lib/module/components/AttachmentPicker/AttachmentPicker.js +8 -6
  96. package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  97. package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +24 -20
  98. package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
  99. package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js +26 -11
  100. package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
  101. package/lib/module/components/Channel/Channel.js +65 -46
  102. package/lib/module/components/Channel/Channel.js.map +1 -1
  103. package/lib/module/components/Channel/hooks/useCreateChannelContext.js +2 -0
  104. package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  105. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -2
  106. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  107. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +16 -14
  108. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  109. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js +4 -2
  110. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  111. package/lib/module/components/ImageGallery/ImageGallery.js +29 -32
  112. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  113. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +7 -5
  114. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  115. package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +10 -8
  116. package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
  117. package/lib/module/components/ImageGallery/components/ImageGrid.js +10 -8
  118. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  119. package/lib/module/components/Indicators/EmptyStateIndicator.js +17 -12
  120. package/lib/module/components/Indicators/EmptyStateIndicator.js.map +1 -1
  121. package/lib/module/components/Message/MessageSimple/MessageContent.js +20 -17
  122. package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
  123. package/lib/module/components/Message/MessageSimple/ReactionList.js +18 -17
  124. package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
  125. package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js +7 -5
  126. package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -1
  127. package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.test.js +8 -0
  128. package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.test.js.map +1 -0
  129. package/lib/module/components/Message/MessageSimple/utils/renderText.js +25 -17
  130. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  131. package/lib/module/components/MessageInput/FileUploadPreview.js +30 -20
  132. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  133. package/lib/module/components/MessageInput/ImageUploadPreview.js +13 -13
  134. package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
  135. package/lib/module/components/MessageInput/MessageInput.js +1 -1
  136. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  137. package/lib/module/components/MessageInput/UploadProgressIndicator.js.map +1 -1
  138. package/lib/module/components/MessageList/InlineUnreadIndicator.js +13 -11
  139. package/lib/module/components/MessageList/InlineUnreadIndicator.js.map +1 -1
  140. package/lib/module/components/MessageOverlay/MessageActionList.js +8 -14
  141. package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
  142. package/lib/module/components/MessageOverlay/MessageActionListItem.js +11 -8
  143. package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  144. package/lib/module/components/MessageOverlay/MessageOverlay.js +32 -29
  145. package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
  146. package/lib/module/components/Thread/components/ThreadFooterComponent.js +17 -15
  147. package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  148. package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
  149. package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
  150. package/lib/module/contexts/messageInputContext/MessageInputContext.js +66 -45
  151. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  152. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -2
  153. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  154. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  155. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  156. package/lib/module/contexts/themeContext/utils/theme.js +1 -4
  157. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  158. package/lib/module/hooks/index.js +11 -0
  159. package/lib/module/hooks/index.js.map +1 -1
  160. package/lib/module/hooks/useViewport.js +47 -0
  161. package/lib/module/hooks/useViewport.js.map +1 -0
  162. package/lib/module/i18n/en.json +5 -0
  163. package/lib/module/i18n/es.json +6 -1
  164. package/lib/module/i18n/fr.json +20 -15
  165. package/lib/module/i18n/he.json +6 -1
  166. package/lib/module/i18n/hi.json +20 -15
  167. package/lib/module/i18n/it.json +20 -15
  168. package/lib/module/i18n/ja.json +6 -1
  169. package/lib/module/i18n/ko.json +6 -1
  170. package/lib/module/i18n/nl.json +20 -15
  171. package/lib/module/i18n/ru.json +20 -15
  172. package/lib/module/i18n/tr.json +20 -15
  173. package/lib/module/native.js.map +1 -1
  174. package/lib/module/types/types.js.map +1 -1
  175. package/lib/module/utils/compressImage.js +37 -0
  176. package/lib/module/utils/compressImage.js.map +1 -0
  177. package/lib/module/utils/utils.js +1 -15
  178. package/lib/module/utils/utils.js.map +1 -1
  179. package/lib/module/version.json +1 -1
  180. package/lib/typescript/components/Attachment/AudioAttachment.d.ts +1 -1
  181. package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
  182. package/lib/typescript/components/Message/MessageSimple/utils/generateMarkdownText.d.ts +1 -3
  183. package/lib/typescript/components/Message/MessageSimple/utils/generateMarkdownText.test.d.ts +1 -0
  184. package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +1 -1
  185. package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +1 -1
  186. package/lib/typescript/components/MessageInput/UploadProgressIndicator.d.ts +5 -2
  187. package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +5 -0
  188. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +1 -1
  189. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +3 -23
  190. package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +2 -2
  191. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +2 -2
  192. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -3
  193. package/lib/typescript/hooks/index.d.ts +1 -0
  194. package/lib/typescript/hooks/useViewport.d.ts +11 -0
  195. package/lib/typescript/i18n/en.json +5 -0
  196. package/lib/typescript/i18n/es.json +6 -1
  197. package/lib/typescript/i18n/fr.json +20 -15
  198. package/lib/typescript/i18n/he.json +6 -1
  199. package/lib/typescript/i18n/hi.json +20 -15
  200. package/lib/typescript/i18n/it.json +20 -15
  201. package/lib/typescript/i18n/ja.json +6 -1
  202. package/lib/typescript/i18n/ko.json +6 -1
  203. package/lib/typescript/i18n/nl.json +20 -15
  204. package/lib/typescript/i18n/ru.json +20 -15
  205. package/lib/typescript/i18n/tr.json +20 -15
  206. package/lib/typescript/native.d.ts +2 -0
  207. package/lib/typescript/store/mappers/mapStorableToChannel.d.ts +1 -1
  208. package/lib/typescript/types/types.d.ts +27 -10
  209. package/lib/typescript/utils/Streami18n.d.ts +5 -5
  210. package/lib/typescript/utils/compressImage.d.ts +8 -0
  211. package/lib/typescript/utils/utils.d.ts +0 -2
  212. package/package.json +2 -2
  213. package/src/components/Attachment/AudioAttachment.tsx +2 -1
  214. package/src/components/Attachment/FileAttachment.tsx +12 -3
  215. package/src/components/AttachmentPicker/AttachmentPicker.tsx +4 -2
  216. package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +7 -5
  217. package/src/components/AttachmentPicker/components/AttachmentSelectionBar.tsx +13 -1
  218. package/src/components/Channel/Channel.tsx +32 -8
  219. package/src/components/Channel/hooks/useCreateChannelContext.ts +2 -0
  220. package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +2 -9
  221. package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +4 -3
  222. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +4 -3
  223. package/src/components/ImageGallery/ImageGallery.tsx +9 -19
  224. package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +5 -3
  225. package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx +5 -3
  226. package/src/components/ImageGallery/components/ImageGrid.tsx +2 -1
  227. package/src/components/Indicators/EmptyStateIndicator.tsx +8 -7
  228. package/src/components/Message/MessageSimple/MessageContent.tsx +3 -1
  229. package/src/components/Message/MessageSimple/ReactionList.tsx +2 -1
  230. package/src/components/Message/MessageSimple/utils/generateMarkdownText.test.ts +23 -0
  231. package/src/components/Message/MessageSimple/utils/generateMarkdownText.ts +12 -13
  232. package/src/components/Message/MessageSimple/utils/renderText.tsx +12 -2
  233. package/src/components/MessageInput/FileUploadPreview.tsx +17 -3
  234. package/src/components/MessageInput/ImageUploadPreview.tsx +1 -2
  235. package/src/components/MessageInput/MessageInput.tsx +1 -1
  236. package/src/components/MessageInput/UploadProgressIndicator.tsx +2 -2
  237. package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.tsx +1 -1
  238. package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewNative.test.tsx +1 -1
  239. package/src/components/MessageInput/__tests__/MessageInput.test.js +2 -2
  240. package/src/components/MessageList/InlineUnreadIndicator.tsx +2 -1
  241. package/src/components/MessageOverlay/MessageActionList.tsx +3 -11
  242. package/src/components/MessageOverlay/MessageActionListItem.tsx +5 -2
  243. package/src/components/MessageOverlay/MessageOverlay.tsx +5 -3
  244. package/src/components/Thread/components/ThreadFooterComponent.tsx +2 -1
  245. package/src/contexts/channelContext/ChannelContext.tsx +5 -0
  246. package/src/contexts/messageInputContext/MessageInputContext.tsx +81 -69
  247. package/src/contexts/messageInputContext/__tests__/__snapshots__/sendMessage.test.tsx.snap +3 -3
  248. package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +2 -2
  249. package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +2 -2
  250. package/src/contexts/messagesContext/MessagesContext.tsx +2 -2
  251. package/src/contexts/themeContext/utils/theme.ts +2 -7
  252. package/src/hooks/index.ts +1 -0
  253. package/src/hooks/useViewport.ts +41 -0
  254. package/src/i18n/en.json +5 -0
  255. package/src/i18n/es.json +6 -1
  256. package/src/i18n/fr.json +20 -15
  257. package/src/i18n/he.json +6 -1
  258. package/src/i18n/hi.json +20 -15
  259. package/src/i18n/it.json +20 -15
  260. package/src/i18n/ja.json +6 -1
  261. package/src/i18n/ko.json +6 -1
  262. package/src/i18n/nl.json +20 -15
  263. package/src/i18n/ru.json +20 -15
  264. package/src/i18n/tr.json +20 -15
  265. package/src/native.ts +5 -1
  266. package/src/types/types.ts +29 -10
  267. package/src/utils/compressImage.ts +32 -0
  268. package/src/utils/utils.ts +0 -13
  269. package/src/version.json +1 -1
package/src/i18n/it.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
- "1 Reply": "1 Risposta",
3
- "1 Thread Reply": "1 Risposta alla Discussione",
4
- "Allow access to your Gallery": "Consenti l'accesso alla tua galleria",
5
- "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": "Invia anche al canale",
6
7
  "Are you sure you want to permanently delete this message?": "",
7
8
  "Block User": "",
8
9
  "Cancel": "",
@@ -10,10 +11,11 @@
10
11
  "Copy Message": "",
11
12
  "Delete": "",
12
13
  "Delete Message": "",
14
+ "Device camera is used to take photos or videos.": "",
13
15
  "Do you want to send a copy of this message to a moderator for further investigation?": "",
14
16
  "Edit Message": "",
15
17
  "Editing Message": "",
16
- "Emoji matching": "",
18
+ "Emoji matching": "Abbinamento emoji",
17
19
  "Empty message...": "",
18
20
  "Error loading": "",
19
21
  "Error loading channel list...": "",
@@ -23,13 +25,15 @@
23
25
  "Flag": "",
24
26
  "Flag Message": "",
25
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
26
- "Instant Commands": "",
28
+ "How about sending your first message to a friend?": "",
29
+ "Instant Commands": "Comandi Istantanei",
30
+ "Let's start chatting!": "",
27
31
  "Links are disabled": "",
28
32
  "Loading channels...": "",
29
33
  "Loading messages...": "",
30
34
  "Loading...": "",
31
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
32
- "Message Reactions": "Reazioni ai Messaggi",
36
+ "Message Reactions": "",
33
37
  "Message deleted": "",
34
38
  "Message flagged": "",
35
39
  "Mute User": "",
@@ -37,25 +41,26 @@
37
41
  "Nothing yet...": "",
38
42
  "Ok": "",
39
43
  "Only visible to you": "Visibile solo a te",
44
+ "Open Settings": "",
40
45
  "Photo": "Foto",
41
- "Photos and Videos": "Foto e Video",
46
+ "Photos and Videos": "",
42
47
  "Pin to Conversation": "",
43
- "Pinned by": "Fissato da",
44
- "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.",
48
+ "Pinned by": "",
49
+ "Please enable access to your photos and videos so you can share them.": "",
45
50
  "Please select a channel first": "",
46
51
  "Reconnecting...": "",
47
52
  "Reply": "",
48
53
  "Reply to Message": "",
49
54
  "Resend": "",
50
55
  "Search GIFs": "",
51
- "Select More Photos": "Seleziona Altre foto",
56
+ "Select More Photos": "",
52
57
  "Send a message": "",
53
58
  "Sending links is not allowed in this conversation": "",
54
59
  "Slow mode ON": "",
55
60
  "The message has been reported to a moderator.": "",
56
61
  "Thread Reply": "",
57
62
  "Unblock User": "",
58
- "Unknown User": "Utente sconosciuto",
63
+ "Unknown User": "",
59
64
  "Unmute User": "",
60
65
  "Unpin from Conversation": "",
61
66
  "Unread Messages": "Messaggi non letti",
@@ -63,9 +68,9 @@
63
68
  "You": "",
64
69
  "You can't send messages in this channel": "",
65
70
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e altri {{ nonSelfUserLength }} stanno scrivendo",
66
- "{{ index }} of {{ photoLength }}": "{{ index }} di {{ photoLength }}",
67
- "{{ replyCount }} Replies": "{{ replyCount }} Risposte",
68
- "{{ replyCount }} Thread Replies": "{{replyCount}} Risposte alle Conversazione",
71
+ "{{ index }} of {{ photoLength }}": "",
72
+ "{{ replyCount }} Replies": "",
73
+ "{{ replyCount }} Thread Replies": "",
69
74
  "{{ user }} is typing": "{{ user }} sta scrivendo",
70
75
  "🏙 Attachment...": ""
71
76
  }
package/src/i18n/ja.json CHANGED
@@ -71,5 +71,10 @@
71
71
  "Not supported": "サポートしていません",
72
72
  "Select More Photos": "さらに写真を選択",
73
73
  "File type not supported": "サポートされていないファイルです",
74
- "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}} MB 以下のファイルをアップロードしてください"
74
+ "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}} MB 以下のファイルをアップロードしてください",
75
+ "Let's start chatting!": "チャットを始めましょう!",
76
+ "How about sending your first message to a friend?": "初めてのメッセージを友達に送ってみてはいかがでしょうか?",
77
+ "Allow camera access in device settings": "デバイス設定でカメラへのアクセスを許可する",
78
+ "Device camera is used to take photos or videos.": "デバイスのカメラは写真やビデオの撮影に使用されます。",
79
+ "Open Settings": "設定を開く"
75
80
  }
package/src/i18n/ko.json CHANGED
@@ -70,5 +70,10 @@
70
70
  "File type not supported": "지원하지 않는 파일입니다.",
71
71
  "Select More Photos": "추가 사진 선택",
72
72
  "Not supported": "지원하지 않습니다",
73
- "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}}MB 미만의 파일을 업로드하세요."
73
+ "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}}MB 미만의 파일을 업로드하세요.",
74
+ "Let's start chatting!": "채팅을 시작합시다!",
75
+ "How about sending your first message to a friend?": "친구에게 첫 번째 메시지를 보내는 것은 어떻습니까?",
76
+ "Allow camera access in device settings": "기기 설정에서 카메라 액세스를 허용하세요.",
77
+ "Device camera is used to take photos or videos.": "기기 카메라는 사진이나 동영상을 촬영하는 데 사용됩니다.",
78
+ "Open Settings": "설정 열기"
74
79
  }
package/src/i18n/nl.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
- "1 Reply": "1 Antwoord",
3
- "1 Thread Reply": "1 thread antwoord",
4
- "Allow access to your Gallery": "Geef toegang tot uw galerij",
5
- "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": "Stuur ook naar kanaal",
6
7
  "Are you sure you want to permanently delete this message?": "",
7
8
  "Block User": "",
8
9
  "Cancel": "",
@@ -10,10 +11,11 @@
10
11
  "Copy Message": "",
11
12
  "Delete": "",
12
13
  "Delete Message": "",
14
+ "Device camera is used to take photos or videos.": "",
13
15
  "Do you want to send a copy of this message to a moderator for further investigation?": "",
14
16
  "Edit Message": "",
15
17
  "Editing Message": "",
16
- "Emoji matching": "",
18
+ "Emoji matching": "Emoji-overeenkomsten",
17
19
  "Empty message...": "",
18
20
  "Error loading": "",
19
21
  "Error loading channel list...": "",
@@ -23,13 +25,15 @@
23
25
  "Flag": "",
24
26
  "Flag Message": "",
25
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
26
- "Instant Commands": "",
28
+ "How about sending your first message to a friend?": "",
29
+ "Instant Commands": "Directe Opdrachten",
30
+ "Let's start chatting!": "",
27
31
  "Links are disabled": "",
28
32
  "Loading channels...": "",
29
33
  "Loading messages...": "",
30
34
  "Loading...": "",
31
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
32
- "Message Reactions": "Bericht Reacties",
36
+ "Message Reactions": "",
33
37
  "Message deleted": "",
34
38
  "Message flagged": "",
35
39
  "Mute User": "",
@@ -37,25 +41,26 @@
37
41
  "Nothing yet...": "",
38
42
  "Ok": "",
39
43
  "Only visible to you": "Alleen zichtbaar voor jou",
44
+ "Open Settings": "",
40
45
  "Photo": "Foto",
41
- "Photos and Videos": "Foto's en video's",
46
+ "Photos and Videos": "",
42
47
  "Pin to Conversation": "",
43
- "Pinned by": "Vastgemaakt door",
44
- "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.",
48
+ "Pinned by": "",
49
+ "Please enable access to your photos and videos so you can share them.": "",
45
50
  "Please select a channel first": "",
46
51
  "Reconnecting...": "",
47
52
  "Reply": "",
48
53
  "Reply to Message": "",
49
54
  "Resend": "",
50
55
  "Search GIFs": "",
51
- "Select More Photos": "Selecteer Meer foto's",
56
+ "Select More Photos": "",
52
57
  "Send a message": "",
53
58
  "Sending links is not allowed in this conversation": "",
54
59
  "Slow mode ON": "",
55
60
  "The message has been reported to a moderator.": "",
56
61
  "Thread Reply": "",
57
62
  "Unblock User": "",
58
- "Unknown User": "Onbekende gebruiker",
63
+ "Unknown User": "",
59
64
  "Unmute User": "",
60
65
  "Unpin from Conversation": "",
61
66
  "Unread Messages": "Ongelezen Berichten",
@@ -63,9 +68,9 @@
63
68
  "You": "",
64
69
  "You can't send messages in this channel": "",
65
70
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
66
- "{{ index }} of {{ photoLength }}": "{{ index }} van {{ photoLength }}",
67
- "{{ replyCount }} Replies": "{{ replyCount }} Antwoorden",
68
- "{{ replyCount }} Thread Replies": "{{replyCount}} Discussiereacties",
71
+ "{{ index }} of {{ photoLength }}": "",
72
+ "{{ replyCount }} Replies": "",
73
+ "{{ replyCount }} Thread Replies": "",
69
74
  "{{ user }} is typing": "{{ user }} is aan het typen",
70
75
  "🏙 Attachment...": ""
71
76
  }
package/src/i18n/ru.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
- "1 Reply": "1 Ответ",
3
- "1 Thread Reply": "1 тема Ответить",
4
- "Allow access to your Gallery": "Разрешить доступ к вашей галерее",
5
- "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": "Также отправить на канал",
6
7
  "Are you sure you want to permanently delete this message?": "",
7
8
  "Block User": "",
8
9
  "Cancel": "",
@@ -10,10 +11,11 @@
10
11
  "Copy Message": "",
11
12
  "Delete": "",
12
13
  "Delete Message": "",
14
+ "Device camera is used to take photos or videos.": "",
13
15
  "Do you want to send a copy of this message to a moderator for further investigation?": "",
14
16
  "Edit Message": "",
15
17
  "Editing Message": "",
16
- "Emoji matching": "",
18
+ "Emoji matching": "Соответствие эмодзи",
17
19
  "Empty message...": "",
18
20
  "Error loading": "",
19
21
  "Error loading channel list...": "",
@@ -23,13 +25,15 @@
23
25
  "Flag": "",
24
26
  "Flag Message": "",
25
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
26
- "Instant Commands": "",
28
+ "How about sending your first message to a friend?": "",
29
+ "Instant Commands": "Мгновенные Команды",
30
+ "Let's start chatting!": "",
27
31
  "Links are disabled": "",
28
32
  "Loading channels...": "",
29
33
  "Loading messages...": "",
30
34
  "Loading...": "",
31
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
32
- "Message Reactions": "Сообщения Реакции",
36
+ "Message Reactions": "",
33
37
  "Message deleted": "",
34
38
  "Message flagged": "",
35
39
  "Mute User": "",
@@ -37,25 +41,26 @@
37
41
  "Nothing yet...": "",
38
42
  "Ok": "",
39
43
  "Only visible to you": "Видно только вам",
44
+ "Open Settings": "",
40
45
  "Photo": "Фото",
41
- "Photos and Videos": "Фото и видео",
46
+ "Photos and Videos": "",
42
47
  "Pin to Conversation": "",
43
- "Pinned by": "Закреплено пользователем",
44
- "Please enable access to your photos and videos so you can share them.": "Разрешите доступ к своим фотографиям и видео, чтобы вы могли ими поделиться.",
48
+ "Pinned by": "",
49
+ "Please enable access to your photos and videos so you can share them.": "",
45
50
  "Please select a channel first": "",
46
51
  "Reconnecting...": "",
47
52
  "Reply": "",
48
53
  "Reply to Message": "",
49
54
  "Resend": "",
50
55
  "Search GIFs": "",
51
- "Select More Photos": "Выбрать больше фотографий",
56
+ "Select More Photos": "",
52
57
  "Send a message": "",
53
58
  "Sending links is not allowed in this conversation": "",
54
59
  "Slow mode ON": "",
55
60
  "The message has been reported to a moderator.": "",
56
61
  "Thread Reply": "",
57
62
  "Unblock User": "",
58
- "Unknown User": "Неизвестный пользователь",
63
+ "Unknown User": "",
59
64
  "Unmute User": "",
60
65
  "Unpin from Conversation": "",
61
66
  "Unread Messages": "Непрочитанные Сообщения",
@@ -63,9 +68,9 @@
63
68
  "You": "",
64
69
  "You can't send messages in this channel": "",
65
70
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
66
- "{{ index }} of {{ photoLength }}": "{{ index }} из {{ photoLength }}",
67
- "{{ replyCount }} Replies": "{{ replyCount }} Ответов",
68
- "{{ replyCount }} Thread Replies": "{{replyCount}} Ответы в темах",
71
+ "{{ index }} of {{ photoLength }}": "",
72
+ "{{ replyCount }} Replies": "",
73
+ "{{ replyCount }} Thread Replies": "",
69
74
  "{{ user }} is typing": "{{ user }} пишет",
70
75
  "🏙 Attachment...": ""
71
76
  }
package/src/i18n/tr.json CHANGED
@@ -1,8 +1,9 @@
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
- "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": "Kanala da gönder",
6
7
  "Are you sure you want to permanently delete this message?": "",
7
8
  "Block User": "",
8
9
  "Cancel": "",
@@ -10,10 +11,11 @@
10
11
  "Copy Message": "",
11
12
  "Delete": "",
12
13
  "Delete Message": "",
14
+ "Device camera is used to take photos or videos.": "",
13
15
  "Do you want to send a copy of this message to a moderator for further investigation?": "",
14
16
  "Edit Message": "",
15
17
  "Editing Message": "",
16
- "Emoji matching": "",
18
+ "Emoji matching": "Emoji eşleştirme",
17
19
  "Empty message...": "",
18
20
  "Error loading": "",
19
21
  "Error loading channel list...": "",
@@ -23,13 +25,15 @@
23
25
  "Flag": "",
24
26
  "Flag Message": "",
25
27
  "Flag action failed either due to a network issue or the message is already flagged": "",
26
- "Instant Commands": "",
28
+ "How about sending your first message to a friend?": "",
29
+ "Instant Commands": "Anlık Komutlar",
30
+ "Let's start chatting!": "",
27
31
  "Links are disabled": "",
28
32
  "Loading channels...": "",
29
33
  "Loading messages...": "",
30
34
  "Loading...": "",
31
35
  "Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
32
- "Message Reactions": "Mesaj Tepkileri",
36
+ "Message Reactions": "",
33
37
  "Message deleted": "",
34
38
  "Message flagged": "",
35
39
  "Mute User": "",
@@ -37,25 +41,26 @@
37
41
  "Nothing yet...": "",
38
42
  "Ok": "",
39
43
  "Only visible to you": "Sadece siz görebilirsiniz",
44
+ "Open Settings": "",
40
45
  "Photo": "Fotoğraf",
41
- "Photos and Videos": "Fotoğraflar ve Videolar",
46
+ "Photos and Videos": "",
42
47
  "Pin to Conversation": "",
43
- "Pinned by": "Tarafından sabitlendi",
44
- "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.",
48
+ "Pinned by": "",
49
+ "Please enable access to your photos and videos so you can share them.": "",
45
50
  "Please select a channel first": "",
46
51
  "Reconnecting...": "",
47
52
  "Reply": "",
48
53
  "Reply to Message": "",
49
54
  "Resend": "",
50
55
  "Search GIFs": "",
51
- "Select More Photos": "Daha Fazla Fotoğraf Seçin",
56
+ "Select More Photos": "",
52
57
  "Send a message": "",
53
58
  "Sending links is not allowed in this conversation": "",
54
59
  "Slow mode ON": "",
55
60
  "The message has been reported to a moderator.": "",
56
61
  "Thread Reply": "",
57
62
  "Unblock User": "",
58
- "Unknown User": "Bilinmeyen kullanıcı",
63
+ "Unknown User": "",
59
64
  "Unmute User": "",
60
65
  "Unpin from Conversation": "",
61
66
  "Unread Messages": "Okunmamış Mesajlar",
@@ -63,9 +68,9 @@
63
68
  "You": "",
64
69
  "You can't send messages in this channel": "",
65
70
  "{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
66
- "{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
67
- "{{ replyCount }} Replies": "{{ replyCount }} Cevap",
68
- "{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
71
+ "{{ index }} of {{ photoLength }}": "",
72
+ "{{ replyCount }} Replies": "",
73
+ "{{ replyCount }} Thread Replies": "",
69
74
  "{{ user }} is typing": "{{ user }} yazıyor",
70
75
  "🏙 Attachment...": ""
71
76
  }
package/src/native.ts CHANGED
@@ -87,8 +87,12 @@ type Photo =
87
87
  | (Omit<Asset, 'source'> & {
88
88
  cancelled: false;
89
89
  source: 'camera';
90
+ askToOpenSettings?: boolean;
90
91
  })
91
- | { cancelled: true };
92
+ | {
93
+ cancelled: true;
94
+ askToOpenSettings?: boolean;
95
+ };
92
96
  type TakePhoto = (options: { compressImageQuality?: number }) => Promise<Photo> | never;
93
97
  export let takePhoto: TakePhoto = fail;
94
98
 
@@ -1,35 +1,54 @@
1
1
  import type { ExtendableGenerics, LiteralStringForUnion } from 'stream-chat';
2
2
 
3
+ import type { FileStateValue } from '../utils/utils';
4
+
3
5
  export type Asset = {
4
- duration: number | null;
5
- filename: string;
6
+ duration: number;
6
7
  height: number;
8
+ name: string;
7
9
  source: 'camera' | 'picker';
8
10
  type: string;
9
11
  uri: string;
10
12
  width: number;
11
- fileSize?: number;
12
13
  id?: string;
13
- size?: number | string;
14
+ size?: number;
14
15
  };
15
16
 
16
- export type FileAssetType = {
17
+ export type File = {
17
18
  name: string;
19
+ duration?: number;
20
+ id?: string;
18
21
  mimeType?: string;
19
- size?: number | string;
22
+ size?: number;
20
23
  // The uri should be of type `string`. But is `string|undefined` because the same type is used for the response from Stream's Attachment. This shall be fixed.
21
24
  uri?: string;
22
25
  };
23
26
 
24
- export type File = FileAssetType & {
25
- duration?: string | null;
26
- id?: string;
27
+ export type FileUpload = {
28
+ file: File;
29
+ id: string;
30
+ state: FileStateValue;
31
+ duration?: number;
32
+ paused?: boolean;
33
+ progress?: number;
34
+ thumb_url?: string;
35
+ url?: string;
36
+ };
37
+
38
+ export type ImageUpload = {
39
+ file: Partial<Asset>;
40
+ id: string;
41
+ state: FileStateValue;
42
+ height?: number;
43
+ url?: string;
44
+ width?: number;
27
45
  };
28
46
 
29
47
  export type DefaultAttachmentType = UnknownType & {
30
- file_size?: number | string;
48
+ file_size?: number;
31
49
  mime_type?: string;
32
50
  originalFile?: File;
51
+ originalImage?: Partial<Asset>;
33
52
  };
34
53
 
35
54
  interface DefaultUserType extends UnknownType {
@@ -0,0 +1,32 @@
1
+ import { compressImage } from '../native';
2
+ import type { Asset } from '../types/types';
3
+
4
+ /**
5
+ * Function to compress and Image and return the compressed Image URI
6
+ * @param image
7
+ * @param compressImageQuality
8
+ * @returns string
9
+ */
10
+ export const compressedImageURI = async (image: Partial<Asset>, compressImageQuality?: number) => {
11
+ const uri = image.uri || '';
12
+ /**
13
+ * We skip compression if:
14
+ * - the file is from the camera as that should already be compressed
15
+ * - the file has no height/width value to maintain for compression
16
+ * - the compressImageQuality number is not present or is 1 (meaning no compression)
17
+ */
18
+ const compressedUri = await (image.source === 'camera' ||
19
+ !image.height ||
20
+ !image.width ||
21
+ typeof compressImageQuality !== 'number' ||
22
+ compressImageQuality === 1
23
+ ? uri
24
+ : compressImage({
25
+ compressImageQuality,
26
+ height: image.height,
27
+ uri,
28
+ width: image.width,
29
+ }));
30
+
31
+ return compressedUri;
32
+ };
@@ -1,5 +1,4 @@
1
1
  import type React from 'react';
2
- import { Dimensions } from 'react-native';
3
2
 
4
3
  import type { DebouncedFunc } from 'lodash';
5
4
  import debounce from 'lodash/debounce';
@@ -519,18 +518,6 @@ export const getUrlWithoutParams = (url?: string) => {
519
518
 
520
519
  export const isLocalUrl = (url: string) => url.indexOf('http') !== 0;
521
520
 
522
- export const vw = (percentageWidth: number, rounded = false) => {
523
- const value = Dimensions.get('window').width * (percentageWidth / 100);
524
- return rounded ? Math.round(value) : value;
525
- };
526
-
527
- export const vh = (percentageHeight: number, rounded = false) => {
528
- const height = Dimensions.get('window').height;
529
-
530
- const value = height * (percentageHeight / 100);
531
- return rounded ? Math.round(value) : value;
532
- };
533
-
534
521
  export const generateRandomId = (a = ''): string =>
535
522
  a
536
523
  ? /* eslint-disable no-bitwise */
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "5.22.0-beta.1"
2
+ "version": "5.22.0-beta.10"
3
3
  }