impaktapps-ui-builder 0.0.382-alpha.61 → 0.0.382-alpha.62

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.
@@ -8387,8 +8387,10 @@ async function executeInBuiltFunctionHandler(params) {
8387
8387
  if (params.config.funcParametersCode) {
8388
8388
  const makeFunc = eval(params.config.funcParametersCode);
8389
8389
  parameter = makeFunc(params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
8390
+ params.serviceHolder[params.config.inBuiltFunctionType](parameter, params.service);
8391
+ } else {
8392
+ params.serviceHolder[params.config.inBuiltFunctionType](params.store, params.dynamicData, params.userValue, params.parentEventOutput, params.service);
8390
8393
  }
8391
- params.serviceHolder[params.config.inBuiltFunctionType](parameter);
8392
8394
  }
8393
8395
  async function executeCustomHandler(params) {
8394
8396
  const makeFunc = eval(params.config.eventCode);
@@ -8436,14 +8438,15 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
8436
8438
  } else {
8437
8439
  if (handlerResponse) {
8438
8440
  store2.setFormdata((pre) => {
8439
- return { ...pre, [componentName]: eventConfig.lazyLoading ? handlerResponse.data.data : handlerResponse.data };
8441
+ var _a;
8442
+ return { ...pre, [componentName]: eventConfig.lazyLoading ? (_a = handlerResponse == null ? void 0 : handlerResponse.data) == null ? void 0 : _a.data : handlerResponse.data };
8440
8443
  });
8441
8444
  await asyncOperation();
8442
8445
  }
8443
8446
  }
8444
8447
  }
8445
8448
  const buildBodyFormat = (body2, formData, userValue2) => {
8446
- const finalBody = { ...userValue2 == null ? void 0 : userValue2.payload };
8449
+ let finalBody = { ...userValue2 == null ? void 0 : userValue2.payload };
8447
8450
  body2.map((elem) => {
8448
8451
  var _a, _b;
8449
8452
  if (typeof (elem == null ? void 0 : elem.value) !== "string") {
@@ -8455,6 +8458,10 @@ const buildBodyFormat = (body2, formData, userValue2) => {
8455
8458
  } else if ((_b = elem == null ? void 0 : elem.value) == null ? void 0 : _b.startsWith("$")) {
8456
8459
  const finalpath = elem.value.substring(1);
8457
8460
  finalBody[elem.key] = _.get(formData, finalpath);
8461
+ } else if ((elem == null ? void 0 : elem.value) === "*" && (elem == null ? void 0 : elem.key) === "*") {
8462
+ finalBody = { ...finalBody, ...formData };
8463
+ } else if ((elem == null ? void 0 : elem.value) === "*") {
8464
+ finalBody[elem.key] = formData;
8458
8465
  } else {
8459
8466
  finalBody[elem.key] = elem.value;
8460
8467
  }
@@ -8575,12 +8582,14 @@ var service = (funcParams) => {
8575
8582
  dynamicData: funcParams.dynamicData,
8576
8583
  userValue: funcParams.userValue,
8577
8584
  service: funcParams.service,
8578
- serviceHolder: { downloadFile: downloadFile$1, download: doDownload },
8579
- eventGroups
8585
+ serviceHolder: { downloadFile: downloadFile$1, download: doDownload, ...funcParams.functionsProvider },
8586
+ eventGroups,
8587
+ functionsProvider: funcParams.functionsProvider
8580
8588
  };
8581
8589
  return {
8582
8590
  setPage: async function() {
8583
8591
  funcParams.store.setFormdata({});
8592
+ await asyncOperation();
8584
8593
  executeEventsParameters = {
8585
8594
  config: {},
8586
8595
  componentName: "",
@@ -8588,19 +8597,10 @@ var service = (funcParams) => {
8588
8597
  dynamicData: funcParams.dynamicData,
8589
8598
  userValue: funcParams.userValue,
8590
8599
  service: funcParams.service,
8600
+ functionsProvider: funcParams.functionsProvider,
8591
8601
  serviceHolder: this,
8592
8602
  eventGroups
8593
8603
  };
8594
- funcParams.store.setSchema(
8595
- (pre) => {
8596
- return {
8597
- ...funcParams.schema,
8598
- properties: { ...funcParams.schema.properties, ...pre.properties }
8599
- };
8600
- }
8601
- );
8602
- funcParams.uiSchema.elements.push(notifyUiSchema);
8603
- funcParams.store.setUiSchema(funcParams.uiSchema);
8604
8604
  await executeRefreshHandler({
8605
8605
  config: {},
8606
8606
  componentName: "",
@@ -8611,16 +8611,33 @@ var service = (funcParams) => {
8611
8611
  serviceHolder: this,
8612
8612
  eventGroups
8613
8613
  });
8614
+ await asyncOperation();
8615
+ funcParams.store.setSchema(
8616
+ (pre) => {
8617
+ return {
8618
+ ...funcParams.schema,
8619
+ properties: { ...funcParams.schema.properties, ...pre.properties }
8620
+ };
8621
+ }
8622
+ );
8623
+ funcParams.uiSchema.elements.push(notifyUiSchema);
8624
+ funcParams.store.setUiSchema(funcParams.uiSchema);
8614
8625
  },
8615
8626
  onClick: async function() {
8616
8627
  await this.callHandler("onClick");
8617
8628
  },
8629
+ onMount: async function() {
8630
+ await this.callHandler("onMount");
8631
+ },
8618
8632
  onFileDownload: async function() {
8619
8633
  await this.callHandler("onDownload");
8620
8634
  },
8621
8635
  onFileUpload: async function() {
8622
8636
  await this.callHandler("onUpload");
8623
8637
  },
8638
+ backHandler: function() {
8639
+ funcParams.store.navigate(-1);
8640
+ },
8624
8641
  onPaginationChange: async function(paginationValues) {
8625
8642
  var _a;
8626
8643
  const apiBody = [
@@ -8639,17 +8656,16 @@ var service = (funcParams) => {
8639
8656
  { key: "searchValue", value: param.serachValue },
8640
8657
  { key: "currentValue", value: param.currentValue }
8641
8658
  ];
8642
- return await this.updateConfigApiBody(param, apiBody);
8659
+ const response2 = await this.updateConfigApiBody(param, apiBody);
8660
+ return response2 == null ? void 0 : response2.data;
8643
8661
  }
8644
8662
  },
8645
8663
  onChange: async function() {
8646
- var _a, _b;
8647
8664
  if (eventGroups.onChange) {
8648
- (_a = funcParams.dynamicData) == null ? void 0 : _a.setLoading(true);
8649
8665
  const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);
8650
8666
  Promise.all(ChangeEventsKeysArray.map(async (componentName) => {
8651
- var _a2, _b2;
8652
- if (((_a2 = funcParams.store) == null ? void 0 : _a2.formData[componentName]) !== funcParams.store.newData[componentName] && ((_b2 = funcParams.store) == null ? void 0 : _b2.newData[componentName]) !== void 0) {
8667
+ var _a, _b;
8668
+ if (((_a = funcParams.store) == null ? void 0 : _a.formData[componentName]) !== funcParams.store.newData[componentName] && ((_b = funcParams.store) == null ? void 0 : _b.newData[componentName]) !== void 0) {
8653
8669
  for (const eventConfig of eventGroups.onChange[componentName]) {
8654
8670
  await executeEvents({
8655
8671
  ...executeEventsParameters,
@@ -8659,7 +8675,6 @@ var service = (funcParams) => {
8659
8675
  }
8660
8676
  }
8661
8677
  }));
8662
- (_b = funcParams.dynamicData) == null ? void 0 : _b.setLoading(false);
8663
8678
  }
8664
8679
  },
8665
8680
  updateConfigApiBody: async function(paramValue, apiBody) {
@@ -8702,9 +8717,6 @@ var service = (funcParams) => {
8702
8717
  functionParameters == null ? void 0 : functionParameters.handleNext();
8703
8718
  }
8704
8719
  },
8705
- backHandler: () => {
8706
- funcParams.store.navigate(-1);
8707
- },
8708
8720
  onReset: async function(functionParameters) {
8709
8721
  var _a, _b;
8710
8722
  const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
@@ -8728,7 +8740,8 @@ var service = (funcParams) => {
8728
8740
  }
8729
8741
  },
8730
8742
  downloadFile: downloadFile$1,
8731
- download: doDownload
8743
+ download: doDownload,
8744
+ ...funcParams.functionsProvider
8732
8745
  };
8733
8746
  };
8734
8747
  var leaderBoard = {