@syncfusion/ej2-treegrid 28.2.4 → 29.1.33
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/README.md +2 -2
- 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 +1275 -519
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +1277 -519
- 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 +10 -10
- package/src/treegrid/actions/batch-edit.js +12 -5
- package/src/treegrid/actions/edit.js +12 -12
- package/src/treegrid/actions/page.js +1 -1
- package/src/treegrid/actions/rowdragdrop.d.ts +21 -1
- package/src/treegrid/actions/rowdragdrop.js +248 -48
- package/src/treegrid/actions/summary.js +1 -1
- package/src/treegrid/actions/virtual-scroll.d.ts +34 -1
- package/src/treegrid/actions/virtual-scroll.js +58 -11
- package/src/treegrid/base/constant.d.ts +0 -4
- package/src/treegrid/base/constant.js +0 -4
- package/src/treegrid/base/data.js +48 -47
- package/src/treegrid/base/treegrid-model.d.ts +195 -208
- package/src/treegrid/base/treegrid.d.ts +598 -411
- package/src/treegrid/base/treegrid.js +523 -306
- package/src/treegrid/enum.d.ts +77 -80
- package/src/treegrid/enum.js +2 -2
- package/src/treegrid/models/column.d.ts +122 -177
- package/src/treegrid/models/column.js +14 -26
- package/src/treegrid/models/edit-settings-model.d.ts +24 -25
- package/src/treegrid/models/edit-settings.d.ts +25 -26
- package/src/treegrid/models/edit-settings.js +1 -1
- package/src/treegrid/models/filter-settings-model.d.ts +41 -49
- package/src/treegrid/models/filter-settings.d.ts +43 -51
- package/src/treegrid/models/filter-settings.js +2 -2
- package/src/treegrid/models/infinite-scroll-settings-model.d.ts +4 -4
- package/src/treegrid/models/infinite-scroll-settings.d.ts +4 -4
- package/src/treegrid/models/infinite-scroll-settings.js +1 -1
- package/src/treegrid/models/loading-indicator-model.d.ts +3 -4
- package/src/treegrid/models/loading-indicator.d.ts +4 -4
- package/src/treegrid/models/loading-indicator.js +1 -1
- package/src/treegrid/models/page-settings-model.d.ts +10 -13
- package/src/treegrid/models/page-settings.d.ts +11 -14
- package/src/treegrid/models/page-settings.js +1 -1
- package/src/treegrid/models/rowdrop-settings-model.d.ts +1 -1
- package/src/treegrid/models/rowdrop-settings.d.ts +13 -6
- package/src/treegrid/models/rowdrop-settings.js +1 -1
- package/src/treegrid/models/search-settings-model.d.ts +13 -11
- package/src/treegrid/models/search-settings.d.ts +14 -12
- package/src/treegrid/models/search-settings.js +1 -1
- package/src/treegrid/models/selection-settings-model.d.ts +18 -29
- package/src/treegrid/models/selection-settings.d.ts +18 -29
- package/src/treegrid/models/sort-settings-model.d.ts +8 -5
- package/src/treegrid/models/sort-settings.d.ts +10 -7
- package/src/treegrid/models/sort-settings.js +2 -2
- package/src/treegrid/models/summary-model.d.ts +28 -29
- package/src/treegrid/models/summary.d.ts +32 -30
- package/src/treegrid/models/summary.js +4 -1
- package/src/treegrid/models/textwrap-settings-model.d.ts +7 -4
- package/src/treegrid/models/textwrap-settings.d.ts +8 -5
- package/src/treegrid/models/textwrap-settings.js +1 -1
- package/src/treegrid/renderer/render.js +11 -5
- package/src/treegrid/renderer/virtual-row-model-generator.js +5 -4
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +277 -0
- package/src/treegrid/renderer/virtual-tree-content-render.js +328 -35
- package/src/treegrid/utils.d.ts +1 -1
- package/styles/bootstrap-lite.css +0 -12
- package/styles/bootstrap.css +0 -12
- package/styles/bootstrap5-dark-lite.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/treegrid/_layout.scss +0 -1
- package/styles/treegrid/_material-dark-definition.scss +2 -2
- package/styles/treegrid/_material-definition.scss +2 -2
- package/styles/treegrid/bootstrap.css +0 -12
- package/styles/treegrid/bootstrap5-dark.css +1 -1
- package/styles/treegrid/icons/_bootstrap.scss +0 -17
- package/styles/treegrid/icons/_bootstrap5.scss +1 -1
- package/styles/treegrid/icons/_fabric-dark.scss +1 -1
- package/styles/treegrid/icons/_fabric.scss +1 -1
- package/styles/treegrid/icons/_fluent2.scss +1 -1
- package/styles/treegrid/icons/_fusionnew.scss +1 -0
- package/styles/treegrid/icons/_highcontrast-light.scss +1 -1
- package/styles/treegrid/icons/_tailwind-dark.scss +2 -2
|
@@ -11,90 +11,78 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
11
11
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* Represents
|
|
14
|
+
* Represents the "Column" model class for TreeGrid, defining essential properties and functionalities of a column.
|
|
15
15
|
*/
|
|
16
16
|
class Column {
|
|
17
17
|
constructor(options) {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
* By default all columns are editable.
|
|
19
|
+
* Allows or disallows editing of the column. Set to `false` to make a column non-editable.
|
|
20
|
+
* By default, all columns are editable.
|
|
21
21
|
*
|
|
22
22
|
* @default true
|
|
23
23
|
*/
|
|
24
24
|
this.allowEditing = true;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Customization options for the edit cell.
|
|
27
27
|
*
|
|
28
28
|
* @default {}
|
|
29
29
|
*/
|
|
30
30
|
this.edit = {};
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* When set to `true`, encodes HTML content in headers and cells to prevent HTML injection.
|
|
33
33
|
*
|
|
34
34
|
* @default true
|
|
35
35
|
*/
|
|
36
36
|
this.disableHtmlEncode = true;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
* By default all columns can be reorder.
|
|
38
|
+
* Disables column reordering if set to `false`. By default, columns can be reordered.
|
|
40
39
|
*
|
|
41
40
|
* @default true
|
|
42
41
|
*/
|
|
43
42
|
this.allowReordering = true;
|
|
44
43
|
/**
|
|
45
|
-
*
|
|
46
|
-
* By default column menu will show for all columns
|
|
44
|
+
* Disables column menu for the column if set to `false`. By default, column menus are enabled for all columns.
|
|
47
45
|
*
|
|
48
46
|
* @default true
|
|
49
47
|
*/
|
|
50
48
|
this.showColumnMenu = true;
|
|
51
49
|
/**
|
|
52
|
-
*
|
|
53
|
-
* By default all columns are filterable.
|
|
50
|
+
* Disables filtering for the column if set to `false`. By default, columns are filterable.
|
|
54
51
|
*
|
|
55
52
|
* @default true
|
|
56
53
|
*/
|
|
57
54
|
this.allowFiltering = true;
|
|
58
55
|
/**
|
|
59
|
-
*
|
|
60
|
-
* By default all columns are sortable.
|
|
56
|
+
* Disables sorting for the column if set to `false`. By default, columns are sortable.
|
|
61
57
|
*
|
|
62
58
|
* @default true
|
|
63
59
|
*/
|
|
64
60
|
this.allowSorting = true;
|
|
65
61
|
/**
|
|
66
|
-
*
|
|
67
|
-
* By default all the columns can be resized.
|
|
62
|
+
* Disables resizing for the column if set to `false`. By default, columns can be resized.
|
|
68
63
|
*
|
|
69
64
|
* @default true
|
|
70
65
|
*/
|
|
71
66
|
this.allowResizing = true;
|
|
72
67
|
/**
|
|
73
|
-
*
|
|
74
|
-
* * type - Specifies the filter type as menu.
|
|
75
|
-
* * ui - to render custom component for specific column it has following functions.
|
|
76
|
-
* * ui.create – It is used for creating custom components.
|
|
77
|
-
* * ui.read - It is used for read the value from the component.
|
|
78
|
-
* * ui.write - It is used to apply component model as dynamically.
|
|
68
|
+
* Customize default filter options for a specific column, providing types and UI definitions for custom components.
|
|
79
69
|
*
|
|
80
|
-
*
|
|
70
|
+
* @default null
|
|
81
71
|
*/
|
|
82
72
|
this.filter = {};
|
|
83
73
|
merge(this, options);
|
|
84
74
|
}
|
|
85
75
|
/**
|
|
86
|
-
*
|
|
76
|
+
* Reflects state changes for TreeGrid column directives, particularly in React.
|
|
87
77
|
*
|
|
88
|
-
* @param {Column} column -
|
|
78
|
+
* @param {Column} column - The column to update.
|
|
89
79
|
* @returns {void}
|
|
90
80
|
* @hidden
|
|
91
81
|
*/
|
|
92
82
|
setProperties(column) {
|
|
93
|
-
//Angular two way binding
|
|
94
83
|
const keys = Object.keys(column);
|
|
95
84
|
for (let i = 0; i < keys.length; i++) {
|
|
96
85
|
this[keys[parseInt(i.toString(), 10)]] = column[keys[parseInt(i.toString(), 10)]];
|
|
97
|
-
//Refresh the react columnTemplates on state change
|
|
98
86
|
if (this.parent && this.parent['isReact'] && keys[parseInt(i.toString(), 10)] === 'template') {
|
|
99
87
|
const refreshReactColumnTemplateByUid = 'refreshReactColumnTemplateByUid';
|
|
100
88
|
this.parent.clipboardModule['treeGridParent'].renderModule[`${refreshReactColumnTemplateByUid}`](this.uid);
|
|
@@ -123,7 +111,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
123
111
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
124
112
|
};
|
|
125
113
|
/**
|
|
126
|
-
* Configures the
|
|
114
|
+
* Configures the loading indicator for the Tree Grid, allowing you to display a visual indicator during data loading operations to enhance user experience.
|
|
127
115
|
*/
|
|
128
116
|
class LoadingIndicator extends ChildProperty {
|
|
129
117
|
}
|
|
@@ -138,7 +126,7 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
138
126
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
139
127
|
};
|
|
140
128
|
/**
|
|
141
|
-
* Represents the
|
|
129
|
+
* Represents the filter configuration for a column in the TreeGrid.
|
|
142
130
|
*/
|
|
143
131
|
class Predicate extends ChildProperty {
|
|
144
132
|
}
|
|
@@ -179,7 +167,7 @@ __decorate$2([
|
|
|
179
167
|
Property()
|
|
180
168
|
], Predicate.prototype, "isForeignKey", void 0);
|
|
181
169
|
/**
|
|
182
|
-
* Configures the filtering behavior of the TreeGrid.
|
|
170
|
+
* Configures the filtering behavior of the TreeGrid, enabling complex data filtering capabilities.
|
|
183
171
|
*/
|
|
184
172
|
class FilterSettings extends ChildProperty {
|
|
185
173
|
}
|
|
@@ -215,7 +203,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
215
203
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
216
204
|
};
|
|
217
205
|
/**
|
|
218
|
-
* Configures the
|
|
206
|
+
* Configures the text wrapping behavior of the TreeGrid.
|
|
219
207
|
*/
|
|
220
208
|
class TextWrapSettings extends ChildProperty {
|
|
221
209
|
}
|
|
@@ -495,12 +483,8 @@ const frozenRight = 'frozen-right';
|
|
|
495
483
|
/** @hidden */
|
|
496
484
|
const frozenLeft = 'frozen-left';
|
|
497
485
|
/** @hidden */
|
|
498
|
-
const dataColIndex = 'data-colindex';
|
|
499
|
-
/** @hidden */
|
|
500
486
|
const ariaColIndex = 'aria-colindex';
|
|
501
487
|
/** @hidden */
|
|
502
|
-
const dataRowIndex = 'data-rowindex';
|
|
503
|
-
/** @hidden */
|
|
504
488
|
const ariaRowIndex = 'aria-rowindex';
|
|
505
489
|
/** @hidden */
|
|
506
490
|
const actionFailure = 'actionFailure';
|
|
@@ -1446,7 +1430,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
1446
1430
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1447
1431
|
};
|
|
1448
1432
|
/**
|
|
1449
|
-
* Configures the
|
|
1433
|
+
* Configures the searching behavior of the TreeGrid.
|
|
1450
1434
|
*/
|
|
1451
1435
|
class SearchSettings extends ChildProperty {
|
|
1452
1436
|
}
|
|
@@ -1630,10 +1614,9 @@ class Render {
|
|
|
1630
1614
|
if (columnIndex === this.parent.treeColumnIndex && (args.requestType === 'add' || args.requestType
|
|
1631
1615
|
=== 'rowDragAndDrop' || args.requestType === 'delete' || isNullOrUndefined(args.cell.querySelector('.e-treecell')))) {
|
|
1632
1616
|
const container = createElement('div', { className: 'e-treecolumn-container' });
|
|
1633
|
-
const emptyExpandIcon = createElement('span', {
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
});
|
|
1617
|
+
const emptyExpandIcon = createElement('span', { className: 'e-icons e-none' });
|
|
1618
|
+
emptyExpandIcon.style.width = '10px';
|
|
1619
|
+
emptyExpandIcon.style.display = 'inline-block';
|
|
1637
1620
|
for (let n = 0; n < pad; n++) {
|
|
1638
1621
|
totalIconsWidth += 10;
|
|
1639
1622
|
container.appendChild(emptyExpandIcon.cloneNode());
|
|
@@ -1660,6 +1643,13 @@ class Render {
|
|
|
1660
1643
|
}
|
|
1661
1644
|
else {
|
|
1662
1645
|
expand = !(!data.expanded || !getExpandStatus(this.parent, data, this.parent.grid.getCurrentViewRecords()));
|
|
1646
|
+
// TicketsID 43483: While Modify Data Expand and Collapse Icon Behavior Changed
|
|
1647
|
+
if (this.parent.editSettings.mode === 'Cell' && !isRemoteData(this.parent)) {
|
|
1648
|
+
const selectedRow = this.parent.flatData.find((item) => item.uniqueID === data.uniqueID);
|
|
1649
|
+
if (!isNullOrUndefined(selectedRow)) {
|
|
1650
|
+
expand = data.expanded !== selectedRow.expanded ? selectedRow.expanded : data.expanded;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1663
1653
|
}
|
|
1664
1654
|
addClass([expandIcon], (expand) ? 'e-treegridexpand' : 'e-treegridcollapse');
|
|
1665
1655
|
totalIconsWidth += 18;
|
|
@@ -1777,7 +1767,7 @@ class Render {
|
|
|
1777
1767
|
const templateFn = 'templateFn';
|
|
1778
1768
|
const colindex = args.column.index;
|
|
1779
1769
|
if (isNullOrUndefined(treeColumn.field)) {
|
|
1780
|
-
args.cell.setAttribute('
|
|
1770
|
+
args.cell.setAttribute('aria-colindex', (colindex + 1) + '');
|
|
1781
1771
|
}
|
|
1782
1772
|
if (treeColumn.field === args.column.field && !isNullOrUndefined(treeColumn.template)) {
|
|
1783
1773
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
@@ -2238,7 +2228,7 @@ class DataManipulation {
|
|
|
2238
2228
|
qry.expand(expandDetail);
|
|
2239
2229
|
}
|
|
2240
2230
|
qry.where(this.parent.parentIdMapping, 'equal', rowDetails.record[this.parent.idMapping]);
|
|
2241
|
-
if (rowDetails.action === 'remoteExpand' && this.parent.grid.
|
|
2231
|
+
if (rowDetails.action === 'remoteExpand' && this.parent.grid.filterSettings && this.parent.grid.filterSettings.columns.length) {
|
|
2242
2232
|
const filterqry = this.parent.grid.getDataModule().generateQuery().queries.filter((e) => e.fn !== 'onPage' && typeof e.e.predicates !== 'undefined');
|
|
2243
2233
|
qry.queries.push(filterqry[0]);
|
|
2244
2234
|
}
|
|
@@ -2307,115 +2297,116 @@ class DataManipulation {
|
|
|
2307
2297
|
rowDetails.record.childRecords = result;
|
|
2308
2298
|
}
|
|
2309
2299
|
for (let r = 0; r < result.length; r++) {
|
|
2310
|
-
|
|
2300
|
+
const record = result[parseInt(r.toString(), 10)];
|
|
2301
|
+
if (this.parent.enableVirtualization && record[`${this.parent.idMapping}`] === rowDetails.record[`${this.parent.idMapping}`] && rowDetails.action === 'remoteExpand') {
|
|
2311
2302
|
this.parent[`${remoteExpandedData}`].push(rowDetails.record);
|
|
2312
2303
|
}
|
|
2313
|
-
else if (this.parent.enableVirtualization &&
|
|
2304
|
+
else if (this.parent.enableVirtualization && record[`${this.parent.idMapping}`] === rowDetails.record[`${this.parent.idMapping}`] && rowDetails.action === 'collapse') {
|
|
2314
2305
|
for (let i = 0; i < this.parent[`${remoteExpandedData}`].length; i++) {
|
|
2315
2306
|
if (rowDetails.record[`${this.parent.idMapping}`] === this.parent[`${remoteExpandedData}`][parseInt(i.toString(), 10)][`${this.parent.idMapping}`]) {
|
|
2316
2307
|
this.parent[`${remoteExpandedData}`].splice(i, 1);
|
|
2317
2308
|
}
|
|
2318
2309
|
}
|
|
2319
2310
|
}
|
|
2320
|
-
|
|
2321
|
-
if (
|
|
2311
|
+
record.taskData = extend$1({}, record);
|
|
2312
|
+
if (record[`${this.parent.parentIdMapping}`] && this.parent.enableVirtualization && this.parent[`${remoteExpandedData}`].length) {
|
|
2322
2313
|
for (let i = 0; i < this.parent[`${remoteExpandedData}`].length; i++) {
|
|
2323
|
-
if (
|
|
2324
|
-
|
|
2314
|
+
if (record[`${this.parent.parentIdMapping}`] === this.parent[`${remoteExpandedData}`][parseInt(i.toString(), 10)][`${this.parent.idMapping}`]) {
|
|
2315
|
+
record.level = this.parent[`${remoteExpandedData}`][parseInt(i.toString(), 10)][`${level}`] + 1;
|
|
2325
2316
|
const parentData = this.parent[`${remoteExpandedData}`][parseInt(i.toString(), 10)];
|
|
2326
2317
|
delete parentData.childRecords;
|
|
2327
|
-
|
|
2328
|
-
|
|
2318
|
+
record.parentItem = parentData;
|
|
2319
|
+
record.parentUniqueID = parentData.uniqueID;
|
|
2329
2320
|
}
|
|
2330
2321
|
}
|
|
2331
2322
|
}
|
|
2332
2323
|
else if (this.parent.enableVirtualization) {
|
|
2333
|
-
if ((
|
|
2334
|
-
this.parentItems.indexOf(
|
|
2324
|
+
if ((record[`${this.parent.hasChildMapping}`] ||
|
|
2325
|
+
this.parentItems.indexOf(record[`${this.parent.idMapping}`]) !== -1)
|
|
2335
2326
|
&& !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
|
|
2336
|
-
if (isNullOrUndefined(
|
|
2337
|
-
|
|
2327
|
+
if (isNullOrUndefined(record[`${this.parent.parentIdMapping}`])) {
|
|
2328
|
+
record.level = 0;
|
|
2338
2329
|
if (rowDetails.action === 'remoteExpand') {
|
|
2339
|
-
|
|
2340
|
-
|
|
2330
|
+
record.childRecords = [];
|
|
2331
|
+
record.childRecords = rowDetails.record.childRecords;
|
|
2341
2332
|
}
|
|
2342
2333
|
}
|
|
2343
2334
|
else {
|
|
2344
|
-
|
|
2335
|
+
record.level = rowDetails.record.level;
|
|
2345
2336
|
}
|
|
2346
2337
|
}
|
|
2347
2338
|
else {
|
|
2348
2339
|
const parentData = extend$1({}, rowDetails.record);
|
|
2349
2340
|
delete parentData.childRecords;
|
|
2350
|
-
|
|
2351
|
-
|
|
2341
|
+
record.parentItem = parentData;
|
|
2342
|
+
record.parentUniqueID = rowDetails.record.uniqueID;
|
|
2352
2343
|
}
|
|
2353
2344
|
}
|
|
2354
2345
|
else {
|
|
2355
|
-
|
|
2346
|
+
record.level = rowDetails.record.level + 1;
|
|
2356
2347
|
const parentData = extend$1({}, rowDetails.record);
|
|
2357
2348
|
delete parentData.childRecords;
|
|
2358
|
-
|
|
2359
|
-
|
|
2349
|
+
record.parentItem = parentData;
|
|
2350
|
+
record.parentUniqueID = rowDetails.record.uniqueID;
|
|
2360
2351
|
}
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
if (rowDetails.record[`${this.parent.idMapping}`] ===
|
|
2364
|
-
rowDetails.record.uniqueID =
|
|
2352
|
+
record.index = Math.ceil(Math.random() * 1000);
|
|
2353
|
+
record.uniqueID = getUid(this.parent.element.id + '_data_');
|
|
2354
|
+
if (rowDetails.record[`${this.parent.idMapping}`] === record[`${this.parent.idMapping}`]) {
|
|
2355
|
+
rowDetails.record.uniqueID = record.uniqueID;
|
|
2365
2356
|
}
|
|
2366
|
-
|
|
2367
|
-
if (this.parent.enableVirtualization && isNullOrUndefined(
|
|
2357
|
+
record.checkboxState = 'uncheck';
|
|
2358
|
+
if (this.parent.enableVirtualization && isNullOrUndefined(record.level)) {
|
|
2368
2359
|
for (let p = 0; p < this.parent.grid.currentViewData.length; p++) {
|
|
2369
|
-
if (this.parent.grid.currentViewData[parseInt(p.toString(), 10)][`${this.parent.idMapping}`] ===
|
|
2370
|
-
|
|
2360
|
+
if (this.parent.grid.currentViewData[parseInt(p.toString(), 10)][`${this.parent.idMapping}`] === record[`${this.parent.parentIdMapping}`]) {
|
|
2361
|
+
record.level = this.parent.grid.currentViewData[parseInt(p.toString(), 10)]['level'] + 1;
|
|
2371
2362
|
}
|
|
2372
2363
|
}
|
|
2373
2364
|
}
|
|
2374
|
-
setValue('uniqueIDCollection.' +
|
|
2365
|
+
setValue('uniqueIDCollection.' + record.uniqueID, record, this.parent);
|
|
2375
2366
|
// delete result[r].parentItem.childRecords;
|
|
2376
|
-
if ((
|
|
2377
|
-
this.parentItems.indexOf(
|
|
2367
|
+
if ((record[`${this.parent.hasChildMapping}`] ||
|
|
2368
|
+
this.parentItems.indexOf(record[`${this.parent.idMapping}`]) !== -1)
|
|
2378
2369
|
&& !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
|
|
2379
|
-
|
|
2370
|
+
record.hasChildRecords = true;
|
|
2380
2371
|
if (this.parent.enableVirtualization && !this.parent.loadChildOnDemand) {
|
|
2381
2372
|
for (let i = 0; i < this.parent[`${remoteCollapsedData}`].length; i++) {
|
|
2382
|
-
if (
|
|
2383
|
-
|
|
2373
|
+
if (record[`${this.parent.idMapping}`] === this.parent[`${remoteCollapsedData}`][parseInt(i.toString(), 10)][`${this.parent.idMapping}`]) {
|
|
2374
|
+
record.expanded = this.parent[`${remoteCollapsedData}`][parseInt(i.toString(), 10)]['expanded'];
|
|
2384
2375
|
}
|
|
2385
2376
|
}
|
|
2386
|
-
if (rowDetails.action === 'collapse' &&
|
|
2387
|
-
|
|
2377
|
+
if (rowDetails.action === 'collapse' && record[`${this.parent.idMapping}`] !== rowDetails.record[`${this.parent.idMapping}`] && record.expanded !== false) {
|
|
2378
|
+
record.expanded = true;
|
|
2388
2379
|
}
|
|
2389
|
-
else if (rowDetails.action === 'collapse' &&
|
|
2390
|
-
|
|
2380
|
+
else if (rowDetails.action === 'collapse' && record[`${this.parent.idMapping}`] === rowDetails.record[`${this.parent.idMapping}`]) {
|
|
2381
|
+
record.expanded = false;
|
|
2391
2382
|
this.parent[`${remoteCollapsedData}`].push(rowDetails.record);
|
|
2392
2383
|
}
|
|
2393
2384
|
else if (rowDetails.action === 'remoteExpand') {
|
|
2394
2385
|
for (let i = 0; i < this.parent.grid.currentViewData.length; i++) {
|
|
2395
|
-
if (this.parent.grid.currentViewData[parseInt(i.toString(), 10)][`${this.parent.idMapping}`] ===
|
|
2386
|
+
if (this.parent.grid.currentViewData[parseInt(i.toString(), 10)][`${this.parent.idMapping}`] === record[`${this.parent.idMapping}`]) {
|
|
2396
2387
|
result.splice(r, 1, this.parent.grid.currentViewData[parseInt(i.toString(), 10)]);
|
|
2397
2388
|
}
|
|
2398
2389
|
}
|
|
2399
|
-
if (
|
|
2390
|
+
if (record[this.parent.idMapping] === rowDetails.record[`${this.parent.idMapping}`]) {
|
|
2400
2391
|
for (let i = 0; i < this.parent[`${remoteCollapsedData}`].length; i++) {
|
|
2401
2392
|
if (rowDetails.record[`${this.parent.idMapping}`] === this.parent[`${remoteCollapsedData}`][parseInt(i.toString(), 10)][`${this.parent.idMapping}`]) {
|
|
2402
2393
|
this.parent[`${remoteCollapsedData}`].splice(i, 1);
|
|
2403
2394
|
}
|
|
2404
2395
|
}
|
|
2405
2396
|
}
|
|
2406
|
-
if (
|
|
2407
|
-
|
|
2397
|
+
if (record.expanded !== false) {
|
|
2398
|
+
record.expanded = true;
|
|
2408
2399
|
}
|
|
2409
2400
|
}
|
|
2410
2401
|
}
|
|
2411
|
-
else if (this.parent.enableVirtualization &&
|
|
2412
|
-
|
|
2402
|
+
else if (this.parent.enableVirtualization && record[`${this.parent.idMapping}`] === rowDetails.record[`${this.parent.idMapping}`] && rowDetails.action !== 'collapse') {
|
|
2403
|
+
record.expanded = true;
|
|
2413
2404
|
}
|
|
2414
2405
|
else if (!(this.parent.enableVirtualization && !this.parent.loadChildOnDemand)) {
|
|
2415
|
-
|
|
2406
|
+
record.expanded = false;
|
|
2416
2407
|
}
|
|
2417
2408
|
}
|
|
2418
|
-
datas.splice(inx + r + 1, 0,
|
|
2409
|
+
datas.splice(inx + r + 1, 0, record);
|
|
2419
2410
|
}
|
|
2420
2411
|
setValue('result', datas, e);
|
|
2421
2412
|
setValue('action', 'beforecontentrender', e);
|
|
@@ -2756,7 +2747,7 @@ class DataManipulation {
|
|
|
2756
2747
|
}
|
|
2757
2748
|
|
|
2758
2749
|
/**
|
|
2759
|
-
* Defines
|
|
2750
|
+
* Defines enumerable toolbar items for programmatic access.
|
|
2760
2751
|
*
|
|
2761
2752
|
* @hidden
|
|
2762
2753
|
*/
|
|
@@ -2778,7 +2769,7 @@ var ToolbarItem;
|
|
|
2778
2769
|
ToolbarItem[ToolbarItem["RowOutdent"] = 13] = "RowOutdent";
|
|
2779
2770
|
})(ToolbarItem || (ToolbarItem = {}));
|
|
2780
2771
|
/**
|
|
2781
|
-
*
|
|
2772
|
+
* Enumerates detailed context menu items used for menu configurations.
|
|
2782
2773
|
*
|
|
2783
2774
|
* @hidden
|
|
2784
2775
|
*/
|
|
@@ -2811,7 +2802,7 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2811
2802
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2812
2803
|
};
|
|
2813
2804
|
/**
|
|
2814
|
-
* Configures the paging behavior of the TreeGrid.
|
|
2805
|
+
* Configures the paging behavior of the TreeGrid, enabling you to manage and display data efficiently across multiple pages.
|
|
2815
2806
|
*/
|
|
2816
2807
|
class PageSettings extends ChildProperty {
|
|
2817
2808
|
}
|
|
@@ -2847,7 +2838,7 @@ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2847
2838
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2848
2839
|
};
|
|
2849
2840
|
/**
|
|
2850
|
-
* Configures the
|
|
2841
|
+
* Configures the aggregate column for the TreeGrid.
|
|
2851
2842
|
*/
|
|
2852
2843
|
class AggregateColumn extends ChildProperty {
|
|
2853
2844
|
constructor() {
|
|
@@ -2934,6 +2925,9 @@ __decorate$7([
|
|
|
2934
2925
|
__decorate$7([
|
|
2935
2926
|
Property()
|
|
2936
2927
|
], AggregateColumn.prototype, "customAggregate", void 0);
|
|
2928
|
+
/**
|
|
2929
|
+
* Configures the aggregate rows in the TreeGrid.
|
|
2930
|
+
*/
|
|
2937
2931
|
class AggregateRow extends ChildProperty {
|
|
2938
2932
|
}
|
|
2939
2933
|
__decorate$7([
|
|
@@ -2950,7 +2944,7 @@ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2950
2944
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2951
2945
|
};
|
|
2952
2946
|
/**
|
|
2953
|
-
* Configures the edit behavior of the TreeGrid.
|
|
2947
|
+
* Configures the edit behavior of the TreeGrid, defining how records can be added, modified, or deleted.
|
|
2954
2948
|
*/
|
|
2955
2949
|
class EditSettings extends ChildProperty {
|
|
2956
2950
|
}
|
|
@@ -2995,7 +2989,7 @@ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
2995
2989
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2996
2990
|
};
|
|
2997
2991
|
/**
|
|
2998
|
-
* Represents the field name and direction of sort column.
|
|
2992
|
+
* Represents the field name and direction of a sort column in the TreeGrid.
|
|
2999
2993
|
*/
|
|
3000
2994
|
class SortDescriptor extends ChildProperty {
|
|
3001
2995
|
}
|
|
@@ -3006,7 +3000,7 @@ __decorate$9([
|
|
|
3006
3000
|
Property()
|
|
3007
3001
|
], SortDescriptor.prototype, "direction", void 0);
|
|
3008
3002
|
/**
|
|
3009
|
-
* Configures the sorting behavior of TreeGrid.
|
|
3003
|
+
* Configures the sorting behavior of the TreeGrid.
|
|
3010
3004
|
*/
|
|
3011
3005
|
class SortSettings extends ChildProperty {
|
|
3012
3006
|
}
|
|
@@ -3424,7 +3418,7 @@ var __decorate$a = (undefined && undefined.__decorate) || function (decorators,
|
|
|
3424
3418
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3425
3419
|
};
|
|
3426
3420
|
/**
|
|
3427
|
-
* Configures the infinite scroll behavior of Tree Grid.
|
|
3421
|
+
* Configures the infinite scroll behavior of the Tree Grid.
|
|
3428
3422
|
*/
|
|
3429
3423
|
class InfiniteScrollSettings extends ChildProperty {
|
|
3430
3424
|
}
|
|
@@ -3505,13 +3499,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3505
3499
|
this.grid = new Grid();
|
|
3506
3500
|
}
|
|
3507
3501
|
/**
|
|
3508
|
-
*
|
|
3502
|
+
* Exports the TreeGrid data to an Excel file (.xlsx).
|
|
3509
3503
|
*
|
|
3510
|
-
* @param
|
|
3511
|
-
* @param
|
|
3512
|
-
* @param
|
|
3513
|
-
* @param
|
|
3514
|
-
* @returns {Promise<any>} - Returns promise
|
|
3504
|
+
* @param {ExcelExportProperties | TreeGridExcelExportProperties} excelExportProperties - The properties used to configure the Excel export.
|
|
3505
|
+
* @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
|
|
3506
|
+
* @param {workbook} workbook - The workbook instance used for multiple exports.
|
|
3507
|
+
* @param {boolean} isBlob - If set to true, the result will be returned as blob data.
|
|
3508
|
+
* @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
|
|
3515
3509
|
*/
|
|
3516
3510
|
/* eslint-disable */
|
|
3517
3511
|
excelExport(excelExportProperties, isMultipleExport, workbook, isBlob) {
|
|
@@ -3519,13 +3513,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3519
3513
|
return this.excelExportModule.Map(excelExportProperties, isMultipleExport, workbook, isBlob, false);
|
|
3520
3514
|
}
|
|
3521
3515
|
/**
|
|
3522
|
-
*
|
|
3516
|
+
* Exports the TreeGrid data to a CSV file.
|
|
3523
3517
|
*
|
|
3524
|
-
* @param
|
|
3525
|
-
* @param
|
|
3526
|
-
* @param
|
|
3527
|
-
* @param
|
|
3528
|
-
* @returns {Promise<any>} - Returns promise
|
|
3518
|
+
* @param {ExcelExportProperties} excelExportProperties - The properties used to configure the CSV export.
|
|
3519
|
+
* @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
|
|
3520
|
+
* @param {workbook} workbook - The workbook instance used for multiple exports.
|
|
3521
|
+
* @param {boolean} isBlob - If set to true, the result will be returned as blob data.
|
|
3522
|
+
* @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
|
|
3529
3523
|
*/
|
|
3530
3524
|
/* eslint-disable */
|
|
3531
3525
|
csvExport(excelExportProperties, isMultipleExport, workbook, isBlob) {
|
|
@@ -3533,21 +3527,21 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3533
3527
|
return this.excelExportModule.Map(excelExportProperties, isMultipleExport, workbook, isBlob, true);
|
|
3534
3528
|
}
|
|
3535
3529
|
/**
|
|
3536
|
-
*
|
|
3530
|
+
* Exports the TreeGrid data to a PDF document.
|
|
3537
3531
|
*
|
|
3538
|
-
* @param {PdfExportProperties | TreeGridPdfExportProperties} pdfExportProperties -
|
|
3539
|
-
* @param {boolean} isMultipleExport -
|
|
3540
|
-
* @param {Object} pdfDoc -
|
|
3541
|
-
* @param {boolean} isBlob - If
|
|
3542
|
-
* @returns {Promise<any>} - Returns promise
|
|
3532
|
+
* @param {PdfExportProperties | TreeGridPdfExportProperties} pdfExportProperties - The properties used to configure the PDF export.
|
|
3533
|
+
* @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
|
|
3534
|
+
* @param {Object} pdfDoc - The PDF document instance used for multiple exports.
|
|
3535
|
+
* @param {boolean} isBlob - If set to true, the result will be returned as blob data.
|
|
3536
|
+
* @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
|
|
3543
3537
|
*/
|
|
3544
3538
|
pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
3545
3539
|
return this.pdfExportModule.Map(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
3546
3540
|
}
|
|
3547
3541
|
/**
|
|
3548
|
-
* Sends a
|
|
3542
|
+
* Sends a POST request to export the TreeGrid to an Excel file on the server side.
|
|
3549
3543
|
*
|
|
3550
|
-
* @param
|
|
3544
|
+
* @param {string} url - The URL for the server-side Excel export action.
|
|
3551
3545
|
* @returns {void}
|
|
3552
3546
|
*/
|
|
3553
3547
|
serverExcelExport(url) {
|
|
@@ -3555,9 +3549,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3555
3549
|
this.exportTreeGrid(url);
|
|
3556
3550
|
}
|
|
3557
3551
|
/**
|
|
3558
|
-
* Sends a
|
|
3552
|
+
* Sends a POST request to export the TreeGrid to a PDF document on the server side.
|
|
3559
3553
|
*
|
|
3560
|
-
* @param
|
|
3554
|
+
* @param {string} url - The URL for the server-side PDF export action.
|
|
3561
3555
|
* @returns {void}
|
|
3562
3556
|
*/
|
|
3563
3557
|
serverPdfExport(url) {
|
|
@@ -3565,9 +3559,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3565
3559
|
this.exportTreeGrid(url);
|
|
3566
3560
|
}
|
|
3567
3561
|
/**
|
|
3568
|
-
* Sends a
|
|
3562
|
+
* Sends a POST request to export the TreeGrid to a CSV file on the server side.
|
|
3569
3563
|
*
|
|
3570
|
-
* @param
|
|
3564
|
+
* @param {string} url - The URL for the server-side CSV export action.
|
|
3571
3565
|
* @returns {void}
|
|
3572
3566
|
*/
|
|
3573
3567
|
serverCsvExport(url) {
|
|
@@ -3595,7 +3589,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3595
3589
|
treeGridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];
|
|
3596
3590
|
treeGridModel.sortSettings.columns = queries.sorted;
|
|
3597
3591
|
treeGridModel.columns = this.setHeaderText(treeGridModel.columns, include);
|
|
3598
|
-
const form = this.createElement('form', { id: 'ExportForm'
|
|
3592
|
+
const form = this.createElement('form', { id: 'ExportForm' });
|
|
3593
|
+
form.style.display = 'none';
|
|
3599
3594
|
const treeGridInput = this.createElement('input', { id: 'treeGridInput', attrs: { name: 'treeGridModel' } });
|
|
3600
3595
|
treeGridInput.value = JSON.stringify(treeGridModel);
|
|
3601
3596
|
form.method = 'POST';
|
|
@@ -3686,11 +3681,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3686
3681
|
}
|
|
3687
3682
|
}
|
|
3688
3683
|
/**
|
|
3689
|
-
* Sorts a column with the
|
|
3684
|
+
* Sorts a column with the specified options.
|
|
3690
3685
|
*
|
|
3691
|
-
* @param {string} columnName -
|
|
3692
|
-
* @param {SortDirection} direction -
|
|
3693
|
-
* @param {boolean} isMultiSort - Specifies whether
|
|
3686
|
+
* @param {string} columnName - The name of the column to be sorted.
|
|
3687
|
+
* @param {SortDirection} direction - The direction of the sorting operation.
|
|
3688
|
+
* @param {boolean} isMultiSort - Specifies whether previous sorted columns should be maintained during sorting.
|
|
3694
3689
|
* @returns {void}
|
|
3695
3690
|
*/
|
|
3696
3691
|
sortByColumn(columnName, direction, isMultiSort) {
|
|
@@ -3699,7 +3694,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3699
3694
|
}
|
|
3700
3695
|
}
|
|
3701
3696
|
/**
|
|
3702
|
-
* Clears all the sorted columns
|
|
3697
|
+
* Clears all the sorted columns in the TreeGrid.
|
|
3703
3698
|
*
|
|
3704
3699
|
* @returns {void}
|
|
3705
3700
|
*/
|
|
@@ -3709,9 +3704,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3709
3704
|
}
|
|
3710
3705
|
}
|
|
3711
3706
|
/**
|
|
3712
|
-
*
|
|
3707
|
+
* Removes the sorted state from a column specified by the field name.
|
|
3713
3708
|
*
|
|
3714
|
-
* @param {string} field -
|
|
3709
|
+
* @param {string} field - The field name of the column from which the sort state should be removed.
|
|
3715
3710
|
* @returns {void}
|
|
3716
3711
|
* @hidden
|
|
3717
3712
|
*/
|
|
@@ -3721,36 +3716,32 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3721
3716
|
}
|
|
3722
3717
|
}
|
|
3723
3718
|
/**
|
|
3724
|
-
* Searches TreeGrid records using
|
|
3725
|
-
*
|
|
3726
|
-
* [`searchSettings`](./#searchsettings/).
|
|
3719
|
+
* Searches for TreeGrid records using a specified search string.
|
|
3720
|
+
* Customize the search behavior through the [searchSettings](./#searchsettings/).
|
|
3727
3721
|
*
|
|
3728
|
-
* @param
|
|
3722
|
+
* @param {string} searchString - The string used as the search key.
|
|
3729
3723
|
* @returns {void}
|
|
3730
3724
|
*/
|
|
3731
3725
|
search(searchString) {
|
|
3732
3726
|
this.grid.search(searchString);
|
|
3733
3727
|
}
|
|
3734
3728
|
/**
|
|
3735
|
-
*
|
|
3736
|
-
*
|
|
3737
|
-
*
|
|
3729
|
+
* Adjusts column widths to fit their content, ensuring content is displayed without wrapping or truncation.
|
|
3730
|
+
* - Hidden columns are ignored by this method.
|
|
3731
|
+
* - Use the `autoFitColumns` method during the `dataBound` event for initial rendering.
|
|
3738
3732
|
*
|
|
3739
|
-
* @param
|
|
3733
|
+
* @param {string | string[]} fieldNames - The name(s) of the column(s) to be auto-fitted.
|
|
3740
3734
|
* @returns {void}
|
|
3741
|
-
*
|
|
3742
|
-
*
|
|
3743
|
-
*
|
|
3744
3735
|
*/
|
|
3745
3736
|
autoFitColumns(fieldNames) {
|
|
3746
3737
|
this.resizeModule.autoFitColumns(fieldNames);
|
|
3747
3738
|
this.updateColumnModel();
|
|
3748
3739
|
}
|
|
3749
3740
|
/**
|
|
3750
|
-
*
|
|
3741
|
+
* Reorders TreeGrid columns by specifying their field names.
|
|
3751
3742
|
*
|
|
3752
|
-
* @param
|
|
3753
|
-
* @param
|
|
3743
|
+
* @param {string | string[]} fromFName - The field name(s) of the column(s) to be moved.
|
|
3744
|
+
* @param {string} toFName - The destination field name to place the moved columns.
|
|
3754
3745
|
* @returns {void}
|
|
3755
3746
|
*/
|
|
3756
3747
|
reorderColumns(fromFName, toFName) {
|
|
@@ -3773,9 +3764,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3773
3764
|
}
|
|
3774
3765
|
}
|
|
3775
3766
|
/**
|
|
3776
|
-
*
|
|
3777
|
-
*
|
|
3778
|
-
* [`printMode`](./#printmode).
|
|
3767
|
+
* Prints all the pages of the TreeGrid and hides the pager by default.
|
|
3768
|
+
* Customize print options using the [printMode](./#printmode).
|
|
3779
3769
|
*
|
|
3780
3770
|
* @returns {void}
|
|
3781
3771
|
*/
|
|
@@ -3919,7 +3909,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3919
3909
|
this.isSelfReference = !isNullOrUndefined(this.parentIdMapping);
|
|
3920
3910
|
}
|
|
3921
3911
|
/**
|
|
3922
|
-
*
|
|
3912
|
+
* Attaches event handlers to the necessary elements during the component's initialization.
|
|
3923
3913
|
*
|
|
3924
3914
|
* @hidden
|
|
3925
3915
|
* @returns {void}
|
|
@@ -3937,9 +3927,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3937
3927
|
}
|
|
3938
3928
|
}
|
|
3939
3929
|
/**
|
|
3940
|
-
*
|
|
3930
|
+
* Provides a list of the modules that are required for rendering the TreeGrid component.
|
|
3931
|
+
*
|
|
3932
|
+
* This method is essential for ensuring that all dependent modules are loaded and available
|
|
3933
|
+
* during the component's lifecycle, enabling full functionality.
|
|
3941
3934
|
*
|
|
3942
|
-
* @returns {ModuleDeclaration[]} - Returns TreeGrid
|
|
3935
|
+
* @returns {ModuleDeclaration[]} - Returns an array of the required TreeGrid module declarations.
|
|
3943
3936
|
* @hidden
|
|
3944
3937
|
*/
|
|
3945
3938
|
requiredModules() {
|
|
@@ -4253,7 +4246,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4253
4246
|
if (this.enableVirtualization && !isNullOrUndefined(this.detailTemplate)) {
|
|
4254
4247
|
failureCases.push('Virtual scrolling is not compatible with the detail template');
|
|
4255
4248
|
}
|
|
4256
|
-
if ((this.frozenColumns > 0 || this.columnModel.filter((col) => col.isFrozen)
|
|
4249
|
+
if ((this.frozenColumns > 0 || this.frozenRows > 0 || this.columnModel.filter((col) => col.isFrozen))
|
|
4257
4250
|
&& (!isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.rowTemplate))) {
|
|
4258
4251
|
failureCases.push('Frozen rows and columns are not supported with the Detail template and row template.');
|
|
4259
4252
|
}
|
|
@@ -4263,9 +4256,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4263
4256
|
if (this.allowSelection && !isNullOrUndefined(this.rowTemplate)) {
|
|
4264
4257
|
failureCases.push('Selection is not supported in RowTemplate');
|
|
4265
4258
|
}
|
|
4266
|
-
if (this.treeColumnIndex < 0) {
|
|
4267
|
-
failureCases.push('For showing tree structure it is must to set the TreeColumnIndex value.');
|
|
4268
|
-
}
|
|
4269
4259
|
if (this.treeColumnIndex >= this.columns.length) {
|
|
4270
4260
|
failureCases.push('TreeColumnIndex value should not exceed the total column count.');
|
|
4271
4261
|
}
|
|
@@ -4291,9 +4281,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4291
4281
|
failureCases.push('Only one column can have the ShowCheckbox option enabled.');
|
|
4292
4282
|
}
|
|
4293
4283
|
}
|
|
4294
|
-
|
|
4295
|
-
if (
|
|
4296
|
-
|
|
4284
|
+
let alignColumn;
|
|
4285
|
+
if (this.treeColumnIndex !== null && this.treeColumnIndex !== -1) {
|
|
4286
|
+
alignColumn = this.columnModel.filter((col) => col.textAlign === 'Right' && col.field === this.columnModel[this.treeColumnIndex].field);
|
|
4287
|
+
if (alignColumn.length !== 0) {
|
|
4288
|
+
failureCases.push('TextAlign right for the tree column is not applicable.');
|
|
4289
|
+
}
|
|
4297
4290
|
}
|
|
4298
4291
|
if (failureCases.length > 0) {
|
|
4299
4292
|
const failureEventArgs = {
|
|
@@ -4328,7 +4321,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4328
4321
|
this.flatData = data;
|
|
4329
4322
|
this.flatData.filter((e) => {
|
|
4330
4323
|
setValue('uniqueIDCollection.' + e.uniqueID, e, this);
|
|
4331
|
-
if (e.level === 0) {
|
|
4324
|
+
if (e.level === 0 && !this.parentData.some((record) => record.uniqueID === e.uniqueID)) {
|
|
4332
4325
|
this.parentData.push(e);
|
|
4333
4326
|
}
|
|
4334
4327
|
});
|
|
@@ -4461,14 +4454,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4461
4454
|
this.trigger(rowDeselecting, args);
|
|
4462
4455
|
};
|
|
4463
4456
|
this.grid.rowSelected = (args) => {
|
|
4464
|
-
if (this.enableVirtualization
|
|
4465
|
-
this.
|
|
4466
|
-
const updateRowSelection = 'updateRowSelection';
|
|
4467
|
-
for (let i = 0; i < this.getRows().length; i++) {
|
|
4468
|
-
if (this.getRows()[parseInt(i.toString(), 10)].getElementsByClassName('e-frame e-icons e-uncheck').length) {
|
|
4469
|
-
this.grid.selectionModule[`${updateRowSelection}`](this.getRows()[parseInt(i.toString(), 10)], this.getCurrentViewRecords()[parseInt(i.toString(), 10)].index);
|
|
4470
|
-
}
|
|
4471
|
-
}
|
|
4457
|
+
if (this.enableVirtualization) {
|
|
4458
|
+
this.virtualScrollModule.updateSelection(args);
|
|
4472
4459
|
}
|
|
4473
4460
|
this.selectedRowIndex = this.grid.selectedRowIndex;
|
|
4474
4461
|
this.notify(rowSelected, args);
|
|
@@ -5200,6 +5187,14 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5200
5187
|
}
|
|
5201
5188
|
return gridColumnCollection;
|
|
5202
5189
|
}
|
|
5190
|
+
lastRowCellBorderUpdated() {
|
|
5191
|
+
const rows = this.getContentTable().querySelectorAll('tr.e-row');
|
|
5192
|
+
const visibleRows = Array.from(rows).filter((row) => !row.classList.contains('e-childrow-hidden'));
|
|
5193
|
+
if (visibleRows.length > 0) {
|
|
5194
|
+
const lastVisibleRow = visibleRows[visibleRows.length - 1];
|
|
5195
|
+
this.lastRowBorder(lastVisibleRow, true);
|
|
5196
|
+
}
|
|
5197
|
+
}
|
|
5203
5198
|
/**
|
|
5204
5199
|
* Called internally if any of the property value changed.
|
|
5205
5200
|
*
|
|
@@ -5424,7 +5419,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5424
5419
|
this.grid.refreshColumns();
|
|
5425
5420
|
}
|
|
5426
5421
|
/**
|
|
5427
|
-
* Destroys the component
|
|
5422
|
+
* Destroys the TreeGrid component by detaching event handlers,
|
|
5423
|
+
* removing attributes and classes, and clearing the component's DOM elements.
|
|
5424
|
+
*
|
|
5425
|
+
* This method ensures that all resources used by the TreeGrid are properly released
|
|
5426
|
+
* and the component is cleaned up from the DOM to prevent memory leaks.
|
|
5428
5427
|
*
|
|
5429
5428
|
* @method destroy
|
|
5430
5429
|
* @returns {void}
|
|
@@ -5462,7 +5461,8 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5462
5461
|
this.grid = null;
|
|
5463
5462
|
}
|
|
5464
5463
|
/**
|
|
5465
|
-
*
|
|
5464
|
+
* Updates the TreeGrid model and ensures that the underlying Grid's data model is in sync with TreeGrid.
|
|
5465
|
+
* This method binds current data and settings to the TreeGrid.
|
|
5466
5466
|
*
|
|
5467
5467
|
* @method dataBind
|
|
5468
5468
|
* @returns {void}
|
|
@@ -5481,7 +5481,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5481
5481
|
this.grid.dataBind();
|
|
5482
5482
|
}
|
|
5483
5483
|
/**
|
|
5484
|
-
*
|
|
5484
|
+
* Retrieves the properties of the TreeGrid that should be retained and persisted between sessions.
|
|
5485
|
+
*
|
|
5486
|
+
* The method ensures that user preferences and important settings like paging, sorting, filtering,
|
|
5487
|
+
* column configurations, etc., are preserved and can be restored when the component is re-initialized.
|
|
5485
5488
|
*
|
|
5486
5489
|
* @returns {string} - Returns persist properties details
|
|
5487
5490
|
* @hidden
|
|
@@ -5572,7 +5575,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5572
5575
|
}
|
|
5573
5576
|
}
|
|
5574
5577
|
/**
|
|
5575
|
-
*
|
|
5578
|
+
* Retrieves all the TreeGrid row elements.
|
|
5579
|
+
*
|
|
5580
|
+
* This method is useful for accessing the HTML representation of the rows for further manipulation or inspection.
|
|
5576
5581
|
*
|
|
5577
5582
|
* @returns {HTMLTableRowElement[]} - Returns row elements collection
|
|
5578
5583
|
*/
|
|
@@ -5580,7 +5585,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5580
5585
|
return this.grid.getRows();
|
|
5581
5586
|
}
|
|
5582
5587
|
/**
|
|
5583
|
-
*
|
|
5588
|
+
* Obtains the pager element of the TreeGrid.
|
|
5589
|
+
*
|
|
5590
|
+
* The pager enables navigation between pages when the TreeGrid displays paginated data.
|
|
5584
5591
|
*
|
|
5585
5592
|
* @returns {Element} - Returns pager element
|
|
5586
5593
|
*/
|
|
@@ -5588,12 +5595,14 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5588
5595
|
return this.grid.getPager(); //get element from pager
|
|
5589
5596
|
}
|
|
5590
5597
|
/**
|
|
5591
|
-
* Adds a new record to the TreeGrid
|
|
5592
|
-
*
|
|
5598
|
+
* Adds a new record to the TreeGrid at the specified position or default location.
|
|
5599
|
+
*
|
|
5600
|
+
* @param {Object} data - Object containing the data for the new record. If omitted, an empty row is added.
|
|
5601
|
+
* @param {number} index - The index at which the new row should be added.
|
|
5602
|
+
* @param {RowPosition} position - Specifies the position of the new row (e.g., before, after or child).
|
|
5603
|
+
*
|
|
5604
|
+
* > Requires `editSettings.allowAdding` to be true.
|
|
5593
5605
|
*
|
|
5594
|
-
* @param {Object} data - Defines the new add record data.
|
|
5595
|
-
* @param {number} index - Defines the row index to be added.
|
|
5596
|
-
* @param {RowPosition} position - Defines the new row position to be added.
|
|
5597
5606
|
* @returns {void}
|
|
5598
5607
|
*/
|
|
5599
5608
|
addRecord(data, index, position) {
|
|
@@ -5604,7 +5613,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5604
5613
|
}
|
|
5605
5614
|
}
|
|
5606
5615
|
/**
|
|
5607
|
-
* Cancels
|
|
5616
|
+
* Cancels the current edit operation on the TreeGrid.
|
|
5617
|
+
*
|
|
5618
|
+
* This method discards changes made to the row and exits the edit mode without saving.
|
|
5608
5619
|
*
|
|
5609
5620
|
* @returns {void}
|
|
5610
5621
|
*/
|
|
@@ -5614,7 +5625,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5614
5625
|
}
|
|
5615
5626
|
}
|
|
5616
5627
|
/**
|
|
5617
|
-
* Saves the cell
|
|
5628
|
+
* Saves the current cell value changes without committing to the data source.
|
|
5629
|
+
*
|
|
5630
|
+
* This operation persists the changes in the UI but not in the underlying data model.
|
|
5618
5631
|
*
|
|
5619
5632
|
* @returns {void}
|
|
5620
5633
|
*/
|
|
@@ -5624,7 +5637,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5624
5637
|
}
|
|
5625
5638
|
}
|
|
5626
5639
|
/**
|
|
5627
|
-
*
|
|
5640
|
+
* Updates the value of a specific cell directly, bypassing the edit mode.
|
|
5641
|
+
*
|
|
5642
|
+
* This method provides a quick way to update the UI and data without user interaction.
|
|
5628
5643
|
*
|
|
5629
5644
|
* @param {number} rowIndex Defines the row index.
|
|
5630
5645
|
* @param {string} field Defines the column field.
|
|
@@ -5637,10 +5652,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5637
5652
|
}
|
|
5638
5653
|
}
|
|
5639
5654
|
/**
|
|
5640
|
-
*
|
|
5655
|
+
* Updates a specific row with given values directly, skipping the edit state.
|
|
5656
|
+
*
|
|
5657
|
+
* This method allows for bulk updates of row data programmatically.
|
|
5641
5658
|
*
|
|
5642
|
-
* @param {number} index
|
|
5643
|
-
* @param {Object} data
|
|
5659
|
+
* @param {number} index - The index of the row to update.
|
|
5660
|
+
* @param {Object} data - The data object containing updated field values.
|
|
5644
5661
|
* @returns {void}
|
|
5645
5662
|
*/
|
|
5646
5663
|
updateRow(index, data) {
|
|
@@ -5656,12 +5673,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5656
5673
|
}
|
|
5657
5674
|
}
|
|
5658
5675
|
/**
|
|
5659
|
-
*
|
|
5660
|
-
* > `editSettings.allowDeleting` should be true.
|
|
5676
|
+
* Deletes a record based on specified criteria or the selected record if none specified.
|
|
5661
5677
|
*
|
|
5662
|
-
* @param {string} fieldName -
|
|
5663
|
-
* @param {Object} data -
|
|
5678
|
+
* @param {string} fieldName - The name of the primary key field.
|
|
5679
|
+
* @param {Object} data - The data object representing the record to delete.
|
|
5664
5680
|
* @returns {void}
|
|
5681
|
+
*
|
|
5682
|
+
* > Requires `editSettings.allowDeleting` to be true.
|
|
5665
5683
|
*/
|
|
5666
5684
|
deleteRecord(fieldName, data) {
|
|
5667
5685
|
if ((isNullOrUndefined(fieldName) && (isNullOrUndefined(data)) || (this.getSelectedRecords().length <= 0))) {
|
|
@@ -5673,9 +5691,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5673
5691
|
}
|
|
5674
5692
|
}
|
|
5675
5693
|
/**
|
|
5676
|
-
*
|
|
5694
|
+
* Initiates editing for a specific row using its HTML element.
|
|
5695
|
+
*
|
|
5696
|
+
* This allows for manual control of which row enters edit mode through the UI.
|
|
5677
5697
|
*
|
|
5678
|
-
* @param {HTMLTableRowElement} row -
|
|
5698
|
+
* @param {HTMLTableRowElement} row - The table row element to enter into edit mode.
|
|
5679
5699
|
* @returns {void}
|
|
5680
5700
|
*/
|
|
5681
5701
|
startEdit(row) {
|
|
@@ -5684,10 +5704,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5684
5704
|
}
|
|
5685
5705
|
}
|
|
5686
5706
|
/**
|
|
5687
|
-
*
|
|
5707
|
+
* Begins editing of a specific cell using row and field indices.
|
|
5688
5708
|
*
|
|
5689
|
-
*
|
|
5690
|
-
*
|
|
5709
|
+
* Customers can programmatically specify which cell to edit without user input.
|
|
5710
|
+
*
|
|
5711
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
|
5712
|
+
* @param {string} field - The field name of the cell to edit.
|
|
5691
5713
|
* @returns {void}
|
|
5692
5714
|
*/
|
|
5693
5715
|
editCell(rowIndex, field) {
|
|
@@ -5696,10 +5718,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5696
5718
|
}
|
|
5697
5719
|
}
|
|
5698
5720
|
/**
|
|
5699
|
-
* Enables or disables ToolBar items.
|
|
5721
|
+
* Enables or disables specified ToolBar items within the TreeGrid.
|
|
5700
5722
|
*
|
|
5701
|
-
*
|
|
5702
|
-
*
|
|
5723
|
+
* This facilitates dynamic control of toolbar actions based on application logic.
|
|
5724
|
+
*
|
|
5725
|
+
* @param {string[]} items - Array of ToolBar item IDs to enable or disable.
|
|
5726
|
+
* @param {boolean} isEnable - Boolean flag to determine whether to enable (true) or disable (false) items.
|
|
5703
5727
|
* @returns {void}
|
|
5704
5728
|
*/
|
|
5705
5729
|
enableToolbarItems(items, isEnable) {
|
|
@@ -5708,7 +5732,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5708
5732
|
}
|
|
5709
5733
|
}
|
|
5710
5734
|
/**
|
|
5711
|
-
*
|
|
5735
|
+
* Commits the edits made to a record in edit mode, updating the data source.
|
|
5736
|
+
*
|
|
5737
|
+
* Use this method to finalize changes for rows in edit mode, ensuring persistence.
|
|
5712
5738
|
*
|
|
5713
5739
|
* @returns {void}
|
|
5714
5740
|
*/
|
|
@@ -5718,10 +5744,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5718
5744
|
}
|
|
5719
5745
|
}
|
|
5720
5746
|
/**
|
|
5721
|
-
*
|
|
5747
|
+
* Displays the column chooser at a specified screen position.
|
|
5748
|
+
*
|
|
5749
|
+
* Useful for customizing the visibility of columns interactively via the UI.
|
|
5722
5750
|
*
|
|
5723
|
-
* @param {number} x -
|
|
5724
|
-
* @param {number} y -
|
|
5751
|
+
* @param {number} x - The X-axis position of the column chooser.
|
|
5752
|
+
* @param {number} y - The Y-axis position of the column chooser.
|
|
5725
5753
|
* @returns {void}
|
|
5726
5754
|
*/
|
|
5727
5755
|
openColumnChooser(x, y) {
|
|
@@ -5730,9 +5758,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5730
5758
|
}
|
|
5731
5759
|
}
|
|
5732
5760
|
/**
|
|
5733
|
-
*
|
|
5761
|
+
* Deletes a visible row from the TreeGrid using its HTML element.
|
|
5762
|
+
*
|
|
5763
|
+
* Apply this method when handling row deletions through DOM manipulations.
|
|
5734
5764
|
*
|
|
5735
|
-
* @param {HTMLTableRowElement} tr -
|
|
5765
|
+
* @param {HTMLTableRowElement} tr - The table row element to remove.
|
|
5736
5766
|
* @returns {void}
|
|
5737
5767
|
*/
|
|
5738
5768
|
deleteRow(tr) {
|
|
@@ -5741,20 +5771,23 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5741
5771
|
}
|
|
5742
5772
|
}
|
|
5743
5773
|
/**
|
|
5744
|
-
*
|
|
5774
|
+
* Retrieves the primary key field names used in the TreeGrid.
|
|
5745
5775
|
*
|
|
5746
|
-
*
|
|
5776
|
+
* This information is crucial for identifying and manipulating unique rows.
|
|
5777
|
+
*
|
|
5778
|
+
* @returns {string[]} - Returns an array of primary key field names.
|
|
5747
5779
|
*/
|
|
5748
5780
|
getPrimaryKeyFieldNames() {
|
|
5749
5781
|
return this.grid.getPrimaryKeyFieldNames();
|
|
5750
5782
|
}
|
|
5751
5783
|
/**
|
|
5752
|
-
* Updates
|
|
5753
|
-
*
|
|
5784
|
+
* Updates the value of a specific cell using its primary key for identification.
|
|
5785
|
+
*
|
|
5786
|
+
* Useful for targeted updates that leverage unique identifiers to ensure accuracy.
|
|
5754
5787
|
*
|
|
5755
|
-
* @param {string| number} key -
|
|
5756
|
-
* @param {string
|
|
5757
|
-
* @param {string | number | boolean | Date} value -
|
|
5788
|
+
* @param {string| number} key - The primary key value of the row containing the cell.
|
|
5789
|
+
* @param {string} field - The field name of the cell to update.
|
|
5790
|
+
* @param {string | number | boolean | Date} value - The new value to assign to the specified cell.
|
|
5758
5791
|
* @returns {void}
|
|
5759
5792
|
*/
|
|
5760
5793
|
setCellValue(key, field, value) {
|
|
@@ -5764,11 +5797,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5764
5797
|
editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, field);
|
|
5765
5798
|
}
|
|
5766
5799
|
/**
|
|
5767
|
-
* Updates
|
|
5768
|
-
* > Primary key column must be specified using `columns.isPrimaryKey` property.
|
|
5800
|
+
* Updates the data for a specific row identified by its primary key and refreshes the display.
|
|
5769
5801
|
*
|
|
5770
|
-
*
|
|
5771
|
-
*
|
|
5802
|
+
* Important for keeping the displayed data consistent with the source database or dataset.
|
|
5803
|
+
*
|
|
5804
|
+
* @param {string| number} key - The primary key value of the row to update.
|
|
5805
|
+
* @param {Object} rowData - The new data to apply to the row.
|
|
5772
5806
|
* @returns {void}
|
|
5773
5807
|
*/
|
|
5774
5808
|
setRowData(key, rowData) {
|
|
@@ -5806,9 +5840,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5806
5840
|
}
|
|
5807
5841
|
}
|
|
5808
5842
|
/**
|
|
5809
|
-
* Navigates to
|
|
5843
|
+
* Navigates to a specified page number within the TreeGrid pagination.
|
|
5810
5844
|
*
|
|
5811
|
-
*
|
|
5845
|
+
* This can be used to programmatically change the page being viewed,
|
|
5846
|
+
* allowing for scripted navigation through data.
|
|
5847
|
+
*
|
|
5848
|
+
* @param {number} pageNo - The page number to navigate to. Must be within valid page range.
|
|
5812
5849
|
* @returns {void}
|
|
5813
5850
|
*/
|
|
5814
5851
|
goToPage(pageNo) {
|
|
@@ -5817,9 +5854,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5817
5854
|
}
|
|
5818
5855
|
}
|
|
5819
5856
|
/**
|
|
5820
|
-
*
|
|
5857
|
+
* Updates the external message displayed within the pager component.
|
|
5821
5858
|
*
|
|
5822
|
-
*
|
|
5859
|
+
* This is useful for showing custom messages or additional information
|
|
5860
|
+
* related to the data set or pagination status.
|
|
5861
|
+
*
|
|
5862
|
+
* @param {string} message - The custom message to display in the pager.
|
|
5823
5863
|
* @returns {void}
|
|
5824
5864
|
*/
|
|
5825
5865
|
updateExternalMessage(message) {
|
|
@@ -5828,20 +5868,26 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5828
5868
|
}
|
|
5829
5869
|
}
|
|
5830
5870
|
/**
|
|
5831
|
-
*
|
|
5871
|
+
* Retrieves a cell element based on its row and column indices in the TreeGrid.
|
|
5832
5872
|
*
|
|
5833
|
-
*
|
|
5834
|
-
*
|
|
5835
|
-
*
|
|
5873
|
+
* This method is helpful for accessing cell-level elements for custom
|
|
5874
|
+
* operations or styling.
|
|
5875
|
+
*
|
|
5876
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
|
5877
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
|
5878
|
+
* @returns {Element} - Returns the HTML element of the specified cell.
|
|
5836
5879
|
*/
|
|
5837
5880
|
getCellFromIndex(rowIndex, columnIndex) {
|
|
5838
5881
|
return this.grid.getCellFromIndex(rowIndex, columnIndex);
|
|
5839
5882
|
}
|
|
5840
5883
|
/**
|
|
5841
|
-
*
|
|
5884
|
+
* Retrieves a column object by the column's field name.
|
|
5842
5885
|
*
|
|
5843
|
-
*
|
|
5844
|
-
*
|
|
5886
|
+
* This is typically used for obtaining the details of a column for
|
|
5887
|
+
* configuration or data manipulation purposes.
|
|
5888
|
+
*
|
|
5889
|
+
* @param {string} field - The field name of the column.
|
|
5890
|
+
* @returns {Column} - Returns the column object corresponding to the field.
|
|
5845
5891
|
*/
|
|
5846
5892
|
getColumnByField(field) {
|
|
5847
5893
|
return iterateArrayOrObject(this.columnModel, (item) => {
|
|
@@ -5852,10 +5898,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5852
5898
|
})[0];
|
|
5853
5899
|
}
|
|
5854
5900
|
/**
|
|
5855
|
-
*
|
|
5901
|
+
* Fetches a column object using the column's unique identifier (UID).
|
|
5902
|
+
*
|
|
5903
|
+
* Useful in scenarios where columns do not have unique field names but
|
|
5904
|
+
* are uniquely identifiable via UID.
|
|
5856
5905
|
*
|
|
5857
|
-
* @param
|
|
5858
|
-
* @returns {Column} - Returns
|
|
5906
|
+
* @param {string} uid - The unique identifier for the column.
|
|
5907
|
+
* @returns {Column} - Returns the column object for the given UID.
|
|
5859
5908
|
*/
|
|
5860
5909
|
getColumnByUid(uid) {
|
|
5861
5910
|
let Columns = this.initialRender ? this.grid.columns : this.columns;
|
|
@@ -5871,34 +5920,45 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5871
5920
|
})[0];
|
|
5872
5921
|
}
|
|
5873
5922
|
/**
|
|
5874
|
-
*
|
|
5923
|
+
* Retrieves the names of all column fields in the TreeGrid.
|
|
5875
5924
|
*
|
|
5876
|
-
*
|
|
5925
|
+
* This method provides a list of field names useful for dynamic operations
|
|
5926
|
+
* or configuration where fields need to be enumerated or manipulated.
|
|
5927
|
+
*
|
|
5928
|
+
* @returns {string[]} - Returns an array of column field names.
|
|
5877
5929
|
*/
|
|
5878
5930
|
getColumnFieldNames() {
|
|
5879
5931
|
return this.grid.getColumnFieldNames();
|
|
5880
5932
|
}
|
|
5881
5933
|
/**
|
|
5882
|
-
*
|
|
5934
|
+
* Retrieves the footer content element of the TreeGrid, usually for styling or custom manipulation.
|
|
5935
|
+
*
|
|
5936
|
+
* This can be used to access the footer for adding custom functionality
|
|
5937
|
+
* or styling purposes to enhance user interaction at the bottom of the grid.
|
|
5883
5938
|
*
|
|
5884
|
-
* @returns {Element} - Returns footer content
|
|
5939
|
+
* @returns {Element} - Returns the footer content HTML element.
|
|
5885
5940
|
*/
|
|
5886
5941
|
getFooterContent() {
|
|
5887
5942
|
return this.grid.getFooterContent();
|
|
5888
5943
|
}
|
|
5889
5944
|
/**
|
|
5890
|
-
*
|
|
5945
|
+
* Acquires the footer table element of the TreeGrid for layout management.
|
|
5946
|
+
*
|
|
5947
|
+
* Useful for manipulating the table's structure or style beneath the grid content.
|
|
5891
5948
|
*
|
|
5892
|
-
* @returns {Element} - Returns footer
|
|
5949
|
+
* @returns {Element} - Returns the footer table HTML element.
|
|
5893
5950
|
*/
|
|
5894
5951
|
getFooterContentTable() {
|
|
5895
5952
|
return this.grid.getFooterContentTable();
|
|
5896
5953
|
}
|
|
5897
5954
|
/**
|
|
5898
|
-
* Shows
|
|
5955
|
+
* Shows one or more columns based on the specified column names.
|
|
5899
5956
|
*
|
|
5900
|
-
*
|
|
5901
|
-
*
|
|
5957
|
+
* This is useful for dynamically adjusting the visibility of columns
|
|
5958
|
+
* based on user actions or application logic.
|
|
5959
|
+
*
|
|
5960
|
+
* @param {string|string[]} keys - A single column name or an array of column names to show.
|
|
5961
|
+
* @param {string} showBy - Key to determine visibility either as field name or header text.
|
|
5902
5962
|
* @returns {void}
|
|
5903
5963
|
*/
|
|
5904
5964
|
showColumns(keys, showBy) {
|
|
@@ -5906,10 +5966,13 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5906
5966
|
this.updateColumnModel();
|
|
5907
5967
|
}
|
|
5908
5968
|
/**
|
|
5909
|
-
* Hides
|
|
5969
|
+
* Hides one or more columns based on the specified column names.
|
|
5970
|
+
*
|
|
5971
|
+
* Utilized to dynamically reduce the visibility of columns based on
|
|
5972
|
+
* user roles or preferences.
|
|
5910
5973
|
*
|
|
5911
|
-
* @param
|
|
5912
|
-
* @param
|
|
5974
|
+
* @param {string|string[]} keys - A single column name or an array of column names to hide.
|
|
5975
|
+
* @param {string} hideBy - Key to evaluate columns either as field name or header text.
|
|
5913
5976
|
* @returns {void}
|
|
5914
5977
|
*/
|
|
5915
5978
|
hideColumns(keys, hideBy) {
|
|
@@ -5917,37 +5980,48 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5917
5980
|
this.updateColumnModel();
|
|
5918
5981
|
}
|
|
5919
5982
|
/**
|
|
5920
|
-
*
|
|
5983
|
+
* Retrieves a column header element based on the field name of the column.
|
|
5921
5984
|
*
|
|
5922
|
-
*
|
|
5923
|
-
*
|
|
5985
|
+
* This method helps to directly manipulate headers, such as applying custom styles.
|
|
5986
|
+
*
|
|
5987
|
+
* @param {string} field - The field name of the desired column.
|
|
5988
|
+
* @returns {Element} - Returns the HTML element of the column header.
|
|
5924
5989
|
*/
|
|
5925
5990
|
getColumnHeaderByField(field) {
|
|
5926
5991
|
return this.grid.getColumnHeaderByField(field);
|
|
5927
5992
|
}
|
|
5928
5993
|
/**
|
|
5929
|
-
*
|
|
5994
|
+
* Acquires the column header element using the column's index.
|
|
5930
5995
|
*
|
|
5931
|
-
*
|
|
5932
|
-
*
|
|
5996
|
+
* Suitable for situations where direct column index is available
|
|
5997
|
+
* and header access is needed for operations.
|
|
5998
|
+
*
|
|
5999
|
+
* @param {number} index - The index of the column.
|
|
6000
|
+
* @returns {Element} - Returns the HTML element of the specified column header.
|
|
5933
6001
|
*/
|
|
5934
6002
|
getColumnHeaderByIndex(index) {
|
|
5935
6003
|
return this.grid.getColumnHeaderByIndex(index);
|
|
5936
6004
|
}
|
|
5937
6005
|
/**
|
|
5938
|
-
*
|
|
6006
|
+
* Retrieves a column header element utilizing the column's UID.
|
|
6007
|
+
*
|
|
6008
|
+
* Useful for precision access to header elements when UIDs are used
|
|
6009
|
+
* uniquely to manage column identities.
|
|
5939
6010
|
*
|
|
5940
|
-
* @param {string} uid -
|
|
5941
|
-
* @returns {Element} - Returns column header
|
|
6011
|
+
* @param {string} uid - The UID of the column.
|
|
6012
|
+
* @returns {Element} - Returns the HTML element of the column header.
|
|
5942
6013
|
*/
|
|
5943
6014
|
getColumnHeaderByUid(uid) {
|
|
5944
6015
|
return this.grid.getColumnHeaderByUid(uid);
|
|
5945
6016
|
}
|
|
5946
6017
|
/**
|
|
5947
|
-
*
|
|
6018
|
+
* Determines the column index by the specified field name.
|
|
5948
6019
|
*
|
|
5949
|
-
*
|
|
5950
|
-
*
|
|
6020
|
+
* Helpful in converting field names to indices for operations that require
|
|
6021
|
+
* numeric input for array or collection indexing.
|
|
6022
|
+
*
|
|
6023
|
+
* @param {string} field - The field name of the column.
|
|
6024
|
+
* @returns {number} - Returns the index of the column.
|
|
5951
6025
|
*/
|
|
5952
6026
|
getColumnIndexByField(field) {
|
|
5953
6027
|
return this.grid.getColumnIndexByField(field);
|
|
@@ -5963,19 +6037,25 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5963
6037
|
return !isNullOrUndefined(index) ? index : -1;
|
|
5964
6038
|
}
|
|
5965
6039
|
/**
|
|
5966
|
-
*
|
|
6040
|
+
* Determines the column index based on the unique identifier (UID).
|
|
6041
|
+
*
|
|
6042
|
+
* This can be crucial in scenarios that involve dynamic column management
|
|
6043
|
+
* where UID provides an accurate reference.
|
|
5967
6044
|
*
|
|
5968
|
-
* @param
|
|
5969
|
-
* @returns {number} - Returns column index
|
|
6045
|
+
* @param {string} uid - The UID of the column.
|
|
6046
|
+
* @returns {number} - Returns the column index.
|
|
5970
6047
|
*/
|
|
5971
6048
|
getColumnIndexByUid(uid) {
|
|
5972
6049
|
return this.grid.getColumnIndexByUid(uid);
|
|
5973
6050
|
}
|
|
5974
6051
|
/**
|
|
5975
|
-
*
|
|
6052
|
+
* Fetches a collection of columns from the TreeGrid optionally refreshing the column model.
|
|
5976
6053
|
*
|
|
5977
|
-
*
|
|
5978
|
-
*
|
|
6054
|
+
* Use this method to retrieve and optionally refresh the list of columns
|
|
6055
|
+
* to ensure up-to-date configurations and settings.
|
|
6056
|
+
*
|
|
6057
|
+
* @param {boolean} isRefresh - Determines whether to refresh the grid's column model.
|
|
6058
|
+
* @returns {Column[]} - Returns an array of TreeGrid column objects.
|
|
5979
6059
|
*/
|
|
5980
6060
|
getColumns(isRefresh) {
|
|
5981
6061
|
this.updateColumnModel(this.grid.getColumns(isRefresh));
|
|
@@ -6036,9 +6116,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6036
6116
|
});
|
|
6037
6117
|
}
|
|
6038
6118
|
/**
|
|
6039
|
-
*
|
|
6119
|
+
* Retrieves the main content area of the TreeGrid.
|
|
6120
|
+
*
|
|
6121
|
+
* This method allows access to the main content DIV, which can
|
|
6122
|
+
* be used for layout adjustments or adding custom elements.
|
|
6040
6123
|
*
|
|
6041
|
-
* @returns {Element} -
|
|
6124
|
+
* @returns {Element} - Returns the TreeGrid content HTML element.
|
|
6042
6125
|
*/
|
|
6043
6126
|
getContent() {
|
|
6044
6127
|
return this.grid.getContent();
|
|
@@ -6069,17 +6152,23 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6069
6152
|
this.setProperties({ sortSettings: getObject('properties', this.grid.sortSettings) }, true);
|
|
6070
6153
|
}
|
|
6071
6154
|
/**
|
|
6072
|
-
*
|
|
6155
|
+
* Retrieves the content table element of the TreeGrid.
|
|
6073
6156
|
*
|
|
6074
|
-
*
|
|
6157
|
+
* This table contains the main data display area, allowing for
|
|
6158
|
+
* interaction and data manipulation directly within the TreeGrid.
|
|
6159
|
+
*
|
|
6160
|
+
* @returns {Element} - Returns the HTML element representing the content table.
|
|
6075
6161
|
*/
|
|
6076
6162
|
getContentTable() {
|
|
6077
6163
|
return this.grid.getContentTable();
|
|
6078
6164
|
}
|
|
6079
6165
|
/**
|
|
6080
|
-
*
|
|
6166
|
+
* Obtains all data row elements from the TreeGrid, excluding summary rows.
|
|
6167
|
+
*
|
|
6168
|
+
* Provides a way to access the visual representation of data for purposes
|
|
6169
|
+
* like custom formatting or event binding.
|
|
6081
6170
|
*
|
|
6082
|
-
* @returns {Element[]} - Returns row elements
|
|
6171
|
+
* @returns {Element[]} - Returns an array of data row elements.
|
|
6083
6172
|
*/
|
|
6084
6173
|
getDataRows() {
|
|
6085
6174
|
const dRows = [];
|
|
@@ -6092,9 +6181,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6092
6181
|
return dRows;
|
|
6093
6182
|
}
|
|
6094
6183
|
/**
|
|
6095
|
-
*
|
|
6184
|
+
* Retrieves the current set of records that are visible in the TreeGrid view.
|
|
6096
6185
|
*
|
|
6097
|
-
*
|
|
6186
|
+
* This method excludes any summary rows to focus on the main data set
|
|
6187
|
+
* currently being viewed by the user.
|
|
6188
|
+
*
|
|
6189
|
+
* @returns {Object[]} - Returns an array of the current view records.
|
|
6098
6190
|
* @isGenericType true
|
|
6099
6191
|
*/
|
|
6100
6192
|
getCurrentViewRecords() {
|
|
@@ -6102,60 +6194,78 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6102
6194
|
return this.grid.currentViewData.filter((e) => isNullOrUndefined(e[`${isSummaryRow}`]));
|
|
6103
6195
|
}
|
|
6104
6196
|
/**
|
|
6105
|
-
*
|
|
6197
|
+
* Collects data changes (added, edited, and deleted) that have not been saved in batch mode.
|
|
6198
|
+
*
|
|
6199
|
+
* This allows you to view pending changes awaiting a commit to the data source.
|
|
6106
6200
|
*
|
|
6107
|
-
* @returns {Object} - Returns batch changes
|
|
6201
|
+
* @returns {Object} - Returns an object detailing batch changes.
|
|
6108
6202
|
*/
|
|
6109
6203
|
getBatchChanges() {
|
|
6110
6204
|
return this.grid.editModule.getBatchChanges();
|
|
6111
6205
|
}
|
|
6112
6206
|
/**
|
|
6113
|
-
*
|
|
6207
|
+
* Retrieves the header content element of the TreeGrid.
|
|
6208
|
+
*
|
|
6209
|
+
* Mainly used for interacting with the header section, which includes
|
|
6210
|
+
* column headers and any applied header styling or events.
|
|
6114
6211
|
*
|
|
6115
|
-
* @returns {Element} - Returns
|
|
6212
|
+
* @returns {Element} - Returns the HTML element for header content.
|
|
6116
6213
|
*/
|
|
6117
6214
|
getHeaderContent() {
|
|
6118
6215
|
return this.grid.getHeaderContent();
|
|
6119
6216
|
}
|
|
6120
6217
|
/**
|
|
6121
|
-
*
|
|
6218
|
+
* Retrieves the header table element of the TreeGrid.
|
|
6122
6219
|
*
|
|
6123
|
-
*
|
|
6220
|
+
* This method is useful for direct access to the table structure
|
|
6221
|
+
* where column headers are defined.
|
|
6222
|
+
*
|
|
6223
|
+
* @returns {Element} - Returns the HTML element for the header table.
|
|
6124
6224
|
*/
|
|
6125
6225
|
getHeaderTable() {
|
|
6126
6226
|
return this.grid.getHeaderTable();
|
|
6127
6227
|
}
|
|
6128
6228
|
/**
|
|
6129
|
-
*
|
|
6229
|
+
* Fetches a specific row element based on its index in the TreeGrid.
|
|
6130
6230
|
*
|
|
6131
|
-
*
|
|
6132
|
-
*
|
|
6231
|
+
* This provides a way to directly access and manipulate a row using its index.
|
|
6232
|
+
*
|
|
6233
|
+
* @param {number} index - The index of the desired row.
|
|
6234
|
+
* @returns {Element} - Returns the HTML element of the specified row.
|
|
6133
6235
|
*/
|
|
6134
6236
|
getRowByIndex(index) {
|
|
6135
6237
|
return this.grid.getRowByIndex(index);
|
|
6136
6238
|
}
|
|
6137
6239
|
/**
|
|
6138
|
-
*
|
|
6240
|
+
* Provides detailed information about a row based on a specified target element.
|
|
6241
|
+
*
|
|
6242
|
+
* Integral for retrieving metadata such as row index or data object
|
|
6243
|
+
* when working with events or complex tree structures.
|
|
6139
6244
|
*
|
|
6140
|
-
* @param {Element | EventTarget} target -
|
|
6141
|
-
* @returns {RowInfo} - Returns
|
|
6245
|
+
* @param {Element | EventTarget} target - The target element or event triggering the request.
|
|
6246
|
+
* @returns {RowInfo} - Returns an object containing row information.
|
|
6142
6247
|
*/
|
|
6143
6248
|
getRowInfo(target) {
|
|
6144
6249
|
return this.grid.getRowInfo(target);
|
|
6145
6250
|
}
|
|
6146
6251
|
/**
|
|
6147
|
-
*
|
|
6252
|
+
* Finds the unique identifier (UID) for a column based on its field name.
|
|
6148
6253
|
*
|
|
6149
|
-
*
|
|
6150
|
-
*
|
|
6254
|
+
* UIDs are essential for precise identification and manipulation within complex grids.
|
|
6255
|
+
*
|
|
6256
|
+
* @param {string} field - The field name of the column.
|
|
6257
|
+
* @returns {string} - Returns the unique identifier for the specified column.
|
|
6151
6258
|
*/
|
|
6152
6259
|
getUidByColumnField(field) {
|
|
6153
6260
|
return this.grid.getUidByColumnField(field);
|
|
6154
6261
|
}
|
|
6155
6262
|
/**
|
|
6156
|
-
*
|
|
6263
|
+
* Retrieves all the columns that are currently set to be visible within the TreeGrid.
|
|
6264
|
+
*
|
|
6265
|
+
* Helps in understanding the user's current view and can be used to dynamically
|
|
6266
|
+
* adjust the visible columns.
|
|
6157
6267
|
*
|
|
6158
|
-
* @returns {Column[]} - Returns visible
|
|
6268
|
+
* @returns {Column[]} - Returns an array of visible column objects.
|
|
6159
6269
|
*/
|
|
6160
6270
|
getVisibleColumns() {
|
|
6161
6271
|
const cols = [];
|
|
@@ -6167,7 +6277,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6167
6277
|
return cols;
|
|
6168
6278
|
}
|
|
6169
6279
|
/**
|
|
6170
|
-
*
|
|
6280
|
+
* Displays a loading spinner overlay across the TreeGrid for any data action or long-running process.
|
|
6281
|
+
*
|
|
6282
|
+
* This can be manually invoked to indicate processing, enhancing user experience by providing feedback.
|
|
6171
6283
|
*
|
|
6172
6284
|
* @returns {void}
|
|
6173
6285
|
*/
|
|
@@ -6175,7 +6287,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6175
6287
|
showSpinner(this.element);
|
|
6176
6288
|
}
|
|
6177
6289
|
/**
|
|
6178
|
-
*
|
|
6290
|
+
* Hides a manually shown loading spinner overlay from the TreeGrid.
|
|
6291
|
+
*
|
|
6292
|
+
* Ensures that any long-running process indication is removed after completion
|
|
6293
|
+
* to manage user interface aesthetics.
|
|
6179
6294
|
*
|
|
6180
6295
|
* @returns {void}
|
|
6181
6296
|
*/
|
|
@@ -6183,7 +6298,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6183
6298
|
hideSpinner(this.element);
|
|
6184
6299
|
}
|
|
6185
6300
|
/**
|
|
6186
|
-
* Refreshes the TreeGrid header and content.
|
|
6301
|
+
* Refreshes the visual appearance and data of the TreeGrid, updating header and content.
|
|
6302
|
+
*
|
|
6303
|
+
* This is crucial for synchronizing the displayed data with the underlying data source,
|
|
6304
|
+
* ensuring the view reflects current data.
|
|
6187
6305
|
*
|
|
6188
6306
|
* @returns {void}
|
|
6189
6307
|
*/
|
|
@@ -6203,18 +6321,24 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6203
6321
|
this.grid.refresh();
|
|
6204
6322
|
}
|
|
6205
6323
|
/**
|
|
6206
|
-
*
|
|
6324
|
+
* Retrieves the records associated with rows that have their checkboxes checked.
|
|
6325
|
+
*
|
|
6326
|
+
* Facilitates operations that require information about specifically selected or
|
|
6327
|
+
* interacted rows within the grid.
|
|
6207
6328
|
*
|
|
6208
|
-
* @returns {Object[]} - Returns
|
|
6329
|
+
* @returns {Object[]} - Returns an array of checked row data objects.
|
|
6209
6330
|
* @isGenericType true
|
|
6210
6331
|
*/
|
|
6211
6332
|
getCheckedRecords() {
|
|
6212
6333
|
return this.selectionModule.getCheckedrecords();
|
|
6213
6334
|
}
|
|
6214
6335
|
/**
|
|
6215
|
-
*
|
|
6336
|
+
* Retrieves currently visible records according to the TreeGrid's visual state.
|
|
6216
6337
|
*
|
|
6217
|
-
*
|
|
6338
|
+
* It considers row expansion and collapse states to return only those records
|
|
6339
|
+
* that a user can currently interact with.
|
|
6340
|
+
*
|
|
6341
|
+
* @returns {Object[]} - Returns visible records reflecting the TreeGrid's current view.
|
|
6218
6342
|
* @isGenericType true
|
|
6219
6343
|
*/
|
|
6220
6344
|
getVisibleRecords() {
|
|
@@ -6234,26 +6358,35 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6234
6358
|
return visibleRecords;
|
|
6235
6359
|
}
|
|
6236
6360
|
/**
|
|
6237
|
-
*
|
|
6361
|
+
* Retrieves the indices of rows that have their checkboxes checked.
|
|
6362
|
+
*
|
|
6363
|
+
* This can assist in programatically assessing which rows have been selected
|
|
6364
|
+
* by checkbox interaction for further processing.
|
|
6238
6365
|
*
|
|
6239
|
-
* @returns {number[]} - Returns checked
|
|
6366
|
+
* @returns {number[]} - Returns an array of indices corresponding to checked rows.
|
|
6240
6367
|
*/
|
|
6241
6368
|
getCheckedRowIndexes() {
|
|
6242
6369
|
return this.selectionModule.getCheckedRowIndexes();
|
|
6243
6370
|
}
|
|
6244
6371
|
/**
|
|
6245
|
-
*
|
|
6372
|
+
* Selects rows in the TreeGrid using row indices, checking their associated checkboxes.
|
|
6246
6373
|
*
|
|
6247
|
-
*
|
|
6374
|
+
* This method provides automation for selecting or highlighting specific rows,
|
|
6375
|
+
* useful in scenarios needing pre-selection or default selections.
|
|
6376
|
+
*
|
|
6377
|
+
* @param {number[]} indexes - An array of row indices to be marked as selected.
|
|
6248
6378
|
* @returns {void}
|
|
6249
6379
|
*/
|
|
6250
6380
|
selectCheckboxes(indexes) {
|
|
6251
6381
|
this.selectionModule.selectCheckboxes(indexes);
|
|
6252
6382
|
}
|
|
6253
6383
|
/**
|
|
6254
|
-
*
|
|
6384
|
+
* Updates and refreshes the TreeGrid's column definitions and layout.
|
|
6385
|
+
*
|
|
6386
|
+
* Ensures that the latest column settings are displayed, either refreshing the UI
|
|
6387
|
+
* or adjusting internal configurations to match current data or configuration updates.
|
|
6255
6388
|
*
|
|
6256
|
-
* @param {boolean} refreshUI -
|
|
6389
|
+
* @param {boolean} refreshUI - A flag indicating whether the DOM should be updated.
|
|
6257
6390
|
* @returns {void}
|
|
6258
6391
|
*/
|
|
6259
6392
|
refreshColumns(refreshUI) {
|
|
@@ -6282,7 +6415,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6282
6415
|
this.setProperties({ treeColumnIndex: treeIndex }, true);
|
|
6283
6416
|
}
|
|
6284
6417
|
/**
|
|
6285
|
-
* Refreshes the TreeGrid
|
|
6418
|
+
* Refreshes the header section of the TreeGrid to reflect any structural or data changes.
|
|
6419
|
+
*
|
|
6420
|
+
* This method is useful when there are dynamic updates or layout adjustments
|
|
6421
|
+
* needed in the header portion to ensure it aligns with current grid data or settings.
|
|
6286
6422
|
*
|
|
6287
6423
|
* @returns {void}
|
|
6288
6424
|
*/
|
|
@@ -6337,12 +6473,15 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6337
6473
|
}
|
|
6338
6474
|
}
|
|
6339
6475
|
/**
|
|
6340
|
-
* Expands
|
|
6476
|
+
* Expands the specified parent row within the TreeGrid to reveal its nested data.
|
|
6341
6477
|
*
|
|
6342
|
-
*
|
|
6343
|
-
*
|
|
6344
|
-
*
|
|
6345
|
-
* @param {
|
|
6478
|
+
* This method is useful for programmatically expanding rows to display their
|
|
6479
|
+
* hierarchical children, providing detailed views for nested data structures.
|
|
6480
|
+
*
|
|
6481
|
+
* @param {HTMLTableRowElement} row - The table row element that should be expanded.
|
|
6482
|
+
* @param {Object} record - Optional. Represents the data record associated with the row to be expanded.
|
|
6483
|
+
* @param {Object} key - Optional. The primary key value that uniquely identifies the record.
|
|
6484
|
+
* @param {number} level - Optional. Indicates the hierarchical level of the record within the TreeGrid.
|
|
6346
6485
|
* @returns {void}
|
|
6347
6486
|
*/
|
|
6348
6487
|
expandRow(row, record, key, level) {
|
|
@@ -6357,7 +6496,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6357
6496
|
if (isNullOrUndefined(row) && isNullOrUndefined(record)) {
|
|
6358
6497
|
return;
|
|
6359
6498
|
}
|
|
6360
|
-
if (!isNullOrUndefined(row) && row.cells[0].classList.contains('e-lastrowcell')) {
|
|
6499
|
+
if (!isNullOrUndefined(row) && row.cells && row.cells[0].classList.contains('e-lastrowcell')) {
|
|
6361
6500
|
this.lastRowBorder(row, false);
|
|
6362
6501
|
}
|
|
6363
6502
|
if (this.isExpandAll && !isRemoteData(this)) {
|
|
@@ -6397,7 +6536,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6397
6536
|
}
|
|
6398
6537
|
// Internal method to handle the rows expand
|
|
6399
6538
|
expandRows(row, record, parentRec) {
|
|
6400
|
-
const initialTotalRecordsCount = this.grid.totalDataRecordsCount;
|
|
6401
6539
|
this.expandCollapse('expand', row, record);
|
|
6402
6540
|
const children = 'Children';
|
|
6403
6541
|
if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record[`${children}`]))) {
|
|
@@ -6441,12 +6579,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6441
6579
|
}
|
|
6442
6580
|
else if (isNullOrUndefined(record) && !isNullOrUndefined(row)) {
|
|
6443
6581
|
if (this.detailTemplate) {
|
|
6444
|
-
record = this.grid.getCurrentViewRecords()[row.getAttribute('
|
|
6582
|
+
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
|
|
6445
6583
|
}
|
|
6446
6584
|
else {
|
|
6447
6585
|
if (this.enableVirtualization && (this.isCollapseAll || this.isExpandAll)) {
|
|
6448
6586
|
if (row.rowIndex === -1) {
|
|
6449
|
-
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('
|
|
6587
|
+
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
|
|
6450
6588
|
}
|
|
6451
6589
|
else {
|
|
6452
6590
|
record = this.grid.getCurrentViewRecords()[row.rowIndex];
|
|
@@ -6456,18 +6594,27 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6456
6594
|
record = this.grid.getCurrentViewRecords()[row.rowIndex];
|
|
6457
6595
|
}
|
|
6458
6596
|
else {
|
|
6459
|
-
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('
|
|
6597
|
+
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
|
|
6460
6598
|
}
|
|
6461
6599
|
}
|
|
6462
6600
|
}
|
|
6463
6601
|
return record;
|
|
6464
6602
|
}
|
|
6465
6603
|
/**
|
|
6466
|
-
* Collapses
|
|
6604
|
+
* Collapses the specified parent row in the TreeGrid.
|
|
6605
|
+
*
|
|
6606
|
+
* This method collapses the row associated with the provided HTMLTableRowElement,
|
|
6607
|
+
* hiding any of its displayed child rows. It is typically used to manage the
|
|
6608
|
+
* visibility of hierarchical data within a tree structure.
|
|
6467
6609
|
*
|
|
6468
|
-
* @param {HTMLTableRowElement} row -
|
|
6469
|
-
*
|
|
6470
|
-
* @param {Object}
|
|
6610
|
+
* @param {HTMLTableRowElement} row - The HTMLTableRowElement representing the parent row
|
|
6611
|
+
* whose child rows are to be collapsed.
|
|
6612
|
+
* @param {Object} record - (Optional) The data record associated with the row being collapsed.
|
|
6613
|
+
* This can be used to access or manipulate the underlying data
|
|
6614
|
+
* when collapsing the row.
|
|
6615
|
+
* @param {Object} key - (Optional) The primary key value of the record. It can be used to identify
|
|
6616
|
+
* the target record uniquely when collapsing the row, especially in cases
|
|
6617
|
+
* where the row or record data needs to be referenced or logged.
|
|
6471
6618
|
* @returns {void}
|
|
6472
6619
|
*/
|
|
6473
6620
|
collapseRow(row, record, key) {
|
|
@@ -6548,9 +6695,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6548
6695
|
}
|
|
6549
6696
|
}
|
|
6550
6697
|
/**
|
|
6551
|
-
* Expands the records at
|
|
6698
|
+
* Expands all the records at the specified hierarchical level within the TreeGrid.
|
|
6552
6699
|
*
|
|
6553
|
-
*
|
|
6700
|
+
* This method is useful for visually expanding data at a certain depth, making
|
|
6701
|
+
* all parent rows visible at the given level and their child rows accessible.
|
|
6702
|
+
*
|
|
6703
|
+
* @param {number} level - The hierarchical level at which parent rows should be expanded.
|
|
6554
6704
|
* @returns {void}
|
|
6555
6705
|
*/
|
|
6556
6706
|
expandAtLevel(level) {
|
|
@@ -6570,9 +6720,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6570
6720
|
}
|
|
6571
6721
|
}
|
|
6572
6722
|
/**
|
|
6573
|
-
* Expands
|
|
6723
|
+
* Expands a specific record identified by the provided primary key value.
|
|
6724
|
+
*
|
|
6725
|
+
* This method is useful for expanding particular node in the TreeGrid when
|
|
6726
|
+
* the parent rows need to be targeted individually by their unique key.
|
|
6574
6727
|
*
|
|
6575
|
-
* @param {Object} key -
|
|
6728
|
+
* @param {Object} key - The primary key value of the record to be expanded.
|
|
6576
6729
|
* @returns {void}
|
|
6577
6730
|
*/
|
|
6578
6731
|
expandByKey(key) {
|
|
@@ -6622,9 +6775,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6622
6775
|
return obj;
|
|
6623
6776
|
}
|
|
6624
6777
|
/**
|
|
6625
|
-
* Collapses the records at
|
|
6778
|
+
* Collapses all the records at the specified hierarchical level within the TreeGrid.
|
|
6626
6779
|
*
|
|
6627
|
-
*
|
|
6780
|
+
* This function helps in hiding child rows for all parent nodes at a given level,
|
|
6781
|
+
* effectively reducing the visible depth of the hierarchical structure.
|
|
6782
|
+
*
|
|
6783
|
+
* @param {number} level - The hierarchical level at which parent rows should be collapsed.
|
|
6628
6784
|
* @returns {void}
|
|
6629
6785
|
*/
|
|
6630
6786
|
collapseAtLevel(level) {
|
|
@@ -6644,9 +6800,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6644
6800
|
}
|
|
6645
6801
|
}
|
|
6646
6802
|
/**
|
|
6647
|
-
* Collapses
|
|
6803
|
+
* Collapses a specific record identified by the provided primary key value.
|
|
6804
|
+
*
|
|
6805
|
+
* This method is useful for collapsing particular node in the TreeGrid when
|
|
6806
|
+
* the parent rows need to be targeted individually by their unique key.
|
|
6648
6807
|
*
|
|
6649
|
-
* @param {Object} key -
|
|
6808
|
+
* @param {Object} key - The primary key value of the record to be collapsed.
|
|
6650
6809
|
* @returns {void}
|
|
6651
6810
|
*/
|
|
6652
6811
|
collapseByKey(key) {
|
|
@@ -6684,7 +6843,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6684
6843
|
}
|
|
6685
6844
|
}
|
|
6686
6845
|
/**
|
|
6687
|
-
* Expands
|
|
6846
|
+
* Expands all rows in the TreeGrid, making the full hierarchy visible.
|
|
6847
|
+
*
|
|
6848
|
+
* This method should be used with caution on large datasets, as it makes
|
|
6849
|
+
* all nodes and their child rows visible, which might affect performance.
|
|
6688
6850
|
*
|
|
6689
6851
|
* @returns {void}
|
|
6690
6852
|
*/
|
|
@@ -6695,10 +6857,23 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6695
6857
|
}
|
|
6696
6858
|
this.isExpandedEventTriggered = false;
|
|
6697
6859
|
this.isExpandingEventTriggered = false;
|
|
6860
|
+
if (this.editSettings.mode === 'Batch') {
|
|
6861
|
+
const obj = 'dialogObj';
|
|
6862
|
+
const showDialog = 'showDialog';
|
|
6863
|
+
if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
|
|
6864
|
+
this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
|
|
6865
|
+
const dialogObj = this.grid.editModule[`${obj}`];
|
|
6866
|
+
this.grid.editModule[`${showDialog}`]('CancelEdit', dialogObj);
|
|
6867
|
+
return;
|
|
6868
|
+
}
|
|
6869
|
+
}
|
|
6698
6870
|
this.expandCollapseAll('expand');
|
|
6699
6871
|
}
|
|
6700
6872
|
/**
|
|
6701
|
-
* Collapses
|
|
6873
|
+
* Collapses all rows in the TreeGrid, hiding all child rows and leaving only parent nodes visible.
|
|
6874
|
+
*
|
|
6875
|
+
* This method can be used to quickly minimize the view to only top-level data,
|
|
6876
|
+
* which is helpful for summarizing or performing broad overviews of the dataset.
|
|
6702
6877
|
*
|
|
6703
6878
|
* @returns {void}
|
|
6704
6879
|
*/
|
|
@@ -6709,6 +6884,16 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6709
6884
|
}
|
|
6710
6885
|
this.isCollapsedEventTriggered = false;
|
|
6711
6886
|
this.isCollapsingEventTriggered = false;
|
|
6887
|
+
if (this.editSettings.mode === 'Batch') {
|
|
6888
|
+
const obj = 'dialogObj';
|
|
6889
|
+
const showDialog = 'showDialog';
|
|
6890
|
+
if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
|
|
6891
|
+
this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
|
|
6892
|
+
const dialogObj = this.grid.editModule[`${obj}`];
|
|
6893
|
+
this.grid.editModule[`${showDialog}`]('CancelEdit', dialogObj);
|
|
6894
|
+
return;
|
|
6895
|
+
}
|
|
6896
|
+
}
|
|
6712
6897
|
this.expandCollapseAll('collapse');
|
|
6713
6898
|
}
|
|
6714
6899
|
expandCollapseAll(action) {
|
|
@@ -6728,7 +6913,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6728
6913
|
}
|
|
6729
6914
|
this.isExpandAll = true;
|
|
6730
6915
|
this.isCollapseAll = true;
|
|
6731
|
-
if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
|
|
6916
|
+
if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
|
|
6732
6917
|
this.flatData.filter((e) => {
|
|
6733
6918
|
if (e.hasChildRecords) {
|
|
6734
6919
|
e.expanded = action === 'collapse' ? false : true;
|
|
@@ -6791,12 +6976,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6791
6976
|
row = gridRows[parseInt(rowIndex.toString(), 10)];
|
|
6792
6977
|
}
|
|
6793
6978
|
else {
|
|
6794
|
-
rowIndex = +row.getAttribute('
|
|
6979
|
+
rowIndex = +row.getAttribute('aria-rowindex') - 1;
|
|
6795
6980
|
}
|
|
6796
6981
|
if (!isNullOrUndefined(row)) {
|
|
6797
6982
|
row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
|
|
6798
6983
|
}
|
|
6799
|
-
if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)
|
|
6984
|
+
if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization) && !isRemoteData(this)
|
|
6800
6985
|
&& !isCountRequired(this)) {
|
|
6801
6986
|
this.notify(localPagedExpandCollapse, { action: action, row: row, record: record });
|
|
6802
6987
|
}
|
|
@@ -6806,6 +6991,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6806
6991
|
displayAction = 'e-childrow-visible';
|
|
6807
6992
|
if (!isChild) {
|
|
6808
6993
|
record.expanded = true;
|
|
6994
|
+
this.flatData.forEach(function (e) {
|
|
6995
|
+
e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
|
|
6996
|
+
});
|
|
6809
6997
|
this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
|
|
6810
6998
|
}
|
|
6811
6999
|
if (!isNullOrUndefined(row)) {
|
|
@@ -6827,6 +7015,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6827
7015
|
displayAction = 'e-childrow-hidden';
|
|
6828
7016
|
if (!isChild || isCountRequired(this)) {
|
|
6829
7017
|
record.expanded = false;
|
|
7018
|
+
this.flatData.forEach(function (e) {
|
|
7019
|
+
e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
|
|
7020
|
+
});
|
|
6830
7021
|
this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
|
|
6831
7022
|
}
|
|
6832
7023
|
if (!isNullOrUndefined(row)) {
|
|
@@ -7056,7 +7247,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7056
7247
|
}
|
|
7057
7248
|
if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
7058
7249
|
|| this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
7059
|
-
gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex]
|
|
7250
|
+
if (!isNullOrUndefined(gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex])) {
|
|
7251
|
+
gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'e-childrow-hidden' ? true : false;
|
|
7252
|
+
}
|
|
7060
7253
|
const parentRecord = currentViewData.filter((e) => {
|
|
7061
7254
|
return e.uniqueID === currentRecord[0].parentUniqueID;
|
|
7062
7255
|
});
|
|
@@ -7198,28 +7391,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7198
7391
|
}
|
|
7199
7392
|
return value;
|
|
7200
7393
|
}
|
|
7201
|
-
/**
|
|
7202
|
-
* Updates the rows and cells
|
|
7203
|
-
*
|
|
7204
|
-
* @param {Object[]} records - Updates the given records
|
|
7205
|
-
* @param {HTMLTableRowElement[]} rows - Updates the given rows
|
|
7206
|
-
* @param {number} index - Updates the given cell index
|
|
7207
|
-
* @returns {void}
|
|
7208
|
-
*/
|
|
7209
|
-
updateRowAndCellElements(records, rows, index) {
|
|
7210
|
-
for (let i = 0; i < records.length; i++) {
|
|
7211
|
-
this.renderModule.cellRender({
|
|
7212
|
-
data: records[parseInt(i.toString(), 10)], cell: rows[parseInt(i.toString(), 10)].cells[parseInt(index.toString(), 10)],
|
|
7213
|
-
column: this.grid.getColumns()[this.treeColumnIndex],
|
|
7214
|
-
requestType: 'rowDragAndDrop'
|
|
7215
|
-
});
|
|
7216
|
-
if (this['action'] === 'indenting' || this['action'] === 'outdenting') {
|
|
7217
|
-
this.renderModule.RowModifier({
|
|
7218
|
-
data: records[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)]
|
|
7219
|
-
});
|
|
7220
|
-
}
|
|
7221
|
-
}
|
|
7222
|
-
}
|
|
7223
7394
|
/**
|
|
7224
7395
|
* @hidden
|
|
7225
7396
|
* @returns {void}
|
|
@@ -7227,6 +7398,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7227
7398
|
addListener() {
|
|
7228
7399
|
this.on('updateResults', this.updateResultModel, this);
|
|
7229
7400
|
this.grid.on('initial-end', this.afterGridRender, this);
|
|
7401
|
+
this.grid.on('last-rowcell-border-updated', this.lastRowCellBorderUpdated, this);
|
|
7230
7402
|
}
|
|
7231
7403
|
updateResultModel(returnResult) {
|
|
7232
7404
|
this.dataResults = returnResult;
|
|
@@ -7241,27 +7413,31 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7241
7413
|
}
|
|
7242
7414
|
this.off('updateResults', this.updateResultModel);
|
|
7243
7415
|
this.grid.off('initial-end', this.afterGridRender);
|
|
7416
|
+
this.grid.off('last-rowcell-border-updated', this.lastRowCellBorderUpdated);
|
|
7244
7417
|
}
|
|
7245
7418
|
/**
|
|
7246
|
-
* Filters TreeGrid
|
|
7419
|
+
* Filters the TreeGrid rows based on a specified column and filter criteria.
|
|
7247
7420
|
*
|
|
7248
|
-
*
|
|
7249
|
-
*
|
|
7250
|
-
*
|
|
7251
|
-
* @param
|
|
7252
|
-
* @param
|
|
7253
|
-
*
|
|
7254
|
-
* @param
|
|
7255
|
-
*
|
|
7256
|
-
* @param
|
|
7257
|
-
* @param
|
|
7421
|
+
* This method allows for dynamic filtering against column data using various
|
|
7422
|
+
* operators and values, supporting case-sensitive filtering and accent sensitivity.
|
|
7423
|
+
*
|
|
7424
|
+
* @param {string} fieldName - The name of the column to apply the filter on.
|
|
7425
|
+
* @param {string} filterOperator - The operator used to perform the filter (e.g., 'equals', 'startswith').
|
|
7426
|
+
* @param {string | number | Date | boolean } filterValue - The value to filter against.
|
|
7427
|
+
* @param {string} predicate - The logical operator ('AND'/'OR') to combine this filter with others.
|
|
7428
|
+
* @param {boolean} matchCase - If true, the filter performs a case-sensitive match.
|
|
7429
|
+
* @param {boolean} ignoreAccent - If true, the filter ignores diacritical marks.
|
|
7430
|
+
* @param {string} actualFilterValue - The original value used for filtering, useful for distinguishing displayed and actual values.
|
|
7431
|
+
* @param {string} actualOperator - The actual operator that is applied when different from the displayed operator.
|
|
7258
7432
|
* @returns {void}
|
|
7259
7433
|
*/
|
|
7260
7434
|
filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
|
|
7261
7435
|
this.grid.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
|
|
7262
7436
|
}
|
|
7263
7437
|
/**
|
|
7264
|
-
* Clears all the
|
|
7438
|
+
* Clears all filters applied to the TreeGrid, restoring the view to show all records.
|
|
7439
|
+
*
|
|
7440
|
+
* This method is useful for resetting the grid to its unfiltered state.
|
|
7265
7441
|
*
|
|
7266
7442
|
* @returns {void}
|
|
7267
7443
|
*/
|
|
@@ -7280,26 +7456,32 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7280
7456
|
this.grid.removeFilteredColsByField(field, isClearFilterBar);
|
|
7281
7457
|
}
|
|
7282
7458
|
/**
|
|
7283
|
-
* Selects a row by
|
|
7459
|
+
* Selects a row in the TreeGrid by its index.
|
|
7284
7460
|
*
|
|
7285
|
-
*
|
|
7286
|
-
*
|
|
7461
|
+
* Use this method to highlight a specific row; useful for programmatically navigating data.
|
|
7462
|
+
*
|
|
7463
|
+
* @param {number} index - Index of the row to select.
|
|
7464
|
+
* @param {boolean} isToggle - If true, toggles the selection state of the row.
|
|
7287
7465
|
* @returns {void}
|
|
7288
7466
|
*/
|
|
7289
7467
|
selectRow(index, isToggle) {
|
|
7290
7468
|
this.grid.selectRow(index, isToggle);
|
|
7291
7469
|
}
|
|
7292
7470
|
/**
|
|
7293
|
-
* Selects
|
|
7471
|
+
* Selects multiple rows in the TreeGrid given an array of row indexes.
|
|
7472
|
+
*
|
|
7473
|
+
* Useful for batch operations where multiple row selections are necessary.
|
|
7294
7474
|
*
|
|
7295
|
-
* @param
|
|
7475
|
+
* @param {number[]} rowIndexes - Array of row index numbers to select.
|
|
7296
7476
|
* @returns {void}
|
|
7297
7477
|
*/
|
|
7298
7478
|
selectRows(rowIndexes) {
|
|
7299
7479
|
this.grid.selectRows(rowIndexes);
|
|
7300
7480
|
}
|
|
7301
7481
|
/**
|
|
7302
|
-
* Deselects
|
|
7482
|
+
* Deselects all selected rows and cells within the TreeGrid.
|
|
7483
|
+
*
|
|
7484
|
+
* Resets the selection state of the grid, which is useful after bulk operations.
|
|
7303
7485
|
*
|
|
7304
7486
|
* @returns {void}
|
|
7305
7487
|
*/
|
|
@@ -7310,39 +7492,47 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7310
7492
|
this.grid.clearSelection();
|
|
7311
7493
|
}
|
|
7312
7494
|
/**
|
|
7313
|
-
*
|
|
7495
|
+
* Copies the data of selected rows or cells to the clipboard.
|
|
7496
|
+
*
|
|
7497
|
+
* This method supports including headers for better context when pasting elsewhere.
|
|
7314
7498
|
*
|
|
7315
|
-
* @param {boolean} withHeader -
|
|
7499
|
+
* @param {boolean} withHeader - (Optional) If true, includes column headers in the copied data.
|
|
7316
7500
|
* @returns {void}
|
|
7317
7501
|
*/
|
|
7318
7502
|
copy(withHeader) {
|
|
7319
7503
|
this.clipboardModule.copy(withHeader);
|
|
7320
7504
|
}
|
|
7321
7505
|
/**
|
|
7322
|
-
*
|
|
7506
|
+
* Pastes data into the selected cells from the clipboard.
|
|
7323
7507
|
*
|
|
7324
|
-
*
|
|
7325
|
-
*
|
|
7326
|
-
* @param {
|
|
7508
|
+
* Automatically places the pasted data starting from the specified indices.
|
|
7509
|
+
*
|
|
7510
|
+
* @param {string} data - The clipboard data to paste.
|
|
7511
|
+
* @param {number} rowIndex - The starting row index for pasting.
|
|
7512
|
+
* @param {number} colIndex - The starting column index for pasting.
|
|
7327
7513
|
* @returns {void}
|
|
7328
7514
|
*/
|
|
7329
7515
|
paste(data, rowIndex, colIndex) {
|
|
7330
7516
|
this.clipboardModule.paste(data, rowIndex, colIndex);
|
|
7331
7517
|
}
|
|
7332
7518
|
/**
|
|
7333
|
-
* Selects a cell by the
|
|
7519
|
+
* Selects a cell by its index position in the TreeGrid.
|
|
7520
|
+
*
|
|
7521
|
+
* Useful for navigating or highlighting specific data cells within the grid.
|
|
7334
7522
|
*
|
|
7335
|
-
* @param
|
|
7336
|
-
* @param
|
|
7523
|
+
* @param {IIndex} cellIndex - An object specifying the row and column indexes.
|
|
7524
|
+
* @param {boolean} isToggle - (Optional) If true, toggles the selection state of the cell.
|
|
7337
7525
|
* @returns {void}
|
|
7338
7526
|
*/
|
|
7339
7527
|
selectCell(cellIndex, isToggle) {
|
|
7340
7528
|
this.grid.selectCell(cellIndex, isToggle);
|
|
7341
7529
|
}
|
|
7342
7530
|
/**
|
|
7343
|
-
*
|
|
7531
|
+
* Retrieves the currently selected rows.
|
|
7344
7532
|
*
|
|
7345
|
-
*
|
|
7533
|
+
* Useful for obtaining the selected data elements for downstream processing.
|
|
7534
|
+
*
|
|
7535
|
+
* @returns {Element[]} - An array of Element objects representing the selected rows.
|
|
7346
7536
|
*/
|
|
7347
7537
|
getSelectedRows() {
|
|
7348
7538
|
return this.grid.getSelectedRows();
|
|
@@ -7554,44 +7744,59 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7554
7744
|
return cnt;
|
|
7555
7745
|
}
|
|
7556
7746
|
/**
|
|
7557
|
-
*
|
|
7747
|
+
* Retrieves the indexes of the currently selected rows in the TreeGrid.
|
|
7748
|
+
*
|
|
7749
|
+
* This method is useful when you need to perform actions based on the selected rows,
|
|
7750
|
+
* such as retrieving data or changing the selection.
|
|
7558
7751
|
*
|
|
7559
|
-
* @returns {number[]} -
|
|
7752
|
+
* @returns {number[]} - An array of numbers representing the indexes of selected rows.
|
|
7560
7753
|
*/
|
|
7561
7754
|
getSelectedRowIndexes() {
|
|
7562
7755
|
return this.grid.getSelectedRowIndexes();
|
|
7563
7756
|
}
|
|
7564
7757
|
/**
|
|
7565
|
-
*
|
|
7758
|
+
* Retrieves the indexes of the selected cells within the selected rows.
|
|
7759
|
+
*
|
|
7760
|
+
* This can be useful for handling cell-specific operations, such as
|
|
7761
|
+
* applying styles or editing values programmatically.
|
|
7566
7762
|
*
|
|
7567
|
-
* @returns {ISelectedCell[]} -
|
|
7763
|
+
* @returns {ISelectedCell[]} - An array of objects representing the selected cells' indexes.
|
|
7568
7764
|
*/
|
|
7569
7765
|
getSelectedRowCellIndexes() {
|
|
7570
7766
|
return this.grid.getSelectedRowCellIndexes();
|
|
7571
7767
|
}
|
|
7572
7768
|
/**
|
|
7573
|
-
*
|
|
7769
|
+
* Retrieves the data records corresponding to the currently selected rows.
|
|
7770
|
+
*
|
|
7771
|
+
* This method provides the full record data for the selected rows,
|
|
7772
|
+
* which is useful for data manipulation or extraction operations.
|
|
7574
7773
|
*
|
|
7575
7774
|
* @isGenericType true
|
|
7576
|
-
* @returns {Object[]} -
|
|
7775
|
+
* @returns {Object[]} - An array of data objects representing the selected records.
|
|
7577
7776
|
*/
|
|
7578
7777
|
getSelectedRecords() {
|
|
7579
7778
|
return this.grid.getSelectedRecords();
|
|
7580
7779
|
}
|
|
7581
7780
|
/**
|
|
7582
|
-
*
|
|
7781
|
+
* Obtains the data handling modules used by the TreeGrid.
|
|
7782
|
+
*
|
|
7783
|
+
* This includes both the base data module for standard grid operations and the tree module
|
|
7784
|
+
* for handling hierarchical data, giving complete access to data management capabilities.
|
|
7583
7785
|
*
|
|
7584
|
-
* @returns {{baseModule: Data, treeModule: DataManipulation}}
|
|
7786
|
+
* @returns {{baseModule: Data, treeModule: DataManipulation}} - An object containing both grid and tree data modules.
|
|
7585
7787
|
*/
|
|
7586
7788
|
getDataModule() {
|
|
7587
7789
|
return { baseModule: this.grid.getDataModule(), treeModule: this.dataModule };
|
|
7588
7790
|
}
|
|
7589
7791
|
/**
|
|
7590
|
-
*
|
|
7792
|
+
* Reorders rows in the TreeGrid based on specified source indexes and a target position.
|
|
7793
|
+
*
|
|
7794
|
+
* This functionality allows for dynamic rearrangement of rows, such as moving selected
|
|
7795
|
+
* rows to a new position as siblings or children.
|
|
7591
7796
|
*
|
|
7592
|
-
* @param {number[]} fromIndexes -
|
|
7593
|
-
* @param {number} toIndex -
|
|
7594
|
-
* @param {string} position -
|
|
7797
|
+
* @param {number[]} fromIndexes - An array indicating the source indexes of the rows to be moved.
|
|
7798
|
+
* @param {number} toIndex - The target index where the rows should be moved.
|
|
7799
|
+
* @param {string} position - The position relative to the target index ('above', 'below', 'child').
|
|
7595
7800
|
* @returns {void}
|
|
7596
7801
|
*/
|
|
7597
7802
|
reorderRows(fromIndexes, toIndex, position) {
|
|
@@ -7600,9 +7805,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7600
7805
|
}
|
|
7601
7806
|
}
|
|
7602
7807
|
/**
|
|
7603
|
-
* Indents
|
|
7808
|
+
* Indents a specified record, promoting it to one level deeper in the hierarchy.
|
|
7604
7809
|
*
|
|
7605
|
-
*
|
|
7810
|
+
* This function moves the selected row to become the last child of its preceding row,
|
|
7811
|
+
* altering the visual and hierarchical data structure.
|
|
7812
|
+
*
|
|
7813
|
+
* @param {Object} record - (Optional) The record to be indented. If omitted, the currently selected row is used.
|
|
7606
7814
|
* @returns {void}
|
|
7607
7815
|
*/
|
|
7608
7816
|
indent(record) {
|
|
@@ -7612,9 +7820,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
7612
7820
|
}
|
|
7613
7821
|
}
|
|
7614
7822
|
/**
|
|
7615
|
-
*
|
|
7823
|
+
* Outdents a specified record, moving it one level up in the hierarchy.
|
|
7824
|
+
*
|
|
7825
|
+
* This method repositions the selected row to be a sibling of its parent, impacting
|
|
7826
|
+
* its display and the hierarchical relationships within the TreeGrid.
|
|
7616
7827
|
*
|
|
7617
|
-
* @param {Object} record
|
|
7828
|
+
* @param {Object} record - (Optional) The record to be outdented. If omitted, the currently selected row is used.
|
|
7618
7829
|
* @returns {void}
|
|
7619
7830
|
*/
|
|
7620
7831
|
outdent(record) {
|
|
@@ -7810,6 +8021,21 @@ __decorate$b([
|
|
|
7810
8021
|
__decorate$b([
|
|
7811
8022
|
Property('All')
|
|
7812
8023
|
], TreeGrid.prototype, "columnQueryMode", void 0);
|
|
8024
|
+
__decorate$b([
|
|
8025
|
+
Property(true)
|
|
8026
|
+
], TreeGrid.prototype, "allowSelection", void 0);
|
|
8027
|
+
__decorate$b([
|
|
8028
|
+
Property(-1)
|
|
8029
|
+
], TreeGrid.prototype, "selectedRowIndex", void 0);
|
|
8030
|
+
__decorate$b([
|
|
8031
|
+
Complex({}, SelectionSettings)
|
|
8032
|
+
], TreeGrid.prototype, "selectionSettings", void 0);
|
|
8033
|
+
__decorate$b([
|
|
8034
|
+
Property(false)
|
|
8035
|
+
], TreeGrid.prototype, "allowExcelExport", void 0);
|
|
8036
|
+
__decorate$b([
|
|
8037
|
+
Property(false)
|
|
8038
|
+
], TreeGrid.prototype, "allowPdfExport", void 0);
|
|
7813
8039
|
__decorate$b([
|
|
7814
8040
|
Event()
|
|
7815
8041
|
], TreeGrid.prototype, "created", void 0);
|
|
@@ -7888,9 +8114,6 @@ __decorate$b([
|
|
|
7888
8114
|
__decorate$b([
|
|
7889
8115
|
Event()
|
|
7890
8116
|
], TreeGrid.prototype, "queryCellInfo", void 0);
|
|
7891
|
-
__decorate$b([
|
|
7892
|
-
Property(true)
|
|
7893
|
-
], TreeGrid.prototype, "allowSelection", void 0);
|
|
7894
8117
|
__decorate$b([
|
|
7895
8118
|
Event()
|
|
7896
8119
|
], TreeGrid.prototype, "rowSelecting", void 0);
|
|
@@ -7981,18 +8204,6 @@ __decorate$b([
|
|
|
7981
8204
|
__decorate$b([
|
|
7982
8205
|
Event()
|
|
7983
8206
|
], TreeGrid.prototype, "rowDrop", void 0);
|
|
7984
|
-
__decorate$b([
|
|
7985
|
-
Property(-1)
|
|
7986
|
-
], TreeGrid.prototype, "selectedRowIndex", void 0);
|
|
7987
|
-
__decorate$b([
|
|
7988
|
-
Complex({}, SelectionSettings)
|
|
7989
|
-
], TreeGrid.prototype, "selectionSettings", void 0);
|
|
7990
|
-
__decorate$b([
|
|
7991
|
-
Property(false)
|
|
7992
|
-
], TreeGrid.prototype, "allowExcelExport", void 0);
|
|
7993
|
-
__decorate$b([
|
|
7994
|
-
Property(false)
|
|
7995
|
-
], TreeGrid.prototype, "allowPdfExport", void 0);
|
|
7996
8207
|
__decorate$b([
|
|
7997
8208
|
Event()
|
|
7998
8209
|
], TreeGrid.prototype, "pdfQueryCellInfo", void 0);
|
|
@@ -8208,7 +8419,6 @@ class RowDD {
|
|
|
8208
8419
|
}
|
|
8209
8420
|
const action = 'action';
|
|
8210
8421
|
const dropPosition = 'dropPosition';
|
|
8211
|
-
const updateRowAndCellElements = 'updateRowAndCellElements';
|
|
8212
8422
|
if (fromIndexes[0] !== toIndex && ['above', 'below', 'child'].indexOf(position) !== -1) {
|
|
8213
8423
|
if (position === 'above') {
|
|
8214
8424
|
this.dropPosition = 'topSegment';
|
|
@@ -8258,7 +8468,7 @@ class RowDD {
|
|
|
8258
8468
|
const parentrow = this.parent.getRows()[parseInt(toIndex.toString(), 10)];
|
|
8259
8469
|
totalRecord.push(parentData);
|
|
8260
8470
|
rows.push(parentrow);
|
|
8261
|
-
this.
|
|
8471
|
+
this.updateRowAndCellElements(totalRecord, rows, index);
|
|
8262
8472
|
}
|
|
8263
8473
|
if (this.parent.enableImmutableMode && this.parent[`${action}`] === 'outdenting') {
|
|
8264
8474
|
const index = this.parent.allowRowDragAndDrop
|
|
@@ -8270,7 +8480,29 @@ class RowDD {
|
|
|
8270
8480
|
const rows = [];
|
|
8271
8481
|
totalRecord.push(record);
|
|
8272
8482
|
rows.push(row);
|
|
8273
|
-
this.
|
|
8483
|
+
this.updateRowAndCellElements(totalRecord, rows, index);
|
|
8484
|
+
}
|
|
8485
|
+
}
|
|
8486
|
+
}
|
|
8487
|
+
/**
|
|
8488
|
+
* Updates the rows and cells
|
|
8489
|
+
*
|
|
8490
|
+
* @param {Object[]} records - Updates the given records
|
|
8491
|
+
* @param {HTMLTableRowElement[]} rows - Updates the given rows
|
|
8492
|
+
* @param {number} index - Updates the given cell index
|
|
8493
|
+
* @returns {void}
|
|
8494
|
+
*/
|
|
8495
|
+
updateRowAndCellElements(records, rows, index) {
|
|
8496
|
+
for (let i = 0; i < records.length; i++) {
|
|
8497
|
+
this.parent.renderModule.cellRender({
|
|
8498
|
+
data: records[parseInt(i.toString(), 10)], cell: rows[parseInt(i.toString(), 10)].cells[parseInt(index.toString(), 10)],
|
|
8499
|
+
column: this.parent.grid.getColumns()[this.parent.treeColumnIndex],
|
|
8500
|
+
requestType: 'rowDragAndDrop'
|
|
8501
|
+
});
|
|
8502
|
+
if (this.parent['action'] === 'indenting' || this.parent['action'] === 'outdenting') {
|
|
8503
|
+
this.parent.renderModule.RowModifier({
|
|
8504
|
+
data: records[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)]
|
|
8505
|
+
});
|
|
8274
8506
|
}
|
|
8275
8507
|
}
|
|
8276
8508
|
}
|
|
@@ -8319,7 +8551,7 @@ class RowDD {
|
|
|
8319
8551
|
record.parentItem.taskData) {
|
|
8320
8552
|
dropIndex = i;
|
|
8321
8553
|
if (tObj.enableVirtualization) {
|
|
8322
|
-
dropIndex = parseInt(tObj.getRows()[parseInt(i.toString(), 10)].getAttribute('
|
|
8554
|
+
dropIndex = parseInt(tObj.getRows()[parseInt(i.toString(), 10)].getAttribute('aria-rowindex'), 10) - 1;
|
|
8323
8555
|
}
|
|
8324
8556
|
}
|
|
8325
8557
|
}
|
|
@@ -8328,26 +8560,27 @@ class RowDD {
|
|
|
8328
8560
|
dropIndex = this.selectedRow.rowIndex - 1;
|
|
8329
8561
|
}
|
|
8330
8562
|
if (this.parent.enableVirtualization && this.selectedRecord && !(record.level > this.selectedRecord.level)) {
|
|
8331
|
-
dropIndex = parseInt(this.selectedRow.getAttribute('
|
|
8563
|
+
dropIndex = parseInt(this.selectedRow.getAttribute('aria-rowindex'), 10) - 2;
|
|
8332
8564
|
}
|
|
8333
8565
|
tObj[`${action}`] = 'indenting';
|
|
8334
8566
|
tObj[`${droppedIndex}`] = dropIndex;
|
|
8335
8567
|
this.eventTrigger('indenting', dropIndex);
|
|
8336
8568
|
}
|
|
8337
8569
|
else if (request === 'outdent') {
|
|
8338
|
-
|
|
8339
|
-
|
|
8570
|
+
const isInvalidSelection = this.selectedRow.rowIndex === -1 || this.selectedRow.rowIndex === 0;
|
|
8571
|
+
const isRootLevel = tObj.getCurrentViewRecords()[this.selectedRow.rowIndex].level === 0;
|
|
8572
|
+
if (isInvalidSelection || isRootLevel) {
|
|
8340
8573
|
return;
|
|
8341
8574
|
}
|
|
8342
|
-
let dropIndex;
|
|
8343
8575
|
const parentItem = this.selectedRecord.parentItem;
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8576
|
+
const records = tObj.getCurrentViewRecords();
|
|
8577
|
+
let dropIndex = records.findIndex((record) => record.uniqueID === parentItem.uniqueID);
|
|
8578
|
+
if (dropIndex === -1) {
|
|
8579
|
+
return;
|
|
8348
8580
|
}
|
|
8349
8581
|
if (this.parent.enableVirtualization && this.selectedRecord) {
|
|
8350
|
-
|
|
8582
|
+
const ariaRowIndex = this.parent.getRows()[parseInt(dropIndex.toString(), 10)].getAttribute('aria-rowindex');
|
|
8583
|
+
dropIndex = parseInt(ariaRowIndex, 10) - 1;
|
|
8351
8584
|
}
|
|
8352
8585
|
tObj[`${action}`] = 'outdenting';
|
|
8353
8586
|
tObj[`${droppedIndex}`] = dropIndex;
|
|
@@ -8373,7 +8606,7 @@ class RowDD {
|
|
|
8373
8606
|
if (!actionArgs.cancel) {
|
|
8374
8607
|
if (actionArgs.action === 'indenting') {
|
|
8375
8608
|
if (this.parent.enableVirtualization) {
|
|
8376
|
-
this.reorderRows([parseInt(this.selectedRow.getAttribute('
|
|
8609
|
+
this.reorderRows([parseInt(this.selectedRow.getAttribute('aria-rowindex'), 10) - 1], dropIndex, 'child');
|
|
8377
8610
|
}
|
|
8378
8611
|
else {
|
|
8379
8612
|
this.reorderRows([this.selectedRow.rowIndex], dropIndex, 'child');
|
|
@@ -8381,7 +8614,7 @@ class RowDD {
|
|
|
8381
8614
|
}
|
|
8382
8615
|
else if (actionArgs.action === 'outdenting') {
|
|
8383
8616
|
if (this.parent.enableVirtualization) {
|
|
8384
|
-
this.reorderRows([parseInt(this.selectedRow.getAttribute('
|
|
8617
|
+
this.reorderRows([parseInt(this.selectedRow.getAttribute('aria-rowindex'), 10) - 1], dropIndex, 'below');
|
|
8385
8618
|
}
|
|
8386
8619
|
else {
|
|
8387
8620
|
this.reorderRows([this.selectedRow.rowIndex], dropIndex, 'below');
|
|
@@ -8684,7 +8917,8 @@ class RowDD {
|
|
|
8684
8917
|
else {
|
|
8685
8918
|
rowTop = rowPositionHeight + contentHeight + roundOff;
|
|
8686
8919
|
}
|
|
8687
|
-
const rowBottom =
|
|
8920
|
+
const rowBottom = row[0].offsetHeight !== 0 && isNullOrUndefined(rowEle) ?
|
|
8921
|
+
rowTop + row[0].offsetHeight : rowTop + rowEle.offsetHeight;
|
|
8688
8922
|
const difference = rowBottom - rowTop;
|
|
8689
8923
|
const divide = difference / 3;
|
|
8690
8924
|
const topRowSegment = rowTop + divide;
|
|
@@ -8701,6 +8935,7 @@ class RowDD {
|
|
|
8701
8935
|
const isTopSegment = posy <= topRowSegment;
|
|
8702
8936
|
const isMiddleRowSegment = (posy > topRowSegment && posy <= middleRowSegment);
|
|
8703
8937
|
const isBottomRowSegment = (posy > middleRowSegment && posy <= bottomRowSegment);
|
|
8938
|
+
let isBorderNeed = true;
|
|
8704
8939
|
if (isTopSegment || isMiddleRowSegment || isBottomRowSegment) {
|
|
8705
8940
|
if (isTopSegment && this.dropPosition !== 'Invalid') {
|
|
8706
8941
|
this.removeChildBorder();
|
|
@@ -8709,19 +8944,12 @@ class RowDD {
|
|
|
8709
8944
|
this.addFirstrowBorder(rowEle);
|
|
8710
8945
|
this.removeErrorElem();
|
|
8711
8946
|
this.removeLastrowBorder(rowEle);
|
|
8712
|
-
this.topOrBottomBorder(args.target);
|
|
8713
8947
|
}
|
|
8714
8948
|
if (isMiddleRowSegment && this.dropPosition !== 'Invalid') {
|
|
8715
8949
|
this.removetopOrBottomBorder();
|
|
8716
|
-
|
|
8717
|
-
const element = closest(args.target, 'tr');
|
|
8718
|
-
rowElement = [].slice.call(element.querySelectorAll('.e-rowcell,.e-rowdragdrop,.e-detailrowcollapse'));
|
|
8719
|
-
if (rowElement.length > 0) {
|
|
8720
|
-
this.addRemoveClasses(rowElement, true, 'e-childborder');
|
|
8721
|
-
}
|
|
8950
|
+
this.dropPosition = 'middleSegment';
|
|
8722
8951
|
this.addLastRowborder(rowEle);
|
|
8723
8952
|
this.addFirstrowBorder(rowEle);
|
|
8724
|
-
this.dropPosition = 'middleSegment';
|
|
8725
8953
|
}
|
|
8726
8954
|
if (isBottomRowSegment && this.dropPosition !== 'Invalid') {
|
|
8727
8955
|
this.removeErrorElem();
|
|
@@ -8730,11 +8958,164 @@ class RowDD {
|
|
|
8730
8958
|
this.dropPosition = 'bottomSegment';
|
|
8731
8959
|
this.addLastRowborder(rowEle);
|
|
8732
8960
|
this.removeFirstrowBorder(rowEle);
|
|
8733
|
-
|
|
8961
|
+
}
|
|
8962
|
+
if ((isTopSegment || isBottomRowSegment) && this.dropPosition !== 'Invalid') {
|
|
8963
|
+
isBorderNeed = this.updateBorderStatus(row, index);
|
|
8964
|
+
this.topOrBottomBorder(args.target, isBorderNeed);
|
|
8965
|
+
}
|
|
8966
|
+
else if (isMiddleRowSegment && this.dropPosition !== 'Invalid') {
|
|
8967
|
+
let rowElement = [];
|
|
8968
|
+
const element = closest(args.target, 'tr');
|
|
8969
|
+
rowElement = [].slice.call(element.querySelectorAll('.e-rowcell,.e-rowdragdrop,.e-detailrowcollapse'));
|
|
8970
|
+
isBorderNeed = this.updateBorderStatus(row, index);
|
|
8971
|
+
if (rowElement.length > 0 && isBorderNeed) {
|
|
8972
|
+
this.addRemoveClasses(rowElement, true, 'e-childborder');
|
|
8973
|
+
}
|
|
8734
8974
|
}
|
|
8735
8975
|
}
|
|
8736
8976
|
return this.dropPosition;
|
|
8737
8977
|
}
|
|
8978
|
+
/**
|
|
8979
|
+
* Updates the border status for a specified row and index.
|
|
8980
|
+
*
|
|
8981
|
+
* @private
|
|
8982
|
+
* @param {Element[]} row - The array of row elements to be updated.
|
|
8983
|
+
* @param {number} index - The index of the row element for which the border status is to be updated.
|
|
8984
|
+
* @returns {boolean} - Returns true if the border status was successfully updated, otherwise false.
|
|
8985
|
+
*/
|
|
8986
|
+
updateBorderStatus(row, index) {
|
|
8987
|
+
let isBorderNeed = true;
|
|
8988
|
+
let rows = this.parent.grid.getRows();
|
|
8989
|
+
const childRows = [];
|
|
8990
|
+
let hasDetailTemplate = false;
|
|
8991
|
+
if (!isNullOrUndefined(this.parent.detailTemplate)) {
|
|
8992
|
+
rows = this.parent.getDataRows();
|
|
8993
|
+
hasDetailTemplate = true;
|
|
8994
|
+
}
|
|
8995
|
+
const treegridColumnIndex = this.parent.treeColumnIndex;
|
|
8996
|
+
let treeColIndex = this.parent.allowRowDragAndDrop ?
|
|
8997
|
+
(hasDetailTemplate ? treegridColumnIndex + 2 : treegridColumnIndex + 1) :
|
|
8998
|
+
(hasDetailTemplate ? treegridColumnIndex + 1 : treegridColumnIndex);
|
|
8999
|
+
if (!isNullOrUndefined(this.parent.rowDropSettings.targetID)) {
|
|
9000
|
+
treeColIndex = treegridColumnIndex;
|
|
9001
|
+
}
|
|
9002
|
+
const dragRows = row;
|
|
9003
|
+
const targetRow = [rows[`${index}`]];
|
|
9004
|
+
if (this.dropPosition === 'topSegment') {
|
|
9005
|
+
row.filter((e) => {
|
|
9006
|
+
if (isNullOrUndefined(e) || isNullOrUndefined(e.cells) || isNullOrUndefined(targetRow[0]) ||
|
|
9007
|
+
isNullOrUndefined(targetRow[0].cells)) {
|
|
9008
|
+
return true;
|
|
9009
|
+
}
|
|
9010
|
+
const regex = /index(\d+)|level(\d+)/g;
|
|
9011
|
+
const parentIndexLevel = e === null || e === undefined ? undefined : e.cells[`${treeColIndex}`].className.match(regex);
|
|
9012
|
+
const dropIndexLevel = targetRow[0].cells[`${treeColIndex}`].className.match(regex);
|
|
9013
|
+
if (isNullOrUndefined(dropIndexLevel) || isNullOrUndefined(dropIndexLevel)) {
|
|
9014
|
+
return true;
|
|
9015
|
+
}
|
|
9016
|
+
const parentLevel = +parentIndexLevel[1].match(/\d+/)[0];
|
|
9017
|
+
const dropParentLevel = +dropIndexLevel[1].match(/\d+/)[0];
|
|
9018
|
+
let InDraggedRowIndex = false;
|
|
9019
|
+
if (parentLevel !== 0 && parentLevel !== dropParentLevel) {
|
|
9020
|
+
return true;
|
|
9021
|
+
}
|
|
9022
|
+
for (let i = 0; i < rows.length; i++) {
|
|
9023
|
+
if (rows[parseInt(i.toString(), 10)] === dragRows[0]) {
|
|
9024
|
+
InDraggedRowIndex = true;
|
|
9025
|
+
}
|
|
9026
|
+
if (InDraggedRowIndex && rows[parseInt(i.toString(), 10)] !== dragRows[0]) {
|
|
9027
|
+
const parentIndexLevelInRow = rows[parseInt(i.toString(), 10)].cells[`${treeColIndex}`].className.match(regex);
|
|
9028
|
+
const parentLevelInRow = +parentIndexLevelInRow[1].match(/\d+/)[0];
|
|
9029
|
+
if (parentLevelInRow !== parentLevel && parentLevelInRow > parentLevel) {
|
|
9030
|
+
childRows.push(rows[parseInt(i.toString(), 10)]);
|
|
9031
|
+
}
|
|
9032
|
+
else {
|
|
9033
|
+
break;
|
|
9034
|
+
}
|
|
9035
|
+
}
|
|
9036
|
+
}
|
|
9037
|
+
if (parentLevel === dropParentLevel && ((childRows.length > 0 && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index - (childRows.length + 1)) || (childRows.length === 0 && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index - 1))) {
|
|
9038
|
+
isBorderNeed = false;
|
|
9039
|
+
}
|
|
9040
|
+
return true;
|
|
9041
|
+
});
|
|
9042
|
+
isBorderNeed = (!isNullOrUndefined(row) && childRows.length === 0 && !isNullOrUndefined(row[0].getAttribute('aria-rowindex')) && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index - 1) && isNullOrUndefined(row[0]) ? false : isBorderNeed;
|
|
9043
|
+
}
|
|
9044
|
+
if (this.dropPosition === 'bottomSegment') {
|
|
9045
|
+
targetRow.filter((e) => {
|
|
9046
|
+
if (isNullOrUndefined(e) || isNullOrUndefined(e.cells) || isNullOrUndefined(dragRows[0]) ||
|
|
9047
|
+
isNullOrUndefined(dragRows[0].cells)) {
|
|
9048
|
+
return true;
|
|
9049
|
+
}
|
|
9050
|
+
const regex = /index(\d+)|level(\d+)/g;
|
|
9051
|
+
const parentIndexLevel = e === null || e === undefined ? undefined : e.cells[`${treeColIndex}`].className.match(regex);
|
|
9052
|
+
const dragIndexLevel = dragRows[0].cells[`${treeColIndex}`].className.match(regex);
|
|
9053
|
+
if (isNullOrUndefined(dragIndexLevel) || isNullOrUndefined(parentIndexLevel)) {
|
|
9054
|
+
return true;
|
|
9055
|
+
}
|
|
9056
|
+
const parentLevel = +parentIndexLevel[1].match(/\d+/)[0];
|
|
9057
|
+
const dragParentLevel = +dragIndexLevel[1].match(/\d+/)[0];
|
|
9058
|
+
let InDraggedRowIndex = false;
|
|
9059
|
+
if (parentLevel !== 0 && parentLevel !== dragParentLevel) {
|
|
9060
|
+
return true;
|
|
9061
|
+
}
|
|
9062
|
+
for (let i = 0; i < rows.length; i++) {
|
|
9063
|
+
if (rows[parseInt(i.toString(), 10)] === targetRow[0]) {
|
|
9064
|
+
InDraggedRowIndex = true;
|
|
9065
|
+
}
|
|
9066
|
+
if (InDraggedRowIndex && rows[parseInt(i.toString(), 10)] !== targetRow[0]) {
|
|
9067
|
+
const parentIndexLevelInRow = rows[parseInt(i.toString(), 10)].cells[`${treeColIndex}`].className.match(regex);
|
|
9068
|
+
const parentLevelInRow = +parentIndexLevelInRow[1].match(/\d+/)[0];
|
|
9069
|
+
if (parentLevelInRow !== parentLevel && parentLevelInRow > parentLevel) {
|
|
9070
|
+
childRows.push(rows[parseInt(i.toString(), 10)]);
|
|
9071
|
+
}
|
|
9072
|
+
else {
|
|
9073
|
+
break;
|
|
9074
|
+
}
|
|
9075
|
+
}
|
|
9076
|
+
}
|
|
9077
|
+
if (!isNullOrUndefined(row) && parentLevel === dragParentLevel && ((childRows.length > 0 && !isNullOrUndefined(row[0].getAttribute('aria-rowindex')) && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index + (childRows.length + 1)) || (childRows.length === 0 && !isNullOrUndefined(row[0].getAttribute('aria-rowindex')) && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index + 1))) {
|
|
9078
|
+
isBorderNeed = false;
|
|
9079
|
+
}
|
|
9080
|
+
return true;
|
|
9081
|
+
});
|
|
9082
|
+
isBorderNeed = (!isNullOrUndefined(row) && childRows.length === 0 && !isNullOrUndefined(row[0].getAttribute('aria-rowindex')) && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index + 1) && isNullOrUndefined(row[0]) ? false : isBorderNeed;
|
|
9083
|
+
}
|
|
9084
|
+
if (this.dropPosition === 'middleSegment') {
|
|
9085
|
+
targetRow.filter((e) => {
|
|
9086
|
+
if (isNullOrUndefined(e) || isNullOrUndefined(e.cells) || isNullOrUndefined(dragRows[0]) ||
|
|
9087
|
+
isNullOrUndefined(dragRows[0].cells)) {
|
|
9088
|
+
return true;
|
|
9089
|
+
}
|
|
9090
|
+
for (let i = 0; i < dragRows.length; i++) {
|
|
9091
|
+
const regex = /index(\d+)|level(\d+)/g;
|
|
9092
|
+
let dropActualIndex = targetRow[0].rowIndex;
|
|
9093
|
+
const dragIndexLevel = dragRows[parseInt(i.toString(), 10)].cells[`${treeColIndex}`].className.match(regex);
|
|
9094
|
+
if (!dragIndexLevel) {
|
|
9095
|
+
return true;
|
|
9096
|
+
}
|
|
9097
|
+
const dragIndex = parseInt(dragIndexLevel.find((item) => item.includes('index')).match(/\d+/)[0] || '0', 10);
|
|
9098
|
+
if (hasDetailTemplate) {
|
|
9099
|
+
dropActualIndex = dropActualIndex / 2;
|
|
9100
|
+
}
|
|
9101
|
+
if (dragIndex === dropActualIndex && !this.parent.rowDropSettings.targetID) {
|
|
9102
|
+
isBorderNeed = false;
|
|
9103
|
+
}
|
|
9104
|
+
else {
|
|
9105
|
+
isBorderNeed = true;
|
|
9106
|
+
break;
|
|
9107
|
+
}
|
|
9108
|
+
}
|
|
9109
|
+
if (!isBorderNeed) {
|
|
9110
|
+
this.dropPosition = 'Invalid';
|
|
9111
|
+
this.addErrorElem();
|
|
9112
|
+
}
|
|
9113
|
+
return isBorderNeed;
|
|
9114
|
+
});
|
|
9115
|
+
}
|
|
9116
|
+
this.canDrop = isBorderNeed;
|
|
9117
|
+
return isBorderNeed;
|
|
9118
|
+
}
|
|
8738
9119
|
/**
|
|
8739
9120
|
* Removes the visual border from all child rows within the TreeGrid.
|
|
8740
9121
|
*
|
|
@@ -8875,23 +9256,27 @@ class RowDD {
|
|
|
8875
9256
|
* Applies drop border styles to row elements based on the current drop position ('topSegment' or 'bottomSegment').
|
|
8876
9257
|
*
|
|
8877
9258
|
* @param {Element} target - The target element where the drop action is taking place.
|
|
9259
|
+
* @param {boolean} [isBorderNeed=true] - Indicates whether a border is needed during the drop action. Defaults to `true`.
|
|
8878
9260
|
* @returns {void} No return value.
|
|
8879
9261
|
*/
|
|
8880
|
-
topOrBottomBorder(target) {
|
|
8881
|
-
let rowElement = [];
|
|
9262
|
+
topOrBottomBorder(target, isBorderNeed = true) {
|
|
8882
9263
|
const element = closest(target, 'tr');
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
9264
|
+
const rowElements = element ?
|
|
9265
|
+
Array.from(element.querySelectorAll('.e-rowcell, .e-rowdragdrop, .e-detailrowcollapse')) : [];
|
|
9266
|
+
if (!rowElements.length) {
|
|
9267
|
+
return;
|
|
9268
|
+
}
|
|
9269
|
+
const classAction = isBorderNeed ? this.addRemoveClasses.bind(this, rowElements, true) : this.addRemoveClasses.bind(this, rowElements, false, 'e-dragborder');
|
|
9270
|
+
if (this.dropPosition === 'topSegment') {
|
|
9271
|
+
classAction('e-droptop');
|
|
9272
|
+
const lastRowDragBorder = this.parent.element.querySelector('.e-lastrow-dragborder');
|
|
9273
|
+
if (lastRowDragBorder) {
|
|
9274
|
+
lastRowDragBorder.remove();
|
|
8893
9275
|
}
|
|
8894
9276
|
}
|
|
9277
|
+
if (this.dropPosition === 'bottomSegment') {
|
|
9278
|
+
classAction('e-dropbottom');
|
|
9279
|
+
}
|
|
8895
9280
|
}
|
|
8896
9281
|
/**
|
|
8897
9282
|
* Removes the drop border classes ('e-dropbottom' and 'e-droptop') from the parent element if present.
|
|
@@ -8956,18 +9341,29 @@ class RowDD {
|
|
|
8956
9341
|
}
|
|
8957
9342
|
cloneElement.style.cursor = '';
|
|
8958
9343
|
const rowEle = args.target ? closest(args.target, 'tr') : null;
|
|
8959
|
-
|
|
9344
|
+
let rowIdx = -1;
|
|
9345
|
+
if (!isNullOrUndefined(this.parent.detailTemplate)) {
|
|
9346
|
+
rowIdx = rowEle ? this.parent.getDataRows().indexOf(rowEle) : -1;
|
|
9347
|
+
}
|
|
9348
|
+
else {
|
|
9349
|
+
rowIdx = rowEle ? rowEle.rowIndex : -1;
|
|
9350
|
+
}
|
|
8960
9351
|
if (rowIdx === -1) {
|
|
8961
9352
|
this.canDrop = false;
|
|
8962
9353
|
this.addErrorElem();
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
this.removeChildBorder();
|
|
8966
|
-
}
|
|
9354
|
+
this.removetopOrBottomBorder();
|
|
9355
|
+
this.removeChildBorder();
|
|
8967
9356
|
return;
|
|
8968
9357
|
}
|
|
8969
9358
|
const dragRecords = Array.isArray(args.data) ? args.data : [args.data];
|
|
8970
|
-
|
|
9359
|
+
let droppedRecord = tObj.getCurrentViewRecords()[parseInt(rowIdx.toString(), 10)];
|
|
9360
|
+
if (tObj.rowDropSettings.targetID) {
|
|
9361
|
+
const dropElement = parentsUntil(args.target, 'e-treegrid');
|
|
9362
|
+
if (dropElement && dropElement.id === this.parent.rowDropSettings.targetID) {
|
|
9363
|
+
const srcControl = dropElement.ej2_instances[0];
|
|
9364
|
+
droppedRecord = srcControl.getCurrentViewRecords()[parseInt(rowIdx.toString(), 10)];
|
|
9365
|
+
}
|
|
9366
|
+
}
|
|
8971
9367
|
this.removeErrorElem();
|
|
8972
9368
|
this.canDrop = true;
|
|
8973
9369
|
this.ensuredropPosition(dragRecords, droppedRecord);
|
|
@@ -8999,13 +9395,13 @@ class RowDD {
|
|
|
8999
9395
|
const parentItem = 'parentItem';
|
|
9000
9396
|
if (!tObj.rowDropSettings.targetID) {
|
|
9001
9397
|
if (parentsUntil(args.target, 'e-content') || (this.dropPosition === 'Invalid' || !this.canDrop)) {
|
|
9002
|
-
if (this.parent.element.querySelector('.e-errorelem')) {
|
|
9398
|
+
if (this.parent.element.querySelector('.e-errorelem') || !this.canDrop) {
|
|
9003
9399
|
this.dropPosition = 'Invalid';
|
|
9004
9400
|
}
|
|
9005
9401
|
setValue('dropPosition', this.dropPosition, args);
|
|
9006
9402
|
tObj.trigger(rowDrop, args);
|
|
9007
9403
|
if (!args.cancel) {
|
|
9008
|
-
if (!isCountRequired(this.parent) && this.dropPosition === 'Invalid') {
|
|
9404
|
+
if (!isCountRequired(this.parent) && (this.dropPosition === 'Invalid' && !this.canDrop)) {
|
|
9009
9405
|
return;
|
|
9010
9406
|
}
|
|
9011
9407
|
if (!isCountRequired(this.parent)) {
|
|
@@ -9022,9 +9418,15 @@ class RowDD {
|
|
|
9022
9418
|
else {
|
|
9023
9419
|
if (args.target && closest(args.target, '#' + tObj.rowDropSettings.targetID) || parentsUntil(args.target, 'e-treegrid') &&
|
|
9024
9420
|
parentsUntil(args.target, 'e-treegrid').id === tObj.rowDropSettings.targetID || args.target && document.getElementById(tObj.rowDropSettings.targetID)) {
|
|
9421
|
+
if (this.parent.element.querySelector('.e-errorelem') || !this.canDrop) {
|
|
9422
|
+
this.dropPosition = 'Invalid';
|
|
9423
|
+
}
|
|
9025
9424
|
setValue('dropPosition', this.dropPosition, args);
|
|
9026
9425
|
tObj.trigger(rowDrop, args);
|
|
9027
9426
|
if (!args.cancel && tObj.rowDropSettings.targetID) {
|
|
9427
|
+
if (this.dropPosition === 'Invalid' && !this.canDrop) {
|
|
9428
|
+
return;
|
|
9429
|
+
}
|
|
9028
9430
|
this.dragDropGrid(args);
|
|
9029
9431
|
if (tObj.isLocalData) {
|
|
9030
9432
|
tObj.flatData = this.orderToIndex(tObj.flatData);
|
|
@@ -9156,13 +9558,13 @@ class RowDD {
|
|
|
9156
9558
|
}
|
|
9157
9559
|
}
|
|
9158
9560
|
/**
|
|
9159
|
-
* Retrieves the index of the target row based on its '
|
|
9561
|
+
* Retrieves the index of the target row based on its 'aria-rowindex' attribute.
|
|
9160
9562
|
*
|
|
9161
9563
|
* @param {Element} targetRow - The target row element from which to retrieve the index.
|
|
9162
9564
|
* @returns {number} - The index of the target row, or 0 if the targetRow is null or undefined.
|
|
9163
9565
|
*/
|
|
9164
9566
|
getTargetIdx(targetRow) {
|
|
9165
|
-
return targetRow ? parseInt(targetRow.getAttribute('
|
|
9567
|
+
return targetRow ? parseInt(targetRow.getAttribute('aria-rowindex'), 10) - 1 : 0;
|
|
9166
9568
|
}
|
|
9167
9569
|
/**
|
|
9168
9570
|
* Retrieves the parent data of a given record during a row drag-and-drop operation.
|
|
@@ -9225,7 +9627,13 @@ class RowDD {
|
|
|
9225
9627
|
this.droppedRecord = tObj.getCurrentViewRecords()[parseInt(index.toString(), 10)];
|
|
9226
9628
|
}
|
|
9227
9629
|
else {
|
|
9228
|
-
this.
|
|
9630
|
+
if (!isNullOrUndefined(this.parent.rowDropSettings.targetID)) {
|
|
9631
|
+
const rowsObject = this.parent.grid.getRowsObject();
|
|
9632
|
+
this.droppedRecord = rowsObject.length > 0 ? rowsObject[args.dropIndex].data : undefined;
|
|
9633
|
+
}
|
|
9634
|
+
else {
|
|
9635
|
+
this.droppedRecord = tObj.getCurrentViewRecords()[args.dropIndex];
|
|
9636
|
+
}
|
|
9229
9637
|
}
|
|
9230
9638
|
}
|
|
9231
9639
|
let dragRecords = [];
|
|
@@ -9756,6 +10164,7 @@ class RowDD {
|
|
|
9756
10164
|
}
|
|
9757
10165
|
/**
|
|
9758
10166
|
* Cleans up resources, event listeners, and DOM elements when the TreeGrid component is destroyed.
|
|
10167
|
+
*
|
|
9759
10168
|
* @returns {void}
|
|
9760
10169
|
*/
|
|
9761
10170
|
destroy() {
|
|
@@ -9795,7 +10204,7 @@ var __decorate$c = (undefined && undefined.__decorate) || function (decorators,
|
|
|
9795
10204
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9796
10205
|
};
|
|
9797
10206
|
/**
|
|
9798
|
-
* Configures the row
|
|
10207
|
+
* Configures the settings for row dragging and dropping within the TreeGrid, allowing for enhanced user interaction and data manipulation capabilities.
|
|
9799
10208
|
*/
|
|
9800
10209
|
class RowDropSettings extends ChildProperty {
|
|
9801
10210
|
}
|
|
@@ -9835,7 +10244,8 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9835
10244
|
if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
|
|
9836
10245
|
if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
|
|
9837
10246
|
if (!((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
9838
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)
|
|
10247
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))
|
|
10248
|
+
|| notifyArgs.virtualInfo.blockIndexes.length === 1) {
|
|
9839
10249
|
notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
|
|
9840
10250
|
}
|
|
9841
10251
|
}
|
|
@@ -9844,7 +10254,7 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9844
10254
|
}
|
|
9845
10255
|
}
|
|
9846
10256
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
9847
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)
|
|
10257
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
9848
10258
|
return super.generateRows(data, notifyArgs);
|
|
9849
10259
|
}
|
|
9850
10260
|
else {
|
|
@@ -9865,7 +10275,7 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9865
10275
|
const clear = ['paging', 'refresh', 'sorting', 'filtering', 'searching', 'reorder',
|
|
9866
10276
|
'save', 'delete'].some((value) => action === value);
|
|
9867
10277
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
9868
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)
|
|
10278
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
9869
10279
|
const model = 'model';
|
|
9870
10280
|
const currentPage = this[`${model}`].currentPage;
|
|
9871
10281
|
if (clear) {
|
|
@@ -10644,7 +11054,7 @@ class Page {
|
|
|
10644
11054
|
return newResults;
|
|
10645
11055
|
}
|
|
10646
11056
|
updatePageSize(pageingDetails) {
|
|
10647
|
-
const updateSize = pageingDetails.
|
|
11057
|
+
const updateSize = pageingDetails.count;
|
|
10648
11058
|
const gridPagerModule = this.parent.grid.pagerModule;
|
|
10649
11059
|
if (this.parent.pageSettings.pageSizes === true) {
|
|
10650
11060
|
if (gridPagerModule.pagerObj.pagerdropdownModule['dropDownListObject'].value === gridPagerModule.pagerObj.getLocalizedLabel('All')) {
|
|
@@ -11047,7 +11457,7 @@ class Aggregate {
|
|
|
11047
11457
|
const cellElement = createElement('td', {
|
|
11048
11458
|
className: 'e-summary'
|
|
11049
11459
|
});
|
|
11050
|
-
if (this.parent.isReact) {
|
|
11460
|
+
if (this.parent.isReact && typeof (summaryColumn.footerTemplate) !== 'string') {
|
|
11051
11461
|
const renderReactTemplates = 'renderReactTemplates';
|
|
11052
11462
|
tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property, '', null, null, cellElement);
|
|
11053
11463
|
this.parent[`${renderReactTemplates}`]();
|
|
@@ -11663,7 +12073,7 @@ class BatchEdit {
|
|
|
11663
12073
|
focusModule.getContent().matrix.current = [actualIndex, focusModule.getContent().matrix.current[1]];
|
|
11664
12074
|
if (this.parent.editModule['isAddedRowByMethod'] && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && !this.parent.editModule['isAddedRowByContextMenu']) {
|
|
11665
12075
|
const newlyAddedRecords = this.parent.getBatchChanges()['addedRecords'];
|
|
11666
|
-
const index = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[newlyAddedRecords.length - 1].getAttribute('
|
|
12076
|
+
const index = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[newlyAddedRecords.length - 1].getAttribute('aria-rowindex'), 10) - 1;
|
|
11667
12077
|
this.batchRecords.splice(index, 0, newlyAddedRecords[newlyAddedRecords.length - 1]);
|
|
11668
12078
|
}
|
|
11669
12079
|
}
|
|
@@ -11692,7 +12102,7 @@ class BatchEdit {
|
|
|
11692
12102
|
childs = findChildrenRecords(data);
|
|
11693
12103
|
uid = this.parent.getSelectedRows()[0].getAttribute('data-uid');
|
|
11694
12104
|
}
|
|
11695
|
-
const parentRowIndex = parseInt(this.parent.grid.getRowElementByUID(uid).getAttribute('
|
|
12105
|
+
const parentRowIndex = parseInt(this.parent.grid.getRowElementByUID(uid).getAttribute('aria-rowindex'), 10) - 1;
|
|
11696
12106
|
if (childs.length) {
|
|
11697
12107
|
const totalCount = parentRowIndex + childs.length;
|
|
11698
12108
|
const firstChildIndex = parentRowIndex + 1;
|
|
@@ -11729,7 +12139,7 @@ class BatchEdit {
|
|
|
11729
12139
|
updateRowIndex() {
|
|
11730
12140
|
const rows = this.parent.grid.getDataRows();
|
|
11731
12141
|
for (let i = 0; i < rows.length; i++) {
|
|
11732
|
-
rows[parseInt(i.toString(), 10)].setAttribute('
|
|
12142
|
+
rows[parseInt(i.toString(), 10)].setAttribute('aria-rowindex', (i + 1).toString());
|
|
11733
12143
|
}
|
|
11734
12144
|
}
|
|
11735
12145
|
updateChildCount(records) {
|
|
@@ -11858,7 +12268,7 @@ class BatchEdit {
|
|
|
11858
12268
|
if (this.parent.editModule['isAddedRowByMethod'] && addRecords.length && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && !this.parent.editModule['isAddedRowByContextMenu']) {
|
|
11859
12269
|
addRecords.reverse();
|
|
11860
12270
|
for (let i = 0; i < addRecords.length; i++) {
|
|
11861
|
-
const index = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[parseInt(i.toString(), 10)].getAttribute('
|
|
12271
|
+
const index = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[parseInt(i.toString(), 10)].getAttribute('aria-rowindex'), 10) - 1;
|
|
11862
12272
|
data.splice(index, 0, addRecords[parseInt(i.toString(), 10)]);
|
|
11863
12273
|
}
|
|
11864
12274
|
}
|
|
@@ -11998,8 +12408,15 @@ class BatchEdit {
|
|
|
11998
12408
|
nextCellIndex(args) {
|
|
11999
12409
|
const index = 'index';
|
|
12000
12410
|
const rowIndex = 'rowIndex';
|
|
12411
|
+
const batchChanges = this.parent.getBatchChanges();
|
|
12412
|
+
const deletedRecords = batchChanges.deletedRecords;
|
|
12001
12413
|
if (this.parent.getSelectedRows().length) {
|
|
12002
|
-
|
|
12414
|
+
if (this.isAdd && deletedRecords.length > 0) {
|
|
12415
|
+
args[`${index}`] = this.parent.getSelectedRecords()[0][`${index}`];
|
|
12416
|
+
}
|
|
12417
|
+
else {
|
|
12418
|
+
args[`${index}`] = this.parent.getSelectedRows()[0][`${rowIndex}`];
|
|
12419
|
+
}
|
|
12003
12420
|
}
|
|
12004
12421
|
else {
|
|
12005
12422
|
args[`${index}`] = this.batchIndex;
|
|
@@ -12074,7 +12491,7 @@ class Edit {
|
|
|
12074
12491
|
}
|
|
12075
12492
|
if (e.target.classList.contains('e-treegridcollapse') || e.target.classList.contains('e-treegridexpand')) {
|
|
12076
12493
|
const tr = parentsUntil(e.target, 'e-row');
|
|
12077
|
-
const rowIndex = tr && parseInt(tr.getAttribute('
|
|
12494
|
+
const rowIndex = tr && parseInt(tr.getAttribute('aria-rowindex'), 10) - 1;
|
|
12078
12495
|
if (!isNullOrUndefined(rowIndex) && rowIndex >= 0 && this.parent.allowPaging) {
|
|
12079
12496
|
/* eslint-disable-next-line */
|
|
12080
12497
|
this.parent.grid.getDataRows()[rowIndex].dataset.uid = this.parent.grid.contentModule.getRows()[rowIndex].uid;
|
|
@@ -12243,7 +12660,7 @@ class Edit {
|
|
|
12243
12660
|
if (!(this.parent.grid.editSettings.allowEditing) || this.parent.grid.isEdit) {
|
|
12244
12661
|
return;
|
|
12245
12662
|
}
|
|
12246
|
-
const column = this.parent.grid.getColumnByIndex(+target.closest('td.e-rowcell').getAttribute('
|
|
12663
|
+
const column = this.parent.grid.getColumnByIndex(+target.closest('td.e-rowcell').getAttribute('aria-colindex') - 1);
|
|
12247
12664
|
if (this.parent.editSettings.mode === 'Cell' && !this.isOnBatch && column && !column.isPrimaryKey &&
|
|
12248
12665
|
this.parent.editSettings.allowEditing && column.allowEditing && !(target.classList.contains('e-treegridexpand') ||
|
|
12249
12666
|
target.classList.contains('e-treegridcollapse')) && this.parent.editSettings.allowEditOnDblClick) {
|
|
@@ -12251,8 +12668,8 @@ class Edit {
|
|
|
12251
12668
|
this.parent.grid.setProperties({ selectedRowIndex: args.rowIndex }, true);
|
|
12252
12669
|
if (this.parent.enableVirtualization) {
|
|
12253
12670
|
const tr = parentsUntil(args.target, 'e-row');
|
|
12254
|
-
this.prevAriaRowIndex = tr.getAttribute('
|
|
12255
|
-
tr.setAttribute('
|
|
12671
|
+
this.prevAriaRowIndex = tr.getAttribute('aria-rowindex');
|
|
12672
|
+
tr.setAttribute('aria-rowindex', (tr.rowIndex + 1) + '');
|
|
12256
12673
|
}
|
|
12257
12674
|
this.updateGridEditMode('Batch');
|
|
12258
12675
|
}
|
|
@@ -12295,7 +12712,7 @@ class Edit {
|
|
|
12295
12712
|
const prom = args[`${promise}`];
|
|
12296
12713
|
delete args[`${promise}`];
|
|
12297
12714
|
if (this.parent.enableVirtualization && !isNullOrUndefined(this.prevAriaRowIndex) && this.prevAriaRowIndex !== '-1') {
|
|
12298
|
-
args.row.setAttribute('
|
|
12715
|
+
args.row.setAttribute('aria-rowindex', this.prevAriaRowIndex);
|
|
12299
12716
|
this.prevAriaRowIndex = undefined;
|
|
12300
12717
|
}
|
|
12301
12718
|
if (this.keyPress !== 'enter') {
|
|
@@ -12618,8 +13035,8 @@ class Edit {
|
|
|
12618
13035
|
}
|
|
12619
13036
|
}
|
|
12620
13037
|
const rows = this.parent.grid.getDataRows();
|
|
12621
|
-
const firstAriaIndex = rows.length ? +rows[0].getAttribute('
|
|
12622
|
-
const lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('
|
|
13038
|
+
const firstAriaIndex = rows.length ? +rows[0].getAttribute('aria-rowindex') - 1 : 0;
|
|
13039
|
+
const lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') - 1 : 0;
|
|
12623
13040
|
const withinRange = this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
|
|
12624
13041
|
const isVirtualization = this.parent.enableVirtualization && this.addRowIndex > -1 && this.prevAriaRowIndex !== '-1';
|
|
12625
13042
|
if (this.parent.editSettings.mode !== 'Dialog') {
|
|
@@ -12670,7 +13087,7 @@ class Edit {
|
|
|
12670
13087
|
if (isVirtualization) {
|
|
12671
13088
|
this.prevAriaRowIndex = '-1';
|
|
12672
13089
|
}
|
|
12673
|
-
if (!this.parent.enableVirtualization || this.parent.enableVirtualization
|
|
13090
|
+
if (!this.parent.enableVirtualization || this.parent.enableVirtualization) {
|
|
12674
13091
|
this.isScrollByFocus = true;
|
|
12675
13092
|
focussedElement.focus();
|
|
12676
13093
|
}
|
|
@@ -12762,7 +13179,7 @@ class Edit {
|
|
|
12762
13179
|
this.selectedIndex = this.parent.grid.selectedRowIndex;
|
|
12763
13180
|
}
|
|
12764
13181
|
if (this.parent.enableVirtualization) {
|
|
12765
|
-
let selector = '.e-row[
|
|
13182
|
+
let selector = '.e-row[aria-rowindex="' + (this.selectedIndex + 1) + '"]';
|
|
12766
13183
|
let row;
|
|
12767
13184
|
if (this.selectedIndex > -1 && this.parent.editSettings.newRowPosition !== 'Top' &&
|
|
12768
13185
|
this.parent.editSettings.newRowPosition !== 'Bottom') {
|
|
@@ -12772,7 +13189,7 @@ class Edit {
|
|
|
12772
13189
|
}
|
|
12773
13190
|
else {
|
|
12774
13191
|
if (this.prevAriaRowIndex && this.prevAriaRowIndex !== '-1') {
|
|
12775
|
-
selector = '.e-row[
|
|
13192
|
+
selector = '.e-row[aria-rowindex="' + (this.prevAriaRowIndex + 1) + '"]';
|
|
12776
13193
|
row = this.parent.getContent().querySelector(selector);
|
|
12777
13194
|
this.addRowIndex = row ? row.rowIndex : 0;
|
|
12778
13195
|
}
|
|
@@ -12865,7 +13282,7 @@ class Edit {
|
|
|
12865
13282
|
const isVirtualization = this.parent.enableVirtualization && this.addRowIndex > -1 && this.prevAriaRowIndex !== '-1';
|
|
12866
13283
|
const rows = this.parent.getRows();
|
|
12867
13284
|
const firstAriaIndex = rows.length ? currentData.indexOf(currentData[0]) : 0;
|
|
12868
|
-
const lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('
|
|
13285
|
+
const lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') - 1 : 0;
|
|
12869
13286
|
const withinRange = this.parent.enableVirtualization && args.index !== 0 ? true :
|
|
12870
13287
|
this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
|
|
12871
13288
|
if (currentData.length) {
|
|
@@ -13059,7 +13476,7 @@ class Edit {
|
|
|
13059
13476
|
closeEdit() {
|
|
13060
13477
|
if (this.parent.enableVirtualization && this.parent.grid.editSettings.mode === 'Batch' && this.parent.grid.pageSettings.currentPage > 1) {
|
|
13061
13478
|
this.editedRowIndex = this.parent.grid.editModule.editModule['cellDetails'].rowIndex;
|
|
13062
|
-
this.parent.grid.editModule.editModule['cellDetails'].rowIndex = parseInt(this.parent.getRows()[this.parent.grid.editModule.editModule['cellDetails'].rowIndex].getAttribute('
|
|
13479
|
+
this.parent.grid.editModule.editModule['cellDetails'].rowIndex = parseInt(this.parent.getRows()[this.parent.grid.editModule.editModule['cellDetails'].rowIndex].getAttribute('aria-rowIndex'), 10) - 1;
|
|
13063
13480
|
}
|
|
13064
13481
|
this.parent.grid.editModule.closeEdit();
|
|
13065
13482
|
}
|
|
@@ -13211,6 +13628,11 @@ class DetailRow {
|
|
|
13211
13628
|
}
|
|
13212
13629
|
}
|
|
13213
13630
|
|
|
13631
|
+
/**
|
|
13632
|
+
* VirtualTreeContentRenderer
|
|
13633
|
+
*
|
|
13634
|
+
* @hidden
|
|
13635
|
+
*/
|
|
13214
13636
|
class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
13215
13637
|
constructor(parent, locator) {
|
|
13216
13638
|
super(parent, locator);
|
|
@@ -13230,23 +13652,45 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13230
13652
|
getModelGenerator() {
|
|
13231
13653
|
return new TreeVirtualRowModelGenerator(this.parent);
|
|
13232
13654
|
}
|
|
13655
|
+
/**
|
|
13656
|
+
* Retrieves the row element for a given row index.
|
|
13657
|
+
*
|
|
13658
|
+
* @param {number} index - The index of the row to retrieve.
|
|
13659
|
+
* @returns {Element} The row element at the specified index.
|
|
13660
|
+
*/
|
|
13233
13661
|
getRowByIndex(index) {
|
|
13234
13662
|
if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
|
|
13235
13663
|
return this.getRowCollection(index, true);
|
|
13236
13664
|
}
|
|
13237
13665
|
const dataRows = this.parent.getDataRows();
|
|
13238
|
-
const targetRow = dataRows.find((e) => parseInt(e.getAttribute('
|
|
13666
|
+
const targetRow = dataRows.find((e) => parseInt(e.getAttribute('aria-rowindex'), 10) - 1 === index);
|
|
13239
13667
|
if (!targetRow && this.parent.isEdit && this.parent.editSettings.mode === 'Batch') {
|
|
13240
13668
|
return index != null ? this.parent.getRows()[parseInt(index.toString(), 10)] : undefined;
|
|
13241
13669
|
}
|
|
13242
13670
|
return targetRow;
|
|
13243
13671
|
}
|
|
13672
|
+
/**
|
|
13673
|
+
* Retrieves the frozen right virtual row element by its index.
|
|
13674
|
+
*
|
|
13675
|
+
* @param {number} index - The index of the row to be retrieved.
|
|
13676
|
+
* @returns {Element} The DOM element representing the frozen right virtual row.
|
|
13677
|
+
*/
|
|
13244
13678
|
getFrozenRightVirtualRowByIndex(index) {
|
|
13245
13679
|
return this.getRowCollection(index, false, false, true);
|
|
13246
13680
|
}
|
|
13681
|
+
/**
|
|
13682
|
+
* Retrieves the row or record from the virtual tree grid based on the provided index.
|
|
13683
|
+
* Considers conditions such as frozen rows and pagination for accurate retrieval.
|
|
13684
|
+
*
|
|
13685
|
+
* @param {number} index - The index of the desired row or record.
|
|
13686
|
+
* @param {boolean} isMovable - Specifies if the content is movable.
|
|
13687
|
+
* @param {boolean} [isRowObject] - Optional. Determines if the return value should be a row object.
|
|
13688
|
+
* @param {boolean} [isFrozenRight] - Optional. Used for determining frozen right rows.
|
|
13689
|
+
* @returns {Element | Object} - The HTML element or row object.
|
|
13690
|
+
*/
|
|
13247
13691
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13248
13692
|
getRowCollection(index, isMovable, isRowObject, isFrozenRight) {
|
|
13249
|
-
const startIdx = parseInt(this.parent.getRows()[0].getAttribute(
|
|
13693
|
+
const startIdx = parseInt(this.parent.getRows()[0].getAttribute(ariaRowIndex), 10) - 1;
|
|
13250
13694
|
const rowCollection = this.parent.getDataRows();
|
|
13251
13695
|
const collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
|
|
13252
13696
|
let selectedRow = collection[index - startIdx];
|
|
@@ -13260,12 +13704,27 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13260
13704
|
this.parent.getRowsObject()[parseInt(index.toString(), 10)].data : selectedRow;
|
|
13261
13705
|
}
|
|
13262
13706
|
}
|
|
13707
|
+
if (selectedRow == null && index != null && this.parent.editSettings.mode === 'Batch' && this.parent.isEdit && isMovable) {
|
|
13708
|
+
selectedRow = rowCollection[parseInt(index.toString(), 10)];
|
|
13709
|
+
}
|
|
13263
13710
|
return selectedRow;
|
|
13264
13711
|
}
|
|
13712
|
+
/**
|
|
13713
|
+
* @hidden
|
|
13714
|
+
* @returns {void}
|
|
13715
|
+
*/
|
|
13265
13716
|
addEventListener() {
|
|
13266
13717
|
this.parent.on(virtualActionArgs, this.virtualOtherAction, this);
|
|
13267
13718
|
this.parent.on(indexModifier, this.indexModifier, this);
|
|
13268
13719
|
}
|
|
13720
|
+
/**
|
|
13721
|
+
* Handles virtual scrolling actions based on the provided arguments.
|
|
13722
|
+
*
|
|
13723
|
+
* @param {Object} args - The argument object.
|
|
13724
|
+
* @param {boolean} args.setTop - Determines if the virtual scroll position should reset to top.
|
|
13725
|
+
* @param {boolean} args.isExpandCollapse - Determines if the action is part of an expand/collapse operation.
|
|
13726
|
+
* @returns {void}
|
|
13727
|
+
*/
|
|
13269
13728
|
virtualOtherAction(args) {
|
|
13270
13729
|
if (args.setTop) {
|
|
13271
13730
|
this.translateY = 0;
|
|
@@ -13276,10 +13735,22 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13276
13735
|
this.isExpandCollapse = true;
|
|
13277
13736
|
}
|
|
13278
13737
|
}
|
|
13738
|
+
/**
|
|
13739
|
+
* Modifies the index based on various conditions such as record addition, deletion, or data source changes.
|
|
13740
|
+
*
|
|
13741
|
+
* @private
|
|
13742
|
+
* @param {Object} args - Contains parameters for the current operation.
|
|
13743
|
+
* @param {number} args.startIndex - The starting index for the modification.
|
|
13744
|
+
* @param {number} args.endIndex - The ending index for the modification.
|
|
13745
|
+
* @param {number} args.count - The number of items affected in the operation.
|
|
13746
|
+
* @param {string} args.requestType - The type of request, such as 'insert', 'delete', or 'update'.
|
|
13747
|
+
* @returns {void}
|
|
13748
|
+
*/
|
|
13279
13749
|
indexModifier(args) {
|
|
13280
13750
|
const content = this.parent.getContent().querySelector('.e-content');
|
|
13751
|
+
const pageSize = this.parent.pageSettings.pageSize;
|
|
13281
13752
|
if ((this.recordAdded || args.requestType === 'delete' && this.endIndex > args.count - this.parent.pageSettings.pageSize) && this.startIndex > -1 && this.endIndex > -1) {
|
|
13282
|
-
if (this.endIndex > args.count -
|
|
13753
|
+
if (this.endIndex > args.count - pageSize) {
|
|
13283
13754
|
const nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
|
|
13284
13755
|
let lastIndex = nextSetResIndex + this.parent.getRows().length;
|
|
13285
13756
|
if (lastIndex > args.count) {
|
|
@@ -13297,12 +13768,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13297
13768
|
}
|
|
13298
13769
|
if (this.isDataSourceChanged) {
|
|
13299
13770
|
this.startIndex = 0;
|
|
13300
|
-
this.endIndex =
|
|
13771
|
+
this.endIndex = pageSize - 1;
|
|
13301
13772
|
}
|
|
13302
|
-
if ((this.endIndex - this.startIndex !==
|
|
13303
|
-
(this.totalRecords >
|
|
13773
|
+
if ((this.endIndex - this.startIndex !== pageSize) &&
|
|
13774
|
+
(this.totalRecords > pageSize)
|
|
13304
13775
|
&& (this.endIndex === this.totalRecords)) {
|
|
13305
|
-
args.startIndex = this.endIndex -
|
|
13776
|
+
args.startIndex = this.endIndex - pageSize;
|
|
13306
13777
|
args.endIndex = this.endIndex;
|
|
13307
13778
|
}
|
|
13308
13779
|
else {
|
|
@@ -13310,6 +13781,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13310
13781
|
args.endIndex = this.endIndex;
|
|
13311
13782
|
}
|
|
13312
13783
|
}
|
|
13784
|
+
/**
|
|
13785
|
+
* Handles the addition or removal of event listeners for virtual scrolling in a TreeGrid.
|
|
13786
|
+
*
|
|
13787
|
+
* @param {string} action - The action to perform, either 'on' or 'off'.
|
|
13788
|
+
* @returns {void}
|
|
13789
|
+
*/
|
|
13313
13790
|
eventListener(action) {
|
|
13314
13791
|
if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
13315
13792
|
&& this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
|
|
@@ -13335,6 +13812,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13335
13812
|
this.parent.addEventListener('rowSelected', this.rowSelectedEvent.bind(this));
|
|
13336
13813
|
this.parent[`${action}`]('select-virtual-Row', this.toSelectVirtualRow, this);
|
|
13337
13814
|
this.parent.on('content-ready', this.fn, this);
|
|
13815
|
+
this.parent.addEventListener(actionBegin, this.handleActionBegin.bind(this));
|
|
13338
13816
|
this.parent.addEventListener(actionComplete, this.onActionComplete.bind(this));
|
|
13339
13817
|
this.parent[`${action}`]('virtual-scroll-edit-action-begin', this.beginEdit, this);
|
|
13340
13818
|
this.parent[`${action}`]('virtual-scroll-add-action-begin', this.beginAdd, this);
|
|
@@ -13345,15 +13823,30 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13345
13823
|
this.parent[`${action}`]('select-row-on-context-open', this.toSelectRowOnContextOpen, this);
|
|
13346
13824
|
this.parent[`${action}`]('refresh-virtual-editform-cells', this.refreshCell, this);
|
|
13347
13825
|
this.parent[`${action}`]('virtaul-cell-focus', this.cellFocus, this);
|
|
13826
|
+
this.parent[`${action}`]('virtual-scroll-edit', this.restoreEditState, this);
|
|
13348
13827
|
}
|
|
13349
13828
|
else {
|
|
13350
13829
|
super.eventListener('on');
|
|
13351
13830
|
}
|
|
13352
13831
|
}
|
|
13832
|
+
/**
|
|
13833
|
+
* Handles cell focus transitions in a virtualized tree grid component
|
|
13834
|
+
* when a keyboard event is triggered.
|
|
13835
|
+
*
|
|
13836
|
+
* @param {KeyboardEventArgs} e - The keyboard event arguments that contain
|
|
13837
|
+
* information about the key action.
|
|
13838
|
+
* @returns {void}
|
|
13839
|
+
*/
|
|
13353
13840
|
cellFocus(e) {
|
|
13354
13841
|
const virtualCellFocus = 'virtualCellFocus';
|
|
13355
13842
|
super[`${virtualCellFocus}`](e);
|
|
13356
13843
|
}
|
|
13844
|
+
/**
|
|
13845
|
+
* Handles the data ready event for the virtual tree grid content renderer.
|
|
13846
|
+
*
|
|
13847
|
+
* @param {NotifyArgs} [e] - The notification arguments that contain information about the data.
|
|
13848
|
+
* @returns {void}
|
|
13849
|
+
*/
|
|
13357
13850
|
onDataReady(e) {
|
|
13358
13851
|
super.onDataReady(e);
|
|
13359
13852
|
if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
@@ -13378,6 +13871,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13378
13871
|
}
|
|
13379
13872
|
}
|
|
13380
13873
|
}
|
|
13874
|
+
/**
|
|
13875
|
+
* Renders the table for the virtual tree content. It sets up a new `TreeInterSectionObserver`
|
|
13876
|
+
* based on certain conditions regarding the data source and counting requirements.
|
|
13877
|
+
*
|
|
13878
|
+
* @returns {void}
|
|
13879
|
+
*/
|
|
13381
13880
|
renderTable() {
|
|
13382
13881
|
super.renderTable();
|
|
13383
13882
|
if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
@@ -13387,6 +13886,17 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13387
13886
|
this.contents = this.getPanel().firstChild;
|
|
13388
13887
|
}
|
|
13389
13888
|
}
|
|
13889
|
+
/**
|
|
13890
|
+
* Calculates the translateY value for a virtual tree grid based on the scroll top, container height,
|
|
13891
|
+
* and additional virtual scrolling information. This method specifically handles logic for remote
|
|
13892
|
+
* data sources and ensures smooth scrolling with respect to expansion states.
|
|
13893
|
+
*
|
|
13894
|
+
* @param {number} sTop - The scroll top position.
|
|
13895
|
+
* @param {number} cHeight - The height of the container.
|
|
13896
|
+
* @param {VirtualInfo} [info] - Optional virtual scrolling information.
|
|
13897
|
+
* @param {boolean} [isOnenter] - Flag indicating if the scroll event is on enter.
|
|
13898
|
+
* @returns {number} The calculated translateY value.
|
|
13899
|
+
*/
|
|
13390
13900
|
getTranslateY(sTop, cHeight, info, isOnenter) {
|
|
13391
13901
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
13392
13902
|
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
@@ -13394,15 +13904,15 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13394
13904
|
this.isRemoteExpand = false;
|
|
13395
13905
|
return this.preTranslate;
|
|
13396
13906
|
}
|
|
13397
|
-
|
|
13398
|
-
this.preTranslate = super.getTranslateY(sTop, cHeight, info, isOnenter);
|
|
13399
|
-
return super.getTranslateY(sTop, cHeight, info, isOnenter);
|
|
13400
|
-
}
|
|
13401
|
-
}
|
|
13402
|
-
else {
|
|
13403
|
-
return super.getTranslateY(sTop, cHeight, info, isOnenter);
|
|
13907
|
+
this.preTranslate = super.getTranslateY(sTop, cHeight, info, isOnenter);
|
|
13404
13908
|
}
|
|
13909
|
+
return super.getTranslateY(sTop, cHeight, info, isOnenter);
|
|
13405
13910
|
}
|
|
13911
|
+
/**
|
|
13912
|
+
* Handles the dataBound event to calculate and set the initial row top position for the grid.
|
|
13913
|
+
*
|
|
13914
|
+
* @returns {void}
|
|
13915
|
+
*/
|
|
13406
13916
|
dataBoundEvent() {
|
|
13407
13917
|
const dataBoundEve = 'dataBound';
|
|
13408
13918
|
const initialRowTop = 'initialRowTop';
|
|
@@ -13419,11 +13929,27 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13419
13929
|
}
|
|
13420
13930
|
super[`${dataBoundEve}`]();
|
|
13421
13931
|
}
|
|
13932
|
+
/**
|
|
13933
|
+
* Handles the row selection event for virtual tree grid rows.
|
|
13934
|
+
* It invokes the base class's rowSelected method and notifies
|
|
13935
|
+
* the parent component about a virtual transformation change.
|
|
13936
|
+
*
|
|
13937
|
+
* @param {RowSelectEventArgs} args - The arguments related to the row selection event.
|
|
13938
|
+
* @returns {void} This method does not return a value.
|
|
13939
|
+
*/
|
|
13422
13940
|
rowSelectedEvent(args) {
|
|
13423
13941
|
const rowSelected = 'rowSelected';
|
|
13424
13942
|
super[`${rowSelected}`](args);
|
|
13425
13943
|
this.parent.notify('virtualTransform', { requestType: 'transformChange' });
|
|
13426
13944
|
}
|
|
13945
|
+
/**
|
|
13946
|
+
* Handles virtual row selection in TreeGrid.
|
|
13947
|
+
*
|
|
13948
|
+
* @param {Object} args - The argument object containing the selected index.
|
|
13949
|
+
* @param {number} args.selectedIndex - The index of the row to be selected.
|
|
13950
|
+
*
|
|
13951
|
+
* @returns {void}
|
|
13952
|
+
*/
|
|
13427
13953
|
toSelectVirtualRow(args) {
|
|
13428
13954
|
if (this.parent.isEdit) {
|
|
13429
13955
|
return;
|
|
@@ -13446,9 +13972,20 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13446
13972
|
super[`${selectVirtualRow}`](args);
|
|
13447
13973
|
}
|
|
13448
13974
|
}
|
|
13975
|
+
/**
|
|
13976
|
+
* Refreshes the cells for the given row object by regenerating them.
|
|
13977
|
+
*
|
|
13978
|
+
* @param {Row<Column>} rowObj - The row object for which the cells need to be refreshed.
|
|
13979
|
+
* @returns {void} This method does not return any value.
|
|
13980
|
+
*/
|
|
13449
13981
|
refreshCell(rowObj) {
|
|
13450
13982
|
rowObj.cells = this.generateCells();
|
|
13451
13983
|
}
|
|
13984
|
+
/**
|
|
13985
|
+
* Generates an array of cells for each column in the parent.
|
|
13986
|
+
*
|
|
13987
|
+
* @returns {Cell<Column>[]} An array of cells for the corresponding columns.
|
|
13988
|
+
*/
|
|
13452
13989
|
generateCells() {
|
|
13453
13990
|
const cells = [];
|
|
13454
13991
|
for (let i = 0; i < this.parent.columns.length; i++) {
|
|
@@ -13456,6 +13993,18 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13456
13993
|
}
|
|
13457
13994
|
return cells;
|
|
13458
13995
|
}
|
|
13996
|
+
/**
|
|
13997
|
+
* Generates a cell object with provided column and row configurations.
|
|
13998
|
+
*
|
|
13999
|
+
* @param {Column} col - The Column object which holds the column configuration.
|
|
14000
|
+
* @param {string} [rowId] - An optional string that represents the row ID.
|
|
14001
|
+
* @param {CellType} [cellType] - An optional CellType enum to specify the type of the cell.
|
|
14002
|
+
* @param {number} [colSpan] - An optional number to specify the column span of the cell.
|
|
14003
|
+
* @param {number} [oIndex] - An optional number for the order index of the cell.
|
|
14004
|
+
* @param {Object} [foreignKeyData] - An optional object for foreign key data associated with the column.
|
|
14005
|
+
*
|
|
14006
|
+
* @returns {Cell<Column>} Returns a newly created Cell object of type Column.
|
|
14007
|
+
*/
|
|
13459
14008
|
generateCell(col, rowId, cellType, colSpan, oIndex, foreignKeyData) {
|
|
13460
14009
|
const opt = {
|
|
13461
14010
|
'visible': col.visible,
|
|
@@ -13474,13 +14023,29 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13474
14023
|
}
|
|
13475
14024
|
return new Cell(opt);
|
|
13476
14025
|
}
|
|
14026
|
+
/**
|
|
14027
|
+
* Begins the edit operation for a specified row in the grid.
|
|
14028
|
+
* Updates the `editedRowIndex` and assigns row data to the event data.
|
|
14029
|
+
*
|
|
14030
|
+
* @param {{ data: Object, index: number }} e - An object containing the row data and index.
|
|
14031
|
+
* @param {Object} e.data - The data of the row to be edited.
|
|
14032
|
+
* @param {number} e.index - The index of the row to be edited.
|
|
14033
|
+
* @returns {void}
|
|
14034
|
+
*/
|
|
13477
14035
|
beginEdit(e) {
|
|
13478
14036
|
this['editedRowIndex'] = e.index;
|
|
13479
|
-
const selector = '.e-row[
|
|
14037
|
+
const selector = '.e-row[aria-rowindex="' + (e.index + 1) + '"]';
|
|
13480
14038
|
const index = this.parent.getContent().querySelector(selector).rowIndex;
|
|
13481
14039
|
const rowData = this.parent.getCurrentViewRecords()[parseInt(index.toString(), 10)];
|
|
13482
14040
|
e.data = rowData;
|
|
13483
14041
|
}
|
|
14042
|
+
/**
|
|
14043
|
+
* Begins the process of adding a new row in the tree grid.
|
|
14044
|
+
*
|
|
14045
|
+
* @param {Object} args - The arguments for adding a new row.
|
|
14046
|
+
* @param {boolean} args.startEdit - A flag indicating whether to start editing.
|
|
14047
|
+
* @returns {void}
|
|
14048
|
+
*/
|
|
13484
14049
|
beginAdd(args) {
|
|
13485
14050
|
const addAction = 'addActionBegin';
|
|
13486
14051
|
const isAdd = 'isAdd';
|
|
@@ -13490,8 +14055,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13490
14055
|
this.addRowIndex = addArgs.addRowIndex;
|
|
13491
14056
|
this.dataRowIndex = addArgs.dataRowIndex;
|
|
13492
14057
|
const rows = this.parent.getRows();
|
|
13493
|
-
const firstAriaIndex = rows.length ? +rows[0].getAttribute('
|
|
13494
|
-
const lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('
|
|
14058
|
+
const firstAriaIndex = rows.length ? +rows[0].getAttribute('aria-rowindex') - 1 : 0;
|
|
14059
|
+
const lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') - 1 : 0;
|
|
13495
14060
|
const withInRange = this.parent.selectedRowIndex >= firstAriaIndex && this.parent.selectedRowIndex <= lastAriaIndex;
|
|
13496
14061
|
if (!(this.rowPosition === 'Top' || this.rowPosition === 'Bottom')) {
|
|
13497
14062
|
this[`${isAdd}`] = true;
|
|
@@ -13501,10 +14066,21 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13501
14066
|
super[`${addAction}`](args);
|
|
13502
14067
|
}
|
|
13503
14068
|
}
|
|
14069
|
+
/**
|
|
14070
|
+
* Restores the edit state of the tree grid content. This method calls the
|
|
14071
|
+
* base class method to handle the restoration logic.
|
|
14072
|
+
*
|
|
14073
|
+
* @returns {void} This method does not return any value.
|
|
14074
|
+
*/
|
|
13504
14075
|
restoreEditState() {
|
|
13505
14076
|
const restoreEdit = 'restoreEdit';
|
|
13506
14077
|
super[`${restoreEdit}`]();
|
|
13507
14078
|
}
|
|
14079
|
+
/**
|
|
14080
|
+
* Resets the edit state if certain conditions are met.
|
|
14081
|
+
*
|
|
14082
|
+
* @returns {void}
|
|
14083
|
+
*/
|
|
13508
14084
|
resetIseditValue() {
|
|
13509
14085
|
const resetIsEdit = 'resetIsedit';
|
|
13510
14086
|
const isAdd = 'isAdd';
|
|
@@ -13513,6 +14089,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13513
14089
|
super[`${resetIsEdit}`]();
|
|
13514
14090
|
}
|
|
13515
14091
|
}
|
|
14092
|
+
/**
|
|
14093
|
+
* Handles the successful editing operation when virtual scrolling is enabled.
|
|
14094
|
+
* Checks if a row has been added to the tree grid and sets the `recordAdded` flag accordingly.
|
|
14095
|
+
*
|
|
14096
|
+
* @returns {void}
|
|
14097
|
+
*/
|
|
13516
14098
|
virtualEditSuccess() {
|
|
13517
14099
|
const isAdd = 'isAdd';
|
|
13518
14100
|
const content = this.parent.getContent().querySelector('.e-content');
|
|
@@ -13520,14 +14102,33 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13520
14102
|
this.recordAdded = true;
|
|
13521
14103
|
}
|
|
13522
14104
|
}
|
|
14105
|
+
/**
|
|
14106
|
+
* Cancels the edit operation for the provided data.
|
|
14107
|
+
*
|
|
14108
|
+
* @param {Object} args - The arguments containing the data to cancel edit for.
|
|
14109
|
+
* @param {Object} args.data - The specific data object for which the edit operation needs to be canceled.
|
|
14110
|
+
* @returns {void}
|
|
14111
|
+
*/
|
|
13523
14112
|
cancelEdit(args) {
|
|
13524
14113
|
const editCancel = 'editCancel';
|
|
13525
14114
|
super[`${editCancel}`](args);
|
|
13526
14115
|
}
|
|
14116
|
+
/**
|
|
14117
|
+
* Handles the action of selecting a row when the context menu is opened.
|
|
14118
|
+
*
|
|
14119
|
+
* @param {Object} args - An object containing related parameters.
|
|
14120
|
+
* @param {boolean} args.isOpen - A flag indicating whether the context menu is open.
|
|
14121
|
+
* @returns {void} This method does not return any value.
|
|
14122
|
+
*/
|
|
13527
14123
|
toSelectRowOnContextOpen(args) {
|
|
13528
14124
|
const selectRowOnContextOpen = 'selectRowOnContextOpen';
|
|
13529
14125
|
super[`${selectRowOnContextOpen}`](args);
|
|
13530
14126
|
}
|
|
14127
|
+
/**
|
|
14128
|
+
* Restores a new row in the grid when necessary by adding it back to the content.
|
|
14129
|
+
*
|
|
14130
|
+
* @returns {void} This method does not return any value.
|
|
14131
|
+
*/
|
|
13531
14132
|
restoreNewRow() {
|
|
13532
14133
|
const isAdd = 'isAdd';
|
|
13533
14134
|
const content = this.parent.getContent().querySelector('.e-content');
|
|
@@ -13536,10 +14137,41 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13536
14137
|
this.parent.editModule.addRecord(null, this.parent.root.editModule.selectedIndex);
|
|
13537
14138
|
}
|
|
13538
14139
|
}
|
|
14140
|
+
/**
|
|
14141
|
+
* Retrieves virtual data for operations like adding or canceling rows in the grid.
|
|
14142
|
+
*
|
|
14143
|
+
* @param {Object} data - An object containing properties to determine the virtual data processing.
|
|
14144
|
+
* @param {Object} data.virtualData - The virtual data object to be processed.
|
|
14145
|
+
* @param {boolean} data.isAdd - A boolean indicating if the operation is an addition.
|
|
14146
|
+
* @param {boolean} data.isCancel - A boolean indicating if the operation is a cancellation.
|
|
14147
|
+
* @returns {void} This method does not return any value.
|
|
14148
|
+
*/
|
|
13539
14149
|
getData(data) {
|
|
13540
14150
|
const getVirtualData = 'getVirtualData';
|
|
13541
14151
|
super[`${getVirtualData}`](data);
|
|
13542
14152
|
}
|
|
14153
|
+
/**
|
|
14154
|
+
* Initiates the beginning of an action within the tree grid component.
|
|
14155
|
+
* This method is invoked before any action is performed, allowing for
|
|
14156
|
+
* any necessary modifications or cancellations of the upcoming action.
|
|
14157
|
+
*
|
|
14158
|
+
* @param {NotifyArgs} args - The arguments associated with the action,
|
|
14159
|
+
* providing context and specifics about what is being commenced.
|
|
14160
|
+
* @returns {void}
|
|
14161
|
+
*/
|
|
14162
|
+
handleActionBegin(args) {
|
|
14163
|
+
const actionBegin = 'actionBegin';
|
|
14164
|
+
super[`${actionBegin}`](args);
|
|
14165
|
+
}
|
|
14166
|
+
/**
|
|
14167
|
+
* Handles the completion of various actions, such as adding a new row.
|
|
14168
|
+
* Updates row positions and indexes based on the action completed.
|
|
14169
|
+
*
|
|
14170
|
+
* @param {NotifyArgs} args - An object containing the details of the completed action.
|
|
14171
|
+
* Specifically, it includes the `requestType` which determines the type
|
|
14172
|
+
* of action that was completed.
|
|
14173
|
+
* @returns {void} This method does not return any value.
|
|
14174
|
+
*/
|
|
13543
14175
|
onActionComplete(args) {
|
|
13544
14176
|
if (args.requestType === 'add') {
|
|
13545
14177
|
const addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, dataRowIndex: this.dataRowIndex };
|
|
@@ -13551,6 +14183,19 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13551
14183
|
const actionComplete = 'actionComplete';
|
|
13552
14184
|
super[`${actionComplete}`](args);
|
|
13553
14185
|
}
|
|
14186
|
+
/**
|
|
14187
|
+
* Creates a callback function to be executed during virtual scrolling actions.
|
|
14188
|
+
* This function handles the adjustment of virtual elements and rendering logic,
|
|
14189
|
+
* particularly optimizing for non-IE browsers, wheel events, and virtual masks.
|
|
14190
|
+
*
|
|
14191
|
+
* @returns {Function} A function that handles scrolling and adjusts table rendering.
|
|
14192
|
+
* @param {HTMLElement} element - The HTML element involved in the action.
|
|
14193
|
+
* @param {SentinelType} current - The type of sentinel indicating the scroll.
|
|
14194
|
+
* @param {string} direction - The scroll direction.
|
|
14195
|
+
* @param {Offsets} e - The offset values indicating the current scroll position.
|
|
14196
|
+
* @param {boolean} isWheel - Indicates if the scrolling was initiated by a mouse wheel.
|
|
14197
|
+
* @param {boolean} check - A boolean flag for additional control logic.
|
|
14198
|
+
*/
|
|
13554
14199
|
onEnteredAction() {
|
|
13555
14200
|
return (element, current, direction, e, isWheel, check) => {
|
|
13556
14201
|
const directVirtualRender = 'directVirtualRender';
|
|
@@ -13592,8 +14237,17 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13592
14237
|
}
|
|
13593
14238
|
};
|
|
13594
14239
|
}
|
|
14240
|
+
/**
|
|
14241
|
+
* Handles scroll events to manage virtual scrolling and row rendering.
|
|
14242
|
+
* Adjusts view information, row indexes, and translates viewport positioning
|
|
14243
|
+
* based on the given scroll arguments.
|
|
14244
|
+
*
|
|
14245
|
+
* @param {ScrollArg} scrollArgs - Contains the scroll offsets, sentinel information, direction of scroll, and other related details.
|
|
14246
|
+
* @returns {void} - No return value. It adjusts scrolling state internally.
|
|
14247
|
+
*/
|
|
13595
14248
|
scrollListeners(scrollArgs) {
|
|
13596
14249
|
this['scrollAfterEdit']();
|
|
14250
|
+
this.shouldPreventScrolling(scrollArgs);
|
|
13597
14251
|
if (this.parent.root.enablePersistence) {
|
|
13598
14252
|
this.parent.root.scrollPosition = scrollArgs.offset;
|
|
13599
14253
|
}
|
|
@@ -13613,9 +14267,11 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13613
14267
|
if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') && !isNullOrUndefined(content)) {
|
|
13614
14268
|
const vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? parseInt(this.parent.height.toString(), 10) :
|
|
13615
14269
|
this.parent.element.getBoundingClientRect().height);
|
|
13616
|
-
|
|
13617
|
-
|
|
13618
|
-
|
|
14270
|
+
// Calculate the integer number of rows that are scrolled past plus the number of rows that fit within the visible height
|
|
14271
|
+
const scrolledRows = Math.floor(content.scrollTop / rowHeight);
|
|
14272
|
+
const visibleRows = Math.ceil(vHeight / rowHeight);
|
|
14273
|
+
// Calculate the index by subtracting the page size from the total rows taken into account
|
|
14274
|
+
let index = scrolledRows + visibleRows - this.parent.pageSettings.pageSize;
|
|
13619
14275
|
index = (index > 0) ? index : 0;
|
|
13620
14276
|
if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 && index !== this[`${selectedRowIndex}`] &&
|
|
13621
14277
|
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop) && !this.parent.allowRowDragAndDrop) {
|
|
@@ -13692,20 +14348,19 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13692
14348
|
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
13693
14349
|
this.startIndex = currentViewData[0][`${indexValue}`] + (this.parent.pageSettings.pageSize / 2);
|
|
13694
14350
|
}
|
|
13695
|
-
if (this.parent.root.isSelfReference) {
|
|
13696
|
-
const selectedIndex = this.parent.root.selectedRowIndex;
|
|
13697
|
-
this.startIndex = selectedIndex !== -1 && selectedIndex !== this.startIndex ? this.startIndex - 1 : this.startIndex;
|
|
13698
|
-
}
|
|
13699
14351
|
if (scrollArgs.offset.top > (rowHeight * this.totalRecords)) {
|
|
13700
14352
|
this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
|
|
13701
14353
|
}
|
|
13702
14354
|
else {
|
|
13703
14355
|
if (this.totalRecords === this.endIndex) {
|
|
13704
|
-
if (
|
|
13705
|
-
|
|
13706
|
-
|
|
13707
|
-
|
|
13708
|
-
|
|
14356
|
+
if (this.totalRecords === this.endIndex) {
|
|
14357
|
+
if (this.parent.isEdit) {
|
|
14358
|
+
this.translateY = ((this.totalRecords * rowHeight) - (this.parent.pageSettings.pageSize * rowHeight))
|
|
14359
|
+
+ rowHeight;
|
|
14360
|
+
}
|
|
14361
|
+
else {
|
|
14362
|
+
this.translateY = (this.totalRecords * rowHeight) - (this.parent.pageSettings.pageSize * rowHeight);
|
|
14363
|
+
}
|
|
13709
14364
|
}
|
|
13710
14365
|
}
|
|
13711
14366
|
else {
|
|
@@ -13718,24 +14373,23 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13718
14373
|
}
|
|
13719
14374
|
}
|
|
13720
14375
|
}
|
|
13721
|
-
if (
|
|
14376
|
+
if (((downScroll && scrollArgs.direction !== 'up' && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
|
|
13722
14377
|
|| (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
|
|
13723
14378
|
((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
13724
14379
|
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') && (downScroll || upScroll) || isCountRequired(this.parent))) {
|
|
13725
14380
|
const viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
|
|
13726
14381
|
this.previousInfo = viewInfo;
|
|
13727
|
-
if (this.prevInfo && ((info.axis === 'Y' && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString())
|
|
14382
|
+
if (this.prevInfo && viewInfo.event !== 'refresh-virtual-block' && ((info.axis === 'Y' && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString())
|
|
13728
14383
|
|| ((info.axis === 'X' && this.prevInfo.columnIndexes.toString() === viewInfo.columnIndexes.toString())
|
|
13729
14384
|
|| (this.parent.isFrozenGrid() && this.parent.getVisibleFrozenLeftCount() >= viewInfo.columnIndexes[0]
|
|
13730
14385
|
&& this.prevInfo.columnIndexes.toString().includes(viewInfo.columnIndexes.toString()))))) {
|
|
13731
14386
|
this.parent.removeMaskRow();
|
|
13732
|
-
this.parent.notify('removeGanttShimmer', { requestType: 'hideShimmer' });
|
|
13733
14387
|
if (Browser.isIE) {
|
|
13734
14388
|
this.parent.hideSpinner();
|
|
13735
14389
|
}
|
|
13736
14390
|
this.requestType = this.requestType === 'virtualscroll' ? this['empty'] : this.requestType;
|
|
13737
14391
|
if (info.axis === 'Y') {
|
|
13738
|
-
this
|
|
14392
|
+
this.restoreEditState();
|
|
13739
14393
|
}
|
|
13740
14394
|
return;
|
|
13741
14395
|
}
|
|
@@ -13763,9 +14417,32 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13763
14417
|
}
|
|
13764
14418
|
}
|
|
13765
14419
|
}
|
|
14420
|
+
/**
|
|
14421
|
+
* Prevents scrolling under specific conditions related to adding a new row.
|
|
14422
|
+
*
|
|
14423
|
+
* @param {ScrollArg} scrollArgs - The scroll event arguments containing offset details.
|
|
14424
|
+
* @returns {void}
|
|
14425
|
+
*/
|
|
14426
|
+
shouldPreventScrolling(scrollArgs) {
|
|
14427
|
+
const addedRow = this.parent.element.querySelector('.e-addedrow');
|
|
14428
|
+
if (addedRow && this.rowPosition !== 'Top' && this.rowPosition !== 'Bottom' && scrollArgs.offset.top !== 0) {
|
|
14429
|
+
this.parent.closeEdit();
|
|
14430
|
+
return;
|
|
14431
|
+
}
|
|
14432
|
+
}
|
|
14433
|
+
/**
|
|
14434
|
+
* Appends content to the target element. Handles dynamic adjustments for remote data sources,
|
|
14435
|
+
* frozen columns, and virtual scrolling.
|
|
14436
|
+
*
|
|
14437
|
+
* @param {HTMLElement} target - The target HTML element where content is to be appended.
|
|
14438
|
+
* @param {DocumentFragment} newChild - The new content as a DocumentFragment to append.
|
|
14439
|
+
* @param {NotifyArgs} e - Object containing information about the operation.
|
|
14440
|
+
* @returns {void}
|
|
14441
|
+
*/
|
|
13766
14442
|
appendContent(target, newChild, e) {
|
|
13767
14443
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
13768
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)
|
|
14444
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)
|
|
14445
|
+
|| (this.parent.isFrozenGrid() && (e.requestType === undefined || !isNullOrUndefined(e.virtualInfo) && (e.virtualInfo.direction === 'right' || e.virtualInfo.direction === 'left')))) {
|
|
13769
14446
|
if (getValue('isExpandCollapse', e)) {
|
|
13770
14447
|
this.isRemoteExpand = true;
|
|
13771
14448
|
}
|
|
@@ -13793,6 +14470,9 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13793
14470
|
target.appendChild(newChild);
|
|
13794
14471
|
const replace = 'replaceWith';
|
|
13795
14472
|
this.getTable().querySelector('tbody')[`${replace}`](target);
|
|
14473
|
+
if (e.requestType === 'virtualscroll' && e.virtualInfo.sentinelInfo.axis === 'Y') {
|
|
14474
|
+
this.isExpandCollapse = false;
|
|
14475
|
+
}
|
|
13796
14476
|
if (!this.isExpandCollapse || this.translateY === 0) {
|
|
13797
14477
|
this.translateY = this.translateY < 0 ? 0 : this.translateY;
|
|
13798
14478
|
getValue('virtualEle', this).adjustTable(cOffset, this.translateY);
|
|
@@ -13825,6 +14505,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13825
14505
|
super[`${ensureSelectedRowPosition}`]();
|
|
13826
14506
|
}
|
|
13827
14507
|
}
|
|
14508
|
+
/**
|
|
14509
|
+
* Unsubscribes all event listeners to prevent memory leaks.
|
|
14510
|
+
* This method is called when the component is being destroyed or when event listeners need to be cleaned up.
|
|
14511
|
+
*
|
|
14512
|
+
* @returns {void}
|
|
14513
|
+
*/
|
|
13828
14514
|
removeEventListener() {
|
|
13829
14515
|
if (this.parent.isDestroyed) {
|
|
13830
14516
|
return;
|
|
@@ -13845,6 +14531,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13845
14531
|
this.parent.off('select-row-on-context-open', this.toSelectRowOnContextOpen);
|
|
13846
14532
|
this.parent.off('refresh-virtual-editform-cells', this.refreshCell);
|
|
13847
14533
|
this.parent.off('virtaul-cell-focus', this.cellFocus);
|
|
14534
|
+
this.parent.off('virtual-scroll-edit', this.restoreEditState);
|
|
13848
14535
|
}
|
|
13849
14536
|
}
|
|
13850
14537
|
class TreeInterSectionObserver extends InterSectionObserver {
|
|
@@ -13855,6 +14542,15 @@ class TreeInterSectionObserver extends InterSectionObserver {
|
|
|
13855
14542
|
this.lastPos = 0;
|
|
13856
14543
|
this.timer = 0;
|
|
13857
14544
|
}
|
|
14545
|
+
/**
|
|
14546
|
+
* Sets up observers to monitor scroll events on a given container
|
|
14547
|
+
* and its movable companion within a virtual grid setup.
|
|
14548
|
+
*
|
|
14549
|
+
* @param {Function} callback - Function to call when a scroll event is detected.
|
|
14550
|
+
* @param {Function} onEnterCallback - Function to call when a specific event, like entering a region, is detected.
|
|
14551
|
+
* @param {IGrid} instance - The grid instance that requires observation.
|
|
14552
|
+
* @returns {void}
|
|
14553
|
+
*/
|
|
13858
14554
|
observes(callback, onEnterCallback, instance) {
|
|
13859
14555
|
const containerRect = 'containerRect';
|
|
13860
14556
|
super[`${containerRect}`] = getValue('options', this).container.getBoundingClientRect();
|
|
@@ -13865,9 +14561,23 @@ class TreeInterSectionObserver extends InterSectionObserver {
|
|
|
13865
14561
|
EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
|
|
13866
14562
|
}
|
|
13867
14563
|
}
|
|
14564
|
+
/**
|
|
14565
|
+
* Clears the last known position.
|
|
14566
|
+
*
|
|
14567
|
+
* @returns {void} No value is returned from this function.
|
|
14568
|
+
*/
|
|
13868
14569
|
clear() {
|
|
13869
14570
|
this.lastPos = null;
|
|
13870
14571
|
}
|
|
14572
|
+
/**
|
|
14573
|
+
* Handles virtual scrolling events and manages scroll direction and debouncing for rendering updates.
|
|
14574
|
+
*
|
|
14575
|
+
* @private
|
|
14576
|
+
* @param {Function} callback - Function to call on scroll end.
|
|
14577
|
+
* @param {Function} onEnterCallback - Function to call on entering a virtual scrolling area.
|
|
14578
|
+
* @param {IGrid} instance - The grid instance on which virtual scrolling is being implemented.
|
|
14579
|
+
* @returns {Function} - A function that processes scroll events.
|
|
14580
|
+
*/
|
|
13871
14581
|
virtualScrollHandlers(callback, onEnterCallback, instance) {
|
|
13872
14582
|
const delay = Browser.info.name === 'chrome' ? 200 : 100;
|
|
13873
14583
|
const options = 'options';
|
|
@@ -13963,9 +14673,6 @@ class VirtualScroll {
|
|
|
13963
14673
|
Grid.Inject(TreeVirtual);
|
|
13964
14674
|
this.addEventListener();
|
|
13965
14675
|
}
|
|
13966
|
-
returnVisualData(args) {
|
|
13967
|
-
args.data = this.visualData;
|
|
13968
|
-
}
|
|
13969
14676
|
/**
|
|
13970
14677
|
* For internal use only - Get the module name.
|
|
13971
14678
|
*
|
|
@@ -13999,28 +14706,58 @@ class VirtualScroll {
|
|
|
13999
14706
|
this.parent.off(pagingActions, this.virtualPageAction);
|
|
14000
14707
|
this.parent.off(destroy, this.destroy);
|
|
14001
14708
|
}
|
|
14709
|
+
/**
|
|
14710
|
+
* Handles the virtual child collapse or expand action in a tree grid.
|
|
14711
|
+
*
|
|
14712
|
+
* @param {object} row - Object containing information about the collapse/expand action.
|
|
14713
|
+
* @param {string} row.action - The type of action, either "collapse" or "expand".
|
|
14714
|
+
* @param {HTMLTableRowElement} row.row - The HTML row element that is affected by the action.
|
|
14715
|
+
* @param {ITreeData} row.record - The tree data record associated with the row.
|
|
14716
|
+
* @param {RowCollapsedEventArgs} row.args - Additional event arguments related to the row collapse or expand.
|
|
14717
|
+
*
|
|
14718
|
+
* @returns {void} No return value as the function executes a procedure.
|
|
14719
|
+
*/
|
|
14002
14720
|
collapseExpandVirtualchilds(row) {
|
|
14003
14721
|
this.parent.grid.notify(virtualActionArgs, { isExpandCollapse: true });
|
|
14004
14722
|
this.expandCollapseRec = row.record;
|
|
14005
14723
|
row.record.expanded = row.action === 'collapse' ? false : true;
|
|
14006
|
-
|
|
14724
|
+
this.parent.flatData.map((e) => e.expanded = e.uniqueID === row.record.uniqueID &&
|
|
14725
|
+
e.expanded !== row.record.expanded ? row.record.expanded : e.expanded);
|
|
14726
|
+
const actionDetails = {
|
|
14007
14727
|
result: this.parent.flatData,
|
|
14008
14728
|
row: row.row,
|
|
14009
14729
|
action: row.action,
|
|
14010
14730
|
record: row.record,
|
|
14011
14731
|
count: this.parent.flatData.length
|
|
14012
14732
|
};
|
|
14013
|
-
|
|
14014
|
-
|
|
14733
|
+
this.handleSelection();
|
|
14734
|
+
const requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
|
|
14735
|
+
getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: requestType });
|
|
14736
|
+
}
|
|
14737
|
+
/**
|
|
14738
|
+
* Handles selection logic for the TreeGrid component.
|
|
14739
|
+
*
|
|
14740
|
+
* @returns {void}
|
|
14741
|
+
*/
|
|
14742
|
+
handleSelection() {
|
|
14743
|
+
if ((this.parent.selectionSettings.mode === 'Cell' ||
|
|
14744
|
+
(this.parent.selectionSettings.mode === 'Row' && !this.parent.selectionSettings.persistSelection))) {
|
|
14015
14745
|
this.parent.grid.clearSelection();
|
|
14016
14746
|
}
|
|
14017
14747
|
if (getValue('isCollapseAll', this.parent) && this.parent.selectionSettings.persistSelection && this.parent.getSelectedRecords().length > 0) {
|
|
14018
14748
|
this.prevSelectedRecord = this.parent.getSelectedRecords();
|
|
14019
14749
|
this.parent.grid.clearSelection();
|
|
14020
14750
|
}
|
|
14021
|
-
const requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
|
|
14022
|
-
getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, { requestType: requestType });
|
|
14023
14751
|
}
|
|
14752
|
+
/**
|
|
14753
|
+
* Handles the action related to virtual scrolling with paging details.
|
|
14754
|
+
*
|
|
14755
|
+
* @param {Object} pageingDetails - Contains the result data, count of results, and action arguments.
|
|
14756
|
+
* @param {ITreeData[]} pageingDetails.result - The result data to be handled.
|
|
14757
|
+
* @param {number} pageingDetails.count - The count of results.
|
|
14758
|
+
* @param {ActionEventArgs} pageingDetails.actionArgs - The action arguments related to the virtual page action.
|
|
14759
|
+
* @returns {void}
|
|
14760
|
+
*/
|
|
14024
14761
|
virtualPageAction(pageingDetails) {
|
|
14025
14762
|
const dm = new DataManager(pageingDetails.result);
|
|
14026
14763
|
const expanded = new Predicate$1('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
|
|
@@ -14050,7 +14787,7 @@ class VirtualScroll {
|
|
|
14050
14787
|
if (requestType === 'filtering' || requestType === 'collapseAll' || requestType === 'searching' || (requestType === 'refresh' && getValue('isExpandAll', this.parent)) ||
|
|
14051
14788
|
(requestType === 'refresh' && this.parent.enableCollapseAll && endIndex > visualData.length && isNullOrUndefined(this.expandCollapseRec))) {
|
|
14052
14789
|
startIndex = 0;
|
|
14053
|
-
endIndex = this.parent.grid.pageSettings.pageSize
|
|
14790
|
+
endIndex = this.parent.grid.pageSettings.pageSize;
|
|
14054
14791
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
14055
14792
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
14056
14793
|
}
|
|
@@ -14090,10 +14827,9 @@ class VirtualScroll {
|
|
|
14090
14827
|
sIndex = sIndex > 0 ? sIndex : 0;
|
|
14091
14828
|
endIndex = visualData.length;
|
|
14092
14829
|
if (endIndex - startIndex < resourceCount) {
|
|
14093
|
-
const newRowsCount = sIndex - startIndex;
|
|
14094
14830
|
startIndex = sIndex;
|
|
14095
14831
|
if (visualData.indexOf(this.expandCollapseRec) > visualData.length - resourceCount / 2) {
|
|
14096
|
-
const newTranslateY =
|
|
14832
|
+
const newTranslateY = startIndex * this.parent.grid.getRowHeight();
|
|
14097
14833
|
this.parent.grid.contentModule['translateY'] = newTranslateY;
|
|
14098
14834
|
this.parent.grid.contentModule.virtualEle.adjustTable(0, newTranslateY);
|
|
14099
14835
|
}
|
|
@@ -14116,7 +14852,7 @@ class VirtualScroll {
|
|
|
14116
14852
|
if (pageingDetails.count < this.parent.getRows()[0].getBoundingClientRect().height) {
|
|
14117
14853
|
startIndex = 0;
|
|
14118
14854
|
}
|
|
14119
|
-
else if (!this.parent['isExpandAll']) {
|
|
14855
|
+
else if (!this.parent['isExpandAll'] && this.parent.grid.contentModule['translateY'] === 0) {
|
|
14120
14856
|
startIndex = this.prevstartIndex === -1 ? 0 : this.prevstartIndex;
|
|
14121
14857
|
}
|
|
14122
14858
|
}
|
|
@@ -14143,6 +14879,26 @@ class VirtualScroll {
|
|
|
14143
14879
|
destroy() {
|
|
14144
14880
|
this.removeEventListener();
|
|
14145
14881
|
}
|
|
14882
|
+
/**
|
|
14883
|
+
* Updates the row selection when the header checkbox is clicked and the number of selected rows
|
|
14884
|
+
* does not match the current view data length.
|
|
14885
|
+
*
|
|
14886
|
+
* @param {RowDeselectEventArgs} args - The arguments containing details of the row deselection event.
|
|
14887
|
+
* @returns {void} - This method does not return a value.
|
|
14888
|
+
*/
|
|
14889
|
+
updateSelection(args) {
|
|
14890
|
+
if (args.isHeaderCheckboxClicked &&
|
|
14891
|
+
this.parent.grid.currentViewData.length !== this.parent.grid.selectionModule.selectedRowIndexes.length) {
|
|
14892
|
+
const updateRowSelection = 'updateRowSelection';
|
|
14893
|
+
for (let i = 0; i < this.parent.getRows().length; i++) {
|
|
14894
|
+
if (this.parent.getRows()[parseInt(i.toString(), 10)].getElementsByClassName('e-frame e-icons e-uncheck').length) {
|
|
14895
|
+
this.parent.grid.selectionModule[`${updateRowSelection}`](this.parent.getRows()[parseInt(i.toString(), 10)],
|
|
14896
|
+
// eslint-disable-next-line max-len
|
|
14897
|
+
this.parent.getCurrentViewRecords()[parseInt(i.toString(), 10)].index);
|
|
14898
|
+
}
|
|
14899
|
+
}
|
|
14900
|
+
}
|
|
14901
|
+
}
|
|
14146
14902
|
}
|
|
14147
14903
|
class TreeVirtual extends VirtualScroll$1 {
|
|
14148
14904
|
constructor(parent, locator) {
|
|
@@ -14626,5 +15382,5 @@ class InfiniteScroll {
|
|
|
14626
15382
|
}
|
|
14627
15383
|
}
|
|
14628
15384
|
|
|
14629
|
-
export { Aggregate, AggregateColumn, AggregateRow, Column, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, ContextMenuItems, DataManipulation, DetailRow, Edit, EditSettings, ExcelExport, Filter, FilterSettings, Freeze, InfiniteScroll, InfiniteScrollSettings, LoadingIndicator, Logger, Page, PageSettings, PdfExport, Predicate, Render, Reorder, Resize, RowDD, RowDropSettings, SearchSettings, Selection, SelectionSettings, Sort, SortDescriptor, SortSettings, StackedColumn, Toolbar, ToolbarItem, TreeClipboard, TreeGrid, TreeGridColumn, TreeVirtual, TreeVirtualRowModelGenerator, VirtualScroll, actionBegin, actionComplete, actionFailure, ariaColIndex, ariaRowIndex, autoCol, batchAdd, batchCancel, batchDelete, batchEditFormRendered, batchSave, beforeBatchAdd, beforeBatchCancel, beforeBatchDelete, beforeBatchSave, beforeCopy, beforeDataBound, beforeExcelExport, beforePaste, beforePdfExport, beforeStartEdit, beginAdd, beginEdit, cellEdit, cellSave, cellSaved, checkboxChange, collapsed, collapsing, content, contextMenuClick, contextMenuOpen, crudAction, dataBound,
|
|
15385
|
+
export { Aggregate, AggregateColumn, AggregateRow, Column, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, ContextMenuItems, DataManipulation, DetailRow, Edit, EditSettings, ExcelExport, Filter, FilterSettings, Freeze, InfiniteScroll, InfiniteScrollSettings, LoadingIndicator, Logger, Page, PageSettings, PdfExport, Predicate, Render, Reorder, Resize, RowDD, RowDropSettings, SearchSettings, Selection, SelectionSettings, Sort, SortDescriptor, SortSettings, StackedColumn, Toolbar, ToolbarItem, TreeClipboard, TreeGrid, TreeGridColumn, TreeVirtual, TreeVirtualRowModelGenerator, VirtualScroll, actionBegin, actionComplete, actionFailure, ariaColIndex, ariaRowIndex, autoCol, batchAdd, batchCancel, batchDelete, batchEditFormRendered, batchSave, beforeBatchAdd, beforeBatchCancel, beforeBatchDelete, beforeBatchSave, beforeCopy, beforeDataBound, beforeExcelExport, beforePaste, beforePdfExport, beforeStartEdit, beginAdd, beginEdit, cellEdit, cellSave, cellSaved, checkboxChange, collapsed, collapsing, content, contextMenuClick, contextMenuOpen, crudAction, dataBound, dataListener, dataStateChange, destroy, detailDataBound, doubleTap, expanded, expanding, extendArray, findChildrenRecords, findParentRecords, frozenContent, frozenHeader, frozenLeft, frozenRight, getExpandStatus, getParentData, getPlainData, headerContent, indexModifier, isCheckboxcolumn, isCountRequired, isFilterChildHierarchy, isHidden, isOffline, isRemoteData, keyPressed, leftRight, load, localPagedExpandCollapse, movableContent, movableHeader, pagingActions, printGridInit, queryCellInfo, recordDoubleClick, remoteExpand, resizeStop, rowDataBound, rowDeselected, rowDeselecting, rowDrag, rowDragStart, rowDragStartHelper, rowDrop, rowDropped, rowSelected, rowSelecting, rowdraging, rowsAdd, rowsRemove, savePreviousRowPosition, table, toolbarClick, treeGridDetails, updateData, virtualActionArgs, virtualColumnIndex };
|
|
14630
15386
|
//# sourceMappingURL=ej2-treegrid.es2015.js.map
|