stream-chat-react 12.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Channel/Channel.d.ts +3 -103
- package/dist/components/MessageList/MessageList.js +2 -2
- package/dist/components/MessageList/MessageListMainPanel.d.ts +1 -1
- package/dist/components/MessageList/MessageListMainPanel.js +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +2 -2
- package/dist/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.js +2 -2
- package/dist/context/ComponentContext.d.ts +50 -1
- package/dist/index.browser.cjs +8 -6
- package/dist/index.browser.cjs.map +3 -3
- package/dist/index.node.cjs +8 -6
- package/dist/index.node.cjs.map +3 -3
- package/package.json +1 -1
|
@@ -3,112 +3,10 @@ import { ChannelQueryOptions, EventAPIResponse, Message, MessageResponse, Channe
|
|
|
3
3
|
import { OnMentionAction } from './hooks/useMentionsHandlers';
|
|
4
4
|
import { LoadingErrorIndicatorProps } from '../Loading';
|
|
5
5
|
import { ComponentContextValue, StreamMessage } from '../../context';
|
|
6
|
-
import type { UnreadMessagesNotificationProps } from '../MessageList';
|
|
7
|
-
import type { MessageProps } from '../Message';
|
|
8
6
|
import type { MessageInputProps } from '../MessageInput';
|
|
9
7
|
import type { ChannelUnreadUiState, CustomTrigger, DefaultStreamChatGenerics, GiphyVersions, ImageAttachmentSizeHandler, SendMessageOptions, UpdateMessageOptions, VideoAttachmentSizeHandler } from '../../types/types';
|
|
10
8
|
import type { URLEnrichmentConfig } from '../MessageInput/hooks/useLinkPreviews';
|
|
11
|
-
|
|
12
|
-
type ChannelPropsForwardedToComponentContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
13
|
-
/** 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) */
|
|
14
|
-
Attachment?: ComponentContextValue<StreamChatGenerics>['Attachment'];
|
|
15
|
-
/** Custom UI component to display an attachment previews in MessageInput, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AttachmentPreviewList.tsx) */
|
|
16
|
-
AttachmentPreviewList?: ComponentContextValue<StreamChatGenerics>['AttachmentPreviewList'];
|
|
17
|
-
/** Custom UI component to display AudioRecorder in MessageInput, defaults to and accepts same props as: [AudioRecorder](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AudioRecorder.tsx) */
|
|
18
|
-
AudioRecorder?: ComponentContextValue<StreamChatGenerics>['AudioRecorder'];
|
|
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<StreamChatGenerics>['AutocompleteSuggestionItem'];
|
|
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<StreamChatGenerics>['AutocompleteSuggestionList'];
|
|
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<StreamChatGenerics>['Avatar'];
|
|
25
|
-
/** Custom UI component to display <img/> elements resp. a fallback in case of load error, defaults to and accepts same props as: [BaseImage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/BaseImage.tsx) */
|
|
26
|
-
BaseImage?: ComponentContextValue<StreamChatGenerics>['BaseImage'];
|
|
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/CooldownTimer.tsx) */
|
|
28
|
-
CooldownTimer?: ComponentContextValue<StreamChatGenerics>['CooldownTimer'];
|
|
29
|
-
/** Custom UI component to render set of buttons to be displayed in the MessageActionsBox, defaults to and accepts same props as: [CustomMessageActionsList](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageActions/CustomMessageActionsList.tsx) */
|
|
30
|
-
CustomMessageActionsList?: ComponentContextValue<StreamChatGenerics>['CustomMessageActionsList'];
|
|
31
|
-
/** 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) */
|
|
32
|
-
DateSeparator?: ComponentContextValue<StreamChatGenerics>['DateSeparator'];
|
|
33
|
-
/** 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) */
|
|
34
|
-
EditMessageInput?: ComponentContextValue<StreamChatGenerics>['EditMessageInput'];
|
|
35
|
-
/** Custom UI component for rendering button with emoji picker in MessageInput */
|
|
36
|
-
EmojiPicker?: ComponentContextValue<StreamChatGenerics>['EmojiPicker'];
|
|
37
|
-
/** Mechanism to be used with autocomplete and text replace features of the `MessageInput` component, see [emoji-mart `SearchIndex`](https://github.com/missive/emoji-mart#%EF%B8%8F%EF%B8%8F-headless-search) */
|
|
38
|
-
emojiSearchIndex?: ComponentContextValue<StreamChatGenerics>['emojiSearchIndex'];
|
|
39
|
-
/** 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) */
|
|
40
|
-
EmptyStateIndicator?: ComponentContextValue<StreamChatGenerics>['EmptyStateIndicator'];
|
|
41
|
-
/** 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) */
|
|
42
|
-
FileUploadIcon?: ComponentContextValue<StreamChatGenerics>['FileUploadIcon'];
|
|
43
|
-
/** Custom UI component to render a Giphy preview in the `VirtualizedMessageList` */
|
|
44
|
-
GiphyPreviewMessage?: ComponentContextValue<StreamChatGenerics>['GiphyPreviewMessage'];
|
|
45
|
-
/** Custom UI component to render at the top of the `MessageList` */
|
|
46
|
-
HeaderComponent?: ComponentContextValue<StreamChatGenerics>['HeaderComponent'];
|
|
47
|
-
/** 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) */
|
|
48
|
-
Input?: ComponentContextValue<StreamChatGenerics>['Input'];
|
|
49
|
-
/** Custom component to render link previews in message input **/
|
|
50
|
-
LinkPreviewList?: ComponentContextValue<StreamChatGenerics>['LinkPreviewList'];
|
|
51
|
-
/** 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) */
|
|
52
|
-
LoadingErrorIndicator?: React.ComponentType<LoadingErrorIndicatorProps>;
|
|
53
|
-
/** 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) */
|
|
54
|
-
LoadingIndicator?: ComponentContextValue<StreamChatGenerics>['LoadingIndicator'];
|
|
55
|
-
/** 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) */
|
|
56
|
-
Message?: ComponentContextValue<StreamChatGenerics>['Message'];
|
|
57
|
-
/** Custom UI component to display the contents of a bounced message modal. Usually it allows to retry, edit, or delete the message. Defaults to and accepts the same props as: [MessageBouncePrompt](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageBounce/MessageBouncePrompt.tsx) */
|
|
58
|
-
MessageBouncePrompt?: ComponentContextValue<StreamChatGenerics>['MessageBouncePrompt'];
|
|
59
|
-
/** 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) */
|
|
60
|
-
MessageDeleted?: ComponentContextValue<StreamChatGenerics>['MessageDeleted'];
|
|
61
|
-
/** 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/MessageListNotifications.tsx) */
|
|
62
|
-
MessageListNotifications?: ComponentContextValue<StreamChatGenerics>['MessageListNotifications'];
|
|
63
|
-
/** 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) */
|
|
64
|
-
MessageNotification?: ComponentContextValue<StreamChatGenerics>['MessageNotification'];
|
|
65
|
-
/** 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) */
|
|
66
|
-
MessageOptions?: ComponentContextValue<StreamChatGenerics>['MessageOptions'];
|
|
67
|
-
/** 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) */
|
|
68
|
-
MessageRepliesCountButton?: ComponentContextValue<StreamChatGenerics>['MessageRepliesCountButton'];
|
|
69
|
-
/** 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) */
|
|
70
|
-
MessageStatus?: ComponentContextValue<StreamChatGenerics>['MessageStatus'];
|
|
71
|
-
/** 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) */
|
|
72
|
-
MessageSystem?: ComponentContextValue<StreamChatGenerics>['MessageSystem'];
|
|
73
|
-
/** 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) */
|
|
74
|
-
MessageTimestamp?: ComponentContextValue<StreamChatGenerics>['MessageTimestamp'];
|
|
75
|
-
/** Custom UI component for viewing message's image attachments, defaults to and accepts the same props as [ModalGallery](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/ModalGallery.tsx) */
|
|
76
|
-
ModalGallery?: ComponentContextValue<StreamChatGenerics>['ModalGallery'];
|
|
77
|
-
/** 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) */
|
|
78
|
-
PinIndicator?: ComponentContextValue<StreamChatGenerics>['PinIndicator'];
|
|
79
|
-
/** 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) */
|
|
80
|
-
QuotedMessage?: ComponentContextValue<StreamChatGenerics>['QuotedMessage'];
|
|
81
|
-
/** 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) */
|
|
82
|
-
QuotedMessagePreview?: ComponentContextValue<StreamChatGenerics>['QuotedMessagePreview'];
|
|
83
|
-
/** Custom reaction options to be applied to ReactionSelector, ReactionList and SimpleReactionList components */
|
|
84
|
-
reactionOptions?: ReactionOptions;
|
|
85
|
-
/** 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) */
|
|
86
|
-
ReactionSelector?: ComponentContextValue<StreamChatGenerics>['ReactionSelector'];
|
|
87
|
-
/** 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) */
|
|
88
|
-
ReactionsList?: ComponentContextValue<StreamChatGenerics>['ReactionsList'];
|
|
89
|
-
/** 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) */
|
|
90
|
-
SendButton?: ComponentContextValue<StreamChatGenerics>['SendButton'];
|
|
91
|
-
/** Custom UI component button for initiating audio recording, defaults to and accepts same props as: [StartRecordingAudioButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.tsx) */
|
|
92
|
-
StartRecordingAudioButton?: ComponentContextValue<StreamChatGenerics>['StartRecordingAudioButton'];
|
|
93
|
-
/** Custom UI component that displays thread's parent or other message at the top of the `MessageList`, defaults to and accepts same props as [MessageSimple](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageSimple.tsx) */
|
|
94
|
-
ThreadHead?: React.ComponentType<MessageProps<StreamChatGenerics>>;
|
|
95
|
-
/** 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) */
|
|
96
|
-
ThreadHeader?: ComponentContextValue<StreamChatGenerics>['ThreadHeader'];
|
|
97
|
-
/** 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) */
|
|
98
|
-
ThreadStart?: ComponentContextValue<StreamChatGenerics>['ThreadStart'];
|
|
99
|
-
/** Custom UI component to display a date used in timestamps. It's used internally by the default `MessageTimestamp`, and to display a timestamp for edited messages. */
|
|
100
|
-
Timestamp?: ComponentContextValue<StreamChatGenerics>['Timestamp'];
|
|
101
|
-
/** 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) */
|
|
102
|
-
TriggerProvider?: ComponentContextValue<StreamChatGenerics>['TriggerProvider'];
|
|
103
|
-
/** 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) */
|
|
104
|
-
TypingIndicator?: ComponentContextValue<StreamChatGenerics>['TypingIndicator'];
|
|
105
|
-
/** Custom UI component that indicates a user is viewing unread messages. It disappears once the user scrolls to UnreadMessagesSeparator. Defaults to and accepts same props as: [UnreadMessagesNotification](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/UnreadMessagesNotification.tsx) */
|
|
106
|
-
UnreadMessagesNotification?: React.ComponentType<UnreadMessagesNotificationProps>;
|
|
107
|
-
/** Custom UI component that separates read messages from unread, defaults to and accepts same props as: [UnreadMessagesSeparator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/UnreadMessagesSeparator.tsx) */
|
|
108
|
-
UnreadMessagesSeparator?: ComponentContextValue<StreamChatGenerics>['UnreadMessagesSeparator'];
|
|
109
|
-
/** Custom UI component to display a message in the `VirtualizedMessageList`, does not have a default implementation */
|
|
110
|
-
VirtualMessage?: ComponentContextValue<StreamChatGenerics>['VirtualMessage'];
|
|
111
|
-
};
|
|
9
|
+
type ChannelPropsForwardedToComponentContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ComponentContextValue<StreamChatGenerics>, 'Attachment' | 'AttachmentPreviewList' | 'AudioRecorder' | 'AutocompleteSuggestionItem' | 'AutocompleteSuggestionList' | 'Avatar' | 'BaseImage' | 'CooldownTimer' | 'CustomMessageActionsList' | 'DateSeparator' | 'EditMessageInput' | 'EmojiPicker' | 'emojiSearchIndex' | 'EmptyStateIndicator' | 'FileUploadIcon' | 'GiphyPreviewMessage' | 'HeaderComponent' | 'Input' | 'LinkPreviewList' | 'LoadingIndicator' | 'Message' | 'MessageBouncePrompt' | 'MessageDeleted' | 'MessageListNotifications' | 'MessageListMainPanel' | 'MessageNotification' | 'MessageOptions' | 'MessageRepliesCountButton' | 'MessageStatus' | 'MessageSystem' | 'MessageTimestamp' | 'ModalGallery' | 'PinIndicator' | 'QuotedMessage' | 'QuotedMessagePreview' | 'reactionOptions' | 'ReactionSelector' | 'ReactionsList' | 'SendButton' | 'StartRecordingAudioButton' | 'ThreadHead' | 'ThreadHeader' | 'ThreadStart' | 'Timestamp' | 'TriggerProvider' | 'TypingIndicator' | 'UnreadMessagesNotification' | 'UnreadMessagesSeparator' | 'VirtualMessage'>;
|
|
112
10
|
export type ChannelProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger> = ChannelPropsForwardedToComponentContext<StreamChatGenerics> & {
|
|
113
11
|
/** List of accepted file types */
|
|
114
12
|
acceptedFiles?: string[];
|
|
@@ -153,6 +51,8 @@ export type ChannelProps<StreamChatGenerics extends DefaultStreamChatGenerics =
|
|
|
153
51
|
* Preventing to initialize the channel on mount allows us to postpone the channel creation to a later point in time.
|
|
154
52
|
*/
|
|
155
53
|
initializeOnMount?: boolean;
|
|
54
|
+
/** 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) */
|
|
55
|
+
LoadingErrorIndicator?: React.ComponentType<LoadingErrorIndicatorProps>;
|
|
156
56
|
/** Configuration parameter to mark the active channel as read when mounted (opened). By default, the channel is marked read on mount. */
|
|
157
57
|
markReadOnMount?: boolean;
|
|
158
58
|
/** Maximum number of attachments allowed per message */
|
|
@@ -16,7 +16,7 @@ import { InfiniteScroll } from '../InfiniteScrollPaginator/InfiniteScroll';
|
|
|
16
16
|
import { LoadingIndicator as DefaultLoadingIndicator } from '../Loading';
|
|
17
17
|
import { defaultPinPermissions, MESSAGE_ACTIONS } from '../Message/utils';
|
|
18
18
|
import { TypingIndicator as DefaultTypingIndicator } from '../TypingIndicator';
|
|
19
|
-
import { MessageListMainPanel } from './MessageListMainPanel';
|
|
19
|
+
import { MessageListMainPanel as DefaultMessageListMainPanel } from './MessageListMainPanel';
|
|
20
20
|
import { defaultRenderMessages } from './renderMessages';
|
|
21
21
|
import { DEFAULT_LOAD_PAGE_SCROLL_THRESHOLD, DEFAULT_NEXT_CHANNEL_PAGE_SIZE, } from '../../constants/limits';
|
|
22
22
|
const MessageListWithContext = (props) => {
|
|
@@ -25,7 +25,7 @@ const MessageListWithContext = (props) => {
|
|
|
25
25
|
const [listElement, setListElement] = React.useState(null);
|
|
26
26
|
const [ulElement, setUlElement] = React.useState(null);
|
|
27
27
|
const { customClasses } = useChatContext('MessageList');
|
|
28
|
-
const { EmptyStateIndicator = DefaultEmptyStateIndicator, LoadingIndicator = DefaultLoadingIndicator, MessageListNotifications = DefaultMessageListNotifications, MessageNotification = DefaultMessageNotification, TypingIndicator = DefaultTypingIndicator, UnreadMessagesNotification = DefaultUnreadMessagesNotification, } = useComponentContext('MessageList');
|
|
28
|
+
const { EmptyStateIndicator = DefaultEmptyStateIndicator, LoadingIndicator = DefaultLoadingIndicator, MessageListNotifications = DefaultMessageListNotifications, MessageNotification = DefaultMessageNotification, TypingIndicator = DefaultTypingIndicator, UnreadMessagesNotification = DefaultUnreadMessagesNotification, MessageListMainPanel = DefaultMessageListMainPanel, } = useComponentContext('MessageList');
|
|
29
29
|
const { hasNewMessages, isMessageListScrolledToBottom, onScroll, scrollToBottom, wrapperRect, } = useScrollLocationLogic({
|
|
30
30
|
hasMoreNewer,
|
|
31
31
|
listElement,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PropsWithChildrenOnly } from '../../types/types';
|
|
3
|
-
export declare const MESSAGE_LIST_MAIN_PANEL_CLASS: "str-chat__main-panel-inner";
|
|
3
|
+
export declare const MESSAGE_LIST_MAIN_PANEL_CLASS: "str-chat__main-panel-inner str-chat__message-list-main-panel";
|
|
4
4
|
export declare const MessageListMainPanel: ({ children }: PropsWithChildrenOnly) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export const MESSAGE_LIST_MAIN_PANEL_CLASS = 'str-chat__main-panel-inner';
|
|
2
|
+
export const MESSAGE_LIST_MAIN_PANEL_CLASS = 'str-chat__main-panel-inner str-chat__message-list-main-panel';
|
|
3
3
|
export const MessageListMainPanel = ({ children }) => (React.createElement("div", { className: MESSAGE_LIST_MAIN_PANEL_CLASS }, children));
|
|
@@ -6,7 +6,7 @@ import { useGiphyPreview, useMessageSetKey, useNewMessageNotification, usePrepen
|
|
|
6
6
|
import { useMarkRead } from './hooks/useMarkRead';
|
|
7
7
|
import { MessageNotification as DefaultMessageNotification } from './MessageNotification';
|
|
8
8
|
import { MessageListNotifications as DefaultMessageListNotifications } from './MessageListNotifications';
|
|
9
|
-
import { MessageListMainPanel } from './MessageListMainPanel';
|
|
9
|
+
import { MessageListMainPanel as DefaultMessageListMainPanel } from './MessageListMainPanel';
|
|
10
10
|
import { getGroupStyles, getLastReceived, processMessages, } from './utils';
|
|
11
11
|
import { MessageSimple } from '../Message';
|
|
12
12
|
import { UnreadMessagesNotification as DefaultUnreadMessagesNotification } from './UnreadMessagesNotification';
|
|
@@ -57,7 +57,7 @@ const VirtualizedMessageListWithContext = (props) => {
|
|
|
57
57
|
// Stops errors generated from react-virtuoso to bubble up
|
|
58
58
|
// to Sentry or other tracking tools.
|
|
59
59
|
useCaptureResizeObserverExceededError();
|
|
60
|
-
const { DateSeparator = DefaultDateSeparator, GiphyPreviewMessage = DefaultGiphyPreviewMessage, MessageListNotifications = DefaultMessageListNotifications, MessageNotification = DefaultMessageNotification, MessageSystem = DefaultMessageSystem, UnreadMessagesNotification = DefaultUnreadMessagesNotification, UnreadMessagesSeparator = DefaultUnreadMessagesSeparator, VirtualMessage: MessageUIComponentFromContext = MessageSimple, TypingIndicator, } = useComponentContext('VirtualizedMessageList');
|
|
60
|
+
const { DateSeparator = DefaultDateSeparator, GiphyPreviewMessage = DefaultGiphyPreviewMessage, MessageListNotifications = DefaultMessageListNotifications, MessageNotification = DefaultMessageNotification, MessageSystem = DefaultMessageSystem, MessageListMainPanel = DefaultMessageListMainPanel, UnreadMessagesNotification = DefaultUnreadMessagesNotification, UnreadMessagesSeparator = DefaultUnreadMessagesSeparator, VirtualMessage: MessageUIComponentFromContext = MessageSimple, TypingIndicator, } = useComponentContext('VirtualizedMessageList');
|
|
61
61
|
const MessageUIComponent = MessageUIComponentFromProps || MessageUIComponentFromContext;
|
|
62
62
|
const { client, customClasses } = useChatContext('VirtualizedMessageList');
|
|
63
63
|
const virtuoso = useRef(null);
|
|
@@ -21,10 +21,10 @@ export const useUnreadMessagesNotification = ({ isMessageListScrolledToBottom, s
|
|
|
21
21
|
setShow(false);
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
|
-
const msgListPanel = document.
|
|
24
|
+
const [msgListPanel] = document.getElementsByClassName(MESSAGE_LIST_MAIN_PANEL_CLASS);
|
|
25
25
|
if (!msgListPanel)
|
|
26
26
|
return;
|
|
27
|
-
const observedTarget = document.
|
|
27
|
+
const [observedTarget] = document.getElementsByClassName(UNREAD_MESSAGE_SEPARATOR_CLASS);
|
|
28
28
|
if (!observedTarget) {
|
|
29
29
|
setShow(true);
|
|
30
30
|
return;
|
|
@@ -3,49 +3,91 @@ import { BaseImageProps, CooldownTimerProps, CustomMessageActionsListProps, Star
|
|
|
3
3
|
import type { AttachmentPreviewListProps, AttachmentProps, AvatarProps, DateSeparatorProps, EmojiSearchIndex, EmptyStateIndicatorProps, EventComponentProps, FixedHeightMessageProps, GiphyPreviewMessageProps, LinkPreviewListProps, LoadingIndicatorProps, MessageDeletedProps, MessageInputProps, MessageListNotificationsProps, MessageNotificationProps, MessageOptionsProps, MessageProps, MessageRepliesCountButtonProps, MessageStatusProps, MessageTimestampProps, MessageUIComponentProps, ModalGalleryProps, PinIndicatorProps, QuotedMessagePreviewProps, ReactionOptions, ReactionSelectorProps, ReactionsListProps, RecordingPermissionDeniedNotificationProps, SendButtonProps, SuggestionItemProps, SuggestionListProps, ThreadHeaderProps, ThreadListItemProps, ThreadListItemUIProps, TypingIndicatorProps, UnreadMessagesNotificationProps, UnreadMessagesSeparatorProps } from '../components';
|
|
4
4
|
import type { MessageBouncePromptProps } from '../components/MessageBounce';
|
|
5
5
|
import type { TimestampProps } from '../components/Message/Timestamp';
|
|
6
|
-
import type { CustomTrigger, DefaultStreamChatGenerics, UnknownType } from '../types/types';
|
|
6
|
+
import type { CustomTrigger, DefaultStreamChatGenerics, PropsWithChildrenOnly, UnknownType } from '../types/types';
|
|
7
7
|
export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger> = {
|
|
8
|
+
/** 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) */
|
|
8
9
|
Attachment?: React.ComponentType<AttachmentProps<StreamChatGenerics>>;
|
|
10
|
+
/** Custom UI component to display an attachment previews in MessageInput, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AttachmentPreviewList.tsx) */
|
|
9
11
|
AttachmentPreviewList?: React.ComponentType<AttachmentPreviewListProps>;
|
|
12
|
+
/** Custom UI component to display AudioRecorder in MessageInput, defaults to and accepts same props as: [AudioRecorder](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AudioRecorder.tsx) */
|
|
10
13
|
AudioRecorder?: React.ComponentType;
|
|
14
|
+
/** 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) */
|
|
11
15
|
AutocompleteSuggestionItem?: React.ComponentType<SuggestionItemProps<StreamChatGenerics>>;
|
|
16
|
+
/** 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) */
|
|
12
17
|
AutocompleteSuggestionList?: React.ComponentType<SuggestionListProps<StreamChatGenerics>>;
|
|
18
|
+
/** 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) */
|
|
13
19
|
Avatar?: React.ComponentType<AvatarProps<StreamChatGenerics>>;
|
|
20
|
+
/** Custom UI component to display <img/> elements resp. a fallback in case of load error, defaults to and accepts same props as: [BaseImage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/BaseImage.tsx) */
|
|
14
21
|
BaseImage?: React.ComponentType<BaseImageProps>;
|
|
22
|
+
/** 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/CooldownTimer.tsx) */
|
|
15
23
|
CooldownTimer?: React.ComponentType<CooldownTimerProps>;
|
|
24
|
+
/** Custom UI component to render set of buttons to be displayed in the MessageActionsBox, defaults to and accepts same props as: [CustomMessageActionsList](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageActions/CustomMessageActionsList.tsx) */
|
|
16
25
|
CustomMessageActionsList?: React.ComponentType<CustomMessageActionsListProps<StreamChatGenerics>>;
|
|
26
|
+
/** 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) */
|
|
17
27
|
DateSeparator?: React.ComponentType<DateSeparatorProps>;
|
|
28
|
+
/** 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) */
|
|
18
29
|
EditMessageInput?: React.ComponentType<MessageInputProps<StreamChatGenerics>>;
|
|
30
|
+
/** Custom UI component for rendering button with emoji picker in MessageInput */
|
|
19
31
|
EmojiPicker?: React.ComponentType;
|
|
32
|
+
/** Mechanism to be used with autocomplete and text replace features of the `MessageInput` component, see [emoji-mart `SearchIndex`](https://github.com/missive/emoji-mart#%EF%B8%8F%EF%B8%8F-headless-search) */
|
|
20
33
|
emojiSearchIndex?: EmojiSearchIndex;
|
|
34
|
+
/** 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) */
|
|
21
35
|
EmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>;
|
|
36
|
+
/** 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) */
|
|
22
37
|
FileUploadIcon?: React.ComponentType;
|
|
38
|
+
/** Custom UI component to render a Giphy preview in the `VirtualizedMessageList` */
|
|
23
39
|
GiphyPreviewMessage?: React.ComponentType<GiphyPreviewMessageProps<StreamChatGenerics>>;
|
|
40
|
+
/** Custom UI component to render at the top of the `MessageList` */
|
|
24
41
|
HeaderComponent?: React.ComponentType;
|
|
42
|
+
/** 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) */
|
|
25
43
|
Input?: React.ComponentType<MessageInputProps<StreamChatGenerics, V>>;
|
|
44
|
+
/** Custom component to render link previews in message input **/
|
|
26
45
|
LinkPreviewList?: React.ComponentType<LinkPreviewListProps>;
|
|
46
|
+
/** 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) */
|
|
27
47
|
LoadingIndicator?: React.ComponentType<LoadingIndicatorProps>;
|
|
48
|
+
/** 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) */
|
|
28
49
|
Message?: React.ComponentType<MessageUIComponentProps<StreamChatGenerics>>;
|
|
50
|
+
/** Custom UI component to display the contents of a bounced message modal. Usually it allows to retry, edit, or delete the message. Defaults to and accepts the same props as: [MessageBouncePrompt](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageBounce/MessageBouncePrompt.tsx) */
|
|
29
51
|
MessageBouncePrompt?: React.ComponentType<MessageBouncePromptProps>;
|
|
52
|
+
/** 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) */
|
|
30
53
|
MessageDeleted?: React.ComponentType<MessageDeletedProps<StreamChatGenerics>>;
|
|
54
|
+
MessageListMainPanel?: React.ComponentType<PropsWithChildrenOnly>;
|
|
55
|
+
/** 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/MessageListNotifications.tsx) */
|
|
31
56
|
MessageListNotifications?: React.ComponentType<MessageListNotificationsProps>;
|
|
57
|
+
/** 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) */
|
|
32
58
|
MessageNotification?: React.ComponentType<MessageNotificationProps>;
|
|
59
|
+
/** 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) */
|
|
33
60
|
MessageOptions?: React.ComponentType<MessageOptionsProps<StreamChatGenerics>>;
|
|
61
|
+
/** 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) */
|
|
34
62
|
MessageRepliesCountButton?: React.ComponentType<MessageRepliesCountButtonProps>;
|
|
63
|
+
/** 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) */
|
|
35
64
|
MessageStatus?: React.ComponentType<MessageStatusProps>;
|
|
65
|
+
/** 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) */
|
|
36
66
|
MessageSystem?: React.ComponentType<EventComponentProps<StreamChatGenerics>>;
|
|
67
|
+
/** 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) */
|
|
37
68
|
MessageTimestamp?: React.ComponentType<MessageTimestampProps<StreamChatGenerics>>;
|
|
69
|
+
/** Custom UI component for viewing message's image attachments, defaults to and accepts the same props as [ModalGallery](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/ModalGallery.tsx) */
|
|
38
70
|
ModalGallery?: React.ComponentType<ModalGalleryProps>;
|
|
71
|
+
/** 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) */
|
|
39
72
|
PinIndicator?: React.ComponentType<PinIndicatorProps<StreamChatGenerics>>;
|
|
73
|
+
/** 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) */
|
|
40
74
|
QuotedMessage?: React.ComponentType;
|
|
75
|
+
/** 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) */
|
|
41
76
|
QuotedMessagePreview?: React.ComponentType<QuotedMessagePreviewProps<StreamChatGenerics>>;
|
|
77
|
+
/** Custom reaction options to be applied to ReactionSelector, ReactionList and SimpleReactionList components */
|
|
42
78
|
reactionOptions?: ReactionOptions;
|
|
79
|
+
/** 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) */
|
|
43
80
|
ReactionSelector?: React.ForwardRefExoticComponent<ReactionSelectorProps<StreamChatGenerics>>;
|
|
81
|
+
/** 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) */
|
|
44
82
|
ReactionsList?: React.ComponentType<ReactionsListProps<StreamChatGenerics>>;
|
|
45
83
|
RecordingPermissionDeniedNotification?: React.ComponentType<RecordingPermissionDeniedNotificationProps>;
|
|
84
|
+
/** 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) */
|
|
46
85
|
SendButton?: React.ComponentType<SendButtonProps<StreamChatGenerics>>;
|
|
86
|
+
/** Custom UI component button for initiating audio recording, defaults to and accepts same props as: [StartRecordingAudioButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.tsx) */
|
|
47
87
|
StartRecordingAudioButton?: React.ComponentType<StartRecordingAudioButtonProps>;
|
|
88
|
+
/** Custom UI component that displays thread's parent or other message at the top of the `MessageList`, defaults to and accepts same props as [MessageSimple](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageSimple.tsx) */
|
|
48
89
|
ThreadHead?: React.ComponentType<MessageProps<StreamChatGenerics>>;
|
|
90
|
+
/** 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) */
|
|
49
91
|
ThreadHeader?: React.ComponentType<ThreadHeaderProps<StreamChatGenerics>>;
|
|
50
92
|
ThreadInput?: React.ComponentType<MessageInputProps<StreamChatGenerics, V>>;
|
|
51
93
|
ThreadListEmptyPlaceholder?: React.ComponentType;
|
|
@@ -53,12 +95,19 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
53
95
|
ThreadListItemUI?: React.ComponentType<ThreadListItemUIProps>;
|
|
54
96
|
ThreadListLoadingIndicator?: React.ComponentType;
|
|
55
97
|
ThreadListUnseenThreadsBanner?: React.ComponentType;
|
|
98
|
+
/** 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) */
|
|
56
99
|
ThreadStart?: React.ComponentType;
|
|
100
|
+
/** Custom UI component to display a date used in timestamps. It's used internally by the default `MessageTimestamp`, and to display a timestamp for edited messages. */
|
|
57
101
|
Timestamp?: React.ComponentType<TimestampProps>;
|
|
102
|
+
/** 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) */
|
|
58
103
|
TriggerProvider?: React.ComponentType;
|
|
104
|
+
/** 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) */
|
|
59
105
|
TypingIndicator?: React.ComponentType<TypingIndicatorProps>;
|
|
106
|
+
/** Custom UI component that indicates a user is viewing unread messages. It disappears once the user scrolls to UnreadMessagesSeparator. Defaults to and accepts same props as: [UnreadMessagesNotification](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/UnreadMessagesNotification.tsx) */
|
|
60
107
|
UnreadMessagesNotification?: React.ComponentType<UnreadMessagesNotificationProps>;
|
|
108
|
+
/** Custom UI component that separates read messages from unread, defaults to and accepts same props as: [UnreadMessagesSeparator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/UnreadMessagesSeparator.tsx) */
|
|
61
109
|
UnreadMessagesSeparator?: React.ComponentType<UnreadMessagesSeparatorProps>;
|
|
110
|
+
/** Custom UI component to display a message in the `VirtualizedMessageList`, does not have a default implementation */
|
|
62
111
|
VirtualMessage?: React.ComponentType<FixedHeightMessageProps<StreamChatGenerics>>;
|
|
63
112
|
};
|
|
64
113
|
export declare const ComponentContext: React.Context<ComponentContextValue<DefaultStreamChatGenerics, CustomTrigger>>;
|
package/dist/index.browser.cjs
CHANGED
|
@@ -43427,7 +43427,7 @@ var import_react162 = require("react");
|
|
|
43427
43427
|
|
|
43428
43428
|
// src/components/MessageList/MessageListMainPanel.tsx
|
|
43429
43429
|
var import_react160 = __toESM(require("react"));
|
|
43430
|
-
var MESSAGE_LIST_MAIN_PANEL_CLASS = "str-chat__main-panel-inner";
|
|
43430
|
+
var MESSAGE_LIST_MAIN_PANEL_CLASS = "str-chat__main-panel-inner str-chat__message-list-main-panel";
|
|
43431
43431
|
var MessageListMainPanel = ({ children }) => /* @__PURE__ */ import_react160.default.createElement("div", { className: MESSAGE_LIST_MAIN_PANEL_CLASS }, children);
|
|
43432
43432
|
|
|
43433
43433
|
// src/components/MessageList/UnreadMessagesSeparator.tsx
|
|
@@ -43465,9 +43465,9 @@ var useUnreadMessagesNotification = ({
|
|
|
43465
43465
|
setShow(false);
|
|
43466
43466
|
return;
|
|
43467
43467
|
}
|
|
43468
|
-
const msgListPanel = document.
|
|
43468
|
+
const [msgListPanel] = document.getElementsByClassName(MESSAGE_LIST_MAIN_PANEL_CLASS);
|
|
43469
43469
|
if (!msgListPanel) return;
|
|
43470
|
-
const observedTarget = document.
|
|
43470
|
+
const [observedTarget] = document.getElementsByClassName(UNREAD_MESSAGE_SEPARATOR_CLASS);
|
|
43471
43471
|
if (!observedTarget) {
|
|
43472
43472
|
setShow(true);
|
|
43473
43473
|
return;
|
|
@@ -44153,7 +44153,8 @@ var MessageListWithContext = (props) => {
|
|
|
44153
44153
|
MessageListNotifications: MessageListNotifications2 = MessageListNotifications,
|
|
44154
44154
|
MessageNotification: MessageNotification2 = MessageNotification,
|
|
44155
44155
|
TypingIndicator: TypingIndicator2 = TypingIndicator,
|
|
44156
|
-
UnreadMessagesNotification: UnreadMessagesNotification2 = UnreadMessagesNotification
|
|
44156
|
+
UnreadMessagesNotification: UnreadMessagesNotification2 = UnreadMessagesNotification,
|
|
44157
|
+
MessageListMainPanel: MessageListMainPanel2 = MessageListMainPanel
|
|
44157
44158
|
} = useComponentContext("MessageList");
|
|
44158
44159
|
const {
|
|
44159
44160
|
hasNewMessages,
|
|
@@ -44257,7 +44258,7 @@ var MessageListWithContext = (props) => {
|
|
|
44257
44258
|
}
|
|
44258
44259
|
}, [highlightedMessageId]);
|
|
44259
44260
|
const showEmptyStateIndicator = elements.length === 0 && !threadList;
|
|
44260
|
-
return /* @__PURE__ */ import_react176.default.createElement(MessageListContextProvider, { value: { listElement, scrollToBottom } }, /* @__PURE__ */ import_react176.default.createElement(
|
|
44261
|
+
return /* @__PURE__ */ import_react176.default.createElement(MessageListContextProvider, { value: { listElement, scrollToBottom } }, /* @__PURE__ */ import_react176.default.createElement(MessageListMainPanel2, null, /* @__PURE__ */ import_react176.default.createElement(DialogManagerProvider, { id: "message-list-dialog-manager" }, !threadList && showUnreadMessagesNotification && /* @__PURE__ */ import_react176.default.createElement(UnreadMessagesNotification2, { unreadCount: channelUnreadUiState?.unread_messages }), /* @__PURE__ */ import_react176.default.createElement(
|
|
44261
44262
|
"div",
|
|
44262
44263
|
{
|
|
44263
44264
|
className: (0, import_clsx38.default)(messageListClass, customClasses?.threadList),
|
|
@@ -44814,6 +44815,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
44814
44815
|
MessageListNotifications: MessageListNotifications2 = MessageListNotifications,
|
|
44815
44816
|
MessageNotification: MessageNotification2 = MessageNotification,
|
|
44816
44817
|
MessageSystem = EventComponent,
|
|
44818
|
+
MessageListMainPanel: MessageListMainPanel2 = MessageListMainPanel,
|
|
44817
44819
|
UnreadMessagesNotification: UnreadMessagesNotification2 = UnreadMessagesNotification,
|
|
44818
44820
|
UnreadMessagesSeparator: UnreadMessagesSeparator2 = UnreadMessagesSeparator,
|
|
44819
44821
|
VirtualMessage: MessageUIComponentFromContext = MessageSimple,
|
|
@@ -44966,7 +44968,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
44966
44968
|
};
|
|
44967
44969
|
}, [highlightedMessageId, processedMessages]);
|
|
44968
44970
|
if (!processedMessages) return null;
|
|
44969
|
-
return /* @__PURE__ */ import_react186.default.createElement(import_react186.default.Fragment, null, /* @__PURE__ */ import_react186.default.createElement(
|
|
44971
|
+
return /* @__PURE__ */ import_react186.default.createElement(import_react186.default.Fragment, null, /* @__PURE__ */ import_react186.default.createElement(MessageListMainPanel2, null, /* @__PURE__ */ import_react186.default.createElement(DialogManagerProvider, { id: "virtualized-message-list-dialog-manager" }, !threadList && showUnreadMessagesNotification && /* @__PURE__ */ import_react186.default.createElement(UnreadMessagesNotification2, { unreadCount: channelUnreadUiState?.unread_messages }), /* @__PURE__ */ import_react186.default.createElement("div", { className: customClasses?.virtualizedMessageList || "str-chat__virtual-list" }, /* @__PURE__ */ import_react186.default.createElement(
|
|
44970
44972
|
import_react_virtuoso3.Virtuoso,
|
|
44971
44973
|
{
|
|
44972
44974
|
atBottomStateChange,
|