@ammarkhalidfarooq/dashboard-package 0.4.54 → 0.4.55
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/index.cjs.js +51 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +51 -4
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -561,7 +561,10 @@ var RenderChartCard = function RenderChartCard(_ref) {
|
|
|
561
561
|
},
|
|
562
562
|
children: item.hideControls ? item.series && /*#__PURE__*/jsx(Box, {
|
|
563
563
|
sx: {
|
|
564
|
-
display:
|
|
564
|
+
display: {
|
|
565
|
+
xs: "none",
|
|
566
|
+
sm: "flex"
|
|
567
|
+
},
|
|
565
568
|
gap: 2,
|
|
566
569
|
alignItems: "center"
|
|
567
570
|
},
|
|
@@ -623,12 +626,12 @@ var RenderChartCard = function RenderChartCard(_ref) {
|
|
|
623
626
|
})]
|
|
624
627
|
})
|
|
625
628
|
})]
|
|
626
|
-
}), /*#__PURE__*/
|
|
629
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
627
630
|
sx: {
|
|
628
631
|
flexGrow: 1,
|
|
629
632
|
minHeight: isPrimary ? "250px" : "200px"
|
|
630
633
|
},
|
|
631
|
-
children: /*#__PURE__*/jsx(RevenueChart, {
|
|
634
|
+
children: [/*#__PURE__*/jsx(RevenueChart, {
|
|
632
635
|
id: "".concat(item.label, "-").concat(index),
|
|
633
636
|
metric: item.label.includes("Rate") || item.label.includes("Performance") || item.label.includes("source") || item.label === "URL" ? "Percent" : item.stacked ? item.label.includes("Traffic") ? "Visitors" : "Donors" : metric,
|
|
634
637
|
data: item.data,
|
|
@@ -639,7 +642,51 @@ var RenderChartCard = function RenderChartCard(_ref) {
|
|
|
639
642
|
type: type || item.type || "area",
|
|
640
643
|
colors: item.colors,
|
|
641
644
|
showLegend: !item.hideControls
|
|
642
|
-
})
|
|
645
|
+
}), item.hideControls && item.series && /*#__PURE__*/jsx(Box, {
|
|
646
|
+
sx: {
|
|
647
|
+
display: {
|
|
648
|
+
xs: "flex",
|
|
649
|
+
sm: "none"
|
|
650
|
+
},
|
|
651
|
+
justifyContent: "center",
|
|
652
|
+
gap: 2,
|
|
653
|
+
flexWrap: "wrap",
|
|
654
|
+
mt: 1.5
|
|
655
|
+
},
|
|
656
|
+
children: [{
|
|
657
|
+
label: "Paid Ads",
|
|
658
|
+
color: "#6366F1"
|
|
659
|
+
}, {
|
|
660
|
+
label: "Organic",
|
|
661
|
+
color: "#10B981"
|
|
662
|
+
}, {
|
|
663
|
+
label: "Email",
|
|
664
|
+
color: "#06B6D4"
|
|
665
|
+
}].map(function (leg) {
|
|
666
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
667
|
+
sx: {
|
|
668
|
+
display: "flex",
|
|
669
|
+
alignItems: "center",
|
|
670
|
+
gap: 0.5
|
|
671
|
+
},
|
|
672
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
673
|
+
sx: {
|
|
674
|
+
width: 8,
|
|
675
|
+
height: 8,
|
|
676
|
+
borderRadius: "50%",
|
|
677
|
+
bgcolor: leg.color
|
|
678
|
+
}
|
|
679
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
680
|
+
sx: {
|
|
681
|
+
fontSize: "11px",
|
|
682
|
+
color: "rgba(0,0,0,0.6)",
|
|
683
|
+
fontWeight: 500
|
|
684
|
+
},
|
|
685
|
+
children: leg.label
|
|
686
|
+
})]
|
|
687
|
+
}, leg.label);
|
|
688
|
+
})
|
|
689
|
+
})]
|
|
643
690
|
}), item.footer && /*#__PURE__*/jsxs(Box, {
|
|
644
691
|
sx: {
|
|
645
692
|
display: "flex",
|