@linktr.ee/messaging-react 1.21.1 → 1.21.2-rc-1771424513
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 +15 -1
- package/dist/index.js +882 -873
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChannelView.tsx +8 -0
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/index.ts +1 -0
- package/src/types.ts +9 -0
package/package.json
CHANGED
|
@@ -244,6 +244,7 @@ const ChannelInfoDialog: React.FC<{
|
|
|
244
244
|
onDeleteConversationClick?: () => void
|
|
245
245
|
onBlockParticipantClick?: () => void
|
|
246
246
|
onReportParticipantClick?: () => void
|
|
247
|
+
customChannelActions?: React.ReactNode
|
|
247
248
|
}> = ({
|
|
248
249
|
dialogRef,
|
|
249
250
|
onClose,
|
|
@@ -256,6 +257,7 @@ const ChannelInfoDialog: React.FC<{
|
|
|
256
257
|
onDeleteConversationClick,
|
|
257
258
|
onBlockParticipantClick,
|
|
258
259
|
onReportParticipantClick,
|
|
260
|
+
customChannelActions,
|
|
259
261
|
}) => {
|
|
260
262
|
const { service, debug } = useMessagingContext()
|
|
261
263
|
const [isParticipantBlocked, setIsParticipantBlocked] = useState(false)
|
|
@@ -505,6 +507,7 @@ const ChannelInfoDialog: React.FC<{
|
|
|
505
507
|
<span>Report</span>
|
|
506
508
|
</ActionButton>
|
|
507
509
|
</li>
|
|
510
|
+
{customChannelActions}
|
|
508
511
|
</ul>
|
|
509
512
|
</div>
|
|
510
513
|
</div>
|
|
@@ -529,6 +532,7 @@ const ChannelViewInner: React.FC<{
|
|
|
529
532
|
showStarButton?: boolean
|
|
530
533
|
chatbotVotingEnabled?: boolean
|
|
531
534
|
renderChannelBanner?: () => React.ReactNode
|
|
535
|
+
customChannelActions?: React.ReactNode
|
|
532
536
|
}> = ({
|
|
533
537
|
onBack,
|
|
534
538
|
showBackButton,
|
|
@@ -542,6 +546,7 @@ const ChannelViewInner: React.FC<{
|
|
|
542
546
|
showStarButton = false,
|
|
543
547
|
chatbotVotingEnabled = false,
|
|
544
548
|
renderChannelBanner,
|
|
549
|
+
customChannelActions,
|
|
545
550
|
}) => {
|
|
546
551
|
const { channel } = useChannelStateContext()
|
|
547
552
|
const infoDialogRef = useRef<HTMLDialogElement>(null)
|
|
@@ -636,6 +641,7 @@ const ChannelViewInner: React.FC<{
|
|
|
636
641
|
onDeleteConversationClick={onDeleteConversationClick}
|
|
637
642
|
onBlockParticipantClick={onBlockParticipantClick}
|
|
638
643
|
onReportParticipantClick={onReportParticipantClick}
|
|
644
|
+
customChannelActions={customChannelActions}
|
|
639
645
|
/>
|
|
640
646
|
</>
|
|
641
647
|
)
|
|
@@ -664,6 +670,7 @@ export const ChannelView = React.memo<ChannelViewProps>(
|
|
|
664
670
|
showStarButton = false,
|
|
665
671
|
chatbotVotingEnabled = false,
|
|
666
672
|
renderChannelBanner,
|
|
673
|
+
customChannelActions,
|
|
667
674
|
}) => {
|
|
668
675
|
// Custom send message handler that:
|
|
669
676
|
// 1. Applies messageMetadata if provided
|
|
@@ -738,6 +745,7 @@ export const ChannelView = React.memo<ChannelViewProps>(
|
|
|
738
745
|
showStarButton={showStarButton}
|
|
739
746
|
chatbotVotingEnabled={chatbotVotingEnabled}
|
|
740
747
|
renderChannelBanner={renderChannelBanner}
|
|
748
|
+
customChannelActions={customChannelActions}
|
|
741
749
|
/>
|
|
742
750
|
</Channel>
|
|
743
751
|
</div>
|
|
@@ -37,6 +37,7 @@ export const MessagingShell: React.FC<MessagingShellProps> = ({
|
|
|
37
37
|
chatbotVotingEnabled = false,
|
|
38
38
|
renderMessagePreview,
|
|
39
39
|
renderChannelBanner,
|
|
40
|
+
customChannelActions,
|
|
40
41
|
}) => {
|
|
41
42
|
const {
|
|
42
43
|
service,
|
|
@@ -495,6 +496,7 @@ export const MessagingShell: React.FC<MessagingShellProps> = ({
|
|
|
495
496
|
onMessageSent={onMessageSent}
|
|
496
497
|
showStarButton={showStarButton}
|
|
497
498
|
chatbotVotingEnabled={chatbotVotingEnabled}
|
|
499
|
+
customChannelActions={customChannelActions}
|
|
498
500
|
/>
|
|
499
501
|
</div>
|
|
500
502
|
) : initialParticipantFilter ? (
|
package/src/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import './styles.css'
|
|
|
5
5
|
export { MessagingShell } from './components/MessagingShell'
|
|
6
6
|
export { ChannelList } from './components/ChannelList'
|
|
7
7
|
export { ChannelView } from './components/ChannelView'
|
|
8
|
+
export { default as ActionButton } from './components/ActionButton'
|
|
8
9
|
export { ParticipantPicker } from './components/ParticipantPicker'
|
|
9
10
|
export { Avatar } from './components/Avatar'
|
|
10
11
|
export { FaqList } from './components/FaqList'
|
package/src/types.ts
CHANGED
|
@@ -154,6 +154,14 @@ export interface ChannelViewProps {
|
|
|
154
154
|
* Useful for showing summaries, alerts, or contextual information.
|
|
155
155
|
*/
|
|
156
156
|
renderChannelBanner?: () => React.ReactNode
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Custom actions rendered at the bottom of the channel info dialog
|
|
160
|
+
* (below Delete Conversation, Block/Unblock, Report).
|
|
161
|
+
* Pass one or more <li> elements so they match the list styling.
|
|
162
|
+
* Use the exported ActionButton for consistent styling.
|
|
163
|
+
*/
|
|
164
|
+
customChannelActions?: React.ReactNode
|
|
157
165
|
}
|
|
158
166
|
|
|
159
167
|
/**
|
|
@@ -173,6 +181,7 @@ export type ChannelViewPassthroughProps = Pick<
|
|
|
173
181
|
| 'showStarButton'
|
|
174
182
|
| 'chatbotVotingEnabled'
|
|
175
183
|
| 'renderChannelBanner'
|
|
184
|
+
| 'customChannelActions'
|
|
176
185
|
>
|
|
177
186
|
|
|
178
187
|
/**
|