impaktapps-ui-builder 0.0.287 → 0.0.289

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.
@@ -5879,16 +5879,70 @@ var _ = lodash.exports;
5879
5879
  const ComponentSchema = {
5880
5880
  type: "object",
5881
5881
  properties: {
5882
+ type: {
5883
+ type: "string",
5884
+ oneOf: [
5885
+ { title: "Select", const: "Select" },
5886
+ { title: "Date", const: "Date" },
5887
+ { title: "CheckBox", const: "CheckBox" },
5888
+ { title: "Table", const: "Table" },
5889
+ { title: "Lazy Loading Table", const: "LazyLoadingTable" },
5890
+ { title: "Array", const: "Array" },
5891
+ { title: "Container", const: "WrapperSection" },
5892
+ { title: "Tabs", const: "TabSection" },
5893
+ { title: "Text", const: "Text" },
5894
+ { title: "Text Area", const: "TextArea" },
5895
+ { title: "Button", const: "Button" },
5896
+ { title: "Card", const: "card" },
5897
+ { title: "Radio", const: "Radio" },
5898
+ { title: "Rank", const: "Rank" },
5899
+ { title: "SpeedoMeter", const: "SpeedoMeter" },
5900
+ { title: "ProgressBar", const: "ProgressBar" },
5901
+ { title: "Graph", const: "Graph" },
5902
+ { title: "Label", const: "Box" },
5903
+ { title: "Upload File", const: "UploadFile" },
5904
+ { title: "Download File", const: "DownloadFile" },
5905
+ { title: "Empty Box", const: "EmptyBox" },
5906
+ { title: "ProgressBar Card", const: "ProgressBarCard" },
5907
+ { title: "Rank Card", const: "RankCard" },
5908
+ { title: "Runner Boy Progress Bar", const: "RunnerBoyProgressBar" },
5909
+ { title: "Slider", const: "Slider" },
5910
+ { title: "Timer", const: "Timer" },
5911
+ { title: "MultipleSelect", const: "MultipleSelect" },
5912
+ { title: "LeaderBoard", const: "LeaderBoard" }
5913
+ ]
5914
+ },
5915
+ method: {
5916
+ type: "string",
5917
+ oneOf: [
5918
+ { title: "Get", const: "get" },
5919
+ { title: "Post", const: "post" },
5920
+ { title: "Delete", const: "delete" },
5921
+ { title: "Put", const: "put" }
5922
+ ]
5923
+ },
5882
5924
  layout: {
5883
5925
  type: "array",
5884
5926
  items: {
5885
5927
  type: "object",
5886
5928
  properties: {
5887
5929
  key: {
5888
- type: "string"
5930
+ type: "string",
5931
+ oneOf: [
5932
+ { title: "Extra Small", const: "xs" },
5933
+ { title: "Small", const: "sm" },
5934
+ { title: "Medium", const: "md" },
5935
+ { title: "Large", const: "lg" }
5936
+ ]
5889
5937
  },
5890
5938
  value: {
5891
- type: "string"
5939
+ type: "string",
5940
+ oneOf: [
5941
+ { title: "3", const: "3" },
5942
+ { title: "5.5", const: "5.5" },
5943
+ { title: "8", const: "8" },
5944
+ { title: "12", const: "12" }
5945
+ ]
5892
5946
  }
5893
5947
  }
5894
5948
  }
@@ -5980,13 +6034,44 @@ const ComponentSchema = {
5980
6034
  type: "string"
5981
6035
  },
5982
6036
  validationType: {
5983
- type: "string"
6037
+ type: "string",
6038
+ oneOf: [
6039
+ { const: "required", title: "Required" },
6040
+ { const: "minLength", title: "Minimum Length" },
6041
+ { const: "maxLength", title: "Maximum Length" },
6042
+ { const: "pattern", title: "Pattern" }
6043
+ ]
5984
6044
  },
5985
6045
  validationValue: {
5986
6046
  type: "string"
5987
6047
  }
5988
6048
  }
5989
6049
  }
6050
+ },
6051
+ buttonType: {
6052
+ type: "string",
6053
+ oneOf: [
6054
+ { title: "Button With Text", const: "Button" },
6055
+ { title: "Button With Icon", const: "IconButton" },
6056
+ { title: "Button With Icon and Text", const: "ButtonWithIconAndText" }
6057
+ ]
6058
+ },
6059
+ defaultStyle: {
6060
+ type: "string",
6061
+ oneOf: [
6062
+ { title: "Apply Default Style", const: "true" },
6063
+ { title: "No Style", const: "false" }
6064
+ ]
6065
+ },
6066
+ graphType: {
6067
+ type: "string",
6068
+ oneOf: [
6069
+ { title: "Bar Graph", const: "BarGraph" },
6070
+ { title: "Stack Bar Graph", const: "StackBarGraph" },
6071
+ { title: "Line Graph", const: "LineGraph" },
6072
+ { title: "Pie Graph", const: "PieGraph" },
6073
+ { title: "Horizontal Bar Graph", const: "HorizontalBarGraph" }
6074
+ ]
5990
6075
  }
5991
6076
  }
5992
6077
  };
@@ -6377,37 +6462,7 @@ const CoreSection = {
6377
6462
  layout: { xs: 12, sm: 12, md: 6, lg: 6 },
6378
6463
  main: {
6379
6464
  label: "Type",
6380
- type: "text",
6381
- options: [
6382
- { title: "Select", const: "Select" },
6383
- { title: "Date", const: "Date" },
6384
- { title: "CheckBox", const: "CheckBox" },
6385
- { title: "Table", const: "Table" },
6386
- { title: "Lazy Loading Table", const: "LazyLoadingTable" },
6387
- { title: "Array", const: "Array" },
6388
- { title: "Container", const: "WrapperSection" },
6389
- { title: "Tabs", const: "TabSection" },
6390
- { title: "Text", const: "Text" },
6391
- { title: "Text Area", const: "TextArea" },
6392
- { title: "Button", const: "Button" },
6393
- { title: "Card", const: "card" },
6394
- { title: "Radio", const: "Radio" },
6395
- { title: "Rank", const: "Rank" },
6396
- { title: "SpeedoMeter", const: "SpeedoMeter" },
6397
- { title: "ProgressBar", const: "ProgressBar" },
6398
- { title: "Graph", const: "Graph" },
6399
- { title: "Label", const: "Box" },
6400
- { title: "Upload File", const: "UploadFile" },
6401
- { title: "Download File", const: "DownloadFile" },
6402
- { title: "Empty Box", const: "EmptyBox" },
6403
- { title: "ProgressBar Card", const: "ProgressBarCard" },
6404
- { title: "Rank Card", const: "RankCard" },
6405
- { title: "Runner Boy Progress Bar", const: "RunnerBoyProgressBar" },
6406
- { title: "Slider", const: "Slider" },
6407
- { title: "Timer", const: "Timer" },
6408
- { title: "MultipleSelect", const: "MultipleSelect" },
6409
- { title: "LeaderBoard", const: "LeaderBoard" }
6410
- ]
6465
+ type: "text"
6411
6466
  }
6412
6467
  }
6413
6468
  },
@@ -6480,13 +6535,7 @@ const CoreSection = {
6480
6535
  lg: 5.5
6481
6536
  },
6482
6537
  main: {
6483
- label: "Screen Size",
6484
- options: [
6485
- { title: "Extra Small", const: "xs" },
6486
- { title: "Small", const: "sm" },
6487
- { title: "Medium", const: "md" },
6488
- { title: "Large", const: "lg" }
6489
- ]
6538
+ label: "Screen Size"
6490
6539
  }
6491
6540
  }
6492
6541
  },
@@ -6504,13 +6553,7 @@ const CoreSection = {
6504
6553
  lg: 5.5
6505
6554
  },
6506
6555
  main: {
6507
- label: "Value",
6508
- options: [
6509
- { title: "3", const: "3" },
6510
- { title: "5.5", const: "5.5" },
6511
- { title: "8", const: "8" },
6512
- { title: "12", const: "12" }
6513
- ]
6556
+ label: "Value"
6514
6557
  }
6515
6558
  }
6516
6559
  }
@@ -6867,12 +6910,6 @@ const buildPropertiesSection = function(type) {
6867
6910
  uiSchema.elements = [heading, bottomLabel_1, bottomLabel_2, bottomLabel_3];
6868
6911
  } else if (type === "card") {
6869
6912
  uiSchema.elements = [getInputField("url", "Image Url"), getInputField("label", "Label"), getInputField("description", "Description")];
6870
- } else if (type === "Box") {
6871
- const iconName = getInputField("value", "Value");
6872
- uiSchema.elements = [getSelectField("graphType", "Label Type", [
6873
- { label: "URL", value: "url" },
6874
- { label: "Heading", value: "heading" }
6875
- ]), iconName];
6876
6913
  } else if (type === "Button") {
6877
6914
  const caption = getInputField("color", "Color");
6878
6915
  const size = getInputField("size", "Size");
@@ -7130,13 +7167,7 @@ const ValidationSection = {
7130
7167
  lg: 5.5
7131
7168
  },
7132
7169
  main: {
7133
- label: "Validation Type",
7134
- options: [
7135
- { const: "required", title: "Required" },
7136
- { const: "minLength", title: "Minimum Length" },
7137
- { const: "maxLength", title: "Maximum Length" },
7138
- { const: "pattern", title: "Pattern" }
7139
- ]
7170
+ label: "Validation Type"
7140
7171
  }
7141
7172
  }
7142
7173
  },
@@ -7177,7 +7208,7 @@ const sectionLabels = {
7177
7208
  UploadFile: ["Core", "style", "Event", "Validation"],
7178
7209
  Graph: ["Core", "Properties", "style", "Event", "Validation"],
7179
7210
  DownloadFile: ["Core", "style", "Event", "Validation"],
7180
- Box: ["Core", "Properties", "style", "Event", "Validation"],
7211
+ Box: ["Core", "style", "Event", "Validation"],
7181
7212
  Properties: ["Core", "Properties", "style", "Event", "Validation"],
7182
7213
  ProgressBarCard: ["Core", "Properties", "style", "Event", "Validation"],
7183
7214
  RankCard: ["Core", "Properties", "style", "Event", "Validation"],
@@ -9167,6 +9198,15 @@ const EventSchema = {
9167
9198
  }
9168
9199
  }
9169
9200
  },
9201
+ method: {
9202
+ type: "string",
9203
+ oneOf: [
9204
+ { title: "Get", const: "get" },
9205
+ { title: "Post", const: "post" },
9206
+ { title: "Delete", const: "delete" },
9207
+ { title: "Put", const: "put" }
9208
+ ]
9209
+ },
9170
9210
  refreshElements: {
9171
9211
  type: "array",
9172
9212
  items: {
@@ -9178,6 +9218,33 @@ const EventSchema = {
9178
9218
  }
9179
9219
  }
9180
9220
  },
9221
+ eventType: {
9222
+ type: "string",
9223
+ oneOf: [
9224
+ { title: "Click Event", const: "onClick" },
9225
+ { title: "onStart", const: "onStart" },
9226
+ { title: "Load Event", const: "onLoad" },
9227
+ { title: "Change Event", const: "onChange" },
9228
+ { title: "Success", const: "Success" },
9229
+ { title: "Fail", const: "Fail" }
9230
+ ]
9231
+ },
9232
+ Handler: {
9233
+ type: "string",
9234
+ oneOf: [
9235
+ { title: "Custom", const: "custom" },
9236
+ { title: "Api", const: "api" },
9237
+ { title: "Inbuilt Function", const: "inBuiltFunction" },
9238
+ { title: "Refresh", const: "refresh" }
9239
+ ]
9240
+ },
9241
+ inBuiltFunctionType: {
9242
+ type: "string",
9243
+ oneOf: [
9244
+ { title: "RankProvider", const: "RankProvider" },
9245
+ { title: "Download File", const: "downloadFile" }
9246
+ ]
9247
+ },
9181
9248
  body: {
9182
9249
  type: "array",
9183
9250
  items: {
@@ -9288,15 +9355,7 @@ const EventUiSchema = {
9288
9355
  layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
9289
9356
  main: {
9290
9357
  label: "Event Type",
9291
- type: "text",
9292
- options: [
9293
- { label: "Click Event", value: "onClick" },
9294
- { label: "onStart", value: "onStart" },
9295
- { label: "Load Event", value: "onLoad" },
9296
- { label: "Change Event", value: "onChange" },
9297
- { label: "Success", value: "Success" },
9298
- { label: "Fail", value: "Fail" }
9299
- ]
9358
+ type: "text"
9300
9359
  }
9301
9360
  }
9302
9361
  },
@@ -9489,13 +9548,7 @@ const APISection = {
9489
9548
  layout: { xs: 11, sm: 11, md: 5.5, lg: 5.5 },
9490
9549
  main: {
9491
9550
  label: "Method",
9492
- type: "text",
9493
- options: [
9494
- { title: "Get", const: "get" },
9495
- { title: "Post", const: "post" },
9496
- { title: "Delete", const: "delete" },
9497
- { title: "Put", const: "put" }
9498
- ]
9551
+ type: "text"
9499
9552
  }
9500
9553
  }
9501
9554
  },
@@ -9739,16 +9792,16 @@ const downloadFile = (obj) => {
9739
9792
  const executeEvents = async (params2) => {
9740
9793
  var _a, _b, _c;
9741
9794
  let nextEvent = [];
9742
- let LoadResponse = null;
9795
+ let finalResponse = null;
9743
9796
  try {
9744
9797
  if (!shouldEventExecute(params2)) {
9745
9798
  return { response: void 0, events: void 0 };
9746
9799
  }
9747
9800
  const response2 = await executeEventsHandler(params2);
9748
- LoadResponse = response2;
9801
+ finalResponse = response2;
9749
9802
  const SuccessEvent = (_a = params2.config) == null ? void 0 : _a.events.filter((e) => e.eventType === "Success");
9750
9803
  if (params2.config.returnNeeded) {
9751
- return LoadResponse;
9804
+ return finalResponse;
9752
9805
  }
9753
9806
  nextEvent = SuccessEvent;
9754
9807
  } catch (err) {
@@ -9758,10 +9811,10 @@ const executeEvents = async (params2) => {
9758
9811
  }
9759
9812
  if ((nextEvent == null ? void 0 : nextEvent.length) > 0) {
9760
9813
  for (const actionConfig of nextEvent) {
9761
- await executeEvents({ ...params2, config: actionConfig, parentEventOutput: LoadResponse });
9814
+ await executeEvents({ ...params2, config: actionConfig, parentEventOutput: finalResponse });
9762
9815
  }
9763
9816
  }
9764
- return LoadResponse;
9817
+ return finalResponse;
9765
9818
  };
9766
9819
  async function executeEventsHandler(params2) {
9767
9820
  if (params2.config.Handler === "api") {
@@ -9832,6 +9885,23 @@ async function mergeFormdata(handlerResponse, componentName, eventConfig, store2
9832
9885
  }
9833
9886
  };
9834
9887
  });
9888
+ } else if (eventConfig.type = !(_.isEmpty(handlerResponse) && handlerResponse)) {
9889
+ store2.setSchema((pre) => {
9890
+ var _a;
9891
+ return {
9892
+ ...pre,
9893
+ properties: {
9894
+ ...pre.properties,
9895
+ [componentName]: {
9896
+ ...(_a = pre.properties) == null ? void 0 : _a[componentName],
9897
+ type: "array",
9898
+ items: {
9899
+ oneOf: handlerResponse.data
9900
+ }
9901
+ }
9902
+ }
9903
+ };
9904
+ });
9835
9905
  } else if (eventConfig.type === "page") {
9836
9906
  store2.setFormdata((pre) => {
9837
9907
  return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };