logisheets 1.7.1 → 1.9.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/README.md +59 -8
- package/dist/src/api/workbook.d.ts +14 -1
- package/dist/src/api/workbook.js +34 -0
- package/dist/src/api/worksheet.d.ts +8 -1
- package/dist/src/api/worksheet.js +9 -0
- package/dist/src/bindings/block_sort_order.d.ts +4 -0
- package/dist/src/bindings/block_sort_order.js +2 -0
- package/dist/src/bindings/chart_info.d.ts +20 -0
- package/dist/src/bindings/chart_info.js +2 -0
- package/dist/src/bindings/chart_series_info.d.ts +5 -0
- package/dist/src/bindings/chart_series_info.js +2 -0
- package/dist/src/bindings/create_chart.d.ts +63 -0
- package/dist/src/bindings/create_chart.js +103 -0
- package/dist/src/bindings/create_chart_series.d.ts +14 -0
- package/dist/src/bindings/create_chart_series.js +21 -0
- package/dist/src/bindings/delete_chart.d.ts +14 -0
- package/dist/src/bindings/delete_chart.js +23 -0
- package/dist/src/bindings/edit_payload.d.ts +16 -0
- package/dist/src/bindings/index.d.ts +10 -0
- package/dist/src/bindings/index.js +10 -0
- package/dist/src/bindings/move_chart.d.ts +46 -0
- package/dist/src/bindings/move_chart.js +79 -0
- package/dist/src/bindings/rpc_get_block_sort_order_params.d.ts +6 -0
- package/dist/src/bindings/rpc_get_block_sort_order_params.js +2 -0
- package/dist/src/bindings/rpc_get_charts_params.d.ts +3 -0
- package/dist/src/bindings/rpc_get_charts_params.js +2 -0
- package/dist/src/bindings/rpc_workbook_methods.d.ts +6 -0
- package/dist/src/bindings/update_chart.d.ts +22 -0
- package/dist/src/bindings/update_chart.js +33 -0
- package/dist/wasm/logisheets_wasm_server.d.ts +12 -0
- package/dist/wasm/logisheets_wasm_server.js +83 -27
- package/dist/wasm/logisheets_wasm_server_bg.wasm +0 -0
- package/dist/wasm/logisheets_wasm_server_bg.wasm.d.ts +5 -3
- package/dist/wasm/package.json +1 -1
- package/package.json +1 -1
- package/wasm/logisheets_wasm_server.d.ts +12 -0
- package/wasm/logisheets_wasm_server.js +83 -27
- package/wasm/logisheets_wasm_server_bg.wasm +0 -0
- package/wasm/logisheets_wasm_server_bg.wasm.d.ts +5 -3
- package/wasm/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,66 @@
|
|
|
1
|
-
#
|
|
1
|
+
# logisheets
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Node.js bindings for **LogiSheets** — a spreadsheet engine written in Rust and
|
|
4
|
+
compiled to WebAssembly. It reads, manipulates, and writes real `.xlsx` files
|
|
5
|
+
(formulas, styles, and structure preserved) with no browser required.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Same workbook API as [`logisheets-web`](https://www.npmjs.com/package/logisheets-web),
|
|
8
|
+
targeting Node. For a higher-level headless runtime that manages many workbooks
|
|
9
|
+
and adds RPC / crafts / file-watching, see
|
|
10
|
+
[`logisheets-runtime`](https://www.npmjs.com/package/logisheets-runtime).
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
> **This package targets Node.** For the browser, use
|
|
13
|
+
> [`logisheets-web`](https://www.npmjs.com/package/logisheets-web).
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
## Installation
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
```bash
|
|
18
|
+
npm install logisheets
|
|
19
|
+
```
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
## Usage
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
```ts
|
|
24
|
+
import {readFileSync, writeFileSync} from 'node:fs'
|
|
25
|
+
import {Workbook, isErrorMessage} from 'logisheets'
|
|
26
|
+
|
|
27
|
+
// Load a workbook from an .xlsx file on disk.
|
|
28
|
+
const wb = new Workbook()
|
|
29
|
+
const buf = readFileSync('book.xlsx')
|
|
30
|
+
const code = wb.load(new Uint8Array(buf), 'book.xlsx') // 0 === success
|
|
31
|
+
|
|
32
|
+
// Read a cell.
|
|
33
|
+
const ws = wb.getWorksheet(0)
|
|
34
|
+
const cell = ws.getCellInfo(0, 0) // A1
|
|
35
|
+
if (!isErrorMessage(cell)) {
|
|
36
|
+
console.log(cell.value, cell.formula)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Edit via an (undoable) transaction.
|
|
40
|
+
wb.execTransaction({
|
|
41
|
+
payloads: [
|
|
42
|
+
{
|
|
43
|
+
type: 'cellInput',
|
|
44
|
+
value: {sheetIdx: 0, row: 0, col: 0, content: '=1+1'},
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
undoable: true,
|
|
48
|
+
temp: false,
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
// Save back to .xlsx.
|
|
52
|
+
const saved = wb.save('') // { data: Uint8Array, code }
|
|
53
|
+
writeFileSync('out.xlsx', saved.data)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`Workbook` also exposes blocks, comments, checkpoints, formula display units,
|
|
57
|
+
undo/redo, and more. `Worksheet` provides the read surface (cells, dimensions,
|
|
58
|
+
merged cells, charts, data validation, dependents, …).
|
|
59
|
+
|
|
60
|
+
## Documentation
|
|
61
|
+
|
|
62
|
+
Full guides and API reference: **[docs.logisheets.com](https://docs.logisheets.com/)**.
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT — part of the [LogiSheets](https://github.com/logisky/LogiSheets) project.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionEffect, BlockField, BlockInfo, FormulaDisplayInfo, ShadowCellInfo, SheetCellId, SheetInfo, SaveFileResult, AppData, CellInfo, CellCoordinateWithSheet, Transaction, GetBlockValuesParams, GetCellIdParams, GetShadowCellIdParams, GetShadowCellIdsParams, GetAvailableBlockIdParams, TempStatusDiff, BlockDataRow, CommentMention } from '../bindings';
|
|
1
|
+
import { ActionEffect, BlockField, BlockInfo, BlockSortOrder, GetBlockSortOrderParams, FormulaDisplayInfo, ShadowCellInfo, SheetCellId, SheetInfo, SaveFileResult, AppData, CellInfo, CellCoordinateWithSheet, Transaction, GetBlockValuesParams, GetCellIdParams, GetShadowCellIdParams, GetShadowCellIdsParams, GetAvailableBlockIdParams, TempStatusDiff, BlockDataRow, CommentMention } from '../bindings';
|
|
2
2
|
import { ColId, RowId } from '../types';
|
|
3
3
|
import { Worksheet } from './worksheet';
|
|
4
4
|
import { CustomFunc } from './calculator';
|
|
@@ -151,6 +151,19 @@ export declare class Workbook {
|
|
|
151
151
|
endRow: number;
|
|
152
152
|
endCol: number;
|
|
153
153
|
}): Result<ActionEffect>;
|
|
154
|
+
/**
|
|
155
|
+
* Read-only: compute the row/column order that sorts a block by one of
|
|
156
|
+
* its fields. The engine compares typed cell values (numbers numerically,
|
|
157
|
+
* text lexicographically, blanks last), so this is the reliable source of
|
|
158
|
+
* a sort order. Fails for random-schema blocks (no fields).
|
|
159
|
+
*/
|
|
160
|
+
getBlockSortOrder(params: GetBlockSortOrderParams): Result<BlockSortOrder>;
|
|
161
|
+
/**
|
|
162
|
+
* Sort a block's records by the named field and commit the reorder as a
|
|
163
|
+
* single (undoable) transaction. The engine computes the type-aware order;
|
|
164
|
+
* this just dispatches the resulting `reorderBlockLines` payload.
|
|
165
|
+
*/
|
|
166
|
+
sortBlock(sheetIdx: number, blockId: number, field: string, asc: boolean): Result<ActionEffect>;
|
|
154
167
|
getWorksheetById(id: number): Worksheet;
|
|
155
168
|
registryCustomFunc(customFunc: CustomFunc): void;
|
|
156
169
|
getShadowCellId(params: GetShadowCellIdParams): Result<number>;
|
package/dist/src/api/workbook.js
CHANGED
|
@@ -400,6 +400,40 @@ class Workbook {
|
|
|
400
400
|
temp: false,
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
|
+
/**
|
|
404
|
+
* Read-only: compute the row/column order that sorts a block by one of
|
|
405
|
+
* its fields. The engine compares typed cell values (numbers numerically,
|
|
406
|
+
* text lexicographically, blanks last), so this is the reliable source of
|
|
407
|
+
* a sort order. Fails for random-schema blocks (no fields).
|
|
408
|
+
*/
|
|
409
|
+
getBlockSortOrder(params) {
|
|
410
|
+
return rpc('getBlockSortOrder', params, this._id);
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Sort a block's records by the named field and commit the reorder as a
|
|
414
|
+
* single (undoable) transaction. The engine computes the type-aware order;
|
|
415
|
+
* this just dispatches the resulting `reorderBlockLines` payload.
|
|
416
|
+
*/
|
|
417
|
+
sortBlock(sheetIdx, blockId, field, asc) {
|
|
418
|
+
const order = this.getBlockSortOrder({ sheetIdx, blockId, field, asc });
|
|
419
|
+
if ((0, utils_1.isErrorMessage)(order))
|
|
420
|
+
return order;
|
|
421
|
+
return this.execTransaction({
|
|
422
|
+
payloads: [
|
|
423
|
+
{
|
|
424
|
+
type: 'reorderBlockLines',
|
|
425
|
+
value: {
|
|
426
|
+
sheetIdx,
|
|
427
|
+
blockId,
|
|
428
|
+
isRow: order.isRow,
|
|
429
|
+
newOrder: order.newOrder,
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
undoable: true,
|
|
434
|
+
temp: false,
|
|
435
|
+
});
|
|
436
|
+
}
|
|
403
437
|
getWorksheetById(id) {
|
|
404
438
|
return new worksheet_1.Worksheet(this._id, id, false);
|
|
405
439
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockInfo, CellPosition, ColInfo, DisplayWindow, DisplayWindowWithStartPoint, RowInfo, Style, Value, CellInfo, SheetDimension, MergeCell, AppendixWithCell, ReproducibleCell, SheetCoordinate, CellInput, Comment, CellImageInfo, DependentCell, CellRefRange, LinkInfo } from '../bindings';
|
|
1
|
+
import { BlockInfo, CellPosition, ColInfo, DisplayWindow, DisplayWindowWithStartPoint, RowInfo, Style, Value, CellInfo, SheetDimension, MergeCell, AppendixWithCell, ReproducibleCell, SheetCoordinate, CellInput, Comment, CellImageInfo, ChartInfo, DependentCell, CellRefRange, LinkInfo } from '../bindings';
|
|
2
2
|
import { Cell } from './cell';
|
|
3
3
|
import { Result } from './utils';
|
|
4
4
|
export declare class Worksheet {
|
|
@@ -84,6 +84,13 @@ export declare class Worksheet {
|
|
|
84
84
|
* transaction API (`SetCellImage` / `DeleteCellImage`).
|
|
85
85
|
*/
|
|
86
86
|
getCellImages(): Result<CellImageInfo[]>;
|
|
87
|
+
/**
|
|
88
|
+
* All charts anchored on this sheet. Each `ChartInfo` carries the from/to
|
|
89
|
+
* anchor cells (+ EMU offsets), the chart type, series with cached values,
|
|
90
|
+
* and legend/axis metadata. The renderer positions the chart from the
|
|
91
|
+
* anchor and re-reads live values from the source ranges.
|
|
92
|
+
*/
|
|
93
|
+
getCharts(): Result<ChartInfo[]>;
|
|
87
94
|
getFullyCoveredBlocks(rowIdx: number, colIdx: number, rowCnt: number, colCnt: number): Result<BlockInfo[]>;
|
|
88
95
|
private _id;
|
|
89
96
|
private _sheetId;
|
|
@@ -251,6 +251,15 @@ class Worksheet {
|
|
|
251
251
|
getCellImages() {
|
|
252
252
|
return rpc('getCellImages', { sheetIdx: this._sheetIdx }, this._id);
|
|
253
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* All charts anchored on this sheet. Each `ChartInfo` carries the from/to
|
|
256
|
+
* anchor cells (+ EMU offsets), the chart type, series with cached values,
|
|
257
|
+
* and legend/axis metadata. The renderer positions the chart from the
|
|
258
|
+
* anchor and re-reads live values from the source ranges.
|
|
259
|
+
*/
|
|
260
|
+
getCharts() {
|
|
261
|
+
return rpc('getCharts', { sheetIdx: this._sheetIdx }, this._id);
|
|
262
|
+
}
|
|
254
263
|
getFullyCoveredBlocks(rowIdx, colIdx, rowCnt, colCnt) {
|
|
255
264
|
return rpc('getFullyCoveredBlocks', {
|
|
256
265
|
sheetId: this._sheetId,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ChartSeriesInfo } from './chart_series_info';
|
|
2
|
+
export interface ChartInfo {
|
|
3
|
+
chartId: string;
|
|
4
|
+
fromRow: number;
|
|
5
|
+
fromCol: number;
|
|
6
|
+
fromColOff: number;
|
|
7
|
+
fromRowOff: number;
|
|
8
|
+
toRow: number;
|
|
9
|
+
toCol: number;
|
|
10
|
+
toColOff: number;
|
|
11
|
+
toRowOff: number;
|
|
12
|
+
chartType: string;
|
|
13
|
+
stacked: boolean;
|
|
14
|
+
title?: string;
|
|
15
|
+
legendPos?: string;
|
|
16
|
+
categories: readonly string[];
|
|
17
|
+
series: readonly ChartSeriesInfo[];
|
|
18
|
+
catAxisTitle?: string;
|
|
19
|
+
valAxisTitle?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CreateChartSeries } from './create_chart_series';
|
|
2
|
+
export interface CreateChart {
|
|
3
|
+
sheetIdx: number;
|
|
4
|
+
chartId: string;
|
|
5
|
+
chartType: string;
|
|
6
|
+
fromRow: number;
|
|
7
|
+
fromCol: number;
|
|
8
|
+
fromColOff: number;
|
|
9
|
+
fromRowOff: number;
|
|
10
|
+
toRow: number;
|
|
11
|
+
toCol: number;
|
|
12
|
+
toColOff: number;
|
|
13
|
+
toRowOff: number;
|
|
14
|
+
title?: string;
|
|
15
|
+
categoriesRef?: string;
|
|
16
|
+
series: readonly CreateChartSeries[];
|
|
17
|
+
}
|
|
18
|
+
export declare class CreateChartBuilder {
|
|
19
|
+
private _sheetIdx;
|
|
20
|
+
private _chartId;
|
|
21
|
+
private _chartType;
|
|
22
|
+
private _fromRow;
|
|
23
|
+
private _fromCol;
|
|
24
|
+
private _fromColOff;
|
|
25
|
+
private _fromRowOff;
|
|
26
|
+
private _toRow;
|
|
27
|
+
private _toCol;
|
|
28
|
+
private _toColOff;
|
|
29
|
+
private _toRowOff;
|
|
30
|
+
private _title?;
|
|
31
|
+
private _categoriesRef?;
|
|
32
|
+
private _series;
|
|
33
|
+
sheetIdx(value: number): this;
|
|
34
|
+
chartId(value: string): this;
|
|
35
|
+
chartType(value: string): this;
|
|
36
|
+
fromRow(value: number): this;
|
|
37
|
+
fromCol(value: number): this;
|
|
38
|
+
fromColOff(value: number): this;
|
|
39
|
+
fromRowOff(value: number): this;
|
|
40
|
+
toRow(value: number): this;
|
|
41
|
+
toCol(value: number): this;
|
|
42
|
+
toColOff(value: number): this;
|
|
43
|
+
toRowOff(value: number): this;
|
|
44
|
+
title(value: string): this;
|
|
45
|
+
categoriesRef(value: string): this;
|
|
46
|
+
series(value: readonly CreateChartSeries[]): this;
|
|
47
|
+
build(): {
|
|
48
|
+
sheetIdx: number;
|
|
49
|
+
chartId: string;
|
|
50
|
+
chartType: string;
|
|
51
|
+
fromRow: number;
|
|
52
|
+
fromCol: number;
|
|
53
|
+
fromColOff: number;
|
|
54
|
+
fromRowOff: number;
|
|
55
|
+
toRow: number;
|
|
56
|
+
toCol: number;
|
|
57
|
+
toColOff: number;
|
|
58
|
+
toRowOff: number;
|
|
59
|
+
title: string | undefined;
|
|
60
|
+
categoriesRef: string | undefined;
|
|
61
|
+
series: readonly CreateChartSeries[];
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateChartBuilder = void 0;
|
|
4
|
+
class CreateChartBuilder {
|
|
5
|
+
_sheetIdx;
|
|
6
|
+
_chartId;
|
|
7
|
+
_chartType;
|
|
8
|
+
_fromRow;
|
|
9
|
+
_fromCol;
|
|
10
|
+
_fromColOff;
|
|
11
|
+
_fromRowOff;
|
|
12
|
+
_toRow;
|
|
13
|
+
_toCol;
|
|
14
|
+
_toColOff;
|
|
15
|
+
_toRowOff;
|
|
16
|
+
_title;
|
|
17
|
+
_categoriesRef;
|
|
18
|
+
_series;
|
|
19
|
+
sheetIdx(value) {
|
|
20
|
+
this._sheetIdx = value;
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
chartId(value) {
|
|
24
|
+
this._chartId = value;
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
chartType(value) {
|
|
28
|
+
this._chartType = value;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
fromRow(value) {
|
|
32
|
+
this._fromRow = value;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
fromCol(value) {
|
|
36
|
+
this._fromCol = value;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
fromColOff(value) {
|
|
40
|
+
this._fromColOff = value;
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
fromRowOff(value) {
|
|
44
|
+
this._fromRowOff = value;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
toRow(value) {
|
|
48
|
+
this._toRow = value;
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
toCol(value) {
|
|
52
|
+
this._toCol = value;
|
|
53
|
+
return this;
|
|
54
|
+
}
|
|
55
|
+
toColOff(value) {
|
|
56
|
+
this._toColOff = value;
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
toRowOff(value) {
|
|
60
|
+
this._toRowOff = value;
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
title(value) {
|
|
64
|
+
this._title = value;
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
categoriesRef(value) {
|
|
68
|
+
this._categoriesRef = value;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
series(value) {
|
|
72
|
+
this._series = value;
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
build() {
|
|
76
|
+
if (this._sheetIdx === undefined)
|
|
77
|
+
throw new Error('missing sheetIdx');
|
|
78
|
+
if (this._chartId === undefined)
|
|
79
|
+
throw new Error('missing chartId');
|
|
80
|
+
if (this._chartType === undefined)
|
|
81
|
+
throw new Error('missing chartType');
|
|
82
|
+
if (this._fromRow === undefined)
|
|
83
|
+
throw new Error('missing fromRow');
|
|
84
|
+
if (this._fromCol === undefined)
|
|
85
|
+
throw new Error('missing fromCol');
|
|
86
|
+
if (this._fromColOff === undefined)
|
|
87
|
+
throw new Error('missing fromColOff');
|
|
88
|
+
if (this._fromRowOff === undefined)
|
|
89
|
+
throw new Error('missing fromRowOff');
|
|
90
|
+
if (this._toRow === undefined)
|
|
91
|
+
throw new Error('missing toRow');
|
|
92
|
+
if (this._toCol === undefined)
|
|
93
|
+
throw new Error('missing toCol');
|
|
94
|
+
if (this._toColOff === undefined)
|
|
95
|
+
throw new Error('missing toColOff');
|
|
96
|
+
if (this._toRowOff === undefined)
|
|
97
|
+
throw new Error('missing toRowOff');
|
|
98
|
+
if (this._series === undefined)
|
|
99
|
+
throw new Error('missing series');
|
|
100
|
+
return { sheetIdx: this._sheetIdx, chartId: this._chartId, chartType: this._chartType, fromRow: this._fromRow, fromCol: this._fromCol, fromColOff: this._fromColOff, fromRowOff: this._fromRowOff, toRow: this._toRow, toCol: this._toCol, toColOff: this._toColOff, toRowOff: this._toRowOff, title: this._title, categoriesRef: this._categoriesRef, series: this._series };
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.CreateChartBuilder = CreateChartBuilder;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CreateChartSeries {
|
|
2
|
+
name?: string;
|
|
3
|
+
valueRef: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class CreateChartSeriesBuilder {
|
|
6
|
+
private _name?;
|
|
7
|
+
private _valueRef;
|
|
8
|
+
name(value: string): this;
|
|
9
|
+
valueRef(value: string): this;
|
|
10
|
+
build(): {
|
|
11
|
+
name: string | undefined;
|
|
12
|
+
valueRef: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateChartSeriesBuilder = void 0;
|
|
4
|
+
class CreateChartSeriesBuilder {
|
|
5
|
+
_name;
|
|
6
|
+
_valueRef;
|
|
7
|
+
name(value) {
|
|
8
|
+
this._name = value;
|
|
9
|
+
return this;
|
|
10
|
+
}
|
|
11
|
+
valueRef(value) {
|
|
12
|
+
this._valueRef = value;
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
build() {
|
|
16
|
+
if (this._valueRef === undefined)
|
|
17
|
+
throw new Error('missing valueRef');
|
|
18
|
+
return { name: this._name, valueRef: this._valueRef };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.CreateChartSeriesBuilder = CreateChartSeriesBuilder;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DeleteChart {
|
|
2
|
+
sheetIdx: number;
|
|
3
|
+
chartId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class DeleteChartBuilder {
|
|
6
|
+
private _sheetIdx;
|
|
7
|
+
private _chartId;
|
|
8
|
+
sheetIdx(value: number): this;
|
|
9
|
+
chartId(value: string): this;
|
|
10
|
+
build(): {
|
|
11
|
+
sheetIdx: number;
|
|
12
|
+
chartId: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteChartBuilder = void 0;
|
|
4
|
+
class DeleteChartBuilder {
|
|
5
|
+
_sheetIdx;
|
|
6
|
+
_chartId;
|
|
7
|
+
sheetIdx(value) {
|
|
8
|
+
this._sheetIdx = value;
|
|
9
|
+
return this;
|
|
10
|
+
}
|
|
11
|
+
chartId(value) {
|
|
12
|
+
this._chartId = value;
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
build() {
|
|
16
|
+
if (this._sheetIdx === undefined)
|
|
17
|
+
throw new Error('missing sheetIdx');
|
|
18
|
+
if (this._chartId === undefined)
|
|
19
|
+
throw new Error('missing chartId');
|
|
20
|
+
return { sheetIdx: this._sheetIdx, chartId: this._chartId };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.DeleteChartBuilder = DeleteChartBuilder;
|
|
@@ -12,11 +12,13 @@ import { CellStyleUpdate } from './cell_style_update';
|
|
|
12
12
|
import { ConvertBlock } from './convert_block';
|
|
13
13
|
import { CreateAppendix } from './create_appendix';
|
|
14
14
|
import { CreateBlock } from './create_block';
|
|
15
|
+
import { CreateChart } from './create_chart';
|
|
15
16
|
import { CreateDiyCell } from './create_diy_cell';
|
|
16
17
|
import { CreateDiyCellById } from './create_diy_cell_by_id';
|
|
17
18
|
import { CreateLink } from './create_link';
|
|
18
19
|
import { CreateSheet } from './create_sheet';
|
|
19
20
|
import { DeleteCellImage } from './delete_cell_image';
|
|
21
|
+
import { DeleteChart } from './delete_chart';
|
|
20
22
|
import { DeleteCols } from './delete_cols';
|
|
21
23
|
import { DeleteColsInBlock } from './delete_cols_in_block';
|
|
22
24
|
import { DeleteComment } from './delete_comment';
|
|
@@ -36,6 +38,7 @@ import { LineStyleUpdate } from './line_style_update';
|
|
|
36
38
|
import { MergeCells } from './merge_cells';
|
|
37
39
|
import { MoveBlock } from './move_block';
|
|
38
40
|
import { MoveBlockLine } from './move_block_line';
|
|
41
|
+
import { MoveChart } from './move_chart';
|
|
39
42
|
import { RemoveAppendix } from './remove_appendix';
|
|
40
43
|
import { RemoveBlock } from './remove_block';
|
|
41
44
|
import { RemoveDiyCell } from './remove_diy_cell';
|
|
@@ -53,6 +56,7 @@ import { SetSheetVisible } from './set_sheet_visible';
|
|
|
53
56
|
import { SetVisible } from './set_visible';
|
|
54
57
|
import { SheetRename } from './sheet_rename';
|
|
55
58
|
import { SplitMergedCells } from './split_merged_cells';
|
|
59
|
+
import { UpdateChart } from './update_chart';
|
|
56
60
|
import { UpsertFieldFormulas } from './upsert_field_formulas';
|
|
57
61
|
import { UpsertFieldRenderInfo } from './upsert_field_render_info';
|
|
58
62
|
import { UpsertPerson } from './upsert_person';
|
|
@@ -155,6 +159,18 @@ export type EditPayload = {
|
|
|
155
159
|
} | {
|
|
156
160
|
type: 'deleteCellImage';
|
|
157
161
|
value: DeleteCellImage;
|
|
162
|
+
} | {
|
|
163
|
+
type: 'moveChart';
|
|
164
|
+
value: MoveChart;
|
|
165
|
+
} | {
|
|
166
|
+
type: 'deleteChart';
|
|
167
|
+
value: DeleteChart;
|
|
168
|
+
} | {
|
|
169
|
+
type: 'createChart';
|
|
170
|
+
value: CreateChart;
|
|
171
|
+
} | {
|
|
172
|
+
type: 'updateChart';
|
|
173
|
+
value: UpdateChart;
|
|
158
174
|
} | {
|
|
159
175
|
type: 'setColWidth';
|
|
160
176
|
value: SetColWidth;
|
|
@@ -22,6 +22,7 @@ export * from './block_schema_field_entry';
|
|
|
22
22
|
export * from './block_schema_key_entry';
|
|
23
23
|
export * from './block_schema_random_entry';
|
|
24
24
|
export * from './block_schema_type';
|
|
25
|
+
export * from './block_sort_order';
|
|
25
26
|
export * from './block_style_update';
|
|
26
27
|
export * from './border';
|
|
27
28
|
export * from './border_pr';
|
|
@@ -39,6 +40,8 @@ export * from './cell_protection';
|
|
|
39
40
|
export * from './cell_ref';
|
|
40
41
|
export * from './cell_ref_range';
|
|
41
42
|
export * from './cell_style_update';
|
|
43
|
+
export * from './chart_info';
|
|
44
|
+
export * from './chart_series_info';
|
|
42
45
|
export * from './checkpoint_meta';
|
|
43
46
|
export * from './col_info';
|
|
44
47
|
export * from './color';
|
|
@@ -50,6 +53,8 @@ export * from './comment_person';
|
|
|
50
53
|
export * from './convert_block';
|
|
51
54
|
export * from './create_appendix';
|
|
52
55
|
export * from './create_block';
|
|
56
|
+
export * from './create_chart';
|
|
57
|
+
export * from './create_chart_series';
|
|
53
58
|
export * from './create_diy_cell';
|
|
54
59
|
export * from './create_diy_cell_by_id';
|
|
55
60
|
export * from './create_link';
|
|
@@ -63,6 +68,7 @@ export * from './ct_gradient_fill';
|
|
|
63
68
|
export * from './ct_gradient_stop';
|
|
64
69
|
export * from './ct_pattern_fill';
|
|
65
70
|
export * from './delete_cell_image';
|
|
71
|
+
export * from './delete_chart';
|
|
66
72
|
export * from './delete_cols';
|
|
67
73
|
export * from './delete_cols_in_block';
|
|
68
74
|
export * from './delete_comment';
|
|
@@ -104,6 +110,7 @@ export * from './merge_cells';
|
|
|
104
110
|
export * from './modify_policy';
|
|
105
111
|
export * from './move_block';
|
|
106
112
|
export * from './move_block_line';
|
|
113
|
+
export * from './move_chart';
|
|
107
114
|
export * from './msg_edit';
|
|
108
115
|
export * from './msg_join';
|
|
109
116
|
export * from './msg_sequencer_action_invalid_message';
|
|
@@ -141,6 +148,7 @@ export * from './rpc_get_block_col_id_params';
|
|
|
141
148
|
export * from './rpc_get_block_display_window_params';
|
|
142
149
|
export * from './rpc_get_block_info_params';
|
|
143
150
|
export * from './rpc_get_block_row_id_params';
|
|
151
|
+
export * from './rpc_get_block_sort_order_params';
|
|
144
152
|
export * from './rpc_get_block_values_params';
|
|
145
153
|
export * from './rpc_get_cell_id_by_block_ref_params';
|
|
146
154
|
export * from './rpc_get_cell_id_params';
|
|
@@ -150,6 +158,7 @@ export * from './rpc_get_cell_params';
|
|
|
150
158
|
export * from './rpc_get_cell_position_params';
|
|
151
159
|
export * from './rpc_get_cells_except_window_params';
|
|
152
160
|
export * from './rpc_get_cells_params';
|
|
161
|
+
export * from './rpc_get_charts_params';
|
|
153
162
|
export * from './rpc_get_col_width_params';
|
|
154
163
|
export * from './rpc_get_comments_params';
|
|
155
164
|
export * from './rpc_get_data_boundary_params';
|
|
@@ -217,6 +226,7 @@ export * from './temp_status_diff';
|
|
|
217
226
|
export * from './token_type';
|
|
218
227
|
export * from './token_unit';
|
|
219
228
|
export * from './underline_property';
|
|
229
|
+
export * from './update_chart';
|
|
220
230
|
export * from './upsert_field_formulas';
|
|
221
231
|
export * from './upsert_field_render_info';
|
|
222
232
|
export * from './upsert_person';
|
|
@@ -39,6 +39,7 @@ __exportStar(require("./block_schema_field_entry"), exports);
|
|
|
39
39
|
__exportStar(require("./block_schema_key_entry"), exports);
|
|
40
40
|
__exportStar(require("./block_schema_random_entry"), exports);
|
|
41
41
|
__exportStar(require("./block_schema_type"), exports);
|
|
42
|
+
__exportStar(require("./block_sort_order"), exports);
|
|
42
43
|
__exportStar(require("./block_style_update"), exports);
|
|
43
44
|
__exportStar(require("./border"), exports);
|
|
44
45
|
__exportStar(require("./border_pr"), exports);
|
|
@@ -56,6 +57,8 @@ __exportStar(require("./cell_protection"), exports);
|
|
|
56
57
|
__exportStar(require("./cell_ref"), exports);
|
|
57
58
|
__exportStar(require("./cell_ref_range"), exports);
|
|
58
59
|
__exportStar(require("./cell_style_update"), exports);
|
|
60
|
+
__exportStar(require("./chart_info"), exports);
|
|
61
|
+
__exportStar(require("./chart_series_info"), exports);
|
|
59
62
|
__exportStar(require("./checkpoint_meta"), exports);
|
|
60
63
|
__exportStar(require("./col_info"), exports);
|
|
61
64
|
__exportStar(require("./color"), exports);
|
|
@@ -67,6 +70,8 @@ __exportStar(require("./comment_person"), exports);
|
|
|
67
70
|
__exportStar(require("./convert_block"), exports);
|
|
68
71
|
__exportStar(require("./create_appendix"), exports);
|
|
69
72
|
__exportStar(require("./create_block"), exports);
|
|
73
|
+
__exportStar(require("./create_chart"), exports);
|
|
74
|
+
__exportStar(require("./create_chart_series"), exports);
|
|
70
75
|
__exportStar(require("./create_diy_cell"), exports);
|
|
71
76
|
__exportStar(require("./create_diy_cell_by_id"), exports);
|
|
72
77
|
__exportStar(require("./create_link"), exports);
|
|
@@ -80,6 +85,7 @@ __exportStar(require("./ct_gradient_fill"), exports);
|
|
|
80
85
|
__exportStar(require("./ct_gradient_stop"), exports);
|
|
81
86
|
__exportStar(require("./ct_pattern_fill"), exports);
|
|
82
87
|
__exportStar(require("./delete_cell_image"), exports);
|
|
88
|
+
__exportStar(require("./delete_chart"), exports);
|
|
83
89
|
__exportStar(require("./delete_cols"), exports);
|
|
84
90
|
__exportStar(require("./delete_cols_in_block"), exports);
|
|
85
91
|
__exportStar(require("./delete_comment"), exports);
|
|
@@ -121,6 +127,7 @@ __exportStar(require("./merge_cells"), exports);
|
|
|
121
127
|
__exportStar(require("./modify_policy"), exports);
|
|
122
128
|
__exportStar(require("./move_block"), exports);
|
|
123
129
|
__exportStar(require("./move_block_line"), exports);
|
|
130
|
+
__exportStar(require("./move_chart"), exports);
|
|
124
131
|
__exportStar(require("./msg_edit"), exports);
|
|
125
132
|
__exportStar(require("./msg_join"), exports);
|
|
126
133
|
__exportStar(require("./msg_sequencer_action_invalid_message"), exports);
|
|
@@ -158,6 +165,7 @@ __exportStar(require("./rpc_get_block_col_id_params"), exports);
|
|
|
158
165
|
__exportStar(require("./rpc_get_block_display_window_params"), exports);
|
|
159
166
|
__exportStar(require("./rpc_get_block_info_params"), exports);
|
|
160
167
|
__exportStar(require("./rpc_get_block_row_id_params"), exports);
|
|
168
|
+
__exportStar(require("./rpc_get_block_sort_order_params"), exports);
|
|
161
169
|
__exportStar(require("./rpc_get_block_values_params"), exports);
|
|
162
170
|
__exportStar(require("./rpc_get_cell_id_by_block_ref_params"), exports);
|
|
163
171
|
__exportStar(require("./rpc_get_cell_id_params"), exports);
|
|
@@ -167,6 +175,7 @@ __exportStar(require("./rpc_get_cell_params"), exports);
|
|
|
167
175
|
__exportStar(require("./rpc_get_cell_position_params"), exports);
|
|
168
176
|
__exportStar(require("./rpc_get_cells_except_window_params"), exports);
|
|
169
177
|
__exportStar(require("./rpc_get_cells_params"), exports);
|
|
178
|
+
__exportStar(require("./rpc_get_charts_params"), exports);
|
|
170
179
|
__exportStar(require("./rpc_get_col_width_params"), exports);
|
|
171
180
|
__exportStar(require("./rpc_get_comments_params"), exports);
|
|
172
181
|
__exportStar(require("./rpc_get_data_boundary_params"), exports);
|
|
@@ -234,6 +243,7 @@ __exportStar(require("./temp_status_diff"), exports);
|
|
|
234
243
|
__exportStar(require("./token_type"), exports);
|
|
235
244
|
__exportStar(require("./token_unit"), exports);
|
|
236
245
|
__exportStar(require("./underline_property"), exports);
|
|
246
|
+
__exportStar(require("./update_chart"), exports);
|
|
237
247
|
__exportStar(require("./upsert_field_formulas"), exports);
|
|
238
248
|
__exportStar(require("./upsert_field_render_info"), exports);
|
|
239
249
|
__exportStar(require("./upsert_person"), exports);
|