impaktapps-ui-builder 1.0.148 → 1.0.150
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 +170 -185
- 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/dist/src/impaktapps-ui-builder/builder/build/uischema/card.d.ts +173 -198
- 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/build/uischema/card.ts +140 -187
- 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
|
}
|
|
@@ -11550,185 +11559,37 @@ function Card(theme) {
|
|
|
11550
11559
|
type: "WrapperLayout",
|
|
11551
11560
|
config: {
|
|
11552
11561
|
main: {},
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11562
|
+
style: {
|
|
11563
|
+
wrapperStyle: {
|
|
11564
|
+
position: "relative",
|
|
11565
|
+
top: "50%",
|
|
11566
|
+
transform: "translateY(-50%)",
|
|
11567
|
+
marginBottom: 0,
|
|
11568
|
+
borderRadius: "12px",
|
|
11569
|
+
fontFamily: "poppins"
|
|
11570
|
+
},
|
|
11571
|
+
componentsBoxStyle: {
|
|
11572
|
+
boxShadow: "0 0 6px 1px rgba(149, 147, 147, 0.25)",
|
|
11573
|
+
flexDirection: "column",
|
|
11574
|
+
overflow: "hidden",
|
|
11575
|
+
flexWrap: "nowrap",
|
|
11576
|
+
width: "100% !important",
|
|
11577
|
+
background: "transparent",
|
|
11578
|
+
borderRadius: "12px",
|
|
11579
|
+
padding: "20px 20px 20px 14px",
|
|
11580
|
+
height: "100%",
|
|
11581
|
+
minHeight: "100px",
|
|
11582
|
+
position: "relative",
|
|
11583
|
+
marginLeft: "0px",
|
|
11584
|
+
"&: hover": {
|
|
11585
|
+
background: `${theme.palette.primary.main}`,
|
|
11586
|
+
color: `${theme.palette.primary.contrastText}`
|
|
11576
11587
|
}
|
|
11577
11588
|
}
|
|
11578
11589
|
},
|
|
11579
|
-
layout: { xs: 12, sm: 12, md:
|
|
11590
|
+
layout: { xs: 12, sm: 12, md: 3, lg: 3 }
|
|
11580
11591
|
},
|
|
11581
11592
|
elements: [
|
|
11582
|
-
{
|
|
11583
|
-
type: "HorizontalLayout",
|
|
11584
|
-
config: {
|
|
11585
|
-
layout: 9
|
|
11586
|
-
},
|
|
11587
|
-
elements: [
|
|
11588
|
-
{
|
|
11589
|
-
type: "WrapperLayout",
|
|
11590
|
-
config: {
|
|
11591
|
-
main: {
|
|
11592
|
-
columnSpacing: 0,
|
|
11593
|
-
gap: 0
|
|
11594
|
-
},
|
|
11595
|
-
wrapperStyle: {
|
|
11596
|
-
background: "transparent",
|
|
11597
|
-
marginBottom: 0
|
|
11598
|
-
},
|
|
11599
|
-
componentsBoxStyle: {
|
|
11600
|
-
flexDirection: "column",
|
|
11601
|
-
flexWrap: "nowrap",
|
|
11602
|
-
width: "100%",
|
|
11603
|
-
height: "inherit",
|
|
11604
|
-
background: "transparent",
|
|
11605
|
-
borderRadius: "0px",
|
|
11606
|
-
paddingRight: 0
|
|
11607
|
-
},
|
|
11608
|
-
layout: 12
|
|
11609
|
-
},
|
|
11610
|
-
elements: [
|
|
11611
|
-
{
|
|
11612
|
-
type: "WrapperLayout",
|
|
11613
|
-
config: {
|
|
11614
|
-
main: {
|
|
11615
|
-
columnSpacing: 0,
|
|
11616
|
-
gap: 0
|
|
11617
|
-
},
|
|
11618
|
-
wrapperStyle: {
|
|
11619
|
-
background: "transparent",
|
|
11620
|
-
marginBottom: 0
|
|
11621
|
-
},
|
|
11622
|
-
componentsBoxStyle: {
|
|
11623
|
-
flexDirection: "row",
|
|
11624
|
-
flexWrap: "nowrap",
|
|
11625
|
-
width: "100%",
|
|
11626
|
-
height: "0",
|
|
11627
|
-
background: "transparent",
|
|
11628
|
-
borderRadius: "0px",
|
|
11629
|
-
marginLeft: "-10px",
|
|
11630
|
-
marginTop: "-8px",
|
|
11631
|
-
justifyContent: "start",
|
|
11632
|
-
position: "relative"
|
|
11633
|
-
},
|
|
11634
|
-
layout: 12
|
|
11635
|
-
},
|
|
11636
|
-
elements: [
|
|
11637
|
-
{
|
|
11638
|
-
type: "Control",
|
|
11639
|
-
scope: "#/properties/programType",
|
|
11640
|
-
config: {
|
|
11641
|
-
main: {
|
|
11642
|
-
heading: ""
|
|
11643
|
-
},
|
|
11644
|
-
style: {
|
|
11645
|
-
color: "black",
|
|
11646
|
-
display: "flex",
|
|
11647
|
-
fontSize: { xs: "24px", md: "28px" },
|
|
11648
|
-
fontWeight: "bold",
|
|
11649
|
-
background: "inherit",
|
|
11650
|
-
justifyContent: "flex-start",
|
|
11651
|
-
width: "auto",
|
|
11652
|
-
margin: "-8px",
|
|
11653
|
-
marginLeft: "-24px",
|
|
11654
|
-
height: 0
|
|
11655
|
-
}
|
|
11656
|
-
},
|
|
11657
|
-
options: {
|
|
11658
|
-
widget: "Box"
|
|
11659
|
-
}
|
|
11660
|
-
},
|
|
11661
|
-
{
|
|
11662
|
-
type: "Control",
|
|
11663
|
-
scope: "#/properties/programType",
|
|
11664
|
-
config: {
|
|
11665
|
-
main: {
|
|
11666
|
-
heading: "5000.00"
|
|
11667
|
-
},
|
|
11668
|
-
style: {
|
|
11669
|
-
color: "black",
|
|
11670
|
-
display: "flex",
|
|
11671
|
-
fontSize: { xs: "21px", md: "22px" },
|
|
11672
|
-
fontWeight: "500",
|
|
11673
|
-
background: "inherit",
|
|
11674
|
-
justifyContent: "flex-start",
|
|
11675
|
-
width: "auto",
|
|
11676
|
-
margin: "-8px",
|
|
11677
|
-
marginTop: "-6px",
|
|
11678
|
-
position: "absolute",
|
|
11679
|
-
left: "7px",
|
|
11680
|
-
whiteSpace: "nowrap",
|
|
11681
|
-
overflowX: "auto",
|
|
11682
|
-
overflowY: "hidden",
|
|
11683
|
-
scrollbarWidth: "none",
|
|
11684
|
-
msOverflowStyle: "none",
|
|
11685
|
-
maxWidth: "calc(100% + 20px)",
|
|
11686
|
-
"&::-webkit-scrollbar": {
|
|
11687
|
-
display: "none"
|
|
11688
|
-
}
|
|
11689
|
-
}
|
|
11690
|
-
},
|
|
11691
|
-
options: {
|
|
11692
|
-
widget: "Box"
|
|
11693
|
-
}
|
|
11694
|
-
}
|
|
11695
|
-
]
|
|
11696
|
-
},
|
|
11697
|
-
{
|
|
11698
|
-
type: "Control",
|
|
11699
|
-
scope: "#/properties/programType",
|
|
11700
|
-
config: {
|
|
11701
|
-
main: {
|
|
11702
|
-
heading: "Total Earnings"
|
|
11703
|
-
},
|
|
11704
|
-
style: {
|
|
11705
|
-
color: "black",
|
|
11706
|
-
fontSize: "16px",
|
|
11707
|
-
fontWeight: "400",
|
|
11708
|
-
justifyContent: "center",
|
|
11709
|
-
whiteSpace: "nowrap",
|
|
11710
|
-
overflowX: "auto",
|
|
11711
|
-
overflowY: "hidden",
|
|
11712
|
-
scrollbarWidth: "none",
|
|
11713
|
-
msOverflowStyle: "none",
|
|
11714
|
-
background: "inherit",
|
|
11715
|
-
width: "calc(100% + 8px)",
|
|
11716
|
-
margin: "-8px",
|
|
11717
|
-
marginTop: { xs: "16px", md: "20px" },
|
|
11718
|
-
"&::-webkit-scrollbar": {
|
|
11719
|
-
display: "none"
|
|
11720
|
-
}
|
|
11721
|
-
},
|
|
11722
|
-
layout: 12
|
|
11723
|
-
},
|
|
11724
|
-
options: {
|
|
11725
|
-
widget: "Box"
|
|
11726
|
-
}
|
|
11727
|
-
}
|
|
11728
|
-
]
|
|
11729
|
-
}
|
|
11730
|
-
]
|
|
11731
|
-
},
|
|
11732
11593
|
{
|
|
11733
11594
|
type: "Control",
|
|
11734
11595
|
scope: "#/properties/programType",
|
|
@@ -11738,23 +11599,119 @@ function Card(theme) {
|
|
|
11738
11599
|
},
|
|
11739
11600
|
style: {
|
|
11740
11601
|
containerStyle: {
|
|
11741
|
-
|
|
11602
|
+
position: "absolute",
|
|
11603
|
+
color: "inherit",
|
|
11604
|
+
top: "4px",
|
|
11605
|
+
right: "4px",
|
|
11742
11606
|
display: "flex",
|
|
11743
|
-
justifyContent: "end"
|
|
11607
|
+
justifyContent: "flex-end",
|
|
11608
|
+
alignItems: "flex-start"
|
|
11744
11609
|
},
|
|
11745
11610
|
imageStyle: {
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11611
|
+
color: "inherit",
|
|
11612
|
+
width: "32px",
|
|
11613
|
+
height: "32px",
|
|
11614
|
+
padding: "0px",
|
|
11615
|
+
margin: "0px"
|
|
11751
11616
|
}
|
|
11752
|
-
}
|
|
11753
|
-
layout: 3
|
|
11617
|
+
}
|
|
11754
11618
|
},
|
|
11755
11619
|
options: {
|
|
11756
11620
|
widget: "Image"
|
|
11757
11621
|
}
|
|
11622
|
+
},
|
|
11623
|
+
{
|
|
11624
|
+
type: "Control",
|
|
11625
|
+
scope: "#/properties/programType",
|
|
11626
|
+
config: {
|
|
11627
|
+
main: {
|
|
11628
|
+
heading: "Total Earnings"
|
|
11629
|
+
},
|
|
11630
|
+
style: {
|
|
11631
|
+
color: "inherit",
|
|
11632
|
+
fontSize: "16px",
|
|
11633
|
+
fontWeight: 300,
|
|
11634
|
+
fontFamily: "Poppins",
|
|
11635
|
+
justifyContent: "flex-start",
|
|
11636
|
+
background: "inherit",
|
|
11637
|
+
position: "absolute",
|
|
11638
|
+
top: "8px",
|
|
11639
|
+
left: "12px",
|
|
11640
|
+
display: "flex",
|
|
11641
|
+
maxWidth: "200px",
|
|
11642
|
+
whiteSpace: "nowrap",
|
|
11643
|
+
overflowX: "auto",
|
|
11644
|
+
scrollbarWidth: "none",
|
|
11645
|
+
"&::-webkit-scrollbar": {
|
|
11646
|
+
display: "none"
|
|
11647
|
+
}
|
|
11648
|
+
}
|
|
11649
|
+
},
|
|
11650
|
+
options: {
|
|
11651
|
+
widget: "Box"
|
|
11652
|
+
}
|
|
11653
|
+
},
|
|
11654
|
+
{
|
|
11655
|
+
type: "Control",
|
|
11656
|
+
scope: "#/properties/programType",
|
|
11657
|
+
config: {
|
|
11658
|
+
main: {
|
|
11659
|
+
heading: "5000.00"
|
|
11660
|
+
},
|
|
11661
|
+
style: {
|
|
11662
|
+
color: "inherit",
|
|
11663
|
+
display: "flex",
|
|
11664
|
+
fontSize: { xs: "22px", md: "40px" },
|
|
11665
|
+
fontWeight: 600,
|
|
11666
|
+
background: "inherit",
|
|
11667
|
+
justifyContent: "flex-start",
|
|
11668
|
+
width: "100%",
|
|
11669
|
+
margin: "0px",
|
|
11670
|
+
marginBottom: "4px",
|
|
11671
|
+
marginTop: "8px",
|
|
11672
|
+
lineHeight: "1",
|
|
11673
|
+
maxWidth: "300px",
|
|
11674
|
+
whiteSpace: "nowrap",
|
|
11675
|
+
overflowX: "auto",
|
|
11676
|
+
overflowY: "hidden",
|
|
11677
|
+
scrollbarWidth: "none",
|
|
11678
|
+
"&::-webkit-scrollbar": {
|
|
11679
|
+
display: "none"
|
|
11680
|
+
}
|
|
11681
|
+
}
|
|
11682
|
+
},
|
|
11683
|
+
options: {
|
|
11684
|
+
widget: "Box"
|
|
11685
|
+
}
|
|
11686
|
+
},
|
|
11687
|
+
{
|
|
11688
|
+
type: "Control",
|
|
11689
|
+
scope: "#/properties/programType",
|
|
11690
|
+
config: {
|
|
11691
|
+
main: {
|
|
11692
|
+
heading: "Increased from last month"
|
|
11693
|
+
},
|
|
11694
|
+
style: {
|
|
11695
|
+
color: "inherit",
|
|
11696
|
+
fontSize: "12px",
|
|
11697
|
+
fontWeight: "400",
|
|
11698
|
+
justifyContent: "flex-start",
|
|
11699
|
+
background: "inherit",
|
|
11700
|
+
margin: "0px",
|
|
11701
|
+
paddingLeft: "2px",
|
|
11702
|
+
marginBottom: "8px",
|
|
11703
|
+
maxWidth: "200px",
|
|
11704
|
+
whiteSpace: "nowrap",
|
|
11705
|
+
overflowX: "auto",
|
|
11706
|
+
scrollbarWidth: "none",
|
|
11707
|
+
"&::-webkit-scrollbar": {
|
|
11708
|
+
display: "none"
|
|
11709
|
+
}
|
|
11710
|
+
}
|
|
11711
|
+
},
|
|
11712
|
+
options: {
|
|
11713
|
+
widget: "Box"
|
|
11714
|
+
}
|
|
11758
11715
|
}
|
|
11759
11716
|
]
|
|
11760
11717
|
};
|
|
@@ -12586,6 +12543,31 @@ const buildImage = (config2, componentScope2) => {
|
|
|
12586
12543
|
}
|
|
12587
12544
|
return image;
|
|
12588
12545
|
};
|
|
12546
|
+
const segmentUISchema = {
|
|
12547
|
+
type: "Control",
|
|
12548
|
+
scope: "#/properties/SegmentChart",
|
|
12549
|
+
options: {
|
|
12550
|
+
widget: "SegmentChart"
|
|
12551
|
+
},
|
|
12552
|
+
config: {
|
|
12553
|
+
layout: { xs: 12, sm: 12, md: 12, lg: 12 },
|
|
12554
|
+
main: {}
|
|
12555
|
+
}
|
|
12556
|
+
};
|
|
12557
|
+
const buildSegmentChart = (config2, componentScope2) => {
|
|
12558
|
+
const segment = _.cloneDeep(segmentUISchema);
|
|
12559
|
+
segment.scope = componentScope2;
|
|
12560
|
+
if (config2.layout) {
|
|
12561
|
+
segment.config.layout = createLayoutFormat(config2.layout);
|
|
12562
|
+
}
|
|
12563
|
+
if (config2.pieArcColors) {
|
|
12564
|
+
segment.config.main.colorRange = flatObjectValueInArray(config2.pieArcColors);
|
|
12565
|
+
}
|
|
12566
|
+
if (config2.style) {
|
|
12567
|
+
segment.config.style = JSON.parse(config2.style);
|
|
12568
|
+
}
|
|
12569
|
+
return segment;
|
|
12570
|
+
};
|
|
12589
12571
|
let schema = {
|
|
12590
12572
|
type: "object",
|
|
12591
12573
|
properties: {},
|
|
@@ -12798,6 +12780,9 @@ const buildUiSchema = (config2, store2) => {
|
|
|
12798
12780
|
case "Image":
|
|
12799
12781
|
elements = buildImage(config2, componentScope2);
|
|
12800
12782
|
break;
|
|
12783
|
+
case "SegmentChart":
|
|
12784
|
+
elements = buildSegmentChart(config2, componentScope2);
|
|
12785
|
+
break;
|
|
12801
12786
|
default:
|
|
12802
12787
|
schema = {
|
|
12803
12788
|
type: "object",
|