@syncfusion/ej2-treegrid 21.2.8 → 21.2.9

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,9 +1,15 @@
1
1
  import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, classList, closest, compile, createElement, debounce, extend, getEnumValue, getValue, isNullOrUndefined, merge, remove, removeClass, select, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
2
- import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser, ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer, ColumnMenu, ColumnVirtualFreezeRenderer, CommandColumn, ContextMenu, DetailRow, Edit, ExcelExport, Filter, Freeze, FreezeContentRender, FreezeRender, FreezeRowModelGenerator, Grid, InfiniteScroll, InterSectionObserver, Logger, Page, PdfExport, Print, RenderType, Reorder, Resize, RowDD, RowDropSettings, RowRenderer, Scroll, Sort, Toolbar, VirtualContentRenderer, VirtualFreezeHdrRenderer, VirtualFreezeRenderer, VirtualHeaderRenderer, VirtualRowModelGenerator, VirtualScroll, appendChildren, calculateAggregate, detailLists, extend as extend$1, getActualProperties, getObject, getUid, iterateArrayOrObject, parentsUntil, resetRowIndex, setDebounce, templateCompiler } from '@syncfusion/ej2-grids';
2
+ import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser, ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer, ColumnMenu, ColumnVirtualFreezeRenderer, CommandColumn, ContextMenu, DetailRow, Edit, ExcelExport, Filter, Freeze, FreezeContentRender, FreezeRender, FreezeRowModelGenerator, Grid, InfiniteScroll, InterSectionObserver, Logger, Page, PdfExport, Print, RenderType, Reorder, Resize, RowDD, RowDropSettings, RowRenderer, Scroll, Sort, Toolbar, VirtualContentRenderer, VirtualFreezeHdrRenderer, VirtualFreezeRenderer, VirtualHeaderRenderer, VirtualRowModelGenerator, VirtualScroll, appendChildren, calculateAggregate, detailLists, extend as extend$1, getActualProperties, getObject, getTransformValues, getUid, iterateArrayOrObject, parentsUntil, resetRowIndex, setDebounce, templateCompiler } from '@syncfusion/ej2-grids';
3
3
  import { createCheckBox } from '@syncfusion/ej2-buttons';
4
4
  import { CacheAdaptor, DataManager, DataUtil, Deferred, JsonAdaptor, ODataAdaptor, Predicate, Query, RemoteSaveAdaptor, UrlAdaptor, WebApiAdaptor, WebMethodAdaptor } from '@syncfusion/ej2-data';
5
5
  import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
6
6
 
7
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
8
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
10
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
11
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
12
+ };
7
13
  /**
8
14
  * Represents TreeGrid `Column` model class.
9
15
  */
@@ -96,8 +102,21 @@ class Column {
96
102
  }
97
103
  }
98
104
  }
105
+ /**
106
+ * Defines TreeGrid column
107
+ */
108
+ class TreeGridColumn extends Column {
109
+ }
110
+ __decorate$1([
111
+ Property(null)
112
+ ], TreeGridColumn.prototype, "columns", void 0);
113
+ /**
114
+ * Defines stacked tree grid column
115
+ */
116
+ class StackedColumn extends TreeGridColumn {
117
+ }
99
118
 
100
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
119
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
101
120
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
102
121
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
103
122
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -108,11 +127,11 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
108
127
  */
109
128
  class LoadingIndicator extends ChildProperty {
110
129
  }
111
- __decorate$1([
130
+ __decorate$2([
112
131
  Property('Spinner')
113
132
  ], LoadingIndicator.prototype, "indicatorType", void 0);
114
133
 
115
- var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
134
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
116
135
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
117
136
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
118
137
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -123,40 +142,40 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
123
142
  */
124
143
  class Predicate$1 extends ChildProperty {
125
144
  }
126
- __decorate$2([
145
+ __decorate$3([
127
146
  Property()
128
147
  ], Predicate$1.prototype, "field", void 0);
129
- __decorate$2([
148
+ __decorate$3([
130
149
  Property()
131
150
  ], Predicate$1.prototype, "operator", void 0);
132
- __decorate$2([
151
+ __decorate$3([
133
152
  Property()
134
153
  ], Predicate$1.prototype, "value", void 0);
135
- __decorate$2([
154
+ __decorate$3([
136
155
  Property()
137
156
  ], Predicate$1.prototype, "matchCase", void 0);
138
- __decorate$2([
157
+ __decorate$3([
139
158
  Property()
140
159
  ], Predicate$1.prototype, "ignoreAccent", void 0);
141
- __decorate$2([
160
+ __decorate$3([
142
161
  Property()
143
162
  ], Predicate$1.prototype, "predicate", void 0);
144
- __decorate$2([
163
+ __decorate$3([
145
164
  Property({})
146
165
  ], Predicate$1.prototype, "actualFilterValue", void 0);
147
- __decorate$2([
166
+ __decorate$3([
148
167
  Property({})
149
168
  ], Predicate$1.prototype, "actualOperator", void 0);
150
- __decorate$2([
169
+ __decorate$3([
151
170
  Property()
152
171
  ], Predicate$1.prototype, "type", void 0);
153
- __decorate$2([
172
+ __decorate$3([
154
173
  Property()
155
174
  ], Predicate$1.prototype, "ejpredicate", void 0);
156
- __decorate$2([
175
+ __decorate$3([
157
176
  Property()
158
177
  ], Predicate$1.prototype, "uid", void 0);
159
- __decorate$2([
178
+ __decorate$3([
160
179
  Property()
161
180
  ], Predicate$1.prototype, "isForeignKey", void 0);
162
181
  /**
@@ -164,32 +183,32 @@ __decorate$2([
164
183
  */
165
184
  class FilterSettings extends ChildProperty {
166
185
  }
167
- __decorate$2([
186
+ __decorate$3([
168
187
  Collection([], Predicate$1)
169
188
  ], FilterSettings.prototype, "columns", void 0);
170
- __decorate$2([
189
+ __decorate$3([
171
190
  Property('FilterBar')
172
191
  ], FilterSettings.prototype, "type", void 0);
173
- __decorate$2([
192
+ __decorate$3([
174
193
  Property()
175
194
  ], FilterSettings.prototype, "mode", void 0);
176
- __decorate$2([
195
+ __decorate$3([
177
196
  Property(true)
178
197
  ], FilterSettings.prototype, "showFilterBarStatus", void 0);
179
- __decorate$2([
198
+ __decorate$3([
180
199
  Property(1500)
181
200
  ], FilterSettings.prototype, "immediateModeDelay", void 0);
182
- __decorate$2([
201
+ __decorate$3([
183
202
  Property()
184
203
  ], FilterSettings.prototype, "operators", void 0);
185
- __decorate$2([
204
+ __decorate$3([
186
205
  Property(false)
187
206
  ], FilterSettings.prototype, "ignoreAccent", void 0);
188
- __decorate$2([
207
+ __decorate$3([
189
208
  Property('Parent')
190
209
  ], FilterSettings.prototype, "hierarchyMode", void 0);
191
210
 
192
- var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
211
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
193
212
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
194
213
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
195
214
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -200,7 +219,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
200
219
  */
201
220
  class TextWrapSettings extends ChildProperty {
202
221
  }
203
- __decorate$3([
222
+ __decorate$4([
204
223
  Property('Both')
205
224
  ], TextWrapSettings.prototype, "wrapMode", void 0);
206
225
 
@@ -1408,7 +1427,7 @@ class Print$1 {
1408
1427
  }
1409
1428
  }
1410
1429
 
1411
- var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1430
+ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1412
1431
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1413
1432
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1414
1433
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -1419,23 +1438,23 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
1419
1438
  */
1420
1439
  class SearchSettings extends ChildProperty {
1421
1440
  }
1422
- __decorate$4([
1441
+ __decorate$5([
1423
1442
  Property()
1424
1443
  ], SearchSettings.prototype, "fields", void 0);
1425
- __decorate$4([
1444
+ __decorate$5([
1426
1445
  Property(false)
1427
1446
  ], SearchSettings.prototype, "ignoreCase", void 0);
1428
- __decorate$4([
1447
+ __decorate$5([
1429
1448
  Property('contains')
1430
1449
  ], SearchSettings.prototype, "operator", void 0);
1431
- __decorate$4([
1450
+ __decorate$5([
1432
1451
  Property()
1433
1452
  ], SearchSettings.prototype, "key", void 0);
1434
- __decorate$4([
1453
+ __decorate$5([
1435
1454
  Property()
1436
1455
  ], SearchSettings.prototype, "hierarchyMode", void 0);
1437
1456
 
1438
- var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1457
+ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1439
1458
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1440
1459
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1441
1460
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -1446,25 +1465,25 @@ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators,
1446
1465
  */
1447
1466
  class SelectionSettings extends ChildProperty {
1448
1467
  }
1449
- __decorate$5([
1468
+ __decorate$6([
1450
1469
  Property('Row')
1451
1470
  ], SelectionSettings.prototype, "mode", void 0);
1452
- __decorate$5([
1471
+ __decorate$6([
1453
1472
  Property('Flow')
1454
1473
  ], SelectionSettings.prototype, "cellSelectionMode", void 0);
1455
- __decorate$5([
1474
+ __decorate$6([
1456
1475
  Property('Single')
1457
1476
  ], SelectionSettings.prototype, "type", void 0);
1458
- __decorate$5([
1477
+ __decorate$6([
1459
1478
  Property(false)
1460
1479
  ], SelectionSettings.prototype, "persistSelection", void 0);
1461
- __decorate$5([
1480
+ __decorate$6([
1462
1481
  Property('Default')
1463
1482
  ], SelectionSettings.prototype, "checkboxMode", void 0);
1464
- __decorate$5([
1483
+ __decorate$6([
1465
1484
  Property(false)
1466
1485
  ], SelectionSettings.prototype, "checkboxOnly", void 0);
1467
- __decorate$5([
1486
+ __decorate$6([
1468
1487
  Property(true)
1469
1488
  ], SelectionSettings.prototype, "enableToggle", void 0);
1470
1489
 
@@ -1506,7 +1525,7 @@ class Render {
1506
1525
  if (collapsed$$1 && !isNullOrUndefined(args.row)) {
1507
1526
  args.row.style.display = 'none';
1508
1527
  const rowsObj = this.parent.grid.getRowsObject();
1509
- if (!isNullOrUndefined(args.row.getAttribute('data-uid'))) {
1528
+ if (!this.parent.grid.isFrozenGrid() && !isNullOrUndefined(args.row.getAttribute('data-uid'))) {
1510
1529
  rowsObj.filter((e) => e.uid === args.row.getAttribute('data-uid'))[0].visible = false;
1511
1530
  }
1512
1531
  }
@@ -1691,7 +1710,8 @@ class Render {
1691
1710
  }
1692
1711
  if (summaryRow) {
1693
1712
  addClass([args.cell], 'e-summarycell');
1694
- const summaryData = getObject(args.column.field, args.data);
1713
+ let summaryData = getObject(args.column.field, args.data);
1714
+ summaryData = isNullOrUndefined(summaryData) ? null : summaryData;
1695
1715
  if (args.cell.querySelector('.e-treecell') != null) {
1696
1716
  args.cell.querySelector('.e-treecell').innerHTML = summaryData;
1697
1717
  }
@@ -2678,7 +2698,7 @@ var ContextMenuItems;
2678
2698
  ContextMenuItems[ContextMenuItems["RowOutdent"] = 17] = "RowOutdent";
2679
2699
  })(ContextMenuItems || (ContextMenuItems = {}));
2680
2700
 
2681
- var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2701
+ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2682
2702
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2683
2703
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2684
2704
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -2689,32 +2709,32 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
2689
2709
  */
2690
2710
  class PageSettings extends ChildProperty {
2691
2711
  }
2692
- __decorate$6([
2712
+ __decorate$7([
2693
2713
  Property(12)
2694
2714
  ], PageSettings.prototype, "pageSize", void 0);
2695
- __decorate$6([
2715
+ __decorate$7([
2696
2716
  Property(8)
2697
2717
  ], PageSettings.prototype, "pageCount", void 0);
2698
- __decorate$6([
2718
+ __decorate$7([
2699
2719
  Property(1)
2700
2720
  ], PageSettings.prototype, "currentPage", void 0);
2701
- __decorate$6([
2721
+ __decorate$7([
2702
2722
  Property()
2703
2723
  ], PageSettings.prototype, "totalRecordsCount", void 0);
2704
- __decorate$6([
2724
+ __decorate$7([
2705
2725
  Property(false)
2706
2726
  ], PageSettings.prototype, "enableQueryString", void 0);
2707
- __decorate$6([
2727
+ __decorate$7([
2708
2728
  Property(false)
2709
2729
  ], PageSettings.prototype, "pageSizes", void 0);
2710
- __decorate$6([
2730
+ __decorate$7([
2711
2731
  Property(null)
2712
2732
  ], PageSettings.prototype, "template", void 0);
2713
- __decorate$6([
2733
+ __decorate$7([
2714
2734
  Property('All')
2715
2735
  ], PageSettings.prototype, "pageSizeMode", void 0);
2716
2736
 
2717
- var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2737
+ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2718
2738
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2719
2739
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2720
2740
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -2790,34 +2810,34 @@ class AggregateColumn extends ChildProperty {
2790
2810
  this.setProperties(prop, true);
2791
2811
  }
2792
2812
  }
2793
- __decorate$7([
2813
+ __decorate$8([
2794
2814
  Property()
2795
2815
  ], AggregateColumn.prototype, "type", void 0);
2796
- __decorate$7([
2816
+ __decorate$8([
2797
2817
  Property()
2798
2818
  ], AggregateColumn.prototype, "footerTemplate", void 0);
2799
- __decorate$7([
2819
+ __decorate$8([
2800
2820
  Property()
2801
2821
  ], AggregateColumn.prototype, "field", void 0);
2802
- __decorate$7([
2822
+ __decorate$8([
2803
2823
  Property()
2804
2824
  ], AggregateColumn.prototype, "format", void 0);
2805
- __decorate$7([
2825
+ __decorate$8([
2806
2826
  Property()
2807
2827
  ], AggregateColumn.prototype, "columnName", void 0);
2808
- __decorate$7([
2828
+ __decorate$8([
2809
2829
  Property()
2810
2830
  ], AggregateColumn.prototype, "customAggregate", void 0);
2811
2831
  class AggregateRow extends ChildProperty {
2812
2832
  }
2813
- __decorate$7([
2833
+ __decorate$8([
2814
2834
  Collection([], AggregateColumn)
2815
2835
  ], AggregateRow.prototype, "columns", void 0);
2816
- __decorate$7([
2836
+ __decorate$8([
2817
2837
  Property(true)
2818
2838
  ], AggregateRow.prototype, "showChildSummary", void 0);
2819
2839
 
2820
- var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2840
+ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2821
2841
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2822
2842
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2823
2843
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -2828,41 +2848,41 @@ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators,
2828
2848
  */
2829
2849
  class EditSettings extends ChildProperty {
2830
2850
  }
2831
- __decorate$8([
2851
+ __decorate$9([
2832
2852
  Property(false)
2833
2853
  ], EditSettings.prototype, "allowAdding", void 0);
2834
- __decorate$8([
2854
+ __decorate$9([
2835
2855
  Property(false)
2836
2856
  ], EditSettings.prototype, "allowEditing", void 0);
2837
- __decorate$8([
2857
+ __decorate$9([
2838
2858
  Property(false)
2839
2859
  ], EditSettings.prototype, "allowDeleting", void 0);
2840
- __decorate$8([
2860
+ __decorate$9([
2841
2861
  Property('Cell')
2842
2862
  ], EditSettings.prototype, "mode", void 0);
2843
- __decorate$8([
2863
+ __decorate$9([
2844
2864
  Property('Top')
2845
2865
  ], EditSettings.prototype, "newRowPosition", void 0);
2846
- __decorate$8([
2866
+ __decorate$9([
2847
2867
  Property(true)
2848
2868
  ], EditSettings.prototype, "allowEditOnDblClick", void 0);
2849
- __decorate$8([
2869
+ __decorate$9([
2850
2870
  Property(true)
2851
2871
  ], EditSettings.prototype, "showConfirmDialog", void 0);
2852
- __decorate$8([
2872
+ __decorate$9([
2853
2873
  Property(false)
2854
2874
  ], EditSettings.prototype, "showDeleteConfirmDialog", void 0);
2855
- __decorate$8([
2875
+ __decorate$9([
2856
2876
  Property('')
2857
2877
  ], EditSettings.prototype, "template", void 0);
2858
- __decorate$8([
2878
+ __decorate$9([
2859
2879
  Property({})
2860
2880
  ], EditSettings.prototype, "dialog", void 0);
2861
- __decorate$8([
2881
+ __decorate$9([
2862
2882
  Property(false)
2863
2883
  ], EditSettings.prototype, "allowNextRowEdit", void 0);
2864
2884
 
2865
- var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2885
+ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
2866
2886
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2867
2887
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2868
2888
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -2873,10 +2893,10 @@ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators,
2873
2893
  */
2874
2894
  class SortDescriptor extends ChildProperty {
2875
2895
  }
2876
- __decorate$9([
2896
+ __decorate$10([
2877
2897
  Property()
2878
2898
  ], SortDescriptor.prototype, "field", void 0);
2879
- __decorate$9([
2899
+ __decorate$10([
2880
2900
  Property()
2881
2901
  ], SortDescriptor.prototype, "direction", void 0);
2882
2902
  /**
@@ -2884,10 +2904,10 @@ __decorate$9([
2884
2904
  */
2885
2905
  class SortSettings extends ChildProperty {
2886
2906
  }
2887
- __decorate$9([
2907
+ __decorate$10([
2888
2908
  Collection([], SortDescriptor)
2889
2909
  ], SortSettings.prototype, "columns", void 0);
2890
- __decorate$9([
2910
+ __decorate$10([
2891
2911
  Property(true)
2892
2912
  ], SortSettings.prototype, "allowUnsort", void 0);
2893
2913
 
@@ -3291,7 +3311,7 @@ function updateParentRow(key, record, action, control, isSelfReference, child) {
3291
3311
  }
3292
3312
  }
3293
3313
 
3294
- var __decorate$10 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
3314
+ var __decorate$11 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
3295
3315
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3296
3316
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3297
3317
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -3302,13 +3322,13 @@ var __decorate$10 = (undefined && undefined.__decorate) || function (decorators,
3302
3322
  */
3303
3323
  class InfiniteScrollSettings extends ChildProperty {
3304
3324
  }
3305
- __decorate$10([
3325
+ __decorate$11([
3306
3326
  Property(false)
3307
3327
  ], InfiniteScrollSettings.prototype, "enableCache", void 0);
3308
- __decorate$10([
3328
+ __decorate$11([
3309
3329
  Property(3)
3310
3330
  ], InfiniteScrollSettings.prototype, "maxBlocks", void 0);
3311
- __decorate$10([
3331
+ __decorate$11([
3312
3332
  Property(3)
3313
3333
  ], InfiniteScrollSettings.prototype, "initialBlocks", void 0);
3314
3334
 
@@ -5907,7 +5927,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5907
5927
  }
5908
5928
  else {
5909
5929
  if (this.enableVirtualization && this.isCollapseAll) {
5910
- record = this.grid.getCurrentViewRecords()[row.rowIndex];
5930
+ if (this.isExpandAll && row.rowIndex === -1) {
5931
+ record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
5932
+ }
5933
+ else {
5934
+ record = this.grid.getCurrentViewRecords()[row.rowIndex];
5935
+ }
5911
5936
  }
5912
5937
  else {
5913
5938
  record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
@@ -6139,7 +6164,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
6139
6164
  }
6140
6165
  }
6141
6166
  else {
6142
- this.expandRow(rows[parseInt(i.toString(), 10)]);
6167
+ if (!this.enableVirtualization) {
6168
+ this.expandRow(rows[parseInt(i.toString(), 10)]);
6169
+ }
6170
+ else if (rows[0].getAttribute('aria-expanded') !== 'true') {
6171
+ this.expandRow(rows[0]);
6172
+ }
6143
6173
  }
6144
6174
  }
6145
6175
  }
@@ -8480,14 +8510,13 @@ class RowDD$1 {
8480
8510
  const childRecords = rec[0].childRecords;
8481
8511
  const droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
8482
8512
  childRecords.splice(droppedRecordIndex, 0, draggedRecord);
8483
- if (this.parent.enableImmutableMode || this.parent['isIndentEnabled'] && !this.parent.parentIdMapping) {
8484
- draggedRecord.parentItem = droppedRecord.parentItem;
8485
- draggedRecord.level = droppedRecord.level;
8486
- }
8513
+ draggedRecord.parentItem = droppedRecord.parentItem;
8487
8514
  draggedRecord.parentUniqueID = droppedRecord.parentUniqueID;
8515
+ draggedRecord.level = droppedRecord.level;
8488
8516
  if (this.parent.parentIdMapping) {
8489
8517
  draggedRecord[this.parent.parentIdMapping] = droppedRecord[this.parent.parentIdMapping];
8490
- draggedRecord.parentUniqueID = droppedRecord.parentUniqueID;
8518
+ draggedRecord.parentItem = droppedRecord.parentItem;
8519
+ draggedRecord.level = droppedRecord.level;
8491
8520
  }
8492
8521
  }
8493
8522
  if (draggedRecord.hasChildRecords) {
@@ -8872,7 +8901,7 @@ class RowDD$1 {
8872
8901
  * Base export
8873
8902
  */
8874
8903
 
8875
- var __decorate$11 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
8904
+ var __decorate$12 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
8876
8905
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8877
8906
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
8878
8907
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -8883,7 +8912,7 @@ var __decorate$11 = (undefined && undefined.__decorate) || function (decorators,
8883
8912
  */
8884
8913
  class RowDropSettings$1 extends ChildProperty {
8885
8914
  }
8886
- __decorate$11([
8915
+ __decorate$12([
8887
8916
  Property()
8888
8917
  ], RowDropSettings$1.prototype, "targetID", void 0);
8889
8918
 
@@ -11145,6 +11174,9 @@ class Edit$1 {
11145
11174
  }
11146
11175
  gridDblClick(e) {
11147
11176
  this.doubleClickTarget = e.target;
11177
+ if (e.target.classList.contains('e-frame') && this.parent.getCurrentViewRecords().length === 0) {
11178
+ this.doubleClickTarget = null;
11179
+ }
11148
11180
  }
11149
11181
  getRowPosition(addArgs) {
11150
11182
  addArgs.newRowPosition = this.parent.editSettings.newRowPosition;
@@ -11152,7 +11184,9 @@ class Edit$1 {
11152
11184
  addArgs.dataRowIndex = +this.prevAriaRowIndex;
11153
11185
  }
11154
11186
  beforeStartEdit(args) {
11155
- this.parent.trigger(actionBegin, args);
11187
+ if (this.parent.editSettings.mode === 'Cell') {
11188
+ this.parent.trigger(actionBegin, args);
11189
+ }
11156
11190
  }
11157
11191
  beforeBatchCancel(args) {
11158
11192
  if (this.parent.editSettings.mode === 'Cell') {
@@ -12647,7 +12681,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
12647
12681
  const currentViewData = this.parent.currentViewData;
12648
12682
  const indexValue = 'index';
12649
12683
  if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
12650
- const vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? this.parent.height :
12684
+ const vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? parseInt(this.parent.height.toString(), 10) :
12651
12685
  this.parent.element.getBoundingClientRect().height);
12652
12686
  let index = (~~(content$$1.scrollTop / rowHeight)
12653
12687
  + Math.ceil(vHeight / rowHeight))
@@ -12706,7 +12740,9 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
12706
12740
  }
12707
12741
  this.startIndex = !isLastBlock ? lastIndex - this.parent.pageSettings.pageSize : nextSetResIndex;
12708
12742
  this.endIndex = lastIndex;
12709
- if ((nextSetResIndex + this.parent.pageSettings.pageSize) > this.totalRecords && (this.endIndex - this.startIndex) < (this.parent.pageSettings.pageSize / 2) && (this.endIndex - nextSetResIndex) < (this.parent.pageSettings.pageSize / 2)) {
12743
+ if ((nextSetResIndex + this.parent.pageSettings.pageSize) > this.totalRecords &&
12744
+ (this.endIndex - this.startIndex) < (this.parent.pageSettings.pageSize / 2) &&
12745
+ (this.endIndex - nextSetResIndex) < (this.parent.pageSettings.pageSize / 2)) {
12710
12746
  this.startIndex = lastIndex - (this.parent.pageSettings.pageSize / 2);
12711
12747
  }
12712
12748
  if (currentViewData.length && this.startIndex > currentViewData[0][`${indexValue}`] &&
@@ -12721,7 +12757,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
12721
12757
  this.translateY = scrollArgs.offset.top - rowHeight * 2;
12722
12758
  }
12723
12759
  else {
12724
- this.translateY = scrollArgs.offset.top;
12760
+ if (this.totalRecords == this.endIndex) {
12761
+ this.translateY = scrollArgs.offset.top - (rowHeight - outBuffer);
12762
+ }
12763
+ else {
12764
+ this.translateY = scrollArgs.offset.top;
12765
+ }
12725
12766
  }
12726
12767
  }
12727
12768
  }
@@ -13043,13 +13084,16 @@ class VirtualScroll$1 {
13043
13084
  this.parent.grid.notify(virtualActionArgs, { setTop: true });
13044
13085
  }
13045
13086
  if (requestType === 'save') {
13087
+ startIndex = counts.startIndex + (counts.count - counts.endIndex);
13046
13088
  endIndex = counts.count;
13047
13089
  }
13048
13090
  //if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
13049
13091
  //this.prevendIndex === endIndex && this.prevstartIndex === startIndex) {
13092
+ const virtualWrapperElement = this.parent.grid.contentModule.virtualEle.wrapper;
13093
+ const translateY = getTransformValues(virtualWrapperElement).height;
13050
13094
  if (!isNullOrUndefined(this.expandCollapseRec) && (pageingDetails.actionArgs.requestType === 'virtualscroll' ||
13051
13095
  (pageingDetails.actionArgs.requestType === 'refresh' && startIndex !== this.prevstartIndex)) &&
13052
- (startIndex < this.parent.getRows().length && endIndex <= startIndex + this.parent.getRows().length)) {
13096
+ (startIndex < this.parent.getRows().length && endIndex <= startIndex + this.parent.getRows().length) && translateY === 0) {
13053
13097
  startIndex = 0;
13054
13098
  }
13055
13099
  if (!isNullOrUndefined(this.expandCollapseRec)) {
@@ -13125,7 +13169,7 @@ class TreeVirtual extends VirtualScroll {
13125
13169
  if (!isNullOrUndefined(parentGrid.height) && typeof (parentGrid.height) === 'string' && parentGrid.height.indexOf('%') !== -1) {
13126
13170
  parentGrid.element.style.height = parentGrid.height;
13127
13171
  }
13128
- const vHeight = parentGrid.height.toString().indexOf('%') < 0 ? parentGrid.height :
13172
+ const vHeight = parentGrid.height.toString().indexOf('%') < 0 ? parseInt(parentGrid.height.toString(), 10) :
13129
13173
  parentGrid.element.getBoundingClientRect().height;
13130
13174
  const blockSize = ~~(vHeight / rowHeight);
13131
13175
  const height = blockSize * 2;
@@ -13776,5 +13820,5 @@ class InfiniteScroll$1 {
13776
13820
  * Export TreeGrid component
13777
13821
  */
13778
13822
 
13779
- export { TreeGrid, load, rowDataBound, dataBound, queryCellInfo, beforeDataBound, actionBegin, dataStateChange, actionComplete, rowSelecting, rowSelected, checkboxChange, rowDeselected, toolbarClick, beforeExcelExport, beforePdfExport, resizeStop, expanded, expanding, collapsed, collapsing, remoteExpand, localPagedExpandCollapse, pagingActions, printGridInit, contextMenuOpen, contextMenuClick, beforeCopy, beforePaste, savePreviousRowPosition, crudAction, beginEdit, beginAdd, recordDoubleClick, cellSave, cellSaved, cellEdit, batchDelete, batchCancel, batchAdd, beforeBatchDelete, beforeBatchAdd, beforeBatchSave, batchSave, keyPressed, updateData, doubleTap, virtualColumnIndex, virtualActionArgs, destroy, dataListener, indexModifier, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, detailDataBound, rowDrag, rowDragStartHelper, rowDrop, rowDragStart, rowsAdd, rowsRemove, rowdraging, rowDropped, autoCol, rowDeselecting, headerContent, movableContent, movableHeader, frozenContent, frozenHeader, content, table, leftRight, frozenRight, frozenLeft, dataColIndex, ariaColIndex, dataRowIndex, ariaRowIndex, DataManipulation, Reorder$1 as Reorder, Resize$1 as Resize, RowDD$1 as RowDD, Column, EditSettings, Predicate$1 as Predicate, FilterSettings, PageSettings, SearchSettings, SelectionSettings, AggregateColumn, AggregateRow, SortDescriptor, SortSettings, RowDropSettings$1 as RowDropSettings, InfiniteScrollSettings, LoadingIndicator, Render, TreeVirtualRowModelGenerator, isRemoteData, isCountRequired, isCheckboxcolumn, isFilterChildHierarchy, findParentRecords, getExpandStatus, findChildrenRecords, isOffline, extendArray, getPlainData, getParentData, isHidden, ToolbarItem, ContextMenuItems, Filter$1 as Filter, ExcelExport$1 as ExcelExport, PdfExport$1 as PdfExport, Page$1 as Page, Toolbar$1 as Toolbar, Aggregate$1 as Aggregate, Sort$1 as Sort, TreeClipboard, ColumnMenu$1 as ColumnMenu, ContextMenu$1 as ContextMenu, Edit$1 as Edit, CommandColumn$1 as CommandColumn, Selection, DetailRow$1 as DetailRow, VirtualScroll$1 as VirtualScroll, TreeVirtual, Freeze$1 as Freeze, ColumnChooser$1 as ColumnChooser, Logger$1 as Logger, treeGridDetails, InfiniteScroll$1 as InfiniteScroll };
13823
+ export { TreeGrid, load, rowDataBound, dataBound, queryCellInfo, beforeDataBound, actionBegin, dataStateChange, actionComplete, rowSelecting, rowSelected, checkboxChange, rowDeselected, toolbarClick, beforeExcelExport, beforePdfExport, resizeStop, expanded, expanding, collapsed, collapsing, remoteExpand, localPagedExpandCollapse, pagingActions, printGridInit, contextMenuOpen, contextMenuClick, beforeCopy, beforePaste, savePreviousRowPosition, crudAction, beginEdit, beginAdd, recordDoubleClick, cellSave, cellSaved, cellEdit, batchDelete, batchCancel, batchAdd, beforeBatchDelete, beforeBatchAdd, beforeBatchSave, batchSave, keyPressed, updateData, doubleTap, virtualColumnIndex, virtualActionArgs, destroy, dataListener, indexModifier, beforeStartEdit, beforeBatchCancel, batchEditFormRendered, detailDataBound, rowDrag, rowDragStartHelper, rowDrop, rowDragStart, rowsAdd, rowsRemove, rowdraging, rowDropped, autoCol, rowDeselecting, headerContent, movableContent, movableHeader, frozenContent, frozenHeader, content, table, leftRight, frozenRight, frozenLeft, dataColIndex, ariaColIndex, dataRowIndex, ariaRowIndex, DataManipulation, Reorder$1 as Reorder, Resize$1 as Resize, RowDD$1 as RowDD, Column, TreeGridColumn, StackedColumn, EditSettings, Predicate$1 as Predicate, FilterSettings, PageSettings, SearchSettings, SelectionSettings, AggregateColumn, AggregateRow, SortDescriptor, SortSettings, RowDropSettings$1 as RowDropSettings, InfiniteScrollSettings, LoadingIndicator, Render, TreeVirtualRowModelGenerator, isRemoteData, isCountRequired, isCheckboxcolumn, isFilterChildHierarchy, findParentRecords, getExpandStatus, findChildrenRecords, isOffline, extendArray, getPlainData, getParentData, isHidden, ToolbarItem, ContextMenuItems, Filter$1 as Filter, ExcelExport$1 as ExcelExport, PdfExport$1 as PdfExport, Page$1 as Page, Toolbar$1 as Toolbar, Aggregate$1 as Aggregate, Sort$1 as Sort, TreeClipboard, ColumnMenu$1 as ColumnMenu, ContextMenu$1 as ContextMenu, Edit$1 as Edit, CommandColumn$1 as CommandColumn, Selection, DetailRow$1 as DetailRow, VirtualScroll$1 as VirtualScroll, TreeVirtual, Freeze$1 as Freeze, ColumnChooser$1 as ColumnChooser, Logger$1 as Logger, treeGridDetails, InfiniteScroll$1 as InfiniteScroll };
13780
13824
  //# sourceMappingURL=ej2-treegrid.es2015.js.map