@churchillliving/se-ui-toolkit 6.52.77 → 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.
@@ -8994,13 +8994,13 @@
8994
8994
  this.requestService = requestService;
8995
8995
  this.alertService = alertService;
8996
8996
  }
8997
- CardService.prototype.deleteImage = function (imageInfo, uniqueKey, dynamicForm, cardId) {
8997
+ CardService.prototype.deleteImage = function (imageInfo, uniqueKey, dynamicForm, cardId, deleteMatchKey) {
8998
8998
  var _this = this;
8999
8999
  var imageToDelete = imageInfo.id && imageInfo.id > 0
9000
9000
  ? { RecordId: imageInfo.id }
9001
9001
  : { UniqueKey: uniqueKey, RecordId: imageInfo.recordId };
9002
9002
  this.requestService.get('/Upload/Delete', imageToDelete).subscribe(function (response) {
9003
- _this.deleteFile(imageInfo, dynamicForm, cardId);
9003
+ _this.deleteFile(imageInfo, dynamicForm, cardId, deleteMatchKey);
9004
9004
  if (imageInfo.tables) {
9005
9005
  _this.deleteImageFromTables(imageInfo.tables, uniqueKey);
9006
9006
  }
@@ -9051,10 +9051,10 @@
9051
9051
  });
9052
9052
  }
9053
9053
  };
9054
- CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id) {
9054
+ CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id, deleteMatchKey) {
9055
9055
  var _a, _b;
9056
9056
  var cardData = (_a = this.getCardData(dynamicForm.formSections, id)) === null || _a === void 0 ? void 0 : _a.data;
9057
- cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo)));
9057
+ cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo, deleteMatchKey)));
9058
9058
  (_b = dynamicForm.formSections) === null || _b === void 0 ? void 0 : _b.forEach(function (section) {
9059
9059
  var card = section.fields.find(function (x) { return x.control === exports.EFormControl.CARD && x.id === id; });
9060
9060
  if (card && card.card) {
@@ -9062,11 +9062,11 @@
9062
9062
  }
9063
9063
  });
9064
9064
  };
9065
- CardService.prototype.deleteFromArray = function (arr, cardInfo) {
9065
+ CardService.prototype.deleteFromArray = function (arr, cardInfo, deleteMatchKey) {
9066
9066
  if (arr === void 0) { arr = []; }
9067
9067
  arr = setDataFields(arr);
9068
9068
  cardInfo = objConvertToLower(cardInfo);
9069
- var index = arr.findIndex(function (i) { return i.blobfileurl === cardInfo.blobfileurl; });
9069
+ var index = arr.findIndex(function (i) { return i[deleteMatchKey] === cardInfo[deleteMatchKey]; });
9070
9070
  if (index > -1) {
9071
9071
  arr.splice(index, 1);
9072
9072
  }