@syncfusion/ej2-treegrid 20.2.49 → 20.3.48
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 +3 -53
- 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 +376 -57
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +405 -62
- 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 +33 -6
- 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 +2 -2
- 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 +33 -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 +7 -2
- package/styles/bootstrap5.css +7 -2
- package/styles/fabric-dark.css +5 -1
- package/styles/fabric.css +5 -1
- package/styles/fluent-dark.css +6 -2
- package/styles/fluent.css +6 -2
- 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 +4 -4
- 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 +7 -2
- package/styles/treegrid/bootstrap5.css +7 -2
- package/styles/treegrid/fabric-dark.css +5 -1
- package/styles/treegrid/fabric.css +5 -1
- package/styles/treegrid/fluent-dark.css +6 -2
- package/styles/treegrid/fluent.css +6 -2
- 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) {
|
|
@@ -1325,8 +1354,8 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1325
1354
|
childData = (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0) ?
|
|
1326
1355
|
this.parent.getCurrentViewRecords() : this.parent.flatData;
|
|
1327
1356
|
childData.forEach(function (record) {
|
|
1328
|
-
if (_this.parent.enableVirtualization
|
|
1329
|
-
if (record.hasChildRecords) {
|
|
1357
|
+
if (_this.parent.enableVirtualization) {
|
|
1358
|
+
if (record.hasChildRecords && record.childRecords.length > 0) {
|
|
1330
1359
|
_this.updateParentSelection(record);
|
|
1331
1360
|
}
|
|
1332
1361
|
else {
|
|
@@ -2210,8 +2239,8 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
|
|
|
2210
2239
|
if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
|
|
2211
2240
|
currentData.index = this.storedIndex;
|
|
2212
2241
|
}
|
|
2213
|
-
if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
|
|
2214
|
-
|
|
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))) {
|
|
2215
2244
|
currentData.hasChildRecords = true;
|
|
2216
2245
|
if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
|
|
2217
2246
|
&& isNullOrUndefined(currentData[this.parent.childMapping])) {
|
|
@@ -2247,6 +2276,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
|
|
|
2247
2276
|
currentData.checkboxState = 'uncheck';
|
|
2248
2277
|
if (isNullOrUndefined(currentData[this.parent.parentIdMapping]) || currentData.parentItem) {
|
|
2249
2278
|
this.parent.flatData.push(currentData);
|
|
2279
|
+
this.parent['infiniteScrollData'].push(currentData);
|
|
2250
2280
|
}
|
|
2251
2281
|
if (!this.isSelfReference && currentData.level === 0) {
|
|
2252
2282
|
this.parent.parentData.push(currentData);
|
|
@@ -3091,6 +3121,10 @@ function updateParentRow(key, record, action, control, isSelfReference, child) {
|
|
|
3091
3121
|
index_1 = i;
|
|
3092
3122
|
return;
|
|
3093
3123
|
} });
|
|
3124
|
+
if (control.enableVirtualization && isNullOrUndefined(index_1)) {
|
|
3125
|
+
var updatedParent = getValue('uniqueIDCollection.' + child.parentUniqueID, control);
|
|
3126
|
+
record = updatedParent;
|
|
3127
|
+
}
|
|
3094
3128
|
if (!isNullOrUndefined(index_1)) {
|
|
3095
3129
|
record = currentRecords[index_1];
|
|
3096
3130
|
}
|
|
@@ -3548,6 +3582,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3548
3582
|
TreeGrid.prototype.initProperties = function () {
|
|
3549
3583
|
this.defaultLocale = {};
|
|
3550
3584
|
this.flatData = [];
|
|
3585
|
+
this.infiniteScrollData = [];
|
|
3551
3586
|
this.parentData = [];
|
|
3552
3587
|
this.columnModel = [];
|
|
3553
3588
|
this.isExpandAll = false;
|
|
@@ -3839,7 +3874,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3839
3874
|
if (!isNullOrUndefined(this.grid.clipboardModule)) {
|
|
3840
3875
|
this.grid.clipboardModule.destroy();
|
|
3841
3876
|
}
|
|
3842
|
-
this.clipboardModule = this.grid.clipboardModule = new TreeClipboard(this);
|
|
3877
|
+
this.clipboardModule = this.grid.clipboardModule = new TreeClipboard(this, this.grid.serviceLocator);
|
|
3843
3878
|
};
|
|
3844
3879
|
TreeGrid.prototype.convertTreeData = function (data) {
|
|
3845
3880
|
var _this = this;
|
|
@@ -3932,13 +3967,19 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3932
3967
|
this.grid[templateInstance] = this[templateInstance];
|
|
3933
3968
|
var isJsComponent = 'isJsComponent';
|
|
3934
3969
|
this.grid[isJsComponent] = true;
|
|
3970
|
+
this.grid.enableVirtualMaskRow = false; // Need to update in virtual mask row feature implementation.
|
|
3935
3971
|
};
|
|
3936
3972
|
TreeGrid.prototype.triggerEvents = function (args) {
|
|
3937
3973
|
this.trigger(getObject('name', args), args);
|
|
3938
3974
|
};
|
|
3939
3975
|
TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
|
|
3940
|
-
if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
3941
|
-
|| 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')))) {
|
|
3942
3983
|
args.cancel = true;
|
|
3943
3984
|
return;
|
|
3944
3985
|
}
|
|
@@ -3995,7 +4036,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3995
4036
|
this.grid.pdfHeaderQueryCellInfo = this.triggerEvents.bind(this);
|
|
3996
4037
|
this.grid.dataSourceChanged = this.triggerEvents.bind(this);
|
|
3997
4038
|
this.grid.recordDoubleClick = this.triggerEvents.bind(this);
|
|
3998
|
-
this.grid.rowDeselecting = this.triggerEvents.bind(this);
|
|
3999
4039
|
this.grid.cellDeselected = this.triggerEvents.bind(this);
|
|
4000
4040
|
this.grid.cellDeselecting = this.triggerEvents.bind(this);
|
|
4001
4041
|
this.grid.columnMenuOpen = this.triggerEvents.bind(this);
|
|
@@ -4176,6 +4216,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4176
4216
|
_this.grid.dataSource = { result: _this.flatData, count: getValue('count', _this.grid.dataSource) };
|
|
4177
4217
|
}
|
|
4178
4218
|
else {
|
|
4219
|
+
if (args.action.requestType !== 'infiniteScroll') {
|
|
4220
|
+
_this.infiniteScrollData = [];
|
|
4221
|
+
}
|
|
4179
4222
|
_this.trigger(dataStateChange, args);
|
|
4180
4223
|
}
|
|
4181
4224
|
};
|
|
@@ -4354,6 +4397,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4354
4397
|
_this.selectedRecords = _this.selectedRows = _this.modifiedRecords = [];
|
|
4355
4398
|
}
|
|
4356
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
|
+
}
|
|
4357
4405
|
_this.trigger(actionComplete, args);
|
|
4358
4406
|
}
|
|
4359
4407
|
};
|
|
@@ -5201,8 +5249,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5201
5249
|
this.grid.setRowData(key, rowData);
|
|
5202
5250
|
var visibleRecords = this.getVisibleRecords();
|
|
5203
5251
|
if (visibleRecords.length > 0 && key === (visibleRecords[visibleRecords.length - 1])[primaryKey]) {
|
|
5204
|
-
var table = this.getContentTable();
|
|
5205
|
-
var sHeight = table.scrollHeight;
|
|
5252
|
+
var table$$1 = this.getContentTable();
|
|
5253
|
+
var sHeight = table$$1.scrollHeight;
|
|
5206
5254
|
var clientHeight = this.getContent().clientHeight;
|
|
5207
5255
|
this.lastRowBorder(this.getRows()[currentRecords.indexOf(record)], sHeight <= clientHeight);
|
|
5208
5256
|
}
|
|
@@ -5675,16 +5723,20 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5675
5723
|
}
|
|
5676
5724
|
}
|
|
5677
5725
|
else {
|
|
5678
|
-
var
|
|
5679
|
-
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
|
+
}
|
|
5680
5732
|
if (this.enableImmutableMode) {
|
|
5681
|
-
record = this.getCurrentViewRecords()[
|
|
5733
|
+
record = this.getCurrentViewRecords()[rowInfo_1.rowIndex];
|
|
5682
5734
|
}
|
|
5683
5735
|
if (target.classList.contains('e-treegridexpand')) {
|
|
5684
|
-
this.collapseRow(
|
|
5736
|
+
this.collapseRow(rowInfo_1.row, record);
|
|
5685
5737
|
}
|
|
5686
5738
|
else {
|
|
5687
|
-
this.expandRow(
|
|
5739
|
+
this.expandRow(rowInfo_1.row, record);
|
|
5688
5740
|
}
|
|
5689
5741
|
}
|
|
5690
5742
|
};
|
|
@@ -6098,8 +6150,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6098
6150
|
totalRows = [].slice.call(rows);
|
|
6099
6151
|
for (var i = totalRows.length - 1; i >= 0; i--) {
|
|
6100
6152
|
if (!isHidden(totalRows[i])) {
|
|
6101
|
-
var table = this.getContentTable();
|
|
6102
|
-
var sHeight = table.scrollHeight;
|
|
6153
|
+
var table$$1 = this.getContentTable();
|
|
6154
|
+
var sHeight = table$$1.scrollHeight;
|
|
6103
6155
|
var clientHeight = this.getContent().clientHeight;
|
|
6104
6156
|
this.lastRowBorder(totalRows[i], sHeight <= clientHeight);
|
|
6105
6157
|
break;
|
|
@@ -6119,6 +6171,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6119
6171
|
this.trigger(dataStateChange, expandingArgs);
|
|
6120
6172
|
deff.promise.then(function () {
|
|
6121
6173
|
if (expandingArgs.childData.length) {
|
|
6174
|
+
_this.flatData = _this.infiniteScrollData;
|
|
6122
6175
|
var currentData = (_this.flatData);
|
|
6123
6176
|
var index = 0;
|
|
6124
6177
|
for (var i = 0; i < currentData.length; i++) {
|
|
@@ -6168,8 +6221,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6168
6221
|
}
|
|
6169
6222
|
}
|
|
6170
6223
|
_this.isExpandRefresh = true;
|
|
6224
|
+
var scrollHeightBeforeRefresh = _this.getContentTable().parentElement.scrollTop;
|
|
6171
6225
|
_this.grid.refresh();
|
|
6172
6226
|
_this.setHeightForFrozenContent();
|
|
6227
|
+
if (_this.enableInfiniteScrolling) {
|
|
6228
|
+
_this.getContentTable().parentElement.scrollTop = scrollHeightBeforeRefresh;
|
|
6229
|
+
}
|
|
6173
6230
|
_this.trigger(expanded, expandingArgs);
|
|
6174
6231
|
});
|
|
6175
6232
|
};
|
|
@@ -7426,13 +7483,16 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7426
7483
|
for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
|
|
7427
7484
|
if (tObj.getCurrentViewRecords()[i].taskData === record_1.parentItem.taskData) {
|
|
7428
7485
|
dropIndex = i;
|
|
7486
|
+
if (tObj.enableVirtualization) {
|
|
7487
|
+
dropIndex = parseInt(tObj.getRows()[i].getAttribute('data-rowindex'), 10);
|
|
7488
|
+
}
|
|
7429
7489
|
}
|
|
7430
7490
|
}
|
|
7431
7491
|
}
|
|
7432
7492
|
else {
|
|
7433
7493
|
dropIndex = this.selectedRow.rowIndex - 1;
|
|
7434
7494
|
}
|
|
7435
|
-
if (this.parent.enableVirtualization && this.
|
|
7495
|
+
if (this.parent.enableVirtualization && this.selectedRecord && !(record_1.level > this.selectedRecord.level)) {
|
|
7436
7496
|
dropIndex = parseInt(this.selectedRow.getAttribute('data-rowindex'), 10) - 1;
|
|
7437
7497
|
}
|
|
7438
7498
|
tObj[action] = 'indenting';
|
|
@@ -7447,11 +7507,11 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7447
7507
|
var dropIndex = void 0;
|
|
7448
7508
|
var parentItem = this.selectedRecord.parentItem;
|
|
7449
7509
|
for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
|
|
7450
|
-
if (tObj.getCurrentViewRecords()[i].
|
|
7510
|
+
if (tObj.getCurrentViewRecords()[i].uniqueID === parentItem.uniqueID) {
|
|
7451
7511
|
dropIndex = i;
|
|
7452
7512
|
}
|
|
7453
7513
|
}
|
|
7454
|
-
if (this.parent.enableVirtualization && this.
|
|
7514
|
+
if (this.parent.enableVirtualization && this.selectedRecord) {
|
|
7455
7515
|
dropIndex = parseInt(this.parent.getRows()[dropIndex].getAttribute('data-rowindex'), 10);
|
|
7456
7516
|
}
|
|
7457
7517
|
tObj[action] = 'outdenting';
|
|
@@ -7471,7 +7531,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7471
7531
|
this.parent.trigger(actionBegin, actionArgs, function (actionArgs) {
|
|
7472
7532
|
if (!actionArgs.cancel) {
|
|
7473
7533
|
if (actionArgs.action === 'indenting') {
|
|
7474
|
-
if (_this.parent.enableVirtualization
|
|
7534
|
+
if (_this.parent.enableVirtualization) {
|
|
7475
7535
|
_this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'child');
|
|
7476
7536
|
}
|
|
7477
7537
|
else {
|
|
@@ -7479,7 +7539,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7479
7539
|
}
|
|
7480
7540
|
}
|
|
7481
7541
|
else if (actionArgs.action === 'outdenting') {
|
|
7482
|
-
if (_this.parent.enableVirtualization
|
|
7542
|
+
if (_this.parent.enableVirtualization) {
|
|
7483
7543
|
_this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'below');
|
|
7484
7544
|
}
|
|
7485
7545
|
else {
|
|
@@ -7832,16 +7892,16 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
7832
7892
|
classList(ele, ['e-errorcontainer'], []);
|
|
7833
7893
|
classList(ele, ['e-icons', 'e-errorelem'], []);
|
|
7834
7894
|
var errorVal = dragelem.querySelector('.errorValue');
|
|
7835
|
-
var content = dragelem.querySelector('.e-rowcell').innerHTML;
|
|
7895
|
+
var content$$1 = dragelem.querySelector('.e-rowcell').innerHTML;
|
|
7836
7896
|
if (errorVal) {
|
|
7837
|
-
content = errorVal.innerHTML;
|
|
7897
|
+
content$$1 = errorVal.innerHTML;
|
|
7838
7898
|
errorVal.parentNode.removeChild(errorVal);
|
|
7839
7899
|
}
|
|
7840
7900
|
dragelem.querySelector('.e-rowcell').innerHTML = '';
|
|
7841
7901
|
var spanContent = document.createElement('span');
|
|
7842
7902
|
spanContent.className = 'errorValue';
|
|
7843
7903
|
spanContent.style.paddingLeft = '16px';
|
|
7844
|
-
spanContent.innerHTML = content;
|
|
7904
|
+
spanContent.innerHTML = content$$1;
|
|
7845
7905
|
dragelem.querySelector('.e-rowcell').appendChild(ele);
|
|
7846
7906
|
dragelem.querySelector('.e-rowcell').appendChild(spanContent);
|
|
7847
7907
|
var dropItemSpan = document.querySelector('.e-dropitemscount');
|
|
@@ -8729,6 +8789,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8729
8789
|
var currentPage = this[model].currentPage;
|
|
8730
8790
|
if (clear) {
|
|
8731
8791
|
this.cache = {};
|
|
8792
|
+
this.movableCache = {};
|
|
8793
|
+
this.frozenRightCache = {};
|
|
8732
8794
|
this.data = {};
|
|
8733
8795
|
this.groups = {};
|
|
8734
8796
|
}
|
|
@@ -8742,6 +8804,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8742
8804
|
this.cache = {};
|
|
8743
8805
|
this.data = {};
|
|
8744
8806
|
this.groups = {};
|
|
8807
|
+
this.movableCache = {};
|
|
8808
|
+
this.frozenRightCache = {};
|
|
8745
8809
|
}
|
|
8746
8810
|
}
|
|
8747
8811
|
return clear;
|
|
@@ -10134,7 +10198,7 @@ var ContextMenu$1 = /** @__PURE__ @class */ (function () {
|
|
|
10134
10198
|
var indent = select('#' + this.parent.element.id + '_gridcontrol_cmenu_Indent', args.element);
|
|
10135
10199
|
var outdent = select('#' + this.parent.element.id + '_gridcontrol_cmenu_Outdent', args.element);
|
|
10136
10200
|
if (addRow) {
|
|
10137
|
-
if (this.parent.grid.editSettings.allowAdding === false) {
|
|
10201
|
+
if (this.parent.grid.editSettings.allowAdding === false || this.parent.grid.isEdit) {
|
|
10138
10202
|
addRow.style.display = 'none';
|
|
10139
10203
|
}
|
|
10140
10204
|
else {
|
|
@@ -10504,13 +10568,13 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
|
|
|
10504
10568
|
this.updateRowIndex();
|
|
10505
10569
|
// update focus module, need to refix this once grid source modified.
|
|
10506
10570
|
var focusModule = getValue('focusModule', this.parent.grid);
|
|
10507
|
-
var table = this.parent.getContentTable();
|
|
10571
|
+
var table$$1 = this.parent.getContentTable();
|
|
10508
10572
|
if (this.parent.getBatchChanges()[this.deletedRecords].length && this.parent.editSettings.newRowPosition === 'Above') {
|
|
10509
10573
|
actualIndex = e.row.rowIndex;
|
|
10510
10574
|
focusModule.getContent().matrix.matrix = this.matrix;
|
|
10511
10575
|
}
|
|
10512
10576
|
else {
|
|
10513
|
-
actualIndex = table.getElementsByClassName('e-batchrow')[0].rowIndex;
|
|
10577
|
+
actualIndex = table$$1.getElementsByClassName('e-batchrow')[0].rowIndex;
|
|
10514
10578
|
// if (this.parent.frozenRows || this.parent.frozenColumns) {
|
|
10515
10579
|
// actualIndex = this.batchIndex;
|
|
10516
10580
|
// }
|
|
@@ -11106,6 +11170,10 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11106
11170
|
}
|
|
11107
11171
|
this.updateGridEditMode('Batch');
|
|
11108
11172
|
}
|
|
11173
|
+
else if (this.parent.editSettings.mode === 'Cell' && (!column.allowEditing || column.isPrimaryKey)) {
|
|
11174
|
+
this.isOnBatch = true;
|
|
11175
|
+
this.updateGridEditMode('Batch');
|
|
11176
|
+
}
|
|
11109
11177
|
};
|
|
11110
11178
|
Edit$$1.prototype.updateGridEditMode = function (mode) {
|
|
11111
11179
|
this.parent.grid.setProperties({ editSettings: { mode: mode } }, true);
|
|
@@ -11178,6 +11246,9 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11178
11246
|
args.cancel = true;
|
|
11179
11247
|
}
|
|
11180
11248
|
}
|
|
11249
|
+
if (this.parent.enableVirtualization) {
|
|
11250
|
+
this.parent.grid.contentModule['editedRowIndex'] = this.parent.grid.editModule.editModule['index'];
|
|
11251
|
+
}
|
|
11181
11252
|
// if (this.isAdd && this.parent.editSettings.mode === 'Batch' && !args.cell.parentElement.classList.contains('e-insertedrow')) {
|
|
11182
11253
|
// this.isAdd = false;
|
|
11183
11254
|
// }
|
|
@@ -11297,6 +11368,9 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11297
11368
|
this.parent.grid.isEdit = true;
|
|
11298
11369
|
}
|
|
11299
11370
|
}
|
|
11371
|
+
if (this.parent.enableVirtualization) {
|
|
11372
|
+
this.parent.grid.contentModule['virtualData'] = {};
|
|
11373
|
+
}
|
|
11300
11374
|
};
|
|
11301
11375
|
Edit$$1.prototype.afterCellSave = function (args, row, rowIndex) {
|
|
11302
11376
|
var mRow;
|
|
@@ -11546,7 +11620,12 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11546
11620
|
if (isVirtualization) {
|
|
11547
11621
|
this.prevAriaRowIndex = '-1';
|
|
11548
11622
|
}
|
|
11549
|
-
|
|
11623
|
+
if (!this.parent.enableVirtualization || this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
11624
|
+
focussedElement.focus();
|
|
11625
|
+
}
|
|
11626
|
+
if (this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
11627
|
+
this.parent.grid.contentModule['createEmptyRowdata']();
|
|
11628
|
+
}
|
|
11550
11629
|
}
|
|
11551
11630
|
}
|
|
11552
11631
|
if (this.parent.editSettings.mode === 'Batch' && !isNullOrUndefined(this.addRowIndex) && this.addRowIndex !== -1 && this['isAddedRowByMethod'] && !this.isAddedRowByContextMenu) {
|
|
@@ -11670,6 +11749,9 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11670
11749
|
}
|
|
11671
11750
|
if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
11672
11751
|
this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
|
|
11752
|
+
if (this.parent.enableVirtualization && this.isAddedRowByContextMenu) {
|
|
11753
|
+
this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
|
|
11754
|
+
}
|
|
11673
11755
|
}
|
|
11674
11756
|
else {
|
|
11675
11757
|
this.addRowRecord = this.parent.getSelectedRecords()[0];
|
|
@@ -11706,15 +11788,18 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11706
11788
|
var position = null;
|
|
11707
11789
|
value.taskData = isNullOrUndefined(value.taskData) ? extend({}, args.data) : value.taskData;
|
|
11708
11790
|
var currentData = void 0;
|
|
11709
|
-
if (this.parent.
|
|
11791
|
+
if (this.parent.enableVirtualization && args.index !== 0) {
|
|
11792
|
+
currentData = this.parent.flatData;
|
|
11793
|
+
}
|
|
11794
|
+
else if (this.parent.editSettings.mode === 'Batch' && this['isAddedRowByMethod'] && !isNullOrUndefined(this.addRowIndex)) {
|
|
11710
11795
|
currentData = this.batchEditModule['batchRecords'];
|
|
11711
11796
|
}
|
|
11712
11797
|
else {
|
|
11713
11798
|
currentData = this.parent.grid.getCurrentViewRecords();
|
|
11714
11799
|
}
|
|
11715
11800
|
if (this.parent.enableVirtualization && args.index !== 0) {
|
|
11716
|
-
this.addRowIndex = this.parent.
|
|
11717
|
-
this.selectedIndex =
|
|
11801
|
+
this.addRowIndex = this.parent.flatData.indexOf(this.addRowRecord);
|
|
11802
|
+
this.selectedIndex = this.addRowIndex;
|
|
11718
11803
|
}
|
|
11719
11804
|
var index = this.addRowIndex;
|
|
11720
11805
|
value.uniqueID = getUid(this.parent.element.id + '_data_');
|
|
@@ -11728,7 +11813,8 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11728
11813
|
var rows = this.parent.getRows();
|
|
11729
11814
|
var firstAriaIndex = rows.length ? currentData.indexOf(currentData[0]) : 0;
|
|
11730
11815
|
var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
|
|
11731
|
-
var withinRange = this.
|
|
11816
|
+
var withinRange = this.parent.enableVirtualization && args.index !== 0 ? true :
|
|
11817
|
+
this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
|
|
11732
11818
|
if (currentData.length) {
|
|
11733
11819
|
idMapping = currentData[this.addRowIndex][this.parent.idMapping];
|
|
11734
11820
|
parentIdMapping = currentData[this.addRowIndex][this.parent.parentIdMapping];
|
|
@@ -11764,7 +11850,12 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11764
11850
|
}
|
|
11765
11851
|
index = (childRecordCount1 > 0) ? (currentDataIndex1 + childRecordCount1) : (currentDataIndex1);
|
|
11766
11852
|
if (this.isSelfReference) {
|
|
11767
|
-
|
|
11853
|
+
if (!this.parent.isLocalData && this.parent.editModule.selectedIndex === -1) {
|
|
11854
|
+
value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = null;
|
|
11855
|
+
}
|
|
11856
|
+
else {
|
|
11857
|
+
value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = idMapping;
|
|
11858
|
+
}
|
|
11768
11859
|
if (!isNullOrUndefined(value.parentItem)) {
|
|
11769
11860
|
updateParentRow(key, value.parentItem, 'add', this.parent, this.isSelfReference, value);
|
|
11770
11861
|
}
|
|
@@ -12094,6 +12185,29 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12094
12185
|
VirtualTreeContentRenderer.prototype.getRowByIndex = function (index) {
|
|
12095
12186
|
return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; })[0];
|
|
12096
12187
|
};
|
|
12188
|
+
VirtualTreeContentRenderer.prototype.getMovableVirtualRowByIndex = function (index) {
|
|
12189
|
+
return this.getRowCollection(index, true);
|
|
12190
|
+
};
|
|
12191
|
+
VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
|
|
12192
|
+
return this.getRowCollection(index, false, false, true);
|
|
12193
|
+
};
|
|
12194
|
+
VirtualTreeContentRenderer.prototype.getRowCollection = function (index, isMovable, isRowObject, isFrozenRight) {
|
|
12195
|
+
var startIdx = parseInt(this.parent.getRows()[0].getAttribute(dataRowIndex), 10);
|
|
12196
|
+
var rowCollection = isMovable ? this.parent.getMovableDataRows() : this.parent.getDataRows();
|
|
12197
|
+
rowCollection = isFrozenRight ? this.parent.getFrozenRightDataRows() : rowCollection;
|
|
12198
|
+
var collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
|
|
12199
|
+
var selectedRow = collection[index - startIdx];
|
|
12200
|
+
if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {
|
|
12201
|
+
if (!isRowObject) {
|
|
12202
|
+
selectedRow = index <= this.parent.frozenRows ? rowCollection[index]
|
|
12203
|
+
: rowCollection[(index - startIdx) + this.parent.frozenRows];
|
|
12204
|
+
}
|
|
12205
|
+
else {
|
|
12206
|
+
selectedRow = index <= this.parent.frozenRows ? this.parent.getRowsObject()[index].data : selectedRow;
|
|
12207
|
+
}
|
|
12208
|
+
}
|
|
12209
|
+
return selectedRow;
|
|
12210
|
+
};
|
|
12097
12211
|
VirtualTreeContentRenderer.prototype.addEventListener = function () {
|
|
12098
12212
|
this.parent.on(virtualActionArgs, this.virtualOtherAction, this);
|
|
12099
12213
|
this.parent.on(indexModifier, this.indexModifier, this);
|
|
@@ -12109,10 +12223,10 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12109
12223
|
}
|
|
12110
12224
|
};
|
|
12111
12225
|
VirtualTreeContentRenderer.prototype.indexModifier = function (args) {
|
|
12112
|
-
var content = this.parent.getContent().querySelector('.e-content');
|
|
12226
|
+
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12113
12227
|
if (this.recordAdded && this.startIndex > -1 && this.endIndex > -1) {
|
|
12114
12228
|
if (this.endIndex > args.count - this.parent.pageSettings.pageSize) {
|
|
12115
|
-
var nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
|
|
12229
|
+
var nextSetResIndex = ~~(content$$1.scrollTop / this.parent.getRowHeight());
|
|
12116
12230
|
var lastIndex = nextSetResIndex + this.parent.getRows().length;
|
|
12117
12231
|
if (lastIndex > args.count) {
|
|
12118
12232
|
lastIndex = nextSetResIndex +
|
|
@@ -12121,7 +12235,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12121
12235
|
this.startIndex = lastIndex - this.parent.getRows().length;
|
|
12122
12236
|
this.endIndex = lastIndex;
|
|
12123
12237
|
}
|
|
12124
|
-
else {
|
|
12238
|
+
else if (this.parent.root.editSettings.newRowPosition !== 'Top' && this.parent.root.editModule.selectedIndex !== -1 || this.parent.root.editModule.selectedIndex !== -1) {
|
|
12125
12239
|
this.startIndex += 1;
|
|
12126
12240
|
this.endIndex += 1;
|
|
12127
12241
|
}
|
|
@@ -12173,7 +12287,15 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12173
12287
|
&& this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
|
|
12174
12288
|
if (!isNullOrUndefined(e.count)) {
|
|
12175
12289
|
this.totalRecords = e.count;
|
|
12176
|
-
|
|
12290
|
+
// To overcome the white space issue in last page when records collapsed
|
|
12291
|
+
if (this.parent.isFrozenGrid() && e.count < Object.keys(this.parent.dataSource).length) {
|
|
12292
|
+
var width = this.parent.enableColumnVirtualization ?
|
|
12293
|
+
this.getColumnOffset(this.parent.columns.length - 1) + 'px' : '100%';
|
|
12294
|
+
var height = (this.parent.getRowHeight() * e.count) -
|
|
12295
|
+
(this.parent.getRowHeight() * this.parent.pageSettings.pageSize);
|
|
12296
|
+
getValue('virtualEle', this).setVirtualHeight(height, width);
|
|
12297
|
+
}
|
|
12298
|
+
if (!this.parent.enableColumnVirtualization && !this.parent.isFrozenGrid()) {
|
|
12177
12299
|
getValue('virtualEle', this).setVirtualHeight(this.parent.getRowHeight() * e.count, '100%');
|
|
12178
12300
|
}
|
|
12179
12301
|
}
|
|
@@ -12271,6 +12393,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12271
12393
|
return new Cell(opt);
|
|
12272
12394
|
};
|
|
12273
12395
|
VirtualTreeContentRenderer.prototype.beginEdit = function (e) {
|
|
12396
|
+
this['editedRowIndex'] = e.index;
|
|
12274
12397
|
var selector = '.e-row[data-rowindex="' + e.index + '"]';
|
|
12275
12398
|
var index = this.parent.getContent().querySelector(selector).rowIndex;
|
|
12276
12399
|
var rowData = this.parent.getCurrentViewRecords()[index];
|
|
@@ -12310,8 +12433,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12310
12433
|
};
|
|
12311
12434
|
VirtualTreeContentRenderer.prototype.virtualEditSuccess = function () {
|
|
12312
12435
|
var isAdd = 'isAdd';
|
|
12313
|
-
var content = this.parent.getContent().querySelector('.e-content');
|
|
12314
|
-
if (this[isAdd] && content.querySelector('.e-addedrow')) {
|
|
12436
|
+
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12437
|
+
if (this[isAdd] && content$$1.querySelector('.e-addedrow')) {
|
|
12315
12438
|
this.recordAdded = true;
|
|
12316
12439
|
}
|
|
12317
12440
|
};
|
|
@@ -12325,10 +12448,10 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12325
12448
|
};
|
|
12326
12449
|
VirtualTreeContentRenderer.prototype.restoreNewRow = function () {
|
|
12327
12450
|
var isAdd = 'isAdd';
|
|
12328
|
-
var content = this.parent.getContent().querySelector('.e-content');
|
|
12329
|
-
if (this[isAdd] && !content.querySelector('.e-addedrow')) {
|
|
12451
|
+
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12452
|
+
if (this[isAdd] && !content$$1.querySelector('.e-addedrow')) {
|
|
12330
12453
|
this.parent.isEdit = false;
|
|
12331
|
-
this.parent.addRecord();
|
|
12454
|
+
this.parent.editModule.addRecord(null, this.parent.root.editModule.selectedIndex);
|
|
12332
12455
|
}
|
|
12333
12456
|
};
|
|
12334
12457
|
VirtualTreeContentRenderer.prototype.getData = function (data) {
|
|
@@ -12341,7 +12464,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12341
12464
|
this.parent.notify('get-row-position', addArgs);
|
|
12342
12465
|
this.rowPosition = addArgs.newRowPosition;
|
|
12343
12466
|
this.addRowIndex = addArgs.addRowIndex;
|
|
12344
|
-
this.dataRowIndex =
|
|
12467
|
+
this.dataRowIndex = this.parent.root.editModule.selectedIndex;
|
|
12345
12468
|
}
|
|
12346
12469
|
var actionComplete$$1 = 'actionComplete';
|
|
12347
12470
|
_super.prototype[actionComplete$$1].call(this, args);
|
|
@@ -12363,17 +12486,20 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12363
12486
|
var maxLeft = _this.vgenerator.cOffsets[idx - 1];
|
|
12364
12487
|
x = x > maxLeft ? maxLeft : x; //TODO: This fix horizontal scrollbar jumping issue in column virtualization.
|
|
12365
12488
|
}
|
|
12366
|
-
_this.
|
|
12367
|
-
|
|
12368
|
-
_this.
|
|
12489
|
+
if (!_this.parent.isFrozenGrid()) {
|
|
12490
|
+
_this.virtualEle.adjustTable(x, _this.translateY);
|
|
12491
|
+
if (_this.parent.enableColumnVirtualization) {
|
|
12492
|
+
_this.header.virtualEle.adjustTable(x, 0);
|
|
12493
|
+
}
|
|
12369
12494
|
}
|
|
12370
12495
|
}
|
|
12371
12496
|
};
|
|
12372
12497
|
};
|
|
12373
12498
|
VirtualTreeContentRenderer.prototype.scrollListeners = function (scrollArgs) {
|
|
12499
|
+
this['scrollAfterEdit']();
|
|
12374
12500
|
var info = scrollArgs.sentinel;
|
|
12375
12501
|
var outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
|
|
12376
|
-
var content = this.parent.getContent().querySelector('.e-content');
|
|
12502
|
+
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12377
12503
|
var scrollHeight = outBuffer * this.parent.getRowHeight();
|
|
12378
12504
|
var upScroll = (scrollArgs.offset.top - this.translateY) < 0;
|
|
12379
12505
|
var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) >= scrollHeight;
|
|
@@ -12383,7 +12509,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12383
12509
|
if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
|
|
12384
12510
|
var vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? this.parent.height :
|
|
12385
12511
|
this.parent.element.getBoundingClientRect().height);
|
|
12386
|
-
var index = (~~(content.scrollTop / this.parent.getRowHeight())
|
|
12512
|
+
var index = (~~(content$$1.scrollTop / this.parent.getRowHeight())
|
|
12387
12513
|
+ Math.ceil(vHeight / this.parent.getRowHeight()))
|
|
12388
12514
|
- this.parent.pageSettings.pageSize;
|
|
12389
12515
|
index = (index > 0) ? index : 0;
|
|
@@ -12398,7 +12524,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12398
12524
|
this.endIndex = lastInx;
|
|
12399
12525
|
this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
|
|
12400
12526
|
}
|
|
12401
|
-
if (currentViewData.length && (
|
|
12527
|
+
if (currentViewData.length && (currentViewData[0][indexValue] >= this.parent.pageSettings.pageSize / 2) &&
|
|
12528
|
+
((currentViewData[0][indexValue] - this.startIndex) < (this.parent.pageSettings.pageSize / 2))) {
|
|
12402
12529
|
this.startIndex = currentViewData[0][indexValue] - (this.parent.pageSettings.pageSize / 2);
|
|
12403
12530
|
this.endIndex = this.startIndex + this.parent.pageSettings.pageSize;
|
|
12404
12531
|
}
|
|
@@ -12427,7 +12554,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12427
12554
|
}
|
|
12428
12555
|
}
|
|
12429
12556
|
else if (downScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
|
|
12430
|
-
var nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
|
|
12557
|
+
var nextSetResIndex = ~~(content$$1.scrollTop / this.parent.getRowHeight());
|
|
12431
12558
|
var isLastBlock = (this[selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
|
|
12432
12559
|
if (!isNullOrUndefined(this[selectedRowIndex]) && this[selectedRowIndex] !== -1 &&
|
|
12433
12560
|
nextSetResIndex !== this[selectedRowIndex] && !isLastBlock) {
|
|
@@ -12445,7 +12572,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12445
12572
|
this.startIndex = currentViewData[0][indexValue] + (this.parent.pageSettings.pageSize / 2);
|
|
12446
12573
|
}
|
|
12447
12574
|
if (scrollArgs.offset.top > (this.parent.getRowHeight() * this.totalRecords)) {
|
|
12448
|
-
this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
|
|
12575
|
+
this.translateY = this.getTranslateY(scrollArgs.offset.top, content$$1.getBoundingClientRect().height);
|
|
12449
12576
|
}
|
|
12450
12577
|
else {
|
|
12451
12578
|
if (this.parent.allowRowDragAndDrop) {
|
|
@@ -12463,6 +12590,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12463
12590
|
this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
|
|
12464
12591
|
var page = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
|
|
12465
12592
|
this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
|
|
12593
|
+
this.requestType = 'virtualscroll';
|
|
12466
12594
|
if (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') {
|
|
12467
12595
|
viewInfo.event = viewInfo.event === 'refresh-virtual-block' ? 'model-changed' : viewInfo.event;
|
|
12468
12596
|
}
|
|
@@ -12470,12 +12598,28 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12470
12598
|
}
|
|
12471
12599
|
};
|
|
12472
12600
|
VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
12601
|
+
var isFrozen = this.parent.isFrozenGrid();
|
|
12473
12602
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
12474
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
12603
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || this.parent.isFrozenGrid()) {
|
|
12475
12604
|
if (getValue('isExpandCollapse', e)) {
|
|
12476
12605
|
this.isRemoteExpand = true;
|
|
12477
12606
|
}
|
|
12607
|
+
if (isFrozen && isNullOrUndefined(this.requestType) && getValue('requestTypes', this).indexOf('isFrozen') === -1) {
|
|
12608
|
+
getValue('requestTypes', this).push('isFrozen');
|
|
12609
|
+
this.requestType = 'isFrozen';
|
|
12610
|
+
}
|
|
12478
12611
|
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
12612
|
+
if (getValue('requestTypes', this).indexOf('isFrozen') !== -1) {
|
|
12613
|
+
getValue('requestTypes', this).splice(getValue('requestTypes', this).indexOf('isFrozen'), 1);
|
|
12614
|
+
this.requestType = this.requestType === 'isFrozen' ? undefined : this.requestType;
|
|
12615
|
+
}
|
|
12616
|
+
if (isFrozen && (!this.isExpandCollapse || this.translateY === 0)) {
|
|
12617
|
+
this.translateY = this.translateY < 0 ? 0 : this.translateY;
|
|
12618
|
+
getValue('virtualEle', this).adjustTable(0, this.translateY);
|
|
12619
|
+
}
|
|
12620
|
+
else {
|
|
12621
|
+
this.isExpandCollapse = false;
|
|
12622
|
+
}
|
|
12479
12623
|
}
|
|
12480
12624
|
else {
|
|
12481
12625
|
var info = e.virtualInfo.sentinelInfo && e.virtualInfo.sentinelInfo.axis === 'Y' &&
|
|
@@ -12564,6 +12708,11 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
|
|
|
12564
12708
|
var containerRect = 'containerRect';
|
|
12565
12709
|
_super.prototype[containerRect] = getValue('options', this).container.getBoundingClientRect();
|
|
12566
12710
|
EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
|
|
12711
|
+
if (getValue('options', this).movableContainer) {
|
|
12712
|
+
var movableContainerRect = 'movableContainerRect';
|
|
12713
|
+
_super.prototype[movableContainerRect] = getValue('options', this).movableContainer.getBoundingClientRect();
|
|
12714
|
+
EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
|
|
12715
|
+
}
|
|
12567
12716
|
};
|
|
12568
12717
|
TreeInterSectionObserver.prototype.clear = function () {
|
|
12569
12718
|
this.lastPos = null;
|
|
@@ -12781,6 +12930,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
12781
12930
|
}
|
|
12782
12931
|
}
|
|
12783
12932
|
this.expandCollapseRec = null;
|
|
12933
|
+
startIndex = startIndex < 0 ? 0 : startIndex;
|
|
12784
12934
|
pageingDetails.result = visualData.slice(startIndex, endIndex);
|
|
12785
12935
|
this.prevstartIndex = startIndex;
|
|
12786
12936
|
this.prevendIndex = endIndex;
|
|
@@ -12813,12 +12963,14 @@ var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
|
|
|
12813
12963
|
var parentGrid = getValue('parent', this);
|
|
12814
12964
|
getValue('parent', this).log(['limitation', 'virtual_height'], 'virtualization');
|
|
12815
12965
|
var renderer = getValue('locator', this).getService('rendererFactory');
|
|
12816
|
-
if (parentGrid.
|
|
12966
|
+
if (!parentGrid.isFrozenGrid()) {
|
|
12967
|
+
if (parentGrid.enableColumnVirtualization) {
|
|
12968
|
+
getValue('addRenderer', renderer)
|
|
12969
|
+
.apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
12970
|
+
}
|
|
12817
12971
|
getValue('addRenderer', renderer)
|
|
12818
|
-
.apply(renderer, [RenderType.
|
|
12972
|
+
.apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
12819
12973
|
}
|
|
12820
|
-
getValue('addRenderer', renderer)
|
|
12821
|
-
.apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
12822
12974
|
//renderer.addRenderer(RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this)));
|
|
12823
12975
|
this.ensurePageSize();
|
|
12824
12976
|
};
|
|
@@ -12838,6 +12990,162 @@ var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
|
|
|
12838
12990
|
return TreeVirtual;
|
|
12839
12991
|
}(VirtualScroll));
|
|
12840
12992
|
|
|
12993
|
+
var __extends$16 = (undefined && undefined.__extends) || (function () {
|
|
12994
|
+
var extendStatics = function (d, b) {
|
|
12995
|
+
extendStatics = Object.setPrototypeOf ||
|
|
12996
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
12997
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
12998
|
+
return extendStatics(d, b);
|
|
12999
|
+
};
|
|
13000
|
+
return function (d, b) {
|
|
13001
|
+
extendStatics(d, b);
|
|
13002
|
+
function __() { this.constructor = d; }
|
|
13003
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13004
|
+
};
|
|
13005
|
+
})();
|
|
13006
|
+
/**
|
|
13007
|
+
* VirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
13008
|
+
*
|
|
13009
|
+
* @hidden
|
|
13010
|
+
*/
|
|
13011
|
+
var VirtualTreeFreezeRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13012
|
+
__extends$16(VirtualTreeFreezeRenderer, _super);
|
|
13013
|
+
function VirtualTreeFreezeRenderer(parent, locator) {
|
|
13014
|
+
var _this = _super.call(this, parent, locator) || this;
|
|
13015
|
+
_this.addEventListener();
|
|
13016
|
+
return _this;
|
|
13017
|
+
}
|
|
13018
|
+
/**
|
|
13019
|
+
* @returns {void}
|
|
13020
|
+
* @hidden
|
|
13021
|
+
*/
|
|
13022
|
+
VirtualTreeFreezeRenderer.prototype.renderTable = function () {
|
|
13023
|
+
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
13024
|
+
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
13025
|
+
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
13026
|
+
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
13027
|
+
FreezeContentRender.prototype.renderTable.call(this);
|
|
13028
|
+
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
13029
|
+
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
13030
|
+
var movableCont = this.getMovableContent();
|
|
13031
|
+
var minHeight = this.parent.height;
|
|
13032
|
+
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
|
|
13033
|
+
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
13034
|
+
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
13035
|
+
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
13036
|
+
if (this.parent.enableColumnVirtualization) {
|
|
13037
|
+
this.virtualRenderer.virtualEle.movableContent = this.virtualRenderer.movableContent
|
|
13038
|
+
= this.getPanel().querySelector('.' + movableContent);
|
|
13039
|
+
this.virtualRenderer.virtualEle.renderMovableWrapper(minHeight);
|
|
13040
|
+
this.virtualRenderer.virtualEle.renderMovablePlaceHolder();
|
|
13041
|
+
var tbl = movableCont.querySelector('table');
|
|
13042
|
+
this.virtualRenderer.virtualEle.movableTable = tbl;
|
|
13043
|
+
this.virtualRenderer.virtualEle.movableWrapper.appendChild(tbl);
|
|
13044
|
+
movableCont.appendChild(this.virtualRenderer.virtualEle.movableWrapper);
|
|
13045
|
+
movableCont.appendChild(this.virtualRenderer.virtualEle.movablePlaceholder);
|
|
13046
|
+
}
|
|
13047
|
+
this.virtualRenderer.virtualEle.wrapper.appendChild(this.getFrozenContent());
|
|
13048
|
+
this.virtualRenderer.virtualEle.wrapper.appendChild(movableCont);
|
|
13049
|
+
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
13050
|
+
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
13051
|
+
};
|
|
13052
|
+
/**
|
|
13053
|
+
* @param {HTMLElement} target - specifies the target
|
|
13054
|
+
* @param {DocumentFragment} newChild - specifies the newChild
|
|
13055
|
+
* @param {NotifyArgs} e - specifies the notifyargs
|
|
13056
|
+
* @returns {void}
|
|
13057
|
+
* @hidden
|
|
13058
|
+
*/
|
|
13059
|
+
VirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
13060
|
+
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
13061
|
+
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
13062
|
+
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
13063
|
+
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
13064
|
+
};
|
|
13065
|
+
/**
|
|
13066
|
+
* @param {Object[]} data - specifies the data
|
|
13067
|
+
* @param {NotifyArgs} e - specifies the notifyargs
|
|
13068
|
+
* @returns {Row<Column>[]} returns the row
|
|
13069
|
+
* @hidden
|
|
13070
|
+
*/
|
|
13071
|
+
VirtualTreeFreezeRenderer.prototype.generateRows = function (data, e) {
|
|
13072
|
+
return _super.prototype.generateRows.call(this, data, e);
|
|
13073
|
+
};
|
|
13074
|
+
return VirtualTreeFreezeRenderer;
|
|
13075
|
+
}(VirtualFreezeRenderer));
|
|
13076
|
+
/**
|
|
13077
|
+
* ColumnVirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
13078
|
+
*
|
|
13079
|
+
* @hidden
|
|
13080
|
+
*/
|
|
13081
|
+
var ColumnVirtualTreeFreezeRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13082
|
+
__extends$16(ColumnVirtualTreeFreezeRenderer, _super);
|
|
13083
|
+
function ColumnVirtualTreeFreezeRenderer(parent, locator) {
|
|
13084
|
+
var _this = _super.call(this, parent, locator) || this;
|
|
13085
|
+
_this.serviceLoc = locator;
|
|
13086
|
+
_this.eventListener('on');
|
|
13087
|
+
return _this;
|
|
13088
|
+
}
|
|
13089
|
+
/**
|
|
13090
|
+
* @returns {void}
|
|
13091
|
+
* @hidden
|
|
13092
|
+
*/
|
|
13093
|
+
ColumnVirtualTreeFreezeRenderer.prototype.renderTable = function () {
|
|
13094
|
+
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
13095
|
+
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
13096
|
+
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
13097
|
+
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
13098
|
+
ColumnFreezeContentRenderer.prototype.renderTable.call(this);
|
|
13099
|
+
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
13100
|
+
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
13101
|
+
var frozenRightCont = this.getFrozenRightContent();
|
|
13102
|
+
var frzCont = this.getFrozenContent();
|
|
13103
|
+
var movableCont = this.getMovableContent();
|
|
13104
|
+
if (this.parent.getFrozenMode() === 'Right') {
|
|
13105
|
+
frzCont = frozenRightCont;
|
|
13106
|
+
}
|
|
13107
|
+
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
|
|
13108
|
+
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
13109
|
+
var minHeight = this.parent.height;
|
|
13110
|
+
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
13111
|
+
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
13112
|
+
_super.prototype['renderVirtualFrozenLeft'].call(this, frzCont, movableCont);
|
|
13113
|
+
_super.prototype['renderVirtualFrozenRight'].call(this, frzCont, movableCont);
|
|
13114
|
+
_super.prototype['renderVirtualFrozenLeftRight'].call(this, frzCont, movableCont, frozenRightCont);
|
|
13115
|
+
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
13116
|
+
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
13117
|
+
};
|
|
13118
|
+
ColumnVirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
13119
|
+
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
13120
|
+
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
13121
|
+
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
13122
|
+
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
13123
|
+
};
|
|
13124
|
+
return ColumnVirtualTreeFreezeRenderer;
|
|
13125
|
+
}(ColumnVirtualFreezeRenderer));
|
|
13126
|
+
/**
|
|
13127
|
+
* VirtualTreeFreezeHdrRenderer is used to render the virtual table within the frozen and movable header table
|
|
13128
|
+
*
|
|
13129
|
+
* @hidden
|
|
13130
|
+
*/
|
|
13131
|
+
var VirtualTreeFreezeHdrRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
13132
|
+
__extends$16(VirtualTreeFreezeHdrRenderer, _super);
|
|
13133
|
+
function VirtualTreeFreezeHdrRenderer() {
|
|
13134
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
13135
|
+
}
|
|
13136
|
+
/**
|
|
13137
|
+
* @returns {void}
|
|
13138
|
+
* @hidden
|
|
13139
|
+
*/
|
|
13140
|
+
VirtualTreeFreezeHdrRenderer.prototype.renderTable = function () {
|
|
13141
|
+
_super.prototype.renderTable.call(this);
|
|
13142
|
+
};
|
|
13143
|
+
VirtualTreeFreezeHdrRenderer.prototype.rfshMovable = function () {
|
|
13144
|
+
_super.prototype.rfshMovable.call(this);
|
|
13145
|
+
};
|
|
13146
|
+
return VirtualTreeFreezeHdrRenderer;
|
|
13147
|
+
}(VirtualFreezeHdrRenderer));
|
|
13148
|
+
|
|
12841
13149
|
/**
|
|
12842
13150
|
* TreeGrid Freeze module
|
|
12843
13151
|
*
|
|
@@ -12858,6 +13166,7 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
|
|
|
12858
13166
|
this.parent.on('rowExpandCollapse', this.rowExpandCollapse, this);
|
|
12859
13167
|
this.parent.on('dataBoundArg', this.dataBoundArg, this);
|
|
12860
13168
|
this.parent.grid.on('dblclick', this.dblClickHandler, this);
|
|
13169
|
+
this.parent.grid.on('initial-load', this.instantiateRenderer, this);
|
|
12861
13170
|
};
|
|
12862
13171
|
Freeze$$1.prototype.removeEventListener = function () {
|
|
12863
13172
|
if (this.parent.isDestroyed) {
|
|
@@ -12866,6 +13175,40 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
|
|
|
12866
13175
|
this.parent.off('rowExpandCollapse', this.rowExpandCollapse);
|
|
12867
13176
|
this.parent.off('dataBoundArg', this.dataBoundArg);
|
|
12868
13177
|
this.parent.grid.off('dblclick', this.dblClickHandler);
|
|
13178
|
+
this.parent.grid.off('initial-load', this.instantiateRenderer);
|
|
13179
|
+
};
|
|
13180
|
+
Freeze$$1.prototype.instantiateRenderer = function () {
|
|
13181
|
+
var renderer = getValue('serviceLocator', this.parent.grid).getService('rendererFactory');
|
|
13182
|
+
if (this.parent.getFrozenColumns()) {
|
|
13183
|
+
if (this.parent.enableColumnVirtualization) {
|
|
13184
|
+
getValue('addRenderer', renderer)
|
|
13185
|
+
.apply(renderer, [RenderType.Header, new VirtualTreeFreezeHdrRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13186
|
+
}
|
|
13187
|
+
else {
|
|
13188
|
+
getValue('addRenderer', renderer)
|
|
13189
|
+
.apply(renderer, [RenderType.Header, new FreezeRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13190
|
+
}
|
|
13191
|
+
if (this.parent.enableVirtualization) {
|
|
13192
|
+
getValue('addRenderer', renderer)
|
|
13193
|
+
.apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13194
|
+
}
|
|
13195
|
+
else {
|
|
13196
|
+
getValue('addRenderer', renderer)
|
|
13197
|
+
.apply(renderer, [RenderType.Content, new FreezeContentRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13198
|
+
}
|
|
13199
|
+
}
|
|
13200
|
+
if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
|
|
13201
|
+
getValue('addRenderer', renderer)
|
|
13202
|
+
.apply(renderer, [RenderType.Header, new ColumnFreezeHeaderRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13203
|
+
if (this.parent.enableVirtualization) {
|
|
13204
|
+
getValue('addRenderer', renderer)
|
|
13205
|
+
.apply(renderer, [RenderType.Content, new ColumnVirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13206
|
+
}
|
|
13207
|
+
else {
|
|
13208
|
+
getValue('addRenderer', renderer)
|
|
13209
|
+
.apply(renderer, [RenderType.Content, new ColumnFreezeContentRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
13210
|
+
}
|
|
13211
|
+
}
|
|
12869
13212
|
};
|
|
12870
13213
|
Freeze$$1.prototype.rowExpandCollapse = function (args) {
|
|
12871
13214
|
var movableRows = this.parent.getMovableDataRows();
|
|
@@ -12910,7 +13253,7 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
|
|
|
12910
13253
|
};
|
|
12911
13254
|
Freeze$$1.prototype.dblClickHandler = function (e) {
|
|
12912
13255
|
if (parentsUntil(e.target, 'e-rowcell') &&
|
|
12913
|
-
this.parent.grid.editSettings.allowEditOnDblClick && this.parent.editSettings.mode !== 'Cell') {
|
|
13256
|
+
this.parent.grid.editSettings.allowEditOnDblClick && this.parent.editSettings.mode !== 'Cell' && (!e.target['classList'].contains('e-treegridcollapse') && !e.target['classList'].contains('e-treegridexpand'))) {
|
|
12914
13257
|
this.parent.grid.editModule.startEdit(parentsUntil(e.target, 'e-row'));
|
|
12915
13258
|
}
|
|
12916
13259
|
};
|
|
@@ -13324,5 +13667,5 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13324
13667
|
* Export TreeGrid component
|
|
13325
13668
|
*/
|
|
13326
13669
|
|
|
13327
|
-
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 };
|
|
13670
|
+
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 };
|
|
13328
13671
|
//# sourceMappingURL=ej2-treegrid.es5.js.map
|