@linktr.ee/messaging-react 1.12.7 → 1.12.8-rc-1765966726
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.js +218 -210
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChannelView.tsx +34 -23
- package/src/components/CustomMessage/index.tsx +9 -0
package/package.json
CHANGED
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
Window,
|
|
15
15
|
MessageList,
|
|
16
16
|
useChannelStateContext,
|
|
17
|
+
WithComponents,
|
|
18
|
+
MessageUIComponentProps,
|
|
17
19
|
} from 'stream-chat-react'
|
|
18
20
|
|
|
19
21
|
import { useMessagingContext } from '../providers/MessagingProvider'
|
|
@@ -22,6 +24,7 @@ import type { ChannelViewProps } from '../types'
|
|
|
22
24
|
import ActionButton from './ActionButton'
|
|
23
25
|
import { Avatar } from './Avatar'
|
|
24
26
|
import { CloseButton } from './CloseButton'
|
|
27
|
+
import { CustomMessage } from './CustomMessage'
|
|
25
28
|
import { CustomMessageInput } from './CustomMessageInput'
|
|
26
29
|
import { CustomSystemMessage } from './CustomSystemMessage'
|
|
27
30
|
import { ChannelEmptyState } from './MessagingShell/ChannelEmptyState'
|
|
@@ -487,31 +490,39 @@ const ChannelViewInner: React.FC<{
|
|
|
487
490
|
|
|
488
491
|
return (
|
|
489
492
|
<>
|
|
490
|
-
<
|
|
491
|
-
{
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
493
|
+
<WithComponents
|
|
494
|
+
overrides={{
|
|
495
|
+
Message: (props: MessageUIComponentProps) => (
|
|
496
|
+
<CustomMessage {...props} />
|
|
497
|
+
),
|
|
498
|
+
}}
|
|
499
|
+
>
|
|
500
|
+
<Window>
|
|
501
|
+
{/* Custom Channel Header */}
|
|
502
|
+
<div className="p-4">
|
|
503
|
+
<CustomChannelHeader
|
|
504
|
+
onBack={onBack}
|
|
505
|
+
showBackButton={showBackButton}
|
|
506
|
+
onShowInfo={handleShowInfo}
|
|
507
|
+
canShowInfo={Boolean(participant)}
|
|
508
|
+
/>
|
|
509
|
+
</div>
|
|
500
510
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
511
|
+
{/* Message List */}
|
|
512
|
+
<div className="flex-1 overflow-hidden relative">
|
|
513
|
+
<MessageList
|
|
514
|
+
hideDeletedMessages
|
|
515
|
+
hideNewMessageSeparator={false}
|
|
516
|
+
messageActions={undefined}
|
|
517
|
+
/>
|
|
518
|
+
</div>
|
|
509
519
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
520
|
+
{/* Message Input */}
|
|
521
|
+
<CustomMessageInput
|
|
522
|
+
renderActions={() => renderMessageInputActions?.(channel)}
|
|
523
|
+
/>
|
|
524
|
+
</Window>
|
|
525
|
+
</WithComponents>
|
|
515
526
|
|
|
516
527
|
{/* Channel Info Dialog */}
|
|
517
528
|
<ChannelInfoDialog
|