@l1yp/file-viewer 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/FileViewer.js +7 -0
- package/dist/FileViewer.vue.d.ts +37 -0
- package/dist/FileViewer.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/AppxViewer.js +7 -0
- package/dist/components/AppxViewer.vue.d.ts +18 -0
- package/dist/components/AppxViewer.vue_vue_type_script_setup_true_lang.js +174 -0
- package/dist/components/ArchiveBrowser.js +7 -0
- package/dist/components/ArchiveBrowser.vue.d.ts +18 -0
- package/dist/components/ArchiveBrowser.vue_vue_type_script_setup_true_lang.js +279 -0
- package/dist/components/AudioViewer.js +7 -0
- package/dist/components/AudioViewer.vue.d.ts +21 -0
- package/dist/components/AudioViewer.vue_vue_type_script_setup_true_lang.js +201 -0
- package/dist/components/BinObjBrowser.js +7 -0
- package/dist/components/BinObjBrowser.vue.d.ts +19 -0
- package/dist/components/BinObjBrowser.vue_vue_type_script_setup_true_lang.js +141 -0
- package/dist/components/CertViewer.js +7 -0
- package/dist/components/CertViewer.vue.d.ts +17 -0
- package/dist/components/CertViewer.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/ClassViewer.js +7 -0
- package/dist/components/ClassViewer.vue.d.ts +15 -0
- package/dist/components/ClassViewer.vue_vue_type_script_setup_true_lang.js +164 -0
- package/dist/components/CodeBlock.js +7 -0
- package/dist/components/CodeBlock.vue.d.ts +17 -0
- package/dist/components/CodeBlock.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/CodeView.js +7 -0
- package/dist/components/CodeView.vue.d.ts +21 -0
- package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +180 -0
- package/dist/components/CsvViewer.js +7 -0
- package/dist/components/CsvViewer.vue.d.ts +26 -0
- package/dist/components/CsvViewer.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/DicomViewer.js +7 -0
- package/dist/components/DicomViewer.vue.d.ts +30 -0
- package/dist/components/DicomViewer.vue_vue_type_script_setup_true_lang.js +362 -0
- package/dist/components/DocxViewer.js +7 -0
- package/dist/components/DocxViewer.vue.d.ts +19 -0
- package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/DrawioViewer.js +7 -0
- package/dist/components/DrawioViewer.vue.d.ts +16 -0
- package/dist/components/DrawioViewer.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/components/DxfViewer.js +7 -0
- package/dist/components/DxfViewer.vue.d.ts +14 -0
- package/dist/components/DxfViewer.vue_vue_type_script_setup_true_lang.js +239 -0
- package/dist/components/EbookViewer.js +7 -0
- package/dist/components/EbookViewer.vue.d.ts +22 -0
- package/dist/components/EbookViewer.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/EmlViewer.js +7 -0
- package/dist/components/EmlViewer.vue.d.ts +21 -0
- package/dist/components/EmlViewer.vue_vue_type_script_setup_true_lang.js +193 -0
- package/dist/components/EplViewer.js +7 -0
- package/dist/components/EplViewer.vue.d.ts +19 -0
- package/dist/components/EplViewer.vue_vue_type_script_setup_true_lang.js +201 -0
- package/dist/components/FileViewerBody.js +7 -0
- package/dist/components/FileViewerBody.vue.d.ts +47 -0
- package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +599 -0
- package/dist/components/FileViewerPanel.js +7 -0
- package/dist/components/FileViewerPanel.vue.d.ts +3 -0
- package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/components/FontViewer.js +7 -0
- package/dist/components/FontViewer.vue.d.ts +17 -0
- package/dist/components/FontViewer.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/FrontmatterCard.js +7 -0
- package/dist/components/FrontmatterCard.vue.d.ts +11 -0
- package/dist/components/FrontmatterCard.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/GeoViewer.js +7 -0
- package/dist/components/GeoViewer.vue.d.ts +17 -0
- package/dist/components/GeoViewer.vue_vue_type_script_setup_true_lang.js +255 -0
- package/dist/components/HarViewer.js +7 -0
- package/dist/components/HarViewer.vue.d.ts +20 -0
- package/dist/components/HarViewer.vue_vue_type_script_setup_true_lang.js +322 -0
- package/dist/components/HexViewer.js +7 -0
- package/dist/components/HexViewer.vue.d.ts +22 -0
- package/dist/components/HexViewer.vue_vue_type_script_setup_true_lang.js +121 -0
- package/dist/components/HprofViewer.js +7 -0
- package/dist/components/HprofViewer.vue.d.ts +27 -0
- package/dist/components/HprofViewer.vue_vue_type_script_setup_true_lang.js +561 -0
- package/dist/components/ImageLightbox.js +7 -0
- package/dist/components/ImageLightbox.vue.d.ts +3 -0
- package/dist/components/ImageLightbox.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/InlineText.d.ts +29 -0
- package/dist/components/InlineText.js +21 -0
- package/dist/components/JksViewer.js +7 -0
- package/dist/components/JksViewer.vue.d.ts +22 -0
- package/dist/components/JksViewer.vue_vue_type_script_setup_true_lang.js +353 -0
- package/dist/components/JsonlViewer.js +7 -0
- package/dist/components/JsonlViewer.vue.d.ts +15 -0
- package/dist/components/JsonlViewer.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/LogViewer.js +7 -0
- package/dist/components/LogViewer.vue.d.ts +29 -0
- package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +670 -0
- package/dist/components/LrcViewer.js +7 -0
- package/dist/components/LrcViewer.vue.d.ts +17 -0
- package/dist/components/LrcViewer.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/MarkdownTable.js +7 -0
- package/dist/components/MarkdownTable.vue.d.ts +19 -0
- package/dist/components/MarkdownTable.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/components/MarkdownText.d.ts +30 -0
- package/dist/components/MarkdownText.js +21 -0
- package/dist/components/MhtViewer.js +7 -0
- package/dist/components/MhtViewer.vue.d.ts +22 -0
- package/dist/components/MhtViewer.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/MindMapView.js +7 -0
- package/dist/components/MindMapView.vue.d.ts +23 -0
- package/dist/components/MindMapView.vue_vue_type_script_setup_true_lang.js +337 -0
- package/dist/components/MissingDependency.js +7 -0
- package/dist/components/MissingDependency.vue.d.ts +17 -0
- package/dist/components/MissingDependency.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/ModelViewer.js +7 -0
- package/dist/components/ModelViewer.vue.d.ts +18 -0
- package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/MsiViewer.js +7 -0
- package/dist/components/MsiViewer.vue.d.ts +19 -0
- package/dist/components/MsiViewer.vue_vue_type_script_setup_true_lang.js +136 -0
- package/dist/components/NotebookViewer.js +7 -0
- package/dist/components/NotebookViewer.vue.d.ts +20 -0
- package/dist/components/NotebookViewer.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/PdfViewer.js +7 -0
- package/dist/components/PdfViewer.vue.d.ts +19 -0
- package/dist/components/PdfViewer.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/PptxViewer.js +7 -0
- package/dist/components/PptxViewer.vue.d.ts +20 -0
- package/dist/components/PptxViewer.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/PsdViewer.js +7 -0
- package/dist/components/PsdViewer.vue.d.ts +15 -0
- package/dist/components/PsdViewer.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/components/QmcAudioViewer.js +7 -0
- package/dist/components/QmcAudioViewer.vue.d.ts +18 -0
- package/dist/components/QmcAudioViewer.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/components/RasterViewer.js +7 -0
- package/dist/components/RasterViewer.vue.d.ts +21 -0
- package/dist/components/RasterViewer.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/components/RtfViewer.js +7 -0
- package/dist/components/RtfViewer.vue.d.ts +21 -0
- package/dist/components/RtfViewer.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/SevenZipBrowser.js +7 -0
- package/dist/components/SevenZipBrowser.vue.d.ts +13 -0
- package/dist/components/SevenZipBrowser.vue_vue_type_script_setup_true_lang.js +366 -0
- package/dist/components/SqliteViewer.js +7 -0
- package/dist/components/SqliteViewer.vue.d.ts +18 -0
- package/dist/components/SqliteViewer.vue_vue_type_script_setup_true_lang.js +186 -0
- package/dist/components/SubtitleViewer.js +7 -0
- package/dist/components/SubtitleViewer.vue.d.ts +15 -0
- package/dist/components/SubtitleViewer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/XlsxChart.js +7 -0
- package/dist/components/XlsxChart.vue.d.ts +14 -0
- package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js +240 -0
- package/dist/components/XlsxViewer.js +7 -0
- package/dist/components/XlsxViewer.vue.d.ts +22 -0
- package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js +814 -0
- package/dist/components/XmindViewer.js +7 -0
- package/dist/components/XmindViewer.vue.d.ts +13 -0
- package/dist/components/XmindViewer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/ZipBrowser.js +7 -0
- package/dist/components/ZipBrowser.vue.d.ts +14 -0
- package/dist/components/ZipBrowser.vue_vue_type_script_setup_true_lang.js +326 -0
- package/dist/components/ZoomImage.js +7 -0
- package/dist/components/ZoomImage.vue.d.ts +29 -0
- package/dist/components/ZoomImage.vue_vue_type_script_setup_true_lang.js +147 -0
- package/dist/components/epl/EplCodeBlock.js +7 -0
- package/dist/components/epl/EplCodeBlock.vue.d.ts +15 -0
- package/dist/components/epl/EplCodeBlock.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/epl/EplDoc.js +7 -0
- package/dist/components/epl/EplDoc.vue.d.ts +19 -0
- package/dist/components/epl/EplDoc.vue_vue_type_script_setup_true_lang.js +327 -0
- package/dist/components/epl/EplMethod.js +7 -0
- package/dist/components/epl/EplMethod.vue.d.ts +14 -0
- package/dist/components/epl/EplMethod.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/epl/EplResource.js +7 -0
- package/dist/components/epl/EplResource.vue.d.ts +15 -0
- package/dist/components/epl/EplResource.vue_vue_type_script_setup_true_lang.js +204 -0
- package/dist/components/epl/EplTree.js +7 -0
- package/dist/components/epl/EplTree.vue.d.ts +27 -0
- package/dist/components/epl/EplTree.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/components/epl/EplVarTable.js +7 -0
- package/dist/components/epl/EplVarTable.vue.d.ts +21 -0
- package/dist/components/epl/EplVarTable.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/epl/docTypes.d.ts +12 -0
- package/dist/components/epl/numbering.d.ts +21 -0
- package/dist/components/epl/numbering.js +14 -0
- package/dist/components/icons/Icon.js +7 -0
- package/dist/components/icons/Icon.vue.d.ts +14 -0
- package/dist/components/icons/Icon.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/components/icons/iconPaths.d.ts +60 -0
- package/dist/components/icons/iconPaths.js +54 -0
- package/dist/components/optionalViewer.d.ts +14 -0
- package/dist/components/optionalViewer.js +37 -0
- package/dist/components/ui/ClampBlock.d.ts +82 -0
- package/dist/components/ui/ClampBlock.js +63 -0
- package/dist/composables/useFileViewer.d.ts +428 -0
- package/dist/composables/useFileViewer.js +27 -0
- package/dist/composables/useLightbox.d.ts +33 -0
- package/dist/composables/useLightbox.js +17 -0
- package/dist/composables/useLogRules.d.ts +47 -0
- package/dist/composables/useLogRules.js +74 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +30 -0
- package/dist/lib/aes.d.ts +25 -0
- package/dist/lib/aes.js +99 -0
- package/dist/lib/appx.d.ts +66 -0
- package/dist/lib/appx.js +112 -0
- package/dist/lib/archive.d.ts +29 -0
- package/dist/lib/asn1.d.ts +47 -0
- package/dist/lib/asn1.js +122 -0
- package/dist/lib/binobj.d.ts +69 -0
- package/dist/lib/binobj.js +430 -0
- package/dist/lib/brotli.d.ts +14 -0
- package/dist/lib/brotli.js +16 -0
- package/dist/lib/bzip2.d.ts +14 -0
- package/dist/lib/bzip2.js +161 -0
- package/dist/lib/classfile.d.ts +72 -0
- package/dist/lib/classfile.js +210 -0
- package/dist/lib/codePreview.d.ts +22 -0
- package/dist/lib/codePreview.js +27 -0
- package/dist/lib/codefold.d.ts +14 -0
- package/dist/lib/codefold.js +30 -0
- package/dist/lib/codeformat.d.ts +21 -0
- package/dist/lib/codeformat.js +130 -0
- package/dist/lib/csv.d.ts +19 -0
- package/dist/lib/csv.js +74 -0
- package/dist/lib/des.d.ts +17 -0
- package/dist/lib/des.js +928 -0
- package/dist/lib/diagram.d.ts +5 -0
- package/dist/lib/diagram.js +479 -0
- package/dist/lib/dicom.d.ts +69 -0
- package/dist/lib/dicom.js +442 -0
- package/dist/lib/dicomCodecs.d.ts +28 -0
- package/dist/lib/dicomCodecs.js +156 -0
- package/dist/lib/dicomRender.d.ts +46 -0
- package/dist/lib/dicomRender.js +114 -0
- package/dist/lib/dxf.d.ts +86 -0
- package/dist/lib/dxf.js +399 -0
- package/dist/lib/eml.d.ts +40 -0
- package/dist/lib/eml.js +46 -0
- package/dist/lib/encoding.d.ts +28 -0
- package/dist/lib/encoding.js +44 -0
- package/dist/lib/epl/code/ast.d.ts +150 -0
- package/dist/lib/epl/code/codeDataParser.d.ts +3 -0
- package/dist/lib/epl/code/codeDataParser.js +330 -0
- package/dist/lib/epl/code/codeLines.d.ts +20 -0
- package/dist/lib/epl/code/codeLines.js +191 -0
- package/dist/lib/epl/code/structures.d.ts +86 -0
- package/dist/lib/epl/code/textCode.d.ts +29 -0
- package/dist/lib/epl/code/textCode.js +150 -0
- package/dist/lib/epl/code/variable.d.ts +25 -0
- package/dist/lib/epl/eplDocument.d.ts +21 -0
- package/dist/lib/epl/eplDocument.js +36 -0
- package/dist/lib/epl/imageList.d.ts +28 -0
- package/dist/lib/epl/imageList.js +66 -0
- package/dist/lib/epl/index.d.ts +53 -0
- package/dist/lib/epl/index.js +45 -0
- package/dist/lib/epl/io/binaryReader.d.ts +56 -0
- package/dist/lib/epl/io/binaryReader.js +119 -0
- package/dist/lib/epl/io/encoding.d.ts +16 -0
- package/dist/lib/epl/io/encoding.js +27 -0
- package/dist/lib/epl/model/eplSystemId.d.ts +64 -0
- package/dist/lib/epl/model/eplSystemId.js +16 -0
- package/dist/lib/epl/model/section.d.ts +46 -0
- package/dist/lib/epl/names/eplLibData.js +39 -0
- package/dist/lib/epl/names/idToNameMap.d.ts +33 -0
- package/dist/lib/epl/names/idToNameMap.js +130 -0
- package/dist/lib/epl/names/libNameProvider.d.ts +15 -0
- package/dist/lib/epl/names/libNameProvider.js +18 -0
- package/dist/lib/epl/program.d.ts +120 -0
- package/dist/lib/epl/program.js +134 -0
- package/dist/lib/epl/projectFileReader.d.ts +23 -0
- package/dist/lib/epl/projectFileReader.js +65 -0
- package/dist/lib/epl/sections/code.d.ts +20 -0
- package/dist/lib/epl/sections/esystemInfo.d.ts +14 -0
- package/dist/lib/epl/sections/losable.d.ts +11 -0
- package/dist/lib/epl/sections/projectConfig.d.ts +23 -0
- package/dist/lib/epl/sections/resource.d.ts +57 -0
- package/dist/lib/fb2.d.ts +14 -0
- package/dist/lib/fb2.js +62 -0
- package/dist/lib/fileType.d.ts +315 -0
- package/dist/lib/fileType.js +800 -0
- package/dist/lib/fonts.d.ts +8 -0
- package/dist/lib/fonts.js +4 -0
- package/dist/lib/format.d.ts +16 -0
- package/dist/lib/format.js +38 -0
- package/dist/lib/frontmatter.d.ts +13 -0
- package/dist/lib/frontmatter.js +23 -0
- package/dist/lib/geo.d.ts +30 -0
- package/dist/lib/geo.js +235 -0
- package/dist/lib/har.d.ts +171 -0
- package/dist/lib/har.js +397 -0
- package/dist/lib/highlight.d.ts +18 -0
- package/dist/lib/highlight.js +34 -0
- package/dist/lib/highlightLangs.d.ts +15 -0
- package/dist/lib/highlightLangs.js +93 -0
- package/dist/lib/hprof.d.ts +211 -0
- package/dist/lib/hprof.js +709 -0
- package/dist/lib/ipynb.d.ts +48 -0
- package/dist/lib/ipynb.js +130 -0
- package/dist/lib/jks.d.ts +86 -0
- package/dist/lib/jks.js +167 -0
- package/dist/lib/jsonl.d.ts +29 -0
- package/dist/lib/jsonl.js +24 -0
- package/dist/lib/lrc.d.ts +32 -0
- package/dist/lib/lrc.js +84 -0
- package/dist/lib/lzma.d.ts +70 -0
- package/dist/lib/lzma.js +204 -0
- package/dist/lib/markdown/blocks.d.ts +9 -0
- package/dist/lib/markdown/blocks.js +221 -0
- package/dist/lib/markdown/index.d.ts +3 -0
- package/dist/lib/markdown/inline.d.ts +33 -0
- package/dist/lib/markdown/inline.js +84 -0
- package/dist/lib/markdown/math.d.ts +5 -0
- package/dist/lib/markdown/math.js +25 -0
- package/dist/lib/markdown/segmentize.d.ts +11 -0
- package/dist/lib/markdown/segmentize.js +28 -0
- package/dist/lib/markdown/styles.d.ts +26 -0
- package/dist/lib/markdown/styles.js +135 -0
- package/dist/lib/mht.d.ts +51 -0
- package/dist/lib/mht.js +122 -0
- package/dist/lib/midi.d.ts +28 -0
- package/dist/lib/midi.js +84 -0
- package/dist/lib/mime.d.ts +82 -0
- package/dist/lib/mime.js +151 -0
- package/dist/lib/mindmap.d.ts +51 -0
- package/dist/lib/mindmap.js +113 -0
- package/dist/lib/mobi.d.ts +15 -0
- package/dist/lib/mobi.js +68 -0
- package/dist/lib/msi.d.ts +50 -0
- package/dist/lib/msi.js +332 -0
- package/dist/lib/optionalDep.d.ts +26 -0
- package/dist/lib/optionalDep.js +20 -0
- package/dist/lib/pkcs12.d.ts +56 -0
- package/dist/lib/pkcs12.js +356 -0
- package/dist/lib/qmc.d.ts +50 -0
- package/dist/lib/qmc.js +213 -0
- package/dist/lib/rar.d.ts +16 -0
- package/dist/lib/rar.js +40 -0
- package/dist/lib/rawPreview.d.ts +12 -0
- package/dist/lib/rawPreview.js +54 -0
- package/dist/lib/rc2.d.ts +12 -0
- package/dist/lib/rc2.js +298 -0
- package/dist/lib/resolveInput.d.ts +22 -0
- package/dist/lib/resolveInput.js +55 -0
- package/dist/lib/rtf.d.ts +53 -0
- package/dist/lib/rtf.js +413 -0
- package/dist/lib/sevenZip.d.ts +82 -0
- package/dist/lib/sevenZip.js +395 -0
- package/dist/lib/sha1.d.ts +24 -0
- package/dist/lib/sha1.js +53 -0
- package/dist/lib/sha256.d.ts +21 -0
- package/dist/lib/sha256.js +119 -0
- package/dist/lib/speechAudio.d.ts +36 -0
- package/dist/lib/speechAudio.js +85 -0
- package/dist/lib/sqlite.d.ts +38 -0
- package/dist/lib/sqlite.js +104 -0
- package/dist/lib/subtitle.d.ts +26 -0
- package/dist/lib/subtitle.js +99 -0
- package/dist/lib/tarball.d.ts +20 -0
- package/dist/lib/tarball.js +248 -0
- package/dist/lib/viewerFormats.d.ts +35 -0
- package/dist/lib/viewerFormats.js +83 -0
- package/dist/lib/viewerKind.d.ts +36 -0
- package/dist/lib/viewerKind.js +233 -0
- package/dist/lib/x509.d.ts +68 -0
- package/dist/lib/x509.js +267 -0
- package/dist/lib/xlsx.d.ts +55 -0
- package/dist/lib/xlsx.js +321 -0
- package/dist/lib/xlsxCharts.d.ts +34 -0
- package/dist/lib/xlsxCharts.js +152 -0
- package/dist/lib/xmind.d.ts +6 -0
- package/dist/lib/xmind.js +124 -0
- package/dist/lib/zip.d.ts +56 -0
- package/dist/lib/zip.js +169 -0
- package/dist/style.css +2 -0
- package/dist/types.d.ts +42 -0
- package/package.json +128 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, openBlock as o, renderList as s, toDisplayString as c, vShow as l, withDirectives as u } from "vue";
|
|
2
|
+
//#region src/components/XlsxChart.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var d = [
|
|
4
|
+
"width",
|
|
5
|
+
"height",
|
|
6
|
+
"viewBox",
|
|
7
|
+
"aria-label"
|
|
8
|
+
], f = ["width", "height"], p = ["x"], m = { class: "xc__grid" }, h = [
|
|
9
|
+
"x1",
|
|
10
|
+
"x2",
|
|
11
|
+
"y1",
|
|
12
|
+
"y2"
|
|
13
|
+
], g = { class: "xc__ylabels" }, _ = ["x", "y"], v = { class: "xc__xlabels" }, y = ["x", "y"], b = ["points", "fill"], x = ["points", "stroke"], S = [
|
|
14
|
+
"cx",
|
|
15
|
+
"cy",
|
|
16
|
+
"fill"
|
|
17
|
+
], C = [
|
|
18
|
+
"x",
|
|
19
|
+
"y",
|
|
20
|
+
"width",
|
|
21
|
+
"height",
|
|
22
|
+
"fill"
|
|
23
|
+
], w = ["d", "fill"], T = ["x", "y"], E = {
|
|
24
|
+
key: 7,
|
|
25
|
+
class: "xc__legend"
|
|
26
|
+
}, D = ["transform"], O = ["fill"], k = {
|
|
27
|
+
x: 12,
|
|
28
|
+
y: -1
|
|
29
|
+
}, A = 38, j = 8, ee = 26, M = /*@__PURE__*/ a({
|
|
30
|
+
__name: "XlsxChart",
|
|
31
|
+
props: { chart: {} },
|
|
32
|
+
setup(a) {
|
|
33
|
+
let M = a, N = [
|
|
34
|
+
"#4472C4",
|
|
35
|
+
"#ED7D31",
|
|
36
|
+
"#A5A5A5",
|
|
37
|
+
"#FFC000",
|
|
38
|
+
"#5B9BD5",
|
|
39
|
+
"#70AD47",
|
|
40
|
+
"#264478",
|
|
41
|
+
"#9E480E"
|
|
42
|
+
], P = t(() => Math.max(220, M.chart.anchor.wPx)), F = t(() => Math.max(140, M.chart.anchor.hPx)), I = t(() => M.chart.series.length > 1), L = t(() => M.chart.title ? 18 : 4), R = t(() => I.value ? 16 : 0), z = t(() => {
|
|
43
|
+
let e = L.value + 4;
|
|
44
|
+
return {
|
|
45
|
+
x: A,
|
|
46
|
+
y: e,
|
|
47
|
+
w: Math.max(10, P.value - A - j),
|
|
48
|
+
h: Math.max(10, F.value - e - ee - R.value)
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
function B(e) {
|
|
52
|
+
return M.chart.series[e]?.color || N[e % N.length];
|
|
53
|
+
}
|
|
54
|
+
let V = t(() => {
|
|
55
|
+
let e = M.chart, t = e.series.flatMap((e) => e.values.filter((e) => e != null)), n = e.yMin, r = e.yMax;
|
|
56
|
+
if (n == null || r == null) {
|
|
57
|
+
let i = t.length ? Math.min(...t) : 0, a = t.length ? Math.max(...t) : 1;
|
|
58
|
+
(e.type === "bar" || e.type === "barH" || e.type === "area") && (i > 0 && (i = 0), a < 0 && (a = 0)), i === a && (--i, a += 1);
|
|
59
|
+
let o = (a - i) * .08;
|
|
60
|
+
n ??= i - o, r ??= a + o;
|
|
61
|
+
}
|
|
62
|
+
return r <= n && (r = n + 1), {
|
|
63
|
+
lo: n,
|
|
64
|
+
hi: r
|
|
65
|
+
};
|
|
66
|
+
}), H = t(() => {
|
|
67
|
+
let { lo: e, hi: t } = V.value, n = [];
|
|
68
|
+
for (let r = 0; r <= 4; r++) {
|
|
69
|
+
let i = e + (t - e) * r / 4;
|
|
70
|
+
n.push({
|
|
71
|
+
v: i,
|
|
72
|
+
y: z.value.y + z.value.h - z.value.h * r / 4
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return n;
|
|
76
|
+
});
|
|
77
|
+
function U(e) {
|
|
78
|
+
let t = Math.abs(e);
|
|
79
|
+
return t >= 1e3 ? Math.round(e).toLocaleString("en-US") : t >= 1 ? (Math.round(e * 100) / 100).toString() : (Math.round(e * 1e3) / 1e3).toString();
|
|
80
|
+
}
|
|
81
|
+
let W = (e) => {
|
|
82
|
+
let { lo: t, hi: n } = V.value, r = z.value;
|
|
83
|
+
return r.y + r.h - (e - t) / (n - t) * r.h;
|
|
84
|
+
}, G = t(() => M.chart.categories), K = (e) => {
|
|
85
|
+
let t = z.value, n = Math.max(1, G.value.length);
|
|
86
|
+
return n === 1 ? t.x + t.w / 2 : t.x + t.w * e / (n - 1);
|
|
87
|
+
}, q = (e) => z.value.x + z.value.w * e / Math.max(1, G.value.length), J = t(() => z.value.w / Math.max(1, G.value.length));
|
|
88
|
+
function Y(e) {
|
|
89
|
+
return M.chart.series[e].values.map((e, t) => e == null ? null : `${K(t).toFixed(1)},${W(e).toFixed(1)}`).filter(Boolean).join(" ");
|
|
90
|
+
}
|
|
91
|
+
function X(e) {
|
|
92
|
+
let t = Y(e);
|
|
93
|
+
if (!t) return "";
|
|
94
|
+
z.value;
|
|
95
|
+
let n = t.split(" ")[0].split(",")[0], r = t.split(" ").at(-1).split(",")[0], i = W(Math.max(V.value.lo, 0)).toFixed(1);
|
|
96
|
+
return `${n},${i} ${t} ${r},${i}`;
|
|
97
|
+
}
|
|
98
|
+
let Z = t(() => {
|
|
99
|
+
let e = M.chart;
|
|
100
|
+
if (e.type !== "bar" && e.type !== "barH") return [];
|
|
101
|
+
let t = e.series.length, n = [], r = J.value * .18, i = (J.value - r) / Math.max(1, t), a = W(Math.max(V.value.lo, 0));
|
|
102
|
+
for (let o = 0; o < G.value.length; o++) for (let s = 0; s < t; s++) {
|
|
103
|
+
let t = e.series[s].values[o];
|
|
104
|
+
if (t == null) continue;
|
|
105
|
+
let c = q(o) + r / 2 + i * s, l = W(t);
|
|
106
|
+
n.push({
|
|
107
|
+
x: c,
|
|
108
|
+
y: Math.min(l, a),
|
|
109
|
+
w: Math.max(1, i - 1),
|
|
110
|
+
h: Math.max(1, Math.abs(a - l)),
|
|
111
|
+
fill: B(s)
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return n;
|
|
115
|
+
}), Q = t(() => {
|
|
116
|
+
let e = M.chart;
|
|
117
|
+
if (e.type !== "pie") return [];
|
|
118
|
+
let t = e.series[0];
|
|
119
|
+
if (!t) return [];
|
|
120
|
+
let n = t.values.map((e) => e == null ? 0 : Math.abs(e)), r = n.reduce((e, t) => e + t, 0);
|
|
121
|
+
if (r <= 0) return [];
|
|
122
|
+
let i = z.value, a = i.x + i.w / 2, o = i.y + i.h / 2, s = Math.max(8, Math.min(i.w, i.h) / 2 - 2), c = -Math.PI / 2, l = [];
|
|
123
|
+
for (let e = 0; e < n.length; e++) {
|
|
124
|
+
if (n[e] <= 0) continue;
|
|
125
|
+
let t = c + n[e] / r * Math.PI * 2, i = +(t - c > Math.PI), u = a + s * Math.cos(c), d = o + s * Math.sin(c), f = a + s * Math.cos(t), p = o + s * Math.sin(t);
|
|
126
|
+
l.push({
|
|
127
|
+
d: `M${a.toFixed(1)},${o.toFixed(1)} L${u.toFixed(1)},${d.toFixed(1)} A${s.toFixed(1)},${s.toFixed(1)} 0 ${i} 1 ${f.toFixed(1)},${p.toFixed(1)} Z`,
|
|
128
|
+
fill: N[e % N.length],
|
|
129
|
+
label: G.value[e] ?? ""
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return l;
|
|
133
|
+
}), te = t(() => {
|
|
134
|
+
let e = Math.max(2, Math.floor(z.value.w / 34));
|
|
135
|
+
return Math.max(1, Math.ceil(G.value.length / e));
|
|
136
|
+
}), $ = t(() => [
|
|
137
|
+
"line",
|
|
138
|
+
"area",
|
|
139
|
+
"scatter"
|
|
140
|
+
].includes(M.chart.type));
|
|
141
|
+
return (t, A) => (o(), r("svg", {
|
|
142
|
+
class: "xc",
|
|
143
|
+
width: P.value,
|
|
144
|
+
height: F.value,
|
|
145
|
+
viewBox: `0 0 ${P.value} ${F.value}`,
|
|
146
|
+
role: "img",
|
|
147
|
+
"aria-label": a.chart.title || "图表"
|
|
148
|
+
}, [
|
|
149
|
+
i("rect", {
|
|
150
|
+
class: "xc__bg",
|
|
151
|
+
width: P.value,
|
|
152
|
+
height: F.value,
|
|
153
|
+
rx: "3"
|
|
154
|
+
}, null, 8, f),
|
|
155
|
+
a.chart.title ? (o(), r("text", {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: "xc__title",
|
|
158
|
+
x: P.value / 2,
|
|
159
|
+
y: 13,
|
|
160
|
+
"text-anchor": "middle"
|
|
161
|
+
}, c(a.chart.title), 9, p)) : n("", !0),
|
|
162
|
+
a.chart.type !== "pie" && a.chart.type !== "unknown" ? (o(), r(e, { key: 1 }, [
|
|
163
|
+
i("g", m, [(o(!0), r(e, null, s(H.value, (e, t) => (o(), r("line", {
|
|
164
|
+
key: t,
|
|
165
|
+
x1: z.value.x,
|
|
166
|
+
x2: z.value.x + z.value.w,
|
|
167
|
+
y1: e.y,
|
|
168
|
+
y2: e.y
|
|
169
|
+
}, null, 8, h))), 128))]),
|
|
170
|
+
i("g", g, [(o(!0), r(e, null, s(H.value, (e, t) => (o(), r("text", {
|
|
171
|
+
key: t,
|
|
172
|
+
x: z.value.x - 4,
|
|
173
|
+
y: e.y + 3,
|
|
174
|
+
"text-anchor": "end"
|
|
175
|
+
}, c(U(e.v)), 9, _))), 128))]),
|
|
176
|
+
i("g", v, [(o(!0), r(e, null, s(G.value, (e, t) => u((o(), r("text", {
|
|
177
|
+
key: t,
|
|
178
|
+
x: $.value ? K(t) : q(t) + J.value / 2,
|
|
179
|
+
y: z.value.y + z.value.h + 12,
|
|
180
|
+
"text-anchor": "middle"
|
|
181
|
+
}, c(e), 9, y)), [[l, t % te.value === 0]])), 128))])
|
|
182
|
+
], 64)) : n("", !0),
|
|
183
|
+
a.chart.type === "area" ? (o(!0), r(e, { key: 2 }, s(a.chart.series, (e, t) => (o(), r("polygon", {
|
|
184
|
+
key: "a" + t,
|
|
185
|
+
points: X(t),
|
|
186
|
+
fill: B(t),
|
|
187
|
+
"fill-opacity": "0.25",
|
|
188
|
+
stroke: "none"
|
|
189
|
+
}, null, 8, b))), 128)) : n("", !0),
|
|
190
|
+
$.value ? (o(), r(e, { key: 3 }, [(o(!0), r(e, null, s(a.chart.series, (e, t) => (o(), r("polyline", {
|
|
191
|
+
key: "l" + t,
|
|
192
|
+
points: Y(t),
|
|
193
|
+
fill: "none",
|
|
194
|
+
stroke: B(t),
|
|
195
|
+
"stroke-width": "1.6",
|
|
196
|
+
"stroke-linejoin": "round"
|
|
197
|
+
}, null, 8, x))), 128)), (o(!0), r(e, null, s(a.chart.series, (t, n) => (o(), r(e, { key: "m" + n }, [(o(!0), r(e, null, s(t.values, (e, t) => u((o(), r("circle", {
|
|
198
|
+
key: t,
|
|
199
|
+
cx: K(t),
|
|
200
|
+
cy: e == null ? 0 : W(e),
|
|
201
|
+
r: "1.8",
|
|
202
|
+
fill: B(n)
|
|
203
|
+
}, null, 8, S)), [[l, e != null]])), 128))], 64))), 128))], 64)) : n("", !0),
|
|
204
|
+
a.chart.type === "bar" || a.chart.type === "barH" ? (o(!0), r(e, { key: 4 }, s(Z.value, (e, t) => (o(), r("rect", {
|
|
205
|
+
key: t,
|
|
206
|
+
x: e.x,
|
|
207
|
+
y: e.y,
|
|
208
|
+
width: e.w,
|
|
209
|
+
height: e.h,
|
|
210
|
+
fill: e.fill
|
|
211
|
+
}, null, 8, C))), 128)) : n("", !0),
|
|
212
|
+
a.chart.type === "pie" ? (o(!0), r(e, { key: 5 }, s(Q.value, (e, t) => (o(), r("path", {
|
|
213
|
+
key: t,
|
|
214
|
+
d: e.d,
|
|
215
|
+
fill: e.fill,
|
|
216
|
+
stroke: "#fff",
|
|
217
|
+
"stroke-width": "0.6"
|
|
218
|
+
}, null, 8, w))), 128)) : n("", !0),
|
|
219
|
+
a.chart.type === "unknown" ? (o(), r("text", {
|
|
220
|
+
key: 6,
|
|
221
|
+
class: "xc__note",
|
|
222
|
+
x: P.value / 2,
|
|
223
|
+
y: F.value / 2,
|
|
224
|
+
"text-anchor": "middle"
|
|
225
|
+
}, " (暂不支持的图表类型) ", 8, T)) : n("", !0),
|
|
226
|
+
I.value ? (o(), r("g", E, [(o(!0), r(e, null, s(a.chart.series, (e, t) => (o(), r("g", {
|
|
227
|
+
key: t,
|
|
228
|
+
transform: `translate(${z.value.x + t * 84}, ${F.value - 4})`
|
|
229
|
+
}, [i("rect", {
|
|
230
|
+
width: 9,
|
|
231
|
+
height: 9,
|
|
232
|
+
y: -9,
|
|
233
|
+
fill: B(t),
|
|
234
|
+
rx: "1.5"
|
|
235
|
+
}, null, 8, O), i("text", k, c(e.name), 1)], 8, D))), 128))])) : n("", !0)
|
|
236
|
+
], 8, d));
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
//#endregion
|
|
240
|
+
export { M as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./XlsxViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/XlsxViewer.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-7c63a9a3"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-viewer spreadsheet (`.xlsx`/`.xlsm`) renderer. Fetches the workbook bytes and parses them entirely
|
|
3
|
+
* in-browser via exceljs (see lib/xlsx.ts), then renders each worksheet as a plain HTML `<table>` — merged
|
|
4
|
+
* cells, column widths, font sizes and the common cell styling carried over so the preview reads like the
|
|
5
|
+
* original. On top of the static table it adds the spreadsheet interactions: A/B/C… + row-number headers,
|
|
6
|
+
* collapsed hidden rows/columns with click-to-expand, frozen panes (with a 2px boundary rule), drag-to-resize
|
|
7
|
+
* columns/rows, drag-to-select a cell range (with a status-bar sum/avg), and embedded charts rendered as SVG
|
|
8
|
+
* (see lib/xlsxCharts.ts) overlaid at their drawing anchor. No CDN / network beyond the file fetch; a bottom
|
|
9
|
+
* tab bar switches sheets.
|
|
10
|
+
*
|
|
11
|
+
* Two entry shapes mirror the other viewers (DICOM/docx/zip): a real download URL for a held attachment, or
|
|
12
|
+
* a blob URL minted by the archive browsers from already-extracted bytes.
|
|
13
|
+
*/
|
|
14
|
+
type __VLS_Props = {
|
|
15
|
+
/** Download/blob URL of the .xlsx bytes. */
|
|
16
|
+
url?: string;
|
|
17
|
+
name: string;
|
|
18
|
+
size?: number;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|