@gathertown/uikit-react-native
Version:
Sendbird UIKit for React Native: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.
71 lines (70 loc) • 3.62 kB
TypeScript
import type { CustomComponentContextType, HeaderStyleContextType, UIKitTheme } from '@gathertown/uikit-react-native-foundation';
import type { PartialDeep, SendbirdChatSDK, SendbirdEncryption, SendbirdGroupChannel, SendbirdGroupChannelCreateParams, SendbirdMember, SendbirdUser } from '@gathertown/uikit-utils';
import React from 'react';
import { SBUConfig } from '@sendbird/uikit-tools';
import type { ChatRelatedFeaturesInUIKit } from '../contexts/SendbirdChatCtx';
import type { ImageCompressionConfigInterface } from '../libs/ImageCompressionConfig';
import { MentionConfigInterface } from '../libs/MentionConfig';
import type { StringSet } from '../localization/StringSet.type';
import type { ClipboardServiceInterface, FileServiceInterface, MediaServiceInterface, NotificationServiceInterface } from '../platform/types';
import type { ErrorBoundaryProps, LocalCacheStorage } from '../types';
type UnimplementedFeatures = 'enableVoiceMessage' | 'threadReplySelectType' | 'replyType';
export declare const SendbirdUIKit: Readonly<{
VERSION: "0.0.14";
PLATFORM: string;
DEFAULT: {
AUTO_PUSH_TOKEN_REGISTRATION: boolean;
USE_USER_ID_FOR_NICKNAME: boolean;
IMAGE_COMPRESSION: boolean;
};
}>;
export type SendbirdUIKitContainerProps = React.PropsWithChildren<{
appId: string;
platformServices: {
file: FileServiceInterface;
notification: NotificationServiceInterface;
clipboard: ClipboardServiceInterface;
media: MediaServiceInterface;
};
chatOptions: {
localCacheStorage: LocalCacheStorage;
localCacheEncryption?: SendbirdEncryption;
onInitialized?: (sdkInstance: SendbirdChatSDK) => SendbirdChatSDK;
} & Partial<ChatRelatedFeaturesInUIKit>;
uikitOptions?: PartialDeep<{
common: SBUConfig['common'];
groupChannel: Omit<SBUConfig['groupChannel']['channel'], UnimplementedFeatures> & {
replyType: Extract<SBUConfig['groupChannel']['channel']['replyType'], 'none' | 'quote_reply'>;
};
groupChannelList: SBUConfig['groupChannel']['channelList'];
groupChannelSettings: SBUConfig['groupChannel']['setting'];
openChannel: SBUConfig['openChannel']['channel'];
}>;
localization?: {
stringSet?: StringSet;
};
styles?: {
theme?: UIKitTheme;
statusBarTranslucent?: boolean;
defaultHeaderTitleAlign?: 'left' | 'center';
defaultHeaderHeight?: number;
HeaderComponent?: HeaderStyleContextType['HeaderComponent'];
};
errorBoundary?: {
disabled?: boolean;
onError?: (props: ErrorBoundaryProps) => void;
ErrorInfoComponent?: (props: ErrorBoundaryProps) => JSX.Element;
};
toast?: {
dismissTimeout?: number;
};
userProfile?: {
onCreateChannel: (channel: SendbirdGroupChannel) => void;
onBeforeCreateChannel?: (channelParams: SendbirdGroupChannelCreateParams, users: SendbirdUser[] | SendbirdMember[]) => SendbirdGroupChannelCreateParams | Promise<SendbirdGroupChannelCreateParams>;
};
userMention?: Pick<Partial<MentionConfigInterface>, 'mentionLimit' | 'suggestionLimit' | 'debounceMills'>;
imageCompression?: Partial<ImageCompressionConfigInterface>;
customRenderProps?: CustomComponentContextType;
}>;
declare const SendbirdUIKitContainer: ({ children, appId, chatOptions, uikitOptions, platformServices, localization, styles, errorBoundary, toast, userProfile, userMention, imageCompression, customRenderProps, }: SendbirdUIKitContainerProps) => JSX.Element;
export default SendbirdUIKitContainer;