forked from DucSkt/react-native-pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js.flow
64 lines (56 loc) · 1.67 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
/**
* @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 = {
activityIndicator?: Node,
activityIndicatorProps?: { [prop: string]: mixed },
enableAnnotationRendering?: boolean,
enableAntialiasing?: boolean,
enablePaging?: boolean,
enableRTL?: boolean,
fitPolicy?: FitWidth | FitHeight | FitBoth,
horizontal?: 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,
scale?: number,
source: AssetId | Source,
spacing?: number,
style?: ViewStyleProp,
testID?: string
};
declare export default class Pdf extends Component<Props> {
setPage: (pageNumber: number) => void;
}