@syncfusion/ej2-treegrid 19.4.42 → 19.4.52

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.4.42
3
+ * version : 19.4.52
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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
@@ -47,19 +47,16 @@ class TreeGridHelper extends e2e_1.TestHelper {
47
47
  return this.selector('#' + this.id + ' .e-treegridcollapsed');
48
48
  }
49
49
  setModel(property, value) {
50
- let cy;
51
50
  return cy.get('#' + this.id).then((ele) => {
52
51
  return ele[0].ej2_instances[0][property] = value;
53
52
  });
54
53
  }
55
54
  getModel(property) {
56
- let cy;
57
55
  return cy.get('#' + this.id).then((ele) => {
58
56
  return ele[0].ej2_instances[0][property];
59
57
  });
60
58
  }
61
59
  invoke(fName, args = []) {
62
- let cy;
63
60
  return cy.get('#' + this.id).then((ele) => {
64
61
  var inst = ele[0].ej2_instances[0];
65
62
  return inst[fName].apply(inst, args);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@19.4.41",
3
+ "_id": "@syncfusion/ej2-treegrid@19.4.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Q0BEZTlMhWTpuQFJfqWrPg2AFGZSr0o/r27/wnml/9aKsn/Gcp9hWrIKWn5/3+ADWfQiYkTQ+negKVenoXoqcA==",
5
+ "_integrity": "sha512-H/Y2ah0xNhYjWj/A6X4sS8uZIdJPP/8RQyyDjr3ArzAzJZkrOPFtUrcEuAQRHjqSKRs9OOXME9xVgRbHETuBZw==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.4.41.tgz",
28
- "_shasum": "752b57c8545cdf6e5dba29d7270bef1d8a2d216c",
27
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.4.48.tgz",
28
+ "_shasum": "dc2917a172129e2d1ec9ac1fdccf78b9812cf09d",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~19.4.42",
40
- "@syncfusion/ej2-data": "~19.4.42",
41
- "@syncfusion/ej2-grids": "~19.4.42",
42
- "@syncfusion/ej2-popups": "~19.4.41"
39
+ "@syncfusion/ej2-base": "~19.4.52",
40
+ "@syncfusion/ej2-data": "~19.4.52",
41
+ "@syncfusion/ej2-grids": "~19.4.52",
42
+ "@syncfusion/ej2-popups": "~19.4.52"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -60,6 +60,6 @@
60
60
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
61
61
  },
62
62
  "typings": "index.d.ts",
63
- "version": "19.4.42",
63
+ "version": "19.4.52",
64
64
  "sideEffects": false
65
65
  }
@@ -45,6 +45,7 @@ export declare class InfiniteScroll {
45
45
  * @returns {void}
46
46
  */
47
47
  private contentready;
48
+ private collapseExpandInfinitechilds;
48
49
  /**
49
50
  * Handles the page query for Data operations and CRUD actions.
50
51
  *
@@ -3,7 +3,7 @@ import { RowRenderer, resetRowIndex } from '@syncfusion/ej2-grids';
3
3
  import { getValue, isNullOrUndefined, remove } from '@syncfusion/ej2-base';
4
4
  import * as events from '../base/constant';
5
5
  import { DataManager, Predicate, Query } from '@syncfusion/ej2-data';
6
- import { findChildrenRecords } from '../utils';
6
+ import { findChildrenRecords, getExpandStatus } from '../utils';
7
7
  /**
8
8
  * TreeGrid Infinite Scroll module will handle Infinite Scrolling.
9
9
  *
@@ -40,6 +40,7 @@ var InfiniteScroll = /** @class */ (function () {
40
40
  this.parent.grid.on('infinite-edit-handler', this.infiniteEditHandler, this);
41
41
  this.parent.grid.on('infinite-crud-cancel', this.createRows, this);
42
42
  this.parent.grid.on('content-ready', this.contentready, this);
43
+ this.parent.on(events.localPagedExpandCollapse, this.collapseExpandInfinitechilds, this);
43
44
  };
44
45
  /**
45
46
  * @hidden
@@ -55,6 +56,7 @@ var InfiniteScroll = /** @class */ (function () {
55
56
  this.parent.off(events.pagingActions, this.infinitePageAction);
56
57
  this.parent.grid.off('infinite-crud-cancel', this.createRows);
57
58
  this.parent.grid.off('content-ready', this.contentready);
59
+ this.parent.off(events.localPagedExpandCollapse, this.collapseExpandInfinitechilds);
58
60
  };
59
61
  /**
60
62
  * Handles the Expand Collapse action for Remote data with infinite scrolling.
@@ -104,6 +106,18 @@ var InfiniteScroll = /** @class */ (function () {
104
106
  }
105
107
  }
106
108
  };
109
+ InfiniteScroll.prototype.collapseExpandInfinitechilds = function (row) {
110
+ row.record.expanded = row.action === 'collapse' ? false : true;
111
+ var ret = {
112
+ result: this.parent.flatData,
113
+ row: row.row,
114
+ action: row.action,
115
+ record: row.record,
116
+ count: this.parent.flatData.length
117
+ };
118
+ var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
119
+ getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, { requestType: requestType });
120
+ };
107
121
  /**
108
122
  * Handles the page query for Data operations and CRUD actions.
109
123
  *
@@ -114,9 +128,13 @@ var InfiniteScroll = /** @class */ (function () {
114
128
  * @returns {void}
115
129
  */
116
130
  InfiniteScroll.prototype.infinitePageAction = function (pageingDetails) {
131
+ var _this = this;
117
132
  var dm = new DataManager(pageingDetails.result);
118
133
  var expanded = new Predicate('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
119
- var visualData = dm.executeLocal(new Query().where(expanded));
134
+ var infiniteParents = dm.executeLocal(new Query().where(expanded));
135
+ var visualData = infiniteParents.filter(function (e) {
136
+ return getExpandStatus(_this.parent, e, infiniteParents);
137
+ });
120
138
  var actionArgs = getValue('actionArgs', pageingDetails.actionArgs);
121
139
  var actions = getValue('actions', this.parent.grid.infiniteScrollModule);
122
140
  var initial = actions.some(function (value) { return value === actionArgs.requestType; });
@@ -150,6 +168,10 @@ var InfiniteScroll = /** @class */ (function () {
150
168
  query = query.take(this.parent.infiniteScrollSettings.initialBlocks * this.parent.pageSettings.pageSize);
151
169
  }
152
170
  else {
171
+ if ((pageingDetails.actionArgs['action'] === 'expand' || pageingDetails.actionArgs['action'] === 'collapse') && this.parent.grid.pageSettings.currentPage !== 1) {
172
+ current = 1;
173
+ size = this.parent.pageSettings.pageSize * this.parent.grid.pageSettings.currentPage;
174
+ }
153
175
  query = query.page(current, size);
154
176
  }
155
177
  }
@@ -26,6 +26,7 @@ export declare class Toolbar {
26
26
  removeEventListener(): void;
27
27
  private refreshToolbar;
28
28
  private toolbarClickHandler;
29
+ private eventTrigger;
29
30
  /**
30
31
  * Gets the toolbar of the TreeGrid.
31
32
  *
@@ -73,6 +73,7 @@ var Toolbar = /** @class */ (function () {
73
73
  };
74
74
  Toolbar.prototype.toolbarClickHandler = function (args) {
75
75
  var tObj = this.parent;
76
+ var action = 'action';
76
77
  if (this.parent.editSettings.mode === 'Cell' && this.parent.grid.editSettings.mode === 'Batch' &&
77
78
  args.item.id === this.parent.grid.element.id + '_update') {
78
79
  args.cancel = true;
@@ -97,10 +98,10 @@ var Toolbar = /** @class */ (function () {
97
98
  else {
98
99
  dropIndex = tObj.getSelectedRowIndexes()[0] - 1;
99
100
  }
100
- tObj.reorderRows([tObj.getSelectedRowIndexes()[0]], dropIndex, 'child');
101
+ this.parent[action] = 'indent';
102
+ this.eventTrigger('indent', dropIndex);
101
103
  }
102
104
  if (args.item.id === tObj.grid.element.id + '_outdent' && tObj.getSelectedRecords().length) {
103
- var index = tObj.getSelectedRowIndexes()[0];
104
105
  var dropIndex = void 0;
105
106
  var parentItem = tObj.getSelectedRecords()[0].parentItem;
106
107
  for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
@@ -108,9 +109,33 @@ var Toolbar = /** @class */ (function () {
108
109
  dropIndex = i;
109
110
  }
110
111
  }
111
- tObj.reorderRows([index], dropIndex, 'below');
112
+ this.parent[action] = 'outdent';
113
+ this.eventTrigger('outdent', dropIndex);
112
114
  }
113
115
  };
116
+ Toolbar.prototype.eventTrigger = function (action, dropIndex) {
117
+ var _this = this;
118
+ var selectedRecords = 'selectedRecords';
119
+ var selectedRows = 'selectedRows';
120
+ this.parent[selectedRows] = this.parent.getSelectedRows();
121
+ this.parent[selectedRecords] = this.parent.getSelectedRecords();
122
+ var actionArgs = {
123
+ requestType: action,
124
+ data: this.parent.getSelectedRecords(),
125
+ row: this.parent.getSelectedRows(),
126
+ cancel: false
127
+ };
128
+ this.parent.trigger(events.actionBegin, actionArgs, function (actionArgs) {
129
+ if (!actionArgs.cancel) {
130
+ if (actionArgs.requestType === 'indent') {
131
+ _this.parent.reorderRows([_this.parent.getSelectedRowIndexes()[0]], dropIndex, 'child');
132
+ }
133
+ else if (actionArgs.requestType === 'outdent') {
134
+ _this.parent.reorderRows([_this.parent.getSelectedRowIndexes()[0]], dropIndex, 'below');
135
+ }
136
+ }
137
+ });
138
+ };
114
139
  /**
115
140
  * Gets the toolbar of the TreeGrid.
116
141
  *
@@ -152,7 +152,7 @@ var VirtualScroll = /** @class */ (function () {
152
152
  if (pageingDetails.count < this.parent.getRows()[0].getBoundingClientRect().height) {
153
153
  startIndex = 0;
154
154
  }
155
- else {
155
+ else if (!this.parent['isExpandAll']) {
156
156
  startIndex = this.prevstartIndex === -1 ? 0 : this.prevstartIndex;
157
157
  }
158
158
  }
@@ -1,4 +1,4 @@
1
- import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Ajax, ModuleDeclaration, extend} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue } 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, CellRenderer, Cell } 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 { ActionEventArgs } 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, 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 } 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 { CellSaveEventArgs, 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';
1
+ import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Ajax, ModuleDeclaration, extend} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue } 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, CellRenderer, Cell } 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 { ActionEventArgs } 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, 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 } 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 { CellSaveEventArgs, 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 '..';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -86,6 +86,9 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
86
86
  * The `sortModule` is used to manipulate sorting in TreeGrid.
87
87
  */
88
88
  sortModule: Sort;
89
+ private action;
90
+ private selectedRecords;
91
+ private selectedRows;
89
92
  private loggerModule;
90
93
  private isSelfReference;
91
94
  private columnModel;
@@ -180,7 +180,9 @@ var TreeGrid = /** @class */ (function (_super) {
180
180
  * @returns {void}
181
181
  */
182
182
  TreeGrid.prototype.sortByColumn = function (columnName, direction, isMultiSort) {
183
- this.sortModule.sortColumn(columnName, direction, isMultiSort);
183
+ if (this.sortModule) {
184
+ this.sortModule.sortColumn(columnName, direction, isMultiSort);
185
+ }
184
186
  };
185
187
  /**
186
188
  * Clears all the sorted columns of the TreeGrid.
@@ -200,7 +202,9 @@ var TreeGrid = /** @class */ (function (_super) {
200
202
  * @hidden
201
203
  */
202
204
  TreeGrid.prototype.removeSortColumn = function (field) {
203
- this.sortModule.removeSortColumn(field);
205
+ if (this.sortModule) {
206
+ this.sortModule.removeSortColumn(field);
207
+ }
204
208
  };
205
209
  /**
206
210
  * Searches TreeGrid records using the given key.
@@ -559,6 +563,9 @@ var TreeGrid = /** @class */ (function (_super) {
559
563
  this.grid.isReact = true;
560
564
  this.grid.portals = [];
561
565
  }
566
+ if (this.isVue) {
567
+ this.grid.isVue = true;
568
+ }
562
569
  createSpinner({ target: this.element }, this.createElement);
563
570
  this.log(['mapping_fields_missing']);
564
571
  this.renderModule = new Render(this);
@@ -1054,14 +1061,16 @@ var TreeGrid = /** @class */ (function (_super) {
1054
1061
  _this.grid.query = _this.grid.query instanceof Query ? _this.grid.query : new Query();
1055
1062
  }
1056
1063
  }
1057
- var callBackPromise = new Deferred();
1058
- _this.trigger(events.actionBegin, args, function (actionArgs) {
1059
- if (!actionArgs.cancel) {
1060
- _this.notify(events.beginEdit, actionArgs);
1061
- }
1062
- callBackPromise.resolve(actionArgs);
1063
- });
1064
- return callBackPromise;
1064
+ if (_this.action !== 'indent' && _this.action !== 'outdent') {
1065
+ var callBackPromise_2 = new Deferred();
1066
+ _this.trigger(events.actionBegin, args, function (actionArgs) {
1067
+ if (!actionArgs.cancel) {
1068
+ _this.notify(events.beginEdit, actionArgs);
1069
+ }
1070
+ callBackPromise_2.resolve(actionArgs);
1071
+ });
1072
+ return callBackPromise_2;
1073
+ }
1065
1074
  };
1066
1075
  this.grid.actionComplete = function (args) {
1067
1076
  _this.notify('actioncomplete', args);
@@ -1081,7 +1090,19 @@ var TreeGrid = /** @class */ (function (_super) {
1081
1090
  if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
1082
1091
  _this.grid.refresh();
1083
1092
  }
1084
- _this.trigger(events.actionComplete, args);
1093
+ if (_this.action === 'indent' || _this.action === 'outdent') {
1094
+ var actionArgs = {
1095
+ requestType: _this.action,
1096
+ data: _this.selectedRecords,
1097
+ row: _this.selectedRows
1098
+ };
1099
+ _this.trigger(events.actionComplete, actionArgs);
1100
+ _this.action = '';
1101
+ _this.selectedRecords = _this.selectedRows = [];
1102
+ }
1103
+ else {
1104
+ _this.trigger(events.actionComplete, args);
1105
+ }
1085
1106
  };
1086
1107
  };
1087
1108
  TreeGrid.prototype.extendedGridEvents = function () {
@@ -1891,6 +1912,10 @@ var TreeGrid = /** @class */ (function (_super) {
1891
1912
  rowData.parentUniqueID = record.parentUniqueID;
1892
1913
  rowData.expanded = record.expanded;
1893
1914
  this.grid.setRowData(key, rowData);
1915
+ var table = this.getContentTable();
1916
+ var sHeight = table.scrollHeight;
1917
+ var clientHeight = this.getContent().clientHeight;
1918
+ this.lastRowBorder(this.getRows()[record.index], sHeight <= clientHeight);
1894
1919
  };
1895
1920
  /**
1896
1921
  * Navigates to the specified target page.
@@ -2448,7 +2473,12 @@ var TreeGrid = /** @class */ (function (_super) {
2448
2473
  });
2449
2474
  }
2450
2475
  else if (isNullOrUndefined(record)) {
2451
- record = this.grid.getCurrentViewRecords()[row.rowIndex];
2476
+ if (this.detailTemplate) {
2477
+ record = this.grid.getCurrentViewRecords()[row.getAttribute('aria-rowindex')];
2478
+ }
2479
+ else {
2480
+ record = this.grid.getCurrentViewRecords()[row.rowIndex];
2481
+ }
2452
2482
  }
2453
2483
  return record;
2454
2484
  };
@@ -2652,7 +2682,7 @@ var TreeGrid = /** @class */ (function (_super) {
2652
2682
  }
2653
2683
  this.isExpandAll = true;
2654
2684
  this.isCollapseAll = true;
2655
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)) {
2685
+ if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
2656
2686
  this.flatData.filter(function (e) {
2657
2687
  if (e.hasChildRecords) {
2658
2688
  e.expanded = action === 'collapse' ? false : true;
@@ -2711,7 +2741,7 @@ var TreeGrid = /** @class */ (function (_super) {
2711
2741
  if (!isNullOrUndefined(row)) {
2712
2742
  row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
2713
2743
  }
2714
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)
2744
+ if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)
2715
2745
  && !isCountRequired(this)) {
2716
2746
  this.notify(events.localPagedExpandCollapse, { action: action, row: row, record: record });
2717
2747
  }
@@ -2774,7 +2804,7 @@ var TreeGrid = /** @class */ (function (_super) {
2774
2804
  var totalRows = this.getRows();
2775
2805
  var rows = this.getContentTable().rows;
2776
2806
  totalRows = [].slice.call(rows);
2777
- for (var i = totalRows.length - 1; i > 0; i--) {
2807
+ for (var i = totalRows.length - 1; i >= 0; i--) {
2778
2808
  if (!isHidden(totalRows[i])) {
2779
2809
  var table = this.getContentTable();
2780
2810
  var sHeight = table.scrollHeight;
@@ -1,4 +1,4 @@
1
- import { Property, ChildProperty } from '@syncfusion/ej2-base';
1
+ import { Property, ChildProperty } from '@syncfusion/ej2-base';import { ITreeData } from '..';
2
2
 
3
3
  /**
4
4
  * Interface for a class RowDropSettings
@@ -1,4 +1,5 @@
1
1
  import { ChildProperty } from '@syncfusion/ej2-base';
2
+ import { ITreeData } from '..';
2
3
  /**
3
4
  * Configures the row drop settings of the TreeGrid.
4
5
  */
@@ -10,3 +11,9 @@ export declare class RowDropSettings extends ChildProperty<RowDropSettings> {
10
11
  */
11
12
  targetID: string;
12
13
  }
14
+ export interface TreeActionEventArgs {
15
+ requestType?: string;
16
+ data?: ITreeData[];
17
+ row?: Object[];
18
+ cancel?: boolean;
19
+ }