logisheets 0.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/README.md +15 -0
- package/index.ts +1 -0
- package/package.json +31 -0
- package/src/api/index.ts +1 -0
- package/src/api/workbook.ts +201 -0
- package/src/bindings/action_effect.ts +17 -0
- package/src/bindings/async_func_result.ts +12 -0
- package/src/bindings/block_cell_id.ts +7 -0
- package/src/bindings/block_info.ts +9 -0
- package/src/bindings/block_input.ts +9 -0
- package/src/bindings/block_style_update.ts +10 -0
- package/src/bindings/border.ts +15 -0
- package/src/bindings/border_pr.ts +8 -0
- package/src/bindings/cell_alignment.ts +15 -0
- package/src/bindings/cell_formula_value.ts +9 -0
- package/src/bindings/cell_id.ts +7 -0
- package/src/bindings/cell_input.ts +9 -0
- package/src/bindings/cell_protection.ts +6 -0
- package/src/bindings/cell_style.ts +8 -0
- package/src/bindings/col_info.ts +7 -0
- package/src/bindings/color.ts +8 -0
- package/src/bindings/comment.ts +8 -0
- package/src/bindings/create_block.ts +15 -0
- package/src/bindings/create_sheet.ts +6 -0
- package/src/bindings/delete_cols.ts +7 -0
- package/src/bindings/delete_cols_in_block.ts +8 -0
- package/src/bindings/delete_rows.ts +7 -0
- package/src/bindings/delete_rows_in_block.ts +8 -0
- package/src/bindings/delete_sheet.ts +5 -0
- package/src/bindings/display_patch.ts +19 -0
- package/src/bindings/display_request.ts +6 -0
- package/src/bindings/display_response.ts +7 -0
- package/src/bindings/edit_action.ts +10 -0
- package/src/bindings/edit_payload.ts +47 -0
- package/src/bindings/fill.ts +7 -0
- package/src/bindings/font.ts +25 -0
- package/src/bindings/font_family.ts +5 -0
- package/src/bindings/font_name.ts +5 -0
- package/src/bindings/font_scheme.ts +6 -0
- package/src/bindings/gradient_fill.ts +13 -0
- package/src/bindings/gradient_stop.ts +7 -0
- package/src/bindings/index.ts +85 -0
- package/src/bindings/insert_cols.ts +7 -0
- package/src/bindings/insert_cols_in_block.ts +8 -0
- package/src/bindings/insert_rows.ts +7 -0
- package/src/bindings/insert_rows_in_block.ts +8 -0
- package/src/bindings/merge_cell.ts +8 -0
- package/src/bindings/move_block.ts +8 -0
- package/src/bindings/msg_edit.ts +9 -0
- package/src/bindings/msg_join.ts +9 -0
- package/src/bindings/msg_sequencer_action_invalid_message.ts +10 -0
- package/src/bindings/msg_sequencer_action_message.ts +10 -0
- package/src/bindings/msg_sequencer_init_workbook.ts +8 -0
- package/src/bindings/msg_sequencer_message.ts +9 -0
- package/src/bindings/msg_user_message.ts +7 -0
- package/src/bindings/normal_cell_id.ts +6 -0
- package/src/bindings/pattern_fill.ts +9 -0
- package/src/bindings/payloads_action.ts +15 -0
- package/src/bindings/recalc_cell.ts +7 -0
- package/src/bindings/remove_block.ts +6 -0
- package/src/bindings/row_info.ts +7 -0
- package/src/bindings/set_col_width.ts +7 -0
- package/src/bindings/set_row_height.ts +7 -0
- package/src/bindings/set_visible.ts +8 -0
- package/src/bindings/sheet_blocks.ts +7 -0
- package/src/bindings/sheet_col_info.ts +8 -0
- package/src/bindings/sheet_comments.ts +7 -0
- package/src/bindings/sheet_merge_cells.ts +7 -0
- package/src/bindings/sheet_names.ts +5 -0
- package/src/bindings/sheet_rename.ts +8 -0
- package/src/bindings/sheet_row_info.ts +8 -0
- package/src/bindings/sheet_styles.ts +7 -0
- package/src/bindings/sheet_values.ts +7 -0
- package/src/bindings/st_border_style.ts +17 -0
- package/src/bindings/st_font_scheme.ts +6 -0
- package/src/bindings/st_gradient_type.ts +6 -0
- package/src/bindings/st_horizontal_alignment.ts +12 -0
- package/src/bindings/st_pattern_type.ts +23 -0
- package/src/bindings/st_underline_values.ts +9 -0
- package/src/bindings/st_vertical_align_run.ts +7 -0
- package/src/bindings/st_vertical_alignment.ts +9 -0
- package/src/bindings/status_code.ts +5 -0
- package/src/bindings/style.ts +15 -0
- package/src/bindings/style_update.ts +9 -0
- package/src/bindings/style_update_type.ts +29 -0
- package/src/bindings/task.ts +6 -0
- package/src/bindings/underline_property.ts +6 -0
- package/src/bindings/value.ts +8 -0
- package/src/bindings/vertical_align_font_property.ts +6 -0
- package/src/bindings/workbook_file.ts +6 -0
- package/src/index.ts +42 -0
- package/src/payloads/block_input.ts +54 -0
- package/src/payloads/cell_input.ts +44 -0
- package/src/payloads/create_block.ts +78 -0
- package/src/payloads/delete_block_cols.ts +44 -0
- package/src/payloads/delete_block_rows.ts +44 -0
- package/src/payloads/delete_cols.ts +37 -0
- package/src/payloads/delete_rows.ts +37 -0
- package/src/payloads/delete_sheet.ts +19 -0
- package/src/payloads/index.ts +66 -0
- package/src/payloads/insert_block_cols.ts +44 -0
- package/src/payloads/insert_block_rows.ts +44 -0
- package/src/payloads/insert_cols.ts +35 -0
- package/src/payloads/insert_rows.ts +36 -0
- package/src/payloads/insert_sheet.ts +27 -0
- package/src/payloads/move_block.ts +45 -0
- package/src/payloads/set_border.ts +113 -0
- package/src/payloads/set_col_visible.ts +35 -0
- package/src/payloads/set_col_width.ts +35 -0
- package/src/payloads/set_font.ts +107 -0
- package/src/payloads/set_row_height.ts +35 -0
- package/src/payloads/set_row_visible.ts +35 -0
- package/src/payloads/sheet_rename.ts +35 -0
- package/src/transactions.ts +14 -0
- package/wasm/.gitignore +1 -0
- package/wasm/logisheets_wasm_server.d.ts +255 -0
- package/wasm/logisheets_wasm_server.js +946 -0
- package/wasm/logisheets_wasm_server_bg.wasm +0 -0
- package/wasm/logisheets_wasm_server_bg.wasm.d.ts +40 -0
- package/wasm/package.json +14 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export * from './api'
|
|
2
|
+
export * from './payloads'
|
|
3
|
+
export * from './transactions'
|
|
4
|
+
export type {
|
|
5
|
+
ActionEffect,
|
|
6
|
+
AsyncFuncResult,
|
|
7
|
+
BlockInfo,
|
|
8
|
+
Border,
|
|
9
|
+
BorderPr,
|
|
10
|
+
ColInfo,
|
|
11
|
+
Color,
|
|
12
|
+
Comment,
|
|
13
|
+
CtCellAlignment,
|
|
14
|
+
CtCellProtection,
|
|
15
|
+
CtFontFamily,
|
|
16
|
+
CtFontName,
|
|
17
|
+
CtFontScheme,
|
|
18
|
+
CtUnderlineProperty,
|
|
19
|
+
DisplayPatch,
|
|
20
|
+
DisplayRequest,
|
|
21
|
+
DisplayResponse,
|
|
22
|
+
EditAction,
|
|
23
|
+
Fill,
|
|
24
|
+
Font,
|
|
25
|
+
MergeCell,
|
|
26
|
+
PatternFill,
|
|
27
|
+
RowInfo,
|
|
28
|
+
SheetBlocks,
|
|
29
|
+
SheetColInfo,
|
|
30
|
+
SheetComments,
|
|
31
|
+
SheetMergeCells,
|
|
32
|
+
SheetNames,
|
|
33
|
+
SheetRowInfo,
|
|
34
|
+
SheetStyles,
|
|
35
|
+
SheetValues,
|
|
36
|
+
StHorizontalAlignment,
|
|
37
|
+
StPatternType,
|
|
38
|
+
StVerticalAlignment,
|
|
39
|
+
Style,
|
|
40
|
+
Task,
|
|
41
|
+
Value,
|
|
42
|
+
} from './bindings'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface BlockInput {
|
|
2
|
+
readonly type: 'blockInput'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly blockId: number
|
|
5
|
+
readonly row: number
|
|
6
|
+
readonly col: number
|
|
7
|
+
readonly input: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class BlockInputBuilder {
|
|
11
|
+
private _sheetIdx?: number
|
|
12
|
+
private _row?: number
|
|
13
|
+
private _col?: number
|
|
14
|
+
private _input?: string
|
|
15
|
+
private _blockId?: number
|
|
16
|
+
|
|
17
|
+
public sheetIdx(sheetIdx: number): this {
|
|
18
|
+
this._sheetIdx = sheetIdx
|
|
19
|
+
return this
|
|
20
|
+
}
|
|
21
|
+
public row(row: number): this {
|
|
22
|
+
this._row = row
|
|
23
|
+
return this
|
|
24
|
+
}
|
|
25
|
+
public col(col: number): this {
|
|
26
|
+
this._col = col
|
|
27
|
+
return this
|
|
28
|
+
}
|
|
29
|
+
public input(input: string): this {
|
|
30
|
+
this._input = input
|
|
31
|
+
return this
|
|
32
|
+
}
|
|
33
|
+
public blockId(id: number): this {
|
|
34
|
+
this._blockId = id
|
|
35
|
+
return this
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public build(): BlockInput {
|
|
39
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
40
|
+
if (this._row === undefined) throw Error('row is undefined!')
|
|
41
|
+
if (this._col === undefined) throw Error('col is undefined!')
|
|
42
|
+
if (this._input === undefined) throw Error('input is undefined!')
|
|
43
|
+
if (this._blockId === undefined) throw Error('block id is undefined')
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
type: 'blockInput',
|
|
47
|
+
sheetIdx: this._sheetIdx,
|
|
48
|
+
row: this._row,
|
|
49
|
+
col: this._col,
|
|
50
|
+
input: this._input,
|
|
51
|
+
blockId: this._blockId,
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface CellInput {
|
|
2
|
+
readonly type: 'cellInput'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly row: number
|
|
5
|
+
readonly col: number
|
|
6
|
+
readonly input: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class CellInputBuilder {
|
|
10
|
+
private _sheetIdx?: number
|
|
11
|
+
private _row?: number
|
|
12
|
+
private _col?: number
|
|
13
|
+
private _input?: string
|
|
14
|
+
public sheetIdx(sheetIdx: number): this {
|
|
15
|
+
this._sheetIdx = sheetIdx
|
|
16
|
+
return this
|
|
17
|
+
}
|
|
18
|
+
public row(row: number): this {
|
|
19
|
+
this._row = row
|
|
20
|
+
return this
|
|
21
|
+
}
|
|
22
|
+
public col(col: number): this {
|
|
23
|
+
this._col = col
|
|
24
|
+
return this
|
|
25
|
+
}
|
|
26
|
+
public input(input: string): this {
|
|
27
|
+
this._input = input
|
|
28
|
+
return this
|
|
29
|
+
}
|
|
30
|
+
public build(): CellInput {
|
|
31
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
32
|
+
if (this._row === undefined) throw Error('row is undefined!')
|
|
33
|
+
if (this._col === undefined) throw Error('col is undefined!')
|
|
34
|
+
if (this._input === undefined) throw Error('input is undefined!')
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
type: 'cellInput',
|
|
38
|
+
sheetIdx: this._sheetIdx,
|
|
39
|
+
row: this._row,
|
|
40
|
+
col: this._col,
|
|
41
|
+
input: this._input,
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export interface CreateBlock {
|
|
2
|
+
readonly type: 'createBlock'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly blockId: number
|
|
5
|
+
readonly masterRow: number
|
|
6
|
+
readonly masterCol: number
|
|
7
|
+
readonly rowCnt: number
|
|
8
|
+
readonly colCnt: number
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class CreateBlockBuilder {
|
|
12
|
+
private _sheetIdx?: number
|
|
13
|
+
private _blockId?: number
|
|
14
|
+
private _masterRow?: number
|
|
15
|
+
private _masterCol?: number
|
|
16
|
+
private _rowCnt?: number
|
|
17
|
+
private _colCnt?: number
|
|
18
|
+
|
|
19
|
+
public sheetIdx(sheetIdx: number): this {
|
|
20
|
+
this._sheetIdx = sheetIdx
|
|
21
|
+
return this
|
|
22
|
+
}
|
|
23
|
+
public blockId(blockId: number): this {
|
|
24
|
+
this._blockId = blockId
|
|
25
|
+
return this
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public masterRow(masterRow: number): this {
|
|
29
|
+
this._masterRow = masterRow
|
|
30
|
+
return this
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public masterCol(masterCol: number): this {
|
|
34
|
+
this._masterCol = masterCol
|
|
35
|
+
return this
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public rowCnt(rowCnt: number): this {
|
|
39
|
+
this._rowCnt = rowCnt
|
|
40
|
+
return this
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public colCnt(colCnt: number): this {
|
|
44
|
+
this._colCnt = colCnt
|
|
45
|
+
return this
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public build(): CreateBlock {
|
|
49
|
+
if (this._sheetIdx === undefined) {
|
|
50
|
+
throw Error('sheetIdx is undefined!')
|
|
51
|
+
}
|
|
52
|
+
if (this._blockId === undefined) {
|
|
53
|
+
throw Error('blockId is undefined!')
|
|
54
|
+
}
|
|
55
|
+
if (this._masterRow === undefined) {
|
|
56
|
+
throw Error('masterRow is undefined!')
|
|
57
|
+
}
|
|
58
|
+
if (this._masterCol === undefined) {
|
|
59
|
+
throw Error('masterCol is undefined!')
|
|
60
|
+
}
|
|
61
|
+
if (this._rowCnt === undefined) {
|
|
62
|
+
throw Error('rowCnt is undefined!')
|
|
63
|
+
}
|
|
64
|
+
if (this._colCnt === undefined) {
|
|
65
|
+
throw Error('colCnt is undefined!')
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
type: 'createBlock',
|
|
70
|
+
sheetIdx: this._sheetIdx,
|
|
71
|
+
blockId: this._blockId,
|
|
72
|
+
masterRow: this._masterRow,
|
|
73
|
+
masterCol: this._masterCol,
|
|
74
|
+
rowCnt: this._rowCnt,
|
|
75
|
+
colCnt: this._colCnt,
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface DeleteBlockCols {
|
|
2
|
+
readonly type: 'deleteBlockCols'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly blockId: number
|
|
5
|
+
readonly colIdx: number
|
|
6
|
+
readonly cnt: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class DeleteBlockColsBuilder {
|
|
10
|
+
private _sheetIdx?: number
|
|
11
|
+
private _blockId?: number
|
|
12
|
+
private _colIdx?: number
|
|
13
|
+
private _cnt?: number
|
|
14
|
+
|
|
15
|
+
public sheetIdx(sheetIdx: number): this {
|
|
16
|
+
this._sheetIdx = sheetIdx
|
|
17
|
+
return this
|
|
18
|
+
}
|
|
19
|
+
public blockId(blockId: number): this {
|
|
20
|
+
this._blockId = blockId
|
|
21
|
+
return this
|
|
22
|
+
}
|
|
23
|
+
public colIdx(colIdx: number): this {
|
|
24
|
+
this._colIdx = colIdx
|
|
25
|
+
return this
|
|
26
|
+
}
|
|
27
|
+
public cnt(cnt: number): this {
|
|
28
|
+
this._cnt = cnt
|
|
29
|
+
return this
|
|
30
|
+
}
|
|
31
|
+
public build(): DeleteBlockCols {
|
|
32
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined')
|
|
33
|
+
if (this._blockId === undefined) throw Error('blockId is undefined')
|
|
34
|
+
if (this._colIdx === undefined) throw Error('colIdx is undefined')
|
|
35
|
+
if (this._cnt === undefined) throw Error('cnt is undefined')
|
|
36
|
+
return {
|
|
37
|
+
type: 'deleteBlockCols',
|
|
38
|
+
sheetIdx: this._sheetIdx,
|
|
39
|
+
blockId: this._blockId,
|
|
40
|
+
colIdx: this._colIdx,
|
|
41
|
+
cnt: this._cnt,
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface DeleteBlockRows {
|
|
2
|
+
readonly type: 'deleteBlockRows'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly blockId: number
|
|
5
|
+
readonly rowIdx: number
|
|
6
|
+
readonly cnt: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class DeleteBlockRowsBuilder {
|
|
10
|
+
private _sheetIdx?: number
|
|
11
|
+
private _blockId?: number
|
|
12
|
+
private _rowIdx?: number
|
|
13
|
+
private _cnt?: number
|
|
14
|
+
|
|
15
|
+
public sheetIdx(sheetIdx: number): this {
|
|
16
|
+
this._sheetIdx = sheetIdx
|
|
17
|
+
return this
|
|
18
|
+
}
|
|
19
|
+
public blockId(blockId: number): this {
|
|
20
|
+
this._blockId = blockId
|
|
21
|
+
return this
|
|
22
|
+
}
|
|
23
|
+
public rowIdx(rowIdx: number): this {
|
|
24
|
+
this._rowIdx = rowIdx
|
|
25
|
+
return this
|
|
26
|
+
}
|
|
27
|
+
public cnt(cnt: number): this {
|
|
28
|
+
this._cnt = cnt
|
|
29
|
+
return this
|
|
30
|
+
}
|
|
31
|
+
public build(): DeleteBlockRows {
|
|
32
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined')
|
|
33
|
+
if (this._blockId === undefined) throw Error('blockId is undefined')
|
|
34
|
+
if (this._rowIdx === undefined) throw Error('rowIdx is undefined')
|
|
35
|
+
if (this._cnt === undefined) throw Error('cnt is undefined')
|
|
36
|
+
return {
|
|
37
|
+
type: 'deleteBlockRows',
|
|
38
|
+
sheetIdx: this._sheetIdx,
|
|
39
|
+
blockId: this._blockId,
|
|
40
|
+
rowIdx: this._rowIdx,
|
|
41
|
+
cnt: this._cnt,
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface DeleteCols {
|
|
2
|
+
readonly type: 'deleteCols'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly start: number
|
|
5
|
+
readonly cnt: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class DeleteColsBuilder {
|
|
9
|
+
private _sheetIdx?: number
|
|
10
|
+
private _start?: number
|
|
11
|
+
private _cnt?: number
|
|
12
|
+
public sheetIdx(sheetIdx: number): this {
|
|
13
|
+
this._sheetIdx = sheetIdx
|
|
14
|
+
return this
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public start(start: number): this {
|
|
18
|
+
this._start = start
|
|
19
|
+
return this
|
|
20
|
+
}
|
|
21
|
+
public cnt(cnt: number): this {
|
|
22
|
+
this._cnt = cnt
|
|
23
|
+
return this
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public build(): DeleteCols {
|
|
27
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
28
|
+
if (this._start === undefined) throw Error('start is undefined!')
|
|
29
|
+
if (this._cnt === undefined) throw Error('cnt is undefined!')
|
|
30
|
+
return {
|
|
31
|
+
type: 'deleteCols',
|
|
32
|
+
sheetIdx: this._sheetIdx,
|
|
33
|
+
start: this._start,
|
|
34
|
+
cnt: this._cnt,
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface DeleteRows {
|
|
2
|
+
readonly type: 'deleteRows'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly start: number
|
|
5
|
+
readonly cnt: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class DeleteRowsBuilder {
|
|
9
|
+
private _sheetIdx?: number
|
|
10
|
+
private _start?: number
|
|
11
|
+
private _cnt?: number
|
|
12
|
+
public sheetIdx(sheetIdx: number): this {
|
|
13
|
+
this._sheetIdx = sheetIdx
|
|
14
|
+
return this
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public start(start: number): this {
|
|
18
|
+
this._start = start
|
|
19
|
+
return this
|
|
20
|
+
}
|
|
21
|
+
public cnt(cnt: number): this {
|
|
22
|
+
this._cnt = cnt
|
|
23
|
+
return this
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public build(): DeleteRows {
|
|
27
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
28
|
+
if (this._start === undefined) throw Error('start is undefined!')
|
|
29
|
+
if (this._cnt === undefined) throw Error('cnt is undefined!')
|
|
30
|
+
return {
|
|
31
|
+
type: 'deleteRows',
|
|
32
|
+
sheetIdx: this._sheetIdx,
|
|
33
|
+
start: this._start,
|
|
34
|
+
cnt: this._cnt,
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface DeleteSheet {
|
|
2
|
+
type: 'deleteSheet'
|
|
3
|
+
sheetIdx: number
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export class DeleteSheetBuilder {
|
|
7
|
+
private _sheetIdx?: number
|
|
8
|
+
public sheetIdx(sheetIdx: number): this {
|
|
9
|
+
this._sheetIdx = sheetIdx
|
|
10
|
+
return this
|
|
11
|
+
}
|
|
12
|
+
public build(): DeleteSheet {
|
|
13
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
14
|
+
return {
|
|
15
|
+
type: 'deleteSheet',
|
|
16
|
+
sheetIdx: this._sheetIdx,
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {BlockInput} from './block_input'
|
|
2
|
+
import {CellInput} from './cell_input'
|
|
3
|
+
import {CreateBlock} from './create_block'
|
|
4
|
+
import {DeleteBlockCols} from './delete_block_cols'
|
|
5
|
+
import {DeleteBlockRows} from './delete_block_rows'
|
|
6
|
+
import {DeleteCols} from './delete_cols'
|
|
7
|
+
import {DeleteRows} from './delete_rows'
|
|
8
|
+
import {DeleteSheet} from './delete_sheet'
|
|
9
|
+
import {InsertBlockCols} from './insert_block_cols'
|
|
10
|
+
import {InsertBlockRows} from './insert_block_rows'
|
|
11
|
+
import {InsertCols} from './insert_cols'
|
|
12
|
+
import {InsertRows} from './insert_rows'
|
|
13
|
+
import {InsertSheet} from './insert_sheet'
|
|
14
|
+
import {MoveBlock} from './move_block'
|
|
15
|
+
import {SetBorder} from './set_border'
|
|
16
|
+
import {SetColVisible} from './set_col_visible'
|
|
17
|
+
import {SetColWidth} from './set_col_width'
|
|
18
|
+
import {SetFont} from './set_font'
|
|
19
|
+
import {SetRowHeight} from './set_row_height'
|
|
20
|
+
import {SetRowVisible} from './set_row_visible'
|
|
21
|
+
import {SheetRename} from './sheet_rename'
|
|
22
|
+
|
|
23
|
+
export * from './cell_input'
|
|
24
|
+
export * from './create_block'
|
|
25
|
+
export * from './delete_block_cols'
|
|
26
|
+
export * from './delete_block_rows'
|
|
27
|
+
export * from './delete_cols'
|
|
28
|
+
export * from './delete_rows'
|
|
29
|
+
export * from './delete_sheet'
|
|
30
|
+
export * from './insert_block_cols'
|
|
31
|
+
export * from './insert_block_rows'
|
|
32
|
+
export * from './insert_cols'
|
|
33
|
+
export * from './insert_rows'
|
|
34
|
+
export * from './insert_sheet'
|
|
35
|
+
export * from './move_block'
|
|
36
|
+
export * from './set_border'
|
|
37
|
+
export * from './set_col_visible'
|
|
38
|
+
export * from './set_col_width'
|
|
39
|
+
export * from './set_font'
|
|
40
|
+
export * from './set_row_height'
|
|
41
|
+
export * from './set_row_visible'
|
|
42
|
+
export * from './sheet_rename'
|
|
43
|
+
export * from './block_input'
|
|
44
|
+
|
|
45
|
+
export type Payload =
|
|
46
|
+
| BlockInput
|
|
47
|
+
| CellInput
|
|
48
|
+
| CreateBlock
|
|
49
|
+
| DeleteBlockCols
|
|
50
|
+
| DeleteBlockRows
|
|
51
|
+
| DeleteCols
|
|
52
|
+
| DeleteRows
|
|
53
|
+
| DeleteSheet
|
|
54
|
+
| InsertBlockCols
|
|
55
|
+
| InsertBlockRows
|
|
56
|
+
| InsertCols
|
|
57
|
+
| InsertRows
|
|
58
|
+
| InsertSheet
|
|
59
|
+
| MoveBlock
|
|
60
|
+
| SetBorder
|
|
61
|
+
| SetColVisible
|
|
62
|
+
| SetColWidth
|
|
63
|
+
| SetFont
|
|
64
|
+
| SetRowHeight
|
|
65
|
+
| SetRowVisible
|
|
66
|
+
| SheetRename
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface InsertBlockCols {
|
|
2
|
+
readonly type: 'insertBlockCols'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly blockId: number
|
|
5
|
+
readonly colIdx: number
|
|
6
|
+
readonly cnt: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class InsertBlockColsBuilder {
|
|
10
|
+
private _sheetIdx?: number
|
|
11
|
+
private _blockId?: number
|
|
12
|
+
private _colIdx?: number
|
|
13
|
+
private _cnt?: number
|
|
14
|
+
|
|
15
|
+
public sheetIdx(sheetIdx: number): this {
|
|
16
|
+
this._sheetIdx = sheetIdx
|
|
17
|
+
return this
|
|
18
|
+
}
|
|
19
|
+
public blockId(blockId: number): this {
|
|
20
|
+
this._blockId = blockId
|
|
21
|
+
return this
|
|
22
|
+
}
|
|
23
|
+
public colIdx(colIdx: number): this {
|
|
24
|
+
this._colIdx = colIdx
|
|
25
|
+
return this
|
|
26
|
+
}
|
|
27
|
+
public cnt(cnt: number): this {
|
|
28
|
+
this._cnt = cnt
|
|
29
|
+
return this
|
|
30
|
+
}
|
|
31
|
+
public build(): InsertBlockCols {
|
|
32
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
33
|
+
if (this._blockId === undefined) throw Error('blockId is undefined!')
|
|
34
|
+
if (this._colIdx === undefined) throw Error('colIdx is undefined!')
|
|
35
|
+
if (this._cnt === undefined) throw Error('cnt is undefined!')
|
|
36
|
+
return {
|
|
37
|
+
type: 'insertBlockCols',
|
|
38
|
+
sheetIdx: this._sheetIdx,
|
|
39
|
+
blockId: this._blockId,
|
|
40
|
+
colIdx: this._colIdx,
|
|
41
|
+
cnt: this._cnt,
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface InsertBlockRows {
|
|
2
|
+
readonly type: 'insertBlockRows'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly blockId: number
|
|
5
|
+
readonly rowIdx: number
|
|
6
|
+
readonly cnt: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class InsertBlockRowsBuilder {
|
|
10
|
+
private _sheetIdx?: number
|
|
11
|
+
private _blockId?: number
|
|
12
|
+
private _rowIdx?: number
|
|
13
|
+
private _cnt?: number
|
|
14
|
+
|
|
15
|
+
public sheetIdx(sheetIdx: number): this {
|
|
16
|
+
this._sheetIdx = sheetIdx
|
|
17
|
+
return this
|
|
18
|
+
}
|
|
19
|
+
public blockId(blockId: number): this {
|
|
20
|
+
this._blockId = blockId
|
|
21
|
+
return this
|
|
22
|
+
}
|
|
23
|
+
public rowIdx(rowIdx: number): this {
|
|
24
|
+
this._rowIdx = rowIdx
|
|
25
|
+
return this
|
|
26
|
+
}
|
|
27
|
+
public cnt(cnt: number): this {
|
|
28
|
+
this._cnt = cnt
|
|
29
|
+
return this
|
|
30
|
+
}
|
|
31
|
+
public build(): InsertBlockRows {
|
|
32
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
33
|
+
if (this._blockId === undefined) throw Error('blockId is undefined!')
|
|
34
|
+
if (this._rowIdx === undefined) throw Error('rowIdx is undefined!')
|
|
35
|
+
if (this._cnt === undefined) throw Error('cnt is undefined!')
|
|
36
|
+
return {
|
|
37
|
+
type: 'insertBlockRows',
|
|
38
|
+
sheetIdx: this._sheetIdx,
|
|
39
|
+
blockId: this._blockId,
|
|
40
|
+
rowIdx: this._rowIdx,
|
|
41
|
+
cnt: this._cnt,
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface InsertCols {
|
|
2
|
+
readonly type: 'insertCols'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly start: number
|
|
5
|
+
readonly cnt: number
|
|
6
|
+
}
|
|
7
|
+
export class InsertColsBuilder {
|
|
8
|
+
private _sheetIdx?: number
|
|
9
|
+
private _start?: number
|
|
10
|
+
private _cnt?: number
|
|
11
|
+
|
|
12
|
+
public sheetIdx(sheetIdx: number): this {
|
|
13
|
+
this._sheetIdx = sheetIdx
|
|
14
|
+
return this
|
|
15
|
+
}
|
|
16
|
+
public start(start: number): this {
|
|
17
|
+
this._start = start
|
|
18
|
+
return this
|
|
19
|
+
}
|
|
20
|
+
public cnt(cnt: number): this {
|
|
21
|
+
this._cnt = cnt
|
|
22
|
+
return this
|
|
23
|
+
}
|
|
24
|
+
public build(): InsertCols {
|
|
25
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
26
|
+
if (this._start === undefined) throw Error('colIdx is undefined!')
|
|
27
|
+
if (this._cnt === undefined) throw Error('cnt is undefined!')
|
|
28
|
+
return {
|
|
29
|
+
type: 'insertCols',
|
|
30
|
+
sheetIdx: this._sheetIdx,
|
|
31
|
+
start: this._start,
|
|
32
|
+
cnt: this._cnt,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface InsertRows {
|
|
2
|
+
readonly type: 'insertRows'
|
|
3
|
+
readonly sheetIdx: number
|
|
4
|
+
readonly start: number
|
|
5
|
+
readonly cnt: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class InsertRowsBuilder {
|
|
9
|
+
private _sheetIdx?: number
|
|
10
|
+
private _start?: number
|
|
11
|
+
private _cnt?: number
|
|
12
|
+
|
|
13
|
+
public sheetIdx(sheetIdx: number): this {
|
|
14
|
+
this._sheetIdx = sheetIdx
|
|
15
|
+
return this
|
|
16
|
+
}
|
|
17
|
+
public start(start: number): this {
|
|
18
|
+
this._start = start
|
|
19
|
+
return this
|
|
20
|
+
}
|
|
21
|
+
public cnt(cnt: number): this {
|
|
22
|
+
this._cnt = cnt
|
|
23
|
+
return this
|
|
24
|
+
}
|
|
25
|
+
public build(): InsertRows {
|
|
26
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
27
|
+
if (this._start === undefined) throw Error('colIdx is undefined!')
|
|
28
|
+
if (this._cnt === undefined) throw Error('cnt is undefined!')
|
|
29
|
+
return {
|
|
30
|
+
type: 'insertRows',
|
|
31
|
+
sheetIdx: this._sheetIdx,
|
|
32
|
+
start: this._start,
|
|
33
|
+
cnt: this._cnt,
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface InsertSheet {
|
|
2
|
+
type: 'insertSheet'
|
|
3
|
+
sheetIdx: number
|
|
4
|
+
name: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class InsertSheetBuilder {
|
|
8
|
+
private _sheetIdx?: number
|
|
9
|
+
private _name?: string
|
|
10
|
+
public sheetIdx(sheetIdx: number): this {
|
|
11
|
+
this._sheetIdx = sheetIdx
|
|
12
|
+
return this
|
|
13
|
+
}
|
|
14
|
+
public name(name: string): this {
|
|
15
|
+
this._name = name
|
|
16
|
+
return this
|
|
17
|
+
}
|
|
18
|
+
public build(): InsertSheet {
|
|
19
|
+
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!')
|
|
20
|
+
if (this._name === undefined) throw Error('name is undefined!')
|
|
21
|
+
return {
|
|
22
|
+
type: 'insertSheet',
|
|
23
|
+
sheetIdx: this._sheetIdx,
|
|
24
|
+
name: this._name,
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|