@linktr.ee/messaging-react 1.15.2 → 1.16.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 +14 -22
- package/dist/index.js +619 -595
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChannelView.tsx +42 -4
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/types.ts +68 -71
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,12 @@ export declare interface ChannelListProps {
|
|
|
51
51
|
*/
|
|
52
52
|
export declare const ChannelView: default_2.NamedExoticComponent<ChannelViewProps>;
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Props that MessagingShell passes through to ChannelView.
|
|
56
|
+
* ChannelViewProps is the source of truth for these props.
|
|
57
|
+
*/
|
|
58
|
+
declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'CustomChannelEmptyState' | 'onDeleteConversationClick' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled'>;
|
|
59
|
+
|
|
54
60
|
/**
|
|
55
61
|
* ChannelView component props
|
|
56
62
|
*/
|
|
@@ -80,6 +86,13 @@ export declare interface ChannelViewProps {
|
|
|
80
86
|
* Analytics callback fired when "Report" is clicked.
|
|
81
87
|
*/
|
|
82
88
|
onReportParticipantClick?: () => void;
|
|
89
|
+
/**
|
|
90
|
+
* When true and DM agent is active on the channel (not paused),
|
|
91
|
+
* messages will be sent with skip_push and silent flags to suppress
|
|
92
|
+
* notifications to the creator until the agent responds.
|
|
93
|
+
* The library reads chatbot_paused from channel.data internally.
|
|
94
|
+
*/
|
|
95
|
+
dmAgentEnabled?: boolean;
|
|
83
96
|
}
|
|
84
97
|
|
|
85
98
|
export declare interface Faq {
|
|
@@ -170,10 +183,9 @@ export declare const MessagingShell: default_2.FC<MessagingShellProps>;
|
|
|
170
183
|
/**
|
|
171
184
|
* Main MessagingShell component props
|
|
172
185
|
*/
|
|
173
|
-
export declare interface MessagingShellProps {
|
|
186
|
+
export declare interface MessagingShellProps extends ChannelViewPassthroughProps {
|
|
174
187
|
capabilities?: MessagingCapabilities;
|
|
175
188
|
className?: string;
|
|
176
|
-
renderMessageInputActions?: (channel: Channel) => React.ReactNode;
|
|
177
189
|
onChannelSelect?: (channel: Channel) => void;
|
|
178
190
|
onParticipantSelect?: (participant: Participant) => void;
|
|
179
191
|
/**
|
|
@@ -193,11 +205,6 @@ export declare interface MessagingShellProps {
|
|
|
193
205
|
* This reuses the existing ChannelCreator from StreamChatServiceConfig.
|
|
194
206
|
*/
|
|
195
207
|
initialParticipantData?: Participant;
|
|
196
|
-
/**
|
|
197
|
-
* Custom empty state component to render when a channel has no messages.
|
|
198
|
-
* Useful for showing FAQs or other contextual information in empty channels.
|
|
199
|
-
*/
|
|
200
|
-
CustomChannelEmptyState?: React.ComponentType;
|
|
201
208
|
/**
|
|
202
209
|
* Controls whether the channel list is shown. When false, the channel list
|
|
203
210
|
* is immediately hidden. Useful for direct conversation mode where you want
|
|
@@ -213,21 +220,6 @@ export declare interface MessagingShellProps {
|
|
|
213
220
|
* Useful for showing a custom empty state indicator when the channel list is empty.
|
|
214
221
|
*/
|
|
215
222
|
channelListCustomEmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>;
|
|
216
|
-
/**
|
|
217
|
-
* Analytics callback fired when "Delete Conversation" is clicked.
|
|
218
|
-
* Called before the action is performed.
|
|
219
|
-
*/
|
|
220
|
-
onDeleteConversationClick?: () => void;
|
|
221
|
-
/**
|
|
222
|
-
* Analytics callback fired when "Block" or "Unblock" is clicked.
|
|
223
|
-
* Called before the action is performed.
|
|
224
|
-
*/
|
|
225
|
-
onBlockParticipantClick?: () => void;
|
|
226
|
-
/**
|
|
227
|
-
* Analytics callback fired when "Report" is clicked.
|
|
228
|
-
* Called before the action is performed.
|
|
229
|
-
*/
|
|
230
|
-
onReportParticipantClick?: () => void;
|
|
231
223
|
}
|
|
232
224
|
|
|
233
225
|
/**
|