@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.
package/lib/es/facade.js CHANGED
@@ -1754,8 +1754,9 @@ let m = class extends le {
1754
1754
  * const fRange = fWorksheet.getRange('A1:B2');
1755
1755
  * console.log(fRange.getValue(true));
1756
1756
  *
1757
- * // set the first cell value to 123
1758
- * const richText = univerAPI.newRichText({ body: { dataStream: 'Hello World\r\n' } })
1757
+ * // Set A1 cell value to rich text
1758
+ * const richText = univerAPI.newRichText()
1759
+ * .insertText('Hello World')
1759
1760
  * .setStyle(0, 1, { bl: 1, cl: { rgb: '#c81e1e' } })
1760
1761
  * .setStyle(6, 7, { bl: 1, cl: { rgb: '#c81e1e' } });
1761
1762
  * fRange.setRichTextValueForCell(richText);
@@ -1787,8 +1788,9 @@ let m = class extends le {
1787
1788
  * const fRange = fWorksheet.getRange('A1:B2');
1788
1789
  * console.log(fRange.getValue(true));
1789
1790
  *
1790
- * // set the first cell value to 123
1791
- * const richText = univerAPI.newRichText({ body: { dataStream: 'Hello World\r\n' } })
1791
+ * // Set A1:B2 cell value to rich text
1792
+ * const richText = univerAPI.newRichText()
1793
+ * .insertText('Hello World')
1792
1794
  * .setStyle(0, 1, { bl: 1, cl: { rgb: '#c81e1e' } })
1793
1795
  * .setStyle(6, 7, { bl: 1, cl: { rgb: '#c81e1e' } });
1794
1796
  * fRange.setRichTextValues([
@@ -2334,14 +2336,14 @@ let m = class extends le {
2334
2336
  * const fWorksheet = fWorkbook.getActiveSheet();
2335
2337
  *
2336
2338
  * // A1:A3 has following values:
2337
- * // A | B | C
2338
- * // 1#2#3 | |
2339
- * // 4##5#6 | |
2339
+ * // A |
2340
+ * // 1#2#3 |
2341
+ * // 4##5#6 |
2340
2342
  * const fRange = fWorksheet.getRange('A1:A3');
2341
2343
  * fRange.setValues([
2342
- * ['A', 'B', 'C'],
2343
- * ['1#2#3', null, null],
2344
- * ['4##5#6', null, null]
2344
+ * ['A'],
2345
+ * ['1#2#3'],
2346
+ * ['4##5#6']
2345
2347
  * ]);
2346
2348
  *
2347
2349
  * // After calling splitTextToColumns(false, univerAPI.Enum.SplitDelimiterType.Custom, '#'), the range will be:
@@ -2873,8 +2875,7 @@ let Y = class {
2873
2875
  * const cell = fWorksheet.getRange('B11');
2874
2876
  *
2875
2877
  * let fSelection = fWorksheet.getSelection();
2876
- * fSelection.updatePrimaryCell(cell);
2877
- * fSelection = fWorksheet.getSelection();
2878
+ * fSelection = fSelection.updatePrimaryCell(cell);
2878
2879
  *
2879
2880
  * const currentCell = fSelection.getCurrentCell();
2880
2881
  * const { actualRow, actualColumn } = currentCell;
@@ -5084,7 +5085,7 @@ let S = class extends le {
5084
5085
  }
5085
5086
  /**
5086
5087
  * Sets the given worksheet to be the active worksheet in the workbook.
5087
- * @param {FWorksheet | string} sheet The worksheet to set as the active worksheet.
5088
+ * @param {FWorksheet | string} sheet The instance or id of the worksheet to set as active.
5088
5089
  * @returns {FWorksheet} The active worksheet
5089
5090
  * @example
5090
5091
  * ```ts
@@ -5130,7 +5131,7 @@ let S = class extends le {
5130
5131
  }
5131
5132
  /**
5132
5133
  * Deletes the specified worksheet.
5133
- * @param {FWorksheet | string} sheet The worksheet to delete.
5134
+ * @param {FWorksheet | string} sheet The instance or id of the worksheet to delete.
5134
5135
  * @returns {boolean} True if the worksheet was deleted, false otherwise.
5135
5136
  * @example
5136
5137
  * ```ts
@@ -5138,6 +5139,9 @@ let S = class extends le {
5138
5139
  * const fWorkbook = univerAPI.getActiveWorkbook();
5139
5140
  * const sheet = fWorkbook.getSheets()[1];
5140
5141
  * fWorkbook.deleteSheet(sheet);
5142
+ *
5143
+ * // The code below deletes the specified worksheet by id
5144
+ * // fWorkbook.deleteSheet(sheet.getSheetId());
5141
5145
  * ```
5142
5146
  */
5143
5147
  deleteSheet(e) {
@@ -5595,7 +5599,6 @@ let S = class extends le {
5595
5599
  * @returns {void}
5596
5600
  * @example
5597
5601
  * ```ts
5598
- * // import {RangeThemeStyle} from '@univerjs/sheets';
5599
5602
  * const fWorkbook = univerAPI.getActiveWorkbook();
5600
5603
  * const rangeThemeStyle = fWorkbook.createRangeThemeStyle('MyTheme', {
5601
5604
  * secondRowStyle: {