impaktapps-ui-builder 1.0.154 → 1.0.155

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": "1.0.154",
3
+ "version": "1.0.155",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -20,13 +20,16 @@ const segmentUISchema = {
20
20
  export const buildSegmentChart = (config,componentScope) => {
21
21
  const segment: any = _.cloneDeep(segmentUISchema);
22
22
  segment.scope = componentScope;
23
-
23
+
24
24
  if(config.layout){
25
25
  segment.config.layout = createLayoutFormat(config.layout)
26
26
  }
27
27
  if (config.pieArcColors) {
28
28
  segment.config.main.colorRange = flatObjectValueInArray(config.pieArcColors);
29
29
  }
30
+ if (config.height) {
31
+ segment.config.main.height = Number(config.height);
32
+ }
30
33
  if (config.style) {
31
34
  segment.config.style = JSON.parse(config.style)
32
35
  }
@@ -143,7 +143,7 @@ sizeHolder.elements[1] = {
143
143
  },
144
144
  };
145
145
  sizeHolder.elements[2] = emptyBox("sizeHolderempty")
146
- const getInputField = (scope: String, label: String) => {
146
+ const getInputField = (scope: String, label: String,type?:string) => {
147
147
  return {
148
148
  type: "Control",
149
149
  scope: `#/properties/${scope}`,
@@ -155,6 +155,7 @@ const getInputField = (scope: String, label: String) => {
155
155
  layout: { xs: 6, sm: 6, md: 4, lg: 3 },
156
156
  main: {
157
157
  label: label,
158
+ type:type
158
159
  },
159
160
  },
160
161
  };
@@ -417,12 +418,19 @@ export const buildPropertiesSection = function (type: String) {
417
418
  emptyBox("ButtonEmpty1", { xs: 6, sm: 6, md: 4, lg: 4 })
418
419
  ];
419
420
  break;
420
- case "Box":
421
+ case "Box":
421
422
  uiSchema.elements = [
422
423
  getSelectField("iconName", "Icon Name", []),
423
424
  emptyBox("BoxEmpty1", { xs: 6, sm: 6, md: 4, lg: 8 })
424
425
  ];
425
426
  break;
427
+ case "SegmentChart":
428
+ uiSchema.elements = [
429
+ getInputField("height", "Height", "number"),
430
+ emptyBox("BoxEmpty1", { xs: 6, sm: 6, md: 4, lg: 8 }),
431
+ getArrayControl("pieArcColors", "color","Color"),
432
+ ];
433
+ break;
426
434
  case "Graph":
427
435
  uiSchema.elements = [
428
436
  getInputField("height", "Height"),
@@ -41,7 +41,7 @@ export const ComponentSchema: any = {
41
41
  { title: "Text Area", const: "TextArea" },
42
42
  { title: "Timer", const: "Timer" },
43
43
  { title: "Upload", const: "UploadFile" },
44
- { title: "Tree ", const: "TreeMap" },//SegmentChart
44
+ { title: "Tree ", const: "TreeMap" },
45
45
  { title: "SegmentChart ", const: "SegmentChart" },
46
46
  { title: "Column Group", const: "ColumnGroup" },
47
47
  { title: "Thought of the day", const: "Thought" },