diff --git a/index.d.ts b/index.d.ts index 42ef9e59..4aba233b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -14,30 +14,48 @@ declare module 'react-native-document-picker' { allFiles: '*/*'; audio: 'audio/*'; csv: 'text/csv'; + doc: 'application/msword'; + docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; images: 'image/*'; - plainText: 'text/plain'; pdf: 'application/pdf'; + plainText: 'text/plain'; + ppt: 'application/vnd.ms-powerpoint'; + pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; video: 'video/*'; + xls: 'application/vnd.ms-excel'; + xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; zip: 'application/zip'; }; utis: { allFiles: 'public.content'; audio: 'public.audio'; csv: 'public.comma-separated-values-text'; + doc: 'com.microsoft.word.doc'; + docx: 'org.openxmlformats.wordprocessingml.document'; images: 'public.image'; - plainText: 'public.plain-text'; pdf: 'com.adobe.pdf'; + plainText: 'public.plain-text'; + ppt: 'com.microsoft.powerpoint.ppt'; + pptx: 'org.openxmlformats.presentationml.presentation'; video: 'public.movie'; + xls: 'com.microsoft.excel.xls'; + xlsx: 'org.openxmlformats.spreadsheetml.sheet'; zip: 'public.zip-archive'; }; extensions: { allFiles: '*'; audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'; csv: '.csv'; + doc: '.doc'; + docx: '.docx'; images: '.jpeg .jpg .png'; - plainText: '.txt'; pdf: '.pdf'; + plainText: '.txt'; + ppt: '.ppt'; + pptx: '.pptx'; video: '.mp4'; + xls: '.xls'; + xlsx: '.xlsx'; zip: '.zip .gz'; }; }; diff --git a/index.js b/index.js index 7e49badc..a1ba2cca 100644 --- a/index.js +++ b/index.js @@ -74,20 +74,32 @@ const Types = { allFiles: '*/*', audio: 'audio/*', csv: 'text/csv', + doc: 'application/msword', + docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', images: 'image/*', - plainText: 'text/plain', pdf: 'application/pdf', + plainText: 'text/plain', + ppt: 'application/vnd.ms-powerpoint', + pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', video: 'video/*', + xls: 'application/vnd.ms-excel', + xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', zip: 'application/zip', }, utis: { allFiles: 'public.content', audio: 'public.audio', csv: 'public.comma-separated-values-text', + doc: 'com.microsoft.word.doc', + docx: 'org.openxmlformats.wordprocessingml.document', images: 'public.image', - plainText: 'public.plain-text', pdf: 'com.adobe.pdf', + plainText: 'public.plain-text', + ppt: 'com.microsoft.powerpoint.ppt', + pptx: 'org.openxmlformats.presentationml.presentation', video: 'public.movie', + xls: 'com.microsoft.excel.xls', + xlsx: 'org.openxmlformats.spreadsheetml.sheet', zip: 'public.zip-archive', }, extensions: { @@ -95,10 +107,16 @@ const Types = { audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma', csv: '.csv', + doc: '.doc', + docx: '.docx', images: '.jpeg .jpg .png', - plainText: '.txt', pdf: '.pdf', + plainText: '.txt', + ppt: '.ppt', + pptx: '.pptx', video: '.mp4', + xls: '.xls', + xlsx: '.xlsx', zip: '.zip .gz', }, };