@flyfish-group/file-viewer3 1.0.15 → 1.0.17
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/README.md +16 -14
- package/dist/components/3MFLoader.js +1 -1
- package/dist/components/AMFLoader.js +1 -1
- package/dist/components/AudioViewer.js +1 -1
- package/dist/components/CadViewer.js +1 -1
- package/dist/components/CodeViewer.js +1 -1
- package/dist/components/ColladaLoader.js +1 -1
- package/dist/components/DrawingViewer.js +1 -1
- package/dist/components/EdaViewer.js +1 -1
- package/dist/components/EmailViewer.js +1 -1
- package/dist/components/EpubViewer.js +1 -1
- package/dist/components/FBXLoader.js +1 -1
- package/dist/components/GLTFLoader.js +1 -1
- package/dist/components/ImageViewer.js +1 -1
- package/dist/components/KMZLoader.js +1 -1
- package/dist/components/MarkdownViewer.js +1 -1
- package/dist/components/ModelViewer.js +1 -1
- package/dist/components/OBJLoader.js +1 -1
- package/dist/components/OfdViewer.js +1 -1
- package/dist/components/PCDLoader.js +1 -1
- package/dist/components/PLYLoader.js +1 -1
- package/dist/components/PdfView.js +4591 -4497
- package/dist/components/PptxRender.js +1 -1
- package/dist/components/STLLoader.js +1 -1
- package/dist/components/TDSLoader.js +1 -1
- package/dist/components/USDLoader.js +1 -1
- package/dist/components/UmdViewer.js +1 -1
- package/dist/components/VRMLLoader.js +1 -1
- package/dist/components/VTKLoader.js +1 -1
- package/dist/components/XYZLoader.js +1 -1
- package/dist/components/XlsxTable.js +1 -1
- package/dist/components/__vite-browser-external.js +1 -1
- package/dist/components/_plugin-vue_export-helper.js +1 -1
- package/dist/components/ar-SA-G6X2FPQ2.js +1 -1
- package/dist/components/arc.js +1 -1
- package/dist/components/architecture-7EHR7CIX.js +1 -1
- package/dist/components/architectureDiagram-3BPJPVTR.js +1 -1
- package/dist/components/archive.js +1 -1
- package/dist/components/asyncToGenerator.js +1 -1
- package/dist/components/audio.js +1 -1
- package/dist/components/az-AZ-76LH7QW2.js +1 -1
- package/dist/components/bash.js +1 -1
- package/dist/components/bg-BG-XCXSNQG7.js +1 -1
- package/dist/components/blockDiagram-GPEHLZMM.js +1 -1
- package/dist/components/bn-BD-2XOGV67Q.js +1 -1
- package/dist/components/c4Diagram-AAUBKEIU.js +1 -1
- package/dist/components/ca-ES-6MX7JW3Y.js +1 -1
- package/dist/components/cad.js +1 -1
- package/dist/components/cfb.js +1 -1
- package/dist/components/channel.js +1 -1
- package/dist/components/chunk-2J33WTMH.js +1 -1
- package/dist/components/chunk-3OPIFGDE.js +1 -1
- package/dist/components/chunk-4BX2VUAB.js +1 -1
- package/dist/components/chunk-55IACEB6.js +1 -1
- package/dist/components/chunk-5ZQYHXKU.js +1 -1
- package/dist/components/chunk-6U3AYISY.js +1 -1
- package/dist/components/chunk-727SXJPM.js +1 -1
- package/dist/components/chunk-AGHRB4JF.js +1 -1
- package/dist/components/chunk-AQP2D5EJ.js +1 -1
- package/dist/components/chunk-BSJP7CBP.js +1 -1
- package/dist/components/chunk-CSCIHK7Q.js +1 -1
- package/dist/components/chunk-FMBD7UC4.js +1 -1
- package/dist/components/chunk-K2UTITRG.js +1 -1
- package/dist/components/chunk-KSCS5N6A.js +1 -1
- package/dist/components/chunk-L5ZTLDWV.js +1 -1
- package/dist/components/chunk-LZXEDZCA.js +1 -1
- package/dist/components/chunk-ND2GUHAM.js +1 -1
- package/dist/components/chunk-NZK2D7GU.js +1 -1
- package/dist/components/chunk-O5CBEL6O.js +1 -1
- package/dist/components/chunk-QZHKN3VN.js +1 -1
- package/dist/components/chunk-SRAX5OIU.js +1 -1
- package/dist/components/chunk-WU5MYG2G.js +1 -1
- package/dist/components/chunk-XPW4576I.js +1 -1
- package/dist/components/chunk-Z3N5DIM6.js +1 -1
- package/dist/components/chunk-ZUYEQ4TG.js +1 -1
- package/dist/components/chunk.js +1 -1
- package/dist/components/classDiagram-4FO5ZUOK.js +1 -1
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +1 -1
- package/dist/components/core.js +1 -1
- package/dist/components/cose-bilkent-S5V4N54A.js +1 -1
- package/dist/components/cpp.js +1 -1
- package/dist/components/cs-CZ-2BRQDIVT.js +1 -1
- package/dist/components/csharp.js +1 -1
- package/dist/components/css.js +1 -1
- package/dist/components/cytoscape.esm.js +1 -1
- package/dist/components/da-DK-5WZEPLOC.js +1 -1
- package/dist/components/dagre-BM42HDAG.js +1 -1
- package/dist/components/dagre.js +1 -1
- package/dist/components/de-DE-XR44H4JA.js +1 -1
- package/dist/components/defaultLocale.js +1 -1
- package/dist/components/defineProperty.js +1 -1
- package/dist/components/diagram-2AECGRRQ.js +1 -1
- package/dist/components/diagram-5GNKFQAL.js +1 -1
- package/dist/components/diagram-KO2AKTUF.js +1 -1
- package/dist/components/diagram-LMA3HP47.js +1 -1
- package/dist/components/diagram-OG6HWLK6.js +1 -1
- package/dist/components/diff.js +1 -1
- package/dist/components/directory-open-01563666.js +1 -1
- package/dist/components/directory-open-4ed118d0.js +1 -1
- package/dist/components/dist.js +1 -1
- package/dist/components/dist2.js +1 -1
- package/dist/components/dist3.js +1 -1
- package/dist/components/docx-preview.js +1 -1
- package/dist/components/drawing.js +1 -1
- package/dist/components/ebook.js +1 -1
- package/dist/components/eda.js +1 -1
- package/dist/components/el-GR-BZB4AONW.js +1 -1
- package/dist/components/email.js +1 -1
- package/dist/components/en-B4ZKOASM.js +1 -1
- package/dist/components/erDiagram-TEJ5UH35.js +1 -1
- package/dist/components/es-ES-U4NZUMDT.js +1 -1
- package/dist/components/eu-ES-A7QVB2H4.js +1 -1
- package/dist/components/eventmodeling-FCH6USID.js +1 -1
- package/dist/components/fa-IR-HGAKTJCU.js +1 -1
- package/dist/components/fflate.module.js +1 -1
- package/dist/components/fi-FI-Z5N7JZ37.js +1 -1
- package/dist/components/file-open-002ab408.js +1 -1
- package/dist/components/file-open-7c801643.js +1 -1
- package/dist/components/file-save-3189631c.js +1 -1
- package/dist/components/file-save-745eba88.js +1 -1
- package/dist/components/flowDiagram-I6XJVG4X.js +1 -1
- package/dist/components/fr-FR-RHASNOE6.js +1 -1
- package/dist/components/ganttDiagram-6RSMTGT7.js +1 -1
- package/dist/components/gitGraph-WXDBUCRP.js +1 -1
- package/dist/components/gitGraphDiagram-PVQCEYII.js +1 -1
- package/dist/components/gl-ES-HMX3MZ6V.js +1 -1
- package/dist/components/go.js +1 -1
- package/dist/components/graphlib.js +1 -1
- package/dist/components/he-IL-6SHJWFNN.js +1 -1
- package/dist/components/hi-IN-IWLTKZ5I.js +1 -1
- package/dist/components/hu-HU-A5ZG7DT2.js +1 -1
- package/dist/components/id-ID-SAP4L64H.js +1 -1
- package/dist/components/image-GAAHSSAO.js +1 -1
- package/dist/components/image-blob-reduce.esm.js +1 -1
- package/dist/components/image.js +1 -1
- package/dist/components/info-J43DQDTF.js +1 -1
- package/dist/components/infoDiagram-5YYISTIA.js +1 -1
- package/dist/components/ini.js +1 -1
- package/dist/components/init.js +1 -1
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +1 -1
- package/dist/components/it-IT-JPQ66NNP.js +1 -1
- package/dist/components/ja-JP-DBVTYXUO.js +1 -1
- package/dist/components/java.js +1 -1
- package/dist/components/javascript.js +1 -1
- package/dist/components/journeyDiagram-JHISSGLW.js +1 -1
- package/dist/components/json.js +1 -1
- package/dist/components/jszip.min.js +1 -1
- package/dist/components/kaa-6HZHGXH3.js +1 -1
- package/dist/components/kab-KAB-ZGHBKWFO.js +1 -1
- package/dist/components/kanban-definition-UN3LZRKU.js +1 -1
- package/dist/components/katex.js +1 -1
- package/dist/components/kk-KZ-P5N5QNE5.js +1 -1
- package/dist/components/km-KH-HSX4SM5Z.js +1 -1
- package/dist/components/ko-KR-MTYHY66A.js +1 -1
- package/dist/components/ku-TR-6OUDTVRD.js +1 -1
- package/dist/components/lib.js +1 -1
- package/dist/components/libarchive.js +1 -1
- package/dist/components/linear.js +1 -1
- package/dist/components/lt-LT-XHIRWOB4.js +1 -1
- package/dist/components/lv-LV-5QDEKY6T.js +1 -1
- package/dist/components/markdown.js +1 -1
- package/dist/components/md.js +1 -1
- package/dist/components/mermaid-parser.core.js +1 -1
- package/dist/components/mindmap-definition-RKZ34NQL.js +1 -1
- package/dist/components/model.js +1 -1
- package/dist/components/mp4.js +1 -1
- package/dist/components/mr-IN-CRQNXWMA.js +1 -1
- package/dist/components/my-MM-5M5IBNSE.js +1 -1
- package/dist/components/nb-NO-T6EIAALU.js +1 -1
- package/dist/components/nestedRender.js +1 -1
- package/dist/components/nl-NL-IS3SIHDZ.js +1 -1
- package/dist/components/nn-NO-6E72VCQL.js +1 -1
- package/dist/components/objectSpread2.js +1 -1
- package/dist/components/objectWithoutProperties.js +1 -1
- package/dist/components/oc-FR-POXYY2M6.js +1 -1
- package/dist/components/ofd.js +1 -1
- package/dist/components/ofd2.js +1 -1
- package/dist/components/ordinal.js +1 -1
- package/dist/components/pa-IN-N4M65BXN.js +1 -1
- package/dist/components/packet-YPE3B663.js +1 -1
- package/dist/components/pdf.js +1 -1
- package/dist/components/percentages-BXMCSKIN.js +1 -1
- package/dist/components/php.js +1 -1
- package/dist/components/pica.js +1 -1
- package/dist/components/pie-LRSECV5Y.js +1 -1
- package/dist/components/pie.js +1 -1
- package/dist/components/pieDiagram-4H26LBE5.js +1 -1
- package/dist/components/pl-PL-T2D74RX3.js +1 -1
- package/dist/components/postal-mime.js +1 -1
- package/dist/components/pptx.js +1 -1
- package/dist/components/prod.js +1 -1
- package/dist/components/pt-BR-5N22H2LF.js +1 -1
- package/dist/components/pt-PT-UZXXM6DQ.js +1 -1
- package/dist/components/python.js +1 -1
- package/dist/components/quadrantDiagram-W4KKPZXB.js +1 -1
- package/dist/components/radar-GUYGQ44K.js +1 -1
- package/dist/components/requirementDiagram-4Y6WPE33.js +1 -1
- package/dist/components/ro-RO-JPDTUUEW.js +1 -1
- package/dist/components/rough.esm.js +1 -1
- package/dist/components/roundRect.js +1 -1
- package/dist/components/ru-RU-B4JR7IUQ.js +1 -1
- package/dist/components/rust.js +1 -1
- package/dist/components/sankeyDiagram-5OEKKPKP.js +1 -1
- package/dist/components/sequenceDiagram-3UESZ5HK.js +1 -1
- package/dist/components/shared.js +1 -1
- package/dist/components/shared2.js +1 -1
- package/dist/components/si-LK-N5RQ5JYF.js +1 -1
- package/dist/components/sk-SK-C5VTKIMK.js +1 -1
- package/dist/components/sl-SI-NN7IZMDC.js +1 -1
- package/dist/components/sql.js +1 -1
- package/dist/components/src.js +1 -1
- package/dist/components/src2.js +1 -1
- package/dist/components/stateDiagram-AJRCARHV.js +1 -1
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +1 -1
- package/dist/components/subset-shared.chunk.js +1 -1
- package/dist/components/subset-worker.chunk.js +1 -1
- package/dist/components/sv-SE-XGPEYMSR.js +1 -1
- package/dist/components/ta-IN-2NMHFXQM.js +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/th-TH-HPSO5L25.js +1 -1
- package/dist/components/three.module.js +1 -1
- package/dist/components/time.js +1 -1
- package/dist/components/timeline-definition-PNZ67QCA.js +1 -1
- package/dist/components/tr-TR-DEFEU3FU.js +1 -1
- package/dist/components/treeView-BLDUP644.js +1 -1
- package/dist/components/treemap-LRROVOQU.js +1 -1
- package/dist/components/typescript.js +1 -1
- package/dist/components/uk-UA-QMV73CPH.js +1 -1
- package/dist/components/umd.js +1 -1
- package/dist/components/use.js +1 -1
- package/dist/components/util.js +1 -1
- package/dist/components/vennDiagram-CIIHVFJN.js +1 -1
- package/dist/components/vi-VN-M7AON7JQ.js +1 -1
- package/dist/components/wardley-L42UT6IY.js +1 -1
- package/dist/components/wardleyDiagram-YWT4CUSO.js +1 -1
- package/dist/components/word.js +1 -1
- package/dist/components/worker-ref.js +1 -1
- package/dist/components/wrapAsyncGenerator.js +1 -1
- package/dist/components/xlsx.js +1 -1
- package/dist/components/xml.js +1 -1
- package/dist/components/xychartDiagram-2RQKCTM6.js +1 -1
- package/dist/components/yaml.js +1 -1
- package/dist/components/zh-CN-LNUGB5OW.js +1 -1
- package/dist/components/zh-HK-E62DVLB3.js +1 -1
- package/dist/components/zh-TW-RAJ6MFWO.js +1 -1
- package/dist/file-viewer3.css +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src/package/common/printCapability.d.ts +27 -0
- package/dist/src/package/common/type.d.ts +70 -0
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +27 -2
- package/dist/src/package/index.d.ts +1 -1
- package/dist/src/package/vendors/word/doc.d.ts +2 -2
- package/dist/src/package/vendors/word/docx.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FileRenderExportAdapter } from './type';
|
|
2
|
+
/**
|
|
3
|
+
* 这些格式只有专属适配器准备好后才展示打印。
|
|
4
|
+
*
|
|
5
|
+
* 它们的在线预览常依赖分页引擎、虚拟渲染或 Worker 生命周期,直接克隆
|
|
6
|
+
* DOM 很容易只得到当前页或当前视口。
|
|
7
|
+
*/
|
|
8
|
+
export declare const ADAPTER_PRINT_REQUIRED_EXTENSIONS: string[];
|
|
9
|
+
/**
|
|
10
|
+
* 这些格式的预览结果是完整 DOM / SVG / Canvas 截图,解除滚动容器裁切后
|
|
11
|
+
* 可以稳定进入浏览器打印流程。
|
|
12
|
+
*/
|
|
13
|
+
export declare const DOM_PRINTABLE_EXTENSIONS: string[];
|
|
14
|
+
/**
|
|
15
|
+
* 这些格式默认不展示打印按钮,避免导出半截内容。
|
|
16
|
+
*
|
|
17
|
+
* - 表格链路使用虚拟滚动,只渲染局部窗口;
|
|
18
|
+
* - 压缩包/邮件包含嵌套预览,顶层不是单一可打印文档;
|
|
19
|
+
* - EPUB 使用 iframe/连续分页;
|
|
20
|
+
* - 3D、音视频是交互媒体。
|
|
21
|
+
*/
|
|
22
|
+
export declare const NON_PRINTABLE_EXTENSIONS: string[];
|
|
23
|
+
export declare const normalizeFileExtension: (extension: string) => string;
|
|
24
|
+
export declare const needsDedicatedPrintAdapter: (extension: string) => boolean;
|
|
25
|
+
export declare const isDomPrintableExtension: (extension: string) => boolean;
|
|
26
|
+
export declare const isKnownNonPrintableExtension: (extension: string) => boolean;
|
|
27
|
+
export declare const resolvePrintAvailability: (extension: string, adapter: FileRenderExportAdapter | null, renderedReady: boolean) => boolean;
|
|
@@ -48,6 +48,13 @@ export interface FileViewerToolbarOptions {
|
|
|
48
48
|
download?: boolean;
|
|
49
49
|
print?: boolean;
|
|
50
50
|
exportHtml?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* 内置操作按钮执行前的统一前置钩子。返回 `false` 时会取消本次操作。
|
|
53
|
+
*/
|
|
54
|
+
beforeOperation?: FileViewerBeforeOperation;
|
|
55
|
+
beforeDownload?: FileViewerBeforeOperation;
|
|
56
|
+
beforePrint?: FileViewerBeforeOperation;
|
|
57
|
+
beforeExportHtml?: FileViewerBeforeOperation;
|
|
51
58
|
}
|
|
52
59
|
/**
|
|
53
60
|
* 压缩包预览配置。
|
|
@@ -71,6 +78,45 @@ export interface FileViewerArchiveOptions {
|
|
|
71
78
|
*/
|
|
72
79
|
maxEntryPreviewSize?: number;
|
|
73
80
|
}
|
|
81
|
+
export type FileViewerSourceType = 'file' | 'url' | 'empty';
|
|
82
|
+
export type FileViewerLifecyclePhase = 'load-start' | 'load-complete' | 'unload-start' | 'unload-complete';
|
|
83
|
+
export interface FileViewerLifecycleContext {
|
|
84
|
+
phase: FileViewerLifecyclePhase;
|
|
85
|
+
type: string;
|
|
86
|
+
filename: string;
|
|
87
|
+
source: FileViewerSourceType;
|
|
88
|
+
url?: string;
|
|
89
|
+
file?: File;
|
|
90
|
+
size?: number;
|
|
91
|
+
version: number;
|
|
92
|
+
timestamp: number;
|
|
93
|
+
duration?: number;
|
|
94
|
+
reason?: 'replace' | 'reset' | 'component-unmount';
|
|
95
|
+
}
|
|
96
|
+
export interface FileViewerLifecycleHooks {
|
|
97
|
+
onLoadStart?: (context: FileViewerLifecycleContext) => void | Promise<void>;
|
|
98
|
+
onLoadComplete?: (context: FileViewerLifecycleContext) => void | Promise<void>;
|
|
99
|
+
onUnloadStart?: (context: FileViewerLifecycleContext) => void | Promise<void>;
|
|
100
|
+
onUnloadComplete?: (context: FileViewerLifecycleContext) => void | Promise<void>;
|
|
101
|
+
}
|
|
102
|
+
export type FileViewerOperationType = 'download' | 'print' | 'export-html';
|
|
103
|
+
/**
|
|
104
|
+
* 当前文档对内置操作的真实可用性。
|
|
105
|
+
*
|
|
106
|
+
* `toolbar` 只表达宿主想不想展示某个按钮;这里表达当前文件类型和渲染器
|
|
107
|
+
* 是否真的能稳定完成该操作。尤其是打印,虚拟表格、播放器、3D 画布、
|
|
108
|
+
* EPUB iframe 等链路无法保证完整分页输出时会主动关闭。
|
|
109
|
+
*/
|
|
110
|
+
export interface FileViewerOperationAvailability {
|
|
111
|
+
download: boolean;
|
|
112
|
+
print: boolean;
|
|
113
|
+
exportHtml: boolean;
|
|
114
|
+
}
|
|
115
|
+
export interface FileViewerOperationContext extends Omit<FileViewerLifecycleContext, 'phase'> {
|
|
116
|
+
operation: FileViewerOperationType;
|
|
117
|
+
label: string;
|
|
118
|
+
}
|
|
119
|
+
export type FileViewerBeforeOperation = (context: FileViewerOperationContext) => boolean | void | Promise<boolean | void>;
|
|
74
120
|
/**
|
|
75
121
|
* 预览器通用配置。
|
|
76
122
|
*/
|
|
@@ -78,6 +124,15 @@ export interface FileViewerOptions {
|
|
|
78
124
|
watermark?: boolean | FileViewerWatermarkOptions;
|
|
79
125
|
toolbar?: boolean | FileViewerToolbarOptions;
|
|
80
126
|
archive?: FileViewerArchiveOptions;
|
|
127
|
+
/**
|
|
128
|
+
* 文档加载/卸载生命周期钩子。直接使用 Vue 组件时可以传函数;
|
|
129
|
+
* iframe 集成时同名事件会通过 `postMessage` 向宿主发送。
|
|
130
|
+
*/
|
|
131
|
+
hooks?: FileViewerLifecycleHooks;
|
|
132
|
+
/**
|
|
133
|
+
* 内置操作按钮执行前的全局前置钩子。返回 `false` 时会取消本次操作。
|
|
134
|
+
*/
|
|
135
|
+
beforeOperation?: FileViewerBeforeOperation;
|
|
81
136
|
}
|
|
82
137
|
/**
|
|
83
138
|
* 导出/打印模式。
|
|
@@ -97,6 +152,21 @@ export interface FileRenderExportOptions {
|
|
|
97
152
|
* 渲染器专属导出适配器。
|
|
98
153
|
*/
|
|
99
154
|
export interface FileRenderExportAdapter {
|
|
155
|
+
/**
|
|
156
|
+
* 当前渲染器是否允许打印。未设置时由文件类型能力矩阵兜底判断。
|
|
157
|
+
*/
|
|
158
|
+
print?: boolean;
|
|
159
|
+
/**
|
|
160
|
+
* 当前渲染器是否允许导出渲染后的 HTML。
|
|
161
|
+
*/
|
|
162
|
+
exportHtml?: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* 是否把当前页面的全局 style/link 一并带进导出窗口。
|
|
165
|
+
*
|
|
166
|
+
* 专属分页适配器通常会自行输出必要样式,应关闭该项,避免宿主应用的
|
|
167
|
+
* `height: 100vh`、`overflow: hidden` 等布局样式干扰浏览器分页打印。
|
|
168
|
+
*/
|
|
169
|
+
includeDocumentStyles?: boolean;
|
|
100
170
|
beforeSnapshot?: () => Promise<void> | void;
|
|
101
171
|
toHtml?: (options: FileRenderExportOptions) => Promise<string> | string;
|
|
102
172
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FileRef, FileViewerOptions } from '../../common/type';
|
|
1
|
+
import { FileRef, FileViewerLifecycleContext, FileViewerOperationAvailability, FileViewerOptions, FileViewerOperationContext } from '../../common/type';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/**
|
|
4
4
|
* 本地二进制输入。优先级高于 `url`。
|
|
@@ -21,6 +21,31 @@ type __VLS_Props = {
|
|
|
21
21
|
*/
|
|
22
22
|
options?: FileViewerOptions;
|
|
23
23
|
};
|
|
24
|
-
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
|
|
24
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
|
|
25
|
+
downloadOriginalFile: () => Promise<void>;
|
|
26
|
+
printRenderedHtml: () => Promise<void>;
|
|
27
|
+
exportRenderedHtml: () => Promise<void>;
|
|
28
|
+
getOperationAvailability: () => {
|
|
29
|
+
download: boolean;
|
|
30
|
+
print: boolean;
|
|
31
|
+
exportHtml: boolean;
|
|
32
|
+
};
|
|
33
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
34
|
+
"load-start": (context: FileViewerLifecycleContext) => any;
|
|
35
|
+
"load-complete": (context: FileViewerLifecycleContext) => any;
|
|
36
|
+
"unload-start": (context: FileViewerLifecycleContext) => any;
|
|
37
|
+
"unload-complete": (context: FileViewerLifecycleContext) => any;
|
|
38
|
+
"operation-before": (context: FileViewerOperationContext) => any;
|
|
39
|
+
"operation-cancel": (context: FileViewerOperationContext) => any;
|
|
40
|
+
"operation-availability-change": (availability: FileViewerOperationAvailability) => any;
|
|
41
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
42
|
+
"onLoad-start"?: ((context: FileViewerLifecycleContext) => any) | undefined;
|
|
43
|
+
"onLoad-complete"?: ((context: FileViewerLifecycleContext) => any) | undefined;
|
|
44
|
+
"onUnload-start"?: ((context: FileViewerLifecycleContext) => any) | undefined;
|
|
45
|
+
"onUnload-complete"?: ((context: FileViewerLifecycleContext) => any) | undefined;
|
|
46
|
+
"onOperation-before"?: ((context: FileViewerOperationContext) => any) | undefined;
|
|
47
|
+
"onOperation-cancel"?: ((context: FileViewerOperationContext) => any) | undefined;
|
|
48
|
+
"onOperation-availability-change"?: ((availability: FileViewerOperationAvailability) => any) | undefined;
|
|
49
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
50
|
declare const _default: typeof __VLS_export;
|
|
26
51
|
export default _default;
|
|
@@ -19,4 +19,4 @@ declare class Installer implements FileViewerInstaller {
|
|
|
19
19
|
declare const _default: Installer;
|
|
20
20
|
export default _default;
|
|
21
21
|
export { FileViewer };
|
|
22
|
-
export type { FileRef, FileViewerArchiveOptions, FileViewerOptions, FileViewerToolbarOptions, FileViewerWatermarkOptions } from './common/type';
|
|
22
|
+
export type { FileRef, FileRenderExportAdapter, FileRenderExportMode, FileRenderExportOptions, FileViewerArchiveOptions, FileViewerBeforeOperation, FileViewerLifecycleContext, FileViewerLifecycleHooks, FileViewerLifecyclePhase, FileViewerOperationAvailability, FileViewerOperationContext, FileViewerOperationType, FileViewerOptions, FileViewerSourceType, FileViewerToolbarOptions, FileViewerWatermarkOptions } from './common/type';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppWrapper } from '../../common/type';
|
|
1
|
+
import { AppWrapper, FileRenderContext } from '../../common/type';
|
|
2
2
|
/**
|
|
3
3
|
* 渲染 doc 文件
|
|
4
4
|
*/
|
|
5
|
-
export default function render(buffer: ArrayBuffer, target: HTMLDivElement): Promise<AppWrapper>;
|
|
5
|
+
export default function render(buffer: ArrayBuffer, target: HTMLDivElement, context?: FileRenderContext): Promise<AppWrapper>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppWrapper } from '../../common/type';
|
|
1
|
+
import { AppWrapper, FileRenderContext } from '../../common/type';
|
|
2
2
|
/**
|
|
3
3
|
* 渲染docx文件
|
|
4
4
|
*/
|
|
5
|
-
export default function (buffer: ArrayBuffer, target: HTMLDivElement): Promise<AppWrapper>;
|
|
5
|
+
export default function (buffer: ArrayBuffer, target: HTMLDivElement, context?: FileRenderContext): Promise<AppWrapper>;
|