@syncfusion/ej2-treegrid 22.2.7 → 23.1.36
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/CHANGELOG.md +14 -43
- 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 +224 -330
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +223 -353
- 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 +2 -28
- package/src/treegrid/actions/crud-actions.js +1 -1
- package/src/treegrid/actions/edit.js +6 -52
- package/src/treegrid/actions/excel-export.d.ts +2 -2
- package/src/treegrid/actions/freeze-column.d.ts +0 -1
- package/src/treegrid/actions/freeze-column.js +4 -36
- package/src/treegrid/actions/infinite-scroll.js +8 -8
- package/src/treegrid/actions/pdf-export.d.ts +2 -2
- package/src/treegrid/actions/selection.js +1 -1
- package/src/treegrid/actions/virtual-scroll.js +6 -8
- package/src/treegrid/base/data.js +20 -4
- package/src/treegrid/base/treegrid-model.d.ts +8 -1
- package/src/treegrid/base/treegrid.d.ts +69 -1
- package/src/treegrid/base/treegrid.js +165 -37
- package/src/treegrid/models/column.d.ts +1 -0
- package/src/treegrid/renderer/virtual-row-model-generator.js +4 -4
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +0 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +9 -21
- package/styles/material-dark.css +0 -1
- package/styles/material.css +0 -1
- package/styles/material3-dark.css +0 -1
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +0 -1
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +0 -1
- package/styles/tailwind.css +0 -1
- package/styles/treegrid/bootstrap-dark.scss +1 -1
- package/styles/treegrid/bootstrap.scss +1 -1
- package/styles/treegrid/bootstrap4.scss +1 -1
- package/styles/treegrid/bootstrap5-dark.scss +1 -1
- package/styles/treegrid/bootstrap5.scss +1 -1
- package/styles/treegrid/fabric-dark.scss +1 -1
- package/styles/treegrid/fabric.scss +1 -1
- package/styles/treegrid/fluent-dark.scss +1 -1
- package/styles/treegrid/fluent.scss +1 -1
- package/styles/treegrid/highcontrast-light.scss +1 -1
- package/styles/treegrid/highcontrast.scss +1 -1
- package/styles/treegrid/material-dark.css +0 -1
- package/styles/treegrid/material-dark.scss +1 -1
- package/styles/treegrid/material.css +0 -1
- package/styles/treegrid/material.scss +1 -1
- package/styles/treegrid/material3-dark.css +0 -1
- package/styles/treegrid/material3-dark.scss +1 -1
- package/styles/treegrid/material3.css +0 -1
- package/styles/treegrid/material3.scss +1 -1
- package/styles/treegrid/tailwind-dark.css +0 -1
- package/styles/treegrid/tailwind-dark.scss +1 -1
- package/styles/treegrid/tailwind.css +0 -1
- package/styles/treegrid/tailwind.scss +1 -1
- package/src/treegrid/renderer/virtual-tree-freeze-render.d.ts +0 -59
- package/src/treegrid/renderer/virtual-tree-freeze-render.js +0 -163
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, classList, closest, compile, createElement, debounce, extend, getEnumValue, getValue, isNullOrUndefined, merge, remove, removeClass, select, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
|
|
2
|
-
import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser,
|
|
2
|
+
import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, DetailRow, Edit, ExcelExport, Filter, Freeze, Grid, InfiniteScroll, InterSectionObserver, Logger, Page, PdfExport, Print, RenderType, Reorder, Resize, RowDD, RowDropSettings, RowRenderer, Scroll, Sort, Toolbar, VirtualContentRenderer, VirtualHeaderRenderer, VirtualRowModelGenerator, VirtualScroll, appendChildren, calculateAggregate, detailLists, extend as extend$1, getActualProperties, getNumberFormat, getObject, getTransformValues, getUid, iterateArrayOrObject, parentsUntil, resetRowIndex, templateCompiler } from '@syncfusion/ej2-grids';
|
|
3
3
|
import { createCheckBox } from '@syncfusion/ej2-buttons';
|
|
4
4
|
import { CacheAdaptor, DataManager, DataUtil, Deferred, JsonAdaptor, ODataAdaptor, Predicate, Query, RemoteSaveAdaptor, UrlAdaptor, WebApiAdaptor, WebMethodAdaptor } from '@syncfusion/ej2-data';
|
|
5
5
|
import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
|
|
@@ -1348,7 +1348,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1348
1348
|
if (recordIndex > -1) {
|
|
1349
1349
|
var movableTr = void 0;
|
|
1350
1350
|
if (this.parent.frozenRows || this.parent.getFrozenColumns()) {
|
|
1351
|
-
movableTr = this.parent.
|
|
1351
|
+
movableTr = this.parent.getDataRows()[parseInt(recordIndex.toString(), 10)];
|
|
1352
1352
|
}
|
|
1353
1353
|
checkbox = tr.querySelectorAll('.e-frame')[0] ? tr.querySelectorAll('.e-frame')[0]
|
|
1354
1354
|
: movableTr.querySelectorAll('.e-frame')[0];
|
|
@@ -2085,9 +2085,13 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
|
|
|
2085
2085
|
qry.isCountRequired = true;
|
|
2086
2086
|
dm.executeQuery(qry).then(function (e) {
|
|
2087
2087
|
_this.parentItems = DataUtil.distinct(e.result, _this.parent.parentIdMapping, false);
|
|
2088
|
-
var req
|
|
2089
|
-
|
|
2090
|
-
|
|
2088
|
+
var req;
|
|
2089
|
+
if (e.result) {
|
|
2090
|
+
req = 0;
|
|
2091
|
+
}
|
|
2092
|
+
else {
|
|
2093
|
+
req = 1;
|
|
2094
|
+
}
|
|
2091
2095
|
if (req === 0) {
|
|
2092
2096
|
setValue('grid.contentModule.isLoaded', true, _this.parent);
|
|
2093
2097
|
if (!isNullOrUndefined(_this.zerothLevelData)) {
|
|
@@ -2347,7 +2351,19 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
|
|
|
2347
2351
|
var remoteCollapsedData = 'remoteCollapsedData';
|
|
2348
2352
|
var level = 'level';
|
|
2349
2353
|
var datas = _this.parent.grid.currentViewData.slice();
|
|
2350
|
-
var inx
|
|
2354
|
+
var inx;
|
|
2355
|
+
var idMapping = _this.parent.idMapping;
|
|
2356
|
+
if (_this.parent['isGantt'] && !_this.parent.loadChildOnDemand && _this.parent.hasChildMapping) {
|
|
2357
|
+
for (var i = 0; i < _this.parent.grid.currentViewData.length; i++) {
|
|
2358
|
+
if (rowDetails.record[idMapping] === _this.parent.grid.currentViewData[i][idMapping]) {
|
|
2359
|
+
inx = i;
|
|
2360
|
+
break;
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
else {
|
|
2365
|
+
inx = datas.indexOf(rowDetails.record);
|
|
2366
|
+
}
|
|
2351
2367
|
if (_this.parent.enableVirtualization && (rowDetails.action === 'collapse' || rowDetails.action === 'remoteExpand')) {
|
|
2352
2368
|
datas = [];
|
|
2353
2369
|
for (var i = 0; i < inx; i++) {
|
|
@@ -3549,7 +3565,7 @@ function updateParentRow(key, record, action, control, isSelfReference, child) {
|
|
|
3549
3565
|
}
|
|
3550
3566
|
var movableRow = void 0;
|
|
3551
3567
|
if (control.frozenRows || control.getFrozenColumns()) {
|
|
3552
|
-
movableRow = control.
|
|
3568
|
+
movableRow = control.getRowByIndex(index_1);
|
|
3553
3569
|
}
|
|
3554
3570
|
if (!control.enableVirtualization && !isNullOrUndefined(row) || !isNullOrUndefined(movableRow)) {
|
|
3555
3571
|
var index_2 = control.treeColumnIndex;
|
|
@@ -3725,6 +3741,112 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3725
3741
|
TreeGrid.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
3726
3742
|
return this.pdfExportModule.Map(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
3727
3743
|
};
|
|
3744
|
+
/**
|
|
3745
|
+
* Sends a post request to export tree grid to excel file in server side.
|
|
3746
|
+
*
|
|
3747
|
+
* @param {string} url - Pass URL for server side excel export action.
|
|
3748
|
+
* @returns {void}
|
|
3749
|
+
*/
|
|
3750
|
+
TreeGrid.prototype.serverExcelExport = function (url) {
|
|
3751
|
+
this.isExcel = true;
|
|
3752
|
+
this.exportTreeGrid(url);
|
|
3753
|
+
};
|
|
3754
|
+
/**
|
|
3755
|
+
* Sends a post request to export tree grid to pdf file in server side.
|
|
3756
|
+
*
|
|
3757
|
+
* @param {string} url - Pass URL for server-side pdf export action.
|
|
3758
|
+
* @returns {void}
|
|
3759
|
+
*/
|
|
3760
|
+
TreeGrid.prototype.serverPdfExport = function (url) {
|
|
3761
|
+
this.isExcel = false;
|
|
3762
|
+
this.exportTreeGrid(url);
|
|
3763
|
+
};
|
|
3764
|
+
/**
|
|
3765
|
+
* Sends a Post request to export Tree Grid to CSV file in server side.
|
|
3766
|
+
*
|
|
3767
|
+
* @param {string} url - Pass URL for server-side csv export action.
|
|
3768
|
+
* @returns {void}
|
|
3769
|
+
*/
|
|
3770
|
+
TreeGrid.prototype.serverCsvExport = function (url) {
|
|
3771
|
+
this.isExcel = true;
|
|
3772
|
+
this.exportTreeGrid(url);
|
|
3773
|
+
};
|
|
3774
|
+
/**
|
|
3775
|
+
* Exports the TreeGrid data to the specified URL using a POST request.
|
|
3776
|
+
* @param {string} url - Defines exporting url
|
|
3777
|
+
* @returns {void}
|
|
3778
|
+
*/
|
|
3779
|
+
TreeGrid.prototype.exportTreeGrid = function (url) {
|
|
3780
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
3781
|
+
var treegrid = this;
|
|
3782
|
+
var query = treegrid.grid.getDataModule().generateQuery(true);
|
|
3783
|
+
var state = new UrlAdaptor().processQuery(new DataManager({ url: '' }), query);
|
|
3784
|
+
var queries = JSON.parse(state.data);
|
|
3785
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3786
|
+
var treeGridModel = JSON.parse(this.addOnPersist(['allowPaging', 'pageSettings', 'sortSettings', 'allowPdfExport', 'allowExcelExport', 'aggregates',
|
|
3787
|
+
'filterSettings', 'columns', 'locale', 'searchSettings', 'idMapping', 'parentIdMapping', 'childMapping', 'treeColumnIndex']));
|
|
3788
|
+
var include = ['field', 'headerText', 'type', 'format', 'visible',
|
|
3789
|
+
'template', 'index', 'width', 'textAlign', 'headerTextAlign', 'columns'];
|
|
3790
|
+
treeGridModel.filterSettings.columns = queries.where;
|
|
3791
|
+
treeGridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];
|
|
3792
|
+
treeGridModel.sortSettings.columns = queries.sorted;
|
|
3793
|
+
treeGridModel.columns = this.setHeaderText(treeGridModel.columns, include);
|
|
3794
|
+
var form = this.createElement('form', { id: 'ExportForm', styles: 'display:none;' });
|
|
3795
|
+
var treeGridInput = this.createElement('input', { id: 'treeGridInput', attrs: { name: 'treeGridModel' } });
|
|
3796
|
+
treeGridInput.value = JSON.stringify(treeGridModel);
|
|
3797
|
+
form.method = 'POST';
|
|
3798
|
+
form.action = url;
|
|
3799
|
+
form.appendChild(treeGridInput);
|
|
3800
|
+
document.body.appendChild(form);
|
|
3801
|
+
form.submit();
|
|
3802
|
+
form.remove();
|
|
3803
|
+
};
|
|
3804
|
+
/**
|
|
3805
|
+
* Sets the header text and other properties for an array of columns based on specified criteria.
|
|
3806
|
+
* @param {Column[]} columns - Defines array of columns
|
|
3807
|
+
* @param {string[]} include - Defines array of sting
|
|
3808
|
+
* @returns {Column[]} returns array of columns
|
|
3809
|
+
*/
|
|
3810
|
+
TreeGrid.prototype.setHeaderText = function (columns, include) {
|
|
3811
|
+
for (var i = 0; i < columns.length; i++) {
|
|
3812
|
+
var column = this.getColumnByUid(columns[parseInt(i.toString(), 10)].uid);
|
|
3813
|
+
if (this.stackedHeader && isNullOrUndefined(column)) {
|
|
3814
|
+
column = !isNullOrUndefined(columns[parseInt(i.toString(), 10)].field) ?
|
|
3815
|
+
this.getColumnByField(columns[parseInt(i.toString(), 10)].field) : columns[parseInt(i.toString(), 10)];
|
|
3816
|
+
}
|
|
3817
|
+
columns[parseInt(i.toString(), 10)].headerText = column.headerText;
|
|
3818
|
+
if (!isNullOrUndefined(column.template)) {
|
|
3819
|
+
columns[parseInt(i.toString(), 10)].template = 'true';
|
|
3820
|
+
}
|
|
3821
|
+
if (columns[parseInt(i.toString(), 10)].format) {
|
|
3822
|
+
columns[parseInt(i.toString(), 10)].format = getNumberFormat(this.getFormat(column.format), column.type, false, this.currencyCode);
|
|
3823
|
+
if (!this.isExcel && (column.type === 'datetime' || column.type === 'date')) {
|
|
3824
|
+
columns[parseInt(i.toString(), 10)].format = columns[parseInt(i.toString(), 10)].format.toString().replace('AM/PM', 'tt');
|
|
3825
|
+
}
|
|
3826
|
+
columns[parseInt(i.toString(), 10)].type = column.type;
|
|
3827
|
+
}
|
|
3828
|
+
if (columns[parseInt(i.toString(), 10)].columns) {
|
|
3829
|
+
this.setHeaderText(columns[parseInt(i.toString(), 10)].columns, include);
|
|
3830
|
+
}
|
|
3831
|
+
var keys = Object.keys(columns[parseInt(i.toString(), 10)]);
|
|
3832
|
+
for (var j = 0; j < keys.length; j++) {
|
|
3833
|
+
if (include.indexOf(keys[parseInt(j.toString(), 10)]) < 0) {
|
|
3834
|
+
delete columns[parseInt(i.toString(), 10)][keys[parseInt(j.toString(), 10)]];
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
return columns;
|
|
3839
|
+
};
|
|
3840
|
+
/**
|
|
3841
|
+
* Retrieves the appropriate format string from the given format options.
|
|
3842
|
+
*
|
|
3843
|
+
* @param {string | NumberFormatOptions | DateFormatOptions} format - The format options to retrieve the format string from.
|
|
3844
|
+
* @returns {string} The format string extracted from the provided format options.
|
|
3845
|
+
*/
|
|
3846
|
+
TreeGrid.prototype.getFormat = function (format) {
|
|
3847
|
+
return typeof (format) === 'object' ? !isNullOrUndefined(format.format) ?
|
|
3848
|
+
format.format : format.skeleton : format;
|
|
3849
|
+
};
|
|
3728
3850
|
/**
|
|
3729
3851
|
* For internal use only - Get the module name.
|
|
3730
3852
|
*
|
|
@@ -4000,7 +4122,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4000
4122
|
TreeGrid.prototype.requiredModules = function () {
|
|
4001
4123
|
var modules = [];
|
|
4002
4124
|
var splitFrozenCount = 'splitFrozenCount';
|
|
4003
|
-
this.grid["" + splitFrozenCount](this.
|
|
4125
|
+
this.grid["" + splitFrozenCount](this.getColumns());
|
|
4004
4126
|
if (this.isDestroyed) {
|
|
4005
4127
|
return modules;
|
|
4006
4128
|
}
|
|
@@ -4360,9 +4482,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4360
4482
|
TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
|
|
4361
4483
|
if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
4362
4484
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
|
|
4363
|
-
&&
|
|
4364
|
-
args.
|
|
4365
|
-
|
|
4485
|
+
&& !this.selectionSettings.checkboxOnly) {
|
|
4486
|
+
if ((!isNullOrUndefined(args.data) && args.data['hasChildRecords']) || (args.rowIndex !== -1 && isNullOrUndefined(args.data))) {
|
|
4487
|
+
args.cancel = true;
|
|
4488
|
+
return;
|
|
4489
|
+
}
|
|
4366
4490
|
}
|
|
4367
4491
|
};
|
|
4368
4492
|
TreeGrid.prototype.bindGridEvents = function () {
|
|
@@ -4480,9 +4604,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4480
4604
|
_this.updateAltRow(_this.getRows());
|
|
4481
4605
|
_this.notify('dataBoundArg', args);
|
|
4482
4606
|
if (isRemoteData(_this) && !isOffline(_this) && !_this.hasChildMapping) {
|
|
4483
|
-
var req =
|
|
4484
|
-
|
|
4485
|
-
|
|
4607
|
+
var req = void 0;
|
|
4608
|
+
if (_this.dataResults.result) {
|
|
4609
|
+
req = 0;
|
|
4610
|
+
}
|
|
4611
|
+
else {
|
|
4612
|
+
req = 1;
|
|
4613
|
+
}
|
|
4486
4614
|
setValue('grid.contentModule.isLoaded', !(req > 0), _this);
|
|
4487
4615
|
}
|
|
4488
4616
|
if (_this.isPixelHeight() && _this.initialRender) {
|
|
@@ -5429,9 +5557,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5429
5557
|
}
|
|
5430
5558
|
};
|
|
5431
5559
|
TreeGrid.prototype.ignoreInColumn = function (ignoreOnColumn, column) {
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5560
|
+
if (isNullOrUndefined(column.template)) {
|
|
5561
|
+
for (var i = 0; i < ignoreOnColumn.length; i++) {
|
|
5562
|
+
delete column[ignoreOnColumn[parseInt(i.toString(), 10)]];
|
|
5563
|
+
column.filter = {};
|
|
5564
|
+
}
|
|
5435
5565
|
}
|
|
5436
5566
|
};
|
|
5437
5567
|
TreeGrid.prototype.mouseClickHandler = function (e) {
|
|
@@ -6241,7 +6371,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6241
6371
|
var children = 'Children';
|
|
6242
6372
|
if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record["" + children]))) {
|
|
6243
6373
|
var expandArgs = { data: record, row: row };
|
|
6244
|
-
this.setHeightForFrozenContent();
|
|
6245
6374
|
if (!isNullOrUndefined(this.expandStateMapping)) {
|
|
6246
6375
|
this.updateExpandStateMapping(expandArgs.data, true);
|
|
6247
6376
|
}
|
|
@@ -6268,12 +6397,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6268
6397
|
this.expandCollapse(action, null, records[parseInt(i.toString(), 10)]);
|
|
6269
6398
|
}
|
|
6270
6399
|
};
|
|
6271
|
-
TreeGrid.prototype.setHeightForFrozenContent = function () {
|
|
6272
|
-
var freeze = (this.grid.getFrozenLeftColumnsCount() > 0 || this.grid.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
6273
|
-
if (this.grid.getFrozenColumns() > 0 || freeze) {
|
|
6274
|
-
this.grid.contentModule.refreshScrollOffset();
|
|
6275
|
-
}
|
|
6276
|
-
};
|
|
6277
6400
|
TreeGrid.prototype.getCollapseExpandRecords = function (row, record) {
|
|
6278
6401
|
if (this.allowPaging && this.pageSettings.pageSizeMode === 'All' && this.isExpandAll && isNullOrUndefined(record) &&
|
|
6279
6402
|
!isRemoteData(this)) {
|
|
@@ -6350,7 +6473,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6350
6473
|
this.expandCollapse('collapse', row, record);
|
|
6351
6474
|
var collapseArgs = { data: record, row: row };
|
|
6352
6475
|
if (!isRemoteData(this)) {
|
|
6353
|
-
this.setHeightForFrozenContent();
|
|
6354
6476
|
if (!isNullOrUndefined(this.expandStateMapping)) {
|
|
6355
6477
|
this.updateExpandStateMapping(collapseArgs.data, false);
|
|
6356
6478
|
}
|
|
@@ -6805,7 +6927,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6805
6927
|
_this.isExpandRefresh = true;
|
|
6806
6928
|
var scrollHeightBeforeRefresh = _this.getContentTable().parentElement.scrollTop;
|
|
6807
6929
|
_this.grid.refresh();
|
|
6808
|
-
_this.setHeightForFrozenContent();
|
|
6809
6930
|
if (_this.enableInfiniteScrolling) {
|
|
6810
6931
|
_this.getContentTable().parentElement.scrollTop = scrollHeightBeforeRefresh;
|
|
6811
6932
|
}
|
|
@@ -6828,7 +6949,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6828
6949
|
this.notify(remoteExpand, { record: record, rows: rows, parentRow: row });
|
|
6829
6950
|
var args_1 = { row: row, data: record };
|
|
6830
6951
|
if (rows.length > 0) {
|
|
6831
|
-
this.setHeightForFrozenContent();
|
|
6832
6952
|
this.trigger(expanded, args_1);
|
|
6833
6953
|
}
|
|
6834
6954
|
}
|
|
@@ -6837,7 +6957,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6837
6957
|
}
|
|
6838
6958
|
else {
|
|
6839
6959
|
this.collapseRemoteChild({ record: record, rows: rows });
|
|
6840
|
-
this.setHeightForFrozenContent();
|
|
6841
6960
|
this.trigger(collapsed, args);
|
|
6842
6961
|
}
|
|
6843
6962
|
};
|
|
@@ -6872,12 +6991,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6872
6991
|
}
|
|
6873
6992
|
var freeze = (this.grid.getFrozenLeftColumnsCount() > 0 || this.grid.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
6874
6993
|
if (this.frozenRows || this.frozenColumns || this.getFrozenColumns() || freeze) {
|
|
6875
|
-
movableRows = this.
|
|
6994
|
+
movableRows = this.getRows().filter(function (r) {
|
|
6876
6995
|
return r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1));
|
|
6877
6996
|
});
|
|
6878
6997
|
}
|
|
6879
6998
|
if (freeze) {
|
|
6880
|
-
freezeRightRows = this.
|
|
6999
|
+
freezeRightRows = this.getRows().filter(function (r) {
|
|
6881
7000
|
return r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1));
|
|
6882
7001
|
});
|
|
6883
7002
|
}
|
|
@@ -6977,10 +7096,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6977
7096
|
var rightrows = [];
|
|
6978
7097
|
var freeze = (this.getFrozenLeftColumnsCount() > 0 || this.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
6979
7098
|
if (freeze) {
|
|
6980
|
-
movablerows = this.
|
|
7099
|
+
movablerows = this.getRows().filter(function (r) {
|
|
6981
7100
|
return r.querySelector('.e-gridrowindex' + rowDetails.record.index + 'level' + (rowDetails.record.level + 1));
|
|
6982
7101
|
});
|
|
6983
|
-
rightrows = this.
|
|
7102
|
+
rightrows = this.getRows().filter(function (r) {
|
|
6984
7103
|
return r.querySelector('.e-gridrowindex' + rowDetails.record.index + 'level' + (rowDetails.record.level + 1));
|
|
6985
7104
|
});
|
|
6986
7105
|
}
|
|
@@ -7190,59 +7309,72 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
7190
7309
|
* @param {number} rowIndex - Specifies the row index.
|
|
7191
7310
|
* @param {number} columnIndex - Specifies the column index.
|
|
7192
7311
|
* @returns {Element} - Returns movable cell element from the indexes passed
|
|
7312
|
+
*
|
|
7313
|
+
* @deprecated This method is deprecated. Use getCellFromIndex method instead.
|
|
7193
7314
|
*/
|
|
7194
7315
|
TreeGrid.prototype.getMovableCellFromIndex = function (rowIndex, columnIndex) {
|
|
7195
|
-
return this.grid.
|
|
7316
|
+
return this.grid.getCellFromIndex(rowIndex, columnIndex);
|
|
7196
7317
|
};
|
|
7197
7318
|
/**
|
|
7198
7319
|
* Gets all the TreeGrid's movable table data rows.
|
|
7199
7320
|
*
|
|
7200
7321
|
* @returns {Element[]} - Returns element collection of movable rows
|
|
7322
|
+
*
|
|
7323
|
+
* @deprecated This method is deprecated. Use getDataRows method instead.
|
|
7201
7324
|
*/
|
|
7202
7325
|
TreeGrid.prototype.getMovableDataRows = function () {
|
|
7203
|
-
return this.grid.
|
|
7326
|
+
return this.grid.getDataRows();
|
|
7204
7327
|
};
|
|
7205
7328
|
/**
|
|
7206
7329
|
* Gets a movable tables row by index.
|
|
7207
7330
|
*
|
|
7208
7331
|
* @param {number} index - Specifies the row index.
|
|
7209
7332
|
* @returns {Element} - Returns movable row based on index passed
|
|
7333
|
+
*
|
|
7334
|
+
* @deprecated This method is deprecated. Use getRowByIndex method instead.
|
|
7210
7335
|
*/
|
|
7211
7336
|
TreeGrid.prototype.getMovableRowByIndex = function (index) {
|
|
7212
|
-
return this.grid.
|
|
7337
|
+
return this.grid.getRowByIndex(index);
|
|
7213
7338
|
};
|
|
7214
7339
|
/**
|
|
7215
7340
|
* Gets the TreeGrid's movable content rows from frozen treegrid.
|
|
7216
7341
|
*
|
|
7217
7342
|
* @returns {Element[]}: Returns movable row element
|
|
7343
|
+
* @deprecated This method is deprecated. Use getRows method instead.
|
|
7218
7344
|
*/
|
|
7219
7345
|
TreeGrid.prototype.getMovableRows = function () {
|
|
7220
|
-
return this.grid.
|
|
7346
|
+
return this.grid.getRows();
|
|
7221
7347
|
};
|
|
7222
7348
|
/**
|
|
7223
7349
|
* Gets a frozen right tables row element by index.
|
|
7224
7350
|
*
|
|
7225
7351
|
* @param {number} index - Specifies the row index.
|
|
7226
7352
|
* @returns {Element} returns the element
|
|
7353
|
+
*
|
|
7354
|
+
* @deprecated This method is deprecated. Use getRowByIndex method instead.
|
|
7227
7355
|
*/
|
|
7228
7356
|
TreeGrid.prototype.getFrozenRightRowByIndex = function (index) {
|
|
7229
|
-
return this.grid.
|
|
7357
|
+
return this.grid.getRowByIndex(index);
|
|
7230
7358
|
};
|
|
7231
7359
|
/**
|
|
7232
7360
|
* Gets the Tree Grid's frozen right content rows from frozen Tree Grid.
|
|
7233
7361
|
*
|
|
7234
7362
|
* @returns {Element[]} returns the element
|
|
7363
|
+
*
|
|
7364
|
+
* @deprecated This method is deprecated. Use getRows method instead.
|
|
7235
7365
|
*/
|
|
7236
7366
|
TreeGrid.prototype.getFrozenRightRows = function () {
|
|
7237
|
-
return this.grid.
|
|
7367
|
+
return this.grid.getRows();
|
|
7238
7368
|
};
|
|
7239
7369
|
/**
|
|
7240
7370
|
* Gets all the Tree Grid's frozen right table data rows.
|
|
7241
7371
|
*
|
|
7242
7372
|
* @returns {Element[]} Returns the Element
|
|
7373
|
+
*
|
|
7374
|
+
* @deprecated This method is deprecated. Use getDataRows method instead.
|
|
7243
7375
|
*/
|
|
7244
7376
|
TreeGrid.prototype.getFrozenRightDataRows = function () {
|
|
7245
|
-
return this.grid.
|
|
7377
|
+
return this.grid.getDataRows();
|
|
7246
7378
|
};
|
|
7247
7379
|
/**
|
|
7248
7380
|
* Gets a frozen right table cell by row and column index.
|
|
@@ -7250,36 +7382,44 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
7250
7382
|
* @param {number} rowIndex - Specifies the row index.
|
|
7251
7383
|
* @param {number} columnIndex - Specifies the column index.
|
|
7252
7384
|
* @returns {Element} Returns the Element
|
|
7385
|
+
*
|
|
7386
|
+
* @deprecated This method is deprecated. Use getCellFromIndex method instead.
|
|
7253
7387
|
*/
|
|
7254
7388
|
TreeGrid.prototype.getFrozenRightCellFromIndex = function (rowIndex, columnIndex) {
|
|
7255
|
-
return this.grid.
|
|
7389
|
+
return this.grid.getCellFromIndex(rowIndex, columnIndex);
|
|
7256
7390
|
};
|
|
7257
7391
|
/**
|
|
7258
7392
|
* Gets a frozen left column header by column index.
|
|
7259
7393
|
*
|
|
7260
7394
|
* @param {number} index - Specifies the column index.
|
|
7261
7395
|
* @returns {Element} Returns the Element
|
|
7396
|
+
*
|
|
7397
|
+
* @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
|
|
7262
7398
|
*/
|
|
7263
7399
|
TreeGrid.prototype.getFrozenLeftColumnHeaderByIndex = function (index) {
|
|
7264
|
-
return this.grid.
|
|
7400
|
+
return this.grid.getColumnHeaderByIndex(index);
|
|
7265
7401
|
};
|
|
7266
7402
|
/**
|
|
7267
7403
|
* Gets a frozen right column header by column index.
|
|
7268
7404
|
*
|
|
7269
7405
|
* @param {number} index - Specifies the column index.
|
|
7270
7406
|
* @returns {Element} Returns the Element
|
|
7407
|
+
*
|
|
7408
|
+
* @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
|
|
7271
7409
|
*/
|
|
7272
7410
|
TreeGrid.prototype.getFrozenRightColumnHeaderByIndex = function (index) {
|
|
7273
|
-
return this.grid.
|
|
7411
|
+
return this.grid.getColumnHeaderByIndex(index);
|
|
7274
7412
|
};
|
|
7275
7413
|
/**
|
|
7276
7414
|
* Gets a movable column header by column index.
|
|
7277
7415
|
*
|
|
7278
7416
|
* @param {number} index - Specifies the column index.
|
|
7279
7417
|
* @returns {Element} Returns the Element
|
|
7418
|
+
*
|
|
7419
|
+
* @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
|
|
7280
7420
|
*/
|
|
7281
7421
|
TreeGrid.prototype.getMovableColumnHeaderByIndex = function (index) {
|
|
7282
|
-
return this.grid.
|
|
7422
|
+
return this.grid.getColumnHeaderByIndex(index);
|
|
7283
7423
|
};
|
|
7284
7424
|
/**
|
|
7285
7425
|
* @hidden
|
|
@@ -7513,6 +7653,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
7513
7653
|
__decorate([
|
|
7514
7654
|
Complex({}, RowDropSettings)
|
|
7515
7655
|
], TreeGrid.prototype, "rowDropSettings", void 0);
|
|
7656
|
+
__decorate([
|
|
7657
|
+
Property('USD')
|
|
7658
|
+
], TreeGrid.prototype, "currencyCode", void 0);
|
|
7516
7659
|
__decorate([
|
|
7517
7660
|
Property()
|
|
7518
7661
|
], TreeGrid.prototype, "pagerTemplate", void 0);
|
|
@@ -9452,8 +9595,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
9452
9595
|
var currentPage = this["" + model].currentPage;
|
|
9453
9596
|
if (clear) {
|
|
9454
9597
|
this.cache = {};
|
|
9455
|
-
this.movableCache = {};
|
|
9456
|
-
this.frozenRightCache = {}
|
|
9598
|
+
/*this.movableCache = {};
|
|
9599
|
+
this.frozenRightCache = {};*/
|
|
9457
9600
|
this.data = {};
|
|
9458
9601
|
this.groups = {};
|
|
9459
9602
|
}
|
|
@@ -9468,8 +9611,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
9468
9611
|
this.cache = {};
|
|
9469
9612
|
this.data = {};
|
|
9470
9613
|
this.groups = {};
|
|
9471
|
-
this.movableCache = {};
|
|
9472
|
-
this.frozenRightCache = {}
|
|
9614
|
+
/*this.movableCache = {};
|
|
9615
|
+
this.frozenRightCache = {};*/
|
|
9473
9616
|
}
|
|
9474
9617
|
}
|
|
9475
9618
|
return clear;
|
|
@@ -11067,21 +11210,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
|
|
|
11067
11210
|
};
|
|
11068
11211
|
BatchEdit.prototype.cellSaved = function (args) {
|
|
11069
11212
|
var actualCellIndex = args.column.index;
|
|
11070
|
-
|
|
11071
|
-
if (frozenCols && args.columnObject.index > frozenCols) {
|
|
11072
|
-
actualCellIndex = actualCellIndex + frozenCols;
|
|
11073
|
-
}
|
|
11074
|
-
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
11075
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
11076
|
-
if (freeze) {
|
|
11077
|
-
var colCount = this.parent.getFrozenLeftColumnsCount() + actualCellIndex;
|
|
11078
|
-
if (colCount === this.parent.treeColumnIndex) {
|
|
11079
|
-
this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
|
|
11080
|
-
column: this.parent.grid.getColumnByIndex(args.column.index)
|
|
11081
|
-
});
|
|
11082
|
-
}
|
|
11083
|
-
}
|
|
11084
|
-
else if (actualCellIndex === this.parent.treeColumnIndex) {
|
|
11213
|
+
if (actualCellIndex === this.parent.treeColumnIndex) {
|
|
11085
11214
|
this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
|
|
11086
11215
|
column: this.parent.grid.getColumnByIndex(args.column.index)
|
|
11087
11216
|
});
|
|
@@ -11285,7 +11414,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
|
|
|
11285
11414
|
for (var i = firstChildIndex; i <= totalCount; i++) {
|
|
11286
11415
|
row.push(this.parent.grid.getDataRows()[parseInt(i.toString(), 10)]);
|
|
11287
11416
|
if (this.parent.frozenRows || this.parent.frozenColumns || this.parent.getFrozenColumns()) {
|
|
11288
|
-
row.push(this.parent.grid.
|
|
11417
|
+
row.push(this.parent.grid.getHeaderContent()[parseInt(i.toString(), 10)]);
|
|
11289
11418
|
}
|
|
11290
11419
|
}
|
|
11291
11420
|
}
|
|
@@ -11317,18 +11446,6 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
|
|
|
11317
11446
|
for (var i = 0; i < rows.length; i++) {
|
|
11318
11447
|
rows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
11319
11448
|
}
|
|
11320
|
-
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
11321
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
11322
|
-
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns || freeze) {
|
|
11323
|
-
var mRows = this.parent.grid.getMovableDataRows();
|
|
11324
|
-
var freezeRightRows = this.parent.grid.getFrozenRightDataRows();
|
|
11325
|
-
for (var i = 0; i < mRows.length; i++) {
|
|
11326
|
-
mRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
11327
|
-
if (freeze) {
|
|
11328
|
-
freezeRightRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
11329
|
-
}
|
|
11330
|
-
}
|
|
11331
|
-
}
|
|
11332
11449
|
};
|
|
11333
11450
|
BatchEdit.prototype.updateChildCount = function (records) {
|
|
11334
11451
|
var primaryKey = this.parent.grid.getPrimaryKeyFieldNames()[0];
|
|
@@ -11787,8 +11904,8 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11787
11904
|
currentData.splice(newRowObjectIndex, 0, newRecord);
|
|
11788
11905
|
this.updateInfiniteCurrentViewData(newRecord, this.addRowIndex);
|
|
11789
11906
|
}
|
|
11790
|
-
var movableRows = this.parent.grid.
|
|
11791
|
-
var movableRowsObject = this.parent.grid.
|
|
11907
|
+
var movableRows = this.parent.grid.getRows();
|
|
11908
|
+
var movableRowsObject = this.parent.grid.getRowsObject();
|
|
11792
11909
|
var isCache = this.parent.infiniteScrollSettings.enableCache;
|
|
11793
11910
|
if (!isCache) {
|
|
11794
11911
|
resetRowIndex(this.parent.grid, this.parent.grid.getRowsObject(), this.parent.grid.getRows(), 0);
|
|
@@ -11995,16 +12112,13 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11995
12112
|
if (this.parent.getRows().indexOf(row_1) !== -1) {
|
|
11996
12113
|
rowIndex_1 = this.parent.getRows().indexOf(row_1);
|
|
11997
12114
|
}
|
|
11998
|
-
else if (this.parent.getFrozenRightRows().indexOf(row_1) !== -1) {
|
|
11999
|
-
rowIndex_1 = this.parent.getFrozenRightRows().indexOf(row_1);
|
|
12000
|
-
}
|
|
12001
12115
|
else {
|
|
12002
|
-
rowIndex_1 = this.parent.
|
|
12116
|
+
rowIndex_1 = this.parent.getRows().indexOf(row_1);
|
|
12003
12117
|
}
|
|
12004
12118
|
}
|
|
12005
12119
|
else {
|
|
12006
12120
|
rowIndex_1 = (this.parent.getRows().indexOf(row_1) === -1 && (this.parent.getFrozenColumns() > 0)) ?
|
|
12007
|
-
this.parent.grid.
|
|
12121
|
+
this.parent.grid.getRows().indexOf(row_1) : this.parent.getRows().indexOf(row_1);
|
|
12008
12122
|
}
|
|
12009
12123
|
}
|
|
12010
12124
|
var arg = {};
|
|
@@ -12060,7 +12174,6 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
12060
12174
|
}
|
|
12061
12175
|
};
|
|
12062
12176
|
Edit$$1.prototype.afterCellSave = function (args, row, rowIndex) {
|
|
12063
|
-
var mRow;
|
|
12064
12177
|
if (this.parent.grid.aggregateModule) {
|
|
12065
12178
|
this.parent.grid.aggregateModule.refresh(args.rowData);
|
|
12066
12179
|
}
|
|
@@ -12071,31 +12184,6 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
12071
12184
|
this.isOnBatch = false;
|
|
12072
12185
|
}
|
|
12073
12186
|
this.enableToolbarItems('save');
|
|
12074
|
-
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
12075
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
12076
|
-
if (freeze) {
|
|
12077
|
-
if (args.cell.closest('.e-frozen-left-header') || args.cell.closest('.e-frozen-left-content')) {
|
|
12078
|
-
mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
|
|
12079
|
-
}
|
|
12080
|
-
else if (args.cell.closest('.e-movableheader') || args.cell.closest('.e-movablecontent')) {
|
|
12081
|
-
mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
|
|
12082
|
-
}
|
|
12083
|
-
else {
|
|
12084
|
-
mRow = this.parent.grid.getFrozenRightRows()[parseInt(rowIndex.toString(), 10)];
|
|
12085
|
-
}
|
|
12086
|
-
removeClass([mRow], ['e-editedrow', 'e-batchrow']);
|
|
12087
|
-
removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
12088
|
-
}
|
|
12089
|
-
else if (this.parent.getFrozenColumns() > 0) {
|
|
12090
|
-
if (args.cell.closest('.e-frozenheader') || args.cell.closest('.e-frozencontent')) {
|
|
12091
|
-
mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
|
|
12092
|
-
}
|
|
12093
|
-
else {
|
|
12094
|
-
mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
|
|
12095
|
-
}
|
|
12096
|
-
removeClass([mRow], ['e-editedrow', 'e-batchrow']);
|
|
12097
|
-
removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
12098
|
-
}
|
|
12099
12187
|
removeClass([row], ['e-editedrow', 'e-batchrow']);
|
|
12100
12188
|
removeClass(row.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
12101
12189
|
if (this.parent['isCellSaveFocus'] !== false) {
|
|
@@ -12281,23 +12369,6 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
12281
12369
|
this.parent.grid.contentModule["" + r].splice(0, 1);
|
|
12282
12370
|
this.parent.grid.contentModule["" + r].splice(rowObjectIndex, 0, newRowObject);
|
|
12283
12371
|
}
|
|
12284
|
-
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
12285
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
12286
|
-
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns || freeze) {
|
|
12287
|
-
var movableRows = this.parent.getMovableDataRows();
|
|
12288
|
-
var frows = 'freezeRows';
|
|
12289
|
-
var newFreezeRowObject = this.parent.grid.getRowsObject()[0];
|
|
12290
|
-
movableRows[index + 1]["" + position](movableRows[0]);
|
|
12291
|
-
if (freeze) {
|
|
12292
|
-
var rightFrozenRows = this.parent.getFrozenRightDataRows();
|
|
12293
|
-
rightFrozenRows[index + 1]["" + position](rightFrozenRows[0]);
|
|
12294
|
-
}
|
|
12295
|
-
if (this.parent.editSettings.mode === 'Batch') {
|
|
12296
|
-
this.parent.grid.contentModule["" + frows].splice(0, 1);
|
|
12297
|
-
this.parent.grid.contentModule["" + frows].splice(rowObjectIndex, 0, newFreezeRowObject);
|
|
12298
|
-
}
|
|
12299
|
-
setValue('batchIndex', index + 1, this.batchEditModule);
|
|
12300
|
-
}
|
|
12301
12372
|
if (this.parent.editSettings.mode === 'Row' || this.parent.editSettings.mode === 'Cell') {
|
|
12302
12373
|
var errors = this.parent.grid.getContentTable().querySelectorAll('.e-griderror');
|
|
12303
12374
|
for (var i = 0; i < errors.length; i++) {
|
|
@@ -12670,8 +12741,8 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
12670
12741
|
|| (this.parent.editSettings.mode === 'Batch' && e.args.requestType.toString() === 'batchsave'))) {
|
|
12671
12742
|
this.updateIndex(this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
|
|
12672
12743
|
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns) {
|
|
12673
|
-
if (this.parent.grid.dataSource.length === this.parent.
|
|
12674
|
-
this.updateIndex(this.parent.grid.dataSource, this.parent.
|
|
12744
|
+
if (this.parent.grid.dataSource.length === this.parent.getDataRows().length) {
|
|
12745
|
+
this.updateIndex(this.parent.grid.dataSource, this.parent.getDataRows(), this.parent.getCurrentViewRecords());
|
|
12675
12746
|
}
|
|
12676
12747
|
}
|
|
12677
12748
|
}
|
|
@@ -12876,18 +12947,19 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12876
12947
|
return new TreeVirtualRowModelGenerator(this.parent);
|
|
12877
12948
|
};
|
|
12878
12949
|
VirtualTreeContentRenderer.prototype.getRowByIndex = function (index) {
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12950
|
+
if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
|
|
12951
|
+
return this.getRowCollection(index, true);
|
|
12952
|
+
}
|
|
12953
|
+
else {
|
|
12954
|
+
return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; })[0];
|
|
12955
|
+
}
|
|
12883
12956
|
};
|
|
12884
12957
|
VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
|
|
12885
12958
|
return this.getRowCollection(index, false, false, true);
|
|
12886
12959
|
};
|
|
12887
12960
|
VirtualTreeContentRenderer.prototype.getRowCollection = function (index, isMovable, isRowObject, isFrozenRight) {
|
|
12888
12961
|
var startIdx = parseInt(this.parent.getRows()[0].getAttribute(dataRowIndex), 10);
|
|
12889
|
-
var rowCollection =
|
|
12890
|
-
rowCollection = isFrozenRight ? this.parent.getFrozenRightDataRows() : rowCollection;
|
|
12962
|
+
var rowCollection = this.parent.getDataRows();
|
|
12891
12963
|
var collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
|
|
12892
12964
|
var selectedRow = collection[index - startIdx];
|
|
12893
12965
|
if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {
|
|
@@ -12940,8 +13012,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12940
13012
|
this.endIndex = this.parent.pageSettings.pageSize - 1;
|
|
12941
13013
|
}
|
|
12942
13014
|
if ((this.endIndex - this.startIndex !== this.parent.pageSettings.pageSize) &&
|
|
12943
|
-
(this.totalRecords > this.parent.pageSettings.pageSize)
|
|
12944
|
-
(this.endIndex === this.totalRecords)) {
|
|
13015
|
+
(this.totalRecords > this.parent.pageSettings.pageSize)
|
|
13016
|
+
&& (this.endIndex === this.totalRecords)) {
|
|
12945
13017
|
args.startIndex = this.endIndex - this.parent.pageSettings.pageSize;
|
|
12946
13018
|
args.endIndex = this.endIndex;
|
|
12947
13019
|
}
|
|
@@ -13339,29 +13411,16 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13339
13411
|
}
|
|
13340
13412
|
};
|
|
13341
13413
|
VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
13342
|
-
var isFrozen = this.parent.isFrozenGrid();
|
|
13343
13414
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
13344
13415
|
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || this.parent.isFrozenGrid()) {
|
|
13345
13416
|
if (getValue('isExpandCollapse', e)) {
|
|
13346
13417
|
this.isRemoteExpand = true;
|
|
13347
13418
|
}
|
|
13348
|
-
if (isFrozen && ((isNullOrUndefined(this.requestType) && getValue('requestTypes', this).indexOf('isFrozen') === -1) ||
|
|
13349
|
-
(this.parent.enableVirtualMaskRow && this.requestType === 'virtualscroll'))) {
|
|
13350
|
-
getValue('requestTypes', this).push('isFrozen');
|
|
13351
|
-
this.requestType = 'isFrozen';
|
|
13352
|
-
}
|
|
13353
13419
|
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
13354
13420
|
if (getValue('requestTypes', this).indexOf('isFrozen') !== -1) {
|
|
13355
13421
|
getValue('requestTypes', this).splice(getValue('requestTypes', this).indexOf('isFrozen'), 1);
|
|
13356
13422
|
this.requestType = this.requestType === 'isFrozen' ? undefined : this.requestType;
|
|
13357
13423
|
}
|
|
13358
|
-
if (isFrozen && (!this.isExpandCollapse || this.translateY === 0)) {
|
|
13359
|
-
this.translateY = this.translateY < 0 ? 0 : this.translateY;
|
|
13360
|
-
getValue('virtualEle', this).adjustTable(0, this.translateY);
|
|
13361
|
-
}
|
|
13362
|
-
else {
|
|
13363
|
-
this.isExpandCollapse = false;
|
|
13364
|
-
}
|
|
13365
13424
|
}
|
|
13366
13425
|
else {
|
|
13367
13426
|
var info = e.virtualInfo.sentinelInfo && e.virtualInfo.sentinelInfo.axis === 'Y' &&
|
|
@@ -13631,6 +13690,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13631
13690
|
this.parent.grid.notify(indexModifier, counts);
|
|
13632
13691
|
var startIndex = counts.startIndex;
|
|
13633
13692
|
var endIndex = counts.endIndex;
|
|
13693
|
+
pageingDetails.count = visualData.length;
|
|
13634
13694
|
if (startIndex === -1 && endIndex === -1) {
|
|
13635
13695
|
var query = new Query();
|
|
13636
13696
|
var size = this.parent.grid.pageSettings.pageSize;
|
|
@@ -13649,7 +13709,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13649
13709
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
13650
13710
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13651
13711
|
}
|
|
13652
|
-
if ((requestType === 'save' &&
|
|
13712
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13653
13713
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13654
13714
|
endIndex = counts.count;
|
|
13655
13715
|
this.parent['isAddedFromGantt'] = false;
|
|
@@ -13722,15 +13782,12 @@ var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
|
|
|
13722
13782
|
var parentGrid = getValue('parent', this);
|
|
13723
13783
|
getValue('parent', this).log(['limitation', 'virtual_height'], 'virtualization');
|
|
13724
13784
|
var renderer = getValue('locator', this).getService('rendererFactory');
|
|
13725
|
-
if (
|
|
13726
|
-
if (parentGrid.enableColumnVirtualization) {
|
|
13727
|
-
getValue('addRenderer', renderer)
|
|
13728
|
-
.apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
13729
|
-
}
|
|
13785
|
+
if (parentGrid.enableColumnVirtualization) {
|
|
13730
13786
|
getValue('addRenderer', renderer)
|
|
13731
|
-
.apply(renderer, [RenderType.
|
|
13787
|
+
.apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
13732
13788
|
}
|
|
13733
|
-
|
|
13789
|
+
getValue('addRenderer', renderer)
|
|
13790
|
+
.apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
13734
13791
|
this.ensurePageSize();
|
|
13735
13792
|
};
|
|
13736
13793
|
TreeVirtual.prototype.ensurePageSize = function () {
|
|
@@ -13749,162 +13806,6 @@ var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
|
|
|
13749
13806
|
return TreeVirtual;
|
|
13750
13807
|
}(VirtualScroll));
|
|
13751
13808
|
|
|
13752
|
-
var __extends$18 = (undefined && undefined.__extends) || (function () {
|
|
13753
|
-
var extendStatics = function (d, b) {
|
|
13754
|
-
extendStatics = Object.setPrototypeOf ||
|
|
13755
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
13756
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
13757
|
-
return extendStatics(d, b);
|
|
13758
|
-
};
|
|
13759
|
-
return function (d, b) {
|
|
13760
|
-
extendStatics(d, b);
|
|
13761
|
-
function __() { this.constructor = d; }
|
|
13762
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13763
|
-
};
|
|
13764
|
-
})();
|
|
13765
|
-
/**
|
|
13766
|
-
* VirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
13767
|
-
*
|
|
13768
|
-
* @hidden
|
|
13769
|
-
*/
|
|
13770
|
-
var VirtualTreeFreezeRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13771
|
-
__extends$18(VirtualTreeFreezeRenderer, _super);
|
|
13772
|
-
function VirtualTreeFreezeRenderer(parent, locator) {
|
|
13773
|
-
var _this = _super.call(this, parent, locator) || this;
|
|
13774
|
-
_this.addEventListener();
|
|
13775
|
-
return _this;
|
|
13776
|
-
}
|
|
13777
|
-
/**
|
|
13778
|
-
* @returns {void}
|
|
13779
|
-
* @hidden
|
|
13780
|
-
*/
|
|
13781
|
-
VirtualTreeFreezeRenderer.prototype.renderTable = function () {
|
|
13782
|
-
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
13783
|
-
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
13784
|
-
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
13785
|
-
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
13786
|
-
FreezeContentRender.prototype.renderTable.call(this);
|
|
13787
|
-
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
13788
|
-
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
13789
|
-
var movableCont = this.getMovableContent();
|
|
13790
|
-
var minHeight = this.parent.height;
|
|
13791
|
-
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
|
|
13792
|
-
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
13793
|
-
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
13794
|
-
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
13795
|
-
if (this.parent.enableColumnVirtualization) {
|
|
13796
|
-
this.virtualRenderer.virtualEle.movableContent = this.virtualRenderer.movableContent
|
|
13797
|
-
= this.getPanel().querySelector('.' + movableContent);
|
|
13798
|
-
this.virtualRenderer.virtualEle.renderMovableWrapper(minHeight);
|
|
13799
|
-
this.virtualRenderer.virtualEle.renderMovablePlaceHolder();
|
|
13800
|
-
var tbl = movableCont.querySelector('table');
|
|
13801
|
-
this.virtualRenderer.virtualEle.movableTable = tbl;
|
|
13802
|
-
this.virtualRenderer.virtualEle.movableWrapper.appendChild(tbl);
|
|
13803
|
-
movableCont.appendChild(this.virtualRenderer.virtualEle.movableWrapper);
|
|
13804
|
-
movableCont.appendChild(this.virtualRenderer.virtualEle.movablePlaceholder);
|
|
13805
|
-
}
|
|
13806
|
-
this.virtualRenderer.virtualEle.wrapper.appendChild(this.getFrozenContent());
|
|
13807
|
-
this.virtualRenderer.virtualEle.wrapper.appendChild(movableCont);
|
|
13808
|
-
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
13809
|
-
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
13810
|
-
};
|
|
13811
|
-
/**
|
|
13812
|
-
* @param {HTMLElement} target - specifies the target
|
|
13813
|
-
* @param {DocumentFragment} newChild - specifies the newChild
|
|
13814
|
-
* @param {NotifyArgs} e - specifies the notifyargs
|
|
13815
|
-
* @returns {void}
|
|
13816
|
-
* @hidden
|
|
13817
|
-
*/
|
|
13818
|
-
VirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
13819
|
-
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
13820
|
-
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
13821
|
-
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
13822
|
-
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
13823
|
-
};
|
|
13824
|
-
/**
|
|
13825
|
-
* @param {Object[]} data - specifies the data
|
|
13826
|
-
* @param {NotifyArgs} e - specifies the notifyargs
|
|
13827
|
-
* @returns {Row<Column>[]} returns the row
|
|
13828
|
-
* @hidden
|
|
13829
|
-
*/
|
|
13830
|
-
VirtualTreeFreezeRenderer.prototype.generateRows = function (data, e) {
|
|
13831
|
-
return _super.prototype.generateRows.call(this, data, e);
|
|
13832
|
-
};
|
|
13833
|
-
return VirtualTreeFreezeRenderer;
|
|
13834
|
-
}(VirtualFreezeRenderer));
|
|
13835
|
-
/**
|
|
13836
|
-
* ColumnVirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
13837
|
-
*
|
|
13838
|
-
* @hidden
|
|
13839
|
-
*/
|
|
13840
|
-
var ColumnVirtualTreeFreezeRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13841
|
-
__extends$18(ColumnVirtualTreeFreezeRenderer, _super);
|
|
13842
|
-
function ColumnVirtualTreeFreezeRenderer(parent, locator) {
|
|
13843
|
-
var _this = _super.call(this, parent, locator) || this;
|
|
13844
|
-
_this.serviceLoc = locator;
|
|
13845
|
-
_this.eventListener('on');
|
|
13846
|
-
return _this;
|
|
13847
|
-
}
|
|
13848
|
-
/**
|
|
13849
|
-
* @returns {void}
|
|
13850
|
-
* @hidden
|
|
13851
|
-
*/
|
|
13852
|
-
ColumnVirtualTreeFreezeRenderer.prototype.renderTable = function () {
|
|
13853
|
-
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
13854
|
-
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
13855
|
-
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
13856
|
-
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
13857
|
-
ColumnFreezeContentRenderer.prototype.renderTable.call(this);
|
|
13858
|
-
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
13859
|
-
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
13860
|
-
var frozenRightCont = this.getFrozenRightContent();
|
|
13861
|
-
var frzCont = this.getFrozenContent();
|
|
13862
|
-
var movableCont = this.getMovableContent();
|
|
13863
|
-
if (this.parent.getFrozenMode() === 'Right') {
|
|
13864
|
-
frzCont = frozenRightCont;
|
|
13865
|
-
}
|
|
13866
|
-
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
|
|
13867
|
-
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
13868
|
-
var minHeight = this.parent.height;
|
|
13869
|
-
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
13870
|
-
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
13871
|
-
_super.prototype['renderVirtualFrozenLeft'].call(this, frzCont, movableCont);
|
|
13872
|
-
_super.prototype['renderVirtualFrozenRight'].call(this, frzCont, movableCont);
|
|
13873
|
-
_super.prototype['renderVirtualFrozenLeftRight'].call(this, frzCont, movableCont, frozenRightCont);
|
|
13874
|
-
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
13875
|
-
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
13876
|
-
};
|
|
13877
|
-
ColumnVirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
13878
|
-
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
13879
|
-
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
13880
|
-
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
13881
|
-
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
13882
|
-
};
|
|
13883
|
-
return ColumnVirtualTreeFreezeRenderer;
|
|
13884
|
-
}(ColumnVirtualFreezeRenderer));
|
|
13885
|
-
/**
|
|
13886
|
-
* VirtualTreeFreezeHdrRenderer is used to render the virtual table within the frozen and movable header table
|
|
13887
|
-
*
|
|
13888
|
-
* @hidden
|
|
13889
|
-
*/
|
|
13890
|
-
var VirtualTreeFreezeHdrRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13891
|
-
__extends$18(VirtualTreeFreezeHdrRenderer, _super);
|
|
13892
|
-
function VirtualTreeFreezeHdrRenderer() {
|
|
13893
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
13894
|
-
}
|
|
13895
|
-
/**
|
|
13896
|
-
* @returns {void}
|
|
13897
|
-
* @hidden
|
|
13898
|
-
*/
|
|
13899
|
-
VirtualTreeFreezeHdrRenderer.prototype.renderTable = function () {
|
|
13900
|
-
_super.prototype.renderTable.call(this);
|
|
13901
|
-
};
|
|
13902
|
-
VirtualTreeFreezeHdrRenderer.prototype.rfshMovable = function () {
|
|
13903
|
-
_super.prototype.rfshMovable.call(this);
|
|
13904
|
-
};
|
|
13905
|
-
return VirtualTreeFreezeHdrRenderer;
|
|
13906
|
-
}(VirtualFreezeHdrRenderer));
|
|
13907
|
-
|
|
13908
13809
|
/**
|
|
13909
13810
|
* TreeGrid Freeze module
|
|
13910
13811
|
*
|
|
@@ -13925,7 +13826,6 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
|
|
|
13925
13826
|
this.parent.on('rowExpandCollapse', this.rowExpandCollapse, this);
|
|
13926
13827
|
this.parent.on('dataBoundArg', this.dataBoundArg, this);
|
|
13927
13828
|
this.parent.grid.on('dblclick', this.dblClickHandler, this);
|
|
13928
|
-
this.parent.grid.on('initial-load', this.instantiateRenderer, this);
|
|
13929
13829
|
};
|
|
13930
13830
|
Freeze$$1.prototype.removeEventListener = function () {
|
|
13931
13831
|
if (this.parent.isDestroyed) {
|
|
@@ -13934,46 +13834,16 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
|
|
|
13934
13834
|
this.parent.off('rowExpandCollapse', this.rowExpandCollapse);
|
|
13935
13835
|
this.parent.off('dataBoundArg', this.dataBoundArg);
|
|
13936
13836
|
this.parent.grid.off('dblclick', this.dblClickHandler);
|
|
13937
|
-
this.parent.grid.off('initial-load', this.instantiateRenderer);
|
|
13938
|
-
};
|
|
13939
|
-
Freeze$$1.prototype.instantiateRenderer = function () {
|
|
13940
|
-
var renderer = getValue('serviceLocator', this.parent.grid).getService('rendererFactory');
|
|
13941
|
-
if (this.parent.getFrozenColumns()) {
|
|
13942
|
-
if (this.parent.enableColumnVirtualization) {
|
|
13943
|
-
getValue('addRenderer', renderer)
|
|
13944
|
-
.apply(renderer, [RenderType.Header, new VirtualTreeFreezeHdrRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13945
|
-
}
|
|
13946
|
-
else {
|
|
13947
|
-
getValue('addRenderer', renderer)
|
|
13948
|
-
.apply(renderer, [RenderType.Header, new FreezeRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13949
|
-
}
|
|
13950
|
-
if (this.parent.enableVirtualization) {
|
|
13951
|
-
getValue('addRenderer', renderer)
|
|
13952
|
-
.apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13953
|
-
}
|
|
13954
|
-
}
|
|
13955
|
-
if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
|
|
13956
|
-
getValue('addRenderer', renderer)
|
|
13957
|
-
.apply(renderer, [RenderType.Header, new ColumnFreezeHeaderRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13958
|
-
if (this.parent.enableVirtualization) {
|
|
13959
|
-
getValue('addRenderer', renderer)
|
|
13960
|
-
.apply(renderer, [RenderType.Content, new ColumnVirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13961
|
-
}
|
|
13962
|
-
else {
|
|
13963
|
-
getValue('addRenderer', renderer)
|
|
13964
|
-
.apply(renderer, [RenderType.Content, new ColumnFreezeContentRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13965
|
-
}
|
|
13966
|
-
}
|
|
13967
13837
|
};
|
|
13968
13838
|
Freeze$$1.prototype.rowExpandCollapse = function (args) {
|
|
13969
|
-
var movableRows = this.parent.
|
|
13839
|
+
var movableRows = this.parent.getDataRows();
|
|
13970
13840
|
var frozenrows = this.parent.getRows();
|
|
13971
13841
|
var rows;
|
|
13972
13842
|
var frozenRightRows;
|
|
13973
13843
|
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
13974
13844
|
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
13975
13845
|
if (freeze) {
|
|
13976
|
-
frozenRightRows = this.parent.
|
|
13846
|
+
frozenRightRows = this.parent.getRows().filter(function (e) {
|
|
13977
13847
|
return e.querySelector('.e-gridrowindex' + args.record.index + 'level' + (args.record.level + 1));
|
|
13978
13848
|
});
|
|
13979
13849
|
}
|
|
@@ -14184,7 +14054,7 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
14184
14054
|
var updateIndex = 'updateIndex';
|
|
14185
14055
|
this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
|
|
14186
14056
|
if (this.parent.getFrozenColumns()) {
|
|
14187
|
-
this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.
|
|
14057
|
+
this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getDataRows(), this.parent.getCurrentViewRecords());
|
|
14188
14058
|
}
|
|
14189
14059
|
}
|
|
14190
14060
|
};
|
|
@@ -14305,8 +14175,8 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
14305
14175
|
var keyField = this.parent.grid.getPrimaryKeyFieldNames()[0];
|
|
14306
14176
|
this.removeRows(rowElms, rows, data, keyField, true);
|
|
14307
14177
|
if (this.parent.getFrozenColumns() > 0) {
|
|
14308
|
-
var mRows = this.parent.grid.
|
|
14309
|
-
var mRowElms = this.parent.grid.
|
|
14178
|
+
var mRows = this.parent.grid.getRowsObject();
|
|
14179
|
+
var mRowElms = this.parent.grid.getRows();
|
|
14310
14180
|
this.removeRows(mRowElms, mRows, data, keyField);
|
|
14311
14181
|
}
|
|
14312
14182
|
}
|
|
@@ -14352,23 +14222,23 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
14352
14222
|
var rowRenderer = new RowRenderer(serviceLocator, null, this.parent.grid);
|
|
14353
14223
|
var tbody;
|
|
14354
14224
|
var currentData = this.parent.getCurrentViewRecords();
|
|
14355
|
-
var currentRows = eventArgs.isMovable ? this.parent.grid.
|
|
14225
|
+
var currentRows = eventArgs.isMovable ? this.parent.grid.getRows()
|
|
14356
14226
|
: this.parent.grid.getDataRows();
|
|
14357
14227
|
if (eventArgs.isFrozenRight) {
|
|
14358
14228
|
tbody = this.parent.element.querySelector('.e-frozen-right-content').querySelector('tbody');
|
|
14359
14229
|
}
|
|
14360
14230
|
else {
|
|
14361
14231
|
tbody = !this.parent.grid.isFrozenGrid() ? this.parent.getContent().querySelector('tbody') : eventArgs.isMovable
|
|
14362
|
-
? this.parent.grid.
|
|
14363
|
-
: this.parent.grid.
|
|
14232
|
+
? this.parent.grid.getContent().querySelector('tbody')
|
|
14233
|
+
: this.parent.grid.getContent().querySelector('tbody');
|
|
14364
14234
|
}
|
|
14365
14235
|
if (this.parent.frozenRows) {
|
|
14366
14236
|
tbody = eventArgs.isFrozenRows && this.parent.grid.infiniteScrollModule.requestType !== 'add'
|
|
14367
14237
|
|| !eventArgs.isFrozenRows && this.parent.grid.infiniteScrollModule.requestType === 'add'
|
|
14368
14238
|
? !this.parent.grid.isFrozenGrid() ? this.parent.getHeaderContent().querySelector('tbody')
|
|
14369
|
-
: eventArgs.isMovable ? this.parent.grid.
|
|
14239
|
+
: eventArgs.isMovable ? this.parent.grid.getHeaderContent().querySelector('tbody')
|
|
14370
14240
|
: eventArgs.isFrozenRight ? this.parent.element.querySelector('.e-frozen-right-header').querySelector('tbody')
|
|
14371
|
-
: this.parent.grid.
|
|
14241
|
+
: this.parent.grid.getHeaderContent().querySelector('tbody') : tbody;
|
|
14372
14242
|
}
|
|
14373
14243
|
var position;
|
|
14374
14244
|
var addRowIndex = 'addRowIndex';
|