sceyt-chat-react-uikit 1.9.0 → 1.9.1-beta.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.
@@ -10,10 +10,11 @@ declare type ScrollContainerComponent = React.ComponentType<any>;
10
10
  declare type MessagesContainerComponent = React.ComponentType<{
11
11
  children?: React.ReactNode;
12
12
  }>;
13
- declare const PinnedMessagesList: ({ channelId, onClose, closeRequested, renderMessage, ScrollContainer, MessagesContainer }: {
13
+ declare const PinnedMessagesList: ({ channelId, onClose, closeRequested, selectionIsActive, renderMessage, ScrollContainer, MessagesContainer }: {
14
14
  channelId: string;
15
15
  onClose: () => void;
16
16
  closeRequested?: boolean | undefined;
17
+ selectionIsActive?: boolean | undefined;
17
18
  renderMessage: RenderPinnedMessage;
18
19
  ScrollContainer: ScrollContainerComponent;
19
20
  MessagesContainer: MessagesContainerComponent;
@@ -1,5 +1,26 @@
1
1
  /// <reference types="react" />
2
2
  import { IMessage, IMember } from '../../../types';
3
+ interface SerializedEditorChild {
4
+ type: string;
5
+ text: string;
6
+ format: number;
7
+ mentionName?: string;
8
+ mentionText?: string;
9
+ metadata?: string;
10
+ }
11
+ interface OffsetRange {
12
+ start: number;
13
+ end: number;
14
+ }
15
+ /**
16
+ * Converts Lexical's display text into the wire format used by message
17
+ * attributes. A mention is only converted to its ID token while its text has
18
+ * not been changed by the user. Once edited, it becomes ordinary text.
19
+ */
20
+ export declare function serializeFormattedMessage(messageText: string, children: SerializedEditorChild[], offsetList: OffsetRange[]): {
21
+ messageText: string;
22
+ bodyAttributes: any[];
23
+ };
3
24
  export default function FormatMessagePlugin({ editorState, setMessageBodyAttributes, setMessageText, setMentionedMember, messageToEdit, activeChannelMembers, contactsMap, getFromContacts }: {
4
25
  editorState: any;
5
26
  setMessageBodyAttributes: (data: any) => void;
@@ -10,3 +31,4 @@ export default function FormatMessagePlugin({ editorState, setMessageBodyAttribu
10
31
  contactsMap: any;
11
32
  getFromContacts: boolean;
12
33
  }): JSX.Element | null;
34
+ export {};
@@ -2,7 +2,10 @@ import type { Spread, DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNo
2
2
  import { TextNode } from 'lexical';
3
3
  export declare type SerializedMentionNode = Spread<{
4
4
  mentionName: string;
5
+ /** The label inserted into the editor, used to detect later text edits. */
6
+ mentionText?: string;
5
7
  }, SerializedTextNode>;
8
+ export declare function isMentionTextUnchanged(originalText: string | null | undefined, currentText: string): boolean;
6
9
  export declare class MentionNode extends TextNode {
7
10
  __mention: any;
8
11
  mentionId: string;
@@ -12,6 +15,8 @@ export declare class MentionNode extends TextNode {
12
15
  constructor(mention: any, text?: string, key?: NodeKey);
13
16
  exportJSON(): SerializedMentionNode;
14
17
  createDOM(config: EditorConfig): HTMLElement;
18
+ updateDOM(prevNode: MentionNode, dom: HTMLElement, config: EditorConfig): boolean;
19
+ private isUnchangedMention;
15
20
  exportDOM(): DOMExportOutput;
16
21
  static importDOM(): DOMConversionMap | null;
17
22
  isTextEntity(): true;
@@ -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;