@churchillliving/se-ui-toolkit 6.53.160 → 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 -34
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/components/base/grid/grid.component.js +20 -35
- package/fesm2015/churchillliving-se-ui-toolkit.js +19 -34
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
|
|
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 = (
|
|
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;
|
|
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,10 +3729,8 @@
|
|
|
3734
3729
|
_this.setAggregateText(column);
|
|
3735
3730
|
}
|
|
3736
3731
|
var searchFilters;
|
|
3737
|
-
if (!_this.softCaching) {
|
|
3738
|
-
|
|
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
3735
|
else {
|
|
3743
3736
|
searchFilters = _this.gridService.softCachingFilters[currentUrl()];
|
|
@@ -3793,7 +3786,7 @@
|
|
|
3793
3786
|
}
|
|
3794
3787
|
});
|
|
3795
3788
|
// Searching scenario
|
|
3796
|
-
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)) {
|
|
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 (((
|
|
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;
|
|
4267
4260
|
if (_this.selectedColumns && _this.selectedColumns.length > 0) {
|
|
4268
4261
|
_this.selectedColumns.forEach(function (x) {
|
|
4269
4262
|
if (event.filters[x.field]) {
|
|
@@ -4281,10 +4274,8 @@
|
|
|
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
|
-
|
|
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
4280
|
else {
|
|
4290
4281
|
_this.gridService.softCachingFilters[currentUrl()] = _this.serverFilters;
|
|
@@ -5205,14 +5196,12 @@
|
|
|
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;
|
|
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
|
-
|
|
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
5206
|
else {
|
|
5218
5207
|
searchFilters = this.gridService.softCachingFilters[currentUrl()];
|
|
@@ -5221,17 +5210,13 @@
|
|
|
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
|
-
|
|
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 && ((_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());
|
|
5228
5215
|
}
|
|
5229
5216
|
else {
|
|
5230
5217
|
searchFilters.filters.splice(index, 1);
|
|
5231
|
-
if (!this.softCaching) {
|
|
5232
|
-
|
|
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 && ((_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));
|
|
5235
5220
|
}
|
|
5236
5221
|
else {
|
|
5237
5222
|
this.gridService.softCachingFilters[currentUrl()] = searchFilters;
|