@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.
@@ -506,6 +506,8 @@ const actionFailure = 'actionFailure';
506
506
  const collapseActionComplete = 'collapseActionComplete';
507
507
  /** @hidden */
508
508
  const hierarchyCheckstateUpdate = 'hierarchy-checkstate-update';
509
+ /** @hidden */
510
+ const beforeDomVirtualRenderRows = 'before-dom-virtual-rows-render';
509
511
 
510
512
  /**
511
513
  * The `Clipboard` module is used to handle clipboard copy action.
@@ -1092,7 +1094,7 @@ class Selection {
1092
1094
  const headerElement = this.parent.getHeaderContent().querySelectorAll('.e-headercelldiv')[this.columnIndex];
1093
1095
  if (headerElement && headerElement.querySelectorAll('.e-treeselectall').length === 0) {
1094
1096
  const value = false; // Initial state can be false.
1095
- const rowChkBox = this.parent.createElement('input', { className: 'e-treeselectall', attrs: { 'type': 'checkbox' } });
1097
+ const rowChkBox = this.parent.createElement('input', { className: 'e-treeselectall', attrs: { 'type': 'checkbox', 'aria-label': 'Select all checkbox' } });
1096
1098
  const checkWrap = createCheckBox(this.parent.createElement, false, { checked: value, label: ' ' });
1097
1099
  headerElement.classList.add('e-headerchkcelldiv');
1098
1100
  checkWrap.classList.add('e-hierarchycheckbox');
@@ -12819,6 +12821,18 @@ class Aggregate {
12819
12821
  parentRecord = parentRecords[parseInt(i.toString(), 10)];
12820
12822
  childRecordsLength = this.getChildRecordsLength(parentRecord, flatRecords);
12821
12823
  if (childRecordsLength) {
12824
+ const childRecords = getObject('childRecords', parentRecord) || [];
12825
+ const existingSummaryRows = childRecords.filter((e) => getObject('isSummaryRow', e) && getObject('parentUniqueID', e) === parentRecord.uniqueID);
12826
+ existingSummaryRows.forEach((summaryRow) => {
12827
+ const summaryIndex = flatRecords.indexOf(summaryRow);
12828
+ if (summaryIndex !== -1) {
12829
+ flatRecords.splice(summaryIndex, 1);
12830
+ }
12831
+ const childSummaryIndex = childRecords.indexOf(summaryRow);
12832
+ if (childSummaryIndex !== -1) {
12833
+ childRecords.splice(childSummaryIndex, 1);
12834
+ }
12835
+ });
12822
12836
  for (let summaryRowIndex = 1, len = summaryLength; summaryRowIndex <= len; summaryRowIndex++) {
12823
12837
  let item;
12824
12838
  item = {};
@@ -12846,7 +12860,6 @@ class Aggregate {
12846
12860
  setValue('isSummaryRow', true, item);
12847
12861
  setValue('parentUniqueID', summaryParent.uniqueID, item);
12848
12862
  if (isSort) {
12849
- const childRecords = getObject('childRecords', parentRecord);
12850
12863
  if (childRecords.length) {
12851
12864
  childRecords.push(item);
12852
12865
  }
@@ -17151,6 +17164,10 @@ class DomVirtualization {
17151
17164
  * @param {ServiceLocator} locator - Service locator for dependency injection
17152
17165
  */
17153
17166
  constructor(parent, locator) {
17167
+ /** @hidden */
17168
+ this.startIndex = -1;
17169
+ /** @hidden */
17170
+ this.endIndex = -1;
17154
17171
  initializeTelemetryFeature('DomVirtualization', 'TreeGrid');
17155
17172
  this.parent = parent;
17156
17173
  this.locator = locator;
@@ -17171,6 +17188,7 @@ class DomVirtualization {
17171
17188
  this.parent.on(destroy$1, this.destroy, this);
17172
17189
  this.parent.on(virtualExpandCollapse, this.collapseExpandVirtualchilds, this);
17173
17190
  this.parent.on(pagingActions, this.virtualPageAction, this);
17191
+ this.parent.grid.on(beforeDomVirtualRenderRows, this.updateCurrentDomVirtualRecords, this);
17174
17192
  }
17175
17193
  /**
17176
17194
  * @hidden
@@ -17183,6 +17201,7 @@ class DomVirtualization {
17183
17201
  this.parent.off(destroy$1, this.destroy);
17184
17202
  this.parent.off(virtualExpandCollapse, this.collapseExpandVirtualchilds);
17185
17203
  this.parent.off(pagingActions, this.virtualPageAction);
17204
+ this.parent.grid.off(beforeDomVirtualRenderRows, this.updateCurrentDomVirtualRecords);
17186
17205
  }
17187
17206
  /**
17188
17207
  * Handles the action related to virtual scrolling with paging details.
@@ -17325,6 +17344,11 @@ class DomVirtualization {
17325
17344
  };
17326
17345
  getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: 'refresh' });
17327
17346
  }
17347
+ updateCurrentDomVirtualRecords(args) {
17348
+ this.startIndex = args.startIndex;
17349
+ this.endIndex = args.endIndex;
17350
+ this.parent.currentDomVirtualRecords = this.parent.virtualDomScrollData.slice(this.startIndex, this.endIndex);
17351
+ }
17328
17352
  destroy() {
17329
17353
  this.removeEventListener();
17330
17354
  }
@@ -17351,5 +17375,5 @@ class DomVirtualTreeExtension extends DomVirtualization$1 {
17351
17375
  }
17352
17376
  }
17353
17377
 
17354
- 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 };
17378
+ 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 };
17355
17379
  //# sourceMappingURL=ej2-treegrid.es2015.js.map