@univerjs/sheets 0.5.4 → 0.5.5-experimental.20250122-3362a4a

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 (52) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +3 -3
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/fa-IR.js +1 -1
  5. package/lib/cjs/locale/fr-FR.js +1 -1
  6. package/lib/cjs/locale/ru-RU.js +1 -1
  7. package/lib/cjs/locale/vi-VN.js +1 -1
  8. package/lib/cjs/locale/zh-CN.js +1 -1
  9. package/lib/cjs/locale/zh-TW.js +1 -1
  10. package/lib/es/facade.js +2465 -1429
  11. package/lib/es/index.js +9099 -8683
  12. package/lib/es/locale/en-US.js +2 -2
  13. package/lib/es/locale/fa-IR.js +2 -2
  14. package/lib/es/locale/fr-FR.js +2 -2
  15. package/lib/es/locale/ru-RU.js +2 -2
  16. package/lib/es/locale/vi-VN.js +2 -2
  17. package/lib/es/locale/zh-CN.js +2 -2
  18. package/lib/es/locale/zh-TW.js +2 -2
  19. package/lib/types/basics/const/command-listener-const.d.ts +149 -13
  20. package/lib/types/commands/commands/remove-sheet.command.d.ts +1 -1
  21. package/lib/types/commands/commands/split-text-to-columns.command.d.ts +1 -1
  22. package/lib/types/commands/operations/selection.operation.d.ts +1 -0
  23. package/lib/types/commands/utils/selection-command-util.d.ts +1 -1
  24. package/lib/types/controllers/config.schema.d.ts +4 -0
  25. package/lib/types/facade/f-defined-name.d.ts +6 -0
  26. package/lib/types/facade/f-enum.d.ts +21 -0
  27. package/lib/types/facade/f-event.d.ts +470 -21
  28. package/lib/types/facade/f-permission.d.ts +3 -0
  29. package/lib/types/facade/f-range.d.ts +366 -51
  30. package/lib/types/facade/f-selection.d.ts +25 -0
  31. package/lib/types/facade/f-sheet-hooks.d.ts +3 -0
  32. package/lib/types/facade/f-univer.d.ts +33 -0
  33. package/lib/types/facade/f-workbook.d.ts +49 -56
  34. package/lib/types/facade/f-worksheet.d.ts +653 -208
  35. package/lib/types/facade/index.d.ts +2 -0
  36. package/lib/types/index.d.ts +2 -1
  37. package/lib/types/model/range-theme-util.d.ts +3 -3
  38. package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +1 -1
  39. package/lib/types/services/permission/range-permission/range-protection.service.d.ts +1 -1
  40. package/lib/types/services/selections/selection-data-model.d.ts +7 -7
  41. package/lib/types/services/selections/selection.service.d.ts +4 -0
  42. package/lib/umd/facade.js +1 -1
  43. package/lib/umd/index.js +3 -3
  44. package/lib/umd/locale/en-US.js +1 -1
  45. package/lib/umd/locale/fa-IR.js +1 -1
  46. package/lib/umd/locale/fr-FR.js +1 -1
  47. package/lib/umd/locale/ru-RU.js +1 -1
  48. package/lib/umd/locale/vi-VN.js +1 -1
  49. package/lib/umd/locale/zh-CN.js +1 -1
  50. package/lib/umd/locale/zh-TW.js +1 -1
  51. package/package.json +6 -6
  52. package/LICENSE +0 -176
@@ -1,10 +1,13 @@
1
- import { CellValue, CustomData, ICellData, IDocumentData, IObjectMatrixPrimitiveType, IRange, IStyleData, Nullable, Workbook, Worksheet, FBaseInitialable, ICommandService, Injector, RichTextValue, WrapStrategy } from '@univerjs/core';
1
+ import { BorderStyleTypes, BorderType, CellValue, CustomData, ICellData, IDocumentData, IObjectMatrixPrimitiveType, IRange, IStyleData, Nullable, Workbook, Worksheet, FBaseInitialable, ICommandService, Injector, RichTextValue, TextStyleValue, WrapStrategy } from '@univerjs/core';
2
2
  import { SplitDelimiterEnum } from '@univerjs/sheets';
3
3
  import { FHorizontalAlignment, FVerticalAlignment } from './utils';
4
4
  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
+ * @hideconstructor
10
+ */
8
11
  export declare class FRange extends FBaseInitialable {
9
12
  protected readonly _workbook: Workbook;
10
13
  protected readonly _worksheet: Worksheet;
@@ -15,70 +18,202 @@ export declare class FRange extends FBaseInitialable {
15
18
  constructor(_workbook: Workbook, _worksheet: Worksheet, _range: IRange, _injector: Injector, _commandService: ICommandService, _formulaDataModel: FormulaDataModel);
16
19
  /**
17
20
  * Get the unit ID of the current workbook
18
- * @returns The unit ID of the workbook
21
+ * @returns {string} The unit ID of the workbook
22
+ * @example
23
+ * ```ts
24
+ * univerAPI.getActiveWorkbook()
25
+ * .getActiveSheet()
26
+ * .getActiveRange()
27
+ * .getUnitId()
28
+ * ```
19
29
  */
20
30
  getUnitId(): string;
21
31
  /**
22
32
  * Gets the name of the worksheet
23
- * @returns The name of the worksheet
33
+ * @returns {string} The name of the worksheet
34
+ * @example
35
+ * ```ts
36
+ * univerAPI.getActiveWorkbook()
37
+ * .getActiveSheet()
38
+ * .getActiveRange()
39
+ * .getSheetName()
40
+ * ```
24
41
  */
25
42
  getSheetName(): string;
26
43
  /**
27
44
  * Gets the ID of the worksheet
28
- * @returns The ID of the worksheet
45
+ * @returns {string} The ID of the worksheet
46
+ * @example
47
+ * ```ts
48
+ * univerAPI.getActiveWorkbook()
49
+ * .getActiveSheet()
50
+ * .getActiveRange()
51
+ * .getSheetId()
52
+ * ```
29
53
  */
30
54
  getSheetId(): string;
31
55
  /**
32
56
  * Gets the area where the statement is applied
33
- * @returns The area where the statement is applied
57
+ * @returns {IRange} The area where the statement is applied
58
+ * @example
59
+ * ```ts
60
+ * univerAPI.getActiveWorkbook()
61
+ * .getActiveSheet()
62
+ * .getActiveRange()
63
+ * .getRange()
64
+ * ```
34
65
  */
35
66
  getRange(): IRange;
36
67
  /**
37
68
  * Gets the starting row number of the applied area
38
- * @returns The starting row number of the area
69
+ * @returns {number} The starting row number of the area
70
+ * @example
71
+ * ```ts
72
+ * univerAPI.getActiveWorkbook()
73
+ * .getActiveSheet()
74
+ * .getActiveRange()
75
+ * .getRow()
76
+ * ```
39
77
  */
40
78
  getRow(): number;
41
79
  /**
42
80
  * Gets the starting column number of the applied area
43
- * @returns The starting column number of the area
81
+ * @returns {number} The starting column number of the area
82
+ * @example
83
+ * ```ts
84
+ * univerAPI.getActiveWorkbook()
85
+ * .getActiveSheet()
86
+ * .getActiveRange()
87
+ * .getColumn()
88
+ * ```
44
89
  */
45
90
  getColumn(): number;
46
91
  /**
47
92
  * Gets the width of the applied area
48
- * @returns The width of the area
93
+ * @returns {number} The width of the area
94
+ * @example
95
+ * ```ts
96
+ * univerAPI.getActiveWorkbook()
97
+ * .getActiveSheet()
98
+ * .getActiveRange()
99
+ * .getWidth()
100
+ * ```
49
101
  */
50
102
  getWidth(): number;
51
103
  /**
52
104
  * Gets the height of the applied area
53
- * @returns The height of the area
105
+ * @returns {number} The height of the area
106
+ * @example
107
+ * ```ts
108
+ * univerAPI.getActiveWorkbook()
109
+ * .getActiveSheet()
110
+ * .getActiveRange()
111
+ * .getHeight()
112
+ * ```
54
113
  */
55
114
  getHeight(): number;
56
115
  /**
57
116
  * Return range whether this range is merged
58
- * @returns if true is merged
117
+ * @returns {boolean} if true is merged
118
+ * @example
119
+ * ```ts
120
+ * univerAPI.getActiveWorkbook()
121
+ * .getActiveSheet()
122
+ * .getActiveRange()
123
+ * .isMerged()
124
+ * ```
59
125
  */
60
126
  isMerged(): boolean;
61
127
  /**
62
128
  * Return first cell style data in this range
63
129
  * @returns {IStyleData | null} The cell style data
130
+ * @example
131
+ * ```ts
132
+ * univerAPI.getActiveWorkbook()
133
+ * .getActiveSheet()
134
+ * .getActiveRange()
135
+ * .getCellStyleData()
136
+ * ```
64
137
  */
65
138
  getCellStyleData(): IStyleData | null;
66
139
  /**
67
- * Returns the value of the cell at the start of this range.
68
- * @returns {CellValue | null} The value of the cell.
140
+ * Return first cell style in this range
141
+ * @returns {TextStyleValue | null} The cell style
142
+ * @example
143
+ * ```ts
144
+ * univerAPI.getActiveWorkbook()
145
+ * .getActiveSheet()
146
+ * .getActiveRange()
147
+ * .getCellStyle()
148
+ * ```
149
+ */
150
+ getCellStyle(): TextStyleValue | null;
151
+ /**
152
+ * Returns the cell styles for the cells in the range.
153
+ * @returns {Array<Array<TextStyleValue | null>>} A two-dimensional array of cell styles.
154
+ * @example
155
+ * ```ts
156
+ * univerAPI.getActiveWorkbook()
157
+ * .getActiveSheet()
158
+ * .getActiveRange()
159
+ * .getCellStyles()
160
+ * ```
161
+ */
162
+ getCellStyles(): Array<Array<TextStyleValue | null>>;
163
+ /**
164
+ * Return first cell value in this range
165
+ * @returns {CellValue | null} The cell value
166
+ * @example
167
+ * ```ts
168
+ * univerAPI.getActiveWorkbook()
169
+ * .getActiveSheet()
170
+ * .getActiveRange()
171
+ * .getValue()
172
+ * ```
69
173
  */
70
174
  getValue(): CellValue | null;
71
175
  /**
72
- * Returns the rectangular grid of values for this range.
73
- * Returns a two-dimensional array of values, indexed by row, then by column.
74
- * @returns {Nullable<CellValue>[][]} A two-dimensional array of values.
176
+ * Return first cell value in this range
177
+ * @param {boolean} includeRichText Should the returns of this func to include rich text
178
+ * @returns {CellValue | RichTextValue | null} The cell value
179
+ * @example
180
+ * ```ts
181
+ * univerAPI.getActiveWorkbook()
182
+ * .getActiveSheet()
183
+ * .getActiveRange()
184
+ * .getValue(true)
185
+ * ```
186
+ */
187
+ getValue(includeRichText: true): Nullable<CellValue | RichTextValue>;
188
+ /**
189
+ * Returns the cell values for the cells in the range.
190
+ * @returns {Nullable<CellValue>[][]} A two-dimensional array of cell values.
191
+ * @example
192
+ * ```ts
193
+ * // Get plain values
194
+ * const values = range.getValues();
195
+ * ```
75
196
  */
76
197
  getValues(): Nullable<CellValue>[][];
198
+ /**
199
+ * Returns the cell values for the cells in the range.
200
+ * @param {boolean} includeRichText Should the returns of this func to include rich text
201
+ * @returns {Nullable<RichTextValue | CellValue>[][]} A two-dimensional array of cell values.
202
+ * @example
203
+ * ```ts
204
+ * // Get values with rich text if available
205
+ * const richTextValues = univerAPI.getActiveWorkbook()
206
+ * .getActiveSheet()
207
+ * .getActiveRange()
208
+ * .getValues(true)
209
+ * ```
210
+ */
211
+ getValues(includeRichText: true): (Nullable<RichTextValue | CellValue>)[][];
77
212
  /**
78
213
  * Return first cell model data in this range
79
214
  * @returns {ICellData | null} The cell model data
80
215
  * @example
81
- * ```
216
+ * ```ts
82
217
  * univerAPI.getActiveWorkbook()
83
218
  * .getActiveSheet()
84
219
  * .getActiveRange()
@@ -87,10 +222,10 @@ export declare class FRange extends FBaseInitialable {
87
222
  */
88
223
  getCellData(): ICellData | null;
89
224
  /**
90
- * Returns the cell data for the cells in the range.
225
+ * Alias for getCellDataGrid.
91
226
  * @returns {Nullable<ICellData>[][]} A two-dimensional array of cell data.
92
227
  * @example
93
- * ```
228
+ * ```ts
94
229
  * univerAPI.getActiveWorkbook()
95
230
  * .getActiveSheet()
96
231
  * .getActiveRange()
@@ -99,50 +234,64 @@ export declare class FRange extends FBaseInitialable {
99
234
  */
100
235
  getCellDatas(): Nullable<ICellData>[][];
101
236
  /**
102
- * @deprecated use `getCellDatas` instead.
237
+ * Returns the cell data for the cells in the range.
238
+ * @returns {Nullable<ICellData>[][]} A two-dimensional array of cell data.
239
+ * @example
240
+ * ```ts
241
+ * univerAPI.getActiveWorkbook()
242
+ * .getActiveSheet()
243
+ * .getActiveRange()
244
+ * .getCellDataGrid()
245
+ * ```
103
246
  */
104
247
  getCellDataGrid(): Nullable<ICellData>[][];
105
248
  /**
106
249
  * Returns the rich text value for the cell at the start of this range.
107
250
  * @returns {Nullable<RichTextValue>} The rich text value
251
+ * @internal
252
+ * @beta
108
253
  * @example
109
- * ```
254
+ * ```ts
110
255
  * univerAPI.getActiveWorkbook()
111
256
  * .getActiveSheet()
112
257
  * .getActiveRange()
113
258
  * .getRichTextValue()
114
259
  * ```
115
260
  */
116
- getRichTextValue(): Nullable<RichTextValue>;
261
+ private getRichTextValue;
117
262
  /**
118
263
  * Returns the rich text value for the cells in the range.
119
264
  * @returns {Nullable<RichTextValue>[][]} A two-dimensional array of RichTextValue objects.
265
+ * @internal
266
+ * @beta
120
267
  * @example
121
- * ```
268
+ * ```ts
122
269
  * univerAPI.getActiveWorkbook()
123
270
  * .getActiveSheet()
124
271
  * .getActiveRange()
125
272
  * .getRichTextValues()
126
273
  * ```
127
274
  */
128
- getRichTextValues(): Nullable<RichTextValue>[][];
275
+ private getRichTextValues;
129
276
  /**
130
277
  * Returns the value and rich text value for the cell at the start of this range.
131
278
  * @returns {Nullable<CellValue | RichTextValue>} The value and rich text value
279
+ * @internal
280
+ * @beta
132
281
  * @example
133
- * ```
282
+ * ```ts
134
283
  * univerAPI.getActiveWorkbook()
135
284
  * .getActiveSheet()
136
285
  * .getActiveRange()
137
286
  * .getValueAndRichTextValue()
138
287
  * ```
139
288
  */
140
- getValueAndRichTextValue(): Nullable<CellValue | RichTextValue>;
289
+ private getValueAndRichTextValue;
141
290
  /**
142
291
  * Returns the value and rich text value for the cells in the range.
143
292
  * @returns {Nullable<CellValue | RichTextValue>[][]} A two-dimensional array of value and rich text value
144
293
  * @example
145
- * ```
294
+ * ```ts
146
295
  * univerAPI.getActiveWorkbook()
147
296
  * .getActiveSheet()
148
297
  * .getActiveRange()
@@ -162,9 +311,53 @@ export declare class FRange extends FBaseInitialable {
162
311
  * ```
163
312
  */
164
313
  getFormulas(): string[][];
314
+ /**
315
+ * Returns true if the cell wrap is enabled
316
+ * @returns {boolean} True if the cell wrap is enabled
317
+ * @example
318
+ * ```ts
319
+ * univerAPI.getActiveWorkbook()
320
+ * .getActiveSheet()
321
+ * .getActiveRange()
322
+ * .getWrap()
323
+ * ```
324
+ */
165
325
  getWrap(): boolean;
326
+ /**
327
+ * Returns the text wrapping strategy for the top left cell of the range.
328
+ * @returns {WrapStrategy} The text wrapping strategy
329
+ * @example
330
+ * ```ts
331
+ * univerAPI.getActiveWorkbook()
332
+ * .getActiveSheet()
333
+ * .getActiveRange()
334
+ * .getWrapStrategy()
335
+ * ```
336
+ */
166
337
  getWrapStrategy(): WrapStrategy;
338
+ /**
339
+ * Returns the horizontal alignment for the top left cell of the range.
340
+ * @returns {string} The horizontal alignment
341
+ * @example
342
+ * ```ts
343
+ * univerAPI.getActiveWorkbook()
344
+ * .getActiveSheet()
345
+ * .getActiveRange()
346
+ * .getHorizontalAlignment()
347
+ * ```
348
+ */
167
349
  getHorizontalAlignment(): string;
350
+ /**
351
+ * Returns the vertical alignment for the top left cell of the range.
352
+ * @returns {string} The vertical alignment
353
+ * @example
354
+ * ```ts
355
+ * univerAPI.getActiveWorkbook()
356
+ * .getActiveSheet()
357
+ * .getActiveRange()
358
+ * .getVerticalAlignment()
359
+ * ```
360
+ */
168
361
  getVerticalAlignment(): string;
169
362
  /**
170
363
  * Set custom meta data for first cell in current range.
@@ -215,10 +408,26 @@ export declare class FRange extends FBaseInitialable {
215
408
  */
216
409
  getCustomMetaDatas(): Nullable<CustomData>[][];
217
410
  /**
218
- * Set background color for current range.
219
- * @param color {string}
411
+ * Sets basic border properties for the current range.
412
+ * @param {BorderType} type The type of border to apply
413
+ * @param {BorderStyleTypes} style The border style
414
+ * @param {string} [color] Optional border color in CSS notation
415
+ * @returns {FRange} This range, for chaining
220
416
  * @example
417
+ * ```ts
418
+ * univerAPI.getActiveWorkbook()
419
+ * .getActiveSheet()
420
+ * .getActiveRange()
421
+ * .setBorder(BorderType.ALL, BorderStyleType.THIN, '#ff0000');
221
422
  * ```
423
+ */
424
+ setBorder(type: BorderType, style: BorderStyleTypes, color?: string): FRange;
425
+ /**
426
+ * Set background color for current range.
427
+ * @param {string} color The background color
428
+ * @returns {FRange} This range, for chaining
429
+ * @example
430
+ * ```ts
222
431
  * univerAPI.getActiveWorkbook()
223
432
  * .getActiveSheet()
224
433
  * .getActiveRange()
@@ -228,21 +437,30 @@ export declare class FRange extends FBaseInitialable {
228
437
  setBackgroundColor(color: string): FRange;
229
438
  /**
230
439
  * Set background color for current range.
440
+ * @param {string} color The background color
441
+ * @returns {FRange} This range, for chaining
231
442
  * @example
232
443
  * ```typescript
233
444
  * univerAPI.getActiveWorkbook().getActiveSheet().getActiveRange().setBackground('red')
234
445
  * ```
235
- * @param color {string}
236
446
  */
237
447
  setBackground(color: string): FRange;
238
448
  /**
239
449
  * Set new value for current cell, first cell in this range.
240
450
  * @param {CellValue | ICellData} value The value can be a number, string, boolean, or standard cell format. If it begins with `=`, it is interpreted as a formula. The value is tiled to all cells in the range.
451
+ * @returns {FRange} This range, for chaining
452
+ * ```ts
453
+ * univerAPI.getActiveWorkbook()
454
+ * .getActiveSheet()
455
+ * .getActiveRange()
456
+ * .setValue(1);
457
+ * ```
241
458
  */
242
459
  setValue(value: CellValue | ICellData): FRange;
243
460
  /**
244
461
  * Set new value for current cell, first cell in this range.
245
462
  * @param {CellValue | ICellData} value The value can be a number, string, boolean, or standard cell format. If it begins with `=`, it is interpreted as a formula. The value is tiled to all cells in the range.
463
+ * @returns {FRange} This range, for chaining
246
464
  * ```ts
247
465
  * univerAPI.getActiveWorkbook()
248
466
  * .getActiveSheet()
@@ -281,73 +499,170 @@ export declare class FRange extends FBaseInitialable {
281
499
  /**
282
500
  * Set the cell wrap of the given range.
283
501
  * Cells with wrap enabled (the default) resize to display their full content. Cells with wrap disabled display as much as possible in the cell without resizing or running to multiple lines.
284
- * @param isWrapEnabled
502
+ * @param {boolean} isWrapEnabled Whether to enable wrap
503
+ * @returns {FRange} this range, for chaining
504
+ * @example
505
+ * ```ts
506
+ * univerAPI.getActiveWorkbook()
507
+ * .getActiveSheet()
508
+ * .getActiveRange()
509
+ * .setWrap(true);
510
+ * ```
285
511
  */
286
512
  setWrap(isWrapEnabled: boolean): FRange;
287
513
  /**
288
514
  * Sets the text wrapping strategy for the cells in the range.
289
- * @param strategy
515
+ * @param {WrapStrategy} strategy The text wrapping strategy
516
+ * @returns {FRange} this range, for chaining
517
+ * @example
518
+ * ```ts
519
+ * univerAPI.getActiveWorkbook()
520
+ * .getActiveSheet()
521
+ * .getActiveRange()
522
+ * .setWrapStrategy(WrapStrategy.WRAP);
523
+ * ```
290
524
  */
291
525
  setWrapStrategy(strategy: WrapStrategy): FRange;
292
526
  /**
293
527
  * Set the vertical (top to bottom) alignment for the given range (top/middle/bottom).
294
- * @param alignment
528
+ * @param {"top" | "middle" | "bottom"} alignment The vertical alignment
529
+ * @returns {FRange} this range, for chaining
530
+ * @example
531
+ * ```ts
532
+ * univerAPI.getActiveWorkbook()
533
+ * .getActiveSheet()
534
+ * .getActiveRange()
535
+ * .setVerticalAlignment('top');
536
+ * ```
295
537
  */
296
538
  setVerticalAlignment(alignment: FVerticalAlignment): FRange;
297
539
  /**
298
540
  * Set the horizontal (left to right) alignment for the given range (left/center/right).
299
- * @param alignment
541
+ * @param {"left" | "center" | "normal"} alignment The horizontal alignment
542
+ * @returns {FRange} this range, for chaining
543
+ * @example
544
+ * ```ts
545
+ * univerAPI.getActiveWorkbook()
546
+ * .getActiveSheet()
547
+ * .getActiveRange()
548
+ * .setHorizontalAlignment('left');
549
+ * ```
300
550
  */
301
551
  setHorizontalAlignment(alignment: FHorizontalAlignment): FRange;
302
552
  /**
303
553
  * Sets a different value for each cell in the range. The value can be a two-dimensional array or a standard range matrix (must match the dimensions of this range), consisting of numbers, strings, Boolean values or Composed of standard cell formats. If a value begins with `=`, it is interpreted as a formula.
304
- * @param value
554
+ * @param {CellValue[][] | IObjectMatrixPrimitiveType<CellValue> | ICellData[][] | IObjectMatrixPrimitiveType<ICellData>} value The value can be a two-dimensional array or a standard range matrix (must match the dimensions of this range), consisting of numbers, strings, Boolean values or Composed of standard cell formats.
555
+ * @returns {FRange} This range, for chaining
556
+ * @example
557
+ * ```ts
558
+ * univerAPI.getActiveWorkbook()
559
+ * .getActiveSheet()
560
+ * .getActiveRange()
561
+ * .setValues([[1, 2], [3, 4]]);
562
+ * ```
305
563
  */
306
564
  setValues(value: CellValue[][] | IObjectMatrixPrimitiveType<CellValue> | ICellData[][] | IObjectMatrixPrimitiveType<ICellData>): FRange;
307
565
  /**
308
566
  * Sets the font weight for the given range (normal/bold),
309
- * @param fontWeight The font weight, either 'normal' or 'bold'; a null value resets the font weight.
567
+ * @param {FontWeight|null} fontWeight The font weight, either 'normal' or 'bold'; a null value resets the font weight.
568
+ * @returns {FRange} This range, for chaining
569
+ * @example
570
+ * ```ts
571
+ * univerAPI.getActiveWorkbook()
572
+ * .getActiveSheet()
573
+ * .getActiveRange()
574
+ * .setFontWeight('bold');
575
+ * ```
310
576
  */
311
577
  setFontWeight(fontWeight: FontWeight | null): this;
312
578
  /**
313
579
  * Sets the font style for the given range ('italic' or 'normal').
314
- * @param fontStyle The font style, either 'italic' or 'normal'; a null value resets the font style.
580
+ * @param {FontStyle|null} fontStyle The font style, either 'italic' or 'normal'; a null value resets the font style.
581
+ * @returns {FRange} This range, for chaining
582
+ * @example
583
+ * ```ts
584
+ * univerAPI.getActiveWorkbook()
585
+ * .getActiveSheet()
586
+ * .getActiveRange()
587
+ * .setFontStyle('italic');
588
+ * ```
315
589
  */
316
590
  setFontStyle(fontStyle: FontStyle | null): this;
317
591
  /**
318
592
  * Sets the font line style of the given range ('underline', 'line-through', or 'none').
319
- * @param fontLine The font line style, either 'underline', 'line-through', or 'none'; a null value resets the font line style.
593
+ * @param {FontLine|null} fontLine The font line style, either 'underline', 'line-through', or 'none'; a null value resets the font line style.
594
+ * @returns {FRange} This range, for chaining
595
+ * @example
596
+ * ```ts
597
+ * univerAPI.getActiveWorkbook()
598
+ * .getActiveSheet()
599
+ * .getActiveRange()
600
+ * .setFontLine('underline');
601
+ * ```
320
602
  */
321
603
  setFontLine(fontLine: FontLine | null): this;
322
604
  /**
323
605
  * Sets the font underline style of the given ITextDecoration
324
- * @param value
606
+ * @param {ITextDecoration|null} value The font underline style of the given ITextDecoration; a null value resets the font underline style
607
+ * @returns {void}
608
+ * @example
609
+ * ```ts
610
+ * univerAPI.getActiveWorkbook()
611
+ * .getActiveSheet()
612
+ * .getActiveRange()
613
+ * .setFontLine('underline');
614
+ * ```
325
615
  */
326
616
  private _setFontUnderline;
327
617
  /**
328
618
  * Sets the font strikethrough style of the given ITextDecoration
329
- * @param value
619
+ * @param {ITextDecoration|null} value The font strikethrough style of the given ITextDecoration; a null value resets the font strikethrough style
620
+ * @returns {void}
330
621
  */
331
622
  private _setFontStrikethrough;
332
623
  /**
333
624
  * Sets the font family, such as "Arial" or "Helvetica".
334
- * @param fontFamily The font family to set; a null value resets the font family.
625
+ * @param {string|null} fontFamily The font family to set; a null value resets the font family.
626
+ * @returns {FRange} This range, for chaining
627
+ * @example
628
+ * ```ts
629
+ * univerAPI.getActiveWorkbook()
630
+ * .getActiveSheet()
631
+ * .getActiveRange()
632
+ * .setFontFamily('Arial');
633
+ * ```
335
634
  */
336
635
  setFontFamily(fontFamily: string | null): this;
337
636
  /**
338
637
  * Sets the font size, with the size being the point size to use.
339
- * @param size A font size in point size. A null value resets the font size.
638
+ * @param {number|null} size A font size in point size. A null value resets the font size.
639
+ * @returns {FRange} This range, for chaining
640
+ * @example
641
+ * ```ts
642
+ * univerAPI.getActiveWorkbook()
643
+ * .getActiveSheet()
644
+ * .getActiveRange()
645
+ * .setFontSize(12);
646
+ * ```
340
647
  */
341
648
  setFontSize(size: number | null): this;
342
649
  /**
343
650
  * Sets the font color in CSS notation (such as '#ffffff' or 'white').
344
- * @param color The font color in CSS notation (such as '#ffffff' or 'white'); a null value resets the color.
651
+ * @param {string|null} color The font color in CSS notation (such as '#ffffff' or 'white'); a null value resets the color.
652
+ * @returns {FRange} This range, for chaining
653
+ * @example
654
+ * ```ts
655
+ * univerAPI.getActiveWorkbook()
656
+ * .getActiveSheet()
657
+ * .getActiveRange()
658
+ * .setFontColor('#ff0000');
659
+ * ```
345
660
  */
346
661
  setFontColor(color: string | null): this;
347
662
  /**
348
663
  * Merge cells in a range into one merged cell
349
- * @param [defaultMerge] - If true, only the value in the upper left cell is retained.
350
- * @returns This range, for chaining
664
+ * @param {boolean} [defaultMerge] - If true, only the value in the upper left cell is retained.
665
+ * @returns {FRange} This range, for chaining
351
666
  * @example
352
667
  * ```ts
353
668
  * const workbook = univerAPI.getActiveWorkbook();
@@ -361,8 +676,8 @@ export declare class FRange extends FBaseInitialable {
361
676
  merge(defaultMerge?: boolean): FRange;
362
677
  /**
363
678
  * Merges cells in a range horizontally.
364
- * @param [defaultMerge] - If true, only the value in the upper left cell is retained.
365
- * @returns This range, for chaining
679
+ * @param {boolean} [defaultMerge] - If true, only the value in the upper left cell is retained.
680
+ * @returns {FRange} This range, for chaining
366
681
  * @example
367
682
  * ```ts
368
683
  * const workbook = univerAPI.getActiveWorkbook();
@@ -376,8 +691,8 @@ export declare class FRange extends FBaseInitialable {
376
691
  mergeAcross(defaultMerge?: boolean): FRange;
377
692
  /**
378
693
  * Merges cells in a range vertically.
379
- * @param [defaultMerge] - If true, only the value in the upper left cell is retained.
380
- * @returns This range, for chaining
694
+ * @param {boolean} [defaultMerge] - If true, only the value in the upper left cell is retained.
695
+ * @returns {FRange} This range, for chaining
381
696
  * @example
382
697
  * ```ts
383
698
  * const workbook = univerAPI.getActiveWorkbook();
@@ -406,7 +721,7 @@ export declare class FRange extends FBaseInitialable {
406
721
  isPartOfMerge(): boolean;
407
722
  /**
408
723
  * Break all horizontally- or vertically-merged cells contained within the range list into individual cells again.
409
- * @returns This range, for chaining
724
+ * @returns {FRange} This range, for chaining
410
725
  * @example
411
726
  * ```ts
412
727
  * const workbook = univerAPI.getActiveWorkbook();
@@ -424,7 +739,7 @@ export declare class FRange extends FBaseInitialable {
424
739
  breakApart(): FRange;
425
740
  /**
426
741
  * Iterate cells in this range. Merged cells will be respected.
427
- * @param callback the callback function to be called for each cell in the range
742
+ * @param {Function} callback the callback function to be called for each cell in the range
428
743
  * @param {number} callback.row the row number of the cell
429
744
  * @param {number} callback.col the column number of the cell
430
745
  * @param {ICellData} callback.cell the cell data
@@ -440,7 +755,7 @@ export declare class FRange extends FBaseInitialable {
440
755
  forEach(callback: (row: number, col: number, cell: ICellData) => void): void;
441
756
  /**
442
757
  * Returns a string description of the range, in A1 notation.
443
- * @param withSheet
758
+ * @param {boolean} [withSheet] - If true, the sheet name is included in the A1 notation.
444
759
  * @returns {string} The A1 notation of the range.
445
760
  * ```ts
446
761
  * const fWorkbook = univerAPI.getActiveWorkbook();