@syncfusion/ej2-treegrid 20.1.52 → 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 -30
- 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 +23 -93
- package/styles/bootstrap.css +24 -94
- package/styles/bootstrap4.css +23 -92
- package/styles/bootstrap5-dark.css +26 -94
- package/styles/bootstrap5.css +26 -94
- package/styles/fabric-dark.css +23 -91
- package/styles/fabric.css +23 -91
- package/styles/fluent-dark.css +25 -95
- package/styles/fluent.css +25 -95
- package/styles/highcontrast-light.css +21 -102
- package/styles/highcontrast.css +21 -102
- package/styles/material-dark.css +19 -82
- package/styles/material.css +19 -83
- package/styles/tailwind-dark.css +19 -80
- package/styles/tailwind.css +19 -80
- 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 +23 -93
- package/styles/treegrid/bootstrap.css +24 -94
- package/styles/treegrid/bootstrap4.css +23 -92
- package/styles/treegrid/bootstrap5-dark.css +26 -94
- package/styles/treegrid/bootstrap5.css +26 -94
- package/styles/treegrid/fabric-dark.css +23 -91
- package/styles/treegrid/fabric.css +23 -91
- package/styles/treegrid/fluent-dark.css +25 -95
- package/styles/treegrid/fluent.css +25 -95
- package/styles/treegrid/highcontrast-light.css +21 -102
- package/styles/treegrid/highcontrast.css +21 -102
- 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 +19 -82
- package/styles/treegrid/material.css +19 -83
- package/styles/treegrid/tailwind-dark.css +19 -80
- package/styles/treegrid/tailwind.css +19 -80
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Column, IGrid, NotifyArgs, Row, ServiceLocator } from '@syncfusion/ej2-grids';
|
|
2
|
+
import { ColumnVirtualFreezeRenderer, VirtualFreezeHdrRenderer, VirtualFreezeRenderer } from '@syncfusion/ej2-grids';
|
|
3
|
+
/**
|
|
4
|
+
* VirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
5
|
+
*
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export declare class VirtualTreeFreezeRenderer extends VirtualFreezeRenderer {
|
|
9
|
+
protected serviceLoc: ServiceLocator;
|
|
10
|
+
constructor(parent: IGrid, locator?: ServiceLocator);
|
|
11
|
+
/**
|
|
12
|
+
* @returns {void}
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
renderTable(): void;
|
|
16
|
+
/**
|
|
17
|
+
* @param {HTMLElement} target - specifies the target
|
|
18
|
+
* @param {DocumentFragment} newChild - specifies the newChild
|
|
19
|
+
* @param {NotifyArgs} e - specifies the notifyargs
|
|
20
|
+
* @returns {void}
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
appendContent(target: HTMLElement, newChild: DocumentFragment, e: NotifyArgs): void;
|
|
24
|
+
/**
|
|
25
|
+
* @param {Object[]} data - specifies the data
|
|
26
|
+
* @param {NotifyArgs} e - specifies the notifyargs
|
|
27
|
+
* @returns {Row<Column>[]} returns the row
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
generateRows(data: Object[], e?: NotifyArgs): Row<Column>[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* ColumnVirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
34
|
+
*
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
export declare class ColumnVirtualTreeFreezeRenderer extends ColumnVirtualFreezeRenderer {
|
|
38
|
+
protected serviceLoc: ServiceLocator;
|
|
39
|
+
constructor(parent?: IGrid, locator?: ServiceLocator);
|
|
40
|
+
/**
|
|
41
|
+
* @returns {void}
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
renderTable(): void;
|
|
45
|
+
appendContent(target: HTMLElement, newChild: DocumentFragment, e: NotifyArgs): void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* VirtualTreeFreezeHdrRenderer is used to render the virtual table within the frozen and movable header table
|
|
49
|
+
*
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
export declare class VirtualTreeFreezeHdrRenderer extends VirtualFreezeHdrRenderer {
|
|
53
|
+
/**
|
|
54
|
+
* @returns {void}
|
|
55
|
+
* @hidden
|
|
56
|
+
*/
|
|
57
|
+
renderTable(): void;
|
|
58
|
+
protected rfshMovable(): void;
|
|
59
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
import { ColumnFreezeContentRenderer, FreezeContentRender, FreezeRowModelGenerator, RenderType } from '@syncfusion/ej2-grids';
|
|
15
|
+
import * as literals from '../base/constant';
|
|
16
|
+
import { ColumnVirtualFreezeRenderer, setDebounce, VirtualFreezeHdrRenderer, VirtualFreezeRenderer } from '@syncfusion/ej2-grids';
|
|
17
|
+
import { TreeInterSectionObserver, VirtualTreeContentRenderer } from './virtual-tree-content-render';
|
|
18
|
+
import { getValue } from '@syncfusion/ej2-base';
|
|
19
|
+
/**
|
|
20
|
+
* VirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
21
|
+
*
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
var VirtualTreeFreezeRenderer = /** @class */ (function (_super) {
|
|
25
|
+
__extends(VirtualTreeFreezeRenderer, _super);
|
|
26
|
+
function VirtualTreeFreezeRenderer(parent, locator) {
|
|
27
|
+
var _this = _super.call(this, parent, locator) || this;
|
|
28
|
+
_this.addEventListener();
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @returns {void}
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
VirtualTreeFreezeRenderer.prototype.renderTable = function () {
|
|
36
|
+
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
37
|
+
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
38
|
+
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
39
|
+
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
40
|
+
FreezeContentRender.prototype.renderTable.call(this);
|
|
41
|
+
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
42
|
+
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
43
|
+
var movableCont = this.getMovableContent();
|
|
44
|
+
var minHeight = this.parent.height;
|
|
45
|
+
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + literals.content);
|
|
46
|
+
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
47
|
+
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
48
|
+
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
49
|
+
if (this.parent.enableColumnVirtualization) {
|
|
50
|
+
this.virtualRenderer.virtualEle.movableContent = this.virtualRenderer.movableContent
|
|
51
|
+
= this.getPanel().querySelector('.' + literals.movableContent);
|
|
52
|
+
this.virtualRenderer.virtualEle.renderMovableWrapper(minHeight);
|
|
53
|
+
this.virtualRenderer.virtualEle.renderMovablePlaceHolder();
|
|
54
|
+
var tbl = movableCont.querySelector('table');
|
|
55
|
+
this.virtualRenderer.virtualEle.movableTable = tbl;
|
|
56
|
+
this.virtualRenderer.virtualEle.movableWrapper.appendChild(tbl);
|
|
57
|
+
movableCont.appendChild(this.virtualRenderer.virtualEle.movableWrapper);
|
|
58
|
+
movableCont.appendChild(this.virtualRenderer.virtualEle.movablePlaceholder);
|
|
59
|
+
}
|
|
60
|
+
this.virtualRenderer.virtualEle.wrapper.appendChild(this.getFrozenContent());
|
|
61
|
+
this.virtualRenderer.virtualEle.wrapper.appendChild(movableCont);
|
|
62
|
+
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
63
|
+
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* @param {HTMLElement} target - specifies the target
|
|
67
|
+
* @param {DocumentFragment} newChild - specifies the newChild
|
|
68
|
+
* @param {NotifyArgs} e - specifies the notifyargs
|
|
69
|
+
* @returns {void}
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
VirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
73
|
+
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
74
|
+
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
75
|
+
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
76
|
+
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @param {Object[]} data - specifies the data
|
|
80
|
+
* @param {NotifyArgs} e - specifies the notifyargs
|
|
81
|
+
* @returns {Row<Column>[]} returns the row
|
|
82
|
+
* @hidden
|
|
83
|
+
*/
|
|
84
|
+
VirtualTreeFreezeRenderer.prototype.generateRows = function (data, e) {
|
|
85
|
+
return _super.prototype.generateRows.call(this, data, e);
|
|
86
|
+
};
|
|
87
|
+
return VirtualTreeFreezeRenderer;
|
|
88
|
+
}(VirtualFreezeRenderer));
|
|
89
|
+
export { VirtualTreeFreezeRenderer };
|
|
90
|
+
/**
|
|
91
|
+
* ColumnVirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
|
|
92
|
+
*
|
|
93
|
+
* @hidden
|
|
94
|
+
*/
|
|
95
|
+
var ColumnVirtualTreeFreezeRenderer = /** @class */ (function (_super) {
|
|
96
|
+
__extends(ColumnVirtualTreeFreezeRenderer, _super);
|
|
97
|
+
function ColumnVirtualTreeFreezeRenderer(parent, locator) {
|
|
98
|
+
var _this = _super.call(this, parent, locator) || this;
|
|
99
|
+
_this.serviceLoc = locator;
|
|
100
|
+
_this.eventListener('on');
|
|
101
|
+
return _this;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @returns {void}
|
|
105
|
+
* @hidden
|
|
106
|
+
*/
|
|
107
|
+
ColumnVirtualTreeFreezeRenderer.prototype.renderTable = function () {
|
|
108
|
+
this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
|
|
109
|
+
this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
|
|
110
|
+
.getRenderer(RenderType.Header).virtualHdrRenderer;
|
|
111
|
+
this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
|
|
112
|
+
ColumnFreezeContentRenderer.prototype.renderTable.call(this);
|
|
113
|
+
this.virtualRenderer.setPanel(this.parent.getContent());
|
|
114
|
+
this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
|
|
115
|
+
var frozenRightCont = this.getFrozenRightContent();
|
|
116
|
+
var frzCont = this.getFrozenContent();
|
|
117
|
+
var movableCont = this.getMovableContent();
|
|
118
|
+
if (this.parent.getFrozenMode() === 'Right') {
|
|
119
|
+
frzCont = frozenRightCont;
|
|
120
|
+
}
|
|
121
|
+
this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + literals.content);
|
|
122
|
+
this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
|
|
123
|
+
var minHeight = this.parent.height;
|
|
124
|
+
this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
|
|
125
|
+
this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
|
|
126
|
+
_super.prototype['renderVirtualFrozenLeft'].call(this, frzCont, movableCont);
|
|
127
|
+
_super.prototype['renderVirtualFrozenRight'].call(this, frzCont, movableCont);
|
|
128
|
+
_super.prototype['renderVirtualFrozenLeftRight'].call(this, frzCont, movableCont, frozenRightCont);
|
|
129
|
+
this.virtualRenderer.virtualEle.table = this.getTable();
|
|
130
|
+
setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
|
|
131
|
+
};
|
|
132
|
+
ColumnVirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
133
|
+
getValue('observer', this.virtualRenderer).options.debounceEvent = false;
|
|
134
|
+
this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
|
|
135
|
+
this.virtualRenderer['contents'] = this.getPanel().firstChild;
|
|
136
|
+
_super.prototype.appendContent.call(this, target, newChild, e);
|
|
137
|
+
};
|
|
138
|
+
return ColumnVirtualTreeFreezeRenderer;
|
|
139
|
+
}(ColumnVirtualFreezeRenderer));
|
|
140
|
+
export { ColumnVirtualTreeFreezeRenderer };
|
|
141
|
+
/**
|
|
142
|
+
* VirtualTreeFreezeHdrRenderer is used to render the virtual table within the frozen and movable header table
|
|
143
|
+
*
|
|
144
|
+
* @hidden
|
|
145
|
+
*/
|
|
146
|
+
var VirtualTreeFreezeHdrRenderer = /** @class */ (function (_super) {
|
|
147
|
+
__extends(VirtualTreeFreezeHdrRenderer, _super);
|
|
148
|
+
function VirtualTreeFreezeHdrRenderer() {
|
|
149
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @returns {void}
|
|
153
|
+
* @hidden
|
|
154
|
+
*/
|
|
155
|
+
VirtualTreeFreezeHdrRenderer.prototype.renderTable = function () {
|
|
156
|
+
_super.prototype.renderTable.call(this);
|
|
157
|
+
};
|
|
158
|
+
VirtualTreeFreezeHdrRenderer.prototype.rfshMovable = function () {
|
|
159
|
+
_super.prototype.rfshMovable.call(this);
|
|
160
|
+
};
|
|
161
|
+
return VirtualTreeFreezeHdrRenderer;
|
|
162
|
+
}(VirtualFreezeHdrRenderer));
|
|
163
|
+
export { VirtualTreeFreezeHdrRenderer };
|
package/src/treegrid/utils.js
CHANGED
|
@@ -31,7 +31,7 @@ export function isCountRequired(parent) {
|
|
|
31
31
|
*/
|
|
32
32
|
export function isCheckboxcolumn(parent) {
|
|
33
33
|
for (var i = 0; i < parent.columns.length; i++) {
|
|
34
|
-
if (parent.columns[i].showCheckbox) {
|
|
34
|
+
if (parent.columns[parseInt(i.toString(), 10)].showCheckbox) {
|
|
35
35
|
return true;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -59,9 +59,9 @@ export function findParentRecords(records) {
|
|
|
59
59
|
var datas = [];
|
|
60
60
|
var recordsLength = Object.keys(records).length;
|
|
61
61
|
for (var i = 0, len = recordsLength; i < len; i++) {
|
|
62
|
-
var hasChild = getObject('hasChildRecords', records[i]);
|
|
62
|
+
var hasChild = getObject('hasChildRecords', records[parseInt(i.toString(), 10)]);
|
|
63
63
|
if (hasChild) {
|
|
64
|
-
datas.push(records[i]);
|
|
64
|
+
datas.push(records[parseInt(i.toString(), 10)]);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
return datas;
|
|
@@ -121,13 +121,14 @@ export function findChildrenRecords(records) {
|
|
|
121
121
|
return [];
|
|
122
122
|
}
|
|
123
123
|
if (!isNullOrUndefined(records.childRecords)) {
|
|
124
|
-
var childRecords = records.childRecords;
|
|
124
|
+
var childRecords = records.childRecords.filter(function (item) { return !item.isSummaryRow; });
|
|
125
125
|
var keys = Object.keys(childRecords);
|
|
126
126
|
for (var i = 0, len = keys.length; i < len; i++) {
|
|
127
|
-
datas.push(childRecords[i]);
|
|
128
|
-
if (childRecords[i].hasChildRecords ||
|
|
129
|
-
childRecords[i].childRecords
|
|
130
|
-
|
|
127
|
+
datas.push(childRecords[parseInt(i.toString(), 10)]);
|
|
128
|
+
if (childRecords[parseInt(i.toString(), 10)].hasChildRecords ||
|
|
129
|
+
(!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].childRecords) &&
|
|
130
|
+
childRecords[parseInt(i.toString(), 10)].childRecords.length)) {
|
|
131
|
+
datas = datas.concat(findChildrenRecords(childRecords[parseInt(i.toString(), 10)]));
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
}
|
|
@@ -153,10 +154,10 @@ export function extendArray(array) {
|
|
|
153
154
|
var obj;
|
|
154
155
|
var keys;
|
|
155
156
|
for (var i = 0; array && i < array.length; i++) {
|
|
156
|
-
keys = Object.keys(array[i]);
|
|
157
|
+
keys = Object.keys(array[parseInt(i.toString(), 10)]);
|
|
157
158
|
obj = {};
|
|
158
159
|
for (var j = 0; j < keys.length; j++) {
|
|
159
|
-
obj[keys[j]] = array[i][keys[j]];
|
|
160
|
+
obj[keys[parseInt(j.toString(), 10)]] = array[parseInt(i.toString(), 10)][keys[parseInt(j.toString(), 10)]];
|
|
160
161
|
}
|
|
161
162
|
objArr.push(obj);
|
|
162
163
|
}
|
|
@@ -185,11 +186,11 @@ export function getPlainData(value) {
|
|
|
185
186
|
export function getParentData(parent, value, requireFilter) {
|
|
186
187
|
if (requireFilter) {
|
|
187
188
|
var idFilter = 'uniqueIDFilterCollection';
|
|
188
|
-
return parent[idFilter][value];
|
|
189
|
+
return parent["" + idFilter]["" + value];
|
|
189
190
|
}
|
|
190
191
|
else {
|
|
191
192
|
var id = 'uniqueIDCollection';
|
|
192
|
-
return parent[id][value];
|
|
193
|
+
return parent["" + id]["" + value];
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
/**
|