stream-chat-react 11.0.0-rc.7 → 11.0.0-rc.8

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.
@@ -1,5 +1,5 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
- import { Message, MessageResponse, Channel as StreamChannel, StreamChat, UpdatedMessage } from 'stream-chat';
2
+ import { ChannelQueryOptions, Message, MessageResponse, Channel as StreamChannel, StreamChat, UpdatedMessage } from 'stream-chat';
3
3
  import { OnMentionAction } from './hooks/useMentionsHandlers';
4
4
  import { LoadingErrorIndicatorProps } from '../Loading';
5
5
  import { StreamMessage } from '../../context/ChannelStateContext';
@@ -9,11 +9,7 @@ import type { MessageInputProps } from '../MessageInput/MessageInput';
9
9
  import type { CustomTrigger, DefaultStreamChatGenerics, GiphyVersions, ImageAttachmentSizeHandler, SendMessageOptions, UpdateMessageOptions, VideoAttachmentSizeHandler } from '../../types/types';
10
10
  import type { URLEnrichmentConfig } from '../MessageInput/hooks/useLinkPreviews';
11
11
  import { ReactionOptions } from '../../components/Reactions/reactionOptions';
12
- export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger> = {
13
- /** List of accepted file types */
14
- acceptedFiles?: string[];
15
- /** Custom handler function that runs when the active channel has unread messages (i.e., when chat is running on a separate browser tab) */
16
- activeUnreadHandler?: (unread: number, documentTitle: string) => void;
12
+ declare type ChannelPropsForwardedToComponentContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
17
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) */
18
14
  Attachment?: ComponentContextValue<StreamChatGenerics>['Attachment'];
19
15
  /** Custom UI component to display a 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) */
@@ -26,56 +22,24 @@ export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGen
26
22
  AutocompleteSuggestionList?: ComponentContextValue<StreamChatGenerics>['AutocompleteSuggestionList'];
27
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) */
28
24
  Avatar?: ComponentContextValue<StreamChatGenerics>['Avatar'];
29
- /** The connected and active channel */
30
- channel?: StreamChannel<StreamChatGenerics>;
31
25
  /** Custom UI component to display the slow mode cooldown timer, defaults to and accepts same props as: [CooldownTimer](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/hooks/useCooldownTimer.tsx) */
32
26
  CooldownTimer?: ComponentContextValue<StreamChatGenerics>['CooldownTimer'];
33
27
  /** 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) */
34
28
  DateSeparator?: ComponentContextValue<StreamChatGenerics>['DateSeparator'];
35
- /** Custom action handler to override the default `client.deleteMessage(message.id)` function */
36
- doDeleteMessageRequest?: (message: StreamMessage<StreamChatGenerics>) => Promise<MessageResponse<StreamChatGenerics>>;
37
- /** Custom action handler to override the default `channel.markRead` request function (advanced usage only) */
38
- doMarkReadRequest?: (channel: StreamChannel<StreamChatGenerics>) => Promise<MessageResponse<StreamChatGenerics>> | void;
39
- /** Custom action handler to override the default `channel.sendMessage` request function (advanced usage only) */
40
- doSendMessageRequest?: (channelId: string, message: Message<StreamChatGenerics>, options?: SendMessageOptions) => ReturnType<StreamChannel<StreamChatGenerics>['sendMessage']> | void;
41
- /** Custom action handler to override the default `client.updateMessage` request function (advanced usage only) */
42
- doUpdateMessageRequest?: (cid: string, updatedMessage: UpdatedMessage<StreamChatGenerics>, options?: UpdateMessageOptions) => ReturnType<StreamChat<StreamChatGenerics>['updateMessage']>;
43
- /** If true, chat users will be able to drag and drop file uploads to the entire channel window */
44
- dragAndDropWindow?: boolean;
45
29
  /** 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) */
46
30
  EditMessageInput?: ComponentContextValue<StreamChatGenerics>['EditMessageInput'];
47
31
  /** Custom UI component for rendering button with emoji picker in MessageInput */
48
32
  EmojiPicker?: ComponentContextValue<StreamChatGenerics>['EmojiPicker'];
49
33
  /** 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) */
50
34
  emojiSearchIndex?: ComponentContextValue<StreamChatGenerics>['emojiSearchIndex'];
51
- /** Custom UI component to be shown if no active channel is set, defaults to null and skips rendering the Channel component */
52
- EmptyPlaceholder?: React.ReactElement;
53
35
  /** Custom UI component to be displayed when the `MessageList` is empty, defaults to and accepts same props as: [EmptyStateIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/EmptyStateIndicator/EmptyStateIndicator.tsx) */
54
36
  EmptyStateIndicator?: ComponentContextValue<StreamChatGenerics>['EmptyStateIndicator'];
55
- /**
56
- * A global flag to toggle the URL enrichment and link previews in `MessageInput` components.
57
- * By default, the feature is disabled. Can be overridden on Thread, MessageList level through additionalMessageInputProps
58
- * or directly on MessageInput level through urlEnrichmentConfig.
59
- */
60
- enrichURLForPreview?: URLEnrichmentConfig['enrichURLForPreview'];
61
- /** Global configuration for link preview generation in all the MessageInput components */
62
- enrichURLForPreviewConfig?: Omit<URLEnrichmentConfig, 'enrichURLForPreview'>;
63
37
  /** 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) */
64
38
  FileUploadIcon?: ComponentContextValue<StreamChatGenerics>['FileUploadIcon'];
65
39
  /** Custom UI component to render a Giphy preview in the `VirtualizedMessageList` */
66
40
  GiphyPreviewMessage?: ComponentContextValue<StreamChatGenerics>['GiphyPreviewMessage'];
67
- /** The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default */
68
- giphyVersion?: GiphyVersions;
69
41
  /** Custom UI component to render at the top of the `MessageList` */
70
42
  HeaderComponent?: ComponentContextValue<StreamChatGenerics>['HeaderComponent'];
71
- /** A custom function to provide size configuration for image attachments */
72
- imageAttachmentSizeHandler?: ImageAttachmentSizeHandler;
73
- /**
74
- * Allows to prevent triggering the channel.watch() call when mounting the component.
75
- * That means that no channel data from the back-end will be received neither channel WS events will be delivered to the client.
76
- * Preventing to initialize the channel on mount allows us to postpone the channel creation to a later point in time.
77
- */
78
- initializeOnMount?: boolean;
79
43
  /** 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) */
80
44
  Input?: ComponentContextValue<StreamChatGenerics>['Input'];
81
45
  /** Custom component to render link previews in message input **/
@@ -84,8 +48,6 @@ export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGen
84
48
  LoadingErrorIndicator?: React.ComponentType<LoadingErrorIndicatorProps>;
85
49
  /** 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) */
86
50
  LoadingIndicator?: ComponentContextValue<StreamChatGenerics>['LoadingIndicator'];
87
- /** Maximum number of attachments allowed per message */
88
- maxNumberOfFiles?: number;
89
51
  /** 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) */
90
52
  Message?: ComponentContextValue<StreamChatGenerics>['Message'];
91
53
  /** 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) */
@@ -106,14 +68,6 @@ export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGen
106
68
  MessageTimestamp?: ComponentContextValue<StreamChatGenerics>['MessageTimestamp'];
107
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) */
108
70
  ModalGallery?: ComponentContextValue<StreamChatGenerics>['ModalGallery'];
109
- /** Whether to allow multiple attachment uploads */
110
- multipleUploads?: boolean;
111
- /** Custom action handler function to run on click of an @mention in a message */
112
- onMentionsClick?: OnMentionAction<StreamChatGenerics>;
113
- /** Custom action handler function to run on hover of an @mention in a message */
114
- onMentionsHover?: OnMentionAction<StreamChatGenerics>;
115
- /** If `dragAndDropWindow` prop is true, the props to pass to the MessageInput component (overrides props placed directly on MessageInput) */
116
- optionalMessageInputProps?: MessageInputProps<StreamChatGenerics, V>;
117
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) */
118
72
  PinIndicator?: ComponentContextValue<StreamChatGenerics>['PinIndicator'];
119
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) */
@@ -128,10 +82,6 @@ export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGen
128
82
  ReactionsList?: ComponentContextValue<StreamChatGenerics>['ReactionsList'];
129
83
  /** 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) */
130
84
  SendButton?: ComponentContextValue<StreamChatGenerics>['SendButton'];
131
- /** You can turn on/off thumbnail generation for video attachments */
132
- shouldGenerateVideoThumbnail?: boolean;
133
- /** If true, skips the message data string comparison used to memoize the current channel messages (helpful for channels with 1000s of messages) */
134
- skipMessageDataMemoization?: boolean;
135
85
  /** 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) */
136
86
  ThreadHead?: React.ComponentType<MessageProps<StreamChatGenerics>>;
137
87
  /** 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) */
@@ -142,11 +92,70 @@ export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGen
142
92
  TriggerProvider?: ComponentContextValue<StreamChatGenerics>['TriggerProvider'];
143
93
  /** 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) */
144
94
  TypingIndicator?: ComponentContextValue<StreamChatGenerics>['TypingIndicator'];
145
- /** A custom function to provide size configuration for video attachments */
146
- videoAttachmentSizeHandler?: VideoAttachmentSizeHandler;
147
95
  /** Custom UI component to display a message in the `VirtualizedMessageList`, does not have a default implementation */
148
96
  VirtualMessage?: ComponentContextValue<StreamChatGenerics>['VirtualMessage'];
149
97
  };
98
+ export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger> = ChannelPropsForwardedToComponentContext<StreamChatGenerics> & {
99
+ /** List of accepted file types */
100
+ acceptedFiles?: string[];
101
+ /** Custom handler function that runs when the active channel has unread messages (i.e., when chat is running on a separate browser tab) */
102
+ activeUnreadHandler?: (unread: number, documentTitle: string) => void;
103
+ /** The connected and active channel */
104
+ channel?: StreamChannel<StreamChatGenerics>;
105
+ /**
106
+ * Optional configuration parameters used for the initial channel query.
107
+ * Applied only if the value of channel.initialized is false.
108
+ * If the channel instance has already been initialized (channel has been queried),
109
+ * then the channel query will be skipped and channelQueryOptions will not be applied.
110
+ */
111
+ channelQueryOptions?: ChannelQueryOptions<StreamChatGenerics>;
112
+ /** Custom action handler to override the default `client.deleteMessage(message.id)` function */
113
+ doDeleteMessageRequest?: (message: StreamMessage<StreamChatGenerics>) => Promise<MessageResponse<StreamChatGenerics>>;
114
+ /** Custom action handler to override the default `channel.markRead` request function (advanced usage only) */
115
+ doMarkReadRequest?: (channel: StreamChannel<StreamChatGenerics>) => Promise<MessageResponse<StreamChatGenerics>> | void;
116
+ /** Custom action handler to override the default `channel.sendMessage` request function (advanced usage only) */
117
+ doSendMessageRequest?: (channelId: string, message: Message<StreamChatGenerics>, options?: SendMessageOptions) => ReturnType<StreamChannel<StreamChatGenerics>['sendMessage']> | void;
118
+ /** Custom action handler to override the default `client.updateMessage` request function (advanced usage only) */
119
+ doUpdateMessageRequest?: (cid: string, updatedMessage: UpdatedMessage<StreamChatGenerics>, options?: UpdateMessageOptions) => ReturnType<StreamChat<StreamChatGenerics>['updateMessage']>;
120
+ /** If true, chat users will be able to drag and drop file uploads to the entire channel window */
121
+ dragAndDropWindow?: boolean;
122
+ /** Custom UI component to be shown if no active channel is set, defaults to null and skips rendering the Channel component */
123
+ EmptyPlaceholder?: React.ReactElement;
124
+ /**
125
+ * A global flag to toggle the URL enrichment and link previews in `MessageInput` components.
126
+ * By default, the feature is disabled. Can be overridden on Thread, MessageList level through additionalMessageInputProps
127
+ * or directly on MessageInput level through urlEnrichmentConfig.
128
+ */
129
+ enrichURLForPreview?: URLEnrichmentConfig['enrichURLForPreview'];
130
+ /** Global configuration for link preview generation in all the MessageInput components */
131
+ enrichURLForPreviewConfig?: Omit<URLEnrichmentConfig, 'enrichURLForPreview'>;
132
+ /** The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default */
133
+ giphyVersion?: GiphyVersions;
134
+ /** A custom function to provide size configuration for image attachments */
135
+ imageAttachmentSizeHandler?: ImageAttachmentSizeHandler;
136
+ /**
137
+ * Allows to prevent triggering the channel.watch() call when mounting the component.
138
+ * That means that no channel data from the back-end will be received neither channel WS events will be delivered to the client.
139
+ * Preventing to initialize the channel on mount allows us to postpone the channel creation to a later point in time.
140
+ */
141
+ initializeOnMount?: boolean;
142
+ /** Maximum number of attachments allowed per message */
143
+ maxNumberOfFiles?: number;
144
+ /** Whether to allow multiple attachment uploads */
145
+ multipleUploads?: boolean;
146
+ /** Custom action handler function to run on click of an @mention in a message */
147
+ onMentionsClick?: OnMentionAction<StreamChatGenerics>;
148
+ /** Custom action handler function to run on hover of an @mention in a message */
149
+ onMentionsHover?: OnMentionAction<StreamChatGenerics>;
150
+ /** If `dragAndDropWindow` prop is true, the props to pass to the MessageInput component (overrides props placed directly on MessageInput) */
151
+ optionalMessageInputProps?: MessageInputProps<StreamChatGenerics, V>;
152
+ /** You can turn on/off thumbnail generation for video attachments */
153
+ shouldGenerateVideoThumbnail?: boolean;
154
+ /** If true, skips the message data string comparison used to memoize the current channel messages (helpful for channels with 1000s of messages) */
155
+ skipMessageDataMemoization?: boolean;
156
+ /** A custom function to provide size configuration for video attachments */
157
+ videoAttachmentSizeHandler?: VideoAttachmentSizeHandler;
158
+ };
150
159
  /**
151
160
  * A wrapper component that provides channel data and renders children.
152
161
  * The Channel component provides the following contexts:
@@ -156,4 +165,5 @@ export declare type ChannelProps<StreamChatGenerics extends DefaultStreamChatGen
156
165
  * - [TypingContext](https://getstream.io/chat/docs/sdk/react/contexts/typing_context/)
157
166
  */
158
167
  export declare const Channel: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger>(props: React.PropsWithChildren<ChannelProps<StreamChatGenerics, V>>) => JSX.Element;
168
+ export {};
159
169
  //# sourceMappingURL=Channel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Channel.d.ts","sourceRoot":"","sources":["../../../src/components/Channel/Channel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,iBAAiB,EAQlB,MAAM,OAAO,CAAC;AAIf,OAAO,EAML,OAAO,EACP,eAAe,EAEf,OAAO,IAAI,aAAa,EACxB,UA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,OAAO,CAAC;IACvC,mJAAmJ;IACnJ,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,4EAA4E;IAC5E,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;CACzD,CAAC;AA4zBF;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO,iNAA4D,CAAC"}
@@ -23,7 +23,7 @@ import { useChatContext } from '../../context/ChatContext';
23
23
  import { useTranslationContext } from '../../context/TranslationContext';
24
24
  import { TypingProvider } from '../../context/TypingContext';
25
25
  import { DEFAULT_INITIAL_CHANNEL_PAGE_SIZE, DEFAULT_NEXT_CHANNEL_PAGE_SIZE, DEFAULT_THREAD_PAGE_SIZE, } from '../../constants/limits';
26
- import { hasMoreMessagesProbably, hasNotMoreMessages } from '../MessageList/utils';
26
+ import { hasMoreMessagesProbably } from '../MessageList/utils';
27
27
  import { makeAddNotifications } from './utils';
28
28
  import { getChannel } from '../../utils/getChannel';
29
29
  import { useChannelContainerClasses } from './hooks/useChannelContainerClasses';
@@ -48,12 +48,11 @@ var UnMemoizedChannel = function (props) {
48
48
  if (!(channel === null || channel === void 0 ? void 0 : channel.cid)) {
49
49
  return React.createElement("div", { className: className }, EmptyPlaceholder);
50
50
  }
51
- // @ts-ignore
52
51
  return React.createElement(ChannelInner, __assign({}, props, { channel: channel, key: channel.cid }));
53
52
  };
54
53
  var ChannelInner = function (props) {
55
54
  var _a;
56
- var acceptedFiles = props.acceptedFiles, activeUnreadHandler = props.activeUnreadHandler, channel = props.channel, children = props.children, doDeleteMessageRequest = props.doDeleteMessageRequest, doMarkReadRequest = props.doMarkReadRequest, doSendMessageRequest = props.doSendMessageRequest, doUpdateMessageRequest = props.doUpdateMessageRequest, _b = props.dragAndDropWindow, dragAndDropWindow = _b === void 0 ? false : _b, enrichURLForPreviewConfig = props.enrichURLForPreviewConfig, _c = props.initializeOnMount, initializeOnMount = _c === void 0 ? true : _c, _d = props.LoadingErrorIndicator, LoadingErrorIndicator = _d === void 0 ? DefaultLoadingErrorIndicator : _d, _e = props.LoadingIndicator, LoadingIndicator = _e === void 0 ? DefaultLoadingIndicator : _e, maxNumberOfFiles = props.maxNumberOfFiles, _f = props.multipleUploads, multipleUploads = _f === void 0 ? true : _f, onMentionsClick = props.onMentionsClick, onMentionsHover = props.onMentionsHover, _g = props.optionalMessageInputProps, optionalMessageInputProps = _g === void 0 ? {} : _g, skipMessageDataMemoization = props.skipMessageDataMemoization;
55
+ var acceptedFiles = props.acceptedFiles, activeUnreadHandler = props.activeUnreadHandler, channel = props.channel, channelQueryOptions = props.channelQueryOptions, children = props.children, doDeleteMessageRequest = props.doDeleteMessageRequest, doMarkReadRequest = props.doMarkReadRequest, doSendMessageRequest = props.doSendMessageRequest, doUpdateMessageRequest = props.doUpdateMessageRequest, _b = props.dragAndDropWindow, dragAndDropWindow = _b === void 0 ? false : _b, enrichURLForPreviewConfig = props.enrichURLForPreviewConfig, _c = props.initializeOnMount, initializeOnMount = _c === void 0 ? true : _c, _d = props.LoadingErrorIndicator, LoadingErrorIndicator = _d === void 0 ? DefaultLoadingErrorIndicator : _d, _e = props.LoadingIndicator, LoadingIndicator = _e === void 0 ? DefaultLoadingIndicator : _e, maxNumberOfFiles = props.maxNumberOfFiles, _f = props.multipleUploads, multipleUploads = _f === void 0 ? true : _f, onMentionsClick = props.onMentionsClick, onMentionsHover = props.onMentionsHover, _g = props.optionalMessageInputProps, optionalMessageInputProps = _g === void 0 ? {} : _g, skipMessageDataMemoization = props.skipMessageDataMemoization;
57
56
  var _h = useChatContext('Channel'), client = _h.client, customClasses = _h.customClasses, latestMessageDatesByChannels = _h.latestMessageDatesByChannels, mutes = _h.mutes, theme = _h.theme;
58
57
  var t = useTranslationContext('Channel').t;
59
58
  var _j = useChannelContainerClasses({ customClasses: customClasses }), channelClass = _j.channelClass, chatClass = _j.chatClass, chatContainerClass = _j.chatContainerClass, windowsEmojiClass = _j.windowsEmojiClass;
@@ -146,6 +145,7 @@ var ChannelInner = function (props) {
146
145
  /**
147
146
  * As the channel state is not normalized we re-fetch the channel data. Thus, we avoid having to search for user references in the channel state.
148
147
  */
148
+ // FIXME: we should use channelQueryOptions if they are available
149
149
  return [4 /*yield*/, channel.query({
150
150
  messages: { id_lt: oldestID, limit: DEFAULT_NEXT_CHANNEL_PAGE_SIZE },
151
151
  watchers: { limit: DEFAULT_NEXT_CHANNEL_PAGE_SIZE },
@@ -154,6 +154,7 @@ var ChannelInner = function (props) {
154
154
  /**
155
155
  * As the channel state is not normalized we re-fetch the channel data. Thus, we avoid having to search for user references in the channel state.
156
156
  */
157
+ // FIXME: we should use channelQueryOptions if they are available
157
158
  _m.sent();
158
159
  _m.label = 2;
159
160
  case 2:
@@ -172,14 +173,14 @@ var ChannelInner = function (props) {
172
173
  };
173
174
  (function () { return __awaiter(void 0, void 0, void 0, function () {
174
175
  var members, _i, _a, member, userId, _b, user, user_id, config, e_1;
175
- var _c;
176
- return __generator(this, function (_d) {
177
- switch (_d.label) {
176
+ var _c, _d, _e;
177
+ return __generator(this, function (_f) {
178
+ switch (_f.label) {
178
179
  case 0:
179
180
  if (!(!channel.initialized && initializeOnMount)) return [3 /*break*/, 4];
180
- _d.label = 1;
181
+ _f.label = 1;
181
182
  case 1:
182
- _d.trys.push([1, 3, , 4]);
183
+ _f.trys.push([1, 3, , 4]);
183
184
  members = [];
184
185
  if (!channel.id && ((_c = channel.data) === null || _c === void 0 ? void 0 : _c.members)) {
185
186
  for (_i = 0, _a = channel.data.members; _i < _a.length; _i++) {
@@ -197,14 +198,14 @@ var ChannelInner = function (props) {
197
198
  }
198
199
  }
199
200
  }
200
- return [4 /*yield*/, getChannel({ channel: channel, client: client, members: members })];
201
+ return [4 /*yield*/, getChannel({ channel: channel, client: client, members: members, options: channelQueryOptions })];
201
202
  case 2:
202
- _d.sent();
203
+ _f.sent();
203
204
  config = channel.getConfig();
204
205
  setChannelConfig(config);
205
206
  return [3 /*break*/, 4];
206
207
  case 3:
207
- e_1 = _d.sent();
208
+ e_1 = _f.sent();
208
209
  dispatch({ error: e_1, type: 'setError' });
209
210
  errored = true;
210
211
  return [3 /*break*/, 4];
@@ -212,7 +213,11 @@ var ChannelInner = function (props) {
212
213
  done = true;
213
214
  originalTitle.current = document.title;
214
215
  if (!errored) {
215
- dispatch({ channel: channel, type: 'initStateFromChannel' });
216
+ dispatch({
217
+ channel: channel,
218
+ hasMore: hasMoreMessagesProbably(channel.state.messages.length, (_e = (_d = channelQueryOptions === null || channelQueryOptions === void 0 ? void 0 : channelQueryOptions.messages) === null || _d === void 0 ? void 0 : _d.limit) !== null && _e !== void 0 ? _e : DEFAULT_INITIAL_CHANNEL_PAGE_SIZE),
219
+ type: 'initStateFromChannel',
220
+ });
216
221
  if (channel.countUnread() > 0)
217
222
  markRead();
218
223
  // The more complex sync logic is done in Chat
@@ -238,7 +243,13 @@ var ChannelInner = function (props) {
238
243
  client.off('user.deleted', handleEvent);
239
244
  notificationTimeouts.forEach(clearTimeout);
240
245
  };
241
- }, [channel.cid, doMarkReadRequest, channelConfig === null || channelConfig === void 0 ? void 0 : channelConfig.read_events, initializeOnMount]);
246
+ }, [
247
+ channel.cid,
248
+ channelQueryOptions,
249
+ doMarkReadRequest,
250
+ channelConfig === null || channelConfig === void 0 ? void 0 : channelConfig.read_events,
251
+ initializeOnMount,
252
+ ]);
242
253
  useEffect(function () {
243
254
  var _a;
244
255
  if (!state.thread)
@@ -261,22 +272,17 @@ var ChannelInner = function (props) {
261
272
  var loadMore = function (limit) {
262
273
  if (limit === void 0) { limit = DEFAULT_NEXT_CHANNEL_PAGE_SIZE; }
263
274
  return __awaiter(void 0, void 0, void 0, function () {
264
- var oldestMessage, notHasMore, oldestID, perPage, queryResponse, e_2, hasMoreMessages;
275
+ var oldestMessage, oldestID, perPage, queryResponse, e_2, hasMoreMessages;
265
276
  var _a;
266
277
  return __generator(this, function (_b) {
267
278
  switch (_b.label) {
268
279
  case 0:
269
- if (!online.current || !window.navigator.onLine)
280
+ if (!online.current || !window.navigator.onLine || !state.hasMore)
270
281
  return [2 /*return*/, 0];
271
282
  oldestMessage = (_a = state === null || state === void 0 ? void 0 : state.messages) === null || _a === void 0 ? void 0 : _a[0];
272
283
  if (state.loadingMore || state.loadingMoreNewer || (oldestMessage === null || oldestMessage === void 0 ? void 0 : oldestMessage.status) !== 'received') {
273
284
  return [2 /*return*/, 0];
274
285
  }
275
- notHasMore = hasNotMoreMessages(channel.state.messages.length, DEFAULT_INITIAL_CHANNEL_PAGE_SIZE);
276
- if (notHasMore) {
277
- loadMoreFinished(false, channel.state.messages);
278
- return [2 /*return*/, channel.state.messages.length];
279
- }
280
286
  dispatch({ loadingMore: true, type: 'setLoadingMore' });
281
287
  oldestID = oldestMessage === null || oldestMessage === void 0 ? void 0 : oldestMessage.id;
282
288
  perPage = limit;
@@ -556,6 +562,7 @@ var ChannelInner = function (props) {
556
562
  return __generator(this, function (_b) {
557
563
  switch (_b.label) {
558
564
  case 0:
565
+ // FIXME: should prevent loading more, if state.thread.reply_count === channel.state.threads[parentID].length
559
566
  if (state.threadLoadingMore || !state.thread)
560
567
  return [2 /*return*/];
561
568
  dispatch({ type: 'startLoadingThread' });
@@ -19,6 +19,7 @@ export declare type ChannelStateReducerAction<StreamChatGenerics extends Default
19
19
  type: 'jumpToMessageFinished';
20
20
  } | {
21
21
  channel: Channel<StreamChatGenerics>;
22
+ hasMore: boolean;
22
23
  type: 'initStateFromChannel';
23
24
  } | {
24
25
  hasMore: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"channelState.d.ts","sourceRoot":"","sources":["../../../src/components/Channel/channelState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEhG,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAErF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,m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,UAAU,CAAC;CAClB,GACD;IACE,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,gBAAgB,CAAC;CACxB,GACD;IACE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,qBAAqB,CAAC;CAC7B,GACD;IACE,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC3C,IAAI,EAAE,WAAW,CAAC;CACnB,GACD;IACE,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,IAAI,EAAE,WAAW,CAAC;CACnB,GACD;IACE,IAAI,EAAE,oBAAoB,CAAC;CAC5B,GACD;IACE,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,OAAO,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;IAC7C,IAAI,EAAE,qBAAqB,CAAC;CAC7B,GACD;IACE,IAAI,EAAE,qBAAqB,CAAC;CAC7B,CAAC;AAEN,oBAAY,mBAAmB,CAC7B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,EAAE,yBAAyB,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAE7F,eAAO,MAAM,cAAc,wNA+K1B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;CAmBxB,CAAC"}
@@ -18,8 +18,8 @@ export var channelReducer = function (state, action) {
18
18
  return __assign(__assign({}, state), { members: __assign({}, channel.state.members), messages: __spreadArray([], channel.state.messages, true), pinnedMessages: __spreadArray([], channel.state.pinnedMessages, true), read: __assign({}, channel.state.read), watcherCount: channel.state.watcher_count, watchers: __assign({}, channel.state.watchers) });
19
19
  }
20
20
  case 'initStateFromChannel': {
21
- var channel = action.channel;
22
- return __assign(__assign({}, state), { loading: false, members: __assign({}, channel.state.members), messages: __spreadArray([], channel.state.messages, true), pinnedMessages: __spreadArray([], channel.state.pinnedMessages, true), read: __assign({}, channel.state.read), watcherCount: channel.state.watcher_count, watchers: __assign({}, channel.state.watchers) });
21
+ var channel = action.channel, hasMore = action.hasMore;
22
+ return __assign(__assign({}, state), { hasMore: hasMore, loading: false, members: __assign({}, channel.state.members), messages: __spreadArray([], channel.state.messages, true), pinnedMessages: __spreadArray([], channel.state.pinnedMessages, true), read: __assign({}, channel.state.read), watcherCount: channel.state.watcher_count, watchers: __assign({}, channel.state.watchers) });
23
23
  }
24
24
  case 'jumpToLatestMessage': {
25
25
  return __assign(__assign({}, state), { hasMoreNewer: false, highlightedMessageId: undefined, loading: false, suppressAutoscroll: false });
@@ -31,6 +31,7 @@ export var InfiniteScroll = function (props) {
31
31
  }
32
32
  if (isLoading)
33
33
  return;
34
+ // FIXME: this triggers loadMore call when a user types messages in thread and the scroll container container expands
34
35
  if (reverseOffset < Number(threshold) &&
35
36
  typeof loadPreviousPageFn === 'function' &&
36
37
  hasPreviousPageFlag) {
@@ -1 +1 @@
1
- {"version":3,"file":"CustomNotification.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList/CustomNotification.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGjD,oBAAY,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAsBF,eAAO,MAAM,kBAAkB,UApBc,kBAAkB,uBAAuB,CAAC,uBAsB/C,CAAC"}
1
+ {"version":3,"file":"CustomNotification.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList/CustomNotification.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGjD,oBAAY,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAuBF,eAAO,MAAM,kBAAkB,UArBc,kBAAkB,uBAAuB,CAAC,uBAuB/C,CAAC"}
@@ -4,6 +4,6 @@ var UnMemoizedCustomNotification = function (props) {
4
4
  var active = props.active, children = props.children, className = props.className, type = props.type;
5
5
  if (!active)
6
6
  return null;
7
- return (React.createElement("div", { "aria-live": 'polite', className: clsx("str-chat__custom-notification notification-".concat(type), "str-chat__notification", className), "data-testid": 'custom-notification' }, children));
7
+ return (React.createElement("div", { "aria-live": 'polite', className: clsx("str-chat__custom-notification notification-".concat(type), "str-chat__notification", "str-chat-react__notification", className), "data-testid": 'custom-notification' }, children));
8
8
  };
9
9
  export var CustomNotification = React.memo(UnMemoizedCustomNotification);
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList/utils.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEvE,aAAK,qBAAqB,CACxB,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,QAAQ,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAAE,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kEAAkE;IAClE,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,+FAA+F;IAC/F,sBAAsB,CAAC,EAAE,KAAK,CAAC,QAAQ,CACrC,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC,CACpE,CAAC;CACH,CAAC;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B,CAAC,EAAE,KAAK,CAAC,QAAQ,CACrC,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC,CACpE,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,8KAuF3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,MAAM,GAAG,IAAI,WAQrD,CAAC;AAGF,eAAO,MAAM,eAAe,oJAY3B,CAAC;AAEF,eAAO,MAAM,aAAa;eAIU,IAAI;;mCACnB,OAAO,uDAqC3B,CAAC;AAEF,eAAO,MAAM,WAAW,qJAIL,MAAM,wCAgDxB,CAAC;AAEF,oBAAY,UAAU,GAAG,EAAE,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErE,eAAO,MAAM,cAAc,oPAMV,OAAO,KACrB,UAyCF,CAAC;AAOF,eAAO,MAAM,uBAAuB,0BAA2B,MAAM,SAAS,MAAM,YACnD,CAAC;AAGlC,eAAO,MAAM,kBAAkB,0BAA2B,MAAM,SAAS,MAAM,YAChD,CAAC"}
@@ -219,6 +219,7 @@ export var getGroupStyles = function (message, previousMessage, nextMessage, noG
219
219
  export var hasMoreMessagesProbably = function (returnedCountMessages, limit) {
220
220
  return returnedCountMessages === limit;
221
221
  };
222
+ // @deprecated
222
223
  export var hasNotMoreMessages = function (returnedCountMessages, limit) {
223
224
  return returnedCountMessages < limit;
224
225
  };
@@ -31,6 +31,7 @@ var ThreadInner = function (props) {
31
31
  var ThreadMessageList = virtualized ? VirtualizedMessageList : MessageList;
32
32
  useEffect(function () {
33
33
  if ((thread === null || thread === void 0 ? void 0 : thread.id) && (thread === null || thread === void 0 ? void 0 : thread.reply_count)) {
34
+ // FIXME: integrators can customize channel query options but cannot customize channel.getReplies() options
34
35
  loadMoreThread();
35
36
  }
36
37
  }, []);