forked from syncfusion/ej2-javascript-ui-controls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsheet-model.d.ts
262 lines (225 loc) · 5.68 KB
/
sheet-model.d.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
import { Workbook } from './workbook';import { Query, DataManager } from '@syncfusion/ej2-data';import { RowModel } from './row-model';import { ColumnModel } from './column-model';import { processIdx } from './data';import { SheetState, ProtectSettingsModel, ConditionalFormat, ConditionalFormatModel, ExtendedRange, getCellIndexes, moveOrDuplicateSheet, workbookFormulaOperation, duplicateSheetFilterHandler, ExtendedSheet } from '../common/index';import { ProtectSettings, getCellAddress } from '../common/index';import { isUndefined, ChildProperty, Property, Complex, Collection, extend } from '@syncfusion/ej2-base';import { WorkbookModel } from './workbook-model';
/**
* Interface for a class Range
*/
export interface RangeModel {
/**
* Specifies the data as JSON / Data manager to the sheet.
*
* @default null
*/
dataSource?: Object[] | DataManager;
/**
* Specifies the start cell from which the datasource will be populated.
*
* @default 'A1'
*/
startCell?: string;
/**
* Defines the external [`Query`](https://ej2.syncfusion.com/documentation/data/api-query.html)
* that will be executed along with data processing.
*
* @default null
*/
query?: Query;
/**
* Show/Hide the field of the datasource as header.
*
* @default true
*/
showFieldAsHeader?: boolean;
/**
* Template helps to compiles the given HTML String (or HTML Element ID) into HtML Element and append to the Cell.
*
* @default ''
* @aspType string
*/
template?: string | Function;
/**
* Specifies the address for updating the dataSource or template.
*
* @default 'A1'
*/
address?: string;
}
/**
* Interface for a class UsedRange
*/
export interface UsedRangeModel {
/**
* Specifies the last used row index of the sheet.
*
* @default 0
* @asptype int
*/
rowIndex?: number;
/**
* Specifies the last used column index of the sheet.
*
* @default 0
* @asptype int
*/
colIndex?: number;
}
/**
* Interface for a class Sheet
*/
export interface SheetModel {
/**
* Represents sheet unique id.
*
* @default 0
* @hidden
*/
id?: number;
/**
* Configures row and its properties for the sheet.
*
* @default null
*/
rows?: RowModel[];
/**
* Configures column and its properties for the sheet.
*
* @default null
*/
columns?: ColumnModel[];
/**
* Configures protect and its options.
*
* @default { selectCells: false, formatCells: false, formatRows: false, formatColumns: false, insertLink: false }
*/
protectSettings?: ProtectSettingsModel;
/**
* Specifies the collection of range for the sheet.
*
* @default []
*/
ranges?: RangeModel[];
/**
* Specifies the conditional formatting for the sheet.
*
* @default []
*/
conditionalFormats?: ConditionalFormatModel[];
/**
* Specifies index of the sheet. Based on the index, sheet properties are applied.
*
* @default 0
* @asptype int
*/
index?: number;
/**
* Specifies the name of the sheet, the name will show in the sheet tabs.
*
* @default ''
*/
name?: string;
/**
* Defines the number of rows to be rendered in the sheet.
*
* @default 100
* @asptype int
*/
rowCount?: number;
/**
* Defines the number of columns to be rendered in the sheet.
*
* @default 100
* @asptype int
*/
colCount?: number;
/**
* Specifies selected range in the sheet.
* ```html
* <div id='Spreadsheet'></div>
* ```
* ```typescript
* let spreadsheet: Spreadsheet = new Spreadsheet({
* sheets: [{
* selectedRange: 'A1:B5'
* }],
* ...
* });
* spreadsheet.appendTo('#Spreadsheet');
* ```
*
* @default 'A1:A1'
*/
selectedRange?: string;
/**
* Specifies active cell within `selectedRange` in the sheet.
*
* @default 'A1'
*/
activeCell?: string;
/**
* Defines the used range of the sheet.
*
* @default { rowIndex: 0, colIndex: 0 }
*/
usedRange?: UsedRangeModel;
/**
* Specified cell will be positioned at the upper-left corner of the sheet.
*
* @default 'A1'
*/
topLeftCell?: string;
/**
* Specifies to show / hide column and row headers in the sheet.
*
* @default true
*/
showHeaders?: boolean;
/**
* Specifies to show / hide grid lines in the sheet.
*
* @default true
*/
showGridLines?: boolean;
/**
* Specifies to protect the cells in the sheet.
*
* @default false
*/
isProtected?: boolean;
/**
* Specifies the sheet visibility state. There must be at least one visible sheet in Spreadsheet.
*
* @default 'Visible'
*/
state?: SheetState;
/**
* Gets or sets the number of frozen rows.
*
* @default 0
* @asptype int
*/
frozenRows?: number;
/**
* Gets or sets the number of frozen columns.
*
* @default 0
* @asptype int
*/
frozenColumns?: number;
/**
* Represents the maximum row height collection.
*
* @default []
* @hidden
*/
maxHgts?: object[];
/**
* Represents the freeze pane top left cell. Its default value would be based on the number of freeze rows and columns.
*
* @default 'A1'
*/
paneTopLeftCell?: string;
/**
* Specifies the password.
*
* @default ''
*/
password?: string;
}