@linktr.ee/messaging-react 4.0.4 → 4.1.0-rc-1786608731
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-D4cboQ2t.js → Card-ClyBNKoW.js} +2 -2
- package/dist/{Card-D4cboQ2t.js.map → Card-ClyBNKoW.js.map} +1 -1
- package/dist/{Card-BPJPoGox.cjs → Card-NbyEZmLk.cjs} +2 -2
- package/dist/{Card-BPJPoGox.cjs.map → Card-NbyEZmLk.cjs.map} +1 -1
- package/dist/{index-DeWGN1T5.js → index-CH6y1lmh.js} +778 -776
- package/dist/{index-DeWGN1T5.js.map → index-CH6y1lmh.js.map} +1 -1
- package/dist/{index-BOlJ4EAE.cjs → index-D1x28quP.cjs} +3 -3
- package/dist/{index-BOlJ4EAE.cjs.map → index-D1x28quP.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/components/MessagingShell/MessagingShell.test.tsx +20 -0
- package/src/components/MessagingShell/index.tsx +2 -0
- package/src/types.ts +1 -0
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-D1x28quP.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.MessageBubble=e.MessageBubble;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.RichCard=e.RichCard;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.optimizeMessagingAttachmentUrl=e.optimizeMessagingAttachmentUrl;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.useMessaging=e.useMessaging;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -208,7 +208,7 @@ export declare const ChannelView: default_2.NamedExoticComponent<ChannelViewProp
|
|
|
208
208
|
* Props that MessagingShell passes through to ChannelView.
|
|
209
209
|
* ChannelViewProps is the source of truth for these props.
|
|
210
210
|
*/
|
|
211
|
-
declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'renderConversationFooter' | 'CustomChannelEmptyState' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled' | 'onMessageSent' | 'viewerLanguage' | 'renderChannelBanner' | 'customChannelActions' | 'renderChannelActions' | 'onParticipantNameClick' | 'renderMessage' | 'onMessageLinkClick' | 'onOutboundClick' | 'resolveOutbound' | 'showChannelInfo' | 'composerInput'>;
|
|
211
|
+
declare type ChannelViewPassthroughProps = Pick<ChannelViewProps, 'renderMessageInputActions' | 'renderMessageInputFooter' | 'renderConversationFooter' | 'CustomChannelEmptyState' | 'onBlockParticipantClick' | 'onReportParticipantClick' | 'dmAgentEnabled' | 'onMessageSent' | 'viewerLanguage' | 'renderChannelBanner' | 'customChannelActions' | 'renderChannelActions' | 'onParticipantNameClick' | 'renderMessage' | 'onMessageLinkClick' | 'onOutboundClick' | 'resolveOutbound' | 'showChannelInfo' | 'composerInput'>;
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* ChannelView component props
|
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 r, f as l, L as g, h as c, M, i as h, j as L, k as u, l as d, R as p, m as C, n as v, p as A, q as k, s as F, t as b, u as P, v as f, w as x, o as y, x as z, y as S, z as q, B, D, E, G as R } from "./index-
|
|
1
|
+
import { a as e, b as t, C as i, c as n, d as o, e as m, F as r, f as l, L as g, h as c, M, i as h, j as L, k as u, l as d, R as p, m as C, n as v, p as A, q as k, s as F, t as b, u as P, v as f, w as x, o as y, x as z, y as S, z as q, B, D, E, G as R } from "./index-CH6y1lmh.js";
|
|
2
2
|
export {
|
|
3
3
|
e as ActionButton,
|
|
4
4
|
t as Avatar,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/messaging-react",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0-rc-1786608731",
|
|
4
4
|
"description": "React messaging components built on messaging-core for web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"chromatic:local": "yarn storybook:build && chromatic"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@linktr.ee/messaging-core": "
|
|
53
|
+
"@linktr.ee/messaging-core": "2.4.0-rc-1786608731",
|
|
54
54
|
"@linktr.ee/messaging-taxonomy": "^0.10.0",
|
|
55
55
|
"@phosphor-icons/react": "^2.1.10"
|
|
56
56
|
},
|
|
@@ -169,6 +169,26 @@ describe('MessagingShell', () => {
|
|
|
169
169
|
)
|
|
170
170
|
})
|
|
171
171
|
|
|
172
|
+
it('forwards renderMessageInputFooter through to ChannelView', async () => {
|
|
173
|
+
queryChannelsMock.mockResolvedValue([makeChannel('existing-1')])
|
|
174
|
+
const renderMessageInputFooter = vi.fn()
|
|
175
|
+
|
|
176
|
+
renderWithProviders(
|
|
177
|
+
<MessagingShell
|
|
178
|
+
initialParticipantFilter="other-1"
|
|
179
|
+
renderMessageInputFooter={renderMessageInputFooter}
|
|
180
|
+
/>
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
await waitFor(() => {
|
|
184
|
+
expect(screen.getByTestId('channel-view')).toBeInTheDocument()
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
expect(capturedChannelViewProps.renderMessageInputFooter).toBe(
|
|
188
|
+
renderMessageInputFooter
|
|
189
|
+
)
|
|
190
|
+
})
|
|
191
|
+
|
|
172
192
|
it('does not create the channel again when the load effect re-runs for the same pair (e.g. service identity settles during connect)', async () => {
|
|
173
193
|
queryChannelsMock.mockResolvedValue([])
|
|
174
194
|
startChannelWithParticipantMock.mockResolvedValue(makeChannel('created-1'))
|
|
@@ -22,6 +22,7 @@ import { LoadingState } from './LoadingState'
|
|
|
22
22
|
export const MessagingShell: React.FC<MessagingShellProps> = ({
|
|
23
23
|
capabilities = {},
|
|
24
24
|
renderMessageInputActions,
|
|
25
|
+
renderMessageInputFooter,
|
|
25
26
|
renderConversationFooter,
|
|
26
27
|
onChannelSelect,
|
|
27
28
|
onExitConversation,
|
|
@@ -249,6 +250,7 @@ export const MessagingShell: React.FC<MessagingShellProps> = ({
|
|
|
249
250
|
channel={selectedChannel}
|
|
250
251
|
key={selectedChannel.id}
|
|
251
252
|
renderMessageInputActions={renderMessageInputActions}
|
|
253
|
+
renderMessageInputFooter={renderMessageInputFooter}
|
|
252
254
|
renderConversationFooter={renderConversationFooter}
|
|
253
255
|
renderChannelBanner={renderChannelBanner}
|
|
254
256
|
onLeaveConversation={handleExitConversation}
|
package/src/types.ts
CHANGED
|
@@ -436,6 +436,7 @@ export interface ChannelViewProps {
|
|
|
436
436
|
export type ChannelViewPassthroughProps = Pick<
|
|
437
437
|
ChannelViewProps,
|
|
438
438
|
| 'renderMessageInputActions'
|
|
439
|
+
| 'renderMessageInputFooter'
|
|
439
440
|
| 'renderConversationFooter'
|
|
440
441
|
| 'CustomChannelEmptyState'
|
|
441
442
|
| 'onBlockParticipantClick'
|