@mindfusion/dataviews 2.0.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/dataviews.d.ts ADDED
@@ -0,0 +1,1648 @@
1
+ /// <reference types="../../@mindfusion/controls" />
2
+ /// <reference types="../../@mindfusion/common-ui" />
3
+ /// <reference types="../../@mindfusion/common" />
4
+ declare module "DataViews/jsdv/src/Command" {
5
+ /**
6
+ * @namespace MindFusion.DataViews
7
+ */
8
+ /**
9
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
10
+ *
11
+ * This source code is provided to you as part of the MindFusion software components
12
+ * package you have purchased. You may use the source code to trace and/or fix
13
+ * problems or customize the library as needed for your application. To get permission
14
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
15
+ */
16
+ /**
17
+ * @class A base class for grid row commands.
18
+ */
19
+ export class Command {
20
+ /**
21
+ * Override this method in a derived class to customize the command controller.
22
+ * @param {Object} [sender] Optional.
23
+ * @param {Object} [args] Optional.
24
+ * @returns {HTMLElement} The controller.
25
+ */
26
+ static createControl(sender?: any, args?: any): HTMLElement;
27
+ /**
28
+ * Override this property in a derived class to set the command string identifier.
29
+ */
30
+ static get commandName(): string;
31
+ /**
32
+ * Override this property in a derived class to change the trigger event for the command action.
33
+ */
34
+ static get eventName(): string;
35
+ /**
36
+ * Attaches the handler to the controller.
37
+ * @private
38
+ */
39
+ private static attach;
40
+ }
41
+ }
42
+ declare module "DataViews/jsdv/src/Enum" {
43
+ /**
44
+ * Specifies a row action.
45
+ */
46
+ export type RowAction = number;
47
+ export namespace RowAction {
48
+ const Select: number;
49
+ const Create: number;
50
+ const Update: number;
51
+ const Delete: number;
52
+ const Command: number;
53
+ const Render: number;
54
+ }
55
+ }
56
+ declare module "DataViews/jsdv/src/EventArgs" {
57
+ /**
58
+ * @class Specifies data for row action validation events.
59
+ * @augments CancelEventArgs
60
+ * @property {Number} row Gets the index of the row that is being modified.
61
+ * @property {RowAction} action Gets the row action, that triggered the event.
62
+ * @property {Object} rowData Gets the row data.
63
+ * @property {Map} oldValues Gets a dictionary of the original field name/value pairs.
64
+ * @property {Map} newValues Gets a dictionary of the new field name/value pairs.
65
+ */
66
+ export class RowModifyingEventArgs extends CancelEventArgs {
67
+ /**
68
+ * Initializes a new instance of the RowModifyingEventArgs class.
69
+ * @constructor
70
+ * @param {Number} row The index of the row that is being modified.
71
+ * @param {RowAction} action The row action.
72
+ * @param {Object} rowData The row data.
73
+ * @param {Map} oldValues The dictionary of the original field name/value pairs.
74
+ * @param {Map} newValues The dictionary of the new field name/value pairs.
75
+ */
76
+ constructor(row: number, action: RowAction, rowData: any, oldValues: Map<any, any>, newValues: Map<any, any>);
77
+ _row: number;
78
+ _action: number;
79
+ _rowData: any;
80
+ _oldValues: Map<any, any>;
81
+ _newValues: Map<any, any>;
82
+ /**
83
+ * Gets the row that is being modified.
84
+ * @returns {Number} The index of the row that is being modified.
85
+ */
86
+ get row(): number;
87
+ /**
88
+ * Gets the row data.
89
+ * @returns {Object} An object containing the row data.
90
+ */
91
+ get rowData(): any;
92
+ /**
93
+ * Gets the row action.
94
+ * @returns {RowAction} One of the RowAction enumeration values.
95
+ */
96
+ get action(): number;
97
+ /**
98
+ * Gets the dictionary of the original field name/value pairs.
99
+ * @returns {Map} The dictionary of the original field name/value pairs.
100
+ */
101
+ get oldValues(): Map<any, any>;
102
+ /**
103
+ * Gets the dictionary of the new field name/value pairs.
104
+ * @returns {Map} The dictionary of the new field name/value pairs.
105
+ */
106
+ get newValues(): Map<any, any>;
107
+ }
108
+ /**
109
+ * @class Specifies data for row action notification events.
110
+ * @augments EventArgs
111
+ * @property {Number} row Gets the index of the row that was modified.
112
+ * @property {RowAction} action Gets the row action, that triggered the event.
113
+ * @property {Object} rowData Gets the row data.
114
+ * @property {Map} oldValues Gets a dictionary of the original field name/value pairs.
115
+ * @property {Map} newValues Gets a dictionary of the new field name/value pairs.
116
+ */
117
+ export class RowModifiedEventArgs extends EventArgs {
118
+ /**
119
+ * Initializes a new instance of the RowModifiedEventArgs class.
120
+ * @constructor
121
+ * @param {Number} row The index of the row that was modified.
122
+ * @param {RowAction} action The row action.
123
+ * @param {Object} rowData The row data.
124
+ * @param {Map} oldValues The dictionary of the original field name/value pairs.
125
+ * @param {Map} newValues The dictionary of the new field name/value pairs.
126
+ */
127
+ constructor(row: number, action: RowAction, rowData: any, oldValues: Map<any, any>, newValues: Map<any, any>);
128
+ _row: number;
129
+ _action: number;
130
+ _rowData: any;
131
+ _oldValues: Map<any, any>;
132
+ _newValues: Map<any, any>;
133
+ /**
134
+ * Gets the row that was modified.
135
+ * @returns {Number} The index of the row that was modified.
136
+ */
137
+ get row(): number;
138
+ /**
139
+ * Gets the row data.
140
+ * @returns {Object} An object containing the row data.
141
+ */
142
+ get rowData(): any;
143
+ /**
144
+ * Gets the row action.
145
+ * @returns {RowAction} One of the RowAction enumeration values.
146
+ */
147
+ get action(): number;
148
+ /**
149
+ * Gets the dictionary of the original field name/value pairs.
150
+ * @returns {Map} The dictionary of the original field name/value pairs.
151
+ */
152
+ get oldValues(): Map<any, any>;
153
+ /**
154
+ * Gets the dictionary of the new field name/value pairs.
155
+ * @returns {Map} The dictionary of the new field name/value pairs.
156
+ */
157
+ get newValues(): Map<any, any>;
158
+ }
159
+ /**
160
+ * @class Specifies data for the rowCommand event.
161
+ * @augments RowModifyingEventArgs
162
+ * @property {String} commandName Gets the string identifier of the executed command.
163
+ * @property {HTMLElement} control Gets the controller that triggered the command.
164
+ */
165
+ export class CommandEventArgs extends RowModifyingEventArgs {
166
+ /**
167
+ * Initializes a new instance of the RowModifiedEventArgs class.
168
+ * @constructor
169
+ * @param {String} commandName The string identifier of the executed command.
170
+ * @param {HTMLElement} control The controller that triggered the command.
171
+ * @param {Number} row The index of the row, for which the command is executed.
172
+ * @param {Object} rowData The row data.
173
+ */
174
+ constructor(commandName: string, control: HTMLElement, row: number, rowData: any);
175
+ _commandName: string;
176
+ _control: HTMLElement;
177
+ /**
178
+ * Gets the string identifier of the executed command.
179
+ * @returns {String} The command name.
180
+ */
181
+ get commandName(): string;
182
+ /**
183
+ * Gets the controller that triggered the command.
184
+ * @returns {HTMLElement} The HTML control.
185
+ */
186
+ get control(): HTMLElement;
187
+ }
188
+ /**
189
+ * @class Provides data for the cell related validation events.
190
+ * @augments CancelEventArgs
191
+ * @property {Number} row Gets the row of the cell, associated with the event.
192
+ * @property {Number} column Gets the column of the cell, associated with the event.
193
+ */
194
+ export class CellValidateEventArgs extends CancelEventArgs {
195
+ /**
196
+ * Initializes a new instance of the CellValidateEventArgs class.
197
+ * @constructor
198
+ * @param {Number} row The row index of the cell.
199
+ * @param {Number} column The column index of the cell.
200
+ */
201
+ constructor(row: number, column: number);
202
+ _row: number;
203
+ _column: number;
204
+ /**
205
+ * Gets the row of the cell, associated with the event.
206
+ * @returns {Number} The row index.
207
+ */
208
+ get row(): number;
209
+ /**
210
+ * Gets the column of the cell, associated with the event.
211
+ * @returns {Number} The column index.
212
+ */
213
+ get column(): number;
214
+ }
215
+ /**
216
+ * @class Provides data for the cell related notification events.
217
+ * @augments EventArgs
218
+ * @property {Number} row Gets the row of the cell, associated with the event.
219
+ * @property {Number} column Gets the column of the cell, associated with the event.
220
+ */
221
+ export class CellEventArgs extends EventArgs {
222
+ /**
223
+ * Initializes a new instance of the CellEventArgs class.
224
+ * @constructor
225
+ * @param {Number} row The row index of the cell.
226
+ * @param {Number} column The column index of the cell.
227
+ */
228
+ constructor(row: number, column: number);
229
+ _row: number;
230
+ _column: number;
231
+ /**
232
+ * Gets the row of the cell, associated with the event.
233
+ * @returns {Number} The row index.
234
+ */
235
+ get row(): number;
236
+ /**
237
+ * Gets the column of the cell, associated with the event.
238
+ * @returns {Number} The column index.
239
+ */
240
+ get column(): number;
241
+ }
242
+ /**
243
+ * @class Provides data for custom draw events.
244
+ * @augments CellEventArgs
245
+ * @property {Node} defaultContent Gets the default content, displayed in the cell.
246
+ * @property {Node} content Gets or sets the new content to be displayed in the cell.
247
+ */
248
+ export class CellCustomDrawEventArgs extends CellEventArgs {
249
+ /**
250
+ * Initializes a new instance of the CellCustomDrawEventArgs class.
251
+ * @constructor
252
+ * @param {Number} row The row index of the cell.
253
+ * @param {Number} column The column index of the cell.
254
+ * @param {Node} defaultContent The default content displayed in the cell.
255
+ */
256
+ constructor(row: number, column: number, defaultContent: Node);
257
+ _defaultContent: Node;
258
+ /**
259
+ * Gets the default content, displayed in the cell.
260
+ * @returns {Node} The default content.
261
+ */
262
+ get defaultContent(): Node;
263
+ /**
264
+ * Sets the new content to be displayed in the cell.
265
+ * @param {Node} value The new content.
266
+ */
267
+ set content(arg: Node);
268
+ /**
269
+ * Gets the new content to be displayed in the cell.
270
+ * @returns {Node} The new content.
271
+ */
272
+ get content(): Node;
273
+ _content: Node;
274
+ }
275
+ import { CancelEventArgs } from "@mindfusion/controls";
276
+ import { RowAction } from "DataViews/jsdv/src/Enum";
277
+ import { EventArgs } from "@mindfusion/controls";
278
+ }
279
+ declare module "DataViews/jsdv/src/CommandType" {
280
+ /**
281
+ * @class Provides functionality for command columns.
282
+ */
283
+ export class CommandType {
284
+ static createContent(element: any, view: any): void;
285
+ }
286
+ }
287
+ declare module "DataViews/jsdv/src/DataType" {
288
+ export default DataType;
289
+ /**
290
+ * @namespace MindFusion.DataViews
291
+ */
292
+ /**
293
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
294
+ *
295
+ * This source code is provided to you as part of the MindFusion software components
296
+ * package you have purchased. You may use the source code to trace and/or fix
297
+ * problems or customize the library as needed for your application. To get permission
298
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
299
+ */
300
+ /**
301
+ * @class A base class for data types.
302
+ */
303
+ class DataType {
304
+ static sortFunction(value1: any, value2: any): void;
305
+ static createEditor(element: any, displayValue: any, value: any, view: any): void;
306
+ static parse(text: any): void;
307
+ static equals(value1: any, value2: any): void;
308
+ }
309
+ }
310
+ declare module "DataViews/jsdv/src/StringType" {
311
+ /**
312
+ * @class Provides functionality for grid columns, that display string data.
313
+ */
314
+ export class StringType extends DataType {
315
+ static sortFunction(value1: any, value2: any): any;
316
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement;
317
+ static updateValueFromInput(newValue: any, element: any, view: any): void;
318
+ static updateCell(view: any, element: any, r: any, c: any, displayValue: any): void;
319
+ static parse(text: any): any;
320
+ static format(value: any, meta: any): any;
321
+ static equals(value1: any, value2: any): boolean;
322
+ }
323
+ import DataType from "DataViews/jsdv/src/DataType";
324
+ }
325
+ declare module "DataViews/jsdv/src/DateType" {
326
+ /**
327
+ * @class Provides functionality for grid columns, that display dates.
328
+ */
329
+ export class DateType extends DataType {
330
+ static sortFunction(value1: any, value2: any): number;
331
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement | DateTimePicker;
332
+ static createDefaultEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement;
333
+ static createCustomEditor(editor: any, options: any, element: any, displayValue: any, value: any, view: any): void;
334
+ static parse(text: any): number;
335
+ static format(value: any, meta: any): any;
336
+ static equals(value1: any, value2: any): boolean;
337
+ }
338
+ import DataType from "DataViews/jsdv/src/DataType";
339
+ import { DateTimePicker } from "@mindfusion/common-ui";
340
+ }
341
+ declare module "DataViews/jsdv/src/DateTimeType" {
342
+ /**
343
+ * @class Provides functionality for grid columns, that display date-time values.
344
+ */
345
+ export class DateTimeType extends DateType {
346
+ }
347
+ import { DateType } from "DataViews/jsdv/src/DateType";
348
+ }
349
+ declare module "DataViews/jsdv/src/ImageType" {
350
+ /**
351
+ * @class Provides functionality for grid columns, that display image data.
352
+ */
353
+ export class ImageType extends DataType {
354
+ static sortFunction(value1: any, value2: any): any;
355
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement | ImagePicker;
356
+ static createDefaultEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement;
357
+ static updateCell(view: any, element: any, r: any, c: any, displayValue: any): void;
358
+ static createCustomEditor(editor: any, options: any, element: any, displayValue: any, value: any, view: any): void;
359
+ static parse(text: any): any;
360
+ static equals(value1: any, value2: any): boolean;
361
+ static format(value: any, meta: any): string;
362
+ }
363
+ import DataType from "DataViews/jsdv/src/DataType";
364
+ import { ImagePicker } from "@mindfusion/common-ui";
365
+ }
366
+ declare module "DataViews/jsdv/src/ArrayModel" {
367
+ /**
368
+ * @class Represents a grid model, that uses an array of objects as a backing store.
369
+ * @property {Number} rowCount Gets the number of rows in the array.
370
+ * @property {Number} columnCount Gets the number of display columns.
371
+ */
372
+ export class ArrayModel {
373
+ /**
374
+ * Initializes a new instance of the ArrayModel class.
375
+ * @constructor
376
+ * @param {Array} values The array to use as a backing store.
377
+ * @param {Array} columns The list of display columns.
378
+ * @param {String} [keyField] The name of the unique key field.
379
+ */
380
+ constructor(values: any[], columns: any[], keyField?: string);
381
+ _values: any[];
382
+ _columns: any[];
383
+ _keyField: string;
384
+ _autoKey: string;
385
+ /**
386
+ * Gets the maximum value in the unique key column.
387
+ * @returns {Object} The maximum value.
388
+ */
389
+ getMaxKey(): any;
390
+ /**
391
+ * Gets the key of the specified row.
392
+ * @returns {Object} The key.
393
+ */
394
+ getRowKey(row: any): any;
395
+ /**
396
+ * Gets the row with the specified key.
397
+ * @returns {Number} The row index.
398
+ */
399
+ getKeyRow(key: any): number;
400
+ /**
401
+ * Gets the type of the specified column.
402
+ * @param {Number} column The column index.
403
+ * @returns {DataType} The type.
404
+ */
405
+ columnType(column: number): any;
406
+ /**
407
+ * Gets the name of the specified column.
408
+ * @param {Number} column The column index.
409
+ * @returns {String} The name of the field displayed in this column.
410
+ */
411
+ columnName(column: number): string;
412
+ /**
413
+ * Gets the display text of the specified column.
414
+ * @param {Number} column The column index.
415
+ * @returns {String} The display text.
416
+ */
417
+ columnCaption(column: number): string;
418
+ /**
419
+ * Gets a value, indicating whether the cells in the specified column can be edited.
420
+ * @param {Number} column The column index.
421
+ * @returns {Boolean} True if the cells in this column can be edited, otherwise false.
422
+ */
423
+ columnEditable(column: number): boolean;
424
+ /**
425
+ * Gets a value, indicating whether the specified column can be sorted.
426
+ * @param {Number} column The column index.
427
+ * @returns {Boolean} True if the specified column can be sorted, otherwise false.
428
+ */
429
+ columnSortable(column: number): boolean;
430
+ /**
431
+ * Gets the column meta data object.
432
+ * @param {Number} column The column index.
433
+ * @returns {Map} A Map instance containing the column meta data.
434
+ */
435
+ columnMetaData(column: number): Map<any, any>;
436
+ /**
437
+ * Sets a value at the specified position.
438
+ * @param {Number} row The row index.
439
+ * @param {Number} column The column index.
440
+ * @param {Object} value The value.
441
+ */
442
+ setValue(row: number, column: number, value: any): void;
443
+ /**
444
+ * Gets the value at the specified position.
445
+ * @param {Number} row The row index.
446
+ * @param {Number} column The column index.
447
+ * @returns {Object} The value.
448
+ */
449
+ value(row: number, column: number): any;
450
+ /**
451
+ * Gets the display value of the cell in the the specified position.
452
+ * @param {Number} row The row index.
453
+ * @param {Number} column The column index.
454
+ * @returns {String} The display value.
455
+ */
456
+ displayValue(row: number, column: number): string;
457
+ /**
458
+ * Gets the values at the specified row index.
459
+ * @param {Number} row The row index.
460
+ * @returns {Object} An object containing the values at the specified row index.
461
+ */
462
+ getRowData(row: number): any;
463
+ /**
464
+ * Adds a row to the backing array.
465
+ * @param {Object} [rowData] The values to add.
466
+ * @param {Number} [index] The index at which to insert the data.
467
+ * If not specified, the data will be appended to the end of the backing array.
468
+ */
469
+ addRow(rowData?: any, index?: number): number;
470
+ /**
471
+ * Removes the row at the specified index from the backing array.
472
+ * @param {Number} row The row index.
473
+ */
474
+ deleteRow(row: number): void;
475
+ /**
476
+ * Gets the number of array items.
477
+ * @returns {Number} The row count.
478
+ */
479
+ get rowCount(): number;
480
+ /**
481
+ * Gets the number of display columns.
482
+ * @returns {Number} The column count.
483
+ */
484
+ get columnCount(): number;
485
+ }
486
+ }
487
+ declare module "DataViews/jsdv/src/IntegerType" {
488
+ /**
489
+ * @class Provides functionality for grid columns, that display integer data.
490
+ */
491
+ export class IntegerType extends DataType {
492
+ static sortFunction(value1: any, value2: any): number;
493
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement;
494
+ static parse(text: any): number;
495
+ static format(value: any, meta: any): string;
496
+ static equals(value1: any, value2: any): boolean;
497
+ }
498
+ import DataType from "DataViews/jsdv/src/DataType";
499
+ }
500
+ declare module "DataViews/jsdv/src/RealNumberType" {
501
+ /**
502
+ * @class Provides functionality for grid columns, that display real number data.
503
+ */
504
+ export class RealNumberType extends IntegerType {
505
+ }
506
+ import { IntegerType } from "DataViews/jsdv/src/IntegerType";
507
+ }
508
+ declare module "DataViews/jsdv/src/CurrencyType" {
509
+ /**
510
+ * @class Provides functionality for grid columns, that display currency data.
511
+ */
512
+ export class CurrencyType extends RealNumberType {
513
+ }
514
+ import { RealNumberType } from "DataViews/jsdv/src/RealNumberType";
515
+ }
516
+ declare module "DataViews/jsdv/src/DeleteCommand" {
517
+ /**
518
+ * @class Handles row deletion, triggered by a command grid column.
519
+ */
520
+ export class DeleteCommand extends Command {
521
+ static execute(sender: any, args: any): void;
522
+ }
523
+ import { Command } from "DataViews/jsdv/src/Command";
524
+ }
525
+ declare module "DataViews/jsdv/src/DomRenderer" {
526
+ /**
527
+ * @namespace MindFusion.DataViews
528
+ */
529
+ /**
530
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
531
+ *
532
+ * This source code is provided to you as part of the MindFusion software components
533
+ * package you have purchased. You may use the source code to trace and/or fix
534
+ * problems or customize the library as needed for your application. To get permission
535
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
536
+ */
537
+ /**
538
+ * @class A base class for grid renderers.
539
+ */
540
+ export class DomRenderer {
541
+ /**
542
+ * Sets the grid control this renderer is attached to.
543
+ */
544
+ set grid(arg: any);
545
+ /**
546
+ * Gets the grid control this renderer is attached to.
547
+ */
548
+ get grid(): any;
549
+ _grid: any;
550
+ /**
551
+ * Implement this property in a derived class to provide access to the array of DOM elements of the visible rows.
552
+ */
553
+ get visibleRows(): void;
554
+ /**
555
+ * Implement this property in a derived class to provide access to the array of DOM elements of the visible cells.
556
+ */
557
+ get visibleCells(): void;
558
+ /**
559
+ * Implement this method in a derived class to handle the initial rendering of the grid control.
560
+ */
561
+ renderGrid(): void;
562
+ /**
563
+ * Implement this method in a derived class to handle re-rendering of the grid control.
564
+ */
565
+ invalidate(): void;
566
+ /**
567
+ * Implement this method in a derived class to handle re-rendering of a row range.
568
+ * @param {Number} index The start index of the range.
569
+ * @param {Number} count The length of the range.
570
+ */
571
+ refreshRows(index: number, count: number): void;
572
+ /**
573
+ * Implement this method in a derived class to handle updates of grid cells after inplace-editing.
574
+ * @param {Number} row The row index.
575
+ * @param {Number} column The column index.
576
+ */
577
+ updateCell(row: number, column: number): void;
578
+ /**
579
+ * Implement this method in a derived class to handle row creation.
580
+ */
581
+ onRowCreated(): void;
582
+ /**
583
+ * Implement this method in a derived class to handle row deletion.
584
+ */
585
+ onRowDeleted(): void;
586
+ /**
587
+ * Implement this method in a derived class to handle scrolling.
588
+ */
589
+ onScroll(): void;
590
+ /**
591
+ * Implement this method in a derived class to handle selection.
592
+ */
593
+ onSelect(): void;
594
+ /**
595
+ * Implement this method in a derived class to handle sorting.
596
+ */
597
+ onSort(): void;
598
+ }
599
+ }
600
+ declare module "DataViews/jsdv/src/UIControl" {
601
+ /**
602
+ * @class A base class for UI controls.
603
+ */
604
+ export class UIControl extends Control {
605
+ setLicenseKey(value: any): void;
606
+ }
607
+ import { Control } from "@mindfusion/common";
608
+ }
609
+ declare module "DataViews/jsdv/src/ProxyModel" {
610
+ export default ProxyModel;
611
+ class ProxyModel {
612
+ constructor(sourceModel: any);
613
+ sourceModel: any;
614
+ _filter: any;
615
+ _sortedColumn: number;
616
+ _sortAscending: boolean;
617
+ indexMap: any[];
618
+ getMaxKey(): any;
619
+ getKeyRow(key: any): any;
620
+ getRowKey(index: any): any;
621
+ columnType(column: any): any;
622
+ columnName(column: any): any;
623
+ columnCaption(column: any): any;
624
+ columnEditable(column: any): any;
625
+ columnSortable(column: any): any;
626
+ columnMetaData(column: any): any;
627
+ setValue(row: any, column: any, value: any): void;
628
+ value(row: any, column: any): any;
629
+ displayValue(row: any, column: any): any;
630
+ getRowData(row: any): any;
631
+ addRow(rowData: any, index: any): number;
632
+ deleteRow(row: any): void;
633
+ get rowCount(): any;
634
+ get columnCount(): any;
635
+ invalidate(): void;
636
+ ensureIndexMap(): void;
637
+ set filter(arg: any);
638
+ get filter(): any;
639
+ set sortedColumn(arg: number);
640
+ get sortedColumn(): number;
641
+ set sortAscending(arg: boolean);
642
+ get sortAscending(): boolean;
643
+ }
644
+ }
645
+ declare module "DataViews/jsdv/src/GridRenderer" {
646
+ export default GridRenderer;
647
+ /**
648
+ * @class Contains render methods for a grid control.
649
+ */
650
+ class GridRenderer extends DomRenderer {
651
+ repaintId: number;
652
+ draw(): void;
653
+ drawHeader(): HTMLDivElement;
654
+ drawContent(): HTMLDivElement;
655
+ drawRows(): void;
656
+ rowHeight: number;
657
+ rowsHeight: number;
658
+ drawRow(model: any, r: any): HTMLDivElement;
659
+ refreshRow(model: any, r: any): void;
660
+ addSelectedFlag(element: any): void;
661
+ removeSelectedFlag(element: any): void;
662
+ clearSelection(): void;
663
+ updateSelection(): void;
664
+ }
665
+ import { DomRenderer } from "DataViews/jsdv/src/DomRenderer";
666
+ }
667
+ declare module "DataViews/jsdv/src/Selection" {
668
+ export default Selection;
669
+ /**
670
+ * @namespace MindFusion.DataViews
671
+ */
672
+ /**
673
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
674
+ *
675
+ * This source code is provided to you as part of the MindFusion software components
676
+ * package you have purchased. You may use the source code to trace and/or fix
677
+ * problems or customize the library as needed for your application. To get permission
678
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
679
+ */
680
+ /**
681
+ * @class Represents a selection in a grid control.
682
+ * @property {Array} cells The array of selected cells.
683
+ * @property {Array} rows The array of selected rows.
684
+ * @property {Array} columns The array of selected columns.
685
+ */
686
+ class Selection {
687
+ /**
688
+ * Initializes a new instance of the Selection class.
689
+ * @constructor
690
+ * @param {Grid} grid The associated grid control.
691
+ */
692
+ constructor(grid: any);
693
+ _grid: any;
694
+ _cells: any[];
695
+ _rows: any[];
696
+ /**
697
+ * Sets the array of selected cells.
698
+ * @param {Array} value The array.
699
+ */
700
+ set cells(arg: any[]);
701
+ /**
702
+ * Gets the array of selected cells.
703
+ * @returns {Array} The array of selected cells.
704
+ */
705
+ get cells(): any[];
706
+ _columns: any[];
707
+ /**
708
+ * Sets the array of selected rows.
709
+ * @param {Array} value The array.
710
+ */
711
+ set rows(arg: any[]);
712
+ /**
713
+ * Gets the array of selected rows.
714
+ * @returns {Array} The array of selected rows.
715
+ */
716
+ get rows(): any[];
717
+ }
718
+ }
719
+ declare module "DataViews/jsdv/src/GridModel" {
720
+ /**
721
+ * @namespace MindFusion.DataViews
722
+ */
723
+ /**
724
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
725
+ *
726
+ * This source code is provided to you as part of the MindFusion software components
727
+ * package you have purchased. You may use the source code to trace and/or fix
728
+ * problems or customize the library as needed for your application. To get permission
729
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
730
+ */
731
+ /**
732
+ * @class The interface for grid models.
733
+ */
734
+ export class GridModel {
735
+ /**
736
+ * Gets the key of the specified row.
737
+ * @returns {Object} The key.
738
+ */
739
+ getRowKey(row: any): any;
740
+ /**
741
+ * Gets the row with the specified key.
742
+ * @returns {Number} The row index.
743
+ */
744
+ getKeyRow(key: any): number;
745
+ /**
746
+ * Gets the type of the specified column.
747
+ * @param {Number} column The column index.
748
+ * @returns {DataType} The type.
749
+ */
750
+ columnType(column: number): any;
751
+ /**
752
+ * Gets the name of the specified column.
753
+ * @param {Number} column The column index.
754
+ * @returns {String} The name of the field displayed in this column.
755
+ */
756
+ columnName(column: number): string;
757
+ /**
758
+ * Gets the display text of the specified column.
759
+ * @param {Number} column The column index.
760
+ * @returns {String} The display text.
761
+ */
762
+ columnCaption(column: number): string;
763
+ /**
764
+ * Gets a value, indicating whether the cells in the specified column can be edited.
765
+ * @param {Number} column The column index.
766
+ * @returns {Boolean} True if the cells in this column can be edited, otherwise false.
767
+ */
768
+ columnEditable(column: number): boolean;
769
+ /**
770
+ * Gets a value, indicating whether the specified column can be sorted.
771
+ * @param {Number} column The column index.
772
+ * @returns {Boolean} True if the specified column can be sorted, otherwise false.
773
+ */
774
+ columnSortable(column: number): boolean;
775
+ /**
776
+ * Gets the column meta data object.
777
+ * @param {Number} column The column index.
778
+ * @returns {Map} A Map instance containing the column meta data.
779
+ */
780
+ columnMetaData(column: number): Map<any, any>;
781
+ /**
782
+ * Sets a value at the specified position.
783
+ * @param {Number} row The row index.
784
+ * @param {Number} column The column index.
785
+ * @param {Object} value The value.
786
+ */
787
+ setValue(row: number, column: number, value: any): void;
788
+ /**
789
+ * Gets the value at the specified position.
790
+ * @param {Number} row The row index.
791
+ * @param {Number} column The column index.
792
+ * @returns {Object} The value.
793
+ */
794
+ value(row: number, column: number): any;
795
+ /**
796
+ * Gets the display value of the cell in the the specified position.
797
+ * @param {Number} row The row index.
798
+ * @param {Number} column The column index.
799
+ * @returns {String} The display value.
800
+ */
801
+ displayValue(row: number, column: number): string;
802
+ /**
803
+ * Gets the values at the specified row index.
804
+ * @param {Number} row The row index.
805
+ * @returns {Object} An object containing the values at the specified row index.
806
+ */
807
+ getRowData(row: number): any;
808
+ /**
809
+ * Adds a row to the backing store.
810
+ * @param {Object} [rowData] The values to add.
811
+ * @param {Number} [index] The index at which to insert the data.
812
+ * @returns {Number} index The index of the new row.
813
+ */
814
+ addRow(rowData?: any, index?: number): number;
815
+ /**
816
+ * Removes the row at the specified index from the backing store.
817
+ * @param {Number} row The row index.
818
+ */
819
+ deleteRow(row: number): void;
820
+ /**
821
+ * Gets the number of rows in the backing store.
822
+ * @returns {Number} The row count.
823
+ */
824
+ get rowCount(): number;
825
+ /**
826
+ * Gets the number of display columns.
827
+ * @returns {Number} The column count.
828
+ */
829
+ get columnCount(): number;
830
+ }
831
+ }
832
+ declare module "DataViews/jsdv/src/GridCell" {
833
+ /**
834
+ * @namespace MindFusion.DataViews
835
+ */
836
+ /**
837
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
838
+ *
839
+ * This source code is provided to you as part of the MindFusion software components
840
+ * package you have purchased. You may use the source code to trace and/or fix
841
+ * problems or customize the library as needed for your application. To get permission
842
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
843
+ */
844
+ /**
845
+ * @class Represents a data cell in a grid control.
846
+ * @property {Number} row Gets the row index of this cell.
847
+ * @property {Number} column Gets the column index of this cell.
848
+ * @property {Grid} parent Gets the parent control of this cell.
849
+ */
850
+ export class GridCell {
851
+ /**
852
+ * Initializes a new instance of the GridCell class.
853
+ * @constructor
854
+ * @private
855
+ */
856
+ private constructor();
857
+ _parent: any;
858
+ _row: any;
859
+ _column: any;
860
+ _rowKey: any;
861
+ /**
862
+ * @private
863
+ */
864
+ private focus;
865
+ /**
866
+ * @private
867
+ */
868
+ private invalidateKey;
869
+ /**
870
+ * Gets the row index of this cell.
871
+ * @returns {Number} The row index.
872
+ */
873
+ get row(): number;
874
+ /**
875
+ * Gets the column index of this cell.
876
+ * @returns {Number} The column index.
877
+ */
878
+ get column(): number;
879
+ /**
880
+ * Gets the DOM element of this cell.
881
+ * @returns {HTMLDivElement} The DOM element,
882
+ */
883
+ get element(): HTMLDivElement;
884
+ /**
885
+ * Gets the parent control] of this cell.
886
+ * @returns {Grid} The parent control.
887
+ */
888
+ get parent(): any;
889
+ }
890
+ }
891
+ declare module "DataViews/jsdv/src/Grid" {
892
+ /**
893
+ * @class Represents a grid view control.
894
+ * @augments UIControl
895
+ * @property {GridModel} model Gets or sets the data model of this grid.
896
+ * @property {Boolean} allowAppend Gets or sets a value, indicating whether to
897
+ * show a new empty row at the bottom of the grid and a 'New row' option in the row context menu.
898
+ * @property {Boolean} allowEdit Gets or sets a value, indicating whether inplace editing is enabled.
899
+ * @property {Boolean} allowDelete Gets or sets a value, indicating whether to show a 'Delete row' option in the row context menu.
900
+ * @property {Boolean} allowCellSelect Gets or sets a value, indicating whether single cell selection is enabled.
901
+ * @property {Boolean} allowScroll Gets or sets a value, indicating whether scrolling is enabled.
902
+ * @property {Array} selectedRowIndices Gets the indices of selected rows.
903
+ * @property {Array} selectedCells Gets the selected cells.
904
+ * @property {Number} sortedColumn Gets the index of the column, by which the data is sorted.
905
+ * @property {Boolean} sortAscending Gets a value, indicating whether the sorting is in Ascending order.
906
+ * @property {Number} scrollRow Gets or sets the index of the first visible row.
907
+ * @property {GridCell} focusedCell Gets the active grid cell.
908
+ * @property {Object} activeEditor Gets the active grid cell editor.
909
+ * @property {HTMLDivElement} header Gets a reference to the grid header DOM element.
910
+ * @property {HTMLDivElement} dataTable Gets a reference to the grid data table DOM element.
911
+ */
912
+ export class Grid extends UIControl {
913
+ /**
914
+ * Initializes a new instance of the Grid class.
915
+ * @constructor
916
+ * @param {HTMLDivElement} [element] The control's associated Dom element.
917
+ * @param {Object} [renderer] Optional.
918
+ */
919
+ constructor(element?: HTMLDivElement, renderer?: any);
920
+ _defaultWidth: Unit;
921
+ _defaultHeight: Unit;
922
+ _model: any;
923
+ _proxyModel: ProxyModel;
924
+ _allowEdit: boolean;
925
+ _allowAppend: boolean;
926
+ _allowDelete: boolean;
927
+ _allowCellSelect: boolean;
928
+ _allowScroll: boolean;
929
+ _filter: any;
930
+ _sortedColumn: number;
931
+ _sortAscending: boolean;
932
+ renderer: any;
933
+ _scrollRow: number;
934
+ _columnWidths: any[];
935
+ _rowHeaderWidth: number;
936
+ _focusedCell: any;
937
+ _activeEditor: any;
938
+ _tableShouldFocus: boolean;
939
+ selection: Selection;
940
+ queuedEvents: any[];
941
+ _rowRendered: EventDispatcher<import("Controls/EventArgs").EventArgs>;
942
+ _rowCreating: EventDispatcher<import("Controls/EventArgs").EventArgs>;
943
+ _rowCreated: EventDispatcher<import("Controls/EventArgs").EventArgs>;
944
+ _rowDeleting: EventDispatcher<import("Controls/EventArgs").EventArgs>;
945
+ _rowDeleted: EventDispatcher<import("Controls/EventArgs").EventArgs>;
946
+ _rowUpdating: EventDispatcher<import("Controls/EventArgs").EventArgs>;
947
+ _rowUpdated: EventDispatcher<import("Controls/EventArgs").EventArgs>;
948
+ _rowSelecting: EventDispatcher<import("Controls/EventArgs").EventArgs>;
949
+ _rowSelected: EventDispatcher<import("Controls/EventArgs").EventArgs>;
950
+ _cellSelecting: EventDispatcher<import("Controls/EventArgs").EventArgs>;
951
+ _cellSelected: EventDispatcher<import("Controls/EventArgs").EventArgs>;
952
+ _cellFocusing: EventDispatcher<import("Controls/EventArgs").EventArgs>;
953
+ _cellFocused: EventDispatcher<import("Controls/EventArgs").EventArgs>;
954
+ _customDrawCell: EventDispatcher<import("Controls/EventArgs").EventArgs>;
955
+ _customDrawHeader: EventDispatcher<import("Controls/EventArgs").EventArgs>;
956
+ _rowCommand: EventDispatcher<import("Controls/EventArgs").EventArgs>;
957
+ _scrollHandler: (e: any) => boolean;
958
+ mouseWheelHandler: (e: any) => void;
959
+ get wrapper(): Element;
960
+ /**
961
+ * Returns a reference to the grid header DOM element.
962
+ * @returns {HTMLDivElement} The header element.
963
+ */
964
+ get header(): HTMLDivElement;
965
+ /**
966
+ * Returns a reference to the grid data table DOM element.
967
+ * @returns {HTMLDivElement} The data table element.
968
+ */
969
+ get dataTable(): HTMLDivElement;
970
+ /**
971
+ * Returns the array of DOM elements of the visible rows.
972
+ * @returns {Array} An array of row DOM elements.
973
+ * @private
974
+ */
975
+ private get visibleRows();
976
+ /**
977
+ * Returns the array of DOM elements of the visible cells.
978
+ * @returns {Array} A two-dimensional array of cell DOM elements.
979
+ * @private
980
+ */
981
+ private get visibleCells();
982
+ scroll: Element;
983
+ resizeHandler: (e: any) => void;
984
+ /**
985
+ * Called before the grid contents are rendered by the current renderer.
986
+ * @private
987
+ */
988
+ private onBeforeRender;
989
+ /**
990
+ * Called after the grid contents are rendered by the current renderer.
991
+ * @private
992
+ */
993
+ private onAfterRender;
994
+ rowHeight: number;
995
+ rowsCount: number;
996
+ stopEvents: boolean;
997
+ /**
998
+ * Repaints the grid contents.
999
+ * @param {Boolean} [selected] True to repaint only the selected rows.
1000
+ */
1001
+ refresh(selected?: boolean): Promise<any>;
1002
+ /**
1003
+ * Sets the focus to the cell at the specified position.
1004
+ * @param {Number} row The cell row.
1005
+ * @param {Number} column The cell column.
1006
+ * @param {Boolean} [moveBackwards] True to move backwards.
1007
+ * @remarks If the cell at the specified position is not editable, the focus is set
1008
+ * to the next editable cell, if such exists.
1009
+ */
1010
+ focusCell(row: number, column: number, moveBackwards?: boolean): void;
1011
+ /**
1012
+ * Selects the cell at the specified position.
1013
+ * @param {Number} row The cell row.
1014
+ * @param {Number} column The cell column.
1015
+ */
1016
+ selectCell(row: number, column: number): void;
1017
+ /**
1018
+ * Selects the rows in the specified range.
1019
+ * @param {Number} index The start index of the range to select.
1020
+ * @param {Number} [count] The length of the range.
1021
+ */
1022
+ selectRows(index: number, count?: number): void;
1023
+ /**
1024
+ * Gets the indices of selected rows.
1025
+ * @returns {Array} An array of indices.
1026
+ */
1027
+ get selectedRowIndices(): any[];
1028
+ /**
1029
+ * Gets the selected cells.
1030
+ * @returns {Array} An array of GridCell instances.
1031
+ */
1032
+ get selectedCells(): any[];
1033
+ /**
1034
+ * Invalidates the current renderer.
1035
+ * @private
1036
+ */
1037
+ private invalidateDom;
1038
+ /**
1039
+ * Repaints a range of rows.
1040
+ * @param {Number} index The start index of the row range to repaint.
1041
+ * @param {Number} [count] The length of the range.
1042
+ */
1043
+ refreshRows(index: number, count?: number): Promise<any>;
1044
+ /**
1045
+ * Adds a row.
1046
+ * @param {Object} rowData The values to add.
1047
+ * @param {Number} [index] Optional.
1048
+ */
1049
+ addRow(rowData: any, index?: number): Promise<any>;
1050
+ /**
1051
+ * Removes a range of rows.
1052
+ * @param {Number} index The start index of the row range to remove.
1053
+ * @param {Number} [count] The length of the range.
1054
+ */
1055
+ removeRows(index: number, count?: number): Promise<any>;
1056
+ /**
1057
+ * Removes a range of rows from the data table starting from the given index.
1058
+ * @param {Number} index The starting row index.
1059
+ * @param {Number} count The length of the range.
1060
+ * @private
1061
+ */
1062
+ private removeRowRange;
1063
+ scrollRangeInvalid: boolean;
1064
+ /**
1065
+ * Sorts by the specified column and sort direction.
1066
+ * @param {Number} index The index of the column to sort by, or null to clear the sorting.
1067
+ * @param {Boolean} [sortAscending] True to sort ascending, otherwise false.
1068
+ */
1069
+ sortByColumn(index: number, sortAscending?: boolean): void;
1070
+ set sortedColumn(arg: number);
1071
+ /**
1072
+ * Gets the index of the column, by which the data is sorted.
1073
+ * @returns {Number} The column index, or -1 if no sorting is applied to the grid.
1074
+ */
1075
+ get sortedColumn(): number;
1076
+ set sortAscending(arg: boolean);
1077
+ /**
1078
+ * Gets a value, indicating whether the sorting is in Ascending order.
1079
+ * @returns {Boolean} True if the sorting is in Ascending order, otherwise false.
1080
+ */
1081
+ get sortAscending(): boolean;
1082
+ /**
1083
+ * Calculates the scroll fix amount.
1084
+ * @private
1085
+ */
1086
+ private calcScrollFix;
1087
+ scrollFixAmount: number;
1088
+ /**
1089
+ * Updates the scroll range based on current rows count and height.
1090
+ * @private
1091
+ */
1092
+ private updateScrollRange;
1093
+ scrollIncrement: number;
1094
+ /**
1095
+ * Sets equal column widths in pixels based on flex calculations.
1096
+ * @private
1097
+ */
1098
+ private initColumnWidths;
1099
+ /**
1100
+ * For internal use only.
1101
+ * @private
1102
+ */
1103
+ private resizeColumn;
1104
+ /**
1105
+ * Sets the data model of this grid.
1106
+ * @param {GridModel} value The model.
1107
+ */
1108
+ set model(arg: GridModel);
1109
+ /**
1110
+ * Gets the effective data model of this grid.
1111
+ * @returns {GridModel} The model.
1112
+ */
1113
+ get model(): GridModel;
1114
+ /**
1115
+ * Refreshes the grid after external modifications to the grid model.
1116
+ */
1117
+ rebind(): void;
1118
+ /**
1119
+ * Sets the index of the first visible row.
1120
+ * @param {Number} row The row index.
1121
+ */
1122
+ set scrollRow(arg: number);
1123
+ /**
1124
+ * Gets the index of the first visible row.
1125
+ * @returns {Number} The row index.
1126
+ */
1127
+ get scrollRow(): number;
1128
+ get effectiveModel(): any;
1129
+ ensureProxyModel(): void;
1130
+ /**
1131
+ * Sets a value, indicating whether inplace editing is enabled.
1132
+ * @param {Boolean} value True if inplace editing is enabled, otherwise false.
1133
+ */
1134
+ set allowEdit(arg: boolean);
1135
+ /**
1136
+ * Gets a value, indicating whether inplace editing is enabled.
1137
+ * @returns {Boolean} True if inplace editing is enabled, otherwise false.
1138
+ */
1139
+ get allowEdit(): boolean;
1140
+ /**
1141
+ * Sets a value, indicating whether to show a new empty row at the bottom of the grid and a 'New row' option in the row context menu.
1142
+ * @param {Boolean} value True to show a new row, otherwise false.
1143
+ */
1144
+ set allowAppend(arg: boolean);
1145
+ /**
1146
+ * Gets a value, indicating whether to show a new empty row at the bottom of the grid and a 'New row' option in the row context menu.
1147
+ * @returns {Boolean} True to show a new row, otherwise false.
1148
+ */
1149
+ get allowAppend(): boolean;
1150
+ /**
1151
+ * Sets a value, indicating whether to show a 'Delete row' option in the row context menu.
1152
+ * @param {Boolean} value True to show the option, otherwise false.
1153
+ */
1154
+ set allowDelete(arg: boolean);
1155
+ /**
1156
+ * Gets a value, indicating whether to show a 'Delete row' option in the row context menu.
1157
+ * @returns {Boolean} True to show the option, otherwise false.
1158
+ */
1159
+ get allowDelete(): boolean;
1160
+ /**
1161
+ * Sets a value, indicating whether single cell selection is enabled.
1162
+ * @param {Boolean} value True if single cell selection is enabled, otherwise false.
1163
+ */
1164
+ set allowCellSelect(arg: boolean);
1165
+ /**
1166
+ * Gets a value, indicating whether single cell selection is enabled.
1167
+ * @returns {Boolean} True if single cell selection is enabled, otherwise false.
1168
+ */
1169
+ get allowCellSelect(): boolean;
1170
+ /**
1171
+ * Sets a value, indicating whether scrolling is enabled.
1172
+ * @param {Boolean} value True if scrolling is enabled, otherwise false.
1173
+ */
1174
+ set allowScroll(arg: boolean);
1175
+ /**
1176
+ * Gets a value, indicating whether scrolling is enabled.
1177
+ * @returns {Boolean} True if inplace scrolling is enabled, otherwise false.
1178
+ */
1179
+ get allowScroll(): boolean;
1180
+ set filter(arg: any);
1181
+ get filter(): any;
1182
+ onScroll(e: any): boolean;
1183
+ headerMouseOver(e: any): void;
1184
+ headerMouseLeave(e: any): void;
1185
+ columnHeaderContextMenu(e: any): void;
1186
+ contextMenu: HTMLDivElement | Menu;
1187
+ columnHeaderMouseDown(e: any): void;
1188
+ columnHeaderClicked(e: any): void;
1189
+ set focusedCell(arg: GridCell);
1190
+ /**
1191
+ * Gets the active grid cell.
1192
+ * @returns {GridCell} the cell.
1193
+ */
1194
+ get focusedCell(): GridCell;
1195
+ rowHeaderMouseDown(e: any): void;
1196
+ rowHeaderContextMenu(e: any): void;
1197
+ contextMenuCallback(item: any): void;
1198
+ tableKeyDown(e: any): void;
1199
+ tableKeyUp(e: any): void;
1200
+ tableCellClicked(e: any): void;
1201
+ /**
1202
+ * Gets the cell at the provided coordinates, if it is focusable, or the nearest focusable cell in the specified direction.
1203
+ * @param {Number} row The cell row.
1204
+ * @param {Number} column The cell column.
1205
+ * @param {Boolean} back True to search backwards.
1206
+ * @private
1207
+ */
1208
+ private getFocusableCell;
1209
+ moveFocusedCell(row: any, column: any, back: any): void;
1210
+ moveFocusedCellLeft(): void;
1211
+ moveFocusedCellRight(): void;
1212
+ get focusedItem(): GridCell | {
1213
+ row: any;
1214
+ column: number;
1215
+ };
1216
+ /**
1217
+ * Gets the DOM element of the cell in the specified coordinates.
1218
+ * @param {Number} row The cell row.
1219
+ * @param {Number} column The cell column.
1220
+ * @returns {HTMLDivElement} the cell's DOM element.
1221
+ */
1222
+ getCellElement(row: number, column: number): HTMLDivElement;
1223
+ /**
1224
+ * Gets the DOM element of the specified row.
1225
+ * @param {Number} row The row index.
1226
+ * @returns {HTMLDivElement} the row's DOM element.
1227
+ */
1228
+ getRowElement(row: number): HTMLDivElement;
1229
+ /**
1230
+ * Checks if the row at the specified index is currently visible.
1231
+ * @param {Number} row The row index.
1232
+ * @returns {Boolean} True if the row is visible, otherwise false.
1233
+ */
1234
+ isRowVisible(row: number): boolean;
1235
+ isCellVisible(row: any, column: any): boolean;
1236
+ /**
1237
+ * Scrolls to the specified row.
1238
+ * @param {Number} row The row.
1239
+ * @private
1240
+ */
1241
+ private bringRowIntoView;
1242
+ isRepainting: boolean;
1243
+ /**
1244
+ * Ensures that the specified row is visible.
1245
+ * @param {Number} row The row.
1246
+ */
1247
+ bringIntoView(row: number): Promise<any>;
1248
+ /**
1249
+ * Applies an additional translate transform to the data table when scrolling
1250
+ * to the first or last row, if the row is partly visible.
1251
+ * @param {Number} row The relative row index.
1252
+ * @private
1253
+ */
1254
+ private scrollFix;
1255
+ /**
1256
+ * Scrolls to the specified row.
1257
+ * @param {Number} row The row index.
1258
+ * @private
1259
+ */
1260
+ private scrollToRow;
1261
+ /**
1262
+ * Disposes the active grid cell editor.
1263
+ */
1264
+ disposeActiveEditor(): void;
1265
+ set activeEditor(arg: any);
1266
+ /**
1267
+ * Gets the active editor.
1268
+ * @returns {Object} The editor.
1269
+ */
1270
+ get activeEditor(): any;
1271
+ /**
1272
+ * Gets the index of the last grid row.
1273
+ * @private
1274
+ */
1275
+ private get lastRowIndex();
1276
+ /**
1277
+ * Gets the height of rows viewport.
1278
+ * @returns {Number} The height.
1279
+ * @private
1280
+ */
1281
+ private get contentHeight();
1282
+ /**
1283
+ * Gets the height of rows viewport minus the horizontal scrollbar height.
1284
+ * @returns {Number} The height.
1285
+ * @private
1286
+ */
1287
+ private get contentClientHeight();
1288
+ /**
1289
+ * Gets the width of the specified grid column.
1290
+ * @param {Number} column The column index.
1291
+ * @returns {Number} The width in pixels.
1292
+ */
1293
+ getColumnWidth(column: number): number;
1294
+ /**
1295
+ * Sets the width of the specified grid column.
1296
+ * @param {Number} column The column index.
1297
+ * @param {Number} width The width in pixels.
1298
+ */
1299
+ setColumnWidth(column: number, width: number): void;
1300
+ createContextMenu(x: any, y: any, items: any): void;
1301
+ /**
1302
+ * Disposes the current context menu.
1303
+ */
1304
+ disposeContextMenu(): void;
1305
+ /**
1306
+ * Sets selected rows after raising selection events.
1307
+ * @private
1308
+ */
1309
+ private setRowSelection;
1310
+ /**
1311
+ * Gets the row with the specified key.
1312
+ * @param {Object} key The key.
1313
+ * @returns {Number} The row index.
1314
+ */
1315
+ getKeyRow(key: any): number;
1316
+ /**
1317
+ * Gets the key of the row at the specified index.
1318
+ * @param {Number} index The row index.
1319
+ * @returns {Object} The row key.
1320
+ */
1321
+ getRowKey(index: number): any;
1322
+ /**
1323
+ * Recalculates grid's dimensions.
1324
+ * @remarks Use this method to recalculate the grid's dimensions after resizing.
1325
+ */
1326
+ adjust(): void;
1327
+ /**
1328
+ * For internal use only.
1329
+ * @private
1330
+ */
1331
+ private onResize;
1332
+ onMouseWheel(e: any): void;
1333
+ timeStamp: number;
1334
+ /**
1335
+ * Raises the corresponding validation event when a row action is performed.
1336
+ * @private
1337
+ */
1338
+ private onRowValidateAction;
1339
+ /**
1340
+ * Raises the corresponding notification event after a row action is performed.
1341
+ * @private
1342
+ */
1343
+ private onRowAction;
1344
+ /**
1345
+ * Adds an event to the queued events that will be raised after the grid finished repainting.
1346
+ * @private
1347
+ */
1348
+ private queueEvent;
1349
+ /**
1350
+ * Raises all queued events.
1351
+ * @private
1352
+ */
1353
+ private raiseQueuedEvents;
1354
+ /**
1355
+ * Raises the rowCommand event.
1356
+ * @private
1357
+ */
1358
+ private onRowCommand;
1359
+ /**
1360
+ * Raised when a row is rendered.
1361
+ * @event rowRendered
1362
+ * @type {EventDispatcher}
1363
+ * @property {Grid} sender
1364
+ * @property {RowModifiedEventArgs} args
1365
+ */
1366
+ get rowRendered(): EventDispatcher<any>;
1367
+ /**
1368
+ * Raised before a row is selected.
1369
+ * @event rowSelecting
1370
+ * @type {EventDispatcher}
1371
+ * @property {Grid} sender
1372
+ * @property {RowModifyingEventArgs} args
1373
+ */
1374
+ get rowSelecting(): EventDispatcher<any>;
1375
+ /**
1376
+ * Raised when a row is selected.
1377
+ * @event rowSelected
1378
+ * @type {EventDispatcher}
1379
+ * @property {Grid} sender
1380
+ * @property {RowModifiedEventArgs} args
1381
+ */
1382
+ get rowSelected(): EventDispatcher<any>;
1383
+ /**
1384
+ * Raised before a new row is created.
1385
+ * @event rowCreating
1386
+ * @type {EventDispatcher}
1387
+ * @property {Grid} sender
1388
+ * @property {RowModifyingEventArgs} args
1389
+ */
1390
+ get rowCreating(): EventDispatcher<any>;
1391
+ /**
1392
+ * Raised when a new row is created.
1393
+ * @event rowCreated
1394
+ * @type {EventDispatcher}
1395
+ * @property {Grid} sender
1396
+ * @property {RowModifiedEventArgs} args
1397
+ */
1398
+ get rowCreated(): EventDispatcher<any>;
1399
+ /**
1400
+ * Raised before a row is deleted.
1401
+ * @event rowDeleting
1402
+ * @type {EventDispatcher}
1403
+ * @property {Grid} sender
1404
+ * @property {RowModifyingEventArgs} args
1405
+ */
1406
+ get rowDeleting(): EventDispatcher<any>;
1407
+ /**
1408
+ * Raised when a row is deleted.
1409
+ * @event rowDeleted
1410
+ * @type {EventDispatcher}
1411
+ * @property {Grid} sender
1412
+ * @property {RowModifiedEventArgs} args
1413
+ */
1414
+ get rowDeleted(): EventDispatcher<any>;
1415
+ /**
1416
+ * Raised before a row is updated.
1417
+ * @event rowUpdating
1418
+ * @type {EventDispatcher}
1419
+ * @property {Grid} sender
1420
+ * @property {RowModifyingEventArgs} args
1421
+ */
1422
+ get rowUpdating(): EventDispatcher<any>;
1423
+ /**
1424
+ * Raised when a row is updated.
1425
+ * @event rowUpdated
1426
+ * @type {EventDispatcher}
1427
+ * @property {Grid} sender
1428
+ * @property {RowModifiedEventArgs} args
1429
+ */
1430
+ get rowUpdated(): EventDispatcher<any>;
1431
+ /**
1432
+ * Raised before a cell is selected.
1433
+ * @event cellSelecting
1434
+ * @type {EventDispatcher}
1435
+ * @property {Grid} sender
1436
+ * @property {CellEventArgs} args
1437
+ */
1438
+ get cellSelecting(): EventDispatcher<any>;
1439
+ /**
1440
+ * Raises the onCellSelecting event.
1441
+ * @private
1442
+ */
1443
+ private onCellSelecting;
1444
+ /**
1445
+ * Raised when a cell is selected.
1446
+ * @event cellSelected
1447
+ * @type {EventDispatcher}
1448
+ * @property {Grid} sender
1449
+ * @property {CellEventArgs} args
1450
+ */
1451
+ get cellSelected(): EventDispatcher<any>;
1452
+ /**
1453
+ * Raises the cellSelected event.
1454
+ * @private
1455
+ */
1456
+ private onCellSelected;
1457
+ /**
1458
+ * Raised before a cell is focused.
1459
+ * @event cellFocusing
1460
+ * @type {EventDispatcher}
1461
+ * @property {Grid} sender
1462
+ * @property {CellEventArgs} args
1463
+ */
1464
+ get cellFocusing(): EventDispatcher<any>;
1465
+ /**
1466
+ * Raises the cellFocusing event.
1467
+ * @private
1468
+ */
1469
+ private onCellFocusing;
1470
+ /**
1471
+ * Raised when a cell is focused.
1472
+ * @event cellFocused
1473
+ * @type {EventDispatcher}
1474
+ * @property {Grid} sender
1475
+ * @property {CellEventArgs} args
1476
+ */
1477
+ get cellFocused(): EventDispatcher<any>;
1478
+ /**
1479
+ * Raises the cellFocused event.
1480
+ * @private
1481
+ */
1482
+ private onCellFocused;
1483
+ /**
1484
+ * Raises the customDrawCell event.
1485
+ * @private
1486
+ */
1487
+ private onCustomDrawCell;
1488
+ /**
1489
+ * Raised when a cell's contents are about to be rendered, to allow custom drawing.
1490
+ * @event customDrawCell
1491
+ * @type {EventDispatcher}
1492
+ * @property {Grid} sender
1493
+ * @property {CellCustomDrawEventArgs} args
1494
+ */
1495
+ get customDrawCell(): EventDispatcher<any>;
1496
+ /**
1497
+ * Raises the customDrawHeader event.
1498
+ * @private
1499
+ */
1500
+ private onCustomDrawHeader;
1501
+ /**
1502
+ * Raised when a header cell's contents are about to be rendered, to allow custom drawing.
1503
+ * @event customDrawHeader
1504
+ * @type {EventDispatcher}
1505
+ * @property {Grid} sender
1506
+ * @property {CellCustomDrawEventArgs} args
1507
+ */
1508
+ get customDrawHeader(): EventDispatcher<any>;
1509
+ /**
1510
+ * Raised when a command is executed on a row.
1511
+ * @event rowCommand
1512
+ * @type {EventDispatcher}
1513
+ * @property {Grid} sender
1514
+ * @property {RowModifyingEventArgs} args
1515
+ */
1516
+ get rowCommand(): EventDispatcher<any>;
1517
+ }
1518
+ import { UIControl } from "DataViews/jsdv/src/UIControl";
1519
+ import { Unit } from "@mindfusion/common";
1520
+ import ProxyModel from "DataViews/jsdv/src/ProxyModel";
1521
+ import Selection from "DataViews/jsdv/src/Selection";
1522
+ import { EventDispatcher } from "@mindfusion/common";
1523
+ import { GridModel } from "DataViews/jsdv/src/GridModel";
1524
+ import { Menu } from "@mindfusion/common-ui";
1525
+ import { GridCell } from "DataViews/jsdv/src/GridCell";
1526
+ }
1527
+ declare module "DataViews/jsdv/src/GridColumn" {
1528
+ /**
1529
+ * @class Represents a column in a grid control.
1530
+ * @property {String} name Gets or sets the name of the field, displayed in the column.
1531
+ * @property {DataType} dataType Gets or sets the type of the column.
1532
+ * @property {Map} metaData Gets or sets the metadata object, associated with this column.
1533
+ * @property {String} caption Gets or sets the display text of the column.
1534
+ * @property {Boolean} editable Gets or sets a value indicating whether the cells in this column can be edited.
1535
+ * @property {Boolean} sortable Gets or sets a value indicating whether this column can be sorted.
1536
+ */
1537
+ export class GridColumn {
1538
+ /**
1539
+ * Initializes a new instance of the GridColumn class.
1540
+ * @constructor
1541
+ * @param {String} [name] The name of the field, displayed in the column.
1542
+ * @param {DataType} [dataType] The type of the column.
1543
+ * @param {Boolean} [editable] A value indicating whether the cells in this column can be edited.
1544
+ */
1545
+ constructor(name?: string, dataType?: any, editable?: boolean);
1546
+ _name: string;
1547
+ _dataType: any;
1548
+ _metaData: Map<any, any>;
1549
+ _editable: boolean;
1550
+ _sortable: boolean;
1551
+ /**
1552
+ * Sets the name of the field, displayed in the column.
1553
+ * @param {String} value The field name.
1554
+ */
1555
+ set name(arg: string);
1556
+ /**
1557
+ * Gets the name of the field, displayed in the column.
1558
+ * @returns {String} The field name.
1559
+ */
1560
+ get name(): string;
1561
+ /**
1562
+ * Sets the type of this column.
1563
+ * @param {DataType} value The type.
1564
+ */
1565
+ set dataType(arg: any);
1566
+ /**
1567
+ * Gets the type of this column.
1568
+ * @returns {DataType} The type.
1569
+ */
1570
+ get dataType(): any;
1571
+ /**
1572
+ * Sets the metadata, associated with this column.
1573
+ * @param {Map} value The metadata.
1574
+ */
1575
+ set metaData(arg: Map<any, any>);
1576
+ /**
1577
+ * Gets the metadata, associated with this column.
1578
+ * @returns {Map} The metadata,
1579
+ */
1580
+ get metaData(): Map<any, any>;
1581
+ /**
1582
+ * Sets the text, diplayed in the header of this column.
1583
+ * @param {String} value The display text.
1584
+ */
1585
+ set caption(arg: string);
1586
+ /**
1587
+ * Gets the text, diplayed in the header of this column.
1588
+ * @returns {String} The display text.
1589
+ */
1590
+ get caption(): string;
1591
+ _caption: string;
1592
+ /**
1593
+ * Sets a value, indicating whether the cells in this column can be edited.
1594
+ * @param {Boolean} value True if the cells in this column can be edited, otherwise false.
1595
+ */
1596
+ set editable(arg: boolean);
1597
+ /**
1598
+ * Gets a value, indicating whether the cells in this column can be edited.
1599
+ * @returns {Boolean} True if the cells in this column can be edited, otherwise false.
1600
+ */
1601
+ get editable(): boolean;
1602
+ /**
1603
+ * Sets a value, indicating whether this column can be sorted.
1604
+ * @param {Boolean} value True if the column can be sorted, otherwise false.
1605
+ */
1606
+ set sortable(arg: boolean);
1607
+ /**
1608
+ * Gets a value, indicating whether this column can be sorted.
1609
+ * @returns {Boolean} True if the column can be sorted, otherwise false.
1610
+ */
1611
+ get sortable(): boolean;
1612
+ }
1613
+ }
1614
+ declare module "DataViews/jsdv/src/LookupType" {
1615
+ /**
1616
+ * @class Provides functionality for grid columns, that display lookup or value lists.
1617
+ */
1618
+ export class LookupType extends DataType {
1619
+ static sortFunction(value1: any, value2: any): any;
1620
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLSelectElement;
1621
+ static format(value: any, meta: any): any;
1622
+ static equals(value1: any, value2: any): boolean;
1623
+ }
1624
+ import DataType from "DataViews/jsdv/src/DataType";
1625
+ }
1626
+ declare module "@mindfusion/dataviews" {
1627
+ export { ArrayModel } from "DataViews/jsdv/src/ArrayModel";
1628
+ export { Command } from "DataViews/jsdv/src/Command";
1629
+ export { CommandType } from "DataViews/jsdv/src/CommandType";
1630
+ export { CurrencyType } from "DataViews/jsdv/src/CurrencyType";
1631
+ export { DateTimeType } from "DataViews/jsdv/src/DateTimeType";
1632
+ export { DateType } from "DataViews/jsdv/src/DateType";
1633
+ export { DeleteCommand } from "DataViews/jsdv/src/DeleteCommand";
1634
+ export { DomRenderer } from "DataViews/jsdv/src/DomRenderer";
1635
+ import { RowAction } from "DataViews/jsdv/src/Enum";
1636
+ import { CellCustomDrawEventArgs, CellEventArgs, CellValidateEventArgs, CommandEventArgs, RowModifiedEventArgs, RowModifyingEventArgs } from "DataViews/jsdv/src/EventArgs";
1637
+ export { RowAction, CellCustomDrawEventArgs, CellEventArgs, CellValidateEventArgs, CommandEventArgs, RowModifiedEventArgs, RowModifyingEventArgs };
1638
+ export { Grid } from "DataViews/jsdv/src/Grid";
1639
+ export { GridCell } from "DataViews/jsdv/src/GridCell";
1640
+ export { GridColumn } from "DataViews/jsdv/src/GridColumn";
1641
+ export { GridModel } from "DataViews/jsdv/src/GridModel";
1642
+ export { ImageType } from "DataViews/jsdv/src/ImageType";
1643
+ export { IntegerType } from "DataViews/jsdv/src/IntegerType";
1644
+ export { LookupType } from "DataViews/jsdv/src/LookupType";
1645
+ export { RealNumberType } from "DataViews/jsdv/src/RealNumberType";
1646
+ export { StringType } from "DataViews/jsdv/src/StringType";
1647
+ export { UIControl } from "DataViews/jsdv/src/UIControl";
1648
+ }