@syncfusion/ej2-treegrid 30.2.4 → 31.1.17
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 +263 -157
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +291 -167
- 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/dist/ts/index.d.ts +4 -0
- package/dist/ts/index.ts +4 -0
- package/dist/ts/treegrid/actions/batch-edit.d.ts +74 -0
- package/dist/ts/treegrid/actions/batch-edit.ts +627 -0
- package/dist/ts/treegrid/actions/clipboard.d.ts +36 -0
- package/dist/ts/treegrid/actions/clipboard.ts +174 -0
- package/dist/ts/treegrid/actions/column-chooser.d.ts +37 -0
- package/dist/ts/treegrid/actions/column-chooser.ts +55 -0
- package/dist/ts/treegrid/actions/column-menu.d.ts +24 -0
- package/dist/ts/treegrid/actions/column-menu.ts +39 -0
- package/dist/ts/treegrid/actions/command-column.d.ts +24 -0
- package/dist/ts/treegrid/actions/command-column.ts +32 -0
- package/dist/ts/treegrid/actions/context-menu.d.ts +42 -0
- package/dist/ts/treegrid/actions/context-menu.ts +149 -0
- package/dist/ts/treegrid/actions/crud-actions.d.ts +66 -0
- package/dist/ts/treegrid/actions/crud-actions.ts +388 -0
- package/dist/ts/treegrid/actions/detail-row.d.ts +39 -0
- package/dist/ts/treegrid/actions/detail-row.ts +124 -0
- package/dist/ts/treegrid/actions/edit.d.ts +121 -0
- package/dist/ts/treegrid/actions/edit.ts +1083 -0
- package/dist/ts/treegrid/actions/excel-export.d.ts +67 -0
- package/dist/ts/treegrid/actions/excel-export.ts +240 -0
- package/dist/ts/treegrid/actions/filter.d.ts +57 -0
- package/dist/ts/treegrid/actions/filter.ts +231 -0
- package/dist/ts/treegrid/actions/freeze-column.d.ts +28 -0
- package/dist/ts/treegrid/actions/freeze-column.ts +119 -0
- package/dist/ts/treegrid/actions/index.d.ts +24 -0
- package/dist/ts/treegrid/actions/index.ts +24 -0
- package/dist/ts/treegrid/actions/infinite-scroll.d.ts +96 -0
- package/dist/ts/treegrid/actions/infinite-scroll.ts +320 -0
- package/dist/ts/treegrid/actions/logger.d.ts +25 -0
- package/dist/ts/treegrid/actions/logger.ts +136 -0
- package/dist/ts/treegrid/actions/page.d.ts +67 -0
- package/dist/ts/treegrid/actions/page.ts +212 -0
- package/dist/ts/treegrid/actions/pdf-export.d.ts +63 -0
- package/dist/ts/treegrid/actions/pdf-export.ts +182 -0
- package/dist/ts/treegrid/actions/print.d.ts +37 -0
- package/dist/ts/treegrid/actions/print.ts +69 -0
- package/dist/ts/treegrid/actions/reorder.d.ts +36 -0
- package/dist/ts/treegrid/actions/reorder.ts +60 -0
- package/dist/ts/treegrid/actions/resize.d.ts +36 -0
- package/dist/ts/treegrid/actions/resize.ts +54 -0
- package/dist/ts/treegrid/actions/rowdragdrop.d.ts +405 -0
- package/dist/ts/treegrid/actions/rowdragdrop.ts +1896 -0
- package/dist/ts/treegrid/actions/selection.d.ts +51 -0
- package/dist/ts/treegrid/actions/selection.ts +530 -0
- package/dist/ts/treegrid/actions/sort.d.ts +63 -0
- package/dist/ts/treegrid/actions/sort.ts +149 -0
- package/dist/ts/treegrid/actions/summary.d.ts +47 -0
- package/dist/ts/treegrid/actions/summary.ts +231 -0
- package/dist/ts/treegrid/actions/toolbar.d.ts +52 -0
- package/dist/ts/treegrid/actions/toolbar.ts +154 -0
- package/dist/ts/treegrid/actions/virtual-scroll.d.ts +90 -0
- package/dist/ts/treegrid/actions/virtual-scroll.ts +306 -0
- package/dist/ts/treegrid/base/constant.d.ts +158 -0
- package/dist/ts/treegrid/base/constant.ts +158 -0
- package/dist/ts/treegrid/base/data.d.ts +90 -0
- package/dist/ts/treegrid/base/data.ts +904 -0
- package/dist/ts/treegrid/base/index.d.ts +11 -0
- package/dist/ts/treegrid/base/index.ts +11 -0
- package/dist/ts/treegrid/base/interface.d.ts +186 -0
- package/dist/ts/treegrid/base/interface.ts +191 -0
- package/dist/ts/treegrid/base/treegrid-model.d.ts +1100 -0
- package/dist/ts/treegrid/base/treegrid.d.ts +2422 -0
- package/dist/ts/treegrid/base/treegrid.ts +5962 -0
- package/dist/ts/treegrid/enum.d.ts +152 -0
- package/dist/ts/treegrid/enum.ts +217 -0
- package/dist/ts/treegrid/index.d.ts +9 -0
- package/dist/ts/treegrid/index.ts +9 -0
- package/dist/ts/treegrid/models/column-chooser-settings-model.d.ts +62 -0
- package/dist/ts/treegrid/models/column-chooser-settings.d.ts +53 -0
- package/dist/ts/treegrid/models/column-chooser-settings.ts +67 -0
- package/dist/ts/treegrid/models/column-model.d.ts +30 -0
- package/dist/ts/treegrid/models/column.d.ts +697 -0
- package/dist/ts/treegrid/models/column.ts +800 -0
- package/dist/ts/treegrid/models/edit-settings-model.d.ts +100 -0
- package/dist/ts/treegrid/models/edit-settings.d.ts +89 -0
- package/dist/ts/treegrid/models/edit-settings.ts +111 -0
- package/dist/ts/treegrid/models/filter-settings-model.d.ts +216 -0
- package/dist/ts/treegrid/models/filter-settings.d.ts +195 -0
- package/dist/ts/treegrid/models/filter-settings.ts +237 -0
- package/dist/ts/treegrid/models/index.d.ts +24 -0
- package/dist/ts/treegrid/models/index.ts +24 -0
- package/dist/ts/treegrid/models/infinite-scroll-settings-model.d.ts +29 -0
- package/dist/ts/treegrid/models/infinite-scroll-settings.d.ts +25 -0
- package/dist/ts/treegrid/models/infinite-scroll-settings.ts +31 -0
- package/dist/ts/treegrid/models/loading-indicator-model.d.ts +21 -0
- package/dist/ts/treegrid/models/loading-indicator.d.ts +19 -0
- package/dist/ts/treegrid/models/loading-indicator.ts +21 -0
- package/dist/ts/treegrid/models/page-settings-model.d.ts +66 -0
- package/dist/ts/treegrid/models/page-settings.d.ts +57 -0
- package/dist/ts/treegrid/models/page-settings.ts +73 -0
- package/dist/ts/treegrid/models/rowdrop-settings-model.d.ts +15 -0
- package/dist/ts/treegrid/models/rowdrop-settings.d.ts +34 -0
- package/dist/ts/treegrid/models/rowdrop-settings.ts +37 -0
- package/dist/ts/treegrid/models/search-settings-model.d.ts +79 -0
- package/dist/ts/treegrid/models/search-settings.d.ts +73 -0
- package/dist/ts/treegrid/models/search-settings.ts +83 -0
- package/dist/ts/treegrid/models/selection-settings-model.d.ts +76 -0
- package/dist/ts/treegrid/models/selection-settings.d.ts +68 -0
- package/dist/ts/treegrid/models/selection-settings.ts +82 -0
- package/dist/ts/treegrid/models/sort-settings-model.d.ts +49 -0
- package/dist/ts/treegrid/models/sort-settings.d.ts +43 -0
- package/dist/ts/treegrid/models/sort-settings.ts +51 -0
- package/dist/ts/treegrid/models/summary-model.d.ts +93 -0
- package/dist/ts/treegrid/models/summary.d.ts +126 -0
- package/dist/ts/treegrid/models/summary.ts +170 -0
- package/dist/ts/treegrid/models/textwrap-settings-model.d.ts +21 -0
- package/dist/ts/treegrid/models/textwrap-settings.d.ts +19 -0
- package/dist/ts/treegrid/models/textwrap-settings.ts +21 -0
- package/dist/ts/treegrid/renderer/index.d.ts +5 -0
- package/dist/ts/treegrid/renderer/index.ts +5 -0
- package/dist/ts/treegrid/renderer/render.d.ts +41 -0
- package/dist/ts/treegrid/renderer/render.ts +379 -0
- package/dist/ts/treegrid/renderer/virtual-row-model-generator.d.ts +16 -0
- package/dist/ts/treegrid/renderer/virtual-row-model-generator.ts +90 -0
- package/dist/ts/treegrid/renderer/virtual-tree-content-render.d.ts +353 -0
- package/dist/ts/treegrid/renderer/virtual-tree-content-render.ts +1125 -0
- package/dist/ts/treegrid/utils.d.ts +70 -0
- package/dist/ts/treegrid/utils.ts +217 -0
- package/package.json +51 -15
- package/src/treegrid/actions/context-menu.js +3 -1
- package/src/treegrid/actions/excel-export.d.ts +8 -0
- package/src/treegrid/actions/excel-export.js +12 -0
- package/src/treegrid/actions/freeze-column.js +1 -1
- package/src/treegrid/actions/pdf-export.d.ts +8 -0
- package/src/treegrid/actions/pdf-export.js +12 -0
- package/src/treegrid/actions/selection.js +1 -1
- package/src/treegrid/actions/virtual-scroll.js +2 -2
- package/src/treegrid/base/data.js +1 -1
- package/src/treegrid/base/treegrid-model.d.ts +32 -2
- package/src/treegrid/base/treegrid.d.ts +29 -2
- package/src/treegrid/base/treegrid.js +39 -2
- package/src/treegrid/models/column-chooser-settings-model.d.ts +62 -0
- package/src/treegrid/models/column-chooser-settings.d.ts +53 -0
- package/src/treegrid/models/column-chooser-settings.js +52 -0
- package/src/treegrid/renderer/virtual-tree-content-render.js +3 -8
- package/src/treegrid/utils.js +22 -6
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { IGrid } from '@syncfusion/ej2-grids';
|
|
2
|
+
import { TreeGrid } from './base/treegrid';
|
|
3
|
+
import { ITreeData } from './base/interface';
|
|
4
|
+
/**
|
|
5
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
6
|
+
* @returns {boolean} - Specifies whether remote data binding
|
|
7
|
+
*/
|
|
8
|
+
export declare function isRemoteData(parent: TreeGrid): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @param {TreeGrid | IGrid} parent - Tree Grid or Grid instance
|
|
11
|
+
* @returns {boolean} - Returns whether custom binding
|
|
12
|
+
*/
|
|
13
|
+
export declare function isCountRequired(parent: TreeGrid | IGrid): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
16
|
+
* @returns {boolean} - Returns whether checkbox column is enabled
|
|
17
|
+
*/
|
|
18
|
+
export declare function isCheckboxcolumn(parent: TreeGrid): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
21
|
+
* @returns {boolean} - Returns whether filtering and searching done
|
|
22
|
+
*/
|
|
23
|
+
export declare function isFilterChildHierarchy(parent: TreeGrid): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @param {Object} records - Define records for which parent records has to be found
|
|
26
|
+
* @hidden
|
|
27
|
+
* @returns {Object} - Returns parent records collection
|
|
28
|
+
*/
|
|
29
|
+
export declare function findParentRecords(records: Object): Object;
|
|
30
|
+
/**
|
|
31
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
32
|
+
* @returns {boolean} - Returns the expand status of record
|
|
33
|
+
* @param {ITreeData} record - Define the record for which expand status has be found
|
|
34
|
+
* @param {ITreeData[]} parents - Parent Data collection
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
export declare function getExpandStatus(parent: TreeGrid, record: ITreeData, parents: ITreeData[]): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @param {ITreeData} records - Define the record for which child records has to be found
|
|
40
|
+
* @returns {Object[]} - Returns child records collection
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export declare function findChildrenRecords(records: ITreeData): Object[];
|
|
44
|
+
/**
|
|
45
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
46
|
+
* @returns {boolean} - Returns whether local data binding
|
|
47
|
+
*/
|
|
48
|
+
export declare function isOffline(parent: TreeGrid): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* @param {Object[]} array - Defines the array to be cloned
|
|
51
|
+
* @returns {Object[]} - Returns cloned array collection
|
|
52
|
+
*/
|
|
53
|
+
export declare function extendArray(array: Object[]): Object[];
|
|
54
|
+
/**
|
|
55
|
+
* @param {ITreeData} value - Defined the dirty data to be cleaned
|
|
56
|
+
* @returns {ITreeData} - Returns cleaned original data
|
|
57
|
+
*/
|
|
58
|
+
export declare function getPlainData(value: ITreeData): ITreeData;
|
|
59
|
+
/**
|
|
60
|
+
* @param {TreeGrid} parent - TreeGrid instance
|
|
61
|
+
* @param {string} value - IdMapping field name
|
|
62
|
+
* @param {boolean} requireFilter - Specified whether treegrid data is filtered
|
|
63
|
+
* @returns {ITreeData} - Returns IdMapping matched record
|
|
64
|
+
*/
|
|
65
|
+
export declare function getParentData(parent: TreeGrid, value: string, requireFilter?: boolean): ITreeData;
|
|
66
|
+
/**
|
|
67
|
+
* @param {HTMLTableRowElement} el - Row element
|
|
68
|
+
* @returns {boolean} - Returns whether hidden
|
|
69
|
+
*/
|
|
70
|
+
export declare function isHidden(el: HTMLTableRowElement): boolean;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { getObject, IGrid } from '@syncfusion/ej2-grids';
|
|
2
|
+
import { TreeGrid } from './base/treegrid';
|
|
3
|
+
import { ColumnModel } from './models/column';
|
|
4
|
+
import { DataManager, ODataAdaptor, UrlAdaptor, AdaptorOptions } from '@syncfusion/ej2-data';
|
|
5
|
+
import { WebApiAdaptor, WebMethodAdaptor, CacheAdaptor } from '@syncfusion/ej2-data';
|
|
6
|
+
import { isNullOrUndefined } from '@syncfusion/ej2-base';
|
|
7
|
+
import { ITreeData } from './base/interface';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
12
|
+
* @returns {boolean} - Specifies whether remote data binding
|
|
13
|
+
*/
|
|
14
|
+
export function isRemoteData(parent: TreeGrid) : boolean {
|
|
15
|
+
if (parent['treeGrid'] && parent['treeGrid']['isGantt']) {
|
|
16
|
+
if (parent['taskFields'].hasChildMapping) {
|
|
17
|
+
if (parent.dataSource instanceof DataManager) {
|
|
18
|
+
const adaptor: AdaptorOptions = parent.dataSource.adaptor;
|
|
19
|
+
return (adaptor instanceof ODataAdaptor ||
|
|
20
|
+
(adaptor instanceof WebApiAdaptor) || (adaptor instanceof WebMethodAdaptor) ||
|
|
21
|
+
(adaptor instanceof CacheAdaptor) || adaptor instanceof UrlAdaptor);
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
} else {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
} else {
|
|
28
|
+
if (parent.dataSource instanceof DataManager) {
|
|
29
|
+
const adaptor: AdaptorOptions = parent.dataSource.adaptor;
|
|
30
|
+
return (adaptor instanceof ODataAdaptor ||
|
|
31
|
+
(adaptor instanceof WebApiAdaptor) || (adaptor instanceof WebMethodAdaptor) ||
|
|
32
|
+
(adaptor instanceof CacheAdaptor) || adaptor instanceof UrlAdaptor);
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @param {TreeGrid | IGrid} parent - Tree Grid or Grid instance
|
|
40
|
+
* @returns {boolean} - Returns whether custom binding
|
|
41
|
+
*/
|
|
42
|
+
export function isCountRequired(parent: TreeGrid | IGrid) : boolean {
|
|
43
|
+
if (parent.dataSource && 'result' in parent.dataSource) {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
51
|
+
* @returns {boolean} - Returns whether checkbox column is enabled
|
|
52
|
+
*/
|
|
53
|
+
export function isCheckboxcolumn(parent: TreeGrid) : boolean {
|
|
54
|
+
for (let i: number = 0; i < parent.columns.length; i++) {
|
|
55
|
+
if ((parent.columns[parseInt(i.toString(), 10)] as ColumnModel).showCheckbox) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
64
|
+
* @returns {boolean} - Returns whether filtering and searching done
|
|
65
|
+
*/
|
|
66
|
+
export function isFilterChildHierarchy(parent: TreeGrid): boolean {
|
|
67
|
+
if ((!isNullOrUndefined(parent.grid.searchSettings.key) && parent.grid.searchSettings.key !== '' &&
|
|
68
|
+
(parent.searchSettings.hierarchyMode === 'Child' || parent.searchSettings.hierarchyMode === 'None')) ||
|
|
69
|
+
(parent.allowFiltering && parent.grid.filterSettings.columns.length &&
|
|
70
|
+
(parent.filterSettings.hierarchyMode === 'Child' || parent.filterSettings.hierarchyMode === 'None'))) {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @param {Object} records - Define records for which parent records has to be found
|
|
78
|
+
* @hidden
|
|
79
|
+
* @returns {Object} - Returns parent records collection
|
|
80
|
+
*/
|
|
81
|
+
export function findParentRecords(records: Object): Object {
|
|
82
|
+
const datas: Object[] = [];
|
|
83
|
+
const recordsLength: number = Object.keys(records).length;
|
|
84
|
+
for (let i: number = 0, len: number = recordsLength; i < len; i++) {
|
|
85
|
+
const hasChild: boolean = getObject('hasChildRecords', records[parseInt(i.toString(), 10)]);
|
|
86
|
+
if (hasChild) {
|
|
87
|
+
datas.push(records[parseInt(i.toString(), 10)]);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return datas;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
94
|
+
* @returns {boolean} - Returns the expand status of record
|
|
95
|
+
* @param {ITreeData} record - Define the record for which expand status has be found
|
|
96
|
+
* @param {ITreeData[]} parents - Parent Data collection
|
|
97
|
+
* @hidden
|
|
98
|
+
*/
|
|
99
|
+
export function getExpandStatus (parent: TreeGrid, record: ITreeData, parents: ITreeData[]) : boolean {
|
|
100
|
+
const parentRecord: ITreeData = isNullOrUndefined(record.parentItem) ? null :
|
|
101
|
+
getParentData(parent, record.parentItem.uniqueID);
|
|
102
|
+
let childParent: ITreeData;
|
|
103
|
+
if (parentRecord != null) {
|
|
104
|
+
if (parent.initialRender && !isNullOrUndefined(parentRecord[parent.expandStateMapping])
|
|
105
|
+
&& !parentRecord[parent.expandStateMapping]) {
|
|
106
|
+
parentRecord.expanded = false;
|
|
107
|
+
return false;
|
|
108
|
+
} else if (parentRecord.expanded === false) {
|
|
109
|
+
return false;
|
|
110
|
+
} else if (parentRecord.parentItem) {
|
|
111
|
+
childParent = getParentData(parent, parentRecord.parentItem.uniqueID);
|
|
112
|
+
if (childParent && parent.initialRender && !isNullOrUndefined(childParent[parent.expandStateMapping])
|
|
113
|
+
&& !childParent[parent.expandStateMapping]) {
|
|
114
|
+
childParent.expanded = false;
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
if (childParent && childParent.expanded === false) {
|
|
118
|
+
return false;
|
|
119
|
+
} else if (childParent) {
|
|
120
|
+
return getExpandStatus(parent, childParent, parents);
|
|
121
|
+
}
|
|
122
|
+
return true;
|
|
123
|
+
} else {
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* @param {ITreeData} records - Define the record for which child records has to be found
|
|
132
|
+
* @returns {Object[]} - Returns child records collection
|
|
133
|
+
* @hidden
|
|
134
|
+
*/
|
|
135
|
+
export function findChildrenRecords(records: ITreeData): Object[] {
|
|
136
|
+
let datas: Object[] = [];
|
|
137
|
+
if (isNullOrUndefined(records) || (!records.hasChildRecords && !isNullOrUndefined(records.childRecords)
|
|
138
|
+
&& !records.childRecords.length)) {
|
|
139
|
+
return [];
|
|
140
|
+
}
|
|
141
|
+
if (!isNullOrUndefined(records.childRecords)) {
|
|
142
|
+
const childRecords: ITreeData[] = records.childRecords.filter((item: ITreeData) => !item.isSummaryRow);
|
|
143
|
+
const keys: string[] = Object.keys(childRecords);
|
|
144
|
+
for (let i: number = 0, len: number = keys.length; i < len; i++) {
|
|
145
|
+
datas.push(childRecords[parseInt(i.toString(), 10)]);
|
|
146
|
+
if (childRecords[parseInt(i.toString(), 10)].hasChildRecords ||
|
|
147
|
+
(!isNullOrUndefined(childRecords[parseInt(i.toString(), 10)].childRecords) &&
|
|
148
|
+
childRecords[parseInt(i.toString(), 10)].childRecords.length)) {
|
|
149
|
+
datas = [...datas, ...findChildrenRecords(childRecords[parseInt(i.toString(), 10)])];
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return datas;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @param {TreeGrid} parent - Tree Grid instance
|
|
158
|
+
* @returns {boolean} - Returns whether local data binding
|
|
159
|
+
*/
|
|
160
|
+
export function isOffline(parent: TreeGrid) : boolean {
|
|
161
|
+
if (isRemoteData(parent)) {
|
|
162
|
+
const dm: DataManager = <DataManager>parent.dataSource;
|
|
163
|
+
return !isNullOrUndefined(dm.ready);
|
|
164
|
+
}
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @param {Object[]} array - Defines the array to be cloned
|
|
170
|
+
* @returns {Object[]} - Returns cloned array collection
|
|
171
|
+
*/
|
|
172
|
+
export function extendArray(array: Object[]): Object[] {
|
|
173
|
+
const objArr: Object[] = []; let obj: Object ; let keys: string[];
|
|
174
|
+
for (let i: number = 0; array && i < array.length; i++) {
|
|
175
|
+
keys = Object.keys(array[parseInt(i.toString(), 10)]); obj = {};
|
|
176
|
+
for (let j: number = 0; j < keys.length; j++) {
|
|
177
|
+
obj[keys[parseInt(j.toString(), 10)]] = array[parseInt(i.toString(), 10)][keys[parseInt(j.toString(), 10)]];
|
|
178
|
+
}
|
|
179
|
+
objArr.push(obj);
|
|
180
|
+
}
|
|
181
|
+
return objArr;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @param {ITreeData} value - Defined the dirty data to be cleaned
|
|
186
|
+
* @returns {ITreeData} - Returns cleaned original data
|
|
187
|
+
*/
|
|
188
|
+
export function getPlainData(value: ITreeData): ITreeData {
|
|
189
|
+
delete value.hasChildRecords; delete value.childRecords; delete value.index; delete value.parentItem;
|
|
190
|
+
delete value.level; delete value.taskData; delete value.uniqueID;
|
|
191
|
+
return value;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @param {TreeGrid} parent - TreeGrid instance
|
|
196
|
+
* @param {string} value - IdMapping field name
|
|
197
|
+
* @param {boolean} requireFilter - Specified whether treegrid data is filtered
|
|
198
|
+
* @returns {ITreeData} - Returns IdMapping matched record
|
|
199
|
+
*/
|
|
200
|
+
export function getParentData(parent: TreeGrid, value: string, requireFilter?: boolean) : ITreeData {
|
|
201
|
+
if (requireFilter) {
|
|
202
|
+
const idFilter: string = 'uniqueIDFilterCollection';
|
|
203
|
+
return parent[`${idFilter}`][`${value}`];
|
|
204
|
+
} else {
|
|
205
|
+
const id: string = 'uniqueIDCollection';
|
|
206
|
+
return parent[`${id}`][`${value}`];
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* @param {HTMLTableRowElement} el - Row element
|
|
212
|
+
* @returns {boolean} - Returns whether hidden
|
|
213
|
+
*/
|
|
214
|
+
export function isHidden(el: HTMLTableRowElement): boolean {
|
|
215
|
+
const style: CSSStyleDeclaration = window.getComputedStyle(el);
|
|
216
|
+
return ((style.display === 'none') || (style.visibility === 'hidden'));
|
|
217
|
+
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,51 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
2
|
+
"_from": "@syncfusion/ej2-treegrid@*",
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@20.13.0",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha512-GMC0p8nWtl3jD49ADd/wqepdA9S0FEKGwk/CHVkjZVDJDep+PxgdHZL6xIMS3yrwU38egx9K7HLy5CucnuygGg==",
|
|
6
|
+
"_location": "/@syncfusion/ej2-treegrid",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "@syncfusion/ej2-treegrid@*",
|
|
12
|
+
"name": "@syncfusion/ej2-treegrid",
|
|
13
|
+
"escapedName": "@syncfusion%2fej2-treegrid",
|
|
14
|
+
"scope": "@syncfusion",
|
|
15
|
+
"rawSpec": "*",
|
|
16
|
+
"saveSpec": null,
|
|
17
|
+
"fetchSpec": "*"
|
|
18
|
+
},
|
|
19
|
+
"_requiredBy": [
|
|
20
|
+
"/",
|
|
21
|
+
"/@syncfusion/ej2",
|
|
22
|
+
"/@syncfusion/ej2-angular-treegrid",
|
|
23
|
+
"/@syncfusion/ej2-gantt",
|
|
24
|
+
"/@syncfusion/ej2-react-treegrid",
|
|
25
|
+
"/@syncfusion/ej2-vue-treegrid"
|
|
26
|
+
],
|
|
27
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-development/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.13.0.tgz",
|
|
28
|
+
"_shasum": "7b67b44c412dafac81d7f6f4eefe8f4c5e10e6f7",
|
|
29
|
+
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
|
+
"_where": "D:\\SF3992\\WFH\\Nexus\\release",
|
|
31
|
+
"author": {
|
|
32
|
+
"name": "Syncfusion Inc."
|
|
33
|
+
},
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/syncfusion/ej2-treegrid/issues"
|
|
36
|
+
},
|
|
37
|
+
"bundleDependencies": false,
|
|
10
38
|
"dependencies": {
|
|
11
|
-
"@syncfusion/ej2-base": "~
|
|
12
|
-
"@syncfusion/ej2-data": "~
|
|
13
|
-
"@syncfusion/ej2-grids": "~
|
|
14
|
-
"@syncfusion/ej2-popups": "~
|
|
39
|
+
"@syncfusion/ej2-base": "~31.1.17",
|
|
40
|
+
"@syncfusion/ej2-data": "~31.1.17",
|
|
41
|
+
"@syncfusion/ej2-grids": "~31.1.17",
|
|
42
|
+
"@syncfusion/ej2-popups": "~31.1.17"
|
|
15
43
|
},
|
|
44
|
+
"deprecated": false,
|
|
45
|
+
"description": "Essential JS 2 TreeGrid Component",
|
|
16
46
|
"devDependencies": {},
|
|
47
|
+
"es2015": "./dist/es6/ej2-treegrid.es5.js",
|
|
48
|
+
"homepage": "https://www.syncfusion.com/javascript-ui-controls",
|
|
17
49
|
"keywords": [
|
|
18
50
|
"ej2",
|
|
19
51
|
"syncfusion",
|
|
@@ -35,11 +67,15 @@
|
|
|
35
67
|
"collapsible-table",
|
|
36
68
|
"multi-level-table"
|
|
37
69
|
],
|
|
70
|
+
"license": "SEE LICENSE IN license",
|
|
71
|
+
"main": "./dist/ej2-treegrid.umd.min.js",
|
|
72
|
+
"module": "./index.js",
|
|
73
|
+
"name": "@syncfusion/ej2-treegrid",
|
|
38
74
|
"repository": {
|
|
39
75
|
"type": "git",
|
|
40
|
-
"url": "https://github.com/syncfusion/ej2-treegrid.git"
|
|
76
|
+
"url": "git+https://github.com/syncfusion/ej2-treegrid.git"
|
|
41
77
|
},
|
|
42
78
|
"typings": "index.d.ts",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
79
|
+
"version": "31.1.17",
|
|
80
|
+
"sideEffects": false
|
|
45
81
|
}
|
|
@@ -99,7 +99,9 @@ var ContextMenu = /** @class */ (function () {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
tObj.grid.contextMenuModule.contextMenu.hideItems(tObj.grid.contextMenuModule['hiddenItems']);
|
|
102
|
-
indent
|
|
102
|
+
if (indent || outdent) {
|
|
103
|
+
indent.style.display = outdent.style.display = 'none';
|
|
104
|
+
}
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
};
|
|
@@ -53,6 +53,14 @@ export declare class ExcelExport {
|
|
|
53
53
|
* @returns {void}
|
|
54
54
|
*/
|
|
55
55
|
private excelQueryCellInfo;
|
|
56
|
+
/**
|
|
57
|
+
* TreeGrid Excel Export Aggregate cell modifier
|
|
58
|
+
*
|
|
59
|
+
* @param {AggregateQueryCellInfoEventArgs} args - current cell details
|
|
60
|
+
* @hidden
|
|
61
|
+
* @returns {void}
|
|
62
|
+
*/
|
|
63
|
+
private excelAggregateCellInfo;
|
|
56
64
|
private exportRowDataBound;
|
|
57
65
|
private finalPageSetup;
|
|
58
66
|
private isLocal;
|
|
@@ -39,6 +39,7 @@ var ExcelExport = /** @class */ (function () {
|
|
|
39
39
|
this.parent.on('updateResults', this.updateExcelResultModel, this);
|
|
40
40
|
this.parent.on('excelCellInfo', this.excelQueryCellInfo, this);
|
|
41
41
|
this.parent.grid.on('export-RowDataBound', this.exportRowDataBound, this);
|
|
42
|
+
this.parent.on('excelAggregateCellInfo', this.excelAggregateCellInfo, this);
|
|
42
43
|
this.parent.grid.on('finalPageSetup', this.finalPageSetup, this);
|
|
43
44
|
};
|
|
44
45
|
/**
|
|
@@ -61,6 +62,7 @@ var ExcelExport = /** @class */ (function () {
|
|
|
61
62
|
this.parent.off('updateResults', this.updateExcelResultModel);
|
|
62
63
|
this.parent.off('excelCellInfo', this.excelQueryCellInfo);
|
|
63
64
|
this.parent.grid.off('export-RowDataBound', this.exportRowDataBound);
|
|
65
|
+
this.parent.off('excelAggregateCellInfo', this.excelAggregateCellInfo);
|
|
64
66
|
this.parent.grid.off('finalPageSetup', this.finalPageSetup);
|
|
65
67
|
};
|
|
66
68
|
ExcelExport.prototype.updateExcelResultModel = function (returnResult) {
|
|
@@ -188,6 +190,16 @@ var ExcelExport = /** @class */ (function () {
|
|
|
188
190
|
this.parent.notify('updateResults', args);
|
|
189
191
|
this.parent.trigger('excelQueryCellInfo', args);
|
|
190
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* TreeGrid Excel Export Aggregate cell modifier
|
|
195
|
+
*
|
|
196
|
+
* @param {AggregateQueryCellInfoEventArgs} args - current cell details
|
|
197
|
+
* @hidden
|
|
198
|
+
* @returns {void}
|
|
199
|
+
*/
|
|
200
|
+
ExcelExport.prototype.excelAggregateCellInfo = function (args) {
|
|
201
|
+
this.parent.trigger('excelAggregateQueryCellInfo', args);
|
|
202
|
+
};
|
|
191
203
|
ExcelExport.prototype.exportRowDataBound = function (excelRow) {
|
|
192
204
|
if (excelRow.type === 'excel') {
|
|
193
205
|
var excelrowobj = excelRow.rowObj.data;
|
|
@@ -52,7 +52,7 @@ var Freeze = /** @class */ (function () {
|
|
|
52
52
|
}
|
|
53
53
|
for (var i = 0; i < rows.length; i++) {
|
|
54
54
|
var row = rows[parseInt(i.toString(), 10)];
|
|
55
|
-
var rData = this.parent.grid.getRowObjectFromUID(row.getAttribute('data-
|
|
55
|
+
var rData = this.parent.grid.getRowObjectFromUID(row.getAttribute('data-uid')).data;
|
|
56
56
|
if (!isNullOrUndefined(movableRows) && row.parentElement.firstElementChild.clientHeight > 0) {
|
|
57
57
|
row.style.height = row.parentElement.firstElementChild.clientHeight + 'px';
|
|
58
58
|
}
|
|
@@ -52,4 +52,12 @@ export declare class PdfExport {
|
|
|
52
52
|
* @returns {void}
|
|
53
53
|
*/
|
|
54
54
|
private pdfQueryCellInfo;
|
|
55
|
+
/**
|
|
56
|
+
* TreeGrid PDF Export Aggregate cell modifier
|
|
57
|
+
*
|
|
58
|
+
* @param {AggregateQueryCellInfoEventArgs} args - current cell details
|
|
59
|
+
* @hidden
|
|
60
|
+
* @returns {void}
|
|
61
|
+
*/
|
|
62
|
+
private pdfAggregateCellInfo;
|
|
55
63
|
}
|
|
@@ -36,6 +36,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
36
36
|
PdfExport.prototype.addEventListener = function () {
|
|
37
37
|
this.parent.on('pdfCellInfo', this.pdfQueryCellInfo, this);
|
|
38
38
|
this.parent.on('updateResults', this.updatePdfResultModel, this);
|
|
39
|
+
this.parent.on('pdfAggregateCellInfo', this.pdfAggregateCellInfo, this);
|
|
39
40
|
};
|
|
40
41
|
/**
|
|
41
42
|
* @hidden
|
|
@@ -47,6 +48,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
47
48
|
}
|
|
48
49
|
this.parent.off('pdfCellInfo', this.pdfQueryCellInfo);
|
|
49
50
|
this.parent.off('updateResults', this.updatePdfResultModel);
|
|
51
|
+
this.parent.off('pdfAggregateCellInfo', this.pdfAggregateCellInfo);
|
|
50
52
|
};
|
|
51
53
|
/**
|
|
52
54
|
* To destroy the PDF Export
|
|
@@ -162,6 +164,16 @@ var PdfExport = /** @class */ (function () {
|
|
|
162
164
|
this.parent.notify('updateResults', args);
|
|
163
165
|
this.parent.trigger('pdfQueryCellInfo', args);
|
|
164
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* TreeGrid PDF Export Aggregate cell modifier
|
|
169
|
+
*
|
|
170
|
+
* @param {AggregateQueryCellInfoEventArgs} args - current cell details
|
|
171
|
+
* @hidden
|
|
172
|
+
* @returns {void}
|
|
173
|
+
*/
|
|
174
|
+
PdfExport.prototype.pdfAggregateCellInfo = function (args) {
|
|
175
|
+
this.parent.trigger('pdfAggregateQueryCellInfo', args);
|
|
176
|
+
};
|
|
165
177
|
return PdfExport;
|
|
166
178
|
}());
|
|
167
179
|
export { PdfExport };
|
|
@@ -106,7 +106,7 @@ var Selection = /** @class */ (function () {
|
|
|
106
106
|
var headerCelllength = this.parent.getHeaderContent().querySelectorAll('.e-headercelldiv').length;
|
|
107
107
|
for (var j = 0; j < headerCelllength; j++) {
|
|
108
108
|
var headercell = this.parent.getHeaderContent().querySelectorAll('.e-headercelldiv')[parseInt(j.toString(), 10)];
|
|
109
|
-
if (headercell.getAttribute('
|
|
109
|
+
if (headercell.getAttribute('data-mappinguid') === mappingUid) {
|
|
110
110
|
columnIndex = j;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -162,8 +162,8 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
162
162
|
if (this.setEndIndexToGantt) {
|
|
163
163
|
this.ganttEndIndex = counts.endIndex;
|
|
164
164
|
}
|
|
165
|
-
if ((counts.endIndex + this.parent.pageSettings.pageSize >= counts.count &&
|
|
166
|
-
|| !(this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
165
|
+
if (((counts.endIndex + this.parent.pageSettings.pageSize >= counts.count) &&
|
|
166
|
+
(this.parent.root && counts.count !== this.ganttEndIndex) && this.parent['isAddedFromGantt']) || !(this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
167
167
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
168
168
|
endIndex = counts.count;
|
|
169
169
|
this.setEndIndexToGantt = false;
|
|
@@ -329,7 +329,7 @@ var DataManipulation = /** @class */ (function () {
|
|
|
329
329
|
var targetEle = rowDetails.rows[parseInt(i.toString(), 10)].getElementsByClassName('e-treegridcollapse')[0];
|
|
330
330
|
childRecord = this.parent.rowTemplate ?
|
|
331
331
|
this.parent.grid.getCurrentViewRecords()[rowDetails.rows[parseInt(i.toString(), 10)].rowIndex] :
|
|
332
|
-
this.parent.grid.getRowObjectFromUID(rowDetails.rows[parseInt(i.toString(), 10)].getAttribute('data-
|
|
332
|
+
this.parent.grid.getRowObjectFromUID(rowDetails.rows[parseInt(i.toString(), 10)].getAttribute('data-uid')).data;
|
|
333
333
|
if (!isNullOrUndefined(targetEle) && childRecord.expanded) {
|
|
334
334
|
addClass([targetEle], 'e-treegridexpand');
|
|
335
335
|
removeClass([targetEle], 'e-treegridcollapse');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, ModuleDeclaration, extend, merge, SanitizeHtmlHelper} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, getNumberFormat } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel, Freeze as FreezeColumn } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid, parentsUntil } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectingEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties, ActionEventArgs } from './interface';import { DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';import * as literals from '../base/constant';
|
|
1
|
+
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, ModuleDeclaration, extend, merge, SanitizeHtmlHelper} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, getNumberFormat } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel, Freeze as FreezeColumn } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid, parentsUntil } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectingEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs, AggregateQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties, ActionEventArgs } from './interface';import { DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';import * as literals from '../base/constant';import { ColumnChooserSettings } from '../models/column-chooser-settings';import { ColumnChooserSettingsModel } from '../models/column-chooser-settings-model';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -220,7 +220,6 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
220
220
|
currencyCode?: string;
|
|
221
221
|
|
|
222
222
|
/**
|
|
223
|
-
* @hidden
|
|
224
223
|
* It used to render pager template
|
|
225
224
|
* @default null
|
|
226
225
|
* @aspType string
|
|
@@ -243,6 +242,13 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
243
242
|
*/
|
|
244
243
|
showColumnChooser?: boolean;
|
|
245
244
|
|
|
245
|
+
/**
|
|
246
|
+
* Configures the column chooser in the Grid.
|
|
247
|
+
*
|
|
248
|
+
* @default { columnChooserOperator: 'startsWith' }
|
|
249
|
+
*/
|
|
250
|
+
columnChooserSettings?: ColumnChooserSettingsModel;
|
|
251
|
+
|
|
246
252
|
/**
|
|
247
253
|
* If `allowSorting` is set to true, it allows sorting of treegrid records when column header is clicked.
|
|
248
254
|
*
|
|
@@ -488,6 +494,16 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
488
494
|
*/
|
|
489
495
|
enableStickyHeader?: boolean;
|
|
490
496
|
|
|
497
|
+
/**
|
|
498
|
+
* The empty record template that renders customized element or text or image instead of displaying the empty record message in the TreeGrid.
|
|
499
|
+
*
|
|
500
|
+
* > It accepts either the [template string](../../common/template-engine/) or the HTML element ID.
|
|
501
|
+
*
|
|
502
|
+
* @default null
|
|
503
|
+
* @aspType string
|
|
504
|
+
*/
|
|
505
|
+
emptyRecordTemplate?: string | Function;
|
|
506
|
+
|
|
491
507
|
/**
|
|
492
508
|
* Defines the scrollable height of the TreeGrid content.
|
|
493
509
|
*
|
|
@@ -1032,6 +1048,20 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
1032
1048
|
*/
|
|
1033
1049
|
excelQueryCellInfo?: EmitType<ExcelQueryCellInfoEventArgs>;
|
|
1034
1050
|
|
|
1051
|
+
/**
|
|
1052
|
+
* Triggers before exporting aggregate cell to PDF document. You can also customize the PDF cells.
|
|
1053
|
+
*
|
|
1054
|
+
* @event pdfAggregateQueryCellInfo
|
|
1055
|
+
*/
|
|
1056
|
+
pdfAggregateQueryCellInfo?: EmitType<AggregateQueryCellInfoEventArgs>;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Triggers before exporting aggregate cell to Excel document.
|
|
1060
|
+
*
|
|
1061
|
+
* @event excelAggregateQueryCellInfo
|
|
1062
|
+
*/
|
|
1063
|
+
excelAggregateQueryCellInfo?: EmitType<AggregateQueryCellInfoEventArgs>;
|
|
1064
|
+
|
|
1035
1065
|
/**
|
|
1036
1066
|
* Triggers before each header cell is exported to an Excel file, allowing customization of cells.
|
|
1037
1067
|
*
|