@churchillliving/se-ui-toolkit 6.53.155 → 6.53.156

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.
@@ -3669,12 +3669,12 @@
3669
3669
  };
3670
3670
  GridComponent.prototype.ngOnChanges = function (change) {
3671
3671
  var _this = this;
3672
- var _a, _b, _c, _d;
3672
+ var _a, _b, _c, _d, _e;
3673
3673
  if (this.allowCaching !== false && this.pagination) {
3674
3674
  this.allowCaching = this.pagination;
3675
3675
  }
3676
3676
  else {
3677
- localStorage.removeItem('SetFilters-' + currentUrl());
3677
+ localStorage.removeItem('SetFilters-' + currentUrl() + ((_a = this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id));
3678
3678
  }
3679
3679
  // add defaultRow in pagination array
3680
3680
  if (!this.setPaginationLength.includes(this.defaultRows)) {
@@ -3689,7 +3689,7 @@
3689
3689
  this.applyColumnsPermissions();
3690
3690
  // apply global permissions on entire grid
3691
3691
  this.applyGridPermissions();
3692
- this._selectedColumns = (_a = this.columns) === null || _a === void 0 ? void 0 : _a.filter(function (x) { return !x.hidden; });
3692
+ this._selectedColumns = (_b = this.columns) === null || _b === void 0 ? void 0 : _b.filter(function (x) { return !x.hidden; });
3693
3693
  this.cd.detectChanges();
3694
3694
  if (hasColumns) {
3695
3695
  this.columns = this.gridService.setColumnFields(this.columns);
@@ -3699,6 +3699,7 @@
3699
3699
  this.hideFilter = true;
3700
3700
  }
3701
3701
  this.columns.forEach(function (column) {
3702
+ var _a, _b;
3702
3703
  // convert string time into the date
3703
3704
  if (column.type === exports.EGridColumnType.DATE && column.timeOnly === true) {
3704
3705
  _this.rowsData.forEach(function (row) {
@@ -3729,10 +3730,10 @@
3729
3730
  }
3730
3731
  var searchFilters;
3731
3732
  if (!_this.softCaching) {
3732
- searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl()));
3733
+ searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl() + ((_a = _this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id)));
3733
3734
  }
3734
3735
  else {
3735
- searchFilters = _this.gridService.softCachingFilters[currentUrl()];
3736
+ searchFilters = _this.gridService.softCachingFilters[currentUrl() + ((_b = _this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id)];
3736
3737
  }
3737
3738
  if (!_this.hideFilter &&
3738
3739
  searchFilters &&
@@ -3785,7 +3786,7 @@
3785
3786
  }
3786
3787
  });
3787
3788
  // Searching scenario
3788
- if (((_b = change.rows) === null || _b === void 0 ? void 0 : _b.currentValue) && ((_c = change.columns) === null || _c === void 0 ? void 0 : _c.currentValue)) {
3789
+ if (((_c = change.rows) === null || _c === void 0 ? void 0 : _c.currentValue) && ((_d = change.columns) === null || _d === void 0 ? void 0 : _d.currentValue)) {
3789
3790
  // Checks either column value is changes (i.e., column hidden scenario)
3790
3791
  if (JSON.stringify(change.columns.currentValue).toLowerCase() !==
3791
3792
  JSON.stringify(this.columns).toLowerCase()) {
@@ -3826,7 +3827,7 @@
3826
3827
  if (globalSearchbtn) {
3827
3828
  this.searchGridFilter = false;
3828
3829
  }
3829
- if (((_d = this.rowsData) === null || _d === void 0 ? void 0 : _d.length) > 0) {
3830
+ if (((_e = this.rowsData) === null || _e === void 0 ? void 0 : _e.length) > 0) {
3830
3831
  this.rowsDataCopy = JSON.parse(JSON.stringify(this.rowsData));
3831
3832
  }
3832
3833
  };
@@ -4255,7 +4256,7 @@
4255
4256
  var _this = this;
4256
4257
  this.gridfilter = event;
4257
4258
  setTimeout(function () {
4258
- var _a, _b;
4259
+ var _a, _b, _c, _d;
4259
4260
  if (_this.selectedColumns && _this.selectedColumns.length > 0) {
4260
4261
  _this.selectedColumns.forEach(function (x) {
4261
4262
  if (event.filters[x.field]) {
@@ -4274,10 +4275,10 @@
4274
4275
  ((_b = _this.serverFilters) === null || _b === void 0 ? void 0 : _b.filters.length) > 0 &&
4275
4276
  (_this.allowCaching || _this.softCaching)) {
4276
4277
  if (!_this.softCaching) {
4277
- localStorage.setItem('SetFilters-' + currentUrl(), JSON.stringify(_this.serverFilters));
4278
+ localStorage.setItem('SetFilters-' + currentUrl() + ((_c = _this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id), JSON.stringify(_this.serverFilters));
4278
4279
  }
4279
4280
  else {
4280
- _this.gridService.softCachingFilters[currentUrl()] = _this.serverFilters;
4281
+ _this.gridService.softCachingFilters[currentUrl() + ((_d = _this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id)] = _this.serverFilters;
4281
4282
  }
4282
4283
  }
4283
4284
  var serverFilterValues = JSON.parse(JSON.stringify(_this.serverFilters));
@@ -5195,30 +5196,30 @@
5195
5196
  };
5196
5197
  // Removing Header Filter Value using Backspace key Event or Delete key Event.
5197
5198
  GridComponent.prototype.removingFilters = function (event, column) {
5198
- var _a;
5199
+ var _a, _b, _c, _d, _e, _f;
5199
5200
  if ((event.key === 'Backspace' || event.key === 'Delete') &&
5200
5201
  ((_a = column.value) === null || _a === void 0 ? void 0 : _a.toString().length) === 0) {
5201
5202
  var searchFilters = void 0;
5202
5203
  if (!this.softCaching) {
5203
- searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl()));
5204
+ searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl() + ((_b = this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id)));
5204
5205
  }
5205
5206
  else {
5206
- searchFilters = this.gridService.softCachingFilters[currentUrl()];
5207
+ searchFilters = this.gridService.softCachingFilters[currentUrl() + ((_c = this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id)];
5207
5208
  }
5208
5209
  if (searchFilters && searchFilters.filters) {
5209
5210
  if (searchFilters.filters.length > 0) {
5210
5211
  var index = searchFilters.filters.findIndex(function (x) { return x.field === column.field; });
5211
5212
  if (index !== -1) {
5212
5213
  if (searchFilters.filters.length === 1) {
5213
- localStorage.removeItem('SetFilters-' + currentUrl());
5214
+ localStorage.removeItem('SetFilters-' + currentUrl() + ((_d = this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id));
5214
5215
  }
5215
5216
  else {
5216
5217
  searchFilters.filters.splice(index, 1);
5217
5218
  if (!this.softCaching) {
5218
- localStorage.setItem('SetFilters-' + currentUrl(), JSON.stringify(searchFilters));
5219
+ localStorage.setItem('SetFilters-' + currentUrl() + ((_e = this.componentTableRef) === null || _e === void 0 ? void 0 : _e.id), JSON.stringify(searchFilters));
5219
5220
  }
5220
5221
  else {
5221
- this.gridService.softCachingFilters[currentUrl()] = searchFilters;
5222
+ this.gridService.softCachingFilters[currentUrl() + ((_f = this.componentTableRef) === null || _f === void 0 ? void 0 : _f.id)] = searchFilters;
5222
5223
  }
5223
5224
  }
5224
5225
  }