sceyt-chat-react-uikit 1.9.0-beta.9 → 1.9.0

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.
@@ -32,6 +32,8 @@ interface IChannelListProps {
32
32
  searchInputBorderRadius?: string;
33
33
  searchChannelsPadding?: string;
34
34
  getSelectedChannel?: (channel: IChannel) => void;
35
+ /** Called whenever the raw channel-search input changes, including clear. */
36
+ onSearchValueChange?: (value: string) => void;
35
37
  filter?: {
36
38
  channelType?: string;
37
39
  };
@@ -74,6 +74,7 @@ interface ICustomMessageItem {
74
74
  isThreadMessage?: boolean;
75
75
  handleOpenUserProfile: (user: IUser) => void;
76
76
  unsupportedMessage: boolean;
77
+ isPinnedMessagesList?: boolean;
77
78
  onInviteLinkClick?: (key: string) => void;
78
79
  ifLatestAndHasNotPreview: boolean;
79
80
  }
@@ -31,6 +31,7 @@ interface MessageReactionsProps {
31
31
  reactionsContainerPadding?: string;
32
32
  reactionsDetailsPopupBorderRadius?: string;
33
33
  reactionsDetailsPopupHeaderItemsStyle?: 'bubbles' | 'inline';
34
+ popupZIndex?: number;
34
35
  onToggleReactionsPopup: () => void;
35
36
  onReactionAddDelete: (selectedEmoji: string) => void;
36
37
  onOpenUserProfile: (user?: any) => void;
@@ -106,6 +106,13 @@ interface MessagesProps {
106
106
  endVoteIcon?: JSX.Element;
107
107
  /** Replaces the default pin icon in the pinned-messages banner. */
108
108
  pinnedMessageIcon?: JSX.Element;
109
+ /**
110
+ * Replaces the compact pinned-message preview for app-specific message
111
+ * types. Return null or undefined to use the UIKit preview.
112
+ */
113
+ renderPinnedMessagePreview?: (message: IMessage, context: {
114
+ placement: 'banner' | 'system';
115
+ }) => React.ReactNode | null | undefined;
109
116
  messageStatusSize?: string;
110
117
  messageStatusColor?: string;
111
118
  messageReadStatusColor?: string;
@@ -1,7 +1,15 @@
1
1
  import React from 'react';
2
- declare const PinnedMessagesBanner: ({ channelId, pinIcon, onOpenList }: {
2
+ import { IMessage } from '../../types';
3
+ declare const PinnedMessagesBanner: ({ channelId, pinIcon, onOpenList, renderPinnedMessagePreview }: {
3
4
  channelId: string;
4
5
  pinIcon?: JSX.Element | undefined;
5
6
  onOpenList?: (() => void) | undefined;
7
+ /**
8
+ * Lets an integrator replace the compact preview for app-specific message
9
+ * types. Return null or undefined to keep the UIKit preview.
10
+ */
11
+ renderPinnedMessagePreview?: ((message: IMessage, context: {
12
+ placement: 'banner' | 'system';
13
+ }) => React.ReactNode | null | undefined) | undefined;
6
14
  }) => React.JSX.Element | null;
7
15
  export default PinnedMessagesBanner;
@@ -14,8 +14,12 @@ interface ISystemMessageProps {
14
14
  backgroundColor?: string;
15
15
  borderRadius?: string;
16
16
  setLastVisibleMessageId?: (message: IMessage) => void;
17
+ /** Replaces a PM source-message preview for app-specific message types. */
18
+ renderPinnedMessagePreview?: (message: IMessage, context: {
19
+ placement: 'banner' | 'system';
20
+ }) => React.ReactNode | null | undefined;
17
21
  }
18
- declare const _default: React.MemoExoticComponent<({ message, nextMessage, channel, differentUserMessageSpacing, fontSize, textColor, border, backgroundColor, borderRadius, contactsMap, setLastVisibleMessageId }: ISystemMessageProps) => React.JSX.Element>;
22
+ declare const _default: React.MemoExoticComponent<({ message, nextMessage, channel, differentUserMessageSpacing, fontSize, textColor, border, backgroundColor, borderRadius, contactsMap, setLastVisibleMessageId, renderPinnedMessagePreview }: ISystemMessageProps) => React.JSX.Element>;
19
23
  export default _default;
20
24
  export declare const Container: import("styled-components").StyledComponent<"div", any, {
21
25
  topOffset?: number | undefined;
@@ -99,6 +99,13 @@ interface MessagesProps {
99
99
  endVoteIcon?: JSX.Element;
100
100
  /** Replaces the default pin icon in the pinned-messages banner. */
101
101
  pinnedMessageIcon?: JSX.Element;
102
+ /**
103
+ * Replaces the compact pinned-message preview for app-specific message
104
+ * types. Return null or undefined to use the UIKit preview.
105
+ */
106
+ renderPinnedMessagePreview?: (message: IMessage, context: {
107
+ placement: 'banner' | 'system';
108
+ }) => React.ReactNode | null | undefined;
102
109
  openFrequentlyUsedReactions?: boolean;
103
110
  fixEmojiCategoriesTitleOnTop?: boolean;
104
111
  emojisCategoryIconsPosition?: 'top' | 'bottom';
@@ -0,0 +1,24 @@
1
+ export declare type ComposerDraft = {
2
+ text: string;
3
+ mentionedUsers: any[];
4
+ messageForReply: any;
5
+ editorState: any;
6
+ bodyAttributes: any;
7
+ attachments: any[];
8
+ viewOnce: boolean;
9
+ };
10
+ export declare type DraftHandoff = {
11
+ channelId: string;
12
+ draft: ComposerDraft;
13
+ persist: boolean;
14
+ };
15
+ declare type ComposerState = ComposerDraft & {
16
+ channelId: string;
17
+ nextChannelId: string;
18
+ };
19
+ /**
20
+ * Returns the only draft write allowed while the active chat changes. The
21
+ * composer values belong to `channelId`, never to `nextChannelId`.
22
+ */
23
+ export declare const getDraftHandoff: ({ channelId, nextChannelId, text, mentionedUsers, messageForReply, editorState, bodyAttributes, attachments, viewOnce }: ComposerState) => DraftHandoff | null;
24
+ export {};
@@ -1,6 +1,7 @@
1
1
  export declare const hasSendableTextOrPoll: (messageText: string, isPoll: boolean) => boolean;
2
2
  export declare const DEFAULT_MEDIA_EXTENSIONS: string[];
3
3
  export declare const isDefaultSupportedMediaMimeType: (mimeType: string) => boolean;
4
+ export declare const getClipboardFiles: (clipboardData: Pick<DataTransfer, 'files' | 'items'>) => File[];
4
5
  declare type MediaAttachmentValidationOptions = {
5
6
  allowedExtensions?: string[];
6
7
  sizeLimitKb?: number;