@churchillliving/se-ui-toolkit 6.53.484 → 6.53.485
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 +17 -18
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/churchillliving-se-ui-toolkit.metadata.json +1 -1
- package/esm2015/lib/components/base/grid/grid.component.js +2 -15
- package/esm2015/lib/services/grid.service.js +17 -4
- package/fesm2015/churchillliving-se-ui-toolkit.js +17 -17
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/grid/grid.component.d.ts +0 -1
- package/lib/services/grid.service.d.ts +2 -1
- package/package.json +1 -1
|
@@ -2673,7 +2673,7 @@
|
|
|
2673
2673
|
var _a;
|
|
2674
2674
|
var field = (_a = column === null || column === void 0 ? void 0 : column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
2675
2675
|
rowsData.forEach(function (row) {
|
|
2676
|
-
row = _this.removeRowObj(row, field);
|
|
2676
|
+
row = _this.removeRowObj(row, field, columns);
|
|
2677
2677
|
});
|
|
2678
2678
|
if (column.allowSave === false) {
|
|
2679
2679
|
rowsData.forEach(function (row) {
|
|
@@ -2730,7 +2730,7 @@
|
|
|
2730
2730
|
columns.forEach(function (column) {
|
|
2731
2731
|
var _a;
|
|
2732
2732
|
var field = (_a = column === null || column === void 0 ? void 0 : column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
2733
|
-
row = _this.removeRowObj(row, field);
|
|
2733
|
+
row = _this.removeRowObj(row, field, columns);
|
|
2734
2734
|
if (column.allowSave == false) {
|
|
2735
2735
|
var keys = Object.keys(row);
|
|
2736
2736
|
keys.forEach(function (x) {
|
|
@@ -2771,7 +2771,7 @@
|
|
|
2771
2771
|
return row;
|
|
2772
2772
|
};
|
|
2773
2773
|
// remove obj, data and secondtype data from row
|
|
2774
|
-
GridService.prototype.removeRowObj = function (row, field) {
|
|
2774
|
+
GridService.prototype.removeRowObj = function (row, field, columns) {
|
|
2775
2775
|
var keys = Object.keys(row);
|
|
2776
2776
|
if ((keys === null || keys === void 0 ? void 0 : keys.length) > 0) {
|
|
2777
2777
|
keys.forEach(function (key) {
|
|
@@ -2780,6 +2780,19 @@
|
|
|
2780
2780
|
}
|
|
2781
2781
|
});
|
|
2782
2782
|
}
|
|
2783
|
+
row = this.removeExtraNewRowObj(row, columns);
|
|
2784
|
+
return row;
|
|
2785
|
+
};
|
|
2786
|
+
GridService.prototype.removeExtraNewRowObj = function (row, columns) {
|
|
2787
|
+
var keys = Object.keys(row);
|
|
2788
|
+
if ((columns === null || columns === void 0 ? void 0 : columns.length) > 0 && (keys === null || keys === void 0 ? void 0 : keys.length) > 0) {
|
|
2789
|
+
keys.forEach(function (key) {
|
|
2790
|
+
var matchKey = columns.some(function (column) { var _a; return ((_a = column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (key === null || key === void 0 ? void 0 : key.toLowerCase()); });
|
|
2791
|
+
if (!matchKey) {
|
|
2792
|
+
delete row[key];
|
|
2793
|
+
}
|
|
2794
|
+
});
|
|
2795
|
+
}
|
|
2783
2796
|
return row;
|
|
2784
2797
|
};
|
|
2785
2798
|
// add simple grid column without
|
|
@@ -5183,7 +5196,7 @@
|
|
|
5183
5196
|
this.browserCloseEvent(false);
|
|
5184
5197
|
if (row.isNew || row.isnew) {
|
|
5185
5198
|
var isNew = row.isNew, isnew = row.isnew, newRowObj = __rest(row, ["isNew", "isnew"]);
|
|
5186
|
-
newRowObj = this.removeExtraNewRowObj(newRowObj);
|
|
5199
|
+
newRowObj = this.gridService.removeExtraNewRowObj(newRowObj, this.columns);
|
|
5187
5200
|
if (!this.addDataKeyValue) {
|
|
5188
5201
|
delete newRowObj[this.dataKey];
|
|
5189
5202
|
}
|
|
@@ -5263,20 +5276,6 @@
|
|
|
5263
5276
|
}
|
|
5264
5277
|
this.isCheckBoxChangeEventCalled = false;
|
|
5265
5278
|
};
|
|
5266
|
-
GridComponent.prototype.removeExtraNewRowObj = function (row) {
|
|
5267
|
-
var _this = this;
|
|
5268
|
-
var _a;
|
|
5269
|
-
var keys = Object.keys(row);
|
|
5270
|
-
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0 && (keys === null || keys === void 0 ? void 0 : keys.length) > 0) {
|
|
5271
|
-
keys.forEach(function (key) {
|
|
5272
|
-
var matchKey = _this.columns.some(function (column) { var _a; return ((_a = column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (key === null || key === void 0 ? void 0 : key.toLowerCase()); });
|
|
5273
|
-
if (!matchKey) {
|
|
5274
|
-
delete row[key];
|
|
5275
|
-
}
|
|
5276
|
-
});
|
|
5277
|
-
}
|
|
5278
|
-
return row;
|
|
5279
|
-
};
|
|
5280
5279
|
// check the validation of the field
|
|
5281
5280
|
GridComponent.prototype.gridValidation = function (columns, row) {
|
|
5282
5281
|
if (!this.gridService.checkValidity(columns, row)) {
|