@univerjs/sheets 0.5.5 → 0.6.0-alpha.0
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/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +3 -3
- package/lib/es/facade.js +531 -396
- package/lib/es/index.js +537 -425
- package/lib/types/facade/f-defined-name.d.ts +22 -16
- package/lib/types/facade/f-enum.d.ts +3 -0
- package/lib/types/facade/f-event.d.ts +43 -41
- package/lib/types/facade/f-permission.d.ts +141 -9
- package/lib/types/facade/f-range.d.ts +155 -149
- package/lib/types/facade/f-selection.d.ts +3 -1
- package/lib/types/facade/f-sheet-hooks.d.ts +3 -0
- package/lib/types/facade/f-univer.d.ts +9 -3
- package/lib/types/facade/f-workbook.d.ts +13 -5
- package/lib/types/facade/f-worksheet.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/model/range-protection-rule.model.d.ts +1 -1
- package/lib/types/services/permission/permission-point/const.d.ts +117 -4
- package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +1 -1
- package/lib/types/services/permission/range-permission/range-protection.service.d.ts +1 -1
- package/lib/types/services/permission/worksheet-permission/worksheet-permission-rule.model.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +3 -3
- package/package.json +8 -8
- package/lib/types/basics/__tests__/cell-type.spec.d.ts +0 -16
- package/lib/types/basics/__tests__/cell-value.spec.d.ts +0 -16
- package/lib/types/basics/__tests__/expand.data.d.ts +0 -2
- package/lib/types/basics/__tests__/expand.spec.d.ts +0 -16
- package/lib/types/basics/__tests__/rangeMerge.spec.d.ts +0 -16
- package/lib/types/basics/__tests__/row-column-value.spec.d.ts +0 -16
- package/lib/types/basics/__tests__/utils.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/add-merge-command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/clear-selection.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/copy-worksheet.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +0 -7
- package/lib/types/commands/commands/__tests__/delete-range.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/insert-range.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/insert-remove-rows-cols.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/move-range-commands.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/move-rows-cols.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/range-template-command.sepc.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/remove-rows-cols.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/remove-sheet.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-border.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-col-data.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-col-width.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-frozen.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-gridlines-command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-range-values.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-row-col-visible.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-row-data.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-row-height.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-style.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-tab-color.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-worksheet-default-style.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-worksheet-hide.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-worksheet-name.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-worksheet-order.command.spec.d.ts +0 -16
- package/lib/types/commands/commands/__tests__/set-worksheet-show.command.spec.d.ts +0 -16
- package/lib/types/commands/mutations/__tests__/create-command-test-bed.d.ts +0 -8
- package/lib/types/commands/mutations/__tests__/move-rows-cols.mutation.spec.d.ts +0 -16
- package/lib/types/commands/mutations/__tests__/remove-row-col.mutation.spec.d.ts +0 -16
- package/lib/types/controllers/__tests__/util.d.ts +0 -13
- package/lib/types/facade/__tests__/utils.spec.d.ts +0 -16
- package/lib/types/services/__tests__/move-active-cell.spec.d.ts +0 -16
- package/lib/types/services/__tests__/numfmt.service.test.d.ts +0 -16
- package/lib/types/services/__tests__/ref-range.setvice.spec.d.ts +0 -16
- package/lib/types/services/__tests__/util.d.ts +0 -14
- package/lib/types/services/ref-range/__tests__/__testing__.d.ts +0 -14
- package/lib/types/services/ref-range/__tests__/ref-range.service.spec.d.ts +0 -13
- package/lib/types/services/ref-range/__tests__/utils.spec.d.ts +0 -16
- package/lib/types/services/ref-range/__tests__/watch-range.spec.d.ts +0 -16
- package/lib/types/services/sheet-interceptor/__tests__/create-core-test-bed.d.ts +0 -13
- package/lib/types/services/sheet-interceptor/__tests__/sheet-interceptor.service.spec.d.ts +0 -16
|
@@ -5,6 +5,12 @@ import { FormulaDataModel } from '@univerjs/engine-formula';
|
|
|
5
5
|
export type FontLine = 'none' | 'underline' | 'line-through';
|
|
6
6
|
export type FontStyle = 'normal' | 'italic';
|
|
7
7
|
export type FontWeight = 'normal' | 'bold';
|
|
8
|
+
/**
|
|
9
|
+
* Represents a range of cells in a sheet. You can call methods on this Facade API object
|
|
10
|
+
* to read contents or manipulate the range.
|
|
11
|
+
*
|
|
12
|
+
* @hideconstructor
|
|
13
|
+
*/
|
|
8
14
|
export declare class FRange extends FBaseInitialable {
|
|
9
15
|
protected readonly _workbook: Workbook;
|
|
10
16
|
protected readonly _worksheet: Worksheet;
|
|
@@ -19,9 +25,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
19
25
|
* @example
|
|
20
26
|
* ```ts
|
|
21
27
|
* univerAPI.getActiveWorkbook()
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
28
|
+
* .getActiveSheet()
|
|
29
|
+
* .getActiveRange()
|
|
30
|
+
* .getUnitId()
|
|
25
31
|
* ```
|
|
26
32
|
*/
|
|
27
33
|
getUnitId(): string;
|
|
@@ -31,9 +37,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
31
37
|
* @example
|
|
32
38
|
* ```ts
|
|
33
39
|
* univerAPI.getActiveWorkbook()
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
40
|
+
* .getActiveSheet()
|
|
41
|
+
* .getActiveRange()
|
|
42
|
+
* .getSheetName()
|
|
37
43
|
* ```
|
|
38
44
|
*/
|
|
39
45
|
getSheetName(): string;
|
|
@@ -43,9 +49,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
43
49
|
* @example
|
|
44
50
|
* ```ts
|
|
45
51
|
* univerAPI.getActiveWorkbook()
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
52
|
+
* .getActiveSheet()
|
|
53
|
+
* .getActiveRange()
|
|
54
|
+
* .getSheetId()
|
|
49
55
|
* ```
|
|
50
56
|
*/
|
|
51
57
|
getSheetId(): string;
|
|
@@ -55,9 +61,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
55
61
|
* @example
|
|
56
62
|
* ```ts
|
|
57
63
|
* univerAPI.getActiveWorkbook()
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
64
|
+
* .getActiveSheet()
|
|
65
|
+
* .getActiveRange()
|
|
66
|
+
* .getRange()
|
|
61
67
|
* ```
|
|
62
68
|
*/
|
|
63
69
|
getRange(): IRange;
|
|
@@ -67,9 +73,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
67
73
|
* @example
|
|
68
74
|
* ```ts
|
|
69
75
|
* univerAPI.getActiveWorkbook()
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
76
|
+
* .getActiveSheet()
|
|
77
|
+
* .getActiveRange()
|
|
78
|
+
* .getRow()
|
|
73
79
|
* ```
|
|
74
80
|
*/
|
|
75
81
|
getRow(): number;
|
|
@@ -79,9 +85,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
79
85
|
* @example
|
|
80
86
|
* ```ts
|
|
81
87
|
* univerAPI.getActiveWorkbook()
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
88
|
+
* .getActiveSheet()
|
|
89
|
+
* .getActiveRange()
|
|
90
|
+
* .getColumn()
|
|
85
91
|
* ```
|
|
86
92
|
*/
|
|
87
93
|
getColumn(): number;
|
|
@@ -91,9 +97,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
91
97
|
* @example
|
|
92
98
|
* ```ts
|
|
93
99
|
* univerAPI.getActiveWorkbook()
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
100
|
+
* .getActiveSheet()
|
|
101
|
+
* .getActiveRange()
|
|
102
|
+
* .getWidth()
|
|
97
103
|
* ```
|
|
98
104
|
*/
|
|
99
105
|
getWidth(): number;
|
|
@@ -103,9 +109,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
103
109
|
* @example
|
|
104
110
|
* ```ts
|
|
105
111
|
* univerAPI.getActiveWorkbook()
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
112
|
+
* .getActiveSheet()
|
|
113
|
+
* .getActiveRange()
|
|
114
|
+
* .getHeight()
|
|
109
115
|
* ```
|
|
110
116
|
*/
|
|
111
117
|
getHeight(): number;
|
|
@@ -115,9 +121,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
115
121
|
* @example
|
|
116
122
|
* ```ts
|
|
117
123
|
* univerAPI.getActiveWorkbook()
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
124
|
+
* .getActiveSheet()
|
|
125
|
+
* .getActiveRange()
|
|
126
|
+
* .isMerged()
|
|
121
127
|
* ```
|
|
122
128
|
*/
|
|
123
129
|
isMerged(): boolean;
|
|
@@ -127,9 +133,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
127
133
|
* @example
|
|
128
134
|
* ```ts
|
|
129
135
|
* univerAPI.getActiveWorkbook()
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
136
|
+
* .getActiveSheet()
|
|
137
|
+
* .getActiveRange()
|
|
138
|
+
* .getCellStyleData()
|
|
133
139
|
* ```
|
|
134
140
|
*/
|
|
135
141
|
getCellStyleData(): IStyleData | null;
|
|
@@ -139,9 +145,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
139
145
|
* @example
|
|
140
146
|
* ```ts
|
|
141
147
|
* univerAPI.getActiveWorkbook()
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
148
|
+
* .getActiveSheet()
|
|
149
|
+
* .getActiveRange()
|
|
150
|
+
* .getCellStyle()
|
|
145
151
|
* ```
|
|
146
152
|
*/
|
|
147
153
|
getCellStyle(): TextStyleValue | null;
|
|
@@ -151,9 +157,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
151
157
|
* @example
|
|
152
158
|
* ```ts
|
|
153
159
|
* univerAPI.getActiveWorkbook()
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
160
|
+
* .getActiveSheet()
|
|
161
|
+
* .getActiveRange()
|
|
162
|
+
* .getCellStyles()
|
|
157
163
|
* ```
|
|
158
164
|
*/
|
|
159
165
|
getCellStyles(): Array<Array<TextStyleValue | null>>;
|
|
@@ -163,9 +169,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
163
169
|
* @example
|
|
164
170
|
* ```ts
|
|
165
171
|
* univerAPI.getActiveWorkbook()
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
172
|
+
* .getActiveSheet()
|
|
173
|
+
* .getActiveRange()
|
|
174
|
+
* .getValue()
|
|
169
175
|
* ```
|
|
170
176
|
*/
|
|
171
177
|
getValue(): CellValue | null;
|
|
@@ -176,9 +182,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
176
182
|
* @example
|
|
177
183
|
* ```ts
|
|
178
184
|
* univerAPI.getActiveWorkbook()
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
185
|
+
* .getActiveSheet()
|
|
186
|
+
* .getActiveRange()
|
|
187
|
+
* .getValue(true)
|
|
182
188
|
* ```
|
|
183
189
|
*/
|
|
184
190
|
getValue(includeRichText: true): Nullable<CellValue | RichTextValue>;
|
|
@@ -200,9 +206,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
200
206
|
* ```ts
|
|
201
207
|
* // Get values with rich text if available
|
|
202
208
|
* const richTextValues = univerAPI.getActiveWorkbook()
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
209
|
+
* .getActiveSheet()
|
|
210
|
+
* .getActiveRange()
|
|
211
|
+
* .getValues(true)
|
|
206
212
|
* ```
|
|
207
213
|
*/
|
|
208
214
|
getValues(includeRichText: true): (Nullable<RichTextValue | CellValue>)[][];
|
|
@@ -212,9 +218,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
212
218
|
* @example
|
|
213
219
|
* ```ts
|
|
214
220
|
* univerAPI.getActiveWorkbook()
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
221
|
+
* .getActiveSheet()
|
|
222
|
+
* .getActiveRange()
|
|
223
|
+
* .getCellData()
|
|
218
224
|
* ```
|
|
219
225
|
*/
|
|
220
226
|
getCellData(): ICellData | null;
|
|
@@ -224,9 +230,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
224
230
|
* @example
|
|
225
231
|
* ```ts
|
|
226
232
|
* univerAPI.getActiveWorkbook()
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
233
|
+
* .getActiveSheet()
|
|
234
|
+
* .getActiveRange()
|
|
235
|
+
* .getCellDatas()
|
|
230
236
|
* ```
|
|
231
237
|
*/
|
|
232
238
|
getCellDatas(): Nullable<ICellData>[][];
|
|
@@ -236,9 +242,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
236
242
|
* @example
|
|
237
243
|
* ```ts
|
|
238
244
|
* univerAPI.getActiveWorkbook()
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
245
|
+
* .getActiveSheet()
|
|
246
|
+
* .getActiveRange()
|
|
247
|
+
* .getCellDataGrid()
|
|
242
248
|
* ```
|
|
243
249
|
*/
|
|
244
250
|
getCellDataGrid(): Nullable<ICellData>[][];
|
|
@@ -250,9 +256,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
250
256
|
* @example
|
|
251
257
|
* ```ts
|
|
252
258
|
* univerAPI.getActiveWorkbook()
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
259
|
+
* .getActiveSheet()
|
|
260
|
+
* .getActiveRange()
|
|
261
|
+
* .getRichTextValue()
|
|
256
262
|
* ```
|
|
257
263
|
*/
|
|
258
264
|
private getRichTextValue;
|
|
@@ -264,9 +270,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
264
270
|
* @example
|
|
265
271
|
* ```ts
|
|
266
272
|
* univerAPI.getActiveWorkbook()
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
273
|
+
* .getActiveSheet()
|
|
274
|
+
* .getActiveRange()
|
|
275
|
+
* .getRichTextValues()
|
|
270
276
|
* ```
|
|
271
277
|
*/
|
|
272
278
|
private getRichTextValues;
|
|
@@ -278,9 +284,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
278
284
|
* @example
|
|
279
285
|
* ```ts
|
|
280
286
|
* univerAPI.getActiveWorkbook()
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
287
|
+
* .getActiveSheet()
|
|
288
|
+
* .getActiveRange()
|
|
289
|
+
* .getValueAndRichTextValue()
|
|
284
290
|
* ```
|
|
285
291
|
*/
|
|
286
292
|
private getValueAndRichTextValue;
|
|
@@ -290,9 +296,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
290
296
|
* @example
|
|
291
297
|
* ```ts
|
|
292
298
|
* univerAPI.getActiveWorkbook()
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
299
|
+
* .getActiveSheet()
|
|
300
|
+
* .getActiveRange()
|
|
301
|
+
* .getValueAndRichTextValues()
|
|
296
302
|
* ```
|
|
297
303
|
*/
|
|
298
304
|
getValueAndRichTextValues(): Nullable<CellValue | RichTextValue>[][];
|
|
@@ -302,9 +308,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
302
308
|
* @example
|
|
303
309
|
* ```ts
|
|
304
310
|
* univerAPI.getActiveWorkbook()
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
311
|
+
* .getActiveSheet()
|
|
312
|
+
* .getActiveRange()
|
|
313
|
+
* .getFormulas()
|
|
308
314
|
* ```
|
|
309
315
|
*/
|
|
310
316
|
getFormulas(): string[][];
|
|
@@ -314,9 +320,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
314
320
|
* @example
|
|
315
321
|
* ```ts
|
|
316
322
|
* univerAPI.getActiveWorkbook()
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
323
|
+
* .getActiveSheet()
|
|
324
|
+
* .getActiveRange()
|
|
325
|
+
* .getWrap()
|
|
320
326
|
* ```
|
|
321
327
|
*/
|
|
322
328
|
getWrap(): boolean;
|
|
@@ -326,9 +332,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
326
332
|
* @example
|
|
327
333
|
* ```ts
|
|
328
334
|
* univerAPI.getActiveWorkbook()
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
335
|
+
* .getActiveSheet()
|
|
336
|
+
* .getActiveRange()
|
|
337
|
+
* .getWrapStrategy()
|
|
332
338
|
* ```
|
|
333
339
|
*/
|
|
334
340
|
getWrapStrategy(): WrapStrategy;
|
|
@@ -338,9 +344,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
338
344
|
* @example
|
|
339
345
|
* ```ts
|
|
340
346
|
* univerAPI.getActiveWorkbook()
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
347
|
+
* .getActiveSheet()
|
|
348
|
+
* .getActiveRange()
|
|
349
|
+
* .getHorizontalAlignment()
|
|
344
350
|
* ```
|
|
345
351
|
*/
|
|
346
352
|
getHorizontalAlignment(): string;
|
|
@@ -350,9 +356,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
350
356
|
* @example
|
|
351
357
|
* ```ts
|
|
352
358
|
* univerAPI.getActiveWorkbook()
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
359
|
+
* .getActiveSheet()
|
|
360
|
+
* .getActiveRange()
|
|
361
|
+
* .getVerticalAlignment()
|
|
356
362
|
* ```
|
|
357
363
|
*/
|
|
358
364
|
getVerticalAlignment(): string;
|
|
@@ -362,9 +368,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
362
368
|
* @returns {FRange} This range, for chaining
|
|
363
369
|
* ```ts
|
|
364
370
|
* univerAPI.getActiveWorkbook()
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
371
|
+
* .getActiveSheet()
|
|
372
|
+
* .getActiveRange()
|
|
373
|
+
* .setCustomMetaData({ key: 'value' });
|
|
368
374
|
* ```
|
|
369
375
|
*/
|
|
370
376
|
setCustomMetaData(data: CustomData): FRange;
|
|
@@ -374,9 +380,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
374
380
|
* @returns {FRange} This range, for chaining
|
|
375
381
|
* ```ts
|
|
376
382
|
* univerAPI.getActiveWorkbook()
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
383
|
+
* .getActiveSheet()
|
|
384
|
+
* .getActiveRange()
|
|
385
|
+
* .setCustomMetaDatas([[{ key: 'value' }]]);
|
|
380
386
|
* ```
|
|
381
387
|
*/
|
|
382
388
|
setCustomMetaDatas(datas: CustomData[][]): FRange;
|
|
@@ -386,9 +392,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
386
392
|
* @example
|
|
387
393
|
* ```
|
|
388
394
|
* univerAPI.getActiveWorkbook()
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
395
|
+
* .getActiveSheet()
|
|
396
|
+
* .getActiveRange()
|
|
397
|
+
* .getCustomMetaData()
|
|
392
398
|
* ```
|
|
393
399
|
*/
|
|
394
400
|
getCustomMetaData(): CustomData | null;
|
|
@@ -398,9 +404,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
398
404
|
* @example
|
|
399
405
|
* ```
|
|
400
406
|
* univerAPI.getActiveWorkbook()
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
407
|
+
* .getActiveSheet()
|
|
408
|
+
* .getActiveRange()
|
|
409
|
+
* .getCustomMetaDatas()
|
|
404
410
|
* ```
|
|
405
411
|
*/
|
|
406
412
|
getCustomMetaDatas(): Nullable<CustomData>[][];
|
|
@@ -413,9 +419,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
413
419
|
* @example
|
|
414
420
|
* ```ts
|
|
415
421
|
* univerAPI.getActiveWorkbook()
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
422
|
+
* .getActiveSheet()
|
|
423
|
+
* .getActiveRange()
|
|
424
|
+
* .setBorder(BorderType.ALL, BorderStyleType.THIN, '#ff0000');
|
|
419
425
|
* ```
|
|
420
426
|
*/
|
|
421
427
|
setBorder(type: BorderType, style: BorderStyleTypes, color?: string): FRange;
|
|
@@ -426,9 +432,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
426
432
|
* @example
|
|
427
433
|
* ```ts
|
|
428
434
|
* univerAPI.getActiveWorkbook()
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
435
|
+
* .getActiveSheet()
|
|
436
|
+
* .getActiveRange()
|
|
437
|
+
* .setBackgroundColor('red')
|
|
432
438
|
* ```
|
|
433
439
|
*/
|
|
434
440
|
setBackgroundColor(color: string): FRange;
|
|
@@ -448,9 +454,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
448
454
|
* @returns {FRange} This range, for chaining
|
|
449
455
|
* ```ts
|
|
450
456
|
* univerAPI.getActiveWorkbook()
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
457
|
+
* .getActiveSheet()
|
|
458
|
+
* .getActiveRange()
|
|
459
|
+
* .setValue(1);
|
|
454
460
|
* ```
|
|
455
461
|
*/
|
|
456
462
|
setValue(value: CellValue | ICellData): FRange;
|
|
@@ -460,9 +466,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
460
466
|
* @returns {FRange} This range, for chaining
|
|
461
467
|
* ```ts
|
|
462
468
|
* univerAPI.getActiveWorkbook()
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
*
|
|
469
|
+
* .getActiveSheet()
|
|
470
|
+
* .getActiveRange()
|
|
471
|
+
* .setValueForCell(1);
|
|
466
472
|
* ```
|
|
467
473
|
*/
|
|
468
474
|
setValueForCell(value: CellValue | ICellData): FRange;
|
|
@@ -473,9 +479,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
473
479
|
* @example
|
|
474
480
|
* ```
|
|
475
481
|
* univerAPI.getActiveWorkbook()
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
*
|
|
482
|
+
* .getActiveSheet()
|
|
483
|
+
* .getActiveRange()
|
|
484
|
+
* .setRichTextValueForCell(new RichTextValue().insertText('Hello'));
|
|
479
485
|
* ```
|
|
480
486
|
*/
|
|
481
487
|
setRichTextValueForCell(value: RichTextValue | IDocumentData): FRange;
|
|
@@ -486,10 +492,10 @@ export declare class FRange extends FBaseInitialable {
|
|
|
486
492
|
* @example
|
|
487
493
|
* ```ts
|
|
488
494
|
* univerAPI
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
495
|
+
* .getActiveWorkbook()
|
|
496
|
+
* .getActiveSheet()
|
|
497
|
+
* .getActiveRange()
|
|
498
|
+
* .setRichTextValues([[new RichTextValue().insertText('Hello')]]);
|
|
493
499
|
* ```
|
|
494
500
|
*/
|
|
495
501
|
setRichTextValues(values: (RichTextValue | IDocumentData)[][]): FRange;
|
|
@@ -501,9 +507,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
501
507
|
* @example
|
|
502
508
|
* ```ts
|
|
503
509
|
* univerAPI.getActiveWorkbook()
|
|
504
|
-
*
|
|
505
|
-
*
|
|
506
|
-
*
|
|
510
|
+
* .getActiveSheet()
|
|
511
|
+
* .getActiveRange()
|
|
512
|
+
* .setWrap(true);
|
|
507
513
|
* ```
|
|
508
514
|
*/
|
|
509
515
|
setWrap(isWrapEnabled: boolean): FRange;
|
|
@@ -514,9 +520,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
514
520
|
* @example
|
|
515
521
|
* ```ts
|
|
516
522
|
* univerAPI.getActiveWorkbook()
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
523
|
+
* .getActiveSheet()
|
|
524
|
+
* .getActiveRange()
|
|
525
|
+
* .setWrapStrategy(WrapStrategy.WRAP);
|
|
520
526
|
* ```
|
|
521
527
|
*/
|
|
522
528
|
setWrapStrategy(strategy: WrapStrategy): FRange;
|
|
@@ -527,9 +533,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
527
533
|
* @example
|
|
528
534
|
* ```ts
|
|
529
535
|
* univerAPI.getActiveWorkbook()
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
536
|
+
* .getActiveSheet()
|
|
537
|
+
* .getActiveRange()
|
|
538
|
+
* .setVerticalAlignment('top');
|
|
533
539
|
* ```
|
|
534
540
|
*/
|
|
535
541
|
setVerticalAlignment(alignment: FVerticalAlignment): FRange;
|
|
@@ -540,9 +546,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
540
546
|
* @example
|
|
541
547
|
* ```ts
|
|
542
548
|
* univerAPI.getActiveWorkbook()
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
*
|
|
549
|
+
* .getActiveSheet()
|
|
550
|
+
* .getActiveRange()
|
|
551
|
+
* .setHorizontalAlignment('left');
|
|
546
552
|
* ```
|
|
547
553
|
*/
|
|
548
554
|
setHorizontalAlignment(alignment: FHorizontalAlignment): FRange;
|
|
@@ -553,9 +559,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
553
559
|
* @example
|
|
554
560
|
* ```ts
|
|
555
561
|
* univerAPI.getActiveWorkbook()
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
562
|
+
* .getActiveSheet()
|
|
563
|
+
* .getActiveRange()
|
|
564
|
+
* .setValues([[1, 2], [3, 4]]);
|
|
559
565
|
* ```
|
|
560
566
|
*/
|
|
561
567
|
setValues(value: CellValue[][] | IObjectMatrixPrimitiveType<CellValue> | ICellData[][] | IObjectMatrixPrimitiveType<ICellData>): FRange;
|
|
@@ -566,9 +572,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
566
572
|
* @example
|
|
567
573
|
* ```ts
|
|
568
574
|
* univerAPI.getActiveWorkbook()
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
*
|
|
575
|
+
* .getActiveSheet()
|
|
576
|
+
* .getActiveRange()
|
|
577
|
+
* .setFontWeight('bold');
|
|
572
578
|
* ```
|
|
573
579
|
*/
|
|
574
580
|
setFontWeight(fontWeight: FontWeight | null): this;
|
|
@@ -579,9 +585,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
579
585
|
* @example
|
|
580
586
|
* ```ts
|
|
581
587
|
* univerAPI.getActiveWorkbook()
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
588
|
+
* .getActiveSheet()
|
|
589
|
+
* .getActiveRange()
|
|
590
|
+
* .setFontStyle('italic');
|
|
585
591
|
* ```
|
|
586
592
|
*/
|
|
587
593
|
setFontStyle(fontStyle: FontStyle | null): this;
|
|
@@ -592,9 +598,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
592
598
|
* @example
|
|
593
599
|
* ```ts
|
|
594
600
|
* univerAPI.getActiveWorkbook()
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
601
|
+
* .getActiveSheet()
|
|
602
|
+
* .getActiveRange()
|
|
603
|
+
* .setFontLine('underline');
|
|
598
604
|
* ```
|
|
599
605
|
*/
|
|
600
606
|
setFontLine(fontLine: FontLine | null): this;
|
|
@@ -605,9 +611,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
605
611
|
* @example
|
|
606
612
|
* ```ts
|
|
607
613
|
* univerAPI.getActiveWorkbook()
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
614
|
+
* .getActiveSheet()
|
|
615
|
+
* .getActiveRange()
|
|
616
|
+
* .setFontLine('underline');
|
|
611
617
|
* ```
|
|
612
618
|
*/
|
|
613
619
|
private _setFontUnderline;
|
|
@@ -624,9 +630,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
624
630
|
* @example
|
|
625
631
|
* ```ts
|
|
626
632
|
* univerAPI.getActiveWorkbook()
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
633
|
+
* .getActiveSheet()
|
|
634
|
+
* .getActiveRange()
|
|
635
|
+
* .setFontFamily('Arial');
|
|
630
636
|
* ```
|
|
631
637
|
*/
|
|
632
638
|
setFontFamily(fontFamily: string | null): this;
|
|
@@ -637,9 +643,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
637
643
|
* @example
|
|
638
644
|
* ```ts
|
|
639
645
|
* univerAPI.getActiveWorkbook()
|
|
640
|
-
*
|
|
641
|
-
*
|
|
642
|
-
*
|
|
646
|
+
* .getActiveSheet()
|
|
647
|
+
* .getActiveRange()
|
|
648
|
+
* .setFontSize(12);
|
|
643
649
|
* ```
|
|
644
650
|
*/
|
|
645
651
|
setFontSize(size: number | null): this;
|
|
@@ -650,9 +656,9 @@ export declare class FRange extends FBaseInitialable {
|
|
|
650
656
|
* @example
|
|
651
657
|
* ```ts
|
|
652
658
|
* univerAPI.getActiveWorkbook()
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
659
|
+
* .getActiveSheet()
|
|
660
|
+
* .getActiveRange()
|
|
661
|
+
* .setFontColor('#ff0000');
|
|
656
662
|
* ```
|
|
657
663
|
*/
|
|
658
664
|
setFontColor(color: string | null): this;
|
|
@@ -745,7 +751,7 @@ export declare class FRange extends FBaseInitialable {
|
|
|
745
751
|
* const fWorksheet = fWorkbook.getActiveSheet();
|
|
746
752
|
* const fRange = fWorksheet.getRange('A1:B2');
|
|
747
753
|
* fRange.forEach((row, col, cell) => {
|
|
748
|
-
*
|
|
754
|
+
* console.log(row, col, cell);
|
|
749
755
|
* });
|
|
750
756
|
* ```
|
|
751
757
|
*/
|
|
@@ -3,7 +3,8 @@ import { ISelectionWithStyle } from '@univerjs/sheets';
|
|
|
3
3
|
import { FRange } from './f-range';
|
|
4
4
|
import { FWorksheet } from './f-worksheet';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Represents the active selection in the sheet.
|
|
7
|
+
*
|
|
7
8
|
* @example
|
|
8
9
|
* ```ts
|
|
9
10
|
* const fWorkbook = univerAPI.getActiveWorkbook()
|
|
@@ -12,6 +13,7 @@ import { FWorksheet } from './f-worksheet';
|
|
|
12
13
|
* const activeRange = fSelection.getActiveRange();
|
|
13
14
|
* console.log(activeRange);
|
|
14
15
|
* ```
|
|
16
|
+
* @hideconstructor
|
|
15
17
|
*/
|
|
16
18
|
export declare class FSelection {
|
|
17
19
|
private readonly _workbook;
|