vue-files-preview-inno
Version:
A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.
3 lines (2 loc) • 3.28 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./supports/docx-preview/index.js");require("./supports/xlsx-preview/index.js");require("./supports/pdf-preview/index.js");require("./supports/pic-preview/index.js");require("./supports/txt-preview/index.js");require("./supports/code-preview/index.js");require("./supports/md-preview/index.js");require("./supports/epub-preview/index.js");require("./supports/audio-preview/index.js");require("./supports/video-preview/index.js");const e=require("./preview.interface.js"),n=require("./supports/video-preview/index.vue.js"),v=require("./supports/audio-preview/index.vue.js"),c=require("./supports/txt-preview/index.vue.js"),y=require("./supports/pic-preview/index.vue.js"),o=require("./supports/md-preview/index.vue.js"),s=require("./supports/epub-preview/index.vue.js"),P=require("./supports/pdf-preview/index.vue.js"),T=require("./supports/xlsx-preview/index.vue.js"),w=require("./supports/docx-preview/index.vue.js"),u=require("./supports/code-preview/index.vue.js"),m=[e.PreviewType.CODE,e.PreviewType.TXT,e.PreviewType.MD],a=[e.PreviewType.DOC,e.PreviewType.DOCX,e.PreviewType.XLSX,e.PreviewType.PPT,e.PreviewType.EPUB],d=[e.PreviewType.PIC,e.PreviewType.AUDIO],_=[e.PreviewType.PDF],l=[e.PreviewType.VIDEO],t={[e.PreviewType.NONE]:{name:"",component:void 0,type:e.PreviewType.NONE,accept:[]},[e.PreviewType.CODE]:{name:"",component:u,type:e.PreviewType.CODE,accept:["html","css","less","scss","js","json","ts","vue","c","cpp","java","py","go","php","lua","rb","pl","swift","vb","cs","sh","rs","vim","log","lock","swift","mod","mht","mhtml","xml"]},[e.PreviewType.DOC]:{name:"",component:void 0,type:e.PreviewType.DOC,accept:["doc","docm","dot","dotm","dotx","fodt","mht","odt","ott","rtf","djvu","xps"]},[e.PreviewType.DOCX]:{name:"",component:w,type:e.PreviewType.DOCX,accept:["docx"]},[e.PreviewType.XLSX]:{name:"",component:T,type:e.PreviewType.XLSX,accept:["xlsx","xls","csv","fods","ods","ots","xlsm","xlt","xltm"]},[e.PreviewType.PPT]:{name:"",component:void 0,type:e.PreviewType.PPT,accept:["ppt","pptx","fodp","odp","otp","pot","potm","potx","pps","ppsm","ppsx","pptm"]},[e.PreviewType.PDF]:{name:"",component:P,type:e.PreviewType.PDF,accept:["pdf"]},[e.PreviewType.EPUB]:{name:"",component:s,type:e.PreviewType.EPUB,accept:["epub"]},[e.PreviewType.MD]:{name:"",component:o,type:e.PreviewType.MD,accept:["md"]},[e.PreviewType.PIC]:{name:"",component:y,type:e.PreviewType.PIC,accept:["jpg","png","jpeg","webp","gif","bmp","svg","ico"]},[e.PreviewType.TXT]:{name:"",component:c,type:e.PreviewType.TXT,accept:["txt"]},[e.PreviewType.AUDIO]:{name:"",component:v,type:e.PreviewType.AUDIO,accept:["mp3","wav","wma","ogg","aac","flac"]},[e.PreviewType.VIDEO]:{name:"",component:n,type:e.PreviewType.VIDEO,accept:["mp4","webm","ogg","mkv","avi","mpeg","flv","mov","wmv"]}};function i(p){return Object.values(t).find(r=>r.accept.includes(p))??t[e.PreviewType.NONE]}function x(p){return i(p).type}exports.PreviewRules=t;exports.arrayBufferPreviewTypeList=a;exports.getPreviewTypeByFileType=x;exports.getRuleByFileType=i;exports.imagePreviewTypeList=d;exports.pdfPreviewTypeList=_;exports.textFilePreviewTypeList=m;exports.videoPreviewTypeList=l;
//# sourceMappingURL=preview.const.js.map