@syncfusion/ej2-treegrid 33.2.12 → 34.1.30
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/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +133 -40
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +133 -40
- 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/helpers/e2e/index.d.ts +1 -0
- package/helpers/e2e/index.js +8 -0
- package/helpers/e2e/treegridhelper.d.ts +21 -0
- package/helpers/e2e/treegridhelper.js +83 -0
- package/package.json +5 -5
- package/src/treegrid/actions/batch-edit.d.ts +1 -0
- package/src/treegrid/actions/batch-edit.js +14 -2
- package/src/treegrid/actions/edit.d.ts +12 -0
- package/src/treegrid/actions/edit.js +35 -3
- package/src/treegrid/actions/pdf-export.js +3 -1
- package/src/treegrid/actions/selection.d.ts +7 -0
- package/src/treegrid/actions/selection.js +32 -13
- package/src/treegrid/base/data.js +5 -11
- package/src/treegrid/base/treegrid.d.ts +7 -0
- package/src/treegrid/base/treegrid.js +34 -5
- package/src/treegrid/renderer/virtual-tree-content-render.js +10 -5
- package/styles/bds-lite.css +0 -351
- package/styles/bds-lite.scss +1 -15
- package/styles/bds.css +0 -355
- package/styles/bds.scss +2 -16
- package/styles/bootstrap-dark-lite.css +0 -100
- package/styles/bootstrap-dark-lite.scss +1 -15
- package/styles/bootstrap-dark.css +0 -100
- package/styles/bootstrap-dark.scss +2 -16
- package/styles/bootstrap-lite.css +0 -100
- package/styles/bootstrap-lite.scss +1 -15
- package/styles/bootstrap.css +0 -100
- package/styles/bootstrap.scss +2 -16
- package/styles/bootstrap4-lite.css +0 -144
- package/styles/bootstrap4-lite.scss +1 -15
- package/styles/bootstrap4.css +0 -144
- package/styles/bootstrap4.scss +2 -16
- package/styles/bootstrap5-dark-lite.css +0 -139
- package/styles/bootstrap5-dark-lite.scss +1 -15
- package/styles/bootstrap5-dark.css +0 -139
- package/styles/bootstrap5-dark.scss +2 -16
- package/styles/bootstrap5-lite.css +0 -139
- package/styles/bootstrap5-lite.scss +1 -16
- package/styles/bootstrap5.3-lite.css +0 -307
- package/styles/bootstrap5.3-lite.scss +1 -16
- package/styles/bootstrap5.3.css +0 -391
- package/styles/bootstrap5.3.scss +2 -17
- package/styles/bootstrap5.css +0 -139
- package/styles/bootstrap5.scss +2 -17
- package/styles/fabric-dark-lite.css +0 -76
- package/styles/fabric-dark-lite.scss +1 -16
- package/styles/fabric-dark.css +0 -76
- package/styles/fabric-dark.scss +2 -17
- package/styles/fabric-lite.css +0 -76
- package/styles/fabric-lite.scss +1 -16
- package/styles/fabric.css +0 -76
- package/styles/fabric.scss +2 -17
- package/styles/fluent-dark-lite.css +0 -131
- package/styles/fluent-dark-lite.scss +1 -16
- package/styles/fluent-dark.css +0 -131
- package/styles/fluent-dark.scss +2 -17
- package/styles/fluent-lite.css +0 -131
- package/styles/fluent-lite.scss +1 -16
- package/styles/fluent.css +0 -131
- package/styles/fluent.scss +2 -17
- package/styles/fluent2-lite.css +0 -548
- package/styles/fluent2-lite.scss +1 -16
- package/styles/fluent2.css +0 -634
- package/styles/fluent2.scss +2 -17
- package/styles/highcontrast-light-lite.css +0 -85
- package/styles/highcontrast-light-lite.scss +1 -16
- package/styles/highcontrast-light.css +0 -85
- package/styles/highcontrast-light.scss +2 -17
- package/styles/highcontrast-lite.css +0 -85
- package/styles/highcontrast-lite.scss +1 -16
- package/styles/highcontrast.css +0 -85
- package/styles/highcontrast.scss +2 -17
- package/styles/material-dark-lite.css +0 -161
- package/styles/material-dark-lite.scss +1 -16
- package/styles/material-dark.css +0 -161
- package/styles/material-dark.scss +2 -17
- package/styles/material-lite.css +0 -185
- package/styles/material-lite.scss +1 -15
- package/styles/material.css +0 -185
- package/styles/material.scss +2 -16
- package/styles/material3-dark-lite.css +0 -393
- package/styles/material3-dark-lite.scss +1 -16
- package/styles/material3-dark.css +0 -475
- package/styles/material3-dark.scss +2 -17
- package/styles/material3-lite.css +0 -397
- package/styles/material3-lite.scss +1 -16
- package/styles/material3.css +0 -481
- package/styles/material3.scss +2 -17
- package/styles/tailwind-dark-lite.css +0 -112
- package/styles/tailwind-dark-lite.scss +1 -16
- package/styles/tailwind-dark.css +0 -112
- package/styles/tailwind-dark.scss +2 -17
- package/styles/tailwind-lite.css +0 -112
- package/styles/tailwind-lite.scss +1 -16
- package/styles/tailwind.css +0 -112
- package/styles/tailwind.scss +2 -17
- package/styles/tailwind3-lite.css +0 -347
- package/styles/tailwind3-lite.scss +1 -16
- package/styles/tailwind3.css +0 -421
- package/styles/tailwind3.scss +2 -17
- package/styles/treegrid/_all.scss +2 -2
- package/styles/treegrid/_bds-definition.scss +4 -2
- package/styles/treegrid/_bigger.scss +1 -1
- package/styles/treegrid/_bootstrap-dark-definition.scss +4 -2
- package/styles/treegrid/_bootstrap-definition.scss +4 -2
- package/styles/treegrid/_bootstrap4-definition.scss +4 -2
- package/styles/treegrid/_bootstrap5-dark-definition.scss +4 -2
- package/styles/treegrid/_bootstrap5-definition.scss +4 -2
- package/styles/treegrid/_bootstrap5.3-definition.scss +4 -2
- package/styles/treegrid/_fabric-dark-definition.scss +4 -2
- package/styles/treegrid/_fabric-definition.scss +4 -2
- package/styles/treegrid/_fluent-dark-definition.scss +4 -2
- package/styles/treegrid/_fluent-definition.scss +4 -2
- package/styles/treegrid/_fluent2-definition.scss +4 -2
- package/styles/treegrid/_fusionnew-definition.scss +2 -0
- package/styles/treegrid/_highcontrast-definition.scss +4 -2
- package/styles/treegrid/_highcontrast-light-definition.scss +4 -2
- package/styles/treegrid/_layout.scss +4 -4
- package/styles/treegrid/_material-dark-definition.scss +4 -2
- package/styles/treegrid/_material-definition.scss +4 -2
- package/styles/treegrid/_material3-dark-definition.scss +4 -2
- package/styles/treegrid/_material3-definition.scss +4 -2
- package/styles/treegrid/_tailwind-dark-definition.scss +4 -2
- package/styles/treegrid/_tailwind-definition.scss +4 -2
- package/styles/treegrid/_tailwind3-definition.scss +4 -2
- package/styles/treegrid/_variables.scss +2 -0
- package/styles/treegrid/bds.css +0 -355
- package/styles/treegrid/bds.scss +2 -17
- package/styles/treegrid/bootstrap-dark.css +0 -100
- package/styles/treegrid/bootstrap-dark.scss +2 -17
- package/styles/treegrid/bootstrap.css +0 -100
- package/styles/treegrid/bootstrap.scss +2 -17
- package/styles/treegrid/bootstrap4.css +0 -144
- package/styles/treegrid/bootstrap4.scss +2 -17
- package/styles/treegrid/bootstrap5-dark.css +0 -139
- package/styles/treegrid/bootstrap5-dark.scss +2 -17
- package/styles/treegrid/bootstrap5.3.css +0 -391
- package/styles/treegrid/bootstrap5.3.scss +2 -17
- package/styles/treegrid/bootstrap5.css +0 -139
- package/styles/treegrid/bootstrap5.scss +2 -17
- package/styles/treegrid/fabric-dark.css +0 -76
- package/styles/treegrid/fabric-dark.scss +2 -17
- package/styles/treegrid/fabric.css +0 -76
- package/styles/treegrid/fabric.scss +2 -17
- package/styles/treegrid/fluent-dark.css +0 -131
- package/styles/treegrid/fluent-dark.scss +2 -17
- package/styles/treegrid/fluent.css +0 -131
- package/styles/treegrid/fluent.scss +2 -17
- package/styles/treegrid/fluent2.css +0 -634
- package/styles/treegrid/fluent2.scss +2 -17
- package/styles/treegrid/highcontrast-light.css +0 -85
- package/styles/treegrid/highcontrast-light.scss +2 -17
- package/styles/treegrid/highcontrast.css +0 -85
- package/styles/treegrid/highcontrast.scss +2 -17
- package/styles/treegrid/icons/_bds.scss +1 -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/_bootstrap5.3.scss +1 -1
- package/styles/treegrid/icons/_bootstrap5.scss +1 -1
- package/styles/treegrid/icons/_fabric-dark.scss +1 -1
- package/styles/treegrid/icons/_fabric.scss +1 -1
- package/styles/treegrid/icons/_fluent.scss +1 -1
- package/styles/treegrid/icons/_fluent2.scss +1 -1
- package/styles/treegrid/icons/_fusionnew.scss +1 -1
- package/styles/treegrid/icons/_highcontrast-light.scss +1 -1
- package/styles/treegrid/icons/_highcontrast.scss +1 -1
- package/styles/treegrid/icons/_material-dark.scss +1 -1
- package/styles/treegrid/icons/_material.scss +1 -1
- package/styles/treegrid/icons/_material3.scss +1 -1
- package/styles/treegrid/icons/_tailwind-dark.scss +1 -1
- package/styles/treegrid/icons/_tailwind.scss +1 -1
- package/styles/treegrid/icons/_tailwind3.scss +1 -1
- package/styles/treegrid/material-dark.css +0 -161
- package/styles/treegrid/material-dark.scss +2 -17
- package/styles/treegrid/material.css +0 -185
- package/styles/treegrid/material.scss +2 -17
- package/styles/treegrid/material3-dark.css +0 -475
- package/styles/treegrid/material3-dark.scss +2 -17
- package/styles/treegrid/material3.css +0 -481
- package/styles/treegrid/material3.scss +2 -17
- package/styles/treegrid/tailwind-dark.css +0 -112
- package/styles/treegrid/tailwind-dark.scss +2 -17
- package/styles/treegrid/tailwind.css +0 -112
- package/styles/treegrid/tailwind.scss +2 -17
- package/styles/treegrid/tailwind3.css +0 -421
- package/styles/treegrid/tailwind3.scss +2 -17
- package/styles/treegrid/_all.bds.scss +0 -2
- package/styles/treegrid/_all.bootstrap-dark.scss +0 -2
- package/styles/treegrid/_all.bootstrap.scss +0 -2
- package/styles/treegrid/_all.bootstrap4.scss +0 -2
- package/styles/treegrid/_all.bootstrap5-dark.scss +0 -2
- package/styles/treegrid/_all.bootstrap5.3.scss +0 -2
- package/styles/treegrid/_all.bootstrap5.scss +0 -2
- package/styles/treegrid/_all.fabric-dark.scss +0 -2
- package/styles/treegrid/_all.fabric.scss +0 -2
- package/styles/treegrid/_all.fluent-dark.scss +0 -2
- package/styles/treegrid/_all.fluent.scss +0 -2
- package/styles/treegrid/_all.fluent2.scss +0 -2
- package/styles/treegrid/_all.highcontrast-light.scss +0 -2
- package/styles/treegrid/_all.highcontrast.scss +0 -2
- package/styles/treegrid/_all.material-dark.scss +0 -2
- package/styles/treegrid/_all.material.scss +0 -2
- package/styles/treegrid/_all.material3-dark.scss +0 -2
- package/styles/treegrid/_all.material3.scss +0 -2
- package/styles/treegrid/_all.tailwind-dark.scss +0 -2
- package/styles/treegrid/_all.tailwind.scss +0 -2
- package/styles/treegrid/_all.tailwind3.scss +0 -2
- package/styles/treegrid/_bigger.bds.scss +0 -3
- package/styles/treegrid/_bigger.bootstrap-dark.scss +0 -3
- package/styles/treegrid/_bigger.bootstrap.scss +0 -3
- package/styles/treegrid/_bigger.bootstrap4.scss +0 -3
- package/styles/treegrid/_bigger.bootstrap5-dark.scss +0 -3
- package/styles/treegrid/_bigger.bootstrap5.3.scss +0 -3
- package/styles/treegrid/_bigger.bootstrap5.scss +0 -3
- package/styles/treegrid/_bigger.fabric-dark.scss +0 -3
- package/styles/treegrid/_bigger.fabric.scss +0 -3
- package/styles/treegrid/_bigger.fluent-dark.scss +0 -3
- package/styles/treegrid/_bigger.fluent.scss +0 -3
- package/styles/treegrid/_bigger.fluent2.scss +0 -3
- package/styles/treegrid/_bigger.highcontrast-light.scss +0 -3
- package/styles/treegrid/_bigger.highcontrast.scss +0 -3
- package/styles/treegrid/_bigger.material-dark.scss +0 -3
- package/styles/treegrid/_bigger.material.scss +0 -3
- package/styles/treegrid/_bigger.material3-dark.scss +0 -3
- package/styles/treegrid/_bigger.material3.scss +0 -3
- package/styles/treegrid/_bigger.tailwind-dark.scss +0 -3
- package/styles/treegrid/_bigger.tailwind.scss +0 -3
- package/styles/treegrid/_bigger.tailwind3.scss +0 -3
- package/styles/treegrid/_layout.bds.scss +0 -4
- package/styles/treegrid/_layout.bootstrap-dark.scss +0 -4
- package/styles/treegrid/_layout.bootstrap.scss +0 -4
- package/styles/treegrid/_layout.bootstrap4.scss +0 -4
- package/styles/treegrid/_layout.bootstrap5-dark.scss +0 -4
- package/styles/treegrid/_layout.bootstrap5.3.scss +0 -4
- package/styles/treegrid/_layout.bootstrap5.scss +0 -4
- package/styles/treegrid/_layout.fabric-dark.scss +0 -4
- package/styles/treegrid/_layout.fabric.scss +0 -4
- package/styles/treegrid/_layout.fluent-dark.scss +0 -4
- package/styles/treegrid/_layout.fluent.scss +0 -4
- package/styles/treegrid/_layout.fluent2.scss +0 -4
- package/styles/treegrid/_layout.highcontrast-light.scss +0 -4
- package/styles/treegrid/_layout.highcontrast.scss +0 -4
- package/styles/treegrid/_layout.material-dark.scss +0 -4
- package/styles/treegrid/_layout.material.scss +0 -4
- package/styles/treegrid/_layout.material3-dark.scss +0 -4
- package/styles/treegrid/_layout.material3.scss +0 -4
- package/styles/treegrid/_layout.tailwind-dark.scss +0 -4
- package/styles/treegrid/_layout.tailwind.scss +0 -4
- package/styles/treegrid/_layout.tailwind3.scss +0 -4
- package/styles/treegrid/_theme-variables.bds.scss +0 -1
- package/styles/treegrid/_theme-variables.bootstrap-dark.scss +0 -1
- package/styles/treegrid/_theme-variables.bootstrap.scss +0 -1
- package/styles/treegrid/_theme-variables.bootstrap4.scss +0 -1
- package/styles/treegrid/_theme-variables.bootstrap5-dark.scss +0 -1
- package/styles/treegrid/_theme-variables.bootstrap5.3.scss +0 -1
- package/styles/treegrid/_theme-variables.bootstrap5.scss +0 -1
- package/styles/treegrid/_theme-variables.fabric-dark.scss +0 -1
- package/styles/treegrid/_theme-variables.fabric.scss +0 -1
- package/styles/treegrid/_theme-variables.fluent-dark.scss +0 -1
- package/styles/treegrid/_theme-variables.fluent.scss +0 -1
- package/styles/treegrid/_theme-variables.fluent2.scss +0 -1
- package/styles/treegrid/_theme-variables.highcontrast-light.scss +0 -1
- package/styles/treegrid/_theme-variables.highcontrast.scss +0 -1
- package/styles/treegrid/_theme-variables.material-dark.scss +0 -1
- package/styles/treegrid/_theme-variables.material.scss +0 -1
- package/styles/treegrid/_theme-variables.material3-dark.scss +0 -1
- package/styles/treegrid/_theme-variables.material3.scss +0 -1
- package/styles/treegrid/_theme-variables.tailwind-dark.scss +0 -1
- package/styles/treegrid/_theme-variables.tailwind.scss +0 -1
- package/styles/treegrid/_theme-variables.tailwind3.scss +0 -1
- package/styles/treegrid/_theme.bds.scss +0 -1
- package/styles/treegrid/_theme.bootstrap-dark.scss +0 -1
- package/styles/treegrid/_theme.bootstrap.scss +0 -1
- package/styles/treegrid/_theme.bootstrap4.scss +0 -1
- package/styles/treegrid/_theme.bootstrap5-dark.scss +0 -1
- package/styles/treegrid/_theme.bootstrap5.3.scss +0 -1
- package/styles/treegrid/_theme.bootstrap5.scss +0 -1
- package/styles/treegrid/_theme.fabric-dark.scss +0 -1
- package/styles/treegrid/_theme.fabric.scss +0 -1
- package/styles/treegrid/_theme.fluent-dark.scss +0 -1
- package/styles/treegrid/_theme.fluent.scss +0 -1
- package/styles/treegrid/_theme.fluent2.scss +0 -1
- package/styles/treegrid/_theme.highcontrast-light.scss +0 -1
- package/styles/treegrid/_theme.highcontrast.scss +0 -1
- package/styles/treegrid/_theme.material-dark.scss +0 -1
- package/styles/treegrid/_theme.material.scss +0 -1
- package/styles/treegrid/_theme.material3-dark.scss +0 -1
- package/styles/treegrid/_theme.material3.scss +0 -1
- package/styles/treegrid/_theme.tailwind-dark.scss +0 -1
- package/styles/treegrid/_theme.tailwind.scss +0 -1
- package/styles/treegrid/_theme.tailwind3.scss +0 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 34.1.30
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2025. 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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './treegridhelper';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
define(["require", "exports", "./treegridhelper"], function (require, exports, treegridhelper_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
function __export(m) {
|
|
4
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
5
|
+
}
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
__export(treegridhelper_1);
|
|
8
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TestHelper } from '@syncfusion/ej2-base/helpers/e2e';
|
|
2
|
+
export declare class TreeGridHelper extends TestHelper {
|
|
3
|
+
id: string;
|
|
4
|
+
wrapperFn: Function;
|
|
5
|
+
constructor(id: string, wrapperFn: Function);
|
|
6
|
+
getDataGridElement(): any;
|
|
7
|
+
getHeaderElement(): any;
|
|
8
|
+
getContentElement(): any;
|
|
9
|
+
getFooterElement(): any;
|
|
10
|
+
getPagerElement(): any;
|
|
11
|
+
getDialogElement(): any;
|
|
12
|
+
getFilterPopupElement(): any;
|
|
13
|
+
getToolbarElement(): any;
|
|
14
|
+
getCurrentPagerElement(): any;
|
|
15
|
+
getPagerDropDownElement(): any;
|
|
16
|
+
getExpandedElements(): any;
|
|
17
|
+
getCollapsedElements(): any;
|
|
18
|
+
setModel(property: any, value: any): any;
|
|
19
|
+
getModel(property: any): any;
|
|
20
|
+
invoke(fName: any, args?: any): any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
define(["require", "exports", "@syncfusion/ej2-base/helpers/e2e"], function (require, exports, e2e_1) {
|
|
15
|
+
"use strict";
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var TreeGridHelper = (function (_super) {
|
|
18
|
+
__extends(TreeGridHelper, _super);
|
|
19
|
+
function TreeGridHelper(id, wrapperFn) {
|
|
20
|
+
var _this = _super.call(this) || this;
|
|
21
|
+
_this.id = id;
|
|
22
|
+
if (wrapperFn !== undefined) {
|
|
23
|
+
_this.wrapperFn = wrapperFn;
|
|
24
|
+
}
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
TreeGridHelper.prototype.getDataGridElement = function () {
|
|
28
|
+
return this.selector('#' + this.id);
|
|
29
|
+
};
|
|
30
|
+
TreeGridHelper.prototype.getHeaderElement = function () {
|
|
31
|
+
return this.selector('#' + this.id + ' .e-gridheader');
|
|
32
|
+
};
|
|
33
|
+
TreeGridHelper.prototype.getContentElement = function () {
|
|
34
|
+
return this.selector('#' + this.id + ' .e-gridcontent');
|
|
35
|
+
};
|
|
36
|
+
TreeGridHelper.prototype.getFooterElement = function () {
|
|
37
|
+
return this.selector('#' + this.id + ' .e-gridfooter');
|
|
38
|
+
};
|
|
39
|
+
TreeGridHelper.prototype.getPagerElement = function () {
|
|
40
|
+
return this.selector('#' + this.id + ' .e-gridpager');
|
|
41
|
+
};
|
|
42
|
+
TreeGridHelper.prototype.getDialogElement = function () {
|
|
43
|
+
return this.selector('#' + this.id + '_gridcontrol_dialogEdit_wrapper');
|
|
44
|
+
};
|
|
45
|
+
TreeGridHelper.prototype.getFilterPopupElement = function () {
|
|
46
|
+
return this.selector('#' + this.id + ' .e-filter-popup');
|
|
47
|
+
};
|
|
48
|
+
TreeGridHelper.prototype.getToolbarElement = function () {
|
|
49
|
+
return this.selector('#' + this.id + '_gridcontrol_toolbarItems');
|
|
50
|
+
};
|
|
51
|
+
TreeGridHelper.prototype.getCurrentPagerElement = function () {
|
|
52
|
+
return this.selector('#' + this.id + ' .e-numericitem.e-currentitem');
|
|
53
|
+
};
|
|
54
|
+
TreeGridHelper.prototype.getPagerDropDownElement = function () {
|
|
55
|
+
return this.selector('#' + this.id + ' .e-pagerdropdown');
|
|
56
|
+
};
|
|
57
|
+
TreeGridHelper.prototype.getExpandedElements = function () {
|
|
58
|
+
return this.selector('#' + this.id + ' .e-treegridexpand');
|
|
59
|
+
};
|
|
60
|
+
TreeGridHelper.prototype.getCollapsedElements = function () {
|
|
61
|
+
return this.selector('#' + this.id + ' .e-treegridcollapsed');
|
|
62
|
+
};
|
|
63
|
+
TreeGridHelper.prototype.setModel = function (property, value) {
|
|
64
|
+
return cy.get('#' + this.id).then(function (ele) {
|
|
65
|
+
return ele[0].ej2_instances[0][property] = value;
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
TreeGridHelper.prototype.getModel = function (property) {
|
|
69
|
+
return cy.get('#' + this.id).then(function (ele) {
|
|
70
|
+
return ele[0].ej2_instances[0][property];
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
TreeGridHelper.prototype.invoke = function (fName, args) {
|
|
74
|
+
if (args === void 0) { args = []; }
|
|
75
|
+
return cy.get('#' + this.id).then(function (ele) {
|
|
76
|
+
var inst = ele[0].ej2_instances[0];
|
|
77
|
+
return inst[fName].apply(inst, args);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
return TreeGridHelper;
|
|
81
|
+
}(e2e_1.TestHelper));
|
|
82
|
+
exports.TreeGridHelper = TreeGridHelper;
|
|
83
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncfusion/ej2-treegrid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "34.1.30",
|
|
4
4
|
"description": "Essential JS 2 TreeGrid Component",
|
|
5
5
|
"author": "Syncfusion Inc.",
|
|
6
6
|
"license": "SEE LICENSE IN license",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"module": "./index.js",
|
|
9
9
|
"es2015": "./dist/es6/ej2-treegrid.es5.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~
|
|
12
|
-
"@syncfusion/ej2-data": "~
|
|
13
|
-
"@syncfusion/ej2-grids": "~
|
|
14
|
-
"@syncfusion/ej2-popups": "~
|
|
11
|
+
"@syncfusion/ej2-base": "~34.1.30",
|
|
12
|
+
"@syncfusion/ej2-data": "~34.1.29",
|
|
13
|
+
"@syncfusion/ej2-grids": "~34.1.30",
|
|
14
|
+
"@syncfusion/ej2-popups": "~34.1.29"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {},
|
|
17
17
|
"keywords": [
|
|
@@ -290,7 +290,8 @@ var BatchEdit = /** @class */ (function () {
|
|
|
290
290
|
if (this.parent.editModule['isAddedRowByMethod'] && !isNullOrUndefined(this.parent.editModule['addRowIndex']) &&
|
|
291
291
|
!this.parent.editModule['isAddedRowByContextMenu'] && !this.parent.editModule.isAddedMultipleRowsByMethod) {
|
|
292
292
|
var newlyAddedRecords = this.parent.getBatchChanges()['addedRecords'];
|
|
293
|
-
var index =
|
|
293
|
+
var index = this.getInsertedRowIndex(newlyAddedRecords.length - 1);
|
|
294
|
+
this.batchIndex = index;
|
|
294
295
|
this.batchRecords.splice(index, 0, newlyAddedRecords[newlyAddedRecords.length - 1]);
|
|
295
296
|
}
|
|
296
297
|
}
|
|
@@ -466,6 +467,17 @@ var BatchEdit = /** @class */ (function () {
|
|
|
466
467
|
this.batchDeletedRecords = [];
|
|
467
468
|
this.parent.grid.renderModule.refresh();
|
|
468
469
|
};
|
|
470
|
+
BatchEdit.prototype.getInsertedRowIndex = function (elementIndex) {
|
|
471
|
+
var header = this.parent.getHeaderTable().getElementsByClassName('e-insertedrow')[parseInt(elementIndex.toString(), 10)];
|
|
472
|
+
var content = this.parent.getContentTable().getElementsByClassName('e-insertedrow')[parseInt(elementIndex.toString(), 10)];
|
|
473
|
+
if (this.parent.frozenRows && header) {
|
|
474
|
+
return parseInt(header.getAttribute('aria-rowindex'), 10) - 1;
|
|
475
|
+
}
|
|
476
|
+
if (content) {
|
|
477
|
+
return parseInt(content.getAttribute('aria-rowindex'), 10) - 1;
|
|
478
|
+
}
|
|
479
|
+
return -1;
|
|
480
|
+
};
|
|
469
481
|
BatchEdit.prototype.batchSave = function (args) {
|
|
470
482
|
if (this.parent.editSettings.mode === 'Batch') {
|
|
471
483
|
var i = void 0;
|
|
@@ -494,7 +506,7 @@ var BatchEdit = /** @class */ (function () {
|
|
|
494
506
|
if (this.parent.editModule['isAddedRowByMethod'] && addRecords.length && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && !this.parent.editModule['isAddedRowByContextMenu']) {
|
|
495
507
|
addRecords.reverse();
|
|
496
508
|
for (var i_1 = 0; i_1 < addRecords.length; i_1++) {
|
|
497
|
-
var index_1 =
|
|
509
|
+
var index_1 = this.getInsertedRowIndex(parseInt(i_1.toString(), 10));
|
|
498
510
|
data.splice(index_1, 0, addRecords[parseInt(i_1.toString(), 10)]);
|
|
499
511
|
}
|
|
500
512
|
}
|
|
@@ -121,4 +121,16 @@ export declare class Edit {
|
|
|
121
121
|
* @returns {void}
|
|
122
122
|
*/
|
|
123
123
|
private closeEdit;
|
|
124
|
+
/**
|
|
125
|
+
* Handles TreeGrid-specific validation for tooltip positioning on last row.
|
|
126
|
+
*
|
|
127
|
+
* @param {Object} args - Validation flags
|
|
128
|
+
* @param {boolean} args.isBeginEdit - Whether editing has begun
|
|
129
|
+
* @param {boolean} args.isAddedRow - Whether the row is newly added
|
|
130
|
+
* @param {boolean} args.isLastRow - Whether this is the last row
|
|
131
|
+
* @param {boolean} args.validationPositionResult - Validation position result
|
|
132
|
+
* @returns {void}
|
|
133
|
+
* @hidden
|
|
134
|
+
*/
|
|
135
|
+
private lastRowValidation;
|
|
124
136
|
}
|
|
@@ -67,6 +67,7 @@ var Edit = /** @class */ (function () {
|
|
|
67
67
|
this.parent.grid.on(events.beforeBatchCancel, this.beforeBatchCancel, this);
|
|
68
68
|
this.parent.grid.on('reset-edit-props', this.resetIsOnBatch, this);
|
|
69
69
|
this.parent.grid.on('get-row-position', this.getRowPosition, this);
|
|
70
|
+
this.parent.grid.on('last-row-validation', this.lastRowValidation, this);
|
|
70
71
|
};
|
|
71
72
|
Edit.prototype.gridDblClick = function (e) {
|
|
72
73
|
this.doubleClickTarget = e.target;
|
|
@@ -80,6 +81,7 @@ var Edit = /** @class */ (function () {
|
|
|
80
81
|
/* eslint-disable-next-line */
|
|
81
82
|
this.parent.grid.getDataRows()[rowIndex].dataset.uid = this.parent.grid.contentModule.getRows()[rowIndex].uid;
|
|
82
83
|
}
|
|
84
|
+
this.doubleClickTarget = null;
|
|
83
85
|
}
|
|
84
86
|
};
|
|
85
87
|
Edit.prototype.getRowPosition = function (addArgs) {
|
|
@@ -125,6 +127,7 @@ var Edit = /** @class */ (function () {
|
|
|
125
127
|
this.parent.grid.off('dblclick', this.gridDblClick);
|
|
126
128
|
this.parent.grid.off('reset-edit-props', this.resetIsOnBatch);
|
|
127
129
|
this.parent.grid.off('get-row-position', this.getRowPosition);
|
|
130
|
+
this.parent.grid.off('last-row-validation', this.lastRowValidation);
|
|
128
131
|
//this.parent.grid.off('click', this.gridSingleClick);
|
|
129
132
|
};
|
|
130
133
|
/**
|
|
@@ -273,7 +276,7 @@ var Edit = /** @class */ (function () {
|
|
|
273
276
|
this.parent.grid.isEdit = false;
|
|
274
277
|
};
|
|
275
278
|
Edit.prototype.resetIsOnBatch = function () {
|
|
276
|
-
if (this.parent.enableVirtualization && this.parent.editSettings.mode === 'Cell') {
|
|
279
|
+
if (this.parent.enableVirtualization && this.parent.editSettings.mode === 'Cell' && !this.parent['isGantt']) {
|
|
277
280
|
this.isOnBatch = false;
|
|
278
281
|
this.updateGridEditMode('Normal');
|
|
279
282
|
}
|
|
@@ -706,7 +709,9 @@ var Edit = /** @class */ (function () {
|
|
|
706
709
|
seletedRow: 0
|
|
707
710
|
};
|
|
708
711
|
this.beginAddEdit(args);
|
|
709
|
-
|
|
712
|
+
if (this.batchEditModule['addRowRecord']) {
|
|
713
|
+
this.batchEditModule['batchAddRowRecord'].push(this.batchEditModule['addRowRecord']);
|
|
714
|
+
}
|
|
710
715
|
this.batchEditModule['batchAddedRecords'].push(args['data']);
|
|
711
716
|
}
|
|
712
717
|
else if (this.parent.editSettings.mode === 'Batch' && this.isAddedMultipleRowsByMethod && (this.parent.editSettings.newRowPosition === 'Above' || this.parent.editSettings.newRowPosition === 'Below')) {
|
|
@@ -726,7 +731,9 @@ var Edit = /** @class */ (function () {
|
|
|
726
731
|
seletedRow: 0
|
|
727
732
|
};
|
|
728
733
|
this.beginAddEdit(args);
|
|
729
|
-
|
|
734
|
+
if (this.batchEditModule['addRowRecord']) {
|
|
735
|
+
this.batchEditModule['batchAddRowRecord'].push(this.batchEditModule['addRowRecord']);
|
|
736
|
+
}
|
|
730
737
|
this.batchEditModule['batchAddedRecords'].push(args['data']);
|
|
731
738
|
}
|
|
732
739
|
}
|
|
@@ -1143,6 +1150,31 @@ var Edit = /** @class */ (function () {
|
|
|
1143
1150
|
}
|
|
1144
1151
|
this.parent.grid.editModule.closeEdit();
|
|
1145
1152
|
};
|
|
1153
|
+
/**
|
|
1154
|
+
* Handles TreeGrid-specific validation for tooltip positioning on last row.
|
|
1155
|
+
*
|
|
1156
|
+
* @param {Object} args - Validation flags
|
|
1157
|
+
* @param {boolean} args.isBeginEdit - Whether editing has begun
|
|
1158
|
+
* @param {boolean} args.isAddedRow - Whether the row is newly added
|
|
1159
|
+
* @param {boolean} args.isLastRow - Whether this is the last row
|
|
1160
|
+
* @param {boolean} args.validationPositionResult - Validation position result
|
|
1161
|
+
* @returns {void}
|
|
1162
|
+
* @hidden
|
|
1163
|
+
*/
|
|
1164
|
+
Edit.prototype.lastRowValidation = function (args) {
|
|
1165
|
+
if (!this.parent.enableVirtualization) {
|
|
1166
|
+
return;
|
|
1167
|
+
}
|
|
1168
|
+
var isBeginEdit = args.isBeginEdit, isAddedRow = args.isAddedRow, isLastRow = args.isLastRow;
|
|
1169
|
+
var newRowPosition = this.parent.editSettings.newRowPosition;
|
|
1170
|
+
if ((newRowPosition === 'Child' || newRowPosition === 'Below' || newRowPosition === 'Above') &&
|
|
1171
|
+
isAddedRow && isLastRow) {
|
|
1172
|
+
args.validationPositionResult = true;
|
|
1173
|
+
}
|
|
1174
|
+
else if (isBeginEdit && isLastRow) {
|
|
1175
|
+
args.validationPositionResult = true;
|
|
1176
|
+
}
|
|
1177
|
+
};
|
|
1146
1178
|
return Edit;
|
|
1147
1179
|
}());
|
|
1148
1180
|
export { Edit };
|
|
@@ -173,7 +173,9 @@ var PdfExport = /** @class */ (function () {
|
|
|
173
173
|
}
|
|
174
174
|
prop = isNullOrUndefined(prop) ? {} : prop;
|
|
175
175
|
prop.dataSource = new DataManager({ json: dtSrc });
|
|
176
|
-
|
|
176
|
+
if (this.parent.aggregates.length > 0) {
|
|
177
|
+
prop.query = args['query'];
|
|
178
|
+
}
|
|
177
179
|
return prop;
|
|
178
180
|
};
|
|
179
181
|
/**
|
|
@@ -57,6 +57,13 @@ export declare class Selection {
|
|
|
57
57
|
* @returns {void}
|
|
58
58
|
*/
|
|
59
59
|
destroy(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Gets the actual record from the data model's uniqueIDCollection.
|
|
62
|
+
*
|
|
63
|
+
* @param {ITreeData} record - The record (may be stale reference).
|
|
64
|
+
* @returns {ITreeData} The actual record from the data model.
|
|
65
|
+
*/
|
|
66
|
+
private getRecordFromUidCollection;
|
|
60
67
|
/**
|
|
61
68
|
* Handles checkbox click events from the DOM and dispatches selection logic.
|
|
62
69
|
*
|
|
@@ -91,6 +91,20 @@ var Selection = /** @class */ (function () {
|
|
|
91
91
|
this.resetSelectionCaches();
|
|
92
92
|
this.removeEventListener();
|
|
93
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* Gets the actual record from the data model's uniqueIDCollection.
|
|
96
|
+
*
|
|
97
|
+
* @param {ITreeData} record - The record (may be stale reference).
|
|
98
|
+
* @returns {ITreeData} The actual record from the data model.
|
|
99
|
+
*/
|
|
100
|
+
Selection.prototype.getRecordFromUidCollection = function (record) {
|
|
101
|
+
if (!record) {
|
|
102
|
+
return record;
|
|
103
|
+
}
|
|
104
|
+
var uidMap = this.parent.uniqueIDCollection;
|
|
105
|
+
var uid = record.uniqueID;
|
|
106
|
+
return (uidMap && uid != null) ? (uidMap[String(uid)] ? uidMap[String(uid)] : record) : record;
|
|
107
|
+
};
|
|
94
108
|
/**
|
|
95
109
|
* Handles checkbox click events from the DOM and dispatches selection logic.
|
|
96
110
|
*
|
|
@@ -117,8 +131,7 @@ var Selection = /** @class */ (function () {
|
|
|
117
131
|
}
|
|
118
132
|
else if (checkWrap && checkWrap.querySelectorAll('.e-treeselectall').length > 0 && this.parent.autoCheckHierarchy) {
|
|
119
133
|
var frame = checkWrap.querySelector('.e-frame');
|
|
120
|
-
var
|
|
121
|
-
var targetState = currentStateIsUncheck; // If currently uncheck, target state is to check all.
|
|
134
|
+
var targetState = frame.classList.contains('e-uncheck') || frame.classList.contains('e-stop');
|
|
122
135
|
this.headerSelection(targetState);
|
|
123
136
|
checkBox = checkWrap.querySelector('input[type="checkbox"]');
|
|
124
137
|
this.triggerChkChangeEvent(checkBox, targetState, target.closest('tr'));
|
|
@@ -285,6 +298,7 @@ var Selection = /** @class */ (function () {
|
|
|
285
298
|
var flatRec = getParentData(this.parent, viewRec.uniqueID);
|
|
286
299
|
var nextState = (flatRec.checkboxState === 'check') ? 'uncheck' : 'check';
|
|
287
300
|
flatRec.checkboxState = nextState;
|
|
301
|
+
viewRec.checkboxState = nextState;
|
|
288
302
|
this.traverSelection(flatRec, nextState, false);
|
|
289
303
|
}
|
|
290
304
|
};
|
|
@@ -336,10 +350,11 @@ var Selection = /** @class */ (function () {
|
|
|
336
350
|
if (child.hasChildRecords) {
|
|
337
351
|
this.traverSelection(child, checkboxState, true);
|
|
338
352
|
}
|
|
339
|
-
|
|
353
|
+
var updatedChild = this.getRecordFromUidCollection(child);
|
|
354
|
+
if (updatedChild.checkboxState === 'check') {
|
|
340
355
|
checkedCount++;
|
|
341
356
|
}
|
|
342
|
-
else if (
|
|
357
|
+
else if (updatedChild.checkboxState === 'indeterminate') {
|
|
343
358
|
indeterminateCount++;
|
|
344
359
|
}
|
|
345
360
|
}
|
|
@@ -463,11 +478,12 @@ var Selection = /** @class */ (function () {
|
|
|
463
478
|
if (!child || child.isSummaryRow) {
|
|
464
479
|
continue;
|
|
465
480
|
}
|
|
481
|
+
var actualChild = this.getRecordFromUidCollection(child);
|
|
466
482
|
summary.total++;
|
|
467
|
-
if (
|
|
483
|
+
if (actualChild.checkboxState === 'check') {
|
|
468
484
|
summary.checked++;
|
|
469
485
|
}
|
|
470
|
-
else if (
|
|
486
|
+
else if (actualChild.checkboxState === 'indeterminate') {
|
|
471
487
|
summary.indeterminate++;
|
|
472
488
|
}
|
|
473
489
|
}
|
|
@@ -595,12 +611,13 @@ var Selection = /** @class */ (function () {
|
|
|
595
611
|
if (!record) {
|
|
596
612
|
continue;
|
|
597
613
|
}
|
|
598
|
-
var
|
|
614
|
+
var actualRecord = this.getRecordFromUidCollection(record);
|
|
615
|
+
var previousState = actualRecord.checkboxState;
|
|
599
616
|
if (previousState === targetState) {
|
|
600
617
|
continue;
|
|
601
618
|
}
|
|
602
|
-
|
|
603
|
-
this.updateSelectedItems(
|
|
619
|
+
actualRecord.checkboxState = targetState;
|
|
620
|
+
this.updateSelectedItems(actualRecord, targetState, true);
|
|
604
621
|
}
|
|
605
622
|
};
|
|
606
623
|
/**
|
|
@@ -628,9 +645,10 @@ var Selection = /** @class */ (function () {
|
|
|
628
645
|
if (item.hasChildRecords && isFilterOrSearch && item.level === 0 && this.parent.autoCheckHierarchy) {
|
|
629
646
|
this.updateParentSelection(item);
|
|
630
647
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
648
|
+
var actualItem = this.getRecordFromUidCollection(item);
|
|
649
|
+
if (actualItem.uniqueID && actualItem.checkboxState === 'check') {
|
|
650
|
+
newSelectedItems.push(actualItem);
|
|
651
|
+
newSelectedUidMap.set(actualItem.uniqueID, true);
|
|
634
652
|
}
|
|
635
653
|
}
|
|
636
654
|
if (!isFilterOrSearch) {
|
|
@@ -805,7 +823,8 @@ var Selection = /** @class */ (function () {
|
|
|
805
823
|
var checkedCountForHeaderLogic = 0;
|
|
806
824
|
for (var _i = 0, recordsForHeaderLogic_1 = recordsForHeaderLogic; _i < recordsForHeaderLogic_1.length; _i++) {
|
|
807
825
|
var record = recordsForHeaderLogic_1[_i];
|
|
808
|
-
|
|
826
|
+
var actualRecord = this.getRecordFromUidCollection(record);
|
|
827
|
+
if (actualRecord && !actualRecord.isSummaryRow && actualRecord.checkboxState === 'check') {
|
|
809
828
|
checkedCountForHeaderLogic++;
|
|
810
829
|
}
|
|
811
830
|
}
|
|
@@ -88,12 +88,10 @@ var DataManipulation = /** @class */ (function () {
|
|
|
88
88
|
if (this.parent.parentIdMapping) {
|
|
89
89
|
this.parent.query = isNullOrUndefined(this.parent.query) ?
|
|
90
90
|
new Query() : this.parent.query;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
this.parent.query.addParams('IdMapping', this.parent.idMapping);
|
|
96
|
-
}
|
|
91
|
+
var filterKey = this.parent.query.params.filter(function (param) { return param.key === 'IdMapping'; });
|
|
92
|
+
if (this.parent.initialRender && !filterKey.length) {
|
|
93
|
+
this.parent.query.where(this.parent.parentIdMapping, 'equal', null);
|
|
94
|
+
this.parent.query.addParams('IdMapping', this.parent.idMapping);
|
|
97
95
|
}
|
|
98
96
|
if (!this.parent.hasChildMapping) {
|
|
99
97
|
var qry = this.parent.query.clone();
|
|
@@ -659,9 +657,6 @@ var DataManipulation = /** @class */ (function () {
|
|
|
659
657
|
? currentData[this.parent.expandStateMapping] : true;
|
|
660
658
|
}
|
|
661
659
|
}
|
|
662
|
-
if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
|
|
663
|
-
currentData.index = currentData.hasChildRecords ? this.storedIndex : this.storedIndex;
|
|
664
|
-
}
|
|
665
660
|
if (this.isSelfReference && isNullOrUndefined(currentData[this.parent.parentIdMapping])) {
|
|
666
661
|
this.parent.parentData.push(currentData);
|
|
667
662
|
}
|
|
@@ -848,8 +843,7 @@ var DataManipulation = /** @class */ (function () {
|
|
|
848
843
|
}
|
|
849
844
|
var isPdfExport = 'isPdfExport';
|
|
850
845
|
var isCollapsedStatePersist = 'isCollapsedStatePersist';
|
|
851
|
-
if ((isPrinting === true || (args["" + isPdfExport] &&
|
|
852
|
-
|| args["" + isCollapsedStatePersist]))) && this.parent.printMode === 'AllPages') {
|
|
846
|
+
if ((isPrinting === true || (args["" + isPdfExport] && args["" + isCollapsedStatePersist] === true)) && this.parent.printMode === 'AllPages') {
|
|
853
847
|
var actualResults = [];
|
|
854
848
|
for (var i = 0; i < results.length; i++) {
|
|
855
849
|
var expandStatus = getExpandStatus(this.parent, results[parseInt(i.toString(), 10)], this.parent.parentData);
|
|
@@ -2504,6 +2504,13 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
2504
2504
|
* @returns {number} returns the page size
|
|
2505
2505
|
*/
|
|
2506
2506
|
getPageSizeByHeight(containerHeight?: number | string): number;
|
|
2507
|
+
/**
|
|
2508
|
+
* Gets the row index based on the given primary key value or row data.
|
|
2509
|
+
*
|
|
2510
|
+
* @param {string | number | object} value - The primary key value or row data.
|
|
2511
|
+
* @returns {number} Returns the row index.
|
|
2512
|
+
*/
|
|
2513
|
+
getRowIndexByPrimaryKey(value: string | Object | number): number;
|
|
2507
2514
|
/**
|
|
2508
2515
|
* `columnchooserModule` is used to dynamically show or hide the TreeGrid columns.
|
|
2509
2516
|
*
|
|
@@ -1508,8 +1508,13 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1508
1508
|
this.grid.dataSource = { result: data, count: datacount };
|
|
1509
1509
|
}
|
|
1510
1510
|
else {
|
|
1511
|
+
var cacheAdaptor = null;
|
|
1512
|
+
if ((this.dataSource instanceof DataManager) && this.dataSource["" + dataSource] &&
|
|
1513
|
+
this.dataSource["" + dataSource].enableCaching) {
|
|
1514
|
+
cacheAdaptor = this.dataSource["" + adaptor].cacheAdaptor;
|
|
1515
|
+
}
|
|
1511
1516
|
this.grid.dataSource = !(this.dataSource instanceof DataManager) ?
|
|
1512
|
-
this.flatData : new DataManager(this.dataSource.dataSource, this.dataSource.defaultQuery, this.dataSource.adaptor, this.hasPreAndPostMiddleware(this.dataSource) ? this.dataSource : undefined);
|
|
1517
|
+
this.flatData : new DataManager(this.dataSource.dataSource, this.dataSource.defaultQuery, cacheAdaptor ? cacheAdaptor : this.dataSource.adaptor, this.hasPreAndPostMiddleware(this.dataSource) ? this.dataSource : undefined);
|
|
1513
1518
|
}
|
|
1514
1519
|
if (this.dataSource instanceof DataManager && (this.dataSource.dataSource.offline || this.dataSource.ready)) {
|
|
1515
1520
|
this.grid.dataSource["" + dataSource].json = extendArray(this.dataSource["" + dataSource].json);
|
|
@@ -1909,6 +1914,14 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1909
1914
|
gridColumn.textAlign = 'Right';
|
|
1910
1915
|
}
|
|
1911
1916
|
}
|
|
1917
|
+
else if (!isNullOrUndefined(this.columnModel[this.treeColumnIndex]) && !this.enableRtl) {
|
|
1918
|
+
if (isNullOrUndefined(this.treeColumnField)) {
|
|
1919
|
+
this.treeColumnField = gridColumn.field;
|
|
1920
|
+
}
|
|
1921
|
+
if (isNullOrUndefined(this.treeColumnTextAlign) && this.treeColumnField === this.columnModel[this.treeColumnIndex].field) {
|
|
1922
|
+
this.treeColumnTextAlign = this.columnModel[this.treeColumnIndex].textAlign;
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1912
1925
|
}
|
|
1913
1926
|
return gridColumnCollection;
|
|
1914
1927
|
};
|
|
@@ -1930,6 +1943,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1930
1943
|
TreeGrid.prototype.onPropertyChanged = function (newProp) {
|
|
1931
1944
|
var properties = Object.keys(newProp);
|
|
1932
1945
|
var requireRefresh = false;
|
|
1946
|
+
var refreshComponent = false;
|
|
1933
1947
|
for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {
|
|
1934
1948
|
var prop = properties_1[_i];
|
|
1935
1949
|
switch (prop) {
|
|
@@ -2073,6 +2087,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2073
2087
|
this.TreeGridLocale();
|
|
2074
2088
|
this.grid.toolbar = this.getGridToolbar();
|
|
2075
2089
|
this.grid.contextMenuItems = this.getContextMenu();
|
|
2090
|
+
requireRefresh = true;
|
|
2091
|
+
refreshComponent = true;
|
|
2076
2092
|
break;
|
|
2077
2093
|
case 'selectedRowIndex':
|
|
2078
2094
|
this.grid.selectedRowIndex = this.selectedRowIndex;
|
|
@@ -2102,10 +2118,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2102
2118
|
this.grid.allowPdfExport = this.allowPdfExport;
|
|
2103
2119
|
break;
|
|
2104
2120
|
case 'enableRtl':
|
|
2105
|
-
if (!isNullOrUndefined(this.treeColumnField)) {
|
|
2106
|
-
this.updateTreeColumnTextAlign();
|
|
2107
|
-
}
|
|
2108
2121
|
this.grid.enableRtl = this.enableRtl;
|
|
2122
|
+
this.updateColumnModel();
|
|
2109
2123
|
break;
|
|
2110
2124
|
case 'allowReordering':
|
|
2111
2125
|
this.grid.allowReordering = this.allowReordering;
|
|
@@ -2158,7 +2172,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2158
2172
|
}
|
|
2159
2173
|
}
|
|
2160
2174
|
if (requireRefresh) {
|
|
2161
|
-
if (this.isFrozenGrid()) {
|
|
2175
|
+
if (refreshComponent || this.isFrozenGrid()) {
|
|
2162
2176
|
this.refreshLayout();
|
|
2163
2177
|
}
|
|
2164
2178
|
else {
|
|
@@ -2973,6 +2987,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2973
2987
|
if (!this.stackedHeader && !isNullOrUndefined(this.columns)) {
|
|
2974
2988
|
merge(this.columns, this.columnModel);
|
|
2975
2989
|
}
|
|
2990
|
+
if (!this.enableRtl && !isNullOrUndefined(this.columnModel[this.treeColumnIndex])
|
|
2991
|
+
&& !isNullOrUndefined(this.treeColumnField)) {
|
|
2992
|
+
if (this.columnModel[this.treeColumnIndex].field === this.treeColumnField) {
|
|
2993
|
+
this.columnModel[this.treeColumnIndex].textAlign = this.treeColumnTextAlign;
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2976
2996
|
this["" + deepMerge] = undefined; // Workaround for blazor updateModel
|
|
2977
2997
|
return this.columnModel;
|
|
2978
2998
|
};
|
|
@@ -4864,6 +4884,15 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
4864
4884
|
return 0;
|
|
4865
4885
|
}
|
|
4866
4886
|
};
|
|
4887
|
+
/**
|
|
4888
|
+
* Gets the row index based on the given primary key value or row data.
|
|
4889
|
+
*
|
|
4890
|
+
* @param {string | number | object} value - The primary key value or row data.
|
|
4891
|
+
* @returns {number} Returns the row index.
|
|
4892
|
+
*/
|
|
4893
|
+
TreeGrid.prototype.getRowIndexByPrimaryKey = function (value) {
|
|
4894
|
+
return this.grid.getRowIndexByPrimaryKey(value);
|
|
4895
|
+
};
|
|
4867
4896
|
var TreeGrid_1;
|
|
4868
4897
|
__decorate([
|
|
4869
4898
|
Property(0)
|
|
@@ -155,7 +155,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
155
155
|
this.startIndex = lastIndex - this.parent.getRows().length;
|
|
156
156
|
this.endIndex = lastIndex;
|
|
157
157
|
}
|
|
158
|
-
else if (this.parent.root.
|
|
158
|
+
else if (this.parent.root.editModule.selectedIndex !== -1) {
|
|
159
159
|
this.startIndex += 1;
|
|
160
160
|
this.endIndex += 1;
|
|
161
161
|
}
|
|
@@ -634,8 +634,10 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
634
634
|
var directVirtualRender = 'directVirtualRender';
|
|
635
635
|
if (!_this.parent["" + directVirtualRender]) { // with this property, columns are rendered without debouncing on horizontal scroll.
|
|
636
636
|
var preventEvent = 'preventEvent';
|
|
637
|
-
if (
|
|
638
|
-
|
|
637
|
+
if (!isWheel && check && !_this["" + preventEvent] && !_this.parent.enableVirtualMaskRow) {
|
|
638
|
+
if (Browser.isIE) {
|
|
639
|
+
_this.parent.showSpinner();
|
|
640
|
+
}
|
|
639
641
|
}
|
|
640
642
|
if (_this.parent.enableVirtualMaskRow && !_this["" + preventEvent]) {
|
|
641
643
|
setTimeout(function () {
|
|
@@ -713,12 +715,12 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
713
715
|
this.parent.root.scrollPosition = scrollArgs.offset;
|
|
714
716
|
}
|
|
715
717
|
var info = scrollArgs.sentinel;
|
|
718
|
+
var rowHeight = parseInt(this.parent.getRowHeight().toString(), 10);
|
|
719
|
+
var outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
|
|
716
720
|
var treeGridParent = null;
|
|
717
721
|
if (this.parent.clipboardModule && this.parent.clipboardModule['treeGridParent']) {
|
|
718
722
|
treeGridParent = this.parent.clipboardModule['treeGridParent'];
|
|
719
723
|
}
|
|
720
|
-
var rowHeight = parseInt(this.parent.getRowHeight().toString(), 10);
|
|
721
|
-
var outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
|
|
722
724
|
var content;
|
|
723
725
|
if (!isNullOrUndefined(this.parent.contentModule)) {
|
|
724
726
|
content = this.parent.getContent().querySelector('.e-content');
|
|
@@ -985,6 +987,9 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
985
987
|
var focusCell = 'focusCell';
|
|
986
988
|
var restoreAdd = 'restoreAdd';
|
|
987
989
|
var ensureSelectedRowPosition = 'ensureSelectedRowPosition';
|
|
990
|
+
if (this['pressedKey'] === 'downArrow' || this['pressedKey'] === 'upArrow') {
|
|
991
|
+
this['activeKey'] = this['pressedKey'];
|
|
992
|
+
}
|
|
988
993
|
_super.prototype["" + focusCell].call(this, e);
|
|
989
994
|
var isAdd = 'isAdd';
|
|
990
995
|
if (this["" + isAdd] && !this.parent.getContent().querySelector('.e-content').querySelector('.e-addedrow')) {
|