@syncfusion/ej2-treegrid 26.1.42 → 26.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,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 26.1.42
3
+ * version : 26.2.5
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
@@ -0,0 +1 @@
1
+ hotfix/26.1.35_Vol2
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@26.1.41",
3
+ "_id": "@syncfusion/ej2-treegrid@26.1.42",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-bEdBHXZDiDR2JGPI2rITLmXKpMDRRvVllnYUfcv3BangX4MF/JeFtegtHGa2XzX675KPpsyOe9SvwMjzaoEKKQ==",
5
+ "_integrity": "sha512-UGPp38yDOArNOTGVss2EU+BoYFDbtuX7AQPGwepSDA/IvJZqVuuhzIbORFGAovtVu/49UWanMWu9ci47SKkjxw==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-26.1.41.tgz",
28
- "_shasum": "02a9f34ad00196ced1088eb5838061448392009e",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-26.1.42.tgz",
28
+ "_shasum": "ac8621c6da11adaeb47f35a1b10f2e94520bea34",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~26.1.42",
40
- "@syncfusion/ej2-data": "~26.1.42",
41
- "@syncfusion/ej2-grids": "~26.1.42",
42
- "@syncfusion/ej2-popups": "~26.1.42"
39
+ "@syncfusion/ej2-base": "~26.2.5",
40
+ "@syncfusion/ej2-data": "~26.2.5",
41
+ "@syncfusion/ej2-grids": "~26.2.5",
42
+ "@syncfusion/ej2-popups": "~26.2.5"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -76,6 +76,6 @@
76
76
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
77
77
  },
78
78
  "typings": "index.d.ts",
79
- "version": "26.1.42",
79
+ "version": "26.2.5",
80
80
  "sideEffects": false
81
81
  }
@@ -58,6 +58,7 @@ var Selection = /** @class */ (function () {
58
58
  this.removeEventListener();
59
59
  };
60
60
  Selection.prototype.checkboxSelection = function (args) {
61
+ var _a;
61
62
  var target = getObject('target', args);
62
63
  var checkWrap = parentsUntil(target, 'e-checkbox-wrapper');
63
64
  var checkBox;
@@ -75,6 +76,14 @@ var Selection = /** @class */ (function () {
75
76
  checkBox = checkWrap.querySelector('input[type="checkbox"]');
76
77
  this.triggerChkChangeEvent(checkBox, checkBoxvalue, target.closest('tr'));
77
78
  }
79
+ if (!isNullOrUndefined(this.parent['parentQuery']) && this.parent.selectionSettings.persistSelection
80
+ && this.parent['columnModel'].filter(function (col) { return col.type === 'checkbox'; }).length > 0
81
+ && isRemoteData(this.parent)) {
82
+ if (this.parent['parentQuery'].length > 0) {
83
+ (_a = this.parent.query.queries).push.apply(_a, this.parent['parentQuery']);
84
+ this.parent['parentQuery'] = [];
85
+ }
86
+ }
78
87
  };
79
88
  Selection.prototype.triggerChkChangeEvent = function (checkBox, checkState, rowElement) {
80
89
  var data = this.parent.getCurrentViewRecords()[rowElement.rowIndex];
@@ -118,7 +118,7 @@ var VirtualScroll = /** @class */ (function () {
118
118
  }
119
119
  else {
120
120
  var requestType = pageingDetails.actionArgs.requestType;
121
- if (requestType === 'filtering' || requestType === 'collapseAll' || requestType === 'searching' ||
121
+ if (requestType === 'filtering' || requestType === 'collapseAll' || requestType === 'searching' || (requestType === 'refresh' && getValue('isExpandAll', this.parent)) ||
122
122
  (requestType === 'refresh' && this.parent.enableCollapseAll && endIndex > visualData.length && isNullOrUndefined(this.expandCollapseRec))) {
123
123
  startIndex = 0;
124
124
  endIndex = this.parent.grid.pageSettings.pageSize - 1;
@@ -159,7 +159,7 @@ var VirtualScroll = /** @class */ (function () {
159
159
  }
160
160
  }
161
161
  //}
162
- if (this.prevrequestType === 'collapseAll' && pageingDetails.actionArgs.requestType === 'virtualscroll') {
162
+ if (this.prevrequestType === 'collapseAll' && pageingDetails.actionArgs.requestType === 'virtualscroll' && !isNullOrUndefined(this.parent.idMapping)) {
163
163
  startIndex = 0;
164
164
  endIndex = this.parent.grid.pageSettings.pageSize - 1;
165
165
  this.parent.grid.notify(events.virtualActionArgs, { setTop: true });
@@ -19,7 +19,6 @@ export declare class DataManipulation {
19
19
  private isSelfReference;
20
20
  private isSortAction;
21
21
  private infiniteScrollData;
22
- private preCurrentPage;
23
22
  constructor(grid: TreeGrid);
24
23
  /**
25
24
  * @hidden
@@ -18,7 +18,6 @@ var DataManipulation = /** @class */ (function () {
18
18
  this.hierarchyData = [];
19
19
  this.storedIndex = -1;
20
20
  this.sortedData = [];
21
- this.preCurrentPage = -1;
22
21
  this.isSortAction = false;
23
22
  this.addEventListener();
24
23
  this.dataResults = {};
@@ -350,7 +349,7 @@ var DataManipulation = /** @class */ (function () {
350
349
  idMappingValue = rowDetails.record[this.parent.idMapping].toString();
351
350
  }
352
351
  if (this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
353
- qry.take(this.parent.grid.pageSettings.pageSize);
352
+ qry.take(this.parent.pageSettings.pageSize);
354
353
  var expandDetail = [];
355
354
  expandDetail.push('ExpandingAction', idMappingValue.toString());
356
355
  qry.expand(expandDetail);
@@ -538,17 +537,6 @@ var DataManipulation = /** @class */ (function () {
538
537
  }
539
538
  datas.splice(inx + r + 1, 0, result[parseInt(r.toString(), 10)]);
540
539
  }
541
- if (datas.length > result.length &&
542
- datas.length !== _this.parent.grid.pageSettings.pageSize + (_this.parent.grid.contentModule).getBlockSize() &&
543
- _this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
544
- if ((_this.preCurrentPage > 1 || _this.parent.grid.pageSettings.currentPage > 1)) {
545
- datas = datas.slice(0, _this.parent.grid.pageSettings.pageSize + (_this.parent.grid.contentModule).getBlockSize());
546
- }
547
- else {
548
- datas = datas.slice(0, _this.parent.grid.pageSettings.pageSize);
549
- }
550
- _this.preCurrentPage = _this.parent.grid.pageSettings.currentPage;
551
- }
552
540
  setValue('result', datas, e);
553
541
  setValue('action', 'beforecontentrender', e);
554
542
  _this.parent.trigger(events.actionComplete, e);
@@ -568,6 +556,9 @@ var DataManipulation = /** @class */ (function () {
568
556
  _this.parent.grid.pageSettings.totalRecordsCount = e.count;
569
557
  }
570
558
  e.count = _this.parent.grid.pageSettings.totalRecordsCount;
559
+ if (rowDetails.action === 'remoteExpand' && _this.parent.allowPaging) {
560
+ _this.parent.grid.pageSettings.totalRecordsCount = _this.parent.grid.currentViewData.length + result.length;
561
+ }
571
562
  var virtualArgs = {};
572
563
  if (_this.parent.enableVirtualization) {
573
564
  _this.remoteVirtualAction(virtualArgs);
@@ -86,6 +86,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
86
86
  private isAddedFromGantt;
87
87
  private isIndentEnabled;
88
88
  private indentOutdentAction;
89
+ private parentQuery;
89
90
  private isCollapsedEventTriggered;
90
91
  private isCollapsingEventTriggered;
91
92
  private isExpandedEventTriggered;
@@ -1048,10 +1048,24 @@ var TreeGrid = /** @class */ (function (_super) {
1048
1048
  var _this = this;
1049
1049
  this.grid.rowSelecting = function (args) {
1050
1050
  _this.IsExpandCollapseClicked(args);
1051
+ if (!isNullOrUndefined(args.data) && _this.selectionSettings.persistSelection
1052
+ && _this.columnModel.filter(function (col) { return col.type === 'checkbox'; }).length > 0 && isRemoteData(_this)) {
1053
+ if (!isNullOrUndefined(args.data.parentItem)) {
1054
+ _this.parentQuery = _this.query.queries.filter(function (q) { return q.e.field === _this.parentIdMapping; });
1055
+ _this.query.queries = _this.query.queries.slice(0, 0);
1056
+ }
1057
+ }
1051
1058
  _this.trigger(events.rowSelecting, args);
1052
1059
  };
1053
1060
  this.grid.rowDeselecting = function (args) {
1054
1061
  _this.IsExpandCollapseClicked(args);
1062
+ if (isNullOrUndefined(args.data) && _this.selectionSettings.persistSelection
1063
+ && _this.columnModel.filter(function (col) { return col.type === 'checkbox'; }).length > 0 && isRemoteData(_this)) {
1064
+ if (isNullOrUndefined(args.data.parentItem)) {
1065
+ _this.parentQuery = _this.query.queries.filter(function (q) { return q.e.field === _this.parentIdMapping; });
1066
+ _this.query.queries = _this.query.queries.slice(0, 0);
1067
+ }
1068
+ }
1055
1069
  _this.trigger(events.rowDeselecting, args);
1056
1070
  };
1057
1071
  this.grid.rowSelected = function (args) {
@@ -1804,7 +1818,8 @@ var TreeGrid = /** @class */ (function (_super) {
1804
1818
  TreeGrid.prototype.onPropertyChanged = function (newProp) {
1805
1819
  var properties = Object.keys(newProp);
1806
1820
  var requireRefresh = false;
1807
- if (properties.indexOf('columns') > -1 && !isNullOrUndefined(newProp.columns)) {
1821
+ if (properties.indexOf('columns') > -1 && !isNullOrUndefined(newProp.columns) && this.frozenColumns === 0
1822
+ && this.frozenRows === 0 && !this.columnModel.some(function (col) { return col.isFrozen || col.freeze; })) {
1808
1823
  this.grid.columns = this.getGridColumns(newProp.columns);
1809
1824
  this.grid['updateColumnObject']();
1810
1825
  requireRefresh = true;
@@ -3016,13 +3031,13 @@ var TreeGrid = /** @class */ (function (_super) {
3016
3031
  return e.hasChildRecords;
3017
3032
  });
3018
3033
  }
3019
- else if (isNullOrUndefined(record)) {
3034
+ else if (isNullOrUndefined(record) && !isNullOrUndefined(row)) {
3020
3035
  if (this.detailTemplate) {
3021
3036
  record = this.grid.getCurrentViewRecords()[row.getAttribute('data-rowindex')];
3022
3037
  }
3023
3038
  else {
3024
- if (this.enableVirtualization && this.isCollapseAll) {
3025
- if (this.isExpandAll && row.rowIndex === -1) {
3039
+ if (this.enableVirtualization && (this.isCollapseAll || this.isExpandAll)) {
3040
+ if (row.rowIndex === -1) {
3026
3041
  record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
3027
3042
  }
3028
3043
  else {
@@ -3375,9 +3390,12 @@ var TreeGrid = /** @class */ (function (_super) {
3375
3390
  TreeGrid.prototype.expandCollapse = function (action, row, record, isChild) {
3376
3391
  var _this = this;
3377
3392
  var expandingArgs = { row: row, data: record, childData: [], requestType: action };
3378
- var childRecords = this.grid.currentViewData.filter(function (e) {
3379
- return e.parentUniqueID === record.uniqueID;
3380
- });
3393
+ var childRecords;
3394
+ if (!isNullOrUndefined(record)) {
3395
+ childRecords = this.grid.currentViewData.filter(function (e) {
3396
+ return e.parentUniqueID === record.uniqueID;
3397
+ });
3398
+ }
3381
3399
  var targetEle;
3382
3400
  if ((!isRemoteData(this) && action === 'expand' && this.isSelfReference && isCountRequired(this) && !childRecords.length) || (action === 'collapse' || (this.isExpandAll && this.loadChildOnDemand) && !isRemoteData(this) && this.isSelfReference && isCountRequired(this))) {
3383
3401
  this.updateChildOnDemand(expandingArgs);
@@ -3406,7 +3424,7 @@ var TreeGrid = /** @class */ (function (_super) {
3406
3424
  var displayAction = void 0;
3407
3425
  if (action === 'expand') {
3408
3426
  displayAction = 'table-row';
3409
- if (!isChild) {
3427
+ if (!isChild && !isNullOrUndefined(record)) {
3410
3428
  record.expanded = true;
3411
3429
  this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
3412
3430
  }
@@ -3427,7 +3445,7 @@ var TreeGrid = /** @class */ (function (_super) {
3427
3445
  }
3428
3446
  else {
3429
3447
  displayAction = 'none';
3430
- if (!isChild || isCountRequired(this)) {
3448
+ if ((!isChild || isCountRequired(this)) && !isNullOrUndefined(row)) {
3431
3449
  record.expanded = false;
3432
3450
  this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
3433
3451
  }
@@ -94,13 +94,7 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
94
94
  else if (action === 'virtualscroll' && this.cache[parseInt(currentPage.toString(), 10)] &&
95
95
  this.cache[parseInt(currentPage.toString(), 10)].length >
96
96
  (this.parent.contentModule).getBlockSize()) {
97
- if (this.cache[parseInt(currentPage.toString(), 10)].length > (this.parent.contentModule).getBlockSize()) {
98
- this.cache[parseInt(currentPage.toString(), 10)] =
99
- this.cache[parseInt(currentPage.toString(), 10)].slice(0, (this.parent.contentModule).getBlockSize());
100
- }
101
- else {
102
- delete this.cache[parseInt(currentPage.toString(), 10)];
103
- }
97
+ delete this.cache[parseInt(currentPage.toString(), 10)];
104
98
  }
105
99
  }
106
100
  else {
@@ -516,7 +516,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
516
516
  };
517
517
  VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
518
518
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
519
- && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || this.parent.isFrozenGrid()) {
519
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
520
520
  if (getValue('isExpandCollapse', e)) {
521
521
  this.isRemoteExpand = true;
522
522
  }
@@ -47,7 +47,7 @@
47
47
  --color-sf-flyout-bg-color-pressed: #e0e0e0;
48
48
  --color-sf-flyout-bg-color-selected: #ebebeb;
49
49
  --color-sf-flyout-bg-color-focus: #f5f5f5;
50
- --color-sf-overlay-bg-color: #000;
50
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
51
51
  --color-sf-table-bg-color-hover: #f5f5f5;
52
52
  --color-sf-table-bg-color-pressed: #e0e0e0;
53
53
  --color-sf-table-bg-color-selected: #ebf3fc;
@@ -369,7 +369,7 @@
369
369
  --color-sf-flyout-bg-color-pressed: var(--color-sf-black);
370
370
  --color-sf-flyout-bg-color-selected: #383838;
371
371
  --color-sf-flyout-bg-color-focus: var(--color-sf-flyout-bg-color-hover);
372
- --color-sf-overlay-bg-color: rgba($black, .4);
372
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
373
373
  --color-sf-table-bg-color-hover: #383838;
374
374
  --color-sf-table-bg-color-pressed: #2e2e2e;
375
375
  --color-sf-table-bg-color-selected: #082338;
@@ -711,9 +711,9 @@
711
711
  --color-sf-flyout-bg-color-pressed: var(--color-sf-content-bg-color-hover);
712
712
  --color-sf-flyout-bg-color-selected: var(--color-sf-content-bg-color-hover);
713
713
  --color-sf-flyout-bg-color-focus: var(--color-sf-content-bg-color-hover);
714
- --color-sf-overlay-bg-color: rgba($black, .4);
715
- --color-sf-table-bg-color-hover: var(--color-sf-black);
716
- --color-sf-table-bg-color-pressed: var(--color-sf-black);
714
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
715
+ --color-sf-table-bg-color-hover: #1a3bff;
716
+ --color-sf-table-bg-color-pressed: #1a3bff;
717
717
  --color-sf-table-bg-color-selected: #1a3bff;
718
718
  --color-sf-content-text-color: #fff;
719
719
  --color-sf-content-text-color-alt1: var(--color-sf-content-text-color);
@@ -732,12 +732,12 @@
732
732
  --color-sf-flyout-text-color-selected: var(--color-sf-content-text-color-hover);
733
733
  --color-sf-flyout-text-color-focus: var(--color-sf-content-text-color-hover);
734
734
  --color-sf-flyout-text-color-disabled: var(--color-sf-content-text-color-disabled);
735
- --color-sf-table-text-color-hover: var(--color-sf-content-text-color-hover);
736
- --color-sf-table-text-color-pressed: var(--color-sf-content-text-color-hover);
737
- --color-sf-table-text-color-selected: var(--color-sf-content-text-color-hover);
735
+ --color-sf-table-text-color-hover: #000;
736
+ --color-sf-table-text-color-pressed: #000;
737
+ --color-sf-table-text-color-selected: #000;
738
738
  --color-sf-icon-color: #fff;
739
- --color-sf-icon-color-hover: var(--color-sf-content-text-color-hover);
740
- --color-sf-icon-color-pressed: var(--color-sf-content-text-color-hover);
739
+ --color-sf-icon-color-hover: #000;
740
+ --color-sf-icon-color-pressed: #000;
741
741
  --color-sf-icon-color-disabled: var(--color-sf-content-text-color-disabled);
742
742
  --color-sf-border-light: #fff;
743
743
  --color-sf-border: var(--color-sf-border-light);
@@ -47,7 +47,7 @@
47
47
  --color-sf-flyout-bg-color-pressed: #e0e0e0;
48
48
  --color-sf-flyout-bg-color-selected: #ebebeb;
49
49
  --color-sf-flyout-bg-color-focus: #f5f5f5;
50
- --color-sf-overlay-bg-color: #000;
50
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
51
51
  --color-sf-table-bg-color-hover: #f5f5f5;
52
52
  --color-sf-table-bg-color-pressed: #e0e0e0;
53
53
  --color-sf-table-bg-color-selected: #ebf3fc;
@@ -369,7 +369,7 @@
369
369
  --color-sf-flyout-bg-color-pressed: var(--color-sf-black);
370
370
  --color-sf-flyout-bg-color-selected: #383838;
371
371
  --color-sf-flyout-bg-color-focus: var(--color-sf-flyout-bg-color-hover);
372
- --color-sf-overlay-bg-color: rgba($black, .4);
372
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
373
373
  --color-sf-table-bg-color-hover: #383838;
374
374
  --color-sf-table-bg-color-pressed: #2e2e2e;
375
375
  --color-sf-table-bg-color-selected: #082338;
@@ -711,9 +711,9 @@
711
711
  --color-sf-flyout-bg-color-pressed: var(--color-sf-content-bg-color-hover);
712
712
  --color-sf-flyout-bg-color-selected: var(--color-sf-content-bg-color-hover);
713
713
  --color-sf-flyout-bg-color-focus: var(--color-sf-content-bg-color-hover);
714
- --color-sf-overlay-bg-color: rgba($black, .4);
715
- --color-sf-table-bg-color-hover: var(--color-sf-black);
716
- --color-sf-table-bg-color-pressed: var(--color-sf-black);
714
+ --color-sf-overlay-bg-color: rgba(0, 0, 0, .4);
715
+ --color-sf-table-bg-color-hover: #1a3bff;
716
+ --color-sf-table-bg-color-pressed: #1a3bff;
717
717
  --color-sf-table-bg-color-selected: #1a3bff;
718
718
  --color-sf-content-text-color: #fff;
719
719
  --color-sf-content-text-color-alt1: var(--color-sf-content-text-color);
@@ -732,12 +732,12 @@
732
732
  --color-sf-flyout-text-color-selected: var(--color-sf-content-text-color-hover);
733
733
  --color-sf-flyout-text-color-focus: var(--color-sf-content-text-color-hover);
734
734
  --color-sf-flyout-text-color-disabled: var(--color-sf-content-text-color-disabled);
735
- --color-sf-table-text-color-hover: var(--color-sf-content-text-color-hover);
736
- --color-sf-table-text-color-pressed: var(--color-sf-content-text-color-hover);
737
- --color-sf-table-text-color-selected: var(--color-sf-content-text-color-hover);
735
+ --color-sf-table-text-color-hover: #000;
736
+ --color-sf-table-text-color-pressed: #000;
737
+ --color-sf-table-text-color-selected: #000;
738
738
  --color-sf-icon-color: #fff;
739
- --color-sf-icon-color-hover: var(--color-sf-content-text-color-hover);
740
- --color-sf-icon-color-pressed: var(--color-sf-content-text-color-hover);
739
+ --color-sf-icon-color-hover: #000;
740
+ --color-sf-icon-color-pressed: #000;
741
741
  --color-sf-icon-color-disabled: var(--color-sf-content-text-color-disabled);
742
742
  --color-sf-border-light: #fff;
743
743
  --color-sf-border: var(--color-sf-border-light);