sceyt-chat-react-uikit 1.9.0-beta.16 → 1.9.0-beta.18

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.
@@ -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';