@churchillliving/se-ui-toolkit 6.53.156 → 6.53.158
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.
- package/bundles/churchillliving-se-ui-toolkit.umd.js +16 -17
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/components/base/grid/grid.component.js +17 -18
- package/fesm2015/churchillliving-se-ui-toolkit.js +16 -17
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
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());
|
|
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 = (
|
|
3692
|
+
this._selectedColumns = (_a = this.columns) === null || _a === void 0 ? void 0 : _a.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,7 +3699,6 @@
|
|
|
3699
3699
|
this.hideFilter = true;
|
|
3700
3700
|
}
|
|
3701
3701
|
this.columns.forEach(function (column) {
|
|
3702
|
-
var _a, _b;
|
|
3703
3702
|
// convert string time into the date
|
|
3704
3703
|
if (column.type === exports.EGridColumnType.DATE && column.timeOnly === true) {
|
|
3705
3704
|
_this.rowsData.forEach(function (row) {
|
|
@@ -3730,10 +3729,10 @@
|
|
|
3730
3729
|
}
|
|
3731
3730
|
var searchFilters;
|
|
3732
3731
|
if (!_this.softCaching) {
|
|
3733
|
-
searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl()
|
|
3732
|
+
searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl()));
|
|
3734
3733
|
}
|
|
3735
3734
|
else {
|
|
3736
|
-
searchFilters = _this.gridService.softCachingFilters[currentUrl()
|
|
3735
|
+
searchFilters = _this.gridService.softCachingFilters[currentUrl()];
|
|
3737
3736
|
}
|
|
3738
3737
|
if (!_this.hideFilter &&
|
|
3739
3738
|
searchFilters &&
|
|
@@ -3786,7 +3785,7 @@
|
|
|
3786
3785
|
}
|
|
3787
3786
|
});
|
|
3788
3787
|
// Searching scenario
|
|
3789
|
-
if (((
|
|
3788
|
+
if (((_b = change.rows) === null || _b === void 0 ? void 0 : _b.currentValue) && ((_c = change.columns) === null || _c === void 0 ? void 0 : _c.currentValue)) {
|
|
3790
3789
|
// Checks either column value is changes (i.e., column hidden scenario)
|
|
3791
3790
|
if (JSON.stringify(change.columns.currentValue).toLowerCase() !==
|
|
3792
3791
|
JSON.stringify(this.columns).toLowerCase()) {
|
|
@@ -3827,7 +3826,7 @@
|
|
|
3827
3826
|
if (globalSearchbtn) {
|
|
3828
3827
|
this.searchGridFilter = false;
|
|
3829
3828
|
}
|
|
3830
|
-
if (((
|
|
3829
|
+
if (((_d = this.rowsData) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
3831
3830
|
this.rowsDataCopy = JSON.parse(JSON.stringify(this.rowsData));
|
|
3832
3831
|
}
|
|
3833
3832
|
};
|
|
@@ -4256,7 +4255,7 @@
|
|
|
4256
4255
|
var _this = this;
|
|
4257
4256
|
this.gridfilter = event;
|
|
4258
4257
|
setTimeout(function () {
|
|
4259
|
-
var _a, _b
|
|
4258
|
+
var _a, _b;
|
|
4260
4259
|
if (_this.selectedColumns && _this.selectedColumns.length > 0) {
|
|
4261
4260
|
_this.selectedColumns.forEach(function (x) {
|
|
4262
4261
|
if (event.filters[x.field]) {
|
|
@@ -4275,10 +4274,10 @@
|
|
|
4275
4274
|
((_b = _this.serverFilters) === null || _b === void 0 ? void 0 : _b.filters.length) > 0 &&
|
|
4276
4275
|
(_this.allowCaching || _this.softCaching)) {
|
|
4277
4276
|
if (!_this.softCaching) {
|
|
4278
|
-
localStorage.setItem('SetFilters-' + currentUrl()
|
|
4277
|
+
localStorage.setItem('SetFilters-' + currentUrl(), JSON.stringify(_this.serverFilters));
|
|
4279
4278
|
}
|
|
4280
4279
|
else {
|
|
4281
|
-
_this.gridService.softCachingFilters[currentUrl()
|
|
4280
|
+
_this.gridService.softCachingFilters[currentUrl()] = _this.serverFilters;
|
|
4282
4281
|
}
|
|
4283
4282
|
}
|
|
4284
4283
|
var serverFilterValues = JSON.parse(JSON.stringify(_this.serverFilters));
|
|
@@ -5196,30 +5195,30 @@
|
|
|
5196
5195
|
};
|
|
5197
5196
|
// Removing Header Filter Value using Backspace key Event or Delete key Event.
|
|
5198
5197
|
GridComponent.prototype.removingFilters = function (event, column) {
|
|
5199
|
-
var _a
|
|
5198
|
+
var _a;
|
|
5200
5199
|
if ((event.key === 'Backspace' || event.key === 'Delete') &&
|
|
5201
5200
|
((_a = column.value) === null || _a === void 0 ? void 0 : _a.toString().length) === 0) {
|
|
5202
5201
|
var searchFilters = void 0;
|
|
5203
5202
|
if (!this.softCaching) {
|
|
5204
|
-
searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl()
|
|
5203
|
+
searchFilters = JSON.parse(localStorage.getItem('SetFilters-' + currentUrl()));
|
|
5205
5204
|
}
|
|
5206
5205
|
else {
|
|
5207
|
-
searchFilters = this.gridService.softCachingFilters[currentUrl()
|
|
5206
|
+
searchFilters = this.gridService.softCachingFilters[currentUrl()];
|
|
5208
5207
|
}
|
|
5209
5208
|
if (searchFilters && searchFilters.filters) {
|
|
5210
5209
|
if (searchFilters.filters.length > 0) {
|
|
5211
5210
|
var index = searchFilters.filters.findIndex(function (x) { return x.field === column.field; });
|
|
5212
5211
|
if (index !== -1) {
|
|
5213
5212
|
if (searchFilters.filters.length === 1) {
|
|
5214
|
-
localStorage.removeItem('SetFilters-' + currentUrl()
|
|
5213
|
+
localStorage.removeItem('SetFilters-' + currentUrl());
|
|
5215
5214
|
}
|
|
5216
5215
|
else {
|
|
5217
5216
|
searchFilters.filters.splice(index, 1);
|
|
5218
5217
|
if (!this.softCaching) {
|
|
5219
|
-
localStorage.setItem('SetFilters-' + currentUrl()
|
|
5218
|
+
localStorage.setItem('SetFilters-' + currentUrl(), JSON.stringify(searchFilters));
|
|
5220
5219
|
}
|
|
5221
5220
|
else {
|
|
5222
|
-
this.gridService.softCachingFilters[currentUrl()
|
|
5221
|
+
this.gridService.softCachingFilters[currentUrl()] = searchFilters;
|
|
5223
5222
|
}
|
|
5224
5223
|
}
|
|
5225
5224
|
}
|