stream-chat-react-native-core 5.34.1-beta.5 → 5.35.0-beta.2
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/Attachment/Attachment.js +5 -4
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +2 -1
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +2 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +3 -2
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +2 -3
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +2 -1
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +14 -9
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js +2 -2
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js +1 -0
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +6 -13
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +6 -57
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +2 -3
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +2 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +5 -2
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +4 -3
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +3 -3
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +2 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +5 -5
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +2 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +8 -7
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +67 -9
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -2
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +1 -11
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +2 -5
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +27 -22
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js +5 -6
- package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js +157 -0
- package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js.map +1 -0
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js +2 -1
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +2 -1
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +19 -18
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +267 -181
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +6 -0
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +6 -5
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +3 -2
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +5 -0
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/i18n/en.json +1 -0
- package/lib/commonjs/i18n/es.json +1 -0
- package/lib/commonjs/i18n/fr.json +1 -0
- package/lib/commonjs/i18n/he.json +1 -0
- package/lib/commonjs/i18n/hi.json +1 -0
- package/lib/commonjs/i18n/it.json +1 -0
- package/lib/commonjs/i18n/ja.json +1 -0
- package/lib/commonjs/i18n/ko.json +1 -0
- package/lib/commonjs/i18n/nl.json +1 -0
- package/lib/commonjs/i18n/pt-br.json +1 -0
- package/lib/commonjs/i18n/ru.json +1 -0
- package/lib/commonjs/i18n/tr.json +1 -0
- package/lib/commonjs/icons/Attach.js +29 -6
- package/lib/commonjs/icons/Attach.js.map +1 -1
- package/lib/commonjs/icons/GiphyLightning.js +31 -0
- package/lib/commonjs/icons/GiphyLightning.js.map +1 -0
- package/lib/commonjs/icons/Lightning.js +18 -6
- package/lib/commonjs/icons/Lightning.js.map +1 -1
- package/lib/commonjs/icons/index.js +11 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/native.js +14 -5
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/types/types.js +12 -0
- package/lib/commonjs/types/types.js.map +1 -1
- package/lib/commonjs/utils/utils.js +13 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +5 -4
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +2 -1
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +2 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +3 -2
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +2 -3
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/getAspectRatio.js +2 -1
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +14 -9
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js +2 -2
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js +1 -0
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +6 -13
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +6 -57
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +2 -3
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +2 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +5 -2
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +4 -3
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +3 -3
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +2 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +5 -5
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +2 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/Message/Message.js +8 -7
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +67 -9
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +3 -2
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +1 -11
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +2 -5
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +27 -22
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/components/InputGiphySearch.js +5 -6
- package/lib/module/components/MessageInput/components/InputGiphySearch.js.map +1 -1
- package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js +157 -0
- package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js.map +1 -0
- package/lib/module/components/MessageInput/hooks/useAudioController.js +2 -1
- package/lib/module/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +2 -1
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +19 -18
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +267 -181
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +6 -0
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +6 -5
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +3 -2
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +5 -0
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/i18n/en.json +1 -0
- package/lib/module/i18n/es.json +1 -0
- package/lib/module/i18n/fr.json +1 -0
- package/lib/module/i18n/he.json +1 -0
- package/lib/module/i18n/hi.json +1 -0
- package/lib/module/i18n/it.json +1 -0
- package/lib/module/i18n/ja.json +1 -0
- package/lib/module/i18n/ko.json +1 -0
- package/lib/module/i18n/nl.json +1 -0
- package/lib/module/i18n/pt-br.json +1 -0
- package/lib/module/i18n/ru.json +1 -0
- package/lib/module/i18n/tr.json +1 -0
- package/lib/module/icons/Attach.js +29 -6
- package/lib/module/icons/Attach.js.map +1 -1
- package/lib/module/icons/GiphyLightning.js +31 -0
- package/lib/module/icons/GiphyLightning.js.map +1 -0
- package/lib/module/icons/Lightning.js +18 -6
- package/lib/module/icons/Lightning.js.map +1 -1
- package/lib/module/icons/index.js +11 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/native.js +14 -5
- package/lib/module/native.js.map +1 -1
- package/lib/module/types/types.js +12 -0
- package/lib/module/types/types.js.map +1 -1
- package/lib/module/utils/utils.js +13 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Card.d.ts +1 -1
- package/lib/typescript/components/Attachment/Card.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +1 -1
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +1 -1
- package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.d.ts +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerItem.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerSelectionBar.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryVideoControl.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts.map +1 -1
- package/lib/typescript/components/Message/Message.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +3 -1
- package/lib/typescript/components/MessageInput/AttachButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/InputButtons.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/NativeAttachmentPicker.d.ts +9 -0
- package/lib/typescript/components/MessageInput/components/NativeAttachmentPicker.d.ts.map +1 -0
- package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +15 -3
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +5 -0
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
- package/lib/typescript/i18n/en.json +1 -0
- package/lib/typescript/i18n/es.json +1 -0
- package/lib/typescript/i18n/fr.json +1 -0
- package/lib/typescript/i18n/he.json +1 -0
- package/lib/typescript/i18n/hi.json +1 -0
- package/lib/typescript/i18n/it.json +1 -0
- package/lib/typescript/i18n/ja.json +1 -0
- package/lib/typescript/i18n/ko.json +1 -0
- package/lib/typescript/i18n/nl.json +1 -0
- package/lib/typescript/i18n/pt-br.json +1 -0
- package/lib/typescript/i18n/ru.json +1 -0
- package/lib/typescript/i18n/tr.json +1 -0
- package/lib/typescript/icons/Attach.d.ts +5 -1
- package/lib/typescript/icons/Attach.d.ts.map +1 -1
- package/lib/typescript/icons/GiphyLightning.d.ts +8 -0
- package/lib/typescript/icons/GiphyLightning.d.ts.map +1 -0
- package/lib/typescript/icons/Lightning.d.ts +5 -1
- package/lib/typescript/icons/Lightning.d.ts.map +1 -1
- package/lib/typescript/icons/index.d.ts +1 -0
- package/lib/typescript/icons/index.d.ts.map +1 -1
- package/lib/typescript/native.d.ts +13 -5
- package/lib/typescript/native.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +10 -1
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +1 -0
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/lib/typescript/utils/utils.d.ts +6 -0
- package/lib/typescript/utils/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Attachment/Attachment.tsx +7 -7
- package/src/components/Attachment/Card.tsx +2 -2
- package/src/components/Attachment/FileAttachmentGroup.tsx +2 -2
- package/src/components/Attachment/Gallery.tsx +3 -3
- package/src/components/Attachment/Giphy.tsx +1 -1
- package/src/components/Attachment/utils/getAspectRatio.ts +2 -2
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +6 -0
- package/src/components/AttachmentPicker/components/AttachmentPickerError.tsx +2 -2
- package/src/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.tsx +3 -0
- package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +7 -16
- package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx +6 -30
- package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +1 -1
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +1 -1
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +1 -1
- package/src/components/Channel/Channel.tsx +8 -6
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +2 -0
- package/src/components/ImageGallery/ImageGallery.tsx +6 -6
- package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +5 -4
- package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +1 -0
- package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +1 -0
- package/src/components/ImageGallery/__tests__/ImageGalleryVideoControl.test.tsx +2 -2
- package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx +4 -3
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +2 -2
- package/src/components/ImageGallery/components/ImageGalleryVideoControl.tsx +5 -14
- package/src/components/ImageGallery/components/ImageGrid.tsx +2 -2
- package/src/components/Message/Message.tsx +12 -8
- package/src/components/MessageInput/AttachButton.tsx +74 -8
- package/src/components/MessageInput/CommandsButton.tsx +2 -1
- package/src/components/MessageInput/FileUploadPreview.tsx +8 -17
- package/src/components/MessageInput/InputButtons.tsx +1 -2
- package/src/components/MessageInput/MessageInput.tsx +43 -30
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +1 -0
- package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +139 -45
- package/src/components/MessageInput/components/InputGiphySearch.tsx +3 -3
- package/src/components/MessageInput/components/NativeAttachmentPicker.tsx +179 -0
- package/src/components/MessageInput/hooks/useAudioController.tsx +2 -2
- package/src/components/MessageList/MessageList.tsx +2 -2
- package/src/components/Reply/Reply.tsx +31 -29
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +86 -37
- package/src/contexts/messageInputContext/MessageInputContext.tsx +94 -23
- package/src/contexts/messageInputContext/__tests__/MessageInputContext.test.tsx +1 -38
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +6 -1
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +11 -6
- package/src/contexts/overlayContext/OverlayProvider.tsx +4 -1
- package/src/contexts/themeContext/utils/theme.ts +10 -0
- package/src/i18n/en.json +1 -0
- package/src/i18n/es.json +1 -0
- package/src/i18n/fr.json +1 -0
- package/src/i18n/he.json +1 -0
- package/src/i18n/hi.json +1 -0
- package/src/i18n/it.json +1 -0
- package/src/i18n/ja.json +1 -0
- package/src/i18n/ko.json +1 -0
- package/src/i18n/nl.json +1 -0
- package/src/i18n/pt-br.json +1 -0
- package/src/i18n/ru.json +1 -0
- package/src/i18n/tr.json +1 -0
- package/src/icons/Attach.tsx +22 -9
- package/src/icons/GiphyLightning.tsx +18 -0
- package/src/icons/Lightning.tsx +14 -5
- package/src/icons/index.ts +1 -0
- package/src/native.ts +28 -14
- package/src/types/types.ts +11 -1
- package/src/utils/utils.ts +20 -0
- package/src/version.json +1 -1
package/src/i18n/he.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "מחק",
|
|
15
15
|
"Delete Message": "מחק/י הודעה",
|
|
16
16
|
"Device camera is used to take photos or videos.": "מצלמת המכשיר משמשת לצילום תמונות או סרטונים.",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "הרשאות גלריית המכשיר משמשות לצילום תמונות או סרטונים.",
|
|
17
18
|
"Do you want to send a copy of this message to a moderator for further investigation?": "האם את/ה רוצה לשלוח עותק של הודעה זו למנחה להמשך חקירה?",
|
|
18
19
|
"Edit Message": "ערוך הודעה",
|
|
19
20
|
"Edited": "נערך",
|
package/src/i18n/hi.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "हटाएं",
|
|
15
15
|
"Delete Message": "मैसेज को डिलीट करे",
|
|
16
16
|
"Device camera is used to take photos or videos.": "डिवाइस कैमरे का उपयोग फ़ोटो या वीडियो लेने के लिए किया जाता है।",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "डिवाइस गैलरी की अनुमतियों का उपयोग फोटो या वीडियो लेने के लिए किया जाता है।",
|
|
17
18
|
"Do you want to send a copy of this message to a moderator for further investigation?": "क्या आप इस संदेश की एक प्रति आगे की जाँच के लिए किसी मॉडरेटर को भेजना चाहते हैं?",
|
|
18
19
|
"Edit Message": "मैसेज में बदलाव करे",
|
|
19
20
|
"Edited": "मैसेज बदला गया है",
|
package/src/i18n/it.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "Elimina",
|
|
15
15
|
"Delete Message": "Cancella il Messaggio",
|
|
16
16
|
"Device camera is used to take photos or videos.": "La fotocamera del dispositivo viene utilizzata per scattare foto o video.",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "Le autorizzazioni della galleria del dispositivo vengono utilizzate per scattare foto o video.",
|
|
17
18
|
"Do you want to send a copy of this message to a moderator for further investigation?": "Vuoi inviare una copia di questo messaggio a un moderatore per ulteriori indagini?",
|
|
18
19
|
"Edit Message": "Modifica Messaggio",
|
|
19
20
|
"Edited": "Modificato",
|
package/src/i18n/ja.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "消去",
|
|
15
15
|
"Delete Message": "メッセージを削除",
|
|
16
16
|
"Device camera is used to take photos or videos.": "デバイスのカメラは写真やビデオの撮影に使用されます。",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "デバイスギャラリーの権限は写真やビデオを撮るために使用されます。",
|
|
17
18
|
"Do you want to send a copy of this message to a moderator for further investigation?": "このメッセージのコピーをモデレーターに送信して、さらに調査しますか?",
|
|
18
19
|
"Edit Message": "メッセージを編集",
|
|
19
20
|
"Edited": "編集済み",
|
package/src/i18n/ko.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "삭제",
|
|
15
15
|
"Delete Message": "메시지 삭제",
|
|
16
16
|
"Device camera is used to take photos or videos.": "기기 카메라는 사진이나 동영상을 촬영하는 데 사용됩니다.",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "장치 갤러리 권한은 사진 또는 비디오를 촬영하는 데 사용됩니다.",
|
|
17
18
|
"Do you want to send a copy of this message to a moderator for further investigation?": "이 메시지의 복사본을 운영자에게 보내 추가 조사를합니까?",
|
|
18
19
|
"Edit Message": "메시지 수정",
|
|
19
20
|
"Edited": "편집됨",
|
package/src/i18n/nl.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "Verwijderen",
|
|
15
15
|
"Delete Message": "Verwijder bericht",
|
|
16
16
|
"Device camera is used to take photos or videos.": "De camera van het apparaat wordt gebruikt om foto's of video's te maken.",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "Apparaatgallerijmachtigingen worden gebruikt om foto’s of video’s te maken.",
|
|
17
18
|
"Do you want to send a copy of this message to a moderator for further investigation?": "Wil je een kopie van dit bericht naar een moderator sturen voor verder onderzoek?",
|
|
18
19
|
"Edit Message": "Pas bericht aan",
|
|
19
20
|
"Edited": "Bewerkt",
|
package/src/i18n/pt-br.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "Excluir",
|
|
15
15
|
"Delete Message": "Excluir Mensagem",
|
|
16
16
|
"Device camera is used to take photos or videos.": "A câmera do dispositivo é usada para tirar fotos ou vídeos.",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "As permissões da galeria do dispositivo são usadas para tirar fotos ou vídeos.",
|
|
17
18
|
"Do you want to send a copy of this message to a moderator for further investigation?": "Deseja enviar uma cópia desta mensagem para um moderador para investigação adicional?",
|
|
18
19
|
"Edit Message": "Editar Mensagem",
|
|
19
20
|
"Edited": "Editado",
|
package/src/i18n/ru.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "удалять",
|
|
15
15
|
"Delete Message": "Удалить сообщение",
|
|
16
16
|
"Device camera is used to take photos or videos.": "Камера устройства используется для съемки фотографий или видео.",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "Разрешения галереи устройства используются для съемки фото или видео.",
|
|
17
18
|
"Do you want to send a copy of this message to a moderator for further investigation?": "Вы хотите отправить копию этого сообщения модератору для дальнейшего изучения?",
|
|
18
19
|
"Edit Message": "Редактировать сообщение",
|
|
19
20
|
"Edited": "Отредактировано",
|
package/src/i18n/tr.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"Delete": "Sil",
|
|
15
15
|
"Delete Message": "Mesajı Sil",
|
|
16
16
|
"Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
|
|
17
|
+
"Device gallery permissions is used to take photos or videos.": "Cihaz galerisi izinleri fotoğraf veya video çekmek için kullanılır.",
|
|
17
18
|
"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
19
|
"Edit Message": "Mesajı Düzenle",
|
|
19
20
|
"Edited": "Düzenlendi",
|
package/src/icons/Attach.tsx
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
import Svg, { ClipPath, Defs, G, Path, Rect } from 'react-native-svg';
|
|
4
|
+
|
|
5
|
+
import { IconProps } from './utils/base';
|
|
6
|
+
|
|
7
|
+
type Props = IconProps & {
|
|
8
|
+
size: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Attach = ({ size, ...rest }: Props) => (
|
|
12
|
+
<Svg height={size} viewBox={`0 0 ${size} ${size}`} width={size} {...rest}>
|
|
13
|
+
<G clipPath='url(#id)'>
|
|
14
|
+
<Path
|
|
15
|
+
d='M17.5245 9.33332L14.8579 9.33332L14.8579 14.6666L9.52453 14.6666L9.52453 17.3333L14.8579 17.3333L14.8579 22.6667L17.5245 22.6667L17.5245 17.3333L22.8579 17.3333L22.8579 14.6666L17.5245 14.6666L17.5245 9.33332ZM16.1912 2.66665C8.83119 2.66665 2.85786 8.63998 2.85786 16C2.85786 23.36 8.83119 29.3333 16.1912 29.3333C23.5512 29.3333 29.5245 23.36 29.5245 16C29.5245 8.63998 23.5512 2.66665 16.1912 2.66665ZM16.1912 26.6667C10.3112 26.6666 5.52453 21.88 5.52453 16C5.52453 10.12 10.3112 5.33332 16.1912 5.33332C22.0712 5.33332 26.8579 10.12 26.8579 16C26.8579 21.88 22.0712 26.6666 16.1912 26.6667Z'
|
|
16
|
+
{...rest}
|
|
17
|
+
/>
|
|
18
|
+
</G>
|
|
19
|
+
<Defs>
|
|
20
|
+
<ClipPath id='id'>
|
|
21
|
+
<Rect height={32} transform={'translate(0.191406)'} width={size} />
|
|
22
|
+
</ClipPath>
|
|
23
|
+
</Defs>
|
|
24
|
+
</Svg>
|
|
12
25
|
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Svg, { Path } from 'react-native-svg';
|
|
4
|
+
|
|
5
|
+
import { IconProps } from './utils/base';
|
|
6
|
+
|
|
7
|
+
type Props = IconProps & {
|
|
8
|
+
size: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const GiphyLightning = ({ size = 16, ...rest }: Props) => (
|
|
12
|
+
<Svg height={size} viewBox={`0 0 ${size} ${size}`} width={size} {...rest}>
|
|
13
|
+
<Path
|
|
14
|
+
d='M7.69693 2H11.3333L8.90905 6.84848H11.3333L6.78784 15.3333L7.69693 9.27273H4.66663L7.69693 2Z'
|
|
15
|
+
{...rest}
|
|
16
|
+
/>
|
|
17
|
+
</Svg>
|
|
18
|
+
);
|
package/src/icons/Lightning.tsx
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import Svg, { Path } from 'react-native-svg';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { IconProps } from './utils/base';
|
|
6
|
+
|
|
7
|
+
type Props = IconProps & {
|
|
8
|
+
size: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const Lightning = ({ size = 32, ...rest }: Props) => (
|
|
12
|
+
<Svg height={size} viewBox={`0 0 ${size} ${size}`} width={size} {...rest}>
|
|
13
|
+
<Path
|
|
14
|
+
d='M14.8522 28H13.5188L14.8522 18.6667H10.1855C9.01218 18.6667 9.74551 17.6667 9.77218 17.6267C11.4922 14.5867 14.0788 10.0533 17.5322 4H18.8655L17.5322 13.3333H22.2122C22.7455 13.3333 23.0388 13.5867 22.7455 14.2133C17.4788 23.4 14.8522 28 14.8522 28Z'
|
|
15
|
+
{...rest}
|
|
16
|
+
/>
|
|
17
|
+
</Svg>
|
|
9
18
|
);
|
package/src/icons/index.ts
CHANGED
package/src/native.ts
CHANGED
|
@@ -66,6 +66,15 @@ type PickDocument = ({ maxNumberOfFiles }: { maxNumberOfFiles?: number }) =>
|
|
|
66
66
|
| never;
|
|
67
67
|
export let pickDocument: PickDocument = fail;
|
|
68
68
|
|
|
69
|
+
type PickImageAssetType = {
|
|
70
|
+
askToOpenSettings?: boolean;
|
|
71
|
+
assets?: Array<Omit<Asset, 'source'> & { source: 'picker' }>;
|
|
72
|
+
cancelled?: boolean;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
type PickImage = () => Promise<PickImageAssetType> | never;
|
|
76
|
+
export let pickImage: PickImage = fail;
|
|
77
|
+
|
|
69
78
|
type SaveFileOptions = {
|
|
70
79
|
fileName: string;
|
|
71
80
|
fromUrl: string;
|
|
@@ -83,16 +92,11 @@ type ShareOptions = {
|
|
|
83
92
|
type ShareImage = (options: ShareOptions) => Promise<boolean> | never;
|
|
84
93
|
export let shareImage: ShareImage = fail;
|
|
85
94
|
|
|
86
|
-
type Photo =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})
|
|
92
|
-
| {
|
|
93
|
-
cancelled: true;
|
|
94
|
-
askToOpenSettings?: boolean;
|
|
95
|
-
};
|
|
95
|
+
type Photo = Omit<Asset, 'source'> & {
|
|
96
|
+
source: 'camera';
|
|
97
|
+
askToOpenSettings?: boolean;
|
|
98
|
+
cancelled?: boolean;
|
|
99
|
+
};
|
|
96
100
|
type TakePhoto = (options: { compressImageQuality?: number }) => Promise<Photo> | never;
|
|
97
101
|
export let takePhoto: TakePhoto = fail;
|
|
98
102
|
|
|
@@ -294,6 +298,7 @@ type Handlers = {
|
|
|
294
298
|
NetInfo?: NetInfo;
|
|
295
299
|
oniOS14GalleryLibrarySelectionChange?: OniOS14LibrarySelectionChange;
|
|
296
300
|
pickDocument?: PickDocument;
|
|
301
|
+
pickImage?: PickImage;
|
|
297
302
|
saveFile?: SaveFile;
|
|
298
303
|
SDK?: string;
|
|
299
304
|
setClipboardString?: SetClipboardString;
|
|
@@ -324,19 +329,19 @@ export const registerNativeHandlers = (handlers: Handlers) => {
|
|
|
324
329
|
NetInfo = handlers.NetInfo;
|
|
325
330
|
}
|
|
326
331
|
|
|
327
|
-
if (handlers.getLocalAssetUri) {
|
|
332
|
+
if (handlers.getLocalAssetUri !== undefined) {
|
|
328
333
|
getLocalAssetUri = handlers.getLocalAssetUri;
|
|
329
334
|
}
|
|
330
335
|
|
|
331
|
-
if (handlers.getPhotos) {
|
|
336
|
+
if (handlers.getPhotos !== undefined) {
|
|
332
337
|
getPhotos = handlers.getPhotos;
|
|
333
338
|
}
|
|
334
339
|
|
|
335
|
-
if (handlers.iOS14RefreshGallerySelection) {
|
|
340
|
+
if (handlers.iOS14RefreshGallerySelection !== undefined) {
|
|
336
341
|
iOS14RefreshGallerySelection = handlers.iOS14RefreshGallerySelection;
|
|
337
342
|
}
|
|
338
343
|
|
|
339
|
-
if (handlers.oniOS14GalleryLibrarySelectionChange) {
|
|
344
|
+
if (handlers.oniOS14GalleryLibrarySelectionChange !== undefined) {
|
|
340
345
|
oniOS14GalleryLibrarySelectionChange = handlers.oniOS14GalleryLibrarySelectionChange;
|
|
341
346
|
}
|
|
342
347
|
|
|
@@ -344,6 +349,10 @@ export const registerNativeHandlers = (handlers: Handlers) => {
|
|
|
344
349
|
pickDocument = handlers.pickDocument;
|
|
345
350
|
}
|
|
346
351
|
|
|
352
|
+
if (handlers.pickImage !== undefined) {
|
|
353
|
+
pickImage = handlers.pickImage;
|
|
354
|
+
}
|
|
355
|
+
|
|
347
356
|
if (handlers.saveFile) {
|
|
348
357
|
saveFile = handlers.saveFile;
|
|
349
358
|
}
|
|
@@ -381,3 +390,8 @@ export const isImagePickerAvailable = () => !!takePhoto;
|
|
|
381
390
|
export const isVideoPackageAvailable = () => !!Video;
|
|
382
391
|
export const isAudioPackageAvailable = () => !!Sound.Player || !!Sound.initializeSound;
|
|
383
392
|
export const isRecordingPackageAvailable = () => !!Audio;
|
|
393
|
+
export const isImageMediaLibraryAvailable = () =>
|
|
394
|
+
!!getPhotos &&
|
|
395
|
+
!!iOS14RefreshGallerySelection &&
|
|
396
|
+
!!oniOS14GalleryLibrarySelectionChange &&
|
|
397
|
+
!!getLocalAssetUri;
|
package/src/types/types.ts
CHANGED
|
@@ -2,6 +2,16 @@ import type { ExtendableGenerics, LiteralStringForUnion } from 'stream-chat';
|
|
|
2
2
|
|
|
3
3
|
import type { FileStateValue } from '../utils/utils';
|
|
4
4
|
|
|
5
|
+
export enum FileTypes {
|
|
6
|
+
Audio = 'audio',
|
|
7
|
+
File = 'file',
|
|
8
|
+
Giphy = 'giphy',
|
|
9
|
+
Image = 'image',
|
|
10
|
+
Imgur = 'imgur',
|
|
11
|
+
Video = 'video',
|
|
12
|
+
VoiceRecording = 'voiceRecording',
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
export type Asset = {
|
|
6
16
|
duration: number;
|
|
7
17
|
height: number;
|
|
@@ -20,7 +30,7 @@ export type File = {
|
|
|
20
30
|
id?: string;
|
|
21
31
|
mimeType?: string;
|
|
22
32
|
size?: number;
|
|
23
|
-
type?:
|
|
33
|
+
type?: FileTypes;
|
|
24
34
|
// 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.
|
|
25
35
|
uri?: string;
|
|
26
36
|
waveform_data?: number[];
|
package/src/utils/utils.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
|
|
3
|
+
import dayjs from 'dayjs';
|
|
3
4
|
import EmojiRegex from 'emoji-regex';
|
|
4
5
|
import type { DebouncedFunc } from 'lodash';
|
|
5
6
|
import debounce from 'lodash/debounce';
|
|
@@ -657,3 +658,22 @@ export const getFileNameFromPath = (path: string) => {
|
|
|
657
658
|
const match = path.match(pattern);
|
|
658
659
|
return match ? match[0] : '';
|
|
659
660
|
};
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Utility to get the duration label from the duration in seconds.
|
|
664
|
+
* @param duration number
|
|
665
|
+
* @returns string
|
|
666
|
+
*/
|
|
667
|
+
export const getDurationLabelFromDuration = (duration: number) => {
|
|
668
|
+
const ONE_HOUR_IN_SECONDS = 3600;
|
|
669
|
+
const ONE_HOUR_IN_MILLISECONDS = ONE_HOUR_IN_SECONDS * 1000;
|
|
670
|
+
let durationLabel = '00:00';
|
|
671
|
+
const isDurationLongerThanHour = duration / ONE_HOUR_IN_MILLISECONDS >= 1;
|
|
672
|
+
const formattedDurationParam = isDurationLongerThanHour ? 'HH:mm:ss' : 'mm:ss';
|
|
673
|
+
const formattedVideoDuration = dayjs
|
|
674
|
+
.duration(duration, 'milliseconds')
|
|
675
|
+
.format(formattedDurationParam);
|
|
676
|
+
durationLabel = formattedVideoDuration;
|
|
677
|
+
|
|
678
|
+
return durationLabel;
|
|
679
|
+
};
|
package/src/version.json
CHANGED