@churchillliving/se-ui-toolkit 6.52.64 → 6.52.65

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.
@@ -6475,8 +6475,7 @@
6475
6475
  }
6476
6476
  });
6477
6477
  // Save grid on formSave Button
6478
- var saveAllGrid = document === null || document === void 0 ? void 0 : document.getElementById('saveAllGridValues');
6479
- console.log('saveAllGrid: ', saveAllGrid.click());
6478
+ var saveAllGrid = document.getElementById('saveAllGridValues');
6480
6479
  var getBtns = (_d = (_c = this.el) === null || _c === void 0 ? void 0 : _c.nativeElement) === null || _d === void 0 ? void 0 : _d.getElementsByClassName('saveRow');
6481
6480
  if (saveAllGrid) {
6482
6481
  saveAllGrid.click();
@@ -7611,6 +7610,14 @@
7611
7610
  this.requestService.get('/Upload', fileData).subscribe(function (data) {
7612
7611
  var _a;
7613
7612
  if (data) {
7613
+ // data.results.forEach((res)=>{
7614
+ // res['url'] = res.blobFileUrl,
7615
+ // res['extension'] = res.fileExtension,
7616
+ // res['caption'] = res.fileCaption,
7617
+ // delete res.blobFileUrl;
7618
+ // delete res.fileExtension;
7619
+ // delete res.fileCaption;
7620
+ // })
7614
7621
  _this.alertService.success('File Upload Successfully.');
7615
7622
  if ((_a = _this.fields) === null || _a === void 0 ? void 0 : _a.onReturn) {
7616
7623
  _this.fields.onReturn(data.results);
@@ -7742,13 +7749,17 @@
7742
7749
  var _this = this;
7743
7750
  var _a;
7744
7751
  if (this.card) {
7745
- var _c = this.card, data = _c.data, formSections = _c.formSections, cardInfo_1 = _c.cardInfo;
7746
- if (cardInfo_1) {
7747
- cardInfo_1 = objConvertToLower(cardInfo_1);
7748
- this.data = (_a = this.gridService.setDataFields(data)) === null || _a === void 0 ? void 0 : _a.map(function (record) { return (Object.assign(Object.assign({}, record), { blobfileurl: record[cardInfo_1.url], filecaption: record[cardInfo_1.caption], fileextension: record[cardInfo_1.extension] })); });
7752
+ var _d = this.card, data = _d.data, formSections = _d.formSections, cardInfo_1 = _d.cardInfo;
7753
+ var isIncluded = data.some(function (x) { var _a, _b, _c; return ((_a = Object.keys(x)) === null || _a === void 0 ? void 0 : _a.includes("blobfileurl")) && ((_b = Object.keys(x)) === null || _b === void 0 ? void 0 : _b.includes("fileextension")) && ((_c = Object.keys(x)) === null || _c === void 0 ? void 0 : _c.includes("filecaption")); });
7754
+ console.log('isIncluded: ', isIncluded);
7755
+ if (cardInfo_1 && Object.keys(cardInfo_1).length > 0 && !isIncluded) {
7756
+ this.displayCardInfo = cardInfo_1;
7757
+ this.data = (_a = this.gridService.setDataFields(data)) === null || _a === void 0 ? void 0 : _a.map(function (record) { var _a, _b, _c; return (Object.assign(Object.assign({}, record), { blobfileurl: record[(_a = cardInfo_1.url) === null || _a === void 0 ? void 0 : _a.toLowerCase()], filecaption: record[(_b = cardInfo_1.caption) === null || _b === void 0 ? void 0 : _b.toLowerCase()], fileextension: record[(_c = cardInfo_1.extension) === null || _c === void 0 ? void 0 : _c.toLowerCase()] })); });
7758
+ console.log('this.data1: ', this.data);
7749
7759
  }
7750
7760
  else {
7751
7761
  this.data = this.gridService.setDataFields(data);
7762
+ console.log('this.dataq: ', this.data);
7752
7763
  }
7753
7764
  this.dynamicForm = { formSections: formSections };
7754
7765
  // set the default value of allowDelete, allowEditableCaption and allowDownload
@@ -7814,10 +7825,16 @@
7814
7825
  });
7815
7826
  };
7816
7827
  CardComponent.prototype.replacePropName = function (cardInfo) {
7817
- var _c;
7828
+ var _d;
7818
7829
  if (this.displayCardInfo && Object.keys(this.displayCardInfo).length > 0) {
7819
7830
  var cardProp = Object.assign({}, this.displayCardInfo);
7820
- return Object.assign(Object.assign({}, cardInfo), (_c = {}, _c[cardProp.url] = cardInfo.blobfileurl, _c[cardProp.caption] = cardInfo.filecaption, _c[cardProp.extension] = cardInfo.fileextension, _c));
7831
+ var obj = Object.assign(Object.assign({}, cardInfo), (_d = {}, _d[cardProp.url] = cardInfo.blobfileurl, _d[cardProp.caption] = cardInfo.filecaption, _d[cardProp.extension] = cardInfo.fileextension, _d));
7832
+ console.log('obj: ', obj);
7833
+ delete obj.blobfileurl;
7834
+ delete obj.filecaption;
7835
+ delete obj.fileextension;
7836
+ console.log('obj2: ', obj);
7837
+ return obj;
7821
7838
  }
7822
7839
  else {
7823
7840
  return cardInfo;