@linktr.ee/messaging-react 1.4.1 → 1.5.1-rc-1761642868
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 +34 -1
- package/dist/index.js +772 -704
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChannelView.tsx +76 -32
- package/src/components/FaqList/FaqList.stories.tsx +137 -0
- package/src/components/FaqList/FaqListItem.stories.tsx +35 -0
- package/src/components/FaqList/FaqListItem.tsx +34 -0
- package/src/components/FaqList/index.tsx +50 -0
- package/src/components/MessagingShell/index.tsx +13 -0
- package/src/index.ts +4 -0
- package/src/types.ts +8 -1
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,34 @@ export declare interface ChannelViewProps {
|
|
|
51
51
|
onLeaveConversation?: (channel: Channel) => void;
|
|
52
52
|
onBlockParticipant?: (participantId?: string) => void;
|
|
53
53
|
className?: string;
|
|
54
|
+
CustomChannelEmptyState?: React.ComponentType;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export declare interface Faq {
|
|
58
|
+
id: string;
|
|
59
|
+
question: string;
|
|
60
|
+
answer: string;
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
order?: number | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export declare const FaqList: default_2.FC<FaqListProps>;
|
|
66
|
+
|
|
67
|
+
export declare const FaqListItem: default_2.FC<FaqListItemProps>;
|
|
68
|
+
|
|
69
|
+
export declare interface FaqListItemProps {
|
|
70
|
+
question: string;
|
|
71
|
+
onClick: () => void;
|
|
72
|
+
loading?: boolean;
|
|
73
|
+
className?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export declare interface FaqListProps {
|
|
77
|
+
faqs: Faq[];
|
|
78
|
+
onFaqClick: (faqId: string) => void;
|
|
79
|
+
loadingFaqId?: string | null;
|
|
80
|
+
headerText?: string;
|
|
81
|
+
className?: string;
|
|
54
82
|
}
|
|
55
83
|
|
|
56
84
|
/**
|
|
@@ -136,6 +164,11 @@ export declare interface MessagingShellProps {
|
|
|
136
164
|
* This reuses the existing ChannelCreator from StreamChatServiceConfig.
|
|
137
165
|
*/
|
|
138
166
|
initialParticipantData?: Participant;
|
|
167
|
+
/**
|
|
168
|
+
* Custom empty state component to render when a channel has no messages.
|
|
169
|
+
* Useful for showing FAQs or other contextual information in empty channels.
|
|
170
|
+
*/
|
|
171
|
+
CustomChannelEmptyState?: React.ComponentType;
|
|
139
172
|
}
|
|
140
173
|
|
|
141
174
|
/**
|
|
@@ -148,7 +181,7 @@ export declare interface Participant {
|
|
|
148
181
|
image?: string;
|
|
149
182
|
username?: string;
|
|
150
183
|
phone?: string;
|
|
151
|
-
metadata?: Record<string,
|
|
184
|
+
metadata?: Record<string, unknown>;
|
|
152
185
|
}
|
|
153
186
|
|
|
154
187
|
/**
|