@linktr.ee/messaging-react 1.24.3 → 1.24.4-rc-1773844294
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 +31 -1
- package/dist/index.js +918 -904
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChannelInfoDialog/ChannelInfoDialog.test.tsx +259 -0
- package/src/components/ChannelInfoDialog/index.tsx +316 -0
- package/src/components/ChannelList/CustomChannelPreview.tsx +2 -0
- package/src/components/ChannelList/index.test.tsx +79 -0
- package/src/components/ChannelList/index.tsx +8 -1
- package/src/components/ChannelView.tsx +7 -309
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/types.ts +35 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Channel } from 'stream-chat';
|
|
2
2
|
import { ChannelFilters } from 'stream-chat';
|
|
3
|
+
import { ChannelListProps as ChannelListProps_2 } from 'stream-chat-react';
|
|
3
4
|
import { ChannelSort } from 'stream-chat';
|
|
4
5
|
import { default as default_2 } from 'react';
|
|
5
6
|
import { EmptyStateIndicatorProps } from 'stream-chat-react';
|
|
@@ -53,6 +54,26 @@ export declare interface ChannelListProps {
|
|
|
53
54
|
participantLabel?: string;
|
|
54
55
|
className?: string;
|
|
55
56
|
filters: ChannelFilters;
|
|
57
|
+
/**
|
|
58
|
+
* Controls whether new-message events can promote channels that are not
|
|
59
|
+
* already present in the current list.
|
|
60
|
+
*
|
|
61
|
+
* Defaults to `false` for backward compatibility with existing filtered
|
|
62
|
+
* ChannelList consumers.
|
|
63
|
+
*/
|
|
64
|
+
allowNewMessagesFromUnfilteredChannels?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Advanced override for handling `notification.message_new` events.
|
|
67
|
+
* Use for filtered/product-defined views that need to verify whether a
|
|
68
|
+
* channel belongs in the current list before inserting it.
|
|
69
|
+
*/
|
|
70
|
+
onMessageNew?: ChannelListProps_2['onMessageNew'];
|
|
71
|
+
/**
|
|
72
|
+
* Advanced override for handling `notification.added_to_channel` events.
|
|
73
|
+
* Use for filtered/product-defined views that need to verify whether a
|
|
74
|
+
* channel belongs in the current list before inserting it.
|
|
75
|
+
*/
|
|
76
|
+
onAddedToChannel?: ChannelListProps_2['onAddedToChannel'];
|
|
56
77
|
/**
|
|
57
78
|
* Sort order for the channel list query.
|
|
58
79
|
* Defaults to `{ last_message_at: -1 }` (most recent first).
|
|
@@ -71,7 +92,7 @@ export declare const ChannelView: default_2.NamedExoticComponent<ChannelViewProp
|
|
|
71
92
|
* Props that MessagingShell passes through to ChannelView.
|
|
72
93
|
* ChannelViewProps is the source of truth for these props.
|
|
73
94
|
*/
|
|
74
|
-
declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'renderConversationFooter' | 'CustomChannelEmptyState' | 'onDeleteConversationClick' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled' | 'messageMetadata' | 'onMessageSent' | 'showStarButton' | 'chatbotVotingEnabled' | 'renderChannelBanner' | 'customChannelActions' | 'renderMessage'>;
|
|
95
|
+
declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'renderConversationFooter' | 'CustomChannelEmptyState' | 'onDeleteConversationClick' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled' | 'messageMetadata' | 'onMessageSent' | 'showStarButton' | 'chatbotVotingEnabled' | 'renderChannelBanner' | 'customProfileContent' | 'customChannelActions' | 'renderMessage'>;
|
|
75
96
|
|
|
76
97
|
/**
|
|
77
98
|
* ChannelView component props
|
|
@@ -148,6 +169,15 @@ export declare interface ChannelViewProps {
|
|
|
148
169
|
* Useful for showing summaries, alerts, or contextual information.
|
|
149
170
|
*/
|
|
150
171
|
renderChannelBanner?: () => React.ReactNode;
|
|
172
|
+
/**
|
|
173
|
+
* Custom content rendered below the participant name and contact details
|
|
174
|
+
* in the channel info dialog profile card.
|
|
175
|
+
* Useful for badges (e.g. follower status), metadata, or any extra info.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* customProfileContent={<SubscriptionBadge isFollower={channel.data?.isFollower} />}
|
|
179
|
+
*/
|
|
180
|
+
customProfileContent?: React.ReactNode;
|
|
151
181
|
/**
|
|
152
182
|
* Custom actions rendered at the bottom of the channel info dialog
|
|
153
183
|
* (below Delete Conversation, Block/Unblock, Report).
|