-
Notifications
You must be signed in to change notification settings - Fork 565
/
index.js.flow
67 lines (59 loc) · 1.8 KB
/
index.js.flow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* @flow strict
*/
import { Component } from 'react';
import type { Node } from 'react';
import type { FormField, Methods } from 'rn-fetch-blob';
import type { ViewStyleProp } from 'react-native/Libraries/StyleSheet/StyleSheet'
export type AssetId = number;
export type FitWidth = 0;
export type FitHeight = 1;
export type FitBoth = 2;
export type Source = {
body?: string | FormField[],
cache?: boolean,
cacheFileName?: string,
expiration?: number,
headers?: { [key: string]: string },
method?: Methods,
uri: string
};
export type TableContent = {
children: TableContent[],
mNativePtr: number,
pageIdx: number,
title: string,
};
export type Props = {
renderActivityIndicator?: (progress: number) => Node,
enableAnnotationRendering?: boolean,
enableAntialiasing?: boolean,
enablePaging?: boolean,
enableRTL?: boolean,
fitPolicy?: FitWidth | FitHeight | FitBoth,
horizontal?: boolean,
showsHorizontalScrollIndicator?: boolean,
showsVerticalScrollIndicator?: boolean,
scrollEnabled?: boolean,
maxScale?: number,
minScale?: number,
singlePage?: boolean,
onError?: (error: Error) => void,
onLoadComplete?: (numberOfPages: number, path: string, size: { height: number, width: number }, tableContents: ?TableContent[]) => void,
onLoadProgress?: (percent: number) => void,
onPageChanged?: (page: number, numberOfPages: number) => void,
onPageSingleTap?: (page: number, x: number, y: number) => void,
onScaleChanged?: (scale: number) => void,
onPressLink?: (url: string) => void,
page?: number,
password?: string,
progressContainerStyle?: ViewStyleProp,
scale?: number,
source: AssetId | Source,
spacing?: number,
style?: ViewStyleProp,
testID?: string
};
declare export default class Pdf extends Component<Props> {
setPage: (pageNumber: number) => void;
}