impaktapps-ui-builder 0.0.591 → 0.0.592-alpha.10

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.
Files changed (47) hide show
  1. package/dist/impaktapps-ui-builder.es.js +384 -300
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +15 -15
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildCard.d.ts +1 -1
  6. package/dist/src/impaktapps-ui-builder/builder/build/buildUiSchema.d.ts +1 -1
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.d.ts +2 -0
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +104 -83
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/graph.d.ts +0 -1
  10. package/dist/src/impaktapps-ui-builder/builder/build/uischema/validationSections.d.ts +1 -1
  11. package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +4 -4
  12. package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -1
  13. package/package.json +1 -1
  14. package/src/impaktapps-ui-builder/builder/build/buildCard.ts +6 -6
  15. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
  16. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +4 -0
  17. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +3 -1
  18. package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +1 -1
  19. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
  20. package/src/impaktapps-ui-builder/builder/build/buildSchema.ts +1 -1
  21. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +3 -0
  22. package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +8 -7
  23. package/src/impaktapps-ui-builder/builder/build/uischema/apiSection.ts +10 -10
  24. package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +65 -47
  25. package/src/impaktapps-ui-builder/builder/build/uischema/card.ts +132 -90
  26. package/src/impaktapps-ui-builder/builder/build/uischema/coreSection.ts +11 -11
  27. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +3 -3
  28. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -2
  29. package/src/impaktapps-ui-builder/builder/build/uischema/graph.ts +0 -1
  30. package/src/impaktapps-ui-builder/builder/build/uischema/leaderBoard.ts +6 -7
  31. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
  32. package/src/impaktapps-ui-builder/builder/build/uischema/refresh.ts +3 -3
  33. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
  34. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
  35. package/src/impaktapps-ui-builder/builder/build/uischema/validationSections.ts +3 -3
  36. package/src/impaktapps-ui-builder/builder/build/uischema/valueTab.ts +3 -3
  37. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +1 -0
  38. package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +15 -31
  39. package/src/impaktapps-ui-builder/builder/elements/UiSchema/PageMaster/uiSchema.ts +18 -11
  40. package/src/impaktapps-ui-builder/builder/elements/UiSchema/event/uiSchema.ts +7 -16
  41. package/src/impaktapps-ui-builder/builder/services/component.ts +15 -22
  42. package/src/impaktapps-ui-builder/builder/services/event.ts +33 -7
  43. package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +12 -12
  44. package/src/impaktapps-ui-builder/builder/services/utils.ts +12 -12
  45. package/src/impaktapps-ui-builder/lib/index.ts +1 -1
  46. package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -1
  47. package/src/impaktapps-ui-builder/runtime/services/service.ts +7 -5
@@ -1 +1 @@
1
- export declare const buildCard: (config: any, componentScope: any) => any;
1
+ export declare const buildCard: (config: any, componentScope: any, store: any) => any;
@@ -8,5 +8,5 @@ export declare const buildSchema: (config: any, tableName?: string, isArrayType?
8
8
  properties: {};
9
9
  required: any[];
10
10
  };
11
- declare const buildUiSchema: (config: any) => any;
11
+ declare const buildUiSchema: (config: any, store?: any) => any;
12
12
  export default buildUiSchema;
@@ -27,6 +27,8 @@ export declare const buildWrapper: (label: string, elements: any[]) => {
27
27
  wrapperStyle: {
28
28
  marginTop: string;
29
29
  marginBottom: string;
30
+ marginLeft: string;
31
+ width: string;
30
32
  };
31
33
  componentsBoxStyle: {
32
34
  marginLeft: string;
@@ -1,20 +1,23 @@
1
- declare const _default: {
1
+ export default function Card(theme: any): {
2
2
  type: string;
3
3
  config: {
4
- main: {
5
- rowSpacing: number;
6
- };
4
+ main: {};
5
+ wrapperStyle: {};
7
6
  componentsBoxStyle: {
8
- position: string;
9
- color: string;
10
- height: {
11
- xs: string;
12
- md: string;
13
- };
7
+ flexDirection: string;
8
+ flexWrap: string;
14
9
  width: string;
15
- textAlign: string;
16
10
  background: string;
11
+ border: string;
17
12
  borderRadius: string;
13
+ padding: string;
14
+ "&: hover": {
15
+ background: string;
16
+ border: string;
17
+ "& p": {
18
+ color: string;
19
+ };
20
+ };
18
21
  };
19
22
  layout: {
20
23
  xs: number;
@@ -25,94 +28,112 @@ declare const _default: {
25
28
  };
26
29
  elements: ({
27
30
  type: string;
28
- scope: string;
29
31
  config: {
30
- main: {
31
- heading: string;
32
- url?: undefined;
33
- };
34
- style: {
35
- position: string;
36
- left: string;
37
- top: string;
38
- color: string;
39
- height: string;
40
- display: string;
41
- fontSize: {
42
- xs: string;
43
- md: string;
44
- };
45
- alignItems: string;
46
- background: string;
47
- justifyContent: string;
48
- objectFit?: undefined;
49
- right?: undefined;
50
- width?: undefined;
51
- padding?: undefined;
52
- };
53
32
  layout: number;
33
+ main?: undefined;
34
+ style?: undefined;
54
35
  };
55
- options: {
56
- widget: string;
57
- };
58
- } | {
59
- type: string;
60
- scope: string;
61
- config: {
62
- main: {
63
- url: string;
64
- heading?: undefined;
65
- };
66
- style: {
67
- color: string;
68
- objectFit: string;
69
- position: string;
70
- top: string;
71
- right: string;
72
- height: string;
73
- width: string;
74
- display: string;
75
- fontSize: string;
76
- alignItems: string;
77
- background: string;
78
- padding: string;
79
- justifyContent: string;
80
- left?: undefined;
36
+ elements: {
37
+ type: string;
38
+ config: {
39
+ main: {
40
+ columnSpacing: number;
41
+ gap: number;
42
+ };
43
+ wrapperStyle: {
44
+ marginTop: string;
45
+ background: string;
46
+ };
47
+ componentsBoxStyle: {
48
+ flexDirection: string;
49
+ flexWrap: string;
50
+ width: string;
51
+ height: string;
52
+ background: string;
53
+ borderRadius: string;
54
+ };
55
+ layout: number;
81
56
  };
82
- layout: number;
83
- };
84
- options: {
85
- widget: string;
86
- };
57
+ elements: ({
58
+ type: string;
59
+ scope: string;
60
+ config: {
61
+ main: {
62
+ heading: string;
63
+ };
64
+ style: {
65
+ color: string;
66
+ display: string;
67
+ fontSize: {
68
+ xs: string;
69
+ md: string;
70
+ };
71
+ fontWeight: string;
72
+ background: string;
73
+ justifyContent: string;
74
+ width: string;
75
+ margin: string;
76
+ textWrap?: undefined;
77
+ lineHeight?: undefined;
78
+ };
79
+ layout: number;
80
+ };
81
+ options: {
82
+ widget: string;
83
+ };
84
+ } | {
85
+ type: string;
86
+ scope: string;
87
+ config: {
88
+ main: {
89
+ heading: string;
90
+ };
91
+ style: {
92
+ color: string;
93
+ fontSize: string;
94
+ justifyContent: string;
95
+ textWrap: string;
96
+ background: string;
97
+ width: string;
98
+ margin: string;
99
+ lineHeight: string;
100
+ display?: undefined;
101
+ fontWeight?: undefined;
102
+ };
103
+ layout: number;
104
+ };
105
+ options: {
106
+ widget: string;
107
+ };
108
+ })[];
109
+ }[];
110
+ scope?: undefined;
111
+ options?: undefined;
87
112
  } | {
88
113
  type: string;
89
114
  scope: string;
90
115
  config: {
91
116
  main: {
92
- heading: string;
93
- url?: undefined;
117
+ url: string;
94
118
  };
95
119
  style: {
96
- position: string;
97
- top: string;
98
- alignItems: string;
99
- color: string;
100
- fontSize: string;
101
- left: string;
102
- background: string;
103
- justifyContent: string;
104
- height?: undefined;
105
- display?: undefined;
106
- objectFit?: undefined;
107
- right?: undefined;
108
- width?: undefined;
109
- padding?: undefined;
120
+ containerStyle: {
121
+ height: string;
122
+ display: string;
123
+ justifyContent: string;
124
+ };
125
+ imageStyle: {
126
+ height: string;
127
+ fontSize: string;
128
+ padding: string;
129
+ marginLeft: string;
130
+ };
110
131
  };
111
132
  layout: number;
112
133
  };
113
134
  options: {
114
135
  widget: string;
115
136
  };
137
+ elements?: undefined;
116
138
  })[];
117
139
  };
118
- export default _default;
@@ -46,7 +46,6 @@ export declare const LineGraph: {
46
46
  hideBottomAxisLine: boolean;
47
47
  legend: {
48
48
  labelColor: string;
49
- legendTitle: string;
50
49
  direction: string;
51
50
  align: string;
52
51
  colorRectWidth: number;
@@ -35,7 +35,7 @@ export declare const ValidationSection: {
35
35
  layout: {
36
36
  xs: number;
37
37
  sm: number;
38
- md?: undefined;
38
+ md: number;
39
39
  lg?: undefined;
40
40
  };
41
41
  main?: undefined;
@@ -1,10 +1,10 @@
1
- declare const clearFromLocalStorage: () => void;
2
- export default clearFromLocalStorage;
1
+ declare const clearFromSessionStorage: () => void;
2
+ export default clearFromSessionStorage;
3
3
  export declare const getNavigationHistory: (config: any, path: string | undefined) => {
4
4
  pageName: string;
5
5
  };
6
- export declare const saveFormdataInLocalStorage: (formData: any, path?: string) => any;
7
- export declare const getFormdataFromLocalStorage: (path?: string) => any;
6
+ export declare const saveFormdataInSessionStorage: (formData: any, path?: string) => any;
7
+ export declare const getFormdataFromSessionStorage: (path?: string) => any;
8
8
  export declare function saveHandler(store: any, service: any, submitHandler: any, pageName?: string): Promise<void>;
9
9
  export declare const navigateHandler: (store: any, isSubmitted: any, pageName?: string | boolean) => void;
10
10
  export declare function okHandler(store: any): void;
@@ -6,4 +6,4 @@ export { schema } from "../builder/build/buildUiSchema";
6
6
  export { default as buildConfig } from "../builder/build/buildConfig";
7
7
  export { default as buildUiSchema } from "../builder/build/buildUiSchema";
8
8
  export { buildSchema } from "../builder/build/buildUiSchema";
9
- export { default as clearFromLocalStorage } from "../builder/services/utils";
9
+ export { default as clearFromSessionStorage } from "../builder/services/utils";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.591",
3
+ "version": "0.0.592-alpha.10",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -2,25 +2,25 @@ import Card from "./uischema/card";
2
2
  import _ from "lodash";
3
3
  import { createLayoutFormat } from "./buildConfig";
4
4
 
5
- export const buildCard = (config,componentScope) =>{
6
- const card: any = _.cloneDeep(Card);
5
+ export const buildCard = (config,componentScope,store) =>{
6
+ const card: any = _.cloneDeep(Card(store.theme.myTheme));
7
7
  if (config.style) {
8
8
  card.config.style = JSON.parse(config.style)
9
9
  }
10
- card.elements[0].scope = `#/properties/${config.name}/properties/value`
10
+ card.elements[0].elements[0].elements[0].scope = `#/properties/${config.name}/properties/value`
11
11
  card.elements[1].scope = `#/properties/${config.name}/properties/url`
12
- card.elements[2].scope = `#/properties/${config.name}/properties/description`
12
+ card.elements[0].elements[0].elements[1].scope = `#/properties/${config.name}/properties/description`
13
13
  if(config.layout){
14
14
  card.config.layout = createLayoutFormat(config.layout)
15
15
  }
16
16
  if(config.label){
17
- card.elements[0].config.main.heading = config.label;
17
+ card.elements[0].elements[0].elements[0].config.main.heading = config.label;
18
18
  }
19
19
  if(config.url){
20
20
  card.elements[1].config.main.url = config.url;
21
21
  }
22
22
  if(config.description){
23
- card.elements[2].config.main.heading = config.description;
23
+ card.elements[0].elements[0].elements[1].config.main.heading = config.description;
24
24
  }
25
25
 
26
26
 
@@ -8,7 +8,7 @@ const FileInput = {
8
8
  widget: "FileInputField",
9
9
  },
10
10
  config: {
11
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
11
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
12
12
  main: {
13
13
  required: false,
14
14
  onUpload: "onFileUpload",
@@ -9,11 +9,15 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
9
9
  if (config.layout) {
10
10
  horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
11
11
  }
12
+ horizontalBarGraph.config.main.type = config.graphType;
12
13
  horizontalBarGraph.scope = componentScope;
13
14
  horizontalBarGraph.config.main.header = config.heading;
14
15
  if (config.barColor) {
15
16
  horizontalBarGraph.config.barStyle.color = config.barColor;
16
17
  }
18
+ if (config.xAxisValue) {
19
+ horizontalBarGraph.config.main.xAxisValue = config.xAxisValue;
20
+ }
17
21
  if (config.containerBackground) {
18
22
  horizontalBarGraph.config.containerStyle.background =
19
23
  config.containerBackground;
@@ -24,7 +24,9 @@ export const buildPieGraph = (config, componentScope) => {
24
24
  if (config.legendLabels) {
25
25
  pieGraph.config.main.tooltipDataKey = flatObjectValueInArray(config.legendLabels);
26
26
  }
27
-
27
+ if (config.xAxisValue) {
28
+ pieGraph.config.main.xAxisValue = config.xAxisValue;
29
+ }
28
30
  if (config.pieArcColors) {
29
31
  pieGraph.config.style = {
30
32
  pieStyle: {
@@ -8,7 +8,7 @@ export const buildProgressBar = (config:any,componentScope:any) =>{
8
8
  if (config.layout) {
9
9
  ProgressBar.config.layout = config.layout;
10
10
  }
11
- ProgressBar.config.main.heading = config.heading;
11
+ ProgressBar.config.main.heading = config.label;
12
12
  if (config.bottomLabel_3) {
13
13
  ProgressBar.config.main.bottomLabel_3 = config.bottomLabel_3;
14
14
  }
@@ -9,7 +9,7 @@ const RadioUiSchema = {
9
9
  widget: "RadioInputField",
10
10
  },
11
11
  config: {
12
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
12
+ layout: { xs: 12, sm: 6, md: 4, lg: 4 },
13
13
  main: {
14
14
  label: "Enabled",
15
15
  options: ["YES", "NO"],
@@ -25,7 +25,7 @@ export const buildSchema = (config: any) => {
25
25
 
26
26
  }
27
27
  buildRule(config)
28
- window.localStorage.setItem("schemaDemo",JSON.stringify(schema))
28
+ window.sessionStorage.setItem("schemaDemo",JSON.stringify(schema))
29
29
  return schema;
30
30
  };
31
31
  export default buildSchema;
@@ -15,6 +15,9 @@ export const buildStackbarGraph = (config:any,componentScope:string) => {
15
15
  if (config.barColor) {
16
16
  barGraph.config.barStyle.color = config.barColor;
17
17
  }
18
+ if (config.xAxisValue) {
19
+ barGraph.config.main.xAxisValue = config.xAxisValue;
20
+ }
18
21
  if (config.height) {
19
22
  barGraph.config.style.containerStyle.height = config.height;
20
23
  }
@@ -165,7 +165,7 @@ export const buildSchema = (config: any, tableName?: string, isArrayType?: boole
165
165
  }
166
166
 
167
167
 
168
- const buildUiSchema = (config: any) => {
168
+ const buildUiSchema = (config: any, store?: any) => {
169
169
  let elements: any = {};
170
170
  const componentScope = `#/properties/${config.name}`;
171
171
  switch (config.type) {
@@ -249,7 +249,7 @@ const buildUiSchema = (config: any) => {
249
249
  elements = buildEmptyBox(config, componentScope);
250
250
  break;
251
251
  case "card":
252
- elements = buildCard(config, componentScope);
252
+ elements = buildCard(config, componentScope, store);
253
253
  break;
254
254
  case "Graph":
255
255
  switch (config.graphType) {
@@ -264,6 +264,7 @@ const buildUiSchema = (config: any) => {
264
264
  elements = buildPieGraph(config, componentScope);
265
265
  break;
266
266
  case "HorizontalBarGraph":
267
+ case "HorizontalStackBarGraph":
267
268
  elements = buildHorizontalBarGraph(config, componentScope);
268
269
  break;
269
270
  }
@@ -328,7 +329,7 @@ const buildUiSchema = (config: any) => {
328
329
  header: cellElem.label || cellElem.name,
329
330
  size: sizeMap[cellElem.name] || 180,
330
331
  type: cellElem.columnFormat,
331
- elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
332
+ elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
332
333
  }
333
334
  })
334
335
  }
@@ -346,8 +347,8 @@ const buildUiSchema = (config: any) => {
346
347
  header: cellElem.label || cellElem.name,
347
348
  size: sizeMap[cellElem.name] || 180,
348
349
  type: cellElem.columnFormat,
349
- widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem) : undefined,
350
- elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem)) : []
350
+ widget: cellElem.type != "ColumnGroup" ? buildUiSchema(cellElem, store) : undefined,
351
+ elements: cellElem.type == "ColumnGroup" ? cellElem.elements.map((childCellElem) => buildUiSchema(childCellElem, store)) : []
351
352
  }
352
353
  } else {
353
354
  return {
@@ -362,12 +363,12 @@ const buildUiSchema = (config: any) => {
362
363
  }
363
364
  else if (config.type == "Array") {
364
365
  elements.options.detail.elements = config.elements.map((e: any, elemInd: number) => {
365
- return buildUiSchema(e)
366
+ return buildUiSchema(e,store)
366
367
  });
367
368
  }
368
369
  else {
369
370
  elements.elements = config.elements.map((e: any, elemInd: number) => {
370
- return buildUiSchema(e)
371
+ return buildUiSchema(e,store)
371
372
  });
372
373
  }
373
374
  }
@@ -11,7 +11,7 @@ export const APISection = {
11
11
  widget: "SelectInputField",
12
12
  },
13
13
  config: {
14
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
14
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
15
15
  main: {
16
16
  label: "Method",
17
17
  type: "text",
@@ -26,7 +26,7 @@ export const APISection = {
26
26
  widget: "InputField",
27
27
  },
28
28
  config: {
29
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
29
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
30
30
  main: {
31
31
  label: "Path",
32
32
  type: "text",
@@ -43,7 +43,7 @@ export const APISection = {
43
43
  widget: "EmptyBox",
44
44
  },
45
45
  config: {
46
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
46
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
47
47
  },
48
48
  },
49
49
  {
@@ -54,7 +54,7 @@ export const APISection = {
54
54
  widget: "EmptyBox",
55
55
  },
56
56
  config: {
57
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
57
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
58
58
  },
59
59
  },
60
60
  {
@@ -73,7 +73,7 @@ export const APISection = {
73
73
  widget: "InputField",
74
74
  },
75
75
  config: {
76
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
76
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
77
77
  main: {
78
78
  label: "Key",
79
79
  },
@@ -87,7 +87,7 @@ export const APISection = {
87
87
  widget: "InputField",
88
88
  },
89
89
  config: {
90
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
90
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
91
91
  main: {
92
92
  label: "Value",
93
93
  },
@@ -101,7 +101,7 @@ export const APISection = {
101
101
  widget: "EmptyBox",
102
102
  },
103
103
  config: {
104
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
104
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
105
105
  },
106
106
  },
107
107
  ],
@@ -124,7 +124,7 @@ export const APISection = {
124
124
  widget: "InputField",
125
125
  },
126
126
  config: {
127
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
127
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
128
128
  main: {
129
129
  label: "Key",
130
130
  },
@@ -138,7 +138,7 @@ export const APISection = {
138
138
  widget: "InputField",
139
139
  },
140
140
  config: {
141
- layout: { xs: 11, sm: 4, md: 4, lg: 4 },
141
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
142
142
  main: {
143
143
  label: "Value",
144
144
  },
@@ -152,7 +152,7 @@ export const APISection = {
152
152
  widget: "EmptyBox",
153
153
  },
154
154
  config: {
155
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
155
+ layout: { xs: 0, sm: 0, md: 4, lg: 4 },
156
156
  },
157
157
  },
158
158
  ],