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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Channel } from 'stream-chat';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const useIsChannelMuted: <
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
+
export declare const useIsChannelMuted: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel: Channel<StreamChatGenerics>) => {
|
|
4
4
|
createdAt: Date | null;
|
|
5
5
|
expiresAt: Date | null;
|
|
6
6
|
muted: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsChannelMuted.d.ts","sourceRoot":"","sources":["../../../../src/components/ChannelPreview/hooks/useIsChannelMuted.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useIsChannelMuted.d.ts","sourceRoot":"","sources":["../../../../src/components/ChannelPreview/hooks/useIsChannelMuted.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,eAAO,MAAM,iBAAiB;;;;CAiB7B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Channel, UserResponse } from 'stream-chat';
|
|
3
3
|
import type { TranslationContextValue } from '../../context/TranslationContext';
|
|
4
|
-
import type {
|
|
4
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
5
5
|
export declare const renderPreviewText: (text: string) => JSX.Element;
|
|
6
|
-
export declare const getLatestMessagePreview: <
|
|
7
|
-
export declare const getDisplayTitle: <
|
|
8
|
-
export declare const getDisplayImage: <
|
|
6
|
+
export declare const getLatestMessagePreview: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel: Channel<StreamChatGenerics>, t: TranslationContextValue['t'], userLanguage?: TranslationContextValue['userLanguage']) => string | JSX.Element;
|
|
7
|
+
export declare const getDisplayTitle: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel: Channel<StreamChatGenerics>, currentUser?: UserResponse<StreamChatGenerics> | undefined) => string | undefined;
|
|
8
|
+
export declare const getDisplayImage: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel: Channel<StreamChatGenerics>, currentUser?: UserResponse<StreamChatGenerics> | undefined) => string | undefined;
|
|
9
9
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelPreview/utils.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,OAAO,EAAwB,YAAY,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelPreview/utils.tsx"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,OAAO,EAAwB,YAAY,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAEhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,eAAO,MAAM,iBAAiB,SAAU,MAAM,gBAAoC,CAAC;AAEnF,eAAO,MAAM,uBAAuB,8HAI/B,uBAAuB,CAAC,GAAG,CAAC,iBACjB,uBAAuB,CAAC,cAAc,CAAC,KACpD,MAAM,GAAG,WA6BX,CAAC;AAEF,eAAO,MAAM,eAAe,4MAiB3B,CAAC;AAEF,eAAO,MAAM,eAAe,4MAiB3B,CAAC"}
|
|
@@ -3,26 +3,28 @@ import { ChannelSearchFunctionParams, SearchInputProps } from './SearchInput';
|
|
|
3
3
|
import { DropdownContainerProps, SearchResultItemProps } from './SearchResults';
|
|
4
4
|
import { ChannelOrUserResponse } from './utils';
|
|
5
5
|
import type { ChannelFilters, ChannelOptions, ChannelSort, UserFilters, UserOptions, UserSort } from 'stream-chat';
|
|
6
|
-
import type {
|
|
7
|
-
export declare type SearchQueryParams<
|
|
6
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
7
|
+
export declare type SearchQueryParams<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
8
8
|
channelFilters?: {
|
|
9
|
-
filters?: ChannelFilters<
|
|
9
|
+
filters?: ChannelFilters<StreamChatGenerics>;
|
|
10
10
|
options?: ChannelOptions;
|
|
11
|
-
sort?: ChannelSort<
|
|
11
|
+
sort?: ChannelSort<StreamChatGenerics>;
|
|
12
12
|
};
|
|
13
13
|
userFilters?: {
|
|
14
|
-
filters?: UserFilters<
|
|
14
|
+
filters?: UserFilters<StreamChatGenerics>;
|
|
15
15
|
options?: UserOptions;
|
|
16
|
-
sort?: UserSort<
|
|
16
|
+
sort?: UserSort<StreamChatGenerics>;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
export declare type ChannelSearchProps<
|
|
19
|
+
export declare type ChannelSearchProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
20
20
|
/** The type of channel to create on user result select, defaults to `messaging` */
|
|
21
21
|
channelType?: string;
|
|
22
22
|
/** Custom UI component to display all of the search results, defaults to accepts same props as: [DefaultDropdownContainer](https://github.com/GetStream/stream-chat-react/blob/master/src/components/ChannelSearch/SearchResults.tsx) */
|
|
23
|
-
DropdownContainer?: React.ComponentType<DropdownContainerProps<
|
|
23
|
+
DropdownContainer?: React.ComponentType<DropdownContainerProps<StreamChatGenerics>>;
|
|
24
24
|
/** Custom handler function to run on search result item selection */
|
|
25
|
-
onSelectResult?: (result: ChannelOrUserResponse<
|
|
25
|
+
onSelectResult?: (result: ChannelOrUserResponse<StreamChatGenerics>) => Promise<void> | void;
|
|
26
|
+
/** Custom placeholder text to be displayed in the search input */
|
|
27
|
+
placeholder?: string;
|
|
26
28
|
/** Display search results as an absolutely positioned popup, defaults to false and shows inline */
|
|
27
29
|
popupResults?: boolean;
|
|
28
30
|
/** Custom UI component to display empty search results */
|
|
@@ -30,15 +32,15 @@ export declare type ChannelSearchProps<At extends DefaultAttachmentType = Defaul
|
|
|
30
32
|
/** Boolean to search for channels as well as users in the server query, default is false and just searches for users */
|
|
31
33
|
searchForChannels?: boolean;
|
|
32
34
|
/** Custom search function to override default */
|
|
33
|
-
searchFunction?: (params: ChannelSearchFunctionParams<
|
|
35
|
+
searchFunction?: (params: ChannelSearchFunctionParams<StreamChatGenerics>, event: React.BaseSyntheticEvent) => Promise<void> | void;
|
|
34
36
|
/** Custom UI component to display the search text input */
|
|
35
|
-
SearchInput?: React.ComponentType<SearchInputProps<
|
|
37
|
+
SearchInput?: React.ComponentType<SearchInputProps<StreamChatGenerics>>;
|
|
36
38
|
/** Custom UI component to display the search loading state */
|
|
37
39
|
SearchLoading?: React.ComponentType;
|
|
38
40
|
/** Object containing filters/sort/options overrides for user search */
|
|
39
|
-
searchQueryParams?: SearchQueryParams<
|
|
41
|
+
searchQueryParams?: SearchQueryParams<StreamChatGenerics>;
|
|
40
42
|
/** Custom UI component to display a search result list item, defaults to and accepts same props as: [DefaultSearchResultItem](https://github.com/GetStream/stream-chat-react/blob/master/src/components/ChannelSearch/SearchResults.tsx) */
|
|
41
|
-
SearchResultItem?: React.ComponentType<SearchResultItemProps<
|
|
43
|
+
SearchResultItem?: React.ComponentType<SearchResultItemProps<StreamChatGenerics>>;
|
|
42
44
|
/** Custom UI component to display the search results header */
|
|
43
45
|
SearchResultsHeader?: React.ComponentType;
|
|
44
46
|
};
|
|
@@ -47,5 +49,5 @@ export declare type ChannelSearchProps<At extends DefaultAttachmentType = Defaul
|
|
|
47
49
|
* Clicking on a list item will navigate you into a channel with the selected user. It can be used
|
|
48
50
|
* on its own or added to the ChannelList component by setting the `showChannelSearch` prop to true.
|
|
49
51
|
*/
|
|
50
|
-
export declare const ChannelSearch: <
|
|
52
|
+
export declare const ChannelSearch: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: ChannelSearchProps<StreamChatGenerics>) => JSX.Element;
|
|
51
53
|
//# sourceMappingURL=ChannelSearch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelSearch.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelSearch/ChannelSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EACL,2BAA2B,EAE3B,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAiB,MAAM,iBAAiB,CAAC;AAE/F,OAAO,EAAE,qBAAqB,EAAa,MAAM,SAAS,CAAC;AAI3D,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,WAAW,EACX,WAAW,EACX,WAAW,EACX,QAAQ,EACT,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ChannelSearch.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelSearch/ChannelSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,OAAO,EACL,2BAA2B,EAE3B,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAiB,MAAM,iBAAiB,CAAC;AAE/F,OAAO,EAAE,qBAAqB,EAAa,MAAM,SAAS,CAAC;AAI3D,OAAO,KAAK,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AAM,EAAE,2BAA2B,CAAC,kBAAkB,CAAC,EACvD,KAAK,EAAE,KAAK,CAAC,kBAAkB,KAC5B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC1B,2DAA2D;IAC3D,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACxE,8DAA8D;IAC9D,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACpC,uEAAuE;IACvE,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAC1D,4OAA4O;IAC5O,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAClF,+DAA+D;IAC/D,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC3C,CAAC;AA4JF;;;;GAIG;AACH,eAAO,MAAM,aAAa,kJAAwE,CAAC"}
|
|
@@ -57,7 +57,7 @@ import { SearchResults } from './SearchResults';
|
|
|
57
57
|
import { isChannel } from './utils';
|
|
58
58
|
import { useChatContext } from '../../context/ChatContext';
|
|
59
59
|
var UnMemoizedChannelSearch = function (props) {
|
|
60
|
-
var _a = props.channelType, channelType = _a === void 0 ? 'messaging' : _a, DropdownContainer = props.DropdownContainer, onSelectResult = props.onSelectResult, _b = props.popupResults, popupResults = _b === void 0 ? false : _b, SearchEmpty = props.SearchEmpty, _c = props.searchForChannels, searchForChannels = _c === void 0 ? false : _c, searchFunction = props.searchFunction, _d = props.SearchInput, SearchInput = _d === void 0 ? DefaultSearchInput : _d, SearchLoading = props.SearchLoading, searchQueryParams = props.searchQueryParams, SearchResultItem = props.SearchResultItem, SearchResultsHeader = props.SearchResultsHeader;
|
|
60
|
+
var _a = props.channelType, channelType = _a === void 0 ? 'messaging' : _a, DropdownContainer = props.DropdownContainer, onSelectResult = props.onSelectResult, placeholder = props.placeholder, _b = props.popupResults, popupResults = _b === void 0 ? false : _b, SearchEmpty = props.SearchEmpty, _c = props.searchForChannels, searchForChannels = _c === void 0 ? false : _c, searchFunction = props.searchFunction, _d = props.SearchInput, SearchInput = _d === void 0 ? DefaultSearchInput : _d, SearchLoading = props.SearchLoading, searchQueryParams = props.searchQueryParams, SearchResultItem = props.SearchResultItem, SearchResultsHeader = props.SearchResultsHeader;
|
|
61
61
|
var _e = useChatContext('ChannelSearch'), client = _e.client, setActiveChannel = _e.setActiveChannel;
|
|
62
62
|
var _f = useState(''), query = _f[0], setQuery = _f[1];
|
|
63
63
|
var _g = useState([]), results = _g[0], setResults = _g[1];
|
|
@@ -159,8 +159,8 @@ var UnMemoizedChannelSearch = function (props) {
|
|
|
159
159
|
setResultsOpen: setResultsOpen,
|
|
160
160
|
setSearching: setSearching,
|
|
161
161
|
};
|
|
162
|
-
return (React.createElement("div", { className: 'str-chat__channel-search' },
|
|
163
|
-
React.createElement(SearchInput, { channelSearchParams: channelSearchParams, inputRef: inputRef, onSearch: onSearch, query: query, searchFunction: searchFunction }),
|
|
162
|
+
return (React.createElement("div", { className: 'str-chat__channel-search', "data-testid": 'channel-search' },
|
|
163
|
+
React.createElement(SearchInput, { channelSearchParams: channelSearchParams, inputRef: inputRef, onSearch: onSearch, placeholder: placeholder, query: query, searchFunction: searchFunction }),
|
|
164
164
|
query && (React.createElement(SearchResults, { DropdownContainer: DropdownContainer, popupResults: popupResults, results: results, SearchEmpty: SearchEmpty, searching: searching, SearchLoading: SearchLoading, SearchResultItem: SearchResultItem, SearchResultsHeader: SearchResultsHeader, selectResult: onSelectResult || selectResult }))));
|
|
165
165
|
};
|
|
166
166
|
/**
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ChannelOrUserResponse } from './utils';
|
|
3
|
-
import type {
|
|
4
|
-
export declare type ChannelSearchFunctionParams<
|
|
3
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
4
|
+
export declare type ChannelSearchFunctionParams<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
5
5
|
setQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
6
|
-
setResults: React.Dispatch<React.SetStateAction<Array<ChannelOrUserResponse<
|
|
6
|
+
setResults: React.Dispatch<React.SetStateAction<Array<ChannelOrUserResponse<StreamChatGenerics>>>>;
|
|
7
7
|
setResultsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
8
8
|
setSearching: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
9
|
};
|
|
10
|
-
export declare type SearchInputProps<
|
|
10
|
+
export declare type SearchInputProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
11
11
|
channelSearchParams: {
|
|
12
12
|
setQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
13
|
-
setResults: React.Dispatch<React.SetStateAction<ChannelOrUserResponse<
|
|
13
|
+
setResults: React.Dispatch<React.SetStateAction<ChannelOrUserResponse<StreamChatGenerics>[]>>;
|
|
14
14
|
setResultsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
15
15
|
setSearching: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
16
|
};
|
|
17
17
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
18
18
|
onSearch: (event: React.BaseSyntheticEvent) => void;
|
|
19
19
|
query: string;
|
|
20
|
-
|
|
20
|
+
/** Custom placeholder text to be displayed in the search input */
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
searchFunction?: (params: ChannelSearchFunctionParams<StreamChatGenerics>, event: React.BaseSyntheticEvent) => Promise<void> | void;
|
|
21
23
|
};
|
|
22
|
-
export declare const SearchInput: <
|
|
24
|
+
export declare const SearchInput: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: SearchInputProps<StreamChatGenerics>) => JSX.Element;
|
|
23
25
|
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelSearch/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelSearch/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,oBAAY,2BAA2B,CACrC,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACvD,UAAU,EAAE,KAAK,CAAC,QAAQ,CACxB,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CACvE,CAAC;IACF,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9D,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D,CAAC;AAEF,oBAAY,gBAAgB,CAC1B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,mBAAmB,EAAE;QACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9F,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9D,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;KAC7D,CAAC;IACF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,CACf,MAAM,EAAE,2BAA2B,CAAC,kBAAkB,CAAC,EACvD,KAAK,EAAE,KAAK,CAAC,kBAAkB,KAC5B,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,WAAW,gJAqBvB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslationContext } from '../../context/TranslationContext';
|
|
3
3
|
export var SearchInput = function (props) {
|
|
4
|
-
var channelSearchParams = props.channelSearchParams, inputRef = props.inputRef, onSearch = props.onSearch, query = props.query, searchFunction = props.searchFunction;
|
|
4
|
+
var channelSearchParams = props.channelSearchParams, inputRef = props.inputRef, onSearch = props.onSearch, placeholder = props.placeholder, query = props.query, searchFunction = props.searchFunction;
|
|
5
5
|
var t = useTranslationContext('SearchInput').t;
|
|
6
6
|
return (React.createElement("input", { className: 'str-chat__channel-search-input', onChange: function (event) {
|
|
7
7
|
return searchFunction ? searchFunction(channelSearchParams, event) : onSearch(event);
|
|
8
|
-
}, placeholder: t('Search'), ref: inputRef, type: 'text', value: query }));
|
|
8
|
+
}, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('Search'), ref: inputRef, type: 'text', value: query }));
|
|
9
9
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChannelOrUserResponse } from './utils';
|
|
3
|
-
import type {
|
|
4
|
-
export declare type DropdownContainerProps<
|
|
5
|
-
results: ChannelOrUserResponse<
|
|
6
|
-
SearchResultItem: React.ComponentType<SearchResultItemProps<
|
|
7
|
-
selectResult: (result: ChannelOrUserResponse<
|
|
3
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
4
|
+
export declare type DropdownContainerProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
5
|
+
results: ChannelOrUserResponse<StreamChatGenerics>[];
|
|
6
|
+
SearchResultItem: React.ComponentType<SearchResultItemProps<StreamChatGenerics>>;
|
|
7
|
+
selectResult: (result: ChannelOrUserResponse<StreamChatGenerics>) => Promise<void> | void;
|
|
8
8
|
focusedUser?: number;
|
|
9
9
|
};
|
|
10
|
-
export declare type SearchResultItemProps<
|
|
10
|
+
export declare type SearchResultItemProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
11
11
|
index: number;
|
|
12
|
-
result: ChannelOrUserResponse<
|
|
13
|
-
selectResult: (result: ChannelOrUserResponse<
|
|
12
|
+
result: ChannelOrUserResponse<StreamChatGenerics>;
|
|
13
|
+
selectResult: (result: ChannelOrUserResponse<StreamChatGenerics>) => Promise<void> | void;
|
|
14
14
|
focusedUser?: number;
|
|
15
15
|
};
|
|
16
|
-
export declare type SearchResultsProps<
|
|
17
|
-
results: Array<ChannelOrUserResponse<
|
|
16
|
+
export declare type SearchResultsProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
17
|
+
results: Array<ChannelOrUserResponse<StreamChatGenerics>> | [];
|
|
18
18
|
searching: boolean;
|
|
19
|
-
selectResult: (result: ChannelOrUserResponse<
|
|
20
|
-
DropdownContainer?: React.ComponentType<DropdownContainerProps<
|
|
19
|
+
selectResult: (result: ChannelOrUserResponse<StreamChatGenerics>) => Promise<void> | void;
|
|
20
|
+
DropdownContainer?: React.ComponentType<DropdownContainerProps<StreamChatGenerics>>;
|
|
21
21
|
popupResults?: boolean;
|
|
22
22
|
SearchEmpty?: React.ComponentType;
|
|
23
23
|
SearchLoading?: React.ComponentType;
|
|
24
|
-
SearchResultItem?: React.ComponentType<SearchResultItemProps<
|
|
24
|
+
SearchResultItem?: React.ComponentType<SearchResultItemProps<StreamChatGenerics>>;
|
|
25
25
|
SearchResultsHeader?: React.ComponentType;
|
|
26
26
|
};
|
|
27
|
-
export declare const SearchResults: <
|
|
27
|
+
export declare const SearchResults: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: SearchResultsProps<StreamChatGenerics>) => JSX.Element;
|
|
28
28
|
//# sourceMappingURL=SearchResults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResults.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelSearch/SearchResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAa,MAAM,SAAS,CAAC;AAO3D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"SearchResults.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelSearch/SearchResults.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAa,MAAM,SAAS,CAAC;AAO3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,oBAAY,sBAAsB,CAChC,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,OAAO,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,EAAE,CAAC;IACrD,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC,CA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{ useBreakpoint } from '../Message/hooks/useBreakpoint';
|
|
|
5
5
|
import { useTranslationContext } from '../../context/TranslationContext';
|
|
6
6
|
var DefaultDropdownContainer = function (props) {
|
|
7
7
|
var focusedUser = props.focusedUser, results = props.results, _a = props.SearchResultItem, SearchResultItem = _a === void 0 ? DefaultSearchResultItem : _a, selectResult = props.selectResult;
|
|
8
|
-
return (React.createElement(
|
|
8
|
+
return (React.createElement(React.Fragment, null, results.map(function (result, index) { return (React.createElement(SearchResultItem, { focusedUser: focusedUser, index: index, key: index, result: result, selectResult: selectResult })); })));
|
|
9
9
|
};
|
|
10
10
|
var DefaultSearchResultItem = function (props) {
|
|
11
|
-
var _a;
|
|
11
|
+
var _a, _b;
|
|
12
12
|
var focusedUser = props.focusedUser, index = props.index, result = props.result, selectResult = props.selectResult;
|
|
13
13
|
var focused = focusedUser === index;
|
|
14
14
|
if (isChannel(result)) {
|
|
15
15
|
var channel_1 = result;
|
|
16
|
-
return (React.createElement("
|
|
16
|
+
return (React.createElement("button", { "aria-label": "Select Channel: " + (((_a = channel_1.data) === null || _a === void 0 ? void 0 : _a.name) || ''), className: "str-chat__channel-search-result " + (focused ? 'focused' : ''), onClick: function () { return selectResult(channel_1); } },
|
|
17
17
|
React.createElement("div", { className: 'result-hashtag' }, "#"),
|
|
18
|
-
React.createElement("p", { className: 'channel-search__result-text' }, (
|
|
18
|
+
React.createElement("p", { className: 'channel-search__result-text' }, (_b = channel_1.data) === null || _b === void 0 ? void 0 : _b.name)));
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
|
-
return (React.createElement("
|
|
21
|
+
return (React.createElement("button", { "aria-label": "Select User Channel: " + (result.name || ''), className: "str-chat__channel-search-result " + (focused ? 'focused' : ''), onClick: function () { return selectResult(result); } },
|
|
22
22
|
React.createElement(Avatar, { image: result.image, user: result }),
|
|
23
23
|
result.name || result.id));
|
|
24
24
|
}
|
|
@@ -64,7 +64,7 @@ export var SearchResults = function (props) {
|
|
|
64
64
|
return (React.createElement(ResultsContainer, null, SearchLoading ? (React.createElement(SearchLoading, null)) : (React.createElement("div", { className: 'str-chat__channel-search-container-searching' }, t('Searching...')))));
|
|
65
65
|
}
|
|
66
66
|
if (!results.length) {
|
|
67
|
-
return (React.createElement(ResultsContainer, null, SearchEmpty ? (React.createElement(SearchEmpty, null)) : (React.createElement("div", { className: 'str-chat__channel-search-container-empty' }, t('No results found')))));
|
|
67
|
+
return (React.createElement(ResultsContainer, null, SearchEmpty ? (React.createElement(SearchEmpty, null)) : (React.createElement("div", { "aria-live": 'polite', className: 'str-chat__channel-search-container-empty' }, t('No results found')))));
|
|
68
68
|
}
|
|
69
69
|
return (React.createElement(ResultsContainer, null,
|
|
70
70
|
SearchResultsHeader && React.createElement(SearchResultsHeader, null),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Channel, UserResponse } from 'stream-chat';
|
|
2
|
-
import type {
|
|
3
|
-
export declare type ChannelOrUserResponse<
|
|
4
|
-
export declare const isChannel: <
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
3
|
+
export declare type ChannelOrUserResponse<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Channel<StreamChatGenerics> | UserResponse<StreamChatGenerics>;
|
|
4
|
+
export declare const isChannel: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(output: ChannelOrUserResponse<StreamChatGenerics>) => output is Channel<StreamChatGenerics>;
|
|
5
5
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelSearch/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/ChannelSearch/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,oBAAY,qBAAqB,CAC/B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E,OAAO,CAAC,kBAAkB,CAAC,GAAG,YAAY,CAAC,kBAAkB,CAAC,CAAC;AAEnE,eAAO,MAAM,SAAS,gLAIyE,CAAC"}
|
|
@@ -4,11 +4,11 @@ import { CustomClasses } from '../../context/ChatContext';
|
|
|
4
4
|
import { SupportedTranslations } from '../../context/TranslationContext';
|
|
5
5
|
import type { StreamChat } from 'stream-chat';
|
|
6
6
|
import type { Streami18n } from '../../i18n/Streami18n';
|
|
7
|
-
import type {
|
|
7
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
8
8
|
export declare type Theme<T extends string = string> = 'commerce dark' | 'commerce light' | 'livestream dark' | 'livestream light' | 'messaging dark' | 'messaging light' | 'team dark' | 'team light' | T;
|
|
9
|
-
export declare type ChatProps<
|
|
9
|
+
export declare type ChatProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
10
10
|
/** The StreamChat client object */
|
|
11
|
-
client: StreamChat<
|
|
11
|
+
client: StreamChat<StreamChatGenerics>;
|
|
12
12
|
/** Object containing custom CSS classnames to override the library's default container CSS */
|
|
13
13
|
customClasses?: CustomClasses;
|
|
14
14
|
/** Object containing custom styles to override the default CSS variables */
|
|
@@ -33,5 +33,5 @@ export declare type ChatProps<At extends DefaultAttachmentType = DefaultAttachme
|
|
|
33
33
|
* Wrapper component for a StreamChat application. Chat needs to be placed around any other chat components
|
|
34
34
|
* as it provides the ChatContext.
|
|
35
35
|
*/
|
|
36
|
-
export declare const Chat: <
|
|
36
|
+
export declare const Chat: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: React.PropsWithChildren<ChatProps<StreamChatGenerics>>) => JSX.Element | null;
|
|
37
37
|
//# sourceMappingURL=Chat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,YAAY,EAAkC,MAAM,yBAAyB,CAAC;AAEvF,OAAO,EAAgB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAuB,MAAM,kCAAkC,CAAC;AAE9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,YAAY,EAAkC,MAAM,yBAAyB,CAAC;AAEvF,OAAO,EAAgB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAuB,MAAM,kCAAkC,CAAC;AAE9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,oBAAY,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IACvC,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,YAAY,GACZ,CAAC,CAAC;AAEN,oBAAY,SAAS,CACnB,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,mCAAmC;IACnC,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACvC,8FAA8F;IAC9F,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,4EAA4E;IAC5E,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oGAAoG;IACpG,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,8BAA8B;IAC9B,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,0CAA0C;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iPAAiP;IACjP,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;OAGG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,IAAI,yKAoDhB,CAAC"}
|
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
import { SupportedTranslations, TranslationContextValue } from '../../../context/TranslationContext';
|
|
4
4
|
import { Streami18n } from '../../../i18n';
|
|
5
5
|
import type { AppSettingsAPIResponse, Channel, Mute, StreamChat } from 'stream-chat';
|
|
6
|
-
import type {
|
|
7
|
-
export declare type UseChatParams<
|
|
8
|
-
client: StreamChat<
|
|
6
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
7
|
+
export declare type UseChatParams<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
8
|
+
client: StreamChat<StreamChatGenerics>;
|
|
9
9
|
defaultLanguage?: SupportedTranslations;
|
|
10
10
|
i18nInstance?: Streami18n;
|
|
11
11
|
initialNavOpen?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare const useChat: <
|
|
14
|
-
channel: Channel<
|
|
13
|
+
export declare const useChat: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ client, defaultLanguage, i18nInstance, initialNavOpen, }: UseChatParams<StreamChatGenerics>) => {
|
|
14
|
+
channel: Channel<StreamChatGenerics> | undefined;
|
|
15
15
|
closeMobileNav: () => void;
|
|
16
|
-
getAppSettings: () => Promise<AppSettingsAPIResponse<
|
|
17
|
-
mutes: Mute<
|
|
16
|
+
getAppSettings: () => Promise<AppSettingsAPIResponse<StreamChatGenerics>>;
|
|
17
|
+
mutes: Mute<StreamChatGenerics>[];
|
|
18
18
|
navOpen: boolean | undefined;
|
|
19
19
|
openMobileNav: () => NodeJS.Timeout;
|
|
20
|
-
setActiveChannel: (activeChannel?: Channel<
|
|
20
|
+
setActiveChannel: (activeChannel?: Channel<StreamChatGenerics> | undefined, watchers?: {
|
|
21
21
|
limit?: number;
|
|
22
22
|
offset?: number;
|
|
23
23
|
}, event?: import("react").BaseSyntheticEvent<object, any, any> | undefined) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useChat.ts"],"names":[],"mappings":";;AAGA,OAAO,EAEL,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,OAAO,EAAS,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5F,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useChat.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useChat.ts"],"names":[],"mappings":";;AAGA,OAAO,EAEL,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,OAAO,EAAS,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,oBAAY,aAAa,CACvB,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACvC,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;2FA+EJ;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;;CAyBlD,CAAC"}
|
|
@@ -61,7 +61,7 @@ export var useChat = function (_a) {
|
|
|
61
61
|
var _e = useState(), channel = _e[0], setChannel = _e[1];
|
|
62
62
|
var _f = useState([]), mutes = _f[0], setMutes = _f[1];
|
|
63
63
|
var _g = useState(initialNavOpen), navOpen = _g[0], setNavOpen = _g[1];
|
|
64
|
-
var clientMutes = (_b = client.user) === null || _b === void 0 ? void 0 : _b.mutes;
|
|
64
|
+
var clientMutes = ((_b = client.user) === null || _b === void 0 ? void 0 : _b.mutes) || [];
|
|
65
65
|
var closeMobileNav = function () { return setNavOpen(false); };
|
|
66
66
|
var openMobileNav = function () { return setTimeout(function () { return setNavOpen(true); }, 100); };
|
|
67
67
|
var appSettings = useRef(null);
|
|
@@ -82,7 +82,7 @@ export var useChat = function (_a) {
|
|
|
82
82
|
}
|
|
83
83
|
}, [client]);
|
|
84
84
|
useEffect(function () {
|
|
85
|
-
setMutes(clientMutes
|
|
85
|
+
setMutes(clientMutes);
|
|
86
86
|
var handleEvent = function (event) {
|
|
87
87
|
var _a;
|
|
88
88
|
setMutes(((_a = event.me) === null || _a === void 0 ? void 0 : _a.mutes) || []);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ChatContextValue } from '../../../context/ChatContext';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const useCreateChatContext: <
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
+
export declare const useCreateChatContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(value: ChatContextValue<StreamChatGenerics>) => ChatContextValue<StreamChatGenerics>;
|
|
4
4
|
//# sourceMappingURL=useCreateChatContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateChatContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useCreateChatContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useCreateChatContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Chat/hooks/useCreateChatContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,eAAO,MAAM,oBAAoB,yKA4ChC,CAAC"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { EmojiData } from 'emoji-mart';
|
|
2
|
+
import type { EmojiData, NimbleEmojiIndex } from 'emoji-mart';
|
|
3
3
|
import type { CommandResponse, UserResponse } from 'stream-chat';
|
|
4
4
|
import type { TriggerSettings } from '../MessageInput/DefaultTriggerProvider';
|
|
5
|
-
import type { CustomTrigger,
|
|
5
|
+
import type { CustomTrigger, DefaultStreamChatGenerics } from '../../types/types';
|
|
6
6
|
declare type ObjectUnion<T> = T[keyof T];
|
|
7
|
-
export declare type SuggestionCommand<
|
|
8
|
-
export declare type SuggestionUser<
|
|
9
|
-
export declare type SuggestionItemProps<
|
|
7
|
+
export declare type SuggestionCommand<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = CommandResponse<StreamChatGenerics>;
|
|
8
|
+
export declare type SuggestionUser<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = UserResponse<StreamChatGenerics>;
|
|
9
|
+
export declare type SuggestionItemProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
10
10
|
className: string;
|
|
11
11
|
component: JSX.Element;
|
|
12
|
-
item: EmojiData | SuggestionUser<
|
|
12
|
+
item: EmojiData | SuggestionUser<StreamChatGenerics> | SuggestionCommand<StreamChatGenerics>;
|
|
13
13
|
key: React.Key;
|
|
14
14
|
onClickHandler: (event: React.BaseSyntheticEvent) => void;
|
|
15
|
-
onSelectHandler: (item: EmojiData | SuggestionUser<
|
|
15
|
+
onSelectHandler: (item: EmojiData | SuggestionUser<StreamChatGenerics> | SuggestionCommand<StreamChatGenerics>) => void;
|
|
16
16
|
selected: boolean;
|
|
17
17
|
style: React.CSSProperties;
|
|
18
18
|
value: string;
|
|
19
19
|
};
|
|
20
|
-
export declare type SuggestionListProps<
|
|
21
|
-
[key in keyof TriggerSettings<
|
|
22
|
-
component: TriggerSettings<
|
|
20
|
+
export declare type SuggestionListProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger> = ObjectUnion<{
|
|
21
|
+
[key in keyof TriggerSettings<StreamChatGenerics, V>]: {
|
|
22
|
+
component: TriggerSettings<StreamChatGenerics, V>[key]['component'];
|
|
23
23
|
dropdownScroll: (element: HTMLDivElement) => void;
|
|
24
|
-
getSelectedItem: ((item: Parameters<TriggerSettings<
|
|
25
|
-
getTextToReplace: (item: Parameters<TriggerSettings<
|
|
24
|
+
getSelectedItem: ((item: Parameters<TriggerSettings<StreamChatGenerics, V>[key]['output']>[0]) => void) | null;
|
|
25
|
+
getTextToReplace: (item: Parameters<TriggerSettings<StreamChatGenerics, V>[key]['output']>[0]) => {
|
|
26
26
|
caretPosition: 'start' | 'end' | 'next' | number;
|
|
27
27
|
text: string;
|
|
28
28
|
key?: string;
|
|
@@ -31,7 +31,7 @@ export declare type SuggestionListProps<Co extends DefaultCommandType = DefaultC
|
|
|
31
31
|
caretPosition: 'start' | 'end' | 'next' | number;
|
|
32
32
|
text: string;
|
|
33
33
|
}) => void;
|
|
34
|
-
values: Parameters<Parameters<TriggerSettings<
|
|
34
|
+
values: Parameters<Parameters<TriggerSettings<StreamChatGenerics, V>[key]['dataProvider']>[2]>[0];
|
|
35
35
|
className?: string;
|
|
36
36
|
itemClassName?: string;
|
|
37
37
|
itemStyle?: React.CSSProperties;
|
|
@@ -42,6 +42,8 @@ export declare type SuggestionListProps<Co extends DefaultCommandType = DefaultC
|
|
|
42
42
|
export declare type ChatAutoCompleteProps = {
|
|
43
43
|
/** Function to override the default submit handler on the underlying `textarea` component */
|
|
44
44
|
handleSubmit?: (event: React.BaseSyntheticEvent) => void;
|
|
45
|
+
/** Function to run on blur of the underlying `textarea` component */
|
|
46
|
+
onBlur?: React.FocusEventHandler<HTMLTextAreaElement>;
|
|
45
47
|
/** Function to override the default onChange behavior on the underlying `textarea` component */
|
|
46
48
|
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
47
49
|
/** Function to run on focus of the underlying `textarea` component */
|
|
@@ -54,7 +56,9 @@ export declare type ChatAutoCompleteProps = {
|
|
|
54
56
|
rows?: number;
|
|
55
57
|
/** The text value of the underlying `textarea` component */
|
|
56
58
|
value?: string;
|
|
59
|
+
/** Function to override the default emojiReplace behavior on the `wordReplace` prop of the `textarea` component */
|
|
60
|
+
wordReplace?: (word: string, emojiIndex?: NimbleEmojiIndex) => string;
|
|
57
61
|
};
|
|
58
|
-
export declare const ChatAutoComplete: <
|
|
62
|
+
export declare const ChatAutoComplete: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger>(props: ChatAutoCompleteProps) => JSX.Element;
|
|
59
63
|
export {};
|
|
60
64
|
//# sourceMappingURL=ChatAutoComplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatAutoComplete.d.ts","sourceRoot":"","sources":["../../../src/components/ChatAutoComplete/ChatAutoComplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAS3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatAutoComplete.d.ts","sourceRoot":"","sources":["../../../src/components/ChatAutoComplete/ChatAutoComplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAS3C,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAElF,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEjC,oBAAY,iBAAiB,CAC3B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E,eAAe,CAAC,kBAAkB,CAAC,CAAC;AAExC,oBAAY,cAAc,CACxB,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E,YAAY,CAAC,kBAAkB,CAAC,CAAC;AAErC,oBAAY,mBAAmB,CAC7B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,IAAI,EAAE,SAAS,GAAG,cAAc,CAAC,kBAAkB,CAAC,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAC7F,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC;IACf,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC;IAC1D,eAAe,EA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