@syncfusion/ej2-treegrid 22.2.9 → 23.1.39
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 +15 -50
- package/dist/ej2-treegrid.min.js +3 -3
- package/dist/ej2-treegrid.umd.min.js +3 -3
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +234 -328
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +233 -351
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +3 -3
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +10 -10
- package/src/treegrid/actions/batch-edit.js +2 -28
- package/src/treegrid/actions/crud-actions.js +1 -1
- package/src/treegrid/actions/edit.js +6 -52
- package/src/treegrid/actions/excel-export.d.ts +2 -2
- package/src/treegrid/actions/freeze-column.d.ts +0 -1
- package/src/treegrid/actions/freeze-column.js +4 -36
- package/src/treegrid/actions/infinite-scroll.js +8 -8
- package/src/treegrid/actions/pdf-export.d.ts +2 -2
- package/src/treegrid/actions/rowdragdrop.js +3 -1
- package/src/treegrid/actions/selection.js +1 -1
- package/src/treegrid/actions/virtual-scroll.js +6 -8
- package/src/treegrid/base/data.js +20 -4
- package/src/treegrid/base/treegrid-model.d.ts +8 -1
- package/src/treegrid/base/treegrid.d.ts +69 -1
- package/src/treegrid/base/treegrid.js +172 -34
- package/src/treegrid/models/column.d.ts +1 -0
- package/src/treegrid/renderer/virtual-row-model-generator.js +4 -4
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +0 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +9 -21
- package/styles/material-dark.css +0 -1
- package/styles/material.css +0 -1
- package/styles/material3-dark.css +0 -1
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +0 -1
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +0 -1
- package/styles/tailwind.css +0 -1
- package/styles/treegrid/bootstrap-dark.scss +1 -1
- package/styles/treegrid/bootstrap.scss +1 -1
- package/styles/treegrid/bootstrap4.scss +1 -1
- package/styles/treegrid/bootstrap5-dark.scss +1 -1
- package/styles/treegrid/bootstrap5.scss +1 -1
- package/styles/treegrid/fabric-dark.scss +1 -1
- package/styles/treegrid/fabric.scss +1 -1
- package/styles/treegrid/fluent-dark.scss +1 -1
- package/styles/treegrid/fluent.scss +1 -1
- package/styles/treegrid/highcontrast-light.scss +1 -1
- package/styles/treegrid/highcontrast.scss +1 -1
- package/styles/treegrid/material-dark.css +0 -1
- package/styles/treegrid/material-dark.scss +1 -1
- package/styles/treegrid/material.css +0 -1
- package/styles/treegrid/material.scss +1 -1
- package/styles/treegrid/material3-dark.css +0 -1
- package/styles/treegrid/material3-dark.scss +1 -1
- package/styles/treegrid/material3.css +0 -1
- package/styles/treegrid/material3.scss +1 -1
- package/styles/treegrid/tailwind-dark.css +0 -1
- package/styles/treegrid/tailwind-dark.scss +1 -1
- package/styles/treegrid/tailwind.css +0 -1
- package/styles/treegrid/tailwind.scss +1 -1
- package/src/treegrid/renderer/virtual-tree-freeze-render.d.ts +0 -59
- package/src/treegrid/renderer/virtual-tree-freeze-render.js +0 -163
package/dist/global/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
4
|
-
* Copyright Syncfusion Inc. 2001 -
|
|
3
|
+
* version : 23.1.39
|
|
4
|
+
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-treegrid@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-treegrid@
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@23.1.36",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-sZERtk+Bjhx0p0/HsmIMLQyckbQV/3nM52E2sEaaOlzPms935IN91FHAZXpK0VkaXFakyjmnSIVeYSdzAW2B9g==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treegrid",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"/@syncfusion/ej2-react-treegrid",
|
|
25
25
|
"/@syncfusion/ej2-vue-treegrid"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-23.1.36.tgz",
|
|
28
|
+
"_shasum": "4a0aaf6fc7b7bd862c6f9f0afac5190b9e6a2d9c",
|
|
29
29
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
|
-
"_where": "/jenkins/workspace/elease-
|
|
30
|
+
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
31
31
|
"author": {
|
|
32
32
|
"name": "Syncfusion Inc."
|
|
33
33
|
},
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~
|
|
40
|
-
"@syncfusion/ej2-data": "~
|
|
41
|
-
"@syncfusion/ej2-grids": "~
|
|
42
|
-
"@syncfusion/ej2-popups": "~
|
|
39
|
+
"@syncfusion/ej2-base": "~23.1.38",
|
|
40
|
+
"@syncfusion/ej2-data": "~23.1.36",
|
|
41
|
+
"@syncfusion/ej2-grids": "~23.1.39",
|
|
42
|
+
"@syncfusion/ej2-popups": "~23.1.38"
|
|
43
43
|
},
|
|
44
44
|
"deprecated": false,
|
|
45
45
|
"description": "Essential JS 2 TreeGrid Component",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"url": "git+https://github.com/syncfusion/ej2-treegrid.git"
|
|
67
67
|
},
|
|
68
68
|
"typings": "index.d.ts",
|
|
69
|
-
"version": "
|
|
69
|
+
"version": "23.1.39",
|
|
70
70
|
"sideEffects": false
|
|
71
71
|
}
|
|
@@ -108,21 +108,7 @@ var BatchEdit = /** @class */ (function () {
|
|
|
108
108
|
};
|
|
109
109
|
BatchEdit.prototype.cellSaved = function (args) {
|
|
110
110
|
var actualCellIndex = args.column.index;
|
|
111
|
-
|
|
112
|
-
if (frozenCols && args.columnObject.index > frozenCols) {
|
|
113
|
-
actualCellIndex = actualCellIndex + frozenCols;
|
|
114
|
-
}
|
|
115
|
-
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
116
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
117
|
-
if (freeze) {
|
|
118
|
-
var colCount = this.parent.getFrozenLeftColumnsCount() + actualCellIndex;
|
|
119
|
-
if (colCount === this.parent.treeColumnIndex) {
|
|
120
|
-
this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
|
|
121
|
-
column: this.parent.grid.getColumnByIndex(args.column.index)
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
else if (actualCellIndex === this.parent.treeColumnIndex) {
|
|
111
|
+
if (actualCellIndex === this.parent.treeColumnIndex) {
|
|
126
112
|
this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
|
|
127
113
|
column: this.parent.grid.getColumnByIndex(args.column.index)
|
|
128
114
|
});
|
|
@@ -326,7 +312,7 @@ var BatchEdit = /** @class */ (function () {
|
|
|
326
312
|
for (var i = firstChildIndex; i <= totalCount; i++) {
|
|
327
313
|
row.push(this.parent.grid.getDataRows()[parseInt(i.toString(), 10)]);
|
|
328
314
|
if (this.parent.frozenRows || this.parent.frozenColumns || this.parent.getFrozenColumns()) {
|
|
329
|
-
row.push(this.parent.grid.
|
|
315
|
+
row.push(this.parent.grid.getHeaderContent()[parseInt(i.toString(), 10)]);
|
|
330
316
|
}
|
|
331
317
|
}
|
|
332
318
|
}
|
|
@@ -358,18 +344,6 @@ var BatchEdit = /** @class */ (function () {
|
|
|
358
344
|
for (var i = 0; i < rows.length; i++) {
|
|
359
345
|
rows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
360
346
|
}
|
|
361
|
-
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
362
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
363
|
-
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns || freeze) {
|
|
364
|
-
var mRows = this.parent.grid.getMovableDataRows();
|
|
365
|
-
var freezeRightRows = this.parent.grid.getFrozenRightDataRows();
|
|
366
|
-
for (var i = 0; i < mRows.length; i++) {
|
|
367
|
-
mRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
368
|
-
if (freeze) {
|
|
369
|
-
freezeRightRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
347
|
};
|
|
374
348
|
BatchEdit.prototype.updateChildCount = function (records) {
|
|
375
349
|
var primaryKey = this.parent.grid.getPrimaryKeyFieldNames()[0];
|
|
@@ -386,7 +386,7 @@ export function updateParentRow(key, record, action, control, isSelfReference, c
|
|
|
386
386
|
}
|
|
387
387
|
var movableRow = void 0;
|
|
388
388
|
if (control.frozenRows || control.getFrozenColumns()) {
|
|
389
|
-
movableRow = control.
|
|
389
|
+
movableRow = control.getRowByIndex(index_1);
|
|
390
390
|
}
|
|
391
391
|
if (!control.enableVirtualization && !isNullOrUndefined(row) || !isNullOrUndefined(movableRow)) {
|
|
392
392
|
var index_2 = control.treeColumnIndex;
|
|
@@ -190,8 +190,8 @@ var Edit = /** @class */ (function () {
|
|
|
190
190
|
currentData.splice(newRowObjectIndex, 0, newRecord);
|
|
191
191
|
this.updateInfiniteCurrentViewData(newRecord, this.addRowIndex);
|
|
192
192
|
}
|
|
193
|
-
var movableRows = this.parent.grid.
|
|
194
|
-
var movableRowsObject = this.parent.grid.
|
|
193
|
+
var movableRows = this.parent.grid.getRows();
|
|
194
|
+
var movableRowsObject = this.parent.grid.getRowsObject();
|
|
195
195
|
var isCache = this.parent.infiniteScrollSettings.enableCache;
|
|
196
196
|
if (!isCache) {
|
|
197
197
|
resetRowIndex(this.parent.grid, this.parent.grid.getRowsObject(), this.parent.grid.getRows(), 0);
|
|
@@ -398,16 +398,13 @@ var Edit = /** @class */ (function () {
|
|
|
398
398
|
if (this.parent.getRows().indexOf(row_1) !== -1) {
|
|
399
399
|
rowIndex_1 = this.parent.getRows().indexOf(row_1);
|
|
400
400
|
}
|
|
401
|
-
else if (this.parent.getFrozenRightRows().indexOf(row_1) !== -1) {
|
|
402
|
-
rowIndex_1 = this.parent.getFrozenRightRows().indexOf(row_1);
|
|
403
|
-
}
|
|
404
401
|
else {
|
|
405
|
-
rowIndex_1 = this.parent.
|
|
402
|
+
rowIndex_1 = this.parent.getRows().indexOf(row_1);
|
|
406
403
|
}
|
|
407
404
|
}
|
|
408
405
|
else {
|
|
409
406
|
rowIndex_1 = (this.parent.getRows().indexOf(row_1) === -1 && (this.parent.getFrozenColumns() > 0)) ?
|
|
410
|
-
this.parent.grid.
|
|
407
|
+
this.parent.grid.getRows().indexOf(row_1) : this.parent.getRows().indexOf(row_1);
|
|
411
408
|
}
|
|
412
409
|
}
|
|
413
410
|
var arg = {};
|
|
@@ -463,7 +460,6 @@ var Edit = /** @class */ (function () {
|
|
|
463
460
|
}
|
|
464
461
|
};
|
|
465
462
|
Edit.prototype.afterCellSave = function (args, row, rowIndex) {
|
|
466
|
-
var mRow;
|
|
467
463
|
if (this.parent.grid.aggregateModule) {
|
|
468
464
|
this.parent.grid.aggregateModule.refresh(args.rowData);
|
|
469
465
|
}
|
|
@@ -474,31 +470,6 @@ var Edit = /** @class */ (function () {
|
|
|
474
470
|
this.isOnBatch = false;
|
|
475
471
|
}
|
|
476
472
|
this.enableToolbarItems('save');
|
|
477
|
-
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
478
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
479
|
-
if (freeze) {
|
|
480
|
-
if (args.cell.closest('.e-frozen-left-header') || args.cell.closest('.e-frozen-left-content')) {
|
|
481
|
-
mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
|
|
482
|
-
}
|
|
483
|
-
else if (args.cell.closest('.e-movableheader') || args.cell.closest('.e-movablecontent')) {
|
|
484
|
-
mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
|
|
485
|
-
}
|
|
486
|
-
else {
|
|
487
|
-
mRow = this.parent.grid.getFrozenRightRows()[parseInt(rowIndex.toString(), 10)];
|
|
488
|
-
}
|
|
489
|
-
removeClass([mRow], ['e-editedrow', 'e-batchrow']);
|
|
490
|
-
removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
491
|
-
}
|
|
492
|
-
else if (this.parent.getFrozenColumns() > 0) {
|
|
493
|
-
if (args.cell.closest('.e-frozenheader') || args.cell.closest('.e-frozencontent')) {
|
|
494
|
-
mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
|
|
498
|
-
}
|
|
499
|
-
removeClass([mRow], ['e-editedrow', 'e-batchrow']);
|
|
500
|
-
removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
501
|
-
}
|
|
502
473
|
removeClass([row], ['e-editedrow', 'e-batchrow']);
|
|
503
474
|
removeClass(row.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
|
|
504
475
|
if (this.parent['isCellSaveFocus'] !== false) {
|
|
@@ -684,23 +655,6 @@ var Edit = /** @class */ (function () {
|
|
|
684
655
|
this.parent.grid.contentModule["" + r].splice(0, 1);
|
|
685
656
|
this.parent.grid.contentModule["" + r].splice(rowObjectIndex, 0, newRowObject);
|
|
686
657
|
}
|
|
687
|
-
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
688
|
-
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
689
|
-
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns || freeze) {
|
|
690
|
-
var movableRows = this.parent.getMovableDataRows();
|
|
691
|
-
var frows = 'freezeRows';
|
|
692
|
-
var newFreezeRowObject = this.parent.grid.getRowsObject()[0];
|
|
693
|
-
movableRows[index + 1]["" + position](movableRows[0]);
|
|
694
|
-
if (freeze) {
|
|
695
|
-
var rightFrozenRows = this.parent.getFrozenRightDataRows();
|
|
696
|
-
rightFrozenRows[index + 1]["" + position](rightFrozenRows[0]);
|
|
697
|
-
}
|
|
698
|
-
if (this.parent.editSettings.mode === 'Batch') {
|
|
699
|
-
this.parent.grid.contentModule["" + frows].splice(0, 1);
|
|
700
|
-
this.parent.grid.contentModule["" + frows].splice(rowObjectIndex, 0, newFreezeRowObject);
|
|
701
|
-
}
|
|
702
|
-
setValue('batchIndex', index + 1, this.batchEditModule);
|
|
703
|
-
}
|
|
704
658
|
if (this.parent.editSettings.mode === 'Row' || this.parent.editSettings.mode === 'Cell') {
|
|
705
659
|
var errors = this.parent.grid.getContentTable().querySelectorAll('.e-griderror');
|
|
706
660
|
for (var i = 0; i < errors.length; i++) {
|
|
@@ -1073,8 +1027,8 @@ var Edit = /** @class */ (function () {
|
|
|
1073
1027
|
|| (this.parent.editSettings.mode === 'Batch' && e.args.requestType.toString() === 'batchsave'))) {
|
|
1074
1028
|
this.updateIndex(this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
|
|
1075
1029
|
if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns) {
|
|
1076
|
-
if (this.parent.grid.dataSource.length === this.parent.
|
|
1077
|
-
this.updateIndex(this.parent.grid.dataSource, this.parent.
|
|
1030
|
+
if (this.parent.grid.dataSource.length === this.parent.getDataRows().length) {
|
|
1031
|
+
this.updateIndex(this.parent.grid.dataSource, this.parent.getDataRows(), this.parent.getCurrentViewRecords());
|
|
1078
1032
|
}
|
|
1079
1033
|
}
|
|
1080
1034
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TreeGrid } from '../base/treegrid';
|
|
2
2
|
import { ExcelExportProperties } from '@syncfusion/ej2-grids';
|
|
3
|
-
import {
|
|
3
|
+
import { Fetch } from '@syncfusion/ej2-base';
|
|
4
4
|
import { Query } from '@syncfusion/ej2-data';
|
|
5
5
|
/**
|
|
6
6
|
* TreeGrid Excel Export module
|
|
@@ -44,7 +44,7 @@ export declare class ExcelExport {
|
|
|
44
44
|
private updateExcelResultModel;
|
|
45
45
|
Map(excelExportProperties?: ExcelExportProperties, isMultipleExport?: boolean, workbook?: any, isBlob?: boolean, isCsv?: boolean): Promise<Object>;
|
|
46
46
|
protected generateQuery(query: Query, property?: ExcelExportProperties): Query;
|
|
47
|
-
protected manipulateExportProperties(property?: ExcelExportProperties, dtSrc?: Object, queryResult?:
|
|
47
|
+
protected manipulateExportProperties(property?: ExcelExportProperties, dtSrc?: Object, queryResult?: Fetch): Object;
|
|
48
48
|
/**
|
|
49
49
|
* TreeGrid Excel Export cell modifier
|
|
50
50
|
*
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parentsUntil } from '@syncfusion/ej2-grids';
|
|
2
2
|
import { Grid, Freeze as FreezeColumn } from '@syncfusion/ej2-grids';
|
|
3
|
-
import { addClass,
|
|
4
|
-
import { ColumnVirtualTreeFreezeRenderer, VirtualTreeFreezeRenderer, VirtualTreeFreezeHdrRenderer } from '../renderer/virtual-tree-freeze-render';
|
|
3
|
+
import { addClass, isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
5
4
|
/**
|
|
6
5
|
* TreeGrid Freeze module
|
|
7
6
|
*
|
|
@@ -22,7 +21,6 @@ var Freeze = /** @class */ (function () {
|
|
|
22
21
|
this.parent.on('rowExpandCollapse', this.rowExpandCollapse, this);
|
|
23
22
|
this.parent.on('dataBoundArg', this.dataBoundArg, this);
|
|
24
23
|
this.parent.grid.on('dblclick', this.dblClickHandler, this);
|
|
25
|
-
this.parent.grid.on('initial-load', this.instantiateRenderer, this);
|
|
26
24
|
};
|
|
27
25
|
Freeze.prototype.removeEventListener = function () {
|
|
28
26
|
if (this.parent.isDestroyed) {
|
|
@@ -31,46 +29,16 @@ var Freeze = /** @class */ (function () {
|
|
|
31
29
|
this.parent.off('rowExpandCollapse', this.rowExpandCollapse);
|
|
32
30
|
this.parent.off('dataBoundArg', this.dataBoundArg);
|
|
33
31
|
this.parent.grid.off('dblclick', this.dblClickHandler);
|
|
34
|
-
this.parent.grid.off('initial-load', this.instantiateRenderer);
|
|
35
|
-
};
|
|
36
|
-
Freeze.prototype.instantiateRenderer = function () {
|
|
37
|
-
var renderer = getValue('serviceLocator', this.parent.grid).getService('rendererFactory');
|
|
38
|
-
if (this.parent.getFrozenColumns()) {
|
|
39
|
-
if (this.parent.enableColumnVirtualization) {
|
|
40
|
-
getValue('addRenderer', renderer)
|
|
41
|
-
.apply(renderer, [RenderType.Header, new VirtualTreeFreezeHdrRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
getValue('addRenderer', renderer)
|
|
45
|
-
.apply(renderer, [RenderType.Header, new FreezeRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
46
|
-
}
|
|
47
|
-
if (this.parent.enableVirtualization) {
|
|
48
|
-
getValue('addRenderer', renderer)
|
|
49
|
-
.apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
|
|
53
|
-
getValue('addRenderer', renderer)
|
|
54
|
-
.apply(renderer, [RenderType.Header, new ColumnFreezeHeaderRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
55
|
-
if (this.parent.enableVirtualization) {
|
|
56
|
-
getValue('addRenderer', renderer)
|
|
57
|
-
.apply(renderer, [RenderType.Content, new ColumnVirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
getValue('addRenderer', renderer)
|
|
61
|
-
.apply(renderer, [RenderType.Content, new ColumnFreezeContentRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
32
|
};
|
|
65
33
|
Freeze.prototype.rowExpandCollapse = function (args) {
|
|
66
|
-
var movableRows = this.parent.
|
|
34
|
+
var movableRows = this.parent.getDataRows();
|
|
67
35
|
var frozenrows = this.parent.getRows();
|
|
68
36
|
var rows;
|
|
69
37
|
var frozenRightRows;
|
|
70
38
|
var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
|
|
71
39
|
this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
|
|
72
40
|
if (freeze) {
|
|
73
|
-
frozenRightRows = this.parent.
|
|
41
|
+
frozenRightRows = this.parent.getRows().filter(function (e) {
|
|
74
42
|
return e.querySelector('.e-gridrowindex' + args.record.index + 'level' + (args.record.level + 1));
|
|
75
43
|
});
|
|
76
44
|
}
|
|
@@ -102,7 +102,7 @@ var InfiniteScroll = /** @class */ (function () {
|
|
|
102
102
|
var updateIndex = 'updateIndex';
|
|
103
103
|
this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
|
|
104
104
|
if (this.parent.getFrozenColumns()) {
|
|
105
|
-
this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.
|
|
105
|
+
this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getDataRows(), this.parent.getCurrentViewRecords());
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
};
|
|
@@ -223,8 +223,8 @@ var InfiniteScroll = /** @class */ (function () {
|
|
|
223
223
|
var keyField = this.parent.grid.getPrimaryKeyFieldNames()[0];
|
|
224
224
|
this.removeRows(rowElms, rows, data, keyField, true);
|
|
225
225
|
if (this.parent.getFrozenColumns() > 0) {
|
|
226
|
-
var mRows = this.parent.grid.
|
|
227
|
-
var mRowElms = this.parent.grid.
|
|
226
|
+
var mRows = this.parent.grid.getRowsObject();
|
|
227
|
+
var mRowElms = this.parent.grid.getRows();
|
|
228
228
|
this.removeRows(mRowElms, mRows, data, keyField);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
@@ -270,23 +270,23 @@ var InfiniteScroll = /** @class */ (function () {
|
|
|
270
270
|
var rowRenderer = new RowRenderer(serviceLocator, null, this.parent.grid);
|
|
271
271
|
var tbody;
|
|
272
272
|
var currentData = this.parent.getCurrentViewRecords();
|
|
273
|
-
var currentRows = eventArgs.isMovable ? this.parent.grid.
|
|
273
|
+
var currentRows = eventArgs.isMovable ? this.parent.grid.getRows()
|
|
274
274
|
: this.parent.grid.getDataRows();
|
|
275
275
|
if (eventArgs.isFrozenRight) {
|
|
276
276
|
tbody = this.parent.element.querySelector('.e-frozen-right-content').querySelector('tbody');
|
|
277
277
|
}
|
|
278
278
|
else {
|
|
279
279
|
tbody = !this.parent.grid.isFrozenGrid() ? this.parent.getContent().querySelector('tbody') : eventArgs.isMovable
|
|
280
|
-
? this.parent.grid.
|
|
281
|
-
: this.parent.grid.
|
|
280
|
+
? this.parent.grid.getContent().querySelector('tbody')
|
|
281
|
+
: this.parent.grid.getContent().querySelector('tbody');
|
|
282
282
|
}
|
|
283
283
|
if (this.parent.frozenRows) {
|
|
284
284
|
tbody = eventArgs.isFrozenRows && this.parent.grid.infiniteScrollModule.requestType !== 'add'
|
|
285
285
|
|| !eventArgs.isFrozenRows && this.parent.grid.infiniteScrollModule.requestType === 'add'
|
|
286
286
|
? !this.parent.grid.isFrozenGrid() ? this.parent.getHeaderContent().querySelector('tbody')
|
|
287
|
-
: eventArgs.isMovable ? this.parent.grid.
|
|
287
|
+
: eventArgs.isMovable ? this.parent.grid.getHeaderContent().querySelector('tbody')
|
|
288
288
|
: eventArgs.isFrozenRight ? this.parent.element.querySelector('.e-frozen-right-header').querySelector('tbody')
|
|
289
|
-
: this.parent.grid.
|
|
289
|
+
: this.parent.grid.getHeaderContent().querySelector('tbody') : tbody;
|
|
290
290
|
}
|
|
291
291
|
var position;
|
|
292
292
|
var addRowIndex = 'addRowIndex';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TreeGrid } from '../base/treegrid';
|
|
2
2
|
import { PdfExportProperties } from '@syncfusion/ej2-grids';
|
|
3
|
-
import {
|
|
3
|
+
import { Fetch } from '@syncfusion/ej2-base';
|
|
4
4
|
import { Query } from '@syncfusion/ej2-data';
|
|
5
5
|
/**
|
|
6
6
|
* TreeGrid PDF Export module
|
|
@@ -43,7 +43,7 @@ export declare class PdfExport {
|
|
|
43
43
|
private updatePdfResultModel;
|
|
44
44
|
Map(pdfExportProperties?: PdfExportProperties, isMultipleExport?: boolean, pdfDoc?: Object, isBlob?: boolean): Promise<Object>;
|
|
45
45
|
protected generateQuery(query: Query, prop?: PdfExportProperties): Query;
|
|
46
|
-
protected manipulatePdfProperties(prop?: PdfExportProperties, dtSrc?: Object, queryResult?:
|
|
46
|
+
protected manipulatePdfProperties(prop?: PdfExportProperties, dtSrc?: Object, queryResult?: Fetch): Object;
|
|
47
47
|
/**
|
|
48
48
|
* TreeGrid PDF Export cell modifier
|
|
49
49
|
*
|
|
@@ -709,6 +709,9 @@ var RowDD = /** @class */ (function () {
|
|
|
709
709
|
if (!tObj.rowDropSettings.targetID && this.canDrop) {
|
|
710
710
|
tObj.rowDragAndDropModule.updateIcon(args.rows, rowIdx, args);
|
|
711
711
|
}
|
|
712
|
+
if (isNullOrUndefined(tObj.rowDropSettings.targetID) && !this.canDrop) {
|
|
713
|
+
this.removetopOrBottomBorder();
|
|
714
|
+
}
|
|
712
715
|
if (tObj.rowDropSettings.targetID) {
|
|
713
716
|
var dropElement = parentsUntil(args.target, 'e-treegrid');
|
|
714
717
|
if (dropElement && dropElement.id === this.parent.rowDropSettings.targetID) {
|
|
@@ -732,7 +735,6 @@ var RowDD = /** @class */ (function () {
|
|
|
732
735
|
this.dropPosition = 'Invalid';
|
|
733
736
|
}
|
|
734
737
|
setValue('dropPosition', this.dropPosition, args);
|
|
735
|
-
args.dropIndex = args.dropIndex === args.fromIndex ? this.getTargetIdx(args.target.parentElement) : args.dropIndex;
|
|
736
738
|
tObj.trigger(events.rowDrop, args);
|
|
737
739
|
if (!args.cancel) {
|
|
738
740
|
if (!isCountRequired(this.parent)) {
|
|
@@ -366,7 +366,7 @@ var Selection = /** @class */ (function () {
|
|
|
366
366
|
if (recordIndex > -1) {
|
|
367
367
|
var movableTr = void 0;
|
|
368
368
|
if (this.parent.frozenRows || this.parent.getFrozenColumns()) {
|
|
369
|
-
movableTr = this.parent.
|
|
369
|
+
movableTr = this.parent.getDataRows()[parseInt(recordIndex.toString(), 10)];
|
|
370
370
|
}
|
|
371
371
|
checkbox = tr.querySelectorAll('.e-frame')[0] ? tr.querySelectorAll('.e-frame')[0]
|
|
372
372
|
: movableTr.querySelectorAll('.e-frame')[0];
|
|
@@ -106,6 +106,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
106
106
|
this.parent.grid.notify(events.indexModifier, counts);
|
|
107
107
|
var startIndex = counts.startIndex;
|
|
108
108
|
var endIndex = counts.endIndex;
|
|
109
|
+
pageingDetails.count = visualData.length;
|
|
109
110
|
if (startIndex === -1 && endIndex === -1) {
|
|
110
111
|
var query = new Query();
|
|
111
112
|
var size = this.parent.grid.pageSettings.pageSize;
|
|
@@ -124,7 +125,7 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
124
125
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
125
126
|
this.parent.grid.notify(events.virtualActionArgs, { setTop: true });
|
|
126
127
|
}
|
|
127
|
-
if ((requestType === 'save' &&
|
|
128
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
128
129
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
129
130
|
endIndex = counts.count;
|
|
130
131
|
this.parent['isAddedFromGantt'] = false;
|
|
@@ -198,15 +199,12 @@ var TreeVirtual = /** @class */ (function (_super) {
|
|
|
198
199
|
var parentGrid = getValue('parent', this);
|
|
199
200
|
getValue('parent', this).log(['limitation', 'virtual_height'], 'virtualization');
|
|
200
201
|
var renderer = getValue('locator', this).getService('rendererFactory');
|
|
201
|
-
if (
|
|
202
|
-
if (parentGrid.enableColumnVirtualization) {
|
|
203
|
-
getValue('addRenderer', renderer)
|
|
204
|
-
.apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
205
|
-
}
|
|
202
|
+
if (parentGrid.enableColumnVirtualization) {
|
|
206
203
|
getValue('addRenderer', renderer)
|
|
207
|
-
.apply(renderer, [RenderType.
|
|
204
|
+
.apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
208
205
|
}
|
|
209
|
-
|
|
206
|
+
getValue('addRenderer', renderer)
|
|
207
|
+
.apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
|
|
210
208
|
this.ensurePageSize();
|
|
211
209
|
};
|
|
212
210
|
TreeVirtual.prototype.ensurePageSize = function () {
|
|
@@ -100,9 +100,13 @@ var DataManipulation = /** @class */ (function () {
|
|
|
100
100
|
qry.isCountRequired = true;
|
|
101
101
|
dm.executeQuery(qry).then(function (e) {
|
|
102
102
|
_this.parentItems = DataUtil.distinct(e.result, _this.parent.parentIdMapping, false);
|
|
103
|
-
var req
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
var req;
|
|
104
|
+
if (e.result) {
|
|
105
|
+
req = 0;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
req = 1;
|
|
109
|
+
}
|
|
106
110
|
if (req === 0) {
|
|
107
111
|
setValue('grid.contentModule.isLoaded', true, _this.parent);
|
|
108
112
|
if (!isNullOrUndefined(_this.zerothLevelData)) {
|
|
@@ -362,7 +366,19 @@ var DataManipulation = /** @class */ (function () {
|
|
|
362
366
|
var remoteCollapsedData = 'remoteCollapsedData';
|
|
363
367
|
var level = 'level';
|
|
364
368
|
var datas = _this.parent.grid.currentViewData.slice();
|
|
365
|
-
var inx
|
|
369
|
+
var inx;
|
|
370
|
+
var idMapping = _this.parent.idMapping;
|
|
371
|
+
if (_this.parent['isGantt'] && !_this.parent.loadChildOnDemand && _this.parent.hasChildMapping) {
|
|
372
|
+
for (var i = 0; i < _this.parent.grid.currentViewData.length; i++) {
|
|
373
|
+
if (rowDetails.record[idMapping] === _this.parent.grid.currentViewData[i][idMapping]) {
|
|
374
|
+
inx = i;
|
|
375
|
+
break;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
inx = datas.indexOf(rowDetails.record);
|
|
381
|
+
}
|
|
366
382
|
if (_this.parent.enableVirtualization && (rowDetails.action === 'collapse' || rowDetails.action === 'remoteExpand')) {
|
|
367
383
|
datas = [];
|
|
368
384
|
for (var i = 0; i < inx; i++) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, addClass, createElement, EventHandler, isNullOrUndefined,
|
|
1
|
+
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Fetch, ModuleDeclaration, extend, merge, SanitizeHtmlHelper} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, getNumberFormat } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { ActionEventArgs, TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectingEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties } from './interface';import { DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';import * as literals from '../base/constant';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -203,6 +203,13 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
203
203
|
*/
|
|
204
204
|
rowDropSettings?: RowDropSettingsModel;
|
|
205
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Defines the currencyCode format of the Tree Grid columns
|
|
208
|
+
*
|
|
209
|
+
* @private
|
|
210
|
+
*/
|
|
211
|
+
currencyCode?: string;
|
|
212
|
+
|
|
206
213
|
/**
|
|
207
214
|
* @hidden
|
|
208
215
|
* It used to render pager template
|