@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
|
@@ -114,13 +114,13 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
114
114
|
}
|
|
115
115
|
TreeGrid_1 = TreeGrid;
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
117
|
+
* Exports the TreeGrid data to an Excel file (.xlsx).
|
|
118
118
|
*
|
|
119
|
-
* @param
|
|
120
|
-
* @param
|
|
121
|
-
* @param
|
|
122
|
-
* @param
|
|
123
|
-
* @returns {Promise<any>} - Returns promise
|
|
119
|
+
* @param {ExcelExportProperties | TreeGridExcelExportProperties} excelExportProperties - The properties used to configure the Excel export.
|
|
120
|
+
* @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
|
|
121
|
+
* @param {workbook} workbook - The workbook instance used for multiple exports.
|
|
122
|
+
* @param {boolean} isBlob - If set to true, the result will be returned as blob data.
|
|
123
|
+
* @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
|
|
124
124
|
*/
|
|
125
125
|
/* eslint-disable */
|
|
126
126
|
TreeGrid.prototype.excelExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
|
|
@@ -128,13 +128,13 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
128
128
|
return this.excelExportModule.Map(excelExportProperties, isMultipleExport, workbook, isBlob, false);
|
|
129
129
|
};
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Exports the TreeGrid data to a CSV file.
|
|
132
132
|
*
|
|
133
|
-
* @param
|
|
134
|
-
* @param
|
|
135
|
-
* @param
|
|
136
|
-
* @param
|
|
137
|
-
* @returns {Promise<any>} - Returns promise
|
|
133
|
+
* @param {ExcelExportProperties} excelExportProperties - The properties used to configure the CSV export.
|
|
134
|
+
* @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
|
|
135
|
+
* @param {workbook} workbook - The workbook instance used for multiple exports.
|
|
136
|
+
* @param {boolean} isBlob - If set to true, the result will be returned as blob data.
|
|
137
|
+
* @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
|
|
138
138
|
*/
|
|
139
139
|
/* eslint-disable */
|
|
140
140
|
TreeGrid.prototype.csvExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
|
|
@@ -142,21 +142,21 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
142
142
|
return this.excelExportModule.Map(excelExportProperties, isMultipleExport, workbook, isBlob, true);
|
|
143
143
|
};
|
|
144
144
|
/**
|
|
145
|
-
*
|
|
145
|
+
* Exports the TreeGrid data to a PDF document.
|
|
146
146
|
*
|
|
147
|
-
* @param {PdfExportProperties | TreeGridPdfExportProperties} pdfExportProperties -
|
|
148
|
-
* @param {boolean} isMultipleExport -
|
|
149
|
-
* @param {Object} pdfDoc -
|
|
150
|
-
* @param {boolean} isBlob - If
|
|
151
|
-
* @returns {Promise<any>} - Returns promise
|
|
147
|
+
* @param {PdfExportProperties | TreeGridPdfExportProperties} pdfExportProperties - The properties used to configure the PDF export.
|
|
148
|
+
* @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
|
|
149
|
+
* @param {Object} pdfDoc - The PDF document instance used for multiple exports.
|
|
150
|
+
* @param {boolean} isBlob - If set to true, the result will be returned as blob data.
|
|
151
|
+
* @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
|
|
152
152
|
*/
|
|
153
153
|
TreeGrid.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
154
154
|
return this.pdfExportModule.Map(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
155
155
|
};
|
|
156
156
|
/**
|
|
157
|
-
* Sends a
|
|
157
|
+
* Sends a POST request to export the TreeGrid to an Excel file on the server side.
|
|
158
158
|
*
|
|
159
|
-
* @param
|
|
159
|
+
* @param {string} url - The URL for the server-side Excel export action.
|
|
160
160
|
* @returns {void}
|
|
161
161
|
*/
|
|
162
162
|
TreeGrid.prototype.serverExcelExport = function (url) {
|
|
@@ -164,9 +164,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
164
164
|
this.exportTreeGrid(url);
|
|
165
165
|
};
|
|
166
166
|
/**
|
|
167
|
-
* Sends a
|
|
167
|
+
* Sends a POST request to export the TreeGrid to a PDF document on the server side.
|
|
168
168
|
*
|
|
169
|
-
* @param
|
|
169
|
+
* @param {string} url - The URL for the server-side PDF export action.
|
|
170
170
|
* @returns {void}
|
|
171
171
|
*/
|
|
172
172
|
TreeGrid.prototype.serverPdfExport = function (url) {
|
|
@@ -174,9 +174,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
174
174
|
this.exportTreeGrid(url);
|
|
175
175
|
};
|
|
176
176
|
/**
|
|
177
|
-
* Sends a
|
|
177
|
+
* Sends a POST request to export the TreeGrid to a CSV file on the server side.
|
|
178
178
|
*
|
|
179
|
-
* @param
|
|
179
|
+
* @param {string} url - The URL for the server-side CSV export action.
|
|
180
180
|
* @returns {void}
|
|
181
181
|
*/
|
|
182
182
|
TreeGrid.prototype.serverCsvExport = function (url) {
|
|
@@ -204,7 +204,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
204
204
|
treeGridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];
|
|
205
205
|
treeGridModel.sortSettings.columns = queries.sorted;
|
|
206
206
|
treeGridModel.columns = this.setHeaderText(treeGridModel.columns, include);
|
|
207
|
-
var form = this.createElement('form', { id: 'ExportForm'
|
|
207
|
+
var form = this.createElement('form', { id: 'ExportForm' });
|
|
208
|
+
form.style.display = 'none';
|
|
208
209
|
var treeGridInput = this.createElement('input', { id: 'treeGridInput', attrs: { name: 'treeGridModel' } });
|
|
209
210
|
treeGridInput.value = JSON.stringify(treeGridModel);
|
|
210
211
|
form.method = 'POST';
|
|
@@ -295,11 +296,11 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
295
296
|
}
|
|
296
297
|
};
|
|
297
298
|
/**
|
|
298
|
-
* Sorts a column with the
|
|
299
|
+
* Sorts a column with the specified options.
|
|
299
300
|
*
|
|
300
|
-
* @param {string} columnName -
|
|
301
|
-
* @param {SortDirection} direction -
|
|
302
|
-
* @param {boolean} isMultiSort - Specifies whether
|
|
301
|
+
* @param {string} columnName - The name of the column to be sorted.
|
|
302
|
+
* @param {SortDirection} direction - The direction of the sorting operation.
|
|
303
|
+
* @param {boolean} isMultiSort - Specifies whether previous sorted columns should be maintained during sorting.
|
|
303
304
|
* @returns {void}
|
|
304
305
|
*/
|
|
305
306
|
TreeGrid.prototype.sortByColumn = function (columnName, direction, isMultiSort) {
|
|
@@ -308,7 +309,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
308
309
|
}
|
|
309
310
|
};
|
|
310
311
|
/**
|
|
311
|
-
* Clears all the sorted columns
|
|
312
|
+
* Clears all the sorted columns in the TreeGrid.
|
|
312
313
|
*
|
|
313
314
|
* @returns {void}
|
|
314
315
|
*/
|
|
@@ -318,9 +319,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
318
319
|
}
|
|
319
320
|
};
|
|
320
321
|
/**
|
|
321
|
-
*
|
|
322
|
+
* Removes the sorted state from a column specified by the field name.
|
|
322
323
|
*
|
|
323
|
-
* @param {string} field -
|
|
324
|
+
* @param {string} field - The field name of the column from which the sort state should be removed.
|
|
324
325
|
* @returns {void}
|
|
325
326
|
* @hidden
|
|
326
327
|
*/
|
|
@@ -330,36 +331,32 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
330
331
|
}
|
|
331
332
|
};
|
|
332
333
|
/**
|
|
333
|
-
* Searches TreeGrid records using
|
|
334
|
-
*
|
|
335
|
-
* [`searchSettings`](./#searchsettings/).
|
|
334
|
+
* Searches for TreeGrid records using a specified search string.
|
|
335
|
+
* Customize the search behavior through the [searchSettings](./#searchsettings/).
|
|
336
336
|
*
|
|
337
|
-
* @param
|
|
337
|
+
* @param {string} searchString - The string used as the search key.
|
|
338
338
|
* @returns {void}
|
|
339
339
|
*/
|
|
340
340
|
TreeGrid.prototype.search = function (searchString) {
|
|
341
341
|
this.grid.search(searchString);
|
|
342
342
|
};
|
|
343
343
|
/**
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
344
|
+
* Adjusts column widths to fit their content, ensuring content is displayed without wrapping or truncation.
|
|
345
|
+
* - Hidden columns are ignored by this method.
|
|
346
|
+
* - Use the `autoFitColumns` method during the `dataBound` event for initial rendering.
|
|
347
347
|
*
|
|
348
|
-
* @param
|
|
348
|
+
* @param {string | string[]} fieldNames - The name(s) of the column(s) to be auto-fitted.
|
|
349
349
|
* @returns {void}
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
350
|
*/
|
|
354
351
|
TreeGrid.prototype.autoFitColumns = function (fieldNames) {
|
|
355
352
|
this.resizeModule.autoFitColumns(fieldNames);
|
|
356
353
|
this.updateColumnModel();
|
|
357
354
|
};
|
|
358
355
|
/**
|
|
359
|
-
*
|
|
356
|
+
* Reorders TreeGrid columns by specifying their field names.
|
|
360
357
|
*
|
|
361
|
-
* @param
|
|
362
|
-
* @param
|
|
358
|
+
* @param {string | string[]} fromFName - The field name(s) of the column(s) to be moved.
|
|
359
|
+
* @param {string} toFName - The destination field name to place the moved columns.
|
|
363
360
|
* @returns {void}
|
|
364
361
|
*/
|
|
365
362
|
TreeGrid.prototype.reorderColumns = function (fromFName, toFName) {
|
|
@@ -382,9 +379,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
382
379
|
}
|
|
383
380
|
};
|
|
384
381
|
/**
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
* [`printMode`](./#printmode).
|
|
382
|
+
* Prints all the pages of the TreeGrid and hides the pager by default.
|
|
383
|
+
* Customize print options using the [printMode](./#printmode).
|
|
388
384
|
*
|
|
389
385
|
* @returns {void}
|
|
390
386
|
*/
|
|
@@ -528,7 +524,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
528
524
|
this.isSelfReference = !isNullOrUndefined(this.parentIdMapping);
|
|
529
525
|
};
|
|
530
526
|
/**
|
|
531
|
-
*
|
|
527
|
+
* Attaches event handlers to the necessary elements during the component's initialization.
|
|
532
528
|
*
|
|
533
529
|
* @hidden
|
|
534
530
|
* @returns {void}
|
|
@@ -546,9 +542,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
546
542
|
}
|
|
547
543
|
};
|
|
548
544
|
/**
|
|
549
|
-
*
|
|
545
|
+
* Provides a list of the modules that are required for rendering the TreeGrid component.
|
|
550
546
|
*
|
|
551
|
-
*
|
|
547
|
+
* This method is essential for ensuring that all dependent modules are loaded and available
|
|
548
|
+
* during the component's lifecycle, enabling full functionality.
|
|
549
|
+
*
|
|
550
|
+
* @returns {ModuleDeclaration[]} - Returns an array of the required TreeGrid module declarations.
|
|
552
551
|
* @hidden
|
|
553
552
|
*/
|
|
554
553
|
TreeGrid.prototype.requiredModules = function () {
|
|
@@ -865,7 +864,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
865
864
|
if (this.enableVirtualization && !isNullOrUndefined(this.detailTemplate)) {
|
|
866
865
|
failureCases.push('Virtual scrolling is not compatible with the detail template');
|
|
867
866
|
}
|
|
868
|
-
if ((this.frozenColumns > 0 || this.columnModel.filter(function (col) { return col.isFrozen; })
|
|
867
|
+
if ((this.frozenColumns > 0 || this.frozenRows > 0 || this.columnModel.filter(function (col) { return col.isFrozen; }))
|
|
869
868
|
&& (!isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.rowTemplate))) {
|
|
870
869
|
failureCases.push('Frozen rows and columns are not supported with the Detail template and row template.');
|
|
871
870
|
}
|
|
@@ -875,9 +874,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
875
874
|
if (this.allowSelection && !isNullOrUndefined(this.rowTemplate)) {
|
|
876
875
|
failureCases.push('Selection is not supported in RowTemplate');
|
|
877
876
|
}
|
|
878
|
-
if (this.treeColumnIndex < 0) {
|
|
879
|
-
failureCases.push('For showing tree structure it is must to set the TreeColumnIndex value.');
|
|
880
|
-
}
|
|
881
877
|
if (this.treeColumnIndex >= this.columns.length) {
|
|
882
878
|
failureCases.push('TreeColumnIndex value should not exceed the total column count.');
|
|
883
879
|
}
|
|
@@ -903,9 +899,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
903
899
|
failureCases.push('Only one column can have the ShowCheckbox option enabled.');
|
|
904
900
|
}
|
|
905
901
|
}
|
|
906
|
-
var alignColumn
|
|
907
|
-
if (
|
|
908
|
-
|
|
902
|
+
var alignColumn;
|
|
903
|
+
if (this.treeColumnIndex !== null && this.treeColumnIndex !== -1) {
|
|
904
|
+
alignColumn = this.columnModel.filter(function (col) { return col.textAlign === 'Right' && col.field === _this.columnModel[_this.treeColumnIndex].field; });
|
|
905
|
+
if (alignColumn.length !== 0) {
|
|
906
|
+
failureCases.push('TextAlign right for the tree column is not applicable.');
|
|
907
|
+
}
|
|
909
908
|
}
|
|
910
909
|
if (failureCases.length > 0) {
|
|
911
910
|
var failureEventArgs_1 = {
|
|
@@ -941,7 +940,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
941
940
|
this.flatData = data;
|
|
942
941
|
this.flatData.filter(function (e) {
|
|
943
942
|
setValue('uniqueIDCollection.' + e.uniqueID, e, _this);
|
|
944
|
-
if (e.level === 0) {
|
|
943
|
+
if (e.level === 0 && !_this.parentData.some(function (record) { return record.uniqueID === e.uniqueID; })) {
|
|
945
944
|
_this.parentData.push(e);
|
|
946
945
|
}
|
|
947
946
|
});
|
|
@@ -1075,14 +1074,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1075
1074
|
_this.trigger(events.rowDeselecting, args);
|
|
1076
1075
|
};
|
|
1077
1076
|
this.grid.rowSelected = function (args) {
|
|
1078
|
-
if (_this.enableVirtualization
|
|
1079
|
-
_this.
|
|
1080
|
-
var updateRowSelection = 'updateRowSelection';
|
|
1081
|
-
for (var i = 0; i < _this.getRows().length; i++) {
|
|
1082
|
-
if (_this.getRows()[parseInt(i.toString(), 10)].getElementsByClassName('e-frame e-icons e-uncheck').length) {
|
|
1083
|
-
_this.grid.selectionModule["" + updateRowSelection](_this.getRows()[parseInt(i.toString(), 10)], _this.getCurrentViewRecords()[parseInt(i.toString(), 10)].index);
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1077
|
+
if (_this.enableVirtualization) {
|
|
1078
|
+
_this.virtualScrollModule.updateSelection(args);
|
|
1086
1079
|
}
|
|
1087
1080
|
_this.selectedRowIndex = _this.grid.selectedRowIndex;
|
|
1088
1081
|
_this.notify(events.rowSelected, args);
|
|
@@ -1824,6 +1817,14 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1824
1817
|
}
|
|
1825
1818
|
return gridColumnCollection;
|
|
1826
1819
|
};
|
|
1820
|
+
TreeGrid.prototype.lastRowCellBorderUpdated = function () {
|
|
1821
|
+
var rows = this.getContentTable().querySelectorAll('tr.e-row');
|
|
1822
|
+
var visibleRows = Array.from(rows).filter(function (row) { return !row.classList.contains('e-childrow-hidden'); });
|
|
1823
|
+
if (visibleRows.length > 0) {
|
|
1824
|
+
var lastVisibleRow = visibleRows[visibleRows.length - 1];
|
|
1825
|
+
this.lastRowBorder(lastVisibleRow, true);
|
|
1826
|
+
}
|
|
1827
|
+
};
|
|
1827
1828
|
/**
|
|
1828
1829
|
* Called internally if any of the property value changed.
|
|
1829
1830
|
*
|
|
@@ -2049,7 +2050,11 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2049
2050
|
this.grid.refreshColumns();
|
|
2050
2051
|
};
|
|
2051
2052
|
/**
|
|
2052
|
-
* Destroys the component
|
|
2053
|
+
* Destroys the TreeGrid component by detaching event handlers,
|
|
2054
|
+
* removing attributes and classes, and clearing the component's DOM elements.
|
|
2055
|
+
*
|
|
2056
|
+
* This method ensures that all resources used by the TreeGrid are properly released
|
|
2057
|
+
* and the component is cleaned up from the DOM to prevent memory leaks.
|
|
2053
2058
|
*
|
|
2054
2059
|
* @method destroy
|
|
2055
2060
|
* @returns {void}
|
|
@@ -2087,7 +2092,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2087
2092
|
this.grid = null;
|
|
2088
2093
|
};
|
|
2089
2094
|
/**
|
|
2090
|
-
*
|
|
2095
|
+
* Updates the TreeGrid model and ensures that the underlying Grid's data model is in sync with TreeGrid.
|
|
2096
|
+
* This method binds current data and settings to the TreeGrid.
|
|
2091
2097
|
*
|
|
2092
2098
|
* @method dataBind
|
|
2093
2099
|
* @returns {void}
|
|
@@ -2106,7 +2112,10 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2106
2112
|
this.grid.dataBind();
|
|
2107
2113
|
};
|
|
2108
2114
|
/**
|
|
2109
|
-
*
|
|
2115
|
+
* Retrieves the properties of the TreeGrid that should be retained and persisted between sessions.
|
|
2116
|
+
*
|
|
2117
|
+
* The method ensures that user preferences and important settings like paging, sorting, filtering,
|
|
2118
|
+
* column configurations, etc., are preserved and can be restored when the component is re-initialized.
|
|
2110
2119
|
*
|
|
2111
2120
|
* @returns {string} - Returns persist properties details
|
|
2112
2121
|
* @hidden
|
|
@@ -2198,7 +2207,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2198
2207
|
}
|
|
2199
2208
|
};
|
|
2200
2209
|
/**
|
|
2201
|
-
*
|
|
2210
|
+
* Retrieves all the TreeGrid row elements.
|
|
2211
|
+
*
|
|
2212
|
+
* This method is useful for accessing the HTML representation of the rows for further manipulation or inspection.
|
|
2202
2213
|
*
|
|
2203
2214
|
* @returns {HTMLTableRowElement[]} - Returns row elements collection
|
|
2204
2215
|
*/
|
|
@@ -2206,7 +2217,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2206
2217
|
return this.grid.getRows();
|
|
2207
2218
|
};
|
|
2208
2219
|
/**
|
|
2209
|
-
*
|
|
2220
|
+
* Obtains the pager element of the TreeGrid.
|
|
2221
|
+
*
|
|
2222
|
+
* The pager enables navigation between pages when the TreeGrid displays paginated data.
|
|
2210
2223
|
*
|
|
2211
2224
|
* @returns {Element} - Returns pager element
|
|
2212
2225
|
*/
|
|
@@ -2214,12 +2227,14 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2214
2227
|
return this.grid.getPager(); //get element from pager
|
|
2215
2228
|
};
|
|
2216
2229
|
/**
|
|
2217
|
-
* Adds a new record to the TreeGrid
|
|
2218
|
-
*
|
|
2230
|
+
* Adds a new record to the TreeGrid at the specified position or default location.
|
|
2231
|
+
*
|
|
2232
|
+
* @param {Object} data - Object containing the data for the new record. If omitted, an empty row is added.
|
|
2233
|
+
* @param {number} index - The index at which the new row should be added.
|
|
2234
|
+
* @param {RowPosition} position - Specifies the position of the new row (e.g., before, after or child).
|
|
2235
|
+
*
|
|
2236
|
+
* > Requires `editSettings.allowAdding` to be true.
|
|
2219
2237
|
*
|
|
2220
|
-
* @param {Object} data - Defines the new add record data.
|
|
2221
|
-
* @param {number} index - Defines the row index to be added.
|
|
2222
|
-
* @param {RowPosition} position - Defines the new row position to be added.
|
|
2223
2238
|
* @returns {void}
|
|
2224
2239
|
*/
|
|
2225
2240
|
TreeGrid.prototype.addRecord = function (data, index, position) {
|
|
@@ -2230,7 +2245,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2230
2245
|
}
|
|
2231
2246
|
};
|
|
2232
2247
|
/**
|
|
2233
|
-
* Cancels
|
|
2248
|
+
* Cancels the current edit operation on the TreeGrid.
|
|
2249
|
+
*
|
|
2250
|
+
* This method discards changes made to the row and exits the edit mode without saving.
|
|
2234
2251
|
*
|
|
2235
2252
|
* @returns {void}
|
|
2236
2253
|
*/
|
|
@@ -2240,7 +2257,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2240
2257
|
}
|
|
2241
2258
|
};
|
|
2242
2259
|
/**
|
|
2243
|
-
* Saves the cell
|
|
2260
|
+
* Saves the current cell value changes without committing to the data source.
|
|
2261
|
+
*
|
|
2262
|
+
* This operation persists the changes in the UI but not in the underlying data model.
|
|
2244
2263
|
*
|
|
2245
2264
|
* @returns {void}
|
|
2246
2265
|
*/
|
|
@@ -2250,7 +2269,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2250
2269
|
}
|
|
2251
2270
|
};
|
|
2252
2271
|
/**
|
|
2253
|
-
*
|
|
2272
|
+
* Updates the value of a specific cell directly, bypassing the edit mode.
|
|
2273
|
+
*
|
|
2274
|
+
* This method provides a quick way to update the UI and data without user interaction.
|
|
2254
2275
|
*
|
|
2255
2276
|
* @param {number} rowIndex Defines the row index.
|
|
2256
2277
|
* @param {string} field Defines the column field.
|
|
@@ -2263,10 +2284,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2263
2284
|
}
|
|
2264
2285
|
};
|
|
2265
2286
|
/**
|
|
2266
|
-
*
|
|
2287
|
+
* Updates a specific row with given values directly, skipping the edit state.
|
|
2288
|
+
*
|
|
2289
|
+
* This method allows for bulk updates of row data programmatically.
|
|
2267
2290
|
*
|
|
2268
|
-
* @param {number} index
|
|
2269
|
-
* @param {Object} data
|
|
2291
|
+
* @param {number} index - The index of the row to update.
|
|
2292
|
+
* @param {Object} data - The data object containing updated field values.
|
|
2270
2293
|
* @returns {void}
|
|
2271
2294
|
*/
|
|
2272
2295
|
TreeGrid.prototype.updateRow = function (index, data) {
|
|
@@ -2282,12 +2305,13 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2282
2305
|
}
|
|
2283
2306
|
};
|
|
2284
2307
|
/**
|
|
2285
|
-
*
|
|
2286
|
-
* > `editSettings.allowDeleting` should be true.
|
|
2308
|
+
* Deletes a record based on specified criteria or the selected record if none specified.
|
|
2287
2309
|
*
|
|
2288
|
-
* @param {string} fieldName -
|
|
2289
|
-
* @param {Object} data -
|
|
2310
|
+
* @param {string} fieldName - The name of the primary key field.
|
|
2311
|
+
* @param {Object} data - The data object representing the record to delete.
|
|
2290
2312
|
* @returns {void}
|
|
2313
|
+
*
|
|
2314
|
+
* > Requires `editSettings.allowDeleting` to be true.
|
|
2291
2315
|
*/
|
|
2292
2316
|
TreeGrid.prototype.deleteRecord = function (fieldName, data) {
|
|
2293
2317
|
if ((isNullOrUndefined(fieldName) && (isNullOrUndefined(data)) || (this.getSelectedRecords().length <= 0))) {
|
|
@@ -2299,9 +2323,11 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2299
2323
|
}
|
|
2300
2324
|
};
|
|
2301
2325
|
/**
|
|
2302
|
-
*
|
|
2326
|
+
* Initiates editing for a specific row using its HTML element.
|
|
2327
|
+
*
|
|
2328
|
+
* This allows for manual control of which row enters edit mode through the UI.
|
|
2303
2329
|
*
|
|
2304
|
-
* @param {HTMLTableRowElement} row -
|
|
2330
|
+
* @param {HTMLTableRowElement} row - The table row element to enter into edit mode.
|
|
2305
2331
|
* @returns {void}
|
|
2306
2332
|
*/
|
|
2307
2333
|
TreeGrid.prototype.startEdit = function (row) {
|
|
@@ -2310,10 +2336,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2310
2336
|
}
|
|
2311
2337
|
};
|
|
2312
2338
|
/**
|
|
2313
|
-
*
|
|
2339
|
+
* Begins editing of a specific cell using row and field indices.
|
|
2340
|
+
*
|
|
2341
|
+
* Customers can programmatically specify which cell to edit without user input.
|
|
2314
2342
|
*
|
|
2315
|
-
* @param {number} rowIndex -
|
|
2316
|
-
* @param {string} field -
|
|
2343
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
|
2344
|
+
* @param {string} field - The field name of the cell to edit.
|
|
2317
2345
|
* @returns {void}
|
|
2318
2346
|
*/
|
|
2319
2347
|
TreeGrid.prototype.editCell = function (rowIndex, field) {
|
|
@@ -2322,10 +2350,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2322
2350
|
}
|
|
2323
2351
|
};
|
|
2324
2352
|
/**
|
|
2325
|
-
* Enables or disables ToolBar items.
|
|
2353
|
+
* Enables or disables specified ToolBar items within the TreeGrid.
|
|
2326
2354
|
*
|
|
2327
|
-
*
|
|
2328
|
-
*
|
|
2355
|
+
* This facilitates dynamic control of toolbar actions based on application logic.
|
|
2356
|
+
*
|
|
2357
|
+
* @param {string[]} items - Array of ToolBar item IDs to enable or disable.
|
|
2358
|
+
* @param {boolean} isEnable - Boolean flag to determine whether to enable (true) or disable (false) items.
|
|
2329
2359
|
* @returns {void}
|
|
2330
2360
|
*/
|
|
2331
2361
|
TreeGrid.prototype.enableToolbarItems = function (items, isEnable) {
|
|
@@ -2334,7 +2364,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2334
2364
|
}
|
|
2335
2365
|
};
|
|
2336
2366
|
/**
|
|
2337
|
-
*
|
|
2367
|
+
* Commits the edits made to a record in edit mode, updating the data source.
|
|
2368
|
+
*
|
|
2369
|
+
* Use this method to finalize changes for rows in edit mode, ensuring persistence.
|
|
2338
2370
|
*
|
|
2339
2371
|
* @returns {void}
|
|
2340
2372
|
*/
|
|
@@ -2344,10 +2376,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2344
2376
|
}
|
|
2345
2377
|
};
|
|
2346
2378
|
/**
|
|
2347
|
-
*
|
|
2379
|
+
* Displays the column chooser at a specified screen position.
|
|
2348
2380
|
*
|
|
2349
|
-
*
|
|
2350
|
-
*
|
|
2381
|
+
* Useful for customizing the visibility of columns interactively via the UI.
|
|
2382
|
+
*
|
|
2383
|
+
* @param {number} x - The X-axis position of the column chooser.
|
|
2384
|
+
* @param {number} y - The Y-axis position of the column chooser.
|
|
2351
2385
|
* @returns {void}
|
|
2352
2386
|
*/
|
|
2353
2387
|
TreeGrid.prototype.openColumnChooser = function (x, y) {
|
|
@@ -2356,9 +2390,11 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2356
2390
|
}
|
|
2357
2391
|
};
|
|
2358
2392
|
/**
|
|
2359
|
-
*
|
|
2393
|
+
* Deletes a visible row from the TreeGrid using its HTML element.
|
|
2394
|
+
*
|
|
2395
|
+
* Apply this method when handling row deletions through DOM manipulations.
|
|
2360
2396
|
*
|
|
2361
|
-
* @param {HTMLTableRowElement} tr -
|
|
2397
|
+
* @param {HTMLTableRowElement} tr - The table row element to remove.
|
|
2362
2398
|
* @returns {void}
|
|
2363
2399
|
*/
|
|
2364
2400
|
TreeGrid.prototype.deleteRow = function (tr) {
|
|
@@ -2367,20 +2403,23 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2367
2403
|
}
|
|
2368
2404
|
};
|
|
2369
2405
|
/**
|
|
2370
|
-
*
|
|
2406
|
+
* Retrieves the primary key field names used in the TreeGrid.
|
|
2407
|
+
*
|
|
2408
|
+
* This information is crucial for identifying and manipulating unique rows.
|
|
2371
2409
|
*
|
|
2372
|
-
* @returns {string[]} - Returns primary key
|
|
2410
|
+
* @returns {string[]} - Returns an array of primary key field names.
|
|
2373
2411
|
*/
|
|
2374
2412
|
TreeGrid.prototype.getPrimaryKeyFieldNames = function () {
|
|
2375
2413
|
return this.grid.getPrimaryKeyFieldNames();
|
|
2376
2414
|
};
|
|
2377
2415
|
/**
|
|
2378
|
-
* Updates
|
|
2379
|
-
* > Primary key column must be specified using `columns.isPrimaryKey` property.
|
|
2416
|
+
* Updates the value of a specific cell using its primary key for identification.
|
|
2380
2417
|
*
|
|
2381
|
-
*
|
|
2382
|
-
*
|
|
2383
|
-
* @param {string
|
|
2418
|
+
* Useful for targeted updates that leverage unique identifiers to ensure accuracy.
|
|
2419
|
+
*
|
|
2420
|
+
* @param {string| number} key - The primary key value of the row containing the cell.
|
|
2421
|
+
* @param {string} field - The field name of the cell to update.
|
|
2422
|
+
* @param {string | number | boolean | Date} value - The new value to assign to the specified cell.
|
|
2384
2423
|
* @returns {void}
|
|
2385
2424
|
*/
|
|
2386
2425
|
TreeGrid.prototype.setCellValue = function (key, field, value) {
|
|
@@ -2390,11 +2429,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2390
2429
|
editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, field);
|
|
2391
2430
|
};
|
|
2392
2431
|
/**
|
|
2393
|
-
* Updates
|
|
2394
|
-
*
|
|
2432
|
+
* Updates the data for a specific row identified by its primary key and refreshes the display.
|
|
2433
|
+
*
|
|
2434
|
+
* Important for keeping the displayed data consistent with the source database or dataset.
|
|
2395
2435
|
*
|
|
2396
|
-
*
|
|
2397
|
-
*
|
|
2436
|
+
* @param {string| number} key - The primary key value of the row to update.
|
|
2437
|
+
* @param {Object} rowData - The new data to apply to the row.
|
|
2398
2438
|
* @returns {void}
|
|
2399
2439
|
*/
|
|
2400
2440
|
TreeGrid.prototype.setRowData = function (key, rowData) {
|
|
@@ -2432,9 +2472,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2432
2472
|
}
|
|
2433
2473
|
};
|
|
2434
2474
|
/**
|
|
2435
|
-
* Navigates to
|
|
2475
|
+
* Navigates to a specified page number within the TreeGrid pagination.
|
|
2436
2476
|
*
|
|
2437
|
-
*
|
|
2477
|
+
* This can be used to programmatically change the page being viewed,
|
|
2478
|
+
* allowing for scripted navigation through data.
|
|
2479
|
+
*
|
|
2480
|
+
* @param {number} pageNo - The page number to navigate to. Must be within valid page range.
|
|
2438
2481
|
* @returns {void}
|
|
2439
2482
|
*/
|
|
2440
2483
|
TreeGrid.prototype.goToPage = function (pageNo) {
|
|
@@ -2443,9 +2486,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2443
2486
|
}
|
|
2444
2487
|
};
|
|
2445
2488
|
/**
|
|
2446
|
-
*
|
|
2489
|
+
* Updates the external message displayed within the pager component.
|
|
2490
|
+
*
|
|
2491
|
+
* This is useful for showing custom messages or additional information
|
|
2492
|
+
* related to the data set or pagination status.
|
|
2447
2493
|
*
|
|
2448
|
-
* @param
|
|
2494
|
+
* @param {string} message - The custom message to display in the pager.
|
|
2449
2495
|
* @returns {void}
|
|
2450
2496
|
*/
|
|
2451
2497
|
TreeGrid.prototype.updateExternalMessage = function (message) {
|
|
@@ -2454,20 +2500,26 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2454
2500
|
}
|
|
2455
2501
|
};
|
|
2456
2502
|
/**
|
|
2457
|
-
*
|
|
2503
|
+
* Retrieves a cell element based on its row and column indices in the TreeGrid.
|
|
2458
2504
|
*
|
|
2459
|
-
*
|
|
2460
|
-
*
|
|
2461
|
-
*
|
|
2505
|
+
* This method is helpful for accessing cell-level elements for custom
|
|
2506
|
+
* operations or styling.
|
|
2507
|
+
*
|
|
2508
|
+
* @param {number} rowIndex - The index of the row containing the cell.
|
|
2509
|
+
* @param {number} columnIndex - The index of the column containing the cell.
|
|
2510
|
+
* @returns {Element} - Returns the HTML element of the specified cell.
|
|
2462
2511
|
*/
|
|
2463
2512
|
TreeGrid.prototype.getCellFromIndex = function (rowIndex, columnIndex) {
|
|
2464
2513
|
return this.grid.getCellFromIndex(rowIndex, columnIndex);
|
|
2465
2514
|
};
|
|
2466
2515
|
/**
|
|
2467
|
-
*
|
|
2516
|
+
* Retrieves a column object by the column's field name.
|
|
2468
2517
|
*
|
|
2469
|
-
*
|
|
2470
|
-
*
|
|
2518
|
+
* This is typically used for obtaining the details of a column for
|
|
2519
|
+
* configuration or data manipulation purposes.
|
|
2520
|
+
*
|
|
2521
|
+
* @param {string} field - The field name of the column.
|
|
2522
|
+
* @returns {Column} - Returns the column object corresponding to the field.
|
|
2471
2523
|
*/
|
|
2472
2524
|
TreeGrid.prototype.getColumnByField = function (field) {
|
|
2473
2525
|
return iterateArrayOrObject(this.columnModel, function (item) {
|
|
@@ -2478,10 +2530,13 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2478
2530
|
})[0];
|
|
2479
2531
|
};
|
|
2480
2532
|
/**
|
|
2481
|
-
*
|
|
2533
|
+
* Fetches a column object using the column's unique identifier (UID).
|
|
2534
|
+
*
|
|
2535
|
+
* Useful in scenarios where columns do not have unique field names but
|
|
2536
|
+
* are uniquely identifiable via UID.
|
|
2482
2537
|
*
|
|
2483
|
-
* @param
|
|
2484
|
-
* @returns {Column} - Returns
|
|
2538
|
+
* @param {string} uid - The unique identifier for the column.
|
|
2539
|
+
* @returns {Column} - Returns the column object for the given UID.
|
|
2485
2540
|
*/
|
|
2486
2541
|
TreeGrid.prototype.getColumnByUid = function (uid) {
|
|
2487
2542
|
var Columns = this.initialRender ? this.grid.columns : this.columns;
|
|
@@ -2497,34 +2552,45 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2497
2552
|
})[0];
|
|
2498
2553
|
};
|
|
2499
2554
|
/**
|
|
2500
|
-
*
|
|
2555
|
+
* Retrieves the names of all column fields in the TreeGrid.
|
|
2556
|
+
*
|
|
2557
|
+
* This method provides a list of field names useful for dynamic operations
|
|
2558
|
+
* or configuration where fields need to be enumerated or manipulated.
|
|
2501
2559
|
*
|
|
2502
|
-
* @returns {string[]} - Returns column field
|
|
2560
|
+
* @returns {string[]} - Returns an array of column field names.
|
|
2503
2561
|
*/
|
|
2504
2562
|
TreeGrid.prototype.getColumnFieldNames = function () {
|
|
2505
2563
|
return this.grid.getColumnFieldNames();
|
|
2506
2564
|
};
|
|
2507
2565
|
/**
|
|
2508
|
-
*
|
|
2566
|
+
* Retrieves the footer content element of the TreeGrid, usually for styling or custom manipulation.
|
|
2509
2567
|
*
|
|
2510
|
-
*
|
|
2568
|
+
* This can be used to access the footer for adding custom functionality
|
|
2569
|
+
* or styling purposes to enhance user interaction at the bottom of the grid.
|
|
2570
|
+
*
|
|
2571
|
+
* @returns {Element} - Returns the footer content HTML element.
|
|
2511
2572
|
*/
|
|
2512
2573
|
TreeGrid.prototype.getFooterContent = function () {
|
|
2513
2574
|
return this.grid.getFooterContent();
|
|
2514
2575
|
};
|
|
2515
2576
|
/**
|
|
2516
|
-
*
|
|
2577
|
+
* Acquires the footer table element of the TreeGrid for layout management.
|
|
2578
|
+
*
|
|
2579
|
+
* Useful for manipulating the table's structure or style beneath the grid content.
|
|
2517
2580
|
*
|
|
2518
|
-
* @returns {Element} - Returns footer
|
|
2581
|
+
* @returns {Element} - Returns the footer table HTML element.
|
|
2519
2582
|
*/
|
|
2520
2583
|
TreeGrid.prototype.getFooterContentTable = function () {
|
|
2521
2584
|
return this.grid.getFooterContentTable();
|
|
2522
2585
|
};
|
|
2523
2586
|
/**
|
|
2524
|
-
* Shows
|
|
2587
|
+
* Shows one or more columns based on the specified column names.
|
|
2525
2588
|
*
|
|
2526
|
-
*
|
|
2527
|
-
*
|
|
2589
|
+
* This is useful for dynamically adjusting the visibility of columns
|
|
2590
|
+
* based on user actions or application logic.
|
|
2591
|
+
*
|
|
2592
|
+
* @param {string|string[]} keys - A single column name or an array of column names to show.
|
|
2593
|
+
* @param {string} showBy - Key to determine visibility either as field name or header text.
|
|
2528
2594
|
* @returns {void}
|
|
2529
2595
|
*/
|
|
2530
2596
|
TreeGrid.prototype.showColumns = function (keys, showBy) {
|
|
@@ -2532,10 +2598,13 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2532
2598
|
this.updateColumnModel();
|
|
2533
2599
|
};
|
|
2534
2600
|
/**
|
|
2535
|
-
* Hides
|
|
2601
|
+
* Hides one or more columns based on the specified column names.
|
|
2602
|
+
*
|
|
2603
|
+
* Utilized to dynamically reduce the visibility of columns based on
|
|
2604
|
+
* user roles or preferences.
|
|
2536
2605
|
*
|
|
2537
|
-
* @param
|
|
2538
|
-
* @param
|
|
2606
|
+
* @param {string|string[]} keys - A single column name or an array of column names to hide.
|
|
2607
|
+
* @param {string} hideBy - Key to evaluate columns either as field name or header text.
|
|
2539
2608
|
* @returns {void}
|
|
2540
2609
|
*/
|
|
2541
2610
|
TreeGrid.prototype.hideColumns = function (keys, hideBy) {
|
|
@@ -2543,37 +2612,48 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2543
2612
|
this.updateColumnModel();
|
|
2544
2613
|
};
|
|
2545
2614
|
/**
|
|
2546
|
-
*
|
|
2615
|
+
* Retrieves a column header element based on the field name of the column.
|
|
2616
|
+
*
|
|
2617
|
+
* This method helps to directly manipulate headers, such as applying custom styles.
|
|
2547
2618
|
*
|
|
2548
|
-
* @param
|
|
2549
|
-
* @returns {Element} - Returns column header
|
|
2619
|
+
* @param {string} field - The field name of the desired column.
|
|
2620
|
+
* @returns {Element} - Returns the HTML element of the column header.
|
|
2550
2621
|
*/
|
|
2551
2622
|
TreeGrid.prototype.getColumnHeaderByField = function (field) {
|
|
2552
2623
|
return this.grid.getColumnHeaderByField(field);
|
|
2553
2624
|
};
|
|
2554
2625
|
/**
|
|
2555
|
-
*
|
|
2626
|
+
* Acquires the column header element using the column's index.
|
|
2556
2627
|
*
|
|
2557
|
-
*
|
|
2558
|
-
*
|
|
2628
|
+
* Suitable for situations where direct column index is available
|
|
2629
|
+
* and header access is needed for operations.
|
|
2630
|
+
*
|
|
2631
|
+
* @param {number} index - The index of the column.
|
|
2632
|
+
* @returns {Element} - Returns the HTML element of the specified column header.
|
|
2559
2633
|
*/
|
|
2560
2634
|
TreeGrid.prototype.getColumnHeaderByIndex = function (index) {
|
|
2561
2635
|
return this.grid.getColumnHeaderByIndex(index);
|
|
2562
2636
|
};
|
|
2563
2637
|
/**
|
|
2564
|
-
*
|
|
2638
|
+
* Retrieves a column header element utilizing the column's UID.
|
|
2565
2639
|
*
|
|
2566
|
-
*
|
|
2567
|
-
*
|
|
2640
|
+
* Useful for precision access to header elements when UIDs are used
|
|
2641
|
+
* uniquely to manage column identities.
|
|
2642
|
+
*
|
|
2643
|
+
* @param {string} uid - The UID of the column.
|
|
2644
|
+
* @returns {Element} - Returns the HTML element of the column header.
|
|
2568
2645
|
*/
|
|
2569
2646
|
TreeGrid.prototype.getColumnHeaderByUid = function (uid) {
|
|
2570
2647
|
return this.grid.getColumnHeaderByUid(uid);
|
|
2571
2648
|
};
|
|
2572
2649
|
/**
|
|
2573
|
-
*
|
|
2650
|
+
* Determines the column index by the specified field name.
|
|
2651
|
+
*
|
|
2652
|
+
* Helpful in converting field names to indices for operations that require
|
|
2653
|
+
* numeric input for array or collection indexing.
|
|
2574
2654
|
*
|
|
2575
|
-
* @param
|
|
2576
|
-
* @returns {number} - Returns
|
|
2655
|
+
* @param {string} field - The field name of the column.
|
|
2656
|
+
* @returns {number} - Returns the index of the column.
|
|
2577
2657
|
*/
|
|
2578
2658
|
TreeGrid.prototype.getColumnIndexByField = function (field) {
|
|
2579
2659
|
return this.grid.getColumnIndexByField(field);
|
|
@@ -2589,19 +2669,25 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2589
2669
|
return !isNullOrUndefined(index) ? index : -1;
|
|
2590
2670
|
};
|
|
2591
2671
|
/**
|
|
2592
|
-
*
|
|
2672
|
+
* Determines the column index based on the unique identifier (UID).
|
|
2673
|
+
*
|
|
2674
|
+
* This can be crucial in scenarios that involve dynamic column management
|
|
2675
|
+
* where UID provides an accurate reference.
|
|
2593
2676
|
*
|
|
2594
|
-
* @param
|
|
2595
|
-
* @returns {number} - Returns column index
|
|
2677
|
+
* @param {string} uid - The UID of the column.
|
|
2678
|
+
* @returns {number} - Returns the column index.
|
|
2596
2679
|
*/
|
|
2597
2680
|
TreeGrid.prototype.getColumnIndexByUid = function (uid) {
|
|
2598
2681
|
return this.grid.getColumnIndexByUid(uid);
|
|
2599
2682
|
};
|
|
2600
2683
|
/**
|
|
2601
|
-
*
|
|
2684
|
+
* Fetches a collection of columns from the TreeGrid optionally refreshing the column model.
|
|
2602
2685
|
*
|
|
2603
|
-
*
|
|
2604
|
-
*
|
|
2686
|
+
* Use this method to retrieve and optionally refresh the list of columns
|
|
2687
|
+
* to ensure up-to-date configurations and settings.
|
|
2688
|
+
*
|
|
2689
|
+
* @param {boolean} isRefresh - Determines whether to refresh the grid's column model.
|
|
2690
|
+
* @returns {Column[]} - Returns an array of TreeGrid column objects.
|
|
2605
2691
|
*/
|
|
2606
2692
|
TreeGrid.prototype.getColumns = function (isRefresh) {
|
|
2607
2693
|
this.updateColumnModel(this.grid.getColumns(isRefresh));
|
|
@@ -2664,9 +2750,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2664
2750
|
});
|
|
2665
2751
|
};
|
|
2666
2752
|
/**
|
|
2667
|
-
*
|
|
2753
|
+
* Retrieves the main content area of the TreeGrid.
|
|
2754
|
+
*
|
|
2755
|
+
* This method allows access to the main content DIV, which can
|
|
2756
|
+
* be used for layout adjustments or adding custom elements.
|
|
2668
2757
|
*
|
|
2669
|
-
* @returns {Element} -
|
|
2758
|
+
* @returns {Element} - Returns the TreeGrid content HTML element.
|
|
2670
2759
|
*/
|
|
2671
2760
|
TreeGrid.prototype.getContent = function () {
|
|
2672
2761
|
return this.grid.getContent();
|
|
@@ -2697,17 +2786,23 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2697
2786
|
this.setProperties({ sortSettings: getObject('properties', this.grid.sortSettings) }, true);
|
|
2698
2787
|
};
|
|
2699
2788
|
/**
|
|
2700
|
-
*
|
|
2789
|
+
* Retrieves the content table element of the TreeGrid.
|
|
2701
2790
|
*
|
|
2702
|
-
*
|
|
2791
|
+
* This table contains the main data display area, allowing for
|
|
2792
|
+
* interaction and data manipulation directly within the TreeGrid.
|
|
2793
|
+
*
|
|
2794
|
+
* @returns {Element} - Returns the HTML element representing the content table.
|
|
2703
2795
|
*/
|
|
2704
2796
|
TreeGrid.prototype.getContentTable = function () {
|
|
2705
2797
|
return this.grid.getContentTable();
|
|
2706
2798
|
};
|
|
2707
2799
|
/**
|
|
2708
|
-
*
|
|
2800
|
+
* Obtains all data row elements from the TreeGrid, excluding summary rows.
|
|
2801
|
+
*
|
|
2802
|
+
* Provides a way to access the visual representation of data for purposes
|
|
2803
|
+
* like custom formatting or event binding.
|
|
2709
2804
|
*
|
|
2710
|
-
* @returns {Element[]} - Returns row elements
|
|
2805
|
+
* @returns {Element[]} - Returns an array of data row elements.
|
|
2711
2806
|
*/
|
|
2712
2807
|
TreeGrid.prototype.getDataRows = function () {
|
|
2713
2808
|
var dRows = [];
|
|
@@ -2720,9 +2815,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2720
2815
|
return dRows;
|
|
2721
2816
|
};
|
|
2722
2817
|
/**
|
|
2723
|
-
*
|
|
2818
|
+
* Retrieves the current set of records that are visible in the TreeGrid view.
|
|
2819
|
+
*
|
|
2820
|
+
* This method excludes any summary rows to focus on the main data set
|
|
2821
|
+
* currently being viewed by the user.
|
|
2724
2822
|
*
|
|
2725
|
-
* @returns {Object[]} - Returns current view records
|
|
2823
|
+
* @returns {Object[]} - Returns an array of the current view records.
|
|
2726
2824
|
* @isGenericType true
|
|
2727
2825
|
*/
|
|
2728
2826
|
TreeGrid.prototype.getCurrentViewRecords = function () {
|
|
@@ -2730,60 +2828,78 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2730
2828
|
return this.grid.currentViewData.filter(function (e) { return isNullOrUndefined(e["" + isSummaryRow]); });
|
|
2731
2829
|
};
|
|
2732
2830
|
/**
|
|
2733
|
-
*
|
|
2831
|
+
* Collects data changes (added, edited, and deleted) that have not been saved in batch mode.
|
|
2734
2832
|
*
|
|
2735
|
-
*
|
|
2833
|
+
* This allows you to view pending changes awaiting a commit to the data source.
|
|
2834
|
+
*
|
|
2835
|
+
* @returns {Object} - Returns an object detailing batch changes.
|
|
2736
2836
|
*/
|
|
2737
2837
|
TreeGrid.prototype.getBatchChanges = function () {
|
|
2738
2838
|
return this.grid.editModule.getBatchChanges();
|
|
2739
2839
|
};
|
|
2740
2840
|
/**
|
|
2741
|
-
*
|
|
2841
|
+
* Retrieves the header content element of the TreeGrid.
|
|
2842
|
+
*
|
|
2843
|
+
* Mainly used for interacting with the header section, which includes
|
|
2844
|
+
* column headers and any applied header styling or events.
|
|
2742
2845
|
*
|
|
2743
|
-
* @returns {Element} - Returns
|
|
2846
|
+
* @returns {Element} - Returns the HTML element for header content.
|
|
2744
2847
|
*/
|
|
2745
2848
|
TreeGrid.prototype.getHeaderContent = function () {
|
|
2746
2849
|
return this.grid.getHeaderContent();
|
|
2747
2850
|
};
|
|
2748
2851
|
/**
|
|
2749
|
-
*
|
|
2852
|
+
* Retrieves the header table element of the TreeGrid.
|
|
2750
2853
|
*
|
|
2751
|
-
*
|
|
2854
|
+
* This method is useful for direct access to the table structure
|
|
2855
|
+
* where column headers are defined.
|
|
2856
|
+
*
|
|
2857
|
+
* @returns {Element} - Returns the HTML element for the header table.
|
|
2752
2858
|
*/
|
|
2753
2859
|
TreeGrid.prototype.getHeaderTable = function () {
|
|
2754
2860
|
return this.grid.getHeaderTable();
|
|
2755
2861
|
};
|
|
2756
2862
|
/**
|
|
2757
|
-
*
|
|
2863
|
+
* Fetches a specific row element based on its index in the TreeGrid.
|
|
2758
2864
|
*
|
|
2759
|
-
*
|
|
2760
|
-
*
|
|
2865
|
+
* This provides a way to directly access and manipulate a row using its index.
|
|
2866
|
+
*
|
|
2867
|
+
* @param {number} index - The index of the desired row.
|
|
2868
|
+
* @returns {Element} - Returns the HTML element of the specified row.
|
|
2761
2869
|
*/
|
|
2762
2870
|
TreeGrid.prototype.getRowByIndex = function (index) {
|
|
2763
2871
|
return this.grid.getRowByIndex(index);
|
|
2764
2872
|
};
|
|
2765
2873
|
/**
|
|
2766
|
-
*
|
|
2874
|
+
* Provides detailed information about a row based on a specified target element.
|
|
2767
2875
|
*
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
2876
|
+
* Integral for retrieving metadata such as row index or data object
|
|
2877
|
+
* when working with events or complex tree structures.
|
|
2878
|
+
*
|
|
2879
|
+
* @param {Element | EventTarget} target - The target element or event triggering the request.
|
|
2880
|
+
* @returns {RowInfo} - Returns an object containing row information.
|
|
2770
2881
|
*/
|
|
2771
2882
|
TreeGrid.prototype.getRowInfo = function (target) {
|
|
2772
2883
|
return this.grid.getRowInfo(target);
|
|
2773
2884
|
};
|
|
2774
2885
|
/**
|
|
2775
|
-
*
|
|
2886
|
+
* Finds the unique identifier (UID) for a column based on its field name.
|
|
2887
|
+
*
|
|
2888
|
+
* UIDs are essential for precise identification and manipulation within complex grids.
|
|
2776
2889
|
*
|
|
2777
|
-
* @param
|
|
2778
|
-
* @returns {string} - Returns unique
|
|
2890
|
+
* @param {string} field - The field name of the column.
|
|
2891
|
+
* @returns {string} - Returns the unique identifier for the specified column.
|
|
2779
2892
|
*/
|
|
2780
2893
|
TreeGrid.prototype.getUidByColumnField = function (field) {
|
|
2781
2894
|
return this.grid.getUidByColumnField(field);
|
|
2782
2895
|
};
|
|
2783
2896
|
/**
|
|
2784
|
-
*
|
|
2897
|
+
* Retrieves all the columns that are currently set to be visible within the TreeGrid.
|
|
2785
2898
|
*
|
|
2786
|
-
*
|
|
2899
|
+
* Helps in understanding the user's current view and can be used to dynamically
|
|
2900
|
+
* adjust the visible columns.
|
|
2901
|
+
*
|
|
2902
|
+
* @returns {Column[]} - Returns an array of visible column objects.
|
|
2787
2903
|
*/
|
|
2788
2904
|
TreeGrid.prototype.getVisibleColumns = function () {
|
|
2789
2905
|
var cols = [];
|
|
@@ -2796,7 +2912,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2796
2912
|
return cols;
|
|
2797
2913
|
};
|
|
2798
2914
|
/**
|
|
2799
|
-
*
|
|
2915
|
+
* Displays a loading spinner overlay across the TreeGrid for any data action or long-running process.
|
|
2916
|
+
*
|
|
2917
|
+
* This can be manually invoked to indicate processing, enhancing user experience by providing feedback.
|
|
2800
2918
|
*
|
|
2801
2919
|
* @returns {void}
|
|
2802
2920
|
*/
|
|
@@ -2804,7 +2922,10 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2804
2922
|
showSpinner(this.element);
|
|
2805
2923
|
};
|
|
2806
2924
|
/**
|
|
2807
|
-
*
|
|
2925
|
+
* Hides a manually shown loading spinner overlay from the TreeGrid.
|
|
2926
|
+
*
|
|
2927
|
+
* Ensures that any long-running process indication is removed after completion
|
|
2928
|
+
* to manage user interface aesthetics.
|
|
2808
2929
|
*
|
|
2809
2930
|
* @returns {void}
|
|
2810
2931
|
*/
|
|
@@ -2812,7 +2933,10 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2812
2933
|
hideSpinner(this.element);
|
|
2813
2934
|
};
|
|
2814
2935
|
/**
|
|
2815
|
-
* Refreshes the TreeGrid header and content.
|
|
2936
|
+
* Refreshes the visual appearance and data of the TreeGrid, updating header and content.
|
|
2937
|
+
*
|
|
2938
|
+
* This is crucial for synchronizing the displayed data with the underlying data source,
|
|
2939
|
+
* ensuring the view reflects current data.
|
|
2816
2940
|
*
|
|
2817
2941
|
* @returns {void}
|
|
2818
2942
|
*/
|
|
@@ -2832,18 +2956,24 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2832
2956
|
this.grid.refresh();
|
|
2833
2957
|
};
|
|
2834
2958
|
/**
|
|
2835
|
-
*
|
|
2959
|
+
* Retrieves the records associated with rows that have their checkboxes checked.
|
|
2960
|
+
*
|
|
2961
|
+
* Facilitates operations that require information about specifically selected or
|
|
2962
|
+
* interacted rows within the grid.
|
|
2836
2963
|
*
|
|
2837
|
-
* @returns {Object[]} - Returns
|
|
2964
|
+
* @returns {Object[]} - Returns an array of checked row data objects.
|
|
2838
2965
|
* @isGenericType true
|
|
2839
2966
|
*/
|
|
2840
2967
|
TreeGrid.prototype.getCheckedRecords = function () {
|
|
2841
2968
|
return this.selectionModule.getCheckedrecords();
|
|
2842
2969
|
};
|
|
2843
2970
|
/**
|
|
2844
|
-
*
|
|
2971
|
+
* Retrieves currently visible records according to the TreeGrid's visual state.
|
|
2845
2972
|
*
|
|
2846
|
-
*
|
|
2973
|
+
* It considers row expansion and collapse states to return only those records
|
|
2974
|
+
* that a user can currently interact with.
|
|
2975
|
+
*
|
|
2976
|
+
* @returns {Object[]} - Returns visible records reflecting the TreeGrid's current view.
|
|
2847
2977
|
* @isGenericType true
|
|
2848
2978
|
*/
|
|
2849
2979
|
TreeGrid.prototype.getVisibleRecords = function () {
|
|
@@ -2863,26 +2993,35 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2863
2993
|
return visibleRecords;
|
|
2864
2994
|
};
|
|
2865
2995
|
/**
|
|
2866
|
-
*
|
|
2996
|
+
* Retrieves the indices of rows that have their checkboxes checked.
|
|
2997
|
+
*
|
|
2998
|
+
* This can assist in programatically assessing which rows have been selected
|
|
2999
|
+
* by checkbox interaction for further processing.
|
|
2867
3000
|
*
|
|
2868
|
-
* @returns {number[]} - Returns checked
|
|
3001
|
+
* @returns {number[]} - Returns an array of indices corresponding to checked rows.
|
|
2869
3002
|
*/
|
|
2870
3003
|
TreeGrid.prototype.getCheckedRowIndexes = function () {
|
|
2871
3004
|
return this.selectionModule.getCheckedRowIndexes();
|
|
2872
3005
|
};
|
|
2873
3006
|
/**
|
|
2874
|
-
*
|
|
3007
|
+
* Selects rows in the TreeGrid using row indices, checking their associated checkboxes.
|
|
3008
|
+
*
|
|
3009
|
+
* This method provides automation for selecting or highlighting specific rows,
|
|
3010
|
+
* useful in scenarios needing pre-selection or default selections.
|
|
2875
3011
|
*
|
|
2876
|
-
* @param {number[]} indexes - row
|
|
3012
|
+
* @param {number[]} indexes - An array of row indices to be marked as selected.
|
|
2877
3013
|
* @returns {void}
|
|
2878
3014
|
*/
|
|
2879
3015
|
TreeGrid.prototype.selectCheckboxes = function (indexes) {
|
|
2880
3016
|
this.selectionModule.selectCheckboxes(indexes);
|
|
2881
3017
|
};
|
|
2882
3018
|
/**
|
|
2883
|
-
*
|
|
3019
|
+
* Updates and refreshes the TreeGrid's column definitions and layout.
|
|
2884
3020
|
*
|
|
2885
|
-
*
|
|
3021
|
+
* Ensures that the latest column settings are displayed, either refreshing the UI
|
|
3022
|
+
* or adjusting internal configurations to match current data or configuration updates.
|
|
3023
|
+
*
|
|
3024
|
+
* @param {boolean} refreshUI - A flag indicating whether the DOM should be updated.
|
|
2886
3025
|
* @returns {void}
|
|
2887
3026
|
*/
|
|
2888
3027
|
TreeGrid.prototype.refreshColumns = function (refreshUI) {
|
|
@@ -2911,7 +3050,10 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2911
3050
|
this.setProperties({ treeColumnIndex: treeIndex }, true);
|
|
2912
3051
|
};
|
|
2913
3052
|
/**
|
|
2914
|
-
* Refreshes the TreeGrid
|
|
3053
|
+
* Refreshes the header section of the TreeGrid to reflect any structural or data changes.
|
|
3054
|
+
*
|
|
3055
|
+
* This method is useful when there are dynamic updates or layout adjustments
|
|
3056
|
+
* needed in the header portion to ensure it aligns with current grid data or settings.
|
|
2915
3057
|
*
|
|
2916
3058
|
* @returns {void}
|
|
2917
3059
|
*/
|
|
@@ -2966,12 +3108,15 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2966
3108
|
}
|
|
2967
3109
|
};
|
|
2968
3110
|
/**
|
|
2969
|
-
* Expands
|
|
3111
|
+
* Expands the specified parent row within the TreeGrid to reveal its nested data.
|
|
2970
3112
|
*
|
|
2971
|
-
*
|
|
2972
|
-
*
|
|
2973
|
-
*
|
|
2974
|
-
* @param {
|
|
3113
|
+
* This method is useful for programmatically expanding rows to display their
|
|
3114
|
+
* hierarchical children, providing detailed views for nested data structures.
|
|
3115
|
+
*
|
|
3116
|
+
* @param {HTMLTableRowElement} row - The table row element that should be expanded.
|
|
3117
|
+
* @param {Object} record - Optional. Represents the data record associated with the row to be expanded.
|
|
3118
|
+
* @param {Object} key - Optional. The primary key value that uniquely identifies the record.
|
|
3119
|
+
* @param {number} level - Optional. Indicates the hierarchical level of the record within the TreeGrid.
|
|
2975
3120
|
* @returns {void}
|
|
2976
3121
|
*/
|
|
2977
3122
|
TreeGrid.prototype.expandRow = function (row, record, key, level) {
|
|
@@ -2987,7 +3132,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2987
3132
|
if (isNullOrUndefined(row) && isNullOrUndefined(record)) {
|
|
2988
3133
|
return;
|
|
2989
3134
|
}
|
|
2990
|
-
if (!isNullOrUndefined(row) && row.cells[0].classList.contains('e-lastrowcell')) {
|
|
3135
|
+
if (!isNullOrUndefined(row) && row.cells && row.cells[0].classList.contains('e-lastrowcell')) {
|
|
2991
3136
|
this.lastRowBorder(row, false);
|
|
2992
3137
|
}
|
|
2993
3138
|
if (this.isExpandAll && !isRemoteData(this)) {
|
|
@@ -3027,7 +3172,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3027
3172
|
};
|
|
3028
3173
|
// Internal method to handle the rows expand
|
|
3029
3174
|
TreeGrid.prototype.expandRows = function (row, record, parentRec) {
|
|
3030
|
-
var initialTotalRecordsCount = this.grid.totalDataRecordsCount;
|
|
3031
3175
|
this.expandCollapse('expand', row, record);
|
|
3032
3176
|
var children = 'Children';
|
|
3033
3177
|
if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record["" + children]))) {
|
|
@@ -3071,12 +3215,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3071
3215
|
}
|
|
3072
3216
|
else if (isNullOrUndefined(record) && !isNullOrUndefined(row)) {
|
|
3073
3217
|
if (this.detailTemplate) {
|
|
3074
|
-
record = this.grid.getCurrentViewRecords()[row.getAttribute('
|
|
3218
|
+
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
|
|
3075
3219
|
}
|
|
3076
3220
|
else {
|
|
3077
3221
|
if (this.enableVirtualization && (this.isCollapseAll || this.isExpandAll)) {
|
|
3078
3222
|
if (row.rowIndex === -1) {
|
|
3079
|
-
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('
|
|
3223
|
+
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
|
|
3080
3224
|
}
|
|
3081
3225
|
else {
|
|
3082
3226
|
record = this.grid.getCurrentViewRecords()[row.rowIndex];
|
|
@@ -3086,18 +3230,27 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3086
3230
|
record = this.grid.getCurrentViewRecords()[row.rowIndex];
|
|
3087
3231
|
}
|
|
3088
3232
|
else {
|
|
3089
|
-
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('
|
|
3233
|
+
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
|
|
3090
3234
|
}
|
|
3091
3235
|
}
|
|
3092
3236
|
}
|
|
3093
3237
|
return record;
|
|
3094
3238
|
};
|
|
3095
3239
|
/**
|
|
3096
|
-
* Collapses
|
|
3240
|
+
* Collapses the specified parent row in the TreeGrid.
|
|
3241
|
+
*
|
|
3242
|
+
* This method collapses the row associated with the provided HTMLTableRowElement,
|
|
3243
|
+
* hiding any of its displayed child rows. It is typically used to manage the
|
|
3244
|
+
* visibility of hierarchical data within a tree structure.
|
|
3097
3245
|
*
|
|
3098
|
-
* @param {HTMLTableRowElement} row -
|
|
3099
|
-
*
|
|
3100
|
-
* @param {Object}
|
|
3246
|
+
* @param {HTMLTableRowElement} row - The HTMLTableRowElement representing the parent row
|
|
3247
|
+
* whose child rows are to be collapsed.
|
|
3248
|
+
* @param {Object} record - (Optional) The data record associated with the row being collapsed.
|
|
3249
|
+
* This can be used to access or manipulate the underlying data
|
|
3250
|
+
* when collapsing the row.
|
|
3251
|
+
* @param {Object} key - (Optional) The primary key value of the record. It can be used to identify
|
|
3252
|
+
* the target record uniquely when collapsing the row, especially in cases
|
|
3253
|
+
* where the row or record data needs to be referenced or logged.
|
|
3101
3254
|
* @returns {void}
|
|
3102
3255
|
*/
|
|
3103
3256
|
TreeGrid.prototype.collapseRow = function (row, record, key) {
|
|
@@ -3179,9 +3332,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3179
3332
|
}
|
|
3180
3333
|
};
|
|
3181
3334
|
/**
|
|
3182
|
-
* Expands the records at
|
|
3335
|
+
* Expands all the records at the specified hierarchical level within the TreeGrid.
|
|
3336
|
+
*
|
|
3337
|
+
* This method is useful for visually expanding data at a certain depth, making
|
|
3338
|
+
* all parent rows visible at the given level and their child rows accessible.
|
|
3183
3339
|
*
|
|
3184
|
-
* @param {number} level -
|
|
3340
|
+
* @param {number} level - The hierarchical level at which parent rows should be expanded.
|
|
3185
3341
|
* @returns {void}
|
|
3186
3342
|
*/
|
|
3187
3343
|
TreeGrid.prototype.expandAtLevel = function (level) {
|
|
@@ -3201,9 +3357,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3201
3357
|
}
|
|
3202
3358
|
};
|
|
3203
3359
|
/**
|
|
3204
|
-
* Expands
|
|
3360
|
+
* Expands a specific record identified by the provided primary key value.
|
|
3205
3361
|
*
|
|
3206
|
-
*
|
|
3362
|
+
* This method is useful for expanding particular node in the TreeGrid when
|
|
3363
|
+
* the parent rows need to be targeted individually by their unique key.
|
|
3364
|
+
*
|
|
3365
|
+
* @param {Object} key - The primary key value of the record to be expanded.
|
|
3207
3366
|
* @returns {void}
|
|
3208
3367
|
*/
|
|
3209
3368
|
TreeGrid.prototype.expandByKey = function (key) {
|
|
@@ -3258,9 +3417,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3258
3417
|
return obj;
|
|
3259
3418
|
};
|
|
3260
3419
|
/**
|
|
3261
|
-
* Collapses the records at
|
|
3420
|
+
* Collapses all the records at the specified hierarchical level within the TreeGrid.
|
|
3421
|
+
*
|
|
3422
|
+
* This function helps in hiding child rows for all parent nodes at a given level,
|
|
3423
|
+
* effectively reducing the visible depth of the hierarchical structure.
|
|
3262
3424
|
*
|
|
3263
|
-
* @param {number} level -
|
|
3425
|
+
* @param {number} level - The hierarchical level at which parent rows should be collapsed.
|
|
3264
3426
|
* @returns {void}
|
|
3265
3427
|
*/
|
|
3266
3428
|
TreeGrid.prototype.collapseAtLevel = function (level) {
|
|
@@ -3280,9 +3442,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3280
3442
|
}
|
|
3281
3443
|
};
|
|
3282
3444
|
/**
|
|
3283
|
-
* Collapses
|
|
3445
|
+
* Collapses a specific record identified by the provided primary key value.
|
|
3284
3446
|
*
|
|
3285
|
-
*
|
|
3447
|
+
* This method is useful for collapsing particular node in the TreeGrid when
|
|
3448
|
+
* the parent rows need to be targeted individually by their unique key.
|
|
3449
|
+
*
|
|
3450
|
+
* @param {Object} key - The primary key value of the record to be collapsed.
|
|
3286
3451
|
* @returns {void}
|
|
3287
3452
|
*/
|
|
3288
3453
|
TreeGrid.prototype.collapseByKey = function (key) {
|
|
@@ -3321,7 +3486,10 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3321
3486
|
}
|
|
3322
3487
|
};
|
|
3323
3488
|
/**
|
|
3324
|
-
* Expands
|
|
3489
|
+
* Expands all rows in the TreeGrid, making the full hierarchy visible.
|
|
3490
|
+
*
|
|
3491
|
+
* This method should be used with caution on large datasets, as it makes
|
|
3492
|
+
* all nodes and their child rows visible, which might affect performance.
|
|
3325
3493
|
*
|
|
3326
3494
|
* @returns {void}
|
|
3327
3495
|
*/
|
|
@@ -3332,10 +3500,23 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3332
3500
|
}
|
|
3333
3501
|
this.isExpandedEventTriggered = false;
|
|
3334
3502
|
this.isExpandingEventTriggered = false;
|
|
3503
|
+
if (this.editSettings.mode === 'Batch') {
|
|
3504
|
+
var obj = 'dialogObj';
|
|
3505
|
+
var showDialog = 'showDialog';
|
|
3506
|
+
if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
|
|
3507
|
+
this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
|
|
3508
|
+
var dialogObj = this.grid.editModule["" + obj];
|
|
3509
|
+
this.grid.editModule["" + showDialog]('CancelEdit', dialogObj);
|
|
3510
|
+
return;
|
|
3511
|
+
}
|
|
3512
|
+
}
|
|
3335
3513
|
this.expandCollapseAll('expand');
|
|
3336
3514
|
};
|
|
3337
3515
|
/**
|
|
3338
|
-
* Collapses
|
|
3516
|
+
* Collapses all rows in the TreeGrid, hiding all child rows and leaving only parent nodes visible.
|
|
3517
|
+
*
|
|
3518
|
+
* This method can be used to quickly minimize the view to only top-level data,
|
|
3519
|
+
* which is helpful for summarizing or performing broad overviews of the dataset.
|
|
3339
3520
|
*
|
|
3340
3521
|
* @returns {void}
|
|
3341
3522
|
*/
|
|
@@ -3346,6 +3527,16 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3346
3527
|
}
|
|
3347
3528
|
this.isCollapsedEventTriggered = false;
|
|
3348
3529
|
this.isCollapsingEventTriggered = false;
|
|
3530
|
+
if (this.editSettings.mode === 'Batch') {
|
|
3531
|
+
var obj = 'dialogObj';
|
|
3532
|
+
var showDialog = 'showDialog';
|
|
3533
|
+
if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
|
|
3534
|
+
this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
|
|
3535
|
+
var dialogObj = this.grid.editModule["" + obj];
|
|
3536
|
+
this.grid.editModule["" + showDialog]('CancelEdit', dialogObj);
|
|
3537
|
+
return;
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3349
3540
|
this.expandCollapseAll('collapse');
|
|
3350
3541
|
};
|
|
3351
3542
|
TreeGrid.prototype.expandCollapseAll = function (action) {
|
|
@@ -3365,7 +3556,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3365
3556
|
}
|
|
3366
3557
|
this.isExpandAll = true;
|
|
3367
3558
|
this.isCollapseAll = true;
|
|
3368
|
-
if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
|
|
3559
|
+
if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
|
|
3369
3560
|
this.flatData.filter(function (e) {
|
|
3370
3561
|
if (e.hasChildRecords) {
|
|
3371
3562
|
e.expanded = action === 'collapse' ? false : true;
|
|
@@ -3429,12 +3620,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3429
3620
|
row = gridRows[parseInt(rowIndex.toString(), 10)];
|
|
3430
3621
|
}
|
|
3431
3622
|
else {
|
|
3432
|
-
rowIndex = +row.getAttribute('
|
|
3623
|
+
rowIndex = +row.getAttribute('aria-rowindex') - 1;
|
|
3433
3624
|
}
|
|
3434
3625
|
if (!isNullOrUndefined(row)) {
|
|
3435
3626
|
row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
|
|
3436
3627
|
}
|
|
3437
|
-
if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)
|
|
3628
|
+
if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization) && !isRemoteData(this)
|
|
3438
3629
|
&& !isCountRequired(this)) {
|
|
3439
3630
|
this.notify(events.localPagedExpandCollapse, { action: action, row: row, record: record });
|
|
3440
3631
|
}
|
|
@@ -3444,6 +3635,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3444
3635
|
displayAction = 'e-childrow-visible';
|
|
3445
3636
|
if (!isChild) {
|
|
3446
3637
|
record.expanded = true;
|
|
3638
|
+
this.flatData.forEach(function (e) {
|
|
3639
|
+
e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
|
|
3640
|
+
});
|
|
3447
3641
|
this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
|
|
3448
3642
|
}
|
|
3449
3643
|
if (!isNullOrUndefined(row)) {
|
|
@@ -3465,6 +3659,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3465
3659
|
displayAction = 'e-childrow-hidden';
|
|
3466
3660
|
if (!isChild || isCountRequired(this)) {
|
|
3467
3661
|
record.expanded = false;
|
|
3662
|
+
this.flatData.forEach(function (e) {
|
|
3663
|
+
e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
|
|
3664
|
+
});
|
|
3468
3665
|
this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
|
|
3469
3666
|
}
|
|
3470
3667
|
if (!isNullOrUndefined(row)) {
|
|
@@ -3707,7 +3904,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3707
3904
|
}
|
|
3708
3905
|
if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
|
|
3709
3906
|
|| this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
|
|
3710
|
-
gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex]
|
|
3907
|
+
if (!isNullOrUndefined(gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex])) {
|
|
3908
|
+
gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'e-childrow-hidden' ? true : false;
|
|
3909
|
+
}
|
|
3711
3910
|
var parentRecord = currentViewData.filter(function (e) {
|
|
3712
3911
|
return e.uniqueID === currentRecord[0].parentUniqueID;
|
|
3713
3912
|
});
|
|
@@ -3853,28 +4052,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3853
4052
|
}
|
|
3854
4053
|
return value;
|
|
3855
4054
|
};
|
|
3856
|
-
/**
|
|
3857
|
-
* Updates the rows and cells
|
|
3858
|
-
*
|
|
3859
|
-
* @param {Object[]} records - Updates the given records
|
|
3860
|
-
* @param {HTMLTableRowElement[]} rows - Updates the given rows
|
|
3861
|
-
* @param {number} index - Updates the given cell index
|
|
3862
|
-
* @returns {void}
|
|
3863
|
-
*/
|
|
3864
|
-
TreeGrid.prototype.updateRowAndCellElements = function (records, rows, index) {
|
|
3865
|
-
for (var i = 0; i < records.length; i++) {
|
|
3866
|
-
this.renderModule.cellRender({
|
|
3867
|
-
data: records[parseInt(i.toString(), 10)], cell: rows[parseInt(i.toString(), 10)].cells[parseInt(index.toString(), 10)],
|
|
3868
|
-
column: this.grid.getColumns()[this.treeColumnIndex],
|
|
3869
|
-
requestType: 'rowDragAndDrop'
|
|
3870
|
-
});
|
|
3871
|
-
if (this['action'] === 'indenting' || this['action'] === 'outdenting') {
|
|
3872
|
-
this.renderModule.RowModifier({
|
|
3873
|
-
data: records[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)]
|
|
3874
|
-
});
|
|
3875
|
-
}
|
|
3876
|
-
}
|
|
3877
|
-
};
|
|
3878
4055
|
/**
|
|
3879
4056
|
* @hidden
|
|
3880
4057
|
* @returns {void}
|
|
@@ -3882,6 +4059,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3882
4059
|
TreeGrid.prototype.addListener = function () {
|
|
3883
4060
|
this.on('updateResults', this.updateResultModel, this);
|
|
3884
4061
|
this.grid.on('initial-end', this.afterGridRender, this);
|
|
4062
|
+
this.grid.on('last-rowcell-border-updated', this.lastRowCellBorderUpdated, this);
|
|
3885
4063
|
};
|
|
3886
4064
|
TreeGrid.prototype.updateResultModel = function (returnResult) {
|
|
3887
4065
|
this.dataResults = returnResult;
|
|
@@ -3896,27 +4074,31 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3896
4074
|
}
|
|
3897
4075
|
this.off('updateResults', this.updateResultModel);
|
|
3898
4076
|
this.grid.off('initial-end', this.afterGridRender);
|
|
4077
|
+
this.grid.off('last-rowcell-border-updated', this.lastRowCellBorderUpdated);
|
|
3899
4078
|
};
|
|
3900
4079
|
/**
|
|
3901
|
-
* Filters TreeGrid
|
|
4080
|
+
* Filters the TreeGrid rows based on a specified column and filter criteria.
|
|
4081
|
+
*
|
|
4082
|
+
* This method allows for dynamic filtering against column data using various
|
|
4083
|
+
* operators and values, supporting case-sensitive filtering and accent sensitivity.
|
|
3902
4084
|
*
|
|
3903
|
-
* @param
|
|
3904
|
-
* @param
|
|
3905
|
-
* @param
|
|
3906
|
-
* @param
|
|
3907
|
-
* @param
|
|
3908
|
-
*
|
|
3909
|
-
* @param
|
|
3910
|
-
*
|
|
3911
|
-
* @param {string} actualFilterValue - Defines the actual filter value for filter column.
|
|
3912
|
-
* @param {string} actualOperator - Defines the actual filter operator for filter column.
|
|
4085
|
+
* @param {string} fieldName - The name of the column to apply the filter on.
|
|
4086
|
+
* @param {string} filterOperator - The operator used to perform the filter (e.g., 'equals', 'startswith').
|
|
4087
|
+
* @param {string | number | Date | boolean } filterValue - The value to filter against.
|
|
4088
|
+
* @param {string} predicate - The logical operator ('AND'/'OR') to combine this filter with others.
|
|
4089
|
+
* @param {boolean} matchCase - If true, the filter performs a case-sensitive match.
|
|
4090
|
+
* @param {boolean} ignoreAccent - If true, the filter ignores diacritical marks.
|
|
4091
|
+
* @param {string} actualFilterValue - The original value used for filtering, useful for distinguishing displayed and actual values.
|
|
4092
|
+
* @param {string} actualOperator - The actual operator that is applied when different from the displayed operator.
|
|
3913
4093
|
* @returns {void}
|
|
3914
4094
|
*/
|
|
3915
4095
|
TreeGrid.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
|
|
3916
4096
|
this.grid.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
|
|
3917
4097
|
};
|
|
3918
4098
|
/**
|
|
3919
|
-
* Clears all the
|
|
4099
|
+
* Clears all filters applied to the TreeGrid, restoring the view to show all records.
|
|
4100
|
+
*
|
|
4101
|
+
* This method is useful for resetting the grid to its unfiltered state.
|
|
3920
4102
|
*
|
|
3921
4103
|
* @returns {void}
|
|
3922
4104
|
*/
|
|
@@ -3935,26 +4117,32 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3935
4117
|
this.grid.removeFilteredColsByField(field, isClearFilterBar);
|
|
3936
4118
|
};
|
|
3937
4119
|
/**
|
|
3938
|
-
* Selects a row by
|
|
4120
|
+
* Selects a row in the TreeGrid by its index.
|
|
4121
|
+
*
|
|
4122
|
+
* Use this method to highlight a specific row; useful for programmatically navigating data.
|
|
3939
4123
|
*
|
|
3940
|
-
* @param
|
|
3941
|
-
* @param
|
|
4124
|
+
* @param {number} index - Index of the row to select.
|
|
4125
|
+
* @param {boolean} isToggle - If true, toggles the selection state of the row.
|
|
3942
4126
|
* @returns {void}
|
|
3943
4127
|
*/
|
|
3944
4128
|
TreeGrid.prototype.selectRow = function (index, isToggle) {
|
|
3945
4129
|
this.grid.selectRow(index, isToggle);
|
|
3946
4130
|
};
|
|
3947
4131
|
/**
|
|
3948
|
-
* Selects
|
|
4132
|
+
* Selects multiple rows in the TreeGrid given an array of row indexes.
|
|
3949
4133
|
*
|
|
3950
|
-
*
|
|
4134
|
+
* Useful for batch operations where multiple row selections are necessary.
|
|
4135
|
+
*
|
|
4136
|
+
* @param {number[]} rowIndexes - Array of row index numbers to select.
|
|
3951
4137
|
* @returns {void}
|
|
3952
4138
|
*/
|
|
3953
4139
|
TreeGrid.prototype.selectRows = function (rowIndexes) {
|
|
3954
4140
|
this.grid.selectRows(rowIndexes);
|
|
3955
4141
|
};
|
|
3956
4142
|
/**
|
|
3957
|
-
* Deselects
|
|
4143
|
+
* Deselects all selected rows and cells within the TreeGrid.
|
|
4144
|
+
*
|
|
4145
|
+
* Resets the selection state of the grid, which is useful after bulk operations.
|
|
3958
4146
|
*
|
|
3959
4147
|
* @returns {void}
|
|
3960
4148
|
*/
|
|
@@ -3965,39 +4153,47 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3965
4153
|
this.grid.clearSelection();
|
|
3966
4154
|
};
|
|
3967
4155
|
/**
|
|
3968
|
-
*
|
|
4156
|
+
* Copies the data of selected rows or cells to the clipboard.
|
|
3969
4157
|
*
|
|
3970
|
-
*
|
|
4158
|
+
* This method supports including headers for better context when pasting elsewhere.
|
|
4159
|
+
*
|
|
4160
|
+
* @param {boolean} withHeader - (Optional) If true, includes column headers in the copied data.
|
|
3971
4161
|
* @returns {void}
|
|
3972
4162
|
*/
|
|
3973
4163
|
TreeGrid.prototype.copy = function (withHeader) {
|
|
3974
4164
|
this.clipboardModule.copy(withHeader);
|
|
3975
4165
|
};
|
|
3976
4166
|
/**
|
|
3977
|
-
*
|
|
4167
|
+
* Pastes data into the selected cells from the clipboard.
|
|
4168
|
+
*
|
|
4169
|
+
* Automatically places the pasted data starting from the specified indices.
|
|
3978
4170
|
*
|
|
3979
|
-
* @param {
|
|
3980
|
-
* @param {
|
|
3981
|
-
* @param {
|
|
4171
|
+
* @param {string} data - The clipboard data to paste.
|
|
4172
|
+
* @param {number} rowIndex - The starting row index for pasting.
|
|
4173
|
+
* @param {number} colIndex - The starting column index for pasting.
|
|
3982
4174
|
* @returns {void}
|
|
3983
4175
|
*/
|
|
3984
4176
|
TreeGrid.prototype.paste = function (data, rowIndex, colIndex) {
|
|
3985
4177
|
this.clipboardModule.paste(data, rowIndex, colIndex);
|
|
3986
4178
|
};
|
|
3987
4179
|
/**
|
|
3988
|
-
* Selects a cell by the
|
|
4180
|
+
* Selects a cell by its index position in the TreeGrid.
|
|
3989
4181
|
*
|
|
3990
|
-
*
|
|
3991
|
-
*
|
|
4182
|
+
* Useful for navigating or highlighting specific data cells within the grid.
|
|
4183
|
+
*
|
|
4184
|
+
* @param {IIndex} cellIndex - An object specifying the row and column indexes.
|
|
4185
|
+
* @param {boolean} isToggle - (Optional) If true, toggles the selection state of the cell.
|
|
3992
4186
|
* @returns {void}
|
|
3993
4187
|
*/
|
|
3994
4188
|
TreeGrid.prototype.selectCell = function (cellIndex, isToggle) {
|
|
3995
4189
|
this.grid.selectCell(cellIndex, isToggle);
|
|
3996
4190
|
};
|
|
3997
4191
|
/**
|
|
3998
|
-
*
|
|
4192
|
+
* Retrieves the currently selected rows.
|
|
4193
|
+
*
|
|
4194
|
+
* Useful for obtaining the selected data elements for downstream processing.
|
|
3999
4195
|
*
|
|
4000
|
-
* @returns {Element[]} -
|
|
4196
|
+
* @returns {Element[]} - An array of Element objects representing the selected rows.
|
|
4001
4197
|
*/
|
|
4002
4198
|
TreeGrid.prototype.getSelectedRows = function () {
|
|
4003
4199
|
return this.grid.getSelectedRows();
|
|
@@ -4209,44 +4405,59 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
4209
4405
|
return cnt;
|
|
4210
4406
|
};
|
|
4211
4407
|
/**
|
|
4212
|
-
*
|
|
4408
|
+
* Retrieves the indexes of the currently selected rows in the TreeGrid.
|
|
4409
|
+
*
|
|
4410
|
+
* This method is useful when you need to perform actions based on the selected rows,
|
|
4411
|
+
* such as retrieving data or changing the selection.
|
|
4213
4412
|
*
|
|
4214
|
-
* @returns {number[]} -
|
|
4413
|
+
* @returns {number[]} - An array of numbers representing the indexes of selected rows.
|
|
4215
4414
|
*/
|
|
4216
4415
|
TreeGrid.prototype.getSelectedRowIndexes = function () {
|
|
4217
4416
|
return this.grid.getSelectedRowIndexes();
|
|
4218
4417
|
};
|
|
4219
4418
|
/**
|
|
4220
|
-
*
|
|
4419
|
+
* Retrieves the indexes of the selected cells within the selected rows.
|
|
4221
4420
|
*
|
|
4222
|
-
*
|
|
4421
|
+
* This can be useful for handling cell-specific operations, such as
|
|
4422
|
+
* applying styles or editing values programmatically.
|
|
4423
|
+
*
|
|
4424
|
+
* @returns {ISelectedCell[]} - An array of objects representing the selected cells' indexes.
|
|
4223
4425
|
*/
|
|
4224
4426
|
TreeGrid.prototype.getSelectedRowCellIndexes = function () {
|
|
4225
4427
|
return this.grid.getSelectedRowCellIndexes();
|
|
4226
4428
|
};
|
|
4227
4429
|
/**
|
|
4228
|
-
*
|
|
4430
|
+
* Retrieves the data records corresponding to the currently selected rows.
|
|
4431
|
+
*
|
|
4432
|
+
* This method provides the full record data for the selected rows,
|
|
4433
|
+
* which is useful for data manipulation or extraction operations.
|
|
4229
4434
|
*
|
|
4230
4435
|
* @isGenericType true
|
|
4231
|
-
* @returns {Object[]} -
|
|
4436
|
+
* @returns {Object[]} - An array of data objects representing the selected records.
|
|
4232
4437
|
*/
|
|
4233
4438
|
TreeGrid.prototype.getSelectedRecords = function () {
|
|
4234
4439
|
return this.grid.getSelectedRecords();
|
|
4235
4440
|
};
|
|
4236
4441
|
/**
|
|
4237
|
-
*
|
|
4442
|
+
* Obtains the data handling modules used by the TreeGrid.
|
|
4238
4443
|
*
|
|
4239
|
-
*
|
|
4444
|
+
* This includes both the base data module for standard grid operations and the tree module
|
|
4445
|
+
* for handling hierarchical data, giving complete access to data management capabilities.
|
|
4446
|
+
*
|
|
4447
|
+
* @returns {{baseModule: Data, treeModule: DataManipulation}} - An object containing both grid and tree data modules.
|
|
4240
4448
|
*/
|
|
4241
4449
|
TreeGrid.prototype.getDataModule = function () {
|
|
4242
4450
|
return { baseModule: this.grid.getDataModule(), treeModule: this.dataModule };
|
|
4243
4451
|
};
|
|
4244
4452
|
/**
|
|
4245
|
-
*
|
|
4453
|
+
* Reorders rows in the TreeGrid based on specified source indexes and a target position.
|
|
4454
|
+
*
|
|
4455
|
+
* This functionality allows for dynamic rearrangement of rows, such as moving selected
|
|
4456
|
+
* rows to a new position as siblings or children.
|
|
4246
4457
|
*
|
|
4247
|
-
* @param {number[]} fromIndexes -
|
|
4248
|
-
* @param {number} toIndex -
|
|
4249
|
-
* @param {string} position -
|
|
4458
|
+
* @param {number[]} fromIndexes - An array indicating the source indexes of the rows to be moved.
|
|
4459
|
+
* @param {number} toIndex - The target index where the rows should be moved.
|
|
4460
|
+
* @param {string} position - The position relative to the target index ('above', 'below', 'child').
|
|
4250
4461
|
* @returns {void}
|
|
4251
4462
|
*/
|
|
4252
4463
|
TreeGrid.prototype.reorderRows = function (fromIndexes, toIndex, position) {
|
|
@@ -4255,9 +4466,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
4255
4466
|
}
|
|
4256
4467
|
};
|
|
4257
4468
|
/**
|
|
4258
|
-
* Indents
|
|
4469
|
+
* Indents a specified record, promoting it to one level deeper in the hierarchy.
|
|
4470
|
+
*
|
|
4471
|
+
* This function moves the selected row to become the last child of its preceding row,
|
|
4472
|
+
* altering the visual and hierarchical data structure.
|
|
4259
4473
|
*
|
|
4260
|
-
* @param {Object} record
|
|
4474
|
+
* @param {Object} record - (Optional) The record to be indented. If omitted, the currently selected row is used.
|
|
4261
4475
|
* @returns {void}
|
|
4262
4476
|
*/
|
|
4263
4477
|
TreeGrid.prototype.indent = function (record) {
|
|
@@ -4267,9 +4481,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
4267
4481
|
}
|
|
4268
4482
|
};
|
|
4269
4483
|
/**
|
|
4270
|
-
*
|
|
4484
|
+
* Outdents a specified record, moving it one level up in the hierarchy.
|
|
4271
4485
|
*
|
|
4272
|
-
*
|
|
4486
|
+
* This method repositions the selected row to be a sibling of its parent, impacting
|
|
4487
|
+
* its display and the hierarchical relationships within the TreeGrid.
|
|
4488
|
+
*
|
|
4489
|
+
* @param {Object} record - (Optional) The record to be outdented. If omitted, the currently selected row is used.
|
|
4273
4490
|
* @returns {void}
|
|
4274
4491
|
*/
|
|
4275
4492
|
TreeGrid.prototype.outdent = function (record) {
|
|
@@ -4465,6 +4682,21 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
4465
4682
|
__decorate([
|
|
4466
4683
|
Property('All')
|
|
4467
4684
|
], TreeGrid.prototype, "columnQueryMode", void 0);
|
|
4685
|
+
__decorate([
|
|
4686
|
+
Property(true)
|
|
4687
|
+
], TreeGrid.prototype, "allowSelection", void 0);
|
|
4688
|
+
__decorate([
|
|
4689
|
+
Property(-1)
|
|
4690
|
+
], TreeGrid.prototype, "selectedRowIndex", void 0);
|
|
4691
|
+
__decorate([
|
|
4692
|
+
Complex({}, SelectionSettings)
|
|
4693
|
+
], TreeGrid.prototype, "selectionSettings", void 0);
|
|
4694
|
+
__decorate([
|
|
4695
|
+
Property(false)
|
|
4696
|
+
], TreeGrid.prototype, "allowExcelExport", void 0);
|
|
4697
|
+
__decorate([
|
|
4698
|
+
Property(false)
|
|
4699
|
+
], TreeGrid.prototype, "allowPdfExport", void 0);
|
|
4468
4700
|
__decorate([
|
|
4469
4701
|
Event()
|
|
4470
4702
|
], TreeGrid.prototype, "created", void 0);
|
|
@@ -4543,9 +4775,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
4543
4775
|
__decorate([
|
|
4544
4776
|
Event()
|
|
4545
4777
|
], TreeGrid.prototype, "queryCellInfo", void 0);
|
|
4546
|
-
__decorate([
|
|
4547
|
-
Property(true)
|
|
4548
|
-
], TreeGrid.prototype, "allowSelection", void 0);
|
|
4549
4778
|
__decorate([
|
|
4550
4779
|
Event()
|
|
4551
4780
|
], TreeGrid.prototype, "rowSelecting", void 0);
|
|
@@ -4636,18 +4865,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
4636
4865
|
__decorate([
|
|
4637
4866
|
Event()
|
|
4638
4867
|
], TreeGrid.prototype, "rowDrop", void 0);
|
|
4639
|
-
__decorate([
|
|
4640
|
-
Property(-1)
|
|
4641
|
-
], TreeGrid.prototype, "selectedRowIndex", void 0);
|
|
4642
|
-
__decorate([
|
|
4643
|
-
Complex({}, SelectionSettings)
|
|
4644
|
-
], TreeGrid.prototype, "selectionSettings", void 0);
|
|
4645
|
-
__decorate([
|
|
4646
|
-
Property(false)
|
|
4647
|
-
], TreeGrid.prototype, "allowExcelExport", void 0);
|
|
4648
|
-
__decorate([
|
|
4649
|
-
Property(false)
|
|
4650
|
-
], TreeGrid.prototype, "allowPdfExport", void 0);
|
|
4651
4868
|
__decorate([
|
|
4652
4869
|
Event()
|
|
4653
4870
|
], TreeGrid.prototype, "pdfQueryCellInfo", void 0);
|