@churchillliving/se-ui-toolkit 6.53.146 → 6.53.147

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.
@@ -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 === '') && prop.field) {
3033
- 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()); });
3034
- if (fieldName) {
3035
- if ((_b = row[fieldName]) === null || _b === void 0 ? void 0 : _b.action) {
3036
- row[fieldName].action = Object.assign((_c = row[fieldName]) === null || _c === void 0 ? void 0 : _c.action, (_g = {}, _g[prop.propName] = prop.propValue, _g));
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[fieldName] = { text: row[fieldName], action: (_h = {}, _h[prop.propName] = prop.propValue, _h.field = fieldName, _h) };
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 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()); })) {
3043
- 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) };
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 (rowData[row] &&
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) {
@@ -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 && !hideEditBtn\"\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>",
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
  ];