office-viewer 0.3.9 → 0.3.11

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.
@@ -9,7 +9,7 @@ export declare const AUTO_COLOR = "#000000";
9
9
  /**
10
10
  * 单元格的 padding
11
11
  */
12
- export declare const PADDING_SIZE = 4;
12
+ export declare const PADDING_SIZE = 2;
13
13
  /**
14
14
  * 最长列数,从 0 开始
15
15
  */
@@ -9,7 +9,7 @@ var AUTO_COLOR = '#000000';
9
9
  /**
10
10
  * 单元格的 padding
11
11
  */
12
- var PADDING_SIZE = 4;
12
+ var PADDING_SIZE = 2;
13
13
  /**
14
14
  * 最长列数,从 0 开始
15
15
  */
@@ -22,8 +22,8 @@ function calcCellDisplaySize(row, col, rowHeight, colWidth, getRowHeight, getCol
22
22
  for (var mergeCells_1 = __values(mergeCells), mergeCells_1_1 = mergeCells_1.next(); !mergeCells_1_1.done; mergeCells_1_1 = mergeCells_1.next()) {
23
23
  var mergeCell = mergeCells_1_1.value;
24
24
  var startRow = mergeCell.startRow, endRow = mergeCell.endRow, startCol = mergeCell.startCol, endCol = mergeCell.endCol;
25
- mergeCellId = "".concat(startRow, "-").concat(endRow, "-").concat(startCol, "-").concat(endCol);
26
25
  if (row >= startRow && row <= endRow && col >= startCol && col <= endCol) {
26
+ mergeCellId = "".concat(startRow, "-").concat(endRow, "-").concat(startCol, "-").concat(endCol);
27
27
  isMergeCell = true;
28
28
  matchMergeCell = mergeCell;
29
29
  // 补上合并单元格的高宽
@@ -23,7 +23,7 @@ declare const languages: {
23
23
  count: string;
24
24
  sum: string;
25
25
  };
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>;
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>;
27
27
  };
28
28
  export type Language = keyof typeof languages;
29
29
  export declare function getTranslate(language: string): (key: EnKeys) => string;
@@ -9,7 +9,7 @@ export declare const AUTO_COLOR = "#000000";
9
9
  /**
10
10
  * 单元格的 padding
11
11
  */
12
- export declare const PADDING_SIZE = 4;
12
+ export declare const PADDING_SIZE = 2;
13
13
  /**
14
14
  * 最长列数,从 0 开始
15
15
  */
@@ -13,7 +13,7 @@ var AUTO_COLOR = '#000000';
13
13
  /**
14
14
  * 单元格的 padding
15
15
  */
16
- var PADDING_SIZE = 4;
16
+ var PADDING_SIZE = 2;
17
17
  /**
18
18
  * 最长列数,从 0 开始
19
19
  */
@@ -3,4 +3,4 @@
3
3
  */
4
4
  import { CT_SortState } from '../../../../openxml/ExcelTypes';
5
5
  import { RangeRef } from '../../../types/RangeRef';
6
- export declare function getColumnSortOrder(colIndex: number, rangeRef: RangeRef, sortState?: CT_SortState): "desc" | "none" | "asc";
6
+ export declare function getColumnSortOrder(colIndex: number, rangeRef: RangeRef, sortState?: CT_SortState): "none" | "asc" | "desc";
@@ -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: "cell" | "corner" | "drawing" | "row-header" | "col-header" | "row-grid" | "col-grid";
13
+ selectType: "drawing" | "corner" | "cell" | "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: "cell" | "corner" | "drawing" | "row-header" | "col-header" | "row-grid" | "col-grid";
13
+ selectType: "drawing" | "corner" | "cell" | "row-header" | "col-header" | "row-grid" | "col-grid";
14
14
  activeCell: RangeRef;
15
15
  sheetIndex: number;
16
16
  cellRanges: {
@@ -26,8 +26,8 @@ function calcCellDisplaySize(row, col, rowHeight, colWidth, getRowHeight, getCol
26
26
  for (var mergeCells_1 = tslib.__values(mergeCells), mergeCells_1_1 = mergeCells_1.next(); !mergeCells_1_1.done; mergeCells_1_1 = mergeCells_1.next()) {
27
27
  var mergeCell = mergeCells_1_1.value;
28
28
  var startRow = mergeCell.startRow, endRow = mergeCell.endRow, startCol = mergeCell.startCol, endCol = mergeCell.endCol;
29
- mergeCellId = "".concat(startRow, "-").concat(endRow, "-").concat(startCol, "-").concat(endCol);
30
29
  if (row >= startRow && row <= endRow && col >= startCol && col <= endCol) {
30
+ mergeCellId = "".concat(startRow, "-").concat(endRow, "-").concat(startCol, "-").concat(endCol);
31
31
  isMergeCell = true;
32
32
  matchMergeCell = mergeCell;
33
33
  // 补上合并单元格的高宽
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "office-viewer",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "office 文档在线预览",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",