office-viewer 0.3.6 → 0.3.7

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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Attributes } from '../../../openxml/Attributes';
5
5
  import { CT_Color } from '../CT_Color';
6
- import { X14Sparklines } from './x14:sparklines';
6
+ import { X14Sparklines } from './x14Sparklines';
7
7
  export type ST_SparklineAxisMinMax = 'individual' | 'groupMax' | 'group';
8
8
  export type X14SparklineGroup = {
9
9
  'displayEmptyCellsAs'?: 'gap' | 'zero' | 'span';
@@ -1,5 +1,5 @@
1
1
  import { CT_Color_Attributes } from '../CT_Color.js';
2
- import { X14Sparklines_Attributes } from './x14_sparklines.js';
2
+ import { X14Sparklines_Attributes } from './x14Sparklines.js';
3
3
 
4
4
  /**
5
5
  * 目前先简单实现,后面再改成自动解析
@@ -13,4 +13,4 @@ import { PackageParser } from './package/PackageParser';
13
13
  * @param parser 文件解析器,支持 zip 和 xml 两种,也可以扩展
14
14
  * @returns OfficeViewer 实例
15
15
  */
16
- export declare function createOfficeViewer(docFile: ArrayBuffer, renderOptions?: Partial<RenderOptions>, fileName?: string, parser?: PackageParser): Promise<Word | Excel | UnSupport>;
16
+ export declare function createOfficeViewer(docFile: ArrayBuffer, renderOptions?: Partial<RenderOptions>, fileName?: string, parser?: PackageParser): Promise<Word | UnSupport | Excel>;
@@ -23,7 +23,7 @@ declare const languages: {
23
23
  count: string;
24
24
  sum: string;
25
25
  };
26
- zh_CN: Record<"autoFilter.sortAscending" | "autoFilter.sortDescending" | "checkBox.selectAll" | "checkBox.search" | "customFilter.equal" | "customFilter.notEqual" | "customFilter.greaterThan" | "customFilter.greaterThanOrEqual" | "customFilter.lessThan" | "customFilter.lessThanOrEqual" | "customFilter.beginsWith" | "customFilter.notBeginsWith" | "customFilter.endsWith" | "customFilter.notEndsWith" | "customFilter.contains" | "customFilter.notContains" | "customFilter.and" | "customFilter.or" | "average" | "count" | "sum", string>;
26
+ zh_CN: Record<"count" | "sum" | "average" | "customFilter.equal" | "customFilter.notEqual" | "customFilter.beginsWith" | "customFilter.notBeginsWith" | "customFilter.endsWith" | "customFilter.notEndsWith" | "customFilter.contains" | "customFilter.notContains" | "customFilter.greaterThan" | "customFilter.greaterThanOrEqual" | "customFilter.lessThan" | "customFilter.lessThanOrEqual" | "autoFilter.sortAscending" | "autoFilter.sortDescending" | "checkBox.selectAll" | "checkBox.search" | "customFilter.and" | "customFilter.or", string>;
27
27
  };
28
28
  export type Language = keyof typeof languages;
29
29
  export declare function getTranslate(language: string): (key: EnKeys) => string;
@@ -10,7 +10,7 @@ import { HitTestResult } from '../selection/hitTest';
10
10
  export declare function mousedownColHeader(workbook: Workbook, hitTestResult: HitTestResult): {
11
11
  user: string;
12
12
  region: import("../../sheet/ViewRange").Region;
13
- selectType: "drawing" | "corner" | "cell" | "row-header" | "col-header" | "row-grid" | "col-grid";
13
+ selectType: "cell" | "corner" | "drawing" | "row-header" | "col-header" | "row-grid" | "col-grid";
14
14
  activeCell: RangeRef;
15
15
  sheetIndex: number;
16
16
  cellRanges: {
@@ -10,7 +10,7 @@ import { HitTestResult } from '../selection/hitTest';
10
10
  export declare function mousedownRowHeader(workbook: Workbook, hitTestResult: HitTestResult): {
11
11
  user: string;
12
12
  region: import("../../sheet/ViewRange").Region;
13
- selectType: "drawing" | "corner" | "cell" | "row-header" | "col-header" | "row-grid" | "col-grid";
13
+ selectType: "cell" | "corner" | "drawing" | "row-header" | "col-header" | "row-grid" | "col-grid";
14
14
  activeCell: RangeRef;
15
15
  sheetIndex: number;
16
16
  cellRanges: {
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Attributes } from '../../../openxml/Attributes';
5
5
  import { CT_Color } from '../CT_Color';
6
- import { X14Sparklines } from './x14:sparklines';
6
+ import { X14Sparklines } from './x14Sparklines';
7
7
  export type ST_SparklineAxisMinMax = 'individual' | 'groupMax' | 'group';
8
8
  export type X14SparklineGroup = {
9
9
  'displayEmptyCellsAs'?: 'gap' | 'zero' | 'span';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var CT_Color = require('../CT_Color.js');
6
- var x14_sparklines = require('./x14_sparklines.js');
6
+ var x14Sparklines = require('./x14Sparklines.js');
7
7
 
8
8
  /**
9
9
  * 目前先简单实现,后面再改成自动解析
@@ -105,7 +105,7 @@ var X14SparklineGroup_Attributes = {
105
105
  },
106
106
  'x14:sparklines': {
107
107
  type: 'child',
108
- childAttributes: x14_sparklines.X14Sparklines_Attributes
108
+ childAttributes: x14Sparklines.X14Sparklines_Attributes
109
109
  }
110
110
  };
111
111
 
@@ -19,7 +19,7 @@ export default class XMLPackageParser implements PackageParser {
19
19
  /**
20
20
  * 在 xml 下基本不用这个
21
21
  */
22
- getFileByType(filePath: string, type: 'string' | 'blob'): string | Uint8Array | Blob | null;
22
+ getFileByType(filePath: string, type: 'string' | 'blob'): string | Blob | Uint8Array | null;
23
23
  /**
24
24
  * 读取文本内容
25
25
  */
@@ -17,7 +17,7 @@ export default class ZipPackageParser implements PackageParser {
17
17
  /**
18
18
  * 根据类型读取文件
19
19
  */
20
- getFileByType(filePath: string, type?: 'string' | 'blob' | 'uint8array'): string | Uint8Array | Blob | null;
20
+ getFileByType(filePath: string, type?: 'string' | 'blob' | 'uint8array'): string | Blob | Uint8Array | null;
21
21
  /**
22
22
  * 读取文本内容
23
23
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "office-viewer",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "office 文档在线预览",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
@@ -116,4 +116,4 @@
116
116
  "printBasicPrototype": false
117
117
  }
118
118
  }
119
- }
119
+ }