impaktapps-ui-builder 1.0.147 → 1.0.149
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/dist/impaktapps-ui-builder.es.js +39 -2
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +3 -3
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/build/buildSegmentChart.d.ts +1 -0
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildProgressBar.ts +28 -21
- package/src/impaktapps-ui-builder/builder/build/buildSegmentChart.ts +34 -0
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +4 -0
- package/src/impaktapps-ui-builder/builder/build/uischema/buildPropertiesSection.ts +6 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/schema.ts +2 -1
|
@@ -6258,6 +6258,7 @@ const ComponentSchema = {
|
|
|
6258
6258
|
{ title: "Timer", const: "Timer" },
|
|
6259
6259
|
{ title: "Upload", const: "UploadFile" },
|
|
6260
6260
|
{ title: "Tree ", const: "TreeMap" },
|
|
6261
|
+
{ title: "SegmentChart ", const: "SegmentChart" },
|
|
6261
6262
|
{ title: "Column Group", const: "ColumnGroup" },
|
|
6262
6263
|
{ title: "Thought of the day", const: "Thought" }
|
|
6263
6264
|
]
|
|
@@ -7960,8 +7961,9 @@ const buildPropertiesSection = function(type) {
|
|
|
7960
7961
|
getInputField("bottomLabel_1", "First BottomLabel"),
|
|
7961
7962
|
getInputField("bottomLabel_2", "Second BottomLabel"),
|
|
7962
7963
|
getInputField("bottomLabel_3", "Third BottomLabel"),
|
|
7963
|
-
|
|
7964
|
-
|
|
7964
|
+
getInputField("size", "Size"),
|
|
7965
|
+
getSelectField("variant", "Variant"),
|
|
7966
|
+
getArrayControl("pieArcColors", "color", "Color")
|
|
7965
7967
|
];
|
|
7966
7968
|
break;
|
|
7967
7969
|
case "card":
|
|
@@ -10842,7 +10844,14 @@ const buildProgressBar = (config2, componentScope2) => {
|
|
|
10842
10844
|
if (config2.layout) {
|
|
10843
10845
|
ProgressBar.config.layout = config2.layout;
|
|
10844
10846
|
}
|
|
10847
|
+
ProgressBar.config.main.variant = config2.variant;
|
|
10845
10848
|
ProgressBar.config.main.heading = config2.label;
|
|
10849
|
+
if (config2.pieArcColors) {
|
|
10850
|
+
ProgressBar.config.main.colorRange = flatObjectValueInArray(config2.pieArcColors);
|
|
10851
|
+
}
|
|
10852
|
+
if (config2.size) {
|
|
10853
|
+
ProgressBar.config.main.size = Number(config2.size);
|
|
10854
|
+
}
|
|
10846
10855
|
if (config2.bottomLabel_3) {
|
|
10847
10856
|
ProgressBar.config.main.bottomLabel_3 = config2.bottomLabel_3;
|
|
10848
10857
|
}
|
|
@@ -12585,6 +12594,31 @@ const buildImage = (config2, componentScope2) => {
|
|
|
12585
12594
|
}
|
|
12586
12595
|
return image;
|
|
12587
12596
|
};
|
|
12597
|
+
const segmentUISchema = {
|
|
12598
|
+
type: "Control",
|
|
12599
|
+
scope: "#/properties/SegmentChart",
|
|
12600
|
+
options: {
|
|
12601
|
+
widget: "SegmentChart"
|
|
12602
|
+
},
|
|
12603
|
+
config: {
|
|
12604
|
+
layout: { xs: 12, sm: 12, md: 12, lg: 12 },
|
|
12605
|
+
main: {}
|
|
12606
|
+
}
|
|
12607
|
+
};
|
|
12608
|
+
const buildSegmentChart = (config2, componentScope2) => {
|
|
12609
|
+
const segment = _.cloneDeep(segmentUISchema);
|
|
12610
|
+
segment.scope = componentScope2;
|
|
12611
|
+
if (config2.layout) {
|
|
12612
|
+
segment.config.layout = createLayoutFormat(config2.layout);
|
|
12613
|
+
}
|
|
12614
|
+
if (config2.pieArcColors) {
|
|
12615
|
+
segment.config.main.colorRange = flatObjectValueInArray(config2.pieArcColors);
|
|
12616
|
+
}
|
|
12617
|
+
if (config2.style) {
|
|
12618
|
+
segment.config.style = JSON.parse(config2.style);
|
|
12619
|
+
}
|
|
12620
|
+
return segment;
|
|
12621
|
+
};
|
|
12588
12622
|
let schema = {
|
|
12589
12623
|
type: "object",
|
|
12590
12624
|
properties: {},
|
|
@@ -12797,6 +12831,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12797
12831
|
case "Image":
|
|
12798
12832
|
elements = buildImage(config2, componentScope2);
|
|
12799
12833
|
break;
|
|
12834
|
+
case "SegmentChart":
|
|
12835
|
+
elements = buildSegmentChart(config2, componentScope2);
|
|
12836
|
+
break;
|
|
12800
12837
|
default:
|
|
12801
12838
|
schema = {
|
|
12802
12839
|
type: "object",
|