@churchillliving/se-ui-toolkit 6.53.474 → 6.53.475
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 +32 -8
- 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 +27 -5
- package/fesm2015/churchillliving-se-ui-toolkit.js +28 -6
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/grid/grid.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
};
|
|
73
73
|
return __assign.apply(this, arguments);
|
|
74
74
|
};
|
|
75
|
-
function __rest$
|
|
75
|
+
function __rest$2(s, e) {
|
|
76
76
|
var t = {};
|
|
77
77
|
for (var p in s)
|
|
78
78
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -417,7 +417,7 @@
|
|
|
417
417
|
var tslib_es6 = {
|
|
418
418
|
__extends: __extends,
|
|
419
419
|
__assign: __assign,
|
|
420
|
-
__rest: __rest$
|
|
420
|
+
__rest: __rest$2,
|
|
421
421
|
__decorate: __decorate,
|
|
422
422
|
__param: __param,
|
|
423
423
|
__metadata: __metadata,
|
|
@@ -1091,7 +1091,7 @@
|
|
|
1091
1091
|
EHyperlink["DIALOG"] = "_dialog";
|
|
1092
1092
|
})(exports.EHyperlink || (exports.EHyperlink = {}));
|
|
1093
1093
|
|
|
1094
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
1094
|
+
var __rest$1 = (this && this.__rest) || function (s, e) {
|
|
1095
1095
|
var t = {};
|
|
1096
1096
|
for (var p in s)
|
|
1097
1097
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -2058,7 +2058,7 @@
|
|
|
2058
2058
|
function setCardFieldsData(form) {
|
|
2059
2059
|
var _a;
|
|
2060
2060
|
if (form && form.dynamicform) {
|
|
2061
|
-
var dynamicform_1 = form.dynamicform, newData_1 = __rest(form, ["dynamicform"]);
|
|
2061
|
+
var dynamicform_1 = form.dynamicform, newData_1 = __rest$1(form, ["dynamicform"]);
|
|
2062
2062
|
(_a = dynamicform_1 === null || dynamicform_1 === void 0 ? void 0 : dynamicform_1.formSections) === null || _a === void 0 ? void 0 : _a.forEach(function (section) {
|
|
2063
2063
|
var _a;
|
|
2064
2064
|
(_a = section.fields) === null || _a === void 0 ? void 0 : _a.forEach(function (field) {
|
|
@@ -3725,6 +3725,18 @@
|
|
|
3725
3725
|
{ type: RequestService }
|
|
3726
3726
|
]; };
|
|
3727
3727
|
|
|
3728
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3729
|
+
var t = {};
|
|
3730
|
+
for (var p in s)
|
|
3731
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3732
|
+
t[p] = s[p];
|
|
3733
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3734
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3735
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3736
|
+
t[p[i]] = s[p[i]];
|
|
3737
|
+
}
|
|
3738
|
+
return t;
|
|
3739
|
+
};
|
|
3728
3740
|
var GridComponent = /** @class */ (function () {
|
|
3729
3741
|
function GridComponent(dialogService, gridService, alertService, authService, elementRef, decimalPipe, pageLoggerService, cd, router, datePipe, confirmationService, config, ref) {
|
|
3730
3742
|
this.dialogService = dialogService;
|
|
@@ -5115,14 +5127,10 @@
|
|
|
5115
5127
|
*/
|
|
5116
5128
|
row = this.gridService.setRowValue(row);
|
|
5117
5129
|
var obj = {};
|
|
5118
|
-
var newRowObj = {};
|
|
5119
5130
|
this.columns.forEach(function (column) {
|
|
5120
5131
|
var _a, _b, _c, _d;
|
|
5121
5132
|
if ((column.allowSave === true || column.allowSave === undefined || _this.saveAllData)) {
|
|
5122
5133
|
obj[column.field] = row[column.field];
|
|
5123
|
-
if (row.isNew || row.isnew) {
|
|
5124
|
-
newRowObj[column.field] = row[column.field];
|
|
5125
|
-
}
|
|
5126
5134
|
if (column.type === exports.EGridColumnType.DIALOG &&
|
|
5127
5135
|
((_a = column.filter) === null || _a === void 0 ? void 0 : _a.type) === 'calendar') {
|
|
5128
5136
|
obj[column.field] = _this.datePipe.transform(obj[column.field], 'yyyy-MM-ddT00:00:00.000Z');
|
|
@@ -5158,6 +5166,8 @@
|
|
|
5158
5166
|
this.rowActionEvents(selectedRow);
|
|
5159
5167
|
this.browserCloseEvent(false);
|
|
5160
5168
|
if (row.isNew || row.isnew) {
|
|
5169
|
+
var isNew = row.isNew, isnew = row.isnew, newRowObj = __rest(row, ["isNew", "isnew"]);
|
|
5170
|
+
newRowObj = this.removeExtraNewRowObj(newRowObj);
|
|
5161
5171
|
if (!this.addDataKeyValue) {
|
|
5162
5172
|
delete newRowObj[this.dataKey];
|
|
5163
5173
|
}
|
|
@@ -5237,6 +5247,20 @@
|
|
|
5237
5247
|
}
|
|
5238
5248
|
this.isCheckBoxChangeEventCalled = false;
|
|
5239
5249
|
};
|
|
5250
|
+
GridComponent.prototype.removeExtraNewRowObj = function (row) {
|
|
5251
|
+
var _this = this;
|
|
5252
|
+
var _a;
|
|
5253
|
+
var keys = Object.keys(row);
|
|
5254
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0 && (keys === null || keys === void 0 ? void 0 : keys.length) > 0) {
|
|
5255
|
+
keys.forEach(function (key) {
|
|
5256
|
+
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()); });
|
|
5257
|
+
if (!matchKey) {
|
|
5258
|
+
delete row[key];
|
|
5259
|
+
}
|
|
5260
|
+
});
|
|
5261
|
+
}
|
|
5262
|
+
return row;
|
|
5263
|
+
};
|
|
5240
5264
|
// check the validation of the field
|
|
5241
5265
|
GridComponent.prototype.gridValidation = function (columns, row) {
|
|
5242
5266
|
if (!this.gridService.checkValidity(columns, row)) {
|