@syncfusion/ej2-treegrid 20.1.55 → 20.1.56-97113
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/.eslintrc.json +16 -1
- package/CHANGELOG.md +15 -32
- package/README.md +64 -51
- package/dist/ej2-treegrid.min.js +1 -0
- package/dist/ej2-treegrid.umd.min.js +1 -10
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +2046 -1076
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +2131 -1113
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +1 -10
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/helpers/e2e/index.js +8 -6
- package/helpers/e2e/treegridhelper.js +82 -65
- package/package.json +64 -64
- package/src/treegrid/actions/batch-edit.js +115 -87
- package/src/treegrid/actions/clipboard.d.ts +3 -2
- package/src/treegrid/actions/clipboard.js +37 -35
- package/src/treegrid/actions/context-menu.js +53 -1
- package/src/treegrid/actions/crud-actions.js +67 -56
- package/src/treegrid/actions/detail-row.js +7 -7
- package/src/treegrid/actions/edit.d.ts +1 -0
- package/src/treegrid/actions/edit.js +168 -115
- package/src/treegrid/actions/excel-export.js +2 -2
- package/src/treegrid/actions/filter.js +13 -16
- package/src/treegrid/actions/freeze-column.d.ts +1 -0
- package/src/treegrid/actions/freeze-column.js +48 -11
- package/src/treegrid/actions/infinite-scroll.js +25 -22
- package/src/treegrid/actions/logger.js +10 -10
- package/src/treegrid/actions/page.d.ts +1 -0
- package/src/treegrid/actions/page.js +21 -8
- package/src/treegrid/actions/reorder.js +2 -2
- package/src/treegrid/actions/rowdragdrop.js +142 -86
- package/src/treegrid/actions/selection.d.ts +1 -0
- package/src/treegrid/actions/selection.js +71 -39
- package/src/treegrid/actions/sort.js +17 -5
- package/src/treegrid/actions/summary.js +24 -24
- package/src/treegrid/actions/toolbar.js +45 -43
- package/src/treegrid/actions/virtual-scroll.js +7 -4
- package/src/treegrid/base/constant.d.ts +30 -0
- package/src/treegrid/base/constant.js +30 -0
- package/src/treegrid/base/data.d.ts +1 -0
- package/src/treegrid/base/data.js +257 -57
- package/src/treegrid/base/treegrid-model.d.ts +50 -34
- package/src/treegrid/base/treegrid.d.ts +57 -35
- package/src/treegrid/base/treegrid.js +363 -200
- package/src/treegrid/enum.d.ts +8 -2
- package/src/treegrid/enum.js +2 -0
- package/src/treegrid/models/column.d.ts +6 -6
- package/src/treegrid/models/column.js +9 -9
- package/src/treegrid/models/index.d.ts +2 -0
- package/src/treegrid/models/index.js +1 -0
- package/src/treegrid/models/loading-indicator-model.d.ts +20 -0
- package/src/treegrid/models/loading-indicator.d.ts +17 -0
- package/src/treegrid/models/loading-indicator.js +34 -0
- package/src/treegrid/renderer/render.d.ts +4 -4
- package/src/treegrid/renderer/render.js +33 -24
- package/src/treegrid/renderer/virtual-row-model-generator.js +15 -6
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +5 -2
- package/src/treegrid/renderer/virtual-tree-content-render.js +224 -106
- package/src/treegrid/renderer/virtual-tree-freeze-render.d.ts +59 -0
- package/src/treegrid/renderer/virtual-tree-freeze-render.js +163 -0
- package/src/treegrid/utils.js +13 -12
- package/styles/bootstrap-dark.css +14 -1
- package/styles/bootstrap.css +14 -1
- package/styles/bootstrap4.css +14 -1
- package/styles/bootstrap5-dark.css +16 -2
- package/styles/bootstrap5.css +16 -2
- package/styles/fabric-dark.css +14 -1
- package/styles/fabric.css +14 -1
- package/styles/fluent-dark.css +15 -2
- package/styles/fluent.css +15 -2
- package/styles/highcontrast-light.css +14 -1
- package/styles/highcontrast.css +14 -1
- package/styles/material-dark.css +14 -1
- package/styles/material.css +14 -1
- package/styles/tailwind-dark.css +14 -1
- package/styles/tailwind.css +14 -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 +28 -0
- package/styles/treegrid/_highcontrast-definition.scss +0 -1
- package/styles/treegrid/_highcontrast-light-definition.scss +0 -2
- package/styles/treegrid/_icons.scss +12 -1
- package/styles/treegrid/_layout.scss +4 -4
- package/styles/treegrid/_material-definition.scss +0 -1
- package/styles/treegrid/_material3-definition.scss +28 -0
- package/styles/treegrid/_tailwind-definition.scss +0 -1
- package/styles/treegrid/_theme.scss +1 -0
- package/styles/treegrid/bootstrap-dark.css +14 -1
- package/styles/treegrid/bootstrap.css +14 -1
- package/styles/treegrid/bootstrap4.css +14 -1
- package/styles/treegrid/bootstrap5-dark.css +16 -2
- package/styles/treegrid/bootstrap5.css +16 -2
- package/styles/treegrid/fabric-dark.css +14 -1
- package/styles/treegrid/fabric.css +14 -1
- package/styles/treegrid/fluent-dark.css +15 -2
- package/styles/treegrid/fluent.css +15 -2
- package/styles/treegrid/highcontrast-light.css +14 -1
- package/styles/treegrid/highcontrast.css +14 -1
- package/styles/treegrid/icons/_bootstrap-dark.scss +12 -1
- package/styles/treegrid/icons/_bootstrap.scss +12 -1
- package/styles/treegrid/icons/_bootstrap4.scss +12 -1
- package/styles/treegrid/icons/_bootstrap5.scss +11 -0
- package/styles/treegrid/icons/_fabric-dark.scss +12 -1
- package/styles/treegrid/icons/_fabric.scss +12 -1
- package/styles/treegrid/icons/_fluent.scss +11 -0
- package/styles/treegrid/icons/_fusionnew.scss +26 -0
- package/styles/treegrid/icons/_highcontrast-light.scss +12 -1
- package/styles/treegrid/icons/_highcontrast.scss +11 -0
- package/styles/treegrid/icons/_material-dark.scss +12 -1
- package/styles/treegrid/icons/_material.scss +11 -0
- package/styles/treegrid/icons/_material3.scss +26 -0
- package/styles/treegrid/icons/_tailwind-dark.scss +11 -0
- package/styles/treegrid/icons/_tailwind.scss +11 -0
- package/styles/treegrid/material-dark.css +14 -1
- package/styles/treegrid/material.css +14 -1
- package/styles/treegrid/tailwind-dark.css +14 -1
- package/styles/treegrid/tailwind.css +14 -1
package/src/treegrid/enum.d.ts
CHANGED
|
@@ -112,7 +112,11 @@ export declare type ContextMenuItem =
|
|
|
112
112
|
/** `NextPage` - Go to the next page. */
|
|
113
113
|
'NextPage' |
|
|
114
114
|
/** AddRow to the TreeGrid */
|
|
115
|
-
'AddRow'
|
|
115
|
+
'AddRow' |
|
|
116
|
+
/** `Indent` - Indents the record to one level of hierarchy */
|
|
117
|
+
'Indent' |
|
|
118
|
+
/** `Outdent` - Outdent the record to one level of hierarchy */
|
|
119
|
+
'Outdent';
|
|
116
120
|
/**
|
|
117
121
|
* Defines predefined contextmenu items.
|
|
118
122
|
*
|
|
@@ -134,7 +138,9 @@ export declare enum ContextMenuItems {
|
|
|
134
138
|
PrevPage = 12,
|
|
135
139
|
LastPage = 13,
|
|
136
140
|
NextPage = 14,
|
|
137
|
-
AddRow = 15
|
|
141
|
+
AddRow = 15,
|
|
142
|
+
RowIndent = 16,
|
|
143
|
+
RowOutdent = 17
|
|
138
144
|
}
|
|
139
145
|
/**
|
|
140
146
|
* Defines modes of editing.
|
package/src/treegrid/enum.js
CHANGED
|
@@ -43,4 +43,6 @@ export var ContextMenuItems;
|
|
|
43
43
|
ContextMenuItems[ContextMenuItems["LastPage"] = 13] = "LastPage";
|
|
44
44
|
ContextMenuItems[ContextMenuItems["NextPage"] = 14] = "NextPage";
|
|
45
45
|
ContextMenuItems[ContextMenuItems["AddRow"] = 15] = "AddRow";
|
|
46
|
+
ContextMenuItems[ContextMenuItems["RowIndent"] = 16] = "RowIndent";
|
|
47
|
+
ContextMenuItems[ContextMenuItems["RowOutdent"] = 17] = "RowOutdent";
|
|
46
48
|
})(ContextMenuItems || (ContextMenuItems = {}));
|
|
@@ -329,12 +329,12 @@ export declare class Column {
|
|
|
329
329
|
private parent;
|
|
330
330
|
constructor(options: ColumnModel);
|
|
331
331
|
/**
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
332
|
+
* Update the State changes reflected for TreeGrid columndirective in react platform.
|
|
333
|
+
*
|
|
334
|
+
* @param {Column} column - specifies the column
|
|
335
|
+
* @returns {void}
|
|
336
|
+
* @hidden
|
|
337
|
+
*/
|
|
338
338
|
private setProperties;
|
|
339
339
|
}
|
|
340
340
|
/**
|
|
@@ -72,21 +72,21 @@ var Column = /** @class */ (function () {
|
|
|
72
72
|
merge(this, options);
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
* Update the State changes reflected for TreeGrid columndirective in react platform.
|
|
76
|
+
*
|
|
77
|
+
* @param {Column} column - specifies the column
|
|
78
|
+
* @returns {void}
|
|
79
|
+
* @hidden
|
|
80
|
+
*/
|
|
81
81
|
Column.prototype.setProperties = function (column) {
|
|
82
82
|
//Angular two way binding
|
|
83
83
|
var keys = Object.keys(column);
|
|
84
84
|
for (var i = 0; i < keys.length; i++) {
|
|
85
|
-
this[keys[i]] = column[keys[i]];
|
|
85
|
+
this[keys[parseInt(i.toString(), 10)]] = column[keys[parseInt(i.toString(), 10)]];
|
|
86
86
|
//Refresh the react columnTemplates on state change
|
|
87
|
-
if (this.parent && this.parent['isReact'] && keys[i] === 'template') {
|
|
87
|
+
if (this.parent && this.parent['isReact'] && keys[parseInt(i.toString(), 10)] === 'template') {
|
|
88
88
|
var refreshReactColumnTemplateByUid = 'refreshReactColumnTemplateByUid';
|
|
89
|
-
this.parent.clipboardModule['treeGridParent'].renderModule[refreshReactColumnTemplateByUid](this.uid);
|
|
89
|
+
this.parent.clipboardModule['treeGridParent'].renderModule["" + refreshReactColumnTemplateByUid](this.uid);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Property, ChildProperty } from '@syncfusion/ej2-base';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interface for a class LoadingIndicator
|
|
5
|
+
*/
|
|
6
|
+
export interface LoadingIndicatorModel {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Defines the loading indicator. The available loading indicator are:
|
|
10
|
+
* * Spinner
|
|
11
|
+
* * Shimmer
|
|
12
|
+
*
|
|
13
|
+
* @default Syncfusion.EJ2.Grids.IndicatorType.Spinner
|
|
14
|
+
* @isEnumeration true
|
|
15
|
+
* @aspType Syncfusion.EJ2.Grids.IndicatorType
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
indicatorType?: IndicatorType;
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChildProperty } from '@syncfusion/ej2-base';
|
|
2
|
+
import { IndicatorType } from '@syncfusion/ej2-grids';
|
|
3
|
+
/**
|
|
4
|
+
* Configures the Loading Indicator of the Tree Grid.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LoadingIndicator extends ChildProperty<LoadingIndicator> {
|
|
7
|
+
/**
|
|
8
|
+
* Defines the loading indicator. The available loading indicator are:
|
|
9
|
+
* * Spinner
|
|
10
|
+
* * Shimmer
|
|
11
|
+
*
|
|
12
|
+
* @default Syncfusion.EJ2.Grids.IndicatorType.Spinner
|
|
13
|
+
* @isEnumeration true
|
|
14
|
+
* @aspType Syncfusion.EJ2.Grids.IndicatorType
|
|
15
|
+
*/
|
|
16
|
+
indicatorType: IndicatorType;
|
|
17
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
import { Property, ChildProperty } from '@syncfusion/ej2-base';
|
|
21
|
+
/**
|
|
22
|
+
* Configures the Loading Indicator of the Tree Grid.
|
|
23
|
+
*/
|
|
24
|
+
var LoadingIndicator = /** @class */ (function (_super) {
|
|
25
|
+
__extends(LoadingIndicator, _super);
|
|
26
|
+
function LoadingIndicator() {
|
|
27
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
+
}
|
|
29
|
+
__decorate([
|
|
30
|
+
Property('Spinner')
|
|
31
|
+
], LoadingIndicator.prototype, "indicatorType", void 0);
|
|
32
|
+
return LoadingIndicator;
|
|
33
|
+
}(ChildProperty));
|
|
34
|
+
export { LoadingIndicator };
|
|
@@ -30,10 +30,10 @@ export declare class Render {
|
|
|
30
30
|
cellRender(args: QueryCellInfoEventArgs): void;
|
|
31
31
|
private updateTreeCell;
|
|
32
32
|
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
* @param {string} columnUid - Defines column uid
|
|
34
|
+
* @returns {void}
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
37
|
private refreshReactColumnTemplateByUid;
|
|
38
38
|
private columnTemplateResult;
|
|
39
39
|
private reactTemplateRender;
|
|
@@ -47,7 +47,7 @@ var Render = /** @class */ (function () {
|
|
|
47
47
|
var parentrec = this.parent.getCurrentViewRecords().filter(function (rec) {
|
|
48
48
|
return getValue(proxy_1.idMapping, rec) === getValue(proxy_1.parentIdMapping, data);
|
|
49
49
|
});
|
|
50
|
-
if (parentrec.length > 0) {
|
|
50
|
+
if (parentrec.length > 0 && !parentrec[0].isSummaryRow) {
|
|
51
51
|
var display = parentrec[0].expanded ? 'table-row' : 'none';
|
|
52
52
|
args.row.setAttribute('style', 'display: ' + display + ';');
|
|
53
53
|
}
|
|
@@ -99,7 +99,7 @@ var Render = /** @class */ (function () {
|
|
|
99
99
|
var columnIndex;
|
|
100
100
|
var getVirtualColIndexByUid = 'getVirtualColIndexByUid';
|
|
101
101
|
if (this.parent.enableColumnVirtualization && !this.parent.initialRender) {
|
|
102
|
-
columnIndex = this.parent[getVirtualColIndexByUid](args.column.uid);
|
|
102
|
+
columnIndex = this.parent["" + getVirtualColIndexByUid](args.column.uid);
|
|
103
103
|
}
|
|
104
104
|
else {
|
|
105
105
|
columnIndex = grid.getColumnIndexByUid(args.column.uid);
|
|
@@ -122,6 +122,7 @@ var Render = /** @class */ (function () {
|
|
|
122
122
|
}
|
|
123
123
|
if (iconRequired) {
|
|
124
124
|
addClass([args.cell], 'e-treerowcell');
|
|
125
|
+
args.cell.setAttribute('aria-expanded', data.expanded ? 'true' : 'false');
|
|
125
126
|
var expandIcon = createElement('span', { className: 'e-icons' });
|
|
126
127
|
var expand = void 0;
|
|
127
128
|
if (this.parent.initialRender) {
|
|
@@ -214,7 +215,12 @@ var Render = /** @class */ (function () {
|
|
|
214
215
|
args.cell.querySelector('.e-treecell').innerHTML = summaryData;
|
|
215
216
|
}
|
|
216
217
|
else {
|
|
217
|
-
args.
|
|
218
|
+
if (args.column.template) {
|
|
219
|
+
args.cell.innerHTML = null;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
args.cell.innerHTML = summaryData;
|
|
223
|
+
}
|
|
218
224
|
}
|
|
219
225
|
}
|
|
220
226
|
if (isNullOrUndefined(this.parent.rowTemplate)) {
|
|
@@ -227,11 +233,11 @@ var Render = /** @class */ (function () {
|
|
|
227
233
|
var templateFn = 'templateFn';
|
|
228
234
|
var colindex = args.column.index;
|
|
229
235
|
if (isNullOrUndefined(treeColumn.field)) {
|
|
230
|
-
args.cell.setAttribute('
|
|
236
|
+
args.cell.setAttribute('data-colindex', colindex + '');
|
|
231
237
|
}
|
|
232
238
|
if (treeColumn.field === args.column.field && !isNullOrUndefined(treeColumn.template)) {
|
|
233
239
|
args.column.template = treeColumn.template;
|
|
234
|
-
args.column[templateFn] = templateCompiler(args.column.template);
|
|
240
|
+
args.column["" + templateFn] = templateCompiler(args.column.template);
|
|
235
241
|
args.cell.classList.add('e-templatecell');
|
|
236
242
|
}
|
|
237
243
|
var textContent = args.cell.querySelector('.e-treecell') != null ?
|
|
@@ -248,25 +254,25 @@ var Render = /** @class */ (function () {
|
|
|
248
254
|
var portals = 'portals';
|
|
249
255
|
var renderReactTemplates = 'renderReactTemplates';
|
|
250
256
|
if (this.parent.isReact && typeof (args.column.template) !== 'string') {
|
|
251
|
-
args.column[templateFn](args.data, this.parent, '
|
|
252
|
-
if (isNullOrUndefined(this.parent.grid[portals])) {
|
|
253
|
-
this.parent.grid[portals] = this.parent[portals];
|
|
257
|
+
args.column["" + templateFn](args.data, this.parent, 'columnTemplate', tempID, null, null, cellElement);
|
|
258
|
+
if (isNullOrUndefined(this.parent.grid["" + portals])) {
|
|
259
|
+
this.parent.grid["" + portals] = this.parent["" + portals];
|
|
254
260
|
}
|
|
255
|
-
this.parent.notify('renderReactTemplate', this.parent[portals]);
|
|
256
|
-
this.parent[renderReactTemplates]();
|
|
261
|
+
this.parent.notify('renderReactTemplate', this.parent["" + portals]);
|
|
262
|
+
this.parent["" + renderReactTemplates]();
|
|
257
263
|
}
|
|
258
264
|
else {
|
|
259
265
|
var str = 'isStringTemplate';
|
|
260
|
-
var result = args.column[templateFn](extend({ 'index': '' }, args.data), this.parent, 'template', tempID, this.parent[str]);
|
|
266
|
+
var result = args.column["" + templateFn](extend({ 'index': '' }, args.data), this.parent, 'template', tempID, this.parent["" + str]);
|
|
261
267
|
appendChildren(cellElement, result);
|
|
262
268
|
}
|
|
263
269
|
delete args.column.template;
|
|
264
|
-
delete args.column[templateFn];
|
|
270
|
+
delete args.column["" + templateFn];
|
|
265
271
|
args.cell.innerHTML = '';
|
|
266
272
|
}
|
|
267
273
|
else {
|
|
268
274
|
for (var i = 0; i < len; len = args.cell.children.length) {
|
|
269
|
-
cellElement.appendChild(args.cell.children[i]);
|
|
275
|
+
cellElement.appendChild(args.cell.children[parseInt(i.toString(), 10)]);
|
|
270
276
|
}
|
|
271
277
|
}
|
|
272
278
|
}
|
|
@@ -276,10 +282,10 @@ var Render = /** @class */ (function () {
|
|
|
276
282
|
}
|
|
277
283
|
};
|
|
278
284
|
/**
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
285
|
+
* @param {string} columnUid - Defines column uid
|
|
286
|
+
* @returns {void}
|
|
287
|
+
* @hidden
|
|
288
|
+
*/
|
|
283
289
|
Render.prototype.refreshReactColumnTemplateByUid = function (columnUid) {
|
|
284
290
|
var _this = this;
|
|
285
291
|
if (this.parent.isReact) {
|
|
@@ -291,11 +297,14 @@ var Render = /** @class */ (function () {
|
|
|
291
297
|
var indent = _this.parent.grid.getIndentCount();
|
|
292
298
|
var cellIndex = _this.parent.grid.getNormalizedColumnIndex(columnUid);
|
|
293
299
|
for (var j = 0; j < rowsObj.length; j++) {
|
|
294
|
-
if (rowsObj[j].isDataRow && !isNullOrUndefined(rowsObj[j].index)) {
|
|
295
|
-
var cell = rowsObj[j][cells][cellIndex];
|
|
300
|
+
if (rowsObj[parseInt(j.toString(), 10)].isDataRow && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
|
|
301
|
+
var cell = rowsObj[parseInt(j.toString(), 10)]["" + cells][parseInt(cellIndex.toString(), 10)];
|
|
296
302
|
var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
|
|
297
|
-
var td = _this.parent.getCellFromIndex(rowsObj[j].index, cellIndex - indent);
|
|
298
|
-
cellRenderer.refreshTD(td, cell, rowsObj[j].data, { index: rowsObj[j][rowIdx] });
|
|
303
|
+
var td = _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
|
|
304
|
+
cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)]["" + rowIdx] });
|
|
305
|
+
var treecell = _this.parent.getRows()[parseInt(j.toString(), 10)]
|
|
306
|
+
.cells[parseInt(cellIndex.toString(), 10)];
|
|
307
|
+
_this.cellRender({ data: rowsObj[parseInt(j.toString(), 10)].data, cell: treecell, column: cell.column });
|
|
299
308
|
}
|
|
300
309
|
}
|
|
301
310
|
});
|
|
@@ -307,9 +316,9 @@ var Render = /** @class */ (function () {
|
|
|
307
316
|
Render.prototype.reactTemplateRender = function (args) {
|
|
308
317
|
var renderReactTemplates = 'renderReactTemplates';
|
|
309
318
|
var portals = 'portals';
|
|
310
|
-
this.parent[portals] = args;
|
|
311
|
-
this.parent.notify('renderReactTemplate', this.parent[portals]);
|
|
312
|
-
this.parent[renderReactTemplates]();
|
|
319
|
+
this.parent["" + portals] = args;
|
|
320
|
+
this.parent.notify('renderReactTemplate', this.parent["" + portals]);
|
|
321
|
+
this.parent["" + renderReactTemplates]();
|
|
313
322
|
};
|
|
314
323
|
Render.prototype.destroy = function () {
|
|
315
324
|
this.parent.grid.off('template-result', this.columnTemplateResult);
|
|
@@ -49,7 +49,11 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
|
|
|
49
49
|
var info = this.getDataInfo();
|
|
50
50
|
if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
|
|
51
51
|
if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
|
|
52
|
-
|
|
52
|
+
if (!((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
53
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))
|
|
54
|
+
|| notifyArgs.virtualInfo.blockIndexes.length === 1) {
|
|
55
|
+
notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
|
|
56
|
+
}
|
|
53
57
|
}
|
|
54
58
|
else {
|
|
55
59
|
notifyArgs.virtualInfo.blockIndexes = this.getBlockIndexes(notifyArgs.virtualInfo.page);
|
|
@@ -65,7 +69,7 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
|
|
|
65
69
|
}
|
|
66
70
|
var rows = _super.prototype.generateRows.call(this, data, notifyArgs);
|
|
67
71
|
for (var r = 0; r < rows.length; r++) {
|
|
68
|
-
rows[r].index = (this.visualData).indexOf(rows[r].data);
|
|
72
|
+
rows[parseInt(r.toString(), 10)].index = (this.visualData).indexOf(rows[parseInt(r.toString(), 10)].data);
|
|
69
73
|
}
|
|
70
74
|
return rows;
|
|
71
75
|
}
|
|
@@ -76,15 +80,18 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
|
|
|
76
80
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
77
81
|
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
78
82
|
var model = 'model';
|
|
79
|
-
var currentPage = this[model].currentPage;
|
|
83
|
+
var currentPage = this["" + model].currentPage;
|
|
80
84
|
if (clear) {
|
|
81
85
|
this.cache = {};
|
|
86
|
+
this.movableCache = {};
|
|
87
|
+
this.frozenRightCache = {};
|
|
82
88
|
this.data = {};
|
|
83
89
|
this.groups = {};
|
|
84
90
|
}
|
|
85
|
-
else if (action === 'virtualscroll' && this.cache[currentPage] &&
|
|
86
|
-
this.cache[currentPage].length >
|
|
87
|
-
|
|
91
|
+
else if (action === 'virtualscroll' && this.cache[parseInt(currentPage.toString(), 10)] &&
|
|
92
|
+
this.cache[parseInt(currentPage.toString(), 10)].length >
|
|
93
|
+
(this.parent.contentModule).getBlockSize()) {
|
|
94
|
+
delete this.cache[parseInt(currentPage.toString(), 10)];
|
|
88
95
|
}
|
|
89
96
|
}
|
|
90
97
|
else {
|
|
@@ -92,6 +99,8 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
|
|
|
92
99
|
this.cache = {};
|
|
93
100
|
this.data = {};
|
|
94
101
|
this.groups = {};
|
|
102
|
+
this.movableCache = {};
|
|
103
|
+
this.frozenRightCache = {};
|
|
95
104
|
}
|
|
96
105
|
}
|
|
97
106
|
return clear;
|
|
@@ -11,7 +11,7 @@ export declare class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
11
11
|
private maxiPage;
|
|
12
12
|
private rowPosition;
|
|
13
13
|
private addRowIndex;
|
|
14
|
-
private
|
|
14
|
+
private dataRowIndex;
|
|
15
15
|
private recordAdded;
|
|
16
16
|
/** @hidden */
|
|
17
17
|
startIndex: number;
|
|
@@ -25,6 +25,9 @@ export declare class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
25
25
|
/** @hidden */
|
|
26
26
|
isDataSourceChanged: boolean;
|
|
27
27
|
getRowByIndex(index: number): Element;
|
|
28
|
+
getMovableVirtualRowByIndex(index: number): Element;
|
|
29
|
+
getFrozenRightVirtualRowByIndex(index: number): Element;
|
|
30
|
+
getRowCollection(index: number, isMovable: boolean, isRowObject?: boolean, isFrozenRight?: boolean): Element | Object;
|
|
28
31
|
addEventListener(): void;
|
|
29
32
|
private virtualOtherAction;
|
|
30
33
|
private indexModifier;
|
|
@@ -59,7 +62,7 @@ export declare class TreeInterSectionObserver extends InterSectionObserver {
|
|
|
59
62
|
private newPos;
|
|
60
63
|
private lastPos;
|
|
61
64
|
private timer;
|
|
62
|
-
observes(callback: Function, onEnterCallback: Function): void;
|
|
65
|
+
observes(callback: Function, onEnterCallback: Function, instance: IGrid): void;
|
|
63
66
|
private clear;
|
|
64
67
|
private virtualScrollHandlers;
|
|
65
68
|
}
|