impaktapps-ui-builder 0.0.409-n → 0.0.409-o

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.
@@ -1128,7 +1128,7 @@ var lodash = { exports: {} };
1128
1128
  }
1129
1129
  var runInContext = function runInContext2(context) {
1130
1130
  context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps));
1131
- var Array2 = context.Array, Date = context.Date, Error2 = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String = context.String, TypeError = context.TypeError;
1131
+ var Array2 = context.Array, Date = context.Date, Error = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String = context.String, TypeError = context.TypeError;
1132
1132
  var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
1133
1133
  var coreJsData = context["__core-js_shared__"];
1134
1134
  var funcToString = funcProto.toString;
@@ -1613,7 +1613,7 @@ var lodash = { exports: {} };
1613
1613
  if (typeof func != "function") {
1614
1614
  throw new TypeError(FUNC_ERROR_TEXT);
1615
1615
  }
1616
- return setTimeout2(function() {
1616
+ return setTimeout(function() {
1617
1617
  func.apply(undefined$1, args);
1618
1618
  }, wait);
1619
1619
  }
@@ -3444,7 +3444,7 @@ var lodash = { exports: {} };
3444
3444
  return object[key];
3445
3445
  }
3446
3446
  var setData = shortOut(baseSetData);
3447
- var setTimeout2 = ctxSetTimeout || function(func, wait) {
3447
+ var setTimeout = ctxSetTimeout || function(func, wait) {
3448
3448
  return root.setTimeout(func, wait);
3449
3449
  };
3450
3450
  var setToString = shortOut(baseSetToString);
@@ -4236,7 +4236,7 @@ var lodash = { exports: {} };
4236
4236
  }
4237
4237
  function leadingEdge(time) {
4238
4238
  lastInvokeTime = time;
4239
- timerId = setTimeout2(timerExpired, wait);
4239
+ timerId = setTimeout(timerExpired, wait);
4240
4240
  return leading ? invokeFunc(time) : result2;
4241
4241
  }
4242
4242
  function remainingWait(time) {
@@ -4252,7 +4252,7 @@ var lodash = { exports: {} };
4252
4252
  if (shouldInvoke(time)) {
4253
4253
  return trailingEdge(time);
4254
4254
  }
4255
- timerId = setTimeout2(timerExpired, remainingWait(time));
4255
+ timerId = setTimeout(timerExpired, remainingWait(time));
4256
4256
  }
4257
4257
  function trailingEdge(time) {
4258
4258
  timerId = undefined$1;
@@ -4283,12 +4283,12 @@ var lodash = { exports: {} };
4283
4283
  }
4284
4284
  if (maxing) {
4285
4285
  clearTimeout(timerId);
4286
- timerId = setTimeout2(timerExpired, wait);
4286
+ timerId = setTimeout(timerExpired, wait);
4287
4287
  return invokeFunc(lastCallTime);
4288
4288
  }
4289
4289
  }
4290
4290
  if (timerId === undefined$1) {
4291
- timerId = setTimeout2(timerExpired, wait);
4291
+ timerId = setTimeout(timerExpired, wait);
4292
4292
  }
4293
4293
  return result2;
4294
4294
  }
@@ -4531,7 +4531,7 @@ var lodash = { exports: {} };
4531
4531
  }
4532
4532
  function isNative(value) {
4533
4533
  if (isMaskable(value)) {
4534
- throw new Error2(CORE_ERROR_TEXT);
4534
+ throw new Error(CORE_ERROR_TEXT);
4535
4535
  }
4536
4536
  return baseIsNative(value);
4537
4537
  }
@@ -5072,7 +5072,7 @@ var lodash = { exports: {} };
5072
5072
  if (!variable) {
5073
5073
  source = "with (obj) {\n" + source + "\n}\n";
5074
5074
  } else if (reForbiddenIdentifierChars.test(variable)) {
5075
- throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
5075
+ throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
5076
5076
  }
5077
5077
  source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
5078
5078
  source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
@@ -5191,7 +5191,7 @@ var lodash = { exports: {} };
5191
5191
  try {
5192
5192
  return apply(func, undefined$1, args);
5193
5193
  } catch (e) {
5194
- return isError(e) ? e : new Error2(e);
5194
+ return isError(e) ? e : new Error(e);
5195
5195
  }
5196
5196
  });
5197
5197
  var bindAll = flatRest(function(object, methodNames) {
@@ -8742,16 +8742,6 @@ function buildApiPayload(compConfig, body, headers, store, dynamicData, userValu
8742
8742
  }
8743
8743
  return promiseChain;
8744
8744
  }
8745
- function asyncOperation() {
8746
- return new Promise((resolve, reject) => {
8747
- setTimeout(() => {
8748
- {
8749
- resolve("Operation completed successfully!");
8750
- reject(new Error("Operation failed!"));
8751
- }
8752
- }, 50);
8753
- });
8754
- }
8755
8745
  let compType;
8756
8746
  let eventGroups = {};
8757
8747
  const notifyUiSchema = {
@@ -8796,8 +8786,6 @@ const extractEvents = (eventConfig) => {
8796
8786
  return eventGroups;
8797
8787
  };
8798
8788
  var service = (funcParams) => {
8799
- eventGroups = {};
8800
- eventGroups = extractEvents(funcParams.config);
8801
8789
  let executeEventsParameters = {
8802
8790
  config: {},
8803
8791
  componentName: "",
@@ -8805,23 +8793,47 @@ var service = (funcParams) => {
8805
8793
  dynamicData: funcParams.dynamicData,
8806
8794
  userValue: funcParams.userValue,
8807
8795
  service: funcParams.service,
8808
- serviceHolder: { downloadFile: downloadFile$1, download: doDownload },
8809
- eventGroups
8796
+ serviceHolder: { downloadFile: downloadFile$1, download: doDownload, ...funcParams.functionsProvider },
8797
+ eventGroups,
8798
+ functionsProvider: funcParams.functionsProvider
8810
8799
  };
8811
8800
  return {
8812
8801
  setPage: async function() {
8802
+ var _a, _b;
8813
8803
  funcParams.store.setFormdata({});
8814
- funcParams.store.setSchema(
8815
- (pre) => {
8816
- return {
8817
- ...funcParams.schema,
8818
- properties: { ...funcParams.schema.properties, ...pre.properties }
8819
- };
8820
- }
8821
- );
8822
- funcParams.uiSchema.elements.push(notifyUiSchema);
8823
- funcParams.store.setUiSchema(funcParams.uiSchema);
8824
- await asyncOperation();
8804
+ const data = JSON.stringify({
8805
+ pageName: funcParams.store.pageName
8806
+ });
8807
+ let pageData;
8808
+ const pageBasicDetailString = localStorage.getItem("pagemasterMetaData");
8809
+ if (pageBasicDetailString) {
8810
+ pageData = JSON.parse(pageBasicDetailString);
8811
+ } else {
8812
+ const pageId = await funcParams.service.post("/page/getByName", data, {
8813
+ headers: {
8814
+ "Content-Type": "application/json"
8815
+ }
8816
+ });
8817
+ const response = await funcParams.service.get(
8818
+ `/page/getById?id=${(_a = pageId == null ? void 0 : pageId.data) == null ? void 0 : _a.id}`,
8819
+ {
8820
+ headers: {
8821
+ "Content-Type": "application/json"
8822
+ }
8823
+ }
8824
+ );
8825
+ pageData = response.data;
8826
+ localStorage.setItem("pagemasterMetaData", JSON.stringify({
8827
+ schema: pageData == null ? void 0 : pageData.schema,
8828
+ uiSchema: pageData == null ? void 0 : pageData.uiSchema,
8829
+ config: pageData == null ? void 0 : pageData.config
8830
+ }));
8831
+ }
8832
+ const config = pageData == null ? void 0 : pageData.config;
8833
+ const uiSchema = pageData == null ? void 0 : pageData.uiSchema;
8834
+ const schema2 = (_b = pageData == null ? void 0 : pageData.schema) != null ? _b : { type: "object", properties: {} };
8835
+ eventGroups = {};
8836
+ eventGroups = extractEvents(config);
8825
8837
  executeEventsParameters = {
8826
8838
  config: {},
8827
8839
  componentName: "",
@@ -8829,6 +8841,7 @@ var service = (funcParams) => {
8829
8841
  dynamicData: funcParams.dynamicData,
8830
8842
  userValue: funcParams.userValue,
8831
8843
  service: funcParams.service,
8844
+ functionsProvider: funcParams.functionsProvider,
8832
8845
  serviceHolder: this,
8833
8846
  eventGroups
8834
8847
  };
@@ -8842,15 +8855,46 @@ var service = (funcParams) => {
8842
8855
  serviceHolder: this,
8843
8856
  eventGroups
8844
8857
  });
8858
+ funcParams.store.setSchema(
8859
+ (pre) => {
8860
+ return {
8861
+ ...schema2,
8862
+ properties: { ...schema2.properties, ...pre.properties }
8863
+ };
8864
+ }
8865
+ );
8866
+ uiSchema.elements.push(notifyUiSchema);
8867
+ funcParams.store.setUiSchema(uiSchema);
8845
8868
  },
8846
- onClick: async function() {
8847
- await this.callHandler("onClick");
8869
+ onCellRenderer: (cellParams) => {
8870
+ var _a;
8871
+ let finalResponse = {};
8872
+ const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[0];
8873
+ for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onCellRenderer[path]) {
8874
+ executeEventsParameters.store.functionParameters = cellParams;
8875
+ finalResponse = executeEvents({
8876
+ ...executeEventsParameters,
8877
+ config: eventConfig,
8878
+ componentName: path
8879
+ });
8880
+ }
8881
+ console.log("finalResponse >> >> >> ", finalResponse);
8882
+ return finalResponse;
8848
8883
  },
8849
- onFileDownload: async function() {
8850
- await this.callHandler("onDownload");
8884
+ onClick: function() {
8885
+ this.callHandler("onClick");
8851
8886
  },
8852
- onFileUpload: async function() {
8853
- await this.callHandler("onUpload");
8887
+ onMount: function() {
8888
+ this.callHandler("onMount");
8889
+ },
8890
+ onFileDownload: function() {
8891
+ this.callHandler("onDownload");
8892
+ },
8893
+ onFileUpload: function() {
8894
+ this.callHandler("onUpload");
8895
+ },
8896
+ backHandler: function() {
8897
+ funcParams.store.navigate(-1);
8854
8898
  },
8855
8899
  onPaginationChange: async function(paginationValues) {
8856
8900
  var _a;
@@ -8870,7 +8914,8 @@ var service = (funcParams) => {
8870
8914
  { key: "searchValue", value: param.serachValue },
8871
8915
  { key: "currentValue", value: param.currentValue }
8872
8916
  ];
8873
- return await this.updateConfigApiBody(param, apiBody);
8917
+ const response = await this.updateConfigApiBody(param, apiBody);
8918
+ return response == null ? void 0 : response.data;
8874
8919
  }
8875
8920
  },
8876
8921
  onChange: async function() {
@@ -8944,7 +8989,7 @@ var service = (funcParams) => {
8944
8989
  if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
8945
8990
  for (const eventConfig of (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path]) {
8946
8991
  executeEventsParameters.store.functionParameters = functionParameters;
8947
- await executeEvents({
8992
+ executeEvents({
8948
8993
  ...executeEventsParameters,
8949
8994
  config: eventConfig,
8950
8995
  componentName: path
@@ -8953,7 +8998,8 @@ var service = (funcParams) => {
8953
8998
  }
8954
8999
  },
8955
9000
  downloadFile: downloadFile$1,
8956
- download: doDownload
9001
+ download: doDownload,
9002
+ ...funcParams.functionsProvider
8957
9003
  };
8958
9004
  };
8959
9005
  var leaderBoard = {