@churchillliving/se-ui-toolkit 6.53.160 → 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.
@@ -3554,7 +3554,6 @@
3554
3554
  */
3555
3555
  GridComponent.prototype.ngOnInit = function () {
3556
3556
  var _this = this;
3557
- var _a;
3558
3557
  // automatically reload grid after 9 seconds.
3559
3558
  if (this.setGridRefreshTime) {
3560
3559
  this.refreshGrid();
@@ -3563,8 +3562,6 @@
3563
3562
  this.disabledSaveBtn = true;
3564
3563
  }
3565
3564
  this.componentTableRef = this.table;
3566
- console.log('111: ', this.componentTableRef);
3567
- console.log('BBB: ', (_a = this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id);
3568
3565
  setTimeout(function () {
3569
3566
  _this.setNumericValues();
3570
3567
  }, 500);
@@ -3672,14 +3669,12 @@
3672
3669
  };
3673
3670
  GridComponent.prototype.ngOnChanges = function (change) {
3674
3671
  var _this = this;
3675
- var _a, _b, _c, _d, _e;
3672
+ var _a, _b, _c, _d, _e, _f;
3676
3673
  if (this.allowCaching !== false && this.pagination) {
3677
3674
  this.allowCaching = this.pagination;
3678
3675
  }
3679
- else {
3680
- console.log('222: ', this.componentTableRef);
3681
- console.log('BBB: ', (_a = this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id);
3682
- localStorage.removeItem('SetFilters-' + currentUrl());
3676
+ else if ((_a = this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id) {
3677
+ localStorage.removeItem('SetFilters-' + ((_b = this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id) + currentUrl());
3683
3678
  }
3684
3679
  // add defaultRow in pagination array
3685
3680
  if (!this.setPaginationLength.includes(this.defaultRows)) {
@@ -3694,7 +3689,7 @@
3694
3689
  this.applyColumnsPermissions();
3695
3690
  // apply global permissions on entire grid
3696
3691
  this.applyGridPermissions();
3697
- this._selectedColumns = (_b = this.columns) === null || _b === void 0 ? void 0 : _b.filter(function (x) { return !x.hidden; });
3692
+ this._selectedColumns = (_c = this.columns) === null || _c === void 0 ? void 0 : _c.filter(function (x) { return !x.hidden; });
3698
3693
  this.cd.detectChanges();
3699
3694
  if (hasColumns) {
3700
3695
  this.columns = this.gridService.setColumnFields(this.columns);
@@ -3704,7 +3699,7 @@
3704
3699
  this.hideFilter = true;
3705
3700
  }
3706
3701
  this.columns.forEach(function (column) {
3707
- var _a;
3702
+ var _a, _b, _c, _d;
3708
3703
  // convert string time into the date
3709
3704
  if (column.type === exports.EGridColumnType.DATE && column.timeOnly === true) {
3710
3705
  _this.rowsData.forEach(function (row) {
@@ -3734,13 +3729,11 @@
3734
3729
  _this.setAggregateText(column);
3735
3730
  }
3736
3731
  var searchFilters;
3737
- if (!_this.softCaching) {
3738
- console.log('333: ', _this.componentTableRef);
3739
- console.log('CCC: ', (_a = _this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id);
3740
- searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl()));
3732
+ if (!_this.softCaching && ((_a = _this.componentTableRef) === null || _a === void 0 ? void 0 : _a.id)) {
3733
+ searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + ((_b = _this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id) + currentUrl()));
3741
3734
  }
3742
- else {
3743
- 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()];
3744
3737
  }
3745
3738
  if (!_this.hideFilter &&
3746
3739
  searchFilters &&
@@ -3793,7 +3786,7 @@
3793
3786
  }
3794
3787
  });
3795
3788
  // Searching scenario
3796
- if (((_c = change.rows) === null || _c === void 0 ? void 0 : _c.currentValue) && ((_d = change.columns) === null || _d === void 0 ? void 0 : _d.currentValue)) {
3789
+ if (((_d = change.rows) === null || _d === void 0 ? void 0 : _d.currentValue) && ((_e = change.columns) === null || _e === void 0 ? void 0 : _e.currentValue)) {
3797
3790
  // Checks either column value is changes (i.e., column hidden scenario)
3798
3791
  if (JSON.stringify(change.columns.currentValue).toLowerCase() !==
3799
3792
  JSON.stringify(this.columns).toLowerCase()) {
@@ -3834,7 +3827,7 @@
3834
3827
  if (globalSearchbtn) {
3835
3828
  this.searchGridFilter = false;
3836
3829
  }
3837
- if (((_e = this.rowsData) === null || _e === void 0 ? void 0 : _e.length) > 0) {
3830
+ if (((_f = this.rowsData) === null || _f === void 0 ? void 0 : _f.length) > 0) {
3838
3831
  this.rowsDataCopy = JSON.parse(JSON.stringify(this.rowsData));
3839
3832
  }
3840
3833
  };
@@ -4263,7 +4256,7 @@
4263
4256
  var _this = this;
4264
4257
  this.gridfilter = event;
4265
4258
  setTimeout(function () {
4266
- var _a, _b, _c;
4259
+ var _a, _b, _c, _d, _e, _f;
4267
4260
  if (_this.selectedColumns && _this.selectedColumns.length > 0) {
4268
4261
  _this.selectedColumns.forEach(function (x) {
4269
4262
  if (event.filters[x.field]) {
@@ -4281,13 +4274,11 @@
4281
4274
  if (((_a = _this.serverFilters) === null || _a === void 0 ? void 0 : _a.filters) &&
4282
4275
  ((_b = _this.serverFilters) === null || _b === void 0 ? void 0 : _b.filters.length) > 0 &&
4283
4276
  (_this.allowCaching || _this.softCaching)) {
4284
- if (!_this.softCaching) {
4285
- console.log('444: ', _this.componentTableRef);
4286
- console.log('DDD: ', (_c = _this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id);
4287
- localStorage.setItem('SetFilters-' + currentUrl(), JSON.stringify(_this.serverFilters));
4277
+ if (!_this.softCaching && ((_c = _this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id)) {
4278
+ localStorage.setItem('SetFilters-' + ((_d = _this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id) + currentUrl(), JSON.stringify(_this.serverFilters));
4288
4279
  }
4289
- else {
4290
- _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;
4291
4282
  }
4292
4283
  }
4293
4284
  var serverFilterValues = JSON.parse(JSON.stringify(_this.serverFilters));
@@ -5205,36 +5196,30 @@
5205
5196
  };
5206
5197
  // Removing Header Filter Value using Backspace key Event or Delete key Event.
5207
5198
  GridComponent.prototype.removingFilters = function (event, column) {
5208
- var _a, _b, _c, _d;
5199
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
5209
5200
  if ((event.key === 'Backspace' || event.key === 'Delete') &&
5210
5201
  ((_a = column.value) === null || _a === void 0 ? void 0 : _a.toString().length) === 0) {
5211
5202
  var searchFilters = void 0;
5212
- if (!this.softCaching) {
5213
- console.log('555: ', this.componentTableRef);
5214
- console.log('EEE: ', (_b = this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id);
5215
- searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl()));
5203
+ if (!this.softCaching && ((_b = this.componentTableRef) === null || _b === void 0 ? void 0 : _b.id)) {
5204
+ searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + ((_c = this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id) + currentUrl()));
5216
5205
  }
5217
- else {
5218
- 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()];
5219
5208
  }
5220
5209
  if (searchFilters && searchFilters.filters) {
5221
5210
  if (searchFilters.filters.length > 0) {
5222
5211
  var index = searchFilters.filters.findIndex(function (x) { return x.field === column.field; });
5223
5212
  if (index !== -1) {
5224
- if (searchFilters.filters.length === 1) {
5225
- console.log('666: ', this.componentTableRef);
5226
- console.log('FFF: ', (_c = this.componentTableRef) === null || _c === void 0 ? void 0 : _c.id);
5227
- localStorage.removeItem('SetFilters-' + 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());
5228
5215
  }
5229
5216
  else {
5230
5217
  searchFilters.filters.splice(index, 1);
5231
- if (!this.softCaching) {
5232
- console.log('555: ', this.componentTableRef);
5233
- console.log('EEE: ', (_d = this.componentTableRef) === null || _d === void 0 ? void 0 : _d.id);
5234
- localStorage.setItem('SetFilters-' + 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));
5235
5220
  }
5236
- else {
5237
- 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;
5238
5223
  }
5239
5224
  }
5240
5225
  }