stream-chat-react 11.8.0 → 11.9.0
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/dist/{Window-7c2f264c.js → Window-5e0717c0.js} +1275 -132
- package/dist/browser.full-bundle.js +1402 -164
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +4 -4
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/Attachment/Attachment.d.ts +1 -1
- package/dist/components/Attachment/Attachment.d.ts.map +1 -1
- package/dist/components/Attachment/AttachmentActions.d.ts +2 -1
- package/dist/components/Attachment/AttachmentActions.d.ts.map +1 -1
- package/dist/components/Attachment/AttachmentContainer.d.ts +9 -9
- package/dist/components/Attachment/AttachmentContainer.d.ts.map +1 -1
- package/dist/components/Attachment/Audio.d.ts +3 -3
- package/dist/components/Attachment/Audio.d.ts.map +1 -1
- package/dist/components/Attachment/Card.d.ts +3 -2
- package/dist/components/Attachment/Card.d.ts.map +1 -1
- package/dist/components/Attachment/DownloadButton.d.ts +2 -1
- package/dist/components/Attachment/DownloadButton.d.ts.map +1 -1
- package/dist/components/Attachment/FileAttachment.d.ts +2 -1
- package/dist/components/Attachment/FileAttachment.d.ts.map +1 -1
- package/dist/components/Attachment/FileSizeIndicator.d.ts +2 -1
- package/dist/components/Attachment/FileSizeIndicator.d.ts.map +1 -1
- package/dist/components/Attachment/UnsupportedAttachment.d.ts +2 -1
- package/dist/components/Attachment/UnsupportedAttachment.d.ts.map +1 -1
- package/dist/components/Attachment/icons.d.ts +4 -3
- package/dist/components/Attachment/icons.d.ts.map +1 -1
- package/dist/components/Attachment/utils.d.ts +8 -8
- package/dist/components/Attachment/utils.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Header.d.ts +2 -1
- package/dist/components/AutoCompleteTextarea/Header.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/List.d.ts +2 -1
- package/dist/components/AutoCompleteTextarea/List.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts +2 -2
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Channel/Channel.d.ts +2 -2
- package/dist/components/Channel/Channel.d.ts.map +1 -1
- package/dist/components/Channel/Channel.js +58 -52
- package/dist/components/Channel/LoadingChannel.d.ts +2 -1
- package/dist/components/Channel/LoadingChannel.d.ts.map +1 -1
- package/dist/components/ChannelHeader/ChannelHeader.d.ts +1 -1
- package/dist/components/ChannelHeader/ChannelHeader.d.ts.map +1 -1
- package/dist/components/ChannelHeader/ChannelHeader.js +1 -1
- package/dist/components/ChannelHeader/icons.d.ts +2 -1
- package/dist/components/ChannelHeader/icons.d.ts.map +1 -1
- package/dist/components/ChannelList/ChannelList.d.ts +1 -1
- package/dist/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/dist/components/ChannelList/ChannelListMessenger.d.ts +1 -1
- package/dist/components/ChannelList/ChannelListMessenger.d.ts.map +1 -1
- package/dist/components/ChannelList/ChannelListMessenger.js +3 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.js +1 -3
- package/dist/components/ChannelPreview/ChannelPreview.d.ts +1 -1
- package/dist/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
- package/dist/components/ChannelPreview/ChannelPreview.js +11 -8
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -1
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts.map +1 -1
- package/dist/components/ChannelPreview/utils.d.ts +2 -1
- package/dist/components/ChannelPreview/utils.d.ts.map +1 -1
- package/dist/components/ChannelSearch/ChannelSearch.d.ts +1 -1
- package/dist/components/ChannelSearch/ChannelSearch.d.ts.map +1 -1
- package/dist/components/ChannelSearch/SearchBar.d.ts +1 -1
- package/dist/components/ChannelSearch/SearchBar.d.ts.map +1 -1
- package/dist/components/ChannelSearch/SearchInput.d.ts +1 -1
- package/dist/components/ChannelSearch/SearchInput.d.ts.map +1 -1
- package/dist/components/ChannelSearch/SearchResults.d.ts +1 -1
- package/dist/components/ChannelSearch/SearchResults.d.ts.map +1 -1
- package/dist/components/ChannelSearch/SearchResults.js +2 -1
- package/dist/components/ChannelSearch/icons.d.ts +5 -4
- package/dist/components/ChannelSearch/icons.d.ts.map +1 -1
- package/dist/components/Chat/Chat.d.ts +1 -1
- package/dist/components/Chat/Chat.d.ts.map +1 -1
- package/dist/components/ChatAutoComplete/ChatAutoComplete.d.ts +1 -1
- package/dist/components/ChatAutoComplete/ChatAutoComplete.d.ts.map +1 -1
- package/dist/components/ChatDown/ChatDown.d.ts +1 -1
- package/dist/components/ChatDown/ChatDown.d.ts.map +1 -1
- package/dist/components/ChatDown/icons.d.ts +2 -1
- package/dist/components/ChatDown/icons.d.ts.map +1 -1
- package/dist/components/CommandItem/CommandItem.d.ts +2 -2
- package/dist/components/CommandItem/CommandItem.d.ts.map +1 -1
- package/dist/components/DateSeparator/DateSeparator.d.ts +2 -1
- package/dist/components/DateSeparator/DateSeparator.d.ts.map +1 -1
- package/dist/components/Emojis/EmojiPicker.d.ts +1 -1
- package/dist/components/Emojis/EmojiPicker.d.ts.map +1 -1
- package/dist/components/Emojis/EmojiPicker.js +1 -1
- package/dist/components/Emojis/index.cjs.js +4 -4
- package/dist/components/EmoticonItem/EmoticonItem.d.ts +2 -1
- package/dist/components/EmoticonItem/EmoticonItem.d.ts.map +1 -1
- package/dist/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +2 -1
- package/dist/components/EmptyStateIndicator/EmptyStateIndicator.d.ts.map +1 -1
- package/dist/components/EmptyStateIndicator/icons.d.ts +2 -1
- package/dist/components/EmptyStateIndicator/icons.d.ts.map +1 -1
- package/dist/components/EventComponent/EventComponent.d.ts +1 -1
- package/dist/components/EventComponent/EventComponent.d.ts.map +1 -1
- package/dist/components/Gallery/BaseImage.d.ts +2 -2
- package/dist/components/Gallery/BaseImage.d.ts.map +1 -1
- package/dist/components/Gallery/Gallery.d.ts +2 -2
- package/dist/components/Gallery/Gallery.d.ts.map +1 -1
- package/dist/components/Gallery/Image.d.ts +2 -2
- package/dist/components/Gallery/Image.d.ts.map +1 -1
- package/dist/components/Gallery/ModalGallery.d.ts +2 -1
- package/dist/components/Gallery/ModalGallery.d.ts.map +1 -1
- package/dist/components/LoadMore/LoadMoreButton.d.ts +1 -1
- package/dist/components/LoadMore/LoadMoreButton.d.ts.map +1 -1
- package/dist/components/LoadMore/LoadMoreButton.js +1 -1
- package/dist/components/LoadMore/LoadMorePaginator.d.ts +2 -2
- package/dist/components/LoadMore/LoadMorePaginator.d.ts.map +1 -1
- package/dist/components/Loading/LoadingChannels.d.ts +1 -1
- package/dist/components/Loading/LoadingChannels.d.ts.map +1 -1
- package/dist/components/Loading/LoadingErrorIndicator.d.ts +2 -1
- package/dist/components/Loading/LoadingErrorIndicator.d.ts.map +1 -1
- package/dist/components/Loading/LoadingIndicator.d.ts +2 -1
- package/dist/components/Loading/LoadingIndicator.d.ts.map +1 -1
- package/dist/components/MML/MML.d.ts +2 -1
- package/dist/components/MML/MML.d.ts.map +1 -1
- package/dist/components/Message/FixedHeightMessage.d.ts +2 -1
- package/dist/components/Message/FixedHeightMessage.d.ts.map +1 -1
- package/dist/components/Message/Message.d.ts +2 -1
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/MessageDeleted.d.ts +2 -1
- package/dist/components/Message/MessageDeleted.d.ts.map +1 -1
- package/dist/components/Message/MessageErrorText.d.ts +2 -2
- package/dist/components/Message/MessageErrorText.d.ts.map +1 -1
- package/dist/components/Message/MessageOptions.d.ts +1 -1
- package/dist/components/Message/MessageOptions.d.ts.map +1 -1
- package/dist/components/Message/MessageOptions.js +5 -3
- package/dist/components/Message/MessageRepliesCountButton.d.ts +2 -2
- package/dist/components/Message/MessageRepliesCountButton.d.ts.map +1 -1
- package/dist/components/Message/MessageSimple.d.ts +2 -1
- package/dist/components/Message/MessageSimple.d.ts.map +1 -1
- package/dist/components/Message/MessageStatus.d.ts +1 -1
- package/dist/components/Message/MessageStatus.d.ts.map +1 -1
- package/dist/components/Message/MessageText.d.ts +2 -1
- package/dist/components/Message/MessageText.d.ts.map +1 -1
- package/dist/components/Message/MessageTimestamp.d.ts +2 -1
- package/dist/components/Message/MessageTimestamp.d.ts.map +1 -1
- package/dist/components/Message/QuotedMessage.d.ts +2 -1
- package/dist/components/Message/QuotedMessage.d.ts.map +1 -1
- package/dist/components/Message/icons.d.ts +11 -10
- package/dist/components/Message/icons.d.ts.map +1 -1
- package/dist/components/Message/renderText/componentRenderers/Anchor.d.ts +2 -2
- package/dist/components/Message/renderText/componentRenderers/Anchor.d.ts.map +1 -1
- package/dist/components/Message/renderText/componentRenderers/Emoji.d.ts +2 -1
- package/dist/components/Message/renderText/componentRenderers/Emoji.d.ts.map +1 -1
- package/dist/components/Message/renderText/componentRenderers/Mention.d.ts +2 -2
- package/dist/components/Message/renderText/componentRenderers/Mention.d.ts.map +1 -1
- package/dist/components/Message/renderText/renderText.d.ts +2 -2
- package/dist/components/Message/renderText/renderText.d.ts.map +1 -1
- package/dist/components/MessageActions/CustomMessageActionsList.d.ts +2 -1
- package/dist/components/MessageActions/CustomMessageActionsList.d.ts.map +1 -1
- package/dist/components/MessageActions/MessageActions.d.ts +1 -1
- package/dist/components/MessageActions/MessageActions.d.ts.map +1 -1
- package/dist/components/MessageActions/MessageActions.js +3 -1
- package/dist/components/MessageActions/MessageActionsBox.d.ts +1 -1
- package/dist/components/MessageActions/MessageActionsBox.d.ts.map +1 -1
- package/dist/components/MessageActions/MessageActionsBox.js +1 -1
- package/dist/components/MessageBounce/MessageBounceModal.d.ts +2 -2
- package/dist/components/MessageBounce/MessageBounceModal.d.ts.map +1 -1
- package/dist/components/MessageBounce/MessageBouncePrompt.d.ts +2 -1
- package/dist/components/MessageBounce/MessageBouncePrompt.d.ts.map +1 -1
- package/dist/components/MessageInput/AttachmentPreviewList.d.ts +3 -2
- package/dist/components/MessageInput/AttachmentPreviewList.d.ts.map +1 -1
- package/dist/components/MessageInput/CooldownTimer.d.ts +1 -1
- package/dist/components/MessageInput/CooldownTimer.d.ts.map +1 -1
- package/dist/components/MessageInput/DefaultTriggerProvider.d.ts +1 -1
- package/dist/components/MessageInput/DefaultTriggerProvider.d.ts.map +1 -1
- package/dist/components/MessageInput/DropzoneProvider.d.ts +1 -1
- package/dist/components/MessageInput/DropzoneProvider.d.ts.map +1 -1
- package/dist/components/MessageInput/EditMessageForm.d.ts +2 -1
- package/dist/components/MessageInput/EditMessageForm.d.ts.map +1 -1
- package/dist/components/MessageInput/LinkPreviewList.d.ts +2 -1
- package/dist/components/MessageInput/LinkPreviewList.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInput.d.ts +1 -1
- package/dist/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputFlat.d.ts +2 -1
- package/dist/components/MessageInput/MessageInputFlat.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputFlat.js +1 -1
- package/dist/components/MessageInput/MessageInputSmall.d.ts +2 -1
- package/dist/components/MessageInput/MessageInputSmall.d.ts.map +1 -1
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts +3 -2
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts.map +1 -1
- package/dist/components/MessageInput/QuotedMessagePreview.js +1 -1
- package/dist/components/MessageInput/UploadsPreview.d.ts +2 -1
- package/dist/components/MessageInput/UploadsPreview.d.ts.map +1 -1
- package/dist/components/MessageInput/icons.d.ts +14 -14
- package/dist/components/MessageInput/icons.d.ts.map +1 -1
- package/dist/components/MessageInput/icons.js +2 -1
- package/dist/components/MessageList/ConnectionStatus.d.ts +1 -1
- package/dist/components/MessageList/ConnectionStatus.d.ts.map +1 -1
- package/dist/components/MessageList/CustomNotification.d.ts +2 -2
- package/dist/components/MessageList/CustomNotification.d.ts.map +1 -1
- package/dist/components/MessageList/GiphyPreviewMessage.d.ts +2 -1
- package/dist/components/MessageList/GiphyPreviewMessage.d.ts.map +1 -1
- package/dist/components/MessageList/MessageList.d.ts +7 -3
- package/dist/components/MessageList/MessageList.d.ts.map +1 -1
- package/dist/components/MessageList/MessageList.js +3 -2
- package/dist/components/MessageList/MessageListMainPanel.d.ts +2 -1
- package/dist/components/MessageList/MessageListMainPanel.d.ts.map +1 -1
- package/dist/components/MessageList/MessageListNotifications.d.ts +1 -1
- package/dist/components/MessageList/MessageListNotifications.d.ts.map +1 -1
- package/dist/components/MessageList/MessageNotification.d.ts +1 -1
- package/dist/components/MessageList/MessageNotification.d.ts.map +1 -1
- package/dist/components/MessageList/ScrollToBottomButton.d.ts +2 -1
- package/dist/components/MessageList/ScrollToBottomButton.d.ts.map +1 -1
- package/dist/components/MessageList/ScrollToBottomButton.js +44 -3
- package/dist/components/MessageList/UnreadMessagesNotification.d.ts +12 -1
- package/dist/components/MessageList/UnreadMessagesNotification.d.ts.map +1 -1
- package/dist/components/MessageList/UnreadMessagesNotification.js +4 -2
- package/dist/components/MessageList/UnreadMessagesSeparator.d.ts +9 -1
- package/dist/components/MessageList/UnreadMessagesSeparator.d.ts.map +1 -1
- package/dist/components/MessageList/UnreadMessagesSeparator.js +2 -2
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +7 -3
- package/dist/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +4 -3
- package/dist/components/MessageList/VirtualizedMessageListComponents.d.ts +6 -6
- package/dist/components/MessageList/VirtualizedMessageListComponents.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.d.ts +2 -1
- package/dist/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.js +27 -13
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.d.ts +3 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.js +13 -7
- package/dist/components/MessageList/hooks/useMarkRead.d.ts +3 -2
- package/dist/components/MessageList/hooks/useMarkRead.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useMarkRead.js +65 -11
- package/dist/components/MessageList/icons.d.ts +4 -3
- package/dist/components/MessageList/icons.d.ts.map +1 -1
- package/dist/components/MessageList/renderMessages.d.ts +2 -2
- package/dist/components/MessageList/renderMessages.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +9 -7
- package/dist/components/Modal/icons.d.ts +2 -1
- package/dist/components/Modal/icons.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/FileIcon/FileIcon.d.ts +1 -1
- package/dist/components/ReactFileUtilities/FileIcon/FileIcon.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/FileIcon/FileIconSet/v1.d.ts +12 -12
- package/dist/components/ReactFileUtilities/FileIcon/FileIconSet/v1.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/FileIcon/FileIconSet/v2.d.ts +18 -18
- package/dist/components/ReactFileUtilities/FileIcon/FileIconSet/v2.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/FilePreviewer.d.ts +2 -1
- package/dist/components/ReactFileUtilities/FilePreviewer.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/FileUploadButton.d.ts +2 -2
- package/dist/components/ReactFileUtilities/FileUploadButton.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/FileUploadButton.js +3 -1
- package/dist/components/ReactFileUtilities/IconButton.d.ts +2 -2
- package/dist/components/ReactFileUtilities/IconButton.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/IconButton.js +3 -1
- package/dist/components/ReactFileUtilities/ImageDropzone.d.ts +2 -2
- package/dist/components/ReactFileUtilities/ImageDropzone.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/ImagePreviewer.d.ts +2 -2
- package/dist/components/ReactFileUtilities/ImagePreviewer.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/ImagePreviewer.js +3 -1
- package/dist/components/ReactFileUtilities/ImageUploadButton.d.ts +2 -2
- package/dist/components/ReactFileUtilities/ImageUploadButton.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/ImageUploadButton.js +3 -1
- package/dist/components/ReactFileUtilities/LoadingIndicator.d.ts +2 -1
- package/dist/components/ReactFileUtilities/LoadingIndicator.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/Thumbnail.d.ts +2 -2
- package/dist/components/ReactFileUtilities/Thumbnail.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/ThumbnailPlaceholder.d.ts +2 -1
- package/dist/components/ReactFileUtilities/ThumbnailPlaceholder.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/UploadButton.d.ts +2 -2
- package/dist/components/ReactFileUtilities/UploadButton.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/icons/AttachmentIcon.d.ts +2 -1
- package/dist/components/ReactFileUtilities/icons/AttachmentIcon.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/icons/CloseIcon.d.ts +2 -1
- package/dist/components/ReactFileUtilities/icons/CloseIcon.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/icons/FilePlaceholderIcon.d.ts +2 -2
- package/dist/components/ReactFileUtilities/icons/FilePlaceholderIcon.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/icons/PictureIcon.d.ts +2 -1
- package/dist/components/ReactFileUtilities/icons/PictureIcon.d.ts.map +1 -1
- package/dist/components/ReactFileUtilities/icons/RetryIcon.d.ts +2 -1
- package/dist/components/ReactFileUtilities/icons/RetryIcon.d.ts.map +1 -1
- package/dist/components/Reactions/ReactionsList.d.ts +2 -1
- package/dist/components/Reactions/ReactionsList.d.ts.map +1 -1
- package/dist/components/Reactions/ReactionsList.js +3 -1
- package/dist/components/Reactions/ReactionsListModal.d.ts +2 -2
- package/dist/components/Reactions/ReactionsListModal.d.ts.map +1 -1
- package/dist/components/Reactions/ReactionsListModal.js +2 -2
- package/dist/components/Reactions/SimpleReactionsList.d.ts +2 -1
- package/dist/components/Reactions/SimpleReactionsList.d.ts.map +1 -1
- package/dist/components/Reactions/SpriteImage.d.ts +2 -1
- package/dist/components/Reactions/SpriteImage.d.ts.map +1 -1
- package/dist/components/Reactions/SpriteImage.js +3 -17
- package/dist/components/Reactions/StreamEmoji.d.ts +1 -1
- package/dist/components/Reactions/StreamEmoji.d.ts.map +1 -1
- package/dist/components/Reactions/StreamEmoji.js +3 -1
- package/dist/components/Reactions/hooks/useFetchReactions.js +2 -2
- package/dist/components/SafeAnchor/SafeAnchor.d.ts +2 -2
- package/dist/components/SafeAnchor/SafeAnchor.d.ts.map +1 -1
- package/dist/components/SafeAnchor/SafeAnchor.js +3 -1
- package/dist/components/Thread/Thread.d.ts +1 -1
- package/dist/components/Thread/Thread.d.ts.map +1 -1
- package/dist/components/Thread/ThreadHead.d.ts +2 -1
- package/dist/components/Thread/ThreadHead.d.ts.map +1 -1
- package/dist/components/Thread/ThreadHeader.d.ts +1 -1
- package/dist/components/Thread/ThreadHeader.d.ts.map +1 -1
- package/dist/components/Thread/ThreadHeader.js +1 -1
- package/dist/components/Thread/ThreadStart.d.ts +2 -1
- package/dist/components/Thread/ThreadStart.d.ts.map +1 -1
- package/dist/components/Thread/icons.d.ts +2 -1
- package/dist/components/Thread/icons.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/TypingIndicator/TypingIndicator.d.ts +1 -1
- package/dist/components/TypingIndicator/TypingIndicator.d.ts.map +1 -1
- package/dist/components/UserItem/UserItem.d.ts +1 -1
- package/dist/components/UserItem/UserItem.d.ts.map +1 -1
- package/dist/components/Window/Window.d.ts +1 -1
- package/dist/components/Window/Window.d.ts.map +1 -1
- package/dist/context/ChannelActionContext.d.ts +4 -3
- package/dist/context/ChannelActionContext.d.ts.map +1 -1
- package/dist/context/ChannelListContext.d.ts +1 -1
- package/dist/context/ChannelListContext.d.ts.map +1 -1
- package/dist/context/ChannelStateContext.d.ts +2 -2
- package/dist/context/ChannelStateContext.d.ts.map +1 -1
- package/dist/context/ChatContext.d.ts +2 -2
- package/dist/context/ChatContext.d.ts.map +1 -1
- package/dist/context/ComponentContext.d.ts +2 -2
- package/dist/context/ComponentContext.d.ts.map +1 -1
- package/dist/context/MessageBounceContext.d.ts +2 -2
- package/dist/context/MessageBounceContext.d.ts.map +1 -1
- package/dist/context/MessageContext.d.ts +2 -2
- package/dist/context/MessageContext.d.ts.map +1 -1
- package/dist/context/MessageInputContext.d.ts +1 -1
- package/dist/context/MessageInputContext.d.ts.map +1 -1
- package/dist/context/MessageListContext.d.ts +1 -1
- package/dist/context/MessageListContext.d.ts.map +1 -1
- package/dist/context/TranslationContext.d.ts +2 -2
- package/dist/context/TranslationContext.d.ts.map +1 -1
- package/dist/context/TypingContext.d.ts +2 -2
- package/dist/context/TypingContext.d.ts.map +1 -1
- package/dist/css/v2/index.css +1 -1
- package/dist/css/v2/index.layout.css +1 -1
- package/dist/i18n/Streami18n.d.ts +19 -0
- package/dist/i18n/Streami18n.d.ts.map +1 -1
- package/dist/i18n/de.json +19 -0
- package/dist/i18n/en.json +19 -0
- package/dist/i18n/es.json +19 -0
- package/dist/i18n/fr.json +19 -0
- package/dist/i18n/hi.json +19 -0
- package/dist/i18n/it.json +19 -0
- package/dist/i18n/ja.json +19 -0
- package/dist/i18n/ko.json +19 -0
- package/dist/i18n/nl.json +19 -0
- package/dist/i18n/pt.json +19 -0
- package/dist/i18n/ru.json +19 -0
- package/dist/i18n/tr.json +19 -0
- package/dist/index.cjs.js +117 -40
- package/dist/scss/v2/MessageReactions/MessageReactions-layout.scss +15 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -6
package/dist/i18n/ko.json
CHANGED
|
@@ -73,6 +73,25 @@
|
|
|
73
73
|
"Wait until all attachments have uploaded": "모든 첨부 파일이 업로드될 때까지 기다립니다.",
|
|
74
74
|
"You have no channels currently": "현재 채널이 없습니다.",
|
|
75
75
|
"You've reached the maximum number of files": "최대 파일 수에 도달했습니다.",
|
|
76
|
+
"aria/Attachment": "첨부 파일",
|
|
77
|
+
"aria/Cancel Reply": "답장 취소",
|
|
78
|
+
"aria/Cancel upload": "업로드 취소",
|
|
79
|
+
"aria/Channel list": "채널 목록",
|
|
80
|
+
"aria/Channel search results": "채널 검색 결과",
|
|
81
|
+
"aria/Close thread": "스레드 닫기",
|
|
82
|
+
"aria/Emoji picker": "이모지 선택기",
|
|
83
|
+
"aria/File input": "파일 입력",
|
|
84
|
+
"aria/File upload": "파일 업로드",
|
|
85
|
+
"aria/Image input": "이미지 입력",
|
|
86
|
+
"aria/Load More Channels": "더 많은 채널 불러오기",
|
|
87
|
+
"aria/Menu": "메뉴",
|
|
88
|
+
"aria/Message Options": "메시지 옵션",
|
|
89
|
+
"aria/Open Message Actions Menu": "메시지 액션 메뉴 열기",
|
|
90
|
+
"aria/Open Reaction Selector": "반응 선택기 열기",
|
|
91
|
+
"aria/Open Thread": "스레드 열기",
|
|
92
|
+
"aria/Reaction list": "반응 목록",
|
|
93
|
+
"aria/Retry upload": "업로드 다시 시도",
|
|
94
|
+
"aria/Send": "보내기",
|
|
76
95
|
"ban-command-args": "[@사용자이름] [텍스트]",
|
|
77
96
|
"ban-command-description": "사용자를 차단",
|
|
78
97
|
"giphy-command-args": "[텍스트]",
|
package/dist/i18n/nl.json
CHANGED
|
@@ -73,6 +73,25 @@
|
|
|
73
73
|
"Wait until all attachments have uploaded": "Wacht tot alle bijlagen zijn geüpload",
|
|
74
74
|
"You have no channels currently": "Er zijn geen chats beschikbaar",
|
|
75
75
|
"You've reached the maximum number of files": "Je hebt het maximale aantal bestanden bereikt",
|
|
76
|
+
"aria/Attachment": "Bijlage",
|
|
77
|
+
"aria/Cancel Reply": "Antwoord annuleren",
|
|
78
|
+
"aria/Cancel upload": "Upload annuleren",
|
|
79
|
+
"aria/Channel list": "Kanaallijst",
|
|
80
|
+
"aria/Channel search results": "Zoekresultaten voor kanalen",
|
|
81
|
+
"aria/Close thread": "Draad sluiten",
|
|
82
|
+
"aria/Emoji picker": "Emoji kiezer",
|
|
83
|
+
"aria/File input": "Bestandsinvoer",
|
|
84
|
+
"aria/File upload": "Bestand uploaden",
|
|
85
|
+
"aria/Image input": "Afbeelding invoeren",
|
|
86
|
+
"aria/Load More Channels": "Meer kanalen laden",
|
|
87
|
+
"aria/Menu": "Menu",
|
|
88
|
+
"aria/Message Options": "Berichtopties",
|
|
89
|
+
"aria/Open Message Actions Menu": "Menu voor berichtacties openen",
|
|
90
|
+
"aria/Open Reaction Selector": "Reactiekiezer openen",
|
|
91
|
+
"aria/Open Thread": "Draad openen",
|
|
92
|
+
"aria/Reaction list": "Reactielijst",
|
|
93
|
+
"aria/Retry upload": "Upload opnieuw proberen",
|
|
94
|
+
"aria/Send": "Verzenden",
|
|
76
95
|
"ban-command-args": "[@gebruikersnaam] [tekst]",
|
|
77
96
|
"ban-command-description": "Een gebruiker verbannen",
|
|
78
97
|
"giphy-command-args": "[tekst]",
|
package/dist/i18n/pt.json
CHANGED
|
@@ -73,6 +73,25 @@
|
|
|
73
73
|
"Wait until all attachments have uploaded": "Espere até que todos os anexos tenham sido carregados",
|
|
74
74
|
"You have no channels currently": "Você não tem canais atualmente",
|
|
75
75
|
"You've reached the maximum number of files": "Você atingiu o número máximo de arquivos",
|
|
76
|
+
"aria/Attachment": "Bijlage",
|
|
77
|
+
"aria/Cancel Reply": "Antwoord annuleren",
|
|
78
|
+
"aria/Cancel upload": "Upload annuleren",
|
|
79
|
+
"aria/Channel list": "Kanaallijst",
|
|
80
|
+
"aria/Channel search results": "Zoekresultaten voor kanalen",
|
|
81
|
+
"aria/Close thread": "Draad sluiten",
|
|
82
|
+
"aria/Emoji picker": "Emoji kiezer",
|
|
83
|
+
"aria/File input": "Bestandsinvoer",
|
|
84
|
+
"aria/File upload": "Bestand uploaden",
|
|
85
|
+
"aria/Image input": "Afbeelding invoeren",
|
|
86
|
+
"aria/Load More Channels": "Meer kanalen laden",
|
|
87
|
+
"aria/Menu": "Menu",
|
|
88
|
+
"aria/Message Options": "Berichtopties",
|
|
89
|
+
"aria/Open Message Actions Menu": "Menu voor berichtacties openen",
|
|
90
|
+
"aria/Open Reaction Selector": "Reactiekiezer openen",
|
|
91
|
+
"aria/Open Thread": "Draad openen",
|
|
92
|
+
"aria/Reaction list": "Reactielijst",
|
|
93
|
+
"aria/Retry upload": "Upload opnieuw proberen",
|
|
94
|
+
"aria/Send": "Verzenden",
|
|
76
95
|
"ban-command-args": "[@nomedeusuário] [texto]",
|
|
77
96
|
"ban-command-description": "Banir um usuário",
|
|
78
97
|
"giphy-command-args": "[texto]",
|
package/dist/i18n/ru.json
CHANGED
|
@@ -73,6 +73,25 @@
|
|
|
73
73
|
"Wait until all attachments have uploaded": "Подождите, пока все вложения загрузятся",
|
|
74
74
|
"You have no channels currently": "У вас нет каналов в данный момент",
|
|
75
75
|
"You've reached the maximum number of files": "Вы достигли максимального количества файлов",
|
|
76
|
+
"aria/Attachment": "Вложение",
|
|
77
|
+
"aria/Cancel Reply": "Отменить ответ",
|
|
78
|
+
"aria/Cancel upload": "Отменить загрузку",
|
|
79
|
+
"aria/Channel list": "Список каналов",
|
|
80
|
+
"aria/Channel search results": "Результаты поиска по каналам",
|
|
81
|
+
"aria/Close thread": "Закрыть тему",
|
|
82
|
+
"aria/Emoji picker": "Выбор эмодзи",
|
|
83
|
+
"aria/File input": "Ввод файла",
|
|
84
|
+
"aria/File upload": "Загрузка файла",
|
|
85
|
+
"aria/Image input": "Ввод изображения",
|
|
86
|
+
"aria/Load More Channels": "Загрузить больше каналов",
|
|
87
|
+
"aria/Menu": "Меню",
|
|
88
|
+
"aria/Message Options": "Параметры сообщения",
|
|
89
|
+
"aria/Open Message Actions Menu": "Открыть меню действий с сообщениями",
|
|
90
|
+
"aria/Open Reaction Selector": "Открыть селектор реакций",
|
|
91
|
+
"aria/Open Thread": "Открыть тему",
|
|
92
|
+
"aria/Reaction list": "Список реакций",
|
|
93
|
+
"aria/Retry upload": "Повторить загрузку",
|
|
94
|
+
"aria/Send": "Отправить",
|
|
76
95
|
"ban-command-args": "[@имяпользователя] [текст]",
|
|
77
96
|
"ban-command-description": "Заблокировать пользователя",
|
|
78
97
|
"giphy-command-args": "[текст]",
|
package/dist/i18n/tr.json
CHANGED
|
@@ -73,6 +73,25 @@
|
|
|
73
73
|
"Wait until all attachments have uploaded": "Tüm ekler yüklenene kadar bekleyin",
|
|
74
74
|
"You have no channels currently": "Henüz kanalınız yok",
|
|
75
75
|
"You've reached the maximum number of files": "Maksimum dosya sayısına ulaştınız",
|
|
76
|
+
"aria/Attachment": "Bijlage",
|
|
77
|
+
"aria/Cancel Reply": "Antwoord annuleren",
|
|
78
|
+
"aria/Cancel upload": "Upload annuleren",
|
|
79
|
+
"aria/Channel list": "Kanaallijst",
|
|
80
|
+
"aria/Channel search results": "Zoekresultaten voor kanalen",
|
|
81
|
+
"aria/Close thread": "Draad sluiten",
|
|
82
|
+
"aria/Emoji picker": "Emoji kiezer",
|
|
83
|
+
"aria/File input": "Bestandsinvoer",
|
|
84
|
+
"aria/File upload": "Bestand uploaden",
|
|
85
|
+
"aria/Image input": "Afbeelding invoeren",
|
|
86
|
+
"aria/Load More Channels": "Meer kanalen laden",
|
|
87
|
+
"aria/Menu": "Menu",
|
|
88
|
+
"aria/Message Options": "Berichtopties",
|
|
89
|
+
"aria/Open Message Actions Menu": "Menu voor berichtacties openen",
|
|
90
|
+
"aria/Open Reaction Selector": "Reactiekiezer openen",
|
|
91
|
+
"aria/Open Thread": "Draad openen",
|
|
92
|
+
"aria/Reaction list": "Reactielijst",
|
|
93
|
+
"aria/Retry upload": "Upload opnieuw proberen",
|
|
94
|
+
"aria/Send": "Verzenden",
|
|
76
95
|
"ban-command-args": "[@kullanıcıadı] [metin]",
|
|
77
96
|
"ban-command-description": "Bir kullanıcıyı yasakla",
|
|
78
97
|
"giphy-command-args": "[metin]",
|
package/dist/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Window = require('./Window-
|
|
5
|
+
var Window = require('./Window-5e0717c0.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactVirtuoso = require('react-virtuoso');
|
|
8
8
|
var throttle = require('lodash.throttle');
|
|
@@ -36,7 +36,6 @@ require('dayjs/locale/pt');
|
|
|
36
36
|
require('dayjs/locale/ru');
|
|
37
37
|
require('dayjs/locale/tr');
|
|
38
38
|
require('dayjs/locale/en');
|
|
39
|
-
require('react/jsx-runtime');
|
|
40
39
|
require('react-player');
|
|
41
40
|
require('pretty-bytes');
|
|
42
41
|
require('prop-types');
|
|
@@ -46,6 +45,7 @@ require('react-textarea-autosize');
|
|
|
46
45
|
require('textarea-caret');
|
|
47
46
|
require('react-is');
|
|
48
47
|
require('crypto');
|
|
48
|
+
require('react/jsx-runtime');
|
|
49
49
|
|
|
50
50
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
51
51
|
|
|
@@ -332,13 +332,17 @@ var MessageListMainPanel = function (_a) {
|
|
|
332
332
|
return React__default["default"].createElement(React__default["default"].Fragment, null, children);
|
|
333
333
|
};
|
|
334
334
|
|
|
335
|
-
var
|
|
336
|
-
var
|
|
337
|
-
|
|
338
|
-
|
|
335
|
+
var targetScrolledAboveVisibleContainerArea = function (element) {
|
|
336
|
+
var targetBottom = element.getBoundingClientRect().bottom;
|
|
337
|
+
return targetBottom < 0;
|
|
338
|
+
};
|
|
339
|
+
var targetScrolledBelowVisibleContainerArea = function (element, container) {
|
|
340
|
+
var targetTop = element.getBoundingClientRect().top;
|
|
341
|
+
var containerBottom = container.getBoundingClientRect().top;
|
|
342
|
+
return targetTop > containerBottom;
|
|
339
343
|
};
|
|
340
344
|
var useUnreadMessagesNotification = function (_a) {
|
|
341
|
-
var isMessageListScrolledToBottom = _a.isMessageListScrolledToBottom, unreadCount = _a.unreadCount;
|
|
345
|
+
var isMessageListScrolledToBottom = _a.isMessageListScrolledToBottom, showAlways = _a.showAlways, unreadCount = _a.unreadCount;
|
|
342
346
|
var messages = Window.useChannelStateContext('UnreadMessagesNotification').messages;
|
|
343
347
|
var _b = React.useState(false), show = _b[0], setShow = _b[1];
|
|
344
348
|
var isScrolledAboveTargetTop = React.useRef(false);
|
|
@@ -356,22 +360,32 @@ var useUnreadMessagesNotification = function (_a) {
|
|
|
356
360
|
setShow(true);
|
|
357
361
|
return;
|
|
358
362
|
}
|
|
359
|
-
|
|
363
|
+
var scrolledBelowSeparator = targetScrolledAboveVisibleContainerArea(observedTarget);
|
|
364
|
+
var scrolledAboveSeparator = targetScrolledBelowVisibleContainerArea(observedTarget, msgListPanel);
|
|
365
|
+
setShow(showAlways ? scrolledBelowSeparator || scrolledAboveSeparator : scrolledBelowSeparator);
|
|
360
366
|
var observer = new IntersectionObserver(function (elements) {
|
|
361
367
|
if (!elements.length)
|
|
362
368
|
return;
|
|
363
|
-
var _a = elements[0], boundingClientRect = _a.boundingClientRect, isIntersecting = _a.isIntersecting
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
+
var _a = elements[0], boundingClientRect = _a.boundingClientRect, isIntersecting = _a.isIntersecting;
|
|
370
|
+
if (isIntersecting) {
|
|
371
|
+
setShow(false);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
var separatorIsAboveContainerTop = boundingClientRect.bottom < 0;
|
|
375
|
+
setShow(showAlways || separatorIsAboveContainerTop);
|
|
376
|
+
isScrolledAboveTargetTop.current = separatorIsAboveContainerTop;
|
|
369
377
|
}, { root: msgListPanel });
|
|
370
378
|
observer.observe(observedTarget);
|
|
371
379
|
return function () {
|
|
372
380
|
observer.disconnect();
|
|
373
381
|
};
|
|
374
|
-
}, [
|
|
382
|
+
}, [
|
|
383
|
+
intersectionObserverIsSupported,
|
|
384
|
+
isMessageListScrolledToBottom,
|
|
385
|
+
messages,
|
|
386
|
+
showAlways,
|
|
387
|
+
unreadCount,
|
|
388
|
+
]);
|
|
375
389
|
React.useEffect(function () {
|
|
376
390
|
/**
|
|
377
391
|
* Handle situation when scrollToBottom is called from another component when the msg list is scrolled above the observed target (unread separator).
|
|
@@ -397,31 +411,84 @@ var useUnreadMessagesNotification = function (_a) {
|
|
|
397
411
|
* @param wasChannelMarkedUnread
|
|
398
412
|
*/
|
|
399
413
|
var useMarkRead = function (_a) {
|
|
400
|
-
var isMessageListScrolledToBottom = _a.isMessageListScrolledToBottom,
|
|
401
|
-
var
|
|
414
|
+
var isMessageListScrolledToBottom = _a.isMessageListScrolledToBottom, messageListIsThread = _a.messageListIsThread, unreadCount = _a.unreadCount, wasMarkedUnread = _a.wasMarkedUnread;
|
|
415
|
+
var client = Window.useChatContext('useMarkRead').client;
|
|
416
|
+
var _b = Window.useChannelActionContext('useMarkRead'), markRead = _b.markRead, setChannelUnreadUiState = _b.setChannelUnreadUiState;
|
|
417
|
+
var channel = Window.useChannelStateContext('useMarkRead').channel;
|
|
418
|
+
var previousRenderMessageListScrolledToBottom = React.useRef(isMessageListScrolledToBottom);
|
|
402
419
|
React.useEffect(function () {
|
|
403
|
-
var shouldMarkRead =
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
420
|
+
var shouldMarkRead = function (unreadMessages) {
|
|
421
|
+
return !document.hidden &&
|
|
422
|
+
!wasMarkedUnread &&
|
|
423
|
+
!messageListIsThread &&
|
|
424
|
+
isMessageListScrolledToBottom &&
|
|
425
|
+
unreadMessages > 0;
|
|
426
|
+
};
|
|
407
427
|
var onVisibilityChange = function () {
|
|
408
|
-
if (
|
|
428
|
+
if (shouldMarkRead(unreadCount))
|
|
409
429
|
markRead();
|
|
410
430
|
};
|
|
431
|
+
var handleMessageNew = function (event) {
|
|
432
|
+
var _a, _b, _c, _d;
|
|
433
|
+
var newMessageToCurrentChannel = event.cid === channel.cid;
|
|
434
|
+
var isOwnMessage = ((_a = event.user) === null || _a === void 0 ? void 0 : _a.id) && event.user.id === ((_b = client.user) === null || _b === void 0 ? void 0 : _b.id);
|
|
435
|
+
var mainChannelUpdated = !((_c = event.message) === null || _c === void 0 ? void 0 : _c.parent_id) || ((_d = event.message) === null || _d === void 0 ? void 0 : _d.show_in_channel);
|
|
436
|
+
if (isOwnMessage)
|
|
437
|
+
return;
|
|
438
|
+
if (!isMessageListScrolledToBottom || wasMarkedUnread || document.hidden) {
|
|
439
|
+
setChannelUnreadUiState(function (prev) {
|
|
440
|
+
var _a, _b;
|
|
441
|
+
var previousUnreadCount = (_a = prev === null || prev === void 0 ? void 0 : prev.unread_messages) !== null && _a !== void 0 ? _a : 0;
|
|
442
|
+
var previousLastMessage = getPreviousLastMessage(channel.state.messages, event.message);
|
|
443
|
+
return Window.__assign(Window.__assign({}, (prev || {})), { last_read: (_b = prev === null || prev === void 0 ? void 0 : prev.last_read) !== null && _b !== void 0 ? _b : (previousUnreadCount === 0 && (previousLastMessage === null || previousLastMessage === void 0 ? void 0 : previousLastMessage.created_at)
|
|
444
|
+
? new Date(previousLastMessage.created_at)
|
|
445
|
+
: new Date(0)), unread_messages: previousUnreadCount + 1 });
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
else if (newMessageToCurrentChannel &&
|
|
449
|
+
mainChannelUpdated &&
|
|
450
|
+
!isOwnMessage &&
|
|
451
|
+
shouldMarkRead(channel.countUnread())) {
|
|
452
|
+
markRead();
|
|
453
|
+
}
|
|
454
|
+
};
|
|
455
|
+
client.on('message.new', handleMessageNew);
|
|
411
456
|
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
412
|
-
|
|
457
|
+
var hasScrolledToBottom = previousRenderMessageListScrolledToBottom.current !== isMessageListScrolledToBottom &&
|
|
458
|
+
isMessageListScrolledToBottom;
|
|
459
|
+
if (shouldMarkRead(hasScrolledToBottom ? channel.countUnread() : unreadCount))
|
|
413
460
|
markRead();
|
|
461
|
+
previousRenderMessageListScrolledToBottom.current = isMessageListScrolledToBottom;
|
|
414
462
|
return function () {
|
|
463
|
+
client.off('message.new', handleMessageNew);
|
|
415
464
|
document.removeEventListener('visibilitychange', onVisibilityChange);
|
|
416
465
|
};
|
|
417
466
|
}, [
|
|
467
|
+
channel,
|
|
468
|
+
client,
|
|
418
469
|
isMessageListScrolledToBottom,
|
|
419
470
|
markRead,
|
|
420
471
|
messageListIsThread,
|
|
472
|
+
setChannelUnreadUiState,
|
|
421
473
|
unreadCount,
|
|
422
|
-
|
|
474
|
+
wasMarkedUnread,
|
|
423
475
|
]);
|
|
424
476
|
};
|
|
477
|
+
function getPreviousLastMessage(messages, newMessage) {
|
|
478
|
+
if (!newMessage)
|
|
479
|
+
return;
|
|
480
|
+
var previousLastMessage;
|
|
481
|
+
for (var i = messages.length - 1; i >= 0; i--) {
|
|
482
|
+
var msg = messages[i];
|
|
483
|
+
if (!(msg === null || msg === void 0 ? void 0 : msg.id))
|
|
484
|
+
break;
|
|
485
|
+
if (msg.id !== newMessage.id) {
|
|
486
|
+
previousLastMessage = msg;
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return previousLastMessage;
|
|
491
|
+
}
|
|
425
492
|
|
|
426
493
|
var MessageListNotifications = function (props) {
|
|
427
494
|
var hasNewMessages = props.hasNewMessages, isMessageListScrolledToBottom = props.isMessageListScrolledToBottom, isNotAtLatestMessageSet = props.isNotAtLatestMessageSet, MessageNotification = props.MessageNotification, notifications = props.notifications, scrollToBottom = props.scrollToBottom, threadList = props.threadList, unreadCount = props.unreadCount;
|
|
@@ -433,11 +500,13 @@ var MessageListNotifications = function (props) {
|
|
|
433
500
|
};
|
|
434
501
|
|
|
435
502
|
var UnreadMessagesNotification = function (_a) {
|
|
436
|
-
var queryMessageLimit = _a.queryMessageLimit, unreadCount = _a.unreadCount;
|
|
503
|
+
var queryMessageLimit = _a.queryMessageLimit, showCount = _a.showCount, unreadCount = _a.unreadCount;
|
|
437
504
|
var _b = Window.useChannelActionContext('UnreadMessagesNotification'), jumpToFirstUnreadMessage = _b.jumpToFirstUnreadMessage, markRead = _b.markRead;
|
|
438
505
|
var t = Window.useTranslationContext('UnreadMessagesNotification').t;
|
|
439
506
|
return (React__default["default"].createElement("div", { className: 'str-chat__unread-messages-notification', "data-testid": 'unread-messages-notification' },
|
|
440
|
-
React__default["default"].createElement("button", { onClick: function () { return jumpToFirstUnreadMessage(queryMessageLimit); } },
|
|
507
|
+
React__default["default"].createElement("button", { onClick: function () { return jumpToFirstUnreadMessage(queryMessageLimit); } }, unreadCount && showCount
|
|
508
|
+
? t('{{count}} unread', { count: unreadCount !== null && unreadCount !== void 0 ? unreadCount : 0 })
|
|
509
|
+
: t('Unread messages')),
|
|
441
510
|
React__default["default"].createElement("button", { onClick: function () { return markRead(); } },
|
|
442
511
|
React__default["default"].createElement(Window.CloseIcon, null))));
|
|
443
512
|
};
|
|
@@ -568,7 +637,7 @@ var MessageListWithContext = function (props) {
|
|
|
568
637
|
var _a;
|
|
569
638
|
var channel = props.channel, channelUnreadUiState = props.channelUnreadUiState, _b = props.disableDateSeparator, disableDateSeparator = _b === void 0 ? false : _b, groupStyles = props.groupStyles, _c = props.hideDeletedMessages, hideDeletedMessages = _c === void 0 ? false : _c, _d = props.hideNewMessageSeparator, hideNewMessageSeparator = _d === void 0 ? false : _d, internalInfiniteScrollProps = props.internalInfiniteScrollProps, _e = props.messageActions, messageActions = _e === void 0 ? Object.keys(Window.MESSAGE_ACTIONS) : _e, _f = props.messages, messages = _f === void 0 ? [] : _f, notifications = props.notifications, _g = props.noGroupByUser, noGroupByUser = _g === void 0 ? false : _g, _h = props.pinPermissions, pinPermissions = _h === void 0 ? Window.defaultPinPermissions : _h, // @deprecated in favor of `channelCapabilities` - TODO: remove in next major release
|
|
570
639
|
_j = props.returnAllReadData, // @deprecated in favor of `channelCapabilities` - TODO: remove in next major release
|
|
571
|
-
returnAllReadData = _j === void 0 ? false : _j, _k = props.threadList, threadList = _k === void 0 ? false : _k, _l = props.unsafeHTML, unsafeHTML = _l === void 0 ? false : _l, headerPosition = props.headerPosition, read = props.read,
|
|
640
|
+
returnAllReadData = _j === void 0 ? false : _j, _k = props.threadList, threadList = _k === void 0 ? false : _k, _l = props.unsafeHTML, unsafeHTML = _l === void 0 ? false : _l, headerPosition = props.headerPosition, read = props.read, _m = props.renderMessages, renderMessages = _m === void 0 ? defaultRenderMessages : _m, _o = props.messageLimit, messageLimit = _o === void 0 ? 100 : _o, loadMoreCallback = props.loadMore, loadMoreNewerCallback = props.loadMoreNewer, _p = props.hasMoreNewer, hasMoreNewer = _p === void 0 ? false : _p, showUnreadNotificationAlways = props.showUnreadNotificationAlways, suppressAutoscroll = props.suppressAutoscroll, highlightedMessageId = props.highlightedMessageId, _q = props.jumpToLatestMessage, jumpToLatestMessage = _q === void 0 ? function () { return Promise.resolve(); } : _q;
|
|
572
641
|
var _r = React__default["default"].useState(null), listElement = _r[0], setListElement = _r[1];
|
|
573
642
|
var _s = React__default["default"].useState(null), ulElement = _s[0], setUlElement = _s[1];
|
|
574
643
|
var customClasses = Window.useChatContext('MessageList').customClasses;
|
|
@@ -584,13 +653,14 @@ var MessageListWithContext = function (props) {
|
|
|
584
653
|
}), hasNewMessages = _0.hasNewMessages, isMessageListScrolledToBottom = _0.isMessageListScrolledToBottom, onScroll = _0.onScroll, scrollToBottom = _0.scrollToBottom, wrapperRect = _0.wrapperRect;
|
|
585
654
|
var showUnreadMessagesNotification = useUnreadMessagesNotification({
|
|
586
655
|
isMessageListScrolledToBottom: isMessageListScrolledToBottom,
|
|
656
|
+
showAlways: !!showUnreadNotificationAlways,
|
|
587
657
|
unreadCount: channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.unread_messages,
|
|
588
658
|
}).show;
|
|
589
659
|
useMarkRead({
|
|
590
660
|
isMessageListScrolledToBottom: isMessageListScrolledToBottom,
|
|
591
|
-
markReadOnScrolledToBottom: markReadOnScrolledToBottom,
|
|
592
661
|
messageListIsThread: threadList,
|
|
593
662
|
unreadCount: (_a = channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.unread_messages) !== null && _a !== void 0 ? _a : 0,
|
|
663
|
+
wasMarkedUnread: !!(channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.first_unread_message_id),
|
|
594
664
|
});
|
|
595
665
|
var _1 = useEnrichedMessages({
|
|
596
666
|
channel: channel,
|
|
@@ -903,19 +973,25 @@ var useScrollToBottomOnNewMessage = function (_a) {
|
|
|
903
973
|
* `UnreadMessagesNotification` component is rendered. This is an approximate equivalent to being
|
|
904
974
|
* scrolled below the `UnreadMessagesNotification` component.
|
|
905
975
|
* @param lastRead
|
|
976
|
+
* @param showAlways
|
|
906
977
|
* @param unreadCount
|
|
907
978
|
*/
|
|
908
979
|
var useUnreadMessagesNotificationVirtualized = function (_a) {
|
|
909
|
-
var lastRead = _a.lastRead, unreadCount = _a.unreadCount;
|
|
980
|
+
var lastRead = _a.lastRead, showAlways = _a.showAlways, unreadCount = _a.unreadCount;
|
|
910
981
|
var _b = React.useState(false), show = _b[0], setShow = _b[1];
|
|
911
982
|
var toggleShowUnreadMessagesNotification = React.useCallback(function (renderedMessages) {
|
|
912
|
-
if (!
|
|
983
|
+
if (!unreadCount)
|
|
984
|
+
return;
|
|
985
|
+
var firstRenderedMessage = renderedMessages[0];
|
|
986
|
+
var lastRenderedMessage = renderedMessages.slice(-1)[0];
|
|
987
|
+
if (!(firstRenderedMessage && lastRenderedMessage))
|
|
913
988
|
return;
|
|
914
|
-
var
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
989
|
+
var scrolledBelowSeparator = !!lastRead &&
|
|
990
|
+
new Date(firstRenderedMessage.created_at).getTime() > lastRead.getTime();
|
|
991
|
+
var scrolledAboveSeparator = !!lastRead &&
|
|
992
|
+
new Date(lastRenderedMessage.created_at).getTime() < lastRead.getTime();
|
|
993
|
+
setShow(showAlways ? scrolledBelowSeparator || scrolledAboveSeparator : scrolledBelowSeparator);
|
|
994
|
+
}, [lastRead, showAlways, unreadCount]);
|
|
919
995
|
React.useEffect(function () {
|
|
920
996
|
if (!unreadCount)
|
|
921
997
|
setShow(false);
|
|
@@ -1037,11 +1113,11 @@ function calculateInitialTopMostItemIndex(messages, highlightedMessageId) {
|
|
|
1037
1113
|
}
|
|
1038
1114
|
var VirtualizedMessageListWithContext = function (props) {
|
|
1039
1115
|
var _a, _b;
|
|
1040
|
-
var additionalMessageInputProps = props.additionalMessageInputProps, _c = props.additionalVirtuosoProps, additionalVirtuosoProps = _c === void 0 ? {} : _c, channel = props.channel, channelUnreadUiState = props.channelUnreadUiState, closeReactionSelectorOnClick = props.closeReactionSelectorOnClick, customMessageActions = props.customMessageActions, customMessageRenderer = props.customMessageRenderer, defaultItemHeight = props.defaultItemHeight, _d = props.disableDateSeparator, disableDateSeparator = _d === void 0 ? true : _d, groupStyles = props.groupStyles, hasMoreNewer = props.hasMoreNewer, head = props.head, _e = props.hideDeletedMessages, hideDeletedMessages = _e === void 0 ? false : _e, _f = props.hideNewMessageSeparator, hideNewMessageSeparator = _f === void 0 ? false : _f, highlightedMessageId = props.highlightedMessageId, jumpToLatestMessage = props.jumpToLatestMessage, loadingMore = props.loadingMore, loadMore = props.loadMore, loadMoreNewer = props.loadMoreNewer,
|
|
1116
|
+
var additionalMessageInputProps = props.additionalMessageInputProps, _c = props.additionalVirtuosoProps, additionalVirtuosoProps = _c === void 0 ? {} : _c, channel = props.channel, channelUnreadUiState = props.channelUnreadUiState, closeReactionSelectorOnClick = props.closeReactionSelectorOnClick, customMessageActions = props.customMessageActions, customMessageRenderer = props.customMessageRenderer, defaultItemHeight = props.defaultItemHeight, _d = props.disableDateSeparator, disableDateSeparator = _d === void 0 ? true : _d, groupStyles = props.groupStyles, hasMoreNewer = props.hasMoreNewer, head = props.head, _e = props.hideDeletedMessages, hideDeletedMessages = _e === void 0 ? false : _e, _f = props.hideNewMessageSeparator, hideNewMessageSeparator = _f === void 0 ? false : _f, highlightedMessageId = props.highlightedMessageId, jumpToLatestMessage = props.jumpToLatestMessage, loadingMore = props.loadingMore, loadMore = props.loadMore, loadMoreNewer = props.loadMoreNewer, MessageUIComponentFromProps = props.Message, messageActions = props.messageActions, _g = props.messageLimit, messageLimit = _g === void 0 ? 100 : _g, messages = props.messages, notifications = props.notifications,
|
|
1041
1117
|
// TODO: refactor to scrollSeekPlaceHolderConfiguration and components.ScrollSeekPlaceholder, like the Virtuoso Component
|
|
1042
1118
|
_h = props.overscan,
|
|
1043
1119
|
// TODO: refactor to scrollSeekPlaceHolderConfiguration and components.ScrollSeekPlaceholder, like the Virtuoso Component
|
|
1044
|
-
overscan = _h === void 0 ? 0 : _h, read = props.read, _j = props.returnAllReadData, returnAllReadData = _j === void 0 ? false : _j, scrollSeekPlaceHolder = props.scrollSeekPlaceHolder, _k = props.scrollToLatestMessageOnFocus, scrollToLatestMessageOnFocus = _k === void 0 ? false : _k, _l = props.separateGiphyPreview, separateGiphyPreview = _l === void 0 ? false : _l, _m = props.shouldGroupByUser, shouldGroupByUser = _m === void 0 ? false : _m, _o = props.stickToBottomScrollBehavior, stickToBottomScrollBehavior = _o === void 0 ? 'smooth' : _o, suppressAutoscroll = props.suppressAutoscroll, threadList = props.threadList;
|
|
1120
|
+
overscan = _h === void 0 ? 0 : _h, read = props.read, _j = props.returnAllReadData, returnAllReadData = _j === void 0 ? false : _j, scrollSeekPlaceHolder = props.scrollSeekPlaceHolder, _k = props.scrollToLatestMessageOnFocus, scrollToLatestMessageOnFocus = _k === void 0 ? false : _k, _l = props.separateGiphyPreview, separateGiphyPreview = _l === void 0 ? false : _l, _m = props.shouldGroupByUser, shouldGroupByUser = _m === void 0 ? false : _m, showUnreadNotificationAlways = props.showUnreadNotificationAlways, _o = props.stickToBottomScrollBehavior, stickToBottomScrollBehavior = _o === void 0 ? 'smooth' : _o, suppressAutoscroll = props.suppressAutoscroll, threadList = props.threadList;
|
|
1045
1121
|
var virtuosoComponentsFromProps = additionalVirtuosoProps.components, overridingVirtuosoProps = Window.__rest(additionalVirtuosoProps, ["components"]);
|
|
1046
1122
|
// Stops errors generated from react-virtuoso to bubble up
|
|
1047
1123
|
// to Sentry or other tracking tools.
|
|
@@ -1053,6 +1129,7 @@ var VirtualizedMessageListWithContext = function (props) {
|
|
|
1053
1129
|
var lastRead = React.useMemo(function () { var _a; return (_a = channel.lastRead) === null || _a === void 0 ? void 0 : _a.call(channel); }, [channel]);
|
|
1054
1130
|
var _w = useUnreadMessagesNotificationVirtualized({
|
|
1055
1131
|
lastRead: channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.last_read,
|
|
1132
|
+
showAlways: !!showUnreadNotificationAlways,
|
|
1056
1133
|
unreadCount: (_a = channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.unread_messages) !== null && _a !== void 0 ? _a : 0,
|
|
1057
1134
|
}), showUnreadMessagesNotification = _w.show, toggleShowUnreadMessagesNotification = _w.toggleShowUnreadMessagesNotification;
|
|
1058
1135
|
var _x = useGiphyPreview(separateGiphyPreview), giphyPreviewMessage = _x.giphyPreviewMessage, setGiphyPreviewMessage = _x.setGiphyPreviewMessage;
|
|
@@ -1110,9 +1187,9 @@ var VirtualizedMessageListWithContext = function (props) {
|
|
|
1110
1187
|
var _y = useNewMessageNotification(processedMessages, client.userID, hasMoreNewer), atBottom = _y.atBottom, isMessageListScrolledToBottom = _y.isMessageListScrolledToBottom, newMessagesNotification = _y.newMessagesNotification, setIsMessageListScrolledToBottom = _y.setIsMessageListScrolledToBottom, setNewMessagesNotification = _y.setNewMessagesNotification;
|
|
1111
1188
|
useMarkRead({
|
|
1112
1189
|
isMessageListScrolledToBottom: isMessageListScrolledToBottom,
|
|
1113
|
-
markReadOnScrolledToBottom: markReadOnScrolledToBottom,
|
|
1114
1190
|
messageListIsThread: !!threadList,
|
|
1115
1191
|
unreadCount: (_b = channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.unread_messages) !== null && _b !== void 0 ? _b : 0,
|
|
1192
|
+
wasMarkedUnread: !!(channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.first_unread_message_id),
|
|
1116
1193
|
});
|
|
1117
1194
|
var scrollToBottom = React.useCallback(function () { return Window.__awaiter(void 0, void 0, void 0, function () {
|
|
1118
1195
|
return Window.__generator(this, function (_a) {
|
|
@@ -1231,7 +1308,7 @@ function VirtualizedMessageList(props) {
|
|
|
1231
1308
|
return (React__default["default"].createElement(VirtualizedMessageListWithContext, Window.__assign({ channel: channel, channelUnreadUiState: channelUnreadUiState, hasMore: !!hasMore, hasMoreNewer: !!hasMoreNewer, highlightedMessageId: highlightedMessageId, jumpToLatestMessage: jumpToLatestMessage, loadingMore: !!loadingMore, loadingMoreNewer: !!loadingMoreNewer, loadMore: loadMore, loadMoreNewer: loadMoreNewer, messages: messages, notifications: notifications, read: read, suppressAutoscroll: suppressAutoscroll }, props)));
|
|
1232
1309
|
}
|
|
1233
1310
|
|
|
1234
|
-
var version = '11.
|
|
1311
|
+
var version = '11.9.0';
|
|
1235
1312
|
|
|
1236
1313
|
var useChat = function (_a) {
|
|
1237
1314
|
var _b, _c;
|
|
@@ -1471,7 +1548,7 @@ var ThreadHeader = function (props) {
|
|
|
1471
1548
|
React__default["default"].createElement("div", { className: 'str-chat__thread-header-details' },
|
|
1472
1549
|
React__default["default"].createElement("div", { className: 'str-chat__thread-header-title' }, t('Thread')),
|
|
1473
1550
|
React__default["default"].createElement("div", { className: 'str-chat__thread-header-subtitle' }, displayTitle)),
|
|
1474
|
-
React__default["default"].createElement("button", { "aria-label": 'Close thread', className: 'str-chat__square-button str-chat__close-thread-button', "data-testid": 'close-button', onClick: closeThread },
|
|
1551
|
+
React__default["default"].createElement("button", { "aria-label": t('aria/Close thread'), className: 'str-chat__square-button str-chat__close-thread-button', "data-testid": 'close-button', onClick: closeThread },
|
|
1475
1552
|
React__default["default"].createElement(CloseIcon, null))));
|
|
1476
1553
|
};
|
|
1477
1554
|
|
|
@@ -104,21 +104,35 @@
|
|
|
104
104
|
padding: var(--str-chat__spacing-1) 0;
|
|
105
105
|
flex-shrink: 0;
|
|
106
106
|
cursor: pointer;
|
|
107
|
+
|
|
108
|
+
.str-chat__message-reaction-emoji--with-fallback {
|
|
109
|
+
width: 18px;
|
|
110
|
+
line-height: 18px;
|
|
111
|
+
}
|
|
107
112
|
}
|
|
108
113
|
}
|
|
109
114
|
|
|
110
115
|
.str-chat__message-reaction-emoji-big {
|
|
116
|
+
--str-chat__stream-emoji-size: 1em;
|
|
111
117
|
align-self: center;
|
|
112
118
|
font-size: 2rem;
|
|
113
119
|
}
|
|
114
120
|
|
|
121
|
+
.str-chat__message-reaction-emoji-big.str-chat__message-reaction-emoji--with-fallback {
|
|
122
|
+
line-height: 2rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
115
125
|
.str-chat__message-reactions-details-reacting-users {
|
|
116
126
|
display: flex;
|
|
117
127
|
flex-direction: column;
|
|
118
128
|
gap: var(--str-chat__spacing-3);
|
|
119
129
|
max-height: 100%;
|
|
120
130
|
overflow-y: auto;
|
|
121
|
-
min-height:
|
|
131
|
+
min-height: 30vh;
|
|
132
|
+
|
|
133
|
+
.str-chat__loading-indicator {
|
|
134
|
+
margin: auto;
|
|
135
|
+
}
|
|
122
136
|
|
|
123
137
|
.str-chat__message-reactions-details-reacting-user {
|
|
124
138
|
display: flex;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "11.
|
|
1
|
+
export declare const version = "11.9.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '11.
|
|
1
|
+
export var version = '11.9.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.9.0",
|
|
4
4
|
"description": "React components to create chat conversations or livestream style chat",
|
|
5
5
|
"author": "GetStream",
|
|
6
6
|
"homepage": "https://getstream.io/chat/",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"@babel/runtime": "^7.23.6",
|
|
63
63
|
"@braintree/sanitize-url": "^6.0.4",
|
|
64
64
|
"@popperjs/core": "^2.11.5",
|
|
65
|
+
"@react-aria/focus": "^3.16.1",
|
|
65
66
|
"clsx": "^2.0.0",
|
|
66
67
|
"dayjs": "^1.10.4",
|
|
67
68
|
"emoji-regex": "^9.2.0",
|
|
@@ -144,7 +145,7 @@
|
|
|
144
145
|
"@semantic-release/changelog": "^6.0.2",
|
|
145
146
|
"@semantic-release/git": "^10.0.1",
|
|
146
147
|
"@stream-io/rollup-plugin-node-builtins": "^2.1.5",
|
|
147
|
-
"@stream-io/stream-chat-css": "^4.7.
|
|
148
|
+
"@stream-io/stream-chat-css": "^4.7.1",
|
|
148
149
|
"@testing-library/jest-dom": "^6.1.4",
|
|
149
150
|
"@testing-library/react": "^13.1.1",
|
|
150
151
|
"@testing-library/react-hooks": "^8.0.0",
|
|
@@ -157,10 +158,10 @@
|
|
|
157
158
|
"@types/lodash.throttle": "^4.1.7",
|
|
158
159
|
"@types/lodash.uniqby": "^4.7.7",
|
|
159
160
|
"@types/moment": "^2.13.0",
|
|
160
|
-
"@types/react": "^18.
|
|
161
|
-
"@types/react-dom": "^18.
|
|
162
|
-
"@types/react-image-gallery": "^1.
|
|
163
|
-
"@types/react-is": "^
|
|
161
|
+
"@types/react": "^18.2.55",
|
|
162
|
+
"@types/react-dom": "^18.2.19",
|
|
163
|
+
"@types/react-image-gallery": "^1.2.4",
|
|
164
|
+
"@types/react-is": "^18.2.4",
|
|
164
165
|
"@types/textarea-caret": "3.0.0",
|
|
165
166
|
"@types/uuid": "^8.3.0",
|
|
166
167
|
"@typescript-eslint/eslint-plugin": "4.27.0",
|