/
TableOperation.ts
169 lines (146 loc) · 3.37 KB
/
TableOperation.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/**
* Operations used by editTable() API for insert table cell vertically
*/
export type TableVerticalInsertOperation =
/**
* Insert a row above current row
*/
| 'insertAbove'
/**
* Insert a row below current row
*/
| 'insertBelow';
/**
* Operations used by editTable() API for insert table cell horizontally
*/
export type TableHorizontalInsertOperation =
/**
* Insert a column on the left of current column
*/
| 'insertLeft'
/**
* Insert a column on the right of current column
*/
| 'insertRight';
/**
* Operations used by editTable() API for delete table cells
*/
export type TableDeleteOperation =
/**
* Delete the whole table
*/
| 'deleteTable'
/**
* Delete current column
*/
| 'deleteColumn'
/**
* Delete current row
*/
| 'deleteRow';
/**
* Operations used by editTable() API for merge table cells vertically
*/
export type TableVerticalMergeOperation =
/**
* Merge current row with the row above
*/
| 'mergeAbove'
/**
* Merge current row with the row below
*/
| 'mergeBelow';
/**
* Operations used by editTable() API for merge table cells horizontally
*/
export type TableHorizontalMergeOperation =
/**
* Merge current column with the column on the left
*/
| 'mergeLeft'
/**
* Merge current column with the column on the right
*/
| 'mergeRight';
/**
* Operations used by editTable() API for merge selected table cells
*/
export type TableCellMergeOperation =
/**
* Merge all selected cells
*/
'mergeCells';
/**
* Operations used by editTable() API for split table cells
*/
export type TableSplitOperation =
/**
* Split current table cell horizontally
*/
| 'splitHorizontally'
/**
* Split current table cell vertically
*/
| 'splitVertically';
/**
* Operations used by editTable() API for align table
*/
export type TableAlignOperation =
/**
* Align current table at the center
*/
| 'alignCenter'
/**
* Align current table at the left
*/
| 'alignLeft'
/**
* Align current table at the right
*/
| 'alignRight';
/**
* Operations used by editTable() API for align table cell horizontally
*/
export type TableCellHorizontalAlignOperation =
/**
* Align current content table cell at the left
*/
| 'alignCellLeft'
/**
* Align current content table cell at the center
*/
| 'alignCellCenter'
/**
* Align current content table cell at the right
*/
| 'alignCellRight';
/**
* Operations used by editTable() API for align table cell vertically
*/
export type TableCellVerticalAlignOperation =
/**
* Align current content table cell at the top
*/
| 'alignCellTop'
/**
* Align current table cell at the middle
*/
| 'alignCellMiddle'
/**
* Align current table cell at the bottom
*/
| 'alignCellBottom';
/**
* Operations used by editTable() API
*/
export type TableOperation =
| TableVerticalInsertOperation
| TableHorizontalInsertOperation
| TableDeleteOperation
| TableVerticalMergeOperation
| TableHorizontalMergeOperation
| TableCellMergeOperation
| TableSplitOperation
| TableAlignOperation
| TableCellHorizontalAlignOperation
| TableCellVerticalAlignOperation;