Files
mattermost-mobile/types/screens/gallery.d.ts
Avinash Lingaloo e8ce78f39d MM-36721 - [GEKIDOU] Porting Markdown components (#5586)
* Started with Channel Post List

* Added markdown hashtag

* Added TouchableWithFeedback component

* Added utils/bottom_sheet

* Removed BottomSheet in favor of future SlideUpPanel

* Added markdown_block_quote

* Added markdown_list_item

* Added markdown_list

* Added MarkDownTableCell component

* Markdown_table - in progress - need to verify TS

* Added markdown_table

* Update Podfile.lock

* Added deep_linking constant

* Added utils/draft

* Update config to include ExperimentalNormalizeMarkdownLinks

* Added markdown_link

* Added markdown_table_row

* Added ProgressiveImage and RetriableImage components and images utils

* Converted Retriable component to functional component

* Added type definition for commonmark

* Continuing with markdown TS

* Markdown - Typing props [ in progress ]

* Fix boolean flag with mardown block quote

* Adding observable config to markdown_link

* TS Fixes [ in progress ]

* TS fixes

* TS fixes - TextStyles

* Update markdown.tsx

* TS fixes on markdown

* TS Fixes - AtMention component

* AtMention [ IN PROGRESS ]

* Add markdown support

* Fix emoji and jumboEmoji on iOS

* Fix handleMyTeam operator

* Fix navigation style based on theme

* Fix iOS MattermostManaged deleteDatabse return error type

* wrap setNavigationStackStyles under a requestAnimationFrame

* Add preventDoubleTap to channel mention

* Increase double tap to 750ms

* Fix handleReceivedPostsInChannel chunk query

* Set initial navigation theme

* Swizzle FastImage on iOS

* fix preventDoubleTap test

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-08-02 20:30:17 +04:00

116 lines
2.5 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {StyleProp, ViewStyle} from 'react-native';
import Animated from 'react-native-reanimated';
import type {IntlShape} from 'react-intl';
export interface CallbackFunctionWithoutArguments {
(): void;
}
export interface ActionCallback {
(callback: CallbackFunctionWithoutArguments): void;
}
export interface ActionProps {
action: (callback: CallbackFunctionWithoutArguments) => void;
children: React.ReactNode;
style?: StyleProp<ViewStyle>;
visible: boolean;
}
export interface ActionsProps {
canDownloadFiles: boolean;
downloadAction: ActionCallback;
file: FileInfo;
linkAction: ActionCallback;
}
export interface AvatarProps {
avatarUri?: string;
theme: Theme;
}
export interface DetailsProps {
channel?: string;
isDirect?: boolean;
ownPost?: boolean;
user?: string;
}
export interface PrepareFileRef {
start(file: FileInfo, share?: boolean): Promise<string | undefined>;
}
export interface FooterProps {
intl: IntlShape;
file: FileInfo;
}
export interface FooterRef {
toggle(): boolean;
isVisible(): boolean;
}
export interface GalleryProps {
files: FileInfo[];
footerVisible: boolean;
height: number;
initialIndex: number;
isLandscape: boolean;
onClose: CallbackFunctionWithoutArguments;
onPageSelected: (index: number) => void;
onTap: CallbackFunctionWithoutArguments;
width: number;
theme: Theme;
}
export interface GalleryItemProps {
file: FileInfo;
deviceHeight: number;
deviceWidth: number;
intl?: IntlShape;
isActive?: boolean;
onDoubleTap?: CallbackFunctionWithoutArguments;
style?: StyleProp<Animated.AnimateStyle>;
theme?: Theme;
}
export interface ManagedConfig {
[key: string]: string;
}
export interface ShowToast {
(text: string, duration?: number, callback?: () => void): void;
}
export interface SummaryProps {
avatarUri?: string;
channelName?: string;
copyPublicLink: ActionCallback;
displayName?: string;
dowloadFile: ActionCallback;
file: FileInfo;
isDirectChannel: boolean;
isLandscape: boolean;
ownPost: boolean;
theme: Theme;
}
export interface ToastProps {
theme: Theme;
}
export interface ToastRef {
show: ShowToast;
}
export interface ToastState {
animation?: Animated.CompositeAnimation;
duration?: number;
callback?: () => void;
}