impaktapps-ui-builder 0.0.374 → 0.0.375

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.374",
3
+ "version": "0.0.375",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -25,19 +25,25 @@ const dataGrid = {
25
25
  export const buildDataGrid = (config, componentScope) => {
26
26
  const DataGrid: any = _.cloneDeep(dataGrid);
27
27
  DataGrid.scope = componentScope;
28
- DataGrid.config.main.useWrapper = config.useWrapper === "NO" ? false : true;
29
28
  if (config.elevation) {
30
29
  DataGrid.config.main.elevation = +config.elevation;
31
30
  }
31
+ DataGrid.config.main.divider = config.divider === "NO" ? false : true;
32
32
  if (config.height) {
33
33
  DataGrid.config.main.height = `${config.height}px`;
34
34
  }
35
+ if (config.justifyContent) {
36
+ DataGrid.config.main.justifyContent = config.justifyContent;
37
+ }
35
38
  if (config.label) {
36
39
  DataGrid.config.main.label = config.label;
37
40
  }
38
41
  if (config.layout) {
39
42
  DataGrid.config.layout = createLayoutFormat(config.layout)
40
43
  }
44
+ if (config.cardLayout) {
45
+ DataGrid.config.cardLayout = createLayoutFormat(config.cardLayout)
46
+ }
41
47
  if (config.style) {
42
48
  DataGrid.config.style = JSON.parse(config.style)
43
49
  }
@@ -19,6 +19,61 @@ const EmptyBox = {
19
19
  },
20
20
  },
21
21
  };
22
+ const cardLayout = {
23
+ type: "Control",
24
+ scope: "#/properties/cardLayout",
25
+ layout: 11.5,
26
+ options: {
27
+ detail: {
28
+ type: "HorizontalLayout",
29
+ elements: [
30
+ {
31
+ type: "Control",
32
+ scope: "#/properties/key",
33
+ options: {
34
+ widget: "SelectInputField",
35
+ },
36
+ config: {
37
+ layout: {
38
+ xs: 11,
39
+ sm: 11,
40
+ md: 5.5,
41
+ lg: 5.5,
42
+ },
43
+ main: {
44
+ label: "Screen Size",
45
+
46
+ },
47
+ },
48
+ },
49
+ {
50
+ type: "Control",
51
+ scope: "#/properties/value",
52
+
53
+ options: {
54
+ widget: "InputField",
55
+ },
56
+ config: {
57
+ layout: {
58
+ xs: 11,
59
+ sm: 11,
60
+ md: 5.5,
61
+ lg: 5.5,
62
+ },
63
+ main: {
64
+ label: "Value",
65
+ type:"number",
66
+ // freeSolo:true,
67
+ helperText:'Number should be in range of 0 to 12',
68
+ errorMessage:"Number Can't be greater than 12 and can't be less than 0.",
69
+
70
+ },
71
+ },
72
+ },
73
+ ],
74
+ },
75
+ },
76
+ };
22
77
  const getArrayControl = (parentScope: string, childScope: string, childLabel?: string,) => {
23
78
  return {
24
79
  type: "Control",
@@ -182,8 +237,11 @@ export const buildPropertiesSection = function (type: String) {
182
237
  switch (type) {
183
238
  case "DataGrid":
184
239
  uiSchema.elements = [
185
- getRadioInputField("useWrapper", "use Item Wrapper", ["YES", "NO"]),
186
- getInputField("elevation", "Item Wrapper Elevation"),
240
+ getRadioInputField("divider", "Use Header divider", ["YES", "NO"]),
241
+ getInputField("elevation", "Card Elevation"),
242
+ getInputField("height", "Grid height"),
243
+ getInputField("justifyContent", "justifyContent"),
244
+ cardLayout,
187
245
  ]
188
246
  break;
189
247
  case "Stepper":
@@ -73,6 +73,27 @@ export const ComponentSchema: any = {
73
73
  },
74
74
  },
75
75
  },
76
+ cardLayout: {
77
+ type: "array",
78
+ items: {
79
+ type: "object",
80
+ properties: {
81
+ key: {
82
+ type: "string",
83
+ oneOf: [
84
+ { title: "Extra Small", const: "xs" },
85
+ { title: "Small", const: "sm" },
86
+ { title: "Medium", const: "md" },
87
+ { title: "Large", const: "lg" },
88
+ ],
89
+ },
90
+ value: {
91
+ // type: "string",
92
+
93
+ },
94
+ },
95
+ },
96
+ },
76
97
  value: {
77
98
  type: "array",
78
99
  items: {