impaktapps-ui-builder 0.0.409-u → 0.0.409-w

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.409u",
3
+ "version": "0.0.409w",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -315,7 +315,24 @@ const buildUiSchema = (config: any) => {
315
315
  if (config?.type === "LeaderBoard") {
316
316
  return elements;
317
317
  }
318
- else if (config.type == "Table" || config.type == "ColumnGroup") {
318
+ else if (config.type == "ColumnGroup") {
319
+ const sizeMap = {}
320
+ if (config.sizeHolder) {
321
+ config.sizeHolder.map((e, i) => {
322
+ sizeMap[e.keyName] = e.value
323
+ });
324
+ }
325
+ elements.elements = config.elements.map((cellElem, elemInd) => {
326
+ return {
327
+ accessorKey: cellElem.name,
328
+ header: cellElem.label || cellElem.name,
329
+ size: sizeMap[cellElem.name] || 180,
330
+ type: cellElem.columnFormat,
331
+ elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
332
+ }
333
+ })
334
+ }
335
+ else if (config.type == "Table") {
319
336
  const sizeMap = {}
320
337
  if (config.sizeHolder) {
321
338
  config.sizeHolder.map((e, i) => {
@@ -48,7 +48,7 @@ export default {
48
48
  scope: "#/properties/programType",
49
49
  config: {
50
50
  main: {
51
- url: "$",
51
+ url: "https://www.svgrepo.com/show/500606/loading.svg",
52
52
  },
53
53
  style: {
54
54
  color: "#f5effc",
@@ -66,7 +66,7 @@ export const EventSchema = {
66
66
  oneOf: [
67
67
  { title: "RankProvider", const: "RankProvider" },
68
68
  { title: "Download File", const: "downloadFile" },
69
- { title: "Download", const: "download" }
69
+ { title: "Download", const: "download" },
70
70
  ]
71
71
  },
72
72
  body: {
@@ -30,4 +30,3 @@ export const doDownload = (response: any, service) => {
30
30
  link.click();
31
31
  link.parentNode.removeChild(link);
32
32
  };
33
-
@@ -1,16 +1,14 @@
1
1
  import _, { cloneDeep } from "lodash";
2
2
  import { handlersProps } from "./interface";
3
-
4
3
  export const executeEvents = (params: handlersProps) => {
5
4
  let nextEvent = [];
6
5
  let finalResponse = null;
7
6
 
8
7
  if (params.config.isSync !== "Yes") {
9
-
10
8
  return shouldEventExecute(params)
11
9
  .then((shouldExecute) => {
12
10
  if (!shouldExecute) {
13
- return { response: undefined, events: undefined };
11
+ throw new Error('onStart Event not allow to run Parent Events');
14
12
  }
15
13
  return executeEventsHandler(params);
16
14
  })
@@ -53,7 +51,7 @@ export const executeEvents = (params: handlersProps) => {
53
51
  }
54
52
  }
55
53
  return finalResponse;
56
- }
54
+ }
57
55
 
58
56
  function executeEventsHandler(params: handlersProps) {
59
57
  if (params.config.Handler === "api") {