@syncfusion/ej2-treegrid 31.1.17 → 31.1.20
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/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +13 -4
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +13 -4
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +14 -50
- package/src/treegrid/actions/edit.js +1 -1
- package/src/treegrid/actions/rowdragdrop.js +12 -3
- package/styles/bootstrap4-lite.css +8 -0
- package/styles/bootstrap4.css +8 -0
- package/styles/treegrid/bootstrap4.css +8 -0
- package/dist/ts/index.d.ts +0 -4
- package/dist/ts/index.ts +0 -4
- package/dist/ts/treegrid/actions/batch-edit.d.ts +0 -74
- package/dist/ts/treegrid/actions/batch-edit.ts +0 -627
- package/dist/ts/treegrid/actions/clipboard.d.ts +0 -36
- package/dist/ts/treegrid/actions/clipboard.ts +0 -174
- package/dist/ts/treegrid/actions/column-chooser.d.ts +0 -37
- package/dist/ts/treegrid/actions/column-chooser.ts +0 -55
- package/dist/ts/treegrid/actions/column-menu.d.ts +0 -24
- package/dist/ts/treegrid/actions/column-menu.ts +0 -39
- package/dist/ts/treegrid/actions/command-column.d.ts +0 -24
- package/dist/ts/treegrid/actions/command-column.ts +0 -32
- package/dist/ts/treegrid/actions/context-menu.d.ts +0 -42
- package/dist/ts/treegrid/actions/context-menu.ts +0 -149
- package/dist/ts/treegrid/actions/crud-actions.d.ts +0 -66
- package/dist/ts/treegrid/actions/crud-actions.ts +0 -388
- package/dist/ts/treegrid/actions/detail-row.d.ts +0 -39
- package/dist/ts/treegrid/actions/detail-row.ts +0 -124
- package/dist/ts/treegrid/actions/edit.d.ts +0 -121
- package/dist/ts/treegrid/actions/edit.ts +0 -1083
- package/dist/ts/treegrid/actions/excel-export.d.ts +0 -67
- package/dist/ts/treegrid/actions/excel-export.ts +0 -240
- package/dist/ts/treegrid/actions/filter.d.ts +0 -57
- package/dist/ts/treegrid/actions/filter.ts +0 -231
- package/dist/ts/treegrid/actions/freeze-column.d.ts +0 -28
- package/dist/ts/treegrid/actions/freeze-column.ts +0 -119
- package/dist/ts/treegrid/actions/index.d.ts +0 -24
- package/dist/ts/treegrid/actions/index.ts +0 -24
- package/dist/ts/treegrid/actions/infinite-scroll.d.ts +0 -96
- package/dist/ts/treegrid/actions/infinite-scroll.ts +0 -320
- package/dist/ts/treegrid/actions/logger.d.ts +0 -25
- package/dist/ts/treegrid/actions/logger.ts +0 -136
- package/dist/ts/treegrid/actions/page.d.ts +0 -67
- package/dist/ts/treegrid/actions/page.ts +0 -212
- package/dist/ts/treegrid/actions/pdf-export.d.ts +0 -63
- package/dist/ts/treegrid/actions/pdf-export.ts +0 -182
- package/dist/ts/treegrid/actions/print.d.ts +0 -37
- package/dist/ts/treegrid/actions/print.ts +0 -69
- package/dist/ts/treegrid/actions/reorder.d.ts +0 -36
- package/dist/ts/treegrid/actions/reorder.ts +0 -60
- package/dist/ts/treegrid/actions/resize.d.ts +0 -36
- package/dist/ts/treegrid/actions/resize.ts +0 -54
- package/dist/ts/treegrid/actions/rowdragdrop.d.ts +0 -405
- package/dist/ts/treegrid/actions/rowdragdrop.ts +0 -1896
- package/dist/ts/treegrid/actions/selection.d.ts +0 -51
- package/dist/ts/treegrid/actions/selection.ts +0 -530
- package/dist/ts/treegrid/actions/sort.d.ts +0 -63
- package/dist/ts/treegrid/actions/sort.ts +0 -149
- package/dist/ts/treegrid/actions/summary.d.ts +0 -47
- package/dist/ts/treegrid/actions/summary.ts +0 -231
- package/dist/ts/treegrid/actions/toolbar.d.ts +0 -52
- package/dist/ts/treegrid/actions/toolbar.ts +0 -154
- package/dist/ts/treegrid/actions/virtual-scroll.d.ts +0 -90
- package/dist/ts/treegrid/actions/virtual-scroll.ts +0 -306
- package/dist/ts/treegrid/base/constant.d.ts +0 -158
- package/dist/ts/treegrid/base/constant.ts +0 -158
- package/dist/ts/treegrid/base/data.d.ts +0 -90
- package/dist/ts/treegrid/base/data.ts +0 -904
- package/dist/ts/treegrid/base/index.d.ts +0 -11
- package/dist/ts/treegrid/base/index.ts +0 -11
- package/dist/ts/treegrid/base/interface.d.ts +0 -186
- package/dist/ts/treegrid/base/interface.ts +0 -191
- package/dist/ts/treegrid/base/treegrid-model.d.ts +0 -1100
- package/dist/ts/treegrid/base/treegrid.d.ts +0 -2422
- package/dist/ts/treegrid/base/treegrid.ts +0 -5962
- package/dist/ts/treegrid/enum.d.ts +0 -152
- package/dist/ts/treegrid/enum.ts +0 -217
- package/dist/ts/treegrid/index.d.ts +0 -9
- package/dist/ts/treegrid/index.ts +0 -9
- package/dist/ts/treegrid/models/column-chooser-settings-model.d.ts +0 -62
- package/dist/ts/treegrid/models/column-chooser-settings.d.ts +0 -53
- package/dist/ts/treegrid/models/column-chooser-settings.ts +0 -67
- package/dist/ts/treegrid/models/column-model.d.ts +0 -30
- package/dist/ts/treegrid/models/column.d.ts +0 -697
- package/dist/ts/treegrid/models/column.ts +0 -800
- package/dist/ts/treegrid/models/edit-settings-model.d.ts +0 -100
- package/dist/ts/treegrid/models/edit-settings.d.ts +0 -89
- package/dist/ts/treegrid/models/edit-settings.ts +0 -111
- package/dist/ts/treegrid/models/filter-settings-model.d.ts +0 -216
- package/dist/ts/treegrid/models/filter-settings.d.ts +0 -195
- package/dist/ts/treegrid/models/filter-settings.ts +0 -237
- package/dist/ts/treegrid/models/index.d.ts +0 -24
- package/dist/ts/treegrid/models/index.ts +0 -24
- package/dist/ts/treegrid/models/infinite-scroll-settings-model.d.ts +0 -29
- package/dist/ts/treegrid/models/infinite-scroll-settings.d.ts +0 -25
- package/dist/ts/treegrid/models/infinite-scroll-settings.ts +0 -31
- package/dist/ts/treegrid/models/loading-indicator-model.d.ts +0 -21
- package/dist/ts/treegrid/models/loading-indicator.d.ts +0 -19
- package/dist/ts/treegrid/models/loading-indicator.ts +0 -21
- package/dist/ts/treegrid/models/page-settings-model.d.ts +0 -66
- package/dist/ts/treegrid/models/page-settings.d.ts +0 -57
- package/dist/ts/treegrid/models/page-settings.ts +0 -73
- package/dist/ts/treegrid/models/rowdrop-settings-model.d.ts +0 -15
- package/dist/ts/treegrid/models/rowdrop-settings.d.ts +0 -34
- package/dist/ts/treegrid/models/rowdrop-settings.ts +0 -37
- package/dist/ts/treegrid/models/search-settings-model.d.ts +0 -79
- package/dist/ts/treegrid/models/search-settings.d.ts +0 -73
- package/dist/ts/treegrid/models/search-settings.ts +0 -83
- package/dist/ts/treegrid/models/selection-settings-model.d.ts +0 -76
- package/dist/ts/treegrid/models/selection-settings.d.ts +0 -68
- package/dist/ts/treegrid/models/selection-settings.ts +0 -82
- package/dist/ts/treegrid/models/sort-settings-model.d.ts +0 -49
- package/dist/ts/treegrid/models/sort-settings.d.ts +0 -43
- package/dist/ts/treegrid/models/sort-settings.ts +0 -51
- package/dist/ts/treegrid/models/summary-model.d.ts +0 -93
- package/dist/ts/treegrid/models/summary.d.ts +0 -126
- package/dist/ts/treegrid/models/summary.ts +0 -170
- package/dist/ts/treegrid/models/textwrap-settings-model.d.ts +0 -21
- package/dist/ts/treegrid/models/textwrap-settings.d.ts +0 -19
- package/dist/ts/treegrid/models/textwrap-settings.ts +0 -21
- package/dist/ts/treegrid/renderer/index.d.ts +0 -5
- package/dist/ts/treegrid/renderer/index.ts +0 -5
- package/dist/ts/treegrid/renderer/render.d.ts +0 -41
- package/dist/ts/treegrid/renderer/render.ts +0 -379
- package/dist/ts/treegrid/renderer/virtual-row-model-generator.d.ts +0 -16
- package/dist/ts/treegrid/renderer/virtual-row-model-generator.ts +0 -90
- package/dist/ts/treegrid/renderer/virtual-tree-content-render.d.ts +0 -353
- package/dist/ts/treegrid/renderer/virtual-tree-content-render.ts +0 -1125
- package/dist/ts/treegrid/utils.d.ts +0 -70
- package/dist/ts/treegrid/utils.ts +0 -217
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { TreeGrid } from '../base/treegrid';
|
|
2
|
-
/**
|
|
3
|
-
* TreeGrid Print module
|
|
4
|
-
*
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
export declare class Print {
|
|
8
|
-
private parent;
|
|
9
|
-
/**
|
|
10
|
-
* Constructor for Print module
|
|
11
|
-
*
|
|
12
|
-
* @param {TreeGrid} parent - Tree Grid instance
|
|
13
|
-
*/
|
|
14
|
-
constructor(parent?: TreeGrid);
|
|
15
|
-
/**
|
|
16
|
-
* For internal use only - Get the module name.
|
|
17
|
-
*
|
|
18
|
-
* @private
|
|
19
|
-
* @returns {string} Returns Print module name
|
|
20
|
-
*/
|
|
21
|
-
private getModuleName;
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
* @returns {void}
|
|
25
|
-
*/
|
|
26
|
-
addEventListener(): void;
|
|
27
|
-
removeEventListener(): void;
|
|
28
|
-
private printTreeGrid;
|
|
29
|
-
print(): void;
|
|
30
|
-
/**
|
|
31
|
-
* To destroy the Print
|
|
32
|
-
*
|
|
33
|
-
* @returns {void}
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
destroy(): void;
|
|
37
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { TreeGrid } from '../base/treegrid';
|
|
2
|
-
import * as events from '../base/constant';
|
|
3
|
-
import { Grid, getObject, Print as GridPrint } from '@syncfusion/ej2-grids';
|
|
4
|
-
import { addClass } from '@syncfusion/ej2-base';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* TreeGrid Print module
|
|
9
|
-
*
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export class Print {
|
|
13
|
-
private parent: TreeGrid;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Constructor for Print module
|
|
17
|
-
*
|
|
18
|
-
* @param {TreeGrid} parent - Tree Grid instance
|
|
19
|
-
*/
|
|
20
|
-
constructor(parent?: TreeGrid) {
|
|
21
|
-
this.parent = parent;
|
|
22
|
-
Grid.Inject(GridPrint);
|
|
23
|
-
this.addEventListener();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* For internal use only - Get the module name.
|
|
28
|
-
*
|
|
29
|
-
* @private
|
|
30
|
-
* @returns {string} Returns Print module name
|
|
31
|
-
*/
|
|
32
|
-
private getModuleName(): string {
|
|
33
|
-
return 'print';
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @hidden
|
|
38
|
-
* @returns {void}
|
|
39
|
-
*/
|
|
40
|
-
public addEventListener(): void {
|
|
41
|
-
this.parent.grid.on(events.printGridInit, this.printTreeGrid, this);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public removeEventListener(): void {
|
|
45
|
-
this.parent.grid.off(events.printGridInit, this.printTreeGrid);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
private printTreeGrid(printGrid: Object): void {
|
|
49
|
-
const grid: Grid = getObject('printgrid', printGrid);
|
|
50
|
-
const gridElement: Element = getObject('element', printGrid);
|
|
51
|
-
grid.addEventListener(events.queryCellInfo, this.parent.grid.queryCellInfo);
|
|
52
|
-
grid.addEventListener(events.rowDataBound, this.parent.grid.rowDataBound);
|
|
53
|
-
grid.addEventListener(events.beforeDataBound, this.parent.grid.beforeDataBound);
|
|
54
|
-
addClass([gridElement], 'e-treegrid');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
public print(): void {
|
|
58
|
-
this.parent.grid.print();
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* To destroy the Print
|
|
62
|
-
*
|
|
63
|
-
* @returns {void}
|
|
64
|
-
* @hidden
|
|
65
|
-
*/
|
|
66
|
-
public destroy(): void {
|
|
67
|
-
this.removeEventListener();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { TreeGrid } from '../base/treegrid';
|
|
2
|
-
/**
|
|
3
|
-
* TreeGrid Reorder module
|
|
4
|
-
*
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
export declare class Reorder {
|
|
8
|
-
private parent;
|
|
9
|
-
/**
|
|
10
|
-
* Constructor for Reorder module
|
|
11
|
-
*
|
|
12
|
-
* @param {TreeGrid} parent - Tree Grid instance
|
|
13
|
-
*/
|
|
14
|
-
constructor(parent?: TreeGrid);
|
|
15
|
-
/**
|
|
16
|
-
* For internal use only - Get the module name.
|
|
17
|
-
*
|
|
18
|
-
* @private
|
|
19
|
-
* @returns {string} Returns Reorder module name
|
|
20
|
-
*/
|
|
21
|
-
private getModuleName;
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
* @returns {void}
|
|
25
|
-
*/
|
|
26
|
-
addEventListener(): void;
|
|
27
|
-
removeEventListener(): void;
|
|
28
|
-
/**
|
|
29
|
-
* To destroy the Reorder
|
|
30
|
-
*
|
|
31
|
-
* @returns {void}
|
|
32
|
-
* @hidden
|
|
33
|
-
*/
|
|
34
|
-
destroy(): void;
|
|
35
|
-
private updateTreeColumn;
|
|
36
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { TreeGrid } from '../base/treegrid';
|
|
2
|
-
import { ColumnModel, Column } from '../models';
|
|
3
|
-
import { getObject, Grid, Reorder as GridReorder } from '@syncfusion/ej2-grids';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* TreeGrid Reorder module
|
|
7
|
-
*
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export class Reorder {
|
|
11
|
-
private parent: TreeGrid;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Constructor for Reorder module
|
|
15
|
-
*
|
|
16
|
-
* @param {TreeGrid} parent - Tree Grid instance
|
|
17
|
-
*/
|
|
18
|
-
constructor(parent?: TreeGrid) {
|
|
19
|
-
Grid.Inject(GridReorder);
|
|
20
|
-
this.parent = parent;
|
|
21
|
-
this.addEventListener();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* For internal use only - Get the module name.
|
|
26
|
-
*
|
|
27
|
-
* @private
|
|
28
|
-
* @returns {string} Returns Reorder module name
|
|
29
|
-
*/
|
|
30
|
-
private getModuleName(): string {
|
|
31
|
-
return 'reorder';
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
* @returns {void}
|
|
37
|
-
*/
|
|
38
|
-
public addEventListener(): void {
|
|
39
|
-
this.parent.on('getColumnIndex', this.updateTreeColumn, this);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public removeEventListener(): void {
|
|
43
|
-
if (this.parent.isDestroyed) { return; }
|
|
44
|
-
this.parent.off('getColumnIndex', this.updateTreeColumn);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* To destroy the Reorder
|
|
48
|
-
*
|
|
49
|
-
* @returns {void}
|
|
50
|
-
* @hidden
|
|
51
|
-
*/
|
|
52
|
-
public destroy(): void {
|
|
53
|
-
this.removeEventListener();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private updateTreeColumn(): void
|
|
57
|
-
{
|
|
58
|
-
this.parent['getTreeColumn']();
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { TreeGrid } from '../base/treegrid';
|
|
2
|
-
/**
|
|
3
|
-
* TreeGrid Resize module
|
|
4
|
-
*
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
export declare class Resize {
|
|
8
|
-
private parent;
|
|
9
|
-
/**
|
|
10
|
-
* Constructor for Resize module
|
|
11
|
-
*
|
|
12
|
-
* @param {TreeGrid} parent - Tree Grid instance
|
|
13
|
-
*/
|
|
14
|
-
constructor(parent?: TreeGrid);
|
|
15
|
-
/**
|
|
16
|
-
* Resize by field names.
|
|
17
|
-
*
|
|
18
|
-
* @param {string|string[]} fName - Defines the field name.
|
|
19
|
-
* @returns {void}
|
|
20
|
-
*/
|
|
21
|
-
autoFitColumns(fName?: string | string[]): void;
|
|
22
|
-
/**
|
|
23
|
-
* For internal use only - Get the module name.
|
|
24
|
-
*
|
|
25
|
-
* @private
|
|
26
|
-
* @returns {string} Returns Resize module name
|
|
27
|
-
*/
|
|
28
|
-
private getModuleName;
|
|
29
|
-
/**
|
|
30
|
-
* Destroys the Resize.
|
|
31
|
-
*
|
|
32
|
-
* @function destroy
|
|
33
|
-
* @returns {void}
|
|
34
|
-
*/
|
|
35
|
-
destroy(): void;
|
|
36
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { TreeGrid } from '../base/treegrid';
|
|
2
|
-
import { Grid, Resize as GridResize } from '@syncfusion/ej2-grids';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* TreeGrid Resize module
|
|
6
|
-
*
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export class Resize {
|
|
10
|
-
private parent: TreeGrid;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Constructor for Resize module
|
|
14
|
-
*
|
|
15
|
-
* @param {TreeGrid} parent - Tree Grid instance
|
|
16
|
-
*/
|
|
17
|
-
constructor(parent?: TreeGrid) {
|
|
18
|
-
Grid.Inject(GridResize);
|
|
19
|
-
this.parent = parent;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Resize by field names.
|
|
24
|
-
*
|
|
25
|
-
* @param {string|string[]} fName - Defines the field name.
|
|
26
|
-
* @returns {void}
|
|
27
|
-
*/
|
|
28
|
-
public autoFitColumns(fName?: string | string[]): void {
|
|
29
|
-
this.parent.grid.autoFitColumns(fName);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* For internal use only - Get the module name.
|
|
34
|
-
*
|
|
35
|
-
* @private
|
|
36
|
-
* @returns {string} Returns Resize module name
|
|
37
|
-
*/
|
|
38
|
-
private getModuleName(): string {
|
|
39
|
-
return 'resize';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Destroys the Resize.
|
|
44
|
-
*
|
|
45
|
-
* @function destroy
|
|
46
|
-
* @returns {void}
|
|
47
|
-
*/
|
|
48
|
-
public destroy(): void {
|
|
49
|
-
if (this.parent.isDestroyed) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
this.parent.grid.resizeModule.destroy();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
import { TreeGrid } from '../base/treegrid';
|
|
2
|
-
import { ITreeData } from '../base';
|
|
3
|
-
/**
|
|
4
|
-
* TreeGrid RowDragAndDrop module
|
|
5
|
-
*
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export declare class RowDD {
|
|
9
|
-
private parent;
|
|
10
|
-
/** @hidden
|
|
11
|
-
* Represents the position where a row can be dropped within the TreeGrid.
|
|
12
|
-
*/
|
|
13
|
-
private dropPosition;
|
|
14
|
-
/** @hidden
|
|
15
|
-
* Represents the record that is currently being dragged in the TreeGrid.
|
|
16
|
-
*/
|
|
17
|
-
private draggedRecord;
|
|
18
|
-
/** @hidden
|
|
19
|
-
* Represents the record that the currently dragged item is being dropped onto in the TreeGrid.
|
|
20
|
-
*/
|
|
21
|
-
private droppedRecord;
|
|
22
|
-
/** @hidden
|
|
23
|
-
* Stores the data representation of the TreeGrid, including hierarchical structures.
|
|
24
|
-
*/
|
|
25
|
-
treeGridData: ITreeData[];
|
|
26
|
-
/** @hidden
|
|
27
|
-
* Represents the underlying hierarchical data of the TreeGrid.
|
|
28
|
-
*/
|
|
29
|
-
private treeData;
|
|
30
|
-
/** @hidden
|
|
31
|
-
* Indicates whether a row can be dropped into the current target position during a drag-and-drop operation.
|
|
32
|
-
*/
|
|
33
|
-
private canDrop;
|
|
34
|
-
/** @hidden
|
|
35
|
-
* Indicates whether the current drag operation includes child records of the dragged item.
|
|
36
|
-
*/
|
|
37
|
-
private isDraggedWithChild;
|
|
38
|
-
/** @hidden
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
isMultipleGrid: string;
|
|
42
|
-
/** @hidden
|
|
43
|
-
* Indicates whether multiple TreeGrid instances are being managed or displayed.
|
|
44
|
-
*/
|
|
45
|
-
private modifiedRecords;
|
|
46
|
-
/** @hidden
|
|
47
|
-
* Represents the currently selected item in the TreeGrid.
|
|
48
|
-
*/
|
|
49
|
-
private selectedItem;
|
|
50
|
-
/** @hidden
|
|
51
|
-
* Represents the currently selected item in the TreeGrid.
|
|
52
|
-
*/
|
|
53
|
-
private selectedRecords;
|
|
54
|
-
/** @hidden
|
|
55
|
-
* Holds an array of currently selected records in the TreeGrid.
|
|
56
|
-
*/
|
|
57
|
-
private selectedRows;
|
|
58
|
-
/** @hidden
|
|
59
|
-
* Indicates whether there is a droppable item in the TreeGrid.
|
|
60
|
-
*/
|
|
61
|
-
private hasDropItem;
|
|
62
|
-
/** @hidden
|
|
63
|
-
* Indicates whether the item is being added to the bottom of the TreeGrid.
|
|
64
|
-
*/
|
|
65
|
-
isaddtoBottom: boolean;
|
|
66
|
-
private selectedRecord;
|
|
67
|
-
private selectedRow;
|
|
68
|
-
/**
|
|
69
|
-
* Constructor for render module
|
|
70
|
-
*
|
|
71
|
-
* @param {TreeGrid} parent - Tree Grid instance
|
|
72
|
-
*/
|
|
73
|
-
constructor(parent?: TreeGrid);
|
|
74
|
-
/**
|
|
75
|
-
* Retrieves child records for a specified parent ID in the TreeGrid.
|
|
76
|
-
*
|
|
77
|
-
* @param {string} id - The unique ID of the parent record for which to retrieve child records.
|
|
78
|
-
* @returns {ITreeData[]} An array of child records corresponding to the specified parent ID.
|
|
79
|
-
*/
|
|
80
|
-
private getChildrecordsByParentID;
|
|
81
|
-
/**
|
|
82
|
-
* @hidden
|
|
83
|
-
* @returns {void}
|
|
84
|
-
*/
|
|
85
|
-
private addEventListener;
|
|
86
|
-
/**
|
|
87
|
-
* Reorder the rows based on given indexes and position
|
|
88
|
-
*
|
|
89
|
-
* @returns {void}
|
|
90
|
-
* @param {number[]} fromIndexes - source indexes of rows to be re-ordered
|
|
91
|
-
* @param {number} toIndex - Destination row index
|
|
92
|
-
* @param {string} position - Drop position as above or below or child
|
|
93
|
-
*/
|
|
94
|
-
reorderRows(fromIndexes: number[], toIndex: number, position: string): void;
|
|
95
|
-
/**
|
|
96
|
-
* Updates the rows and cells
|
|
97
|
-
*
|
|
98
|
-
* @param {Object[]} records - Updates the given records
|
|
99
|
-
* @param {HTMLTableRowElement[]} rows - Updates the given rows
|
|
100
|
-
* @param {number} index - Updates the given cell index
|
|
101
|
-
* @returns {void}
|
|
102
|
-
*/
|
|
103
|
-
private updateRowAndCellElements;
|
|
104
|
-
/**
|
|
105
|
-
* Performs indent or outdent actions on selected records in the TreeGrid.
|
|
106
|
-
*
|
|
107
|
-
* @param {ITreeData} [record] - The record to be indented or outdented. If undefined, the method operates on the currently selected record.
|
|
108
|
-
* @param {string} [request] - The action to perform, either 'indent' or 'outdent'.
|
|
109
|
-
* @returns {void}
|
|
110
|
-
*/
|
|
111
|
-
private indentOutdentAction;
|
|
112
|
-
/**
|
|
113
|
-
* Triggers a specified event for the TreeGrid, notifying subscribers about the event occurrence.
|
|
114
|
-
*
|
|
115
|
-
* @param {string} action - The action to be triggered, either 'indenting' or 'outdenting'.
|
|
116
|
-
* @param {number} dropIndex - The index at which the row should be dropped.
|
|
117
|
-
* @returns {void}
|
|
118
|
-
*/
|
|
119
|
-
private eventTrigger;
|
|
120
|
-
/**
|
|
121
|
-
* Reorders the flat data array of the TreeGrid and updates the index of each record.
|
|
122
|
-
*
|
|
123
|
-
* @param {ITreeData[]} currentData - The array of tree data records to reorder.
|
|
124
|
-
* @returns {ITreeData[]} The updated array of tree data records with indices set.
|
|
125
|
-
*/
|
|
126
|
-
private orderToIndex;
|
|
127
|
-
/**
|
|
128
|
-
* Handles the addition of new rows to the TreeGrid.
|
|
129
|
-
*
|
|
130
|
-
* @param {Object} e - The event object containing information about the rows being added.
|
|
131
|
-
* @param {number} e.toIndex - The index at which the new rows should be added in the TreeGrid.
|
|
132
|
-
* @param {Object[]} e.records - An array of the records to be added to the TreeGrid.
|
|
133
|
-
*
|
|
134
|
-
* @returns {void} This function does not return any value.
|
|
135
|
-
*/
|
|
136
|
-
private rowsAdded;
|
|
137
|
-
/**
|
|
138
|
-
* Handles the removal of specified rows from the TreeGrid.
|
|
139
|
-
*
|
|
140
|
-
* @param {Object} e - The event object containing information about the removed rows.
|
|
141
|
-
* @param {number[]} e.indexes - An array of indexes of the rows that were removed.
|
|
142
|
-
* @param {Object[]} e.records - An array of the records corresponding to the removed rows.
|
|
143
|
-
*
|
|
144
|
-
* @returns {void} This function does not return any value.
|
|
145
|
-
*/
|
|
146
|
-
private rowsRemoved;
|
|
147
|
-
/**
|
|
148
|
-
* Refreshes the data source of the TreeGrid.
|
|
149
|
-
*
|
|
150
|
-
* @returns {void} This function does not return any value.
|
|
151
|
-
*/
|
|
152
|
-
private refreshGridDataSource;
|
|
153
|
-
/**
|
|
154
|
-
* Removes the border from the first row of the TreeGrid.
|
|
155
|
-
*
|
|
156
|
-
* @param {HTMLTableRowElement} element - The table row element from which to remove the border.
|
|
157
|
-
* @returns {void} This function does not return any value.
|
|
158
|
-
*/
|
|
159
|
-
private removeFirstrowBorder;
|
|
160
|
-
/**
|
|
161
|
-
* Removes the border from the last row of the TreeGrid.
|
|
162
|
-
*
|
|
163
|
-
* @param {HTMLTableRowElement} element - The row element from which to remove the last row border.
|
|
164
|
-
* @returns {void}
|
|
165
|
-
*/
|
|
166
|
-
private removeLastrowBorder;
|
|
167
|
-
/**
|
|
168
|
-
* Updates the icons associated with the specified rows in the TreeGrid.
|
|
169
|
-
*
|
|
170
|
-
* @param {Element[]} row - The array of row elements to update the icons for.
|
|
171
|
-
* @param {number} index - The index of the row being updated.
|
|
172
|
-
* @param {RowDragEventArgs} args - The event arguments associated with the row drag operation.
|
|
173
|
-
* @returns {string} The drop position ('topSegment', 'middleSegment', 'bottomSegment', or 'Invalid').
|
|
174
|
-
*/
|
|
175
|
-
private updateIcon;
|
|
176
|
-
/**
|
|
177
|
-
* Updates the border status for a specified row and index.
|
|
178
|
-
*
|
|
179
|
-
* @private
|
|
180
|
-
* @param {Element[]} row - The array of row elements to be updated.
|
|
181
|
-
* @param {number} index - The index of the row element for which the border status is to be updated.
|
|
182
|
-
* @returns {boolean} - Returns true if the border status was successfully updated, otherwise false.
|
|
183
|
-
*/
|
|
184
|
-
private updateBorderStatus;
|
|
185
|
-
/**
|
|
186
|
-
* Removes the visual border from all child rows within the TreeGrid.
|
|
187
|
-
*
|
|
188
|
-
* @returns {void} No return value.
|
|
189
|
-
*/
|
|
190
|
-
private removeChildBorder;
|
|
191
|
-
/**
|
|
192
|
-
* Adds a visual border to the first row of the TreeGrid.
|
|
193
|
-
*
|
|
194
|
-
* @param {HTMLTableRowElement} targetRow - The target row element to which the border will be added, if it is the first row.
|
|
195
|
-
* @returns {void} No return value.
|
|
196
|
-
*/
|
|
197
|
-
private addFirstrowBorder;
|
|
198
|
-
/**
|
|
199
|
-
* Adds a visual border to the last row of the TreeGrid.
|
|
200
|
-
*
|
|
201
|
-
* @param {HTMLTableRowElement} trElement - The table row element to which the border will be added, if it is the last row.
|
|
202
|
-
* @returns {void} No return value.
|
|
203
|
-
*/
|
|
204
|
-
private addLastRowborder;
|
|
205
|
-
/**
|
|
206
|
-
* Retrieves the total scroll width of the TreeGrid content area.
|
|
207
|
-
*
|
|
208
|
-
* @returns {number} The width of the scrollbar if content overflows, otherwise 0.
|
|
209
|
-
*/
|
|
210
|
-
private getScrollWidth;
|
|
211
|
-
/**
|
|
212
|
-
* Adds an error element to the dragged row element during a row drag-and-drop operation.
|
|
213
|
-
*
|
|
214
|
-
* @returns {void} No return value.
|
|
215
|
-
*/
|
|
216
|
-
private addErrorElem;
|
|
217
|
-
/**
|
|
218
|
-
* Removes the error element from the DOM and adjusts the position of the drop item count if necessary.
|
|
219
|
-
*
|
|
220
|
-
* @returns {void} No return value.
|
|
221
|
-
*/
|
|
222
|
-
private removeErrorElem;
|
|
223
|
-
/**
|
|
224
|
-
* Applies drop border styles to row elements based on the current drop position ('topSegment' or 'bottomSegment').
|
|
225
|
-
*
|
|
226
|
-
* @param {Element} target - The target element where the drop action is taking place.
|
|
227
|
-
* @param {boolean} [isBorderNeed=true] - Indicates whether a border is needed during the drop action. Defaults to `true`.
|
|
228
|
-
* @returns {void} No return value.
|
|
229
|
-
*/
|
|
230
|
-
private topOrBottomBorder;
|
|
231
|
-
/**
|
|
232
|
-
* Removes the drop border classes ('e-dropbottom' and 'e-droptop') from the parent element if present.
|
|
233
|
-
*
|
|
234
|
-
* @returns {void} No return value.
|
|
235
|
-
*/
|
|
236
|
-
private removetopOrBottomBorder;
|
|
237
|
-
/**
|
|
238
|
-
* Adds or removes a specified class from a list of HTML elements.
|
|
239
|
-
*
|
|
240
|
-
* @param {Element[]} cells - The list of HTML elements to which the class will be added or removed.
|
|
241
|
-
* @param {boolean} add - A flag indicating whether to add (`true`) or remove (`false`) the class.
|
|
242
|
-
* @param {string} className - The class name to be added or removed from each element in `cells`.
|
|
243
|
-
* @returns {void} No return value.
|
|
244
|
-
*/
|
|
245
|
-
private addRemoveClasses;
|
|
246
|
-
/**
|
|
247
|
-
* Calculates the offset position of the specified HTML element relative to the document.
|
|
248
|
-
*
|
|
249
|
-
* @param {Element} element - The HTML element for which the offset position is calculated.
|
|
250
|
-
* @returns {PositionOffSet} The offset position containing `top` and `left` values.
|
|
251
|
-
*/
|
|
252
|
-
private getOffset;
|
|
253
|
-
/**
|
|
254
|
-
* Handles the dragging of rows in the TreeGrid.
|
|
255
|
-
*
|
|
256
|
-
* @param {RowDragEventArgs} args - The event arguments for the row drag action.
|
|
257
|
-
* @returns {void} This function does not return a value.
|
|
258
|
-
*/
|
|
259
|
-
private Rowdraging;
|
|
260
|
-
/**
|
|
261
|
-
* Handles the row drop event for the TreeGrid.
|
|
262
|
-
*
|
|
263
|
-
* @param {RowDropEventArgs} args - The event arguments for the row drop action.
|
|
264
|
-
* @returns {void} This function does not return a value.
|
|
265
|
-
*/
|
|
266
|
-
private rowDropped;
|
|
267
|
-
/**
|
|
268
|
-
* Removes the border elements for the first and last rows of the TreeGrid.
|
|
269
|
-
*
|
|
270
|
-
* @returns {void} This function does not return a value.
|
|
271
|
-
*/
|
|
272
|
-
private removeRowBorders;
|
|
273
|
-
/**
|
|
274
|
-
* Handles the drag-and-drop operation between TreeGrids, updating the source and target grids.
|
|
275
|
-
*
|
|
276
|
-
* @param {RowDropEventArgs} args - The arguments related to the row drop event, including target information and data being dropped.
|
|
277
|
-
* @returns {void} - This function does not return any value.
|
|
278
|
-
*/
|
|
279
|
-
private dragDropGrid;
|
|
280
|
-
/**
|
|
281
|
-
* Retrieves the index of the target row based on its 'aria-rowindex' attribute.
|
|
282
|
-
*
|
|
283
|
-
* @param {Element} targetRow - The target row element from which to retrieve the index.
|
|
284
|
-
* @returns {number} - The index of the target row, or 0 if the targetRow is null or undefined.
|
|
285
|
-
*/
|
|
286
|
-
private getTargetIdx;
|
|
287
|
-
/**
|
|
288
|
-
* Retrieves the parent data of a given record during a row drag-and-drop operation.
|
|
289
|
-
*
|
|
290
|
-
* @param {ITreeData} record - The record for which to retrieve the parent data.
|
|
291
|
-
* @param {Object[]} [data] - Optional data array containing additional information related to the drop operation.
|
|
292
|
-
* @returns {void} - This function does not return any value.
|
|
293
|
-
*/
|
|
294
|
-
private getParentData;
|
|
295
|
-
/**
|
|
296
|
-
* Handles the row drop operation for the tree grid.
|
|
297
|
-
*
|
|
298
|
-
* @param {RowDropEventArgs} args - The event arguments containing details about the drop operation, including the target index and data.
|
|
299
|
-
* @param {boolean} [isByMethod=false] - Optional flag indicating if the drop operation is triggered by a method.
|
|
300
|
-
* @returns {void} - This function does not return any value.
|
|
301
|
-
*/
|
|
302
|
-
private dropRows;
|
|
303
|
-
/**
|
|
304
|
-
* Handles the logic for inserting a dragged record into the middle of a parent record's child records.
|
|
305
|
-
*
|
|
306
|
-
* @param {number} recordIndex - The index at which to insert the dragged record relative to the parent record's child records.
|
|
307
|
-
* @returns {void} - This function does not return any value.
|
|
308
|
-
*/
|
|
309
|
-
private dropMiddle;
|
|
310
|
-
/**
|
|
311
|
-
* Handles the logic for inserting a dragged record at the top of a parent record's child records.
|
|
312
|
-
*
|
|
313
|
-
* @param {number} recordIndex1 - The index at which to insert the dragged record in the tree grid data.
|
|
314
|
-
* @returns {void} - This function does not return any value.
|
|
315
|
-
*/
|
|
316
|
-
private dropAtTop;
|
|
317
|
-
/**
|
|
318
|
-
* Updates the level and hierarchy of the dragged record based on the drop position.
|
|
319
|
-
*
|
|
320
|
-
* @returns {void} - This function does not return any value.
|
|
321
|
-
*/
|
|
322
|
-
private recordLevel;
|
|
323
|
-
/**
|
|
324
|
-
* Deletes the currently dragged row from the TreeGrid.
|
|
325
|
-
*
|
|
326
|
-
* @returns {void} - This function does not return any value.
|
|
327
|
-
*/
|
|
328
|
-
private deleteDragRow;
|
|
329
|
-
/**
|
|
330
|
-
* Updates the child records of a specified parent record in the TreeGrid.
|
|
331
|
-
*
|
|
332
|
-
* @param {ITreeData} record - The parent record whose child records will be updated.
|
|
333
|
-
* @param {number} count - The initial count to keep track of record positioning.
|
|
334
|
-
* @returns {number} - The updated count after processing all child records.
|
|
335
|
-
*/
|
|
336
|
-
private updateChildRecord;
|
|
337
|
-
/**
|
|
338
|
-
* Updates the level of child records for a specified parent record in the TreeGrid.
|
|
339
|
-
*
|
|
340
|
-
* @param {ITreeData} record - The parent record whose child records' levels will be updated.
|
|
341
|
-
* @param {number} level - The current level of the parent record.
|
|
342
|
-
* @returns {number} - The updated level after processing all child records.
|
|
343
|
-
*/
|
|
344
|
-
private updateChildRecordLevel;
|
|
345
|
-
/**
|
|
346
|
-
* Removes specified records from the TreeGrid data source.
|
|
347
|
-
*
|
|
348
|
-
* @param {ITreeData} record - The record to be removed, including any child records if applicable.
|
|
349
|
-
* @returns {void} - This method does not return a value.
|
|
350
|
-
*/
|
|
351
|
-
private removeRecords;
|
|
352
|
-
/**
|
|
353
|
-
* Updates the records in the TreeGrid data source that have been modified.
|
|
354
|
-
*
|
|
355
|
-
* @param {ITreeData} record - The record to update, along with its parent records if applicable.
|
|
356
|
-
* @returns {void} - This method does not return a value.
|
|
357
|
-
*/
|
|
358
|
-
private updateModifiedRecords;
|
|
359
|
-
/**
|
|
360
|
-
* Recursively removes child records from the specified record and updates the data source.
|
|
361
|
-
*
|
|
362
|
-
* @param {ITreeData} record - The parent record whose child records are to be removed.
|
|
363
|
-
* @returns {void} - This method does not return a value.
|
|
364
|
-
*/
|
|
365
|
-
private removeChildItem;
|
|
366
|
-
/**
|
|
367
|
-
* Retrieves the count of child records associated with the specified parent record.
|
|
368
|
-
*
|
|
369
|
-
* @param {ITreeData} record - The parent record for which child count is to be calculated.
|
|
370
|
-
* @param {number} count - The initial count to start with, usually passed as 0.
|
|
371
|
-
* @returns {number} - The total count of child records.
|
|
372
|
-
*/
|
|
373
|
-
private getChildCount;
|
|
374
|
-
/**
|
|
375
|
-
* Ensures the validity of the drop position for the dragged records by verifying the hierarchy and position constraints.
|
|
376
|
-
* If the current record is found in the dragged records' children, sets the drop position to 'Invalid'.
|
|
377
|
-
*
|
|
378
|
-
* @param {ITreeData[]} draggedRecords - The array of dragged records being verified.
|
|
379
|
-
* @param {ITreeData} currentRecord - The current record to check against dragged records.
|
|
380
|
-
* @returns {void} - This function does not return a value.
|
|
381
|
-
*/
|
|
382
|
-
private ensuredropPosition;
|
|
383
|
-
private isDuplicateData;
|
|
384
|
-
/**
|
|
385
|
-
* Cleans up resources, event listeners, and DOM elements when the TreeGrid component is destroyed.
|
|
386
|
-
*
|
|
387
|
-
* @returns {void}
|
|
388
|
-
*/
|
|
389
|
-
destroy(): void;
|
|
390
|
-
/**
|
|
391
|
-
* @hidden
|
|
392
|
-
* @returns {void}
|
|
393
|
-
*/
|
|
394
|
-
removeEventListener(): void;
|
|
395
|
-
/**
|
|
396
|
-
* hidden
|
|
397
|
-
*/
|
|
398
|
-
/**
|
|
399
|
-
* For internal use only - Get the module name.
|
|
400
|
-
*
|
|
401
|
-
* @private
|
|
402
|
-
* @returns {string} Returns RowDragAndDrop module name
|
|
403
|
-
*/
|
|
404
|
-
private getModuleName;
|
|
405
|
-
}
|