impaktapps-ui-builder 0.0.409-m → 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) {
@@ -8369,6 +8369,18 @@ const refreshSectionUiSchema = {
8369
8369
  }
8370
8370
  ]
8371
8371
  };
8372
+ var emptyBox = {
8373
+ type: "Control",
8374
+ scope: "#/properties/emptyBox",
8375
+ options: {
8376
+ widget: "EmptyBox"
8377
+ },
8378
+ config: {
8379
+ layout: { xs: 12, sm: 12, md: 5.5, lg: 5.5 },
8380
+ main: {},
8381
+ style: {}
8382
+ }
8383
+ };
8372
8384
  var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
8373
8385
  return {
8374
8386
  setPage: async function() {
@@ -8384,7 +8396,8 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
8384
8396
  if (handlerType) {
8385
8397
  if (handlerType === "custom") {
8386
8398
  uiSchema.elements[1].elements[0].elements[2] = getRadioInputField("isSync", "Run in Sync", ["Yes", "No"]);
8387
- uiSchema.elements[1].elements[0].elements[3] = getTextArea("eventCode", "Write Custom Code", false);
8399
+ uiSchema.elements[1].elements[0].elements[3] = emptyBox;
8400
+ uiSchema.elements[1].elements[0].elements[4] = getTextArea("eventCode", "Write Custom Code", false);
8388
8401
  schema2.required = ["eventType", "Handler", "eventCode"];
8389
8402
  } else if (handlerType === "api") {
8390
8403
  uiSchema.elements[1].elements[0].elements[2] = APISection;
@@ -8729,16 +8742,6 @@ function buildApiPayload(compConfig, body, headers, store, dynamicData, userValu
8729
8742
  }
8730
8743
  return promiseChain;
8731
8744
  }
8732
- function asyncOperation() {
8733
- return new Promise((resolve, reject) => {
8734
- setTimeout(() => {
8735
- {
8736
- resolve("Operation completed successfully!");
8737
- reject(new Error("Operation failed!"));
8738
- }
8739
- }, 50);
8740
- });
8741
- }
8742
8745
  let compType;
8743
8746
  let eventGroups = {};
8744
8747
  const notifyUiSchema = {
@@ -8783,8 +8786,6 @@ const extractEvents = (eventConfig) => {
8783
8786
  return eventGroups;
8784
8787
  };
8785
8788
  var service = (funcParams) => {
8786
- eventGroups = {};
8787
- eventGroups = extractEvents(funcParams.config);
8788
8789
  let executeEventsParameters = {
8789
8790
  config: {},
8790
8791
  componentName: "",
@@ -8792,23 +8793,47 @@ var service = (funcParams) => {
8792
8793
  dynamicData: funcParams.dynamicData,
8793
8794
  userValue: funcParams.userValue,
8794
8795
  service: funcParams.service,
8795
- serviceHolder: { downloadFile: downloadFile$1, download: doDownload },
8796
- eventGroups
8796
+ serviceHolder: { downloadFile: downloadFile$1, download: doDownload, ...funcParams.functionsProvider },
8797
+ eventGroups,
8798
+ functionsProvider: funcParams.functionsProvider
8797
8799
  };
8798
8800
  return {
8799
8801
  setPage: async function() {
8802
+ var _a, _b;
8800
8803
  funcParams.store.setFormdata({});
8801
- funcParams.store.setSchema(
8802
- (pre) => {
8803
- return {
8804
- ...funcParams.schema,
8805
- properties: { ...funcParams.schema.properties, ...pre.properties }
8806
- };
8807
- }
8808
- );
8809
- funcParams.uiSchema.elements.push(notifyUiSchema);
8810
- funcParams.store.setUiSchema(funcParams.uiSchema);
8811
- 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);
8812
8837
  executeEventsParameters = {
8813
8838
  config: {},
8814
8839
  componentName: "",
@@ -8816,6 +8841,7 @@ var service = (funcParams) => {
8816
8841
  dynamicData: funcParams.dynamicData,
8817
8842
  userValue: funcParams.userValue,
8818
8843
  service: funcParams.service,
8844
+ functionsProvider: funcParams.functionsProvider,
8819
8845
  serviceHolder: this,
8820
8846
  eventGroups
8821
8847
  };
@@ -8829,15 +8855,46 @@ var service = (funcParams) => {
8829
8855
  serviceHolder: this,
8830
8856
  eventGroups
8831
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);
8868
+ },
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;
8883
+ },
8884
+ onClick: function() {
8885
+ this.callHandler("onClick");
8832
8886
  },
8833
- onClick: async function() {
8834
- await this.callHandler("onClick");
8887
+ onMount: function() {
8888
+ this.callHandler("onMount");
8835
8889
  },
8836
- onFileDownload: async function() {
8837
- await this.callHandler("onDownload");
8890
+ onFileDownload: function() {
8891
+ this.callHandler("onDownload");
8838
8892
  },
8839
- onFileUpload: async function() {
8840
- await this.callHandler("onUpload");
8893
+ onFileUpload: function() {
8894
+ this.callHandler("onUpload");
8895
+ },
8896
+ backHandler: function() {
8897
+ funcParams.store.navigate(-1);
8841
8898
  },
8842
8899
  onPaginationChange: async function(paginationValues) {
8843
8900
  var _a;
@@ -8857,7 +8914,8 @@ var service = (funcParams) => {
8857
8914
  { key: "searchValue", value: param.serachValue },
8858
8915
  { key: "currentValue", value: param.currentValue }
8859
8916
  ];
8860
- return await this.updateConfigApiBody(param, apiBody);
8917
+ const response = await this.updateConfigApiBody(param, apiBody);
8918
+ return response == null ? void 0 : response.data;
8861
8919
  }
8862
8920
  },
8863
8921
  onChange: async function() {
@@ -8931,7 +8989,7 @@ var service = (funcParams) => {
8931
8989
  if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
8932
8990
  for (const eventConfig of (_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path]) {
8933
8991
  executeEventsParameters.store.functionParameters = functionParameters;
8934
- await executeEvents({
8992
+ executeEvents({
8935
8993
  ...executeEventsParameters,
8936
8994
  config: eventConfig,
8937
8995
  componentName: path
@@ -8940,7 +8998,8 @@ var service = (funcParams) => {
8940
8998
  }
8941
8999
  },
8942
9000
  downloadFile: downloadFile$1,
8943
- download: doDownload
9001
+ download: doDownload,
9002
+ ...funcParams.functionsProvider
8944
9003
  };
8945
9004
  };
8946
9005
  var leaderBoard = {
@@ -10583,18 +10642,6 @@ const buildRadio = (config, componentScope) => {
10583
10642
  }
10584
10643
  return Radio;
10585
10644
  };
10586
- var emptyBox = {
10587
- type: "Control",
10588
- scope: "#/properties/emptyBox",
10589
- options: {
10590
- widget: "EmptyBox"
10591
- },
10592
- config: {
10593
- layout: { xs: 12, sm: 12, md: 5.5, lg: 5.5 },
10594
- main: {},
10595
- style: {}
10596
- }
10597
- };
10598
10645
  const buildEmptyBox = (config, componentScope) => {
10599
10646
  const EmptyBox2 = _.cloneDeep(emptyBox);
10600
10647
  if (config.layout) {