impaktapps-ui-builder 0.0.101-alpha.23 → 0.0.101-alpha.25

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.
@@ -34,16 +34,6 @@ export declare const buildWrapper: (label: string, elements: any[]) => {
34
34
  label: string;
35
35
  isAccordion: boolean;
36
36
  };
37
- wrapperStyle: {
38
- marginTop: string;
39
- marginBottom: string;
40
- marginLeft: string;
41
- width: string;
42
- };
43
- componentsBoxStyle: {
44
- marginLeft: string;
45
- };
46
- defaultStyle: boolean;
47
37
  };
48
38
  elements: any[];
49
39
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "0.0.101-alpha.23",
3
+ "version": "0.0.101-alpha.25",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -1,7 +1,5 @@
1
1
 
2
2
  import _ from "lodash";
3
- import { buildLabel } from "../buildLabel";
4
- import Box from "./box";
5
3
  export const emptyBox = (scope:string,layout?: any) => {
6
4
 
7
5
  if(layout !== undefined){
@@ -31,82 +29,105 @@ export const emptyBox = (scope:string,layout?: any) => {
31
29
  const cardLayout = {
32
30
  type: "Control",
33
31
  scope: "#/properties/cardLayout",
34
- layout: 11.5,
35
32
  options: {
36
- detail: {
37
- type: "HorizontalLayout",
38
- elements: [
39
- {
40
- type: "Control",
41
- scope: "#/properties/key",
42
- options: {
43
- widget: "SelectInputField",
44
- },
45
- config: {
46
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
47
- main: {
48
- label: "Screen Size",
33
+ widget: "Array",
34
+ },
35
+ config: {
36
+ layout: 12,
37
+ main: {
38
+ label: "Card Layout",
39
+ childElementLabel: "Card Layout",
40
+ },
41
+ style: {
42
+ marginLeft: "-24px",
43
+ marginBottom: "24px !important",
44
+ labelStyle: {
45
+ marginLeft: "24px",
46
+ },
47
+ detailsStyle: {
48
+ marginLeft: "24px",
49
+ }
50
+ }
51
+ },
52
+ elements: [
53
+ {
54
+ type: "Control",
55
+ scope: "#/properties/key",
56
+ options: {
57
+ widget: "SelectInputField",
58
+ },
59
+ config: {
60
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
61
+ main: {
62
+ label: "Screen Size",
49
63
 
50
- },
51
- },
52
64
  },
53
- {
54
- type: "Control",
55
- scope: "#/properties/value",
65
+ },
66
+ },
67
+ {
68
+ type: "Control",
69
+ scope: "#/properties/value",
56
70
 
57
- options: {
58
- widget: "InputField",
59
- },
60
- config: {
61
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
62
- main: {
63
- label: "Value",
64
- type: "number",
65
- // freeSolo:true,
66
- helperText: 'Number should be in range of 0 to 12',
67
- errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
71
+ options: {
72
+ widget: "InputField",
73
+ },
74
+ config: {
75
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
76
+ main: {
77
+ label: "Value",
78
+ type: "number",
79
+ // freeSolo:true,
80
+ helperText: 'Number should be in range of 0 to 12',
81
+ errorMessage: "Number Can't be greater than 12 and can't be less than 0.",
68
82
 
69
- },
70
- },
71
83
  },
72
- emptyBox("cardEmpty")
73
- ],
84
+ },
74
85
  },
75
- },
86
+ emptyBox("cardEmpty")
87
+ ],
76
88
  };
77
89
  const getArrayControl = (parentScope: string, childScope: string, childLabel?: string,) => {
78
90
  return {
79
91
  type: "Control",
80
92
  scope: `#/properties/${parentScope}`,
81
- layout: 12,
82
- options: {
83
- "elementLabelProp": childScope,
84
- detail: {
85
- type: "HorizontalLayout",
86
- elements: [
87
- {
88
- type: "Control",
89
- scope: `#/properties/${childScope}`,
93
+ config: {
94
+ layout: 12,
95
+ main: {
96
+ label: childScope,
97
+ childElementLabel: childScope,
98
+ },
99
+ style: {
100
+ marginLeft: "-24px",
101
+ marginBottom: "24px !important",
102
+ labelStyle: {
103
+ marginLeft: "24px",
104
+ },
105
+ detailsStyle: {
106
+ marginLeft: "24px",
107
+ }
108
+ }
109
+ },
110
+ elements: [
111
+ {
112
+ type: "Control",
113
+ scope: `#/properties/${childScope}`,
90
114
 
91
- options: {
92
- widget: "InputField",
93
- },
94
- config: {
95
- layout: { xs: 6, sm: 6, md: 4, lg: 4 },
96
- main: {
97
- label: childLabel || "Labels for Tab",
98
- },
99
- },
115
+ options: {
116
+ widget: "InputField",
117
+ },
118
+ config: {
119
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
120
+ main: {
121
+ label: childLabel || "Labels for Tab",
100
122
  },
101
- emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 }),
102
- emptyBox("ArrayControlEmpty2", {xs: 0, sm: 0, md: 4, lg: 4 })
103
- ],
123
+ },
104
124
  },
105
- },
125
+ emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 8, lg: 8 }),
126
+ ],
106
127
  }
107
128
  };
108
129
  const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
109
- sizeHolder.options.detail.elements[1] = {
130
+ sizeHolder.elements[1] = {
110
131
  type: "Control",
111
132
  scope: `#/properties/value`,
112
133
 
@@ -120,7 +141,7 @@ sizeHolder.options.detail.elements[1] = {
120
141
  },
121
142
  },
122
143
  };
123
- sizeHolder.options.detail.elements[2] = emptyBox("sizeHolderempty")
144
+ sizeHolder.elements[2] = emptyBox("sizeHolderempty")
124
145
  const getInputField = (scope: String, label: String) => {
125
146
  return {
126
147
  type: "Control",
@@ -164,16 +185,6 @@ export const buildWrapper = (label: string, elements: any[]) => {
164
185
  label: label || "Details",
165
186
  isAccordion: true,
166
187
  },
167
- wrapperStyle: {
168
- marginTop: '-6px',
169
- marginBottom: '-8px',
170
- marginLeft: "-34px",
171
- width: "108%"
172
- },
173
- componentsBoxStyle: {
174
- marginLeft: "12px",
175
- },
176
- defaultStyle: true
177
188
  },
178
189
  elements: elements || []
179
190
  }
@@ -45,7 +45,7 @@ export default (
45
45
  schema.required = ["eventType", "Handler", "eventCode"]
46
46
 
47
47
  } else if (handlerType === "api") {
48
- uiSchema.elements[0].elements[0].elements[2] = emptyBox("emptyBox", {xs: 6,sm: 6,md: 0,lg: 3});
48
+ uiSchema.elements[0].elements[0].elements[2] = emptyBox("emptyBox", {xs: 0,sm: 0,md: 4,lg: 6});
49
49
  uiSchema.elements[0].elements[0].elements[3] = APISection;
50
50
  schema.required = ["eventType", "Handler", "method", "path"]
51
51
  } else if (handlerType === "inBuiltFunction") {
@@ -71,7 +71,7 @@ export default (
71
71
  uiSchema.elements[0].elements[0].elements[4] = getTextArea("funcParametersCode", "Write Custom Code for Functions Parameter", true);
72
72
  schema.required = ["eventType", "Handler", "inBuiltFunctionType"]
73
73
  } else if (handlerType === "refresh") {
74
- uiSchema.elements[0].elements[0].elements[2] = emptyBox("emptyBox", {xs: 6,sm: 6,md: 0,lg: 3});
74
+ uiSchema.elements[0].elements[0].elements[2] = emptyBox("emptyBox", {xs: 0,sm: 0,md: 4,lg: 6});
75
75
  uiSchema.elements[0].elements[0].elements[3] = refreshSectionUiSchema;
76
76
  schema.properties.refreshElements.required = ["value"]
77
77
  schema.properties.refreshElements.items.required = ["value"]