;
const ActiveChannelsContext = React.createContext({ current: [] } as ActiveChannels);
@@ -17,26 +13,3 @@ export const ActiveChannelsProvider = ({
export const useActiveChannelsRefContext = () =>
useContext(ActiveChannelsContext) as unknown as ActiveChannels;
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withActiveChannelsRefContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withActiveChannelsRefContext = (
- Component: React.ComponentType
,
-): React.ComponentType> => {
- const WithActiveChannelsContextComponent = (props: Omit) => {
- const ActiveChannelsContext = useActiveChannelsRefContext();
-
- return ;
- };
- WithActiveChannelsContextComponent.displayName = `WithActiveChannelsContext${getDisplayName(
- Component,
- )}`;
- return WithActiveChannelsContextComponent;
-};
diff --git a/package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx b/package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx
index d89de3b6d..1c235d356 100644
--- a/package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx
+++ b/package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx
@@ -2,10 +2,9 @@ import React, { PropsWithChildren, useContext, useEffect, useState } from 'react
import { BottomSheetHandleProps } from '@gorhom/bottom-sheet';
-import type { Asset, DefaultStreamChatGenerics, File } from '../../types/types';
+import type { Asset, File } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type AttachmentPickerIconProps = {
@@ -158,30 +157,3 @@ export const useAttachmentPickerContext = () => {
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withAttachmentPickerContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withAttachmentPickerContext = <
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType> => {
- const WithAttachmentPickerContextComponent = (
- props: Omit,
- ) => {
- const attachmentPickerContext = useAttachmentPickerContext();
-
- return ;
- };
- WithAttachmentPickerContextComponent.displayName = `WithAttachmentPickerContext${getDisplayName(
- Component as React.ComponentType,
- )}`;
- return WithAttachmentPickerContextComponent;
-};
diff --git a/package/src/contexts/channelContext/ChannelContext.tsx b/package/src/contexts/channelContext/ChannelContext.tsx
index 6e276058a..fbf3b0464 100644
--- a/package/src/contexts/channelContext/ChannelContext.tsx
+++ b/package/src/contexts/channelContext/ChannelContext.tsx
@@ -5,10 +5,9 @@ import type { Channel, ChannelState } from 'stream-chat';
import type { EmptyStateProps } from '../../components/Indicators/EmptyStateIndicator';
import type { LoadingProps } from '../../components/Indicators/LoadingIndicator';
import { StickyHeaderProps } from '../../components/MessageList/StickyHeader';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type ChannelContextValue<
@@ -78,24 +77,7 @@ export type ChannelContextValue<
* @param messageId If undefined, channel will be loaded at most recent message.
*/
loadChannelAroundMessage: ({ messageId }: { messageId?: string }) => Promise;
- /**
- * @deprecated use loadChannelAroundMessage instead
- *
- * Loads channel at specific message
- *
- * @param messageId If undefined, channel will be loaded at most recent message.
- * @param before Number of message to query before messageId
- * @param after Number of message to query after messageId
- */
- loadChannelAtMessage: ({
- after,
- before,
- messageId,
- }: {
- after?: number;
- before?: number;
- messageId?: string;
- }) => Promise;
+
loading: boolean;
/**
* Custom loading indicator to override the Stream default
@@ -223,29 +205,3 @@ export const useChannelContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withChannelContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withChannelContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithChannelContextComponent = (
- props: Omit>,
- ) => {
- const channelContext = useChannelContext();
-
- return ;
- };
- WithChannelContextComponent.displayName = `WithChannelContext${getDisplayName(Component)}`;
- return WithChannelContextComponent;
-};
diff --git a/package/src/contexts/channelsContext/ChannelsContext.tsx b/package/src/contexts/channelsContext/ChannelsContext.tsx
index 6a61fc63e..8cf38d706 100644
--- a/package/src/contexts/channelsContext/ChannelsContext.tsx
+++ b/package/src/contexts/channelsContext/ChannelsContext.tsx
@@ -16,10 +16,9 @@ import type { ChannelPreviewUnreadCountProps } from '../../components/ChannelPre
import type { EmptyStateProps } from '../../components/Indicators/EmptyStateIndicator';
import type { LoadingErrorProps } from '../../components/Indicators/LoadingErrorIndicator';
import type { LoadingProps } from '../../components/Indicators/LoadingIndicator';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type ChannelsContextValue<
@@ -240,29 +239,3 @@ export const useChannelsContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withChannelsContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withChannelsContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithChannelsContextComponent = (
- props: Omit>,
- ) => {
- const channelsContext = useChannelsContext();
-
- return ;
- };
- WithChannelsContextComponent.displayName = `WithChannelsContext${getDisplayName(Component)}`;
- return WithChannelsContextComponent;
-};
diff --git a/package/src/contexts/channelsStateContext/ChannelsStateContext.tsx b/package/src/contexts/channelsStateContext/ChannelsStateContext.tsx
index 7869b6dec..32f0c68c6 100644
--- a/package/src/contexts/channelsStateContext/ChannelsStateContext.tsx
+++ b/package/src/contexts/channelsStateContext/ChannelsStateContext.tsx
@@ -8,7 +8,7 @@ import React, {
useRef,
} from 'react';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { ActiveChannelsProvider } from '../activeChannelsRefContext/ActiveChannelsRefContext';
import type { ChannelContextValue } from '../channelContext/ChannelContext';
@@ -17,7 +17,6 @@ import type { ThreadContextValue } from '../threadContext/ThreadContext';
import type { TypingContextValue } from '../typingContext/TypingContext';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type ChannelState<
@@ -198,31 +197,3 @@ export const useChannelsStateContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withChannelsStateContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withChannelsStateContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithChannelsStateContextComponent = (
- props: Omit>,
- ) => {
- const channelsStateContext = useChannelsStateContext();
-
- return ;
- };
- WithChannelsStateContextComponent.displayName = `WithChannelsStateContext${getDisplayName(
- Component,
- )}`;
- return WithChannelsStateContextComponent;
-};
diff --git a/package/src/contexts/chatContext/ChatContext.tsx b/package/src/contexts/chatContext/ChatContext.tsx
index 79dc046ae..cfc3ef99a 100644
--- a/package/src/contexts/chatContext/ChatContext.tsx
+++ b/package/src/contexts/chatContext/ChatContext.tsx
@@ -3,10 +3,9 @@ import type { ImageProps } from 'react-native';
import type { AppSettingsAPIResponse, Channel, Mute, StreamChat } from 'stream-chat';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type ChatContextValue<
@@ -99,27 +98,3 @@ export const useChatContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withChatContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withChatContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithChatContextComponent = (props: Omit>) => {
- const chatContext = useChatContext();
-
- return ;
- };
- WithChatContextComponent.displayName = `WithChatContext${getDisplayName(Component)}`;
- return WithChatContextComponent;
-};
diff --git a/package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx b/package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx
index affcd8738..094ec4e1c 100644
--- a/package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx
+++ b/package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx
@@ -4,7 +4,6 @@ import type { MessageType } from '../../components/MessageList/hooks/useMessageL
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
type SelectedMessage = {
@@ -64,31 +63,3 @@ export const useImageGalleryContext = <
return contextValue as ImageGalleryContextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withImageGalleryContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withImageGalleryContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithImageGalleryContextComponent = (
- props: Omit>,
- ) => {
- const imageGalleryContext = useImageGalleryContext();
-
- return ;
- };
- WithImageGalleryContextComponent.displayName = `WithImageGalleryContext${getDisplayName(
- Component,
- )}`;
- return WithImageGalleryContextComponent;
-};
diff --git a/package/src/contexts/keyboardContext/KeyboardContext.tsx b/package/src/contexts/keyboardContext/KeyboardContext.tsx
index 5a1cd139a..f3fa23b7d 100644
--- a/package/src/contexts/keyboardContext/KeyboardContext.tsx
+++ b/package/src/contexts/keyboardContext/KeyboardContext.tsx
@@ -2,9 +2,6 @@ import React, { useContext } from 'react';
import { Keyboard } from 'react-native';
-import type { DefaultStreamChatGenerics } from '../../types/types';
-import { getDisplayName } from '../utils/getDisplayName';
-
export type KeyboardContextValue = {
dismissKeyboard: () => void;
};
@@ -22,30 +19,3 @@ export const KeyboardProvider = ({ children, value }: Props) => (
);
export const useKeyboardContext = () => useContext(KeyboardContext);
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withKeyboardContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withKeyboardContext = <
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType> => {
- const WithKeyboardContextComponent = (
- props: Omit,
- ) => {
- const keyboardContext = useKeyboardContext();
-
- return ;
- };
- WithKeyboardContextComponent.displayName = `WithKeyboardContext${getDisplayName(
- Component as React.ComponentType,
- )}`;
- return WithKeyboardContextComponent;
-};
diff --git a/package/src/contexts/messageContext/MessageContext.tsx b/package/src/contexts/messageContext/MessageContext.tsx
index e482e19f5..796ed6b7d 100644
--- a/package/src/contexts/messageContext/MessageContext.tsx
+++ b/package/src/contexts/messageContext/MessageContext.tsx
@@ -13,11 +13,9 @@ import type { ChannelContextValue } from '../../contexts/channelContext/ChannelC
import type { MessageContentType } from '../../contexts/messagesContext/MessagesContext';
import type { DeepPartial } from '../../contexts/themeContext/ThemeContext';
import type { Theme } from '../../contexts/themeContext/utils/theme';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
-
export type Alignment = 'right' | 'left';
export type MessageContextValue<
@@ -38,46 +36,6 @@ export type MessageContextValue<
groupStyles: GroupType[];
/** Handler for actions. Actions in combination with attachments can be used to build [commands](https://getstream.io/chat/docs/#channel_commands). */
handleAction: ActionHandler;
- /**
- * @deprecated
- * @returns Promise
- */
- handleCopyMessage: () => void;
- /**
- * @deprecated
- * @returns Promise
- */
- handleDeleteMessage: () => void;
- /**
- * @deprecated
- * @returns Promise
- */
- handleEditMessage: () => void;
- /**
- * @deprecated
- * @returns Promise
- */
- handleFlagMessage: () => void;
- /**
- * @deprecated
- * @returns Promise
- */
- handleQuotedReplyMessage: () => void;
- /**
- * @deprecated
- * @returns Promise
- */
- handleResendMessage: () => Promise;
- /**
- * @deprecated
- * @returns Promise
- */
- handleToggleBanUser: () => Promise;
- /**
- * @deprecated
- * @returns Promise
- */
- handleToggleMuteUser: () => Promise;
handleToggleReaction: (reactionType: string) => Promise;
/** Whether or not message has reactions */
hasReactions: boolean;
@@ -170,29 +128,3 @@ export const useMessageContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withMessageContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withMessageContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithMessageContextComponent = (
- props: Omit>,
- ) => {
- const messageContext = useMessageContext();
-
- return ;
- };
- WithMessageContextComponent.displayName = `WithMessageContext${getDisplayName(Component)}`;
- return WithMessageContextComponent;
-};
diff --git a/package/src/contexts/messageInputContext/MessageInputContext.tsx b/package/src/contexts/messageInputContext/MessageInputContext.tsx
index 5fa70fbec..d923b1509 100644
--- a/package/src/contexts/messageInputContext/MessageInputContext.tsx
+++ b/package/src/contexts/messageInputContext/MessageInputContext.tsx
@@ -67,7 +67,6 @@ import {
FileTypes,
FileUpload,
ImageUpload,
- UnknownType,
} from '../../types/types';
import {
ACITriggerSettings,
@@ -92,7 +91,6 @@ import { useThreadContext } from '../threadContext/ThreadContext';
import { useTranslationContext } from '../translationContext/TranslationContext';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
/**
@@ -1468,31 +1466,3 @@ export const useMessageInputContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withMessageInputContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withMessageInputContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithMessageInputContextComponent = (
- props: Omit>,
- ) => {
- const messageInputContext = useMessageInputContext();
-
- return ;
- };
- WithMessageInputContextComponent.displayName = `WithMessageInputContext${getDisplayName(
- Component,
- )}`;
- return WithMessageInputContextComponent;
-};
diff --git a/package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx b/package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx
index b5d3d3aa0..7b57ffc8b 100644
--- a/package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx
+++ b/package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx
@@ -15,7 +15,7 @@ import type {
import type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';
import type { OverlayReactionsProps } from '../../components/MessageOverlay/OverlayReactions';
import type { OverlayReactionsAvatarProps } from '../../components/MessageOverlay/OverlayReactionsAvatar';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import type { ReactionData } from '../../utils/utils';
import type { ChatContextValue } from '../chatContext/ChatContext';
import type { Alignment, MessageContextValue } from '../messageContext/MessageContext';
@@ -23,7 +23,6 @@ import type { MessagesContextValue } from '../messagesContext/MessagesContext';
import type { OwnCapabilitiesContextValue } from '../ownCapabilitiesContext/OwnCapabilitiesContext';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type MessageOverlayData<
@@ -117,31 +116,3 @@ export const useMessageOverlayContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withMessageOverlayContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withMessageOverlayContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithMessageOverlayContextComponent = (
- props: Omit>,
- ) => {
- const messageContext = useMessageOverlayContext();
-
- return ;
- };
- WithMessageOverlayContextComponent.displayName = `WithMessageOverlayContext${getDisplayName(
- Component,
- )}`;
- return WithMessageOverlayContextComponent;
-};
diff --git a/package/src/contexts/messagesContext/MessagesContext.tsx b/package/src/contexts/messagesContext/MessagesContext.tsx
index 0dacf0cd9..1b37f3a92 100644
--- a/package/src/contexts/messagesContext/MessagesContext.tsx
+++ b/package/src/contexts/messagesContext/MessagesContext.tsx
@@ -48,7 +48,7 @@ import type { getGroupStyles } from '../../components/MessageList/utils/getGroup
import type { MessageActionType } from '../../components/MessageOverlay/MessageActionListItem';
import type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';
import type { ReplyProps } from '../../components/Reply/Reply';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import type { ReactionData } from '../../utils/utils';
import type { Alignment } from '../messageContext/MessageContext';
import type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';
@@ -56,7 +56,6 @@ import type { DeepPartial } from '../themeContext/ThemeContext';
import type { Theme } from '../themeContext/utils/theme';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';
@@ -320,12 +319,6 @@ export type MessagesContextValue<
* @param message
*/
handleBan?: (message: MessageType) => Promise;
- /**
- * @deprecated
- * Handler to access when a block user action is invoked.
- * @param message
- */
- handleBlock?: (message: MessageType) => Promise;
/** Handler to access when a copy message action is invoked */
handleCopy?: (message: MessageType) => Promise;
/** Handler to access when a delete message action is invoked */
@@ -546,29 +539,3 @@ export const useMessagesContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withMessagesContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withMessagesContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithMessagesContextComponent = (
- props: Omit>,
- ) => {
- const messagesContext = useMessagesContext();
-
- return ;
- };
- WithMessagesContextComponent.displayName = `WithMessagesContext${getDisplayName(Component)}`;
- return WithMessagesContextComponent;
-};
diff --git a/package/src/contexts/overlayContext/OverlayContext.tsx b/package/src/contexts/overlayContext/OverlayContext.tsx
index 525e9f506..2fb359179 100644
--- a/package/src/contexts/overlayContext/OverlayContext.tsx
+++ b/package/src/contexts/overlayContext/OverlayContext.tsx
@@ -15,7 +15,6 @@ import type { DeepPartial } from '../themeContext/ThemeContext';
import type { Theme } from '../themeContext/utils/theme';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type Overlay = 'alert' | 'gallery' | 'message' | 'none';
@@ -73,14 +72,6 @@ export type OverlayProviderProps<
isMyMessage?: boolean;
isThreadMessage?: boolean;
message?: MessageType;
- /**
- * @deprecated use the following instead:
- * messageActions={(params) => {
- * const actions = messageActions({ ...params, isMessageActionsVisible: false });
- * return actions;
- * }}
- */
- messageReactions?: boolean;
messageTextNumberOfLines?: number;
numberOfImageGalleryGridColumns?: number;
openPicker?: (ref: React.RefObject) => void;
@@ -98,30 +89,3 @@ export const useOverlayContext = () => {
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withOverlayContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withOverlayContext = <
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType> => {
- const WithOverlayContextComponent = (
- props: Omit,
- ) => {
- const overlayContext = useOverlayContext();
-
- return ;
- };
- WithOverlayContextComponent.displayName = `WithOverlayContext${getDisplayName(
- Component as React.ComponentType,
- )}`;
- return WithOverlayContextComponent;
-};
diff --git a/package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx b/package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx
index f31542347..2247aae73 100644
--- a/package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx
+++ b/package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx
@@ -2,10 +2,9 @@ import React, { PropsWithChildren, useContext } from 'react';
import type { ChannelState } from 'stream-chat';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type PaginatedMessageListContextValue<
@@ -83,31 +82,3 @@ export const usePaginatedMessageListContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withPaginatedMessageListContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withPaginatedMessageListContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithPaginatedMessageListContextComponent = (
- props: Omit>,
- ) => {
- const paginatedMessageListContext = usePaginatedMessageListContext();
-
- return ;
- };
- WithPaginatedMessageListContextComponent.displayName = `WithPaginatedMessageListContext${getDisplayName(
- Component,
- )}`;
- return WithPaginatedMessageListContextComponent;
-};
diff --git a/package/src/contexts/suggestionsContext/SuggestionsContext.tsx b/package/src/contexts/suggestionsContext/SuggestionsContext.tsx
index 5fcc0b910..613a8801a 100644
--- a/package/src/contexts/suggestionsContext/SuggestionsContext.tsx
+++ b/package/src/contexts/suggestionsContext/SuggestionsContext.tsx
@@ -6,10 +6,9 @@ import type { AutoCompleteSuggestionHeaderProps } from '../../components/AutoCom
import type { AutoCompleteSuggestionItemProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionItem';
import type { AutoCompleteSuggestionListProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionList';
import type { Emoji } from '../../emoji-data';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type SuggestionComponentType = 'command' | 'emoji' | 'mention';
@@ -148,31 +147,3 @@ export const useSuggestionsContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withSuggestionsContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withSuggestionsContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithSuggestionsContextComponent = (
- props: Omit>,
- ) => {
- const suggestionsContext = useSuggestionsContext();
-
- return ;
- };
- WithSuggestionsContextComponent.displayName = `WithSuggestionsContext${getDisplayName(
- Component,
- )}`;
- return WithSuggestionsContextComponent;
-};
diff --git a/package/src/contexts/threadContext/ThreadContext.tsx b/package/src/contexts/threadContext/ThreadContext.tsx
index 419b70e97..7b098324a 100644
--- a/package/src/contexts/threadContext/ThreadContext.tsx
+++ b/package/src/contexts/threadContext/ThreadContext.tsx
@@ -3,10 +3,9 @@ import React, { PropsWithChildren, useContext } from 'react';
import type { ChannelState } from 'stream-chat';
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type ThreadContextValue<
@@ -58,29 +57,3 @@ export const useThreadContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withThreadContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withThreadContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithThreadContextComponent = (
- props: Omit>,
- ) => {
- const threadContext = useThreadContext();
-
- return ;
- };
- WithThreadContextComponent.displayName = `WithThreadContext${getDisplayName(Component)}`;
- return WithThreadContextComponent;
-};
diff --git a/package/src/contexts/translationContext/TranslationContext.tsx b/package/src/contexts/translationContext/TranslationContext.tsx
index 98da3624b..22aa74dc5 100644
--- a/package/src/contexts/translationContext/TranslationContext.tsx
+++ b/package/src/contexts/translationContext/TranslationContext.tsx
@@ -7,8 +7,6 @@ import type { Moment } from 'moment-timezone';
import type { TranslationLanguages } from 'stream-chat';
-import type { DefaultStreamChatGenerics } from '../../types/types';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export const DEFAULT_USER_LANGUAGE: TranslationLanguages = 'en';
@@ -60,30 +58,3 @@ export const useTranslationContext = () => {
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withTranslationContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withTranslationContext = <
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType> => {
- const WithTranslationContextComponent = (
- props: Omit,
- ) => {
- const translationContext = useTranslationContext();
-
- return ;
- };
- WithTranslationContextComponent.displayName = `WithTranslationContext${getDisplayName(
- Component as React.ComponentType,
- )}`;
- return WithTranslationContextComponent;
-};
diff --git a/package/src/contexts/typingContext/TypingContext.tsx b/package/src/contexts/typingContext/TypingContext.tsx
index 4221d36ac..ecdd8a734 100644
--- a/package/src/contexts/typingContext/TypingContext.tsx
+++ b/package/src/contexts/typingContext/TypingContext.tsx
@@ -2,10 +2,9 @@ import React, { PropsWithChildren, useContext } from 'react';
import type { ChannelState } from 'stream-chat';
-import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
+import type { DefaultStreamChatGenerics } from '../../types/types';
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
-import { getDisplayName } from '../utils/getDisplayName';
import { isTestEnvironment } from '../utils/isTestEnvironment';
export type TypingContextValue<
@@ -44,29 +43,3 @@ export const useTypingContext = <
return contextValue;
};
-
-/**
- * @deprecated
- *
- * This will be removed in the next major version.
- *
- * Typescript currently does not support partial inference so if ChatContext
- * typing is desired while using the HOC withTypingContext the Props for the
- * wrapped component must be provided as the first generic.
- */
-export const withTypingContext = <
- P extends UnknownType,
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
->(
- Component: React.ComponentType,
-): React.ComponentType>> => {
- const WithTypingContextComponent = (
- props: Omit>,
- ) => {
- const typingContext = useTypingContext();
-
- return ;
- };
- WithTypingContextComponent.displayName = `WithTypingContext${getDisplayName(Component)}`;
- return WithTypingContextComponent;
-};