@churchillliving/se-ui-toolkit 6.53.483 → 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 -26
- 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/models/form.model.js +1 -9
- package/esm2015/lib/services/grid.service.js +17 -4
- package/fesm2015/churchillliving-se-ui-toolkit.js +18 -26
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/grid/grid.component.d.ts +0 -1
- package/lib/models/form.model.d.ts +0 -7
- package/lib/services/grid.service.d.ts +2 -1
- package/package.json +1 -1
|
@@ -995,14 +995,6 @@
|
|
|
995
995
|
ESelectFileType["PDF"] = ".pdf";
|
|
996
996
|
ESelectFileType["MRT"] = ".mrt";
|
|
997
997
|
})(exports.ESelectFileType || (exports.ESelectFileType = {}));
|
|
998
|
-
exports.ESystemConfig = void 0;
|
|
999
|
-
(function (ESystemConfig) {
|
|
1000
|
-
ESystemConfig["FURNITUREITEMPICTUREPATH"] = "FurnitureItemPicutrePath";
|
|
1001
|
-
ESystemConfig["FILEROOTPATH"] = "FileRootPath";
|
|
1002
|
-
ESystemConfig["EMPLOYEEPICTUREPATH"] = "EmployeePicutrePath";
|
|
1003
|
-
ESystemConfig["REPORTPATH"] = "ReportPath";
|
|
1004
|
-
ESystemConfig["SUITEPICTUREPATH"] = "SuitePicutrePath";
|
|
1005
|
-
})(exports.ESystemConfig || (exports.ESystemConfig = {}));
|
|
1006
998
|
exports.EValidator = void 0;
|
|
1007
999
|
(function (EValidator) {
|
|
1008
1000
|
EValidator["REQUIRED"] = "required";
|
|
@@ -2681,7 +2673,7 @@
|
|
|
2681
2673
|
var _a;
|
|
2682
2674
|
var field = (_a = column === null || column === void 0 ? void 0 : column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
2683
2675
|
rowsData.forEach(function (row) {
|
|
2684
|
-
row = _this.removeRowObj(row, field);
|
|
2676
|
+
row = _this.removeRowObj(row, field, columns);
|
|
2685
2677
|
});
|
|
2686
2678
|
if (column.allowSave === false) {
|
|
2687
2679
|
rowsData.forEach(function (row) {
|
|
@@ -2738,7 +2730,7 @@
|
|
|
2738
2730
|
columns.forEach(function (column) {
|
|
2739
2731
|
var _a;
|
|
2740
2732
|
var field = (_a = column === null || column === void 0 ? void 0 : column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
2741
|
-
row = _this.removeRowObj(row, field);
|
|
2733
|
+
row = _this.removeRowObj(row, field, columns);
|
|
2742
2734
|
if (column.allowSave == false) {
|
|
2743
2735
|
var keys = Object.keys(row);
|
|
2744
2736
|
keys.forEach(function (x) {
|
|
@@ -2779,7 +2771,7 @@
|
|
|
2779
2771
|
return row;
|
|
2780
2772
|
};
|
|
2781
2773
|
// remove obj, data and secondtype data from row
|
|
2782
|
-
GridService.prototype.removeRowObj = function (row, field) {
|
|
2774
|
+
GridService.prototype.removeRowObj = function (row, field, columns) {
|
|
2783
2775
|
var keys = Object.keys(row);
|
|
2784
2776
|
if ((keys === null || keys === void 0 ? void 0 : keys.length) > 0) {
|
|
2785
2777
|
keys.forEach(function (key) {
|
|
@@ -2788,6 +2780,19 @@
|
|
|
2788
2780
|
}
|
|
2789
2781
|
});
|
|
2790
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
|
+
}
|
|
2791
2796
|
return row;
|
|
2792
2797
|
};
|
|
2793
2798
|
// add simple grid column without
|
|
@@ -5191,7 +5196,7 @@
|
|
|
5191
5196
|
this.browserCloseEvent(false);
|
|
5192
5197
|
if (row.isNew || row.isnew) {
|
|
5193
5198
|
var isNew = row.isNew, isnew = row.isnew, newRowObj = __rest(row, ["isNew", "isnew"]);
|
|
5194
|
-
newRowObj = this.removeExtraNewRowObj(newRowObj);
|
|
5199
|
+
newRowObj = this.gridService.removeExtraNewRowObj(newRowObj, this.columns);
|
|
5195
5200
|
if (!this.addDataKeyValue) {
|
|
5196
5201
|
delete newRowObj[this.dataKey];
|
|
5197
5202
|
}
|
|
@@ -5271,20 +5276,6 @@
|
|
|
5271
5276
|
}
|
|
5272
5277
|
this.isCheckBoxChangeEventCalled = false;
|
|
5273
5278
|
};
|
|
5274
|
-
GridComponent.prototype.removeExtraNewRowObj = function (row) {
|
|
5275
|
-
var _this = this;
|
|
5276
|
-
var _a;
|
|
5277
|
-
var keys = Object.keys(row);
|
|
5278
|
-
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0 && (keys === null || keys === void 0 ? void 0 : keys.length) > 0) {
|
|
5279
|
-
keys.forEach(function (key) {
|
|
5280
|
-
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()); });
|
|
5281
|
-
if (!matchKey) {
|
|
5282
|
-
delete row[key];
|
|
5283
|
-
}
|
|
5284
|
-
});
|
|
5285
|
-
}
|
|
5286
|
-
return row;
|
|
5287
|
-
};
|
|
5288
5279
|
// check the validation of the field
|
|
5289
5280
|
GridComponent.prototype.gridValidation = function (columns, row) {
|
|
5290
5281
|
if (!this.gridService.checkValidity(columns, row)) {
|