2022-04-20 21:37:54 +00:00
|
|
|
import React from 'react';
|
2022-06-06 13:23:49 +00:00
|
|
|
import Animated from 'react-native-reanimated';
|
2022-04-20 21:37:54 +00:00
|
|
|
|
|
|
|
import { TSupportedThemes } from '../../theme';
|
|
|
|
import { TUserStatus, ILastMessage, SubscriptionType, IOmnichannelSource } from '../../definitions';
|
|
|
|
|
|
|
|
export interface ILeftActionsProps {
|
2022-06-06 13:23:49 +00:00
|
|
|
transX: Animated.SharedValue<number>;
|
2022-04-20 21:37:54 +00:00
|
|
|
isRead: boolean;
|
|
|
|
width: number;
|
|
|
|
onToggleReadPress(): void;
|
|
|
|
displayMode: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IRightActionsProps {
|
2022-06-06 13:23:49 +00:00
|
|
|
transX: Animated.SharedValue<number>;
|
2022-04-20 21:37:54 +00:00
|
|
|
favorite: boolean;
|
|
|
|
width: number;
|
|
|
|
toggleFav(): void;
|
|
|
|
onHidePress(): void;
|
|
|
|
displayMode: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITitleProps {
|
|
|
|
name: string;
|
|
|
|
theme: TSupportedThemes;
|
|
|
|
hideUnreadStatus: boolean;
|
|
|
|
alert: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IUpdatedAtProps {
|
|
|
|
date: string;
|
|
|
|
theme: TSupportedThemes;
|
|
|
|
hideUnreadStatus: boolean;
|
|
|
|
alert: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IWrapperProps {
|
|
|
|
accessibilityLabel: string;
|
|
|
|
avatar: string;
|
|
|
|
type: string;
|
|
|
|
theme: TSupportedThemes;
|
|
|
|
rid: string;
|
|
|
|
children: React.ReactElement;
|
|
|
|
displayMode: string;
|
|
|
|
prid: string;
|
|
|
|
showLastMessage: boolean;
|
|
|
|
status: string;
|
|
|
|
isGroupChat: boolean;
|
|
|
|
teamMain: boolean;
|
|
|
|
showAvatar: boolean;
|
|
|
|
sourceType: IOmnichannelSource;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITypeIconProps {
|
|
|
|
type: string;
|
|
|
|
status: TUserStatus;
|
|
|
|
prid: string;
|
|
|
|
isGroupChat: boolean;
|
|
|
|
teamMain: boolean;
|
|
|
|
theme?: TSupportedThemes;
|
|
|
|
size?: number;
|
|
|
|
style?: object;
|
|
|
|
sourceType: IOmnichannelSource;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IRoomItemContainerProps {
|
|
|
|
[key: string]: string | boolean | Function | number;
|
|
|
|
item: any;
|
|
|
|
showLastMessage: boolean;
|
|
|
|
id: string;
|
|
|
|
onPress: (item: any) => void;
|
|
|
|
onLongPress: (item: any) => Promise<void>;
|
|
|
|
username: string;
|
|
|
|
width: number;
|
|
|
|
status: TUserStatus;
|
|
|
|
toggleFav(): void;
|
|
|
|
toggleRead(): void;
|
|
|
|
hideChannel(): void;
|
|
|
|
useRealName: boolean;
|
|
|
|
getUserPresence: (uid: string) => void;
|
|
|
|
connected: boolean;
|
|
|
|
theme: TSupportedThemes;
|
|
|
|
isFocused: boolean;
|
|
|
|
getRoomTitle: (item: any) => string;
|
|
|
|
getRoomAvatar: (item: any) => string;
|
|
|
|
getIsGroupChat: (item: any) => boolean;
|
|
|
|
getIsRead: (item: any) => boolean;
|
|
|
|
swipeEnabled: boolean;
|
|
|
|
autoJoin: boolean;
|
|
|
|
showAvatar: boolean;
|
|
|
|
displayMode: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IRoomItemProps {
|
|
|
|
rid: string;
|
|
|
|
type: SubscriptionType;
|
|
|
|
prid: string;
|
|
|
|
name: string;
|
|
|
|
avatar: string;
|
|
|
|
showLastMessage: boolean;
|
|
|
|
username: string;
|
|
|
|
testID: string;
|
|
|
|
width: number;
|
|
|
|
status: TUserStatus;
|
|
|
|
useRealName: boolean;
|
|
|
|
theme: TSupportedThemes;
|
|
|
|
isFocused: boolean;
|
|
|
|
isGroupChat: boolean;
|
|
|
|
isRead: boolean;
|
|
|
|
teamMain: boolean;
|
|
|
|
date: string;
|
|
|
|
accessibilityLabel: string;
|
|
|
|
lastMessage: ILastMessage;
|
|
|
|
favorite: boolean;
|
|
|
|
alert: boolean;
|
|
|
|
hideUnreadStatus: boolean;
|
|
|
|
unread: number;
|
|
|
|
userMentions: number;
|
|
|
|
groupMentions: number;
|
|
|
|
tunread: [];
|
|
|
|
tunreadUser: [];
|
|
|
|
tunreadGroup: [];
|
|
|
|
swipeEnabled: boolean;
|
|
|
|
toggleFav(): void;
|
|
|
|
toggleRead(): void;
|
|
|
|
onPress(): void;
|
|
|
|
onLongPress(): void;
|
|
|
|
hideChannel(): void;
|
|
|
|
autoJoin: boolean;
|
|
|
|
size?: number;
|
|
|
|
showAvatar: boolean;
|
|
|
|
displayMode: string;
|
|
|
|
sourceType: IOmnichannelSource;
|
2022-06-13 13:24:54 +00:00
|
|
|
hideMentionStatus?: boolean;
|
2022-04-20 21:37:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ILastMessageProps {
|
|
|
|
theme: TSupportedThemes;
|
|
|
|
lastMessage: ILastMessage;
|
|
|
|
type: SubscriptionType;
|
|
|
|
showLastMessage: boolean;
|
|
|
|
username: string;
|
|
|
|
useRealName: boolean;
|
|
|
|
alert: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ITouchableProps {
|
|
|
|
children: JSX.Element;
|
|
|
|
type: string;
|
|
|
|
onPress(): void;
|
|
|
|
onLongPress(): void;
|
|
|
|
testID: string;
|
|
|
|
width: number;
|
|
|
|
favorite: boolean;
|
|
|
|
isRead: boolean;
|
|
|
|
rid: string;
|
|
|
|
toggleFav: Function;
|
|
|
|
toggleRead: Function;
|
|
|
|
hideChannel: Function;
|
|
|
|
isFocused: boolean;
|
|
|
|
swipeEnabled: boolean;
|
|
|
|
displayMode: string;
|
|
|
|
}
|