@churchillliving/se-ui-toolkit 6.53.159 → 6.53.161
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 +19 -18
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/components/base/grid/grid.component.js +20 -19
- package/fesm2015/churchillliving-se-ui-toolkit.js +19 -18
- 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, _e, _f;
|
|
3673
3673
|
if (this.allowCaching !== false && this.pagination) {
|
|
3674
3674
|
this.allowCaching = this.pagination;
|
|
3675
3675
|
}
|
|
3676
|
-
else {
|
|
3677
|
-
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());
|
|
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 = (_c = this.columns) === null || _c === void 0 ? void 0 : _c.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) {
|
|
@@ -3728,8 +3729,8 @@
|
|
|
3728
3729
|
_this.setAggregateText(column);
|
|
3729
3730
|
}
|
|
3730
3731
|
var searchFilters;
|
|
3731
|
-
if (!_this.softCaching) {
|
|
3732
|
-
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()));
|
|
3733
3734
|
}
|
|
3734
3735
|
else {
|
|
3735
3736
|
searchFilters = _this.gridService.softCachingFilters[currentUrl()];
|
|
@@ -3785,7 +3786,7 @@
|
|
|
3785
3786
|
}
|
|
3786
3787
|
});
|
|
3787
3788
|
// Searching scenario
|
|
3788
|
-
if (((
|
|
3789
|
+
if (((_d = change.rows) === null || _d === void 0 ? void 0 : _d.currentValue) && ((_e = change.columns) === null || _e === void 0 ? void 0 : _e.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 (((
|
|
3830
|
+
if (((_f = this.rowsData) === null || _f === void 0 ? void 0 : _f.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]) {
|
|
@@ -4273,8 +4274,8 @@
|
|
|
4273
4274
|
if (((_a = _this.serverFilters) === null || _a === void 0 ? void 0 : _a.filters) &&
|
|
4274
4275
|
((_b = _this.serverFilters) === null || _b === void 0 ? void 0 : _b.filters.length) > 0 &&
|
|
4275
4276
|
(_this.allowCaching || _this.softCaching)) {
|
|
4276
|
-
if (!_this.softCaching) {
|
|
4277
|
-
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));
|
|
4278
4279
|
}
|
|
4279
4280
|
else {
|
|
4280
4281
|
_this.gridService.softCachingFilters[currentUrl()] = _this.serverFilters;
|
|
@@ -5195,12 +5196,12 @@
|
|
|
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, _g;
|
|
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
|
-
if (!this.softCaching) {
|
|
5203
|
-
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()));
|
|
5204
5205
|
}
|
|
5205
5206
|
else {
|
|
5206
5207
|
searchFilters = this.gridService.softCachingFilters[currentUrl()];
|
|
@@ -5209,13 +5210,13 @@
|
|
|
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
|
-
if (searchFilters.filters.length === 1) {
|
|
5213
|
-
localStorage.removeItem('SetFilters-' + currentUrl());
|
|
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());
|
|
5214
5215
|
}
|
|
5215
5216
|
else {
|
|
5216
5217
|
searchFilters.filters.splice(index, 1);
|
|
5217
|
-
if (!this.softCaching) {
|
|
5218
|
-
localStorage.setItem('SetFilters-' + currentUrl(), JSON.stringify(searchFilters));
|
|
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));
|
|
5219
5220
|
}
|
|
5220
5221
|
else {
|
|
5221
5222
|
this.gridService.softCachingFilters[currentUrl()] = searchFilters;
|