@linktr.ee/messaging-react 1.8.7 → 1.8.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.
- package/dist/index.d.ts +7 -0
- package/dist/index.js +579 -575
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChannelList/index.tsx +2 -0
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/types.ts +8 -0
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ export const ChannelList: React.FC<ChannelListProps> = ({
|
|
|
15
15
|
selectedChannel,
|
|
16
16
|
filters,
|
|
17
17
|
className,
|
|
18
|
+
customEmptyStateIndicator,
|
|
18
19
|
}) => {
|
|
19
20
|
// Track renders
|
|
20
21
|
const renderCountRef = React.useRef(0)
|
|
@@ -72,6 +73,7 @@ export const ChannelList: React.FC<ChannelListProps> = ({
|
|
|
72
73
|
/>
|
|
73
74
|
)
|
|
74
75
|
}}
|
|
76
|
+
EmptyStateIndicator={customEmptyStateIndicator}
|
|
75
77
|
/>
|
|
76
78
|
)
|
|
77
79
|
})()}
|
|
@@ -26,6 +26,7 @@ export const MessagingShell: React.FC<MessagingShellProps> = ({
|
|
|
26
26
|
CustomChannelEmptyState,
|
|
27
27
|
showChannelList = true,
|
|
28
28
|
filters,
|
|
29
|
+
channelListCustomEmptyStateIndicator,
|
|
29
30
|
}) => {
|
|
30
31
|
const {
|
|
31
32
|
service,
|
|
@@ -429,6 +430,7 @@ export const MessagingShell: React.FC<MessagingShellProps> = ({
|
|
|
429
430
|
onChannelSelect={handleChannelSelect}
|
|
430
431
|
selectedChannel={selectedChannel || undefined}
|
|
431
432
|
filters={channelFilters}
|
|
433
|
+
customEmptyStateIndicator={channelListCustomEmptyStateIndicator}
|
|
432
434
|
/>
|
|
433
435
|
</div>
|
|
434
436
|
|
package/src/types.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
StreamChatServiceConfig,
|
|
4
4
|
} from '@linktr.ee/messaging-core'
|
|
5
5
|
import type { Channel, ChannelFilters } from 'stream-chat'
|
|
6
|
+
import { EmptyStateIndicatorProps } from 'stream-chat-react'
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Generic participant interface for different host environments
|
|
@@ -98,6 +99,12 @@ export interface MessagingShellProps {
|
|
|
98
99
|
* Filters for channel list. Passed through to StreamChat ChannelList.
|
|
99
100
|
*/
|
|
100
101
|
filters?: ChannelFilters
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Custom empty state indicator component to render when the channel list is empty.
|
|
105
|
+
* Useful for showing a custom empty state indicator when the channel list is empty.
|
|
106
|
+
*/
|
|
107
|
+
channelListCustomEmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>
|
|
101
108
|
}
|
|
102
109
|
|
|
103
110
|
/**
|
|
@@ -111,6 +118,7 @@ export interface ChannelListProps {
|
|
|
111
118
|
participantLabel?: string
|
|
112
119
|
className?: string
|
|
113
120
|
filters: ChannelFilters
|
|
121
|
+
customEmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>
|
|
114
122
|
}
|
|
115
123
|
|
|
116
124
|
/**
|