@churchillliving/se-ui-toolkit 6.52.67 → 6.52.68

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.
@@ -7610,14 +7610,6 @@
7610
7610
  this.requestService.get('/Upload', fileData).subscribe(function (data) {
7611
7611
  var _a;
7612
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
- // })
7621
7613
  _this.alertService.success('File Upload Successfully.');
7622
7614
  if ((_a = _this.fields) === null || _a === void 0 ? void 0 : _a.onReturn) {
7623
7615
  _this.fields.onReturn(data.results);
@@ -7749,25 +7741,19 @@
7749
7741
  var _this = this;
7750
7742
  var _a;
7751
7743
  if (this.card) {
7752
- var _d = this.card, data = _d.data, formSections = _d.formSections, cardInfo_1 = _d.cardInfo;
7753
- var isIncluded_1 = false;
7754
- data.forEach(function (x) {
7755
- var _a, _b;
7756
- x = objConvertToLower(x);
7757
- if (((_a = Object.keys(x)) === null || _a === void 0 ? void 0 : _a.includes('azurecontainerid')) && ((_b = Object.keys(x)) === null || _b === void 0 ? void 0 : _b.includes('blobfileurl'))) {
7758
- isIncluded_1 = true;
7759
- }
7760
- });
7761
- // const isIncluded = data.some((x)=> Object.keys(x)?.includes("blobfileurl") && Object.keys(x)?.includes("fileextension") && Object.keys(x)?.includes("filecaption"));
7762
- // console.log('isIncluded: ', isIncluded);
7763
- if (cardInfo_1 && Object.keys(cardInfo_1).length > 0 && !isIncluded_1) {
7744
+ var _e = this.card, data = _e.data, formSections = _e.formSections, cardInfo_1 = _e.cardInfo;
7745
+ if (cardInfo_1 && Object.keys(cardInfo_1).length) {
7764
7746
  this.displayCardInfo = cardInfo_1;
7765
- 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()] })); });
7766
- console.log('this.data1: ', this.data);
7747
+ (_a = this.gridService.setDataFields(data)) === null || _a === void 0 ? void 0 : _a.forEach(function (record) {
7748
+ var _a, _b, _c, _d;
7749
+ if (!((_a = Object.keys(record)) === null || _a === void 0 ? void 0 : _a.includes('azurecontainerid'))) {
7750
+ record = Object.assign(Object.assign({}, record), { blobfileurl: record[(_b = cardInfo_1.url) === null || _b === void 0 ? void 0 : _b.toLowerCase()], filecaption: record[(_c = cardInfo_1.caption) === null || _c === void 0 ? void 0 : _c.toLowerCase()], fileextension: record[(_d = cardInfo_1.extension) === null || _d === void 0 ? void 0 : _d.toLowerCase()] });
7751
+ }
7752
+ });
7753
+ this.data = data;
7767
7754
  }
7768
7755
  else {
7769
7756
  this.data = this.gridService.setDataFields(data);
7770
- console.log('this.dataq: ', this.data);
7771
7757
  }
7772
7758
  this.dynamicForm = { formSections: formSections };
7773
7759
  // set the default value of allowDelete, allowEditableCaption and allowDownload
@@ -7833,15 +7819,20 @@
7833
7819
  });
7834
7820
  };
7835
7821
  CardComponent.prototype.replacePropName = function (cardInfo) {
7836
- var _d;
7822
+ var _e;
7837
7823
  if (this.displayCardInfo && Object.keys(this.displayCardInfo).length > 0) {
7838
7824
  var cardProp = Object.assign({}, this.displayCardInfo);
7839
- var obj = Object.assign(Object.assign({}, cardInfo), (_d = {}, _d[cardProp.url] = cardInfo.blobfileurl, _d[cardProp.caption] = cardInfo.filecaption, _d[cardProp.extension] = cardInfo.fileextension, _d));
7840
- console.log('obj: ', obj);
7841
- delete obj.blobfileurl;
7842
- delete obj.filecaption;
7843
- delete obj.fileextension;
7844
- console.log('obj2: ', obj);
7825
+ var obj = Object.assign(Object.assign({}, cardInfo), (_e = {}, _e[cardProp.url] = cardInfo.blobfileurl, _e[cardProp.caption] = cardInfo.filecaption, _e[cardProp.extension] = cardInfo.fileextension, _e));
7826
+ var values = Object.values(cardProp);
7827
+ if (!values.includes('blobfileurl')) {
7828
+ delete obj.blobfileurl;
7829
+ }
7830
+ if (!values.includes('filecaption')) {
7831
+ delete obj.filecaption;
7832
+ }
7833
+ if (!values.includes('fileextension')) {
7834
+ delete obj.fileextension;
7835
+ }
7845
7836
  return obj;
7846
7837
  }
7847
7838
  else {