@churchillliving/se-ui-toolkit 6.53.473 → 6.53.474
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 +20 -22
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/components/base/grid/grid.component.js +5 -13
- package/esm2015/lib/services/grid.service.js +14 -7
- package/fesm2015/churchillliving-se-ui-toolkit.js +19 -20
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- 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$1(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$1,
|
|
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
|
|
1094
|
+
var __rest = (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
|
|
2061
|
+
var dynamicform_1 = form.dynamicform, newData_1 = __rest(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) {
|
|
@@ -3525,13 +3525,20 @@
|
|
|
3525
3525
|
if (columns === void 0) { columns = []; }
|
|
3526
3526
|
props === null || props === void 0 ? void 0 : props.forEach(function (prop) {
|
|
3527
3527
|
var _g, _h, _j, _k;
|
|
3528
|
-
var _a, _b, _c, _d;
|
|
3528
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3529
3529
|
if (prop.propName && (prop.propValue || prop.propValue === false || prop.propValue === '')) {
|
|
3530
3530
|
if (prop.field) {
|
|
3531
3531
|
var fieldName = (_a = Object.keys(row)) === null || _a === void 0 ? void 0 : _a.find(function (key) { var _a; return (key === null || key === void 0 ? void 0 : key.toLowerCase()) === ((_a = prop === null || prop === void 0 ? void 0 : prop.field) === null || _a === void 0 ? void 0 : _a.toLowerCase()); });
|
|
3532
|
-
var fieldNameObj = (fieldName === null || fieldName === void 0 ? void 0 : fieldName.toLowerCase()) + '_obj';
|
|
3532
|
+
var fieldNameObj = (fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('_obj')) ? fieldName === null || fieldName === void 0 ? void 0 : fieldName.toLowerCase() : (fieldName === null || fieldName === void 0 ? void 0 : fieldName.toLowerCase()) + '_obj';
|
|
3533
|
+
if (!fieldName) {
|
|
3534
|
+
var rowObj_1 = ((_b = prop === null || prop === void 0 ? void 0 : prop.field) === null || _b === void 0 ? void 0 : _b.toLowerCase()) + '_obj';
|
|
3535
|
+
fieldNameObj = (_c = Object.keys(row)) === null || _c === void 0 ? void 0 : _c.find(function (key) { var _a, _b, _c; return ((key === null || key === void 0 ? void 0 : key.toLowerCase()) === rowObj_1) && (((_a = row[rowObj_1]) === null || _a === void 0 ? void 0 : _a.type) === exports.EGridColumnType.DIALOG || ((_b = row[rowObj_1]) === null || _b === void 0 ? void 0 : _b.type) === exports.EGridColumnType.IFRAME || ((_c = row[rowObj_1]) === null || _c === void 0 ? void 0 : _c.type) === exports.EGridColumnType.LINK); });
|
|
3536
|
+
if (fieldNameObj) {
|
|
3537
|
+
fieldName = fieldNameObj;
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3533
3540
|
if (fieldName) {
|
|
3534
|
-
if ((
|
|
3541
|
+
if ((_d = Object.keys(row)) === null || _d === void 0 ? void 0 : _d.includes(fieldNameObj)) {
|
|
3535
3542
|
row[fieldNameObj] = Object.assign(Object.assign({}, row[fieldNameObj]), (_g = { text: row[fieldName] }, _g[prop.propName] = prop.propValue, _g));
|
|
3536
3543
|
}
|
|
3537
3544
|
else {
|
|
@@ -3539,9 +3546,9 @@
|
|
|
3539
3546
|
}
|
|
3540
3547
|
}
|
|
3541
3548
|
else if (columns === null || columns === void 0 ? void 0 : columns.some(function (column) { var _a, _b; return ((_a = column.field) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = prop === null || prop === void 0 ? void 0 : prop.field) === null || _b === void 0 ? void 0 : _b.toLowerCase()); })) {
|
|
3542
|
-
var propField = (
|
|
3549
|
+
var propField = (_e = prop.field) === null || _e === void 0 ? void 0 : _e.toLowerCase();
|
|
3543
3550
|
var propFieldObj = propField + '_obj';
|
|
3544
|
-
if ((
|
|
3551
|
+
if ((_f = Object.keys(row)) === null || _f === void 0 ? void 0 : _f.includes(fieldNameObj)) {
|
|
3545
3552
|
row[propFieldObj] = Object.assign(Object.assign({}, row[propFieldObj]), (_j = { text: row[prop.field] }, _j[prop.propName] = prop.propValue, _j));
|
|
3546
3553
|
}
|
|
3547
3554
|
else {
|
|
@@ -3718,18 +3725,6 @@
|
|
|
3718
3725
|
{ type: RequestService }
|
|
3719
3726
|
]; };
|
|
3720
3727
|
|
|
3721
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3722
|
-
var t = {};
|
|
3723
|
-
for (var p in s)
|
|
3724
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3725
|
-
t[p] = s[p];
|
|
3726
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3727
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3728
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3729
|
-
t[p[i]] = s[p[i]];
|
|
3730
|
-
}
|
|
3731
|
-
return t;
|
|
3732
|
-
};
|
|
3733
3728
|
var GridComponent = /** @class */ (function () {
|
|
3734
3729
|
function GridComponent(dialogService, gridService, alertService, authService, elementRef, decimalPipe, pageLoggerService, cd, router, datePipe, confirmationService, config, ref) {
|
|
3735
3730
|
this.dialogService = dialogService;
|
|
@@ -5120,10 +5115,14 @@
|
|
|
5120
5115
|
*/
|
|
5121
5116
|
row = this.gridService.setRowValue(row);
|
|
5122
5117
|
var obj = {};
|
|
5118
|
+
var newRowObj = {};
|
|
5123
5119
|
this.columns.forEach(function (column) {
|
|
5124
5120
|
var _a, _b, _c, _d;
|
|
5125
5121
|
if ((column.allowSave === true || column.allowSave === undefined || _this.saveAllData)) {
|
|
5126
5122
|
obj[column.field] = row[column.field];
|
|
5123
|
+
if (row.isNew || row.isnew) {
|
|
5124
|
+
newRowObj[column.field] = row[column.field];
|
|
5125
|
+
}
|
|
5127
5126
|
if (column.type === exports.EGridColumnType.DIALOG &&
|
|
5128
5127
|
((_a = column.filter) === null || _a === void 0 ? void 0 : _a.type) === 'calendar') {
|
|
5129
5128
|
obj[column.field] = _this.datePipe.transform(obj[column.field], 'yyyy-MM-ddT00:00:00.000Z');
|
|
@@ -5159,7 +5158,6 @@
|
|
|
5159
5158
|
this.rowActionEvents(selectedRow);
|
|
5160
5159
|
this.browserCloseEvent(false);
|
|
5161
5160
|
if (row.isNew || row.isnew) {
|
|
5162
|
-
var isNew = row.isNew, isnew = row.isnew, newRowObj = __rest(row, ["isNew", "isnew"]);
|
|
5163
5161
|
if (!this.addDataKeyValue) {
|
|
5164
5162
|
delete newRowObj[this.dataKey];
|
|
5165
5163
|
}
|