@churchillliving/se-ui-toolkit 6.53.161 → 6.53.162

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.
@@ -3699,7 +3699,7 @@
3699
3699
  this.hideFilter = true;
3700
3700
  }
3701
3701
  this.columns.forEach(function (column) {
3702
- var _a, _b;
3702
+ var _a, _b, _c, _d;
3703
3703
  // convert string time into the date
3704
3704
  if (column.type === exports.EGridColumnType.DATE && column.timeOnly === true) {
3705
3705
  _this.rowsData.forEach(function (row) {
@@ -3732,8 +3732,8 @@
3732
3732
  if (!_this.softCaching && ((_a = _this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id)) {
3733
3733
  searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + ((_b = _this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id) + currentUrl()));
3734
3734
  }
3735
- else {
3736
- searchFilters = _this.gridService.softCachingFilters[currentUrl()];
3735
+ else if ((_c = _this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id) {
3736
+ searchFilters = _this.gridService.softCachingFilters[((_d = _this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id) + currentUrl()];
3737
3737
  }
3738
3738
  if (!_this.hideFilter &&
3739
3739
  searchFilters &&
@@ -4256,7 +4256,7 @@
4256
4256
  var _this = this;
4257
4257
  this.gridfilter = event;
4258
4258
  setTimeout(function () {
4259
- var _a, _b, _c, _d;
4259
+ var _a, _b, _c, _d, _e, _f;
4260
4260
  if (_this.selectedColumns && _this.selectedColumns.length > 0) {
4261
4261
  _this.selectedColumns.forEach(function (x) {
4262
4262
  if (event.filters[x.field]) {
@@ -4277,8 +4277,8 @@
4277
4277
  if (!_this.softCaching && ((_c = _this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id)) {
4278
4278
  localStorage.setItem('SetFilters-' + ((_d = _this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id) + currentUrl(), JSON.stringify(_this.serverFilters));
4279
4279
  }
4280
- else {
4281
- _this.gridService.softCachingFilters[currentUrl()] = _this.serverFilters;
4280
+ else if ((_e = _this.componentTableRef) === null || _e === void 0 ? void 0 : _e.id) {
4281
+ _this.gridService.softCachingFilters[((_f = _this.componentTableRef) === null || _f === void 0 ? void 0 : _f.id) + currentUrl()] = _this.serverFilters;
4282
4282
  }
4283
4283
  }
4284
4284
  var serverFilterValues = JSON.parse(JSON.stringify(_this.serverFilters));
@@ -5196,30 +5196,30 @@
5196
5196
  };
5197
5197
  // Removing Header Filter Value using Backspace key Event or Delete key Event.
5198
5198
  GridComponent.prototype.removingFilters = function (event, column) {
5199
- var _a, _b, _c, _d, _e, _f, _g;
5199
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
5200
5200
  if ((event.key === 'Backspace' || event.key === 'Delete') &&
5201
5201
  ((_a = column.value) === null || _a === void 0 ? void 0 : _a.toString().length) === 0) {
5202
5202
  var searchFilters = void 0;
5203
5203
  if (!this.softCaching && ((_b = this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id)) {
5204
5204
  searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + ((_c = this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id) + currentUrl()));
5205
5205
  }
5206
- else {
5207
- searchFilters = this.gridService.softCachingFilters[currentUrl()];
5206
+ else if ((_d = this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id) {
5207
+ searchFilters = this.gridService.softCachingFilters[((_e = this.componentTableRef) === null || _e === void 0 ? void 0 : _e.id) + currentUrl()];
5208
5208
  }
5209
5209
  if (searchFilters && searchFilters.filters) {
5210
5210
  if (searchFilters.filters.length > 0) {
5211
5211
  var index = searchFilters.filters.findIndex(function (x) { return x.field === column.field; });
5212
5212
  if (index !== -1) {
5213
- if (searchFilters.filters.length === 1 && ((_d = this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id)) {
5214
- localStorage.removeItem('SetFilters-' + ((_e = this.componentTableRef) === null || _e === void 0 ? void 0 : _e.id) + currentUrl());
5213
+ if (searchFilters.filters.length === 1 && ((_f = this.componentTableRef) === null || _f === void 0 ? void 0 : _f.id)) {
5214
+ localStorage.removeItem('SetFilters-' + ((_g = this.componentTableRef) === null || _g === void 0 ? void 0 : _g.id) + currentUrl());
5215
5215
  }
5216
5216
  else {
5217
5217
  searchFilters.filters.splice(index, 1);
5218
- if (!this.softCaching && ((_f = this.componentTableRef) === null || _f === void 0 ? void 0 : _f.id)) {
5219
- localStorage.setItem('SetFilters-' + ((_g = this.componentTableRef) === null || _g === void 0 ? void 0 : _g.id) + currentUrl(), JSON.stringify(searchFilters));
5218
+ if (!this.softCaching && ((_h = this.componentTableRef) === null || _h === void 0 ? void 0 : _h.id)) {
5219
+ localStorage.setItem('SetFilters-' + ((_j = this.componentTableRef) === null || _j === void 0 ? void 0 : _j.id) + currentUrl(), JSON.stringify(searchFilters));
5220
5220
  }
5221
- else {
5222
- this.gridService.softCachingFilters[currentUrl()] = searchFilters;
5221
+ else if ((_k = this.componentTableRef) === null || _k === void 0 ? void 0 : _k.id) {
5222
+ this.gridService.softCachingFilters[((_l = this.componentTableRef) === null || _l === void 0 ? void 0 : _l.id) + currentUrl()] = searchFilters;
5223
5223
  }
5224
5224
  }
5225
5225
  }