|
1 | 1 | import { NativeModules, Image } from 'react-native'; |
2 | 2 |
|
| 3 | +export type Results = { |
| 4 | + path: string; |
| 5 | + filename: string; |
| 6 | + localIdentifier: string; |
| 7 | + width: number; |
| 8 | + height: number; |
| 9 | + mime: string; |
| 10 | + type: string; |
| 11 | + thumbnail?: string; |
| 12 | + creationDate?: string; |
| 13 | +} |
| 14 | + |
3 | 15 | export type Options = { |
4 | | - tapHereToChange: string; |
5 | | - cancelTitle: string; |
6 | | - doneTitle: string; |
7 | | - emptyMessage: string; |
8 | | - emptyImage: Image; |
9 | | - usedCameraButton: boolean; |
10 | | - usedPrefetch: boolean; |
11 | | - previewAtForceTouch: boolean; |
12 | | - allowedLivePhotos: boolean; |
13 | | - allowedVideo: boolean; |
14 | | - allowedAlbumCloudShared: boolean; |
15 | | - allowedPhotograph: boolean; // for camera : allow this option when you want to take a photos |
16 | | - allowedVideoRecording: boolean; //for camera : allow this option when you want to recording video. |
17 | | - maxVideoDuration: Number; //for camera : max video recording duration |
18 | | - autoPlay: boolean; |
19 | | - muteAudio: boolean; |
20 | | - preventAutomaticLimitedAccessAlert: boolean; // newest iOS 14 |
21 | | - mediaType: string; |
22 | | - numberOfColumn: number; |
23 | | - maxSelectedAssets: number; |
24 | | - fetchOption: Object; |
25 | | - fetchCollectionOption: Object; |
26 | | - singleSelectedMode: boolean; |
27 | | - maximumMessageTitle: string; |
28 | | - maximumMessage: string; |
29 | | - messageTitleButton: string; |
| 16 | + isPreview?: boolean; |
| 17 | + selectedColor?: string; |
| 18 | + selectedAssets?: Results[]; |
| 19 | + tapHereToChange?: string; |
| 20 | + cancelTitle?: string; |
| 21 | + doneTitle?: string; |
| 22 | + emptyMessage?: string; |
| 23 | + emptyImage?: Image; |
| 24 | + usedCameraButton?: boolean; |
| 25 | + usedPrefetch?: boolean; |
| 26 | + previewAtForceTouch?: boolean; |
| 27 | + allowedLivePhotos?: boolean; |
| 28 | + allowedVideo?: boolean; |
| 29 | + allowedAlbumCloudShared?: boolean; |
| 30 | + allowedPhotograph?: boolean; // for camera ?: allow this option when you want to take a photos |
| 31 | + allowedVideoRecording?: boolean; //for camera ?: allow this option when you want to recording video. |
| 32 | + maxVideoDuration?: Number; //for camera ?: max video recording duration |
| 33 | + autoPlay?: boolean; |
| 34 | + muteAudio?: boolean; |
| 35 | + preventAutomaticLimitedAccessAlert?: boolean; // newest iOS 14 |
| 36 | + mediaType?: string; |
| 37 | + numberOfColumn?: number; |
| 38 | + maxSelectedAssets?: number; |
| 39 | + fetchOption?: Object; |
| 40 | + fetchCollectionOption?: Object; |
| 41 | + singleSelectedMode?: boolean; |
| 42 | + maximumMessageTitle?: string; |
| 43 | + maximumMessage?: string; |
| 44 | + messageTitleButton?: string; |
30 | 45 | //resize thumbnail |
31 | | - thumbnailWidth: number; |
32 | | - thumbnailHeight: number; |
33 | | - haveThumbnail: boolean; |
| 46 | + thumbnailWidth?: number; |
| 47 | + thumbnailHeight?: number; |
| 48 | + haveThumbnail?: boolean; |
34 | 49 | }; |
35 | 50 |
|
36 | 51 | type MultipleImagePickerType = { |
37 | | - openPicker(options: Options, callback: Object): Promise<any>; |
| 52 | + openPicker(options: Options): Promise<Results[]>; |
38 | 53 | }; |
39 | 54 |
|
40 | 55 | const { MultipleImagePicker } = NativeModules; |
|
0 commit comments