stream-chat-react 12.2.1 → 12.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/MessageList/MessageList.js +4 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +4 -1
- package/dist/index.browser.cjs +4 -2
- package/dist/index.browser.cjs.map +2 -2
- package/dist/index.node.cjs +4 -2
- package/dist/index.node.cjs.map +2 -2
- package/package.json +1 -1
|
@@ -125,9 +125,12 @@ const MessageListWithContext = (props) => {
|
|
|
125
125
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126
126
|
}, [highlightedMessageId]);
|
|
127
127
|
const showEmptyStateIndicator = elements.length === 0 && !threadList;
|
|
128
|
+
const dialogManagerId = threadList
|
|
129
|
+
? 'message-list-dialog-manager-thread'
|
|
130
|
+
: 'message-list-dialog-manager';
|
|
128
131
|
return (React.createElement(MessageListContextProvider, { value: { listElement, scrollToBottom } },
|
|
129
132
|
React.createElement(MessageListMainPanel, null,
|
|
130
|
-
React.createElement(DialogManagerProvider, { id:
|
|
133
|
+
React.createElement(DialogManagerProvider, { id: dialogManagerId },
|
|
131
134
|
!threadList && showUnreadMessagesNotification && (React.createElement(UnreadMessagesNotification, { unreadCount: channelUnreadUiState?.unread_messages })),
|
|
132
135
|
React.createElement("div", { className: clsx(messageListClass, customClasses?.threadList), onScroll: onScroll, ref: setListElement, tabIndex: 0 }, showEmptyStateIndicator ? (React.createElement(EmptyStateIndicator, { listType: threadList ? 'thread' : 'message' })) : (React.createElement(InfiniteScroll, { className: 'str-chat__message-list-scroll', "data-testid": 'reverse-infinite-scroll', hasNextPage: props.hasMoreNewer, hasPreviousPage: props.hasMore, head: props.head, isLoading: props.loadingMore, loader: React.createElement("div", { className: 'str-chat__list__loading', key: 'loading-indicator' }, props.loadingMore && React.createElement(LoadingIndicator, { size: 20 })), loadNextPage: loadMoreNewer, loadPreviousPage: loadMore, threshold: loadMoreScrollThreshold, ...restInternalInfiniteScrollProps },
|
|
133
136
|
React.createElement("ul", { className: 'str-chat__ul', ref: setUlElement }, elements),
|
|
@@ -189,9 +189,12 @@ const VirtualizedMessageListWithContext = (props) => {
|
|
|
189
189
|
}, [highlightedMessageId, processedMessages]);
|
|
190
190
|
if (!processedMessages)
|
|
191
191
|
return null;
|
|
192
|
+
const dialogManagerId = threadList
|
|
193
|
+
? 'virtualized-message-list-dialog-manager-thread'
|
|
194
|
+
: 'virtualized-message-list-dialog-manager';
|
|
192
195
|
return (React.createElement(React.Fragment, null,
|
|
193
196
|
React.createElement(MessageListMainPanel, null,
|
|
194
|
-
React.createElement(DialogManagerProvider, { id:
|
|
197
|
+
React.createElement(DialogManagerProvider, { id: dialogManagerId },
|
|
195
198
|
!threadList && showUnreadMessagesNotification && (React.createElement(UnreadMessagesNotification, { unreadCount: channelUnreadUiState?.unread_messages })),
|
|
196
199
|
React.createElement("div", { className: customClasses?.virtualizedMessageList || 'str-chat__virtual-list' },
|
|
197
200
|
React.createElement(Virtuoso, { atBottomStateChange: atBottomStateChange, atBottomThreshold: 100, atTopStateChange: atTopStateChange, atTopThreshold: 100, className: 'str-chat__message-list-scroll', components: {
|
package/dist/index.browser.cjs
CHANGED
|
@@ -44267,7 +44267,8 @@ var MessageListWithContext = (props) => {
|
|
|
44267
44267
|
}
|
|
44268
44268
|
}, [highlightedMessageId]);
|
|
44269
44269
|
const showEmptyStateIndicator = elements.length === 0 && !threadList;
|
|
44270
|
-
|
|
44270
|
+
const dialogManagerId = threadList ? "message-list-dialog-manager-thread" : "message-list-dialog-manager";
|
|
44271
|
+
return /* @__PURE__ */ import_react176.default.createElement(MessageListContextProvider, { value: { listElement, scrollToBottom } }, /* @__PURE__ */ import_react176.default.createElement(MessageListMainPanel2, null, /* @__PURE__ */ import_react176.default.createElement(DialogManagerProvider, { id: dialogManagerId }, !threadList && showUnreadMessagesNotification && /* @__PURE__ */ import_react176.default.createElement(UnreadMessagesNotification2, { unreadCount: channelUnreadUiState?.unread_messages }), /* @__PURE__ */ import_react176.default.createElement(
|
|
44271
44272
|
"div",
|
|
44272
44273
|
{
|
|
44273
44274
|
className: (0, import_clsx38.default)(messageListClass, customClasses?.threadList),
|
|
@@ -44980,7 +44981,8 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
44980
44981
|
};
|
|
44981
44982
|
}, [highlightedMessageId, processedMessages]);
|
|
44982
44983
|
if (!processedMessages) return null;
|
|
44983
|
-
|
|
44984
|
+
const dialogManagerId = threadList ? "virtualized-message-list-dialog-manager-thread" : "virtualized-message-list-dialog-manager";
|
|
44985
|
+
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: dialogManagerId }, !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(
|
|
44984
44986
|
import_react_virtuoso3.Virtuoso,
|
|
44985
44987
|
{
|
|
44986
44988
|
atBottomStateChange,
|