logisheets 1.4.0 → 1.6.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/dist/src/api/workbook.d.ts +6 -0
- package/dist/src/api/workbook.js +8 -0
- package/dist/src/api/worksheet.d.ts +10 -1
- package/dist/src/api/worksheet.js +24 -1
- package/dist/src/bindings/cell_ref_range.d.ts +9 -0
- package/dist/src/bindings/cell_ref_range.js +2 -0
- package/dist/src/bindings/dependent_cell.d.ts +7 -0
- package/dist/src/bindings/dependent_cell.js +2 -0
- package/dist/src/bindings/index.d.ts +4 -0
- package/dist/src/bindings/index.js +4 -0
- package/dist/src/bindings/rpc_get_dependents_params.d.ts +7 -0
- package/dist/src/bindings/rpc_get_dependents_params.js +2 -0
- package/dist/src/bindings/rpc_get_precedents_params.d.ts +5 -0
- package/dist/src/bindings/rpc_get_precedents_params.js +2 -0
- package/dist/src/bindings/rpc_workbook_methods.d.ts +7 -0
- package/dist/wasm/logisheets_wasm_server_bg.wasm +0 -0
- package/dist/wasm/package.json +1 -1
- package/package.json +1 -1
- package/wasm/logisheets_wasm_server_bg.wasm +0 -0
- package/wasm/package.json +1 -1
|
@@ -80,6 +80,12 @@ export declare class Workbook {
|
|
|
80
80
|
registerHeaderUpdatedCallback(callback: (sheetIdxes: readonly number[]) => void): void;
|
|
81
81
|
getSheetNameByIdx(idx: number): Result<string>;
|
|
82
82
|
getAllSheetInfo(): Array<SheetInfo>;
|
|
83
|
+
/**
|
|
84
|
+
* Every distinct formula function name used across the workbook (cell
|
|
85
|
+
* formulas + defined names), read from the parsed ASTs. Uppercased as
|
|
86
|
+
* stored at parse time, sorted + deduped.
|
|
87
|
+
*/
|
|
88
|
+
getFormulaFunctionNames(): Result<string[]>;
|
|
83
89
|
checkFormula(f: string): boolean;
|
|
84
90
|
calcCondition(sheetIdx: number, f: string): Result<boolean>;
|
|
85
91
|
/**
|
package/dist/src/api/workbook.js
CHANGED
|
@@ -204,6 +204,14 @@ class Workbook {
|
|
|
204
204
|
getAllSheetInfo() {
|
|
205
205
|
return rpc('getAllSheetInfo', undefined, this._id);
|
|
206
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Every distinct formula function name used across the workbook (cell
|
|
209
|
+
* formulas + defined names), read from the parsed ASTs. Uppercased as
|
|
210
|
+
* stored at parse time, sorted + deduped.
|
|
211
|
+
*/
|
|
212
|
+
getFormulaFunctionNames() {
|
|
213
|
+
return rpc('getFormulaFunctionNames', undefined, this._id);
|
|
214
|
+
}
|
|
207
215
|
checkFormula(f) {
|
|
208
216
|
return rpc('checkFormula', { formula: f }, this._id);
|
|
209
217
|
}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { BlockInfo, CellPosition, ColInfo, DisplayWindow, DisplayWindowWithStartPoint, RowInfo, Style, Value, CellInfo, SheetDimension, MergeCell, AppendixWithCell, ReproducibleCell, SheetCoordinate, CellInput, Comment, CellImageInfo } from '../bindings';
|
|
1
|
+
import { BlockInfo, CellPosition, ColInfo, DisplayWindow, DisplayWindowWithStartPoint, RowInfo, Style, Value, CellInfo, SheetDimension, MergeCell, AppendixWithCell, ReproducibleCell, SheetCoordinate, CellInput, Comment, CellImageInfo, DependentCell, CellRefRange } from '../bindings';
|
|
2
2
|
import { Cell } from './cell';
|
|
3
3
|
import { Result } from './utils';
|
|
4
4
|
export declare class Worksheet {
|
|
5
5
|
constructor(id: number, sheetIdxOrId: number, isSheetIdx?: boolean);
|
|
6
6
|
getSheetDimension(): Result<SheetDimension>;
|
|
7
|
+
/**
|
|
8
|
+
* Cells whose formula references the given range (Excel "trace dependents").
|
|
9
|
+
* Each result carries the reference (`via`) it used, resolved to a rectangle,
|
|
10
|
+
* so callers can tell an aggregate/range reference from a single-cell one.
|
|
11
|
+
*/
|
|
12
|
+
getDependents(startRow: number, startCol: number, endRow: number, endCol: number): Result<DependentCell[]>;
|
|
13
|
+
/** The ranges/cells a cell's formula references (Excel "trace precedents"). */
|
|
14
|
+
getPrecedents(row: number, col: number): Result<CellRefRange[]>;
|
|
7
15
|
getDisplayWindow(startRow: number, endRow: number, startCol: number, endCol: number): Result<DisplayWindow>;
|
|
8
16
|
getDisplayWindowWithStartPoint(startX: number, startY: number, height: number, width: number): DisplayWindowWithStartPoint;
|
|
9
17
|
getCellPosition(row: number, col: number): CellPosition;
|
|
@@ -22,6 +30,7 @@ export declare class Worksheet {
|
|
|
22
30
|
getRowInfo(rowIdx: number): Result<RowInfo>;
|
|
23
31
|
getColInfo(colIdx: number): Result<ColInfo>;
|
|
24
32
|
getCellInfo(rowIdx: number, colIdx: number): Result<CellInfo>;
|
|
33
|
+
getCellListValidation(rowIdx: number, colIdx: number): Result<readonly string[] | undefined>;
|
|
25
34
|
getReproducibleCell(rowIdx: number, colIdx: number): Result<ReproducibleCell>;
|
|
26
35
|
getReproducibleCells(coordinates: readonly SheetCoordinate[]): Result<readonly ReproducibleCell[]>;
|
|
27
36
|
getCellInfos(startRow: number, startCol: number, endRow: number, endCol: number): Result<readonly CellInfo[]>;
|
|
@@ -25,6 +25,18 @@ class Worksheet {
|
|
|
25
25
|
getSheetDimension() {
|
|
26
26
|
return rpc('getSheetDimension', { sheetId: this._sheetId }, this._id);
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Cells whose formula references the given range (Excel "trace dependents").
|
|
30
|
+
* Each result carries the reference (`via`) it used, resolved to a rectangle,
|
|
31
|
+
* so callers can tell an aggregate/range reference from a single-cell one.
|
|
32
|
+
*/
|
|
33
|
+
getDependents(startRow, startCol, endRow, endCol) {
|
|
34
|
+
return rpc('getDependents', { sheetIdx: this._sheetIdx, startRow, startCol, endRow, endCol }, this._id);
|
|
35
|
+
}
|
|
36
|
+
/** The ranges/cells a cell's formula references (Excel "trace precedents"). */
|
|
37
|
+
getPrecedents(row, col) {
|
|
38
|
+
return rpc('getPrecedents', { sheetIdx: this._sheetIdx, row, col }, this._id);
|
|
39
|
+
}
|
|
28
40
|
getDisplayWindow(startRow, endRow, startCol, endCol) {
|
|
29
41
|
return rpc('getDisplayWindow', { sheetIdx: this._sheetIdx, startRow, endRow, startCol, endCol }, this._id);
|
|
30
42
|
}
|
|
@@ -69,7 +81,12 @@ class Worksheet {
|
|
|
69
81
|
// Ctrl+Arrow: jump to the next data/block boundary. Returns an
|
|
70
82
|
// ErrorMessage when there is no boundary ahead (caller shows a hint).
|
|
71
83
|
getUpwardDataBoundary(row, col) {
|
|
72
|
-
return rpc('getDataBoundary', {
|
|
84
|
+
return rpc('getDataBoundary', {
|
|
85
|
+
sheetIdx: this._sheetIdx,
|
|
86
|
+
rowIdx: row,
|
|
87
|
+
colIdx: col,
|
|
88
|
+
direction: 'up',
|
|
89
|
+
}, this._id);
|
|
73
90
|
}
|
|
74
91
|
getDownwardDataBoundary(row, col) {
|
|
75
92
|
return rpc('getDataBoundary', {
|
|
@@ -116,6 +133,12 @@ class Worksheet {
|
|
|
116
133
|
getCellInfo(rowIdx, colIdx) {
|
|
117
134
|
return rpc('getCell', { sheetIdx: this._sheetIdx, row: rowIdx, col: colIdx }, this._id);
|
|
118
135
|
}
|
|
136
|
+
// The enum option set of a cell's list data-validation (inline lists),
|
|
137
|
+
// or undefined when the cell has no such dropdown. Used by douyoushu to
|
|
138
|
+
// prefill enum inputs from a workbook's existing dropdowns.
|
|
139
|
+
getCellListValidation(rowIdx, colIdx) {
|
|
140
|
+
return rpc('getCellListValidation', { sheetIdx: this._sheetIdx, row: rowIdx, col: colIdx }, this._id);
|
|
141
|
+
}
|
|
119
142
|
getReproducibleCell(rowIdx, colIdx) {
|
|
120
143
|
return rpc('getReproducibleCell', { sheetIdx: this._sheetIdx, row: rowIdx, col: colIdx }, this._id);
|
|
121
144
|
}
|
|
@@ -37,6 +37,7 @@ export * from './cell_input';
|
|
|
37
37
|
export * from './cell_position';
|
|
38
38
|
export * from './cell_protection';
|
|
39
39
|
export * from './cell_ref';
|
|
40
|
+
export * from './cell_ref_range';
|
|
40
41
|
export * from './cell_style_update';
|
|
41
42
|
export * from './checkpoint_meta';
|
|
42
43
|
export * from './col_info';
|
|
@@ -67,6 +68,7 @@ export * from './delete_comment';
|
|
|
67
68
|
export * from './delete_rows';
|
|
68
69
|
export * from './delete_rows_in_block';
|
|
69
70
|
export * from './delete_sheet';
|
|
71
|
+
export * from './dependent_cell';
|
|
70
72
|
export * from './display_window';
|
|
71
73
|
export * from './display_window_request';
|
|
72
74
|
export * from './display_window_with_start_point';
|
|
@@ -149,12 +151,14 @@ export * from './rpc_get_cells_params';
|
|
|
149
151
|
export * from './rpc_get_col_width_params';
|
|
150
152
|
export * from './rpc_get_comments_params';
|
|
151
153
|
export * from './rpc_get_data_boundary_params';
|
|
154
|
+
export * from './rpc_get_dependents_params';
|
|
152
155
|
export * from './rpc_get_display_units_of_formula_params';
|
|
153
156
|
export * from './rpc_get_display_window_params';
|
|
154
157
|
export * from './rpc_get_display_window_within_cell_params';
|
|
155
158
|
export * from './rpc_get_diy_cell_id_with_block_id_params';
|
|
156
159
|
export * from './rpc_get_merged_cells_params';
|
|
157
160
|
export * from './rpc_get_next_visible_cell_params';
|
|
161
|
+
export * from './rpc_get_precedents_params';
|
|
158
162
|
export * from './rpc_get_reproducible_cell_params';
|
|
159
163
|
export * from './rpc_get_reproducible_cells_params';
|
|
160
164
|
export * from './rpc_get_row_height_params';
|
|
@@ -54,6 +54,7 @@ __exportStar(require("./cell_input"), exports);
|
|
|
54
54
|
__exportStar(require("./cell_position"), exports);
|
|
55
55
|
__exportStar(require("./cell_protection"), exports);
|
|
56
56
|
__exportStar(require("./cell_ref"), exports);
|
|
57
|
+
__exportStar(require("./cell_ref_range"), exports);
|
|
57
58
|
__exportStar(require("./cell_style_update"), exports);
|
|
58
59
|
__exportStar(require("./checkpoint_meta"), exports);
|
|
59
60
|
__exportStar(require("./col_info"), exports);
|
|
@@ -84,6 +85,7 @@ __exportStar(require("./delete_comment"), exports);
|
|
|
84
85
|
__exportStar(require("./delete_rows"), exports);
|
|
85
86
|
__exportStar(require("./delete_rows_in_block"), exports);
|
|
86
87
|
__exportStar(require("./delete_sheet"), exports);
|
|
88
|
+
__exportStar(require("./dependent_cell"), exports);
|
|
87
89
|
__exportStar(require("./display_window"), exports);
|
|
88
90
|
__exportStar(require("./display_window_request"), exports);
|
|
89
91
|
__exportStar(require("./display_window_with_start_point"), exports);
|
|
@@ -166,12 +168,14 @@ __exportStar(require("./rpc_get_cells_params"), exports);
|
|
|
166
168
|
__exportStar(require("./rpc_get_col_width_params"), exports);
|
|
167
169
|
__exportStar(require("./rpc_get_comments_params"), exports);
|
|
168
170
|
__exportStar(require("./rpc_get_data_boundary_params"), exports);
|
|
171
|
+
__exportStar(require("./rpc_get_dependents_params"), exports);
|
|
169
172
|
__exportStar(require("./rpc_get_display_units_of_formula_params"), exports);
|
|
170
173
|
__exportStar(require("./rpc_get_display_window_params"), exports);
|
|
171
174
|
__exportStar(require("./rpc_get_display_window_within_cell_params"), exports);
|
|
172
175
|
__exportStar(require("./rpc_get_diy_cell_id_with_block_id_params"), exports);
|
|
173
176
|
__exportStar(require("./rpc_get_merged_cells_params"), exports);
|
|
174
177
|
__exportStar(require("./rpc_get_next_visible_cell_params"), exports);
|
|
178
|
+
__exportStar(require("./rpc_get_precedents_params"), exports);
|
|
175
179
|
__exportStar(require("./rpc_get_reproducible_cell_params"), exports);
|
|
176
180
|
__exportStar(require("./rpc_get_reproducible_cells_params"), exports);
|
|
177
181
|
__exportStar(require("./rpc_get_row_height_params"), exports);
|
|
@@ -12,10 +12,12 @@ import { CellImageInfo } from './cell_image_info';
|
|
|
12
12
|
import { CellInfo } from './cell_info';
|
|
13
13
|
import { CellInput } from './cell_input';
|
|
14
14
|
import { CellPosition } from './cell_position';
|
|
15
|
+
import { CellRefRange } from './cell_ref_range';
|
|
15
16
|
import { CheckFormulaParams } from './rpc_check_formula_params';
|
|
16
17
|
import { CheckpointMetaDto } from './checkpoint_meta';
|
|
17
18
|
import { Comment } from './comment';
|
|
18
19
|
import { DeleteCheckpointParams } from './rpc_delete_checkpoint_params';
|
|
20
|
+
import { DependentCell } from './dependent_cell';
|
|
19
21
|
import { DisplayWindow } from './display_window';
|
|
20
22
|
import { DisplayWindowWithStartPoint } from './display_window_with_start_point';
|
|
21
23
|
import { ErrorMessage } from './error_message';
|
|
@@ -39,12 +41,14 @@ import { GetCellsParams } from './rpc_get_cells_params';
|
|
|
39
41
|
import { GetColWidthParams } from './rpc_get_col_width_params';
|
|
40
42
|
import { GetCommentsParams } from './rpc_get_comments_params';
|
|
41
43
|
import { GetDataBoundaryParams } from './rpc_get_data_boundary_params';
|
|
44
|
+
import { GetDependentsParams } from './rpc_get_dependents_params';
|
|
42
45
|
import { GetDisplayUnitsOfFormulaParams } from './rpc_get_display_units_of_formula_params';
|
|
43
46
|
import { GetDisplayWindowParams } from './rpc_get_display_window_params';
|
|
44
47
|
import { GetDisplayWindowWithinCellParams } from './rpc_get_display_window_within_cell_params';
|
|
45
48
|
import { GetDiyCellIdWithBlockIdParams } from './rpc_get_diy_cell_id_with_block_id_params';
|
|
46
49
|
import { GetMergedCellsParams } from './rpc_get_merged_cells_params';
|
|
47
50
|
import { GetNextVisibleCellParams } from './rpc_get_next_visible_cell_params';
|
|
51
|
+
import { GetPrecedentsParams } from './rpc_get_precedents_params';
|
|
48
52
|
import { GetReproducibleCellParams } from './rpc_get_reproducible_cell_params';
|
|
49
53
|
import { GetReproducibleCellsParams } from './rpc_get_reproducible_cells_params';
|
|
50
54
|
import { GetRowHeightParams } from './rpc_get_row_height_params';
|
|
@@ -76,7 +80,10 @@ import { ToggleStatusParams } from './rpc_toggle_status_params';
|
|
|
76
80
|
import { Value } from './value';
|
|
77
81
|
export interface WorkbookMethods {
|
|
78
82
|
getSheetDimension(params: GetSheetDimensionParams, bookId?: number): Promise<SheetDimension | ErrorMessage>;
|
|
83
|
+
getDependents(params: GetDependentsParams, bookId?: number): Promise<readonly DependentCell[] | ErrorMessage>;
|
|
84
|
+
getPrecedents(params: GetPrecedentsParams, bookId?: number): Promise<readonly CellRefRange[] | ErrorMessage>;
|
|
79
85
|
getAllSheetInfo(bookId?: number): Promise<readonly SheetInfo[] | ErrorMessage>;
|
|
86
|
+
getFormulaFunctionNames(bookId?: number): Promise<readonly string[] | ErrorMessage>;
|
|
80
87
|
getSheetIdx(params: GetSheetIdxParams, bookId?: number): Promise<number | ErrorMessage>;
|
|
81
88
|
getSheetId(params: GetSheetIdParams, bookId?: number): Promise<number | ErrorMessage>;
|
|
82
89
|
getSheetNameByIdx(params: GetSheetNameByIdxParams, bookId?: number): Promise<string | ErrorMessage>;
|
|
Binary file
|
package/dist/wasm/package.json
CHANGED
package/package.json
CHANGED
|
Binary file
|