@syncfusion/ej2-treegrid 23.2.7 → 24.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -56
- package/README.md +1 -1
- 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 +60 -17
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +59 -16
- 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/package.json +10 -10
- package/src/treegrid/actions/clipboard.js +3 -3
- package/src/treegrid/actions/excel-export.js +2 -1
- package/src/treegrid/actions/pdf-export.js +2 -1
- package/src/treegrid/actions/selection.js +2 -2
- package/src/treegrid/actions/summary.js +7 -1
- package/src/treegrid/actions/virtual-scroll.js +2 -1
- package/src/treegrid/base/treegrid-model.d.ts +1 -1
- package/src/treegrid/base/treegrid.d.ts +1 -0
- package/src/treegrid/base/treegrid.js +18 -2
- package/src/treegrid/renderer/render.js +25 -5
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 24.1.44
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-treegrid@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-treegrid@
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@24.1.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-zSmjGDxO8ex+mNgGnGRsnl/O5KycAJwdwMGje8f1qD8DwRXOqnagbuyp57d3hdFmE8cnfvU13C85tzzDq1awLQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treegrid",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"/@syncfusion/ej2-react-treegrid",
|
|
25
25
|
"/@syncfusion/ej2-vue-treegrid"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-24.1.41.tgz",
|
|
28
|
+
"_shasum": "82ee5c6713c83420e1fcf226b3fe37c09582e629",
|
|
29
29
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
|
-
"_where": "/jenkins/workspace/elease-
|
|
30
|
+
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
|
|
31
31
|
"author": {
|
|
32
32
|
"name": "Syncfusion Inc."
|
|
33
33
|
},
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~
|
|
40
|
-
"@syncfusion/ej2-data": "~
|
|
41
|
-
"@syncfusion/ej2-grids": "~
|
|
42
|
-
"@syncfusion/ej2-popups": "~
|
|
39
|
+
"@syncfusion/ej2-base": "~24.1.42",
|
|
40
|
+
"@syncfusion/ej2-data": "~24.1.41",
|
|
41
|
+
"@syncfusion/ej2-grids": "~24.1.44",
|
|
42
|
+
"@syncfusion/ej2-popups": "~24.1.44"
|
|
43
43
|
},
|
|
44
44
|
"deprecated": false,
|
|
45
45
|
"description": "Essential JS 2 TreeGrid Component",
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"url": "git+https://github.com/syncfusion/ej2-treegrid.git"
|
|
67
67
|
},
|
|
68
68
|
"typings": "index.d.ts",
|
|
69
|
-
"version": "
|
|
69
|
+
"version": "24.1.44",
|
|
70
70
|
"sideEffects": false
|
|
71
71
|
}
|
|
@@ -47,7 +47,7 @@ var TreeClipboard = /** @class */ (function (_super) {
|
|
|
47
47
|
this.treeCopyContent += '\n';
|
|
48
48
|
}
|
|
49
49
|
if (!rows[selectedIndexes[parseInt(i.toString(), 10)]].classList.contains('e-summaryrow')) {
|
|
50
|
-
var cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell
|
|
50
|
+
var cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell'));
|
|
51
51
|
var uniqueid = this.treeGridParent.getSelectedRecords()[parseInt(i.toString(), 10)]["" + uniqueID];
|
|
52
52
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
53
53
|
if (this.treeGridParent.copyHierarchyMode === 'Parent' || this.treeGridParent.copyHierarchyMode === 'Both') {
|
|
@@ -109,7 +109,7 @@ var TreeClipboard = /** @class */ (function (_super) {
|
|
|
109
109
|
if (!isNullOrUndefined(currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]) &&
|
|
110
110
|
currentRecords[parseInt(j.toString(), 10)]["" + uniqueID] === currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]["" + uniqueID]) {
|
|
111
111
|
selectedIndex = j;
|
|
112
|
-
var cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell
|
|
112
|
+
var cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell'));
|
|
113
113
|
var uniqueid = currentRecords[parseInt(j.toString(), 10)]["" + uniqueID];
|
|
114
114
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
115
115
|
this["" + getCopyData](cells, false, '\t', withHeader);
|
|
@@ -164,7 +164,7 @@ var TreeClipboard = /** @class */ (function (_super) {
|
|
|
164
164
|
for (var j = 0; j < currentRecords.length; j++) {
|
|
165
165
|
if (!isNullOrUndefined(childData[parseInt(i.toString(), 10)]["" + uniqueID]) && currentRecords[parseInt(j.toString(), 10)]["" + uniqueID] === childData[parseInt(i.toString(), 10)]["" + uniqueID]) {
|
|
166
166
|
if ((!isNullOrUndefined(rows[parseInt(j.toString(), 10)])) && !rows[parseInt(j.toString(), 10)].classList.contains('e-summaryrow')) {
|
|
167
|
-
var cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell
|
|
167
|
+
var cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell'));
|
|
168
168
|
var uniqueid = currentRecords[parseInt(j.toString(), 10)]["" + uniqueID];
|
|
169
169
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
170
170
|
this["" + getCopyData](cells, false, '\t', withHeader);
|
|
@@ -136,7 +136,7 @@ var ExcelExport = /** @class */ (function () {
|
|
|
136
136
|
if (!this.isLocal()) {
|
|
137
137
|
this.parent.flatData = [];
|
|
138
138
|
}
|
|
139
|
-
if (property && property.dataSource) {
|
|
139
|
+
if (property && property.dataSource && this.isLocal()) {
|
|
140
140
|
var flatsData = this.parent.flatData;
|
|
141
141
|
var dataSrc = property.dataSource instanceof DataManager ? property.dataSource.dataSource.json : property.dataSource;
|
|
142
142
|
this.parent.dataModule.convertToFlatData(dataSrc);
|
|
@@ -145,6 +145,7 @@ var ExcelExport = /** @class */ (function () {
|
|
|
145
145
|
}
|
|
146
146
|
property = isNullOrUndefined(property) ? Object() : property;
|
|
147
147
|
property.dataSource = new DataManager({ json: dtSrc });
|
|
148
|
+
property.query = args['query'];
|
|
148
149
|
return property;
|
|
149
150
|
};
|
|
150
151
|
/**
|
|
@@ -131,7 +131,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
131
131
|
if (!isLocal) {
|
|
132
132
|
this.parent.flatData = [];
|
|
133
133
|
}
|
|
134
|
-
if (prop && prop.dataSource) {
|
|
134
|
+
if (prop && prop.dataSource && isLocal) {
|
|
135
135
|
var flatDatas = this.parent.flatData;
|
|
136
136
|
var dataSrc = prop.dataSource instanceof DataManager ? prop.dataSource.dataSource.json : prop.dataSource;
|
|
137
137
|
this.parent.dataModule.convertToFlatData(dataSrc);
|
|
@@ -140,6 +140,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
140
140
|
}
|
|
141
141
|
prop = isNullOrUndefined(prop) ? {} : prop;
|
|
142
142
|
prop.dataSource = new DataManager({ json: dtSrc });
|
|
143
|
+
prop.query = args['query'];
|
|
143
144
|
return prop;
|
|
144
145
|
};
|
|
145
146
|
/**
|
|
@@ -368,8 +368,8 @@ var Selection = /** @class */ (function () {
|
|
|
368
368
|
if (this.parent.frozenRows || this.parent.getFrozenColumns()) {
|
|
369
369
|
movableTr = this.parent.getDataRows()[parseInt(recordIndex.toString(), 10)];
|
|
370
370
|
}
|
|
371
|
-
checkbox = tr.querySelectorAll('.e-frame')[0] ? tr.querySelectorAll('.e-frame')[0]
|
|
372
|
-
: movableTr.querySelectorAll('.e-frame')[0];
|
|
371
|
+
checkbox = tr.querySelectorAll('.e-hierarchycheckbox .e-frame')[0] ? tr.querySelectorAll('.e-hierarchycheckbox .e-frame')[0]
|
|
372
|
+
: movableTr.querySelectorAll('.e-hierarchycheckbox .e-frame')[0];
|
|
373
373
|
if (!isNullOrUndefined(checkbox)) {
|
|
374
374
|
removeClass([checkbox], ['e-check', 'e-stop', 'e-uncheck']);
|
|
375
375
|
}
|
|
@@ -2,6 +2,7 @@ import { Query, DataManager } from '@syncfusion/ej2-data';
|
|
|
2
2
|
import { getObject, calculateAggregate, Aggregate as GridAggregate, Grid, appendChildren } from '@syncfusion/ej2-grids';
|
|
3
3
|
import { findParentRecords } from '../utils';
|
|
4
4
|
import { isNullOrUndefined, setValue, createElement, extend } from '@syncfusion/ej2-base';
|
|
5
|
+
import * as events from '../base/constant';
|
|
5
6
|
/**
|
|
6
7
|
* TreeGrid Aggregate module
|
|
7
8
|
*
|
|
@@ -204,7 +205,12 @@ var Aggregate = /** @class */ (function () {
|
|
|
204
205
|
if (this.parent.isReact) {
|
|
205
206
|
var renderReactTemplates = 'renderReactTemplates';
|
|
206
207
|
tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property, '', null, null, cellElement);
|
|
207
|
-
|
|
208
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
209
|
+
var thisRef_1 = this;
|
|
210
|
+
// tslint:disable-next-line:typedef
|
|
211
|
+
thisRef_1.parent["" + renderReactTemplates](function () {
|
|
212
|
+
thisRef_1.parent.trigger(events.queryCellInfo, thisRef_1.parent['args']);
|
|
213
|
+
});
|
|
208
214
|
}
|
|
209
215
|
else {
|
|
210
216
|
appendChildren(cellElement, tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property));
|
|
@@ -125,7 +125,8 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
125
125
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
126
126
|
this.parent.grid.notify(events.virtualActionArgs, { setTop: true });
|
|
127
127
|
}
|
|
128
|
-
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']
|
|
128
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']
|
|
129
|
+
&& this.parent.grid.pageSettings.currentPage === this.parent.grid.contentModule['maxPage'])) {
|
|
129
130
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
130
131
|
endIndex = counts.count;
|
|
131
132
|
this.parent['isAddedFromGantt'] = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Fetch, ModuleDeclaration, extend, merge, SanitizeHtmlHelper} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, getNumberFormat } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { ActionEventArgs, TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectingEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties } from './interface';import { DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';import * as literals from '../base/constant';
|
|
1
|
+
import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Fetch, ModuleDeclaration, extend, merge, SanitizeHtmlHelper} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue, NumberFormatOptions, DateFormatOptions } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, getNumberFormat } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import { RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid, parentsUntil } from '@syncfusion/ej2-grids';import { LoadingIndicator } from '../models/loading-indicator';import { LoadingIndicatorModel } from '../models/loading-indicator-model';import { ActionEventArgs, TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectingEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred, UrlAdaptor } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties } from './interface';import { DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';import * as literals from '../base/constant';import { Tooltip } from '@syncfusion/ej2-popups';
|
|
2
2
|
import {ComponentModel} from '@syncfusion/ej2-base';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1393,6 +1393,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
1393
1393
|
private ignoreInArrays;
|
|
1394
1394
|
private ignoreInColumn;
|
|
1395
1395
|
private mouseClickHandler;
|
|
1396
|
+
private mouseMoveHandler;
|
|
1396
1397
|
/**
|
|
1397
1398
|
* Returns TreeGrid rows
|
|
1398
1399
|
*
|
|
@@ -22,7 +22,7 @@ import { removeClass, Complex, Collection, getValue } from '@syncfusion/ej2-base
|
|
|
22
22
|
import { Event, Property, NotifyPropertyChanges, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';
|
|
23
23
|
import { Column } from '../models/column';
|
|
24
24
|
import { getNumberFormat } from '@syncfusion/ej2-grids';
|
|
25
|
-
import { RowDropSettings, getUid } from '@syncfusion/ej2-grids';
|
|
25
|
+
import { RowDropSettings, getUid, parentsUntil } from '@syncfusion/ej2-grids';
|
|
26
26
|
import { LoadingIndicator } from '../models/loading-indicator';
|
|
27
27
|
import { FilterSettings } from '../models/filter-settings';
|
|
28
28
|
import { TextWrapSettings } from '../models/textwrap-settings';
|
|
@@ -50,6 +50,7 @@ import { isHidden, getExpandStatus } from '../utils';
|
|
|
50
50
|
import { editAction } from '../actions/crud-actions';
|
|
51
51
|
import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';
|
|
52
52
|
import * as literals from '../base/constant';
|
|
53
|
+
import { Tooltip } from '@syncfusion/ej2-popups';
|
|
53
54
|
/**
|
|
54
55
|
* Represents the TreeGrid component.
|
|
55
56
|
* ```html
|
|
@@ -509,6 +510,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
509
510
|
TreeGrid.prototype.wireEvents = function () {
|
|
510
511
|
EventHandler.add(this.grid.element, 'click', this.mouseClickHandler, this);
|
|
511
512
|
EventHandler.add(this.element, 'touchend', this.mouseClickHandler, this);
|
|
513
|
+
EventHandler.add(this.element, 'mousemove', this.mouseMoveHandler, this);
|
|
512
514
|
this.keyboardModule = new KeyboardEvents(this.element, {
|
|
513
515
|
keyAction: this.treeGridkeyActionHandler.bind(this),
|
|
514
516
|
keyConfigs: this.keyConfigs,
|
|
@@ -1994,6 +1996,20 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1994
1996
|
}
|
|
1995
1997
|
}
|
|
1996
1998
|
};
|
|
1999
|
+
TreeGrid.prototype.mouseMoveHandler = function (e) {
|
|
2000
|
+
var showTooltip = false;
|
|
2001
|
+
var cols = this.getColumns();
|
|
2002
|
+
if (this.clipMode === 'EllipsisWithTooltip') {
|
|
2003
|
+
showTooltip = true;
|
|
2004
|
+
}
|
|
2005
|
+
var element = parentsUntil(e.target, 'e-ellipsistooltip');
|
|
2006
|
+
if ((showTooltip || (this.treeColumnIndex != -1 && cols[this.treeColumnIndex].clipMode === 'EllipsisWithTooltip')) && element != null && parseInt(element.getAttribute("data-colindex"), 10) == this.treeColumnIndex && element.children[0].scrollWidth > element.children[0].clientWidth) {
|
|
2007
|
+
var tooltip = new Tooltip({
|
|
2008
|
+
content: element.textContent
|
|
2009
|
+
});
|
|
2010
|
+
tooltip.appendTo(element);
|
|
2011
|
+
}
|
|
2012
|
+
};
|
|
1997
2013
|
/**
|
|
1998
2014
|
* Returns TreeGrid rows
|
|
1999
2015
|
*
|
|
@@ -3501,7 +3517,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3501
3517
|
var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
|
|
3502
3518
|
.cells[this.treeColumnIndex];
|
|
3503
3519
|
var row = rows[parseInt(i.toString(), 10)];
|
|
3504
|
-
var rowData = rowsObject.length
|
|
3520
|
+
var rowData = rowsObject.length !== 0 ? rowsObject[parseInt(i.toString(), 10)].data : new Object();
|
|
3505
3521
|
var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
|
|
3506
3522
|
this.renderModule.cellRender(arg);
|
|
3507
3523
|
}
|
|
@@ -84,7 +84,18 @@ var Render = /** @class */ (function () {
|
|
|
84
84
|
this.parent["" + lastRowBorder](args.row, true);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
this.parent.
|
|
87
|
+
if (this.parent.isReact) {
|
|
88
|
+
var renderReactTemplates = 'renderReactTemplates';
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
90
|
+
var thisRef_1 = this;
|
|
91
|
+
// tslint:disable-next-line:typedef
|
|
92
|
+
thisRef_1.parent["" + renderReactTemplates](function () {
|
|
93
|
+
thisRef_1.parent.trigger(events.rowDataBound, args);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.parent.trigger(events.rowDataBound, args);
|
|
98
|
+
}
|
|
88
99
|
};
|
|
89
100
|
/**
|
|
90
101
|
* cell renderer for tree column index cell
|
|
@@ -245,7 +256,10 @@ var Render = /** @class */ (function () {
|
|
|
245
256
|
}
|
|
246
257
|
}
|
|
247
258
|
}
|
|
248
|
-
|
|
259
|
+
this.parent['args'] = args;
|
|
260
|
+
if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))
|
|
261
|
+
|| ((this.parent.isReact) &&
|
|
262
|
+
!args.column['template'])) {
|
|
249
263
|
this.parent.trigger(events.queryCellInfo, args);
|
|
250
264
|
}
|
|
251
265
|
};
|
|
@@ -282,7 +296,12 @@ var Render = /** @class */ (function () {
|
|
|
282
296
|
this.parent.grid["" + portals] = this.parent["" + portals];
|
|
283
297
|
}
|
|
284
298
|
this.parent.notify('renderReactTemplate', this.parent["" + portals]);
|
|
285
|
-
|
|
299
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
300
|
+
var thisRef_2 = this;
|
|
301
|
+
// tslint:disable-next-line:typedef
|
|
302
|
+
thisRef_2.parent["" + renderReactTemplates](function () {
|
|
303
|
+
thisRef_2.parent.trigger(events.queryCellInfo, args);
|
|
304
|
+
});
|
|
286
305
|
}
|
|
287
306
|
else {
|
|
288
307
|
var str = 'isStringTemplate';
|
|
@@ -336,12 +355,13 @@ var Render = /** @class */ (function () {
|
|
|
336
355
|
Render.prototype.columnTemplateResult = function (args) {
|
|
337
356
|
this.templateResult = args.template;
|
|
338
357
|
};
|
|
339
|
-
|
|
358
|
+
// eslint-disable-next-line
|
|
359
|
+
Render.prototype.reactTemplateRender = function (args, callBack) {
|
|
340
360
|
var renderReactTemplates = 'renderReactTemplates';
|
|
341
361
|
var portals = 'portals';
|
|
342
362
|
this.parent["" + portals] = args;
|
|
343
363
|
this.parent.notify('renderReactTemplate', this.parent["" + portals]);
|
|
344
|
-
this.parent["" + renderReactTemplates]();
|
|
364
|
+
this.parent["" + renderReactTemplates](callBack);
|
|
345
365
|
};
|
|
346
366
|
Render.prototype.destroy = function () {
|
|
347
367
|
this.parent.grid.off('template-result', this.columnTemplateResult);
|