impaktapps-ui-builder 0.0.377 → 0.0.379

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.
@@ -8314,11 +8314,17 @@ const downloadFile$1 = (obj) => {
8314
8314
  URL.revokeObjectURL(url);
8315
8315
  document.body.removeChild(link);
8316
8316
  };
8317
- const download = (response2) => {
8318
- const url = window.URL.createObjectURL(new Blob([response2.data]));
8317
+ const clickDownloadLink = (response2, service2) => {
8318
+ const user = JSON.parse(localStorage.get("user"));
8319
+ let url = `${service2.defaults.baseURL}/${response2.path}?Authorization=${user.token}`;
8320
+ if (response2 == null ? void 0 : response2.params) {
8321
+ const keysArray = Object.keys(response2 == null ? void 0 : response2.params);
8322
+ keysArray.map((e, i) => {
8323
+ url = url + `&${e}=${response2 == null ? void 0 : response2.params[e]}`;
8324
+ });
8325
+ }
8319
8326
  const link = document.createElement("a");
8320
8327
  link.href = url;
8321
- link.setAttribute("download", `${response2.headers.filename}`);
8322
8328
  document.body.appendChild(link);
8323
8329
  link.click();
8324
8330
  link.parentNode.removeChild(link);
@@ -8404,7 +8410,7 @@ async function executeInBuiltFunctionHandler(params) {
8404
8410
  const makeFunc = eval(params.config.funcParametersCode);
8405
8411
  parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
8406
8412
  }
8407
- params.serviceHolder[params.config.inBuiltFunctionType](parameter);
8413
+ params.serviceHolder[params.config.inBuiltFunctionType](parameter, params.service);
8408
8414
  }
8409
8415
  async function executeCustomHandler(params) {
8410
8416
  const makeFunc = eval(params.config.eventCode);
@@ -8591,7 +8597,7 @@ var service = (funcParams) => {
8591
8597
  dynamicData: funcParams.dynamicData,
8592
8598
  userValue: funcParams.userValue,
8593
8599
  service: funcParams.service,
8594
- serviceHolder: { downloadFile: downloadFile$1, download },
8600
+ serviceHolder: { downloadFile: downloadFile$1, download: clickDownloadLink },
8595
8601
  eventGroups
8596
8602
  };
8597
8603
  return {
@@ -8738,7 +8744,7 @@ var service = (funcParams) => {
8738
8744
  }
8739
8745
  },
8740
8746
  downloadFile: downloadFile$1,
8741
- download
8747
+ download: clickDownloadLink
8742
8748
  };
8743
8749
  };
8744
8750
  var leaderBoard = {