@syncfusion/ej2-treegrid 35.1.37 → 35.1.46

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.
@@ -606,6 +606,8 @@ var actionFailure = 'actionFailure';
606
606
  var collapseActionComplete = 'collapseActionComplete';
607
607
  /** @hidden */
608
608
  var hierarchyCheckstateUpdate = 'hierarchy-checkstate-update';
609
+ /** @hidden */
610
+ var beforeDomVirtualRenderRows = 'before-dom-virtual-rows-render';
609
611
 
610
612
  var __extends$5 = (undefined && undefined.__extends) || (function () {
611
613
  var extendStatics = function (d, b) {
@@ -1209,7 +1211,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1209
1211
  var headerElement = this.parent.getHeaderContent().querySelectorAll('.e-headercelldiv')[this.columnIndex];
1210
1212
  if (headerElement && headerElement.querySelectorAll('.e-treeselectall').length === 0) {
1211
1213
  var value = false; // Initial state can be false.
1212
- var rowChkBox = this.parent.createElement('input', { className: 'e-treeselectall', attrs: { 'type': 'checkbox' } });
1214
+ var rowChkBox = this.parent.createElement('input', { className: 'e-treeselectall', attrs: { 'type': 'checkbox', 'aria-label': 'Select all checkbox' } });
1213
1215
  var checkWrap = createCheckBox(this.parent.createElement, false, { checked: value, label: ' ' });
1214
1216
  headerElement.classList.add('e-headerchkcelldiv');
1215
1217
  checkWrap.classList.add('e-hierarchycheckbox');
@@ -13304,11 +13306,25 @@ var Aggregate = /** @__PURE__ @class */ (function () {
13304
13306
  var childRecordsLength;
13305
13307
  var columns = this.parent.getColumns();
13306
13308
  if (this.parent.aggregates.filter(function (x) { return x.showChildSummary; }).length) {
13307
- for (var i = 0, len = dataLength; i < len; i++) {
13309
+ var _loop_1 = function (i, len) {
13308
13310
  parentRecord = parentRecords[parseInt(i.toString(), 10)];
13309
- childRecordsLength = this.getChildRecordsLength(parentRecord, flatRecords);
13311
+ childRecordsLength = this_1.getChildRecordsLength(parentRecord, flatRecords);
13310
13312
  if (childRecordsLength) {
13311
- var _loop_1 = function (summaryRowIndex, len_1) {
13313
+ var childRecords_1 = getObject('childRecords', parentRecord) || [];
13314
+ var existingSummaryRows = childRecords_1.filter(function (e) {
13315
+ return getObject('isSummaryRow', e) && getObject('parentUniqueID', e) === parentRecord.uniqueID;
13316
+ });
13317
+ existingSummaryRows.forEach(function (summaryRow) {
13318
+ var summaryIndex = flatRecords.indexOf(summaryRow);
13319
+ if (summaryIndex !== -1) {
13320
+ flatRecords.splice(summaryIndex, 1);
13321
+ }
13322
+ var childSummaryIndex = childRecords_1.indexOf(summaryRow);
13323
+ if (childSummaryIndex !== -1) {
13324
+ childRecords_1.splice(childSummaryIndex, 1);
13325
+ }
13326
+ });
13327
+ var _loop_2 = function (summaryRowIndex, len_1) {
13312
13328
  var item = void 0;
13313
13329
  item = {};
13314
13330
  for (var i_1 = 0; i_1 < columns.length; i_1++) {
@@ -13335,9 +13351,8 @@ var Aggregate = /** @__PURE__ @class */ (function () {
13335
13351
  setValue('isSummaryRow', true, item);
13336
13352
  setValue('parentUniqueID', summaryParent.uniqueID, item);
13337
13353
  if (isSort) {
13338
- var childRecords = getObject('childRecords', parentRecord);
13339
- if (childRecords.length) {
13340
- childRecords.push(item);
13354
+ if (childRecords_1.length) {
13355
+ childRecords_1.push(item);
13341
13356
  }
13342
13357
  }
13343
13358
  flatRecords.splice(currentIndex, 0, item);
@@ -13346,12 +13361,15 @@ var Aggregate = /** @__PURE__ @class */ (function () {
13346
13361
  return "continue";
13347
13362
  }
13348
13363
  };
13349
- var this_1 = this;
13350
13364
  for (var summaryRowIndex = 1, len_1 = summaryLength; summaryRowIndex <= len_1; summaryRowIndex++) {
13351
- _loop_1(summaryRowIndex, len_1);
13365
+ _loop_2(summaryRowIndex, len_1);
13352
13366
  }
13353
- this.flatChildRecords = [];
13367
+ this_1.flatChildRecords = [];
13354
13368
  }
13369
+ };
13370
+ var this_1 = this;
13371
+ for (var i = 0, len = dataLength; i < len; i++) {
13372
+ _loop_1(i, len);
13355
13373
  }
13356
13374
  }
13357
13375
  else {
@@ -17748,6 +17766,10 @@ var DomVirtualization = /** @__PURE__ @class */ (function () {
17748
17766
  * @param {ServiceLocator} locator - Service locator for dependency injection
17749
17767
  */
17750
17768
  function DomVirtualization(parent, locator) {
17769
+ /** @hidden */
17770
+ this.startIndex = -1;
17771
+ /** @hidden */
17772
+ this.endIndex = -1;
17751
17773
  initializeTelemetryFeature('DomVirtualization', 'TreeGrid');
17752
17774
  this.parent = parent;
17753
17775
  this.locator = locator;
@@ -17768,6 +17790,7 @@ var DomVirtualization = /** @__PURE__ @class */ (function () {
17768
17790
  this.parent.on(destroy$1, this.destroy, this);
17769
17791
  this.parent.on(virtualExpandCollapse, this.collapseExpandVirtualchilds, this);
17770
17792
  this.parent.on(pagingActions, this.virtualPageAction, this);
17793
+ this.parent.grid.on(beforeDomVirtualRenderRows, this.updateCurrentDomVirtualRecords, this);
17771
17794
  };
17772
17795
  /**
17773
17796
  * @hidden
@@ -17780,6 +17803,7 @@ var DomVirtualization = /** @__PURE__ @class */ (function () {
17780
17803
  this.parent.off(destroy$1, this.destroy);
17781
17804
  this.parent.off(virtualExpandCollapse, this.collapseExpandVirtualchilds);
17782
17805
  this.parent.off(pagingActions, this.virtualPageAction);
17806
+ this.parent.grid.off(beforeDomVirtualRenderRows, this.updateCurrentDomVirtualRecords);
17783
17807
  };
17784
17808
  /**
17785
17809
  * Handles the action related to virtual scrolling with paging details.
@@ -17923,6 +17947,11 @@ var DomVirtualization = /** @__PURE__ @class */ (function () {
17923
17947
  };
17924
17948
  getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: 'refresh' });
17925
17949
  };
17950
+ DomVirtualization.prototype.updateCurrentDomVirtualRecords = function (args) {
17951
+ this.startIndex = args.startIndex;
17952
+ this.endIndex = args.endIndex;
17953
+ this.parent.currentDomVirtualRecords = this.parent.virtualDomScrollData.slice(this.startIndex, this.endIndex);
17954
+ };
17926
17955
  DomVirtualization.prototype.destroy = function () {
17927
17956
  this.removeEventListener();
17928
17957
  };
@@ -17953,5 +17982,5 @@ var DomVirtualTreeExtension = /** @__PURE__ @class */ (function (_super) {
17953
17982
  return DomVirtualTreeExtension;
17954
17983
  }(DomVirtualization$1));
17955
17984
 
17956
- export { Aggregate, AggregateColumn, AggregateRow, Column, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, ContextMenuItems, DataManipulation, DetailRow, DomVirtualTreeContentRenderer, DomVirtualTreeExtension, DomVirtualization, DomVirtualizationSettings, Edit, EditSettings, ExcelExport, Filter, FilterSettings, Freeze, InfiniteScroll, InfiniteScrollSettings, LoadingIndicator, Logger, Page, PageSettings, PdfExport, Predicate, Render, Reorder, Resize, RowDD, RowDropSettings, SearchSettings, Selection, SelectionSettings, Sort, SortDescriptor, SortSettings, StackedColumn, Toolbar, ToolbarItem, TreeClipboard, TreeGrid, TreeGridColumn, TreeVirtual, TreeVirtualRowModelGenerator, VirtualScroll, actionBegin, actionComplete, actionFailure, ariaColIndex, ariaRowIndex, autoCol, batchAdd, batchCancel, batchDelete, batchEditFormRendered, batchSave, beforeBatchAdd, beforeBatchCancel, beforeBatchDelete, beforeBatchSave, beforeCopy, beforeDataBound, beforeExcelExport, beforePaste, beforePdfExport, beforeStartEdit, beginAdd, beginEdit, cellEdit, cellSave, cellSaved, checkboxChange, collapseActionComplete, collapsed, collapsing, content, contextMenuClick, contextMenuOpen, crudAction, dataBound, dataListener, dataStateChange, destroy, detailDataBound, doubleTap, expanded, expanding, extendArray, findChildrenRecords, findParentRecords, frozenContent, frozenHeader, frozenLeft, frozenRight, getExpandStatus, getParentData, getPlainData, headerContent, hierarchyCheckstateUpdate, indexModifier, isCheckboxcolumn, isCountRequired, isFilterChildHierarchy, isHidden, isOffline, isRemoteData, keyPressed, leftRight, load, localPagedExpandCollapse, movableContent, movableHeader, pagingActions, printGridInit, queryCellInfo, recordDoubleClick, remoteExpand, resizeStop, rowDataBound, rowDeselected, rowDeselecting, rowDrag, rowDragStart, rowDragStartHelper, rowDrop, rowDropped, rowSelected, rowSelecting, rowdraging, rowsAdd, rowsRemove, savePreviousRowPosition, table, toolbarClick, treeGridDetails, updateData, virtualActionArgs, virtualColumnIndex, virtualExpandCollapse };
17985
+ export { Aggregate, AggregateColumn, AggregateRow, Column, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, ContextMenuItems, DataManipulation, DetailRow, DomVirtualTreeContentRenderer, DomVirtualTreeExtension, DomVirtualization, DomVirtualizationSettings, Edit, EditSettings, ExcelExport, Filter, FilterSettings, Freeze, InfiniteScroll, InfiniteScrollSettings, LoadingIndicator, Logger, Page, PageSettings, PdfExport, Predicate, Render, Reorder, Resize, RowDD, RowDropSettings, SearchSettings, Selection, SelectionSettings, Sort, SortDescriptor, SortSettings, StackedColumn, Toolbar, ToolbarItem, TreeClipboard, TreeGrid, TreeGridColumn, TreeVirtual, TreeVirtualRowModelGenerator, VirtualScroll, actionBegin, actionComplete, actionFailure, ariaColIndex, ariaRowIndex, autoCol, batchAdd, batchCancel, batchDelete, batchEditFormRendered, batchSave, beforeBatchAdd, beforeBatchCancel, beforeBatchDelete, beforeBatchSave, beforeCopy, beforeDataBound, beforeDomVirtualRenderRows, beforeExcelExport, beforePaste, beforePdfExport, beforeStartEdit, beginAdd, beginEdit, cellEdit, cellSave, cellSaved, checkboxChange, collapseActionComplete, collapsed, collapsing, content, contextMenuClick, contextMenuOpen, crudAction, dataBound, dataListener, dataStateChange, destroy, detailDataBound, doubleTap, expanded, expanding, extendArray, findChildrenRecords, findParentRecords, frozenContent, frozenHeader, frozenLeft, frozenRight, getExpandStatus, getParentData, getPlainData, headerContent, hierarchyCheckstateUpdate, indexModifier, isCheckboxcolumn, isCountRequired, isFilterChildHierarchy, isHidden, isOffline, isRemoteData, keyPressed, leftRight, load, localPagedExpandCollapse, movableContent, movableHeader, pagingActions, printGridInit, queryCellInfo, recordDoubleClick, remoteExpand, resizeStop, rowDataBound, rowDeselected, rowDeselecting, rowDrag, rowDragStart, rowDragStartHelper, rowDrop, rowDropped, rowSelected, rowSelecting, rowdraging, rowsAdd, rowsRemove, savePreviousRowPosition, table, toolbarClick, treeGridDetails, updateData, virtualActionArgs, virtualColumnIndex, virtualExpandCollapse };
17957
17986
  //# sourceMappingURL=ej2-treegrid.es5.js.map