-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8813747
commit dfb026a
Showing
21 changed files
with
136 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface BlockCellId { | ||
block_id: number | ||
row: number | ||
col: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
import {BlockCellId} from './block_cell_id' | ||
import {NormalCellId} from './normal_cell_id' | ||
|
||
export type CellId = | ||
| {NormalCell: NormalCellId} | ||
| {BlockCell: BlockCellId} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface CreateSheet { | ||
idx: number | ||
newName: string | ||
} |
5 changes: 2 additions & 3 deletions
5
packages/web/src/bindings/col_shift.ts → packages/web/src/bindings/delete_cols.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface ColShift { | ||
export interface DeleteCols { | ||
sheetIdx: number | ||
col: number | ||
start: number | ||
count: number | ||
insert: boolean | ||
} |
6 changes: 2 additions & 4 deletions
6
...s/web/src/bindings/line_shift_in_block.ts → .../web/src/bindings/delete_cols_in_block.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface LineShiftInBlock { | ||
export interface DeleteColsInBlock { | ||
sheetIdx: number | ||
blockId: number | ||
idx: number | ||
start: number | ||
cnt: number | ||
horizontal: boolean | ||
insert: boolean | ||
} |
5 changes: 2 additions & 3 deletions
5
packages/web/src/bindings/row_shift.ts → packages/web/src/bindings/delete_rows.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface RowShift { | ||
export interface DeleteRows { | ||
sheetIdx: number | ||
row: number | ||
start: number | ||
count: number | ||
insert: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface DeleteRowsInBlock { | ||
sheetIdx: number | ||
blockId: number | ||
start: number | ||
cnt: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface DeleteSheet { | ||
idx: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
import {PayloadsAction} from './payloads_action' | ||
import {RecalcCell} from './recalc_cell' | ||
|
||
// `EditAction` represents your update behavior to the workbook. | ||
export type EditAction = | ||
| 'undo' | ||
| 'redo' | ||
| {payloads: PayloadsAction} | ||
| {recalc: readonly RecalcCell[]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface InsertCols { | ||
sheetIdx: number | ||
start: number | ||
count: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface InsertColsInBlock { | ||
sheetIdx: number | ||
blockId: number | ||
start: number | ||
cnt: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface InsertRows { | ||
sheetIdx: number | ||
start: number | ||
count: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface InsertRowsInBlock { | ||
sheetIdx: number | ||
blockId: number | ||
start: number | ||
cnt: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
|
||
export interface NormalCellId { | ||
row: number | ||
col: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// DO NOT EDIT. CODE GENERATED BY gents. | ||
import {CellId} from './cell_id' | ||
|
||
export interface RecalcCell { | ||
sheetId: number | ||
cellId: CellId | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
export interface InsertSheet { | ||
type: 'insertSheet' | ||
sheetIdx: number | ||
name: string | ||
} | ||
|
||
export class InsertSheetBuilder { | ||
private _sheetIdx?: number | ||
private _name?: string | ||
public sheetIdx(sheetIdx: number): this { | ||
this._sheetIdx = sheetIdx | ||
return this | ||
} | ||
public name(name: string): this { | ||
this._name = name | ||
return this | ||
} | ||
public build(): InsertSheet { | ||
if (this._sheetIdx === undefined) throw Error('sheetIdx is undefined!') | ||
if (this._name === undefined) throw Error('name is undefined!') | ||
return { | ||
type: 'insertSheet', | ||
sheetIdx: this._sheetIdx, | ||
name: this._name, | ||
} | ||
} | ||
} |