@churchillliving/se-ui-toolkit 6.52.83 → 6.52.85
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.
- package/bundles/churchillliving-se-ui-toolkit.umd.js +11 -9
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/services/card.service.js +12 -10
- package/fesm2015/churchillliving-se-ui-toolkit.js +11 -9
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/services/card.service.d.ts +3 -3
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
8988
|
+
_this.deleteFile(imageInfo, dynamicForm, cardId);
|
|
8990
8989
|
if (imageInfo.tables) {
|
|
8991
8990
|
_this.deleteImageFromTables(imageInfo.tables, uniqueKey);
|
|
8992
8991
|
}
|
|
@@ -9017,8 +9016,9 @@
|
|
|
9017
9016
|
formSections === null || formSections === void 0 ? void 0 : formSections.forEach(function (formSection) {
|
|
9018
9017
|
var _a;
|
|
9019
9018
|
(_a = formSection.fields) === null || _a === void 0 ? void 0 : _a.forEach(function (field) {
|
|
9019
|
+
var _a, _b;
|
|
9020
9020
|
if (field.control === exports.EFormControl.CARD && field.id && field.id === id && field.card.data) {
|
|
9021
|
-
arr = { data: field.card.data, change: field.card.change };
|
|
9021
|
+
arr = { data: field.card.data, change: field.card.change, url: (_b = (_a = field.card) === null || _a === void 0 ? void 0 : _a.cardInfo) === null || _b === void 0 ? void 0 : _b.url };
|
|
9022
9022
|
}
|
|
9023
9023
|
});
|
|
9024
9024
|
});
|
|
@@ -9037,11 +9037,12 @@
|
|
|
9037
9037
|
});
|
|
9038
9038
|
}
|
|
9039
9039
|
};
|
|
9040
|
-
CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id
|
|
9041
|
-
var _a
|
|
9042
|
-
var
|
|
9043
|
-
cardData =
|
|
9044
|
-
|
|
9040
|
+
CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id) {
|
|
9041
|
+
var _a;
|
|
9042
|
+
var fieldInfo = this.getCardData(dynamicForm.formSections, id);
|
|
9043
|
+
var cardData = fieldInfo.data;
|
|
9044
|
+
cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo, fieldInfo === null || fieldInfo === void 0 ? void 0 : fieldInfo.url)));
|
|
9045
|
+
(_a = dynamicForm.formSections) === null || _a === void 0 ? void 0 : _a.forEach(function (section) {
|
|
9045
9046
|
var card = section.fields.find(function (x) { return x.control === exports.EFormControl.CARD && x.id === id; });
|
|
9046
9047
|
if (card && card.card) {
|
|
9047
9048
|
card.card.data = cardData;
|
|
@@ -9050,6 +9051,7 @@
|
|
|
9050
9051
|
};
|
|
9051
9052
|
CardService.prototype.deleteFromArray = function (arr, cardInfo, deleteMatchKey) {
|
|
9052
9053
|
if (arr === void 0) { arr = []; }
|
|
9054
|
+
if (deleteMatchKey === void 0) { deleteMatchKey = ''; }
|
|
9053
9055
|
arr = setDataFields(arr);
|
|
9054
9056
|
cardInfo = objConvertToLower(cardInfo);
|
|
9055
9057
|
var index = arr.findIndex(function (i) { return i[deleteMatchKey] === cardInfo[deleteMatchKey] || i.blobfileurl === cardInfo.blobfileurl; });
|