stream-chat-react 6.12.2 → 8.0.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/README.md +1 -1
- package/dist/browser.full-bundle.js +1857 -18857
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +5 -5
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/Attachment/Attachment.d.ts +8 -8
- package/dist/components/Attachment/Attachment.d.ts.map +1 -1
- package/dist/components/Attachment/AttachmentActions.d.ts +3 -3
- package/dist/components/Attachment/AttachmentActions.d.ts.map +1 -1
- package/dist/components/Attachment/Audio.d.ts +4 -4
- package/dist/components/Attachment/Audio.d.ts.map +1 -1
- package/dist/components/Attachment/Audio.js +2 -2
- package/dist/components/Attachment/Card.d.ts +2 -0
- package/dist/components/Attachment/Card.d.ts.map +1 -1
- package/dist/components/Attachment/Card.js +22 -2
- package/dist/components/Attachment/FileAttachment.d.ts +4 -4
- package/dist/components/Attachment/FileAttachment.d.ts.map +1 -1
- package/dist/components/Attachment/utils.d.ts +22 -22
- package/dist/components/Attachment/utils.d.ts.map +1 -1
- package/dist/components/Attachment/utils.js +3 -1
- package/dist/components/AutoCompleteTextarea/Item.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Item.js +1 -1
- package/dist/components/AutoCompleteTextarea/List.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/List.js +0 -1
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts +7 -6
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Textarea.js +9 -23
- package/dist/components/Avatar/Avatar.d.ts +4 -4
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Channel/Channel.d.ts +47 -45
- package/dist/components/Channel/Channel.d.ts.map +1 -1
- package/dist/components/Channel/Channel.js +12 -4
- package/dist/components/Channel/channelState.d.ts +15 -15
- package/dist/components/Channel/channelState.d.ts.map +1 -1
- package/dist/components/Channel/hooks/useCreateChannelStateContext.d.ts +3 -3
- package/dist/components/Channel/hooks/useCreateChannelStateContext.d.ts.map +1 -1
- package/dist/components/Channel/hooks/useCreateChannelStateContext.js +2 -1
- package/dist/components/Channel/hooks/useCreateTypingContext.d.ts +2 -2
- package/dist/components/Channel/hooks/useCreateTypingContext.d.ts.map +1 -1
- package/dist/components/Channel/hooks/useEditMessageHandler.d.ts +3 -3
- package/dist/components/Channel/hooks/useEditMessageHandler.d.ts.map +1 -1
- package/dist/components/Channel/hooks/useMentionsHandlers.d.ts +3 -3
- package/dist/components/Channel/hooks/useMentionsHandlers.d.ts.map +1 -1
- package/dist/components/ChannelHeader/ChannelHeader.d.ts +4 -2
- package/dist/components/ChannelHeader/ChannelHeader.d.ts.map +1 -1
- package/dist/components/ChannelHeader/ChannelHeader.js +6 -7
- package/dist/components/ChannelHeader/icons.d.ts +5 -0
- package/dist/components/ChannelHeader/icons.d.ts.map +1 -0
- package/dist/components/ChannelHeader/icons.js +9 -0
- package/dist/components/ChannelList/ChannelList.d.ts +18 -18
- package/dist/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/dist/components/ChannelList/ChannelListMessenger.d.ts +5 -5
- package/dist/components/ChannelList/ChannelListMessenger.d.ts.map +1 -1
- package/dist/components/ChannelList/ChannelListMessenger.js +1 -1
- package/dist/components/ChannelList/hooks/useChannelDeletedListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useChannelDeletedListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useChannelHiddenListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useChannelHiddenListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useChannelTruncatedListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useChannelTruncatedListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.js +13 -1
- package/dist/components/ChannelList/hooks/useChannelVisibleListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useChannelVisibleListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useConnectionRecoveredListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useConnectionRecoveredListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useMessageNewListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useMessageNewListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useNotificationAddedToChannelListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useNotificationAddedToChannelListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts +4 -4
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +1 -1
- package/dist/components/ChannelList/hooks/useUserPresenceChangedListener.d.ts +2 -2
- package/dist/components/ChannelList/hooks/useUserPresenceChangedListener.d.ts.map +1 -1
- package/dist/components/ChannelList/utils.d.ts +6 -6
- package/dist/components/ChannelList/utils.d.ts.map +1 -1
- package/dist/components/ChannelPreview/ChannelPreview.d.ts +9 -9
- package/dist/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -2
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts.map +1 -1
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.js +1 -1
- package/dist/components/ChannelPreview/hooks/useIsChannelMuted.d.ts +2 -2
- package/dist/components/ChannelPreview/hooks/useIsChannelMuted.d.ts.map +1 -1
- package/dist/components/ChannelPreview/utils.d.ts +4 -4
- package/dist/components/ChannelPreview/utils.d.ts.map +1 -1
- package/dist/components/ChannelSearch/ChannelSearch.d.ts +16 -14
- package/dist/components/ChannelSearch/ChannelSearch.d.ts.map +1 -1
- package/dist/components/ChannelSearch/ChannelSearch.js +3 -3
- package/dist/components/ChannelSearch/SearchInput.d.ts +9 -7
- package/dist/components/ChannelSearch/SearchInput.d.ts.map +1 -1
- package/dist/components/ChannelSearch/SearchInput.js +2 -2
- package/dist/components/ChannelSearch/SearchResults.d.ts +14 -14
- package/dist/components/ChannelSearch/SearchResults.d.ts.map +1 -1
- package/dist/components/ChannelSearch/SearchResults.js +6 -6
- package/dist/components/ChannelSearch/utils.d.ts +3 -3
- package/dist/components/ChannelSearch/utils.d.ts.map +1 -1
- package/dist/components/ChannelSearch/utils.js +1 -3
- package/dist/components/Chat/Chat.d.ts +4 -4
- package/dist/components/Chat/Chat.d.ts.map +1 -1
- package/dist/components/Chat/hooks/useChat.d.ts +8 -8
- package/dist/components/Chat/hooks/useChat.d.ts.map +1 -1
- package/dist/components/Chat/hooks/useChat.js +2 -2
- package/dist/components/Chat/hooks/useCreateChatContext.d.ts +2 -2
- package/dist/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/dist/components/ChatAutoComplete/ChatAutoComplete.d.ts +18 -14
- package/dist/components/ChatAutoComplete/ChatAutoComplete.d.ts.map +1 -1
- package/dist/components/ChatAutoComplete/ChatAutoComplete.js +16 -14
- package/dist/components/ChatDown/ChatDown.d.ts.map +1 -1
- package/dist/components/ChatDown/ChatDown.js +2 -2
- package/dist/components/EmptyStateIndicator/EmptyStateIndicator.js +1 -1
- package/dist/components/EventComponent/EventComponent.d.ts +4 -4
- package/dist/components/EventComponent/EventComponent.d.ts.map +1 -1
- package/dist/components/Gallery/Gallery.d.ts +4 -4
- package/dist/components/Gallery/Gallery.d.ts.map +1 -1
- package/dist/components/Gallery/Gallery.js +5 -3
- package/dist/components/Gallery/Image.d.ts.map +1 -1
- package/dist/components/Gallery/Image.js +4 -2
- package/dist/components/Gallery/ModalWrapper.d.ts +3 -6
- package/dist/components/Gallery/ModalWrapper.d.ts.map +1 -1
- package/dist/components/Gallery/ModalWrapper.js +4 -7
- package/dist/components/Gallery/index.d.ts +0 -1
- package/dist/components/Gallery/index.d.ts.map +1 -1
- package/dist/components/Gallery/index.js +0 -1
- package/dist/components/LoadMore/LoadMoreButton.d.ts.map +1 -1
- package/dist/components/LoadMore/LoadMoreButton.js +1 -1
- package/dist/components/Message/FixedHeightMessage.d.ts +4 -4
- package/dist/components/Message/FixedHeightMessage.d.ts.map +1 -1
- package/dist/components/Message/Message.d.ts +2 -2
- package/dist/components/Message/Message.d.ts.map +1 -1
- package/dist/components/Message/MessageCommerce.d.ts +2 -2
- package/dist/components/Message/MessageCommerce.d.ts.map +1 -1
- package/dist/components/Message/MessageDeleted.d.ts +4 -4
- package/dist/components/Message/MessageDeleted.d.ts.map +1 -1
- package/dist/components/Message/MessageLivestream.d.ts +2 -2
- package/dist/components/Message/MessageLivestream.d.ts.map +1 -1
- package/dist/components/Message/MessageOptions.d.ts +3 -3
- package/dist/components/Message/MessageOptions.d.ts.map +1 -1
- package/dist/components/Message/MessageOptions.js +5 -5
- package/dist/components/Message/MessageSimple.d.ts +2 -2
- package/dist/components/Message/MessageSimple.d.ts.map +1 -1
- package/dist/components/Message/MessageSimple.js +5 -4
- package/dist/components/Message/MessageStatus.d.ts +2 -2
- package/dist/components/Message/MessageStatus.d.ts.map +1 -1
- package/dist/components/Message/MessageTeam.d.ts +2 -2
- package/dist/components/Message/MessageTeam.d.ts.map +1 -1
- package/dist/components/Message/MessageText.d.ts +4 -4
- package/dist/components/Message/MessageText.d.ts.map +1 -1
- package/dist/components/Message/MessageTimestamp.d.ts +4 -4
- package/dist/components/Message/MessageTimestamp.d.ts.map +1 -1
- package/dist/components/Message/QuotedMessage.d.ts +2 -2
- package/dist/components/Message/QuotedMessage.d.ts.map +1 -1
- package/dist/components/Message/hooks/useActionHandler.d.ts +2 -2
- package/dist/components/Message/hooks/useActionHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useDeleteHandler.d.ts +4 -4
- package/dist/components/Message/hooks/useDeleteHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useFlagHandler.d.ts +5 -5
- package/dist/components/Message/hooks/useFlagHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useMentionsHandler.d.ts +6 -6
- package/dist/components/Message/hooks/useMentionsHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useMuteHandler.d.ts +5 -5
- package/dist/components/Message/hooks/useMuteHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useOpenThreadHandler.d.ts +2 -2
- package/dist/components/Message/hooks/useOpenThreadHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/usePinHandler.d.ts +4 -4
- package/dist/components/Message/hooks/usePinHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useReactionHandler.d.ts +3 -3
- package/dist/components/Message/hooks/useReactionHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useRetryHandler.d.ts +2 -2
- package/dist/components/Message/hooks/useRetryHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useUserHandler.d.ts +5 -5
- package/dist/components/Message/hooks/useUserHandler.d.ts.map +1 -1
- package/dist/components/Message/hooks/useUserRole.d.ts +2 -2
- package/dist/components/Message/hooks/useUserRole.d.ts.map +1 -1
- package/dist/components/Message/hooks/useUserRole.js +1 -1
- package/dist/components/Message/icons.d.ts +2 -2
- package/dist/components/Message/icons.d.ts.map +1 -1
- package/dist/components/Message/types.d.ts +23 -23
- package/dist/components/Message/types.d.ts.map +1 -1
- package/dist/components/Message/utils.d.ts +14 -14
- package/dist/components/Message/utils.d.ts.map +1 -1
- package/dist/components/Message/utils.js +6 -1
- package/dist/components/MessageActions/MessageActions.d.ts +3 -3
- package/dist/components/MessageActions/MessageActions.d.ts.map +1 -1
- package/dist/components/MessageActions/MessageActions.js +16 -9
- package/dist/components/MessageActions/MessageActionsBox.d.ts +7 -7
- package/dist/components/MessageActions/MessageActionsBox.d.ts.map +1 -1
- package/dist/components/MessageActions/MessageActionsBox.js +12 -19
- package/dist/components/MessageInput/DefaultTriggerProvider.d.ts +7 -7
- package/dist/components/MessageInput/DefaultTriggerProvider.d.ts.map +1 -1
- package/dist/components/MessageInput/DropzoneProvider.d.ts +2 -2
- package/dist/components/MessageInput/DropzoneProvider.d.ts.map +1 -1
- package/dist/components/MessageInput/EditMessageForm.d.ts +2 -2
- package/dist/components/MessageInput/EditMessageForm.d.ts.map +1 -1
- package/dist/components/MessageInput/EditMessageForm.js +2 -2
- package/dist/components/MessageInput/EmojiPicker.d.ts +2 -2
- package/dist/components/MessageInput/EmojiPicker.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInput.d.ts +11 -11
- package/dist/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputFlat.d.ts +2 -2
- package/dist/components/MessageInput/MessageInputFlat.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputFlat.js +5 -5
- package/dist/components/MessageInput/MessageInputSmall.d.ts +2 -2
- package/dist/components/MessageInput/MessageInputSmall.d.ts.map +1 -1
- package/dist/components/MessageInput/MessageInputSmall.js +7 -5
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts +4 -4
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts.map +1 -1
- package/dist/components/MessageInput/QuotedMessagePreview.js +4 -3
- package/dist/components/MessageInput/UploadsPreview.d.ts +2 -2
- package/dist/components/MessageInput/UploadsPreview.d.ts.map +1 -1
- package/dist/components/MessageInput/UploadsPreview.js +4 -17
- package/dist/components/MessageInput/hooks/useAttachments.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useAttachments.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useCommandTrigger.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useCommandTrigger.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useCommandTrigger.js +3 -1
- package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useCooldownTimer.js +2 -1
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useEmojiPicker.d.ts +4 -4
- package/dist/components/MessageInput/hooks/useEmojiPicker.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useEmojiPicker.js +2 -0
- package/dist/components/MessageInput/hooks/useFileUploads.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useFileUploads.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useImageUploads.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useImageUploads.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useMessageInputState.d.ts +11 -11
- package/dist/components/MessageInput/hooks/useMessageInputState.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useMessageInputState.js +1 -1
- package/dist/components/MessageInput/hooks/useMessageInputText.d.ts +2 -2
- package/dist/components/MessageInput/hooks/useMessageInputText.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useSubmitHandler.d.ts +3 -3
- package/dist/components/MessageInput/hooks/useSubmitHandler.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useUserTrigger.d.ts +5 -5
- package/dist/components/MessageInput/hooks/useUserTrigger.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/utils.d.ts +8 -8
- package/dist/components/MessageInput/hooks/utils.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/utils.js +1 -1
- package/dist/components/MessageInput/icons.d.ts +4 -4
- package/dist/components/MessageInput/icons.d.ts.map +1 -1
- package/dist/components/MessageInput/icons.js +1 -1
- package/dist/components/MessageInput/index.d.ts +1 -0
- package/dist/components/MessageInput/index.d.ts.map +1 -1
- package/dist/components/MessageInput/index.js +1 -0
- package/dist/components/MessageList/ConnectionStatus.d.ts.map +1 -1
- package/dist/components/MessageList/CustomNotification.d.ts.map +1 -1
- package/dist/components/MessageList/CustomNotification.js +1 -1
- package/dist/components/MessageList/GiphyPreviewMessage.d.ts +4 -4
- package/dist/components/MessageList/GiphyPreviewMessage.d.ts.map +1 -1
- package/dist/components/MessageList/MessageList.d.ts +5 -5
- package/dist/components/MessageList/MessageList.d.ts.map +1 -1
- package/dist/components/MessageList/MessageNotification.d.ts.map +1 -1
- package/dist/components/MessageList/MessageNotification.js +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +7 -7
- package/dist/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +39 -10
- package/dist/components/MessageList/hooks/useEnrichedMessages.d.ts +6 -6
- package/dist/components/MessageList/hooks/useEnrichedMessages.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useGiphyPreview.d.ts +4 -4
- package/dist/components/MessageList/hooks/useGiphyPreview.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useLastReadData.d.ts +5 -5
- package/dist/components/MessageList/hooks/useLastReadData.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useMessageListElements.d.ts +6 -6
- package/dist/components/MessageList/hooks/useMessageListElements.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useMessageListScrollManager.d.ts +4 -4
- package/dist/components/MessageList/hooks/useMessageListScrollManager.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useNewMessageNotification.d.ts +2 -2
- package/dist/components/MessageList/hooks/useNewMessageNotification.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/usePrependMessagesCount.d.ts +2 -2
- package/dist/components/MessageList/hooks/usePrependMessagesCount.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useScrollLocationLogic.d.ts +4 -4
- package/dist/components/MessageList/hooks/useScrollLocationLogic.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/useShouldForceScrollToBottom.d.ts +2 -2
- package/dist/components/MessageList/hooks/useShouldForceScrollToBottom.d.ts.map +1 -1
- package/dist/components/MessageList/utils.d.ts +11 -11
- package/dist/components/MessageList/utils.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +8 -4
- package/dist/components/Reactions/ReactionSelector.d.ts +4 -4
- package/dist/components/Reactions/ReactionSelector.d.ts.map +1 -1
- package/dist/components/Reactions/ReactionSelector.js +7 -6
- package/dist/components/Reactions/ReactionsList.d.ts +4 -4
- package/dist/components/Reactions/ReactionsList.d.ts.map +1 -1
- package/dist/components/Reactions/ReactionsList.js +5 -4
- package/dist/components/Reactions/SimpleReactionsList.d.ts +4 -4
- package/dist/components/Reactions/SimpleReactionsList.d.ts.map +1 -1
- package/dist/components/Reactions/SimpleReactionsList.js +1 -1
- package/dist/components/SafeAnchor/SafeAnchor.d.ts.map +1 -1
- package/dist/components/SafeAnchor/SafeAnchor.js +1 -1
- package/dist/components/Thread/Thread.d.ts +10 -10
- package/dist/components/Thread/Thread.d.ts.map +1 -1
- package/dist/components/Thread/Thread.js +1 -1
- package/dist/components/TypingIndicator/TypingIndicator.d.ts +4 -4
- package/dist/components/TypingIndicator/TypingIndicator.d.ts.map +1 -1
- package/dist/components/Window/Window.d.ts +4 -4
- package/dist/components/Window/Window.d.ts.map +1 -1
- package/dist/components/Window/Window.js +1 -4
- package/dist/context/ChannelActionContext.d.ts +23 -26
- package/dist/context/ChannelActionContext.d.ts.map +1 -1
- package/dist/context/ChannelStateContext.d.ts +22 -21
- package/dist/context/ChannelStateContext.d.ts.map +1 -1
- package/dist/context/ChatContext.d.ts +12 -12
- package/dist/context/ChatContext.d.ts.map +1 -1
- package/dist/context/ComponentContext.d.ts +27 -27
- package/dist/context/ComponentContext.d.ts.map +1 -1
- package/dist/context/MessageContext.d.ts +16 -16
- package/dist/context/MessageContext.d.ts.map +1 -1
- package/dist/context/MessageInputContext.d.ts +7 -7
- package/dist/context/MessageInputContext.d.ts.map +1 -1
- package/dist/context/TypingContext.d.ts +8 -8
- package/dist/context/TypingContext.d.ts.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/i18n/Streami18n.d.ts +1 -0
- package/dist/i18n/Streami18n.d.ts.map +1 -1
- package/dist/i18n/de.json +1 -0
- package/dist/i18n/en.json +1 -0
- package/dist/i18n/es.json +1 -0
- package/dist/i18n/fr.json +1 -0
- package/dist/i18n/hi.json +1 -0
- package/dist/i18n/it.json +1 -0
- package/dist/i18n/ja.json +1 -0
- package/dist/i18n/ko.json +1 -0
- package/dist/i18n/nl.json +1 -0
- package/dist/i18n/pt.json +1 -0
- package/dist/i18n/ru.json +1 -0
- package/dist/i18n/tr.json +1 -0
- package/dist/index.cjs.js +353 -301
- package/dist/index.cjs.js.map +1 -1
- package/dist/scss/ChannelSearch.scss +3 -0
- package/dist/scss/Gallery.scss +6 -0
- package/dist/scss/LoadMoreButton.scss +1 -0
- package/dist/scss/Message.scss +19 -0
- package/dist/scss/MessageActions.scss +9 -0
- package/dist/scss/MessageInput.scss +11 -0
- package/dist/scss/MessageInputFlat.scss +15 -0
- package/dist/scss/MessageTeam.scss +8 -0
- package/dist/scss/Modal.scss +4 -0
- package/dist/scss/ReactionList.scss +7 -0
- package/dist/scss/ReactionSelector.scss +7 -0
- package/dist/scss/SendButton.scss +5 -0
- package/dist/scss/SmallMessageInput.scss +12 -0
- package/dist/scss/Thread.scss +24 -0
- package/dist/scss/_base.scss +4 -12
- package/dist/scss/_variables.scss +4 -1
- package/dist/scss/index.scss +1 -1
- package/dist/scss/vendor/react-file-utils.scss +2 -0
- package/dist/scss/vendor/react-image-gallery.scss +224 -0
- package/dist/types/types.d.ts +15 -9
- package/dist/types/types.d.ts.map +1 -1
- package/dist/utils.d.ts +5 -5
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +24 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +12 -9
- package/dist/components/Gallery/ModalImage.d.ts +0 -9
- package/dist/components/Gallery/ModalImage.d.ts.map +0 -1
- package/dist/components/Gallery/ModalImage.js +0 -6
- package/dist/scss/ModalImage.scss +0 -11
|
@@ -6,44 +6,44 @@ import { ComponentContextValue } from '../../context/ComponentContext';
|
|
|
6
6
|
import { EmojiContextValue } from '../../context/EmojiContext';
|
|
7
7
|
import type { Data as EmojiMartData } from 'emoji-mart';
|
|
8
8
|
import type { MessageInputProps } from '../MessageInput/MessageInput';
|
|
9
|
-
import type { CustomTrigger,
|
|
10
|
-
export declare type ChannelProps<
|
|
9
|
+
import type { CustomTrigger, DefaultStreamChatGenerics, GiphyVersions } from '../../types/types';
|
|
10
|
+
export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger> = {
|
|
11
11
|
/** List of accepted file types */
|
|
12
12
|
acceptedFiles?: string[];
|
|
13
13
|
/** Custom handler function that runs when the active channel has unread messages (i.e., when chat is running on a separate browser tab) */
|
|
14
14
|
activeUnreadHandler?: (unread: number, documentTitle: string) => void;
|
|
15
15
|
/** Custom UI component to display a message attachment, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Attachment.tsx) */
|
|
16
|
-
Attachment?: ComponentContextValue<
|
|
16
|
+
Attachment?: ComponentContextValue<StreamChatGenerics>['Attachment'];
|
|
17
17
|
/** Optional UI component to override the default suggestion Header component, defaults to and accepts same props as: [Header](https://github.com/GetStream/stream-chat-react/blob/master/src/components/AutoCompleteTextarea/Header.tsx) */
|
|
18
|
-
AutocompleteSuggestionHeader?: ComponentContextValue<
|
|
18
|
+
AutocompleteSuggestionHeader?: ComponentContextValue<StreamChatGenerics>['AutocompleteSuggestionHeader'];
|
|
19
19
|
/** Optional UI component to override the default suggestion Item component, defaults to and accepts same props as: [Item](https://github.com/GetStream/stream-chat-react/blob/master/src/components/AutoCompleteTextarea/Item.js) */
|
|
20
|
-
AutocompleteSuggestionItem?: ComponentContextValue<
|
|
20
|
+
AutocompleteSuggestionItem?: ComponentContextValue<StreamChatGenerics>['AutocompleteSuggestionItem'];
|
|
21
21
|
/** Optional UI component to override the default List component that displays suggestions, defaults to and accepts same props as: [List](https://github.com/GetStream/stream-chat-react/blob/master/src/components/AutoCompleteTextarea/List.js) */
|
|
22
|
-
AutocompleteSuggestionList?: ComponentContextValue<
|
|
22
|
+
AutocompleteSuggestionList?: ComponentContextValue<StreamChatGenerics>['AutocompleteSuggestionList'];
|
|
23
23
|
/** UI component to display a user's avatar, defaults to and accepts same props as: [Avatar](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Avatar/Avatar.tsx) */
|
|
24
|
-
Avatar?: ComponentContextValue<
|
|
24
|
+
Avatar?: ComponentContextValue<StreamChatGenerics>['Avatar'];
|
|
25
25
|
/** The connected and active channel */
|
|
26
|
-
channel?: StreamChannel<
|
|
26
|
+
channel?: StreamChannel<StreamChatGenerics>;
|
|
27
27
|
/** Custom UI component to display the slow mode cooldown timer, defaults to and accepts same props as: [CooldownTimer](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/hooks/useCooldownTimer.tsx) */
|
|
28
|
-
CooldownTimer?: ComponentContextValue<
|
|
28
|
+
CooldownTimer?: ComponentContextValue<StreamChatGenerics>['CooldownTimer'];
|
|
29
29
|
/** Custom UI component for date separators, defaults to and accepts same props as: [DateSeparator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/DateSeparator.tsx) */
|
|
30
|
-
DateSeparator?: ComponentContextValue<
|
|
30
|
+
DateSeparator?: ComponentContextValue<StreamChatGenerics>['DateSeparator'];
|
|
31
31
|
/** Custom action handler to override the default `channel.markRead` request function (advanced usage only) */
|
|
32
|
-
doMarkReadRequest?: (channel: StreamChannel<
|
|
32
|
+
doMarkReadRequest?: (channel: StreamChannel<StreamChatGenerics>) => Promise<MessageResponse<StreamChatGenerics>> | void;
|
|
33
33
|
/** Custom action handler to override the default `channel.sendMessage` request function (advanced usage only) */
|
|
34
|
-
doSendMessageRequest?: (channelId: string, message: Message<
|
|
34
|
+
doSendMessageRequest?: (channelId: string, message: Message<StreamChatGenerics>) => ReturnType<StreamChannel<StreamChatGenerics>['sendMessage']> | void;
|
|
35
35
|
/** Custom action handler to override the default `client.updateMessage` request function (advanced usage only) */
|
|
36
|
-
doUpdateMessageRequest?: (cid: string, updatedMessage: UpdatedMessage<
|
|
36
|
+
doUpdateMessageRequest?: (cid: string, updatedMessage: UpdatedMessage<StreamChatGenerics>) => ReturnType<StreamChat<StreamChatGenerics>['updateMessage']>;
|
|
37
37
|
/** If true, chat users will be able to drag and drop file uploads to the entire channel window */
|
|
38
38
|
dragAndDropWindow?: boolean;
|
|
39
39
|
/** Custom UI component to override default edit message input, defaults to and accepts same props as: [EditMessageForm](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/EditMessageForm.tsx) */
|
|
40
|
-
EditMessageInput?: ComponentContextValue<
|
|
40
|
+
EditMessageInput?: ComponentContextValue<StreamChatGenerics>['EditMessageInput'];
|
|
41
41
|
/** Custom UI component to override default `NimbleEmoji` from `emoji-mart` */
|
|
42
42
|
Emoji?: EmojiContextValue['Emoji'];
|
|
43
43
|
/** Custom prop to override default `facebook.json` emoji data set from `emoji-mart` */
|
|
44
44
|
emojiData?: EmojiMartData;
|
|
45
45
|
/** Custom UI component for emoji button in input, defaults to and accepts same props as: [EmojiIconSmall](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/icons.tsx) */
|
|
46
|
-
EmojiIcon?: ComponentContextValue<
|
|
46
|
+
EmojiIcon?: ComponentContextValue<StreamChatGenerics>['EmojiIcon'];
|
|
47
47
|
/** Custom UI component to override default `NimbleEmojiIndex` from `emoji-mart` */
|
|
48
48
|
EmojiIndex?: EmojiContextValue['EmojiIndex'];
|
|
49
49
|
/** Custom UI component to override default `NimblePicker` from `emoji-mart` */
|
|
@@ -51,71 +51,73 @@ export declare type ChannelProps<At extends DefaultAttachmentType = DefaultAttac
|
|
|
51
51
|
/** Custom UI component to be shown if no active channel is set, defaults to null and skips rendering the Channel component */
|
|
52
52
|
EmptyPlaceholder?: React.ReactElement;
|
|
53
53
|
/** Custom UI component to be displayed when the `MessageList` is empty, , defaults to and accepts same props as: [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/EmptyStateIndicator/EmptyStateIndicator.tsx) */
|
|
54
|
-
EmptyStateIndicator?: ComponentContextValue<
|
|
54
|
+
EmptyStateIndicator?: ComponentContextValue<StreamChatGenerics>['EmptyStateIndicator'];
|
|
55
55
|
/** Custom UI component for file upload icon, defaults to and accepts same props as: [FileUploadIcon](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/icons.tsx) */
|
|
56
|
-
FileUploadIcon?: ComponentContextValue<
|
|
56
|
+
FileUploadIcon?: ComponentContextValue<StreamChatGenerics>['FileUploadIcon'];
|
|
57
57
|
/** Custom UI component to render a Giphy preview in the `VirtualizedMessageList` */
|
|
58
|
-
GiphyPreviewMessage?: ComponentContextValue<
|
|
58
|
+
GiphyPreviewMessage?: ComponentContextValue<StreamChatGenerics>['GiphyPreviewMessage'];
|
|
59
|
+
/** The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default */
|
|
60
|
+
giphyVersion?: GiphyVersions;
|
|
59
61
|
/** Custom UI component to render at the top of the `MessageList` */
|
|
60
|
-
HeaderComponent?: ComponentContextValue<
|
|
62
|
+
HeaderComponent?: ComponentContextValue<StreamChatGenerics>['HeaderComponent'];
|
|
61
63
|
/** Custom UI component handling how the message input is rendered, defaults to and accepts the same props as [MessageInputFlat](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/MessageInputFlat.tsx) */
|
|
62
|
-
Input?: ComponentContextValue<
|
|
64
|
+
Input?: ComponentContextValue<StreamChatGenerics>['Input'];
|
|
63
65
|
/** Custom UI component to be shown if the channel query fails, defaults to and accepts same props as: [LoadingErrorIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Loading/LoadingErrorIndicator.tsx) */
|
|
64
66
|
LoadingErrorIndicator?: React.ComponentType<LoadingErrorIndicatorProps>;
|
|
65
67
|
/** Custom UI component to render while the `MessageList` is loading new messages, defaults to and accepts same props as: [LoadingIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Loading/LoadingIndicator.tsx) */
|
|
66
|
-
LoadingIndicator?: ComponentContextValue<
|
|
68
|
+
LoadingIndicator?: ComponentContextValue<StreamChatGenerics>['LoadingIndicator'];
|
|
67
69
|
/** Maximum number of attachments allowed per message */
|
|
68
70
|
maxNumberOfFiles?: number;
|
|
69
71
|
/** Custom UI component to display a message in the standard `MessageList`, defaults to and accepts the same props as: [MessageSimple](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageSimple.tsx) */
|
|
70
|
-
Message?: ComponentContextValue<
|
|
72
|
+
Message?: ComponentContextValue<StreamChatGenerics>['Message'];
|
|
71
73
|
/** Custom UI component for a deleted message, defaults to and accepts same props as: [MessageDeleted](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageDeleted.tsx) */
|
|
72
|
-
MessageDeleted?: ComponentContextValue<
|
|
74
|
+
MessageDeleted?: ComponentContextValue<StreamChatGenerics>['MessageDeleted'];
|
|
73
75
|
/** Custom UI component that displays message and connection status notifications in the `MessageList`, defaults to and accepts same props as [DefaultMessageListNotifications](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/MessageList.tsx) */
|
|
74
|
-
MessageListNotifications?: ComponentContextValue<
|
|
76
|
+
MessageListNotifications?: ComponentContextValue<StreamChatGenerics>['MessageListNotifications'];
|
|
75
77
|
/** Custom UI component to display a notification when scrolled up the list and new messages arrive, defaults to and accepts same props as [MessageNotification](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/MessageNotification.tsx) */
|
|
76
|
-
MessageNotification?: ComponentContextValue<
|
|
78
|
+
MessageNotification?: ComponentContextValue<StreamChatGenerics>['MessageNotification'];
|
|
77
79
|
/** Custom UI component for message options popup, defaults to and accepts same props as: [MessageOptions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageOptions.tsx) */
|
|
78
|
-
MessageOptions?: ComponentContextValue<
|
|
80
|
+
MessageOptions?: ComponentContextValue<StreamChatGenerics>['MessageOptions'];
|
|
79
81
|
/** Custom UI component to display message replies, defaults to and accepts same props as: [MessageRepliesCountButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageRepliesCountButton.tsx) */
|
|
80
|
-
MessageRepliesCountButton?: ComponentContextValue<
|
|
82
|
+
MessageRepliesCountButton?: ComponentContextValue<StreamChatGenerics>['MessageRepliesCountButton'];
|
|
81
83
|
/** Custom UI component to display message delivery status, defaults to and accepts same props as: [MessageStatus](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageStatus.tsx) */
|
|
82
|
-
MessageStatus?: ComponentContextValue<
|
|
84
|
+
MessageStatus?: ComponentContextValue<StreamChatGenerics>['MessageStatus'];
|
|
83
85
|
/** Custom UI component to display system messages, defaults to and accepts same props as: [EventComponent](https://github.com/GetStream/stream-chat-react/blob/master/src/components/EventComponent/EventComponent.tsx) */
|
|
84
|
-
MessageSystem?: ComponentContextValue<
|
|
86
|
+
MessageSystem?: ComponentContextValue<StreamChatGenerics>['MessageSystem'];
|
|
85
87
|
/** Custom UI component to display a timestamp on a message, defaults to and accepts same props as: [MessageTimestamp](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageTimestamp.tsx) */
|
|
86
|
-
MessageTimestamp?: ComponentContextValue<
|
|
88
|
+
MessageTimestamp?: ComponentContextValue<StreamChatGenerics>['MessageTimestamp'];
|
|
87
89
|
/** Whether to allow multiple attachment uploads */
|
|
88
90
|
multipleUploads?: boolean;
|
|
89
91
|
/** Custom action handler function to run on click of an @mention in a message */
|
|
90
|
-
onMentionsClick?: OnMentionAction<
|
|
92
|
+
onMentionsClick?: OnMentionAction<StreamChatGenerics>;
|
|
91
93
|
/** Custom action handler function to run on hover of an @mention in a message */
|
|
92
|
-
onMentionsHover?: OnMentionAction<
|
|
94
|
+
onMentionsHover?: OnMentionAction<StreamChatGenerics>;
|
|
93
95
|
/** If `dragAndDropWindow` prop is true, the props to pass to the MessageInput component (overrides props placed directly on MessageInput) */
|
|
94
|
-
optionalMessageInputProps?: MessageInputProps<
|
|
96
|
+
optionalMessageInputProps?: MessageInputProps<StreamChatGenerics, V>;
|
|
95
97
|
/** Custom UI component to override default pinned message indicator, defaults to and accepts same props as: [PinIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/icons.tsx) */
|
|
96
|
-
PinIndicator?: ComponentContextValue<
|
|
98
|
+
PinIndicator?: ComponentContextValue<StreamChatGenerics>['PinIndicator'];
|
|
97
99
|
/** Custom UI component to override quoted message UI on a sent message, defaults to and accepts same props as: [QuotedMessage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/QuotedMessage.tsx) */
|
|
98
|
-
QuotedMessage?: ComponentContextValue<
|
|
100
|
+
QuotedMessage?: ComponentContextValue<StreamChatGenerics>['QuotedMessage'];
|
|
99
101
|
/** Custom UI component to override the message input's quoted message preview, defaults to and accepts same props as: [QuotedMessagePreview](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/QuotedMessagePreview.tsx) */
|
|
100
|
-
QuotedMessagePreview?: ComponentContextValue<
|
|
102
|
+
QuotedMessagePreview?: ComponentContextValue<StreamChatGenerics>['QuotedMessagePreview'];
|
|
101
103
|
/** Custom UI component to display the reaction selector, defaults to and accepts same props as: [ReactionSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/ReactionSelector.tsx) */
|
|
102
|
-
ReactionSelector?: ComponentContextValue<
|
|
104
|
+
ReactionSelector?: ComponentContextValue<StreamChatGenerics>['ReactionSelector'];
|
|
103
105
|
/** Custom UI component to display the list of reactions on a message, defaults to and accepts same props as: [ReactionsList](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/ReactionsList.tsx) */
|
|
104
|
-
ReactionsList?: ComponentContextValue<
|
|
106
|
+
ReactionsList?: ComponentContextValue<StreamChatGenerics>['ReactionsList'];
|
|
105
107
|
/** Custom UI component for send button, defaults to and accepts same props as: [SendButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/icons.tsx) */
|
|
106
|
-
SendButton?: ComponentContextValue<
|
|
108
|
+
SendButton?: ComponentContextValue<StreamChatGenerics>['SendButton'];
|
|
107
109
|
/** If true, skips the message data string comparison used to memoize the current channel messages (helpful for channels with 1000s of messages) */
|
|
108
110
|
skipMessageDataMemoization?: boolean;
|
|
109
111
|
/** Custom UI component to display the header of a `Thread`, defaults to and accepts same props as: [DefaultThreadHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Thread/Thread.tsx) */
|
|
110
|
-
ThreadHeader?: ComponentContextValue<
|
|
112
|
+
ThreadHeader?: ComponentContextValue<StreamChatGenerics>['ThreadHeader'];
|
|
111
113
|
/** Custom UI component to display the start of a threaded `MessageList`, defaults to and accepts same props as: [DefaultThreadStart](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Thread/Thread.tsx) */
|
|
112
|
-
ThreadStart?: ComponentContextValue<
|
|
114
|
+
ThreadStart?: ComponentContextValue<StreamChatGenerics>['ThreadStart'];
|
|
113
115
|
/** Optional context provider that lets you override the default autocomplete triggers, defaults to: [DefaultTriggerProvider](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/DefaultTriggerProvider.tsx) */
|
|
114
|
-
TriggerProvider?: ComponentContextValue<
|
|
116
|
+
TriggerProvider?: ComponentContextValue<StreamChatGenerics>['TriggerProvider'];
|
|
115
117
|
/** Custom UI component for the typing indicator, defaults to and accepts same props as: [TypingIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/TypingIndicator/TypingIndicator.tsx) */
|
|
116
|
-
TypingIndicator?: ComponentContextValue<
|
|
118
|
+
TypingIndicator?: ComponentContextValue<StreamChatGenerics>['TypingIndicator'];
|
|
117
119
|
/** Custom UI component to display a message in the `VirtualizedMessageList`, defaults to and accepts same props as: [FixedHeightMessage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/FixedHeightMessage.tsx) */
|
|
118
|
-
VirtualMessage?: ComponentContextValue<
|
|
120
|
+
VirtualMessage?: ComponentContextValue<StreamChatGenerics>['VirtualMessage'];
|
|
119
121
|
};
|
|
120
122
|
/**
|
|
121
123
|
* A wrapper component that provides channel data and renders children.
|
|
@@ -126,5 +128,5 @@ export declare type ChannelProps<At extends DefaultAttachmentType = DefaultAttac
|
|
|
126
128
|
* - [EmojiContext](https://getstream.io/chat/docs/sdk/react/contexts/emoji_context/)
|
|
127
129
|
* - [TypingContext](https://getstream.io/chat/docs/sdk/react/contexts/typing_context/)
|
|
128
130
|
*/
|
|
129
|
-
export declare const Channel: <
|
|
131
|
+
export declare const Channel: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger>(props: React.PropsWithChildren<ChannelProps<StreamChatGenerics, V>>) => JSX.Element | null;
|
|
130
132
|
//# sourceMappingURL=Channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Channel.d.ts","sourceRoot":"","sources":["../../../src/components/Channel/Channel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAIf,OAAO,EAKL,OAAO,EACP,eAAe,EAEf,OAAO,IAAI,aAAa,EACxB,UAAU,EACV,cAAc,EAEf,MAAM,aAAa,CAAC;AASrB,OAAO,EAAE,eAAe,EAAuB,MAAM,6BAA6B,CAAC;AAGnF,OAAO,EAGL,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,qBAAqB,EAAqB,MAAM,gCAAgC,CAAC;AAE1F,OAAO,EAAe,iBAAiB,EAAiB,MAAM,4BAA4B,CAAC;AAK3F,OAAO,KAAK,E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;IACzE,uOAAuO;IACvO,aAAa,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,CAAC;IAC3E,iQAAiQ;IACjQ,oBAAoB,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACzF,gOAAgO;IAChO,gBAAgB,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACjF,uOAAuO;IACvO,aAAa,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,CAAC;IAC3E,iMAAiM;IACjM,UAAU,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,YAAY,CAAC,CAAC;IACrE,mJAAmJ;IACnJ,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,yNAAyN;IACzN,YAAY,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,cAAc,CAAC,CAAC;IACzE,qOAAqO;IACrO,WAAW,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,aAAa,CAAC,CAAC;IACvE,mPAAmP;IACnP,eAAe,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC/E,4NAA4N;IAC5N,eAAe,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC/E,sPAAsP;IACtP,cAAc,CAAC,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,gBAAgB,CAAC,CAAC;CAC9E,CAAC;AAyoBF;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,wNAA4D,CAAC"}
|
|
@@ -234,7 +234,7 @@ var ChannelInner = function (props) {
|
|
|
234
234
|
client.off('user.deleted', handleEvent);
|
|
235
235
|
notificationTimeouts.forEach(clearTimeout);
|
|
236
236
|
};
|
|
237
|
-
}, [channel.cid]);
|
|
237
|
+
}, [channel.cid, doMarkReadRequest]);
|
|
238
238
|
useEffect(function () {
|
|
239
239
|
var _a;
|
|
240
240
|
if (state.thread && ((_a = state.messages) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
@@ -335,7 +335,7 @@ var ChannelInner = function (props) {
|
|
|
335
335
|
return id;
|
|
336
336
|
})
|
|
337
337
|
: mentioned_users;
|
|
338
|
-
messageData = __assign({ attachments: attachments, id: id, mentioned_users: mentions, parent_id: parent_id, quoted_message_id: quotedMessage === null || quotedMessage === void 0 ? void 0 : quotedMessage.id, text: text }, customMessageData);
|
|
338
|
+
messageData = __assign({ attachments: attachments, id: id, mentioned_users: mentions, parent_id: parent_id, quoted_message_id: parent_id === (quotedMessage === null || quotedMessage === void 0 ? void 0 : quotedMessage.parent_id) ? quotedMessage === null || quotedMessage === void 0 ? void 0 : quotedMessage.id : undefined, text: text }, customMessageData);
|
|
339
339
|
_b.label = 1;
|
|
340
340
|
case 1:
|
|
341
341
|
_b.trys.push([1, 6, , 7]);
|
|
@@ -354,7 +354,7 @@ var ChannelInner = function (props) {
|
|
|
354
354
|
if (messageResponse === null || messageResponse === void 0 ? void 0 : messageResponse.message) {
|
|
355
355
|
updateMessage(__assign(__assign({}, messageResponse.message), { status: 'received' }));
|
|
356
356
|
}
|
|
357
|
-
if (quotedMessage)
|
|
357
|
+
if (quotedMessage && parent_id === (quotedMessage === null || quotedMessage === void 0 ? void 0 : quotedMessage.parent_id))
|
|
358
358
|
setQuotedMessage(undefined);
|
|
359
359
|
return [3 /*break*/, 7];
|
|
360
360
|
case 6:
|
|
@@ -412,6 +412,14 @@ var ChannelInner = function (props) {
|
|
|
412
412
|
/** THREAD */
|
|
413
413
|
var openThread = function (message, event) {
|
|
414
414
|
event.preventDefault();
|
|
415
|
+
setQuotedMessage(function (current) {
|
|
416
|
+
if ((current === null || current === void 0 ? void 0 : current.parent_id) !== (message === null || message === void 0 ? void 0 : message.parent_id)) {
|
|
417
|
+
return undefined;
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
return current;
|
|
421
|
+
}
|
|
422
|
+
});
|
|
415
423
|
dispatch({ channel: channel, message: message, type: 'openThread' });
|
|
416
424
|
};
|
|
417
425
|
var closeThread = function (event) {
|
|
@@ -466,7 +474,7 @@ var ChannelInner = function (props) {
|
|
|
466
474
|
var onMentionsHoverOrClick = useMentionsHandlers(onMentionsHover, onMentionsClick);
|
|
467
475
|
var editMessage = useEditMessageHandler(doUpdateMessageRequest);
|
|
468
476
|
var typing = state.typing, restState = __rest(state, ["typing"]);
|
|
469
|
-
var channelStateContextValue = useCreateChannelStateContext(__assign(__assign({}, restState), { acceptedFiles: acceptedFiles, channel: channel, channelCapabilitiesArray: channelCapabilitiesArray, channelConfig: channelConfig, dragAndDropWindow: dragAndDropWindow, maxNumberOfFiles: maxNumberOfFiles, multipleUploads: multipleUploads, mutes: mutes, notifications: notifications, quotedMessage: quotedMessage, watcher_count: state.watcherCount }));
|
|
477
|
+
var channelStateContextValue = useCreateChannelStateContext(__assign(__assign({}, restState), { acceptedFiles: acceptedFiles, channel: channel, channelCapabilitiesArray: channelCapabilitiesArray, channelConfig: channelConfig, dragAndDropWindow: dragAndDropWindow, giphyVersion: props.giphyVersion || 'fixed_height', maxNumberOfFiles: maxNumberOfFiles, multipleUploads: multipleUploads, mutes: mutes, notifications: notifications, quotedMessage: quotedMessage, watcher_count: state.watcherCount }));
|
|
470
478
|
var channelActionContextValue = useMemo(function () { return ({
|
|
471
479
|
addNotification: addNotification,
|
|
472
480
|
closeThread: closeThread,
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import type { Reducer } from 'react';
|
|
2
2
|
import type { Channel, MessageResponse, ChannelState as StreamChannelState } from 'stream-chat';
|
|
3
3
|
import type { ChannelState, StreamMessage } from '../../context/ChannelStateContext';
|
|
4
|
-
import type {
|
|
5
|
-
export declare type ChannelStateReducerAction<
|
|
4
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
5
|
+
export declare type ChannelStateReducerAction<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
6
6
|
type: 'closeThread';
|
|
7
7
|
} | {
|
|
8
|
-
channel: Channel<
|
|
8
|
+
channel: Channel<StreamChatGenerics>;
|
|
9
9
|
type: 'copyMessagesFromChannel';
|
|
10
10
|
parentId?: string | null;
|
|
11
11
|
} | {
|
|
12
|
-
channel: Channel<
|
|
12
|
+
channel: Channel<StreamChatGenerics>;
|
|
13
13
|
type: 'copyStateFromChannelOnEvent';
|
|
14
14
|
} | {
|
|
15
|
-
channel: Channel<
|
|
15
|
+
channel: Channel<StreamChatGenerics>;
|
|
16
16
|
type: 'initStateFromChannel';
|
|
17
17
|
} | {
|
|
18
18
|
hasMore: boolean;
|
|
19
|
-
messages: StreamMessage<
|
|
19
|
+
messages: StreamMessage<StreamChatGenerics>[];
|
|
20
20
|
type: 'loadMoreFinished';
|
|
21
21
|
} | {
|
|
22
22
|
threadHasMore: boolean;
|
|
23
|
-
threadMessages: Array<ReturnType<StreamChannelState<
|
|
23
|
+
threadMessages: Array<ReturnType<StreamChannelState<StreamChatGenerics>['formatMessage']>>;
|
|
24
24
|
type: 'loadMoreThreadFinished';
|
|
25
25
|
} | {
|
|
26
|
-
channel: Channel<
|
|
27
|
-
message: StreamMessage<
|
|
26
|
+
channel: Channel<StreamChatGenerics>;
|
|
27
|
+
message: StreamMessage<StreamChatGenerics>;
|
|
28
28
|
type: 'openThread';
|
|
29
29
|
} | {
|
|
30
30
|
error: Error;
|
|
@@ -33,20 +33,20 @@ export declare type ChannelStateReducerAction<At extends DefaultAttachmentType =
|
|
|
33
33
|
loadingMore: boolean;
|
|
34
34
|
type: 'setLoadingMore';
|
|
35
35
|
} | {
|
|
36
|
-
message: StreamMessage<
|
|
36
|
+
message: StreamMessage<StreamChatGenerics>;
|
|
37
37
|
type: 'setThread';
|
|
38
38
|
} | {
|
|
39
|
-
channel: Channel<
|
|
39
|
+
channel: Channel<StreamChatGenerics>;
|
|
40
40
|
type: 'setTyping';
|
|
41
41
|
} | {
|
|
42
42
|
type: 'startLoadingThread';
|
|
43
43
|
} | {
|
|
44
|
-
channel: Channel<
|
|
45
|
-
message: MessageResponse<
|
|
44
|
+
channel: Channel<StreamChatGenerics>;
|
|
45
|
+
message: MessageResponse<StreamChatGenerics>;
|
|
46
46
|
type: 'updateThreadOnEvent';
|
|
47
47
|
};
|
|
48
|
-
export declare type ChannelStateReducer<
|
|
49
|
-
export declare const channelReducer: <
|
|
48
|
+
export declare type ChannelStateReducer<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Reducer<ChannelState<StreamChatGenerics>, ChannelStateReducerAction<StreamChatGenerics>>;
|
|
49
|
+
export declare const channelReducer: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(state: ChannelState<StreamChatGenerics>, action: ChannelStateReducerAction<StreamChatGenerics>) => ChannelState<StreamChatGenerics>;
|
|
50
50
|
export declare const initialState: {
|
|
51
51
|
error: null;
|
|
52
52
|
hasMore: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channelState.d.ts","sourceRoot":"","sources":["../../../src/components/Channel/channelState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEhG,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAErF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"channelState.d.ts","sourceRoot":"","sources":["../../../src/components/Channel/channelState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE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WAAW,CAAC;CACnB,GACD;IACE,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,IAAI,EAAE,WAAW,CAAC;CACnB,GACD;IACE,IAAI,EAAE,oBAAoB,CAAC;CAC5B,GACD;IACE,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,OAAO,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;IAC7C,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEN,oBAAY,mBAAmB,CAC7B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,EAAE,yBAAyB,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAE7F,eAAO,MAAM,cAAc,wNAgI1B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;CAgBxB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChannelStateContextValue } from '../../../context/ChannelStateContext';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const useCreateChannelStateContext: <
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
+
export declare const useCreateChannelStateContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(value: Omit<ChannelStateContextValue<StreamChatGenerics>, "channelCapabilities"> & {
|
|
4
4
|
channelCapabilitiesArray: string[];
|
|
5
5
|
skipMessageDataMemoization?: boolean | undefined;
|
|
6
|
-
}) => ChannelStateContextValue<
|
|
6
|
+
}) => ChannelStateContextValue<StreamChatGenerics>;
|
|
7
7
|
//# sourceMappingURL=useCreateChannelStateContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateChannelStateContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Channel/hooks/useCreateChannelStateContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAErF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useCreateChannelStateContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Channel/hooks/useCreateChannelStateContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAErF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,eAAO,MAAM,4BAA4B;8BAIX,MAAM,EAAE;;kDAkIrC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
|
|
2
2
|
import { isDate, isDayOrMoment } from '../../../context/TranslationContext';
|
|
3
3
|
export var useCreateChannelStateContext = function (value) {
|
|
4
4
|
var _a;
|
|
5
|
-
var acceptedFiles = value.acceptedFiles, channel = value.channel, _b = value.channelCapabilitiesArray, channelCapabilitiesArray = _b === void 0 ? [] : _b, channelConfig = value.channelConfig, dragAndDropWindow = value.dragAndDropWindow, error = value.error, hasMore = value.hasMore, loading = value.loading, loadingMore = value.loadingMore, maxNumberOfFiles = value.maxNumberOfFiles, members = value.members, _c = value.messages, messages = _c === void 0 ? [] : _c, multipleUploads = value.multipleUploads, mutes = value.mutes, notifications = value.notifications, pinnedMessages = value.pinnedMessages, quotedMessage = value.quotedMessage, _d = value.read, read = _d === void 0 ? {} : _d, skipMessageDataMemoization = value.skipMessageDataMemoization, thread = value.thread, threadHasMore = value.threadHasMore, threadLoadingMore = value.threadLoadingMore, _e = value.threadMessages, threadMessages = _e === void 0 ? [] : _e, watcherCount = value.watcherCount, watcher_count = value.watcher_count, watchers = value.watchers;
|
|
5
|
+
var acceptedFiles = value.acceptedFiles, channel = value.channel, _b = value.channelCapabilitiesArray, channelCapabilitiesArray = _b === void 0 ? [] : _b, channelConfig = value.channelConfig, dragAndDropWindow = value.dragAndDropWindow, giphyVersion = value.giphyVersion, error = value.error, hasMore = value.hasMore, loading = value.loading, loadingMore = value.loadingMore, maxNumberOfFiles = value.maxNumberOfFiles, members = value.members, _c = value.messages, messages = _c === void 0 ? [] : _c, multipleUploads = value.multipleUploads, mutes = value.mutes, notifications = value.notifications, pinnedMessages = value.pinnedMessages, quotedMessage = value.quotedMessage, _d = value.read, read = _d === void 0 ? {} : _d, skipMessageDataMemoization = value.skipMessageDataMemoization, thread = value.thread, threadHasMore = value.threadHasMore, threadLoadingMore = value.threadLoadingMore, _e = value.threadMessages, threadMessages = _e === void 0 ? [] : _e, watcherCount = value.watcherCount, watcher_count = value.watcher_count, watchers = value.watchers;
|
|
6
6
|
var channelId = channel.cid;
|
|
7
7
|
var lastRead = channel.initialized && ((_a = channel.lastRead()) === null || _a === void 0 ? void 0 : _a.getTime());
|
|
8
8
|
var membersLength = Object.keys(members || []).length;
|
|
@@ -49,6 +49,7 @@ export var useCreateChannelStateContext = function (value) {
|
|
|
49
49
|
channelConfig: channelConfig,
|
|
50
50
|
dragAndDropWindow: dragAndDropWindow,
|
|
51
51
|
error: error,
|
|
52
|
+
giphyVersion: giphyVersion,
|
|
52
53
|
hasMore: hasMore,
|
|
53
54
|
loading: loading,
|
|
54
55
|
loadingMore: loadingMore,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TypingContextValue } from '../../../context/TypingContext';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const useCreateTypingContext: <
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
+
export declare const useCreateTypingContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(value: TypingContextValue<StreamChatGenerics>) => TypingContextValue<StreamChatGenerics>;
|
|
4
4
|
//# sourceMappingURL=useCreateTypingContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateTypingContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Channel/hooks/useCreateTypingContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useCreateTypingContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Channel/hooks/useCreateTypingContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,eAAO,MAAM,sBAAsB,6KAiBlC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StreamChat, UpdatedMessage } from 'stream-chat';
|
|
2
|
-
import type {
|
|
3
|
-
declare type UpdateHandler<
|
|
4
|
-
export declare const useEditMessageHandler: <
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
+
declare type UpdateHandler<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = (cid: string, updatedMessage: UpdatedMessage<StreamChatGenerics>) => ReturnType<StreamChat<StreamChatGenerics>['updateMessage']>;
|
|
4
|
+
export declare const useEditMessageHandler: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(doUpdateMessageRequest?: UpdateHandler<StreamChatGenerics> | undefined) => (updatedMessage: UpdatedMessage<StreamChatGenerics>) => Promise<import("stream-chat").UpdateMessageAPIResponse<StreamChatGenerics>>;
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=useEditMessageHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditMessageHandler.d.ts","sourceRoot":"","sources":["../../../../src/components/Channel/hooks/useEditMessageHandler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useEditMessageHandler.d.ts","sourceRoot":"","sources":["../../../../src/components/Channel/hooks/useEditMessageHandler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,aAAK,aAAa,CAChB,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E,CACF,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,cAAc,CAAC,kBAAkB,CAAC,KAC/C,UAAU,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;AAEjE,eAAO,MAAM,qBAAqB,mSAajC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { UserResponse } from 'stream-chat';
|
|
3
|
-
import type {
|
|
4
|
-
export declare type OnMentionAction<
|
|
5
|
-
export declare const useMentionsHandlers: <
|
|
3
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
4
|
+
export declare type OnMentionAction<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = (event: React.BaseSyntheticEvent, user?: UserResponse<StreamChatGenerics>) => void;
|
|
5
|
+
export declare const useMentionsHandlers: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(onMentionsHover?: OnMentionAction<StreamChatGenerics> | undefined, onMentionsClick?: OnMentionAction<StreamChatGenerics> | undefined) => (event: React.BaseSyntheticEvent, mentioned_users: UserResponse<StreamChatGenerics>[]) => void;
|
|
6
6
|
//# sourceMappingURL=useMentionsHandlers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMentionsHandlers.d.ts","sourceRoot":"","sources":["../../../../src/components/Channel/hooks/useMentionsHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useMentionsHandlers.d.ts","sourceRoot":"","sources":["../../../../src/components/Channel/hooks/useMentionsHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,oBAAY,eAAe,CACzB,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E,CAAC,KAAK,EAAE,KAAK,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;AAEvF,eAAO,MAAM,mBAAmB,sOAOpB,MAAM,kBAAkB,8DA0BjC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AvatarProps } from '../Avatar';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
4
4
|
export declare type ChannelHeaderProps = {
|
|
5
5
|
/** UI component to display a user's avatar, defaults to and accepts same props as: [Avatar](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Avatar/Avatar.tsx) */
|
|
6
6
|
Avatar?: React.ComponentType<AvatarProps>;
|
|
@@ -8,11 +8,13 @@ export declare type ChannelHeaderProps = {
|
|
|
8
8
|
image?: string;
|
|
9
9
|
/** Show a little indicator that the Channel is live right now */
|
|
10
10
|
live?: boolean;
|
|
11
|
+
/** UI component to display menu icon, defaults to [MenuIcon](https://github.com/GetStream/stream-chat-react/blob/master/src/components/ChannelHeader/ChannelHeader.tsx)*/
|
|
12
|
+
MenuIcon?: React.ComponentType;
|
|
11
13
|
/** Set title manually */
|
|
12
14
|
title?: string;
|
|
13
15
|
};
|
|
14
16
|
/**
|
|
15
17
|
* The ChannelHeader component renders some basic information about a Channel.
|
|
16
18
|
*/
|
|
17
|
-
export declare const ChannelHeader: <
|
|
19
|
+
export declare const ChannelHeader: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: ChannelHeaderProps) => JSX.Element;
|
|
18
20
|
//# sourceMappingURL=ChannelHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelHeader/ChannelHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChannelHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelHeader/ChannelHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAA2B,MAAM,WAAW,CAAC;AAMjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,oBAAY,kBAAkB,GAAG;IAC/B,4LAA4L;IAC5L,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAC1C,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0KAA0K;IAC1K,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/B,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAqDF;;GAEG;AACH,eAAO,MAAM,aAAa,4FAnDjB,kBAAkB,gBAmDuE,CAAC"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { MenuIcon as DefaultMenuIcon } from './icons';
|
|
2
3
|
import { Avatar as DefaultAvatar } from '../Avatar';
|
|
3
4
|
import { useChannelStateContext } from '../../context/ChannelStateContext';
|
|
4
5
|
import { useChatContext } from '../../context/ChatContext';
|
|
5
6
|
import { useTranslationContext } from '../../context/TranslationContext';
|
|
6
7
|
var UnMemoizedChannelHeader = function (props) {
|
|
7
|
-
var _a = props.Avatar, Avatar = _a === void 0 ? DefaultAvatar : _a, propImage = props.image, live = props.live, title = props.title;
|
|
8
|
-
var
|
|
8
|
+
var _a = props.Avatar, Avatar = _a === void 0 ? DefaultAvatar : _a, _b = props.MenuIcon, MenuIcon = _b === void 0 ? DefaultMenuIcon : _b, propImage = props.image, live = props.live, title = props.title;
|
|
9
|
+
var _c = useChannelStateContext('ChannelHeader'), channel = _c.channel, watcher_count = _c.watcher_count;
|
|
9
10
|
var openMobileNav = useChatContext('ChannelHeader').openMobileNav;
|
|
10
11
|
var t = useTranslationContext('ChannelHeader').t;
|
|
11
|
-
var
|
|
12
|
+
var _d = (channel === null || channel === void 0 ? void 0 : channel.data) || {}, channelImage = _d.image, member_count = _d.member_count, name = _d.name, subtitle = _d.subtitle;
|
|
12
13
|
var image = propImage || channelImage;
|
|
13
14
|
return (React.createElement("div", { className: 'str-chat__header-livestream' },
|
|
14
|
-
React.createElement("
|
|
15
|
-
React.createElement(
|
|
16
|
-
React.createElement("span", { className: 'str-chat__header-hamburger--line' }),
|
|
17
|
-
React.createElement("span", { className: 'str-chat__header-hamburger--line' })),
|
|
15
|
+
React.createElement("button", { "aria-label": 'Menu', className: 'str-chat__header-hamburger', onClick: openMobileNav },
|
|
16
|
+
React.createElement(MenuIcon, null)),
|
|
18
17
|
image && (React.createElement(Avatar, { image: image, shape: 'rounded', size: (channel === null || channel === void 0 ? void 0 : channel.type) === 'commerce' ? 60 : 40 })),
|
|
19
18
|
React.createElement("div", { className: 'str-chat__header-livestream-left' },
|
|
20
19
|
React.createElement("p", { className: 'str-chat__header-livestream-left--title' },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelHeader/icons.tsx"],"names":[],"mappings":";AAIA,eAAO,MAAM,QAAQ;;iBAYpB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslationContext } from '../../context';
|
|
3
|
+
export var MenuIcon = function (_a) {
|
|
4
|
+
var title = _a.title;
|
|
5
|
+
var t = useTranslationContext('MenuIcon').t;
|
|
6
|
+
return (React.createElement("svg", { "data-testid": 'menu-icon', viewBox: '0 0 448 512', xmlns: 'http://www.w3.org/2000/svg' },
|
|
7
|
+
React.createElement("title", null, title || t('Menu')),
|
|
8
|
+
React.createElement("path", { d: 'M0 88C0 74.75 10.75 64 24 64H424C437.3 64 448 74.75 448 88C448 101.3 437.3 112 424 112H24C10.75 112 0 101.3 0 88zM0 248C0 234.7 10.75 224 24 224H424C437.3 224 448 234.7 448 248C448 261.3 437.3 272 424 272H24C10.75 272 0 261.3 0 248zM424 432H24C10.75 432 0 421.3 0 408C0 394.7 10.75 384 24 384H424C437.3 384 448 394.7 448 408C448 421.3 437.3 432 424 432z', fill: 'currentColor' })));
|
|
9
|
+
};
|