@univerjs/sheets 0.6.4 → 0.6.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.
@@ -752,8 +752,9 @@ export declare class FRange extends FBaseInitialable {
752
752
  * const fRange = fWorksheet.getRange('A1:B2');
753
753
  * console.log(fRange.getValue(true));
754
754
  *
755
- * // set the first cell value to 123
756
- * const richText = univerAPI.newRichText({ body: { dataStream: 'Hello World\r\n' } })
755
+ * // Set A1 cell value to rich text
756
+ * const richText = univerAPI.newRichText()
757
+ * .insertText('Hello World')
757
758
  * .setStyle(0, 1, { bl: 1, cl: { rgb: '#c81e1e' } })
758
759
  * .setStyle(6, 7, { bl: 1, cl: { rgb: '#c81e1e' } });
759
760
  * fRange.setRichTextValueForCell(richText);
@@ -772,8 +773,9 @@ export declare class FRange extends FBaseInitialable {
772
773
  * const fRange = fWorksheet.getRange('A1:B2');
773
774
  * console.log(fRange.getValue(true));
774
775
  *
775
- * // set the first cell value to 123
776
- * const richText = univerAPI.newRichText({ body: { dataStream: 'Hello World\r\n' } })
776
+ * // Set A1:B2 cell value to rich text
777
+ * const richText = univerAPI.newRichText()
778
+ * .insertText('Hello World')
777
779
  * .setStyle(0, 1, { bl: 1, cl: { rgb: '#c81e1e' } })
778
780
  * .setStyle(6, 7, { bl: 1, cl: { rgb: '#c81e1e' } });
779
781
  * fRange.setRichTextValues([
@@ -1109,14 +1111,14 @@ export declare class FRange extends FBaseInitialable {
1109
1111
  * const fWorksheet = fWorkbook.getActiveSheet();
1110
1112
  *
1111
1113
  * // A1:A3 has following values:
1112
- * // A | B | C
1113
- * // 1,2,3 | |
1114
- * // 4,,5,6 | |
1114
+ * // A |
1115
+ * // 1,2,3 |
1116
+ * // 4,,5,6 |
1115
1117
  * const fRange = fWorksheet.getRange('A1:A3');
1116
1118
  * fRange.setValues([
1117
- * ['A', 'B', 'C'],
1118
- * ['1,2,3', null, null],
1119
- * ['4,,5,6', null, null]
1119
+ * ['A'],
1120
+ * ['1,2,3'],
1121
+ * ['4,,5,6']
1120
1122
  * ]);
1121
1123
  *
1122
1124
  * // After calling splitTextToColumns(true), the range will be:
@@ -1143,14 +1145,14 @@ export declare class FRange extends FBaseInitialable {
1143
1145
  * const fWorksheet = fWorkbook.getActiveSheet();
1144
1146
  *
1145
1147
  * // A1:A3 has following values:
1146
- * // A | B | C
1147
- * // 1;;2;3 | |
1148
- * // 1;,2;3 | |
1148
+ * // A |
1149
+ * // 1;;2;3 |
1150
+ * // 1;,2;3 |
1149
1151
  * const fRange = fWorksheet.getRange('A1:A3');
1150
1152
  * fRange.setValues([
1151
- * ['A', 'B', 'C'],
1152
- * ['1;;2;3', null, null],
1153
- * ['1;,2;3', null, null]
1153
+ * ['A'],
1154
+ * ['1;;2;3'],
1155
+ * ['1;,2;3']
1154
1156
  * ]);
1155
1157
  *
1156
1158
  * // After calling splitTextToColumns(false, univerAPI.Enum.SplitDelimiterType.Semicolon|univerAPI.Enum.SplitDelimiterType.Comma), the range will be:
@@ -93,8 +93,7 @@ export declare class FSelection {
93
93
  * const cell = fWorksheet.getRange('B11');
94
94
  *
95
95
  * let fSelection = fWorksheet.getSelection();
96
- * fSelection.updatePrimaryCell(cell);
97
- * fSelection = fWorksheet.getSelection();
96
+ * fSelection = fSelection.updatePrimaryCell(cell);
98
97
  *
99
98
  * const currentCell = fSelection.getCurrentCell();
100
99
  * const { actualRow, actualColumn } = currentCell;
@@ -161,7 +161,7 @@ export declare class FWorkbook extends FBaseInitialable {
161
161
  getSheetByName(name: string): FWorksheet | null;
162
162
  /**
163
163
  * Sets the given worksheet to be the active worksheet in the workbook.
164
- * @param {FWorksheet | string} sheet The worksheet to set as the active worksheet.
164
+ * @param {FWorksheet | string} sheet The instance or id of the worksheet to set as active.
165
165
  * @returns {FWorksheet} The active worksheet
166
166
  * @example
167
167
  * ```ts
@@ -191,7 +191,7 @@ export declare class FWorkbook extends FBaseInitialable {
191
191
  insertSheet(sheetName?: string): FWorksheet;
192
192
  /**
193
193
  * Deletes the specified worksheet.
194
- * @param {FWorksheet | string} sheet The worksheet to delete.
194
+ * @param {FWorksheet | string} sheet The instance or id of the worksheet to delete.
195
195
  * @returns {boolean} True if the worksheet was deleted, false otherwise.
196
196
  * @example
197
197
  * ```ts
@@ -199,6 +199,9 @@ export declare class FWorkbook extends FBaseInitialable {
199
199
  * const fWorkbook = univerAPI.getActiveWorkbook();
200
200
  * const sheet = fWorkbook.getSheets()[1];
201
201
  * fWorkbook.deleteSheet(sheet);
202
+ *
203
+ * // The code below deletes the specified worksheet by id
204
+ * // fWorkbook.deleteSheet(sheet.getSheetId());
202
205
  * ```
203
206
  */
204
207
  deleteSheet(sheet: FWorksheet | string): boolean;
@@ -551,7 +554,6 @@ export declare class FWorkbook extends FBaseInitialable {
551
554
  * @returns {void}
552
555
  * @example
553
556
  * ```ts
554
- * // import {RangeThemeStyle} from '@univerjs/sheets';
555
557
  * const fWorkbook = univerAPI.getActiveWorkbook();
556
558
  * const rangeThemeStyle = fWorkbook.createRangeThemeStyle('MyTheme', {
557
559
  * secondRowStyle: {
@@ -58,7 +58,7 @@ export declare class SheetRangeThemeModel extends Disposable {
58
58
  getCellStyle(unitId: string, subUnitId: string, row: number, col: number): Nullable<IRangeThemeStyleItem>;
59
59
  private _registerIntercept;
60
60
  toJson(unitId: string): string;
61
- fromJSON(json: ISheetRangeThemeModelJSON): void;
61
+ fromJSON(unitId: string, json: ISheetRangeThemeModelJSON): void;
62
62
  deleteUnitId(unitId: string): void;
63
63
  private _initSnapshot;
64
64
  dispose(): void;