@linktr.ee/messaging-react 3.5.1 → 3.5.2
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-7aAvaUCW.js → Card-BnMjliau.js} +3 -3
- package/dist/{Card-7aAvaUCW.js.map → Card-BnMjliau.js.map} +1 -1
- package/dist/{Card-BSZuzK2_.cjs → Card-BvfoMxwz.cjs} +2 -2
- package/dist/{Card-BSZuzK2_.cjs.map → Card-BvfoMxwz.cjs.map} +1 -1
- package/dist/{Card-BSNUuIZb.js → Card-CSEdL1ew.js} +2 -2
- package/dist/{Card-BSNUuIZb.js.map → Card-CSEdL1ew.js.map} +1 -1
- package/dist/{Card-CM877v9R.js → Card-CVk576_V.js} +2 -2
- package/dist/{Card-CM877v9R.js.map → Card-CVk576_V.js.map} +1 -1
- package/dist/{Card-Dj-xMf40.cjs → Card-DLG18fjt.cjs} +2 -2
- package/dist/{Card-Dj-xMf40.cjs.map → Card-DLG18fjt.cjs.map} +1 -1
- package/dist/{Card-DhDFVQ7O.cjs → Card-lFj_CszL.cjs} +2 -2
- package/dist/{Card-DhDFVQ7O.cjs.map → Card-lFj_CszL.cjs.map} +1 -1
- package/dist/{LockedThumbnail-DZP7ke4x.js → LockedThumbnail-0k5MyzJ7.js} +2 -2
- package/dist/{LockedThumbnail-DZP7ke4x.js.map → LockedThumbnail-0k5MyzJ7.js.map} +1 -1
- package/dist/{LockedThumbnail-DckzKrnU.cjs → LockedThumbnail-C1KdYxd0.cjs} +2 -2
- package/dist/{LockedThumbnail-DckzKrnU.cjs.map → LockedThumbnail-C1KdYxd0.cjs.map} +1 -1
- package/dist/{index-BD4riB9V.js → index-DxuG__WG.js} +26 -25
- package/dist/index-DxuG__WG.js.map +1 -0
- package/dist/{index-9Go_hBkB.cjs → index-Suw7bhfA.cjs} +2 -2
- package/dist/index-Suw7bhfA.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/ChannelList/index.test.tsx +16 -0
- package/src/components/ChannelList/index.tsx +2 -1
- package/src/types.ts +8 -0
- package/dist/index-9Go_hBkB.cjs.map +0 -1
- package/dist/index-BD4riB9V.js.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-Suw7bhfA.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.resolveConversationParticipant=e.resolveConversationParticipant;exports.resolveLinkAttachment=e.resolveLinkAttachment;exports.resolveMediaFromMessage=e.resolveMediaFromMessage;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useComposerLocked=e.useComposerLocked;exports.useCustomMessage=e.useCustomMessage;exports.useMessageVote=e.useMessageVote;exports.useMessaging=e.useMessaging;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { ComponentType } from 'react';
|
|
|
8
8
|
import { default as default_2 } from 'react';
|
|
9
9
|
import { EmptyStateIndicatorProps } from 'stream-chat-react';
|
|
10
10
|
import { FC } from 'react';
|
|
11
|
+
import { InfiniteScrollProps } from 'stream-chat-react';
|
|
11
12
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
12
13
|
import { LocalMessage } from 'stream-chat';
|
|
13
14
|
import { MessagingUser } from '@linktr.ee/messaging-core';
|
|
@@ -133,6 +134,13 @@ export declare interface ChannelListProps {
|
|
|
133
134
|
*/
|
|
134
135
|
sort?: ChannelSort;
|
|
135
136
|
customEmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>;
|
|
137
|
+
/**
|
|
138
|
+
* Custom paginator for the channel list. The default is Stream's
|
|
139
|
+
* `InfiniteScroll`; hosts that render multiple ChannelLists in one stacked
|
|
140
|
+
* layout can provide a paginator that listens to the host-owned scroll
|
|
141
|
+
* container or renders an explicit load-more control.
|
|
142
|
+
*/
|
|
143
|
+
channelListPaginator?: ComponentType<InfiniteScrollProps>;
|
|
136
144
|
/**
|
|
137
145
|
* Custom component rendered for each channel row in the conversation list.
|
|
138
146
|
* Receives Stream's channel preview props plus this package's selection
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, b as t, C as i, c as o, d as n, e as m, F as r, f as g, L as l, h as M, M as c, i as u, j as L, k as h, l as d, m as p, n as v, o as C, p as A, q as k, s as F, t as P, u as b, v as f, w as x, x as y, y as S, z as q, B as z, D as B, E as D, G as E } from "./index-
|
|
1
|
+
import { a as e, b as t, C as i, c as o, d as n, e as m, F as r, f as g, L as l, h as M, M as c, i as u, j as L, k as h, l as d, m as p, n as v, o as C, p as A, q as k, s as F, t as P, u as b, v as f, w as x, x as y, y as S, z as q, B as z, D as B, E as D, G as E } from "./index-DxuG__WG.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ActionButton,
|
|
4
4
|
t as Avatar,
|
package/package.json
CHANGED
|
@@ -68,6 +68,22 @@ describe('ChannelList', () => {
|
|
|
68
68
|
})
|
|
69
69
|
})
|
|
70
70
|
|
|
71
|
+
it('uses a custom channel list paginator when provided', () => {
|
|
72
|
+
const ChannelListPaginator = () => null
|
|
73
|
+
|
|
74
|
+
renderWithProviders(
|
|
75
|
+
<ChannelList
|
|
76
|
+
{...defaultProps}
|
|
77
|
+
channelListPaginator={ChannelListPaginator}
|
|
78
|
+
/>
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
expect(streamChannelListMock).toHaveBeenCalledOnce()
|
|
82
|
+
expect(streamChannelListMock.mock.calls[0][0]).toMatchObject({
|
|
83
|
+
Paginator: ChannelListPaginator,
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
|
|
71
87
|
it('uses the built-in channel preview by default', () => {
|
|
72
88
|
renderWithProviders(<ChannelList {...defaultProps} />)
|
|
73
89
|
|
|
@@ -28,6 +28,7 @@ export const ChannelList = React.memo<ChannelListProps>(
|
|
|
28
28
|
sort = DEFAULT_SORT,
|
|
29
29
|
className,
|
|
30
30
|
customEmptyStateIndicator,
|
|
31
|
+
channelListPaginator: Paginator = InfiniteScroll,
|
|
31
32
|
channelPreview,
|
|
32
33
|
renderMessagePreview,
|
|
33
34
|
viewerLanguage,
|
|
@@ -99,7 +100,7 @@ export const ChannelList = React.memo<ChannelListProps>(
|
|
|
99
100
|
allowNewMessagesFromUnfilteredChannels
|
|
100
101
|
}
|
|
101
102
|
channelRenderFilterFn={wrappedChannelRenderFilterFn}
|
|
102
|
-
Paginator={
|
|
103
|
+
Paginator={Paginator}
|
|
103
104
|
Preview={CustomChannelPreview}
|
|
104
105
|
EmptyStateIndicator={customEmptyStateIndicator}
|
|
105
106
|
/>
|
package/src/types.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
import type {
|
|
15
15
|
ChannelPreviewUIComponentProps,
|
|
16
16
|
EmptyStateIndicatorProps,
|
|
17
|
+
InfiniteScrollProps,
|
|
17
18
|
} from 'stream-chat-react'
|
|
18
19
|
|
|
19
20
|
import type { MessageMetadata } from './stream-custom-data'
|
|
@@ -98,6 +99,13 @@ export interface ChannelListProps {
|
|
|
98
99
|
*/
|
|
99
100
|
sort?: ChannelSort
|
|
100
101
|
customEmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>
|
|
102
|
+
/**
|
|
103
|
+
* Custom paginator for the channel list. The default is Stream's
|
|
104
|
+
* `InfiniteScroll`; hosts that render multiple ChannelLists in one stacked
|
|
105
|
+
* layout can provide a paginator that listens to the host-owned scroll
|
|
106
|
+
* container or renders an explicit load-more control.
|
|
107
|
+
*/
|
|
108
|
+
channelListPaginator?: ComponentType<InfiniteScrollProps>
|
|
101
109
|
/**
|
|
102
110
|
* Custom component rendered for each channel row in the conversation list.
|
|
103
111
|
* Receives Stream's channel preview props plus this package's selection
|