@syncfusion/ej2-treegrid 19.3.55 → 19.4.41

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.
Files changed (55) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +60 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/feature.md +37 -0
  3. package/CHANGELOG.md +6 -47
  4. package/README.md +1 -1
  5. package/dist/ej2-treegrid.umd.min.js +2 -2
  6. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es2015.js +182 -28
  8. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  9. package/dist/es6/ej2-treegrid.es5.js +196 -31
  10. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  11. package/dist/global/ej2-treegrid.min.js +2 -2
  12. package/dist/global/ej2-treegrid.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +9 -9
  15. package/src/treegrid/actions/batch-edit.js +5 -5
  16. package/src/treegrid/actions/edit.js +20 -7
  17. package/src/treegrid/base/interface.d.ts +4 -0
  18. package/src/treegrid/base/treegrid-model.d.ts +16 -1
  19. package/src/treegrid/base/treegrid.d.ts +43 -2
  20. package/src/treegrid/base/treegrid.js +146 -19
  21. package/src/treegrid/models/column.d.ts +10 -1
  22. package/src/treegrid/models/column.js +19 -0
  23. package/src/treegrid/renderer/virtual-row-model-generator.js +6 -0
  24. package/src/treegrid/renderer/virtual-tree-content-render.js +2 -1
  25. package/styles/bootstrap-dark.css +5 -0
  26. package/styles/bootstrap.css +5 -0
  27. package/styles/bootstrap4.css +5 -0
  28. package/styles/bootstrap5-dark.css +31 -26
  29. package/styles/bootstrap5.css +31 -26
  30. package/styles/fabric-dark.css +5 -0
  31. package/styles/fabric.css +5 -0
  32. package/styles/highcontrast-light.css +5 -0
  33. package/styles/highcontrast.css +5 -0
  34. package/styles/material-dark.css +5 -0
  35. package/styles/material.css +5 -0
  36. package/styles/tailwind-dark.css +31 -26
  37. package/styles/tailwind.css +5 -0
  38. package/styles/treegrid/_bootstrap5-definition.scss +4 -4
  39. package/styles/treegrid/_fluent-definition.scss +31 -0
  40. package/styles/treegrid/_layout.scss +8 -0
  41. package/styles/treegrid/_tailwind-definition.scss +4 -4
  42. package/styles/treegrid/bootstrap-dark.css +5 -0
  43. package/styles/treegrid/bootstrap.css +5 -0
  44. package/styles/treegrid/bootstrap4.css +5 -0
  45. package/styles/treegrid/bootstrap5-dark.css +31 -26
  46. package/styles/treegrid/bootstrap5.css +31 -26
  47. package/styles/treegrid/fabric-dark.css +5 -0
  48. package/styles/treegrid/fabric.css +5 -0
  49. package/styles/treegrid/highcontrast-light.css +5 -0
  50. package/styles/treegrid/highcontrast.css +5 -0
  51. package/styles/treegrid/icons/_fluent.scss +26 -0
  52. package/styles/treegrid/material-dark.css +5 -0
  53. package/styles/treegrid/material.css +5 -0
  54. package/styles/treegrid/tailwind-dark.css +31 -26
  55. package/styles/treegrid/tailwind.css +5 -0
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.3.55
3
+ * version : 19.4.41
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
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@19.3.53",
3
+ "_id": "@syncfusion/ej2-treegrid@19.4.38",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Z/LVb/49/OB2E5RfAdGBhYIzZPC4UTL3FLHkIwHIVuNI+dvP6+VMwRID54qqG01YiuVdkxpuk15UzfBeXEzs5Q==",
5
+ "_integrity": "sha512-NwDwtzhLP8hC/gjz6VcKbRdeMwAhQTOgXsLPqwNOBrpn4GLKk5BTqejDBL7mXEMy1NUJO/uJayEaV10xFh+mLA==",
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/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.3.53.tgz",
28
- "_shasum": "a52a629c706c322c28b139bd916dd151872304c0",
27
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.4.38.tgz",
28
+ "_shasum": "e86288528d767c8bdb8b1653b00b2651d1cabacf",
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.3.54",
40
- "@syncfusion/ej2-data": "~19.3.53",
41
- "@syncfusion/ej2-grids": "~19.3.55",
42
- "@syncfusion/ej2-popups": "~19.3.53"
39
+ "@syncfusion/ej2-base": "~19.4.38",
40
+ "@syncfusion/ej2-data": "~19.4.38",
41
+ "@syncfusion/ej2-grids": "~19.4.41",
42
+ "@syncfusion/ej2-popups": "~19.4.41"
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.3.55",
63
+ "version": "19.4.41",
64
64
  "sideEffects": false
65
65
  }
@@ -404,11 +404,6 @@ var BatchEdit = /** @class */ (function () {
404
404
  var data = (this.parent.grid.dataSource instanceof DataManager ?
405
405
  this.parent.grid.dataSource.dataSource.json : this.parent.grid.dataSource);
406
406
  var primaryKey = this.parent.grid.getPrimaryKeyFieldNames()[0];
407
- if (!isNullOrUndefined(this.parent[targetElement])) {
408
- var row = this.parent[targetElement].closest('tr');
409
- this.parent.collapseRow(row);
410
- this.parent[targetElement] = null;
411
- }
412
407
  if (!isNullOrUndefined(this.batchAddedRecords)) {
413
408
  for (var i = 0; i < this.batchAddedRecords.length; i++) {
414
409
  index = data.map(function (e) { return e[primaryKey]; }).indexOf(this.batchAddedRecords[i][primaryKey]);
@@ -428,6 +423,11 @@ var BatchEdit = /** @class */ (function () {
428
423
  }
429
424
  }
430
425
  }
426
+ if (!isNullOrUndefined(this.parent[targetElement])) {
427
+ var row = this.parent[targetElement].closest('tr');
428
+ this.parent.collapseRow(row);
429
+ this.parent[targetElement] = null;
430
+ }
431
431
  if (!isNullOrUndefined(this.batchDeletedRecords)) {
432
432
  for (var i = 0; i < this.batchDeletedRecords.length; i++) {
433
433
  if (!isNullOrUndefined(this.batchDeletedRecords[i][parentItem])) {
@@ -712,14 +712,28 @@ var Edit = /** @class */ (function () {
712
712
  return;
713
713
  }
714
714
  if (args.requestType === 'delete') {
715
- var data = args.data;
716
- for (var i = 0; i < data.length; i++) {
717
- this.deleteUniqueID(data[i].uniqueID);
718
- var childs = findChildrenRecords(data[i]);
715
+ var data_1 = args.data;
716
+ if (isNullOrUndefined(args.data[0].uniqueID)) {
717
+ var primaryKeys_2 = this.parent.getPrimaryKeyFieldNames();
718
+ var _loop_1 = function (i) {
719
+ this_1.parent.flatData.filter(function (e) {
720
+ if (e[primaryKeys_2[0]] === args.data[i][primaryKeys_2[0]]) {
721
+ data_1[i] = e;
722
+ }
723
+ });
724
+ };
725
+ var this_1 = this;
726
+ for (var i = 0; i < data_1.length; i++) {
727
+ _loop_1(i);
728
+ }
729
+ }
730
+ for (var i = 0; i < data_1.length; i++) {
731
+ this.deleteUniqueID(data_1[i].uniqueID);
732
+ var childs = findChildrenRecords(data_1[i]);
719
733
  for (var c = 0; c < childs.length; c++) {
720
734
  this.deleteUniqueID(childs[c].uniqueID);
721
735
  }
722
- args.data = data.concat(childs);
736
+ args.data = args.data.concat(childs);
723
737
  }
724
738
  }
725
739
  if (args.requestType === 'add' || (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling))) {
@@ -795,8 +809,7 @@ var Edit = /** @class */ (function () {
795
809
  var currentData = this.parent.grid.getCurrentViewRecords();
796
810
  if (this.parent.enableVirtualization && args.index !== 0) {
797
811
  this.addRowIndex = this.parent.grid.getCurrentViewRecords().indexOf(this.addRowRecord);
798
- this.selectedIndex = parseInt(this.parent.getRows()[this.addRowIndex].getAttribute('aria-rowindex'));
799
- ;
812
+ this.selectedIndex = parseInt(this.parent.getRows()[this.addRowIndex].getAttribute('aria-rowindex'), 10);
800
813
  }
801
814
  var index = this.addRowIndex;
802
815
  value.uniqueID = getUid(this.parent.element.id + '_data_');
@@ -128,6 +128,8 @@ export interface RowExpandingEventArgs {
128
128
  row?: HTMLTableRowElement;
129
129
  /** Cancel the row expanding action */
130
130
  cancel?: boolean;
131
+ /** Provides an option to ExpandAll the nested parent rows of the current row. */
132
+ expandAll?: boolean;
131
133
  }
132
134
  export interface RowCollapsedEventArgs {
133
135
  /**
@@ -150,6 +152,8 @@ export interface RowCollapsingEventArgs {
150
152
  row?: HTMLTableRowElement;
151
153
  /** Cancel the row collapsing action */
152
154
  cancel?: boolean;
155
+ /** Provides an option to CollapseAll the nested parent rows of the current row. */
156
+ collapseAll?: boolean;
153
157
  }
154
158
  export interface CellSaveEventArgs extends SaveEventArgs {
155
159
  /** Defines edited column */
@@ -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 } 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 } 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';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -432,6 +432,21 @@ export interface TreeGridModel extends ComponentModel{
432
432
  */
433
433
  enableAutoFill?: boolean;
434
434
 
435
+ /**
436
+ * If `enableAdaptiveUI` is set to true, the pop-up UI will become adaptive to small screens,
437
+ * and be used for filtering and other features.
438
+ * ```html
439
+ * <div id='treegrid'></div>
440
+ * <script>
441
+ * var treegridObj = new TreeGrid({ enableAdaptiveUI: true });
442
+ * treegridObj.appendTo('#treegrid');
443
+ * </script>
444
+ * ```
445
+ *
446
+ * @default false
447
+ */
448
+ enableAdaptiveUI?: boolean;
449
+
435
450
  /**
436
451
  * If `enableImmutableMode` is set to true, the TreeGrid will reuse old rows if it exists in the new result instead of
437
452
  * full refresh while performing the TreeGrid actions.
@@ -540,6 +540,20 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
540
540
  * @default false
541
541
  */
542
542
  enableAutoFill: boolean;
543
+ /**
544
+ * If `enableAdaptiveUI` is set to true, the pop-up UI will become adaptive to small screens,
545
+ * and be used for filtering and other features.
546
+ * ```html
547
+ * <div id='treegrid'></div>
548
+ * <script>
549
+ * var treegridObj = new TreeGrid({ enableAdaptiveUI: true });
550
+ * treegridObj.appendTo('#treegrid');
551
+ * </script>
552
+ * ```
553
+ *
554
+ * @default false
555
+ */
556
+ enableAdaptiveUI: boolean;
543
557
  /**
544
558
  * If `enableImmutableMode` is set to true, the TreeGrid will reuse old rows if it exists in the new result instead of
545
559
  * full refresh while performing the TreeGrid actions.
@@ -1514,6 +1528,12 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
1514
1528
  */
1515
1529
  getColumns(isRefresh?: boolean): Column[];
1516
1530
  private updateColumnModel;
1531
+ /**
1532
+ * @param {string} columnUid - Defines column uid
1533
+ * @returns {void}
1534
+ * @hidden
1535
+ */
1536
+ private refreshReactColumnTemplateByUid;
1517
1537
  /**
1518
1538
  * Gets the content div of the TreeGrid.
1519
1539
  *
@@ -1658,9 +1678,12 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
1658
1678
  *
1659
1679
  * @param {HTMLTableRowElement} row - Expands the given row
1660
1680
  * @param {Object} record - Expands the given record
1681
+ * @param {Object} key - Primary key value
1682
+ * @param {number} level - Specifies the hierarchical level of the record
1661
1683
  * @returns {void}
1662
1684
  */
1663
- expandRow(row: HTMLTableRowElement, record?: Object): void;
1685
+ expandRow(row: HTMLTableRowElement, record?: Object, key?: Object, level?: number): void;
1686
+ private expandCollapseAllChildren;
1664
1687
  private setHeightForFrozenContent;
1665
1688
  private getCollapseExpandRecords;
1666
1689
  /**
@@ -1668,9 +1691,10 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
1668
1691
  *
1669
1692
  * @param {HTMLTableRowElement} row - Collapse the given row
1670
1693
  * @param {Object} record - Collapse the given record
1694
+ * @param {Object} key - Primary key value
1671
1695
  * @returns {void}
1672
1696
  */
1673
- collapseRow(row: HTMLTableRowElement, record?: Object): void;
1697
+ collapseRow(row: HTMLTableRowElement, record?: Object, key?: Object): void;
1674
1698
  /**
1675
1699
  * Expands the records at specific hierarchical level
1676
1700
  *
@@ -1678,6 +1702,14 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
1678
1702
  * @returns {void}
1679
1703
  */
1680
1704
  expandAtLevel(level: number): void;
1705
+ /**
1706
+ * Expands the records by given primary key value
1707
+ *
1708
+ * @param {Object} key - Expands the parent rows with given primary key value
1709
+ * @returns {void}
1710
+ */
1711
+ expandByKey(key: Object): void;
1712
+ private expandAction;
1681
1713
  private getRecordDetails;
1682
1714
  /**
1683
1715
  * Collapses the records at specific hierarchical level
@@ -1686,6 +1718,15 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
1686
1718
  * @returns {void}
1687
1719
  */
1688
1720
  collapseAtLevel(level: number): void;
1721
+ /**
1722
+ * Collapses the records by given primary key value
1723
+ *
1724
+ * @param {Object} key - Collapses the parent rows with given primary key value
1725
+ * @returns {void}
1726
+ */
1727
+ collapseByKey(key: Object): void;
1728
+ private expandCollapseActionByKey;
1729
+ private collapseAction;
1689
1730
  /**
1690
1731
  * Expands All the rows
1691
1732
  *
@@ -21,6 +21,7 @@ import { Component, addClass, createElement, EventHandler, isNullOrUndefined, ex
21
21
  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
+ import { CellRenderer } from '@syncfusion/ej2-grids';
24
25
  import { RowDropSettings, getUid } from '@syncfusion/ej2-grids';
25
26
  import { FilterSettings } from '../models/filter-settings';
26
27
  import { TextWrapSettings } from '../models/textwrap-settings';
@@ -32,7 +33,7 @@ import * as events from '../base/constant';
32
33
  import { SearchSettings } from '../models/search-settings';
33
34
  import { SelectionSettings } from '../models/selection-settings';
34
35
  import { getActualProperties, getObject } from '@syncfusion/ej2-grids';
35
- import { DataManager, RemoteSaveAdaptor, JsonAdaptor, Deferred } from '@syncfusion/ej2-data';
36
+ import { DataManager, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred } from '@syncfusion/ej2-data';
36
37
  import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
37
38
  import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';
38
39
  import { Grid, Logger } from '@syncfusion/ej2-grids';
@@ -44,7 +45,7 @@ import { PageSettings } from '../models/page-settings';
44
45
  import { AggregateRow } from '../models/summary';
45
46
  import { EditSettings } from '../models/edit-settings';
46
47
  import { SortSettings } from '../models/sort-settings';
47
- import { isHidden } from '../utils';
48
+ import { isHidden, getExpandStatus } from '../utils';
48
49
  import { editAction } from '../actions/crud-actions';
49
50
  import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';
50
51
  /**
@@ -674,6 +675,7 @@ var TreeGrid = /** @class */ (function (_super) {
674
675
  this.grid.allowResizing = this.allowResizing;
675
676
  this.grid.enableHover = this.enableHover;
676
677
  this.grid.enableAutoFill = this.enableAutoFill;
678
+ this.grid.enableAdaptiveUI = this.enableAdaptiveUI;
677
679
  this.grid.enableImmutableMode = this.enableImmutableMode;
678
680
  this.grid.allowRowDragAndDrop = this.allowRowDragAndDrop;
679
681
  this.grid.rowDropSettings = getActualProperties(this.rowDropSettings);
@@ -723,7 +725,7 @@ var TreeGrid = /** @class */ (function (_super) {
723
725
  _this.grid.currentViewData.length !== _this.grid.selectionModule.selectedRowIndexes.length) {
724
726
  var updateRowSelection = 'updateRowSelection';
725
727
  for (var i = 0; i < _this.getRows().length; i++) {
726
- if (_this.getRows()[i].getElementsByClassName("e-frame e-icons e-uncheck").length) {
728
+ if (_this.getRows()[i].getElementsByClassName('e-frame e-icons e-uncheck').length) {
727
729
  _this.grid.selectionModule[updateRowSelection](_this.getRows()[i], _this.getCurrentViewRecords()[i].index);
728
730
  }
729
731
  }
@@ -1035,8 +1037,11 @@ var TreeGrid = /** @class */ (function (_super) {
1035
1037
  _this.notify('clearFilters', { flatData: _this.grid.dataSource });
1036
1038
  _this.grid.setProperties({ dataSource: _this.dataResults.result }, true);
1037
1039
  if (isNullOrUndefined(_this.grid['changedProperties'].dataSource)) {
1038
- _this.grid.renderModule.data.dataManager = _this.grid.dataSource instanceof DataManager ? _this.grid.dataSource :
1040
+ _this.grid.renderModule.data.dataManager = _this.grid.dataSource instanceof DataManager ?
1041
+ _this.grid.dataSource :
1039
1042
  (isNullOrUndefined(_this.grid.dataSource) ? new DataManager() : new DataManager(_this.grid.dataSource));
1043
+ _this.grid.renderModule.data.isQueryInvokedFromData = true;
1044
+ _this.grid.query = _this.grid.query instanceof Query ? _this.grid.query : new Query();
1040
1045
  }
1041
1046
  }
1042
1047
  var callBackPromise = new Deferred();
@@ -1486,6 +1491,9 @@ var TreeGrid = /** @class */ (function (_super) {
1486
1491
  case 'enableAutoFill':
1487
1492
  this.grid.enableAutoFill = this.enableAutoFill;
1488
1493
  break;
1494
+ case 'enableAdaptiveUI':
1495
+ this.grid.enableAdaptiveUI = this.enableAdaptiveUI;
1496
+ break;
1489
1497
  case 'enableImmutableMode':
1490
1498
  this.grid.enableImmutableMode = this.enableImmutableMode;
1491
1499
  break;
@@ -2082,6 +2090,32 @@ var TreeGrid = /** @class */ (function (_super) {
2082
2090
  this[merge] = undefined; // Workaround for blazor updateModel
2083
2091
  return this.columnModel;
2084
2092
  };
2093
+ /**
2094
+ * @param {string} columnUid - Defines column uid
2095
+ * @returns {void}
2096
+ * @hidden
2097
+ */
2098
+ TreeGrid.prototype.refreshReactColumnTemplateByUid = function (columnUid) {
2099
+ var _this = this;
2100
+ if (this.isReact) {
2101
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2102
+ this.clearTemplate(['columnTemplate'], undefined, function () {
2103
+ var cells = 'cells';
2104
+ var rowIdx = 'index';
2105
+ var rowsObj = _this.grid.getRowsObject();
2106
+ var indent = _this.grid.getIndentCount();
2107
+ var cellIndex = _this.grid.getNormalizedColumnIndex(columnUid);
2108
+ for (var j = 0; j < rowsObj.length; j++) {
2109
+ if (rowsObj[j].isDataRow && !isNullOrUndefined(rowsObj[j].index)) {
2110
+ var cell = rowsObj[j][cells][cellIndex];
2111
+ var cellRenderer = new CellRenderer(_this.grid, _this.grid.serviceLocator);
2112
+ var td = _this.getCellFromIndex(rowsObj[j].index, cellIndex - indent);
2113
+ cellRenderer.refreshTD(td, cell, rowsObj[j].data, { index: rowsObj[j][rowIdx] });
2114
+ }
2115
+ }
2116
+ });
2117
+ }
2118
+ };
2085
2119
  /**
2086
2120
  * Gets the content div of the TreeGrid.
2087
2121
  *
@@ -2351,9 +2385,11 @@ var TreeGrid = /** @class */ (function (_super) {
2351
2385
  *
2352
2386
  * @param {HTMLTableRowElement} row - Expands the given row
2353
2387
  * @param {Object} record - Expands the given record
2388
+ * @param {Object} key - Primary key value
2389
+ * @param {number} level - Specifies the hierarchical level of the record
2354
2390
  * @returns {void}
2355
2391
  */
2356
- TreeGrid.prototype.expandRow = function (row, record) {
2392
+ TreeGrid.prototype.expandRow = function (row, record, key, level) {
2357
2393
  var _this = this;
2358
2394
  record = this.getCollapseExpandRecords(row, record);
2359
2395
  if (!isNullOrUndefined(row) && row.cells[0].classList.contains('e-lastrowcell')) {
@@ -2363,6 +2399,9 @@ var TreeGrid = /** @class */ (function (_super) {
2363
2399
  this.trigger(events.expanding, args, function (expandingArgs) {
2364
2400
  if (!expandingArgs.cancel) {
2365
2401
  _this.expandCollapse('expand', row, record);
2402
+ if (expandingArgs.expandAll) {
2403
+ _this.expandCollapseAllChildren(record, 'expand', key, level);
2404
+ }
2366
2405
  var children = 'Children';
2367
2406
  if (!(isRemoteData(_this) && !isOffline(_this)) && (!isCountRequired(_this) || !isNullOrUndefined(record[children]))) {
2368
2407
  var collapseArgs = { data: record, row: row };
@@ -2372,6 +2411,19 @@ var TreeGrid = /** @class */ (function (_super) {
2372
2411
  }
2373
2412
  });
2374
2413
  };
2414
+ TreeGrid.prototype.expandCollapseAllChildren = function (record, action, key, level) {
2415
+ if ((!isNullOrUndefined(key) && record[this.getPrimaryKeyFieldNames()[0]] !== key) ||
2416
+ (!isNullOrUndefined(level) && level !== record.level)) {
2417
+ return;
2418
+ }
2419
+ var records = findChildrenRecords(record).filter(function (e) {
2420
+ return e.hasChildRecords;
2421
+ });
2422
+ records.unshift(record);
2423
+ for (var i = 0; i < records.length; i++) {
2424
+ this.expandCollapse(action, null, records[i]);
2425
+ }
2426
+ };
2375
2427
  TreeGrid.prototype.setHeightForFrozenContent = function () {
2376
2428
  var freeze = (this.grid.getFrozenLeftColumnsCount() > 0 || this.grid.getFrozenRightColumnsCount() > 0) ? true : false;
2377
2429
  if (this.grid.getFrozenColumns() > 0 || freeze) {
@@ -2395,14 +2447,18 @@ var TreeGrid = /** @class */ (function (_super) {
2395
2447
  *
2396
2448
  * @param {HTMLTableRowElement} row - Collapse the given row
2397
2449
  * @param {Object} record - Collapse the given record
2450
+ * @param {Object} key - Primary key value
2398
2451
  * @returns {void}
2399
2452
  */
2400
- TreeGrid.prototype.collapseRow = function (row, record) {
2453
+ TreeGrid.prototype.collapseRow = function (row, record, key) {
2401
2454
  var _this = this;
2402
2455
  record = this.getCollapseExpandRecords(row, record);
2403
2456
  var args = { data: record, row: row, cancel: false };
2404
2457
  this.trigger(events.collapsing, args, function (collapsingArgs) {
2405
2458
  if (!collapsingArgs.cancel) {
2459
+ if (collapsingArgs.collapseAll) {
2460
+ _this.expandCollapseAllChildren(record, 'collapse', key);
2461
+ }
2406
2462
  _this.expandCollapse('collapse', row, record);
2407
2463
  var collapseArgs = { data: record, row: row };
2408
2464
  if (!isRemoteData(_this)) {
@@ -2433,22 +2489,58 @@ var TreeGrid = /** @class */ (function (_super) {
2433
2489
  }
2434
2490
  return e.hasChildRecords && e.level === level;
2435
2491
  });
2436
- this.expandRow(null, rec);
2492
+ this.expandAction(rec, null, level, true);
2437
2493
  }
2438
2494
  else {
2439
2495
  var rec = this.getRecordDetails(level);
2440
- var row = getObject('rows', rec);
2441
2496
  var record = getObject('records', rec);
2442
- for (var i = 0; i < record.length; i++) {
2443
- if (record[i].parentItem !== undefined) {
2444
- var pindex = this.flatData[record[i].parentItem.index].index;
2445
- if (this.flatData[pindex].expanded === false) {
2446
- record.push(this.flatData[pindex]);
2447
- this.flatData[pindex].expanded = true;
2497
+ this.expandAction(record, null, level);
2498
+ }
2499
+ };
2500
+ /**
2501
+ * Expands the records by given primary key value
2502
+ *
2503
+ * @param {Object} key - Expands the parent rows with given primary key value
2504
+ * @returns {void}
2505
+ */
2506
+ TreeGrid.prototype.expandByKey = function (key) {
2507
+ this.expandCollapseActionByKey(key, 'Expand');
2508
+ };
2509
+ TreeGrid.prototype.expandAction = function (record, key, level, isPaging) {
2510
+ if (isPaging === void 0) { isPaging = false; }
2511
+ var _loop_1 = function (i) {
2512
+ if (!isNullOrUndefined(record[i].parentItem)) {
2513
+ var puniqueID_1 = record[i].parentItem.uniqueID;
2514
+ var parentItem = this_1.flatData.filter(function (e) {
2515
+ return e.uniqueID === puniqueID_1;
2516
+ });
2517
+ if (isRemoteData(this_1)) {
2518
+ parentItem = this_1.getCurrentViewRecords().filter(function (e) {
2519
+ return e.uniqueID === puniqueID_1;
2520
+ });
2521
+ }
2522
+ if (parentItem[0].expanded === false) {
2523
+ record.push(parentItem[0]);
2524
+ parentItem[0].expanded = true;
2525
+ }
2526
+ else {
2527
+ if (!getExpandStatus(this_1, parentItem[0], this_1.parentData)) {
2528
+ if (parentItem[0].expanded && parentItem[0].parentItem !== undefined) {
2529
+ record.push(parentItem[0]);
2530
+ }
2448
2531
  }
2449
2532
  }
2450
- this.expandRow(row[i], record[i]);
2451
2533
  }
2534
+ if (!isPaging) {
2535
+ this_1.expandRow(null, record[i], key, level);
2536
+ }
2537
+ };
2538
+ var this_1 = this;
2539
+ for (var i = 0; i < record.length; i++) {
2540
+ _loop_1(i);
2541
+ }
2542
+ if (isPaging) {
2543
+ this.expandRow(null, record, key, level);
2452
2544
  }
2453
2545
  };
2454
2546
  TreeGrid.prototype.getRecordDetails = function (level) {
@@ -2476,14 +2568,46 @@ var TreeGrid = /** @class */ (function (_super) {
2476
2568
  }
2477
2569
  return e.hasChildRecords && e.level === level;
2478
2570
  });
2479
- this.collapseRow(null, record);
2571
+ this.collapseAction(record, null, true);
2480
2572
  }
2481
2573
  else {
2482
2574
  var rec = this.getRecordDetails(level);
2483
- var rows = getObject('rows', rec);
2484
2575
  var records = getObject('records', rec);
2485
- for (var i = 0; i < records.length; i++) {
2486
- this.collapseRow(rows[i], records[i]);
2576
+ this.collapseAction(records);
2577
+ }
2578
+ };
2579
+ /**
2580
+ * Collapses the records by given primary key value
2581
+ *
2582
+ * @param {Object} key - Collapses the parent rows with given primary key value
2583
+ * @returns {void}
2584
+ */
2585
+ TreeGrid.prototype.collapseByKey = function (key) {
2586
+ this.expandCollapseActionByKey(key, 'Collapse');
2587
+ };
2588
+ TreeGrid.prototype.expandCollapseActionByKey = function (key, action) {
2589
+ var primaryKeyField = this.getPrimaryKeyFieldNames()[0];
2590
+ var dataSource = isRemoteData(this) ? this.getCurrentViewRecords() : this.grid.dataSource;
2591
+ if (!isNullOrUndefined(primaryKeyField)) {
2592
+ var rec = dataSource.filter(function (e) {
2593
+ return e[primaryKeyField].toString() === key.toString();
2594
+ });
2595
+ if (action === 'Expand') {
2596
+ this.expandAction(rec, key, null);
2597
+ }
2598
+ else {
2599
+ this.collapseAction(rec, key);
2600
+ }
2601
+ }
2602
+ };
2603
+ TreeGrid.prototype.collapseAction = function (record, key, isPaging) {
2604
+ if (isPaging === void 0) { isPaging = false; }
2605
+ if (isPaging) {
2606
+ this.collapseRow(null, record);
2607
+ }
2608
+ else {
2609
+ for (var i = 0; i < record.length; i++) {
2610
+ this.collapseRow(null, record[i], key);
2487
2611
  }
2488
2612
  }
2489
2613
  if (!this.grid.contentModule.isDataSourceChanged && this.enableVirtualization && this.getRows()
@@ -3393,6 +3517,9 @@ var TreeGrid = /** @class */ (function (_super) {
3393
3517
  __decorate([
3394
3518
  Property(false)
3395
3519
  ], TreeGrid.prototype, "enableAutoFill", void 0);
3520
+ __decorate([
3521
+ Property(false)
3522
+ ], TreeGrid.prototype, "enableAdaptiveUI", void 0);
3396
3523
  __decorate([
3397
3524
  Property(false)
3398
3525
  ], TreeGrid.prototype, "enableImmutableMode", void 0);
@@ -326,7 +326,16 @@ export declare class Column {
326
326
  * @default null
327
327
  */
328
328
  freeze: freezeDirection;
329
+ private parent;
329
330
  constructor(options: ColumnModel);
331
+ /**
332
+ * Update the State changes reflected for TreeGrid columndirective in react platform.
333
+ *
334
+ * @param {Column} column - specifies the column
335
+ * @returns {void}
336
+ * @hidden
337
+ */
338
+ private setProperties;
330
339
  }
331
340
  /**
332
341
  * Interface for a TreeGrid class Column
@@ -694,7 +703,7 @@ export interface ColumnModel {
694
703
  *
695
704
  * @default Syncfusion.EJ2.Grids.FreezeDirection.None
696
705
  * @isEnumeration true
697
- * @aspType Syncfusion.EJ2.Grids.FreezeDirection.None
706
+ * @aspType Syncfusion.EJ2.Grids.FreezeDirection
698
707
  */
699
708
  freeze?: freezeDirection;
700
709
  }
@@ -71,6 +71,25 @@ var Column = /** @class */ (function () {
71
71
  this.filter = {};
72
72
  merge(this, options);
73
73
  }
74
+ /**
75
+ * Update the State changes reflected for TreeGrid columndirective in react platform.
76
+ *
77
+ * @param {Column} column - specifies the column
78
+ * @returns {void}
79
+ * @hidden
80
+ */
81
+ Column.prototype.setProperties = function (column) {
82
+ //Angular two way binding
83
+ var keys = Object.keys(column);
84
+ for (var i = 0; i < keys.length; i++) {
85
+ this[keys[i]] = column[keys[i]];
86
+ //Refresh the react columnTemplates on state change
87
+ if (this.parent && this.parent['isReact'] && keys[i] === 'template') {
88
+ var refreshReactColumnTemplateByUid = 'refreshReactColumnTemplateByUid';
89
+ this.parent.clipboardModule['treeGridParent'][refreshReactColumnTemplateByUid](this.uid);
90
+ }
91
+ }
92
+ };
74
93
  return Column;
75
94
  }());
76
95
  export { Column };
@@ -38,6 +38,12 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
38
38
  return _super.prototype.getData.call(this);
39
39
  };
40
40
  TreeVirtualRowModelGenerator.prototype.generateRows = function (data, notifyArgs) {
41
+ if (!isNullOrUndefined(notifyArgs.virtualInfo) && notifyArgs.virtualInfo.loadNext && notifyArgs.virtualInfo.nextInfo.page !== this.parent.pageSettings.currentPage) {
42
+ this.parent.setProperties({ pageSettings: { currentPage: notifyArgs.virtualInfo.nextInfo.page } }, true);
43
+ }
44
+ else if (!isNullOrUndefined(notifyArgs.virtualInfo) && !notifyArgs.virtualInfo.loadNext && notifyArgs.virtualInfo.page !== this.parent.pageSettings.currentPage) {
45
+ this.parent.setProperties({ pageSettings: { currentPage: notifyArgs.virtualInfo.page } }, true);
46
+ }
41
47
  var info = this.getDataInfo();
42
48
  if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
43
49
  if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
@@ -186,7 +186,8 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
186
186
  if (isNullOrUndefined(this.observer[containerRect])) {
187
187
  this.observer[containerRect] = this.observers[containerRect];
188
188
  }
189
- if (args.selectedIndex !== 0 || isNullOrUndefined(this.parent['clipboardModule'].treeGridParent.editModule['addRowIndex'])) {
189
+ if (isNullOrUndefined(this.parent['clipboardModule'].treeGridParent.editModule) || args.selectedIndex !== 0 ||
190
+ isNullOrUndefined(this.parent['clipboardModule'].treeGridParent.editModule['addRowIndex'])) {
190
191
  _super.prototype[selectVirtualRow].call(this, args);
191
192
  }
192
193
  };