@churchillliving/se-ui-toolkit 6.53.146 → 6.53.148
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 +31 -13
- 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 +7 -4
- package/esm2015/lib/components/base/grid-row-actions/grid-row-actions.component.js +2 -2
- package/esm2015/lib/models/grid.model.js +6 -1
- package/esm2015/lib/services/grid.service.js +22 -12
- package/fesm2015/churchillliving-se-ui-toolkit.js +32 -14
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/models/grid.model.d.ts +6 -1
- package/package.json +1 -1
|
@@ -450,6 +450,11 @@
|
|
|
450
450
|
(function (EFilterValidator) {
|
|
451
451
|
EFilterValidator["REQUIRED"] = "required";
|
|
452
452
|
})(exports.EFilterValidator || (exports.EFilterValidator = {}));
|
|
453
|
+
exports.EGridRowAction = void 0;
|
|
454
|
+
(function (EGridRowAction) {
|
|
455
|
+
EGridRowAction["DELETEBTN"] = "delete_btn";
|
|
456
|
+
EGridRowAction["EDITBTN"] = "edit_btn";
|
|
457
|
+
})(exports.EGridRowAction || (exports.EGridRowAction = {}));
|
|
453
458
|
exports.EGridRowPropName = void 0;
|
|
454
459
|
(function (EGridRowPropName) {
|
|
455
460
|
EGridRowPropName["DISPLAYTEXT"] = "displayText";
|
|
@@ -3029,20 +3034,30 @@
|
|
|
3029
3034
|
props === null || props === void 0 ? void 0 : props.forEach(function (prop) {
|
|
3030
3035
|
var _g, _h, _j;
|
|
3031
3036
|
var _a, _b, _c, _d;
|
|
3032
|
-
if (prop.propName && (prop.propValue || prop.propValue === false || prop.propValue === '')
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
if (
|
|
3036
|
-
|
|
3037
|
+
if (prop.propName && (prop.propValue || prop.propValue === false || prop.propValue === '')) {
|
|
3038
|
+
if (prop.field) {
|
|
3039
|
+
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()); });
|
|
3040
|
+
if (fieldName) {
|
|
3041
|
+
if ((_b = row[fieldName]) === null || _b === void 0 ? void 0 : _b.action) {
|
|
3042
|
+
row[fieldName].action = Object.assign((_c = row[fieldName]) === null || _c === void 0 ? void 0 : _c.action, (_g = {}, _g[prop.propName] = prop.propValue, _g));
|
|
3043
|
+
}
|
|
3044
|
+
else {
|
|
3045
|
+
row[fieldName] = { text: row[fieldName], action: (_h = {}, _h[prop.propName] = prop.propValue, _h.field = fieldName, _h) };
|
|
3046
|
+
}
|
|
3037
3047
|
}
|
|
3038
|
-
else {
|
|
3039
|
-
row[
|
|
3048
|
+
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()); })) {
|
|
3049
|
+
row[(_d = prop.field) === null || _d === void 0 ? void 0 : _d.toLowerCase()] = { text: row[prop.field], extraField: true, action: (_j = {}, _j[prop.propName] = prop.propValue, _j.field = prop.field, _j) };
|
|
3040
3050
|
}
|
|
3051
|
+
;
|
|
3041
3052
|
}
|
|
3042
|
-
else
|
|
3043
|
-
|
|
3053
|
+
else {
|
|
3054
|
+
if ((prop === null || prop === void 0 ? void 0 : prop.action) === exports.EGridRowAction.DELETEBTN) {
|
|
3055
|
+
row[prop.action] = prop.propValue;
|
|
3056
|
+
}
|
|
3057
|
+
else if ((prop === null || prop === void 0 ? void 0 : prop.action) === exports.EGridRowAction.EDITBTN) {
|
|
3058
|
+
row[prop.action] = prop.propValue;
|
|
3059
|
+
}
|
|
3044
3060
|
}
|
|
3045
|
-
;
|
|
3046
3061
|
}
|
|
3047
3062
|
});
|
|
3048
3063
|
return row;
|
|
@@ -3829,7 +3844,10 @@
|
|
|
3829
3844
|
var _a;
|
|
3830
3845
|
(_a = Object.keys(rowData)) === null || _a === void 0 ? void 0 : _a.forEach(function (row) {
|
|
3831
3846
|
var _a, _b, _c, _d;
|
|
3832
|
-
if (
|
|
3847
|
+
if (row === exports.EGridRowAction.DELETEBTN || row === exports.EGridRowAction.EDITBTN) {
|
|
3848
|
+
delete rowData[row];
|
|
3849
|
+
}
|
|
3850
|
+
else if (rowData[row] &&
|
|
3833
3851
|
_this.typeOf(rowData[row]) === 'object' &&
|
|
3834
3852
|
((_b = (_a = rowData[row]) === null || _a === void 0 ? void 0 : _a.action) === null || _b === void 0 ? void 0 : _b.field)) {
|
|
3835
3853
|
if ((_c = rowData[row]) === null || _c === void 0 ? void 0 : _c.extraField) {
|
|
@@ -4541,7 +4559,7 @@
|
|
|
4541
4559
|
this.rowActionEvents(selectedRow);
|
|
4542
4560
|
this.browserCloseEvent(false);
|
|
4543
4561
|
if (row.isNew || row.isnew) {
|
|
4544
|
-
var isNew = row.isNew, newRowObj = __rest(row, ["isNew"]);
|
|
4562
|
+
var isNew = row.isNew, isnew = row.isnew, newRowObj = __rest(row, ["isNew", "isnew"]);
|
|
4545
4563
|
if (!this.addDataKeyValue) {
|
|
4546
4564
|
delete newRowObj[this.dataKey];
|
|
4547
4565
|
}
|
|
@@ -8939,7 +8957,7 @@
|
|
|
8939
8957
|
GridRowActionsComponent.decorators = [
|
|
8940
8958
|
{ type: i0.Component, args: [{
|
|
8941
8959
|
selector: 'se-grid-row-actions',
|
|
8942
|
-
template: "<!-- onRow Edit Button on Grid -->\n<button\n*ngIf=\"!editing && editRowPermission && !hideEditBtn\"\npButton\npRipple\ntype=\"button\"\npInitEditableRow\nicon=\"pi pi-pencil\"\n(click)=\"onRowEditInit(row)\"\n[class]=\"editAllRows ? 'pButtonHide editRow' : 'p-button-rounded p-button-text editRow'\"\n></button>\n<!-- onRow Edit delete Button on Grid -->\n<button\npButton\ntype=\"button\"\nicon=\"pi pi-trash\"\n(click)=\"deleteRecord(row)\"\nclass=\"p-button-rounded p-button-text\"\n*ngIf=\"row.isNew !== true && deleteRowPermission && !
|
|
8960
|
+
template: "<!-- onRow Edit Button on Grid -->\n<button\n*ngIf=\"!editing && editRowPermission && !hideEditBtn && !row['edit_btn']\"\npButton\npRipple\ntype=\"button\"\npInitEditableRow\nicon=\"pi pi-pencil\"\n(click)=\"onRowEditInit(row)\"\n[class]=\"editAllRows ? 'pButtonHide editRow' : 'p-button-rounded p-button-text editRow'\"\n></button>\n<!-- onRow Edit delete Button on Grid -->\n<button\npButton\ntype=\"button\"\nicon=\"pi pi-trash\"\n(click)=\"deleteRecord(row)\"\nclass=\"p-button-rounded p-button-text\"\n*ngIf=\"row.isNew !== true && deleteRowPermission && !row['delete_btn']\">\n</button>\n<!-- onRow Edit Save Button on Grid -->\n<button\n*ngIf=\"editing\"\npButton\npRipple\nid=\"saveSingleGridValue\"\ntype=\"button\"\npSaveEditableRow\nicon=\"pi pi-check\"\n(click)=\"onRowEditSave(row)\"\n[class]=\"editAllRows ? 'pButtonHide saveRow' : 'p-button-rounded p-button-text p-button-success p-mr-2 saveRow'\"\n></button>\n<!-- onRow Edit Cancel Button on Grid -->\n<button\n*ngIf=\"editing\"\npButton\npRipple\ntype=\"button\"\nicon=\"pi pi-times\"\n(click)=\"onRowEditCancel(row)\"\n[class]=\"editAllRows ? 'pButtonHide cancelRow' : 'p-button-rounded p-button-text p-button-danger cancelRow'\"\n></button>",
|
|
8943
8961
|
styles: [".pButtonHide{display:none}\n"]
|
|
8944
8962
|
},] }
|
|
8945
8963
|
];
|