@mindfusion/dataviews 2.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,8 @@
1
- /// <reference types="../../@mindfusion/controls" />
2
1
  /// <reference types="../../@mindfusion/common-ui" />
2
+ /// <reference types="../../@mindfusion/controls" />
3
3
  /// <reference types="../../@mindfusion/common" />
4
- declare module "DataViews/jsdv/src/Command" {
4
+ declare module "DataViews/jsdv/src/DataType" {
5
+ export default DataType;
5
6
  /**
6
7
  * @namespace MindFusion.DataViews
7
8
  */
@@ -14,29 +15,13 @@ declare module "DataViews/jsdv/src/Command" {
14
15
  * to use the source code in any other way, please contact us at support@mindfusion.eu.
15
16
  */
16
17
  /**
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;
18
+ * @class A base class for data types.
19
+ */
20
+ class DataType {
21
+ static sortFunction(value1: any, value2: any): void;
22
+ static createEditor(element: any, displayValue: any, value: any, view: any): void;
23
+ static parse(text: any): void;
24
+ static equals(value1: any, value2: any): void;
40
25
  }
41
26
  }
42
27
  declare module "DataViews/jsdv/src/Enum" {
@@ -51,260 +36,9 @@ declare module "DataViews/jsdv/src/Enum" {
51
36
  const Delete: number;
52
37
  const Command: number;
53
38
  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;
39
+ const Load: number;
40
+ const Expand: number;
41
+ const Collapse: number;
308
42
  }
309
43
  }
310
44
  declare module "DataViews/jsdv/src/StringType" {
@@ -314,11 +48,12 @@ declare module "DataViews/jsdv/src/StringType" {
314
48
  export class StringType extends DataType {
315
49
  static sortFunction(value1: any, value2: any): any;
316
50
  static createEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement;
317
- static updateValueFromInput(newValue: any, element: any, view: any): void;
51
+ static updateValueFromInput(newValue: any, element: any, view: any, row: any, column: any): void;
318
52
  static updateCell(view: any, element: any, r: any, c: any, displayValue: any): void;
319
53
  static parse(text: any): any;
320
54
  static format(value: any, meta: any): any;
321
55
  static equals(value1: any, value2: any): boolean;
56
+ static get textAlign(): string;
322
57
  }
323
58
  import DataType from "DataViews/jsdv/src/DataType";
324
59
  }
@@ -328,6 +63,7 @@ declare module "DataViews/jsdv/src/DateType" {
328
63
  */
329
64
  export class DateType extends DataType {
330
65
  static sortFunction(value1: any, value2: any): number;
66
+ static get customEditor(): DateTimePicker;
331
67
  static createEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement | DateTimePicker;
332
68
  static createDefaultEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement;
333
69
  static createCustomEditor(editor: any, options: any, element: any, displayValue: any, value: any, view: any): void;
@@ -346,28 +82,90 @@ declare module "DataViews/jsdv/src/DateTimeType" {
346
82
  }
347
83
  import { DateType } from "DataViews/jsdv/src/DateType";
348
84
  }
349
- declare module "DataViews/jsdv/src/ImageType" {
85
+ declare module "DataViews/jsdv/src/BooleanType" {
350
86
  /**
351
- * @class Provides functionality for grid columns, that display image data.
87
+ * @class Provides functionality for grid columns, that display boolean data.
352
88
  */
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;
89
+ export class BooleanType extends StringType {
90
+ static sortFunction(value1: any, value2: any): number;
91
+ static parse(text: any): boolean;
92
+ static format(value: any, meta: any): string;
93
+ }
94
+ import { StringType } from "DataViews/jsdv/src/StringType";
95
+ }
96
+ declare module "DataViews/jsdv/src/ObjectType" {
97
+ /**
98
+ * @class Provides functionality for grid cells, that display expandable objects.
99
+ */
100
+ export class ObjectType extends DataType {
101
+ static sortFunction(value1: any, value2: any): number;
102
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLButtonElement;
359
103
  static parse(text: any): any;
104
+ static format(value: any, meta: any): any;
360
105
  static equals(value1: any, value2: any): boolean;
106
+ }
107
+ import DataType from "DataViews/jsdv/src/DataType";
108
+ }
109
+ declare module "DataViews/jsdv/src/IntegerType" {
110
+ /**
111
+ * @class Provides functionality for grid columns, that display integer data.
112
+ */
113
+ export class IntegerType extends DataType {
114
+ static sortFunction(value1: any, value2: any): number;
115
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement;
116
+ static parse(text: any): number;
361
117
  static format(value: any, meta: any): string;
118
+ static equals(value1: any, value2: any): boolean;
119
+ static get textAlign(): string;
120
+ }
121
+ import DataType from "DataViews/jsdv/src/DataType";
122
+ }
123
+ declare module "DataViews/jsdv/src/LookupType" {
124
+ /**
125
+ * @class Provides functionality for grid columns, that display lookup or value lists.
126
+ */
127
+ export class LookupType extends DataType {
128
+ static sortFunction(value1: any, value2: any): any;
129
+ static get customEditor(): CheckListPicker;
130
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLSelectElement | CheckListPicker;
131
+ static createDefaultEditor(element: any, displayValue: any, value: any, view: any): HTMLSelectElement;
132
+ static createCustomEditor(editor: any, options: any, element: any, displayValue: any, value: any, view: any): void;
133
+ static format(value: any, meta: any): any;
134
+ static equals(value1: any, value2: any): boolean;
135
+ }
136
+ import DataType from "DataViews/jsdv/src/DataType";
137
+ import { CheckListPicker } from "@mindfusion/common-ui";
138
+ }
139
+ declare module "DataViews/jsdv/src/RealNumberType" {
140
+ /**
141
+ * @class Provides functionality for grid columns, that display real number data.
142
+ */
143
+ export class RealNumberType extends IntegerType {
144
+ }
145
+ import { IntegerType } from "DataViews/jsdv/src/IntegerType";
146
+ }
147
+ declare module "DataViews/jsdv/src/DynamicType" {
148
+ /**
149
+ * @class Provides functionality for grid columns, that display data of different types.
150
+ */
151
+ export class DynamicType extends DataType {
152
+ static sortFunction(valueObj1: any, valueObj2: any): any;
153
+ static resolveValueType(value: any, meta: any): any;
154
+ static createEditor(element: any, displayValue: any, value: any, view: any): any;
155
+ static parse(text: any): any;
156
+ static format(value: any, meta: any): any;
157
+ static equals(value1: any, value2: any): any;
158
+ static get textAlign(): string;
159
+ static resolveDataTypeCallback(): any;
160
+ static getCellValueCallback(): any;
161
+ static resolveCellMetaDataCallback(): any;
162
+ static formatCellValueCallback(text: any): any;
362
163
  }
363
164
  import DataType from "DataViews/jsdv/src/DataType";
364
- import { ImagePicker } from "@mindfusion/common-ui";
365
165
  }
366
166
  declare module "DataViews/jsdv/src/ArrayModel" {
367
167
  /**
368
168
  * @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
169
  */
372
170
  export class ArrayModel {
373
171
  /**
@@ -428,12 +226,32 @@ declare module "DataViews/jsdv/src/ArrayModel" {
428
226
  */
429
227
  columnSortable(column: number): boolean;
430
228
  /**
229
+ * Gets a value, indicating whether the specified column is currently displayed.
230
+ * @param {Number} column The column index.
231
+ * @returns {Boolean} True if the specified column should not be displayed, otherwise false.
232
+ */
233
+ columnHidden(column: number): boolean;
234
+ /**
431
235
  * Gets the column meta data object.
432
236
  * @param {Number} column The column index.
433
237
  * @returns {Map} A Map instance containing the column meta data.
434
238
  */
435
239
  columnMetaData(column: number): Map<any, any>;
436
240
  /**
241
+ * Gets the cell meta data object.
242
+ * @param {Number} row The row index.
243
+ * @param {Number} column The column index.
244
+ * @returns {Map} A Map instance containing the cell meta data.
245
+ */
246
+ cellMetaData(row: number, column: number): Map<any, any>;
247
+ /**
248
+ * Gets the cell data type.
249
+ * @param {Number} row The row index.
250
+ * @param {Number} column The column index.
251
+ * @returns {DataType} The data type of the cell.
252
+ */
253
+ cellDataType(row: number, column: number): any;
254
+ /**
437
255
  * Sets a value at the specified position.
438
256
  * @param {Number} row The row index.
439
257
  * @param {Number} column The column index.
@@ -474,55 +292,19 @@ declare module "DataViews/jsdv/src/ArrayModel" {
474
292
  deleteRow(row: number): void;
475
293
  /**
476
294
  * Gets the number of array items.
477
- * @returns {Number} The row count.
295
+ * @type {Number}
296
+ * @summary The row count.
478
297
  */
479
298
  get rowCount(): number;
480
299
  /**
481
300
  * Gets the number of display columns.
482
- * @returns {Number} The column count.
301
+ * @type {Number}
302
+ * @summary The column count.
483
303
  */
484
304
  get columnCount(): number;
485
305
  }
486
306
  }
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" {
307
+ declare module "DataViews/jsdv/src/Command" {
526
308
  /**
527
309
  * @namespace MindFusion.DataViews
528
310
  */
@@ -535,188 +317,414 @@ declare module "DataViews/jsdv/src/DomRenderer" {
535
317
  * to use the source code in any other way, please contact us at support@mindfusion.eu.
536
318
  */
537
319
  /**
538
- * @class A base class for grid renderers.
320
+ * @class A base class for grid row commands.
539
321
  */
540
- export class DomRenderer {
322
+ export class Command {
541
323
  /**
542
- * Sets the grid control this renderer is attached to.
324
+ * Override this method in a derived class to customize the command controller.
325
+ * @param {Object} [sender] Optional.
326
+ * @param {Object} [args] Optional.
327
+ * @returns {HTMLElement} The controller.
543
328
  */
544
- set grid(arg: any);
329
+ static createControl(sender?: any, args?: any): HTMLElement;
545
330
  /**
546
- * Gets the grid control this renderer is attached to.
331
+ * Gets the command string identifier.
332
+ * @type {String}
333
+ * @summary Override this property in a derived class to set the command string identifier.
547
334
  */
548
- get grid(): any;
549
- _grid: any;
335
+ static get commandName(): string;
550
336
  /**
551
- * Implement this property in a derived class to provide access to the array of DOM elements of the visible rows.
337
+ * Gets the event, that will trigger the command action.
338
+ * @type {String}
339
+ * @summary Override this property in a derived class to change the trigger event for the command action.
552
340
  */
553
- get visibleRows(): void;
341
+ static get eventName(): string;
554
342
  /**
555
- * Implement this property in a derived class to provide access to the array of DOM elements of the visible cells.
343
+ * Attaches the handler to the controller.
344
+ * @private
556
345
  */
557
- get visibleCells(): void;
346
+ private static attach;
347
+ }
348
+ }
349
+ declare module "DataViews/jsdv/src/EventArgs" {
350
+ /**
351
+ * @class Specifies data for row action validation events.
352
+ * @augments CancelEventArgs
353
+ */
354
+ export class RowModifyingEventArgs extends CancelEventArgs {
558
355
  /**
559
- * Implement this method in a derived class to handle the initial rendering of the grid control.
356
+ * Initializes a new instance of the RowModifyingEventArgs class.
357
+ * @constructor
358
+ * @param {Number} row The index of the row that is being modified.
359
+ * @param {RowAction} action The row action.
360
+ * @param {Object} rowData The row data.
361
+ * @param {Map} oldValues The dictionary of the original field name/value pairs.
362
+ * @param {Map} newValues The dictionary of the new field name/value pairs.
560
363
  */
561
- renderGrid(): void;
364
+ constructor(row: number, action: RowAction, rowData: any, oldValues: Map<any, any>, newValues: Map<any, any>);
365
+ _row: number;
366
+ _action: number;
367
+ _rowData: any;
368
+ _oldValues: Map<any, any>;
369
+ _newValues: Map<any, any>;
562
370
  /**
563
- * Implement this method in a derived class to handle re-rendering of the grid control.
371
+ * Gets the row that is being modified.
372
+ * @type {Number}
373
+ * @summary The index of the row that is being modified.
564
374
  */
565
- invalidate(): void;
375
+ get row(): number;
566
376
  /**
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.
377
+ * Gets the row data.
378
+ * @type {Object}
379
+ * @summary An object containing the row data.
570
380
  */
571
- refreshRows(index: number, count: number): void;
381
+ get rowData(): any;
572
382
  /**
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.
383
+ * Gets the row action.
384
+ * @type {RowAction}
385
+ * @summary One of the RowAction enumeration values.
576
386
  */
577
- updateCell(row: number, column: number): void;
387
+ get action(): number;
578
388
  /**
579
- * Implement this method in a derived class to handle row creation.
389
+ * Gets the dictionary of the original field name/value pairs.
390
+ * @type {Map}
391
+ * @summary The dictionary of the original field name/value pairs.
580
392
  */
581
- onRowCreated(): void;
393
+ get oldValues(): Map<any, any>;
582
394
  /**
583
- * Implement this method in a derived class to handle row deletion.
395
+ * Gets the dictionary of the new field name/value pairs.
396
+ * @type {Map}
397
+ * @summary The dictionary of the new field name/value pairs.
584
398
  */
585
- onRowDeleted(): void;
399
+ get newValues(): Map<any, any>;
400
+ }
401
+ /**
402
+ * @class Specifies data for row action notification events.
403
+ * @augments EventArgs
404
+ */
405
+ export class RowModifiedEventArgs extends EventArgs {
586
406
  /**
587
- * Implement this method in a derived class to handle scrolling.
407
+ * Initializes a new instance of the RowModifiedEventArgs class.
408
+ * @constructor
409
+ * @param {Number} row The index of the row that was modified.
410
+ * @param {RowAction} action The row action.
411
+ * @param {Object} rowData The row data.
412
+ * @param {Map} oldValues The dictionary of the original field name/value pairs.
413
+ * @param {Map} newValues The dictionary of the new field name/value pairs.
588
414
  */
589
- onScroll(): void;
415
+ constructor(row: number, action: RowAction, rowData: any, oldValues: Map<any, any>, newValues: Map<any, any>);
416
+ _row: number;
417
+ _action: number;
418
+ _rowData: any;
419
+ _oldValues: Map<any, any>;
420
+ _newValues: Map<any, any>;
590
421
  /**
591
- * Implement this method in a derived class to handle selection.
422
+ * Gets the row that was modified.
423
+ * @type {Number}
424
+ * @summary The index of the row that was modified.
592
425
  */
593
- onSelect(): void;
426
+ get row(): number;
594
427
  /**
595
- * Implement this method in a derived class to handle sorting.
428
+ * Gets the row data.
429
+ * @type {Object}
430
+ * @summary An object containing the row data.
596
431
  */
597
- onSort(): void;
432
+ get rowData(): any;
433
+ /**
434
+ * Gets the row action.
435
+ * @type {RowAction}
436
+ * @summary One of the RowAction enumeration values.
437
+ */
438
+ get action(): number;
439
+ /**
440
+ * Gets the dictionary of the original field name/value pairs.
441
+ * @type {Map}
442
+ * @summary The dictionary of the original field name/value pairs.
443
+ */
444
+ get oldValues(): Map<any, any>;
445
+ /**
446
+ * Gets the dictionary of the new field name/value pairs.
447
+ * @type {Map}
448
+ * @summary The dictionary of the new field name/value pairs.
449
+ */
450
+ get newValues(): Map<any, any>;
598
451
  }
599
- }
600
- declare module "DataViews/jsdv/src/UIControl" {
601
452
  /**
602
- * @class A base class for UI controls.
453
+ * @class Specifies data for the rowCommand event.
454
+ * @augments RowModifyingEventArgs
603
455
  */
604
- export class UIControl extends Control {
605
- setLicenseKey(value: any): void;
456
+ export class CommandEventArgs extends RowModifyingEventArgs {
457
+ /**
458
+ * Initializes a new instance of the RowModifiedEventArgs class.
459
+ * @constructor
460
+ * @param {String} commandName The string identifier of the executed command.
461
+ * @param {HTMLElement} control The controller that triggered the command.
462
+ * @param {Number} row The index of the row, for which the command is executed.
463
+ * @param {Object} rowData The row data.
464
+ */
465
+ constructor(commandName: string, control: HTMLElement, row: number, rowData: any);
466
+ _commandName: string;
467
+ _control: HTMLElement;
468
+ /**
469
+ * Gets the string identifier of the executed command.
470
+ * @type {String}
471
+ * @summary The command name.
472
+ */
473
+ get commandName(): string;
474
+ /**
475
+ * Gets the controller that triggered the command.
476
+ * @type {HTMLElement}
477
+ * @summary The HTML control.
478
+ */
479
+ get control(): HTMLElement;
606
480
  }
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;
481
+ /**
482
+ * @class Provides data for the cell related validation events.
483
+ * @augments CancelEventArgs
484
+ */
485
+ export class CellValidateEventArgs extends CancelEventArgs {
486
+ /**
487
+ * Initializes a new instance of the CellValidateEventArgs class.
488
+ * @constructor
489
+ * @param {Number} row The row index of the cell.
490
+ * @param {Number} column The column index of the cell.
491
+ */
492
+ constructor(row: number, column: number, value: any, displayValue: any);
493
+ _row: number;
494
+ _column: number;
495
+ _value: any;
496
+ _displayValue: any;
497
+ /**
498
+ * Gets the row of the cell, associated with the event.
499
+ * @type {Number}
500
+ * @summary The row index.
501
+ */
502
+ get row(): number;
503
+ /**
504
+ * Gets the column of the cell, associated with the event.
505
+ * @type {Number}
506
+ * @summary The column index.
507
+ */
508
+ get column(): number;
509
+ /**
510
+ * Gets the column of the cell, associated with the event.
511
+ * @type {Number}
512
+ * @summary The column index.
513
+ */
514
+ get value(): number;
515
+ /**
516
+ * Gets the column of the cell, associated with the event.
517
+ * @returns {Number} The column index.
518
+ */
519
+ get displayValuelu(): number;
643
520
  }
644
- }
645
- declare module "DataViews/jsdv/src/GridRenderer" {
646
- export default GridRenderer;
647
521
  /**
648
- * @class Contains render methods for a grid control.
522
+ * @class Provides data for the cell related notification events.
523
+ * @augments EventArgs
649
524
  */
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;
525
+ export class CellEventArgs extends EventArgs {
526
+ /**
527
+ * Initializes a new instance of the CellEventArgs class.
528
+ * @constructor
529
+ * @param {Number} row The row index of the cell.
530
+ * @param {Number} column The column index of the cell.
531
+ */
532
+ constructor(row: number, column: number, value: any, displayValue: any);
533
+ _row: number;
534
+ _column: number;
535
+ _value: any;
536
+ _displayValue: any;
537
+ /**
538
+ * Gets the row of the cell, associated with the event.
539
+ * @type {Number}
540
+ * @summary The row index.
541
+ */
542
+ get row(): number;
543
+ /**
544
+ * Gets the column of the cell, associated with the event.
545
+ * @type {Number}
546
+ * @summary The column index.
547
+ */
548
+ get column(): number;
549
+ /**
550
+ * Gets the column of the cell, associated with the event.
551
+ * @returns {Number} The column index.
552
+ */
553
+ get value(): number;
554
+ /**
555
+ * Gets the column of the cell, associated with the event.
556
+ * @returns {Number} The column index.
557
+ */
558
+ get displayValuelu(): number;
664
559
  }
665
- import { DomRenderer } from "DataViews/jsdv/src/DomRenderer";
666
- }
667
- declare module "DataViews/jsdv/src/Selection" {
668
- export default Selection;
669
560
  /**
670
- * @namespace MindFusion.DataViews
561
+ * @class Provides data for custom draw events.
562
+ * @augments CellEventArgs
671
563
  */
564
+ export class CellCustomDrawEventArgs extends CellEventArgs {
565
+ /**
566
+ * Initializes a new instance of the CellCustomDrawEventArgs class.
567
+ * @constructor
568
+ * @param {Number} row The row index of the cell.
569
+ * @param {Number} column The column index of the cell.
570
+ * @param {Node} defaultContent The default content displayed in the cell.
571
+ */
572
+ constructor(row: number, column: number, defaultContent: Node);
573
+ _defaultContent: Node;
574
+ /**
575
+ * Gets the default content, displayed in the cell.
576
+ * @type {Node}
577
+ * @summary The default content.
578
+ */
579
+ get defaultContent(): Node;
580
+ set content(arg: Node);
581
+ /**
582
+ * Gets or sets the new content to be displayed in the cell.
583
+ * @type {Node}
584
+ * @summary The new content.
585
+ */
586
+ get content(): Node;
587
+ _content: Node;
588
+ }
672
589
  /**
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
- */
590
+ * @class Provides data for events, raised by dynamic columns.
591
+ * @augments EventArgs
592
+ */
593
+ export class CellResolveEventArgs extends EventArgs {
594
+ /**
595
+ * Initializes a new instance of the CellResolveEventArgs class.
596
+ * @constructor
597
+ * @param {Number} row The row index of the cell.
598
+ * @param {Number} column The column index of the cell.
599
+ * @param {Object} value The cell value.
600
+ * @param {Object} result The data, passed back from the event.
601
+ */
602
+ constructor(row: number, column: number, value: any, result: any);
603
+ _row: number;
604
+ _column: number;
605
+ _value: any;
606
+ _result: any;
607
+ /**
608
+ * Gets the row of the cell, associated with the event.
609
+ * @type {Number}
610
+ * @summary The row index.
611
+ */
612
+ get row(): number;
613
+ /**
614
+ * Gets the column of the cell, associated with the event.
615
+ * @type {Number}
616
+ * @summary The column index.
617
+ */
618
+ get column(): number;
619
+ /**
620
+ * Gets the value of the cell, associated with the event.
621
+ * @returns {Object} The cell value.
622
+ */
623
+ get value(): any;
624
+ set result(arg: any);
625
+ /**
626
+ * Gets or sets the data, passed from the event.
627
+ * @returns {Object} The result.
628
+ */
629
+ get result(): any;
630
+ }
680
631
  /**
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.
632
+ * @class Provides data for events raised by the PropertyGrid control.
633
+ * @augments CancelEventArgs
685
634
  */
686
- class Selection {
635
+ export class PropertyEventArgs extends CancelEventArgs {
687
636
  /**
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[];
637
+ * Initializes a new instance of the PropertyEventArgs class.
638
+ * @constructor
639
+ * @param {RowAction} action The action associated with the event.
640
+ * @param {String} propertyName The name of the property.
641
+ * @param {Object} propertyValue The value of the property.
642
+ * @param {Object} oldValue The value of the property.
643
+ * @param {Number} index The index of the object, associated with the event.
644
+ * @param {Map} meta The metaData of the property.
645
+ */
646
+ constructor(action: RowAction, propertyName: string, index: number, propertyValue: any, oldValue: any, newValue: any, meta: Map<any, any>);
647
+ _action: number;
648
+ _propertyName: string;
649
+ _index: number;
650
+ _propertyValue: any;
651
+ _oldValue: any;
652
+ _newValue: any;
653
+ _meta: Map<any, any>;
696
654
  /**
697
- * Sets the array of selected cells.
698
- * @param {Array} value The array.
655
+ * Gets the action associated with the event.
656
+ * @type {RowAction}
657
+ * @summary One of the RowAction enumeration values.
699
658
  */
700
- set cells(arg: any[]);
659
+ get action(): number;
701
660
  /**
702
- * Gets the array of selected cells.
703
- * @returns {Array} The array of selected cells.
661
+ * Gets the name of the property.
662
+ * @type {String}
663
+ * @summary The property name.
704
664
  */
705
- get cells(): any[];
706
- _columns: any[];
665
+ get propertyName(): string;
707
666
  /**
708
- * Sets the array of selected rows.
709
- * @param {Array} value The array.
667
+ * Gets the index of the object associated with the event.
668
+ * @type {Number}
669
+ * @summary The index.
710
670
  */
711
- set rows(arg: any[]);
671
+ get index(): number;
712
672
  /**
713
- * Gets the array of selected rows.
714
- * @returns {Array} The array of selected rows.
673
+ * Gets the value of the property.
674
+ * @type {Object}
675
+ * @summary The property value.
715
676
  */
716
- get rows(): any[];
677
+ get propertyValue(): any;
678
+ /**
679
+ * Gets the old value of the property.
680
+ * @type {Object}
681
+ * @summary The old property value.
682
+ */
683
+ get oldValue(): any;
684
+ set newValue(arg: any);
685
+ /**
686
+ * Gets or sets the new value of the property.
687
+ * @type {Object}
688
+ * @summary The new property value.
689
+ */
690
+ get newValue(): any;
691
+ /**
692
+ * Gets the metaData of the property.
693
+ * @type {Map}
694
+ * @summary The metaData dictionary.
695
+ */
696
+ get meta(): Map<any, any>;
717
697
  }
698
+ import { CancelEventArgs } from "@mindfusion/controls";
699
+ import { RowAction } from "DataViews/jsdv/src/Enum";
700
+ import { EventArgs } from "@mindfusion/controls";
718
701
  }
719
- declare module "DataViews/jsdv/src/GridModel" {
702
+ declare module "DataViews/jsdv/src/CommandType" {
703
+ /**
704
+ * @class Provides functionality for command columns.
705
+ */
706
+ export class CommandType {
707
+ static createContent(element: any, view: any): void;
708
+ }
709
+ }
710
+ declare module "DataViews/jsdv/src/CurrencyType" {
711
+ /**
712
+ * @class Provides functionality for grid columns, that display currency data.
713
+ */
714
+ export class CurrencyType extends RealNumberType {
715
+ }
716
+ import { RealNumberType } from "DataViews/jsdv/src/RealNumberType";
717
+ }
718
+ declare module "DataViews/jsdv/src/DeleteCommand" {
719
+ /**
720
+ * @class Handles row deletion, triggered by a command grid column.
721
+ */
722
+ export class DeleteCommand extends Command {
723
+ static execute(sender: any, args: any): void;
724
+ }
725
+ import { Command } from "DataViews/jsdv/src/Command";
726
+ }
727
+ declare module "DataViews/jsdv/src/DomRenderer" {
720
728
  /**
721
729
  * @namespace MindFusion.DataViews
722
730
  */
@@ -729,216 +737,1199 @@ declare module "DataViews/jsdv/src/GridModel" {
729
737
  * to use the source code in any other way, please contact us at support@mindfusion.eu.
730
738
  */
731
739
  /**
732
- * @class The interface for grid models.
740
+ * @class A base class for grid renderers.
733
741
  */
734
- export class GridModel {
742
+ export class DomRenderer {
743
+ set grid(arg: any);
735
744
  /**
736
- * Gets the key of the specified row.
737
- * @returns {Object} The key.
745
+ * Gets or sets the grid control this renderer is attached to.
746
+ * @type {Grid}
747
+ * @summary The grid control.
738
748
  */
739
- getRowKey(row: any): any;
749
+ get grid(): any;
750
+ _grid: any;
740
751
  /**
741
- * Gets the row with the specified key.
742
- * @returns {Number} The row index.
752
+ * Gets the array of DOM elements of the visible rows.
753
+ * @type {HTMLCollection}
754
+ * @summary Implement this property in a derived class to provide access to the array of DOM elements of the visible rows.
743
755
  */
744
- getKeyRow(key: any): number;
756
+ get visibleRows(): HTMLCollection;
745
757
  /**
746
- * Gets the type of the specified column.
758
+ * Gets the array of DOM elements of the visible cells.
759
+ * @type {HTMLCollection}
760
+ * @ summary Implement this property in a derived class to provide access to the array of DOM elements of the visible cells.
761
+ */
762
+ get visibleCells(): HTMLCollection;
763
+ /**
764
+ * Implement this method in a derived class to handle the initial rendering of the grid control.
765
+ */
766
+ renderGrid(): void;
767
+ /**
768
+ * Implement this method in a derived class to handle re-rendering of the grid control.
769
+ */
770
+ invalidate(): void;
771
+ /**
772
+ * Implement this method in a derived class to handle re-rendering of a row range.
773
+ * @param {Number} index The start index of the range.
774
+ * @param {Number} count The length of the range.
775
+ */
776
+ refreshRows(index: number, count: number): void;
777
+ /**
778
+ * Implement this method in a derived class to handle updates of grid cells after inplace-editing.
779
+ * @param {Number} row The row index.
747
780
  * @param {Number} column The column index.
748
- * @returns {DataType} The type.
749
781
  */
750
- columnType(column: number): any;
782
+ updateCell(row: number, column: number): void;
783
+ /**
784
+ * Implement this method in a derived class to handle row creation.
785
+ */
786
+ onRowCreated(): void;
787
+ /**
788
+ * Implement this method in a derived class to handle row deletion.
789
+ */
790
+ onRowDeleted(): void;
791
+ /**
792
+ * Implement this method in a derived class to handle scrolling.
793
+ */
794
+ onScroll(): void;
795
+ /**
796
+ * Implement this method in a derived class to handle selection.
797
+ */
798
+ onSelect(): void;
799
+ /**
800
+ * Implement this method in a derived class to handle sorting.
801
+ */
802
+ onSort(): void;
803
+ }
804
+ }
805
+ declare module "DataViews/jsdv/src/UIControl" {
806
+ /**
807
+ * @class A base class for UI controls.
808
+ */
809
+ export class UIControl extends Control {
810
+ static get tm(): number[];
811
+ static get tm2(): number[];
812
+ static get ns(): string;
813
+ _messenger: {
814
+ message(control: any): void;
815
+ setKey(value: any): void;
816
+ };
817
+ get targetElement(): Element;
818
+ setLicenseKey(value: any): void;
819
+ get tm2(): number[];
820
+ }
821
+ import { Control } from "@mindfusion/common";
822
+ }
823
+ declare module "DataViews/jsdv/src/ProxyModel" {
824
+ export default ProxyModel;
825
+ class ProxyModel {
826
+ constructor(sourceModel: any);
827
+ sourceModel: any;
828
+ _filter: any;
829
+ _sortedColumn: number;
830
+ _sortAscending: boolean;
831
+ _groupColumn: number;
832
+ indexMap: any[];
833
+ getMaxKey(): any;
834
+ getKeyRow(key: any): any;
835
+ getRowKey(index: any): any;
836
+ columnType(column: any): any;
837
+ columnName(column: any): any;
838
+ columnCaption(column: any): any;
839
+ columnEditable(column: any): any;
840
+ columnSortable(column: any): any;
841
+ columnHidden(column: any): any;
842
+ columnMetaData(column: any): any;
843
+ cellMetaData(row: any, column: any): any;
844
+ cellDataType(row: any, column: any): any;
845
+ setValue(row: any, column: any, value: any): void;
846
+ value(row: any, column: any): any;
847
+ displayValue(row: any, column: any): any;
848
+ getRowData(row: any): any;
849
+ addRow(rowData: any, index: any): number;
850
+ deleteRow(row: any): void;
851
+ get rowCount(): any;
852
+ get columnCount(): any;
853
+ invalidate(): void;
854
+ ensureIndexMap(): void;
855
+ set filter(arg: any);
856
+ get filter(): any;
857
+ set sortedColumn(arg: number);
858
+ get sortedColumn(): number;
859
+ set sortAscending(arg: boolean);
860
+ get sortAscending(): boolean;
861
+ set groupColumn(arg: number);
862
+ get groupColumn(): number;
863
+ isGroupRow(row: any): any;
864
+ }
865
+ }
866
+ declare module "DataViews/jsdv/src/ImageType" {
867
+ /**
868
+ * @class Provides functionality for grid columns, that display image data.
869
+ */
870
+ export class ImageType extends DataType {
871
+ static sortFunction(value1: any, value2: any): any;
872
+ static createEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement | ImagePicker;
873
+ static createDefaultEditor(element: any, displayValue: any, value: any, view: any): HTMLInputElement;
874
+ static updateCell(view: any, element: any, r: any, c: any, displayValue: any): void;
875
+ static createCustomEditor(editor: any, options: any, element: any, displayValue: any, value: any, view: any): void;
876
+ static parse(text: any): any;
877
+ static equals(value1: any, value2: any): boolean;
878
+ static format(value: any, meta: any): string;
879
+ static get textAlign(): string;
880
+ }
881
+ import DataType from "DataViews/jsdv/src/DataType";
882
+ import { ImagePicker } from "@mindfusion/common-ui";
883
+ }
884
+ declare module "DataViews/jsdv/src/GridRenderer" {
885
+ export default GridRenderer;
886
+ /**
887
+ * @class Contains render methods for a grid control.
888
+ */
889
+ class GridRenderer extends DomRenderer {
890
+ repaintId: number;
891
+ draw(): void;
892
+ drawHeader(): HTMLDivElement;
893
+ drawContent(): HTMLDivElement;
894
+ drawRows(): void;
895
+ rowHeight: number;
896
+ rowsHeight: number;
897
+ drawRow(model: any, r: any): HTMLDivElement;
898
+ drawFooter(): HTMLDivElement;
899
+ refreshRow(model: any, r: any): void;
900
+ addSelectedFlag(element: any): void;
901
+ removeSelectedFlag(element: any): void;
902
+ clearSelection(): void;
903
+ updateSelection(): void;
904
+ }
905
+ import { DomRenderer } from "DataViews/jsdv/src/DomRenderer";
906
+ }
907
+ declare module "DataViews/jsdv/src/Selection" {
908
+ export default Selection;
909
+ /**
910
+ * @namespace MindFusion.DataViews
911
+ */
912
+ /**
913
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
914
+ *
915
+ * This source code is provided to you as part of the MindFusion software components
916
+ * package you have purchased. You may use the source code to trace and/or fix
917
+ * problems or customize the library as needed for your application. To get permission
918
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
919
+ */
920
+ /**
921
+ * @class Represents a selection in a grid control.
922
+ */
923
+ class Selection {
924
+ /**
925
+ * Initializes a new instance of the Selection class.
926
+ * @constructor
927
+ * @param {Grid} grid The associated grid control.
928
+ */
929
+ constructor(grid: any);
930
+ _grid: any;
931
+ _cells: any[];
932
+ _rows: any[];
933
+ set cells(arg: any[]);
934
+ /**
935
+ * Gets or sets the array of selected cells.
936
+ * @type {Array}
937
+ * @summary The array of selected cells.
938
+ */
939
+ get cells(): any[];
940
+ _columns: any[];
941
+ set rows(arg: any[]);
942
+ /**
943
+ * Gets or sets the array of selected rows.
944
+ * @type {Array}
945
+ * @summary The array of selected rows.
946
+ */
947
+ get rows(): any[];
948
+ }
949
+ }
950
+ declare module "DataViews/jsdv/src/GridModel" {
951
+ /**
952
+ * @namespace MindFusion.DataViews
953
+ */
954
+ /**
955
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
956
+ *
957
+ * This source code is provided to you as part of the MindFusion software components
958
+ * package you have purchased. You may use the source code to trace and/or fix
959
+ * problems or customize the library as needed for your application. To get permission
960
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
961
+ */
962
+ /**
963
+ * @class The interface for grid models.
964
+ */
965
+ export class GridModel {
966
+ /**
967
+ * Gets the key of the specified row.
968
+ * @returns {Object} The key.
969
+ */
970
+ getRowKey(row: any): any;
971
+ /**
972
+ * Gets the row with the specified key.
973
+ * @returns {Number} The row index.
974
+ */
975
+ getKeyRow(key: any): number;
976
+ /**
977
+ * Gets the type of the specified column.
978
+ * @param {Number} column The column index.
979
+ * @returns {DataType} The type.
980
+ */
981
+ columnType(column: number): any;
982
+ /**
983
+ * Gets the name of the specified column.
984
+ * @param {Number} column The column index.
985
+ * @returns {String} The name of the field displayed in this column.
986
+ */
987
+ columnName(column: number): string;
988
+ /**
989
+ * Gets the display text of the specified column.
990
+ * @param {Number} column The column index.
991
+ * @returns {String} The display text.
992
+ */
993
+ columnCaption(column: number): string;
994
+ /**
995
+ * Gets a value, indicating whether the cells in the specified column can be edited.
996
+ * @param {Number} column The column index.
997
+ * @returns {Boolean} True if the cells in this column can be edited, otherwise false.
998
+ */
999
+ columnEditable(column: number): boolean;
1000
+ /**
1001
+ * Gets a value, indicating whether the specified column can be sorted.
1002
+ * @param {Number} column The column index.
1003
+ * @returns {Boolean} True if the specified column can be sorted, otherwise false.
1004
+ */
1005
+ columnSortable(column: number): boolean;
1006
+ /**
1007
+ * Gets the column meta data object.
1008
+ * @param {Number} column The column index.
1009
+ * @returns {Map} A Map instance containing the column meta data.
1010
+ */
1011
+ columnMetaData(column: number): Map<any, any>;
1012
+ cellDataType(row: any, column: any): any;
1013
+ /**
1014
+ * Sets a value at the specified position.
1015
+ * @param {Number} row The row index.
1016
+ * @param {Number} column The column index.
1017
+ * @param {Object} value The value.
1018
+ */
1019
+ setValue(row: number, column: number, value: any): void;
1020
+ /**
1021
+ * Gets the value at the specified position.
1022
+ * @param {Number} row The row index.
1023
+ * @param {Number} column The column index.
1024
+ * @returns {Object} The value.
1025
+ */
1026
+ value(row: number, column: number): any;
1027
+ /**
1028
+ * Gets the display value of the cell in the the specified position.
1029
+ * @param {Number} row The row index.
1030
+ * @param {Number} column The column index.
1031
+ * @returns {String} The display value.
1032
+ */
1033
+ displayValue(row: number, column: number): string;
1034
+ /**
1035
+ * Gets the values at the specified row index.
1036
+ * @param {Number} row The row index.
1037
+ * @returns {Object} An object containing the values at the specified row index.
1038
+ */
1039
+ getRowData(row: number): any;
1040
+ /**
1041
+ * Adds a row to the backing store.
1042
+ * @param {Object} [rowData] The values to add.
1043
+ * @param {Number} [index] The index at which to insert the data.
1044
+ * @returns {Number} index The index of the new row.
1045
+ */
1046
+ addRow(rowData?: any, index?: number): number;
1047
+ /**
1048
+ * Removes the row at the specified index from the backing store.
1049
+ * @param {Number} row The row index.
1050
+ */
1051
+ deleteRow(row: number): void;
1052
+ /**
1053
+ * Gets the number of rows in the backing store.
1054
+ * @type {Number}
1055
+ * @summary The row count.
1056
+ */
1057
+ get rowCount(): number;
1058
+ /**
1059
+ * Gets the number of display columns.
1060
+ * @type {Number}
1061
+ * @summary The column count.
1062
+ */
1063
+ get columnCount(): number;
1064
+ }
1065
+ }
1066
+ declare module "DataViews/jsdv/src/GridCell" {
1067
+ /**
1068
+ * @namespace MindFusion.DataViews
1069
+ */
1070
+ /**
1071
+ * Copyright (c) 2020, MindFusion LLC - Bulgaria.
1072
+ *
1073
+ * This source code is provided to you as part of the MindFusion software components
1074
+ * package you have purchased. You may use the source code to trace and/or fix
1075
+ * problems or customize the library as needed for your application. To get permission
1076
+ * to use the source code in any other way, please contact us at support@mindfusion.eu.
1077
+ */
1078
+ /**
1079
+ * @class Represents a data cell in a grid control.
1080
+ */
1081
+ export class GridCell {
1082
+ /**
1083
+ * Initializes a new instance of the GridCell class.
1084
+ * @constructor
1085
+ * @private
1086
+ */
1087
+ private constructor();
1088
+ _parent: any;
1089
+ _row: any;
1090
+ _column: any;
1091
+ _rowKey: any;
1092
+ /**
1093
+ * @private
1094
+ */
1095
+ private focus;
1096
+ /**
1097
+ * @private
1098
+ */
1099
+ private invalidateKey;
1100
+ /**
1101
+ * Gets the row index of this cell.
1102
+ * @type {Number}
1103
+ * @summary The row index.
1104
+ */
1105
+ get row(): number;
1106
+ /**
1107
+ * Gets the column index of this cell.
1108
+ * @type {Number}
1109
+ * @summary The column index.
1110
+ */
1111
+ get column(): number;
1112
+ /**
1113
+ * Gets the DOM element of this cell.
1114
+ * @type {HTMLDivElement}
1115
+ * @summary The DOM element,
1116
+ */
1117
+ get element(): HTMLDivElement;
1118
+ /**
1119
+ * Gets the parent control] of this cell.
1120
+ * @type {Grid}
1121
+ * @summary The parent control.
1122
+ */
1123
+ get parent(): any;
1124
+ }
1125
+ }
1126
+ declare module "DataViews/jsdv/src/Grid" {
1127
+ /**
1128
+ * @class Represents a grid view control.
1129
+ * @augments UIControl
1130
+ */
1131
+ export class Grid extends UIControl {
1132
+ /**
1133
+ * Initializes a new instance of the Grid class.
1134
+ * @constructor
1135
+ * @param {HTMLDivElement} [element] The control's associated Dom element.
1136
+ * @param {Object} [renderer] Optional.
1137
+ */
1138
+ constructor(element?: HTMLDivElement, renderer?: any);
1139
+ _defaultWidth: Unit;
1140
+ _defaultHeight: Unit;
1141
+ _model: any;
1142
+ _proxyModel: ProxyModel;
1143
+ _allowEdit: boolean;
1144
+ _allowAppend: boolean;
1145
+ _allowDelete: boolean;
1146
+ _allowCellSelect: boolean;
1147
+ _allowScroll: boolean;
1148
+ _filter: any;
1149
+ _sortedColumn: number;
1150
+ _sortAscending: boolean;
1151
+ renderer: any;
1152
+ _scrollRow: number;
1153
+ _columnWidths: any[];
1154
+ _rowHeaderWidth: number;
1155
+ _focusedCell: any;
1156
+ _activeEditor: any;
1157
+ _tableShouldFocus: boolean;
1158
+ selection: Selection;
1159
+ queuedEvents: any[];
1160
+ _rowLoading: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1161
+ _rowRendered: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1162
+ _rowCreating: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1163
+ _rowCreated: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1164
+ _rowDeleting: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1165
+ _rowDeleted: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1166
+ _rowUpdating: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1167
+ _rowUpdated: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1168
+ _rowSelecting: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1169
+ _rowSelected: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1170
+ _cellSelecting: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1171
+ _cellSelected: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1172
+ _cellFocusing: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1173
+ _cellFocused: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1174
+ _customDrawCell: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1175
+ _customDrawHeader: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1176
+ _rowCommand: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1177
+ _resolveCellDataType: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1178
+ _resolveCellMetaData: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1179
+ _getCellValue: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1180
+ _formatCellValue: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1181
+ _objectButtonClick: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1182
+ _scrollHandler: (e: any) => boolean;
1183
+ mouseWheelHandler: (e: any) => void;
1184
+ get wrapper(): Element;
1185
+ /**
1186
+ * Returns a reference to the grid header DOM element.
1187
+ * @type {HTMLDivElement}
1188
+ * @summary The header element.
1189
+ */
1190
+ get header(): HTMLDivElement;
1191
+ /**
1192
+ * Returns a reference to the grid data table DOM element.
1193
+ * @type {HTMLDivElement}
1194
+ * @summary The data table element.
1195
+ */
1196
+ get dataTable(): HTMLDivElement;
1197
+ /**
1198
+ * Returns the array of DOM elements of the visible rows.
1199
+ * @type {Array}
1200
+ * @summary An array of row DOM elements.
1201
+ * @private
1202
+ */
1203
+ private get visibleRows();
1204
+ /**
1205
+ * Returns the array of DOM elements of the visible cells.
1206
+ * @type {Array}
1207
+ * @summary A two-dimensional array of cell DOM elements.
1208
+ * @private
1209
+ */
1210
+ private get visibleCells();
1211
+ scroll: Element;
1212
+ resizeHandler: (e: any) => void;
1213
+ /**
1214
+ * Called before the grid contents are rendered by the current renderer.
1215
+ * @private
1216
+ */
1217
+ private onBeforeRender;
1218
+ /**
1219
+ * Called after the grid contents are rendered by the current renderer.
1220
+ * @private
1221
+ */
1222
+ private onAfterRender;
1223
+ rowHeight: number;
1224
+ rowsCount: number;
1225
+ stopEvents: boolean;
1226
+ /**
1227
+ * Repaints the grid contents.
1228
+ * @param {Boolean} [selected] True to repaint only the selected rows.
1229
+ */
1230
+ refresh(selected?: boolean): Promise<any>;
1231
+ /**
1232
+ * Sets the focus to the cell at the specified position.
1233
+ * @param {Number} row The cell row.
1234
+ * @param {Number} column The cell column.
1235
+ * @param {Boolean} [moveBackwards] True to move backwards.
1236
+ * @remarks If the cell at the specified position is not editable, the focus is set
1237
+ * to the next editable cell, if such exists.
1238
+ */
1239
+ focusCell(row: number, column: number, moveBackwards?: boolean): void;
1240
+ /**
1241
+ * Selects the cell at the specified position.
1242
+ * @param {Number} row The cell row.
1243
+ * @param {Number} column The cell column.
1244
+ */
1245
+ selectCell(row: number, column: number): void;
1246
+ /**
1247
+ * Selects the rows in the specified range.
1248
+ * @param {Number} index The start index of the range to select.
1249
+ * @param {Number} [count] The length of the range.
1250
+ */
1251
+ selectRows(index: number, count?: number): void;
1252
+ /**
1253
+ * Gets the indices of selected rows.
1254
+ * @type {Array}
1255
+ * @summary An array of indices.
1256
+ */
1257
+ get selectedRowIndices(): any[];
1258
+ /**
1259
+ * Gets the selected cells.
1260
+ * @type {Array}
1261
+ * @summary An array of GridCell instances.
1262
+ */
1263
+ get selectedCells(): any[];
1264
+ /**
1265
+ * Invalidates the current renderer.
1266
+ * @private
1267
+ */
1268
+ private invalidateDom;
1269
+ /**
1270
+ * Repaints a range of rows.
1271
+ * @param {Number} index The start index of the row range to repaint.
1272
+ * @param {Number} [count] The length of the range.
1273
+ */
1274
+ refreshRows(index: number, count?: number): Promise<any>;
1275
+ /**
1276
+ * Adds a row.
1277
+ * @param {Object} rowData The values to add.
1278
+ * @param {Number} [index] Optional.
1279
+ */
1280
+ addRow(rowData: any, index?: number): Promise<any>;
1281
+ /**
1282
+ * Removes a range of rows.
1283
+ * @param {Number} index The start index of the row range to remove.
1284
+ * @param {Number} [count] The length of the range.
1285
+ */
1286
+ removeRows(index: number, count?: number): Promise<any>;
1287
+ /**
1288
+ * Removes a range of rows from the data table starting from the given index.
1289
+ * @param {Number} index The starting row index.
1290
+ * @param {Number} count The length of the range.
1291
+ * @private
1292
+ */
1293
+ private removeRowRange;
1294
+ scrollRangeInvalid: boolean;
1295
+ /**
1296
+ * Sorts by the specified column and sort direction.
1297
+ * @param {Number} index The index of the column to sort by, or null to clear the sorting.
1298
+ * @param {Boolean} [sortAscending] True to sort ascending, otherwise false.
1299
+ */
1300
+ sortByColumn(index: number, sortAscending?: boolean): void;
1301
+ set sortedColumn(arg: number);
1302
+ /**
1303
+ * Gets or sets the index of the column, by which the data is sorted.
1304
+ * @type {Number}
1305
+ * @summary The column index, or -1 if no sorting is applied to the grid.
1306
+ */
1307
+ get sortedColumn(): number;
1308
+ set sortAscending(arg: boolean);
1309
+ /**
1310
+ * Gets or sets a value, indicating whether the sorting is in Ascending order.
1311
+ * @type {Boolean}
1312
+ * @summary True if the sorting is in Ascending order, otherwise false.
1313
+ */
1314
+ get sortAscending(): boolean;
1315
+ /**
1316
+ * Calculates the scroll fix amount.
1317
+ * @private
1318
+ */
1319
+ private calcScrollFix;
1320
+ scrollFixAmount: number;
1321
+ /**
1322
+ * Updates the scroll range based on current rows count and height.
1323
+ * @private
1324
+ */
1325
+ private updateScrollRange;
1326
+ scrollIncrement: number;
1327
+ /**
1328
+ * Sets equal column widths in pixels based on flex calculations.
1329
+ * @private
1330
+ */
1331
+ private initColumnWidths;
1332
+ /**
1333
+ * For internal use only.
1334
+ * @private
1335
+ */
1336
+ private resizeColumn;
1337
+ set model(arg: GridModel);
1338
+ /**
1339
+ * Gets or sets the data model of this grid.
1340
+ * @type {GridModel}
1341
+ * @summary The model.
1342
+ */
1343
+ get model(): GridModel;
1344
+ /**
1345
+ * Refreshes the grid after external modifications to the grid model.
1346
+ */
1347
+ rebind(): void;
1348
+ set scrollRow(arg: number);
1349
+ /**
1350
+ * Gets or sets the index of the first visible row.
1351
+ * @type {Number}
1352
+ * @summary The row index.
1353
+ */
1354
+ get scrollRow(): number;
1355
+ get effectiveModel(): any;
1356
+ ensureProxyModel(): void;
1357
+ set allowEdit(arg: boolean);
1358
+ /**
1359
+ * Gets or sets a value, indicating whether inplace editing is enabled.
1360
+ * @type {Boolean}
1361
+ * @summary True if inplace editing is enabled, otherwise false.
1362
+ */
1363
+ get allowEdit(): boolean;
1364
+ set allowAppend(arg: boolean);
1365
+ /**
1366
+ * Gets or 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.
1367
+ * @type {Boolean}
1368
+ * @summary True to show a new row, otherwise false.
1369
+ */
1370
+ get allowAppend(): boolean;
1371
+ set allowDelete(arg: boolean);
1372
+ /**
1373
+ * Gets or sets a value, indicating whether to show a 'Delete row' option in the row context menu.
1374
+ * @type {Boolean}
1375
+ * @summary True to show the option, otherwise false.
1376
+ */
1377
+ get allowDelete(): boolean;
1378
+ set allowCellSelect(arg: boolean);
1379
+ /**
1380
+ * Gets or sets a value, indicating whether single cell selection is enabled.
1381
+ * @type {Boolean}
1382
+ * @summary True if single cell selection is enabled, otherwise false.
1383
+ */
1384
+ get allowCellSelect(): boolean;
1385
+ set allowScroll(arg: boolean);
1386
+ /**
1387
+ * Gets or sets a value, indicating whether scrolling is enabled.
1388
+ * @type {Boolean}
1389
+ * @summary True if inplace scrolling is enabled, otherwise false.
1390
+ */
1391
+ get allowScroll(): boolean;
1392
+ set filter(arg: any);
1393
+ get filter(): any;
1394
+ onScroll(e: any): boolean;
1395
+ headerMouseOver(e: any): void;
1396
+ headerMouseLeave(e: any): void;
1397
+ columnHeaderContextMenu(e: any): void;
1398
+ contextMenu: import("@mindfusion/common-ui").Menu;
1399
+ columnHeaderMouseDown(e: any): void;
1400
+ columnHeaderClicked(e: any): void;
1401
+ set focusedCell(arg: GridCell);
1402
+ /**
1403
+ * Gets the active grid cell.
1404
+ * @type {GridCell}
1405
+ * @summary the cell.
1406
+ */
1407
+ get focusedCell(): GridCell;
1408
+ rowHeaderMouseDown(e: any): void;
1409
+ rowHeaderContextMenu(e: any): void;
1410
+ contextMenuCallback(item: any): void;
1411
+ tableKeyDown(e: any): void;
1412
+ tableKeyUp(e: any): void;
1413
+ tableCellClicked(e: any): void;
1414
+ /**
1415
+ * Gets the cell at the provided coordinates, if it is focusable, or the nearest focusable cell in the specified direction.
1416
+ * @param {Number} row The cell row.
1417
+ * @param {Number} column The cell column.
1418
+ * @param {Boolean} back True to search backwards.
1419
+ * @private
1420
+ */
1421
+ private getFocusableCell;
1422
+ moveFocusedCell(row: any, column: any, back: any): void;
1423
+ moveFocusedCellLeft(): void;
1424
+ moveFocusedCellRight(): void;
1425
+ get focusedItem(): GridCell | {
1426
+ row: any;
1427
+ column: number;
1428
+ };
1429
+ /**
1430
+ * Gets the DOM element of the cell in the specified coordinates.
1431
+ * @param {Number} row The cell row.
1432
+ * @param {Number} column The cell column.
1433
+ * @returns {HTMLDivElement} the cell's DOM element.
1434
+ */
1435
+ getCellElement(row: number, column: number): HTMLDivElement;
1436
+ /**
1437
+ * Gets the DOM element of the specified row.
1438
+ * @param {Number} row The row index.
1439
+ * @returns {HTMLDivElement} the row's DOM element.
1440
+ */
1441
+ getRowElement(row: number): HTMLDivElement;
1442
+ /**
1443
+ * Checks if the row at the specified index is currently visible.
1444
+ * @param {Number} row The row index.
1445
+ * @returns {Boolean} True if the row is visible, otherwise false.
1446
+ */
1447
+ isRowVisible(row: number): boolean;
1448
+ isCellVisible(row: any, column: any): boolean;
1449
+ /**
1450
+ * Scrolls to the specified row.
1451
+ * @param {Number} row The row.
1452
+ * @private
1453
+ */
1454
+ private bringRowIntoView;
1455
+ isRepainting: boolean;
1456
+ /**
1457
+ * Ensures that the specified row is visible.
1458
+ * @param {Number} row The row.
1459
+ */
1460
+ bringIntoView(row: number): Promise<any>;
1461
+ /**
1462
+ * Applies an additional translate transform to the data table when scrolling
1463
+ * to the first or last row, if the row is partly visible.
1464
+ * @param {Number} row The relative row index.
1465
+ * @private
1466
+ */
1467
+ private scrollFix;
1468
+ /**
1469
+ * Checks if the row at the specified index is a group row.
1470
+ * @param {Number} row The row index.
1471
+ * @private
1472
+ */
1473
+ private isGroupRow;
1474
+ /**
1475
+ * Scrolls to the specified row.
1476
+ * @param {Number} row The row index.
1477
+ * @private
1478
+ */
1479
+ private scrollToRow;
1480
+ /**
1481
+ * Disposes the active grid cell editor.
1482
+ */
1483
+ disposeActiveEditor(): void;
1484
+ set activeEditor(arg: any);
1485
+ /**
1486
+ * Gets the active editor.
1487
+ * @type {Object}
1488
+ * @summary The editor.
1489
+ */
1490
+ get activeEditor(): any;
1491
+ /**
1492
+ * Gets the index of the last grid row.
1493
+ * @private
1494
+ */
1495
+ private get lastRowIndex();
1496
+ /**
1497
+ * Gets the height of rows viewport.
1498
+ * @type {Number}
1499
+ * @summary The height.
1500
+ * @private
1501
+ */
1502
+ private get contentHeight();
1503
+ /**
1504
+ * Gets the height of rows viewport minus the horizontal scrollbar height.
1505
+ * @type {Number}
1506
+ * @summary The height.
1507
+ * @private
1508
+ */
1509
+ private get contentClientHeight();
1510
+ /**
1511
+ * Gets the width of the specified grid column.
1512
+ * @param {Number} column The column index.
1513
+ * @returns {Number} The width in pixels.
1514
+ */
1515
+ getColumnWidth(column: number): number;
1516
+ /**
1517
+ * Sets the width of the specified grid column.
1518
+ * @param {Number} column The column index.
1519
+ * @param {Number} width The width in pixels.
1520
+ */
1521
+ setColumnWidth(column: number, width: number): void;
1522
+ /**
1523
+ * Disposes the current context menu.
1524
+ */
1525
+ disposeContextMenu(): void;
1526
+ /**
1527
+ * Sets selected rows after raising selection events.
1528
+ * @private
1529
+ */
1530
+ private setRowSelection;
1531
+ /**
1532
+ * Gets the row with the specified key.
1533
+ * @param {Object} key The key.
1534
+ * @returns {Number} The row index.
1535
+ */
1536
+ getKeyRow(key: any): number;
1537
+ /**
1538
+ * Gets the key of the row at the specified index.
1539
+ * @param {Number} index The row index.
1540
+ * @returns {Object} The row key.
1541
+ */
1542
+ getRowKey(index: number): any;
1543
+ /**
1544
+ * Recalculates grid's dimensions.
1545
+ * @remarks Use this method to recalculate the grid's dimensions after resizing.
1546
+ */
1547
+ adjust(): void;
1548
+ /**
1549
+ * For internal use only.
1550
+ * @private
1551
+ */
1552
+ private onResize;
1553
+ onMouseWheel(e: any): void;
1554
+ timeStamp: number;
1555
+ /**
1556
+ * Raises the corresponding validation event when a row action is performed.
1557
+ * @private
1558
+ */
1559
+ private onRowValidateAction;
1560
+ /**
1561
+ * Raises the corresponding notification event after a row action is performed.
1562
+ * @private
1563
+ */
1564
+ private onRowAction;
1565
+ onCellAction(row: any, column: any, value: any, displayValue: any): void;
1566
+ /**
1567
+ * Adds an event to the queued events that will be raised after the grid finished repainting.
1568
+ * @private
1569
+ */
1570
+ private queueEvent;
1571
+ /**
1572
+ * Raises all queued events.
1573
+ * @private
1574
+ */
1575
+ private raiseQueuedEvents;
1576
+ /**
1577
+ * Raises the rowCommand event.
1578
+ * @private
1579
+ */
1580
+ private onRowCommand;
1581
+ /**
1582
+ * Raised when a row data is loading.
1583
+ * @event rowLoading
1584
+ * @type {EventDispatcher}
1585
+ * @property {Grid} sender
1586
+ * @property {RowModifyingEventArgs} args
1587
+ */
1588
+ get rowLoading(): EventDispatcher<any>;
1589
+ /**
1590
+ * Raised when a row is rendered.
1591
+ * @event rowRendered
1592
+ * @type {EventDispatcher}
1593
+ * @property {Grid} sender
1594
+ * @property {RowModifiedEventArgs} args
1595
+ */
1596
+ get rowRendered(): EventDispatcher<any>;
1597
+ /**
1598
+ * Raised before a row is selected.
1599
+ * @event rowSelecting
1600
+ * @type {EventDispatcher}
1601
+ * @property {Grid} sender
1602
+ * @property {RowModifyingEventArgs} args
1603
+ */
1604
+ get rowSelecting(): EventDispatcher<any>;
1605
+ /**
1606
+ * Raised when a row is selected.
1607
+ * @event rowSelected
1608
+ * @type {EventDispatcher}
1609
+ * @property {Grid} sender
1610
+ * @property {RowModifiedEventArgs} args
1611
+ */
1612
+ get rowSelected(): EventDispatcher<any>;
1613
+ /**
1614
+ * Raised before a new row is created.
1615
+ * @event rowCreating
1616
+ * @type {EventDispatcher}
1617
+ * @property {Grid} sender
1618
+ * @property {RowModifyingEventArgs} args
1619
+ */
1620
+ get rowCreating(): EventDispatcher<any>;
1621
+ /**
1622
+ * Raised when a new row is created.
1623
+ * @event rowCreated
1624
+ * @type {EventDispatcher}
1625
+ * @property {Grid} sender
1626
+ * @property {RowModifiedEventArgs} args
1627
+ */
1628
+ get rowCreated(): EventDispatcher<any>;
1629
+ /**
1630
+ * Raised before a row is deleted.
1631
+ * @event rowDeleting
1632
+ * @type {EventDispatcher}
1633
+ * @property {Grid} sender
1634
+ * @property {RowModifyingEventArgs} args
1635
+ */
1636
+ get rowDeleting(): EventDispatcher<any>;
1637
+ /**
1638
+ * Raised when a row is deleted.
1639
+ * @event rowDeleted
1640
+ * @type {EventDispatcher}
1641
+ * @property {Grid} sender
1642
+ * @property {RowModifiedEventArgs} args
1643
+ */
1644
+ get rowDeleted(): EventDispatcher<any>;
1645
+ /**
1646
+ * Raised before a row is updated.
1647
+ * @event rowUpdating
1648
+ * @type {EventDispatcher}
1649
+ * @property {Grid} sender
1650
+ * @property {RowModifyingEventArgs} args
1651
+ */
1652
+ get rowUpdating(): EventDispatcher<any>;
1653
+ /**
1654
+ * Raised when a row is updated.
1655
+ * @event rowUpdated
1656
+ * @type {EventDispatcher}
1657
+ * @property {Grid} sender
1658
+ * @property {RowModifiedEventArgs} args
1659
+ */
1660
+ get rowUpdated(): EventDispatcher<any>;
1661
+ /**
1662
+ * Raised before a cell is selected.
1663
+ * @event cellSelecting
1664
+ * @type {EventDispatcher}
1665
+ * @property {Grid} sender
1666
+ * @property {CellEventArgs} args
1667
+ */
1668
+ get cellSelecting(): EventDispatcher<any>;
1669
+ /**
1670
+ * Raises the onCellSelecting event.
1671
+ * @private
1672
+ */
1673
+ private onCellSelecting;
1674
+ /**
1675
+ * Raised when a cell is selected.
1676
+ * @event cellSelected
1677
+ * @type {EventDispatcher}
1678
+ * @property {Grid} sender
1679
+ * @property {CellEventArgs} args
1680
+ */
1681
+ get cellSelected(): EventDispatcher<any>;
1682
+ /**
1683
+ * Raises the cellSelected event.
1684
+ * @private
1685
+ */
1686
+ private onCellSelected;
1687
+ /**
1688
+ * Raised before a cell is focused.
1689
+ * @event cellFocusing
1690
+ * @type {EventDispatcher}
1691
+ * @property {Grid} sender
1692
+ * @property {CellEventArgs} args
1693
+ */
1694
+ get cellFocusing(): EventDispatcher<any>;
751
1695
  /**
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.
1696
+ * Raises the cellFocusing event.
1697
+ * @private
755
1698
  */
756
- columnName(column: number): string;
1699
+ private onCellFocusing;
757
1700
  /**
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;
1701
+ * Raised when a cell is focused.
1702
+ * @event cellFocused
1703
+ * @type {EventDispatcher}
1704
+ * @property {Grid} sender
1705
+ * @property {CellEventArgs} args
1706
+ */
1707
+ get cellFocused(): EventDispatcher<any>;
763
1708
  /**
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.
1709
+ * Raises the cellFocused event.
1710
+ * @private
767
1711
  */
768
- columnEditable(column: number): boolean;
1712
+ private onCellFocused;
769
1713
  /**
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.
1714
+ * Raises the customDrawCell event.
1715
+ * @private
773
1716
  */
774
- columnSortable(column: number): boolean;
1717
+ private onCustomDrawCell;
775
1718
  /**
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>;
1719
+ * Raised when a cell's contents are about to be rendered, to allow custom drawing.
1720
+ * @event customDrawCell
1721
+ * @type {EventDispatcher}
1722
+ * @property {Grid} sender
1723
+ * @property {CellCustomDrawEventArgs} args
1724
+ */
1725
+ get customDrawCell(): EventDispatcher<any>;
781
1726
  /**
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.
1727
+ * Raises the customDrawHeader event.
1728
+ * @private
786
1729
  */
787
- setValue(row: number, column: number, value: any): void;
1730
+ private onCustomDrawHeader;
788
1731
  /**
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;
1732
+ * Raised when a header cell's contents are about to be rendered, to allow custom drawing.
1733
+ * @event customDrawHeader
1734
+ * @type {EventDispatcher}
1735
+ * @property {Grid} sender
1736
+ * @property {CellCustomDrawEventArgs} args
1737
+ */
1738
+ get customDrawHeader(): EventDispatcher<any>;
795
1739
  /**
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;
1740
+ * Raised when a command is executed on a row.
1741
+ * @event rowCommand
1742
+ * @type {EventDispatcher}
1743
+ * @property {Grid} sender
1744
+ * @property {RowModifyingEventArgs} args
1745
+ */
1746
+ get rowCommand(): EventDispatcher<any>;
802
1747
  /**
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;
1748
+ * Raised when the data type of a cell in a DynamicType column has to be resolved.
1749
+ * @event resolveCellDataType
1750
+ * @type {EventDispatcher}
1751
+ * @property {Grid} sender
1752
+ * @property {CellResolveEventArgs} args
1753
+ */
1754
+ get resolveCellDataType(): EventDispatcher<any>;
808
1755
  /**
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.
1756
+ * Raised when the value of a cell in a DynamicType column is retrieved.
1757
+ * @event getCellValue
1758
+ * @type {EventDispatcher}
1759
+ * @property {Grid} sender
1760
+ * @property {CellResolveEventArgs} args
813
1761
  */
814
- addRow(rowData?: any, index?: number): number;
1762
+ get getCellValue(): EventDispatcher<any>;
815
1763
  /**
816
- * Removes the row at the specified index from the backing store.
817
- * @param {Number} row The row index.
1764
+ * Raised when the data type of a cell in a DynamicType column has to be resolved.
1765
+ * @event resolveCellDataType
1766
+ * @type {EventDispatcher}
1767
+ * @property {Grid} sender
1768
+ * @property {CellResolveEventArgs} args
818
1769
  */
819
- deleteRow(row: number): void;
1770
+ get resolveCellMetaData(): EventDispatcher<any>;
820
1771
  /**
821
- * Gets the number of rows in the backing store.
822
- * @returns {Number} The row count.
1772
+ * Raised when the value of a cell in a DynamicType column has to be formatted.
1773
+ * @event formatCellValue
1774
+ * @type {EventDispatcher}
1775
+ * @property {Grid} sender
1776
+ * @property {CellResolveEventArgs} args
823
1777
  */
824
- get rowCount(): number;
1778
+ get formatCellValue(): EventDispatcher<any>;
825
1779
  /**
826
- * Gets the number of display columns.
827
- * @returns {Number} The column count.
1780
+ * Raised when an expander button is clicked
1781
+ * @private
828
1782
  */
829
- get columnCount(): number;
1783
+ private get objectButtonClick();
830
1784
  }
1785
+ import { UIControl } from "DataViews/jsdv/src/UIControl";
1786
+ import { Unit } from "@mindfusion/common";
1787
+ import ProxyModel from "DataViews/jsdv/src/ProxyModel";
1788
+ import Selection from "DataViews/jsdv/src/Selection";
1789
+ import { EventDispatcher } from "@mindfusion/common";
1790
+ import { GridModel } from "DataViews/jsdv/src/GridModel";
1791
+ import { GridCell } from "DataViews/jsdv/src/GridCell";
831
1792
  }
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
- */
1793
+ declare module "DataViews/jsdv/src/GridColumn" {
844
1794
  /**
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.
1795
+ * @class Represents a column in a grid control.
849
1796
  */
850
- export class GridCell {
1797
+ export class GridColumn {
851
1798
  /**
852
- * Initializes a new instance of the GridCell class.
1799
+ * Initializes a new instance of the GridColumn class.
853
1800
  * @constructor
854
- * @private
1801
+ * @param {String} [name] The name of the field, displayed in the column.
1802
+ * @param {DataType} [dataType] The type of the column.
1803
+ * @param {Boolean} [editable] A value indicating whether the cells in this column can be edited.
855
1804
  */
856
- private constructor();
857
- _parent: any;
858
- _row: any;
859
- _column: any;
860
- _rowKey: any;
1805
+ constructor(name?: string, dataType?: any, editable?: boolean);
1806
+ _name: string;
1807
+ _dataType: any;
1808
+ _metaData: Map<any, any>;
1809
+ _editable: boolean;
1810
+ _sortable: boolean;
1811
+ _hidden: boolean;
1812
+ set name(arg: string);
861
1813
  /**
862
- * @private
863
- */
864
- private focus;
1814
+ * Gets or sets the name of the field, displayed in the column.
1815
+ * @type {String}
1816
+ * @summary The field name.
1817
+ */
1818
+ get name(): string;
1819
+ set dataType(arg: any);
865
1820
  /**
866
- * @private
867
- */
868
- private invalidateKey;
1821
+ * Gets or sets the type of this column.
1822
+ * @type {DataType}
1823
+ * @summary The type.
1824
+ */
1825
+ get dataType(): any;
1826
+ set metaData(arg: Map<any, any>);
869
1827
  /**
870
- * Gets the row index of this cell.
871
- * @returns {Number} The row index.
1828
+ * Gets or sets the metadata, associated with this column.
1829
+ * @type {Map}
1830
+ * @summary The metadata.
872
1831
  */
873
- get row(): number;
1832
+ get metaData(): Map<any, any>;
1833
+ set caption(arg: string);
874
1834
  /**
875
- * Gets the column index of this cell.
876
- * @returns {Number} The column index.
1835
+ * Gets or sets the text, diplayed in the header of this column.
1836
+ * @type {String}
1837
+ * @summary The display text.
877
1838
  */
878
- get column(): number;
1839
+ get caption(): string;
1840
+ _caption: string;
1841
+ set editable(arg: boolean);
879
1842
  /**
880
- * Gets the DOM element of this cell.
881
- * @returns {HTMLDivElement} The DOM element,
1843
+ * Gets or sets a value, indicating whether the cells in this column can be edited.
1844
+ * @type {Boolean}
1845
+ * @summary True if the cells in this column can be edited, otherwise false.
882
1846
  */
883
- get element(): HTMLDivElement;
1847
+ get editable(): boolean;
1848
+ set sortable(arg: boolean);
884
1849
  /**
885
- * Gets the parent control] of this cell.
886
- * @returns {Grid} The parent control.
1850
+ * Gets or sets a value, indicating whether this column can be sorted.
1851
+ * @type {Boolean}
1852
+ * @summary True if the column can be sorted, otherwise false.
887
1853
  */
888
- get parent(): any;
1854
+ get sortable(): boolean;
1855
+ set hidden(arg: boolean);
1856
+ /**
1857
+ * Gets or sets a value, indicating whether this column is hidden.
1858
+ * @type {Boolean}
1859
+ * @summary True if the column is hidden, otherwise false.
1860
+ */
1861
+ get hidden(): boolean;
889
1862
  }
890
1863
  }
891
- declare module "DataViews/jsdv/src/Grid" {
1864
+ declare module "DataViews/jsdv/src/PropertyGridModel" {
892
1865
  /**
893
- * @class Represents a grid view control.
1866
+ * @class Represents the grid model of the PropertyGrid control.
1867
+ * @private
1868
+ */
1869
+ export class PropertyGridModel extends ArrayModel {
1870
+ /**
1871
+ * Initializes a new instance of the PropertyGridModel class.
1872
+ * @constructor
1873
+ * @param {Array} values The array to use as a backing store.
1874
+ * @param {Map} meta The meta data dictionary.
1875
+ */
1876
+ constructor(values: any[], meta: Map<any, any>);
1877
+ }
1878
+ import { ArrayModel } from "DataViews/jsdv/src/ArrayModel";
1879
+ }
1880
+ declare module "DataViews/jsdv/src/CollectionType" {
1881
+ /**
1882
+ * @class Provides functionality for grid cells, that display collection objects.
1883
+ */
1884
+ export class CollectionType extends ObjectType {
1885
+ static format(value: any, meta: any): string;
1886
+ }
1887
+ import { ObjectType } from "DataViews/jsdv/src/ObjectType";
1888
+ }
1889
+ declare module "DataViews/jsdv/src/PropertyGridContent" {
1890
+ /**
1891
+ * @class Represents a content grid in a PropertyGrid control.
894
1892
  * @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.
1893
+ * @private
911
1894
  */
912
- export class Grid extends UIControl {
1895
+ export class PropertyGridContent extends UIControl {
913
1896
  /**
914
- * Initializes a new instance of the Grid class.
1897
+ * Initializes a new instance of the PropertyGridContent class.
915
1898
  * @constructor
916
- * @param {HTMLDivElement} [element] The control's associated Dom element.
917
- * @param {Object} [renderer] Optional.
1899
+ * @param {Object} obj The object whose properties will be shown in the grid.
918
1900
  */
919
- constructor(element?: HTMLDivElement, renderer?: any);
1901
+ constructor(obj: any);
920
1902
  _defaultWidth: Unit;
921
1903
  _defaultHeight: Unit;
1904
+ _selectedObject: any;
922
1905
  _model: any;
923
1906
  _proxyModel: ProxyModel;
1907
+ _metaData: Map<any, any>;
1908
+ _excludedProperties: string[];
924
1909
  _allowEdit: boolean;
925
- _allowAppend: boolean;
926
- _allowDelete: boolean;
927
1910
  _allowCellSelect: boolean;
928
1911
  _allowScroll: boolean;
929
1912
  _filter: any;
930
1913
  _sortedColumn: number;
931
1914
  _sortAscending: boolean;
932
- renderer: any;
1915
+ renderer: GridRenderer;
933
1916
  _scrollRow: number;
934
1917
  _columnWidths: any[];
935
1918
  _rowHeaderWidth: number;
936
1919
  _focusedCell: any;
937
1920
  _activeEditor: any;
938
1921
  _tableShouldFocus: boolean;
1922
+ _searchString: string;
1923
+ _scrollBarSize: number;
939
1924
  selection: Selection;
940
1925
  queuedEvents: any[];
1926
+ _expandObject: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1927
+ _columnSorted: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1928
+ _groupingChanged: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1929
+ _rowLoading: EventDispatcher<import("Controls/EventArgs").EventArgs>;
941
1930
  _rowRendered: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1931
+ _rowExpanding: EventDispatcher<import("Controls/EventArgs").EventArgs>;
1932
+ _rowExpanded: EventDispatcher<import("Controls/EventArgs").EventArgs>;
942
1933
  _rowCreating: EventDispatcher<import("Controls/EventArgs").EventArgs>;
943
1934
  _rowCreated: EventDispatcher<import("Controls/EventArgs").EventArgs>;
944
1935
  _rowDeleting: EventDispatcher<import("Controls/EventArgs").EventArgs>;
@@ -951,15 +1942,12 @@ declare module "DataViews/jsdv/src/Grid" {
951
1942
  _cellSelected: EventDispatcher<import("Controls/EventArgs").EventArgs>;
952
1943
  _cellFocusing: EventDispatcher<import("Controls/EventArgs").EventArgs>;
953
1944
  _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;
1945
+ scrollHandler: (e: any) => boolean;
958
1946
  mouseWheelHandler: (e: any) => void;
959
1947
  get wrapper(): Element;
960
1948
  /**
961
1949
  * Returns a reference to the grid header DOM element.
962
- * @returns {HTMLDivElement} The header element.
1950
+ * @type {HTMLDivElement} The header element.
963
1951
  */
964
1952
  get header(): HTMLDivElement;
965
1953
  /**
@@ -979,6 +1967,14 @@ declare module "DataViews/jsdv/src/Grid" {
979
1967
  * @private
980
1968
  */
981
1969
  private get visibleCells();
1970
+ rowHeaderMouseDown(e: any): void;
1971
+ set focusedCell(arg: GridCell);
1972
+ /**
1973
+ * Gets the active grid cell.
1974
+ * @type {GridCell}
1975
+ * @summary the cell.
1976
+ */
1977
+ get focusedCell(): GridCell;
982
1978
  scroll: Element;
983
1979
  resizeHandler: (e: any) => void;
984
1980
  /**
@@ -991,9 +1987,8 @@ declare module "DataViews/jsdv/src/Grid" {
991
1987
  * @private
992
1988
  */
993
1989
  private onAfterRender;
994
- rowHeight: number;
995
1990
  rowsCount: number;
996
- stopEvents: boolean;
1991
+ rowHeight: number;
997
1992
  /**
998
1993
  * Repaints the grid contents.
999
1994
  * @param {Boolean} [selected] True to repaint only the selected rows.
@@ -1027,7 +2022,8 @@ declare module "DataViews/jsdv/src/Grid" {
1027
2022
  get selectedRowIndices(): any[];
1028
2023
  /**
1029
2024
  * Gets the selected cells.
1030
- * @returns {Array} An array of GridCell instances.
2025
+ * @type {Array}
2026
+ * @summary An array of GridCell instances.
1031
2027
  */
1032
2028
  get selectedCells(): any[];
1033
2029
  /**
@@ -1041,25 +2037,8 @@ declare module "DataViews/jsdv/src/Grid" {
1041
2037
  * @param {Number} [count] The length of the range.
1042
2038
  */
1043
2039
  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;
2040
+ addRow(): void;
2041
+ removeRowRange(index: any, count: any): void;
1063
2042
  scrollRangeInvalid: boolean;
1064
2043
  /**
1065
2044
  * Sorts by the specified column and sort direction.
@@ -1069,17 +2048,31 @@ declare module "DataViews/jsdv/src/Grid" {
1069
2048
  sortByColumn(index: number, sortAscending?: boolean): void;
1070
2049
  set sortedColumn(arg: number);
1071
2050
  /**
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.
2051
+ * Gets or sets the index of the column, by which the data is sorted.
2052
+ * @type {Number}
2053
+ * @summary The column index, or -1 if no sorting is applied to the grid.
1074
2054
  */
1075
2055
  get sortedColumn(): number;
1076
2056
  set sortAscending(arg: boolean);
1077
2057
  /**
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.
2058
+ * Gets or sets a value, indicating whether the sorting is in Ascending order.
2059
+ * @type {Boolean}
2060
+ * @summary True if the sorting is in Ascending order, otherwise false.
1080
2061
  */
1081
2062
  get sortAscending(): boolean;
1082
2063
  /**
2064
+ * Groups by the specified column.
2065
+ * @param {Number} index The index of the column to group by, or null to clear the grouping.
2066
+ */
2067
+ groupByColumn(index: number): void;
2068
+ private set groupColumn(arg);
2069
+ /**
2070
+ * Gets the index of the column, by which the data is grouped.
2071
+ * @returns {Number} The column index, or -1 if no grouping is applied to the grid.
2072
+ * @private
2073
+ */
2074
+ private get groupColumn();
2075
+ /**
1083
2076
  * Calculates the scroll fix amount.
1084
2077
  * @private
1085
2078
  */
@@ -1101,103 +2094,99 @@ declare module "DataViews/jsdv/src/Grid" {
1101
2094
  * @private
1102
2095
  */
1103
2096
  private resizeColumn;
2097
+ set model(arg: any);
1104
2098
  /**
1105
- * Sets the data model of this grid.
1106
- * @param {GridModel} value The model.
2099
+ * Gets or sets the effective data model of this grid.
2100
+ * @type {GridModel}
2101
+ * @summary The model.
1107
2102
  */
1108
- set model(arg: GridModel);
2103
+ get model(): any;
2104
+ getAllPropertyDescriptors(obj: any): any;
2105
+ set selectedObject(arg: any);
2106
+ get selectedObject(): any;
2107
+ generateData(values: any): void;
1109
2108
  /**
1110
- * Gets the effective data model of this grid.
1111
- * @returns {GridModel} The model.
1112
- */
1113
- get model(): GridModel;
2109
+ * Sets the metadata, associated with this grid.
2110
+ * @param {Map} value The metadata.
2111
+ */
2112
+ set metaData(arg: Map<any, any>);
1114
2113
  /**
1115
- * Refreshes the grid after external modifications to the grid model.
1116
- */
1117
- rebind(): void;
2114
+ * Gets the metadata, associated with this grid.
2115
+ * @returns {Map} The metadata.
2116
+ */
2117
+ get metaData(): Map<any, any>;
1118
2118
  /**
1119
- * Sets the index of the first visible row.
1120
- * @param {Number} row The row index.
2119
+ * Gets a value indicating whether to enumerate the properties that don't have setters.
2120
+ * @type {Boolean}
2121
+ * @summary True to enumerate read-only properties, otherwise false.
2122
+ */
2123
+ get showAllProperties(): boolean;
2124
+ /**
2125
+ * Gets a value indicating whether to enumerate the properties that don't have setters.
2126
+ * @type {Boolean}
2127
+ * @summary True to enumerate read-only properties, otherwise false.
2128
+ */
2129
+ get showReadonlyProperties(): boolean;
2130
+ /**
2131
+ * Gets a value indicating whether properties that don't have setters can be edited.
2132
+ * @type {Boolean}
2133
+ * @summary True if read-only properties can be edited, otherwise false.
1121
2134
  */
2135
+ get editReadonlyProperties(): boolean;
2136
+ /**
2137
+ * Refreshes the grid after external modifications to the grid model.
2138
+ */
2139
+ rebind(): void;
1122
2140
  set scrollRow(arg: number);
1123
2141
  /**
1124
- * Gets the index of the first visible row.
1125
- * @returns {Number} The row index.
2142
+ * Gets or sets the index of the first visible row.
2143
+ * @type {Number}
2144
+ * @summary The row index.
1126
2145
  */
1127
2146
  get scrollRow(): number;
1128
2147
  get effectiveModel(): any;
1129
2148
  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
2149
  set allowEdit(arg: boolean);
1135
2150
  /**
1136
- * Gets a value, indicating whether inplace editing is enabled.
1137
- * @returns {Boolean} True if inplace editing is enabled, otherwise false.
2151
+ * Gets or sets a value, indicating whether inplace editing is enabled.
2152
+ * @type {Boolean}
2153
+ * @summary True if inplace editing is enabled, otherwise false.
1138
2154
  */
1139
2155
  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
2156
  set allowCellSelect(arg: boolean);
1165
2157
  /**
1166
- * Gets a value, indicating whether single cell selection is enabled.
1167
- * @returns {Boolean} True if single cell selection is enabled, otherwise false.
2158
+ * Gets or sets a value, indicating whether single cell selection is enabled.
2159
+ * @type {Boolean}
2160
+ * @summary True if single cell selection is enabled, otherwise false.
1168
2161
  */
1169
2162
  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
2163
  set allowScroll(arg: boolean);
1175
2164
  /**
1176
- * Gets a value, indicating whether scrolling is enabled.
1177
- * @returns {Boolean} True if inplace scrolling is enabled, otherwise false.
2165
+ * Gets or sets a value, indicating whether scrolling is enabled.
2166
+ * @type {Boolean}
2167
+ * @summary True if inplace scrolling is enabled, otherwise false.
1178
2168
  */
1179
2169
  get allowScroll(): boolean;
1180
2170
  set filter(arg: any);
1181
2171
  get filter(): any;
2172
+ _groupColumn: any;
1182
2173
  onScroll(e: any): boolean;
1183
2174
  headerMouseOver(e: any): void;
1184
2175
  headerMouseLeave(e: any): void;
1185
- columnHeaderContextMenu(e: any): void;
1186
- contextMenu: HTMLDivElement | Menu;
1187
2176
  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;
2177
+ rowHeaderContextMenu(e: any, selection: any): void;
2178
+ contextMenu: import("@mindfusion/common-ui").Menu;
1197
2179
  contextMenuCallback(item: any): void;
2180
+ /**
2181
+ * Disposes the current context menu.
2182
+ */
2183
+ disposeContextMenu(): void;
1198
2184
  tableKeyDown(e: any): void;
2185
+ _clearSearchTimeout: number;
2186
+ autoSearch(searchString: any): void;
1199
2187
  tableKeyUp(e: any): void;
1200
2188
  tableCellClicked(e: any): void;
2189
+ getNextFocusableRow(row: any, back: any): any;
1201
2190
  /**
1202
2191
  * Gets the cell at the provided coordinates, if it is focusable, or the nearest focusable cell in the specified direction.
1203
2192
  * @param {Number} row The cell row.
@@ -1213,6 +2202,8 @@ declare module "DataViews/jsdv/src/Grid" {
1213
2202
  row: any;
1214
2203
  column: number;
1215
2204
  };
2205
+ get firstFocusableColumn(): number;
2206
+ get lastFocusableColumn(): number;
1216
2207
  /**
1217
2208
  * Gets the DOM element of the cell in the specified coordinates.
1218
2209
  * @param {Number} row The cell row.
@@ -1253,6 +2244,12 @@ declare module "DataViews/jsdv/src/Grid" {
1253
2244
  */
1254
2245
  private scrollFix;
1255
2246
  /**
2247
+ * Checks if the row at the specified index is a group row.
2248
+ * @param {Number} row The row index.
2249
+ * @private
2250
+ */
2251
+ private isGroupRow;
2252
+ /**
1256
2253
  * Scrolls to the specified row.
1257
2254
  * @param {Number} row The row index.
1258
2255
  * @private
@@ -1265,7 +2262,8 @@ declare module "DataViews/jsdv/src/Grid" {
1265
2262
  set activeEditor(arg: any);
1266
2263
  /**
1267
2264
  * Gets the active editor.
1268
- * @returns {Object} The editor.
2265
+ * @type {Object}
2266
+ * @summary The editor.
1269
2267
  */
1270
2268
  get activeEditor(): any;
1271
2269
  /**
@@ -1275,16 +2273,19 @@ declare module "DataViews/jsdv/src/Grid" {
1275
2273
  private get lastRowIndex();
1276
2274
  /**
1277
2275
  * Gets the height of rows viewport.
1278
- * @returns {Number} The height.
2276
+ * @type {Number}
2277
+ * @summary The height.
1279
2278
  * @private
1280
2279
  */
1281
2280
  private get contentHeight();
1282
2281
  /**
1283
2282
  * Gets the height of rows viewport minus the horizontal scrollbar height.
1284
- * @returns {Number} The height.
2283
+ * @type {Number}
2284
+ * @summary The height.
1285
2285
  * @private
1286
2286
  */
1287
2287
  private get contentClientHeight();
2288
+ get parent(): any;
1288
2289
  /**
1289
2290
  * Gets the width of the specified grid column.
1290
2291
  * @param {Number} column The column index.
@@ -1292,16 +2293,10 @@ declare module "DataViews/jsdv/src/Grid" {
1292
2293
  */
1293
2294
  getColumnWidth(column: number): number;
1294
2295
  /**
1295
- * Sets the width of the specified grid column.
1296
- * @param {Number} column The column index.
2296
+ * Sets the width of the first grid column.
1297
2297
  * @param {Number} width The width in pixels.
1298
2298
  */
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;
2299
+ setColumnWidth(width: number): void;
1305
2300
  /**
1306
2301
  * Sets selected rows after raising selection events.
1307
2302
  * @private
@@ -1341,26 +2336,36 @@ declare module "DataViews/jsdv/src/Grid" {
1341
2336
  * @private
1342
2337
  */
1343
2338
  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;
2339
+ onCellAction(row: any, column: any): void;
2340
+ /**
2341
+ * Raised when a column is sorted.
2342
+ * @event columnSorted
2343
+ * @type {EventDispatcher}
2344
+ * @property {PropertyGridContent} sender
2345
+ * @property {Object} args
2346
+ */
2347
+ get columnSorted(): EventDispatcher<any>;
2348
+ /**
2349
+ * Raised when a column is sorted.
2350
+ * @event groupingChanged
2351
+ * @type {EventDispatcher}
2352
+ * @property {PropertyGridContent} sender
2353
+ * @property {Object} args
2354
+ */
2355
+ get groupingChanged(): EventDispatcher<any>;
2356
+ /**
2357
+ * Raised when a row data is loading.
2358
+ * @event rowLoading
2359
+ * @type {EventDispatcher}
2360
+ * @property {PropertyGridContent} sender
2361
+ * @property {RowModifyingEventArgs} args
2362
+ */
2363
+ get rowLoading(): EventDispatcher<any>;
1359
2364
  /**
1360
2365
  * Raised when a row is rendered.
1361
2366
  * @event rowRendered
1362
2367
  * @type {EventDispatcher}
1363
- * @property {Grid} sender
2368
+ * @property {PropertyGridContent} sender
1364
2369
  * @property {RowModifiedEventArgs} args
1365
2370
  */
1366
2371
  get rowRendered(): EventDispatcher<any>;
@@ -1368,7 +2373,7 @@ declare module "DataViews/jsdv/src/Grid" {
1368
2373
  * Raised before a row is selected.
1369
2374
  * @event rowSelecting
1370
2375
  * @type {EventDispatcher}
1371
- * @property {Grid} sender
2376
+ * @property {PropertyGridContent} sender
1372
2377
  * @property {RowModifyingEventArgs} args
1373
2378
  */
1374
2379
  get rowSelecting(): EventDispatcher<any>;
@@ -1376,15 +2381,31 @@ declare module "DataViews/jsdv/src/Grid" {
1376
2381
  * Raised when a row is selected.
1377
2382
  * @event rowSelected
1378
2383
  * @type {EventDispatcher}
1379
- * @property {Grid} sender
2384
+ * @property {PropertyGridContent} sender
1380
2385
  * @property {RowModifiedEventArgs} args
1381
2386
  */
1382
2387
  get rowSelected(): EventDispatcher<any>;
2388
+ /**
2389
+ * Raised before a row is expanded.
2390
+ * @event rowExpanding
2391
+ * @type {EventDispatcher}
2392
+ * @property {PropertyGridContent} sender
2393
+ * @property {RowModifyingEventArgs} args
2394
+ */
2395
+ get rowExpanding(): EventDispatcher<any>;
2396
+ /**
2397
+ * Raised when a row is expanded.
2398
+ * @event rowExpanded
2399
+ * @type {EventDispatcher}
2400
+ * @property {PropertyGridContent} sender
2401
+ * @property {RowModifiedEventArgs} args
2402
+ */
2403
+ get rowExpanded(): EventDispatcher<any>;
1383
2404
  /**
1384
2405
  * Raised before a new row is created.
1385
2406
  * @event rowCreating
1386
2407
  * @type {EventDispatcher}
1387
- * @property {Grid} sender
2408
+ * @property {PropertyGridContent} sender
1388
2409
  * @property {RowModifyingEventArgs} args
1389
2410
  */
1390
2411
  get rowCreating(): EventDispatcher<any>;
@@ -1392,7 +2413,7 @@ declare module "DataViews/jsdv/src/Grid" {
1392
2413
  * Raised when a new row is created.
1393
2414
  * @event rowCreated
1394
2415
  * @type {EventDispatcher}
1395
- * @property {Grid} sender
2416
+ * @property {PropertyGridContent} sender
1396
2417
  * @property {RowModifiedEventArgs} args
1397
2418
  */
1398
2419
  get rowCreated(): EventDispatcher<any>;
@@ -1400,7 +2421,7 @@ declare module "DataViews/jsdv/src/Grid" {
1400
2421
  * Raised before a row is deleted.
1401
2422
  * @event rowDeleting
1402
2423
  * @type {EventDispatcher}
1403
- * @property {Grid} sender
2424
+ * @property {PropertyGridContent} sender
1404
2425
  * @property {RowModifyingEventArgs} args
1405
2426
  */
1406
2427
  get rowDeleting(): EventDispatcher<any>;
@@ -1408,7 +2429,7 @@ declare module "DataViews/jsdv/src/Grid" {
1408
2429
  * Raised when a row is deleted.
1409
2430
  * @event rowDeleted
1410
2431
  * @type {EventDispatcher}
1411
- * @property {Grid} sender
2432
+ * @property {PropertyGridContent} sender
1412
2433
  * @property {RowModifiedEventArgs} args
1413
2434
  */
1414
2435
  get rowDeleted(): EventDispatcher<any>;
@@ -1416,7 +2437,7 @@ declare module "DataViews/jsdv/src/Grid" {
1416
2437
  * Raised before a row is updated.
1417
2438
  * @event rowUpdating
1418
2439
  * @type {EventDispatcher}
1419
- * @property {Grid} sender
2440
+ * @property {PropertyGridContent} sender
1420
2441
  * @property {RowModifyingEventArgs} args
1421
2442
  */
1422
2443
  get rowUpdating(): EventDispatcher<any>;
@@ -1424,7 +2445,7 @@ declare module "DataViews/jsdv/src/Grid" {
1424
2445
  * Raised when a row is updated.
1425
2446
  * @event rowUpdated
1426
2447
  * @type {EventDispatcher}
1427
- * @property {Grid} sender
2448
+ * @property {PropertyGridContent} sender
1428
2449
  * @property {RowModifiedEventArgs} args
1429
2450
  */
1430
2451
  get rowUpdated(): EventDispatcher<any>;
@@ -1432,7 +2453,7 @@ declare module "DataViews/jsdv/src/Grid" {
1432
2453
  * Raised before a cell is selected.
1433
2454
  * @event cellSelecting
1434
2455
  * @type {EventDispatcher}
1435
- * @property {Grid} sender
2456
+ * @property {PropertyGridContent} sender
1436
2457
  * @property {CellEventArgs} args
1437
2458
  */
1438
2459
  get cellSelecting(): EventDispatcher<any>;
@@ -1454,174 +2475,331 @@ declare module "DataViews/jsdv/src/Grid" {
1454
2475
  * @private
1455
2476
  */
1456
2477
  private onCellSelected;
2478
+ onCellFocusing(cell: any): boolean;
2479
+ onCellFocused(): void;
2480
+ onRowRender(row: any): void;
2481
+ cellReadonly(row: any, column: any): boolean;
2482
+ onCustomDrawHeader(row: any, column: any, defaultContent: any): any;
2483
+ onCustomDrawCell(row: any, column: any, defaultContent: any): any;
2484
+ }
2485
+ import { UIControl } from "DataViews/jsdv/src/UIControl";
2486
+ import { Unit } from "@mindfusion/common";
2487
+ import ProxyModel from "DataViews/jsdv/src/ProxyModel";
2488
+ import GridRenderer from "DataViews/jsdv/src/GridRenderer";
2489
+ import Selection from "DataViews/jsdv/src/Selection";
2490
+ import { EventDispatcher } from "@mindfusion/common";
2491
+ import { GridCell } from "DataViews/jsdv/src/GridCell";
2492
+ }
2493
+ declare module "DataViews/jsdv/src/PropertyGridPage" {
2494
+ /**
2495
+ * @class Represents a page in a PropertyGrid control.
2496
+ * @augments ListItem
2497
+ * @private
2498
+ */
2499
+ export class PropertyGridPage extends ListItem {
1457
2500
  /**
1458
- * Raised before a cell is focused.
1459
- * @event cellFocusing
1460
- * @type {EventDispatcher}
1461
- * @property {Grid} sender
1462
- * @property {CellEventArgs} args
2501
+ * Initializes a new instance of the PropertyGridPage class.
2502
+ * @constructor
2503
+ * @param {String} propertyName The property name.
2504
+ * @param {Number} index The index of the oject within its collection.
2505
+ * @param {Object} obj The object which properties will be shown in the page.
2506
+ * @param {Map} meta The meta data dictionary, associated with this object.
2507
+ * @param {Boolean} main Indicates whether this page is the control's main page.
1463
2508
  */
1464
- get cellFocusing(): EventDispatcher<any>;
2509
+ constructor(propertyName: string, index: number, obj: any, meta: Map<any, any>, main: boolean);
2510
+ _propertyName: string;
2511
+ _propertyIndex: number;
2512
+ _selectedObject: any;
2513
+ _mainPage: boolean;
2514
+ _collectionPage: boolean;
2515
+ content: PropertyGridContent;
2516
+ headers: ToolStripItem[];
2517
+ footers: ToolStripItem[];
2518
+ }
2519
+ import { ListItem } from "@mindfusion/common-ui";
2520
+ import { PropertyGridContent } from "DataViews/jsdv/src/PropertyGridContent";
2521
+ import { ToolStripItem } from "@mindfusion/common-ui";
2522
+ }
2523
+ declare module "DataViews/jsdv/src/PropertyGrid" {
2524
+ /**
2525
+ * @class Provides a user interface for browsing and editing the properties of an object.
2526
+ * @augments UIControl
2527
+ */
2528
+ export class PropertyGrid extends UIControl {
1465
2529
  /**
1466
- * Raises the cellFocusing event.
2530
+ * Initializes a new instance of the PropertyGrid class.
2531
+ * @constructor
2532
+ * @param {HTMLDivElement} [element] The control's associated Dom element.
2533
+ */
2534
+ constructor(element?: HTMLDivElement);
2535
+ _defaultWidth: Unit;
2536
+ _defaultHeight: Unit;
2537
+ header: ToolStrip;
2538
+ footer: ToolStrip;
2539
+ _metaData: Map<any, any>;
2540
+ _sortAscending: boolean;
2541
+ _grouped: boolean;
2542
+ _showAllProperties: boolean;
2543
+ _showReadonlyProperties: boolean;
2544
+ _editReadonlyProperties: boolean;
2545
+ _defaultCategoryName: string;
2546
+ _currentProperty: string;
2547
+ _currentIndex: number;
2548
+ _rowLoading: EventDispatcher<import("Controls/EventArgs").EventArgs>;
2549
+ _rowRendered: EventDispatcher<import("Controls/EventArgs").EventArgs>;
2550
+ _currentObjectChanging: EventDispatcher<import("Controls/EventArgs").EventArgs>;
2551
+ _currentObjectChanged: EventDispatcher<import("Controls/EventArgs").EventArgs>;
2552
+ _propertyValueChanging: EventDispatcher<import("Controls/EventArgs").EventArgs>;
2553
+ _propertyValueChanged: EventDispatcher<import("Controls/EventArgs").EventArgs>;
2554
+ _resolveCellDataType: EventDispatcher<import("Controls/EventArgs").EventArgs>;
2555
+ _formatCellValue: EventDispatcher<import("Controls/EventArgs").EventArgs>;
2556
+ _headerButtonClick: (sender: any, args: any) => void;
2557
+ _footerButtonClick: (sender: any, args: any) => void;
2558
+ _rowValidateActionHandler: (sender: any, args: any) => void;
2559
+ _rowActionHandler: (sender: any, args: any) => void;
2560
+ _cellSelectHandler: (sender: any, args: any) => void;
2561
+ _sortedHandler: (sender: any, args: any) => void;
2562
+ getContent(): any;
2563
+ beforeAddItem(item: any, index: any): void;
2564
+ /**
2565
+ * ListContainer.detachItem override.
2566
+ * @private
2567
+ */
2568
+ private detachItem;
2569
+ /**
2570
+ * ListContainer.attachItem override.
1467
2571
  * @private
1468
2572
  */
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>;
2573
+ private attachItem;
1478
2574
  /**
1479
- * Raises the cellFocused event.
2575
+ * ListContainer.addItem override.
1480
2576
  * @private
1481
2577
  */
1482
- private onCellFocused;
2578
+ private addItem;
2579
+ private set selectedItem(arg);
1483
2580
  /**
1484
- * Raises the customDrawCell event.
2581
+ * Gets or sets the current PropertyGridPage.
2582
+ * @type {PropertyGridPage}
1485
2583
  * @private
1486
2584
  */
1487
- private onCustomDrawCell;
2585
+ private get selectedItem();
1488
2586
  /**
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>;
2587
+ * ListContainer.removeItem override.
2588
+ * @private
2589
+ */
2590
+ private removeItem;
1496
2591
  /**
1497
- * Raises the customDrawHeader event.
1498
2592
  * @private
1499
2593
  */
1500
- private onCustomDrawHeader;
2594
+ private getTabToSelect;
1501
2595
  /**
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>;
2596
+ * Refreshes the grid after external modifications to the selected object.
2597
+ */
2598
+ rebind(): void;
1509
2599
  /**
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 {
2600
+ * Expands the specified property.
2601
+ * @param {String} propertyName The name of the property to expand.
2602
+ * @param {Number} [index] The index of the object, if that object is within a collection property.
2603
+ * @remarks Expands a property of the currently selected object.
2604
+ */
2605
+ expandProperty(propertyName: string, index?: number): Promise<any>;
1538
2606
  /**
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;
2607
+ * Collapses the specified property.
2608
+ * @param {String} propertyName The name of the property to collapse.
2609
+ * @param {Number} [index] The index of the object, if that object is within a collection property.
2610
+ * @remarks Collapses a property of the currently selected object.
2611
+ */
2612
+ collapseProperty(propertyName: string, index?: number): void;
1551
2613
  /**
1552
- * Sets the name of the field, displayed in the column.
1553
- * @param {String} value The field name.
2614
+ * Closes the specified page.
2615
+ * @private
1554
2616
  */
1555
- set name(arg: string);
2617
+ private closeItem;
2618
+ set selectedObject(arg: any);
1556
2619
  /**
1557
- * Gets the name of the field, displayed in the column.
1558
- * @returns {String} The field name.
2620
+ * Gets or sets the object whose properties can be edited by this control.
2621
+ * @type {Object}
2622
+ * @summary The object to edit.
1559
2623
  */
1560
- get name(): string;
2624
+ get selectedObject(): any;
2625
+ _selectedObject: any;
1561
2626
  /**
1562
- * Sets the type of this column.
1563
- * @param {DataType} value The type.
2627
+ * Gets the object whose properties are currently displayed by this control.
2628
+ * @type {Object}
2629
+ * @summary The object whose properties are currently displayed.
1564
2630
  */
1565
- set dataType(arg: any);
2631
+ get currentObject(): any;
1566
2632
  /**
1567
- * Gets the type of this column.
1568
- * @returns {DataType} The type.
2633
+ * Gets the name of the selected property.
2634
+ * @type {String}
2635
+ * @summary The selected property name.
1569
2636
  */
1570
- get dataType(): any;
2637
+ get currentProperty(): string;
1571
2638
  /**
1572
- * Sets the metadata, associated with this column.
1573
- * @param {Map} value The metadata.
2639
+ * Gets the index of the currently selected object, if that object is within a collection property.
2640
+ * @type {Number}
2641
+ * @summary The index of the current object within the collection, or -1.
1574
2642
  */
2643
+ get currentIndex(): number;
1575
2644
  set metaData(arg: Map<any, any>);
1576
2645
  /**
1577
- * Gets the metadata, associated with this column.
1578
- * @returns {Map} The metadata,
2646
+ * Gets or sets the meta data dictionary, associated with this control.
2647
+ * @type {Map}
2648
+ * @summary The meta data dictionary.
1579
2649
  */
1580
2650
  get metaData(): Map<any, any>;
2651
+ set showAllProperties(arg: boolean);
1581
2652
  /**
1582
- * Sets the text, diplayed in the header of this column.
1583
- * @param {String} value The display text.
2653
+ * Gets or sets a value indicating whether to enumerate the properties, that are not included in the meta data dictionary.
2654
+ * @type {Boolean}
2655
+ * @summary True to enumerate all properties, otherwise false.
1584
2656
  */
1585
- set caption(arg: string);
2657
+ get showAllProperties(): boolean;
2658
+ set showReadonlyProperties(arg: boolean);
1586
2659
  /**
1587
- * Gets the text, diplayed in the header of this column.
1588
- * @returns {String} The display text.
2660
+ * Gets or sets a value indicating whether to enumerate the properties that don't have setters.
2661
+ * @type {Boolean}
2662
+ * @summary True to enumerate read-only properties, otherwise false.
1589
2663
  */
1590
- get caption(): string;
1591
- _caption: string;
2664
+ get showReadonlyProperties(): boolean;
2665
+ set editReadonlyProperties(arg: boolean);
1592
2666
  /**
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.
2667
+ * Gets or sets a value indicating whether properties that don't have setters can be edited.
2668
+ * @type {Boolean}
2669
+ * @summary True if read-only properties can be edited, otherwise false.
1595
2670
  */
1596
- set editable(arg: boolean);
2671
+ get editReadonlyProperties(): boolean;
2672
+ set allowEdit(arg: boolean);
1597
2673
  /**
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.
2674
+ * Gets or sets a value, indicating whether inplace editing is enabled.
2675
+ * @type {Boolean}
2676
+ * @summary True if inplace editing is enabled, otherwise false.
2677
+ */
2678
+ get allowEdit(): boolean;
2679
+ _allowEdit: any;
2680
+ set allowCellSelect(arg: boolean);
2681
+ /**
2682
+ * Gets or sets a value, indicating whether single cell selection is enabled.
2683
+ * @type {Boolean}
2684
+ * @summary True if single cell selection is enabled, otherwise false.
2685
+ */
2686
+ get allowCellSelect(): boolean;
2687
+ _allowCellSelect: any;
2688
+ set allowScroll(arg: boolean);
2689
+ /**
2690
+ * Gets or sets a value, indicating whether scrolling is enabled.
2691
+ * @type {Boolean}
2692
+ * @summary True if scrolling is enabled, otherwise false.
2693
+ */
2694
+ get allowScroll(): boolean;
2695
+ _allowScroll: any;
2696
+ _selectedItem: PropertyGridPage;
2697
+ set allowDrag(arg: boolean);
2698
+ /**
2699
+ * ListContainer.allowDrag override.
2700
+ * @type {Boolean}
2701
+ * @summary false - not applicable.
1600
2702
  */
1601
- get editable(): boolean;
2703
+ get allowDrag(): boolean;
2704
+ set allowDrop(arg: boolean);
1602
2705
  /**
1603
- * Sets a value, indicating whether this column can be sorted.
1604
- * @param {Boolean} value True if the column can be sorted, otherwise false.
2706
+ * ListContainer.allowDrop override.
2707
+ * @type {Boolean}
2708
+ * @summary false - not applicable.
1605
2709
  */
1606
- set sortable(arg: boolean);
2710
+ get allowDrop(): boolean;
2711
+ set acceptDrop(arg: any);
1607
2712
  /**
1608
- * Gets a value, indicating whether this column can be sorted.
1609
- * @returns {Boolean} True if the column can be sorted, otherwise false.
2713
+ * ListContainer.acceptDrop override.
2714
+ * @type {ListItem}
2715
+ * @summary null - not applicable.
1610
2716
  */
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;
2717
+ get acceptDrop(): any;
2718
+ /**
2719
+ * Raised when a row data is loading.
2720
+ * @event rowLoading
2721
+ * @type {EventDispatcher}
2722
+ * @property {PropertyGrid} sender
2723
+ * @property {PropertyEventArgs} args
2724
+ */
2725
+ get rowLoading(): EventDispatcher<any>;
2726
+ /**
2727
+ * Raised when a row is rendered.
2728
+ * @event rowRendered
2729
+ * @type {EventDispatcher}
2730
+ * @property {PropertyGrid} sender
2731
+ * @property {PropertyEventArgs} args
2732
+ */
2733
+ get rowRendered(): EventDispatcher<any>;
2734
+ /**
2735
+ * Raised when the current object is changing.
2736
+ * @event currentObjectChanging
2737
+ * @type {EventDispatcher}
2738
+ * @property {PropertyGrid} sender
2739
+ * @property {PropertyEventArgs} args
2740
+ */
2741
+ get currentObjectChanging(): EventDispatcher<any>;
2742
+ /**
2743
+ * Raised when the current object is changed.
2744
+ * @event currentObjectChanged
2745
+ * @type {EventDispatcher}
2746
+ * @property {PropertyGrid} sender
2747
+ * @property {PropertyEventArgs} args
2748
+ */
2749
+ get currentObjectChanged(): EventDispatcher<any>;
2750
+ /**
2751
+ * Raised when a property value is changing.
2752
+ * @event propertyValueChanging
2753
+ * @type {EventDispatcher}
2754
+ * @property {PropertyGrid} sender
2755
+ * @property {PropertyEventArgs} args
2756
+ */
2757
+ get propertyValueChanging(): EventDispatcher<any>;
2758
+ /**
2759
+ * Raised when a property value is changed.
2760
+ * @event propertyValueChanged
2761
+ * @type {EventDispatcher}
2762
+ * @property {PropertyGrid} sender
2763
+ * @property {PropertyEventArgs} args
2764
+ */
2765
+ get propertyValueChanged(): EventDispatcher<any>;
2766
+ /**
2767
+ * Handles the click event in the header toolstrip.
2768
+ * @private
2769
+ */
2770
+ private onHeaderButtonClick;
2771
+ /**
2772
+ * Handles the click event in the footer toolstrip.
2773
+ * @private
2774
+ */
2775
+ private onFooterButtonClick;
2776
+ /**
2777
+ * Handles a validating row action event in the grid.
2778
+ * @private
2779
+ */
2780
+ private onRowValidateAction;
2781
+ /**
2782
+ * Handles a row action event in the grid.
2783
+ * @private
2784
+ */
2785
+ private onRowAction;
2786
+ /**
2787
+ * Handles a cell select event in the grid.
2788
+ * @private
2789
+ */
2790
+ private onCellSelect;
2791
+ onSort(sender: any, args: any): void;
2792
+ /**
2793
+ * onItemsChanging override.
2794
+ * @protected
2795
+ */
2796
+ protected onItemsChanging(sender: any, args: any): void;
1623
2797
  }
1624
- import DataType from "DataViews/jsdv/src/DataType";
2798
+ import { UIControl } from "DataViews/jsdv/src/UIControl";
2799
+ import { Unit } from "@mindfusion/common";
2800
+ import { ToolStrip } from "@mindfusion/common-ui";
2801
+ import { EventDispatcher } from "@mindfusion/common";
2802
+ import { PropertyGridPage } from "DataViews/jsdv/src/PropertyGridPage";
1625
2803
  }
1626
2804
  declare module "@mindfusion/dataviews" {
1627
2805
  export { ArrayModel } from "DataViews/jsdv/src/ArrayModel";
@@ -1645,4 +2823,9 @@ declare module "@mindfusion/dataviews" {
1645
2823
  export { RealNumberType } from "DataViews/jsdv/src/RealNumberType";
1646
2824
  export { StringType } from "DataViews/jsdv/src/StringType";
1647
2825
  export { UIControl } from "DataViews/jsdv/src/UIControl";
2826
+ export { PropertyGrid } from "DataViews/jsdv/src/PropertyGrid";
2827
+ export { DynamicType } from "DataViews/jsdv/src/DynamicType";
2828
+ export { BooleanType } from "DataViews/jsdv/src/BooleanType";
2829
+ export { ObjectType } from "DataViews/jsdv/src/ObjectType";
2830
+ export { CollectionType } from "DataViews/jsdv/src/CollectionType";
1648
2831
  }