sceyt-chat-react-uikit 1.9.1-beta.1 → 1.9.1-beta.11

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.
@@ -99,6 +99,7 @@ export declare const DraftMessageTitle: import("styled-components").StyledCompon
99
99
  }, never>;
100
100
  export declare const DraftMessageText: import("styled-components").StyledComponent<"span", any, {
101
101
  color: string;
102
+ flex: boolean;
102
103
  }, never>;
103
104
  export declare const LastMessageAuthor: import("styled-components").StyledComponent<"div", any, {
104
105
  color: string;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Animate only layout moves caused by a change in channel order.
4
+ * Rows must be direct children of the list, carry `data-channel-row-id`, and the
5
+ * list must be their offset parent (positioned) so offsetTop shares the list's
6
+ * scroll coordinates.
7
+ */
8
+ export declare const useChannelReorderAnimation: (channels: {
9
+ id: string;
10
+ }[]) => import("react").MutableRefObject<HTMLDivElement | null>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IAttachment, IChannel, ICustomAvatarColors, IMember, IMessage, IUser } from '../../types';
2
+ import { IAttachment, IChannel, IContact, ICustomAvatarColors, IMember, IMessage, IUser } from '../../types';
3
3
  import { InviteLinkOptions } from '../../helpers/channelHalper';
4
4
  export interface IProgress {
5
5
  loaded: number;
@@ -84,6 +84,7 @@ export interface IChatClientProps {
84
84
  updateMembersEvent?: (channelId: string, updatedMembers: IMember[], members: IMember[]) => IMember[];
85
85
  } | null;
86
86
  showOwnMessageForward?: boolean;
87
+ contacts?: IContact[] | null;
87
88
  }
88
- declare const SceytChatContainer: ({ client, theme, themeMode, avatarColors, children, showOnlyContactUsers, handleNewMessages, sendAttachmentsAsSeparateMessages, membersDisplayTextByChannelTypesMap, defaultRolesByChannelTypesMap, channelTypeFilter, logoSrc, CustomUploader, showNotifications, hideUserPresence, openChatOnUserInteraction, autoSelectFirstChannel, logLevel, memberCount, disableFrowardMentionsCount, chatMinWidth, baseUrlForInviteMembers, useInviteLink, inviteLinkOptions, embeddedJoinGroupPopup, onUpdateChannel, disappearingSettings, customLoadMembersFunctions, showOwnMessageForward }: IChatClientProps) => React.JSX.Element;
89
+ declare const SceytChatContainer: ({ client, theme, themeMode, avatarColors, children, showOnlyContactUsers, handleNewMessages, sendAttachmentsAsSeparateMessages, membersDisplayTextByChannelTypesMap, defaultRolesByChannelTypesMap, channelTypeFilter, logoSrc, CustomUploader, showNotifications, hideUserPresence, openChatOnUserInteraction, autoSelectFirstChannel, logLevel, memberCount, disableFrowardMentionsCount, chatMinWidth, baseUrlForInviteMembers, useInviteLink, inviteLinkOptions, embeddedJoinGroupPopup, onUpdateChannel, disappearingSettings, customLoadMembersFunctions, showOwnMessageForward, contacts }: IChatClientProps) => React.JSX.Element;
89
90
  export default SceytChatContainer;
@@ -28,6 +28,7 @@ declare type TimelineItem = {
28
28
  export interface UseChatControllerParams {
29
29
  messages: IMessage[];
30
30
  channel: IChannel;
31
+ openAtLatest?: boolean;
31
32
  hasPrevMessages: boolean;
32
33
  hasNextMessages: boolean;
33
34
  loadingPrevMessages: number | null;
@@ -49,7 +50,7 @@ export interface UseChatControllerParams {
49
50
  tabIsActive?: boolean;
50
51
  }
51
52
  export declare const formatMessageDateLabel: (message: IMessage) => string;
52
- export declare function useChatController({ messages, channel, hasPrevMessages, hasNextMessages, loadingPrevMessages, loadingNextMessages, connectionStatus, scrollToNewMessage, scrollToMentionedMessage, showScrollToNewMessageButton, unreadScrollTo, unreadMessageId, visibleMessagesMap, selectedMessagesMap, allowEditDeleteIncomingMessage, tabIsActive, dispatch }: UseChatControllerParams): {
53
+ export declare function useChatController({ messages, channel, openAtLatest, hasPrevMessages, hasNextMessages, loadingPrevMessages, loadingNextMessages, connectionStatus, scrollToNewMessage, scrollToMentionedMessage, showScrollToNewMessageButton, unreadScrollTo, unreadMessageId, visibleMessagesMap, selectedMessagesMap, allowEditDeleteIncomingMessage, tabIsActive, dispatch }: UseChatControllerParams): {
53
54
  scrollRef: import("react").MutableRefObject<HTMLDivElement | null>;
54
55
  setLastVisibleMessageId: (message: IMessage) => void;
55
56
  handleScrollToRepliedMessage: (itemId: string, smooth?: boolean) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { IChatClientProps } from '../ChatContainer';
3
- declare const SceytChat: ({ client, theme, themeMode, avatarColors, children, showOnlyContactUsers, logoSrc, CustomUploader, handleNewMessages, sendAttachmentsAsSeparateMessages, membersDisplayTextByChannelTypesMap, channelTypeFilter, defaultRolesByChannelTypesMap, hideUserPresence, showNotifications, openChatOnUserInteraction, autoSelectFirstChannel, memberCount, disableFrowardMentionsCount, chatMinWidth, embeddedJoinGroupPopup, onUpdateChannel }: IChatClientProps) => React.JSX.Element;
3
+ declare const SceytChat: ({ client, theme, themeMode, avatarColors, children, showOnlyContactUsers, logoSrc, CustomUploader, handleNewMessages, sendAttachmentsAsSeparateMessages, membersDisplayTextByChannelTypesMap, channelTypeFilter, defaultRolesByChannelTypesMap, hideUserPresence, showNotifications, openChatOnUserInteraction, autoSelectFirstChannel, memberCount, disableFrowardMentionsCount, chatMinWidth, embeddedJoinGroupPopup, onUpdateChannel, contacts }: IChatClientProps) => React.JSX.Element;
4
4
  export default SceytChat;
5
5
  export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -8,19 +8,15 @@ export declare class MentionTypeaheadOption extends MenuOption {
8
8
  avatarUrl?: string;
9
9
  constructor(name: string, id: string, presence?: any, avatarUrl?: string);
10
10
  }
11
- export default function MentionsPlugin({ contactsMap, userId, getFromContacts, setMentionMember, setMentionsIsOpen, members, channelId }: {
11
+ export default function MentionsPlugin({ contactsMap, userId, getFromContacts, setMentionMember, members, channelId }: {
12
12
  contactsMap: IContactsMap;
13
13
  userId: string;
14
14
  getFromContacts?: boolean;
15
15
  setMentionMember: (member: any) => void;
16
- setMentionsIsOpen: (state: boolean) => void;
17
16
  members: IMember[];
18
17
  channelId?: string;
19
18
  }): JSX.Element | null;
20
- export declare const MentionsContainerWrapper: import("styled-components").StyledComponent<"div", any, {
21
- mentionsIsOpen?: boolean | undefined;
22
- ref?: any;
23
- }, never>;
19
+ export declare const MentionsContainerWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
24
20
  export declare const MemberItem: import("styled-components").StyledComponent<"li", any, {
25
21
  isActiveItem?: boolean | undefined;
26
22
  activeBackgroundColor: string;
@@ -0,0 +1,8 @@
1
+ declare type DraftMentionSegment = {
2
+ text: string;
3
+ mentionId?: string;
4
+ mentionedUser?: any;
5
+ };
6
+ /** Splits a serialized draft into plain text and mention ranges for editor restoration. */
7
+ export declare const getDraftMentionSegments: (text: string, bodyAttributes?: any[], mentionedUsers?: any[]) => DraftMentionSegment[];
8
+ export {};