@univerjs/core 0.2.7 → 0.2.9

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.
Files changed (112) hide show
  1. package/lib/cjs/index.js +8 -8
  2. package/lib/es/index.js +987 -185
  3. package/lib/types/common/equal.d.ts +15 -4
  4. package/lib/types/common/interceptor.d.ts +1 -2
  5. package/lib/types/{types/interfaces/i-freeze.d.ts → common/mixin.d.ts} +9 -5
  6. package/lib/types/common/unit.d.ts +2 -2
  7. package/lib/types/docs/data-model/document-data-model.d.ts +2 -4
  8. package/lib/types/docs/data-model/empty-snapshot.d.ts +0 -1
  9. package/lib/types/docs/data-model/json-x/json-x.d.ts +0 -1
  10. package/lib/types/docs/data-model/preset-list-type.d.ts +0 -1
  11. package/lib/types/docs/data-model/replacement.d.ts +0 -1
  12. package/lib/types/docs/data-model/text-x/action-iterator.d.ts +0 -1
  13. package/lib/types/docs/data-model/text-x/action-types.d.ts +0 -1
  14. package/lib/types/docs/data-model/text-x/apply-utils/common.d.ts +0 -1
  15. package/lib/types/docs/data-model/text-x/apply-utils/delete-apply.d.ts +0 -1
  16. package/lib/types/docs/data-model/text-x/apply-utils/insert-apply.d.ts +0 -1
  17. package/lib/types/docs/data-model/text-x/apply-utils/update-apply.d.ts +0 -1
  18. package/lib/types/docs/data-model/text-x/apply.d.ts +0 -1
  19. package/lib/types/docs/data-model/text-x/text-x.d.ts +0 -1
  20. package/lib/types/docs/data-model/text-x/transform-utils.d.ts +0 -1
  21. package/lib/types/docs/data-model/text-x/utils.d.ts +0 -1
  22. package/lib/types/index.d.ts +5 -2
  23. package/lib/types/observer/observable.d.ts +0 -1
  24. package/lib/types/services/__tests__/index.d.ts +0 -1
  25. package/lib/types/services/authz-io/authz-io-local.service.d.ts +2 -3
  26. package/lib/types/services/authz-io/type.d.ts +0 -1
  27. package/lib/types/services/command/command.service.d.ts +0 -1
  28. package/lib/types/services/config/config.service.d.ts +0 -1
  29. package/lib/types/services/context/context.service.d.ts +0 -1
  30. package/lib/types/services/error/error.service.d.ts +0 -1
  31. package/lib/types/services/instance/instance.service.d.ts +0 -1
  32. package/lib/types/services/lifecycle/lifecycle.d.ts +5 -1
  33. package/lib/types/services/lifecycle/lifecycle.service.d.ts +0 -1
  34. package/lib/types/services/locale/locale.service.d.ts +0 -1
  35. package/lib/types/services/log/log.service.d.ts +0 -1
  36. package/lib/types/services/permission/permission.service.d.ts +0 -1
  37. package/lib/types/services/permission/type.d.ts +2 -3
  38. package/lib/types/services/plugin/plugin-override.d.ts +0 -1
  39. package/lib/types/services/plugin/plugin.d.ts +0 -1
  40. package/lib/types/services/plugin/plugin.service.d.ts +0 -1
  41. package/lib/types/services/resource-loader/resource-loader.service.d.ts +3 -6
  42. package/lib/types/services/resource-loader/type.d.ts +4 -7
  43. package/lib/types/services/resource-manager/resource-manager.service.d.ts +4 -5
  44. package/lib/types/services/resource-manager/type.d.ts +9 -6
  45. package/lib/types/services/snapshot/__tests__/snapshot-mock.d.ts +1 -2
  46. package/lib/types/services/snapshot/snapshot-server.service.d.ts +0 -1
  47. package/lib/types/services/snapshot/snapshot-transform.d.ts +1 -2
  48. package/lib/types/services/snapshot/snapshot-utils.d.ts +1 -4
  49. package/lib/types/services/theme/theme.service.d.ts +0 -1
  50. package/lib/types/services/undoredo/undoredo.service.d.ts +1 -2
  51. package/lib/types/services/user-manager/const.d.ts +0 -1
  52. package/lib/types/shared/after-init-apply.d.ts +0 -1
  53. package/lib/types/shared/check-if-move.d.ts +1 -2
  54. package/lib/types/shared/clipboard.d.ts +0 -1
  55. package/lib/types/shared/color/color.d.ts +1 -2
  56. package/lib/types/shared/common.d.ts +2 -5
  57. package/lib/types/shared/compare.d.ts +0 -1
  58. package/lib/types/shared/doc-tool.d.ts +0 -1
  59. package/lib/types/shared/index.d.ts +1 -0
  60. package/lib/types/shared/lifecycle.d.ts +0 -1
  61. package/lib/types/shared/lru/lru-map.d.ts +0 -1
  62. package/lib/types/shared/numfmt.d.ts +2 -0
  63. package/lib/types/shared/object-matrix-query.d.ts +1 -2
  64. package/lib/types/shared/object-matrix.d.ts +7 -2
  65. package/lib/types/shared/range.d.ts +1 -2
  66. package/lib/types/shared/rectangle.d.ts +1 -2
  67. package/lib/types/shared/rxjs.d.ts +0 -1
  68. package/lib/types/shared/tools.d.ts +1 -3
  69. package/lib/types/shared/types.d.ts +4 -13
  70. package/lib/types/{types/interfaces/i-service-data.d.ts → sheets/__tests__/cell-data.spec.d.ts} +1 -2
  71. package/lib/types/sheets/__tests__/create-core-test-bed.d.ts +1 -2
  72. package/lib/types/sheets/column-manager.d.ts +2 -3
  73. package/lib/types/sheets/empty-snapshot.d.ts +1 -2
  74. package/lib/types/sheets/range.d.ts +2 -2
  75. package/lib/types/sheets/row-manager.d.ts +1 -2
  76. package/lib/types/sheets/sheet-snapshot-utils.d.ts +1 -2
  77. package/lib/types/sheets/styles.d.ts +2 -2
  78. package/lib/types/sheets/typedef.d.ts +451 -0
  79. package/lib/types/sheets/util.d.ts +3 -0
  80. package/lib/types/sheets/view-model.d.ts +2 -3
  81. package/lib/types/sheets/workbook.d.ts +13 -5
  82. package/lib/types/sheets/worksheet.d.ts +11 -2
  83. package/lib/types/slides/slide-model.d.ts +0 -2
  84. package/lib/types/types/const/const.d.ts +1 -1
  85. package/lib/types/types/enum/locale-type.d.ts +3 -1
  86. package/lib/types/types/enum/text-style.d.ts +1 -1
  87. package/lib/types/types/interfaces/i-cell-custom-render.d.ts +2 -3
  88. package/lib/types/types/interfaces/i-cell-validation-data.d.ts +0 -1
  89. package/lib/types/types/interfaces/i-data-validation.d.ts +1 -2
  90. package/lib/types/types/interfaces/i-document-data-interceptor.d.ts +0 -1
  91. package/lib/types/types/interfaces/i-document-data.d.ts +2 -5
  92. package/lib/types/types/interfaces/i-placeholder.d.ts +0 -1
  93. package/lib/types/types/interfaces/i-shape-properties.d.ts +0 -1
  94. package/lib/types/types/interfaces/i-slide-data.d.ts +5 -4
  95. package/lib/types/types/interfaces/i-style-data.d.ts +0 -1
  96. package/lib/types/types/interfaces/index.d.ts +0 -11
  97. package/lib/types/univer.d.ts +14 -3
  98. package/lib/umd/index.js +8 -8
  99. package/package.json +7 -6
  100. package/lib/types/common/type-util.d.ts +0 -16
  101. package/lib/types/common/type-utils.d.ts +0 -16
  102. package/lib/types/types/interfaces/i-cell-data.d.ts +0 -67
  103. package/lib/types/types/interfaces/i-column-data.d.ts +0 -15
  104. package/lib/types/types/interfaces/i-extra-model-data.d.ts +0 -27
  105. package/lib/types/types/interfaces/i-range.d.ts +0 -208
  106. package/lib/types/types/interfaces/i-row-data.d.ts +0 -27
  107. package/lib/types/types/interfaces/i-selection-data.d.ts +0 -59
  108. package/lib/types/types/interfaces/i-univer-data.d.ts +0 -14
  109. package/lib/types/types/interfaces/i-workbook-data.d.ts +0 -40
  110. package/lib/types/types/interfaces/i-worksheet-data.d.ts +0 -55
  111. package/lib/types/types/interfaces/i-worksheet-order-data.d.ts +0 -17
  112. /package/lib/types/{types/interfaces/__tests__/i-cell-data.spec.d.ts → services/__tests__/resources.spec.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs/core",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "private": false,
5
5
  "description": "Core library for Univer.",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -48,24 +48,25 @@
48
48
  "peerDependencies": {
49
49
  "react": "^16.9.0 || ^17.0.0 || ^18.0.0",
50
50
  "rxjs": ">=7.0.0",
51
- "@univerjs/core": "0.2.7"
51
+ "@univerjs/core": "0.2.9"
52
52
  },
53
53
  "dependencies": {
54
54
  "@types/lodash.mergewith": "^4.6.9",
55
- "@univerjs/protocol": "0.1.38",
56
- "@wendellhu/redi": "0.16.0",
55
+ "@univerjs/protocol": "0.1.39-alpha.9",
56
+ "@wendellhu/redi": "0.16.1",
57
57
  "lodash.mergewith": "^4.6.2",
58
58
  "nanoid": "5.0.7",
59
59
  "numeral": "^2.0.6",
60
+ "numfmt": "^2.5.2",
60
61
  "ot-json1": "^1.0.2"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@types/numeral": "^2.0.5",
64
65
  "rxjs": "^7.8.1",
65
66
  "typescript": "^5.5.4",
66
- "vite": "^5.3.5",
67
+ "vite": "^5.4.0",
67
68
  "vitest": "^2.0.5",
68
- "@univerjs/shared": "0.2.7"
69
+ "@univerjs/shared": "0.2.9"
69
70
  },
70
71
  "univerSpace": {
71
72
  ".": {
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export type Nullable<T> = T | null | undefined | void;
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export type Nullable<T> = T | null | undefined | void;
@@ -1,67 +0,0 @@
1
- import { Nullable } from '../../shared/types';
2
- import { CellValueType } from '../enum/text-style';
3
- import { ICellCustomRender } from './i-cell-custom-render';
4
- import { IDocumentData } from './i-document-data';
5
- import { IStyleData } from './i-style-data';
6
- import { ICellValidationData } from './i-cell-validation-data';
7
-
8
- /**
9
- * Cell value type
10
- */
11
- export type CellValue = string | number | boolean;
12
- /**
13
- * Cell data
14
- */
15
- export interface ICellData {
16
- /**
17
- * The unique key, a random string, is used for the plug-in to associate the cell. When the cell information changes,
18
- * the plug-in does not need to change the data, reducing the pressure on the back-end interface id?: string.
19
- */
20
- p?: Nullable<IDocumentData>;
21
- /** style id */
22
- s?: Nullable<IStyleData | string>;
23
- /**
24
- * Origin value
25
- */
26
- v?: Nullable<CellValue>;
27
- t?: Nullable<CellValueType>;
28
- /**
29
- * Raw formula string. For example `=SUM(A1:B4)`.
30
- */
31
- f?: Nullable<string>;
32
- /**
33
- * Id of the formula.
34
- */
35
- si?: Nullable<string>;
36
- /**
37
- * User stored custom fields
38
- */
39
- custom?: Nullable<Record<string, any>>;
40
- }
41
- export interface ICellMarksStyle {
42
- color: string;
43
- size: number;
44
- }
45
- export interface ICellMarks {
46
- tl?: ICellMarksStyle;
47
- tr?: ICellMarksStyle;
48
- bl?: ICellMarksStyle;
49
- br?: ICellMarksStyle;
50
- isSkip?: boolean;
51
- }
52
- export interface ICellDataForSheetInterceptor extends ICellData {
53
- interceptorStyle?: Nullable<IStyleData>;
54
- isInArrayFormulaRange?: Nullable<boolean>;
55
- dataValidation?: Nullable<ICellValidationData>;
56
- markers?: ICellMarks;
57
- customRender?: Nullable<ICellCustomRender[]>;
58
- interceptorAutoHeight?: number;
59
- /**
60
- * can cell be covered when sibling is overflow
61
- */
62
- coverable?: boolean;
63
- }
64
- export declare function isICellData(value: any): value is ICellData;
65
- export declare function getCellValueType(cell: ICellData): CellValueType | null | undefined;
66
- export declare function isNullCell(cell: Nullable<ICellData>): boolean;
67
- export declare function isCellV(cell: Nullable<ICellData | CellValue>): cell is string | number | boolean;
@@ -1,15 +0,0 @@
1
- import { BooleanNumber } from '../enum';
2
-
3
- /**
4
- * Properties of column data
5
- */
6
- export interface IColumnData {
7
- /**
8
- * width
9
- */
10
- w?: number;
11
- /**
12
- * hidden
13
- */
14
- hd?: BooleanNumber;
15
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export interface IExtraModelData {
17
- /**
18
- * should start renderLoop Immediately
19
- * default is true
20
- */
21
- shouldStartRenderingImmediately?: boolean;
22
- /**
23
- * HTML selector
24
- * default is null
25
- */
26
- container?: string;
27
- }
@@ -1,208 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export declare enum RANGE_TYPE {
17
- NORMAL = 0,
18
- ROW = 1,
19
- COLUMN = 2,
20
- ALL = 3
21
- }
22
- /**
23
- * none: A1
24
- * row: A$1
25
- * column: $A1
26
- * all: $A$1
27
- */
28
- export declare enum AbsoluteRefType {
29
- NONE = 0,
30
- ROW = 1,
31
- COLUMN = 2,
32
- ALL = 3
33
- }
34
- interface IRangeLocation {
35
- /**
36
- * Id of the Workbook the range belongs to.
37
- * When this field is not defined, it should be considered as the range in the currently activated worksheet.
38
- */
39
- unitId?: string;
40
- /**
41
- * Id of the Worksheet the range belongs to.
42
- * When this field is not defined, it should be considered as the range in the currently activated worksheet.
43
- */
44
- sheetId?: string;
45
- }
46
- export interface IRowRange extends IRangeLocation {
47
- /**
48
- * The start row (inclusive) of the range
49
- * startRow
50
- */
51
- startRow: number;
52
- /**
53
- * The end row (exclusive) of the range
54
- * endRow
55
- */
56
- endRow: number;
57
- }
58
- export interface IColumnRange extends IRangeLocation {
59
- /**
60
- * The start column (inclusive) of the range
61
- * startColumn
62
- */
63
- startColumn: number;
64
- /**
65
- * The end column (exclusive) of the range
66
- * endColumn
67
- */
68
- endColumn: number;
69
- }
70
- /**
71
- * Range data structure
72
- *
73
- * One of the range types,
74
- *
75
- * e.g.,
76
- * {
77
- * startRow:0 ,
78
- * startColumn:0,
79
- * endRow:1,
80
- * endColumn:1,
81
- * }
82
- *
83
- * means "A1:B2"
84
- */
85
- export interface IRange extends IRowRange, IColumnRange {
86
- rangeType?: RANGE_TYPE;
87
- startAbsoluteRefType?: AbsoluteRefType;
88
- endAbsoluteRefType?: AbsoluteRefType;
89
- }
90
- /**
91
- * Transform an `IRange` object to an array.
92
- * @param range
93
- * @returns [rowStart, colStart, rowEnd, colEnd]
94
- */
95
- export declare function selectionToArray(range: IRange): [number, number, number, number];
96
- /**
97
- * Range data of grid
98
- */
99
- export interface IGridRange {
100
- sheetId: string;
101
- range: IRange;
102
- }
103
- export interface IUnitRangeName {
104
- unitId: string;
105
- sheetName: string;
106
- range: IRange;
107
- }
108
- /**
109
- * Range data of Unit
110
- */
111
- export interface IUnitRange extends IGridRange {
112
- unitId: string;
113
- }
114
- export interface IUnitRangeWithName extends IUnitRange {
115
- sheetName: string;
116
- }
117
- /**
118
- * One of the range types,
119
- *
120
- * e.g.,"A1:B2","sheet1!A1:B2","A1","1:1","A:A","AA1:BB2"
121
- */
122
- export type IRangeStringData = string;
123
- /**
124
- * Row data type
125
- */
126
- export type IRowStartEndData = [startRow: number, endRow: number] | number[];
127
- /**
128
- * Column data type
129
- */
130
- export type IColumnStartEndData = [startColumn: number, endColumn: number] | number[];
131
- /**
132
- * One of the range types,
133
- *
134
- * e.g.,
135
- * {
136
- * row:[0,1],
137
- * column:[0,1]
138
- * }
139
- *todo
140
-
141
- true false 枚举
142
- * means "A1:B2"
143
- */
144
- export interface IRangeArrayData {
145
- /**
146
- * row
147
- */
148
- row: IRowStartEndData;
149
- /**
150
- * column
151
- */
152
- column: IColumnStartEndData;
153
- }
154
- /**
155
- * The row and column numbers represent a cell
156
- */
157
- export interface IRangeCellData {
158
- /**
159
- * row
160
- */
161
- row: number;
162
- /**
163
- * column
164
- */
165
- column: number;
166
- }
167
- /**
168
- * range types
169
- *
170
- * Allow users to provide one of three formats, we need to convert to IRange to store
171
- */
172
- export type IRangeType = IRange | IRangeStringData | IRangeArrayData | IRangeCellData;
173
- /**
174
- * Whether to clear only the contents. Whether to clear only the format; note that clearing format also clears data validation rules.
175
- */
176
- export interface IOptionData {
177
- /**
178
- * 1. designates that only the format should be copied
179
- *
180
- * 2. Whether to clear only the format; note that clearing format also clears data validation rules.
181
- *
182
- * 3. worksheet Whether to clear the format.
183
- */
184
- formatOnly?: boolean;
185
- /**
186
- * 1. designates that only the content should be copied
187
- *
188
- * 2. Whether to clear only the contents.
189
- *
190
- * 3. worksheet Whether to clear the content.
191
- *
192
- */
193
- contentsOnly?: boolean;
194
- }
195
- /**
196
- * Option of copyTo function
197
- */
198
- export interface ICopyToOptionsData extends IOptionData {
199
- }
200
- export interface IRectLTRB {
201
- left: number;
202
- top: number;
203
- right: number;
204
- bottom: number;
205
- width?: number;
206
- height?: number;
207
- }
208
- export {};
@@ -1,27 +0,0 @@
1
- import { BooleanNumber } from '../enum';
2
-
3
- /**
4
- * Properties of row data
5
- */
6
- export interface IRowData {
7
- /**
8
- * height in pixel
9
- */
10
- h?: number;
11
- /**
12
- * is current row self-adaptive to its content, use `ah` to set row height when true, else use `h`.
13
- */
14
- ia?: BooleanNumber;
15
- /**
16
- * auto height
17
- */
18
- ah?: number;
19
- /**
20
- * hidden
21
- */
22
- hd?: BooleanNumber;
23
- }
24
- export interface IRowAutoHeightInfo {
25
- row: number;
26
- autoHeight?: number;
27
- }
@@ -1,59 +0,0 @@
1
- import { Nullable } from '../../shared/types';
2
- import { IRange } from './i-range';
3
-
4
- /**
5
- * Properties of selection data
6
- */
7
- export interface IPosition {
8
- startX: number;
9
- startY: number;
10
- endX: number;
11
- endY: number;
12
- }
13
- export interface ISingleCell {
14
- actualRow: number;
15
- actualColumn: number;
16
- isMerged: boolean;
17
- isMergedMainCell: boolean;
18
- }
19
- export interface IRangeWithCoord extends IPosition, IRange {
20
- }
21
- export interface ISelectionCell extends IRange, ISingleCell {
22
- }
23
- export interface ISelectionCellWithMergeInfo extends IPosition, ISingleCell {
24
- mergeInfo: IRangeWithCoord;
25
- }
26
- export interface ISelection {
27
- /**
28
- * Sheet selection range.
29
- */
30
- range: IRange;
31
- /**
32
- * The highlighted cell in the selection range. If there are several selections, only one selection would have a primary cell.
33
- */
34
- primary: Nullable<ISelectionCell>;
35
- }
36
- /**
37
- * Selection range Info, contains selectionrange & primaryrange
38
- * primaryrange is the range of the highlighted cell.
39
- */
40
- export interface ISelectionWithCoord {
41
- rangeWithCoord: IRangeWithCoord;
42
- primaryWithCoord: Nullable<ISelectionCellWithMergeInfo>;
43
- }
44
- export interface ITextRangeStart {
45
- startOffset: number;
46
- }
47
- export interface ITextRange extends ITextRangeStart {
48
- endOffset: number;
49
- collapsed: boolean;
50
- }
51
- export interface ITextRangeParam extends ITextRange {
52
- segmentId?: string;
53
- segmentPage?: number;
54
- isActive?: boolean;
55
- }
56
- /**
57
- * Determines whether the cell(row, column) is within the range of the merged cells.
58
- */
59
- export declare function getCellInfoInMergeData(row: number, column: number, mergeData?: IRange[]): ISelectionCell;
@@ -1,14 +0,0 @@
1
- import { LogLevel } from '../../services/log/log.service';
2
- import { DependencyOverride } from '../../services/plugin/plugin-override';
3
- import { IStyleSheet } from '../../services/theme/theme.service';
4
- import { ILocales } from '../../shared/locale';
5
- import { LocaleType } from '../enum';
6
-
7
- export interface IUniverData {
8
- theme: IStyleSheet;
9
- locale: LocaleType;
10
- locales: ILocales;
11
- logLevel: LogLevel;
12
- id: string;
13
- override?: DependencyOverride;
14
- }
@@ -1,40 +0,0 @@
1
- import { IKeyType, Nullable } from '../../shared/types';
2
- import { LocaleType } from '../enum';
3
- import { IExtraModelData } from './i-extra-model-data';
4
- import { IStyleData } from './i-style-data';
5
- import { IWorksheetData } from './i-worksheet-data';
6
-
7
- export type Resources = Array<{
8
- id?: string;
9
- name: string;
10
- data: string;
11
- }>;
12
- /**
13
- * Properties of a workbook's configuration
14
- */
15
- export interface IWorkbookData extends IExtraModelData {
16
- /**
17
- * unit id
18
- */
19
- id: string;
20
- /**
21
- * Revision of this spreadsheet. Would be used in collaborated editing. Starts from one.
22
- */
23
- rev?: number;
24
- /**
25
- * Name of the spreadsheet.
26
- */
27
- name: string;
28
- /**
29
- * Version of Univer model definition.
30
- */
31
- appVersion: string;
32
- locale: LocaleType;
33
- /** Style reference. */
34
- styles: IKeyType<Nullable<IStyleData>>;
35
- sheetOrder: string[];
36
- sheets: {
37
- [sheetId: string]: Partial<IWorksheetData>;
38
- };
39
- resources?: Resources;
40
- }
@@ -1,55 +0,0 @@
1
- import { IObjectArrayPrimitiveType, IObjectMatrixPrimitiveType } from '../../shared/object-matrix';
2
- import { BooleanNumber } from '../enum';
3
- import { ICellData } from './i-cell-data';
4
- import { IColumnData } from './i-column-data';
5
- import { IFreeze } from './i-freeze';
6
- import { IRange, IRangeType } from './i-range';
7
- import { IRowData } from './i-row-data';
8
-
9
- /**
10
- * Snapshot of a worksheet.
11
- */
12
- export interface IWorksheetData {
13
- /**
14
- * Id of the worksheet. This should be unique and immutable across the lifecycle of the worksheet.
15
- */
16
- id: string;
17
- /** Name of the sheet. */
18
- name: string;
19
- tabColor: string;
20
- /**
21
- * Determine whether the sheet is hidden.
22
- *
23
- * @remarks
24
- * See {@link BooleanNumber| the BooleanNumber enum} for more details.
25
- *
26
- * @defaultValue `BooleanNumber.FALSE`
27
- */
28
- hidden: BooleanNumber;
29
- freeze: IFreeze;
30
- rowCount: number;
31
- columnCount: number;
32
- zoomRatio: number;
33
- scrollTop: number;
34
- scrollLeft: number;
35
- defaultColumnWidth: number;
36
- defaultRowHeight: number;
37
- /** All merged cells in this worksheet. */
38
- mergeData: IRange[];
39
- /** A matrix storing cell contents by row and column index. */
40
- cellData: IObjectMatrixPrimitiveType<ICellData>;
41
- rowData: IObjectArrayPrimitiveType<Partial<IRowData>>;
42
- columnData: IObjectArrayPrimitiveType<Partial<IColumnData>>;
43
- rowHeader: {
44
- width: number;
45
- hidden?: BooleanNumber;
46
- };
47
- columnHeader: {
48
- height: number;
49
- hidden?: BooleanNumber;
50
- };
51
- showGridlines: BooleanNumber;
52
- /** @deprecated */
53
- selections: IRangeType[];
54
- rightToLeft: BooleanNumber;
55
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export interface IWorksheetOrderData {
17
- }