sceyt-chat-react-uikit 1.8.4 → 1.8.5-beta.10

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.
@@ -12,8 +12,8 @@ interface AudioPlayerProps {
12
12
  borderRadius?: string;
13
13
  onClose?: () => void;
14
14
  }
15
- declare const AudioPlayer: React.FC<AudioPlayerProps>;
16
- export default AudioPlayer;
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;
@@ -65,6 +65,7 @@ interface ICustomMessageItem {
65
65
  handleOpenUserProfile: (user: IUser) => void;
66
66
  unsupportedMessage: boolean;
67
67
  onInviteLinkClick?: (key: string) => void;
68
+ ifLatestAndHasNotPreview: boolean;
68
69
  }
69
70
  export interface IMessageProps {
70
71
  message: IMessage;
@@ -75,12 +76,16 @@ export interface IMessageProps {
75
76
  prevMessage?: IMessage;
76
77
  nextMessage: IMessage;
77
78
  stopScrolling: (stop: boolean) => void;
78
- setLastVisibleMessageId?: (msgId: string) => void;
79
+ setLastVisibleMessageId?: (message: IMessage) => void;
80
+ queueReadMarker?: (channelId: string, messageId?: string) => void;
81
+ queueDeliveredMarker?: (channelId: string, messageId?: string) => void;
79
82
  handleScrollToRepliedMessage: (msgId: string) => void;
80
83
  handleMediaItemClick?: (attachment: IAttachment) => void;
81
84
  unreadMessageId: string;
82
85
  isUnreadMessage: boolean;
86
+ nextMessageStartsUnreadSection?: boolean;
83
87
  isThreadMessage: boolean;
88
+ disableAutoReadTracking?: boolean;
84
89
  fontFamily?: string;
85
90
  ownMessageOnRightSide?: boolean;
86
91
  messageWidthPercent?: string | number;
@@ -220,7 +225,8 @@ export interface IMessageProps {
220
225
  tabsStyles?: ITabsStyles;
221
226
  listItemStyles?: IListItemStyles;
222
227
  };
223
- collapsedCharacterLimit?: number;
228
+ collapsedLinesLimit?: number;
224
229
  createChatOnAvatarTap?: boolean;
230
+ ifLatestAndHasNotPreview: boolean;
225
231
  }
226
232
  export {};
@@ -138,7 +138,8 @@ interface IMessageBodyProps {
138
138
  ogMetadataProps?: OGMetadataProps;
139
139
  unsupportedMessage: boolean;
140
140
  onInviteLinkClick?: (key: string) => void;
141
- collapsedCharacterLimit?: number;
141
+ ifLatestAndHasNotPreview: boolean;
142
+ collapsedLinesLimit?: number;
142
143
  }
143
- declare const _default: React.MemoExoticComponent<({ message, channel, MessageActionsMenu, handleScrollToRepliedMessage, handleMediaItemClick, isPendingMessage, prevMessage, nextMessage, isUnreadMessage, 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
+ 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, collapsedLinesLimit, ifLatestAndHasNotPreview }: IMessageBodyProps) => React.JSX.Element>;
144
145
  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;
@@ -9,6 +9,8 @@ interface MessageReactionsProps {
9
9
  left: number;
10
10
  right: number;
11
11
  };
12
+ reactionsAnchorTop: number;
13
+ reactionsAnchorBottom: number;
12
14
  rtlDirection: boolean;
13
15
  backgroundSections: string;
14
16
  textPrimary: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IAttachment, IOGMetadata } from '../../../types';
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, collapsedLinesLimit, createChatOnAvatarTap, ifLatestAndHasNotPreview }: 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,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;
@@ -74,6 +74,7 @@ interface MessagesProps {
74
74
  isThreadMessage?: boolean;
75
75
  unsupportedMessage: boolean;
76
76
  onInviteLinkClick?: (key: string) => void;
77
+ ifLatestAndHasNotPreview: boolean;
77
78
  }>;
78
79
  messageReaction?: boolean;
79
80
  editMessage?: boolean;
@@ -204,7 +205,7 @@ interface MessagesProps {
204
205
  listItemStyles?: IListItemStyles;
205
206
  };
206
207
  ogMetadataProps?: OGMetadataProps;
207
- collapsedCharacterLimit?: number;
208
+ collapsedLinesLimit?: number;
208
209
  createChatOnAvatarTap?: boolean;
209
210
  allowSendAttachment?: boolean;
210
211
  }
@@ -215,18 +216,6 @@ export declare const Container: import("styled-components").StyledComponent<"div
215
216
  backgroundColor?: string | undefined;
216
217
  thumbColor: string;
217
218
  }, 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
219
  export declare const DragAndDropContainer: import("styled-components").StyledComponent<"div", any, {
231
220
  topOffset?: number | undefined;
232
221
  height?: number | undefined;
@@ -0,0 +1,63 @@
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
+ ifLatestAndHasNotPreview: boolean;
26
+ };
27
+ export interface UseChatControllerParams {
28
+ messages: IMessage[];
29
+ channel: IChannel;
30
+ hasPrevMessages: boolean;
31
+ hasNextMessages: boolean;
32
+ loadingPrevMessages: number | null;
33
+ loadingNextMessages: number | null;
34
+ connectionStatus: string;
35
+ scrollToNewMessage: {
36
+ scrollToBottom: boolean;
37
+ isIncomingMessage: boolean;
38
+ updateMessageList: boolean;
39
+ };
40
+ scrollToMentionedMessage: boolean | string | null;
41
+ showScrollToNewMessageButton: boolean;
42
+ unreadScrollTo: boolean | string;
43
+ unreadMessageId: string;
44
+ selectedMessagesMap: Map<string, any>;
45
+ allowEditDeleteIncomingMessage: boolean;
46
+ dispatch: (...args: any[]) => void;
47
+ }
48
+ export declare function useChatController({ messages, channel, hasPrevMessages, hasNextMessages, loadingPrevMessages, loadingNextMessages, connectionStatus, scrollToNewMessage, scrollToMentionedMessage, showScrollToNewMessageButton, unreadScrollTo, unreadMessageId, selectedMessagesMap, allowEditDeleteIncomingMessage, dispatch }: UseChatControllerParams): {
49
+ scrollRef: import("react").MutableRefObject<HTMLDivElement | null>;
50
+ setLastVisibleMessageId: (message: IMessage) => void;
51
+ handleScrollToRepliedMessage: (itemId: string, smooth?: boolean) => Promise<void>;
52
+ messagesIndexMapRef: import("react").MutableRefObject<Record<string, number>>;
53
+ timelineItems: TimelineItem[];
54
+ isLoadingPrevious: boolean;
55
+ isLoadingNext: boolean;
56
+ isViewingLatest: boolean;
57
+ isJumpingToItem: boolean;
58
+ pendingNewestCount: number;
59
+ remainingUnreadCount: number;
60
+ jumpToLatest: (smooth?: boolean) => Promise<void>;
61
+ jumpToItem: (itemId: string, smooth?: boolean) => Promise<void>;
62
+ };
63
+ export {};
@@ -15,9 +15,11 @@ interface ISystemMessageProps {
15
15
  backgroundColor?: string;
16
16
  borderRadius?: string;
17
17
  tabIsActive?: boolean;
18
- setLastVisibleMessageId?: (messageId: string) => void;
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;
@@ -71,6 +71,7 @@ interface MessagesProps {
71
71
  isThreadMessage?: boolean;
72
72
  handleRetractVote?: () => void;
73
73
  handleEndVote?: () => void;
74
+ ifLatestAndHasNotPreview: boolean;
74
75
  }>;
75
76
  showOwnAvatar?: boolean;
76
77
  messageReaction?: boolean;
@@ -202,7 +203,7 @@ interface MessagesProps {
202
203
  listItemStyles?: IListItemStyles;
203
204
  };
204
205
  ogMetadataProps?: OGMetadataProps;
205
- collapsedCharacterLimit?: number;
206
+ collapsedLinesLimit?: number;
206
207
  createChatOnAvatarTap?: boolean;
207
208
  allowSendAttachment?: boolean;
208
209
  }