sceyt-chat-react-uikit 1.8.4 → 1.8.5-beta.1
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/components/AudioPlayer/index.d.ts +2 -2
- package/components/Message/Message.types.d.ts +5 -1
- package/components/Message/MessageBody/index.d.ts +1 -1
- package/components/Message/MessagePopups/index.d.ts +1 -0
- package/components/Message/MessageReactions/index.d.ts +2 -0
- package/components/Message/OGMetadata/index.d.ts +1 -2
- package/components/Message/hooks/useMessageState.d.ts +4 -0
- package/components/Message/index.d.ts +1 -1
- package/components/Message/index.test.d.ts +1 -0
- package/components/MessageDivider/index.d.ts +2 -2
- package/components/Messages/MessageList/FloatingScrollButton.d.ts +13 -0
- package/components/Messages/MessageList/MessageList.test.d.ts +1 -0
- package/components/Messages/MessageList/ScrollToBottomButton.d.ts +11 -0
- package/components/Messages/MessageList/ScrollToUnreadMentionsButton.d.ts +12 -0
- package/components/Messages/MessageList/index.d.ts +0 -12
- package/components/Messages/MessageList/useChatController.d.ts +62 -0
- package/components/Messages/MessageList/useChatController.test.d.ts +1 -0
- package/components/Messages/SystemMessage/index.d.ts +4 -2
- package/index.js +7427 -4687
- package/index.modern.js +7428 -4688
- package/package.json +1 -1
|
@@ -12,8 +12,8 @@ interface AudioPlayerProps {
|
|
|
12
12
|
borderRadius?: string;
|
|
13
13
|
onClose?: () => void;
|
|
14
14
|
}
|
|
15
|
-
declare const
|
|
16
|
-
export default
|
|
15
|
+
declare const _default: React.NamedExoticComponent<AudioPlayerProps>;
|
|
16
|
+
export default _default;
|
|
17
17
|
export declare const DisappearingMessagesBadge: import("styled-components").StyledComponent<any, any, object & {
|
|
18
18
|
color: string;
|
|
19
19
|
$iconColor: string;
|
|
@@ -75,12 +75,16 @@ export interface IMessageProps {
|
|
|
75
75
|
prevMessage?: IMessage;
|
|
76
76
|
nextMessage: IMessage;
|
|
77
77
|
stopScrolling: (stop: boolean) => void;
|
|
78
|
-
setLastVisibleMessageId?: (
|
|
78
|
+
setLastVisibleMessageId?: (message: IMessage) => void;
|
|
79
|
+
queueReadMarker?: (channelId: string, messageId?: string) => void;
|
|
80
|
+
queueDeliveredMarker?: (channelId: string, messageId?: string) => void;
|
|
79
81
|
handleScrollToRepliedMessage: (msgId: string) => void;
|
|
80
82
|
handleMediaItemClick?: (attachment: IAttachment) => void;
|
|
81
83
|
unreadMessageId: string;
|
|
82
84
|
isUnreadMessage: boolean;
|
|
85
|
+
nextMessageStartsUnreadSection?: boolean;
|
|
83
86
|
isThreadMessage: boolean;
|
|
87
|
+
disableAutoReadTracking?: boolean;
|
|
84
88
|
fontFamily?: string;
|
|
85
89
|
ownMessageOnRightSide?: boolean;
|
|
86
90
|
messageWidthPercent?: string | number;
|
|
@@ -140,5 +140,5 @@ interface IMessageBodyProps {
|
|
|
140
140
|
onInviteLinkClick?: (key: string) => void;
|
|
141
141
|
collapsedCharacterLimit?: number;
|
|
142
142
|
}
|
|
143
|
-
declare const _default: React.MemoExoticComponent<({ message, channel, MessageActionsMenu, handleScrollToRepliedMessage, handleMediaItemClick, isPendingMessage, prevMessage, nextMessage,
|
|
143
|
+
declare const _default: React.MemoExoticComponent<({ message, channel, MessageActionsMenu, handleScrollToRepliedMessage, handleMediaItemClick, isPendingMessage, prevMessage, nextMessage, unreadMessageId, isThreadMessage, fontFamily, ownMessageOnRightSide, showSenderNameOnDirectChannel, showSenderNameOnGroupChannel, showSenderNameOnOwnMessages, messageStatusAndTimePosition, messageStatusDisplayingType, outgoingMessageStyles, incomingMessageStyles, ownRepliedMessageBackground, incomingRepliedMessageBackground, showMessageStatus, showMessageTimeAndStatusOnlyOnHover, showMessageTime, showMessageStatusForEachMessage, showMessageTimeForEachMessage, messageReaction, editMessage, copyMessage, replyMessage, replyMessageInThread, deleteMessage, selectMessage, showInfoMessage, allowEditDeleteIncomingMessage, forwardMessage, reportMessage, reactionIcon, editIcon, copyIcon, replyIcon, replyInThreadIcon, forwardIcon, deleteIcon, infoIcon, selectIcon, retractVoteIcon, endVoteIcon, starIcon, staredIcon, reportIcon, reactionIconOrder, editIconOrder, copyIconOrder, replyIconOrder, replyInThreadIconOrder, forwardIconOrder, deleteIconOrder, infoIconOrder, selectIconOrder, starIconOrder, reportIconOrder, reactionIconTooltipText, editIconTooltipText, copyIconTooltipText, replyIconTooltipText, replyInThreadIconTooltipText, forwardIconTooltipText, deleteIconTooltipText, selectIconTooltipText, starIconTooltipText, reportIconTooltipText, infoIconTooltipText, messageActionIconsColor, messageStatusSize, messageStatusColor, messageReadStatusColor, messageStateFontSize, messageStateColor, messageTimeFontSize, messageTimeColor, messageStatusAndTimeLineHeight, messageTimeColorOnAttachment, fileAttachmentsIcon, fileAttachmentsBoxWidth, fileAttachmentsBoxBorder, fileAttachmentsTitleColor, fileAttachmentsSizeColor, imageAttachmentMaxWidth, imageAttachmentMaxHeight, videoAttachmentMaxWidth, videoAttachmentMaxHeight, emojisCategoryIconsPosition, emojisContainerBorderRadius, fixEmojiCategoriesTitleOnTop, selectedMessagesMap, contactsMap, messageTextFontSize, messageTextLineHeight, handleToggleForwardMessagePopup, handleToggleInfoMessagePopupOpen, messageActionsShow, handleRetractVote, handleEndVote, closeMessageActions, handleDeletePendingMessage, handleReplyMessage, handleToggleDeleteMessagePopup, handleToggleReportPopupOpen, handleResendMessage, handleOpenEmojis, emojisPopupOpen, setEmojisPopupOpen, emojisPopupPosition, frequentlyEmojisOpen, handleCopyMessage, toggleEditMode, handleSelectMessage, handleMouseEnter, handleMouseLeave, handleReactionAddDelete, handleCreateChat, messageTextRef, handleOpenUserProfile, shouldOpenUserProfileForMention, ogMetadataProps, unsupportedMessage, onInviteLinkClick, collapsedCharacterLimit }: IMessageBodyProps) => React.JSX.Element>;
|
|
144
144
|
export default _default;
|
|
@@ -12,6 +12,7 @@ interface MessagePopupsProps {
|
|
|
12
12
|
contactsMap: {
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
};
|
|
15
|
+
anchorRef: React.RefObject<HTMLElement>;
|
|
15
16
|
onDeleteMessage: (deleteOption: 'forMe' | 'forEveryone') => void;
|
|
16
17
|
onToggleDeletePopup: () => void;
|
|
17
18
|
onForwardMessage: (channelIds: string[]) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IAttachment
|
|
2
|
+
import { IAttachment } from '../../../types';
|
|
3
3
|
export declare const isDescriptionOnlySymbol: (description: string | undefined) => boolean;
|
|
4
4
|
declare const OGMetadata: ({ attachments, state, incoming, ogShowUrl, ogShowTitle, ogShowDescription, ogShowFavicon, order, maxWidth, maxHeight, ogContainerBorderRadius, ogContainerPadding, ogContainerClassName, ogContainerShowBackground, ogContainerBackground, infoPadding, ogContainerMargin, target, isInviteLink, onClick }: {
|
|
5
5
|
attachments: IAttachment[];
|
|
@@ -27,6 +27,5 @@ declare const OGMetadata: ({ attachments, state, incoming, ogShowUrl, ogShowTitl
|
|
|
27
27
|
target?: string | undefined;
|
|
28
28
|
isInviteLink?: boolean | undefined;
|
|
29
29
|
onClick?: (() => void) | undefined;
|
|
30
|
-
metadataGetSuccessCallback?: ((url: string, success: boolean, hasImage: boolean, metadata: IOGMetadata | null) => void) | undefined;
|
|
31
30
|
}) => React.JSX.Element | null;
|
|
32
31
|
export { OGMetadata };
|
|
@@ -15,6 +15,8 @@ export interface MessageState {
|
|
|
15
15
|
left: number;
|
|
16
16
|
right: number;
|
|
17
17
|
};
|
|
18
|
+
reactionsAnchorTop: number;
|
|
19
|
+
reactionsAnchorBottom: number;
|
|
18
20
|
}
|
|
19
21
|
export interface MessageStateSetters {
|
|
20
22
|
setDeletePopupOpen: (value: boolean | ((prev: boolean) => boolean)) => void;
|
|
@@ -31,6 +33,8 @@ export interface MessageStateSetters {
|
|
|
31
33
|
left: number;
|
|
32
34
|
right: number;
|
|
33
35
|
}) => void;
|
|
36
|
+
setReactionsAnchorTop: (value: number) => void;
|
|
37
|
+
setReactionsAnchorBottom: (value: number) => void;
|
|
34
38
|
setReportPopupOpen: (value: boolean | ((prev: boolean) => boolean)) => void;
|
|
35
39
|
}
|
|
36
40
|
export declare const useMessageState: () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IMessageProps } from './Message.types';
|
|
3
|
-
declare const _default: React.MemoExoticComponent<({ message, channel, MessageActionsMenu, CustomMessageItem, handleScrollToRepliedMessage, handleMediaItemClick, stopScrolling, isPendingMessage, prevMessage, nextMessage, setLastVisibleMessageId, isUnreadMessage, unreadMessageId, isThreadMessage, fontFamily, ownMessageOnRightSide, messageWidthPercent, showSenderNameOnDirectChannel, showSenderNameOnGroupChannel, showSenderNameOnOwnMessages, messageStatusAndTimePosition, messageStatusDisplayingType, outgoingMessageStyles, incomingMessageStyles, ownRepliedMessageBackground, incomingRepliedMessageBackground, showOwnAvatar, showMessageStatus, showMessageTimeAndStatusOnlyOnHover, showMessageTime, showMessageStatusForEachMessage, showMessageTimeForEachMessage, hoverBackground, messageReaction, editMessage, copyMessage, replyMessage, replyMessageInThread, deleteMessage, selectMessage, showInfoMessage, allowEditDeleteIncomingMessage, forwardMessage, reportMessage, reactionIcon, editIcon, copyIcon, replyIcon, replyInThreadIcon, forwardIcon, deleteIcon, selectIcon, starIcon, staredIcon, reportIcon, retractVoteIcon, endVoteIcon, reactionIconOrder, openFrequentlyUsedReactions, editIconOrder, copyIconOrder, replyIconOrder, replyInThreadIconOrder, forwardIconOrder, deleteIconOrder, selectIconOrder, starIconOrder, reportIconOrder, infoIconOrder, reactionIconTooltipText, editIconTooltipText, copyIconTooltipText, replyIconTooltipText, replyInThreadIconTooltipText, forwardIconTooltipText, deleteIconTooltipText, selectIconTooltipText, starIconTooltipText, reportIconTooltipText, infoIconTooltipText, messageActionIconsColor, messageStatusSize, messageStatusColor, messageReadStatusColor, messageStateFontSize, messageStateColor, messageTimeFontSize, messageTimeColor, messageStatusAndTimeLineHeight, fileAttachmentsIcon, reactionsDisplayCount, showEachReactionCount, showTotalReactionCount, reactionItemBorder, reactionItemBorderRadius, reactionItemBackground, reactionItemPadding, reactionItemMargin, reactionsFontSize, reactionsContainerBoxShadow, reactionsContainerBorder, reactionsContainerBorderRadius, reactionsContainerBackground, reactionsContainerPadding, reactionsContainerTopPosition, reactionsDetailsPopupBorderRadius, reactionsDetailsPopupHeaderItemsStyle, fileAttachmentsBoxWidth, fileAttachmentsBoxBorder, fileAttachmentsTitleColor, fileAttachmentsSizeColor, imageAttachmentMaxWidth, imageAttachmentMaxHeight, videoAttachmentMaxWidth, videoAttachmentMaxHeight, emojisCategoryIconsPosition, emojisContainerBorderRadius, fixEmojiCategoriesTitleOnTop, sameUserMessageSpacing, differentUserMessageSpacing, selectedMessagesMap, contactsMap, openedMessageMenuId, tabIsActive, connectionStatus, messageTextFontSize, messageTextLineHeight, messageTimeColorOnAttachment, shouldOpenUserProfileForMention, ogMetadataProps, showInfoMessageProps, collapsedCharacterLimit, createChatOnAvatarTap }: IMessageProps) => React.JSX.Element>;
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ message, channel, MessageActionsMenu, CustomMessageItem, handleScrollToRepliedMessage, handleMediaItemClick, stopScrolling, isPendingMessage, prevMessage, nextMessage, setLastVisibleMessageId, queueReadMarker, queueDeliveredMarker, isUnreadMessage, nextMessageStartsUnreadSection, unreadMessageId, isThreadMessage, disableAutoReadTracking, fontFamily, ownMessageOnRightSide, messageWidthPercent, showSenderNameOnDirectChannel, showSenderNameOnGroupChannel, showSenderNameOnOwnMessages, messageStatusAndTimePosition, messageStatusDisplayingType, outgoingMessageStyles, incomingMessageStyles, ownRepliedMessageBackground, incomingRepliedMessageBackground, showOwnAvatar, showMessageStatus, showMessageTimeAndStatusOnlyOnHover, showMessageTime, showMessageStatusForEachMessage, showMessageTimeForEachMessage, hoverBackground, messageReaction, editMessage, copyMessage, replyMessage, replyMessageInThread, deleteMessage, selectMessage, showInfoMessage, allowEditDeleteIncomingMessage, forwardMessage, reportMessage, reactionIcon, editIcon, copyIcon, replyIcon, replyInThreadIcon, forwardIcon, deleteIcon, selectIcon, starIcon, staredIcon, reportIcon, retractVoteIcon, endVoteIcon, reactionIconOrder, openFrequentlyUsedReactions, editIconOrder, copyIconOrder, replyIconOrder, replyInThreadIconOrder, forwardIconOrder, deleteIconOrder, selectIconOrder, starIconOrder, reportIconOrder, infoIconOrder, reactionIconTooltipText, editIconTooltipText, copyIconTooltipText, replyIconTooltipText, replyInThreadIconTooltipText, forwardIconTooltipText, deleteIconTooltipText, selectIconTooltipText, starIconTooltipText, reportIconTooltipText, infoIconTooltipText, messageActionIconsColor, messageStatusSize, messageStatusColor, messageReadStatusColor, messageStateFontSize, messageStateColor, messageTimeFontSize, messageTimeColor, messageStatusAndTimeLineHeight, fileAttachmentsIcon, reactionsDisplayCount, showEachReactionCount, showTotalReactionCount, reactionItemBorder, reactionItemBorderRadius, reactionItemBackground, reactionItemPadding, reactionItemMargin, reactionsFontSize, reactionsContainerBoxShadow, reactionsContainerBorder, reactionsContainerBorderRadius, reactionsContainerBackground, reactionsContainerPadding, reactionsContainerTopPosition, reactionsDetailsPopupBorderRadius, reactionsDetailsPopupHeaderItemsStyle, fileAttachmentsBoxWidth, fileAttachmentsBoxBorder, fileAttachmentsTitleColor, fileAttachmentsSizeColor, imageAttachmentMaxWidth, imageAttachmentMaxHeight, videoAttachmentMaxWidth, videoAttachmentMaxHeight, emojisCategoryIconsPosition, emojisContainerBorderRadius, fixEmojiCategoriesTitleOnTop, sameUserMessageSpacing, differentUserMessageSpacing, selectedMessagesMap, contactsMap, openedMessageMenuId, tabIsActive, connectionStatus, messageTextFontSize, messageTextLineHeight, messageTimeColorOnAttachment, shouldOpenUserProfileForMention, ogMetadataProps, showInfoMessageProps, collapsedCharacterLimit, createChatOnAvatarTap }: IMessageProps) => React.JSX.Element>;
|
|
4
4
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,12 +13,12 @@ export declare const Container: import("styled-components").StyledComponent<"div
|
|
|
13
13
|
newMessagesSeparatorSpaceColor: string;
|
|
14
14
|
dateDividerBorderRadius?: string | undefined;
|
|
15
15
|
newMessagesSeparatorLeftRightSpaceWidth?: string | undefined;
|
|
16
|
-
height?: number | undefined;
|
|
17
16
|
}, never>;
|
|
18
17
|
interface IProps {
|
|
19
18
|
dividerText: string;
|
|
20
19
|
visibility?: boolean;
|
|
21
20
|
unread?: boolean;
|
|
21
|
+
index?: number;
|
|
22
22
|
dateDividerFontSize?: string;
|
|
23
23
|
dateDividerTextColor?: string;
|
|
24
24
|
dateDividerBorder?: string;
|
|
@@ -37,5 +37,5 @@ interface IProps {
|
|
|
37
37
|
marginTop?: string;
|
|
38
38
|
chatBackgroundColor?: string;
|
|
39
39
|
}
|
|
40
|
-
export default function MessageDivider({ dividerText, visibility, unread, dateDividerFontSize, dateDividerTextColor, dateDividerBorder, dateDividerBackgroundColor, dateDividerBorderRadius, newMessagesSeparatorTextColor, newMessagesSeparatorFontSize, newMessagesSeparatorWidth, newMessagesSeparatorBorder, newMessagesSeparatorBorderRadius, newMessagesSeparatorBackground, newMessagesSeparatorLeftRightSpaceWidth, newMessagesSeparatorSpaceColor, noMargin, marginTop, marginBottom, chatBackgroundColor }: IProps): React.JSX.Element;
|
|
40
|
+
export default function MessageDivider({ dividerText, visibility, unread, index, dateDividerFontSize, dateDividerTextColor, dateDividerBorder, dateDividerBackgroundColor, dateDividerBorderRadius, newMessagesSeparatorTextColor, newMessagesSeparatorFontSize, newMessagesSeparatorWidth, newMessagesSeparatorBorder, newMessagesSeparatorBorderRadius, newMessagesSeparatorBackground, newMessagesSeparatorLeftRightSpaceWidth, newMessagesSeparatorSpaceColor, noMargin, marginTop, marginBottom, chatBackgroundColor }: IProps): React.JSX.Element;
|
|
41
41
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface FloatingScrollButtonProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
bottomOffset: number;
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
badgeBackgroundColor: string;
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
count?: number;
|
|
9
|
+
stackedAbove?: boolean;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const FloatingScrollButton: React.FC<FloatingScrollButtonProps>;
|
|
13
|
+
export default FloatingScrollButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ScrollToBottomButtonProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
bottomOffset: number;
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
badgeBackgroundColor: string;
|
|
7
|
+
count: number;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const ScrollToBottomButton: React.FC<ScrollToBottomButtonProps>;
|
|
11
|
+
export default ScrollToBottomButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ScrollToUnreadMentionsButtonProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
bottomOffset: number;
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
badgeBackgroundColor: string;
|
|
7
|
+
count: number;
|
|
8
|
+
stackedAbove?: boolean;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const ScrollToUnreadMentionsButton: React.FC<ScrollToUnreadMentionsButtonProps>;
|
|
12
|
+
export default ScrollToUnreadMentionsButton;
|
|
@@ -215,18 +215,6 @@ export declare const Container: import("styled-components").StyledComponent<"div
|
|
|
215
215
|
backgroundColor?: string | undefined;
|
|
216
216
|
thumbColor: string;
|
|
217
217
|
}, never>;
|
|
218
|
-
export declare const EmptyDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
219
|
-
export declare const MessageTopDate: import("styled-components").StyledComponent<"div", any, {
|
|
220
|
-
topOffset?: number | undefined;
|
|
221
|
-
marginTop?: string | undefined;
|
|
222
|
-
marginBottom?: string | undefined;
|
|
223
|
-
visible?: boolean | undefined;
|
|
224
|
-
dateDividerFontSize?: string | undefined;
|
|
225
|
-
dateDividerTextColor?: string | undefined;
|
|
226
|
-
dateDividerBackgroundColor?: string | undefined;
|
|
227
|
-
dateDividerBorder?: string | undefined;
|
|
228
|
-
dateDividerBorderRadius?: string | undefined;
|
|
229
|
-
}, never>;
|
|
230
218
|
export declare const DragAndDropContainer: import("styled-components").StyledComponent<"div", any, {
|
|
231
219
|
topOffset?: number | undefined;
|
|
232
220
|
height?: number | undefined;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IChannel, IMessage } from '../../../types';
|
|
3
|
+
export declare const PRELOAD_TRIGGER_PX = 5;
|
|
4
|
+
export declare const LATEST_EDGE_GAP_PX = 5;
|
|
5
|
+
declare type TimelineItem = {
|
|
6
|
+
type: 'date-divider';
|
|
7
|
+
key: string;
|
|
8
|
+
label: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: 'unread-divider';
|
|
11
|
+
key: string;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'item';
|
|
14
|
+
key: string;
|
|
15
|
+
localRef: string;
|
|
16
|
+
item: IMessage;
|
|
17
|
+
index: number;
|
|
18
|
+
prevItem: IMessage | null;
|
|
19
|
+
nextItem: IMessage | null;
|
|
20
|
+
isHighlighted: boolean;
|
|
21
|
+
isUnread: boolean;
|
|
22
|
+
nextItemStartsUnreadSection: boolean;
|
|
23
|
+
startsNewDay: boolean;
|
|
24
|
+
registerItemElement: (el: HTMLElement | null) => void;
|
|
25
|
+
};
|
|
26
|
+
export interface UseChatControllerParams {
|
|
27
|
+
messages: IMessage[];
|
|
28
|
+
channel: IChannel;
|
|
29
|
+
hasPrevMessages: boolean;
|
|
30
|
+
hasNextMessages: boolean;
|
|
31
|
+
loadingPrevMessages: number | null;
|
|
32
|
+
loadingNextMessages: number | null;
|
|
33
|
+
connectionStatus: string;
|
|
34
|
+
scrollToNewMessage: {
|
|
35
|
+
scrollToBottom: boolean;
|
|
36
|
+
isIncomingMessage: boolean;
|
|
37
|
+
updateMessageList: boolean;
|
|
38
|
+
};
|
|
39
|
+
scrollToMentionedMessage: boolean | string | null;
|
|
40
|
+
showScrollToNewMessageButton: boolean;
|
|
41
|
+
unreadScrollTo: boolean | string;
|
|
42
|
+
unreadMessageId: string;
|
|
43
|
+
selectedMessagesMap: Map<string, any>;
|
|
44
|
+
allowEditDeleteIncomingMessage: boolean;
|
|
45
|
+
dispatch: (...args: any[]) => void;
|
|
46
|
+
}
|
|
47
|
+
export declare function useChatController({ messages, channel, hasPrevMessages, hasNextMessages, loadingPrevMessages, loadingNextMessages, connectionStatus, scrollToNewMessage, scrollToMentionedMessage, showScrollToNewMessageButton, unreadScrollTo, unreadMessageId, selectedMessagesMap, allowEditDeleteIncomingMessage, dispatch }: UseChatControllerParams): {
|
|
48
|
+
scrollRef: import("react").MutableRefObject<HTMLDivElement | null>;
|
|
49
|
+
setLastVisibleMessageId: (message: IMessage) => void;
|
|
50
|
+
handleScrollToRepliedMessage: (itemId: string, smooth?: boolean) => Promise<void>;
|
|
51
|
+
messagesIndexMapRef: import("react").MutableRefObject<Record<string, number>>;
|
|
52
|
+
timelineItems: TimelineItem[];
|
|
53
|
+
isLoadingPrevious: boolean;
|
|
54
|
+
isLoadingNext: boolean;
|
|
55
|
+
isViewingLatest: boolean;
|
|
56
|
+
isJumpingToItem: boolean;
|
|
57
|
+
pendingNewestCount: number;
|
|
58
|
+
remainingUnreadCount: number;
|
|
59
|
+
jumpToLatest: (smooth?: boolean) => Promise<void>;
|
|
60
|
+
jumpToItem: (itemId: string, smooth?: boolean) => Promise<void>;
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -15,9 +15,11 @@ interface ISystemMessageProps {
|
|
|
15
15
|
backgroundColor?: string;
|
|
16
16
|
borderRadius?: string;
|
|
17
17
|
tabIsActive?: boolean;
|
|
18
|
-
setLastVisibleMessageId?: (
|
|
18
|
+
setLastVisibleMessageId?: (message: IMessage) => void;
|
|
19
|
+
queueReadMarker?: (channelId: string, messageId?: string) => void;
|
|
20
|
+
disableAutoReadTracking?: boolean;
|
|
19
21
|
}
|
|
20
|
-
declare const _default: React.MemoExoticComponent<({ message, nextMessage, connectionStatus, channel, tabIsActive, differentUserMessageSpacing, fontSize, textColor, border, backgroundColor, borderRadius, contactsMap, setLastVisibleMessageId }: ISystemMessageProps) => React.JSX.Element>;
|
|
22
|
+
declare const _default: React.MemoExoticComponent<({ message, nextMessage, connectionStatus, channel, tabIsActive, differentUserMessageSpacing, fontSize, textColor, border, backgroundColor, borderRadius, contactsMap, setLastVisibleMessageId, queueReadMarker, disableAutoReadTracking }: ISystemMessageProps) => React.JSX.Element>;
|
|
21
23
|
export default _default;
|
|
22
24
|
export declare const Container: import("styled-components").StyledComponent<"div", any, {
|
|
23
25
|
topOffset?: number | undefined;
|