@syncfusion/ej2-treegrid 34.2.2 → 34.2.5

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,4 +1,4 @@
1
- import { Property, merge, ChildProperty, Collection, isNullOrUndefined, Browser, removeClass, initializeTelemetryFeature, addClass, getValue, createElement, setValue, extend as extend$1, Internationalization, getEnumValue, compile, Component, L10n, EventHandler, KeyboardEvents, initializeTelemetry, SanitizeHtmlHelper, Complex, Event, NotifyPropertyChanges, closest, setStyleAttribute, select, classList, debounce, remove } from '@syncfusion/ej2-base';
1
+ import { Property, merge, ChildProperty, Collection, isNullOrUndefined, Browser, removeClass, initializeTelemetryFeature, addClass, getValue, createElement, setValue, extend as extend$1, Internationalization, getEnumValue, compile, Component, initializeTelemetry, L10n, EventHandler, KeyboardEvents, SanitizeHtmlHelper, Complex, Event, NotifyPropertyChanges, closest, setStyleAttribute, select, classList, debounce, remove } from '@syncfusion/ej2-base';
2
2
  import { Grid, Logger as Logger$1, detailLists, Clipboard, getObject, parentsUntil, Print as Print$1, templateCompiler, appendChildren, extend, CellRenderer, getUid, CellType, Freeze as Freeze$1, getNumberFormat, setEnableSeamlessScrolling, getActualProperties, iterateArrayOrObject, RowDropSettings as RowDropSettings$1, Reorder as Reorder$1, Resize as Resize$1, Scroll, RowDD as RowDD$1, VirtualRowModelGenerator, Filter as Filter$1, Data, ExportHelper, ExcelExport as ExcelExport$1, PdfExport as PdfExport$1, Page as Page$1, Toolbar as Toolbar$1, calculateAggregate, Aggregate as Aggregate$1, Sort as Sort$1, ColumnMenu as ColumnMenu$1, ContextMenu as ContextMenu$1, resetRowIndex, Edit as Edit$1, CommandColumn as CommandColumn$1, DetailRow as DetailRow$1, Cell, getVisiblePage, VirtualContentRenderer, InterSectionObserver, getTransformValues, RenderType, VirtualHeaderRenderer, VirtualScroll as VirtualScroll$1, ColumnChooser as ColumnChooser$1, getRowIndexFromElement, RowRenderer, InfiniteScroll as InfiniteScroll$1 } from '@syncfusion/ej2-grids';
3
3
  import { createCheckBox } from '@syncfusion/ej2-buttons';
4
4
  import { DataManager, ODataAdaptor, WebApiAdaptor, WebMethodAdaptor, CacheAdaptor, UrlAdaptor, Query, DataUtil, RemoteSaveAdaptor, Deferred, JsonAdaptor, Predicate as Predicate$1 } from '@syncfusion/ej2-data';
@@ -2337,7 +2337,7 @@ var Render = /** @__PURE__ @class */ (function () {
2337
2337
  else {
2338
2338
  expand = !(!data.expanded || !getExpandStatus(this.parent, data, this.parent.grid.getCurrentViewRecords()));
2339
2339
  // TicketsID 43483: While Modify Data Expand and Collapse Icon Behavior Changed
2340
- if (this.parent.editSettings.mode === 'Cell' && !isRemoteData(this.parent)) {
2340
+ if (this.parent.editSettings.mode === 'Cell' && !isRemoteData(this.parent) && this.parent.allowPaging) {
2341
2341
  var selectedRow = this.parent.flatData.find(function (item) { return item.uniqueID === data.uniqueID; });
2342
2342
  if (!isNullOrUndefined(selectedRow)) {
2343
2343
  expand = data.expanded !== selectedRow.expanded ? selectedRow.expanded : data.expanded;
@@ -3163,6 +3163,9 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3163
3163
  getValue('grid.renderModule', _this.parent).dataManagerSuccess(e, virtualArgs);
3164
3164
  }
3165
3165
  _this.parent.trigger(expanded, args);
3166
+ })
3167
+ .catch(function (e) {
3168
+ _this.parent.trigger(actionFailure, e);
3166
3169
  });
3167
3170
  };
3168
3171
  DataManipulation.prototype.remoteVirtualAction = function (virtualArgs) {
@@ -4361,6 +4364,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4361
4364
  return false;
4362
4365
  }
4363
4366
  };
4367
+ initializeTelemetry('TreeGrid');
4364
4368
  TreeGrid_1.Inject(Selection, Logger);
4365
4369
  setValue('mergePersistData', _this.mergePersistTreeGridData, _this);
4366
4370
  var logger = 'Logger';
@@ -5071,7 +5075,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5071
5075
  */
5072
5076
  TreeGrid.prototype.render = function () {
5073
5077
  var _this = this;
5074
- initializeTelemetry('treegrid');
5075
5078
  if (this.isReact) {
5076
5079
  this.grid.isReact = true;
5077
5080
  this.grid.portals = [];
@@ -9713,7 +9716,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
9713
9716
  * Indicates whether the item is being added to the bottom of the TreeGrid.
9714
9717
  */
9715
9718
  this.isaddtoBottom = false;
9716
- initializeTelemetryFeature('rowDragAndDrop', 'treegrid');
9719
+ initializeTelemetryFeature('RowDD', 'TreeGrid');
9717
9720
  Grid.Inject(RowDD$1);
9718
9721
  this.parent = parent;
9719
9722
  this.addEventListener();
@@ -11738,7 +11741,7 @@ var Filter = /** @__PURE__ @class */ (function () {
11738
11741
  * @param {TreeGrid} parent - Tree Grid instance
11739
11742
  */
11740
11743
  function Filter(parent) {
11741
- initializeTelemetryFeature('filter', 'treegrid');
11744
+ initializeTelemetryFeature('Filter', 'TreeGrid');
11742
11745
  Grid.Inject(Filter$1);
11743
11746
  this.parent = parent;
11744
11747
  this.isHierarchyFilter = false;
@@ -11889,6 +11892,7 @@ var Filter = /** @__PURE__ @class */ (function () {
11889
11892
  };
11890
11893
  Filter.prototype.checkChildExsist = function (records) {
11891
11894
  var childRec = getObject('childRecords', records);
11895
+ var isNegativeOperator = this.checkNegativePredicate();
11892
11896
  var isExist = false;
11893
11897
  for (var count = 0; count < childRec.length; count++) {
11894
11898
  var ischild = childRec[parseInt(count.toString(), 10)].childRecords;
@@ -11896,11 +11900,14 @@ var Filter = /** @__PURE__ @class */ (function () {
11896
11900
  this.parent.filterSettings.hierarchyMode : this.parent.searchSettings.hierarchyMode;
11897
11901
  if (((hierarchyMode === 'Child' || hierarchyMode === 'Both') && (this.parent.grid.filterSettings.columns.length !== 0
11898
11902
  || this.parent.grid.searchSettings.key !== ''))) {
11899
- var uniqueIDValue = getValue('uniqueIDFilterCollection', this.parent);
11900
- if (!Object.prototype.hasOwnProperty.call(uniqueIDValue, childRec[parseInt(count.toString(), 10)].uniqueID)) {
11901
- this.filteredResult.push(childRec[parseInt(count.toString(), 10)]);
11902
- setValue('uniqueIDFilterCollection.' + childRec[parseInt(count.toString(), 10)].uniqueID, childRec[parseInt(count.toString(), 10)], this.parent);
11903
- isExist = true;
11903
+ var recordID = childRec[parseInt(count.toString(), 10)].uniqueID;
11904
+ if (!isNegativeOperator) {
11905
+ var uniqueIDValue = getValue('uniqueIDFilterCollection', this.parent);
11906
+ if (!Object.prototype.hasOwnProperty.call(uniqueIDValue, childRec[parseInt(count.toString(), 10)].uniqueID)) {
11907
+ this.filteredResult.push(childRec[parseInt(count.toString(), 10)]);
11908
+ setValue('uniqueIDFilterCollection.' + childRec[parseInt(count.toString(), 10)].uniqueID, childRec[parseInt(count.toString(), 10)], this.parent);
11909
+ isExist = true;
11910
+ }
11904
11911
  }
11905
11912
  }
11906
11913
  if ((hierarchyMode === 'None')
@@ -11951,6 +11958,17 @@ var Filter = /** @__PURE__ @class */ (function () {
11951
11958
  this.filteredResult = [];
11952
11959
  this.parent.notify('updateResults', { result: flatData, count: flatData.length });
11953
11960
  };
11961
+ Filter.prototype.checkNegativePredicate = function () {
11962
+ var filterColumns = this.parent.grid.filterSettings.columns;
11963
+ for (var i = 0; i < filterColumns.length; i++) {
11964
+ var operator = getValue('operator', filterColumns[parseInt(i.toString(), 10)]);
11965
+ if (operator === 'doesnotcontain' || operator === 'notequal' || operator === 'doesnotstartwith'
11966
+ || operator === 'doesnotendwith' || operator === 'notin') {
11967
+ return true;
11968
+ }
11969
+ }
11970
+ return false;
11971
+ };
11954
11972
  return Filter;
11955
11973
  }());
11956
11974
 
@@ -11967,6 +11985,7 @@ var ExcelExport = /** @__PURE__ @class */ (function () {
11967
11985
  */
11968
11986
  function ExcelExport(parent) {
11969
11987
  this.isCollapsedStatePersist = false;
11988
+ initializeTelemetryFeature('ExcelExport', 'TreeGrid');
11970
11989
  Grid.Inject(ExcelExport$1);
11971
11990
  this.parent = parent;
11972
11991
  this.dataResults = {};
@@ -12229,6 +12248,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
12229
12248
  */
12230
12249
  function PdfExport(parent) {
12231
12250
  this.isCollapsedStatePersist = false;
12251
+ initializeTelemetryFeature('PdfExport', 'TreeGrid');
12232
12252
  Grid.Inject(PdfExport$1);
12233
12253
  this.parent = parent;
12234
12254
  this.dataResults = {};
@@ -12430,7 +12450,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
12430
12450
  */
12431
12451
  var Page = /** @__PURE__ @class */ (function () {
12432
12452
  function Page(parent) {
12433
- initializeTelemetryFeature('pager', 'treegrid');
12453
+ initializeTelemetryFeature('Page', 'TreeGrid');
12434
12454
  Grid.Inject(Page$1);
12435
12455
  this.parent = parent;
12436
12456
  this.addEventListener();
@@ -13023,7 +13043,7 @@ var Aggregate = /** @__PURE__ @class */ (function () {
13023
13043
  */
13024
13044
  var Sort = /** @__PURE__ @class */ (function () {
13025
13045
  function Sort(grid) {
13026
- initializeTelemetryFeature('sort', 'treegrid');
13046
+ initializeTelemetryFeature('Sort', 'TreeGrid');
13027
13047
  Grid.Inject(Sort$1);
13028
13048
  this.parent = grid;
13029
13049
  this.taskIds = [];
@@ -14052,7 +14072,7 @@ var Edit = /** @__PURE__ @class */ (function () {
14052
14072
  this.isAddedRowByContextMenu = false;
14053
14073
  this.isIndexUndefined = false;
14054
14074
  this.isAddedMultipleRowsByMethod = false;
14055
- initializeTelemetryFeature('edit', 'treegrid');
14075
+ initializeTelemetryFeature('Edit', 'TreeGrid');
14056
14076
  Grid.Inject(Edit$1);
14057
14077
  this.parent = parent;
14058
14078
  this.isSelfReference = !isNullOrUndefined(parent.parentIdMapping);
@@ -15245,7 +15265,7 @@ var CommandColumn = /** @__PURE__ @class */ (function () {
15245
15265
  */
15246
15266
  var DetailRow = /** @__PURE__ @class */ (function () {
15247
15267
  function DetailRow(parent) {
15248
- initializeTelemetryFeature('detailRow', 'treegrid');
15268
+ initializeTelemetryFeature('DetailRow', 'TreeGrid');
15249
15269
  Grid.Inject(DetailRow$1);
15250
15270
  this.parent = parent;
15251
15271
  this.addEventListener();
@@ -16586,6 +16606,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
16586
16606
  this.setEndIndexToGantt = true;
16587
16607
  this.prevendIndex = -1;
16588
16608
  this.prevSelectedRecord = [];
16609
+ initializeTelemetryFeature('VirtualScroll', 'TreeGrid');
16589
16610
  this.parent = parent;
16590
16611
  Grid.Inject(TreeVirtual);
16591
16612
  this.addEventListener();
@@ -17041,6 +17062,7 @@ var InfiniteScroll = /** @__PURE__ @class */ (function () {
17041
17062
  * @param {TreeGrid} parent - Tree Grid instance
17042
17063
  */
17043
17064
  function InfiniteScroll(parent) {
17065
+ initializeTelemetryFeature('InfiniteScroll', 'TreeGrid');
17044
17066
  this.parent = parent;
17045
17067
  Grid.Inject(InfiniteScroll$1);
17046
17068
  this.addEventListener();