@churchillliving/se-ui-toolkit 6.53.317 → 6.53.318

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.
@@ -547,6 +547,7 @@
547
547
  EGridRowPropName["DISPLAYFIELD"] = "displayField";
548
548
  EGridRowPropName["HIDDEN"] = "hidden";
549
549
  EGridRowPropName["ICON"] = "icon";
550
+ EGridRowPropName["LOOKUPCONTROL"] = "lookupControl";
550
551
  })(exports.EGridRowPropName || (exports.EGridRowPropName = {}));
551
552
  exports.EGridValidator = void 0;
552
553
  (function (EGridValidator) {
@@ -4204,28 +4205,28 @@
4204
4205
  _this.rowsData &&
4205
4206
  _this.rowsData.length > 0) {
4206
4207
  _this.rowsData.forEach(function (row) {
4207
- var _3, _4, _5;
4208
+ var _45, _46, _47;
4208
4209
  var _a, _b, _c, _d, _e, _f, _g, _h;
4209
4210
  // convert string that contains comma into arrays
4210
4211
  if ((_a = row[column.field]) === null || _a === void 0 ? void 0 : _a.toString().includes(';')) {
4211
4212
  row[column.field] = (_c = (_b = row[column.field]) === null || _b === void 0 ? void 0 : _b.toString().split(';')) === null || _c === void 0 ? void 0 : _c.map(function (value) {
4212
- var _3;
4213
+ var _45;
4213
4214
  var _a, _b, _c;
4214
- return (_3 = {}, _3[(_a = column.displayField) === null || _a === void 0 ? void 0 : _a.toLowerCase()] = row[column.displayField], _3[(_b = column.optionLabel) === null || _b === void 0 ? void 0 : _b.toLowerCase()] = value, _3[(_c = column.field) === null || _c === void 0 ? void 0 : _c.toLowerCase()] = value, _3);
4215
+ return (_45 = {}, _45[(_a = column.displayField) === null || _a === void 0 ? void 0 : _a.toLowerCase()] = row[column.displayField], _45[(_b = column.optionLabel) === null || _b === void 0 ? void 0 : _b.toLowerCase()] = value, _45[(_c = column.field) === null || _c === void 0 ? void 0 : _c.toLowerCase()] = value, _45);
4215
4216
  });
4216
4217
  }
4217
4218
  var key = Object.keys(row).find(function (x) { return x === column.field.toLowerCase(); });
4218
4219
  // convert simple string into array
4219
4220
  if (!Array.isArray(row[key]) && row[key]) {
4220
4221
  if (column.displayField) {
4221
- row[key] = [(_3 = {}, _3[(_d = column.displayField) === null || _d === void 0 ? void 0 : _d.toLowerCase()] = row[column.displayField], _3[(_e = column.field) === null || _e === void 0 ? void 0 : _e.toLowerCase()] = row[key], _3)];
4222
+ row[key] = [(_45 = {}, _45[(_d = column.displayField) === null || _d === void 0 ? void 0 : _d.toLowerCase()] = row[column.displayField], _45[(_e = column.field) === null || _e === void 0 ? void 0 : _e.toLowerCase()] = row[key], _45)];
4222
4223
  }
4223
4224
  else {
4224
4225
  if (column.optionLabel) {
4225
- row[key] = [(_4 = {}, _4[(_f = column.field) === null || _f === void 0 ? void 0 : _f.toLowerCase()] = row[key], _4[(_g = column.optionLabel) === null || _g === void 0 ? void 0 : _g.toLowerCase()] = row[key], _4)];
4226
+ row[key] = [(_46 = {}, _46[(_f = column.field) === null || _f === void 0 ? void 0 : _f.toLowerCase()] = row[key], _46[(_g = column.optionLabel) === null || _g === void 0 ? void 0 : _g.toLowerCase()] = row[key], _46)];
4226
4227
  }
4227
4228
  else {
4228
- row[key] = [(_5 = {}, _5[(_h = column.field) === null || _h === void 0 ? void 0 : _h.toLowerCase()] = row[key], _5)];
4229
+ row[key] = [(_47 = {}, _47[(_h = column.field) === null || _h === void 0 ? void 0 : _h.toLowerCase()] = row[key], _47)];
4229
4230
  }
4230
4231
  }
4231
4232
  }
@@ -4289,11 +4290,15 @@
4289
4290
  this.isCheckBoxChangeEventCalled = false;
4290
4291
  };
4291
4292
  GridComponent.prototype.autoCompleteSelectedValue = function (row, column, value) {
4292
- var _3;
4293
+ var _45;
4293
4294
  var _a, _b, _c, _d;
4294
4295
  if (column.optionLabel) {
4295
4296
  var valueKey = column.optionValue ? column.optionValue : column.field;
4296
- row[column.field] = __spreadArray(__spreadArray([], __read(row[column.field])), [(_3 = {}, _3[(_a = column.optionLabel) === null || _a === void 0 ? void 0 : _a.toLowerCase()] = value[(_b = column.optionLabel) === null || _b === void 0 ? void 0 : _b.toLowerCase()], _3[valueKey === null || valueKey === void 0 ? void 0 : valueKey.toLowerCase()] = value[valueKey === null || valueKey === void 0 ? void 0 : valueKey.toLowerCase()], _3[(_c = column.field) === null || _c === void 0 ? void 0 : _c.toLowerCase()] = value[valueKey === null || valueKey === void 0 ? void 0 : valueKey.toLowerCase()], _3)]);
4297
+ row[column.field] = __spreadArray(__spreadArray([], __read(row[column.field])), [(_45 = {},
4298
+ _45[(_a = column.optionLabel) === null || _a === void 0 ? void 0 : _a.toLowerCase()] = value[(_b = column.optionLabel) === null || _b === void 0 ? void 0 : _b.toLowerCase()],
4299
+ _45[valueKey === null || valueKey === void 0 ? void 0 : valueKey.toLowerCase()] = value[valueKey === null || valueKey === void 0 ? void 0 : valueKey.toLowerCase()],
4300
+ _45[(_c = column.field) === null || _c === void 0 ? void 0 : _c.toLowerCase()] = value[valueKey === null || valueKey === void 0 ? void 0 : valueKey.toLowerCase()],
4301
+ _45)]);
4297
4302
  var index = (_d = row[column.field]) === null || _d === void 0 ? void 0 : _d.findIndex(function (x) { return JSON.stringify(x) === JSON.stringify(value); });
4298
4303
  row[column.field].splice(index, 1);
4299
4304
  }
@@ -4803,8 +4808,8 @@
4803
4808
  var _this = this;
4804
4809
  this.refreshGridTerminator();
4805
4810
  var selectedRow = Object.assign({}, row);
4806
- Object.entries(selectedRow).forEach(function (_3) {
4807
- var _4 = __read(_3, 2), key = _4[0], value = _4[1];
4811
+ Object.entries(selectedRow).forEach(function (_45) {
4812
+ var _46 = __read(_45, 2), key = _46[0], value = _46[1];
4808
4813
  _this.columns.forEach(function (col) {
4809
4814
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
4810
4815
  if (_this.setDropdownFilter) {
@@ -4819,8 +4824,8 @@
4819
4824
  var newValue = value.map(function (x) { return x[col.displayField ? col.displayField : col.field]; });
4820
4825
  if ((_b = newValue === null || newValue === void 0 ? void 0 : newValue.toString()) === null || _b === void 0 ? void 0 : _b.includes(';')) {
4821
4826
  row[col.field] = (_e = (_d = (_c = newValue === null || newValue === void 0 ? void 0 : newValue.toString()) === null || _c === void 0 ? void 0 : _c.replaceAll(';', ',')) === null || _d === void 0 ? void 0 : _d.split(',')) === null || _e === void 0 ? void 0 : _e.map(function (x) {
4822
- var _3;
4823
- return (_3 = {}, _3[col.displayField ? col.displayField : col.field] = x, _3[col.field + '_temp'] = value[0][col.field], _3);
4827
+ var _45;
4828
+ return (_45 = {}, _45[col.displayField ? col.displayField : col.field] = x, _45[col.field + '_temp'] = value[0][col.field], _45);
4824
4829
  });
4825
4830
  }
4826
4831
  }
@@ -4939,7 +4944,7 @@
4939
4944
  var automCompleteTempData = [];
4940
4945
  var lookupInfo = {};
4941
4946
  this.selectedColumns.forEach(function (column) {
4942
- var _3;
4947
+ var _45;
4943
4948
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
4944
4949
  delete selectedRow[column.field + '-data'];
4945
4950
  delete selectedRow[column.field + '_secondType'];
@@ -4957,7 +4962,7 @@
4957
4962
  else if (column.formatter === 'numeric') {
4958
4963
  value = value === true ? '1' : '0';
4959
4964
  }
4960
- selectedRow = Object.assign(Object.assign({}, selectedRow), (_3 = {}, _3[column.field] = value, _3));
4965
+ selectedRow = Object.assign(Object.assign({}, selectedRow), (_45 = {}, _45[column.field] = value, _45));
4961
4966
  }
4962
4967
  //convert date into time format
4963
4968
  if (column.type === exports.EGridColumnType.DATE) {
@@ -5003,13 +5008,13 @@
5003
5008
  var row = Object.assign({}, selectedRow);
5004
5009
  var keys = Object.keys(row);
5005
5010
  keys.forEach(function (key) {
5006
- var _3;
5011
+ var _45;
5007
5012
  if (_this.lookupObject && _this.lookupObject.field) {
5008
5013
  row[_this.lookupObject.field] = _this.lookupObject.value;
5009
5014
  }
5010
5015
  if (key.includes('_obj')) {
5011
5016
  if (_this.checkAction === false) {
5012
- row = Object.assign(Object.assign({}, row), (_3 = {}, _3[key.split('_')[0]] = row[key].displayText, _3));
5017
+ row = Object.assign(Object.assign({}, row), (_45 = {}, _45[key.split('_')[0]] = row[key].displayText, _45));
5013
5018
  _this.checkAction = true;
5014
5019
  }
5015
5020
  var obj_1 = row[key];
@@ -5520,12 +5525,15 @@
5520
5525
  selection = row[column.field];
5521
5526
  }
5522
5527
  if (column.field && typeof row[column.field] === 'object') {
5528
+ // console.log('bef newrow')
5523
5529
  var newRow = Object.assign({}, row);
5524
5530
  newRow[column.field] = (_a = newRow[column.field]) === null || _a === void 0 ? void 0 : _a.value;
5525
5531
  row = Object.assign({}, newRow);
5526
5532
  }
5527
5533
  if (column.type === exports.EGridColumnType.LOOKUP_INPUT && data) {
5534
+ console.log('in lookup input');
5528
5535
  var obj = autoSetLookupData(data, row);
5536
+ // console.log('obj', row[column.field], 'data', data)
5529
5537
  row[column.field + '-data'] = obj;
5530
5538
  }
5531
5539
  return {
@@ -5555,14 +5563,42 @@
5555
5563
  /**
5556
5564
  * open lookup Dialog
5557
5565
  */
5558
- GridComponent.prototype.openLookupDialog = function (column) {
5559
- var _a, _b, _c, _d, _e, _f;
5566
+ GridComponent.prototype.openLookupDialog = function (column, row) {
5567
+ if (row === void 0) { row = {}; }
5568
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44;
5569
+ console.log("in openLookupDialong", column, row);
5560
5570
  var columnData = ((_b = (_a = column.column) === null || _a === void 0 ? void 0 : _a.lookupControl) === null || _b === void 0 ? void 0 : _b.data) ? column.column.lookupControl.data : column.column.data;
5561
- var ref = this.dialogService.open(column.component, Object.assign(Object.assign({}, columnData), { data: Object.assign({ selection: column.selection, field: column.column.field, valueField: (_d = (_c = column.column.lookupControl) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.valueField }, column.rowData) }));
5562
- var componentName = (_e = column.component) === null || _e === void 0 ? void 0 : _e.name;
5571
+ console.log('column data1', columnData);
5572
+ var actionHeader = (_g = (_f = (_e = (_d = row[(_c = column.column.field) === null || _c === void 0 ? void 0 : _c.toLowerCase()]) === null || _d === void 0 ? void 0 : _d.action) === null || _e === void 0 ? void 0 : _e.lookupControl) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.header;
5573
+ // if(actionHeader){
5574
+ // //columnData.header = actionHeader;
5575
+ // }
5576
+ if ((_k = (_j = row[(_h = column.column.field) === null || _h === void 0 ? void 0 : _h.toLowerCase()]) === null || _j === void 0 ? void 0 : _j.action) === null || _k === void 0 ? void 0 : _k.lookupControl) {
5577
+ columnData.header = (_q = (_p = (_o = (_m = row[(_l = column.column.field) === null || _l === void 0 ? void 0 : _l.toLowerCase()]) === null || _m === void 0 ? void 0 : _m.action) === null || _o === void 0 ? void 0 : _o.lookupControl) === null || _p === void 0 ? void 0 : _p.data) === null || _q === void 0 ? void 0 : _q.header;
5578
+ ((_v = (_u = (_t = (_s = row[(_r = column.column.field) === null || _r === void 0 ? void 0 : _r.toLowerCase()]) === null || _s === void 0 ? void 0 : _s.action) === null || _t === void 0 ? void 0 : _t.lookupControl) === null || _u === void 0 ? void 0 : _u.data) === null || _v === void 0 ? void 0 : _v.width) ? columnData.width = (_0 = (_z = (_y = (_x = row[(_w = column.column.field) === null || _w === void 0 ? void 0 : _w.toLowerCase()]) === null || _x === void 0 ? void 0 : _x.action) === null || _y === void 0 ? void 0 : _y.lookupControl) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.width : '';
5579
+ ((_5 = (_4 = (_3 = (_2 = row[(_1 = column.column.field) === null || _1 === void 0 ? void 0 : _1.toLowerCase()]) === null || _2 === void 0 ? void 0 : _2.action) === null || _3 === void 0 ? void 0 : _3.lookupControl) === null || _4 === void 0 ? void 0 : _4.data) === null || _5 === void 0 ? void 0 : _5.height) ? columnData.height = (_10 = (_9 = (_8 = (_7 = row[(_6 = column.column.field) === null || _6 === void 0 ? void 0 : _6.toLowerCase()]) === null || _7 === void 0 ? void 0 : _7.action) === null || _8 === void 0 ? void 0 : _8.lookupControl) === null || _9 === void 0 ? void 0 : _9.data) === null || _10 === void 0 ? void 0 : _10.height : '';
5580
+ ((_15 = (_14 = (_13 = (_12 = row[(_11 = column.column.field) === null || _11 === void 0 ? void 0 : _11.toLowerCase()]) === null || _12 === void 0 ? void 0 : _12.action) === null || _13 === void 0 ? void 0 : _13.lookupControl) === null || _14 === void 0 ? void 0 : _14.data) === null || _15 === void 0 ? void 0 : _15.selectedValue) ? columnData.selectedValue = (_20 = (_19 = (_18 = (_17 = row[(_16 = column.column.field) === null || _16 === void 0 ? void 0 : _16.toLowerCase()]) === null || _17 === void 0 ? void 0 : _17.action) === null || _18 === void 0 ? void 0 : _18.lookupControl) === null || _19 === void 0 ? void 0 : _19.data) === null || _20 === void 0 ? void 0 : _20.selectedValue : "";
5581
+ ((_25 = (_24 = (_23 = (_22 = row[(_21 = column.column.field) === null || _21 === void 0 ? void 0 : _21.toLowerCase()]) === null || _22 === void 0 ? void 0 : _22.action) === null || _23 === void 0 ? void 0 : _23.lookupControl) === null || _24 === void 0 ? void 0 : _24.data) === null || _25 === void 0 ? void 0 : _25.valueField) ? columnData.valueField = (_30 = (_29 = (_28 = (_27 = row[(_26 = column.column.field) === null || _26 === void 0 ? void 0 : _26.toLowerCase()]) === null || _27 === void 0 ? void 0 : _27.action) === null || _28 === void 0 ? void 0 : _28.lookupControl) === null || _29 === void 0 ? void 0 : _29.data) === null || _30 === void 0 ? void 0 : _30.valueField : "";
5582
+ ((_35 = (_34 = (_33 = (_32 = row[(_31 = column.column.field) === null || _31 === void 0 ? void 0 : _31.toLowerCase()]) === null || _32 === void 0 ? void 0 : _32.action) === null || _33 === void 0 ? void 0 : _33.lookupControl) === null || _34 === void 0 ? void 0 : _34.data) === null || _35 === void 0 ? void 0 : _35.data) ? columnData.data = (_40 = (_39 = (_38 = (_37 = row[(_36 = column.column.field) === null || _36 === void 0 ? void 0 : _36.toLowerCase()]) === null || _37 === void 0 ? void 0 : _37.action) === null || _38 === void 0 ? void 0 : _38.lookupControl) === null || _39 === void 0 ? void 0 : _39.data) === null || _40 === void 0 ? void 0 : _40.data : '';
5583
+ // columnData.lookupControl=row[column.column.field?.toLowerCase()]?.action?.lookupControl
5584
+ }
5585
+ console.log('column data2', columnData);
5586
+ var ref = this.dialogService.open(column.component, Object.assign(Object.assign({}, columnData), { data: Object.assign({ selection: column.selection, field: column.column.field, valueField: (_42 = (_41 = column.column.lookupControl) === null || _41 === void 0 ? void 0 : _41.data) === null || _42 === void 0 ? void 0 : _42.valueField }, column.rowData) }));
5587
+ // const rowData = row[column.field]?.lookupControl?.data ? row[column.field]?.lookupControl?.data : row[column.field].data
5588
+ // const ref = this.dialogService.open(row[column.field].component, {
5589
+ // ...rowData,
5590
+ // data: {
5591
+ // selection: row[column.field].selection,
5592
+ // field: row[column.field],
5593
+ // valueField: row[column.field].lookupControl?.data?.valueField,
5594
+ // ... row[column.field].rowData,
5595
+ // },
5596
+ // });
5597
+ var componentName = (_43 = row[column.column.field]) === null || _43 === void 0 ? void 0 : _43.name;
5563
5598
  if (componentName) {
5564
- this.pageLoggerService.savePageLoggerInfo((_f = this.router.url) === null || _f === void 0 ? void 0 : _f.substring(1), componentName);
5599
+ this.pageLoggerService.savePageLoggerInfo((_44 = this.router.url) === null || _44 === void 0 ? void 0 : _44.substring(1), componentName);
5565
5600
  }
5601
+ console.log('bef return');
5566
5602
  return ref;
5567
5603
  };
5568
5604
  /**
@@ -5570,66 +5606,82 @@
5570
5606
  */
5571
5607
  GridComponent.prototype.selectLookupField = function (column, row) {
5572
5608
  var _this = this;
5573
- var _a;
5609
+ var _a, _b, _c, _d, _e, _f, _g;
5610
+ // console.log('row column', row[column.field])
5611
+ // console.log('in select lookup field')
5574
5612
  this.onClickEvent(column, row);
5575
5613
  this.lookupObject = { text: '', value: '', field: '' };
5576
- if (column.lookupControl) {
5577
- var obj_2 = this.setLookupDialogConfig(row, column, (_a = column.lookupControl.data) === null || _a === void 0 ? void 0 : _a.data);
5578
- obj_2['component'] = column.lookupControl.component;
5579
- var ref = this.openLookupDialog(obj_2);
5580
- draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
5581
- ref.onClose.subscribe(function (res) {
5582
- var _a, _b, _c, _d, _e, _f;
5583
- if (column.onReturn) {
5584
- column.onReturn(res, row);
5614
+ // if (column.lookupControl) {
5615
+ // console.log('in control')
5616
+ // let obj: any = this.setLookupDialogConfig(
5617
+ // row,
5618
+ // column,
5619
+ // column.lookupControl.data?.data
5620
+ // );
5621
+ // obj['component'] = column.lookupControl.component;
5622
+ // const ref = this.openLookupDialog(obj);
5623
+ // if (row[column.field].action?.lookupControl) {
5624
+ console.log('in control');
5625
+ var obj = this.setLookupDialogConfig(row, column,
5626
+ // row[column.field],
5627
+ (_d = (_c = (_b = (_a = row[column.field]) === null || _a === void 0 ? void 0 : _a.action) === null || _b === void 0 ? void 0 : _b.lookupControl) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.data);
5628
+ obj['component'] = (_g = (_f = (_e = row[column.field]) === null || _e === void 0 ? void 0 : _e.action) === null || _f === void 0 ? void 0 : _f.lookupControl) === null || _g === void 0 ? void 0 : _g.component;
5629
+ var ref = this.openLookupDialog(obj, row);
5630
+ draggableDialog((column === null || column === void 0 ? void 0 : column.field) ? column === null || column === void 0 ? void 0 : column.field : column === null || column === void 0 ? void 0 : column.header);
5631
+ console.log('in control2');
5632
+ ref.onClose.subscribe(function (res) {
5633
+ var _a, _b, _c, _d, _e, _f;
5634
+ console.log('in control2');
5635
+ if (column.onReturn) {
5636
+ column.onReturn(res, row);
5637
+ }
5638
+ if (res) {
5639
+ var value = setDialogResponse(column, column.lookupControl, res);
5640
+ res = objConvertToLower(res);
5641
+ var valueField = (_c = (_b = (_a = column === null || column === void 0 ? void 0 : column.lookupControl) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.valueField) === null || _c === void 0 ? void 0 : _c.toLowerCase();
5642
+ var selectedValue = (_f = (_e = (_d = column === null || column === void 0 ? void 0 : column.lookupControl) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.selectedValue) === null || _f === void 0 ? void 0 : _f.toLowerCase();
5643
+ if (column.displayField) {
5644
+ row[column.field] = {
5645
+ text: res[valueField ? valueField : column.displayField.toLowerCase()],
5646
+ value: res[selectedValue ? selectedValue : column.field.toLowerCase()],
5647
+ };
5648
+ _this.lookupObject = row[column.field];
5585
5649
  }
5586
- if (res) {
5587
- var value = setDialogResponse(column, column.lookupControl, res);
5588
- res = objConvertToLower(res);
5589
- var valueField = (_c = (_b = (_a = column === null || column === void 0 ? void 0 : column.lookupControl) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.valueField) === null || _c === void 0 ? void 0 : _c.toLowerCase();
5590
- var selectedValue = (_f = (_e = (_d = column === null || column === void 0 ? void 0 : column.lookupControl) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.selectedValue) === null || _f === void 0 ? void 0 : _f.toLowerCase();
5591
- if (column.displayField) {
5650
+ else if (value && value.value) {
5651
+ value['field'] = column.field;
5652
+ if (valueField || selectedValue) {
5592
5653
  row[column.field] = {
5593
- text: res[valueField ? valueField : column.displayField.toLowerCase()],
5594
- value: res[selectedValue ? selectedValue : column.field.toLowerCase()],
5654
+ text: res[valueField ? valueField : res[valueField]],
5655
+ value: res[selectedValue ? selectedValue : res[valueField]],
5595
5656
  };
5596
- _this.lookupObject = row[column.field];
5597
- }
5598
- else if (value && value.value) {
5599
- value['field'] = column.field;
5600
- if (valueField || selectedValue) {
5601
- row[column.field] = {
5602
- text: res[valueField ? valueField : res[valueField]],
5603
- value: res[selectedValue ? selectedValue : res[valueField]],
5604
- };
5605
- }
5606
- else {
5607
- row[column.field] = value.value;
5608
- }
5609
5657
  }
5610
5658
  else {
5611
- if (valueField || selectedValue) {
5612
- row[column.field] = {
5613
- text: res[valueField ? valueField : res[column.field.toLowerCase()]],
5614
- value: res[selectedValue ? selectedValue : res[column.field.toLowerCase()]],
5615
- };
5616
- }
5617
- else {
5618
- row[column.field] = res[column.field.toLowerCase()];
5619
- }
5659
+ row[column.field] = value.value;
5620
5660
  }
5621
5661
  }
5622
- if (row[column.field] !== obj_2.selection) {
5623
- _this.browserCloseEvent(true);
5624
- if (column.onChange) {
5625
- column.onChange(row);
5662
+ else {
5663
+ if (valueField || selectedValue) {
5664
+ row[column.field] = {
5665
+ text: res[valueField ? valueField : res[column.field.toLowerCase()]],
5666
+ value: res[selectedValue ? selectedValue : res[column.field.toLowerCase()]],
5667
+ };
5668
+ }
5669
+ else {
5670
+ row[column.field] = res[column.field.toLowerCase()];
5626
5671
  }
5627
5672
  }
5628
- }, function (_3) {
5629
- var error = _3.error;
5630
- _this.alertService.apiError(error);
5631
- });
5632
- }
5673
+ }
5674
+ if (row[column.field] !== obj.selection) {
5675
+ _this.browserCloseEvent(true);
5676
+ if (column.onChange) {
5677
+ column.onChange(row);
5678
+ }
5679
+ }
5680
+ }, function (_45) {
5681
+ var error = _45.error;
5682
+ _this.alertService.apiError(error);
5683
+ });
5684
+ // }
5633
5685
  };
5634
5686
  GridComponent.prototype.setFilterLookup = function (column) {
5635
5687
  this.gridService.setLookUpFilter(column, this.dialogService);
@@ -5950,7 +6002,7 @@
5950
6002
  this.onCancelAllRows.emit(this.rowsData);
5951
6003
  };
5952
6004
  GridComponent.prototype.getClassForEditAllRows = function (className) {
5953
- var e_1, _3;
6005
+ var e_1, _45;
5954
6006
  var _this = this;
5955
6007
  if (className === void 0) { className = ''; }
5956
6008
  var _a, _b;
@@ -5963,7 +6015,7 @@
5963
6015
  this.saveAllRecord = true;
5964
6016
  var records$_1 = [];
5965
6017
  setTimeout(function () {
5966
- var e_2, _3;
6018
+ var e_2, _45;
5967
6019
  var _loop_2 = function (item) {
5968
6020
  var rowSave = new Promise(function (resolve, reject) {
5969
6021
  item.click();
@@ -5980,7 +6032,7 @@
5980
6032
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
5981
6033
  finally {
5982
6034
  try {
5983
- if (getBtns_2_1 && !getBtns_2_1.done && (_3 = getBtns_2.return)) _3.call(getBtns_2);
6035
+ if (getBtns_2_1 && !getBtns_2_1.done && (_45 = getBtns_2.return)) _45.call(getBtns_2);
5984
6036
  }
5985
6037
  finally { if (e_2) throw e_2.error; }
5986
6038
  }
@@ -6016,7 +6068,7 @@
6016
6068
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
6017
6069
  finally {
6018
6070
  try {
6019
- if (getBtns_1_1 && !getBtns_1_1.done && (_3 = getBtns_1.return)) _3.call(getBtns_1);
6071
+ if (getBtns_1_1 && !getBtns_1_1.done && (_45 = getBtns_1.return)) _45.call(getBtns_1);
6020
6072
  }
6021
6073
  finally { if (e_1) throw e_1.error; }
6022
6074
  }