UNPKG

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.65 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./preview.interface.js");require("./supports/audio-preview/index.js");require("./supports/code-preview/index.js");require("./supports/docx-preview/index.js");require("./supports/epub-preview/index.js");require("./supports/md-preview/index.js");require("./supports/pdf-preview/index.js");require("./supports/pic-preview/index.js");require("./supports/txt-preview/index.js");require("./supports/unknown-preview/index.js");require("./supports/msg-preview/index.js");require("./supports/ppt-preview/index.js");require("./supports/video-preview/index.js");require("./supports/xlsx-preview/index.js");const c=require("./supports/msg-preview/index.vue.js"),y=require("./supports/video-preview/index.vue.js"),o=require("./supports/audio-preview/index.vue.js"),v=require("./supports/txt-preview/index.vue.js"),P=require("./supports/pic-preview/index.vue.js"),s=require("./supports/md-preview/index.vue.js"),T=require("./supports/epub-preview/index.vue.js"),w=require("./supports/pdf-preview/index.vue.js"),m=require("./supports/ppt-preview/index.vue.js"),u=require("./supports/xlsx-preview/index.vue.js"),a=require("./supports/docx-preview/index.vue.js"),r=require("./supports/unknown-preview/index.vue.js"),d=require("./supports/code-preview/index.vue.js"),l=[e.PreviewType.CODE,e.PreviewType.TXT,e.PreviewType.MD],x=[e.PreviewType.DOC,e.PreviewType.DOCX,e.PreviewType.XLSX,e.PreviewType.PPT,e.PreviewType.EPUB,e.PreviewType.MSG],q=[e.PreviewType.PIC,e.PreviewType.AUDIO],g=[e.PreviewType.PDF],f=[e.PreviewType.VIDEO],i={[e.PreviewType.NONE]:{name:"",component:r,type:e.PreviewType.NONE,accept:[]},[e.PreviewType.CODE]:{name:"",component:d,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:r,type:e.PreviewType.DOC,accept:["doc","docm","dot","dotm","dotx","fodt","mht","odt","ott","rtf","djvu","xps"]},[e.PreviewType.DOCX]:{name:"",component:a,type:e.PreviewType.DOCX,accept:["docx"]},[e.PreviewType.XLSX]:{name:"",component:u,type:e.PreviewType.XLSX,accept:["xlsx","xls","csv","fods","ods","ots","xlsm","xlt","xltm"]},[e.PreviewType.PPT]:{name:"",component:m,type:e.PreviewType.PPT,accept:["ppt","pptx","fodp","odp","otp","pot","potm","potx","pps","ppsm","ppsx","pptm"]},[e.PreviewType.PDF]:{name:"",component:w,type:e.PreviewType.PDF,accept:["pdf"]},[e.PreviewType.EPUB]:{name:"",component:T,type:e.PreviewType.EPUB,accept:["epub"]},[e.PreviewType.MD]:{name:"",component:s,type:e.PreviewType.MD,accept:["md"]},[e.PreviewType.PIC]:{name:"",component:P,type:e.PreviewType.PIC,accept:["jpg","png","jpeg","webp","gif","bmp","svg","ico"]},[e.PreviewType.TXT]:{name:"",component:v,type:e.PreviewType.TXT,accept:["txt"]},[e.PreviewType.AUDIO]:{name:"",component:o,type:e.PreviewType.AUDIO,accept:["mp3","wav","wma","ogg","aac","flac"]},[e.PreviewType.VIDEO]:{name:"",component:y,type:e.PreviewType.VIDEO,accept:["mp4","webm","ogg","mkv","avi","mpeg","flv","mov","wmv"]},[e.PreviewType.MSG]:{name:"",component:c,type:e.PreviewType.MSG,accept:["msg"]}};function t(p){return Object.values(i).find(n=>n.accept.includes(p))??i[e.PreviewType.NONE]}function D(p){return t(p).type}exports.PreviewRules=i;exports.arrayBufferPreviewTypeList=x;exports.getPreviewTypeByFileType=D;exports.getRuleByFileType=t;exports.imagePreviewTypeList=q;exports.pdfPreviewTypeList=g;exports.textFilePreviewTypeList=l;exports.videoPreviewTypeList=f; //# sourceMappingURL=preview.const.js.map