office-viewer 0.3.2 → 0.3.5

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 CHANGED
@@ -1,12 +1,12 @@
1
1
  # 说明
2
2
 
3
- docxexcel 渲染器
3
+ WordExcel 渲染器,目前接口还未完全稳定,新版可能会修改,请参考 examples
4
4
 
5
- ## docx 渲染
5
+ ## Word 渲染
6
6
 
7
7
  ### 原理
8
8
 
9
- docx 渲染器,原理是将 docx 里的 xml 格式转成 html
9
+ Word 渲染器,原理是将 docx 里的 xml 格式转成 html
10
10
 
11
11
  相对于 Canvas 渲染,这个实现方案比较简单,最终页面也可以很方便复制,但无法保证和原始 docx 文件展现一致,因为有部分功能难以在 HTML 中实现,比如图文环绕效果。
12
12
 
@@ -29,7 +29,7 @@ docx 渲染器,原理是将 docx 里的 xml 格式转成 html
29
29
  - [docx](https://github.com/dolanmiu/docx) 的类型定义
30
30
  - [docxjs](https://github.com/zVolodymyr/docxjs) 里格式的实现
31
31
 
32
- ## xlsx 渲染
32
+ ## Excel 渲染
33
33
 
34
34
  ### 原理
35
35
 
package/esm/Excel.js CHANGED
@@ -20,7 +20,7 @@ var defaultRenderOptions = {
20
20
  return get(data, path);
21
21
  },
22
22
  useWorker: false,
23
- height: 400,
23
+ height: 500,
24
24
  gridLineColor: '#D4D4D4',
25
25
  gridLineWidth: 1,
26
26
  dragGridLineColor: '#5D5D5D',
@@ -23,6 +23,7 @@ function setColumnSortOrder(sheet, colIndex, rangeRef, autoFilter, sortOrder, he
23
23
  ref: sortStateRef,
24
24
  sortCondition: [sortCondition]
25
25
  };
26
+ sheet.applyAutoFilter(autoFilter, headerRowCount);
26
27
  return;
27
28
  }
28
29
  if (autoFilter.sortState.sortCondition === undefined) {
@@ -3,8 +3,8 @@
3
3
  */
4
4
  function getMouseRelativePosition(container, event) {
5
5
  var dataContainerOffset = container.getBoundingClientRect();
6
- var offsetX = event.pageX - dataContainerOffset.x;
7
- var offsetY = event.pageY - dataContainerOffset.y;
6
+ var offsetX = event.clientX - dataContainerOffset.x;
7
+ var offsetY = event.clientY - dataContainerOffset.y;
8
8
  return { offsetX: offsetX, offsetY: offsetY };
9
9
  }
10
10
 
@@ -89,14 +89,14 @@ function shapeToSVG(shape, avLst, shapePr, width, height, wpsStyle) {
89
89
  pathEl.setAttribute('stroke-width', outline.width);
90
90
  }
91
91
  if (outline.style === 'none') {
92
- pathEl.setAttribute('stroke', 'transparent');
92
+ pathEl.setAttribute('stroke', 'none');
93
93
  }
94
94
  }
95
95
  else if (wpsStyle && wpsStyle.lineColor) {
96
96
  pathEl.setAttribute('stroke', wpsStyle.lineColor);
97
97
  }
98
98
  else {
99
- pathEl.setAttribute('stroke', 'transparent');
99
+ pathEl.setAttribute('stroke', 'none');
100
100
  }
101
101
  var fillColor = pathEl.getAttribute('fill');
102
102
  if (fillColor && fillColor !== 'none') {
@@ -124,16 +124,16 @@ function shapeToSVG(shape, avLst, shapePr, width, height, wpsStyle) {
124
124
  }
125
125
  }
126
126
  if (path.fill === 'none') {
127
- pathEl.setAttribute('fill', 'transparent');
127
+ pathEl.setAttribute('fill', 'none');
128
128
  }
129
129
  if (path.stroke === false) {
130
- pathEl.setAttribute('stroke', 'transparent');
130
+ pathEl.setAttribute('stroke', 'none');
131
131
  if (!path.fill) {
132
- pathEl.setAttribute('fill', 'transparent');
132
+ pathEl.setAttribute('fill', 'none');
133
133
  }
134
134
  }
135
135
  if (shapePr.noFill) {
136
- pathEl.setAttribute('fill', 'transparent');
136
+ pathEl.setAttribute('fill', 'none');
137
137
  }
138
138
  svg.appendChild(pathEl);
139
139
  }
@@ -39,7 +39,7 @@ function checkString(buffer, string, options) {
39
39
  return check(buffer, stringToBytes(string), options);
40
40
  }
41
41
  function fileTypeFromArrayBuffer(arrayBuffer) {
42
- return fileTypeFromBuffer(new Uint8Array(arrayBuffer));
42
+ return fileTypeFromBuffer(new Uint8Array(arrayBuffer.slice(0, 20)));
43
43
  }
44
44
  function fileTypeFromBuffer(buffer) {
45
45
  if (check(buffer, [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a])) {
package/lib/Excel.js CHANGED
@@ -42,7 +42,7 @@ var defaultRenderOptions = {
42
42
  return get.get(data, path);
43
43
  },
44
44
  useWorker: false,
45
- height: 400,
45
+ height: 500,
46
46
  gridLineColor: '#D4D4D4',
47
47
  gridLineWidth: 1,
48
48
  dragGridLineColor: '#5D5D5D',
@@ -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<Excel | Word | 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<"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;
@@ -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): "none" | "asc" | "desc";
6
+ export declare function getColumnSortOrder(colIndex: number, rangeRef: RangeRef, sortState?: CT_SortState): "none" | "desc" | "asc";
@@ -27,6 +27,7 @@ function setColumnSortOrder(sheet, colIndex, rangeRef, autoFilter, sortOrder, he
27
27
  ref: sortStateRef,
28
28
  sortCondition: [sortCondition]
29
29
  };
30
+ sheet.applyAutoFilter(autoFilter, headerRowCount);
30
31
  return;
31
32
  }
32
33
  if (autoFilter.sortState.sortCondition === undefined) {
@@ -7,8 +7,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
  */
8
8
  function getMouseRelativePosition(container, event) {
9
9
  var dataContainerOffset = container.getBoundingClientRect();
10
- var offsetX = event.pageX - dataContainerOffset.x;
11
- var offsetY = event.pageY - dataContainerOffset.y;
10
+ var offsetX = event.clientX - dataContainerOffset.x;
11
+ var offsetY = event.clientY - dataContainerOffset.y;
12
12
  return { offsetX: offsetX, offsetY: offsetY };
13
13
  }
14
14
 
@@ -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: "corner" | "drawing" | "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: "corner" | "drawing" | "cell" | "row-header" | "col-header" | "row-grid" | "col-grid";
14
14
  activeCell: RangeRef;
15
15
  sheetIndex: number;
16
16
  cellRanges: {
@@ -93,14 +93,14 @@ function shapeToSVG(shape, avLst, shapePr, width, height, wpsStyle) {
93
93
  pathEl.setAttribute('stroke-width', outline.width);
94
94
  }
95
95
  if (outline.style === 'none') {
96
- pathEl.setAttribute('stroke', 'transparent');
96
+ pathEl.setAttribute('stroke', 'none');
97
97
  }
98
98
  }
99
99
  else if (wpsStyle && wpsStyle.lineColor) {
100
100
  pathEl.setAttribute('stroke', wpsStyle.lineColor);
101
101
  }
102
102
  else {
103
- pathEl.setAttribute('stroke', 'transparent');
103
+ pathEl.setAttribute('stroke', 'none');
104
104
  }
105
105
  var fillColor = pathEl.getAttribute('fill');
106
106
  if (fillColor && fillColor !== 'none') {
@@ -128,16 +128,16 @@ function shapeToSVG(shape, avLst, shapePr, width, height, wpsStyle) {
128
128
  }
129
129
  }
130
130
  if (path.fill === 'none') {
131
- pathEl.setAttribute('fill', 'transparent');
131
+ pathEl.setAttribute('fill', 'none');
132
132
  }
133
133
  if (path.stroke === false) {
134
- pathEl.setAttribute('stroke', 'transparent');
134
+ pathEl.setAttribute('stroke', 'none');
135
135
  if (!path.fill) {
136
- pathEl.setAttribute('fill', 'transparent');
136
+ pathEl.setAttribute('fill', 'none');
137
137
  }
138
138
  }
139
139
  if (shapePr.noFill) {
140
- pathEl.setAttribute('fill', 'transparent');
140
+ pathEl.setAttribute('fill', 'none');
141
141
  }
142
142
  svg.appendChild(pathEl);
143
143
  }
@@ -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 | Blob | Uint8Array | null;
22
+ getFileByType(filePath: string, type: 'string' | 'blob'): string | Uint8Array | Blob | 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 | Blob | Uint8Array | null;
20
+ getFileByType(filePath: string, type?: 'string' | 'blob' | 'uint8array'): string | Uint8Array | Blob | null;
21
21
  /**
22
22
  * 读取文本内容
23
23
  */
@@ -43,7 +43,7 @@ function checkString(buffer, string, options) {
43
43
  return check(buffer, stringToBytes(string), options);
44
44
  }
45
45
  function fileTypeFromArrayBuffer(arrayBuffer) {
46
- return fileTypeFromBuffer(new Uint8Array(arrayBuffer));
46
+ return fileTypeFromBuffer(new Uint8Array(arrayBuffer.slice(0, 20)));
47
47
  }
48
48
  function fileTypeFromBuffer(buffer) {
49
49
  if (check(buffer, [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a])) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "office-viewer",
3
- "version": "0.3.2",
3
+ "version": "0.3.5",
4
4
  "description": "office 文档在线预览",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
@@ -70,16 +70,11 @@
70
70
  "@rollup/plugin-typescript": "^8.3.4",
71
71
  "@swc/jest": "^0.2.34",
72
72
  "@testing-library/jest-dom": "^5.17.0",
73
- "@types/big.js": "^6.2.2",
74
73
  "@types/jest": "^28.1.0",
75
74
  "@types/prettier": "^2.7.3",
76
- "@types/react": "^18.0.24",
77
- "@types/react-dom": "^18.0.8",
78
75
  "amis-formula": "^2.7.2",
79
76
  "jest": "^29.0.3",
80
77
  "jest-environment-jsdom": "^29.0.3",
81
- "react": "^18.2.0",
82
- "react-dom": "^18.2.0",
83
78
  "rollup": "^2.60.2",
84
79
  "rollup-plugin-terser": "^7.0.2",
85
80
  "sass": "^1.69.7",
@@ -119,4 +114,4 @@
119
114
  "printBasicPrototype": false
120
115
  }
121
116
  }
122
- }
117
+ }
package/dist/index.css DELETED
@@ -1,500 +0,0 @@
1
- @charset "UTF-8";
2
- /* 默认 CSS 样式,目前主要是 Excel 使用 */
3
- .ov-excel {
4
- /* 从 office 365 中复制的默认字体 */
5
- font-family: "Aptos Narrow", "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
6
- display: flex;
7
- flex-direction: column;
8
- --bar-bg-color: #f5f5f5;
9
- --bar-input-bg-color: #ffffff;
10
- --active-sheet-color: #217346;
11
- }
12
-
13
- .excel-button {
14
- height: 32px;
15
- color: rgb(255, 255, 255);
16
- padding: 0px 11px;
17
- box-sizing: border-box;
18
- border: 1px solid transparent;
19
- display: inline-block;
20
- text-decoration: none;
21
- text-align: center;
22
- cursor: pointer;
23
- vertical-align: top;
24
- border-radius: 2px;
25
- font-size: 14px;
26
- font-weight: 600;
27
- position: relative;
28
- margin-right: 4px;
29
- width: 64px;
30
- }
31
-
32
- .excel-button-primary {
33
- background-color: rgb(0, 120, 212);
34
- }
35
-
36
- /* Excel 工具栏,目前没编辑功能所以还没实现 */
37
- .ov-excel-toolbar {
38
- height: 30px;
39
- line-height: 30px;
40
- }
41
-
42
- .excel-checkbox-list-wrapper .excel-checkbox-list {
43
- margin-top: 4px;
44
- }
45
-
46
- .excel-checkbox-container label {
47
- cursor: pointer;
48
- padding: 4px 0;
49
- display: block;
50
- }
51
-
52
- .excel-checkbox-container label:hover {
53
- background-color: #f6f6f6;
54
- }
55
-
56
- .excel-checkbox-container input {
57
- vertical-align: middle;
58
- }
59
-
60
- .excel-checkbox-container span {
61
- vertical-align: middle;
62
- }
63
-
64
- .excel-divider {
65
- display: block;
66
- height: 1px;
67
- background-color: rgb(225, 223, 221);
68
- margin: 2px 12px 2px;
69
- color: rgb(200, 198, 196);
70
- border-radius: 0.5px;
71
- }
72
-
73
- .excel-input {
74
- display: inline-block;
75
- box-sizing: border-box;
76
- width: 100%;
77
- border-radius: 4px;
78
- padding: 4px 12px;
79
- border: 1px solid rgb(209, 209, 209);
80
- }
81
-
82
- .excel-input-border-less {
83
- display: block;
84
- border: none;
85
- width: 100%;
86
- height: 100%;
87
- padding: 0 2px;
88
- }
89
-
90
- .excel-input-border-less:focus {
91
- outline: none;
92
- }
93
-
94
- .excel-select {
95
- border-color: rgb(209, 209, 209);
96
- border-radius: 4px;
97
- }
98
-
99
- /* Excel 公式栏 */
100
- .ov-excel-formula-bar {
101
- height: 34px;
102
- display: flex;
103
- flex-direction: row;
104
- background-color: var(--bar-bg-color);
105
- }
106
-
107
- .ov-excel-formula-bar__name-box {
108
- text-align: center;
109
- width: 64px;
110
- margin: 4px 0 4px 4px;
111
- padding: 0 4px;
112
- line-height: 26px;
113
- border: 1px solid #e1dfdd;
114
- background-color: var(--bar-input-bg-color);
115
- }
116
-
117
- /* fx 按钮 */
118
- .ov-excel-formula-bar__function-button {
119
- width: 30px;
120
- }
121
-
122
- /* fx 按钮右边的输入框 */
123
- .ov-excel-formula-bar__text-box {
124
- margin: 4px;
125
- line-height: 26px;
126
- border: 1px solid #e1dfdd;
127
- flex: 1;
128
- padding: 0 4px;
129
- background-color: var(--bar-input-bg-color);
130
- }
131
-
132
- /* Excel sheet 标签页 */
133
- .ov-excel-sheet-tab-bar {
134
- height: 32px;
135
- line-height: 32px;
136
- display: flex;
137
- flex-direction: row;
138
- background-color: var(--bar-bg-color);
139
- }
140
-
141
- .ov-excel-sheet-tab-bar__nav {
142
- display: flex;
143
- }
144
-
145
- .ov-excel-sheet-tab-bar__nav-icon {
146
- height: 16px;
147
- padding: 4px 4px;
148
- }
149
-
150
- .ov-excel-sheet-tab-bar__nav-icon svg {
151
- height: 16px;
152
- width: 16px;
153
- }
154
-
155
- .ov-excel-sheet-tab-bar__nav-icon svg path {
156
- fill: #b1b1b1;
157
- }
158
-
159
- .ov-excel-sheet-tab-bar__nav-icon--enabled {
160
- cursor: pointer;
161
- }
162
-
163
- .ov-excel-sheet-tab-bar__nav-icon--enabled svg path {
164
- fill: #000000;
165
- }
166
-
167
- .ov-excel-sheet-tab-bar__menu {
168
- position: relative;
169
- }
170
-
171
- .ov-excel-sheet-tab-bar__menu-icon {
172
- cursor: pointer;
173
- height: 16px;
174
- padding: 4px 8px;
175
- }
176
-
177
- .ov-excel-sheet-tab-bar__menu-icon svg {
178
- height: 16px;
179
- width: 16px;
180
- }
181
-
182
- .ov-excel-sheet-tab-bar__menu-list {
183
- background-color: #fff;
184
- border-radius: 4px;
185
- border: 1px solid rgb(199, 199, 199);
186
- box-shadow: rgba(0, 0, 0, 0.133) 0px 3.2px 7.2px 0px, rgba(0, 0, 0, 0.11) 0px 0.6px 1.8px 0px;
187
- display: none;
188
- position: absolute;
189
- bottom: 32px;
190
- left: 0;
191
- max-height: 400px;
192
- overflow-x: hidden;
193
- overflow-y: auto;
194
- z-index: 15;
195
- user-select: none;
196
- }
197
-
198
- .ov-excel-sheet-tab-bar__menu-list-item {
199
- padding: 4px 8px;
200
- cursor: pointer;
201
- white-space: nowrap;
202
- }
203
-
204
- .ov-excel-sheet-tab-bar__menu-list-item:hover {
205
- background-color: #e1dfdd;
206
- }
207
-
208
- .ov-excel-sheet-tab-bar__menu-list-item--active {
209
- background-color: #e1dfdd;
210
- }
211
-
212
- .ov-excel-sheet-tab-bar__list-container {
213
- position: relative;
214
- overflow: hidden;
215
- flex: 1 1 0;
216
- user-select: none;
217
- }
218
-
219
- .ov-excel-sheet-tab-bar__list-container--enable-left-nav::before {
220
- content: "";
221
- position: absolute;
222
- top: 0;
223
- bottom: 0;
224
- left: 0;
225
- width: 30px;
226
- background-image: linear-gradient(to right, #dcdcdc, rgba(220, 220, 220, 0.1));
227
- }
228
-
229
- .ov-excel-sheet-tab-bar__list-container--enable-right-nav::after {
230
- content: "";
231
- position: absolute;
232
- top: 0;
233
- bottom: 0;
234
- right: 0;
235
- width: 30px;
236
- background-image: linear-gradient(to left, #dcdcdc, rgba(220, 220, 220, 0.1));
237
- }
238
-
239
- .ov-excel-sheet-tab-bar__list {
240
- width: 0;
241
- display: flex;
242
- flex-direction: row;
243
- }
244
-
245
- .ov-excel-sheet-tab-bar__list-tab {
246
- display: inline-block;
247
- position: relative;
248
- padding: 0 8px;
249
- font-size: 14px;
250
- margin: 4px 4px;
251
- border-radius: 4px;
252
- line-height: 24px;
253
- white-space: nowrap;
254
- }
255
- .ov-excel-sheet-tab-bar__list-tab:hover {
256
- cursor: pointer;
257
- background-color: #e1dfdd;
258
- }
259
-
260
- .ov-excel-sheet-tab-bar__list-tab--active {
261
- cursor: default;
262
- }
263
-
264
- .ov-excel-sheet-tab-bar__list-tab--active::before {
265
- content: "";
266
- position: absolute;
267
- display: inline-block;
268
- top: 0;
269
- bottom: -4px;
270
- left: 0;
271
- right: 0;
272
- color: transparent;
273
- border-bottom: 3px solid var(--active-sheet-color);
274
- padding-bottom: 5px;
275
- width: calc(100% - 18px);
276
- margin: auto;
277
- transition: width 0.4s cubic-bezier(0.17, 0.17, 0, 1) 0s;
278
- }
279
-
280
- .ov-excel-sheet-tab-bar__status {
281
- margin-left: 12px;
282
- margin-right: 12px;
283
- }
284
-
285
- .ov-excel-sheet-tab-bar__status-text {
286
- margin-right: 16px;
287
- }
288
-
289
- .ov-excel-sheet-tab-bar__zoom-level {
290
- display: flex;
291
- flex-direction: row;
292
- padding: 0 8px;
293
- }
294
-
295
- .ov-excel-sheet-tab-bar__zoom-value {
296
- margin: 0 8px;
297
- }
298
-
299
- .ov-excel-sheet-tab-bar__zoom-in,
300
- .ov-excel-sheet-tab-bar__zoom-out {
301
- cursor: pointer;
302
- }
303
-
304
- /* Excel 内容区域,这个包含表头 */
305
- .ov-excel-content {
306
- flex: 1;
307
- position: relative;
308
- overflow: hidden;
309
- z-index: 1;
310
- }
311
-
312
- /** Excel 数据区域,不包含表头,目前这个区域主要是给 drawing 用 */
313
- .ov-excel-data {
314
- position: absolute;
315
- right: 0;
316
- bottom: 0;
317
- overflow: hidden;
318
- user-select: none;
319
- z-index: 2;
320
- }
321
-
322
- .ov-excel-canvas {
323
- position: absolute;
324
- left: 0;
325
- top: 0;
326
- }
327
-
328
- .ov-excel-scrollbar-y {
329
- position: absolute;
330
- top: 0;
331
- right: 0;
332
- bottom: 0;
333
- z-index: 3;
334
- }
335
-
336
- .ov-excel-scrollbar-x {
337
- position: absolute;
338
- left: 0;
339
- right: 0;
340
- bottom: 0;
341
- z-index: 3;
342
- }
343
-
344
- .ov-excel-scrollbar-content-x {
345
- overflow-x: auto;
346
- overflow-y: hidden;
347
- }
348
-
349
- .ov-excel-scrollbar-content-y {
350
- overflow-x: hidden;
351
- }
352
-
353
- /** 缩放的控制界面 */
354
- .ov-excel-resize-box {
355
- position: absolute;
356
- border: 1px solid #4af;
357
- z-index: 3;
358
- }
359
-
360
- .ov-excel-resize-box-control {
361
- position: absolute;
362
- width: 14px;
363
- height: 14px;
364
- border-radius: 50%;
365
- border: 2px solid #fff;
366
- box-sizing: border-box;
367
- background: #4af;
368
- border: 2px solid #fff;
369
- z-index: 5;
370
- }
371
-
372
- .ov-excel-auto-filter-icon-container {
373
- position: absolute;
374
- }
375
-
376
- .ov-excel-auto-filter-icon {
377
- cursor: pointer;
378
- position: absolute;
379
- right: 2px;
380
- top: 2px;
381
- bottom: 2px;
382
- z-index: 3;
383
- }
384
-
385
- .ov-excel-auto-filter-icon svg {
386
- width: 100%;
387
- height: 100%;
388
- }
389
-
390
- .ov-excel-auto-filter-menu {
391
- position: absolute;
392
- display: none;
393
- flex-direction: column;
394
- right: -240px;
395
- width: 240px;
396
- height: 440px;
397
- border-radius: 4px;
398
- box-shadow: rgba(0, 0, 0, 0.133) 0px 3.2px 7.2px 0px, rgba(0, 0, 0, 0.11) 0px 0.6px 1.8px 0px;
399
- z-index: 4;
400
- background-color: white;
401
- }
402
-
403
- .excel-auto-filter__menu-sort {
404
- display: flex;
405
- flex-direction: row;
406
- column-gap: 4px;
407
- padding: 8px;
408
- }
409
-
410
- .ov-excel-auto-filter__sort-button {
411
- cursor: pointer;
412
- flex: 1;
413
- display: flex;
414
- flex-direction: row;
415
- line-height: 24px;
416
- height: 24px;
417
- padding: 2px;
418
- }
419
-
420
- .ov-excel-auto-filter__sort-button-text {
421
- flex: 1;
422
- }
423
-
424
- .ov-excel-auto-filter__sort-button-icon {
425
- height: 24px;
426
- width: 24px;
427
- }
428
-
429
- .ov-excel-auto-filter__sort-button-icon svg {
430
- height: 100%;
431
- width: 100%;
432
- }
433
-
434
- .ov-excel-auto-filter__sort-button:hover {
435
- background-color: #f5f5f5;
436
- }
437
-
438
- .ov-excel-auto-filter__sort-button-active {
439
- background-color: #f5f5f5;
440
- }
441
-
442
- .ov-excel-auto-filter__menu-filter-filters {
443
- flex-grow: 1;
444
- display: flex;
445
- flex-direction: column;
446
- min-height: 0;
447
- }
448
-
449
- .ov-excel-auto-filter__menu-filter-filters .excel-checkbox-list-wrapper {
450
- display: flex;
451
- flex-grow: 1;
452
- flex-direction: column;
453
- padding: 8px;
454
- min-height: 0;
455
- }
456
-
457
- .ov-excel-auto-filter__menu-filter-filters .excel-checkbox-list {
458
- flex-grow: 1;
459
- overflow-y: auto;
460
- overflow-x: hidden;
461
- }
462
-
463
- .ov-excel-auto-filter-menu__custom-filters {
464
- display: flex;
465
- flex-direction: column;
466
- padding: 8px;
467
- }
468
-
469
- /** 单个规则 */
470
- .ov-excel-auto-filter-menu__custom-filters-item-input {
471
- display: flex;
472
- flex-direction: row;
473
- margin-bottom: 4px;
474
- }
475
-
476
- .ov-excel-auto-filter-menu__custom-filters-item-input > select {
477
- margin-right: 4px;
478
- }
479
-
480
- .ov-excel-auto-filter-menu__custom-filters .excel-radio-wrapper {
481
- margin: 4px 0;
482
- text-align: center;
483
- }
484
-
485
- .excel-cell-editor {
486
- position: absolute;
487
- }
488
-
489
- .excel-chart {
490
- position: absolute;
491
- z-index: 10;
492
- }
493
-
494
- .excel-pic {
495
- position: absolute;
496
- z-index: 10;
497
- overflow: hidden;
498
- }
499
-
500
- /*# sourceMappingURL=index.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../scss/excel/excel.scss","../scss/excel/button.scss","../scss/excel/toolbar.scss","../scss/excel/checkbox.scss","../scss/excel/divider.scss","../scss/excel/input.scss","../scss/excel/select.scss","../scss/excel/formula-bar.scss","../scss/excel/sheet-tab-bar.scss","../scss/excel/sheet-tab/tab-list.scss","../scss/excel/content.scss","../scss/excel/scroll-bar.scss","../scss/excel/resize-box.scss","../scss/excel/auto-filter.scss","../scss/excel/auto-filter/sort-state.scss","../scss/excel/auto-filter/filters.scss","../scss/excel/auto-filter/custom-filters.scss","../scss/excel/cell-editor.scss","../scss/excel/chart.scss","../scss/excel/pic.scss"],"names":[],"mappings":";AAAA;AAEA;AACE;EACA;EAGA;EACA;EACA;EACA;EACA;;;ACXF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;ACpBF;AACA;EACE;EACA;;;ACHF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;ACnBF;EACE;EACA;EACA;EACA;EACA;EACA;;;ACNF;EACE;EACA;EACA;EACA;EACA;EACA,QLwBa;;;AKrBf;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AClBF;EACE;EACA;;;ACFF;AACA;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AACA;EACE;;;AAGF;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;;AC9BF;AACA;EACE;EACA;EACA;EACA;EACA;;;ACNF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,ST5BqB;ES6BrB;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE,kBTrCe;;;ASwCjB;EACE,kBTzCe;;;AS4CjB;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAOF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EACE;EACA,kBT9Fa;;;ASkGjB;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADpIF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;AAAA;EAEE;;;AEhCF;AACA;EACE;EACA;EACA;EACA,SVSgB;;;AUNlB;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;ACrBF;EACE;EACA;EACA;EACA;EACA,SXamB;;;AWVrB;EACE;EACA;EACA;EACA;EACA,SXKmB;;;AWFrB;EACE;EACA;;;AAGF;EACE;;;ACtBF;AAEA;EACE;EACA;EACA,SZamB;;;AYVrB;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SZG2B;;;AapB7B;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA,SbMoB;;;AaHtB;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA,SbXoB;EaYpB;;;AC7BF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;;;ACpCF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AClBF;EACE;EACA;EACA;;;AAGF;AACA;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;ACnBF;EACE;;;ACDF;EACE;EACA,SlBqBc;;;AmBvBhB;EACE;EACA,SnBsBY;EmBrBZ","file":"index.css"}