@churchillliving/se-ui-toolkit 6.53.436 → 6.53.438
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 +17 -23
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/esm2015/lib/components/base/cards/card.component.js +3 -6
- package/esm2015/lib/components/base/form/form.component.js +6 -9
- package/esm2015/lib/services/card.service.js +10 -11
- package/fesm2015/churchillliving-se-ui-toolkit.js +16 -23
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/components/base/form/form.component.d.ts +1 -1
- package/lib/services/card.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7191,29 +7191,27 @@
|
|
|
7191
7191
|
onDynamicCardStateChange().subscribe(function (res) {
|
|
7192
7192
|
var _a, _b;
|
|
7193
7193
|
if ((_a = res.data) === null || _a === void 0 ? void 0 : _a.isSave) {
|
|
7194
|
-
console.log('res.data: ', res.data);
|
|
7195
7194
|
_this.setCardIds(res.data);
|
|
7196
7195
|
}
|
|
7197
7196
|
else {
|
|
7198
7197
|
console.log('else: ');
|
|
7199
|
-
_this.setDeleteCardId((_b = res.data) === null || _b === void 0 ? void 0 : _b.
|
|
7198
|
+
_this.setDeleteCardId((_b = res.data) === null || _b === void 0 ? void 0 : _b.cardData);
|
|
7200
7199
|
}
|
|
7201
7200
|
});
|
|
7202
7201
|
};
|
|
7203
|
-
FormComponent.prototype.setDeleteCardId = function (
|
|
7202
|
+
FormComponent.prototype.setDeleteCardId = function (updatedCardData) {
|
|
7203
|
+
var _this = this;
|
|
7204
7204
|
var _a, _b;
|
|
7205
|
-
console.log('
|
|
7205
|
+
console.log('updatedCardData: ', updatedCardData);
|
|
7206
7206
|
(_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.formSections) === null || _b === void 0 ? void 0 : _b.forEach(function (section) {
|
|
7207
7207
|
var cardControl = section.fields.find(function (field) { return field.control === exports.EFormControl.CARD; });
|
|
7208
7208
|
console.log('cardControl: ', cardControl);
|
|
7209
7209
|
if (cardControl) {
|
|
7210
|
-
|
|
7211
|
-
console.log('index: ', index);
|
|
7212
|
-
cardControl.card.data.splice(index, 1);
|
|
7210
|
+
cardControl.card.data = updatedCardData;
|
|
7213
7211
|
}
|
|
7214
7212
|
;
|
|
7213
|
+
console.log('this.form: 00', _this.form);
|
|
7215
7214
|
});
|
|
7216
|
-
console.log('this.form: 00', this.form);
|
|
7217
7215
|
};
|
|
7218
7216
|
FormComponent.prototype.setCardIds = function (res) {
|
|
7219
7217
|
var _a, _b, _c, _d;
|
|
@@ -9197,11 +9195,8 @@
|
|
|
9197
9195
|
if (_this.data && event) {
|
|
9198
9196
|
var arr = __spreadArray([], __read(_this.data));
|
|
9199
9197
|
var index = arr.findIndex(function (i) { return i.blobfileurl === event.blobfileurl; });
|
|
9200
|
-
var obj =
|
|
9201
|
-
|
|
9202
|
-
obj = arr[index];
|
|
9203
|
-
arr.splice(index, 1);
|
|
9204
|
-
}
|
|
9198
|
+
var obj = arr[index];
|
|
9199
|
+
arr.splice(index, 1);
|
|
9205
9200
|
_this.data = __spreadArray([], __read(arr));
|
|
9206
9201
|
if (_this.card && _this.card.onDelete) {
|
|
9207
9202
|
obj = _this.replacePropName(obj);
|
|
@@ -10467,7 +10462,7 @@
|
|
|
10467
10462
|
this.requestService.get('/Upload/Delete', imageToDelete).subscribe(function (response) {
|
|
10468
10463
|
_this.deleteFile(imageInfo, dynamicForm, cardId);
|
|
10469
10464
|
if (imageInfo.tables) {
|
|
10470
|
-
_this.deleteImageFromTables(imageInfo.tables, uniqueKey
|
|
10465
|
+
_this.deleteImageFromTables(imageInfo.tables, uniqueKey);
|
|
10471
10466
|
}
|
|
10472
10467
|
else {
|
|
10473
10468
|
changeDynamicCardState({ imageInfo: imageInfo });
|
|
@@ -10478,7 +10473,7 @@
|
|
|
10478
10473
|
_this.alertService.apiError(error);
|
|
10479
10474
|
});
|
|
10480
10475
|
};
|
|
10481
|
-
CardService.prototype.deleteImageFromTables = function (tables, uniqueKey
|
|
10476
|
+
CardService.prototype.deleteImageFromTables = function (tables, uniqueKey) {
|
|
10482
10477
|
var _this = this;
|
|
10483
10478
|
this.requestService
|
|
10484
10479
|
.get('/Data/BulkDelete', {
|
|
@@ -10486,7 +10481,6 @@
|
|
|
10486
10481
|
tables: tables,
|
|
10487
10482
|
})
|
|
10488
10483
|
.subscribe(function (response) {
|
|
10489
|
-
changeDynamicCardState({ imageInfo: imageInfo });
|
|
10490
10484
|
_this.alertService.success('Image deleted successfully.');
|
|
10491
10485
|
}, function (_c) {
|
|
10492
10486
|
var error = _c.error;
|
|
@@ -10520,16 +10514,16 @@
|
|
|
10520
10514
|
}
|
|
10521
10515
|
};
|
|
10522
10516
|
CardService.prototype.deleteFile = function (cardInfo, dynamicForm, id) {
|
|
10523
|
-
var _a;
|
|
10524
10517
|
var fieldInfo = this.getCardData(dynamicForm.formSections, id);
|
|
10525
10518
|
var cardData = fieldInfo.data;
|
|
10526
10519
|
cardData = __spreadArray([], __read(this.deleteFromArray(cardData, cardInfo, fieldInfo === null || fieldInfo === void 0 ? void 0 : fieldInfo.url)));
|
|
10527
|
-
(
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
}
|
|
10520
|
+
changeDynamicCardState({ cardData: cardData });
|
|
10521
|
+
// dynamicForm.formSections?.forEach((section) => {
|
|
10522
|
+
// let card = section.fields.find((x) => x.control === EFormControl.CARD && x.id === id);
|
|
10523
|
+
// if (card && card.card) {
|
|
10524
|
+
// card.card.data = cardData;
|
|
10525
|
+
// }
|
|
10526
|
+
// });
|
|
10533
10527
|
};
|
|
10534
10528
|
CardService.prototype.deleteFromArray = function (arr, cardInfo, deleteMatchKey) {
|
|
10535
10529
|
if (arr === void 0) { arr = []; }
|