@linktr.ee/messaging-react 1.18.0 → 1.19.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/index.d.ts +7 -0
- package/dist/index.js +872 -868
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChannelList/CustomChannelPreview.stories.tsx +93 -1
- package/src/components/ChannelList/CustomChannelPreview.tsx +18 -4
- package/src/components/ChannelList/index.tsx +3 -1
- package/src/components/ChannelView.tsx +14 -14
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/types.ts +14 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Channel } from 'stream-chat';
|
|
|
2
2
|
import { ChannelFilters } from 'stream-chat';
|
|
3
3
|
import { default as default_2 } from 'react';
|
|
4
4
|
import { EmptyStateIndicatorProps } from 'stream-chat-react';
|
|
5
|
+
import { LocalMessage } from 'stream-chat';
|
|
5
6
|
import { MessagingUser } from '@linktr.ee/messaging-core';
|
|
6
7
|
import { SendMessageAPIResponse } from 'stream-chat';
|
|
7
8
|
import { StreamChat } from 'stream-chat';
|
|
@@ -45,6 +46,7 @@ export declare interface ChannelListProps {
|
|
|
45
46
|
className?: string;
|
|
46
47
|
filters: ChannelFilters;
|
|
47
48
|
customEmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>;
|
|
49
|
+
renderMessagePreview?: (message: LocalMessage | undefined, defaultPreview?: string) => React.ReactNode;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
/**
|
|
@@ -258,6 +260,11 @@ export declare interface MessagingShellProps extends ChannelViewPassthroughProps
|
|
|
258
260
|
* Useful for showing a custom empty state indicator when the channel list is empty.
|
|
259
261
|
*/
|
|
260
262
|
channelListCustomEmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>;
|
|
263
|
+
/**
|
|
264
|
+
* Custom render function for message preview text in channel list.
|
|
265
|
+
* Receives the message and a default preview string.
|
|
266
|
+
*/
|
|
267
|
+
renderMessagePreview?: (message: LocalMessage | undefined, defaultPreview?: string) => React.ReactNode;
|
|
261
268
|
}
|
|
262
269
|
|
|
263
270
|
/**
|