impaktapps-ui-builder 0.0.101-alpha.24 → 0.0.101-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.
@@ -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.24",
3
+ "version": "0.0.101-alpha.26",
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,108 @@ 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
93
  options: {
83
- "elementLabelProp": childScope,
84
- detail: {
85
- type: "HorizontalLayout",
86
- elements: [
87
- {
88
- type: "Control",
89
- scope: `#/properties/${childScope}`,
94
+ widget: "Array"
95
+ },
96
+ config: {
97
+ layout: 12,
98
+ main: {
99
+ label: childScope,
100
+ childElementLabel: childScope,
101
+ },
102
+ style: {
103
+ marginLeft: "-24px",
104
+ marginBottom: "24px !important",
105
+ labelStyle: {
106
+ marginLeft: "24px",
107
+ },
108
+ detailsStyle: {
109
+ marginLeft: "24px",
110
+ }
111
+ }
112
+ },
113
+ elements: [
114
+ {
115
+ type: "Control",
116
+ scope: `#/properties/${childScope}`,
90
117
 
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
- },
118
+ options: {
119
+ widget: "InputField",
120
+ },
121
+ config: {
122
+ layout: { xs: 6, sm: 6, md: 4, lg: 4 },
123
+ main: {
124
+ label: childLabel || "Labels for Tab",
100
125
  },
101
- emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 4, lg: 4 }),
102
- emptyBox("ArrayControlEmpty2", {xs: 0, sm: 0, md: 4, lg: 4 })
103
- ],
126
+ },
104
127
  },
105
- },
128
+ emptyBox("ArrayControlEmpty1", {xs: 6, sm: 6, md: 8, lg: 8 }),
129
+ ],
106
130
  }
107
131
  };
108
132
  const sizeHolder = getArrayControl("sizeHolder", "keyName", "Component Name");
109
- sizeHolder.options.detail.elements[1] = {
133
+ sizeHolder.elements[1] = {
110
134
  type: "Control",
111
135
  scope: `#/properties/value`,
112
136
 
@@ -120,7 +144,7 @@ sizeHolder.options.detail.elements[1] = {
120
144
  },
121
145
  },
122
146
  };
123
- sizeHolder.options.detail.elements[2] = emptyBox("sizeHolderempty")
147
+ sizeHolder.elements[2] = emptyBox("sizeHolderempty")
124
148
  const getInputField = (scope: String, label: String) => {
125
149
  return {
126
150
  type: "Control",
@@ -164,16 +188,6 @@ export const buildWrapper = (label: string, elements: any[]) => {
164
188
  label: label || "Details",
165
189
  isAccordion: true,
166
190
  },
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
191
  },
178
192
  elements: elements || []
179
193
  }
@@ -404,7 +418,7 @@ export const buildPropertiesSection = function (type: String) {
404
418
  getInputField("xAxisValue", "X-AxisValue"),
405
419
  getRadioInputField("bottomAxisAngle", "Bottom Axis Angled", ["YES", "No"]),
406
420
  getInputField("leftMargin", "Left Margin"),
407
- emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 8, lg: 8 }),
421
+ emptyBox("GraphEmpty1", {xs: 6, sm: 0, md: 8, lg: 6 }),
408
422
  getArrayControl("legendLabels", "label"),
409
423
  getArrayControl("pieArcColors", "color"),
410
424
  ];