@churchillliving/se-ui-toolkit 6.52.83 → 6.52.84

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.
@@ -8979,14 +8979,13 @@
8979
8979
  this.requestService = requestService;
8980
8980
  this.alertService = alertService;
8981
8981
  }
8982
- CardService.prototype.deleteImage = function (imageInfo, uniqueKey, dynamicForm, cardId, deleteMatchKey) {
8982
+ CardService.prototype.deleteImage = function (imageInfo, uniqueKey, dynamicForm, cardId) {
8983
8983
  var _this = this;
8984
- if (deleteMatchKey === void 0) { deleteMatchKey = ''; }
8985
8984
  var imageToDelete = imageInfo.id && imageInfo.id > 0
8986
8985
  ? { RecordId: imageInfo.id }
8987
8986
  : { UniqueKey: uniqueKey, RecordId: imageInfo.recordId };
8988
8987
  this.requestService.get('/Upload/Delete', imageToDelete).subscribe(function (response) {
8989
- _this.deleteFile(imageInfo, dynamicForm, cardId, deleteMatchKey);
8988
+ _this.deleteFile(imageInfo, dynamicForm, cardId);
8990
8989
  if (imageInfo.tables) {
8991
8990
  _this.deleteImageFromTables(imageInfo.tables, uniqueKey);
8992
8991
  }
@@ -9037,10 +9036,11 @@
9037
9036
  });
9038
9037
  }
9039
9038
  };
9040
- CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id, deleteMatchKey) {
9039
+ CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id) {
9041
9040
  var _a, _b;
9042
- var cardData = (_a = this.getCardData(dynamicForm.formSections, id)) === null || _a === void 0 ? void 0 : _a.data;
9043
- cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo, deleteMatchKey)));
9041
+ var fieldInfo = this.getCardData(dynamicForm.formSections, id);
9042
+ var cardData = fieldInfo.data;
9043
+ cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo, (_a = fieldInfo.cardInfo) === null || _a === void 0 ? void 0 : _a.url)));
9044
9044
  (_b = dynamicForm.formSections) === null || _b === void 0 ? void 0 : _b.forEach(function (section) {
9045
9045
  var card = section.fields.find(function (x) { return x.control === exports.EFormControl.CARD && x.id === id; });
9046
9046
  if (card && card.card) {
@@ -9050,6 +9050,7 @@
9050
9050
  };
9051
9051
  CardService.prototype.deleteFromArray = function (arr, cardInfo, deleteMatchKey) {
9052
9052
  if (arr === void 0) { arr = []; }
9053
+ if (deleteMatchKey === void 0) { deleteMatchKey = ''; }
9053
9054
  arr = setDataFields(arr);
9054
9055
  cardInfo = objConvertToLower(cardInfo);
9055
9056
  var index = arr.findIndex(function (i) { return i[deleteMatchKey] === cardInfo[deleteMatchKey] || i.blobfileurl === cardInfo.blobfileurl; });