@churchillliving/se-ui-toolkit 6.52.62 → 6.52.63

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.
@@ -6404,7 +6404,7 @@
6404
6404
  FormComponent.prototype.onSaveForm = function () {
6405
6405
  var e_1, _s;
6406
6406
  var _this = this;
6407
- var _a, _b, _c, _d, _e, _f, _g;
6407
+ var _a, _b, _c, _d, _e;
6408
6408
  var validity = true;
6409
6409
  (_a = this.form.formSections) === null || _a === void 0 ? void 0 : _a.forEach(function (formSection) {
6410
6410
  if (formSection.fields) {
@@ -6475,9 +6475,8 @@
6475
6475
  }
6476
6476
  });
6477
6477
  // Save grid on formSave Button
6478
- var saveAllGrid = (_d = (_c = this.el) === null || _c === void 0 ? void 0 : _c.nativeElement) === null || _d === void 0 ? void 0 : _d.getElementById('saveAllGridValues');
6479
- console.log('saveAllGrid: ', saveAllGrid);
6480
- var getBtns = (_f = (_e = this.el) === null || _e === void 0 ? void 0 : _e.nativeElement) === null || _f === void 0 ? void 0 : _f.getElementsByClassName('saveRow');
6478
+ var saveAllGrid = document.getElementById('saveAllGridValues');
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();
6483
6482
  }
@@ -6498,7 +6497,7 @@
6498
6497
  }
6499
6498
  this.browserTabCloseEvent(false);
6500
6499
  this.saveForm.emit(this.form.formSections);
6501
- (_g = this.form.formSections) === null || _g === void 0 ? void 0 : _g.forEach(function (formSection) {
6500
+ (_e = this.form.formSections) === null || _e === void 0 ? void 0 : _e.forEach(function (formSection) {
6502
6501
  if (formSection.fields) {
6503
6502
  formSection.fields.forEach(function (field) {
6504
6503
  var _a, _b, _c, _d;
@@ -7611,6 +7610,15 @@
7611
7610
  this.requestService.get('/Upload', fileData).subscribe(function (data) {
7612
7611
  var _a;
7613
7612
  if (data) {
7613
+ data.results.forEach(function (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
+ console.log('data: ', data);
7614
7622
  _this.alertService.success('File Upload Successfully.');
7615
7623
  if ((_a = _this.fields) === null || _a === void 0 ? void 0 : _a.onReturn) {
7616
7624
  _this.fields.onReturn(data.results);
@@ -7742,10 +7750,11 @@
7742
7750
  var _this = this;
7743
7751
  var _a;
7744
7752
  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] })); });
7753
+ var _d = this.card, data = _d.data, formSections = _d.formSections, cardInfo_1 = _d.cardInfo;
7754
+ if (cardInfo_1 && Object.keys(cardInfo_1).length > 0) {
7755
+ this.displayCardInfo = cardInfo_1;
7756
+ 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()] })); });
7757
+ console.log('this.data: ', this.data);
7749
7758
  }
7750
7759
  else {
7751
7760
  this.data = this.gridService.setDataFields(data);
@@ -7814,10 +7823,16 @@
7814
7823
  });
7815
7824
  };
7816
7825
  CardComponent.prototype.replacePropName = function (cardInfo) {
7817
- var _c;
7826
+ var _d;
7818
7827
  if (this.displayCardInfo && Object.keys(this.displayCardInfo).length > 0) {
7819
7828
  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));
7829
+ var obj = Object.assign(Object.assign({}, cardInfo), (_d = {}, _d[cardProp.url] = cardInfo.blobfileurl, _d[cardProp.caption] = cardInfo.filecaption, _d[cardProp.extension] = cardInfo.fileextension, _d));
7830
+ console.log('obj: ', obj);
7831
+ delete obj.blobfileurl;
7832
+ delete obj.filecaption;
7833
+ delete obj.fileextension;
7834
+ console.log('obj2: ', obj);
7835
+ return obj;
7821
7836
  }
7822
7837
  else {
7823
7838
  return cardInfo;