@churchillliving/se-ui-toolkit 6.53.257 → 6.53.259

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.
@@ -8861,11 +8861,14 @@
8861
8861
  var filters = this.getFilters();
8862
8862
  this.requestService.download('/Report/Generate', { Id: (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.Id, filters: filters })
8863
8863
  .subscribe(function (response) {
8864
+ var _a, _b, _c, _d;
8864
8865
  var newBlob = new Blob([response.body], { type: 'application/pdf' });
8865
8866
  var data = window.URL.createObjectURL(newBlob);
8866
8867
  var a = document.createElement('a');
8867
8868
  a.href = data;
8868
- a.download = getResponseHeaderFileName(response);
8869
+ var header = (_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a.get('Content-Disposition');
8870
+ var fileName = (_d = (_c = (_b = header === null || header === void 0 ? void 0 : header.split('filename=')) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.split(";")[0]) === null || _d === void 0 ? void 0 : _d.replaceAll(/\"/g, '');
8871
+ a.download = fileName;
8869
8872
  document.body.appendChild(a);
8870
8873
  a.click();
8871
8874
  document.body.removeChild(a);
@@ -8955,11 +8958,14 @@
8955
8958
  this.requestService
8956
8959
  .download('/Report/Generate', { Id: this.repId, filters: filters })
8957
8960
  .subscribe(function (response) {
8961
+ var _a, _b, _c, _d;
8958
8962
  var newBlob = new Blob([response.body], { type: 'application/pdf' });
8959
8963
  var data = window.URL.createObjectURL(newBlob);
8960
8964
  var a = document.createElement('a');
8961
8965
  a.href = data;
8962
- a.download = getResponseHeaderFileName(response);
8966
+ var header = (_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a.get('Content-Disposition');
8967
+ var fileName = (_d = (_c = (_b = header === null || header === void 0 ? void 0 : header.split('filename=')) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.split(";")[0]) === null || _d === void 0 ? void 0 : _d.replaceAll(/\"/g, '');
8968
+ a.download = fileName;
8963
8969
  document.body.appendChild(a);
8964
8970
  a.click();
8965
8971
  document.body.removeChild(a);