impaktapps-ui-builder 1.0.50-alpha.24 → 1.0.50-alpha.26

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 (39) hide show
  1. package/dist/impaktapps-ui-builder.es.js +46 -34
  2. package/dist/impaktapps-ui-builder.es.js.map +1 -1
  3. package/dist/impaktapps-ui-builder.umd.js +1 -1
  4. package/dist/impaktapps-ui-builder.umd.js.map +1 -1
  5. package/dist/src/impaktapps-ui-builder/builder/build/buildConfig.d.ts +1 -1
  6. package/dist/src/impaktapps-ui-builder/builder/build/uischema/box.d.ts +6 -1
  7. package/dist/src/impaktapps-ui-builder/builder/build/uischema/button.d.ts +6 -1
  8. package/dist/src/impaktapps-ui-builder/builder/build/uischema/table.d.ts +1 -0
  9. package/dist/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.d.ts +1 -0
  10. package/package.json +1 -1
  11. package/src/impaktapps-ui-builder/builder/build/buildAadharCard.ts +2 -2
  12. package/src/impaktapps-ui-builder/builder/build/buildArray.ts +1 -1
  13. package/src/impaktapps-ui-builder/builder/build/buildButton.ts +1 -1
  14. package/src/impaktapps-ui-builder/builder/build/buildCheckbox.ts +1 -1
  15. package/src/impaktapps-ui-builder/builder/build/buildConfig.ts +16 -4
  16. package/src/impaktapps-ui-builder/builder/build/buildDataGrid.ts +2 -2
  17. package/src/impaktapps-ui-builder/builder/build/buildFileInput.ts +1 -1
  18. package/src/impaktapps-ui-builder/builder/build/buildHorizontalBarGraph.ts +1 -1
  19. package/src/impaktapps-ui-builder/builder/build/buildLeaderboard.ts +1 -1
  20. package/src/impaktapps-ui-builder/builder/build/buildLineGraph.ts +1 -1
  21. package/src/impaktapps-ui-builder/builder/build/buildPieGraph.ts +1 -1
  22. package/src/impaktapps-ui-builder/builder/build/buildPop.ts +1 -1
  23. package/src/impaktapps-ui-builder/builder/build/buildRadio.ts +1 -1
  24. package/src/impaktapps-ui-builder/builder/build/buildStackBarGraph.ts +1 -1
  25. package/src/impaktapps-ui-builder/builder/build/buildTextArea.ts +2 -2
  26. package/src/impaktapps-ui-builder/builder/build/buildThoughtOfTheDay.ts +1 -1
  27. package/src/impaktapps-ui-builder/builder/build/buildTreeMap.ts +2 -1
  28. package/src/impaktapps-ui-builder/builder/build/buildWrapperSection.ts +1 -1
  29. package/src/impaktapps-ui-builder/builder/build/uischema/array.ts +1 -1
  30. package/src/impaktapps-ui-builder/builder/build/uischema/box.ts +1 -1
  31. package/src/impaktapps-ui-builder/builder/build/uischema/button.ts +1 -1
  32. package/src/impaktapps-ui-builder/builder/build/uischema/dateInputField.ts +2 -2
  33. package/src/impaktapps-ui-builder/builder/build/uischema/emptyBox.ts +1 -1
  34. package/src/impaktapps-ui-builder/builder/build/uischema/file.ts +2 -2
  35. package/src/impaktapps-ui-builder/builder/build/uischema/multiSelect.ts +1 -1
  36. package/src/impaktapps-ui-builder/builder/build/uischema/selectInputField.ts +1 -1
  37. package/src/impaktapps-ui-builder/builder/build/uischema/table.ts +1 -0
  38. package/src/impaktapps-ui-builder/builder/build/uischema/textInputField.ts +1 -1
  39. package/src/impaktapps-ui-builder/builder/build/uischema/wrapperSection.ts +1 -0
@@ -1,4 +1,4 @@
1
1
  declare const _default: (FormData: any) => any;
2
2
  export default _default;
3
- export declare const createLayoutFormat: (config: any[]) => any;
3
+ export declare const createLayoutFormat: (layout: any[], type?: string) => any;
4
4
  export declare const flatObjectValueInArray: (config?: any[]) => any[];
@@ -5,7 +5,12 @@ declare const Box: {
5
5
  widget: string;
6
6
  };
7
7
  config: {
8
- layout: number;
8
+ layout: {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ };
9
14
  main: {};
10
15
  style: {};
11
16
  };
@@ -5,7 +5,12 @@ declare const _default: {
5
5
  widget: string;
6
6
  };
7
7
  config: {
8
- layout: number;
8
+ layout: {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ };
9
14
  main: {
10
15
  name: string;
11
16
  variant: string;
@@ -6,6 +6,7 @@ declare const _default: {
6
6
  };
7
7
  elements: any[];
8
8
  config: {
9
+ layout: number;
9
10
  main: {
10
11
  onMount: string;
11
12
  enableExpandAll: boolean;
@@ -1,6 +1,7 @@
1
1
  declare const _default: {
2
2
  type: string;
3
3
  config: {
4
+ layout: number;
4
5
  main: {
5
6
  rowSpacing: number;
6
7
  divider: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.50-alpha.24",
3
+ "version": "1.0.50-alpha.26",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -11,7 +11,7 @@ const TextField = {
11
11
  "widget": "InputField"
12
12
  },
13
13
  config:{
14
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
14
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
15
15
  main:{
16
16
  label:"Adhaar Card",
17
17
  formatStrArray:["9","9","9","9"," ","9","9","9","9"," ","X9","X9","X9","X9"],
@@ -43,7 +43,7 @@ const PanField = {
43
43
  "widget": "InputField"
44
44
  },
45
45
  config:{
46
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
46
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
47
47
  main:{
48
48
  label:"Pan Card",
49
49
  placeholder:"AAAAA0000A",
@@ -3,7 +3,7 @@ import _ from "lodash";
3
3
  const ArrayUiSchema: any = {
4
4
  type: "Control",
5
5
  scope: "#/properties/adjustments",
6
- layout: 11.5,
6
+ layout: 12,
7
7
  elements: [],
8
8
  config: {
9
9
  main: {}
@@ -12,7 +12,7 @@ export const buildButton = (config:any,componentScope:string) =>{
12
12
 
13
13
  }
14
14
  if(config.layout){
15
- button.config.layout = createLayoutFormat(config.layout)
15
+ button.config.layout = createLayoutFormat(config.layout, config.type)
16
16
  }
17
17
  if(config.tooltipMessage){
18
18
  button.config.main.tooltipMessage = config.tooltipMessage
@@ -4,11 +4,11 @@ import { createLayoutFormat } from "./buildConfig";
4
4
  const Checkbox = {
5
5
  "type": "Control",
6
6
  "scope": "#/properties/username1",
7
- "layout": 12,
8
7
  "options": {
9
8
  "widget": "CheckBox"
10
9
  },
11
10
  "config": {
11
+ "layout": { xs: 6, sm: 6, md: 4, lg: 3 },
12
12
  "main": {
13
13
  "label": "Welcome to Hyperform",
14
14
  }
@@ -26,13 +26,25 @@ export default (FormData: any) => {
26
26
  return component;
27
27
  };
28
28
 
29
- export const createLayoutFormat = (config: any[]) => {
30
- if (_.isEmpty(config)) {
31
- return { xs: 12, sm: 6, md: 4, lg: 3 }
29
+ export const createLayoutFormat = (layout: any[], type?: string) => {
30
+ if (_.isEmpty(layout)) {
31
+ const fullLayoutComponents: string[] = ["WrapperSection", "DataGrid", "LeaderBoard", "PopUp", "TextArea", "TreeMap", "Thought"]
32
+ if(fullLayoutComponents.includes(type)){
33
+ return { xs: 12, sm: 12, md: 12, lg: 12 }
34
+ }
35
+ else if(type === "Graph"){
36
+ return {xs :12,sm:12,md:12,lg:6}
37
+ }
38
+ else if(type === "Button"){
39
+ return { xs: 4, sm: 2.5, md: 2, lg: 1.5 }
40
+ }
41
+ else{
42
+ return { xs: 6, sm: 6, md: 4, lg: 3 }
43
+ }
32
44
  }
33
45
  let data: any = { };
34
46
 
35
- config.map((e: any) => {
47
+ layout.map((e: any) => {
36
48
  data[e.key || "xs"] = +e.value || 5.5;
37
49
 
38
50
  })
@@ -39,10 +39,10 @@ export const buildDataGrid = (config, componentScope) => {
39
39
  DataGrid.config.main.label = config.label;
40
40
  }
41
41
  if (config.layout) {
42
- DataGrid.config.layout = createLayoutFormat(config.layout)
42
+ DataGrid.config.layout = createLayoutFormat(config.layout, config.type)
43
43
  }
44
44
  if (config.cardLayout) {
45
- DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout)
45
+ DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout, config.type)
46
46
  }
47
47
  if (config.style) {
48
48
  DataGrid.config.style = JSON.parse(config.style)
@@ -8,7 +8,7 @@ const FileInput = {
8
8
  widget: "FileInputField",
9
9
  },
10
10
  config: {
11
- layout: { xs: 6, sm: 6, md: 4, lg: 3 },
11
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
12
12
  main: {
13
13
  required: false,
14
14
  onUpload: "onFileUpload",
@@ -7,7 +7,7 @@ const buildHorizontalBarGraph = (config:any,componentScope:string) => {
7
7
  const horizontalBarGraph: any = _.cloneDeep(HorizontalBarGraph);
8
8
  horizontalBarGraph.scope = componentScope;
9
9
  if (config.layout) {
10
- horizontalBarGraph.config.layout = createLayoutFormat(config.layout);
10
+ horizontalBarGraph.config.layout = createLayoutFormat(config.layout, config.type);
11
11
  }
12
12
  horizontalBarGraph.config.main.type = config.graphType;
13
13
  horizontalBarGraph.scope = componentScope;
@@ -38,7 +38,7 @@ export const buildLeaderBoard = (config) => {
38
38
  LeaderBoard.config.main.scoreKey = config.scoreKey;
39
39
  }
40
40
  if (config.layout) {
41
- LeaderBoard.config.layout = createLayoutFormat(config.layout);
41
+ LeaderBoard.config.layout = createLayoutFormat(config.layout, config.type);
42
42
  }
43
43
  if (config.style) {
44
44
  LeaderBoard.config.style = JSON.parse(config.style)
@@ -5,7 +5,7 @@ import _ from "lodash";
5
5
  export const buildLineGraph = (config, componentScope) => {
6
6
  const lineGraph: any = _.cloneDeep(LineGraph);
7
7
  if (config.layout) {
8
- lineGraph.config.layout = createLayoutFormat(config.layout);
8
+ lineGraph.config.layout = createLayoutFormat(config.layout, config.type);
9
9
  }
10
10
  lineGraph.config.main.header = config.heading;
11
11
  if (config.height) {
@@ -4,7 +4,7 @@ import _ from "lodash";
4
4
  export const buildPieGraph = (config, componentScope) => {
5
5
  const pieGraph: any = _.cloneDeep(PieGraph);
6
6
  if (config.layout) {
7
- pieGraph.config.layout = createLayoutFormat(config.layout);
7
+ pieGraph.config.layout = createLayoutFormat(config.layout, config.type);
8
8
  }
9
9
  if (config.height) {
10
10
  pieGraph.config.style.containerStyle.height = config.height;
@@ -34,7 +34,7 @@ export const buildPopUp = (config,componentScope) =>{
34
34
  popup.config.main.fullWidth = config.fullWidth === "YES" ? true : false;
35
35
  popup.config.main.maxWidth = config.maxWidth||false;
36
36
  if (config.layout) {
37
- popup.config.layout = createLayoutFormat(config.layout)
37
+ popup.config.layout = createLayoutFormat(config.layout, config.type)
38
38
  }
39
39
  if (config.style) {
40
40
  PopUP.config.style = JSON.parse(config.style)
@@ -9,7 +9,7 @@ const RadioUiSchema = {
9
9
  widget: "RadioInputField",
10
10
  },
11
11
  config: {
12
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
12
+ layout: { xs: 12, sm: 6, md: 4, lg: 3 },
13
13
  main: {
14
14
  label: "Enabled",
15
15
  options: ["YES", "NO"],
@@ -5,7 +5,7 @@ import _ from "lodash";
5
5
  export const buildStackbarGraph = (config:any,componentScope:string) => {
6
6
  const barGraph: any = _.cloneDeep(BarGraph);
7
7
  if (config.layout) {
8
- barGraph.config.layout = createLayoutFormat(config.layout);
8
+ barGraph.config.layout = createLayoutFormat(config.layout, config.type);
9
9
  }
10
10
  if (config.legendHide) {
11
11
  barGraph.config.main.legendAvailable = config.legendHide;
@@ -10,7 +10,7 @@ const TextArea = {
10
10
  widget: "TextArea",
11
11
  },
12
12
  config: {
13
- layout:{xs:12,sm:12,md:5.5,lg:5.5},
13
+ layout:12,
14
14
  style:{
15
15
  containerStyle:{
16
16
  borderRadius:"20px",
@@ -37,7 +37,7 @@ export const buildTextArea = (config:any,componentScope:string) =>{
37
37
  textArea.config.main.heading = config.label;
38
38
 
39
39
  if(config.layout){
40
- textArea.config.layout = createLayoutFormat(config.layout)
40
+ textArea.config.layout = createLayoutFormat(config.layout, config.type)
41
41
  }
42
42
  if (config.style) {
43
43
  textArea.config.style = JSON.parse(config.style)
@@ -10,7 +10,7 @@ export const buildThoughtOfTheDay = (config,componentScope) =>{
10
10
  thought.config.main.thought = `${config.thought}`
11
11
  }
12
12
  if(config.layout){
13
- thought.config.layout = createLayoutFormat(config.layout)
13
+ thought.config.layout = createLayoutFormat(config.layout, config.type)
14
14
  }
15
15
  if(config.label){
16
16
  thought.config.main.label = config.label;
@@ -5,6 +5,7 @@ const TreeMap = {
5
5
  "type": "Control",
6
6
  "scope": "#/properties/TreeMap2",
7
7
  "config": {
8
+ layout: 12,
8
9
  "main": {
9
10
  "layout": "cartsian",
10
11
  orientation: "vertical",
@@ -34,7 +35,7 @@ export const buildTreeMap = (config, componentScope) => {
34
35
  treMap.config.main.header = config.label;
35
36
  }
36
37
  if (config.layout) {
37
- treMap.config.layout = createLayoutFormat(config.layout);
38
+ treMap.config.layout = createLayoutFormat(config.layout, config.type);
38
39
  }
39
40
  if (config.orientation) {
40
41
  treMap.config.main.orientation = config.orientation;
@@ -15,7 +15,7 @@ export const buildWrapperSection = (config, componentScope) => {
15
15
  wrapper.config.style = JSON.parse(config.style)
16
16
  }
17
17
  if (config.layout) {
18
- wrapper.config.layout = createLayoutFormat(config.layout)
18
+ wrapper.config.layout = createLayoutFormat(config.layout, config.type)
19
19
  }
20
20
  return wrapper;
21
21
  }
@@ -2,7 +2,7 @@ export const ArrayLayout = {
2
2
  "type": "Control",
3
3
  "scope": "#/properties/adjustments",
4
4
  "config": {
5
- "layout": 11.5
5
+ "layout": 12
6
6
  },
7
7
  "options": {
8
8
  "name": "adjustments",
@@ -6,7 +6,7 @@
6
6
  widget: "Box",
7
7
  },
8
8
 
9
- config: { layout: 12,
9
+ config: { layout: { xs: 6, sm: 6, md: 4, lg: 3 },
10
10
  main: {},
11
11
  style:{
12
12
  // fontWeight:300
@@ -5,7 +5,7 @@ export default {
5
5
  widget: "Button",
6
6
  },
7
7
  config: {
8
- layout: 3,
8
+ layout: { xs: 4, sm: 2.5, md: 2, lg: 1.5 },
9
9
  main: {
10
10
  name: "Compare",
11
11
  variant: "contained",
@@ -6,7 +6,7 @@ export default {
6
6
  },
7
7
 
8
8
  config: {
9
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
9
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
10
10
  main: {
11
11
  label: "",
12
12
  type: "date",
@@ -21,7 +21,7 @@ export const DateTime = {
21
21
  },
22
22
 
23
23
  config: {
24
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
24
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
25
25
  main: {
26
26
  label: "DateTime",
27
27
  type: "date",
@@ -6,7 +6,7 @@ export default {
6
6
  },
7
7
 
8
8
  config: {
9
- layout: { xs: 0, sm: 4, md: 4, lg: 4 },
9
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
10
10
  main: {},
11
11
  style:{}
12
12
  },
@@ -13,7 +13,7 @@ export const uploadFile = {
13
13
  "style": {
14
14
  "backgroundColor": "none"
15
15
  },
16
- layout: { xs: 6, sm: 6, md: 4, lg: 4 }
16
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 }
17
17
  },
18
18
  "options": {
19
19
  "widget": "UploadFile"
@@ -30,7 +30,7 @@ export const downloadFile = {
30
30
  "style": {
31
31
  "backgroundColor": "none"
32
32
  },
33
- layout: { xs: 12, sm: 6, md: 4, lg: 4 }
33
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 }
34
34
  },
35
35
  "options": {
36
36
  "widget": "DownloadFile"
@@ -6,7 +6,7 @@ export default {
6
6
  widget: "MultipleSelect",
7
7
  },
8
8
  config: {
9
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
9
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
10
10
  main: {
11
11
  label: "",
12
12
  type: "text",
@@ -6,7 +6,7 @@ export default {
6
6
  widget: "SelectInputField",
7
7
  },
8
8
  config: {
9
- layout: { xs: 12, sm: 6, md: 4, lg: 3 },
9
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
10
10
  main: {
11
11
  label: "",
12
12
  type: "text",
@@ -6,6 +6,7 @@ export default {
6
6
  },
7
7
  elements: [],
8
8
  config: {
9
+ layout: 12,
9
10
  main: {
10
11
  onMount: "onMount",
11
12
  enableExpandAll: true,
@@ -6,7 +6,7 @@ export default {
6
6
  widget: "InputField",
7
7
  },
8
8
  config: {
9
- layout: { xs: 12, sm: 6, md: 4, lg: 4 },
9
+ layout: { xs: 6, sm: 6, md: 4, lg: 3 },
10
10
  main: {
11
11
  label: "",
12
12
  },
@@ -1,6 +1,7 @@
1
1
  export default {
2
2
  type: "WrapperLayout",
3
3
  config: {
4
+ layout: 12,
4
5
  main: {
5
6
  rowSpacing: 3,
6
7
  divider: true,