@churchillliving/se-ui-toolkit 6.52.76 → 6.52.79

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.
@@ -4511,7 +4511,12 @@
4511
4511
  if (row.isNew) {
4512
4512
  var isNew = row.isNew, newRowObj = __rest(row, ["isNew"]);
4513
4513
  delete newRowObj[this.dataKey];
4514
- this.onRowAdd.emit(newRowObj);
4514
+ if (this.saveAllRecord) {
4515
+ this.saveRecordArray.push(newRowObj);
4516
+ }
4517
+ else {
4518
+ this.onRowAdd.emit(newRowObj);
4519
+ }
4515
4520
  }
4516
4521
  else {
4517
4522
  if (this.saveAllRecord) {
@@ -8989,13 +8994,13 @@
8989
8994
  this.requestService = requestService;
8990
8995
  this.alertService = alertService;
8991
8996
  }
8992
- CardService.prototype.deleteImage = function (imageInfo, uniqueKey, dynamicForm, cardId) {
8997
+ CardService.prototype.deleteImage = function (imageInfo, uniqueKey, dynamicForm, cardId, deleteMatchKey) {
8993
8998
  var _this = this;
8994
8999
  var imageToDelete = imageInfo.id && imageInfo.id > 0
8995
9000
  ? { RecordId: imageInfo.id }
8996
9001
  : { UniqueKey: uniqueKey, RecordId: imageInfo.recordId };
8997
9002
  this.requestService.get('/Upload/Delete', imageToDelete).subscribe(function (response) {
8998
- _this.deleteFile(imageInfo, dynamicForm, cardId);
9003
+ _this.deleteFile(imageInfo, dynamicForm, cardId, deleteMatchKey);
8999
9004
  if (imageInfo.tables) {
9000
9005
  _this.deleteImageFromTables(imageInfo.tables, uniqueKey);
9001
9006
  }
@@ -9046,10 +9051,10 @@
9046
9051
  });
9047
9052
  }
9048
9053
  };
9049
- CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id) {
9054
+ CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id, deleteMatchKey) {
9050
9055
  var _a, _b;
9051
9056
  var cardData = (_a = this.getCardData(dynamicForm.formSections, id)) === null || _a === void 0 ? void 0 : _a.data;
9052
- cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo)));
9057
+ cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo, deleteMatchKey)));
9053
9058
  (_b = dynamicForm.formSections) === null || _b === void 0 ? void 0 : _b.forEach(function (section) {
9054
9059
  var card = section.fields.find(function (x) { return x.control === exports.EFormControl.CARD && x.id === id; });
9055
9060
  if (card && card.card) {
@@ -9057,11 +9062,11 @@
9057
9062
  }
9058
9063
  });
9059
9064
  };
9060
- CardService.prototype.deleteFromArray = function (arr, cardInfo) {
9065
+ CardService.prototype.deleteFromArray = function (arr, cardInfo, deleteMatchKey) {
9061
9066
  if (arr === void 0) { arr = []; }
9062
9067
  arr = setDataFields(arr);
9063
9068
  cardInfo = objConvertToLower(cardInfo);
9064
- var index = arr.findIndex(function (i) { return i.blobfileurl === cardInfo.blobfileurl; });
9069
+ var index = arr.findIndex(function (i) { return i[deleteMatchKey] === cardInfo[deleteMatchKey]; });
9065
9070
  if (index > -1) {
9066
9071
  arr.splice(index, 1);
9067
9072
  }