@syncfusion/ej2-treegrid 24.1.45 → 24.2.3

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.
@@ -6796,7 +6796,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6796
6796
  if (!isNullOrUndefined(row)) {
6797
6797
  row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
6798
6798
  }
6799
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)
6799
+ if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)
6800
6800
  && !isCountRequired(this)) {
6801
6801
  this.notify(localPagedExpandCollapse, { action: action, row: row, record: record });
6802
6802
  }
@@ -11084,7 +11084,15 @@ var ContextMenu$1 = /** @__PURE__ @class */ (function () {
11084
11084
  var selectedrow = tObj.getSelectedRows()[0];
11085
11085
  if ((indent || outdent) && !isNullOrUndefined(selectedrow)) {
11086
11086
  var targetElement = args.event.target.closest('td');
11087
- if (isNullOrUndefined(targetElement) || (!isNullOrUndefined(targetElement) && (!targetElement.classList.contains('e-rowcell') || targetElement.querySelectorAll('.e-gridform').length !== 0))) {
11087
+ if (isNullOrUndefined(targetElement) || (!isNullOrUndefined(targetElement) && (!targetElement.classList.contains('e-rowcell') ||
11088
+ targetElement.querySelectorAll('.e-gridform').length !== 0))) {
11089
+ for (var _i = 0, _a = args.items; _i < _a.length; _i++) {
11090
+ var items = _a[_i];
11091
+ if (items.text === 'Outdent' || items.text === 'Indent') {
11092
+ tObj.grid.contextMenuModule['hiddenItems'].push(items.text);
11093
+ }
11094
+ }
11095
+ tObj.grid.contextMenuModule.contextMenu.hideItems(tObj.grid.contextMenuModule['hiddenItems']);
11088
11096
  indent.style.display = outdent.style.display = 'none';
11089
11097
  }
11090
11098
  else {
@@ -11114,9 +11122,15 @@ var ContextMenu$1 = /** @__PURE__ @class */ (function () {
11114
11122
  }
11115
11123
  }
11116
11124
  else {
11117
- if (tObj.grid.isEdit && isNullOrUndefined(selectedrow)) {
11118
- indent.style.display = 'none';
11119
- outdent.style.display = 'none';
11125
+ if (((indent || outdent) || tObj.grid.isEdit) && isNullOrUndefined(selectedrow)) {
11126
+ for (var _b = 0, _c = args.items; _b < _c.length; _b++) {
11127
+ var items = _c[_b];
11128
+ if (items.text === 'Outdent' || items.text === 'Indent') {
11129
+ tObj.grid.contextMenuModule['hiddenItems'].push(items.text);
11130
+ }
11131
+ }
11132
+ tObj.grid.contextMenuModule.contextMenu.hideItems(tObj.grid.contextMenuModule['hiddenItems']);
11133
+ indent.style.display = outdent.style.display = 'none';
11120
11134
  }
11121
11135
  }
11122
11136
  };
@@ -14053,7 +14067,6 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
14053
14067
  this.parent.grid.on('infinite-edit-handler', this.infiniteEditHandler, this);
14054
14068
  this.parent.grid.on('infinite-crud-cancel', this.createRows, this);
14055
14069
  this.parent.grid.on('content-ready', this.contentready, this);
14056
- this.parent.on(localPagedExpandCollapse, this.collapseExpandInfinitechilds, this);
14057
14070
  };
14058
14071
  /**
14059
14072
  * @hidden
@@ -14069,7 +14082,6 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
14069
14082
  this.parent.off(pagingActions, this.infinitePageAction);
14070
14083
  this.parent.grid.off('infinite-crud-cancel', this.createRows);
14071
14084
  this.parent.grid.off('content-ready', this.contentready);
14072
- this.parent.off(localPagedExpandCollapse, this.collapseExpandInfinitechilds);
14073
14085
  };
14074
14086
  /**
14075
14087
  * Handles the Expand Collapse action for Remote data with infinite scrolling.
@@ -14119,18 +14131,6 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
14119
14131
  }
14120
14132
  }
14121
14133
  };
14122
- InfiniteScroll$$1.prototype.collapseExpandInfinitechilds = function (row) {
14123
- row.record.expanded = row.action === 'collapse' ? false : true;
14124
- var ret = {
14125
- result: this.parent.flatData,
14126
- row: row.row,
14127
- action: row.action,
14128
- record: row.record,
14129
- count: this.parent.flatData.length
14130
- };
14131
- var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
14132
- getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, { requestType: requestType });
14133
- };
14134
14134
  /**
14135
14135
  * Handles the page query for Data operations and CRUD actions.
14136
14136
  *
@@ -14141,13 +14141,9 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
14141
14141
  * @returns {void}
14142
14142
  */
14143
14143
  InfiniteScroll$$1.prototype.infinitePageAction = function (pageingDetails) {
14144
- var _this = this;
14145
14144
  var dm = new DataManager(pageingDetails.result);
14146
14145
  var expanded$$1 = new Predicate('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
14147
- var infiniteParents = dm.executeLocal(new Query().where(expanded$$1));
14148
- var visualData = infiniteParents.filter(function (e) {
14149
- return getExpandStatus(_this.parent, e, infiniteParents);
14150
- });
14146
+ var visualData = dm.executeLocal(new Query().where(expanded$$1));
14151
14147
  var actionArgs = getValue('actionArgs', pageingDetails.actionArgs);
14152
14148
  var actions = getValue('actions', this.parent.grid.infiniteScrollModule);
14153
14149
  if (this.parent.grid.infiniteScrollModule['isInitialRender'] && !this.parent.initialRender) {
@@ -14184,10 +14180,6 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
14184
14180
  query = query.take(this.parent.infiniteScrollSettings.initialBlocks * this.parent.pageSettings.pageSize);
14185
14181
  }
14186
14182
  else {
14187
- if ((pageingDetails.actionArgs['action'] === 'expand' || pageingDetails.actionArgs['action'] === 'collapse') && this.parent.grid.pageSettings.currentPage !== 1) {
14188
- current = 1;
14189
- size = this.parent.grid.pageSettings.pageSize * this.parent.grid.pageSettings.currentPage;
14190
- }
14191
14183
  query = query.page(current, size);
14192
14184
  }
14193
14185
  }