@linktr.ee/messaging-react 3.3.8 → 3.3.9-rc-1781245410
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/{Card-D4cn0k04.js → Card-B7QHTOm5.js} +2 -2
- package/dist/{Card-D4cn0k04.js.map → Card-B7QHTOm5.js.map} +1 -1
- package/dist/{Card-BlET8wE6.cjs → Card-BCm-99bg.cjs} +2 -2
- package/dist/{Card-BlET8wE6.cjs.map → Card-BCm-99bg.cjs.map} +1 -1
- package/dist/{Card-BnVoc-u7.cjs → Card-BJPVJHv-.cjs} +2 -2
- package/dist/{Card-BnVoc-u7.cjs.map → Card-BJPVJHv-.cjs.map} +1 -1
- package/dist/{Card-D-JLW3MJ.js → Card-C0jnPxly.js} +2 -2
- package/dist/{Card-D-JLW3MJ.js.map → Card-C0jnPxly.js.map} +1 -1
- package/dist/{Card-BDWTAZYS.js → Card-CokwQF6h.js} +3 -3
- package/dist/{Card-BDWTAZYS.js.map → Card-CokwQF6h.js.map} +1 -1
- package/dist/{Card-Dh2EXYNT.cjs → Card-cL9lwWhR.cjs} +2 -2
- package/dist/{Card-Dh2EXYNT.cjs.map → Card-cL9lwWhR.cjs.map} +1 -1
- package/dist/{LockedThumbnail-BYdGEl_B.cjs → LockedThumbnail-B8RE_L4Z.cjs} +2 -2
- package/dist/{LockedThumbnail-BYdGEl_B.cjs.map → LockedThumbnail-B8RE_L4Z.cjs.map} +1 -1
- package/dist/{LockedThumbnail-ZEMzCDoV.js → LockedThumbnail-Pum0IO0v.js} +2 -2
- package/dist/{LockedThumbnail-ZEMzCDoV.js.map → LockedThumbnail-Pum0IO0v.js.map} +1 -1
- package/dist/{index-DmimisTH.js → index-BYerDRXA.js} +287 -286
- package/dist/index-BYerDRXA.js.map +1 -0
- package/dist/{index-TLVquOE0.cjs → index-CR0b7198.cjs} +2 -2
- package/dist/index-CR0b7198.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/ChannelList/index.test.tsx +17 -1
- package/src/components/ChannelList/index.tsx +5 -1
- package/dist/index-DmimisTH.js.map +0 -1
- package/dist/index-TLVquOE0.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR0b7198.cjs");exports.ActionButton=e.ActionButton;exports.Avatar=e.Avatar;exports.ChannelEmptyState=e.ChannelEmptyState;exports.ChannelList=e.ChannelList;exports.ChannelView=e.ChannelView;exports.CustomMessageProvider=e.CustomMessageProvider;exports.FaqList=e.FaqList;exports.FaqListItem=e.FaqListItem;exports.LinkAttachment=e.LinkAttachment;exports.LockedAttachment=e.LockedAttachment;exports.MediaMessage=e.MediaMessage;exports.MessageAttachment=e.MessageAttachment;exports.MessageVoteButtons=e.MessageVoteButtons;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.buildCompactMetaLabel=e.buildCompactMetaLabel;exports.formatFileSize=e.formatFileSize;exports.formatRelativeTime=e.formatRelativeTime;exports.getFileExtensionLabel=e.getFileExtensionLabel;exports.getMessageDisplayText=e.getMessageDisplayText;exports.isLinkAttachment=e.isLinkAttachment;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.resolveLinkAttachment=e.resolveLinkAttachment;exports.resolveMediaFromMessage=e.resolveMediaFromMessage;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useCustomMessage=e.useCustomMessage;exports.useMessageVote=e.useMessageVote;exports.useMessaging=e.useMessaging;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, b as t, C as i, c as n, d as o, e as m, F as g, f as l, L as r, h as M, M as u, i as L, j as c, k as h, l as d, m as p, n as v, o as A, p as C, q as F, s as k, t as b, u as f, v as x, w as y, x as P, y as S, z as q, B as z, D as B } from "./index-
|
|
1
|
+
import { a as e, b as t, C as i, c as n, d as o, e as m, F as g, f as l, L as r, h as M, M as u, i as L, j as c, k as h, l as d, m as p, n as v, o as A, p as C, q as F, s as k, t as b, u as f, v as x, w as y, x as P, y as S, z as q, B as z, D as B } from "./index-BYerDRXA.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ActionButton,
|
|
4
4
|
t as Avatar,
|
package/package.json
CHANGED
|
@@ -7,12 +7,16 @@ import { renderWithProviders } from '../../test/utils'
|
|
|
7
7
|
import { ChannelList } from '.'
|
|
8
8
|
|
|
9
9
|
const streamChannelListMock = vi.fn()
|
|
10
|
+
const { InfiniteScrollMock } = vi.hoisted(() => ({
|
|
11
|
+
InfiniteScrollMock: () => null,
|
|
12
|
+
}))
|
|
10
13
|
|
|
11
14
|
vi.mock('stream-chat-react', () => ({
|
|
12
15
|
ChannelList: (props: unknown) => {
|
|
13
16
|
streamChannelListMock(props)
|
|
14
17
|
return <div data-testid="stream-channel-list" />
|
|
15
18
|
},
|
|
19
|
+
InfiniteScroll: InfiniteScrollMock,
|
|
16
20
|
}))
|
|
17
21
|
|
|
18
22
|
vi.mock('../../providers/MessagingProvider', () => ({
|
|
@@ -42,6 +46,15 @@ describe('ChannelList', () => {
|
|
|
42
46
|
})
|
|
43
47
|
})
|
|
44
48
|
|
|
49
|
+
it('uses InfiniteScroll as the channel list paginator', () => {
|
|
50
|
+
renderWithProviders(<ChannelList {...defaultProps} />)
|
|
51
|
+
|
|
52
|
+
expect(streamChannelListMock).toHaveBeenCalledOnce()
|
|
53
|
+
expect(streamChannelListMock.mock.calls[0][0]).toMatchObject({
|
|
54
|
+
Paginator: InfiniteScrollMock,
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
45
58
|
it('passes allowNewMessagesFromUnfilteredChannels through to Stream ChannelList', () => {
|
|
46
59
|
const props: React.ComponentProps<typeof ChannelList> = {
|
|
47
60
|
...defaultProps,
|
|
@@ -77,7 +90,10 @@ describe('ChannelList', () => {
|
|
|
77
90
|
|
|
78
91
|
// When the wrapper is called, it should delegate to the consumer's filter
|
|
79
92
|
const mockChannels = [
|
|
80
|
-
{
|
|
93
|
+
{
|
|
94
|
+
cid: 'ch-1',
|
|
95
|
+
state: { pending_messages: [], addMessageSorted: vi.fn() },
|
|
96
|
+
},
|
|
81
97
|
]
|
|
82
98
|
streamProps.channelRenderFilterFn!(mockChannels)
|
|
83
99
|
expect(filterFn).toHaveBeenCalledWith(mockChannels)
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import classNames from 'classnames'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import type { Channel } from 'stream-chat'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ChannelList as StreamChannelList,
|
|
6
|
+
InfiniteScroll,
|
|
7
|
+
} from 'stream-chat-react'
|
|
5
8
|
|
|
6
9
|
import { restorePendingMessages } from '../../hooks/useRestorePendingMessages'
|
|
7
10
|
import { useMessagingContext } from '../../providers/MessagingProvider'
|
|
@@ -93,6 +96,7 @@ export const ChannelList = React.memo<ChannelListProps>(
|
|
|
93
96
|
allowNewMessagesFromUnfilteredChannels
|
|
94
97
|
}
|
|
95
98
|
channelRenderFilterFn={wrappedChannelRenderFilterFn}
|
|
99
|
+
Paginator={InfiniteScroll}
|
|
96
100
|
Preview={CustomChannelPreview}
|
|
97
101
|
EmptyStateIndicator={customEmptyStateIndicator}
|
|
98
102
|
/>
|