logisheets 1.6.0 → 1.7.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/worksheet.d.ts +7 -1
- package/dist/src/api/worksheet.js +10 -0
- package/dist/src/bindings/create_link.d.ts +30 -0
- package/dist/src/bindings/create_link.js +51 -0
- package/dist/src/bindings/edit_payload.d.ts +4 -0
- package/dist/src/bindings/index.d.ts +4 -0
- package/dist/src/bindings/index.js +4 -0
- package/dist/src/bindings/link_info.d.ts +8 -0
- package/dist/src/bindings/link_info.js +2 -0
- package/dist/src/bindings/rpc_get_linkable_blocks_params.d.ts +4 -0
- package/dist/src/bindings/rpc_get_linkable_blocks_params.js +2 -0
- package/dist/src/bindings/rpc_get_links_params.d.ts +3 -0
- package/dist/src/bindings/rpc_get_links_params.js +2 -0
- package/dist/src/bindings/rpc_workbook_methods.d.ts +5 -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
|
@@ -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 } from '../bindings';
|
|
1
|
+
import { BlockInfo, CellPosition, ColInfo, DisplayWindow, DisplayWindowWithStartPoint, RowInfo, Style, Value, CellInfo, SheetDimension, MergeCell, AppendixWithCell, ReproducibleCell, SheetCoordinate, CellInput, Comment, CellImageInfo, DependentCell, CellRefRange, LinkInfo } from '../bindings';
|
|
2
2
|
import { Cell } from './cell';
|
|
3
3
|
import { Result } from './utils';
|
|
4
4
|
export declare class Worksheet {
|
|
@@ -12,6 +12,12 @@ export declare class Worksheet {
|
|
|
12
12
|
getDependents(startRow: number, startCol: number, endRow: number, endCol: number): Result<DependentCell[]>;
|
|
13
13
|
/** The ranges/cells a cell's formula references (Excel "trace precedents"). */
|
|
14
14
|
getPrecedents(row: number, col: number): Result<CellRefRange[]>;
|
|
15
|
+
/** Blocks a `colCnt`-wide range can be linked to: same column count and not
|
|
16
|
+
* already linked. Used by the "link range → block" picker. */
|
|
17
|
+
getLinkableBlocks(colCnt: number): Result<BlockInfo[]>;
|
|
18
|
+
/** Ranges on this sheet that are linked to a block, in sheet coordinates.
|
|
19
|
+
* Used to draw an outer border around each linked source range. */
|
|
20
|
+
getLinks(): Result<LinkInfo[]>;
|
|
15
21
|
getDisplayWindow(startRow: number, endRow: number, startCol: number, endCol: number): Result<DisplayWindow>;
|
|
16
22
|
getDisplayWindowWithStartPoint(startX: number, startY: number, height: number, width: number): DisplayWindowWithStartPoint;
|
|
17
23
|
getCellPosition(row: number, col: number): CellPosition;
|
|
@@ -37,6 +37,16 @@ class Worksheet {
|
|
|
37
37
|
getPrecedents(row, col) {
|
|
38
38
|
return rpc('getPrecedents', { sheetIdx: this._sheetIdx, row, col }, this._id);
|
|
39
39
|
}
|
|
40
|
+
/** Blocks a `colCnt`-wide range can be linked to: same column count and not
|
|
41
|
+
* already linked. Used by the "link range → block" picker. */
|
|
42
|
+
getLinkableBlocks(colCnt) {
|
|
43
|
+
return rpc('getLinkableBlocks', { sheetIdx: this._sheetIdx, colCnt }, this._id);
|
|
44
|
+
}
|
|
45
|
+
/** Ranges on this sheet that are linked to a block, in sheet coordinates.
|
|
46
|
+
* Used to draw an outer border around each linked source range. */
|
|
47
|
+
getLinks() {
|
|
48
|
+
return rpc('getLinks', { sheetIdx: this._sheetIdx }, this._id);
|
|
49
|
+
}
|
|
40
50
|
getDisplayWindow(startRow, endRow, startCol, endCol) {
|
|
41
51
|
return rpc('getDisplayWindow', { sheetIdx: this._sheetIdx, startRow, endRow, startCol, endCol }, this._id);
|
|
42
52
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface CreateLink {
|
|
2
|
+
sheetIdx: number;
|
|
3
|
+
masterRow: number;
|
|
4
|
+
masterCol: number;
|
|
5
|
+
rowCnt: number;
|
|
6
|
+
colCnt: number;
|
|
7
|
+
blockId: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class CreateLinkBuilder {
|
|
10
|
+
private _sheetIdx;
|
|
11
|
+
private _masterRow;
|
|
12
|
+
private _masterCol;
|
|
13
|
+
private _rowCnt;
|
|
14
|
+
private _colCnt;
|
|
15
|
+
private _blockId;
|
|
16
|
+
sheetIdx(value: number): this;
|
|
17
|
+
masterRow(value: number): this;
|
|
18
|
+
masterCol(value: number): this;
|
|
19
|
+
rowCnt(value: number): this;
|
|
20
|
+
colCnt(value: number): this;
|
|
21
|
+
blockId(value: number): this;
|
|
22
|
+
build(): {
|
|
23
|
+
sheetIdx: number;
|
|
24
|
+
masterRow: number;
|
|
25
|
+
masterCol: number;
|
|
26
|
+
rowCnt: number;
|
|
27
|
+
colCnt: number;
|
|
28
|
+
blockId: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateLinkBuilder = void 0;
|
|
4
|
+
class CreateLinkBuilder {
|
|
5
|
+
_sheetIdx;
|
|
6
|
+
_masterRow;
|
|
7
|
+
_masterCol;
|
|
8
|
+
_rowCnt;
|
|
9
|
+
_colCnt;
|
|
10
|
+
_blockId;
|
|
11
|
+
sheetIdx(value) {
|
|
12
|
+
this._sheetIdx = value;
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
masterRow(value) {
|
|
16
|
+
this._masterRow = value;
|
|
17
|
+
return this;
|
|
18
|
+
}
|
|
19
|
+
masterCol(value) {
|
|
20
|
+
this._masterCol = value;
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
rowCnt(value) {
|
|
24
|
+
this._rowCnt = value;
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
colCnt(value) {
|
|
28
|
+
this._colCnt = value;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
blockId(value) {
|
|
32
|
+
this._blockId = value;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
build() {
|
|
36
|
+
if (this._sheetIdx === undefined)
|
|
37
|
+
throw new Error('missing sheetIdx');
|
|
38
|
+
if (this._masterRow === undefined)
|
|
39
|
+
throw new Error('missing masterRow');
|
|
40
|
+
if (this._masterCol === undefined)
|
|
41
|
+
throw new Error('missing masterCol');
|
|
42
|
+
if (this._rowCnt === undefined)
|
|
43
|
+
throw new Error('missing rowCnt');
|
|
44
|
+
if (this._colCnt === undefined)
|
|
45
|
+
throw new Error('missing colCnt');
|
|
46
|
+
if (this._blockId === undefined)
|
|
47
|
+
throw new Error('missing blockId');
|
|
48
|
+
return { sheetIdx: this._sheetIdx, masterRow: this._masterRow, masterCol: this._masterCol, rowCnt: this._rowCnt, colCnt: this._colCnt, blockId: this._blockId };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.CreateLinkBuilder = CreateLinkBuilder;
|
|
@@ -14,6 +14,7 @@ import { CreateAppendix } from './create_appendix';
|
|
|
14
14
|
import { CreateBlock } from './create_block';
|
|
15
15
|
import { CreateDiyCell } from './create_diy_cell';
|
|
16
16
|
import { CreateDiyCellById } from './create_diy_cell_by_id';
|
|
17
|
+
import { CreateLink } from './create_link';
|
|
17
18
|
import { CreateSheet } from './create_sheet';
|
|
18
19
|
import { DeleteCellImage } from './delete_cell_image';
|
|
19
20
|
import { DeleteCols } from './delete_cols';
|
|
@@ -73,6 +74,9 @@ export type EditPayload = {
|
|
|
73
74
|
} | {
|
|
74
75
|
type: 'convertBlock';
|
|
75
76
|
value: ConvertBlock;
|
|
77
|
+
} | {
|
|
78
|
+
type: 'createLink';
|
|
79
|
+
value: CreateLink;
|
|
76
80
|
} | {
|
|
77
81
|
type: 'bindFormSchema';
|
|
78
82
|
value: BindFormSchema;
|
|
@@ -52,6 +52,7 @@ export * from './create_appendix';
|
|
|
52
52
|
export * from './create_block';
|
|
53
53
|
export * from './create_diy_cell';
|
|
54
54
|
export * from './create_diy_cell_by_id';
|
|
55
|
+
export * from './create_link';
|
|
55
56
|
export * from './create_sheet';
|
|
56
57
|
export * from './ct_border';
|
|
57
58
|
export * from './ct_border_pr';
|
|
@@ -97,6 +98,7 @@ export * from './insert_rows_in_block';
|
|
|
97
98
|
export * from './int_property';
|
|
98
99
|
export * from './line_format_brush';
|
|
99
100
|
export * from './line_style_update';
|
|
101
|
+
export * from './link_info';
|
|
100
102
|
export * from './merge_cell';
|
|
101
103
|
export * from './merge_cells';
|
|
102
104
|
export * from './modify_policy';
|
|
@@ -156,6 +158,8 @@ export * from './rpc_get_display_units_of_formula_params';
|
|
|
156
158
|
export * from './rpc_get_display_window_params';
|
|
157
159
|
export * from './rpc_get_display_window_within_cell_params';
|
|
158
160
|
export * from './rpc_get_diy_cell_id_with_block_id_params';
|
|
161
|
+
export * from './rpc_get_linkable_blocks_params';
|
|
162
|
+
export * from './rpc_get_links_params';
|
|
159
163
|
export * from './rpc_get_merged_cells_params';
|
|
160
164
|
export * from './rpc_get_next_visible_cell_params';
|
|
161
165
|
export * from './rpc_get_precedents_params';
|
|
@@ -69,6 +69,7 @@ __exportStar(require("./create_appendix"), exports);
|
|
|
69
69
|
__exportStar(require("./create_block"), exports);
|
|
70
70
|
__exportStar(require("./create_diy_cell"), exports);
|
|
71
71
|
__exportStar(require("./create_diy_cell_by_id"), exports);
|
|
72
|
+
__exportStar(require("./create_link"), exports);
|
|
72
73
|
__exportStar(require("./create_sheet"), exports);
|
|
73
74
|
__exportStar(require("./ct_border"), exports);
|
|
74
75
|
__exportStar(require("./ct_border_pr"), exports);
|
|
@@ -114,6 +115,7 @@ __exportStar(require("./insert_rows_in_block"), exports);
|
|
|
114
115
|
__exportStar(require("./int_property"), exports);
|
|
115
116
|
__exportStar(require("./line_format_brush"), exports);
|
|
116
117
|
__exportStar(require("./line_style_update"), exports);
|
|
118
|
+
__exportStar(require("./link_info"), exports);
|
|
117
119
|
__exportStar(require("./merge_cell"), exports);
|
|
118
120
|
__exportStar(require("./merge_cells"), exports);
|
|
119
121
|
__exportStar(require("./modify_policy"), exports);
|
|
@@ -173,6 +175,8 @@ __exportStar(require("./rpc_get_display_units_of_formula_params"), exports);
|
|
|
173
175
|
__exportStar(require("./rpc_get_display_window_params"), exports);
|
|
174
176
|
__exportStar(require("./rpc_get_display_window_within_cell_params"), exports);
|
|
175
177
|
__exportStar(require("./rpc_get_diy_cell_id_with_block_id_params"), exports);
|
|
178
|
+
__exportStar(require("./rpc_get_linkable_blocks_params"), exports);
|
|
179
|
+
__exportStar(require("./rpc_get_links_params"), exports);
|
|
176
180
|
__exportStar(require("./rpc_get_merged_cells_params"), exports);
|
|
177
181
|
__exportStar(require("./rpc_get_next_visible_cell_params"), exports);
|
|
178
182
|
__exportStar(require("./rpc_get_precedents_params"), exports);
|
|
@@ -46,6 +46,8 @@ import { GetDisplayUnitsOfFormulaParams } from './rpc_get_display_units_of_formu
|
|
|
46
46
|
import { GetDisplayWindowParams } from './rpc_get_display_window_params';
|
|
47
47
|
import { GetDisplayWindowWithinCellParams } from './rpc_get_display_window_within_cell_params';
|
|
48
48
|
import { GetDiyCellIdWithBlockIdParams } from './rpc_get_diy_cell_id_with_block_id_params';
|
|
49
|
+
import { GetLinkableBlocksParams } from './rpc_get_linkable_blocks_params';
|
|
50
|
+
import { GetLinksParams } from './rpc_get_links_params';
|
|
49
51
|
import { GetMergedCellsParams } from './rpc_get_merged_cells_params';
|
|
50
52
|
import { GetNextVisibleCellParams } from './rpc_get_next_visible_cell_params';
|
|
51
53
|
import { GetPrecedentsParams } from './rpc_get_precedents_params';
|
|
@@ -61,6 +63,7 @@ import { GetSheetIdParams } from './rpc_get_sheet_id_params';
|
|
|
61
63
|
import { GetSheetIdxParams } from './rpc_get_sheet_idx_params';
|
|
62
64
|
import { GetSheetNameByIdxParams } from './rpc_get_sheet_name_by_idx_params';
|
|
63
65
|
import { HandleTransactionParams } from './rpc_handle_transaction_params';
|
|
66
|
+
import { LinkInfo } from './link_info';
|
|
64
67
|
import { LoadWorkbookParams } from './rpc_load_workbook_params';
|
|
65
68
|
import { LookupAppendixUpwardParams } from './rpc_lookup_appendix_upward_params';
|
|
66
69
|
import { MergeCell } from './merge_cell';
|
|
@@ -115,6 +118,8 @@ export interface WorkbookMethods {
|
|
|
115
118
|
getAvailableBlockId(params: GetAvailableBlockIdParams, bookId?: number): Promise<number | ErrorMessage>;
|
|
116
119
|
getAllBlockFields(bookId?: number): Promise<readonly BlockField[] | ErrorMessage>;
|
|
117
120
|
getAllBlocks(params: GetAllBlocksParams, bookId?: number): Promise<readonly BlockInfo[] | ErrorMessage>;
|
|
121
|
+
getLinkableBlocks(params: GetLinkableBlocksParams, bookId?: number): Promise<readonly BlockInfo[] | ErrorMessage>;
|
|
122
|
+
getLinks(params: GetLinksParams, bookId?: number): Promise<readonly LinkInfo[] | ErrorMessage>;
|
|
118
123
|
saveCheckpoint(params: SaveCheckpointParams, bookId?: number): Promise<number | ErrorMessage>;
|
|
119
124
|
deleteCheckpoint(params: DeleteCheckpointParams, bookId?: number): Promise<boolean | ErrorMessage>;
|
|
120
125
|
listCheckpoints(bookId?: number): Promise<readonly CheckpointMetaDto[] | ErrorMessage>;
|
|
Binary file
|
package/dist/wasm/package.json
CHANGED
package/package.json
CHANGED
|
Binary file
|