impaktapps-ui-builder 0.0.281 → 0.0.283

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.
@@ -6089,6 +6089,7 @@ const componentBasicUiSchema = {
6089
6089
  { title: "Date", const: "Date" },
6090
6090
  { title: "CheckBox", const: "CheckBox" },
6091
6091
  { title: "Table", const: "Table" },
6092
+ { title: "Lazy Loading Table", const: "LazyLoadingTable" },
6092
6093
  { title: "Array", const: "Array" },
6093
6094
  { title: "Container", const: "WrapperSection" },
6094
6095
  { title: "Tabs", const: "TabSection" },
@@ -6382,6 +6383,7 @@ const CoreSection = {
6382
6383
  { title: "Date", const: "Date" },
6383
6384
  { title: "CheckBox", const: "CheckBox" },
6384
6385
  { title: "Table", const: "Table" },
6386
+ { title: "Lazy Loading Table", const: "LazyLoadingTable" },
6385
6387
  { title: "Array", const: "Array" },
6386
6388
  { title: "Container", const: "WrapperSection" },
6387
6389
  { title: "Tabs", const: "TabSection" },
@@ -6918,6 +6920,13 @@ const buildPropertiesSection = function(type) {
6918
6920
  uiSchema.elements = [
6919
6921
  getArrayControl("sectionLabels", "label")
6920
6922
  ];
6923
+ } else if (type === "Table" || type === "LazyLoadingTable") {
6924
+ uiSchema.elements = [
6925
+ getRadioInputField("SelectionAvailable", "Selection Available", ["YES", "NO"]),
6926
+ getRadioInputField("ColumnResizingAvailable", "ColumnResizing Available", ["YES", "NO"]),
6927
+ getRadioInputField("DragAvailable", "Drag Available", ["YES", "NO"]),
6928
+ EmptyBox
6929
+ ];
6921
6930
  } else if (type === "Radio") {
6922
6931
  uiSchema.elements = [
6923
6932
  getArrayControl("sectionLabels", "label", "Options Of Radio")
@@ -7146,7 +7155,8 @@ const ValidationSection = {
7146
7155
  const sectionLabels = {
7147
7156
  Select: ["Core", "Value", "style", "Event", "Validation"],
7148
7157
  MultipleSelect: ["Core", "Value", "style", "Event", "Validation"],
7149
- Table: ["Core", "Components", "style", "Event", "Validation"],
7158
+ Table: ["Core", "Components", "Properties", "style", "Event", "Validation"],
7159
+ LazyLoadingTable: ["Core", "Components", "Properties", "style", "Event", "Validation"],
7150
7160
  LeaderBoard: ["Core", "Components", "Properties", "style", "Event", "Validation"],
7151
7161
  WrapperSection: ["Core", "Components", "Properties", "style", "Validation"],
7152
7162
  TabSection: ["Core", "Components", "Properties", "style", "Validation"],
@@ -8249,12 +8259,51 @@ var Table = {
8249
8259
  }
8250
8260
  }
8251
8261
  };
8262
+ var lazyLoadingTable = {
8263
+ type: "Control",
8264
+ scope: "#/properties/LazyLoadingTable",
8265
+ options: {
8266
+ widget: "LazyLoadingTable"
8267
+ },
8268
+ elements: [],
8269
+ config: {
8270
+ main: {
8271
+ columns: {}
8272
+ }
8273
+ }
8274
+ };
8252
8275
  const buildTable = (config, componentScope) => {
8253
8276
  const table = _.cloneDeep(Table);
8254
8277
  table.scope = componentScope;
8255
8278
  if (config.style) {
8256
8279
  table.config.style = JSON.parse(config.style);
8257
8280
  }
8281
+ if (config.SelectionAvailable) {
8282
+ table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
8283
+ }
8284
+ if (config.ColumnResizingAvailable) {
8285
+ table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? true : false;
8286
+ }
8287
+ if (config.DragAvailable) {
8288
+ table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
8289
+ }
8290
+ return table;
8291
+ };
8292
+ const buildLazyLoadingTable = (config, componentScope) => {
8293
+ const table = _.cloneDeep(lazyLoadingTable);
8294
+ table.scope = componentScope;
8295
+ if (config.style) {
8296
+ table.config.style = JSON.parse(config.style);
8297
+ }
8298
+ if (config.SelectionAvailable) {
8299
+ table.config.main.Selection = config.SelectionAvailable === "YES" ? true : false;
8300
+ }
8301
+ if (config.ColumnResizingAvailable) {
8302
+ table.config.main.disableColumnResizing = config.ColumnResizingAvailable === "YES" ? false : true;
8303
+ }
8304
+ if (config.DragAvailable) {
8305
+ table.config.main.enableDrag = config.DragAvailable === "YES" ? true : false;
8306
+ }
8258
8307
  table.config.main.label = config.label;
8259
8308
  return table;
8260
8309
  };
@@ -8897,6 +8946,9 @@ const buildUiSchema = (config) => {
8897
8946
  case "Table":
8898
8947
  elements = buildTable(config, componentScope);
8899
8948
  break;
8949
+ case "LazyLoadingTable":
8950
+ elements = buildLazyLoadingTable(config, componentScope);
8951
+ break;
8900
8952
  case "Box":
8901
8953
  elements = buildLabel(config, componentScope);
8902
8954
  break;
@@ -9674,6 +9726,9 @@ const executeEvents = async (config, componentName2, store2, dynamicData2, userV
9674
9726
  eventGroups2,
9675
9727
  parentEventOutput2
9676
9728
  );
9729
+ if (config.returnResponse) {
9730
+ return response2;
9731
+ }
9677
9732
  LoadResponse = response2;
9678
9733
  nextEvent = events;
9679
9734
  } else {
@@ -9734,6 +9789,9 @@ const executetOnLoadEvent = async (config, componentName2, store2, dynamicData2,
9734
9789
  eventGroups2,
9735
9790
  parentEventOutput2
9736
9791
  );
9792
+ if (config.returnResponse) {
9793
+ return { response: response2 };
9794
+ }
9737
9795
  const SuccessEvent = config == null ? void 0 : config.events.filter((e) => e.eventType === "Success");
9738
9796
  const setEvent = SuccessEvent.length > 0 ? SuccessEvent : [{ Handler: "mergeFormdata", eventType: "Success", type: config.type }];
9739
9797
  return { response: response2, events: setEvent };
@@ -9813,6 +9871,9 @@ async function executeApiEventHandler(apiHandlerConfig, componentName2, store2,
9813
9871
  body2,
9814
9872
  headers2 && { headers: headers2 }
9815
9873
  );
9874
+ if (apiHandlerConfig.returnResponse) {
9875
+ return { response: response2 };
9876
+ }
9816
9877
  return { response: response2, events: apiHandlerConfig == null ? void 0 : apiHandlerConfig.events };
9817
9878
  }
9818
9879
  async function executeInBuiltFunctionHandler(refreshHandlerConfig, componentName, store, dynamicData, userValue, service, serviceHolder, parentEventOutput) {
@@ -9858,14 +9919,18 @@ const buildBodyFormat = (body2, formData, userValue2) => {
9858
9919
  const finalBody = { ...userValue2 == null ? void 0 : userValue2.payload };
9859
9920
  body2.map((elem) => {
9860
9921
  var _a, _b;
9861
- if ((_a = elem == null ? void 0 : elem.value) == null ? void 0 : _a.startsWith("$userValue")) {
9862
- const finalpath = elem.value.substring(11);
9863
- finalBody[elem.key] = _.get(userValue2, finalpath);
9864
- } else if ((_b = elem == null ? void 0 : elem.value) == null ? void 0 : _b.startsWith("$")) {
9865
- const finalpath = elem.value.substring(1);
9866
- finalBody[elem.key] = _.get(formData, finalpath);
9867
- } else {
9922
+ if ((elem == null ? void 0 : elem.value) !== "string") {
9868
9923
  finalBody[elem.key] = elem.value;
9924
+ } else {
9925
+ if ((_a = elem == null ? void 0 : elem.value) == null ? void 0 : _a.startsWith("$userValue")) {
9926
+ const finalpath = elem.value.substring(11);
9927
+ finalBody[elem.key] = _.get(userValue2, finalpath);
9928
+ } else if ((_b = elem == null ? void 0 : elem.value) == null ? void 0 : _b.startsWith("$")) {
9929
+ const finalpath = elem.value.substring(1);
9930
+ finalBody[elem.key] = _.get(formData, finalpath);
9931
+ } else {
9932
+ finalBody[elem.key] = elem.value;
9933
+ }
9869
9934
  }
9870
9935
  });
9871
9936
  return finalBody;
@@ -10004,6 +10069,37 @@ var service = (funcParams) => {
10004
10069
  );
10005
10070
  }
10006
10071
  },
10072
+ onPaginationChange: async (paginationValues) => {
10073
+ var _a;
10074
+ for (const eventConfig of eventGroups == null ? void 0 : eventGroups.onLoad[paginationValues.path]) {
10075
+ const bodyValues = [
10076
+ { key: "size", value: paginationValues.pagination.pageSize },
10077
+ { key: "start", value: paginationValues.pagination.pageIndex * paginationValues.pagination.pageSize },
10078
+ { key: "filters", value: paginationValues.columnFilters || [] },
10079
+ { key: "globalFilter", value: (_a = paginationValues.globalFilter) != null ? _a : "" }
10080
+ ];
10081
+ if (eventConfig.body) {
10082
+ eventConfig.returnResponse = true;
10083
+ eventConfig.body = [
10084
+ ...eventConfig.body,
10085
+ ...bodyValues
10086
+ ];
10087
+ } else {
10088
+ eventConfig.returnResponse = true;
10089
+ eventConfig.body = bodyValues;
10090
+ }
10091
+ await executeEvents(
10092
+ eventConfig,
10093
+ paginationValues.path,
10094
+ funcParams.store,
10095
+ funcParams.dynamicData,
10096
+ funcParams.userValue,
10097
+ funcParams.service,
10098
+ void 0,
10099
+ eventGroups
10100
+ );
10101
+ }
10102
+ },
10007
10103
  onChange: async function() {
10008
10104
  if (eventGroups.onChange) {
10009
10105
  const ChangeEventsKeysArray = Object.keys(eventGroups.onChange);