@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 { merge, Property, ChildProperty, Collection, isNullOrUndefined, Browser, initializeTelemetryFeature, removeClass, 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 { merge, Property, ChildProperty, Collection, isNullOrUndefined, Browser, initializeTelemetryFeature, removeClass, 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 { Logger as Logger$1, Grid, 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, RowDD as RowDD$1, Scroll, VirtualRowModelGenerator, Filter as Filter$1, ExcelExport as ExcelExport$1, Data, ExportHelper, PdfExport as PdfExport$1, Page as Page$1, Toolbar as Toolbar$1, Aggregate as Aggregate$1, calculateAggregate, Sort as Sort$1, ColumnMenu as ColumnMenu$1, ContextMenu as ContextMenu$1, Edit as Edit$1, resetRowIndex, CommandColumn as CommandColumn$1, DetailRow as DetailRow$1, VirtualContentRenderer, Cell, getVisiblePage, InterSectionObserver, getTransformValues, VirtualScroll as VirtualScroll$1, RenderType, VirtualHeaderRenderer, ColumnChooser as ColumnChooser$1, InfiniteScroll as InfiniteScroll$1, getRowIndexFromElement, RowRenderer } 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';
@@ -2176,7 +2176,7 @@ class Render {
2176
2176
  else {
2177
2177
  expand = !(!data.expanded || !getExpandStatus(this.parent, data, this.parent.grid.getCurrentViewRecords()));
2178
2178
  // TicketsID 43483: While Modify Data Expand and Collapse Icon Behavior Changed
2179
- if (this.parent.editSettings.mode === 'Cell' && !isRemoteData(this.parent)) {
2179
+ if (this.parent.editSettings.mode === 'Cell' && !isRemoteData(this.parent) && this.parent.allowPaging) {
2180
2180
  const selectedRow = this.parent.flatData.find((item) => item.uniqueID === data.uniqueID);
2181
2181
  if (!isNullOrUndefined(selectedRow)) {
2182
2182
  expand = data.expanded !== selectedRow.expanded ? selectedRow.expanded : data.expanded;
@@ -2988,6 +2988,9 @@ class DataManipulation {
2988
2988
  getValue('grid.renderModule', this.parent).dataManagerSuccess(e, virtualArgs);
2989
2989
  }
2990
2990
  this.parent.trigger(expanded, args);
2991
+ })
2992
+ .catch((e) => {
2993
+ this.parent.trigger(actionFailure, e);
2991
2994
  });
2992
2995
  }
2993
2996
  remoteVirtualAction(virtualArgs) {
@@ -4048,6 +4051,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4048
4051
  return false;
4049
4052
  }
4050
4053
  };
4054
+ initializeTelemetry('TreeGrid');
4051
4055
  TreeGrid_1.Inject(Selection, Logger);
4052
4056
  setValue('mergePersistData', this.mergePersistTreeGridData, this);
4053
4057
  const logger = 'Logger';
@@ -4754,7 +4758,6 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
4754
4758
  * @returns {void}
4755
4759
  */
4756
4760
  render() {
4757
- initializeTelemetry('treegrid');
4758
4761
  if (this.isReact) {
4759
4762
  this.grid.isReact = true;
4760
4763
  this.grid.portals = [];
@@ -9340,7 +9343,7 @@ class RowDD {
9340
9343
  * Indicates whether the item is being added to the bottom of the TreeGrid.
9341
9344
  */
9342
9345
  this.isaddtoBottom = false;
9343
- initializeTelemetryFeature('rowDragAndDrop', 'treegrid');
9346
+ initializeTelemetryFeature('RowDD', 'TreeGrid');
9344
9347
  Grid.Inject(RowDD$1);
9345
9348
  this.parent = parent;
9346
9349
  this.addEventListener();
@@ -11318,7 +11321,7 @@ class Filter {
11318
11321
  * @param {TreeGrid} parent - Tree Grid instance
11319
11322
  */
11320
11323
  constructor(parent) {
11321
- initializeTelemetryFeature('filter', 'treegrid');
11324
+ initializeTelemetryFeature('Filter', 'TreeGrid');
11322
11325
  Grid.Inject(Filter$1);
11323
11326
  this.parent = parent;
11324
11327
  this.isHierarchyFilter = false;
@@ -11469,6 +11472,7 @@ class Filter {
11469
11472
  }
11470
11473
  checkChildExsist(records) {
11471
11474
  const childRec = getObject('childRecords', records);
11475
+ const isNegativeOperator = this.checkNegativePredicate();
11472
11476
  let isExist = false;
11473
11477
  for (let count = 0; count < childRec.length; count++) {
11474
11478
  const ischild = childRec[parseInt(count.toString(), 10)].childRecords;
@@ -11476,11 +11480,14 @@ class Filter {
11476
11480
  this.parent.filterSettings.hierarchyMode : this.parent.searchSettings.hierarchyMode;
11477
11481
  if (((hierarchyMode === 'Child' || hierarchyMode === 'Both') && (this.parent.grid.filterSettings.columns.length !== 0
11478
11482
  || this.parent.grid.searchSettings.key !== ''))) {
11479
- const uniqueIDValue = getValue('uniqueIDFilterCollection', this.parent);
11480
- if (!Object.prototype.hasOwnProperty.call(uniqueIDValue, childRec[parseInt(count.toString(), 10)].uniqueID)) {
11481
- this.filteredResult.push(childRec[parseInt(count.toString(), 10)]);
11482
- setValue('uniqueIDFilterCollection.' + childRec[parseInt(count.toString(), 10)].uniqueID, childRec[parseInt(count.toString(), 10)], this.parent);
11483
- isExist = true;
11483
+ const recordID = childRec[parseInt(count.toString(), 10)].uniqueID;
11484
+ if (!isNegativeOperator) {
11485
+ const uniqueIDValue = getValue('uniqueIDFilterCollection', this.parent);
11486
+ if (!Object.prototype.hasOwnProperty.call(uniqueIDValue, childRec[parseInt(count.toString(), 10)].uniqueID)) {
11487
+ this.filteredResult.push(childRec[parseInt(count.toString(), 10)]);
11488
+ setValue('uniqueIDFilterCollection.' + childRec[parseInt(count.toString(), 10)].uniqueID, childRec[parseInt(count.toString(), 10)], this.parent);
11489
+ isExist = true;
11490
+ }
11484
11491
  }
11485
11492
  }
11486
11493
  if ((hierarchyMode === 'None')
@@ -11531,6 +11538,17 @@ class Filter {
11531
11538
  this.filteredResult = [];
11532
11539
  this.parent.notify('updateResults', { result: flatData, count: flatData.length });
11533
11540
  }
11541
+ checkNegativePredicate() {
11542
+ const filterColumns = this.parent.grid.filterSettings.columns;
11543
+ for (let i = 0; i < filterColumns.length; i++) {
11544
+ const operator = getValue('operator', filterColumns[parseInt(i.toString(), 10)]);
11545
+ if (operator === 'doesnotcontain' || operator === 'notequal' || operator === 'doesnotstartwith'
11546
+ || operator === 'doesnotendwith' || operator === 'notin') {
11547
+ return true;
11548
+ }
11549
+ }
11550
+ return false;
11551
+ }
11534
11552
  }
11535
11553
 
11536
11554
  /**
@@ -11546,6 +11564,7 @@ class ExcelExport {
11546
11564
  */
11547
11565
  constructor(parent) {
11548
11566
  this.isCollapsedStatePersist = false;
11567
+ initializeTelemetryFeature('ExcelExport', 'TreeGrid');
11549
11568
  Grid.Inject(ExcelExport$1);
11550
11569
  this.parent = parent;
11551
11570
  this.dataResults = {};
@@ -11805,6 +11824,7 @@ class PdfExport {
11805
11824
  */
11806
11825
  constructor(parent) {
11807
11826
  this.isCollapsedStatePersist = false;
11827
+ initializeTelemetryFeature('PdfExport', 'TreeGrid');
11808
11828
  Grid.Inject(PdfExport$1);
11809
11829
  this.parent = parent;
11810
11830
  this.dataResults = {};
@@ -12003,7 +12023,7 @@ class PdfExport {
12003
12023
  */
12004
12024
  class Page {
12005
12025
  constructor(parent) {
12006
- initializeTelemetryFeature('pager', 'treegrid');
12026
+ initializeTelemetryFeature('Page', 'TreeGrid');
12007
12027
  Grid.Inject(Page$1);
12008
12028
  this.parent = parent;
12009
12029
  this.addEventListener();
@@ -12583,7 +12603,7 @@ class Aggregate {
12583
12603
  */
12584
12604
  class Sort {
12585
12605
  constructor(grid) {
12586
- initializeTelemetryFeature('sort', 'treegrid');
12606
+ initializeTelemetryFeature('Sort', 'TreeGrid');
12587
12607
  Grid.Inject(Sort$1);
12588
12608
  this.parent = grid;
12589
12609
  this.taskIds = [];
@@ -13591,7 +13611,7 @@ class Edit {
13591
13611
  this.isAddedRowByContextMenu = false;
13592
13612
  this.isIndexUndefined = false;
13593
13613
  this.isAddedMultipleRowsByMethod = false;
13594
- initializeTelemetryFeature('edit', 'treegrid');
13614
+ initializeTelemetryFeature('Edit', 'TreeGrid');
13595
13615
  Grid.Inject(Edit$1);
13596
13616
  this.parent = parent;
13597
13617
  this.isSelfReference = !isNullOrUndefined(parent.parentIdMapping);
@@ -14769,7 +14789,7 @@ class CommandColumn {
14769
14789
  */
14770
14790
  class DetailRow {
14771
14791
  constructor(parent) {
14772
- initializeTelemetryFeature('detailRow', 'treegrid');
14792
+ initializeTelemetryFeature('DetailRow', 'TreeGrid');
14773
14793
  Grid.Inject(DetailRow$1);
14774
14794
  this.parent = parent;
14775
14795
  this.addEventListener();
@@ -16073,6 +16093,7 @@ class VirtualScroll {
16073
16093
  this.setEndIndexToGantt = true;
16074
16094
  this.prevendIndex = -1;
16075
16095
  this.prevSelectedRecord = [];
16096
+ initializeTelemetryFeature('VirtualScroll', 'TreeGrid');
16076
16097
  this.parent = parent;
16077
16098
  Grid.Inject(TreeVirtual);
16078
16099
  this.addEventListener();
@@ -16517,6 +16538,7 @@ class InfiniteScroll {
16517
16538
  * @param {TreeGrid} parent - Tree Grid instance
16518
16539
  */
16519
16540
  constructor(parent) {
16541
+ initializeTelemetryFeature('InfiniteScroll', 'TreeGrid');
16520
16542
  this.parent = parent;
16521
16543
  Grid.Inject(InfiniteScroll$1);
16522
16544
  this.addEventListener();