@syncfusion/ej2-treegrid 20.2.46 → 20.3.47
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 +1 -52
- package/dist/ej2-treegrid.min.js +10 -0
- 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 +432 -102
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +461 -107
- 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/clipboard.d.ts +3 -2
- package/src/treegrid/actions/clipboard.js +3 -2
- package/src/treegrid/actions/context-menu.js +1 -1
- package/src/treegrid/actions/crud-actions.js +4 -0
- package/src/treegrid/actions/edit.js +23 -5
- package/src/treegrid/actions/filter.js +0 -4
- package/src/treegrid/actions/freeze-column.d.ts +1 -0
- package/src/treegrid/actions/freeze-column.js +39 -3
- package/src/treegrid/actions/rowdragdrop.js +8 -5
- package/src/treegrid/actions/selection.js +11 -2
- package/src/treegrid/actions/toolbar.js +43 -41
- package/src/treegrid/actions/virtual-scroll.js +7 -4
- package/src/treegrid/base/constant.d.ts +28 -0
- package/src/treegrid/base/constant.js +28 -0
- package/src/treegrid/base/data.d.ts +1 -0
- package/src/treegrid/base/data.js +3 -2
- package/src/treegrid/base/treegrid-model.d.ts +1 -1
- package/src/treegrid/base/treegrid.d.ts +2 -0
- package/src/treegrid/base/treegrid.js +46 -9
- package/src/treegrid/renderer/virtual-row-model-generator.js +4 -0
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +3 -0
- package/src/treegrid/renderer/virtual-tree-content-render.js +68 -9
- package/src/treegrid/renderer/virtual-tree-freeze-render.d.ts +59 -0
- package/src/treegrid/renderer/virtual-tree-freeze-render.js +163 -0
- package/styles/bootstrap-dark.css +5 -1
- package/styles/bootstrap.css +5 -1
- package/styles/bootstrap4.css +5 -1
- package/styles/bootstrap5-dark.css +6 -1
- package/styles/bootstrap5.css +6 -1
- package/styles/fabric-dark.css +5 -1
- package/styles/fabric.css +5 -1
- package/styles/fluent-dark.css +5 -1
- package/styles/fluent.css +5 -1
- package/styles/highcontrast-light.css +5 -1
- package/styles/highcontrast.css +5 -1
- package/styles/material-dark.css +5 -1
- package/styles/material.css +5 -1
- package/styles/tailwind-dark.css +5 -1
- package/styles/tailwind.css +5 -1
- package/styles/treegrid/_all.scss +1 -1
- package/styles/treegrid/_bootstrap-dark-definition.scss +1 -1
- package/styles/treegrid/_bootstrap-definition.scss +1 -2
- package/styles/treegrid/_bootstrap4-definition.scss +0 -1
- package/styles/treegrid/_bootstrap5-definition.scss +0 -1
- package/styles/treegrid/_fabric-dark-definition.scss +1 -2
- package/styles/treegrid/_fabric-definition.scss +1 -2
- package/styles/treegrid/_fluent-definition.scss +0 -1
- package/styles/treegrid/_fusionnew-definition.scss +0 -1
- package/styles/treegrid/_highcontrast-definition.scss +0 -1
- package/styles/treegrid/_highcontrast-light-definition.scss +0 -2
- package/styles/treegrid/_icons.scss +1 -1
- package/styles/treegrid/_layout.scss +3 -3
- package/styles/treegrid/_material-definition.scss +0 -1
- package/styles/treegrid/_material3-definition.scss +0 -1
- package/styles/treegrid/_tailwind-definition.scss +0 -1
- package/styles/treegrid/_theme.scss +1 -0
- package/styles/treegrid/bootstrap-dark.css +5 -1
- package/styles/treegrid/bootstrap.css +5 -1
- package/styles/treegrid/bootstrap4.css +5 -1
- package/styles/treegrid/bootstrap5-dark.css +6 -1
- package/styles/treegrid/bootstrap5.css +6 -1
- package/styles/treegrid/fabric-dark.css +5 -1
- package/styles/treegrid/fabric.css +5 -1
- package/styles/treegrid/fluent-dark.css +5 -1
- package/styles/treegrid/fluent.css +5 -1
- package/styles/treegrid/highcontrast-light.css +5 -1
- package/styles/treegrid/highcontrast.css +5 -1
- package/styles/treegrid/icons/_bootstrap-dark.scss +1 -1
- package/styles/treegrid/icons/_bootstrap.scss +1 -1
- package/styles/treegrid/icons/_bootstrap4.scss +1 -1
- package/styles/treegrid/icons/_fabric-dark.scss +1 -1
- package/styles/treegrid/icons/_fabric.scss +1 -1
- package/styles/treegrid/icons/_highcontrast-light.scss +1 -1
- package/styles/treegrid/icons/_material-dark.scss +1 -1
- package/styles/treegrid/material-dark.css +5 -1
- package/styles/treegrid/material.css +5 -1
- package/styles/treegrid/tailwind-dark.css +5 -1
- package/styles/treegrid/tailwind.css +5 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, 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, 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, getObject, getUid, iterateArrayOrObject, parentsUntil, resetRowIndex, templateCompiler } from '@syncfusion/ej2-grids';
|
|
2
|
+
import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser, ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer, ColumnMenu, ColumnVirtualFreezeRenderer, CommandColumn, ContextMenu, DetailRow, Edit, ExcelExport, Filter, Freeze, FreezeContentRender, FreezeRender, FreezeRowModelGenerator, Grid, InfiniteScroll, InterSectionObserver, Logger, Page, PdfExport, Print, RenderType, Reorder, Resize, RowDD, RowDropSettings, RowRenderer, Scroll, Sort, Toolbar, VirtualContentRenderer, VirtualFreezeHdrRenderer, VirtualFreezeRenderer, VirtualHeaderRenderer, VirtualRowModelGenerator, VirtualScroll, appendChildren, calculateAggregate, detailLists, extend as extend$1, getActualProperties, getObject, getUid, iterateArrayOrObject, parentsUntil, resetRowIndex, setDebounce, 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';
|
|
@@ -499,6 +499,34 @@ var rowDropped = 'row-dropped';
|
|
|
499
499
|
var autoCol = 'auto-col';
|
|
500
500
|
/** @hidden */
|
|
501
501
|
var rowDeselecting = 'rowDeselecting';
|
|
502
|
+
/** @hidden */
|
|
503
|
+
var headerContent = 'e-headercontent';
|
|
504
|
+
/** @hidden */
|
|
505
|
+
var movableContent = 'e-movablecontent';
|
|
506
|
+
/** @hidden */
|
|
507
|
+
var movableHeader = 'e-movableheader';
|
|
508
|
+
/** @hidden */
|
|
509
|
+
var frozenContent = 'e-frozencontent';
|
|
510
|
+
/** @hidden */
|
|
511
|
+
var frozenHeader = 'e-frozenheader';
|
|
512
|
+
/** @hidden */
|
|
513
|
+
var content = 'e-content';
|
|
514
|
+
/** @hidden */
|
|
515
|
+
var table = 'e-table';
|
|
516
|
+
/** @hidden */
|
|
517
|
+
var leftRight = 'Left-Right';
|
|
518
|
+
/** @hidden */
|
|
519
|
+
var frozenRight = 'frozen-right';
|
|
520
|
+
/** @hidden */
|
|
521
|
+
var frozenLeft = 'frozen-left';
|
|
522
|
+
/** @hidden */
|
|
523
|
+
var dataColIndex = 'data-colindex';
|
|
524
|
+
/** @hidden */
|
|
525
|
+
var ariaColIndex = 'aria-colindex';
|
|
526
|
+
/** @hidden */
|
|
527
|
+
var dataRowIndex = 'data-rowindex';
|
|
528
|
+
/** @hidden */
|
|
529
|
+
var ariaRowIndex = 'aria-rowindex';
|
|
502
530
|
|
|
503
531
|
var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
504
532
|
var extendStatics = function (d, b) {
|
|
@@ -520,11 +548,12 @@ var __extends$4 = (undefined && undefined.__extends) || (function () {
|
|
|
520
548
|
*/
|
|
521
549
|
var TreeClipboard = /** @__PURE__ @class */ (function (_super) {
|
|
522
550
|
__extends$4(TreeClipboard, _super);
|
|
523
|
-
function TreeClipboard(parent) {
|
|
524
|
-
var _this = _super.call(this, parent.grid) || this;
|
|
551
|
+
function TreeClipboard(parent, serviceLocator) {
|
|
552
|
+
var _this = _super.call(this, parent.grid, serviceLocator) || this;
|
|
525
553
|
_this.treeCopyContent = '';
|
|
526
554
|
_this.copiedUniqueIdCollection = [];
|
|
527
555
|
_this.treeGridParent = parent;
|
|
556
|
+
_this.serviceLocator = serviceLocator;
|
|
528
557
|
return _this;
|
|
529
558
|
}
|
|
530
559
|
TreeClipboard.prototype.setCopyData = function (withHeader) {
|
|
@@ -1142,6 +1171,8 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1142
1171
|
var _this = this;
|
|
1143
1172
|
var index = -1;
|
|
1144
1173
|
var length = 0;
|
|
1174
|
+
//This property used to maintain the check state of the currentview data after clear filtering
|
|
1175
|
+
var multiFilterCheckState = false;
|
|
1145
1176
|
if (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0) {
|
|
1146
1177
|
var filterResult = this.parent.filterModule.filteredResult;
|
|
1147
1178
|
if (this.filteredList.length === 0) {
|
|
@@ -1150,6 +1181,10 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1150
1181
|
else {
|
|
1151
1182
|
if (this.filteredList !== filterResult) {
|
|
1152
1183
|
this.filteredList = filterResult;
|
|
1184
|
+
multiFilterCheckState = true;
|
|
1185
|
+
}
|
|
1186
|
+
else {
|
|
1187
|
+
multiFilterCheckState = false;
|
|
1153
1188
|
}
|
|
1154
1189
|
}
|
|
1155
1190
|
}
|
|
@@ -1168,6 +1203,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1168
1203
|
if (data[i].checkboxState === 'check') {
|
|
1169
1204
|
continue;
|
|
1170
1205
|
}
|
|
1206
|
+
if (multiFilterCheckState) {
|
|
1207
|
+
continue;
|
|
1208
|
+
}
|
|
1171
1209
|
data[i].checkboxState = 'check';
|
|
1172
1210
|
this.updateSelectedItems(data[i], data[i].checkboxState);
|
|
1173
1211
|
}
|
|
@@ -1316,8 +1354,8 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1316
1354
|
childData = (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0) ?
|
|
1317
1355
|
this.parent.getCurrentViewRecords() : this.parent.flatData;
|
|
1318
1356
|
childData.forEach(function (record) {
|
|
1319
|
-
if (_this.parent.enableVirtualization
|
|
1320
|
-
if (record.hasChildRecords) {
|
|
1357
|
+
if (_this.parent.enableVirtualization) {
|
|
1358
|
+
if (record.hasChildRecords && record.childRecords.length > 0) {
|
|
1321
1359
|
_this.updateParentSelection(record);
|
|
1322
1360
|
}
|
|
1323
1361
|
else {
|
|
@@ -2201,8 +2239,8 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
|
|
|
2201
2239
|
if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
|
|
2202
2240
|
currentData.index = this.storedIndex;
|
|
2203
2241
|
}
|
|
2204
|
-
if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
|
|
2205
|
-
|
|
2242
|
+
if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) || ((currentData[this.parent.hasChildMapping]) &&
|
|
2243
|
+
isCountRequired(this.parent) && (this.parent.initialRender || isNullOrUndefined(this.parent['dataResults'].result) || this.parent.enableInfiniteScrolling))) {
|
|
2206
2244
|
currentData.hasChildRecords = true;
|
|
2207
2245
|
if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
|
|
2208
2246
|
&& isNullOrUndefined(currentData[this.parent.childMapping])) {
|
|
@@ -2238,6 +2276,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
|
|
|
2238
2276
|
currentData.checkboxState = 'uncheck';
|
|
2239
2277
|
if (isNullOrUndefined(currentData[this.parent.parentIdMapping]) || currentData.parentItem) {
|
|
2240
2278
|
this.parent.flatData.push(currentData);
|
|
2279
|
+
this.parent['infiniteScrollData'].push(currentData);
|
|
2241
2280
|
}
|
|
2242
2281
|
if (!this.isSelfReference && currentData.level === 0) {
|
|
2243
2282
|
this.parent.parentData.push(currentData);
|
|
@@ -3082,6 +3121,10 @@ function updateParentRow(key, record, action, control, isSelfReference, child) {
|
|
|
3082
3121
|
index_1 = i;
|
|
3083
3122
|
return;
|
|
3084
3123
|
} });
|
|
3124
|
+
if (control.enableVirtualization && isNullOrUndefined(index_1)) {
|
|
3125
|
+
var updatedParent = getValue('uniqueIDCollection.' + child.parentUniqueID, control);
|
|
3126
|
+
record = updatedParent;
|
|
3127
|
+
}
|
|
3085
3128
|
if (!isNullOrUndefined(index_1)) {
|
|
3086
3129
|
record = currentRecords[index_1];
|
|
3087
3130
|
}
|
|
@@ -3539,6 +3582,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3539
3582
|
TreeGrid.prototype.initProperties = function () {
|
|
3540
3583
|
this.defaultLocale = {};
|
|
3541
3584
|
this.flatData = [];
|
|
3585
|
+
this.infiniteScrollData = [];
|
|
3542
3586
|
this.parentData = [];
|
|
3543
3587
|
this.columnModel = [];
|
|
3544
3588
|
this.isExpandAll = false;
|
|
@@ -3830,7 +3874,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3830
3874
|
if (!isNullOrUndefined(this.grid.clipboardModule)) {
|
|
3831
3875
|
this.grid.clipboardModule.destroy();
|
|
3832
3876
|
}
|
|
3833
|
-
this.clipboardModule = this.grid.clipboardModule = new TreeClipboard(this);
|
|
3877
|
+
this.clipboardModule = this.grid.clipboardModule = new TreeClipboard(this, this.grid.serviceLocator);
|
|
3834
3878
|
};
|
|
3835
3879
|
TreeGrid.prototype.convertTreeData = function (data) {
|
|
3836
3880
|
var _this = this;
|
|
@@ -3923,13 +3967,19 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3923
3967
|
this.grid[templateInstance] = this[templateInstance];
|
|
3924
3968
|
var isJsComponent = 'isJsComponent';
|
|
3925
3969
|
this.grid[isJsComponent] = true;
|
|
3970
|
+
this.grid.enableVirtualMaskRow = false; // Need to update in virtual mask row feature implementation.
|
|
3926
3971
|
};
|
|
3927
3972
|
TreeGrid.prototype.triggerEvents = function (args) {
|
|
3928
3973
|
this.trigger(getObject('name', args), args);
|
|
3929
3974
|
};
|
|
3930
3975
|
TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
|
|
3931
|
-
if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
3932
|
-
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))) {
|
|
3976
|
+
if (args['name'] === "rowSelecting" && !isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
3977
|
+
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')) && (isNullOrUndefined(args['previousRowIndex']))) {
|
|
3978
|
+
args.cancel = true;
|
|
3979
|
+
return;
|
|
3980
|
+
}
|
|
3981
|
+
else if (args['name'] === "rowDeselecting" && !isNullOrUndefined(args.target) && ((!isNullOrUndefined(args.row) && (!args.row.length)) && (args.target.classList.contains('e-treegridexpand')
|
|
3982
|
+
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')))) {
|
|
3933
3983
|
args.cancel = true;
|
|
3934
3984
|
return;
|
|
3935
3985
|
}
|
|
@@ -3986,7 +4036,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3986
4036
|
this.grid.pdfHeaderQueryCellInfo = this.triggerEvents.bind(this);
|
|
3987
4037
|
this.grid.dataSourceChanged = this.triggerEvents.bind(this);
|
|
3988
4038
|
this.grid.recordDoubleClick = this.triggerEvents.bind(this);
|
|
3989
|
-
this.grid.rowDeselecting = this.triggerEvents.bind(this);
|
|
3990
4039
|
this.grid.cellDeselected = this.triggerEvents.bind(this);
|
|
3991
4040
|
this.grid.cellDeselecting = this.triggerEvents.bind(this);
|
|
3992
4041
|
this.grid.columnMenuOpen = this.triggerEvents.bind(this);
|
|
@@ -4167,6 +4216,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4167
4216
|
_this.grid.dataSource = { result: _this.flatData, count: getValue('count', _this.grid.dataSource) };
|
|
4168
4217
|
}
|
|
4169
4218
|
else {
|
|
4219
|
+
if (args.action.requestType !== 'infiniteScroll') {
|
|
4220
|
+
_this.infiniteScrollData = [];
|
|
4221
|
+
}
|
|
4170
4222
|
_this.trigger(dataStateChange, args);
|
|
4171
4223
|
}
|
|
4172
4224
|
};
|
|
@@ -4310,6 +4362,19 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4310
4362
|
if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
|
|
4311
4363
|
_this.grid.refresh();
|
|
4312
4364
|
}
|
|
4365
|
+
if (args.action === 'filter') {
|
|
4366
|
+
if (_this.filterModule['currentFilterObject'] !== '' && _this.enableVirtualization && !_this.initialRender) {
|
|
4367
|
+
_this.expandAll();
|
|
4368
|
+
}
|
|
4369
|
+
}
|
|
4370
|
+
if (args.requestType === 'searching') {
|
|
4371
|
+
if (_this.searchSettings.key !== '' && _this.enableVirtualization && !_this.initialRender) {
|
|
4372
|
+
_this.expandAll();
|
|
4373
|
+
}
|
|
4374
|
+
}
|
|
4375
|
+
if (args.action === 'clearFilter' && _this.enableCollapseAll) {
|
|
4376
|
+
_this.collapseAll();
|
|
4377
|
+
}
|
|
4313
4378
|
if (_this.action === 'indenting' || _this.action === 'outdenting') {
|
|
4314
4379
|
_this.action = _this.action === 'indenting' ? 'indented' : 'outdented';
|
|
4315
4380
|
var selectedItem_1 = [_this.selectedRecords];
|
|
@@ -4332,6 +4397,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4332
4397
|
_this.selectedRecords = _this.selectedRows = _this.modifiedRecords = [];
|
|
4333
4398
|
}
|
|
4334
4399
|
else {
|
|
4400
|
+
if (_this.grid.isFrozenGrid() && _this.enableVirtualization && args['tableName'] === 'movable') {
|
|
4401
|
+
var movableContent$$1 = _this.grid.element.querySelector('.' + movableContent);
|
|
4402
|
+
var frozenContent$$1 = _this.grid.element.querySelector('.' + frozenContent);
|
|
4403
|
+
movableContent$$1.style.height = frozenContent$$1.style.height = 'auto';
|
|
4404
|
+
}
|
|
4335
4405
|
_this.trigger(actionComplete, args);
|
|
4336
4406
|
}
|
|
4337
4407
|
};
|
|
@@ -5179,8 +5249,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5179
5249
|
this.grid.setRowData(key, rowData);
|
|
5180
5250
|
var visibleRecords = this.getVisibleRecords();
|
|
5181
5251
|
if (visibleRecords.length > 0 && key === (visibleRecords[visibleRecords.length - 1])[primaryKey]) {
|
|
5182
|
-
var table = this.getContentTable();
|
|
5183
|
-
var sHeight = table.scrollHeight;
|
|
5252
|
+
var table$$1 = this.getContentTable();
|
|
5253
|
+
var sHeight = table$$1.scrollHeight;
|
|
5184
5254
|
var clientHeight = this.getContent().clientHeight;
|
|
5185
5255
|
this.lastRowBorder(this.getRows()[currentRecords.indexOf(record)], sHeight <= clientHeight);
|
|
5186
5256
|
}
|
|
@@ -5653,16 +5723,20 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5653
5723
|
}
|
|
5654
5724
|
}
|
|
5655
5725
|
else {
|
|
5656
|
-
var
|
|
5657
|
-
var record =
|
|
5726
|
+
var rowInfo_1 = this.grid.getRowInfo(target);
|
|
5727
|
+
var record = rowInfo_1.rowData;
|
|
5728
|
+
if (this.grid.isFrozenGrid() && this.enableVirtualization && !Object.keys(record).length) {
|
|
5729
|
+
var freezeRows = 'freezeRows';
|
|
5730
|
+
record = this.grid.contentModule[freezeRows].filter(function (e) { return e.uid === rowInfo_1.row.getAttribute('data-uid'); })[0].data;
|
|
5731
|
+
}
|
|
5658
5732
|
if (this.enableImmutableMode) {
|
|
5659
|
-
record = this.getCurrentViewRecords()[
|
|
5733
|
+
record = this.getCurrentViewRecords()[rowInfo_1.rowIndex];
|
|
5660
5734
|
}
|
|
5661
5735
|
if (target.classList.contains('e-treegridexpand')) {
|
|
5662
|
-
this.collapseRow(
|
|
5736
|
+
this.collapseRow(rowInfo_1.row, record);
|
|
5663
5737
|
}
|
|
5664
5738
|
else {
|
|
5665
|
-
this.expandRow(
|
|
5739
|
+
this.expandRow(rowInfo_1.row, record);
|
|
5666
5740
|
}
|
|
5667
5741
|
}
|
|
5668
5742
|
};
|
|
@@ -6076,8 +6150,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6076
6150
|
totalRows = [].slice.call(rows);
|
|
6077
6151
|
for (var i = totalRows.length - 1; i >= 0; i--) {
|
|
6078
6152
|
if (!isHidden(totalRows[i])) {
|
|
6079
|
-
var table = this.getContentTable();
|
|
6080
|
-
var sHeight = table.scrollHeight;
|
|
6153
|
+
var table$$1 = this.getContentTable();
|
|
6154
|
+
var sHeight = table$$1.scrollHeight;
|
|
6081
6155
|
var clientHeight = this.getContent().clientHeight;
|
|
6082
6156
|
this.lastRowBorder(totalRows[i], sHeight <= clientHeight);
|
|
6083
6157
|
break;
|
|
@@ -6097,6 +6171,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6097
6171
|
this.trigger(dataStateChange, expandingArgs);
|
|
6098
6172
|
deff.promise.then(function () {
|
|
6099
6173
|
if (expandingArgs.childData.length) {
|
|
6174
|
+
_this.flatData = _this.infiniteScrollData;
|
|
6100
6175
|
var currentData = (_this.flatData);
|
|
6101
6176
|
var index = 0;
|
|
6102
6177
|
for (var i = 0; i < currentData.length; i++) {
|
|
@@ -6146,8 +6221,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6146
6221
|
}
|
|
6147
6222
|
}
|
|
6148
6223
|
_this.isExpandRefresh = true;
|
|
6224
|
+
var scrollHeightBeforeRefresh = _this.getContentTable().parentElement.scrollTop;
|
|
6149
6225
|
_this.grid.refresh();
|
|
6150
6226
|
_this.setHeightForFrozenContent();
|
|
6227
|
+
if (_this.enableInfiniteScrolling) {
|
|
6228
|
+
_this.getContentTable().parentElement.scrollTop = scrollHeightBeforeRefresh;
|
|
6229
|
+
}
|
|
6151
6230
|
_this.trigger(expanded, expandingArgs);
|
|
6152
6231
|
});
|
|
6153
6232
|
};
|
|
@@ -7404,13 +7483,16 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7404
7483
|
for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
|
|
7405
7484
|
if (tObj.getCurrentViewRecords()[i].taskData === record_1.parentItem.taskData) {
|
|
7406
7485
|
dropIndex = i;
|
|
7486
|
+
if (tObj.enableVirtualization) {
|
|
7487
|
+
dropIndex = parseInt(tObj.getRows()[i].getAttribute('data-rowindex'), 10);
|
|
7488
|
+
}
|
|
7407
7489
|
}
|
|
7408
7490
|
}
|
|
7409
7491
|
}
|
|
7410
7492
|
else {
|
|
7411
7493
|
dropIndex = this.selectedRow.rowIndex - 1;
|
|
7412
7494
|
}
|
|
7413
|
-
if (this.parent.enableVirtualization && this.
|
|
7495
|
+
if (this.parent.enableVirtualization && this.selectedRecord && !(record_1.level > this.selectedRecord.level)) {
|
|
7414
7496
|
dropIndex = parseInt(this.selectedRow.getAttribute('data-rowindex'), 10) - 1;
|
|
7415
7497
|
}
|
|
7416
7498
|
tObj[action] = 'indenting';
|
|
@@ -7425,11 +7507,11 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7425
7507
|
var dropIndex = void 0;
|
|
7426
7508
|
var parentItem = this.selectedRecord.parentItem;
|
|
7427
7509
|
for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
|
|
7428
|
-
if (tObj.getCurrentViewRecords()[i].
|
|
7510
|
+
if (tObj.getCurrentViewRecords()[i].uniqueID === parentItem.uniqueID) {
|
|
7429
7511
|
dropIndex = i;
|
|
7430
7512
|
}
|
|
7431
7513
|
}
|
|
7432
|
-
if (this.parent.enableVirtualization && this.
|
|
7514
|
+
if (this.parent.enableVirtualization && this.selectedRecord) {
|
|
7433
7515
|
dropIndex = parseInt(this.parent.getRows()[dropIndex].getAttribute('data-rowindex'), 10);
|
|
7434
7516
|
}
|
|
7435
7517
|
tObj[action] = 'outdenting';
|
|
@@ -7449,7 +7531,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7449
7531
|
this.parent.trigger(actionBegin, actionArgs, function (actionArgs) {
|
|
7450
7532
|
if (!actionArgs.cancel) {
|
|
7451
7533
|
if (actionArgs.action === 'indenting') {
|
|
7452
|
-
if (_this.parent.enableVirtualization
|
|
7534
|
+
if (_this.parent.enableVirtualization) {
|
|
7453
7535
|
_this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'child');
|
|
7454
7536
|
}
|
|
7455
7537
|
else {
|
|
@@ -7457,7 +7539,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7457
7539
|
}
|
|
7458
7540
|
}
|
|
7459
7541
|
else if (actionArgs.action === 'outdenting') {
|
|
7460
|
-
if (_this.parent.enableVirtualization
|
|
7542
|
+
if (_this.parent.enableVirtualization) {
|
|
7461
7543
|
_this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'below');
|
|
7462
7544
|
}
|
|
7463
7545
|
else {
|
|
@@ -7810,16 +7892,16 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7810
7892
|
classList(ele, ['e-errorcontainer'], []);
|
|
7811
7893
|
classList(ele, ['e-icons', 'e-errorelem'], []);
|
|
7812
7894
|
var errorVal = dragelem.querySelector('.errorValue');
|
|
7813
|
-
var content = dragelem.querySelector('.e-rowcell').innerHTML;
|
|
7895
|
+
var content$$1 = dragelem.querySelector('.e-rowcell').innerHTML;
|
|
7814
7896
|
if (errorVal) {
|
|
7815
|
-
content = errorVal.innerHTML;
|
|
7897
|
+
content$$1 = errorVal.innerHTML;
|
|
7816
7898
|
errorVal.parentNode.removeChild(errorVal);
|
|
7817
7899
|
}
|
|
7818
7900
|
dragelem.querySelector('.e-rowcell').innerHTML = '';
|
|
7819
7901
|
var spanContent = document.createElement('span');
|
|
7820
7902
|
spanContent.className = 'errorValue';
|
|
7821
7903
|
spanContent.style.paddingLeft = '16px';
|
|
7822
|
-
spanContent.innerHTML = content;
|
|
7904
|
+
spanContent.innerHTML = content$$1;
|
|
7823
7905
|
dragelem.querySelector('.e-rowcell').appendChild(ele);
|
|
7824
7906
|
dragelem.querySelector('.e-rowcell').appendChild(spanContent);
|
|
7825
7907
|
var dropItemSpan = document.querySelector('.e-dropitemscount');
|
|
@@ -8707,6 +8789,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8707
8789
|
var currentPage = this[model].currentPage;
|
|
8708
8790
|
if (clear) {
|
|
8709
8791
|
this.cache = {};
|
|
8792
|
+
this.movableCache = {};
|
|
8793
|
+
this.frozenRightCache = {};
|
|
8710
8794
|
this.data = {};
|
|
8711
8795
|
this.groups = {};
|
|
8712
8796
|
}
|
|
@@ -8720,6 +8804,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8720
8804
|
this.cache = {};
|
|
8721
8805
|
this.data = {};
|
|
8722
8806
|
this.groups = {};
|
|
8807
|
+
this.movableCache = {};
|
|
8808
|
+
this.frozenRightCache = {};
|
|
8723
8809
|
}
|
|
8724
8810
|
}
|
|
8725
8811
|
return clear;
|
|
@@ -8885,10 +8971,6 @@ var Filter$1 = /** @__PURE__ @class */ (function () {
|
|
|
8885
8971
|
}
|
|
8886
8972
|
}
|
|
8887
8973
|
else {
|
|
8888
|
-
if ((!this.parent.enableCollapseAll || !this.parent.initialRender && isNullOrUndefined(this.parent['dataResults']['result']))
|
|
8889
|
-
&& parent['expanded'] === false && this.parent.getVisibleRecords().indexOf(record) === -1) {
|
|
8890
|
-
this.parent.expandRow(this.parent.getRows()[parent['index']], parent);
|
|
8891
|
-
}
|
|
8892
8974
|
this.addParentRecord(parent);
|
|
8893
8975
|
}
|
|
8894
8976
|
}
|
|
@@ -9570,53 +9652,55 @@ var Toolbar$1 = /** @__PURE__ @class */ (function () {
|
|
|
9570
9652
|
this.parent.off(toolbarClick, this.toolbarClickHandler);
|
|
9571
9653
|
};
|
|
9572
9654
|
Toolbar$$1.prototype.refreshToolbar = function (args) {
|
|
9573
|
-
var tObj = this.parent;
|
|
9574
|
-
var indentElement;
|
|
9575
|
-
var outdentElement;
|
|
9576
|
-
var indentID = tObj.element.id + '_gridcontrol_indent';
|
|
9577
|
-
var outdentID = tObj.element.id + '_gridcontrol_outdent';
|
|
9578
9655
|
var toolbarElement = this.parent.grid.toolbarModule.getToolbar();
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
if (
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9656
|
+
if (!isNullOrUndefined(toolbarElement)) {
|
|
9657
|
+
var tObj = this.parent;
|
|
9658
|
+
var indentElement = void 0;
|
|
9659
|
+
var outdentElement = void 0;
|
|
9660
|
+
var indentID = tObj.element.id + '_gridcontrol_indent';
|
|
9661
|
+
var outdentID = tObj.element.id + '_gridcontrol_outdent';
|
|
9662
|
+
var indentEle = toolbarElement.querySelector('#' + indentID);
|
|
9663
|
+
var outdentEle = toolbarElement.querySelector('#' + outdentID);
|
|
9664
|
+
var row = args.row;
|
|
9665
|
+
var selectedrow = tObj.getSelectedRows()[0];
|
|
9666
|
+
if (!isNullOrUndefined(row[0])) {
|
|
9667
|
+
row = row[0];
|
|
9668
|
+
}
|
|
9669
|
+
row = (!isNullOrUndefined(selectedrow) && selectedrow.rowIndex !== row.rowIndex) ? selectedrow : row;
|
|
9670
|
+
if (indentEle !== null && outdentEle !== null) {
|
|
9671
|
+
indentElement = toolbarElement.querySelector('#' + indentID).parentElement;
|
|
9672
|
+
outdentElement = toolbarElement.querySelector('#' + outdentID).parentElement;
|
|
9673
|
+
if (row.rowIndex === 0 || tObj.getSelectedRowIndexes().length > 1) {
|
|
9674
|
+
indentElement.classList.add('e-hidden');
|
|
9675
|
+
outdentElement.classList.add('e-hidden');
|
|
9676
|
+
}
|
|
9677
|
+
else if (args['name'] !== 'rowDeselected' || (!isNullOrUndefined(selectedrow) && tObj.grid.isCheckBoxSelection)) {
|
|
9678
|
+
var selectedItem = tObj.getCurrentViewRecords()[row.rowIndex];
|
|
9679
|
+
if (!isNullOrUndefined(selectedItem)) {
|
|
9680
|
+
if ((selectedItem.level > tObj.getCurrentViewRecords()[row.rowIndex - 1].level)) {
|
|
9681
|
+
indentElement.classList.add('e-hidden');
|
|
9682
|
+
}
|
|
9683
|
+
else {
|
|
9684
|
+
indentElement.classList.remove('e-hidden');
|
|
9685
|
+
}
|
|
9686
|
+
if (selectedItem.level === tObj.getCurrentViewRecords()[row.rowIndex - 1].level) {
|
|
9687
|
+
indentElement.classList.remove('e-hidden');
|
|
9688
|
+
}
|
|
9689
|
+
if (selectedItem.level === 0) {
|
|
9690
|
+
outdentElement.classList.add('e-hidden');
|
|
9691
|
+
}
|
|
9692
|
+
if (selectedItem.level !== 0) {
|
|
9693
|
+
outdentElement.classList.remove('e-hidden');
|
|
9694
|
+
}
|
|
9602
9695
|
}
|
|
9603
|
-
|
|
9604
|
-
|
|
9696
|
+
}
|
|
9697
|
+
if (args['name'] === 'rowDeselected' && isNullOrUndefined(selectedrow) && !tObj.grid.isCheckBoxSelection) {
|
|
9698
|
+
if (this.parent.toolbar['includes']('Indent')) {
|
|
9699
|
+
indentElement.classList.add('e-hidden');
|
|
9605
9700
|
}
|
|
9606
|
-
if (
|
|
9701
|
+
if (this.parent.toolbar['includes']('Outdent')) {
|
|
9607
9702
|
outdentElement.classList.add('e-hidden');
|
|
9608
9703
|
}
|
|
9609
|
-
if (selectedItem.level !== 0) {
|
|
9610
|
-
outdentElement.classList.remove('e-hidden');
|
|
9611
|
-
}
|
|
9612
|
-
}
|
|
9613
|
-
}
|
|
9614
|
-
if (args['name'] === 'rowDeselected' && isNullOrUndefined(selectedrow) && !tObj.grid.isCheckBoxSelection) {
|
|
9615
|
-
if (this.parent.toolbar['includes']('Indent')) {
|
|
9616
|
-
indentElement.classList.add('e-hidden');
|
|
9617
|
-
}
|
|
9618
|
-
if (this.parent.toolbar['includes']('Outdent')) {
|
|
9619
|
-
outdentElement.classList.add('e-hidden');
|
|
9620
9704
|
}
|
|
9621
9705
|
}
|
|
9622
9706
|
}
|
|
@@ -10114,7 +10198,7 @@ var ContextMenu$1 = /** @__PURE__ @class */ (function () {
|
|
|
10114
10198
|
var indent = select('#' + this.parent.element.id + '_gridcontrol_cmenu_Indent', args.element);
|
|
10115
10199
|
var outdent = select('#' + this.parent.element.id + '_gridcontrol_cmenu_Outdent', args.element);
|
|
10116
10200
|
if (addRow) {
|
|
10117
|
-
if (this.parent.grid.editSettings.allowAdding === false) {
|
|
10201
|
+
if (this.parent.grid.editSettings.allowAdding === false || this.parent.grid.isEdit) {
|
|
10118
10202
|
addRow.style.display = 'none';
|
|
10119
10203
|
}
|
|
10120
10204
|
else {
|
|
@@ -10484,13 +10568,13 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
|
|
|
10484
10568
|
this.updateRowIndex();
|
|
10485
10569
|
// update focus module, need to refix this once grid source modified.
|
|
10486
10570
|
var focusModule = getValue('focusModule', this.parent.grid);
|
|
10487
|
-
var table = this.parent.getContentTable();
|
|
10571
|
+
var table$$1 = this.parent.getContentTable();
|
|
10488
10572
|
if (this.parent.getBatchChanges()[this.deletedRecords].length && this.parent.editSettings.newRowPosition === 'Above') {
|
|
10489
10573
|
actualIndex = e.row.rowIndex;
|
|
10490
10574
|
focusModule.getContent().matrix.matrix = this.matrix;
|
|
10491
10575
|
}
|
|
10492
10576
|
else {
|
|
10493
|
-
actualIndex = table.getElementsByClassName('e-batchrow')[0].rowIndex;
|
|
10577
|
+
actualIndex = table$$1.getElementsByClassName('e-batchrow')[0].rowIndex;
|
|
10494
10578
|
// if (this.parent.frozenRows || this.parent.frozenColumns) {
|
|
10495
10579
|
// actualIndex = this.batchIndex;
|
|
10496
10580
|
// }
|
|
@@ -11158,6 +11242,9 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11158
11242
|
args.cancel = true;
|
|
11159
11243
|
}
|
|
11160
11244
|
}
|
|
11245
|
+
if (this.parent.enableVirtualization) {
|
|
11246
|
+
this.parent.grid.contentModule['editedRowIndex'] = this.parent.grid.editModule.editModule['index'];
|
|
11247
|
+
}
|
|
11161
11248
|
// if (this.isAdd && this.parent.editSettings.mode === 'Batch' && !args.cell.parentElement.classList.contains('e-insertedrow')) {
|
|
11162
11249
|
// this.isAdd = false;
|
|
11163
11250
|
// }
|
|
@@ -11277,6 +11364,9 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11277
11364
|
this.parent.grid.isEdit = true;
|
|
11278
11365
|
}
|
|
11279
11366
|
}
|
|
11367
|
+
if (this.parent.enableVirtualization) {
|
|
11368
|
+
this.parent.grid.contentModule['virtualData'] = {};
|
|
11369
|
+
}
|
|
11280
11370
|
};
|
|
11281
11371
|
Edit$$1.prototype.afterCellSave = function (args, row, rowIndex) {
|
|
11282
11372
|
var mRow;
|
|
@@ -11526,7 +11616,12 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11526
11616
|
if (isVirtualization) {
|
|
11527
11617
|
this.prevAriaRowIndex = '-1';
|
|
11528
11618
|
}
|
|
11529
|
-
|
|
11619
|
+
if (!this.parent.enableVirtualization || this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
11620
|
+
focussedElement.focus();
|
|
11621
|
+
}
|
|
11622
|
+
if (this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
11623
|
+
this.parent.grid.contentModule['createEmptyRowdata']();
|
|
11624
|
+
}
|
|
11530
11625
|
}
|
|
11531
11626
|
}
|
|
11532
11627
|
if (this.parent.editSettings.mode === 'Batch' && !isNullOrUndefined(this.addRowIndex) && this.addRowIndex !== -1 && this['isAddedRowByMethod'] && !this.isAddedRowByContextMenu) {
|
|
@@ -11650,6 +11745,9 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11650
11745
|
}
|
|
11651
11746
|
if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
11652
11747
|
this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
|
|
11748
|
+
if (this.parent.enableVirtualization && this.isAddedRowByContextMenu) {
|
|
11749
|
+
this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
|
|
11750
|
+
}
|
|
11653
11751
|
}
|
|
11654
11752
|
else {
|
|
11655
11753
|
this.addRowRecord = this.parent.getSelectedRecords()[0];
|
|
@@ -11686,15 +11784,18 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11686
11784
|
var position = null;
|
|
11687
11785
|
value.taskData = isNullOrUndefined(value.taskData) ? extend({}, args.data) : value.taskData;
|
|
11688
11786
|
var currentData = void 0;
|
|
11689
|
-
if (this.parent.
|
|
11787
|
+
if (this.parent.enableVirtualization && args.index !== 0) {
|
|
11788
|
+
currentData = this.parent.flatData;
|
|
11789
|
+
}
|
|
11790
|
+
else if (this.parent.editSettings.mode === 'Batch' && this['isAddedRowByMethod'] && !isNullOrUndefined(this.addRowIndex)) {
|
|
11690
11791
|
currentData = this.batchEditModule['batchRecords'];
|
|
11691
11792
|
}
|
|
11692
11793
|
else {
|
|
11693
11794
|
currentData = this.parent.grid.getCurrentViewRecords();
|
|
11694
11795
|
}
|
|
11695
11796
|
if (this.parent.enableVirtualization && args.index !== 0) {
|
|
11696
|
-
this.addRowIndex = this.parent.
|
|
11697
|
-
this.selectedIndex =
|
|
11797
|
+
this.addRowIndex = this.parent.flatData.indexOf(this.addRowRecord);
|
|
11798
|
+
this.selectedIndex = this.addRowIndex;
|
|
11698
11799
|
}
|
|
11699
11800
|
var index = this.addRowIndex;
|
|
11700
11801
|
value.uniqueID = getUid(this.parent.element.id + '_data_');
|
|
@@ -11708,7 +11809,8 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11708
11809
|
var rows = this.parent.getRows();
|
|
11709
11810
|
var firstAriaIndex = rows.length ? currentData.indexOf(currentData[0]) : 0;
|
|
11710
11811
|
var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
|
|
11711
|
-
var withinRange = this.
|
|
11812
|
+
var withinRange = this.parent.enableVirtualization && args.index !== 0 ? true :
|
|
11813
|
+
this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
|
|
11712
11814
|
if (currentData.length) {
|
|
11713
11815
|
idMapping = currentData[this.addRowIndex][this.parent.idMapping];
|
|
11714
11816
|
parentIdMapping = currentData[this.addRowIndex][this.parent.parentIdMapping];
|
|
@@ -12074,6 +12176,29 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12074
12176
|
VirtualTreeContentRenderer.prototype.getRowByIndex = function (index) {
|
|
12075
12177
|
return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; })[0];
|
|
12076
12178
|
};
|
|
12179
|
+
VirtualTreeContentRenderer.prototype.getMovableVirtualRowByIndex = function (index) {
|
|
12180
|
+
return this.getRowCollection(index, true);
|
|
12181
|
+
};
|
|
12182
|
+
VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
|
|
12183
|
+
return this.getRowCollection(index, false, false, true);
|
|
12184
|
+
};
|
|
12185
|
+
VirtualTreeContentRenderer.prototype.getRowCollection = function (index, isMovable, isRowObject, isFrozenRight) {
|
|
12186
|
+
var startIdx = parseInt(this.parent.getRows()[0].getAttribute(dataRowIndex), 10);
|
|
12187
|
+
var rowCollection = isMovable ? this.parent.getMovableDataRows() : this.parent.getDataRows();
|
|
12188
|
+
rowCollection = isFrozenRight ? this.parent.getFrozenRightDataRows() : rowCollection;
|
|
12189
|
+
var collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
|
|
12190
|
+
var selectedRow = collection[index - startIdx];
|
|
12191
|
+
if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {
|
|
12192
|
+
if (!isRowObject) {
|
|
12193
|
+
selectedRow = index <= this.parent.frozenRows ? rowCollection[index]
|
|
12194
|
+
: rowCollection[(index - startIdx) + this.parent.frozenRows];
|
|
12195
|
+
}
|
|
12196
|
+
else {
|
|
12197
|
+
selectedRow = index <= this.parent.frozenRows ? this.parent.getRowsObject()[index].data : selectedRow;
|
|
12198
|
+
}
|
|
12199
|
+
}
|
|
12200
|
+
return selectedRow;
|
|
12201
|
+
};
|
|
12077
12202
|
VirtualTreeContentRenderer.prototype.addEventListener = function () {
|
|
12078
12203
|
this.parent.on(virtualActionArgs, this.virtualOtherAction, this);
|
|
12079
12204
|
this.parent.on(indexModifier, this.indexModifier, this);
|
|
@@ -12089,10 +12214,10 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12089
12214
|
}
|
|
12090
12215
|
};
|
|
12091
12216
|
VirtualTreeContentRenderer.prototype.indexModifier = function (args) {
|
|
12092
|
-
var content = this.parent.getContent().querySelector('.e-content');
|
|
12217
|
+
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12093
12218
|
if (this.recordAdded && this.startIndex > -1 && this.endIndex > -1) {
|
|
12094
12219
|
if (this.endIndex > args.count - this.parent.pageSettings.pageSize) {
|
|
12095
|
-
var nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
|
|
12220
|
+
var nextSetResIndex = ~~(content$$1.scrollTop / this.parent.getRowHeight());
|
|
12096
12221
|
var lastIndex = nextSetResIndex + this.parent.getRows().length;
|
|
12097
12222
|
if (lastIndex > args.count) {
|
|
12098
12223
|
lastIndex = nextSetResIndex +
|
|
@@ -12101,7 +12226,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12101
12226
|
this.startIndex = lastIndex - this.parent.getRows().length;
|
|
12102
12227
|
this.endIndex = lastIndex;
|
|
12103
12228
|
}
|
|
12104
|
-
else {
|
|
12229
|
+
else if (this.parent.root.editSettings.newRowPosition !== 'Top' && this.parent.root.editModule.selectedIndex !== -1 || this.parent.root.editModule.selectedIndex !== -1) {
|
|
12105
12230
|
this.startIndex += 1;
|
|
12106
12231
|
this.endIndex += 1;
|
|
12107
12232
|
}
|
|
@@ -12153,7 +12278,15 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12153
12278
|
&& this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
|
|
12154
12279
|
if (!isNullOrUndefined(e.count)) {
|
|
12155
12280
|
this.totalRecords = e.count;
|
|
12156
|
-
|
|
12281
|
+
// To overcome the white space issue in last page when records collapsed
|
|
12282
|
+
if (this.parent.isFrozenGrid() && e.count < Object.keys(this.parent.dataSource).length) {
|
|
12283
|
+
var width = this.parent.enableColumnVirtualization ?
|
|
12284
|
+
this.getColumnOffset(this.parent.columns.length - 1) + 'px' : '100%';
|
|
12285
|
+
var height = (this.parent.getRowHeight() * e.count) -
|
|
12286
|
+
(this.parent.getRowHeight() * this.parent.pageSettings.pageSize);
|
|
12287
|
+
getValue('virtualEle', this).setVirtualHeight(height, width);
|
|
12288
|
+
}
|
|
12289
|
+
if (!this.parent.enableColumnVirtualization && !this.parent.isFrozenGrid()) {
|
|
12157
12290
|
getValue('virtualEle', this).setVirtualHeight(this.parent.getRowHeight() * e.count, '100%');
|
|
12158
12291
|
}
|
|
12159
12292
|
}
|
|
@@ -12251,6 +12384,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12251
12384
|
return new Cell(opt);
|
|
12252
12385
|
};
|
|
12253
12386
|
VirtualTreeContentRenderer.prototype.beginEdit = function (e) {
|
|
12387
|
+
this['editedRowIndex'] = e.index;
|
|
12254
12388
|
var selector = '.e-row[data-rowindex="' + e.index + '"]';
|
|
12255
12389
|
var index = this.parent.getContent().querySelector(selector).rowIndex;
|
|
12256
12390
|
var rowData = this.parent.getCurrentViewRecords()[index];
|
|
@@ -12290,8 +12424,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12290
12424
|
};
|
|
12291
12425
|
VirtualTreeContentRenderer.prototype.virtualEditSuccess = function () {
|
|
12292
12426
|
var isAdd = 'isAdd';
|
|
12293
|
-
var content = this.parent.getContent().querySelector('.e-content');
|
|
12294
|
-
if (this[isAdd] && content.querySelector('.e-addedrow')) {
|
|
12427
|
+
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12428
|
+
if (this[isAdd] && content$$1.querySelector('.e-addedrow')) {
|
|
12295
12429
|
this.recordAdded = true;
|
|
12296
12430
|
}
|
|
12297
12431
|
};
|
|
@@ -12305,10 +12439,10 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12305
12439
|
};
|
|
12306
12440
|
VirtualTreeContentRenderer.prototype.restoreNewRow = function () {
|
|
12307
12441
|
var isAdd = 'isAdd';
|
|
12308
|
-
var content = this.parent.getContent().querySelector('.e-content');
|
|
12309
|
-
if (this[isAdd] && !content.querySelector('.e-addedrow')) {
|
|
12442
|
+
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12443
|
+
if (this[isAdd] && !content$$1.querySelector('.e-addedrow')) {
|
|
12310
12444
|
this.parent.isEdit = false;
|
|
12311
|
-
this.parent.addRecord();
|
|
12445
|
+
this.parent.editModule.addRecord(null, this.parent.root.editModule.selectedIndex);
|
|
12312
12446
|
}
|
|
12313
12447
|
};
|
|
12314
12448
|
VirtualTreeContentRenderer.prototype.getData = function (data) {
|
|
@@ -12321,7 +12455,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12321
12455
|
this.parent.notify('get-row-position', addArgs);
|
|
12322
12456
|
this.rowPosition = addArgs.newRowPosition;
|
|
12323
12457
|
this.addRowIndex = addArgs.addRowIndex;
|
|
12324
|
-
this.dataRowIndex =
|
|
12458
|
+
this.dataRowIndex = this.parent.root.editModule.selectedIndex;
|
|
12325
12459
|
}
|
|
12326
12460
|
var actionComplete$$1 = 'actionComplete';
|
|
12327
12461
|
_super.prototype[actionComplete$$1].call(this, args);
|
|
@@ -12343,17 +12477,20 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12343
12477
|
var maxLeft = _this.vgenerator.cOffsets[idx - 1];
|
|
12344
12478
|
x = x > maxLeft ? maxLeft : x; //TODO: This fix horizontal scrollbar jumping issue in column virtualization.
|
|
12345
12479
|
}
|
|
12346
|
-
_this.
|
|
12347
|
-
|
|
12348
|
-
_this.
|
|
12480
|
+
if (!_this.parent.isFrozenGrid()) {
|
|
12481
|
+
_this.virtualEle.adjustTable(x, _this.translateY);
|
|
12482
|
+
if (_this.parent.enableColumnVirtualization) {
|
|
12483
|
+
_this.header.virtualEle.adjustTable(x, 0);
|
|
12484
|
+
}
|
|
12349
12485
|
}
|
|
12350
12486
|
}
|
|
12351
12487
|
};
|
|
12352
12488
|
};
|
|
12353
12489
|
VirtualTreeContentRenderer.prototype.scrollListeners = function (scrollArgs) {
|
|
12490
|
+
this['scrollAfterEdit']();
|
|
12354
12491
|
var info = scrollArgs.sentinel;
|
|
12355
12492
|
var outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
|
|
12356
|
-
var content = this.parent.getContent().querySelector('.e-content');
|
|
12493
|
+
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12357
12494
|
var scrollHeight = outBuffer * this.parent.getRowHeight();
|
|
12358
12495
|
var upScroll = (scrollArgs.offset.top - this.translateY) < 0;
|
|
12359
12496
|
var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) >= scrollHeight;
|
|
@@ -12363,7 +12500,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12363
12500
|
if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
|
|
12364
12501
|
var vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? this.parent.height :
|
|
12365
12502
|
this.parent.element.getBoundingClientRect().height);
|
|
12366
|
-
var index = (~~(content.scrollTop / this.parent.getRowHeight())
|
|
12503
|
+
var index = (~~(content$$1.scrollTop / this.parent.getRowHeight())
|
|
12367
12504
|
+ Math.ceil(vHeight / this.parent.getRowHeight()))
|
|
12368
12505
|
- this.parent.pageSettings.pageSize;
|
|
12369
12506
|
index = (index > 0) ? index : 0;
|
|
@@ -12378,7 +12515,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12378
12515
|
this.endIndex = lastInx;
|
|
12379
12516
|
this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
|
|
12380
12517
|
}
|
|
12381
|
-
if (currentViewData.length && (
|
|
12518
|
+
if (currentViewData.length && (currentViewData[0][indexValue] >= this.parent.pageSettings.pageSize / 2) &&
|
|
12519
|
+
((currentViewData[0][indexValue] - this.startIndex) < (this.parent.pageSettings.pageSize / 2))) {
|
|
12382
12520
|
this.startIndex = currentViewData[0][indexValue] - (this.parent.pageSettings.pageSize / 2);
|
|
12383
12521
|
this.endIndex = this.startIndex + this.parent.pageSettings.pageSize;
|
|
12384
12522
|
}
|
|
@@ -12407,7 +12545,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12407
12545
|
}
|
|
12408
12546
|
}
|
|
12409
12547
|
else if (downScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
|
|
12410
|
-
var nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
|
|
12548
|
+
var nextSetResIndex = ~~(content$$1.scrollTop / this.parent.getRowHeight());
|
|
12411
12549
|
var isLastBlock = (this[selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
|
|
12412
12550
|
if (!isNullOrUndefined(this[selectedRowIndex]) && this[selectedRowIndex] !== -1 &&
|
|
12413
12551
|
nextSetResIndex !== this[selectedRowIndex] && !isLastBlock) {
|
|
@@ -12425,7 +12563,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12425
12563
|
this.startIndex = currentViewData[0][indexValue] + (this.parent.pageSettings.pageSize / 2);
|
|
12426
12564
|
}
|
|
12427
12565
|
if (scrollArgs.offset.top > (this.parent.getRowHeight() * this.totalRecords)) {
|
|
12428
|
-
this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
|
|
12566
|
+
this.translateY = this.getTranslateY(scrollArgs.offset.top, content$$1.getBoundingClientRect().height);
|
|
12429
12567
|
}
|
|
12430
12568
|
else {
|
|
12431
12569
|
if (this.parent.allowRowDragAndDrop) {
|
|
@@ -12443,6 +12581,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12443
12581
|
this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
|
|
12444
12582
|
var page = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
|
|
12445
12583
|
this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
|
|
12584
|
+
this.requestType = 'virtualscroll';
|
|
12446
12585
|
if (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') {
|
|
12447
12586
|
viewInfo.event = viewInfo.event === 'refresh-virtual-block' ? 'model-changed' : viewInfo.event;
|
|
12448
12587
|
}
|
|
@@ -12450,12 +12589,28 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12450
12589
|
}
|
|
12451
12590
|
};
|
|
12452
12591
|
VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
12592
|
+
var isFrozen = this.parent.isFrozenGrid();
|
|
12453
12593
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
12454
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
12594
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || this.parent.isFrozenGrid()) {
|
|
12455
12595
|
if (getValue('isExpandCollapse', e)) {
|
|
12456
12596
|
this.isRemoteExpand = true;
|
|
12457
12597
|
}
|
|
12598
|
+
if (isFrozen && isNullOrUndefined(this.requestType) && getValue('requestTypes', this).indexOf('isFrozen') === -1) {
|
|
12599
|
+
getValue('requestTypes', this).push('isFrozen');
|
|
12600
|
+
this.requestType = 'isFrozen';
|
|
12601
|
+
}
|
|
12458
12602
|
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
12603
|
+
if (getValue('requestTypes', this).indexOf('isFrozen') !== -1) {
|
|
12604
|
+
getValue('requestTypes', this).splice(getValue('requestTypes', this).indexOf('isFrozen'), 1);
|
|
12605
|
+
this.requestType = this.requestType === 'isFrozen' ? undefined : this.requestType;
|
|
12606
|
+
}
|
|
12607
|
+
if (isFrozen && (!this.isExpandCollapse || this.translateY === 0)) {
|
|
12608
|
+
this.translateY = this.translateY < 0 ? 0 : this.translateY;
|
|
12609
|
+
getValue('virtualEle', this).adjustTable(0, this.translateY);
|
|
12610
|
+
}
|
|
12611
|
+
else {
|
|
12612
|
+
this.isExpandCollapse = false;
|
|
12613
|
+
}
|
|
12459
12614
|
}
|
|
12460
12615
|
else {
|
|
12461
12616
|
var info = e.virtualInfo.sentinelInfo && e.virtualInfo.sentinelInfo.axis === 'Y' &&
|
|
@@ -12544,6 +12699,11 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
|
|
|
12544
12699
|
var containerRect = 'containerRect';
|
|
12545
12700
|
_super.prototype[containerRect] = getValue('options', this).container.getBoundingClientRect();
|
|
12546
12701
|
EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
|
|
12702
|
+
if (getValue('options', this).movableContainer) {
|
|
12703
|
+
var movableContainerRect = 'movableContainerRect';
|
|
12704
|
+
_super.prototype[movableContainerRect] = getValue('options', this).movableContainer.getBoundingClientRect();
|
|
12705
|
+
EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
|
|
12706
|
+
}
|
|
12547
12707
|
};
|
|
12548
12708
|
TreeInterSectionObserver.prototype.clear = function () {
|
|
12549
12709
|
this.lastPos = null;
|
|
@@ -12761,6 +12921,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
12761
12921
|
}
|
|
12762
12922
|
}
|
|
12763
12923
|
this.expandCollapseRec = null;
|
|
12924
|
+
startIndex = startIndex < 0 ? 0 : startIndex;
|
|
12764
12925
|
pageingDetails.result = visualData.slice(startIndex, endIndex);
|
|
12765
12926
|
this.prevstartIndex = startIndex;
|
|
12766
12927
|
this.prevendIndex = endIndex;
|
|
@@ -12793,12 +12954,14 @@ var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
|
|
|
12793
12954
|
var parentGrid = getValue('parent', this);
|
|
12794
12955
|
getValue('parent', this).log(['limitation', 'virtual_height'], 'virtualization');
|
|
12795
12956
|
var renderer = getValue('locator', this).getService('rendererFactory');
|
|
12796
|
-
if (parentGrid.
|
|
12957
|
+
if (!parentGrid.isFrozenGrid()) {
|
|
12958
|
+
if (parentGrid.enableColumnVirtualization) {
|
|
12959
|
+
getValue('addRenderer', renderer)
|
|
12960
|
+
.apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
12961
|
+
}
|
|
12797
12962
|
getValue('addRenderer', renderer)
|
|
12798
|
-
.apply(renderer, [RenderType.
|
|
12963
|
+
.apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
12799
12964
|
}
|
|
12800
|
-
getValue('addRenderer', renderer)
|
|
12801
|
-
.apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
12802
12965
|
//renderer.addRenderer(RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this)));
|
|
12803
12966
|
this.ensurePageSize();
|
|
12804
12967
|
};
|
|
@@ -12818,6 +12981,162 @@ var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
|
|
|
12818
12981
|
return TreeVirtual;
|
|
12819
12982
|
}(VirtualScroll));
|
|
12820
12983
|
|
|
12984
|
+
var __extends$16 = (undefined && undefined.__extends) || (function () {
|
|
12985
|
+
var extendStatics = function (d, b) {
|
|
12986
|
+
extendStatics = Object.setPrototypeOf ||
|
|
12987
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
12988
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
12989
|
+
return extendStatics(d, b);
|
|
12990
|
+
};
|
|
12991
|
+
return function (d, b) {
|
|
12992
|
+
extendStatics(d, b);
|
|
12993
|
+
function __() { this.constructor = d; }
|
|
12994
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12995
|
+
};
|
|
12996
|
+
})();
|
|
12997
|
+
/**
|
|
12998
|
+
* VirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
12999
|
+
*
|
|
13000
|
+
* @hidden
|
|
13001
|
+
*/
|
|
13002
|
+
var VirtualTreeFreezeRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13003
|
+
__extends$16(VirtualTreeFreezeRenderer, _super);
|
|
13004
|
+
function VirtualTreeFreezeRenderer(parent, locator) {
|
|
13005
|
+
var _this = _super.call(this, parent, locator) || this;
|
|
13006
|
+
_this.addEventListener();
|
|
13007
|
+
return _this;
|
|
13008
|
+
}
|
|
13009
|
+
/**
|
|
13010
|
+
* @returns {void}
|
|
13011
|
+
* @hidden
|
|
13012
|
+
*/
|
|
13013
|
+
VirtualTreeFreezeRenderer.prototype.renderTable = function () {
|
|
13014
|
+
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
13015
|
+
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
13016
|
+
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
13017
|
+
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
13018
|
+
FreezeContentRender.prototype.renderTable.call(this);
|
|
13019
|
+
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
13020
|
+
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
13021
|
+
var movableCont = this.getMovableContent();
|
|
13022
|
+
var minHeight = this.parent.height;
|
|
13023
|
+
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
|
|
13024
|
+
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
13025
|
+
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
13026
|
+
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
13027
|
+
if (this.parent.enableColumnVirtualization) {
|
|
13028
|
+
this.virtualRenderer.virtualEle.movableContent = this.virtualRenderer.movableContent
|
|
13029
|
+
= this.getPanel().querySelector('.' + movableContent);
|
|
13030
|
+
this.virtualRenderer.virtualEle.renderMovableWrapper(minHeight);
|
|
13031
|
+
this.virtualRenderer.virtualEle.renderMovablePlaceHolder();
|
|
13032
|
+
var tbl = movableCont.querySelector('table');
|
|
13033
|
+
this.virtualRenderer.virtualEle.movableTable = tbl;
|
|
13034
|
+
this.virtualRenderer.virtualEle.movableWrapper.appendChild(tbl);
|
|
13035
|
+
movableCont.appendChild(this.virtualRenderer.virtualEle.movableWrapper);
|
|
13036
|
+
movableCont.appendChild(this.virtualRenderer.virtualEle.movablePlaceholder);
|
|
13037
|
+
}
|
|
13038
|
+
this.virtualRenderer.virtualEle.wrapper.appendChild(this.getFrozenContent());
|
|
13039
|
+
this.virtualRenderer.virtualEle.wrapper.appendChild(movableCont);
|
|
13040
|
+
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
13041
|
+
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
13042
|
+
};
|
|
13043
|
+
/**
|
|
13044
|
+
* @param {HTMLElement} target - specifies the target
|
|
13045
|
+
* @param {DocumentFragment} newChild - specifies the newChild
|
|
13046
|
+
* @param {NotifyArgs} e - specifies the notifyargs
|
|
13047
|
+
* @returns {void}
|
|
13048
|
+
* @hidden
|
|
13049
|
+
*/
|
|
13050
|
+
VirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
13051
|
+
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
13052
|
+
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
13053
|
+
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
13054
|
+
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
13055
|
+
};
|
|
13056
|
+
/**
|
|
13057
|
+
* @param {Object[]} data - specifies the data
|
|
13058
|
+
* @param {NotifyArgs} e - specifies the notifyargs
|
|
13059
|
+
* @returns {Row<Column>[]} returns the row
|
|
13060
|
+
* @hidden
|
|
13061
|
+
*/
|
|
13062
|
+
VirtualTreeFreezeRenderer.prototype.generateRows = function (data, e) {
|
|
13063
|
+
return _super.prototype.generateRows.call(this, data, e);
|
|
13064
|
+
};
|
|
13065
|
+
return VirtualTreeFreezeRenderer;
|
|
13066
|
+
}(VirtualFreezeRenderer));
|
|
13067
|
+
/**
|
|
13068
|
+
* ColumnVirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
13069
|
+
*
|
|
13070
|
+
* @hidden
|
|
13071
|
+
*/
|
|
13072
|
+
var ColumnVirtualTreeFreezeRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13073
|
+
__extends$16(ColumnVirtualTreeFreezeRenderer, _super);
|
|
13074
|
+
function ColumnVirtualTreeFreezeRenderer(parent, locator) {
|
|
13075
|
+
var _this = _super.call(this, parent, locator) || this;
|
|
13076
|
+
_this.serviceLoc = locator;
|
|
13077
|
+
_this.eventListener('on');
|
|
13078
|
+
return _this;
|
|
13079
|
+
}
|
|
13080
|
+
/**
|
|
13081
|
+
* @returns {void}
|
|
13082
|
+
* @hidden
|
|
13083
|
+
*/
|
|
13084
|
+
ColumnVirtualTreeFreezeRenderer.prototype.renderTable = function () {
|
|
13085
|
+
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
13086
|
+
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
13087
|
+
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
13088
|
+
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
13089
|
+
ColumnFreezeContentRenderer.prototype.renderTable.call(this);
|
|
13090
|
+
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
13091
|
+
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
13092
|
+
var frozenRightCont = this.getFrozenRightContent();
|
|
13093
|
+
var frzCont = this.getFrozenContent();
|
|
13094
|
+
var movableCont = this.getMovableContent();
|
|
13095
|
+
if (this.parent.getFrozenMode() === 'Right') {
|
|
13096
|
+
frzCont = frozenRightCont;
|
|
13097
|
+
}
|
|
13098
|
+
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
|
|
13099
|
+
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
13100
|
+
var minHeight = this.parent.height;
|
|
13101
|
+
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
13102
|
+
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
13103
|
+
_super.prototype['renderVirtualFrozenLeft'].call(this, frzCont, movableCont);
|
|
13104
|
+
_super.prototype['renderVirtualFrozenRight'].call(this, frzCont, movableCont);
|
|
13105
|
+
_super.prototype['renderVirtualFrozenLeftRight'].call(this, frzCont, movableCont, frozenRightCont);
|
|
13106
|
+
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
13107
|
+
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
13108
|
+
};
|
|
13109
|
+
ColumnVirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
13110
|
+
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
13111
|
+
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
13112
|
+
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
13113
|
+
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
13114
|
+
};
|
|
13115
|
+
return ColumnVirtualTreeFreezeRenderer;
|
|
13116
|
+
}(ColumnVirtualFreezeRenderer));
|
|
13117
|
+
/**
|
|
13118
|
+
* VirtualTreeFreezeHdrRenderer is used to render the virtual table within the frozen and movable header table
|
|
13119
|
+
*
|
|
13120
|
+
* @hidden
|
|
13121
|
+
*/
|
|
13122
|
+
var VirtualTreeFreezeHdrRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13123
|
+
__extends$16(VirtualTreeFreezeHdrRenderer, _super);
|
|
13124
|
+
function VirtualTreeFreezeHdrRenderer() {
|
|
13125
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
13126
|
+
}
|
|
13127
|
+
/**
|
|
13128
|
+
* @returns {void}
|
|
13129
|
+
* @hidden
|
|
13130
|
+
*/
|
|
13131
|
+
VirtualTreeFreezeHdrRenderer.prototype.renderTable = function () {
|
|
13132
|
+
_super.prototype.renderTable.call(this);
|
|
13133
|
+
};
|
|
13134
|
+
VirtualTreeFreezeHdrRenderer.prototype.rfshMovable = function () {
|
|
13135
|
+
_super.prototype.rfshMovable.call(this);
|
|
13136
|
+
};
|
|
13137
|
+
return VirtualTreeFreezeHdrRenderer;
|
|
13138
|
+
}(VirtualFreezeHdrRenderer));
|
|
13139
|
+
|
|
12821
13140
|
/**
|
|
12822
13141
|
* TreeGrid Freeze module
|
|
12823
13142
|
*
|
|
@@ -12838,6 +13157,7 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
|
|
|
12838
13157
|
this.parent.on('rowExpandCollapse', this.rowExpandCollapse, this);
|
|
12839
13158
|
this.parent.on('dataBoundArg', this.dataBoundArg, this);
|
|
12840
13159
|
this.parent.grid.on('dblclick', this.dblClickHandler, this);
|
|
13160
|
+
this.parent.grid.on('initial-load', this.instantiateRenderer, this);
|
|
12841
13161
|
};
|
|
12842
13162
|
Freeze$$1.prototype.removeEventListener = function () {
|
|
12843
13163
|
if (this.parent.isDestroyed) {
|
|
@@ -12846,6 +13166,40 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
|
|
|
12846
13166
|
this.parent.off('rowExpandCollapse', this.rowExpandCollapse);
|
|
12847
13167
|
this.parent.off('dataBoundArg', this.dataBoundArg);
|
|
12848
13168
|
this.parent.grid.off('dblclick', this.dblClickHandler);
|
|
13169
|
+
this.parent.grid.off('initial-load', this.instantiateRenderer);
|
|
13170
|
+
};
|
|
13171
|
+
Freeze$$1.prototype.instantiateRenderer = function () {
|
|
13172
|
+
var renderer = getValue('serviceLocator', this.parent.grid).getService('rendererFactory');
|
|
13173
|
+
if (this.parent.getFrozenColumns()) {
|
|
13174
|
+
if (this.parent.enableColumnVirtualization) {
|
|
13175
|
+
getValue('addRenderer', renderer)
|
|
13176
|
+
.apply(renderer, [RenderType.Header, new VirtualTreeFreezeHdrRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13177
|
+
}
|
|
13178
|
+
else {
|
|
13179
|
+
getValue('addRenderer', renderer)
|
|
13180
|
+
.apply(renderer, [RenderType.Header, new FreezeRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13181
|
+
}
|
|
13182
|
+
if (this.parent.enableVirtualization) {
|
|
13183
|
+
getValue('addRenderer', renderer)
|
|
13184
|
+
.apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13185
|
+
}
|
|
13186
|
+
else {
|
|
13187
|
+
getValue('addRenderer', renderer)
|
|
13188
|
+
.apply(renderer, [RenderType.Content, new FreezeContentRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13189
|
+
}
|
|
13190
|
+
}
|
|
13191
|
+
if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
|
|
13192
|
+
getValue('addRenderer', renderer)
|
|
13193
|
+
.apply(renderer, [RenderType.Header, new ColumnFreezeHeaderRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13194
|
+
if (this.parent.enableVirtualization) {
|
|
13195
|
+
getValue('addRenderer', renderer)
|
|
13196
|
+
.apply(renderer, [RenderType.Content, new ColumnVirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13197
|
+
}
|
|
13198
|
+
else {
|
|
13199
|
+
getValue('addRenderer', renderer)
|
|
13200
|
+
.apply(renderer, [RenderType.Content, new ColumnFreezeContentRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13201
|
+
}
|
|
13202
|
+
}
|
|
12849
13203
|
};
|
|
12850
13204
|
Freeze$$1.prototype.rowExpandCollapse = function (args) {
|
|
12851
13205
|
var movableRows = this.parent.getMovableDataRows();
|
|
@@ -12890,7 +13244,7 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
|
|
|
12890
13244
|
};
|
|
12891
13245
|
Freeze$$1.prototype.dblClickHandler = function (e) {
|
|
12892
13246
|
if (parentsUntil(e.target, 'e-rowcell') &&
|
|
12893
|
-
this.parent.grid.editSettings.allowEditOnDblClick && this.parent.editSettings.mode !== 'Cell') {
|
|
13247
|
+
this.parent.grid.editSettings.allowEditOnDblClick && this.parent.editSettings.mode !== 'Cell' && (!e.target['classList'].contains('e-treegridcollapse') && !e.target['classList'].contains('e-treegridexpand'))) {
|
|
12894
13248
|
this.parent.grid.editModule.startEdit(parentsUntil(e.target, 'e-row'));
|
|
12895
13249
|
}
|
|
12896
13250
|
};
|
|
@@ -13304,5 +13658,5 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13304
13658
|
* Export TreeGrid component
|
|
13305
13659
|
*/
|
|
13306
13660
|
|
|
13307
|
-
export { TreeGrid, load, rowDataBound, dataBound, queryCellInfo, beforeDataBound, actionBegin, dataStateChange, actionComplete, rowSelecting, rowSelected, checkboxChange, rowDeselected, toolbarClick, beforeExcelExport, beforePdfExport, resizeStop, expanded, expanding, collapsed, collapsing, remoteExpand, localPagedExpandCollapse, pagingActions, printGridInit, contextMenuOpen, contextMenuClick, beforeCopy, beforePaste, savePreviousRowPosition, crudAction, beginEdit, beginAdd, recordDoubleClick, cellSave, cellSaved, cellEdit, batchDelete, batchCancel, batchAdd, beforeBatchDelete, beforeBatchAdd, beforeBatchSave, batchSave, keyPressed, updateData, doubleTap, virtualColumnIndex, virtualActionArgs, destroy, dataListener, indexModifier, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, detailDataBound, rowDrag, rowDragStartHelper, rowDrop, rowDragStart, rowsAdd, rowsRemove, rowdraging, rowDropped, autoCol, rowDeselecting, DataManipulation, Reorder$1 as Reorder, Resize$1 as Resize, RowDD$1 as RowDD, Column, EditSettings, Predicate$1 as Predicate, FilterSettings, PageSettings, SearchSettings, SelectionSettings, AggregateColumn, AggregateRow, SortDescriptor, SortSettings, RowDropSettings$1 as RowDropSettings, InfiniteScrollSettings, Render, TreeVirtualRowModelGenerator, isRemoteData, isCountRequired, isCheckboxcolumn, isFilterChildHierarchy, findParentRecords, getExpandStatus, findChildrenRecords, isOffline, extendArray, getPlainData, getParentData, isHidden, ToolbarItem, ContextMenuItems, Filter$1 as Filter, ExcelExport$1 as ExcelExport, PdfExport$1 as PdfExport, Page$1 as Page, Toolbar$1 as Toolbar, Aggregate$1 as Aggregate, Sort$1 as Sort, TreeClipboard, ColumnMenu$1 as ColumnMenu, ContextMenu$1 as ContextMenu, Edit$1 as Edit, CommandColumn$1 as CommandColumn, Selection, DetailRow$1 as DetailRow, VirtualScroll$1 as VirtualScroll, TreeVirtual, Freeze$1 as Freeze, ColumnChooser$1 as ColumnChooser, Logger$1 as Logger, treeGridDetails, InfiniteScroll$1 as InfiniteScroll };
|
|
13661
|
+
export { TreeGrid, load, rowDataBound, dataBound, queryCellInfo, beforeDataBound, actionBegin, dataStateChange, actionComplete, rowSelecting, rowSelected, checkboxChange, rowDeselected, toolbarClick, beforeExcelExport, beforePdfExport, resizeStop, expanded, expanding, collapsed, collapsing, remoteExpand, localPagedExpandCollapse, pagingActions, printGridInit, contextMenuOpen, contextMenuClick, beforeCopy, beforePaste, savePreviousRowPosition, crudAction, beginEdit, beginAdd, recordDoubleClick, cellSave, cellSaved, cellEdit, batchDelete, batchCancel, batchAdd, beforeBatchDelete, beforeBatchAdd, beforeBatchSave, batchSave, keyPressed, updateData, doubleTap, virtualColumnIndex, virtualActionArgs, destroy, dataListener, indexModifier, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, detailDataBound, rowDrag, rowDragStartHelper, rowDrop, rowDragStart, rowsAdd, rowsRemove, rowdraging, rowDropped, autoCol, rowDeselecting, headerContent, movableContent, movableHeader, frozenContent, frozenHeader, content, table, leftRight, frozenRight, frozenLeft, dataColIndex, ariaColIndex, dataRowIndex, ariaRowIndex, DataManipulation, Reorder$1 as Reorder, Resize$1 as Resize, RowDD$1 as RowDD, Column, EditSettings, Predicate$1 as Predicate, FilterSettings, PageSettings, SearchSettings, SelectionSettings, AggregateColumn, AggregateRow, SortDescriptor, SortSettings, RowDropSettings$1 as RowDropSettings, InfiniteScrollSettings, Render, TreeVirtualRowModelGenerator, isRemoteData, isCountRequired, isCheckboxcolumn, isFilterChildHierarchy, findParentRecords, getExpandStatus, findChildrenRecords, isOffline, extendArray, getPlainData, getParentData, isHidden, ToolbarItem, ContextMenuItems, Filter$1 as Filter, ExcelExport$1 as ExcelExport, PdfExport$1 as PdfExport, Page$1 as Page, Toolbar$1 as Toolbar, Aggregate$1 as Aggregate, Sort$1 as Sort, TreeClipboard, ColumnMenu$1 as ColumnMenu, ContextMenu$1 as ContextMenu, Edit$1 as Edit, CommandColumn$1 as CommandColumn, Selection, DetailRow$1 as DetailRow, VirtualScroll$1 as VirtualScroll, TreeVirtual, Freeze$1 as Freeze, ColumnChooser$1 as ColumnChooser, Logger$1 as Logger, treeGridDetails, InfiniteScroll$1 as InfiniteScroll };
|
|
13308
13662
|
//# sourceMappingURL=ej2-treegrid.es5.js.map
|