impaktapps-ui-builder 0.0.377 → 0.0.378

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,20 @@ 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
+ let url = `${service2.defaults.baseURL}/${response2.path}`;
8319
+ if (response2 == null ? void 0 : response2.params) {
8320
+ const keysArray = Object.keys(response2 == null ? void 0 : response2.params);
8321
+ keysArray.map((e, i) => {
8322
+ if (i === 0) {
8323
+ url = url + `?${e}=${response2 == null ? void 0 : response2.params[e]}`;
8324
+ } else {
8325
+ url = url + `&${e}=${response2 == null ? void 0 : response2.params[e]}`;
8326
+ }
8327
+ });
8328
+ }
8319
8329
  const link = document.createElement("a");
8320
8330
  link.href = url;
8321
- link.setAttribute("download", `${response2.headers.filename}`);
8322
8331
  document.body.appendChild(link);
8323
8332
  link.click();
8324
8333
  link.parentNode.removeChild(link);
@@ -8404,7 +8413,7 @@ async function executeInBuiltFunctionHandler(params) {
8404
8413
  const makeFunc = eval(params.config.funcParametersCode);
8405
8414
  parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
8406
8415
  }
8407
- params.serviceHolder[params.config.inBuiltFunctionType](parameter);
8416
+ params.serviceHolder[params.config.inBuiltFunctionType](parameter, params.service);
8408
8417
  }
8409
8418
  async function executeCustomHandler(params) {
8410
8419
  const makeFunc = eval(params.config.eventCode);
@@ -8591,7 +8600,7 @@ var service = (funcParams) => {
8591
8600
  dynamicData: funcParams.dynamicData,
8592
8601
  userValue: funcParams.userValue,
8593
8602
  service: funcParams.service,
8594
- serviceHolder: { downloadFile: downloadFile$1, download },
8603
+ serviceHolder: { downloadFile: downloadFile$1, download: clickDownloadLink },
8595
8604
  eventGroups
8596
8605
  };
8597
8606
  return {
@@ -8738,7 +8747,7 @@ var service = (funcParams) => {
8738
8747
  }
8739
8748
  },
8740
8749
  downloadFile: downloadFile$1,
8741
- download
8750
+ download: clickDownloadLink
8742
8751
  };
8743
8752
  };
8744
8753
  var leaderBoard = {